branch_name
stringclasses
149 values
text
stringlengths
23
89.3M
directory_id
stringlengths
40
40
languages
listlengths
1
19
num_files
int64
1
11.8k
repo_language
stringclasses
38 values
repo_name
stringlengths
6
114
revision_id
stringlengths
40
40
snapshot_id
stringlengths
40
40
refs/heads/master
<file_sep># ui-router-little-demo 公司项目使用的是ui-router框架,在公司用久了,都是复制复制,很容易淡忘,自己也慢慢的尝试用一下,记录一下自己的学习。 <file_sep>/** * Created by urcha on 2017/2/26. */ var routerApp=angular.module('routerApp',['ui.router']); routerApp.run(function($rootScope, $state, $stateParams) { $rootScope.$state = $state; $rootScope.$stateParams = $stateParams; }); routerApp.config(function($stateProvider, $urlRouterProvider) { $urlRouterProvider.otherwise('/gallery'); $stateProvider .state('gallery',{ url:'/gallery', views:{ '':{ templateUrl:'app/business/gallery.html' }, 'categoryNav@gallery':{ templateUrl:'app/business/categoryNav.html' }, 'categoryContent@gallery':{ templateUrl:'app/business/portrait.html' } } }) .state('gallery.portrait',{ url:'/portrait' , views:{ 'categoryContent@gallery':{ templateUrl:'app/business/portrait.html' } } }) .state('gallery.iphonePhotography',{ url:'/iphonePhotography' , views:{ 'categoryContent@gallery':{ templateUrl:'app/business/iphonePhotography.html' } } }) .state('about',{ url:'/about', views:{ '':{ templateUrl:'app/business/about.html' } } }); });
954e5956a162e94a9bd33ba7acda576b8eabd1f8
[ "Markdown", "JavaScript" ]
2
Markdown
CgFeng/ui-router-little-demo
0d335686659268dfb7afcace20541a16575540db
ce5899f85004aa5c172242473919a52f4d13c797
refs/heads/master
<repo_name>Darklins/ring-toss-2<file_sep>/src/components/ring/index.ts export { Ring } from './component'; <file_sep>/src/components/result/index.ts export { Result } from './component'; <file_sep>/src/components/prize-grid/index.ts export { PrizeGrid } from './component'; <file_sep>/src/components/prize/index.ts export { Prize } from './component';
5985e18a90de635ce0352fb687e1658c1505e99d
[ "TypeScript" ]
4
TypeScript
Darklins/ring-toss-2
db5990b2e666d9fefae341fca7df2d65d03d81e8
15cffe70413b6a52dab404001c6d1792a5c6a864
refs/heads/master
<repo_name>Shubham-Saxena-dev/DriverApi<file_sep>/repository/pg_repo.go package repository import ( "ProductApis/model" "github.com/jinzhu/gorm" ) const ( CAR = "Car" Company = "Car.Company" ) type Repository interface { GetDriverDetails(id int) (model.Driver, error) CreateDriver(driver model.Driver) error GetAllDriverDetails() ([]model.Driver,error) UpdateDriver(Id string) DeleteDriver(Id int) error } type repository struct { db *gorm.DB } func NewRepository(db *gorm.DB) Repository { return &repository{ db: db, } } func (r repository) GetDriverDetails(id int) (model.Driver, error) { var driver model.Driver err := r.db.Preload(CAR).Preload(Company).Find(&driver, id).Error return driver, err } func (r repository) CreateDriver(driver model.Driver) error { return r.db.Create(&driver).Error } func (r repository) GetAllDriverDetails() ([]model.Driver, error){ var driver []model.Driver err := r.db.Preload(CAR).Preload(Company).Find(&driver).Error return driver, err } func (r repository) UpdateDriver(Id string) { panic("implement me") } func (r repository) DeleteDriver(id int) error { return r.db.Unscoped().Delete(&model.Driver{}, id).Error } <file_sep>/model/api_request.go package model import "github.com/jinzhu/gorm" type Driver struct { gorm.Model Name string `json:"name"` Address string `json:"address"` Phone int64 `json:"phone"` Car []Car `gorm:"ForeignKey:DriverID"` } type Car struct { gorm.Model Color string `json:"color"` LicensePlate string `json:"licensePlate"` Company Company `gorm:"ForeignKey:CarID"` DriverID uint `gorm:"column:driver_id"` } type Company struct { gorm.Model Name string `json:"name"` CarModel string `json:"carModel"` CarID uint `gorm:"column:car_id"` } func (faculty *Driver) TableName() string { return "driver" } func (faculty *Car) TableName() string { return "car" } func (faculty *Company) TableName() string { return "company" } <file_sep>/main.go package main import ( "ProductApis/controller" "ProductApis/model" "ProductApis/repository" "ProductApis/service" "github.com/gorilla/mux" "github.com/jinzhu/gorm" _ "github.com/lib/pq" "github.com/rs/cors" log "github.com/sirupsen/logrus" "net/http" ) func main() { log.Info("Hi, this is driver car api") db := initializeDB() repo := repository.NewRepository(db) routeService := service.NewRouteService(repo) routeHandler := controller.NewRouteHandler(routeService) registerHandlers(routeHandler) } func registerHandlers(controller controller.Routes) { router := mux.NewRouter() router.HandleFunc("/", controller.GetAllDriverDetails).Methods("GET") router.HandleFunc("/", controller.CreateDriver).Methods("POST") router.HandleFunc("/{id}", controller.GetDriverDetails).Methods("GET") router.HandleFunc("/{id}", controller.UpdateDriver).Methods("PUT") router.HandleFunc("/{id}", controller.DeleteDriver).Methods("DELETE") handler := cors.Default().Handler(router) log.Fatal(http.ListenAndServe(":8093", handler)) } func initializeDB() *gorm.DB { db, err := gorm.Open("postgres", "user=user password=<PASSWORD> dbname=gormDB sslmode=disable") if err != nil { log.Error(err.Error()) } database := db.DB() err = database.Ping() if err != nil { panic(err.Error()) } db.AutoMigrate(&model.Driver{}, &model.Car{}, &model.Company{}) return db } <file_sep>/go.mod module ProductApis go 1.14 require ( github.com/gorilla/mux v1.8.0 github.com/jinzhu/gorm v1.9.16 github.com/lib/pq v1.10.1 // indirect github.com/rs/cors v1.7.0 github.com/sirupsen/logrus v1.8.1 gorm.io/driver/postgres v1.1.0 gorm.io/gorm v1.21.10 ) <file_sep>/service/route_service.go package service import ( "ProductApis/model" "ProductApis/repository" log "github.com/sirupsen/logrus" ) type RouteService interface { GetDriverDetails(id int) model.Driver CreateDriver(driver model.Driver) GetAllDriverDetails() []model.Driver UpdateDriver(id int) DeleteDriver(id int) string } type routeService struct { repo repository.Repository } func NewRouteService(repo repository.Repository) RouteService { return &routeService{repo: repo} } func (r routeService) GetDriverDetails(id int) model.Driver { if id < 1 { handleError("Invalid id provided") } result, err := r.repo.GetDriverDetails(id) if err != nil { handleError(err.Error()) } return result } func (r routeService) CreateDriver(driver model.Driver) { err := r.repo.CreateDriver(driver) if err != nil { handleError(err.Error()) } } func (r routeService) GetAllDriverDetails() []model.Driver { result, err := r.repo.GetAllDriverDetails() if err != nil { handleError(err.Error()) } return result } func (r routeService) UpdateDriver(id int) { panic("implement me") } func (r routeService) DeleteDriver(id int) string { err := r.repo.DeleteDriver(id) if err != nil { handleError(err.Error()) } return "Deleted successfully" } func handleError(s string) { log.Error("Error occurred: {}", s) } <file_sep>/controller/route_handlers.go package controller import ( "ProductApis/model" "ProductApis/service" "encoding/json" "github.com/gorilla/mux" "net/http" "strconv" ) type Routes interface { GetDriverDetails(w http.ResponseWriter, req *http.Request) CreateDriver(w http.ResponseWriter, req *http.Request) GetAllDriverDetails(w http.ResponseWriter, req *http.Request) UpdateDriver(w http.ResponseWriter, req *http.Request) DeleteDriver(w http.ResponseWriter, req *http.Request) } type routeHandler struct { service service.RouteService } func NewRouteHandler(service service.RouteService) Routes { return &routeHandler{ service: service, } } func (r routeHandler) GetDriverDetails(w http.ResponseWriter, req *http.Request) { result := r.service.GetDriverDetails(getIdFromReq(req)) returnResult(result, w) } func (r routeHandler) GetAllDriverDetails(w http.ResponseWriter, req *http.Request) { result := r.service.GetAllDriverDetails() returnResult(result, w) } func (r routeHandler) CreateDriver(w http.ResponseWriter, req *http.Request) { driver := model.Driver{} if err := json.NewDecoder(req.Body).Decode(&driver); err != nil { panic(err) } defer req.Body.Close() r.service.CreateDriver(driver) } func (r routeHandler) UpdateDriver(w http.ResponseWriter, req *http.Request) { r.service.UpdateDriver(getIdFromReq(req)) } func (r routeHandler) DeleteDriver(w http.ResponseWriter, req *http.Request) { returnResult(r.service.DeleteDriver(getIdFromReq(req)), w) } func getIdFromReq(request *http.Request) int { vars := mux.Vars(request) idVar := vars["id"] id, err := strconv.Atoi(idVar) if err != nil { panic(err) } return id } func returnResult(result interface{}, w http.ResponseWriter) { enc := json.NewEncoder(w) enc.SetIndent("", " ") enc.Encode(result) }
508fbad7cec45007b2a3f3f534b395da8e76bf98
[ "Go Module", "Go" ]
6
Go
Shubham-Saxena-dev/DriverApi
7fd570e2d2e7c04644b9939ba59708f9932a296d
dbb085bd3d544e2dcc9905cfa7a400d8fa48b904
refs/heads/master
<file_sep><!--// title: Sample Blog Post date: 2016-12-20 image: sample-blog-post.png live: true //--> # Sample Blog Post ![Sample Blog Post Image](assets/images/sample-blog-post.png) <!-- snippet -->This is an example blog post for the Tele Static Site Generator.<file_sep>const gulp = require('gulp'), clean = require('gulp-clean'), sass = require('gulp-sass'), rev = require('gulp-rev'), nunjucksRender = require('gulp-nunjucks-render'), markdown = require('gulp-markdown'), concat = require('gulp-concat'), uglify = require('gulp-uglify'), sourcemaps = require('gulp-sourcemaps'), fs = require('fs'), gap = require('gulp-append-prepend'), htmlmin = require('gulp-htmlmin'), cleanCSS = require('gulp-clean-css'), replace = require('gulp-replace'), sitemap = require('gulp-sitemap'), srcPaths = { 'root': 'src/', 'templates': 'src/templates/**/*.html', 'pagesDir': 'src/pages/', 'pages': 'src/pages/**/*.html', 'postsDir': 'src/posts/', 'assets': 'src/assets/', 'sass': 'src/assets/scss/', 'js': 'src/assets/js/**/*.js', 'images': 'src/assets/images/', 'fonts': 'src/assets/fonts/' }, buildPaths = { 'root': 'build/', 'assets': 'build/assets/', 'images': 'build/assets/images/', 'fonts': 'build/assets/fonts/' }, distPaths = { 'root': 'dist/', 'assets': 'dist/assets/', 'images': 'dist/assets/images', 'fonts': 'dist/assets/fonts/' }; // // Lib functions // ------------------------------------------------------------- function getAssetFileNames() { var jsManifest = JSON.parse(fs.readFileSync(distPaths.assets + 'js-manifest.json', 'utf8')); var cssManifest = JSON.parse(fs.readFileSync(distPaths.assets + 'css-manifest.json', 'utf8')); return { jsFile: jsManifest['main.js'], cssFile: cssManifest['main.css'] } } function getPostData(cb) { var postData = {}; postData.posts = []; postData.livePosts = []; fs.readdir(srcPaths.postsDir , function(err, files) { if (err) { console.error('Could not list the directory.', err); process.exit(1); } files.forEach(function(file, index) { fs.readFile(srcPaths.postsDir + file, 'utf-8', function (err, content) { if (err) { console.error(err); process.exit(1); } var paramStartMarker = '<!--//', paramEndMarker = '//-->', snippetMarker = '<!-- snippet -->'; var paramsStart = content.lastIndexOf(paramStartMarker), paramsEnd = content.lastIndexOf(paramEndMarker), params = content.substring(paramsStart + paramStartMarker.length, paramsEnd), paramLines = params.split('\n'), postObj = {}; for (var i = 0; i < paramLines.length; i++) { if (paramLines[i]) { var data = paramLines[i].split(':'); postObj[data[0].trim()] = data[1].trim(); } } if (postObj.live === 'true') { var filename = file.split('.')[0], snippetStart = content.lastIndexOf(snippetMarker); postObj.slug = filename + '.html'; var snippet = content.substring( snippetStart + snippetMarker.length, content.length ).split('\n'); postObj.snippet = snippet[0].split(' ').slice(0, 40).join(' '); postData.livePosts.push(srcPaths.postsDir + file); postData.posts.push(postObj); } cb(postData); }); }); }); } function getNavLinks() { var navLinks = []; fs.readdir(srcPaths.pagesDir , function(err, files) { if (err) { console.error('Could not list the directory.', err); process.exit(1); } files.forEach(function(file, index) { fileParts = file.split('.'); if (fileParts[1] !== undefined) { if (fileParts[1] === 'html') { navObj = {}; if (file === 'index.html') { navLinks.splice(0, 0, {title: 'Home', link: file}); return; } navObj.title = toTitleCase(file.split('.')[0]); navObj.link = file; navLinks.push(navObj); } } }); }); return navLinks; } function toTitleCase(str) { // per http://stackoverflow.com/a/196991 return str.replace(/\w\S*/g, function(txt){ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); } // // Build tasks // ------------------------------------------------------------- gulp.task('build-clean', function () { return gulp.src(buildPaths.root + '*', {read: false}) .pipe(clean()); }); gulp.task('build-sass', ['build-clean'], function () { return gulp.src(srcPaths.sass + 'main.scss') .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(sourcemaps.write('.', {includeContent: true})) .pipe(gulp.dest(buildPaths.assets)) }); gulp.task('build-js', ['build-clean'], function () { return gulp.src(srcPaths.js) .pipe(sourcemaps.init()) .pipe(concat('main.js')) .pipe(sourcemaps.write('.', {includeContent: true})) .pipe(gulp.dest(buildPaths.assets)) }); gulp.task('build-images', ['build-clean'], function () { return gulp.src(srcPaths.images +'*.{png,gif,jpg}') .pipe(gulp.dest(buildPaths.images)); }); gulp.task('build-favicon', ['build-clean'], function () { return gulp.src(srcPaths.images + 'favicon.ico') .pipe(gulp.dest(buildPaths.root)); }); gulp.task('build-fonts', ['build-clean'], function () { return gulp.src(srcPaths.fonts +'*.{woff,woff2,ttf,eot,svg}') .pipe(gulp.dest(buildPaths.fonts)); }); gulp.task('build-templates', ['build-clean'], function() { return getPostData(function(data) { data.navLinks = getNavLinks(); gulp.src(srcPaths.pages) .pipe(nunjucksRender({data: data})) .pipe(gulp.dest(buildPaths.root)); }); }); gulp.task('build-posts', ['build-clean'], function() { return getPostData(function(data) { data.navLinks = getNavLinks(); gulp.src(data.livePosts) .pipe(markdown()) .pipe(gap.prependText('{% extends "src/templates/post.html" %}{% block post %}')) .pipe(gap.appendText('{% endblock %}')) .pipe(nunjucksRender({data: data})) .pipe(gulp.dest(buildPaths.root)); }); }); // // Dist tasks // ------------------------------------------------------------- gulp.task('dist-clean', function () { return gulp.src(distPaths.root + '*', {read: false}) .pipe(clean()); }); gulp.task('dist-css', ['dist-clean'], function() { return gulp.src(buildPaths.assets + '**/*.css') .pipe(cleanCSS()) .pipe(rev()) .pipe(gulp.dest(distPaths.assets)) .pipe(rev.manifest('css-manifest.json')) .pipe(gulp.dest(distPaths.assets)); }); gulp.task('dist-js', ['dist-clean'], function() { return gulp.src(buildPaths.assets + '**/*.js') .pipe(uglify()) .pipe(rev()) .pipe(gulp.dest(distPaths.assets)) .pipe(rev.manifest('js-manifest.json')) .pipe(gulp.dest(distPaths.assets)); }); gulp.task('dist-images', ['dist-clean', 'dist-js'], function () { return gulp.src(buildPaths.images +'*.{png,gif,jpg}') .pipe(gulp.dest(distPaths.images)); }); gulp.task('dist-favicon', ['dist-clean'], function () { return gulp.src(buildPaths.root + 'favicon.ico') .pipe(gulp.dest(distPaths.root)); }); gulp.task('dist-fonts', ['dist-clean'], function () { return gulp.src(buildPaths.fonts +'*.{woff,woff2,ttf,eot,svg}') .pipe(gulp.dest(distPaths.fonts)); }); gulp.task('dist-html', ['dist-clean', 'dist-css', 'dist-js'], function() { var options = { collapseWhitespace: true, removeComments: true }, assets = getAssetFileNames(); return gulp.src(buildPaths.root + '*.html') .pipe(replace('main.js', assets.jsFile)) .pipe(replace('main.css', assets.cssFile)) .pipe(htmlmin(options)) .pipe(gulp.dest(distPaths.root)) .pipe(sitemap({ siteUrl: 'https://www.example.com' })) .pipe(gulp.dest(distPaths.root)); }); // // Main tasks // ------------------------------------------------------------- gulp.task('watch', function() { gulp.watch(srcPaths.root + '**/*', ['build']); }); gulp.task('build', [ 'build-templates', 'build-posts', 'build-favicon', 'build-images', 'build-js', 'build-sass', 'build-fonts' ]); gulp.task('dist', [ 'dist-html', 'dist-favicon', 'dist-images', 'dist-fonts' ]); <file_sep>![Tele Static Site Generator Logo](src/assets/images/tele-logo.png) --- The Tele Static Site Generator is a friendly markdown driven content maker for simple sites and blogs.
8700a7184dac8ce7ad7452f851cb1654162a0efd
[ "Markdown", "JavaScript" ]
3
Markdown
ab7/tele-static-site-generator
73e38afbf2952492152342791f835fc972ee0a5f
e512b95cf41bef59accd1d8c9c02a298a142616b
refs/heads/master
<repo_name>shaharholzman/ShoopingStore-myapp<file_sep>/src/app/services/main.service.ts import { Injectable } from '@angular/core'; import { HttpClient,HttpHeaders } from '@angular/common/http'; import { UserService } from './user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; @Injectable({ providedIn: 'root' }) export class MainService { public categories:any = [] public order:any = [] public complitedOrder:boolean = false public width:any = '100%' constructor(public http:HttpClient,public su:UserService, public mts:MatSnackBar) { } // Get Categories(7)---------------------------------------------------------> GetCategories(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/Categories`,{headers,withCredentials:true,responseType:'text'}) } // Get Products Of Categories(8)---------------------------------------------------------> GetProductsOfCategories(e){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/Categories/${e.target.id}`,{headers,withCredentials:true,responseType:'text'}) } // Get Product(9)---------------------------------------------------------> GetProduct(body){ console.log(body) const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/users/product`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // Add Cart(10)---------------------------------------------------------> AddCart(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/cart`,{headers,withCredentials:true,responseType:'text'}) } // Add Product For Cart(11)---------------------------------------------------------> AddProductForCart(body,id){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/users/product/${id}`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // Delete Product from Cart(13)----------------------------------------------------> DeleteProductFormCart(e){ let body = {'id':this.su.cart[0].id} const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.put(`http://localhost:3000/users/product/delete/${e.target.id}`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // Delete Product from Cart(14)----------------------------------------------------> DeleteAllProductFormCart(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.delete(`http://localhost:3000/users/product/delete/all/${this.su.cart[0].id}`,{headers,withCredentials:true,responseType:'text'}) } // serch product of order(15)-----------------------------------------------> SerchProductOfOrder(body){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/order/product/${body}`,{headers,withCredentials:true,responseType:'text'}) } // Make Order(16)-----------------------------------------------> MakeOrder(body){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/users/orders/${this.su.cart[0].id}`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // bring cart && products of cart ---------------------------------------------> BringCartAndProducts(){ if(this.su.cart.length === 0){ this.su.GetChartOfUser().subscribe( res => { this.su.cart = JSON.parse(res) this.su.GetProductsOfCart().subscribe( res => { this.su.productsOfCart = JSON.parse(res) this.su.GetTotalPriceOfCart() }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('We111re sorry, something happened in our system, please try again','close') }) }, err => { this.mts.open('We111re sorry, something happened in our system, please try again','close') }) }else{ this.su.GetProductsOfCart().subscribe( res => { this.su.productsOfCart = JSON.parse(res) this.su.GetTotalPriceOfCart() }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('We111re sorry, something happened in our system, please try again','close') }) } } } <file_sep>/src/app/app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import {ReactiveFormsModule} from '@angular/forms'; import { HttpClientModule } from '@angular/common/http'; import {MatInputModule} from '@angular/material/input'; import {MatGridListModule} from '@angular/material/grid-list'; import {MatSnackBarModule} from '@angular/material/snack-bar'; import {MatSelectModule} from '@angular/material/select'; import {MatDatepickerModule} from '@angular/material/datepicker'; import {MatNativeDateModule} from '@angular/material'; import {HighlightPipeService} from './services/highlight.pipe.service'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HomeComponent } from './components/home/home.component'; import { NavbarComponent } from './components/navbar/navbar.component'; import { PanelBComponent } from './components/panel-b/panel-b.component'; import { PanelCComponent } from './components/panel-c/panel-c.component'; import { PanelAComponent } from './components/panel-a/panel-a.component'; import { MainComponent } from './components/main/main.component'; import { MainUserComponent } from './components/main-user/main-user.component'; import { SideBarComponent } from './components/side-bar/side-bar.component'; import { ViewComponent } from './components/view/view.component'; import { ResizableModule } from 'angular-resizable-element'; import { ReceiptComponent } from './components/receipt/receipt.component'; import { OrderComponent } from './components/order/order.component'; import { MainOrderComponent } from './components/main-order/main-order.component'; import { MainAdminComponent } from './components/Admin_Components/main-admin/main-admin.component'; import { SideBarAdminComponent } from './components/Admin_Components/side-bar-admin/side-bar-admin.component'; import { ViewAdminComponent } from './components/Admin_Components/view-admin/view-admin.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; @NgModule({ declarations: [ AppComponent, HomeComponent, NavbarComponent, PanelBComponent, PanelCComponent, PanelAComponent, MainComponent, MainUserComponent, SideBarComponent, ViewComponent, ReceiptComponent, OrderComponent, MainOrderComponent, HighlightPipeService, MainAdminComponent, SideBarAdminComponent, ViewAdminComponent, ], imports: [ BrowserModule, AppRoutingModule, BrowserAnimationsModule, ReactiveFormsModule, MatInputModule, HttpClientModule, MatGridListModule, MatSnackBarModule, MatSelectModule, ResizableModule, MatDatepickerModule, MatNativeDateModule, NgbModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { } <file_sep>/src/app/services/admin.service.ts import { Injectable } from '@angular/core'; import { HttpClient,HttpHeaders } from '@angular/common/http'; import { Router } from '@angular/router'; @Injectable({ providedIn: 'root' }) export class AdminService { public state_update:boolean = false public state_add:boolean = false public productToUpdate:any = [] constructor(public router:Router,public http:HttpClient) { } // verify verify(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/admin/verify`,{headers,withCredentials:true,responseType:'text'}) } // if vt fail sendHome(){ this.router.navigateByUrl('/') setTimeout(() => { window.location.reload() }, 50); } // Get Categories(1)---------------------------------------------------------> GetCategories(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get('http://localhost:3000/admin/Categories',{headers,withCredentials:true,responseType:'text'}) } // Get Products Of Categories(2)---------------------------------------------------------> GetProductsOfCategories(e){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/admin/Categories/${e.target.id}`,{headers,withCredentials:true,responseType:'text'}) } // Add Product(3)---------------------------------------------------------> AddProduct(body){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post('http://localhost:3000/admin/product',JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // Get data of product to update(4)---------------------------------------------------------> GetProductForUpdate(e){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/admin/product/${e.target.id}`,{headers,withCredentials:true,responseType:'text'}) } // update Product(5)---------------------------------------------------------> UpdateProduct(body,e){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.put(`http://localhost:3000/admin/product/update/${e.target.id}`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // search Product(5)---------------------------------------------------------> GetProduct(body){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/admin/search/product`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } } <file_sep>/src/app/components/main-order/main-order.component.ts import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; import * as jsPDF from 'jspdf' import { Router } from '@angular/router'; import { MainService } from 'src/app/services/main.service'; import { UserService } from 'src/app/services/user.service'; import * as moment from 'moment'; @Component({ selector: 'app-main-order', templateUrl: './main-order.component.html', styleUrls: ['./main-order.component.css'] }) export class MainOrderComponent implements OnInit { public date:Date = new Date public moment: any = moment constructor(public router:Router,public sm:MainService,public su:UserService) { } name = 'Angular Html To Pdf '; @ViewChild('pdfTable', {static: false}) pdfTable: ElementRef; // GoHome------------------------------------> GoHome(){ this.su.sendHome() } downloadAsPDF(){ const doc = new jsPDF(); const specialElementHandlers = { '#editor': function (element, renderer) { return true; } }; const pdfTable = this.pdfTable.nativeElement; doc.fromHTML(pdfTable.innerHTML, 15, 15, { width: 190, 'elementHandlers': specialElementHandlers }); doc.save('tableToPdf.pdf'); } ngOnInit() { this.sm.complitedOrder = false this.su.stateLog = true // // verify this.su.DoVerify() } } <file_sep>/src/app/components/Admin_Components/view-admin/view-admin.component.ts import { Component, OnInit } from '@angular/core'; import { MainService } from 'src/app/services/main.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import { UserService } from 'src/app/services/user.service'; import { FormBuilder, FormGroup, Validators , FormControl,FormGroupDirective, NgForm} from '@angular/forms'; import { AdminService } from 'src/app/services/admin.service'; import { Renderer,ElementRef } from '@angular/core'; @Component({ selector: 'app-view-admin', templateUrl: './view-admin.component.html', styleUrls: ['./view-admin.component.css'] }) export class ViewAdminComponent implements OnInit { public form:FormGroup constructor(public elementRef: ElementRef,public render:Renderer,public sa:AdminService,public sm:MainService,public su:UserService,public mts:MatSnackBar,public fb:FormBuilder) { } // Get product By Search--------------------------------------------> GetProduct(event) { if(event.target.value.length === 0){ this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) }else{ let data = [{'name':event.target.value}] this.sa.GetProduct(data).subscribe( res => { console.log(res) let product = JSON.parse(res) this.su.products = product }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } } // Get Products Of Categories---------------------------------------> GetProductsOfCategories(event){ this.sa.GetProductsOfCategories(event).subscribe( res => { this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } // Get Data of product for update/Get form for update---------------------------> GetProductAndForm(event){ let shadesEl = document.querySelectorAll('.product') for(let i = 0 ; i < shadesEl.length;i++){ shadesEl[i].classList.add('border') } this.sa.GetProductForUpdate(event).subscribe( res => { let shadesEl1 = document.getElementById(`${event.target.id}+1`); shadesEl1.classList.remove('border') this.sa.productToUpdate = JSON.parse(res) this.sa.state_update = true this.sa.state_add = false console.log(this.sa.productToUpdate) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } ngOnInit() { this.form = this.fb.group({ name:[""]}); // Get all categories this.sa.GetCategories().subscribe( res => { this.sm.categories = JSON.parse(res) console.log( this.sm.categories) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) // get all products this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') }) } } <file_sep>/src/app/components/navbar/navbar.component.ts import { Component, OnInit } from '@angular/core'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; @Component({ selector: 'app-navbar', templateUrl: './navbar.component.html', styleUrls: ['./navbar.component.css'] }) export class NavbarComponent implements OnInit { constructor(public su:UserService,public mts:MatSnackBar) { } // LogOut & Refrash Token GetMudaleLogOut(){ this.su.LogOut().subscribe( res => { this.su.sendHome() }, err => { console.log(err) this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } ngOnInit() { } } <file_sep>/src/app/components/Admin_Components/side-bar-admin/side-bar-admin.component.ts import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators , FormControl,FormGroupDirective, NgForm} from '@angular/forms'; import { AdminService } from 'src/app/services/admin.service'; import { MainService } from 'src/app/services/main.service'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; @Component({ selector: 'app-side-bar-admin', templateUrl: './side-bar-admin.component.html', styleUrls: ['./side-bar-admin.component.css'] }) export class SideBarAdminComponent implements OnInit { public addform:FormGroup public updateform:FormGroup constructor(public mts:MatSnackBar,public fb:FormBuilder,public su:UserService,public sa:AdminService,public sm:MainService) { } // Get Mudal of addform GetFormAdd(){ this.sa.state_add = !this.sa.state_add this.sa.state_update = false } // Add Product-------------------------------------------------> AddProduct(){ let shadesEl = document.querySelectorAll('.product') for(let i = 0 ; i < shadesEl.length;i++){ shadesEl[i].classList.add('border') } this.sa.AddProduct(this.addform.value).subscribe( res => { this.sa.state_add = !this.sa.state_add this.addform.reset() this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page','close') } ) }, err => { if(err.status === 401){ this.sa.sendHome() } console.log(err) this.addform.reset() this.sa.state_add = !this.sa.state_add this.mts.open('Were sorry, something happened in our system, please refresh the page','close') } ) } // UpdateProduct------------------------------------------------> UpdateProduct(event){ this.sa.UpdateProduct(this.updateform.value,event).subscribe( res => { this.sa.state_update = false this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system,the change is save , just refresh the page','close') }) }, err => { if(err.status === 401){ this.sa.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } ngOnInit() { this.addform= this.fb.group({ name:['',Validators.required], price:['',Validators.required], img: ['', Validators.required], category: ['',Validators.required] }) this.updateform= this.fb.group({ name:[ '',Validators.required], price:['',Validators.required], img: ['', Validators.required], categories_id: ['',Validators.required] }) } } <file_sep>/src/app/components/panel-c/panel-c.component.ts import { Component, OnInit } from '@angular/core'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import * as moment from 'moment'; @Component({ selector: 'app-panel-c', templateUrl: './panel-c.component.html', styleUrls: ['./panel-c.component.css'] }) export class PanelCComponent implements OnInit { public moment: any = moment constructor(public su:UserService,public mts:MatSnackBar) { } ngOnInit() { // get all products this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { this.mts.open('We are sorry, something happened in our system, please refresh the page and try again','close') } ) // get all orders this.su.GetAllOrders().subscribe( res => { this.su.orders = JSON.parse(res) }, err => { this.mts.open('We are sorry, something happened in our system, please refresh the page and try again','close') } ) } } <file_sep>/src/app/services/user.service.ts import { Injectable } from '@angular/core'; import { HttpClient,HttpHeaders } from '@angular/common/http'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; @Injectable({ providedIn: 'root' }) export class UserService { public stateLog:boolean = false public form_A:any = [] public Have_VT:boolean = false public New_User:boolean = false public Login_Cart:boolean = false public Login_Order:boolean = false public shopping:string public orders:any = [] public order:any = {} public cart:any = [] public productsOfCart:any = [] public ProductsOfCartLowerCase:any = [] public products:any = [] public guest:string = 'guest' public user:any = [] public cities:any = [ {name:'Haifa'}, {name:'Herzliya'}, {name:'Jafo'}, {name:'Jerusalem'}, {name:'Kfar-Saba'}, {name:'Netanya'}, {name:'Ramat-Gan'}, {name:'Ranana'}, {name:'Rosh-HaAyin'}, {name:'Tel-Aviv'}, ] public TotalAmount:number constructor(public http:HttpClient,public mts:MatSnackBar,public router:Router) { } // verify verify(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/verify`,{headers,withCredentials:true,responseType:'text'}) } //Verify user per page---------------------------------------------------------> DoVerify(){ this.verify().subscribe( res => { let data = JSON.parse(res) this.guest = data[2].c let array = [{'id':data[0].a},{'costomer_id':data[1].b}] this.cart = array }, err => { this.sendHome() } ) } // if vt fail sendHome(){ this.router.navigateByUrl('/') setTimeout(() => { window.location.reload() }, 50); } // Get Total Price Of Cart --------------------------------------------------> GetTotalPriceOfCart(){ this.TotalAmount = 0 for(let i=0; i < this.productsOfCart.length ;i++){ let sum = this.TotalAmount + this.productsOfCart[i].total_price this.TotalAmount = sum } } //LogOut & Refrash Token LogOut(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/LogOut`,{headers,withCredentials:true,responseType:'text'}) } // Register_A-----------------------------------------------------------------> Register_A(body){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/users/register_A`,JSON.stringify(body),{headers,responseType:'text'}) } // Full-Register(1)-----------------------------------------------------------> FullRegister(data){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/users/register`,JSON.stringify(data),{headers,withCredentials:true ,responseType:'text'}) } // Login(2)-------------------------------------------------------------------> Login(body){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.post(`http://localhost:3000/users/login`,JSON.stringify(body),{headers,withCredentials:true,responseType:'text'}) } // GetAllProducts(3)----------------------------------------------------------> GetAllProducts(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/products`,{headers ,withCredentials:true, responseType:'text'}) } // GetAllOrders(4)----------------------------------------------------------> GetAllOrders(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/orders`,{headers ,withCredentials:true, responseType:'text'}) } //GetChartOfUser(5)---------------------------------------------------------------> GetChartOfUser(){ const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get('http://localhost:3000/users/cart/user',{headers ,withCredentials:true , responseType:'text'}) } // GetProductsOfCart(12)-----------------------------------------------------------> GetProductsOfCart(){ console.log(this.cart[0].id) const headers = new HttpHeaders({ 'content-Type':'application/json' }) return this.http.get(`http://localhost:3000/users/product/${this.cart[0].id}`,{headers ,withCredentials:true , responseType:'text'}) } } <file_sep>/src/app/components/order/order.component.ts import { Component, OnInit ,ViewEncapsulation} from '@angular/core'; import { FormBuilder, FormGroup, Validators , FormControl,FormGroupDirective, NgForm} from '@angular/forms'; import { Router } from '@angular/router'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import { MainService } from 'src/app/services/main.service'; import { ErrorStateMatcher } from '@angular/material/core'; import * as moment from 'moment'; export class MyErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { const invalidCtrl = !!(control && control.invalid && control.parent.dirty); const invalidParent = !!(control && control.parent && control.parent.invalid && control.parent.dirty); return (invalidCtrl || invalidParent); } } @Component({ selector: 'app-order', templateUrl: './order.component.html', styleUrls: ['./order.component.css'], encapsulation: ViewEncapsulation.None, }) export class OrderComponent implements OnInit { public form:FormGroup public dateOrder:any = [] public street:string = "" public moment: any = moment public arr:any = [] matcher = new MyErrorStateMatcher(); constructor(public fb:FormBuilder,public sm:MainService,public su:UserService,public mts:MatSnackBar,public router:Router) { this.form = this.fb.group({ city:["",Validators.required], street:[this.street,Validators.required], DeliveryDate:["",Validators.required], credit:["",Validators.required] },{validators : this.checkCredits}) } // create validators for credit checkCredits(group: FormGroup) { let credit = group.controls.credit.value const RegexCard = /^(?:4[0-9]{12}(?:[0-9]{3})?)$|^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$|^3[47][0-9]{13}$/ return credit = RegexCard.test(credit) ? null : { notSame : true } } // Prevent Sunday from being selected. myFilter = (d: Date): boolean => { const day = d.getDay(); return day !== 6; } // marks full book date dateClass = (d:Date) => { let selected = false; selected = this.arr.some((item) => new Date(item).getFullYear() == d.getFullYear() && new Date(item).getDate() == d.getDate() && new Date(item).getMonth() == d.getMonth()) return selected ? 'example-custom-date-class' : undefined; } // Check if date if full-book checkDate(event){ let new_data = this.moment(new Date(event.target.value)).format('D MMM YYYY') let bool = this.dateOrder.findIndex(item => this.moment(new Date(item)).format('D MMM YYYY') == new_data) if(bool >= 0){ this.form.controls.DeliveryDate.setValue('') this.form.controls['DeliveryDate'].setErrors({'incorrect' : true}) this.mts.open('Were sorry,All shipments are busy on this day, please try a different date','close') } } // Bring Street of User----------------------------------------------> GetStreet(){ this.street = this.su.user[0].street } // Make Order----------------------------------------------------------> MakeOrder(){ console.log(this.form.value) let newDate = this.moment(this.form.controls.DeliveryDate.value).format() let form = this.form.value let total_price = this.su.TotalAmount let body = {form,total_price,'newDate':newDate} this.sm.MakeOrder(body).subscribe( res => { this.form.reset() this.sm.complitedOrder = !this.sm.complitedOrder }, err =>{ console.log(err) if(err.status === 401){ this.su.sendHome() }else{ this.mts.open('Were sorry, something happened in our system, please go to home page and connect again(your order is saved)','close') } } ) } ngOnInit() { // Get All Delivery Dates this.su.GetAllOrders().subscribe( res => { let array = JSON.parse(res) for (let i = 0; i < array.length; i++) { let count = 0 count = 0 for (let z = 0; z < array.length; z++){ if (array[i].DeliveryDate === array[z].DeliveryDate) { count++ if(count >= 3){ let index = this.dateOrder.find(item =>item ===array[i].DeliveryDate ) if(index == undefined){ let l = array[i].DeliveryDate this.dateOrder.push(l) } } } } } this.dateOrder.map(item => this.arr.push(this.moment(new Date(item)).format())) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('We are sorry, something happened in our system, please try again','close') } ) } } <file_sep>/src/app/services/highlight.pipe.service.ts import { Injectable } from '@angular/core'; import { Pipe, PipeTransform } from '@angular/core'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { UserService } from './user.service'; @Pipe({ name: 'highlight' }) @Injectable({ providedIn: 'root' }) export class HighlightPipeService implements PipeTransform { constructor(private _sanitizer: DomSanitizer, public su:UserService) { } transform(list = this.su.productsOfCart, searchText: string): any { if (!list) { return []; } if (!searchText) { return list } if( /^[A-Z]/.test(searchText)){ const value = list.replace( searchText, `<span style='background-color:yellow'>${searchText.toUpperCase().substring(0,1) + searchText.substring(1).toLowerCase()}</span>` ); console.log('value', value); return this._sanitizer.bypassSecurityTrustHtml(value); }else{ let x = searchText.toUpperCase().substring(0,1) + searchText.substring(1).toLowerCase() const value = list.replace( x, `<span style='background-color:yellow'>${x.toUpperCase().substring(0,1) + x.substring(1).toLowerCase()}</span>` ); console.log('value', value,x); return this._sanitizer.bypassSecurityTrustHtml(value); } } } <file_sep>/src/app/components/panel-a/panel-a.component.ts import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators , FormControl,FormGroupDirective, NgForm} from '@angular/forms'; import { Router } from '@angular/router'; import { ErrorStateMatcher } from '@angular/material/core'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import { MainService } from 'src/app/services/main.service'; export class MyErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { const invalidCtrl = !!(control && control.invalid && control.parent.dirty); const invalidParent = !!(control && control.parent && control.parent.invalid && control.parent.dirty); return (invalidCtrl || invalidParent); } } @Component({ selector: 'app-panel-a', templateUrl: './panel-a.component.html', styleUrls: ['./panel-a.component.css'] }) export class PanelAComponent implements OnInit { public formLogin:FormGroup public formRegister_A:FormGroup public formRegister_B:FormGroup public state_A:boolean = false public state_B:boolean = false matcher = new MyErrorStateMatcher(); constructor(public fb:FormBuilder,public sm:MainService,public su:UserService,public mts:MatSnackBar,public router:Router) { // Define first registration form + validator this.formRegister_A = this.fb.group({ personal_id:["",Validators.required], userName:["",Validators.required], password: ['', Validators.required], confirmPassword: [''] }, { validator: this.checkPasswords }); } // functions=================================================================================> // create validators for passwords checkPasswords(group: FormGroup) { let pass = group.controls.password.value; let confirmPass = group.controls.confirmPassword.value; return pass === confirmPass ? null : { notSame: true } } // change modal Login VS Register GoRegister(){ this.su.guest = 'guest' this.su.Have_VT = false this.su.Login_Order = false this.su.Login_Cart = false this.state_A = !this.state_A } // GoToNextPageUser-------------------------------------------------------------> NextPageUser(){ // Create Cart for user if(this.su.cart.length === 0){ this.sm.AddCart().subscribe( res => { this.su.cart = JSON.parse(res) this.router.navigateByUrl('/main/user') }, err => { this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } this.router.navigateByUrl('/main/user') } // Login-----------------------------------------------------------------------> Login(){ this.su.Login(this.formLogin.value).subscribe( res => { this.formLogin.reset() let data = JSON.parse(res) this.su.user = data this.su.guest = data[0].userName if(this.su.user[0].idAdmin === 0){ this.su.GetChartOfUser().subscribe( res => { let data = JSON.parse(res) this.su.cart = data if(this.su.cart.length === 0){ let LastOrder = this.su.orders.find( or => this.su.user[0].id === or.user_id ) this.su.shopping = 'Start' this.su.Have_VT = !this.su.Have_VT if(LastOrder !== undefined){ this.su.order = LastOrder this.su.Login_Order = !this.su.Login_Order }else{ this.su.New_User = !this.su.New_User } }else{ this.su.Login_Cart = !this.su.Login_Cart this.su.Have_VT = !this.su.Have_VT this.su.shopping = 'Resume' } }, err => { this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) }else{ console.log('ADMIN') this.router.navigateByUrl('/main/admin') } }, err =>{ this.formLogin.reset() console.log(err) if(err.status === 400){ this.mts.open('One or more of the details you entered are incorrect, please try again','close') }else{ this.mts.open('Were sorry, something happened in our system, please try again','close') } } ) } // Register_A------------------------------------------------------------------> Register_A(){ this.su.Register_A(this.formRegister_A.value).subscribe( res => { if(res === 'OK'){ this.su.form_A = this.formRegister_A.value this.state_B = !this.state_B this.formRegister_A.reset() }else{ this.formRegister_A.reset() this.mts.open(res,'close') } }, err =>{ this.formRegister_A.reset() this.mts.open('We are sorry, something happened in our system, please try again','close') } ) } // FullRegister/Register_B--------------------------------------------------------> FullRegister(){ let data = {'form_A':this.su.form_A,'form_B':this.formRegister_B.value} this.su.FullRegister(data).subscribe( res => { let data = JSON.parse(res) this.su.user = data[0] this.su.guest = data[0].userName this.state_B = !this.state_B this.state_A = !this.state_A this.su.Have_VT = !this.su.Have_VT this.su.shopping = 'Start' this.su.New_User = !this.su.New_User }, err => { this.mts.open('We are sorry, something happened in our system, please try again','close') } ) } ngOnInit() { this.state_A = false this.state_B = false this.su.Have_VT = false this.su.New_User = false this.su.Login_Cart = false this.su.Login_Order = false this.su.guest = 'guest' this.formLogin = this.fb.group({ userName:["",Validators.required], password:["",Validators.required], }) this.formRegister_B = this.fb.group({ city:["",Validators.required], street:["",Validators.required], first_name: ['', Validators.required], last_name: ['',Validators.required] }); } } <file_sep>/src/app/components/side-bar/side-bar.component.ts import { Component, OnInit} from '@angular/core'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import { MainService } from 'src/app/services/main.service'; import { Router } from '@angular/router'; @Component({ selector: 'app-side-bar', templateUrl: './side-bar.component.html', styleUrls: ['./side-bar.component.css'] }) export class SideBarComponent implements OnInit { constructor( public router:Router, public sm:MainService, public su:UserService, public mts:MatSnackBar ) { } // Go To Order Page---------------------------------------------------------------> GoToOrderPage(){ this.router.navigateByUrl('/main/order') } // Delete Product from Cart------------------------------------------------------> DeleteProductFromCart(event){ let shadesEl = document.getElementById(`${event.target.id}+1`); this.sm.DeleteProductFormCart(event).subscribe( res => { this.su.GetProductsOfCart().subscribe( res => { shadesEl.classList.add('slide-out-blurred-left') setTimeout(() => { this.su.productsOfCart = JSON.parse(res) this.su.GetTotalPriceOfCart() }, 800); }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please try again','close') } ) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please try again','close') } ) } // Delete All from Cart----------------------------------------------------------> DeleteAll(){ this.sm.DeleteAllProductFormCart().subscribe( res => { this.su.GetProductsOfCart().subscribe( res => { this.su.productsOfCart = JSON.parse(res) this.su.GetTotalPriceOfCart() }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please try again','close') } ) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please try again','close') } ) } ngOnInit() { this.sm.BringCartAndProducts() } } <file_sep>/src/app/components/view/view.component.ts import { Component, OnInit } from '@angular/core'; import { MainService } from 'src/app/services/main.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import { UserService } from 'src/app/services/user.service'; import { FormBuilder, FormGroup, Validators , FormControl,FormGroupDirective, NgForm} from '@angular/forms'; import { ErrorStateMatcher } from '@angular/material/core'; export class MyErrorStateMatcher implements ErrorStateMatcher { isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean { const invalidCtrl = !!(control && control.invalid && control.parent.dirty); const invalidParent = !!(control && control.parent && control.parent.invalid && control.parent.dirty); return (invalidCtrl || invalidParent); } } @Component({ selector: 'app-view', templateUrl: './view.component.html', styleUrls: ['./view.component.css'] }) export class ViewComponent implements OnInit { public form:FormGroup public form_input:FormGroup public state_input:boolean = false public AddProduct:any = [] public amount:number = 0 public class_opacity:boolean = true public number:number = 1 public btn:boolean = false constructor(public sm:MainService,public su:UserService,public mts:MatSnackBar,public fb:FormBuilder) { } // validator of form valiNumber(group: FormGroup) { let number = group.controls.add.value; console.log(number) return number > 0 ? null : { notValid: true } } // Get product By Search--------------------------------------------> GetProduct(event) { if(event.target.value.length === 0){ this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) }else{ let data = [{'name':event.target.value}] this.sm.GetProduct(data).subscribe( res => { let product = JSON.parse(res) this.su.products = product }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } } // Get Products Of Categories---------------------------------------> GetProductsOfCategories(event){ this.sm.GetProductsOfCategories(event).subscribe( res => { let shadesEl = document.querySelectorAll('.btn-outline-info') for(let i = 0 ; i < shadesEl.length;i++){ shadesEl[i].classList.remove('active') } let shadesEl1 = document.getElementById(`${event.target.id}`) shadesEl1.classList.add('active') this.su.products = JSON.parse(res) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } // Get Model Of Add Product-----------------------------------------> GetProductAndForm(event){ if(this.state_input !== true){ this.number = 1 this.class_opacity = false this.state_input = true let data = [{'name':event.target.id}] this.sm.GetProduct(data).subscribe( res => { this.AddProduct = JSON.parse(res) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) }else{ this.class_opacity = true this.state_input = !this.state_input this.amount = 0 this.number = 1 this.form_input = this.fb.group({ add:[this.number,Validators.required]},{validator:this.valiNumber}); } } // Show total price of item*amount in form AddAmount(event){ console.log(event) this.amount = this.AddProduct[0].price*event.target.value } // Add Product To Cart----------------------------------------------> AddProductToCart(){ this.number = 1 this.state_input = !this.state_input this.class_opacity = true let id = this.su.cart[0].id let total_price = this.form_input.value.add*this.AddProduct[0].price let amount = this.form_input.value.add let product_id = this.AddProduct[0].id let body = {total_price,amount,product_id } this.sm.AddProductForCart(body,id).subscribe( res => { this.amount = 0 this.number = 1 this.form_input = this.fb.group({ add:[this.number,Validators.required]},{validator:this.valiNumber}); this.su.productsOfCart = JSON.parse(res) this.su.GetTotalPriceOfCart() }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) } ngOnInit() { this.form = this.fb.group({ name:[""]}); this.form_input = this.fb.group({ add:[this.number,Validators.required]},{validator:this.valiNumber}); // Get all categories this.sm.GetCategories().subscribe( res => { this.sm.categories = JSON.parse(res) }, err => { if(err.status === 401){ this.su.sendHome() } this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') } ) // for Refrash ================================================> // get all products if(this.su.products.length === 0){ this.su.GetAllProducts().subscribe( res => { this.su.products = JSON.parse(res) }, err => { this.mts.open('Were sorry, something happened in our system, please refresh the page and try again','close') }) } } } <file_sep>/src/app/components/Admin_Components/main-admin/main-admin.component.ts import { Component, OnInit } from '@angular/core'; import { ResizeEvent } from 'angular-resizable-element' import { Router } from '@angular/router'; import { AdminService } from 'src/app/services/admin.service'; import { UserService } from 'src/app/services/user.service'; @Component({ selector: 'app-main-admin', templateUrl: './main-admin.component.html', styleUrls: ['./main-admin.component.css'] }) export class MainAdminComponent implements OnInit { public style: any = {} public style1: any = {} constructor(public router:Router,public sa:AdminService,public su:UserService) { } validate(event: ResizeEvent) { const MIN_DIMENSIONS_PX: number = 960; if ( event.rectangle.width && (event.rectangle.width < MIN_DIMENSIONS_PX )) { return false; } return true; } onResizeEnd(event: ResizeEvent): void { this.style = { position: 'fixed', right: `0px`, width: `${event.rectangle.width}px`, }, this.style1 = { position: 'fixed', left: `0px`, width: `${ window.innerWidth - event.rectangle.width}px` } } ngOnInit() { this.su.stateLog = true // verify this.sa.verify().subscribe( res => { this.su.guest = JSON.parse(res) }, err => { this.sa.sendHome() } ) } } <file_sep>/src/app/components/main-user/main-user.component.ts import { Component, OnInit } from '@angular/core'; import { ResizeEvent } from 'angular-resizable-element' import { MainService } from 'src/app/services/main.service'; import { UserService } from 'src/app/services/user.service'; import { Router } from '@angular/router'; @Component({ selector: 'app-main-user', templateUrl: './main-user.component.html', styleUrls: ['./main-user.component.css'], }) export class MainUserComponent implements OnInit { public style: any = {} public style1: any = {} constructor(public su:UserService,public sm:MainService,public router:Router) { } validate(event: ResizeEvent) { const MIN_DIMENSIONS_PX: number = 900; if ( event.rectangle.width && (event.rectangle.width < MIN_DIMENSIONS_PX )) { return false; } return true; } onResizeEnd(event: ResizeEvent): void { if( window.innerWidth - event.rectangle.width - 115 !< 200 ){ this.sm.width = `${ window.innerWidth - event.rectangle.width - 115}px` }else{ this.sm.width ='100%' } this.style = { position: 'fixed', right: `0px`, width: `${event.rectangle.width}px`, }, this.style1 = { position: 'fixed', left: `0px`, width: `${ window.innerWidth - event.rectangle.width}px` } } ngOnInit() { this.su.stateLog = true // verify this.su.DoVerify() this.sm.width ='100%' } } <file_sep>/src/app/app-routing.module.ts import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './components/home/home.component'; import { PanelAComponent } from './components/panel-a/panel-a.component'; import { MainComponent } from './components/main/main.component'; import { MainUserComponent } from './components/main-user/main-user.component'; import { MainOrderComponent } from './components/main-order/main-order.component'; import { MainAdminComponent } from './components/Admin_Components/main-admin/main-admin.component'; const routes: Routes = [ {path:'main',component:MainComponent, children:[ {path:'home',component:HomeComponent}, {path:'admin',component:MainAdminComponent}, {path:'user',component:MainUserComponent}, {path:'order',component:MainOrderComponent}, {path:'',pathMatch:'full',redirectTo:'home'}, {path:'**',redirectTo:'home'}, ]}, {path:'',pathMatch:'full',redirectTo:'main'}, {path:'**',redirectTo:'main'}, ]; @NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule] }) export class AppRoutingModule { } <file_sep>/src/app/components/receipt/receipt.component.ts import { Component, OnInit } from '@angular/core'; import { UserService } from 'src/app/services/user.service'; import { MatSnackBar } from '@angular/material/snack-bar'; import { MainService } from 'src/app/services/main.service'; import { Router } from '@angular/router'; import { FormBuilder, FormGroup} from '@angular/forms'; @Component({ selector: 'app-receipt', templateUrl: './receipt.component.html', styleUrls: ['./receipt.component.css'] }) export class ReceiptComponent implements OnInit { public form:FormGroup public searchResults:any public searchVal:string constructor( public router:Router, public sm:MainService, public su:UserService, public mts:MatSnackBar, public fb:FormBuilder, ) { } // Back To Cart Page---------------------------------------------------------------> GoToCartPage(){ this.router.navigateByUrl('/main/user') } ngOnInit() { this.sm.BringCartAndProducts() this.searchResults = this.su.productsOfCart this.form = this.fb.group({ name:[""]}); } }
7b256f9b82bab0813e5c392fea4f577111ad16fc
[ "TypeScript" ]
18
TypeScript
shaharholzman/ShoopingStore-myapp
138902c6a11105e157c5e28f21efa077060ff57a
8e9f9bac2ad7b913c6667aa2fdea33d052f91376
refs/heads/master
<repo_name>AlvinSud/UAS-project-AkAshiA<file_sep>/routes/web.php <?php use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ //Route::get('/[linknya]', ControllerYgHandleRequest); //Route::post('/[linknya]', ControllerYgHandleRequest); /*Route::post('/', function () { return view('welcome'); });*/ /*Route::get('/', function () { return view('welcome'); });*/ //$basepath_controller = "App\Http\Controllers\"; Route::get('/', 'App\Http\Controllers\AwalController@index'); Route::get('/login', 'App\Http\Controllers\AwalController@login'); Route::post('/authenticate', 'App\Http\Controllers\AwalController@authentication'); Route::get('/logout', 'App\Http\Controllers\AwalController@logout'); //REGISTRATION Route::post('/register', 'App\Http\Controllers\AwalController@daftar_baru'); Route::get('/register', 'App\Http\Controllers\AwalController@register'); //PROFIL: ubah Route::get('/profil', 'App\Http\Controllers\AwalController@profil'); Route::post('/ubah-profil', 'App\Http\Controllers\AwalController@ubah_profil'); //HAPUS AKUN Route::post('/delete-account','App\Http\Controllers\AwalController@hapus_account'); Route::get('/items', 'App\Http\Controllers\AwalController@items'); Route::get('/about', 'App\Http\Controllers\AwalController@about'); Route::get('/contact', 'App\Http\Controllers\AwalController@contact'); Route::get('/forgot', 'App\Http\Controllers\AwalController@forgot'); Route::get('/checkout', 'App\Http\Controllers\AwalController@checkout'); Route::get('/shopcart', 'App\Http\Controllers\AwalController@shopcart'); //Route::post('/tangkap', 'App\Http\Controllers\AwalController@tangkap');<file_sep>/app/Http/Controllers/TangkapController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; class TangkapController extends Controller { public function index(Request $req){ echo $req->input('nama_user'); echo "<br>"; echo $req->input('alamat_surat'); } }<file_sep>/app/Http/Controllers/AwalController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\Pengguna; use Session; class AwalController extends Controller { public function index(){ //echo "Halo Kamu ngakses Controller Awal pada function index"; //return view('form'); return view('index'); } public function login(){ return view('login'); } public function logout(Request $req){ //HATI-HATI: menghancurkan session dan set session flash $hasLogin = $req->session()->has('login'); if(isset($hasLogin)){ Session::flush(); Session::flash('success', 'Anda berhasil logout!'); return redirect('/login'); } } public function register(){ return view('register'); } public function daftar_baru(Request $req){ $usr = new Pengguna(); /*$data = [ 'username' => 'jwijaya', 'password' => '<PASSWORD>', 'email' => '<EMAIL>', 'phone' => '081342469097', 'gender' => 'M', ];*/ $data = [ 'nama' => $req->input('nama_lengkap'), 'username' => $req->input('nama_user'), 'password' => $req->input('kata_sandi'), ]; //print_r($data); //die(); $res = $usr->buat($data); if($res==1){ //echo "Berhasil Insert Data User!"; Session::flash('success', 'Anda berhasil membuat akun!'); return redirect('/login'); } } /*public function tangkap(Request $req){ echo $req->input('nama_user'); echo "<br>"; echo $req->input('alamat_surat'); }*/ public function authentication(Request $req){ //1. Get INPUT $usrname = $req->input('nama_user'); $pass = $req->input('kata_sandi'); $data = [ 'username' => $usrname, 'password' => $pass, ]; //2. Check Username dan Password ke database $usr = new Pengguna(); $flag_exist = $usr->isExist($data); if ($flag_exist){ //2.a. Jika KETEMU, maka session LOGIN dibuat Session::put('login', $usrname); Session::flash('success', 'Anda berhasil Login!'); return redirect('/'); } else { //2.b. Jika TIDAK KETEMU, maka kembali ke LOGIN dan tampilkan PESAN Session::flash('error', 'Username dan Password tidak sesuai!'); return redirect('/login'); } /*if (isset($hasLogin)){ }*/ } public function ubah_profil(Request $req){ //echo $req->session()->get('login'); if($req->session()->has('login')){ $data = [ 'email' => $req->input('surel'), 'phone' => $req->input('telepon'), 'gender' => $req->input('jenis_kelamin'), 'username' => Session::get('login'), ]; //print_r($data); $usr = new Pengguna(); $res = $usr->ubah($data); echo $res; if($res==1){ //echo "Berhasil Update Data User!"; Session::flash('success', 'Anda berhasil mengupdate informasi akun!'); return redirect('/profil'); } else { Session::flash('warning', 'Anda tidak mengupdate informasi akun!'); return redirect('/profil'); } } else { //echo "tes"; Session::flash('error', 'Anda belum Login!'); return redirect('/login'); } } public function hapus_account(Request $req){ if ($req->has('hapus_akun') && $req->session()->has('login')){ $data = [ 'username' => Session::get('login'), ]; $usr = new Pengguna(); $res = $usr->hapus($data); if ($res==1){ //echo "Berhasil Hapus User!"; Session::flush(); Session::flash('success', 'Anda berhasil menghapus akun!'); return redirect('/login'); } } } public function items(){ return view('items'); } public function about(){ return view('about'); } public function contact(){ return view('contact'); } public function forgot(){ return view('forgot'); } public function shopcart(){ return view('shopcart'); } public function checkout(){ return view('checkout'); } }<file_sep>/app/Models/Pengguna.php <?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use DB; //use PDO; class Pengguna extends Model { use HasFactory; private $tabel_terpilih = 'profil'; public function get_data($data){ $cmd = 'SELECT username, email, phone, gender '. 'FROM '.$this->tabel_terpilih.' '. 'WHERE username=:username;'; //DB::setFetchMode(PDO::FETCH_ASSOC); $res = DB::select($cmd,$data); $data_res = [ 'username' => $res[0]->username, 'email' => $res[0]->email, 'phone' => $res[0]->phone, 'gender' => $res[0]->gender, ]; return $data_res; } public function isExist($data){ $cmd = "SELECT count(*) is_exist ". "FROM ".$this->tabel_terpilih." ". "WHERE username=:username AND password=<PASSWORD>(:<PASSWORD>);"; $res = DB::select($cmd,$data); if($res[0]->is_exist == 1){ return true; } return false; } public function buat($data){ //INSERT into pengguna(username, password, email, phone, gender) values (?, ?, ?, ?); $cmd = "INSERT INTO ".$this->tabel_terpilih."(nama, username, password) VALUES (:nama, :username, <PASSWORD>(:<PASSWORD>));"; $res= DB::insert($cmd, $data); /*echo "<pre>"; print_r($res); echo "</pre>"; die();*/ return $res; } public function ubah($data){ $cmd = "UPDATE ".$this->tabel_terpilih. " SET email=:email, phone=:phone, gender=:gender". " WHERE username=:username;"; $res = DB::update($cmd, $data); return $res; } public function hapus($data){ $cmd = "DELETE FROM ".$this->tabel_terpilih." WHERE username=:username;"; $res = DB::delete($cmd, $data); return $res; } public function cetak(){ echo "Halo James"; } }
301168a8da154d75e73eb1b2ca674d53e21c2493
[ "PHP" ]
4
PHP
AlvinSud/UAS-project-AkAshiA
e7b34f12dd37a5b1824a80be2d78c7f7d4bf4968
8c20d4a7d9201fb523725528ac241dfe01c93d41
refs/heads/master
<repo_name>andrewjeminchoi/HACKWITHIX<file_sep>/server.js const express = require('express'), // kraken = require('kraken-js'), app = express(), PORT = process.env.PORT || 8000, TIMEOUT = 30000; //app.use('/', {"msg":"test msg"}); app.get('/',function(req, res){ res.json({"msg":"test msg"});}); app.listen(PORT, () => console.log('[LIFECYCLE]: listening on port %d', PORT)); <file_sep>/README.md # HACKWITHIX Mapping Program using Google Maps API
585302d6274937a87cbb943bc4e8a0a525befd7b
[ "JavaScript", "Markdown" ]
2
JavaScript
andrewjeminchoi/HACKWITHIX
6cd2b36bbd341ae4d26c9aed8934b1d89284be96
a16464d0e912715de0abf3f0dbff9a9e98f4b104
refs/heads/master
<file_sep>package spring.repository.databaseRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import spring.model.databaseModel.Armor; @Repository public interface ArmorRepository extends JpaRepository<Armor, Long> { } <file_sep>package spring.controller.databaseController; import lombok.AllArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import spring.model.databaseModel.HeroModel; import spring.service.HeroService; @Controller @RequestMapping("hero/") @AllArgsConstructor public class HeroController { private final HeroService heroService; @GetMapping("all") public String findAll(Model model) { model.addAttribute("heroes", heroService.findAll()); return "database/hero/hero_list"; } @GetMapping("create") public String createHeroForm() { return "database/hero/hero_update"; } @PostMapping("create") public String create(HeroModel heroModel, @RequestParam("img") MultipartFile file) { heroService.saveWithImage(heroModel, file); return "redirect:/hero/all"; } @GetMapping("update/{id}") public String updateForm(@PathVariable("id") Long id, Model model) { model.addAttribute("heroes", heroService.findOneById(id)); return "database/hero/hero_update"; } @PostMapping("update") public String update(HeroModel heroModel, @RequestParam("img") MultipartFile file) { heroService.saveWithImage(heroModel, file); return "redirect:/hero/all"; } @GetMapping("delete/{id}") public String delete(@PathVariable("id") Long id) { heroService.delete(id); return "redirect:/hero/all"; } } <file_sep>spring.datasource.url=jdbc:mysql://localhost/minirpggame?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.username=root spring.datasource.password=<PASSWORD> spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=false spring.jpa.hibernate.ddl-auto=update spring.mvc.view.prefix=/WEB-INF/jsp/ spring.mvc.view.suffix=.jsp <file_sep>package spring.repository.databaseRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import spring.model.databaseModel.HeroModel; @Repository public interface HeroRepository extends JpaRepository<HeroModel, Long> { } <file_sep>package spring.model.gameModel; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import spring.model.Profile; import spring.model.databaseModel.Class; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Data @Entity @Table(name = "game_equipment_setting", schema = "minirpggame") @NoArgsConstructor @AllArgsConstructor public class Game_Equipment_Setting_Model { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Transient @Column(name = "class_id") private int class_id; @OneToMany @JoinColumn(name = "id", updatable = false) private List<Class> className = new ArrayList<>(); @Column(name = "head") private int head; @Column(name = "shoulder") private int shoulder; @Column(name = "chest") private int chest; @Column(name = "legs") private int legs; @Column(name = "wand") private int wand; @Column(name = "sword") private int sword; @Column(name = "shield") private int shield; @Column(name = "amulet") private int amulet; } <file_sep>package spring.controller.gameController; import lombok.AllArgsConstructor; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import spring.model.*; import spring.model.databaseModel.HeroModel; import spring.model.gameModel.Game_Fight_Model; import spring.model.gameModel.Game_Hero_Model; import spring.repository.gameRepository.Game_FightRepository; import spring.repository.gameRepository.Game_HeroRepository; import spring.service.imp.HeroServiceImp; @Controller @AllArgsConstructor @RequestMapping("game/hero/") public class SelectHeroController { private final HeroServiceImp heroServiceImp; private final Game_HeroRepository gameHeroRepository; private final Game_FightRepository gameFightRepository; @GetMapping("select") public String findAll(Model model) { model.addAttribute("heroes", heroServiceImp.findAll()); return "rpg/select_hero"; } @GetMapping("select/{heroId}") public String saveHeroToTable(@AuthenticationPrincipal User currentUser, @PathVariable("heroId") Long heroId) { HeroModel heroModel = heroServiceImp.findOneById(heroId); Game_Hero_Model gameHeroModel = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Fight_Model fight = gameFightRepository.findByUsername(currentUser.getUsername()); fight.setIsGameStarted(0); SelectEquipmentController.typeCount = 0; gameFightRepository.save(fight); gameHeroModel.setName(heroModel.getName()); gameHeroModel.setHeroID(heroModel.getId()); gameHeroModel.setHp(heroModel.getHp()); gameHeroModel.setDamage(heroModel.getDamage()); gameHeroModel.setEnergy(heroModel.getEnergy()); gameHeroModel.setEnergyRes(heroModel.getEnergyRes()); gameHeroModel.setMinSpell(heroModel.getMinSpell()); gameHeroModel.setMaxSpell(heroModel.getMaxSpell()); gameHeroModel.setRestore(heroModel.getRestore()); gameHeroModel.setMana(heroModel.getMana()); gameHeroModel.setManaRes(heroModel.getManaRes()); gameHeroModel.setArmor(heroModel.getArmor_id()); gameHeroModel.setHeroClass(heroModel.getClass_id()); gameHeroRepository.save(gameHeroModel); return "redirect:/game/menu/mode/" + heroModel.getArmor_id(); } } <file_sep>package spring.controller; import org.apache.log4j.Logger; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import spring.model.User; import spring.service.imp.UserServiceImp; @Controller public class ForbiddenPageController { private static final Logger logger = Logger.getLogger(ForbiddenPageController.class.getName()); @RequestMapping("/forbidden") public String accessDenied(@AuthenticationPrincipal User currentUser) { logger.error("User " + currentUser.getUsername() + " tried to get on forbidden page"); return "security/forbiddenIndex"; } } <file_sep>package spring.model.databaseModel; import lombok.Data; import javax.persistence.*; import java.util.Set; @Data @Entity @Table(name = "type") public class Type { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "type") private String type; @Transient @OneToOne private EquipmentModel equipment; }<file_sep>package spring.service.imp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import spring.model.databaseModel.LocationModel; import spring.repository.databaseRepository.LocationRepository; import spring.service.LocationService; import java.util.List; @Service public class LocationServiceImp implements LocationService { @Autowired private LocationRepository locationRepository; public LocationServiceImp(){ } @Override public List<LocationModel> findAll() { return locationRepository.findAll(); } @Override public LocationModel findOneById(Long id) { return locationRepository.getOne(id); } @Override public LocationModel save(LocationModel heroModel) { return locationRepository.save(heroModel); } @Override public void delete(Long id) { locationRepository.deleteById(id); } } <file_sep>package spring.model.databaseModel; import lombok.Data; import spring.model.Profile; import javax.persistence.*; import java.util.ArrayList; import java.util.List; import java.util.Set; @Data @Entity @Table(name = "hero", schema = "minirpggame") public class HeroModel { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "name") private String name; @Column(name = "hp") private int hp; @Column(name = "damage") private int damage; @Column(name = "energy") private int energy; @Column(name = "energy_res") private int energyRes; @Column(name = "minspelldamage") private int minSpell; @Column(name = "maxspelldamage") private int maxSpell; @Column(name = "restorehealth") private int restore; @Column(name = "mana") private int mana; @Column(name = "mana_res") private int manaRes; @Column(name = "image") private String image; @Column(name = "armor_id") private Long armor_id; @Column(name = "class_id") private Long class_id; @OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.MERGE) @JoinColumn(name = "armor_id", referencedColumnName = "id", insertable = false, updatable = false) private Armor armor; @OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.MERGE) @JoinColumn(name = "class_id", referencedColumnName = "id", insertable = false, updatable = false) private Class classes; } <file_sep>package spring.model.databaseModel; import lombok.Data; import spring.model.gameModel.Game_Equipment_Setting_Model; import javax.persistence.*; import java.util.Set; @Data @Entity @Table(name = "class") public class Class { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "class") private String className; @Transient @OneToOne private HeroModel heroes; @Transient @OneToMany private Set<Game_Equipment_Setting_Model> game_equipment_setting_models; } <file_sep>package spring.repository.databaseRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import spring.model.databaseModel.LocationModel; @Repository public interface LocationRepository extends JpaRepository <LocationModel,Long> { } <file_sep>package spring.service.imp; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import spring.config.MvcConfig; import spring.model.databaseModel.HeroModel; import spring.repository.databaseRepository.HeroRepository; import spring.service.HeroService; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Optional; import java.util.UUID; @Service public class HeroServiceImp implements HeroService { private final HeroRepository heroRepository; public HeroServiceImp(HeroRepository heroRepository) { this.heroRepository = heroRepository; } @Override public List<HeroModel> findAll() { return heroRepository.findAll(); } @Override public HeroModel findOneById(Long id) { return heroRepository.getOne(id); } @Override public void delete(Long id) { heroRepository.deleteById(id); } @Override public HeroModel save(HeroModel heroModel) { return heroRepository.save(heroModel); } @Override public void saveWithImage(HeroModel hero, MultipartFile file) { if (Optional.ofNullable(file).isPresent() && !file.isEmpty()) { String getOriginalName = file.getOriginalFilename(); String fileName = UUID.randomUUID().toString() + getOriginalName; try { file.transferTo(new File(MvcConfig.pathHeroImage + fileName)); hero.setImage(fileName); } catch (IllegalStateException | IOException e) { e.printStackTrace(); } } save(hero); } } <file_sep>package spring.service.imp; import org.springframework.stereotype.Service; import spring.model.databaseModel.MobsModel; import spring.repository.databaseRepository.MobsRepository; import spring.service.MobsService; import java.util.List; @Service public class MobsServiceImp implements MobsService { private final MobsRepository mobsRepository; public MobsServiceImp(MobsRepository mobsRepository) { this.mobsRepository = mobsRepository; } @Override public List<MobsModel> findAll() { return mobsRepository.findAll(); } @Override public MobsModel findOneById(Long id) { return mobsRepository.getOne(id); } @Override public MobsModel save(MobsModel heroModel) { return mobsRepository.save(heroModel); } @Override public void delete(Long id) { mobsRepository.deleteById(id); } } <file_sep>package spring.model.databaseModel; import lombok.Data; import javax.persistence.*; @Data @Entity @Table(name = "bosses") public class BossesModel { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "name") private String name; @Column(name = "hp") private int hp; @Column(name = "mindamage") private int minDamage; @Column(name = "maxdamage") private int maxDamage; @Column(name = "restorehealth") private int restoreHealth; @Column(name = "chancetosuperdamage") private int chanceToSuperDamage; } <file_sep>package spring.controller; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import spring.model.User; import spring.service.imp.UserServiceImp; import javax.validation.Valid; import java.util.Optional; import java.util.logging.Logger; @Controller public class LoginController { private final UserServiceImp userServiceImp; private String userEmailAddress; private static final Logger logger = Logger.getLogger(LoginController.class.getName()); public LoginController(UserServiceImp userServiceImp) { this.userServiceImp = userServiceImp; } @GetMapping("/test") public String test(Model model) { model.addAttribute("error", "username or password is invalid."); return "security/login"; } @GetMapping("/login") public String logIn(Model model, String error) { if (error != null) model.addAttribute("error", "username or password is invalid."); return "security/login"; } @GetMapping("/log-out") public String logOut(@AuthenticationPrincipal User currentUser) { logger.info("User " + currentUser.getUsername() + " has successfully logout"); return "redirect:/logout"; } @GetMapping("/forgot-password") public String forgotPasswordGet(Model model) { model.addAttribute("userForm", new User()); return "security/forgot_password"; } @PostMapping("/forgot-password") public String forgotPasswordPost(Model model, @ModelAttribute("userForm") @Valid User user, BindingResult bindingResult) { if (bindingResult.hasErrors()) { model.addAttribute("error", "Please provide a valid email address"); return "security/forgot_password"; } if (Optional.ofNullable(userServiceImp.getOneByEmail(user.getEmail())).isEmpty()) { model.addAttribute("error", "Email not Found"); return "security/forgot_password"; } if (Optional.ofNullable(userServiceImp.getOneByEmail(user.getEmail()).getEmail()) .equals(Optional.ofNullable(user.getEmail()))) { userEmailAddress = user.getEmail(); return "redirect:/new-password"; } else { model.addAttribute("error", "Something went wrong"); return "security/forgot_password"; } } @GetMapping("/new-password") public String createNewPasswordGet(Model model) { if (Optional.ofNullable(userEmailAddress).isEmpty()) { return "redirect:/forgot-password"; } model.addAttribute("newPasswordForm", new User()); return "security/new_password"; } @PostMapping("/new-password") public String createNewPasswordPost(Model model, @ModelAttribute("newPasswordForm") @Valid User user, BindingResult bindingResult) { if (bindingResult.hasErrors()) { model.addAttribute("error", "Password must be over 6 characters."); return "security/new_password"; } if (Optional.ofNullable(user.getPassword_new()).isPresent() && Optional.ofNullable(user.getPassword_confirm()).isPresent()) { user.setEmail(userEmailAddress); if (!userServiceImp.resetPassword(user)) { model.addAttribute("error", "Passwords do not match "); return "security/new_password"; } } return "security/login"; } } <file_sep>package game.primary; import java.util.Scanner; public interface DefaultValues { Scanner SCANNER = new Scanner(System.in); byte DEFAULT_RESTORE_HP_INDEX = 6; // default index to restore Health point byte DEFAULT_HEAL_CAST = 33; // how much need mana to heal yourself byte DEFAULT_INDEX_GAME_WITHOUT_EQUIP = -25; // default index fight without equipment minus all characteristics short SUPER_DAMAGE = (short) (MainData.getMobMaxDamage() * 1.5); // super damage for creatures byte LEVEL_COUNT = 10; // how many levels in game } <file_sep>package spring.model.gameModel; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; @Data @Entity @Table(name = "game_hero", schema = "minirpggame") @NoArgsConstructor public class Game_Hero_Model { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "username") private String username; @Column(name = "name") private String name; @Column(name = "hero_id") private Long heroID; @Column(name = "hp") private int hp; @Column(name = "damage") private int damage; @Column(name = "energy") private int energy; @Column(name = "energy_res") private int energyRes; @Column(name = "minspell") private int minSpell; @Column(name = "maxspell") private int maxSpell; @Column(name = "restorehp") private int restore; @Column(name = "mana") private int mana; @Column(name = "mana_res") private int manaRes; @Column(name = "class_id") private Long heroClass; @Column(name = "armor_id") private Long armor; public Game_Hero_Model(String username) { this.username = username; } } <file_sep>package spring.repository.gameRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import spring.model.gameModel.Game_Fight_Model; @Repository public interface Game_FightRepository extends JpaRepository<Game_Fight_Model, String> { Game_Fight_Model findByUsername(String username); } <file_sep>package spring.model.gameModel; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Data @Entity @Table(name = "game_setting", schema = "minirpggame") @NoArgsConstructor @AllArgsConstructor public class Game_SettingModel { @Id @Column(name = "id") private Long id; @Column(name = "level_difficult_percent") private int LEVEL_DIFFICULT_PERCENT; @Column(name = "restore_hp_index") private int RESTORE_HP_INDEX; @Column(name = "energy_hit_index") private int ENERGY_HIT_INDEX; @Column(name = "energy_multiply_index") private int ENERGY_MULTIPLY_INDEX; @Column(name = "heal_cast_index") private int HEAL_CAST_INDEX; @Column(name = "super_damage_multiply_index") private double SUPER_DAMAGE_MULTIPLY_INDEX; @Column(name = "level_count_index") private int LEVEL_COUNT_INDEX; @Column(name = "without_equipment_difficult_index") private int GAME_WITHOUT_EQUIP_DIFFICULTY; } <file_sep>package spring.controller.databaseController; import lombok.AllArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import spring.model.databaseModel.BossesModel; import spring.service.BossesService; @Controller @RequestMapping("boss/") @AllArgsConstructor public class BossesController { private final BossesService bossesService; @GetMapping("all") public String findAll(Model model) { model.addAttribute("bosses", bossesService.findAll()); return "database/boss/boss_list"; } @GetMapping("create") public String createHeroForm() { return "database/boss/boss_update"; } @PostMapping("create") public String create(BossesModel bossesModels) { bossesService.save(bossesModels); return "redirect:/boss/all"; } @GetMapping("update/{id}") public String updateForm(@PathVariable("id") Long id, Model model) { model.addAttribute("bosses", bossesService.findOneById(id)); return "database/boss/boss_update"; } @PostMapping("update") public String update(BossesModel bossesModels) { bossesService.save(bossesModels); return "redirect:/boss/all"; } @GetMapping("delete/{id}") public String delete(@PathVariable("id") Long id) { bossesService.delete(id); return "redirect:/boss/all"; } } <file_sep>package spring.repository.databaseRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import spring.model.databaseModel.Type; @Repository public interface TypeRepository extends JpaRepository<Type, Long> { } <file_sep>package spring.controller.gameController; import org.junit.After; import org.junit.Test; import java.util.Arrays; import java.util.List; public class SelectEquipmentControllerTest { private int count = 0; private List<Integer> equipSetting = Arrays.asList(0, 0, 1, 1, 0, 1, 1, 0); @Test public void generateEquipment() { count++; if (equipSetting.get(0) == 1 && count == 1) { System.out.println("return getHead"); } if (equipSetting.get(1) == 1 && count == 2) { System.out.println("return getShoulder"); } if (equipSetting.get(2) == 1 && count == 3) { System.out.println("return getChest"); } if (equipSetting.get(3) == 1 && count == 4) { System.out.println("return getLegs"); } if (equipSetting.get(4) == 1 && count == 5) { System.out.println("return getWand"); } if (equipSetting.get(5) == 1 && count == 6) { System.out.println("return getSword"); } if (equipSetting.get(6) == 1 && count == 7) { System.out.println("return getShield"); } if (equipSetting.get(7) == 1 && count == 8) { System.out.println("return getAmulet"); } } @After public void tearDown() throws Exception { for (int i = 0; i < equipSetting.size(); i++) { generateEquipment(); } } }<file_sep>package spring.controller.gameController; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import spring.model.User; import spring.model.databaseModel.Class; import spring.model.databaseModel.EquipmentModel; import spring.model.gameModel.Game_Equipment_Setting_Model; import spring.model.gameModel.Game_Fight_Model; import spring.model.gameModel.Game_Hero_Model; import spring.repository.ClassRepository; import spring.repository.databaseRepository.EquipmentRepository; import spring.repository.gameRepository.Game_Equipment_SettingRepository; import spring.repository.gameRepository.Game_FightRepository; import spring.repository.gameRepository.Game_HeroRepository; import spring.service.imp.EquipmentServiceImp; @Controller @RequestMapping("game/equipment/") public class SelectEquipmentController { private final EquipmentServiceImp equipmentServiceImp; private final Game_HeroRepository gameHeroRepository; private final EquipmentRepository equipmentRepository; private final Game_FightRepository gameFightRepository; private final Game_Equipment_SettingRepository game_equipment_settingRepository; private final ClassRepository classRepository; public SelectEquipmentController(EquipmentServiceImp equipmentServiceImp, Game_HeroRepository gameHeroRepository, EquipmentRepository equipmentRepository, Game_FightRepository gameFightRepository, Game_Equipment_SettingRepository game_equipment_settingRepository, ClassRepository classRepository) { this.equipmentServiceImp = equipmentServiceImp; this.gameHeroRepository = gameHeroRepository; this.equipmentRepository = equipmentRepository; this.gameFightRepository = gameFightRepository; this.game_equipment_settingRepository = game_equipment_settingRepository; this.classRepository = classRepository; } static int typeCount = 0; @GetMapping("get/{armorId}") public String generateEquipment(@AuthenticationPrincipal User currentUser, @PathVariable("armorId") int armorId) { Game_Fight_Model fight = gameFightRepository.findByUsername(currentUser.getUsername()); fight.setIsGameWithEquipments(1); gameFightRepository.save(fight); if (fight.getIsGameStarted() == 1) { return "rpg/forbidden_move"; } Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Equipment_Setting_Model equip_setting = game_equipment_settingRepository.getOne(hero.getHeroClass()); Class heroClass = classRepository.getOne(equip_setting.getId()); byte weaponId = 4; typeCount++; if (heroClass.getId().equals(equip_setting.getId())) { if (equip_setting.getHead() == 1 && typeCount == 1) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + armorId; } if (equip_setting.getShoulder() == 1 && typeCount == 2) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + armorId; } if (equip_setting.getChest() == 1 && typeCount == 3) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + armorId; } if (equip_setting.getLegs() == 1 && typeCount == 4) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + armorId; } if (equip_setting.getWand() == 1 && typeCount == 5) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + weaponId; } if (equip_setting.getSword() == 1 && typeCount == 6) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + weaponId; } if (equip_setting.getShield() == 1 && typeCount == 7) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + weaponId; } if (equip_setting.getAmulet() == 1 && typeCount == 8) { return "redirect:/game/equipment/select" + "/" + typeCount + "/" + weaponId; } if (typeCount > 8) { typeCount = 0; return "redirect:/game/menu/get-location"; } } return "redirect:/game/equipment/get" + "/" + armorId; } @GetMapping("select/{typeId}/{armorId}") public String getAllEquipments(@AuthenticationPrincipal User currentUser, @PathVariable("typeId") int typeId, @PathVariable("armorId") int armorId, Model model) { Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); model.addAttribute("hero", hero); model.addAttribute("user", currentUser.getUsername()); model.addAttribute("type", typeId); model.addAttribute("equipment", equipmentServiceImp.findByArmorsAndTypes(armorId, typeId)); return "rpg/select_equipment"; } @GetMapping("save/{armorId}/{equipmentId}") public String save(@AuthenticationPrincipal User currentUser, @PathVariable("armorId") int armorId, @PathVariable("equipmentId") long equipmentId) { EquipmentModel equipment = equipmentRepository.getOne(equipmentId); Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); hero.setHp(hero.getHp() + equipment.getHp()); hero.setDamage(hero.getDamage() + equipment.getDamage()); hero.setEnergy(hero.getEnergy() + equipment.getEnergy()); hero.setEnergyRes(hero.getEnergyRes() + equipment.getEnergyRes()); hero.setMinSpell(hero.getMinSpell() + equipment.getSpell_damage()); hero.setMaxSpell(hero.getMaxSpell() + equipment.getSpell_damage()); hero.setMana(hero.getMana() + equipment.getMana()); hero.setManaRes(hero.getManaRes() + equipment.getManaRes()); gameHeroRepository.save(hero); return "redirect:/game/equipment/get" + "/" + armorId; } } <file_sep>package spring.repository.gameRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import spring.model.gameModel.Game_SettingModel; @Repository public interface Game_SettingRepository extends JpaRepository<Game_SettingModel, Long> { } <file_sep>package spring.repository.databaseRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import spring.model.databaseModel.EquipmentModel; import java.util.List; @Repository public interface EquipmentRepository extends JpaRepository<EquipmentModel, Long> { @Query(value = "select equipment.id, name, hp, damage, energy, energy_res, spell_damage, mana, mana_res, armor_id, type_id\n" + "from equipment where armor_id = ? and type_id = ? ", nativeQuery = true) List<EquipmentModel> findByArmorsAndTypes(int armors_id, int type_id); } <file_sep>package spring.service.imp; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import spring.config.MvcConfig; import spring.model.Profile; import spring.repository.ProfileRepository; import spring.service.ProfileService; import java.io.File; import java.io.IOException; import java.util.Optional; import java.util.UUID; @Service public class ProfileServiceImp implements ProfileService { private final ProfileRepository profileRepository; public ProfileServiceImp(ProfileRepository profileRepository) { this.profileRepository = profileRepository; } @Override public Profile findOneByUsername(String username) { return profileRepository.findByUsername(username); } @Override public Profile save(Profile profile) { Profile profileDatabase = profileRepository.findByUsername(profile.getUsername()); if (Optional.ofNullable(profile.getId()).isEmpty()) { profile.setId(profileDatabase.getId()); } if (Optional.ofNullable(profile.getName()).isEmpty()) { profile.setName(profileDatabase.getName()); } if (Optional.ofNullable(profile.getSurname()).isEmpty()) { profile.setSurname(profileDatabase.getSurname()); } if (Optional.ofNullable(profile.getBirthday()).isEmpty()) { profile.setBirthday(profileDatabase.getBirthday()); } if (Optional.ofNullable(profile.getGender()).isEmpty()) { profile.setGender(profileDatabase.getGender()); } if (Optional.ofNullable(profile.getPhone()).isEmpty()) { profile.setPhone(profileDatabase.getPhone()); } if (Optional.ofNullable(profile.getCountry()).isEmpty()) { profile.setCountry(profileDatabase.getCountry()); } if (Optional.ofNullable(profile.getCity()).isEmpty()) { profile.setCity(profileDatabase.getCity()); } if (Optional.ofNullable(profile.getZip()).isEmpty()) { profile.setZip(profileDatabase.getZip()); } if (Optional.ofNullable(profile.getBio()).isEmpty()) { profile.setBio(profileDatabase.getBio()); } if (Optional.ofNullable(profile.getAvatar()).isEmpty()) { profile.setAvatar(profileDatabase.getAvatar()); } profile.setUser(profileDatabase.getUser()); return profileRepository.save(profile); } @Override public void saveAvatar(Profile profile, MultipartFile file) { if (Optional.ofNullable(file).isPresent() && !file.isEmpty()) { String getAvatarName = file.getOriginalFilename(); String fileName = UUID.randomUUID().toString() + getAvatarName; try { file.transferTo(new File(MvcConfig.pathAvatars + fileName)); profile.setAvatar((fileName)); } catch (IllegalStateException | IOException e) { e.printStackTrace(); } save(profile); } } } <file_sep>package game.primary; import java.util.InputMismatchException; import java.util.Scanner; import java.util.regex.Pattern; public class Menu implements DefaultValues { public static void main() { try { System.out.println("Main Menu \n 1. New Game \n 2. Upload saved game \n 3. Exit".toUpperCase()); switch (new Scanner(System.in).nextInt()) { case 1 -> { createPlayerName(); second(); } case 2 -> Storage.getFilesFromFolder(true); case 3 -> { System.err.println("Exit"); System.exit(0); } } } catch (NullPointerException | InputMismatchException | IllegalArgumentException e) { System.err.println("Something went wrong\n"); main(); } } public static void second() { String create = "\n" + Setting.getPlayerName() + ", select next option:\n" + "1. Create new Hero \n" + "2. Upload saved equipped hero, and play new game \n" + "3. Back"; System.out.println(create); switch (new Scanner(System.in).nextInt()) { case 1 -> NewGame.newGame(); case 2 -> Storage.getFilesFromFolder(false); case 3 -> main(); } } private static void createPlayerName() { if (Setting.getPlayerName() == null) { System.out.println("What is your name ? "); Pattern pattern = Pattern.compile("[A-Za-z]*"); while (SCANNER.hasNext()) { if (SCANNER.hasNext(pattern)) { Setting.setPlayerName(SCANNER.next()); break; } else System.err.println("Attribute name must contain word characters only"); SCANNER.next(); } } } } <file_sep>package spring.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import spring.model.User; import spring.service.imp.UserServiceImp; import javax.validation.Valid; import java.util.Optional; @Controller public class RegistrationController { private final UserServiceImp userServiceImp; public RegistrationController(UserServiceImp userServiceImp) { this.userServiceImp = userServiceImp; } @GetMapping("/registration") public String registration(Model model) { model.addAttribute("userForm", new User()); return "security/registration"; } @PostMapping("/registration") public String addUser(@ModelAttribute("userForm") @Valid User user, BindingResult bindingResult, Model model) { if (bindingResult.hasErrors()) { return "security/registration"; } if (!user.getPassword().equals(user.getPassword_confirm())) { model.addAttribute("passwordError", "Password don't match"); return "security/registration"; } if (Optional.ofNullable(userServiceImp.findUserByUsername(user.getUsername())).isPresent()) { model.addAttribute("usernameError", "Someone already have that username"); return "security/registration"; } if (!userServiceImp.updateEmail(user)) { model.addAttribute("emailError", "Someone already have that email address"); return "security/registration"; } userServiceImp.createAccount(user); return "redirect:/login"; } }<file_sep>package spring.controller; import lombok.AllArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import spring.model.gameModel.Game_SettingModel; import spring.repository.gameRepository.Game_SettingRepository; @Controller @AllArgsConstructor public class InfoPageController { private final Game_SettingRepository gameSettingRepository; @GetMapping("info") public String info(Model model) { Game_SettingModel setting = gameSettingRepository.getOne(1L); model.addAttribute("index", setting); return "info"; } } <file_sep>package spring.model.gameModel; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; @Data @Entity @Table(name = "game_fight", schema = "minirpggame") @NoArgsConstructor public class Game_Fight_Model { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "username") private String username; @Column(name = "is_game_with_equipments") private int isGameWithEquipments; @Column(name = "is_boss_game") private int isBoss; @Column(name = "is_game_started") private int isGameStarted; @Column(name = "game_count") private int gameCount; @Column(name = "level_count") private int levelCount; @Column(name = "level_difficult") private int levelDifficult; public Game_Fight_Model(String username) { this.username = username; } } <file_sep>package spring.controller.gameController; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import spring.dto.Game_Creature_Hero_Fight_Dto; import spring.model.databaseModel.Class; import spring.model.User; import spring.model.gameModel.Game_Creature_Model; import spring.model.gameModel.Game_Fight_Model; import spring.model.gameModel.Game_Hero_Model; import spring.model.gameModel.Game_SettingModel; import spring.repository.ClassRepository; import spring.repository.gameRepository.*; import java.util.Random; @Controller @RequestMapping("game/fight/") public class FightController { private final Game_CreatureRepository gameCreatureRepository; private final Game_HeroRepository gameHeroRepository; private final Game_SettingRepository settingRepository; private final ClassRepository classRepository; private final Game_FightRepository gameFightRepository; private final Game_SettingRepository gameSettingRepository; public FightController(Game_CreatureRepository gameCreatureRepository, Game_HeroRepository gameHeroRepository, Game_SettingRepository settingRepository, ClassRepository classRepository, Game_FightRepository gameFightRepository, Game_SettingRepository gameSettingRepository) { this.gameCreatureRepository = gameCreatureRepository; this.gameHeroRepository = gameHeroRepository; this.settingRepository = settingRepository; this.classRepository = classRepository; this.gameFightRepository = gameFightRepository; this.gameSettingRepository = gameSettingRepository; } private boolean HERO_HIT = false; private boolean HERO_ENERGY_HIT = false; private boolean HERO_SPELL = false; private boolean HERO_HEAL = false; private boolean MOB_HIT = false; private boolean MOB_SUPER_DAMAGE = false; private boolean BOSS_LESS_HP = false; private boolean BOSS_RESTORE = false; private boolean isHeal = false; private boolean YOU_WIN = false; private boolean YOU_LOSE = false; private int MOVE_COUNT = 0; private int mobDamageView; private int heroSpellView; private int heroRestoreView; private int heroEnergyHitView; private String mobNameVIew; /** * This method make fight page, the whole description according to the hero and the creatures movements. * * @param currentUser needed to know for which user the game is. * @param model to show whole descriptions in jsp page * @return returns fight page */ @GetMapping("launch") public String launchGame(@AuthenticationPrincipal User currentUser, Model model) { Game_Fight_Model fight = gameFightRepository.findByUsername(currentUser.getUsername()); Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Creature_Model mob = gameCreatureRepository.findByUsername(currentUser.getUsername()); if (fight.getIsGameStarted() == 0) { HERO_HIT = false; HERO_ENERGY_HIT = false; HERO_SPELL = false; HERO_HEAL = false; MOB_HIT = false; MOB_SUPER_DAMAGE = false; BOSS_LESS_HP = false; BOSS_RESTORE = false; YOU_WIN = false; YOU_LOSE = false; isHeal = false; MOVE_COUNT = 0; } fight.setIsGameStarted(1); gameFightRepository.save(fight); model.addAttribute("CHF", new Game_Creature_Hero_Fight_Dto( gameCreatureRepository.findByUsername(currentUser.getUsername()), gameHeroRepository.findByUsername(currentUser.getUsername()), gameFightRepository.findByUsername(currentUser.getUsername()))); model.addAttribute("index", settingRepository.getOne(1L)); model.addAttribute("moveCount", MOVE_COUNT); model.addAttribute("isLose", YOU_LOSE); model.addAttribute("isHeal", isHeal); Class heroClass = classRepository.getOne(hero.getHeroClass()); model.addAttribute("heroClass", heroClass.getClassName()); if (HERO_HIT) { model.addAttribute("HERO_HIT", "You hit " + mob.getName() + " on " + hero.getDamage() + " health point;"); } if (HERO_ENERGY_HIT) { model.addAttribute("HERO_ENERGY_HIT", "You hit " + mob.getName() + " on " + heroEnergyHitView + " health point using Energy"); } if (HERO_SPELL) { model.addAttribute("HERO_SPELL", "You Hit " + mob.getName() + " using spell on " + heroSpellView + " health point"); } if (MOB_HIT) { model.addAttribute("MOB_HIT", mob.getName() + " Hits you on " + mobDamageView + " health point;"); } if (HERO_HEAL) { model.addAttribute("HERO_HEAL", "You have restored " + heroRestoreView + " health points"); } if (MOB_SUPER_DAMAGE) { model.addAttribute("MOB_SUPER_DAMAGE", mob.getName() + " uses Super Damage"); } if (BOSS_LESS_HP) { model.addAttribute("BOSS_LESS_HP", mob.getName() + " Have less than 30 hp, his damage will be increased like a super damage"); } if (BOSS_RESTORE) { model.addAttribute("BOSS_RESTORE", mob.getName() + " recover " + mob.getRestoreHp() + " health point"); } if (YOU_WIN) { model.addAttribute("YOU_WIN", "You have won over the " + mobNameVIew); model.addAttribute("NEW_CREATURE", "Now you play against " + mob.getName()); } if (YOU_LOSE) { model.addAttribute("YOU_LOSE", "You were defeated by " + mobNameVIew); } isHeal = false; HERO_HIT = false; HERO_ENERGY_HIT = false; HERO_SPELL = false; HERO_HEAL = false; MOB_HIT = false; MOB_SUPER_DAMAGE = false; BOSS_LESS_HP = false; BOSS_RESTORE = false; YOU_WIN = false; YOU_LOSE = false; return "rpg/fight"; } /** * This method for simple hit of the hero * * @param currentUser needed to know for which user the game is. * @return returns movement of the creature */ @GetMapping("hero-hit") public String heroHit(@AuthenticationPrincipal User currentUser) { Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Creature_Model mob = gameCreatureRepository.findByUsername(currentUser.getUsername()); MOVE_COUNT++; mob.setHp(mob.getHp() - hero.getDamage()); HERO_HIT = true; gameCreatureRepository.save(mob); return "redirect:/game/fight/mob-move"; } /** * This method for energy hit of the hero * * @param currentUser needed to know for which user the game is. * @return returns movement of the creature */ @GetMapping("hero-energy_hit") public String heroEnergyHit(@AuthenticationPrincipal User currentUser) { Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Creature_Model mob = gameCreatureRepository.findByUsername(currentUser.getUsername()); Game_SettingModel setting = gameSettingRepository.getOne(1L); MOVE_COUNT++; int energyHit = hero.getDamage() * setting.getENERGY_MULTIPLY_INDEX(); heroEnergyHitView = energyHit; mob.setHp(mob.getHp() - energyHit); hero.setEnergy(hero.getEnergy() - setting.getENERGY_HIT_INDEX()); HERO_ENERGY_HIT = true; gameHeroRepository.save(hero); gameCreatureRepository.save(mob); return "redirect:/game/fight/mob-move"; } /** * This method for spell hit of the hero * * @param currentUser needed to know for which user the game is. * @return returns movement of the creature */ @GetMapping("hero-spell") public String heroSpell(@AuthenticationPrincipal User currentUser) { Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Creature_Model mob = gameCreatureRepository.findByUsername(currentUser.getUsername()); MOVE_COUNT++; int randomSpell = (int) ((Math.random() * (hero.getMaxSpell() - hero.getMinSpell())) + hero.getMinSpell()); mob.setHp(mob.getHp() - randomSpell); heroSpellView = randomSpell; HERO_SPELL = true; gameCreatureRepository.save(mob); return "redirect:/game/fight/mob-move"; } /** * This Method for healing of the hero * * @param currentUser needed to know for which user the game is. * @return returns fight page to show information on the monitor */ @GetMapping("hero-heal") public String heroHEal(@AuthenticationPrincipal User currentUser) { Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Creature_Model mob = gameCreatureRepository.findByUsername(currentUser.getUsername()); Game_SettingModel setting = gameSettingRepository.getOne(1L); MOVE_COUNT++; heroRestoreView = (hero.getRestore() + setting.getRESTORE_HP_INDEX()); hero.setHp(hero.getHp() + hero.getRestore() + setting.getRESTORE_HP_INDEX()); hero.setMana(hero.getMana() - setting.getHEAL_CAST_INDEX()); isHeal = true; HERO_HEAL = true; gameCreatureRepository.save(mob); return "redirect:/game/fight/launch"; } /** * This method for the creature, here is its damage for hero, super damage etc. * * @param currentUser needed to know for which user the game is. * @return returns fight page to show information on the monitor */ @GetMapping("mob-move") public String mobMove(@AuthenticationPrincipal User currentUser) { Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Creature_Model mob = gameCreatureRepository.findByUsername(currentUser.getUsername()); Game_Fight_Model fight = gameFightRepository.findByUsername(currentUser.getUsername()); Game_SettingModel setting = gameSettingRepository.getOne(1L); if (mob.getHp() <= 0) { YOU_WIN = true; mobNameVIew = mob.getName(); return "redirect:/game/level/get"; } if (fight.getIsBoss() == 1) { BOSS_RESTORE = true; mob.setHp(mob.getHp() + mob.getRestoreHp()); } int result; int damage = (int) ((Math.random() * (mob.getMaxDamage() - mob.getMinDamage())) + mob.getMinDamage()); int superDamage = (int) (mob.getMaxDamage() * setting.getSUPER_DAMAGE_MULTIPLY_INDEX()); if (new Random().nextInt(100) < mob.getChanceToSuperDamage()) { MOB_SUPER_DAMAGE = true; MOB_HIT = true; mobDamageView = superDamage; result = superDamage; } else if (fight.getIsBoss() == 1 && mob.getHp() < 30) { BOSS_LESS_HP = true; MOB_HIT = true; mobDamageView = superDamage; result = superDamage; } else { MOB_HIT = true; mobDamageView = damage; result = damage; } hero.setHp(hero.getHp() - result); gameHeroRepository.save(hero); if (hero.getHp() <= 0) { YOU_LOSE = true; mobNameVIew = mob.getName(); return "redirect:/game/fight/launch"; } return "redirect:/game/fight/launch"; } } <file_sep>package game.fight; import game.primary.DefaultValues; import game.primary.MainData; import game.primary.Setting; interface FightDescription extends DefaultValues { /** * This method shows descriptions about hero and creature before every game * * @param isBoss shows if game against boss or mob */ static void gameDescription(boolean isBoss) { String restoreInfo = ""; String manaInfo = ""; String spellInfo = ""; System.out.println("\n\n ====================== GAME ======================"); String info = "\n You fight against " + MainData.getMobName() + "," + "\n He Have " + MainData.getMobHp() + " hp" + "\n Max Damage = " + MainData.getMobMaxDamage() + "\n Min Damage = " + MainData.getMobMinDamage() + "\n He also have " + MainData.getMobChanceToSuperDamage() + "% chance on super Damage, Super Damage = " + SUPER_DAMAGE + "\n"; if (isBoss) { restoreInfo = " He restoring " + MainData.getMobRestoreHp() + " Health point every move" + "\n When his Health point will be less than 30, his damage will be as super Damage\n"; } String heroInfo = "\n\n " + MainData.getHeroName() + ", Class: " + MainData.getHeroClass() + "\n Health Point = " + MainData.getHeroHp() + "\n Damage = " + MainData.getHeroDamage(); if (MainData.getHeroMinSpell() != 0) { spellInfo = "\n Max Spell Damage = " + MainData.getHeroMaxSpell() + "\n Min Spell Damage = " + MainData.getHeroMinSpell(); } if (MainData.getHeroMana() != 0) { manaInfo = "\n Plus to restore Health point = " + MainData.getHeroRestoreHp() + " (default restore index = " + DEFAULT_RESTORE_HP_INDEX + ")" + "\n You Have " + MainData.getHeroMana() + " Mana, one heal spell = " + DEFAULT_HEAL_CAST + " Mana"; } if (isBoss) { System.out.println(info + restoreInfo + heroInfo + spellInfo + manaInfo); } else { System.out.println(info + heroInfo + spellInfo + manaInfo); } } /** * This method shows options every turn for hero */ static void turnOptions() { String ifWith = ""; String ifMagic = ""; String ifRestore = ""; String value = "\n Your Turn \n" + "1. Hit " + MainData.getMobName() + " on " + MainData.getHeroDamage() + " hp "; if (MainData.getHeroMinSpell() != 0) { ifMagic = "\n2. Strike with magic on (Random damage from " + MainData.getHeroMinSpell() + " to " + MainData.getHeroMaxSpell() + ") health point "; } if (MainData.getHeroMana() != 0) { ifRestore = "\n3. Restore " + (DEFAULT_RESTORE_HP_INDEX + MainData.getHeroRestoreHp()) + " hp."; } if (Setting.isIsGameWithEquipments()) { ifWith = "\n4. Save Game"; } String valueEnd = "\n5. Get defeat and back to Main Menu "; System.out.println(value + ifMagic + ifRestore + ifWith + valueEnd); } /** * Shows second options when hero used heal spell */ String turnSecondOptions = "\nNow Chose Next Options: " + "\n1. Hit " + MainData.getMobName() + " on " + MainData.getHeroDamage() + " health point " + "\n2. Strike with magic on (Random damage from " + MainData.getHeroMinSpell() + " to " + MainData.getHeroMaxSpell() + ")" + " health point " + "\n3. Get defeat and back to Main Menu"; String youWon = "\n ------------------------------ YOU WON ------------------------------" + "\n You have won over the "; String youLose = "\n ------------------------------ YOU LOST ------------------------------ " + "\n You were defeated by "; }<file_sep>package game.sql; import java.sql.*; abstract class ConnectSetting { private static final String USERNAME = "root"; private static final String PASSWORD = "<PASSWORD>"; private static final String URL = "jdbc:mysql://localhost/minirpggame" + "?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; protected static Connection connection; protected static Statement statement; protected static PreparedStatement preparedStatement; protected static ResultSet resultSet; protected static void connectToDataBase() { try { connection = DriverManager.getConnection(URL, USERNAME, PASSWORD); } catch (SQLException sqlException) { sqlException.printStackTrace(); } } protected static void closeConnect() { try { connection.close(); } catch (SQLException sqlException) { sqlException.printStackTrace(); } } } <file_sep>package spring.controller.databaseController; import lombok.AllArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import spring.model.databaseModel.EquipmentModel; import spring.service.EquipmentService; @Controller @RequestMapping("equipment/") @AllArgsConstructor public class EquipmentController { private final EquipmentService equipmentService; @GetMapping("all") public String findAll(Model model) { model.addAttribute("equipment", equipmentService.findAll()); return "database/equipment/equipment_list"; } @GetMapping("create") public String createHeroForm() { return "database/equipment/equipment_update"; } @PostMapping("create") public String create(EquipmentModel equipmentModel) { equipmentService.save(equipmentModel); return "redirect:/equipment/all"; } @GetMapping("update/{id}") public String updateForm(@PathVariable("id") Long id, Model model) { model.addAttribute("equipment", equipmentService.findOneById(id)); return "database/equipment/equipment_update"; } @PostMapping("update") public String update(EquipmentModel equipmentModel) { equipmentService.save(equipmentModel); return "redirect:/equipment/all"; } @GetMapping("delete/{id}") public String delete(@PathVariable("id") Long id) { equipmentService.delete(id); return "redirect:/equipment/all"; } } <file_sep>package game.fight; import game.primary.*; import game.primary.MainData; import java.util.InputMismatchException; import java.util.Random; import java.util.Scanner; class Fight extends MainData implements DefaultValues { private int heroHpFinal = getHeroHp(); private int mobHpFinal = getMobHp(); private int heroManaFinal = getHeroMana(); void launchGame() { if (!Setting.isIsGameAgainstBoss()) FightDescription.gameDescription(false); if (Setting.isIsGameAgainstBoss()) FightDescription.gameDescription(true); getMoveOptions(); } private void getMoveOptions() { try { FightDescription.turnOptions(); while (mobHpFinal > 0 && heroHpFinal > 0) { switch (new Scanner(System.in).nextInt()) { case 1 -> heroMove(); case 2 -> spell(); case 3 -> heal(); case 4 -> { if (Setting.isIsGameWithEquipments()) { Storage.saveFileToFolder(true); } else { System.out.println("\nSorry but you can't do that, Try something else"); } System.out.println("Continue game?\n1. Yes\n2. No, Back to Main Menu"); switch (new Scanner(System.in).nextInt()) { case 1 -> getMoveOptions(); case 2 -> Menu.main(); } } case 5 -> { System.err.println("\nYou gave up\n"); Menu.main(); } } } } catch (NullPointerException | InputMismatchException | IllegalArgumentException e) { System.out.println("Something went wrong\n"); getMoveOptions(); } } private void heroMove() { if (mobHpFinal > 0 && heroHpFinal > 0) { System.out.println("You hit " + getMobName() + " on " + getHeroDamage() + " Health point"); if (!Setting.isIsGameAgainstBoss()) { System.out.print("Now " + getMobName() + " have "); System.out.println(mobHpFinal - getHeroDamage() + " Health point"); mobHpFinal -= getHeroDamage(); } if (Setting.isIsGameAgainstBoss()) { System.out.print("After Recovering " + getMobRestoreHp() + " Health point " + getMobName() + " have " + ((mobHpFinal + getMobRestoreHp()) - getHeroDamage()) + " Health point "); mobHpFinal = (mobHpFinal + getMobRestoreHp()) - getHeroDamage(); } } if (mobHpFinal <= 0) { System.out.println(FightDescription.youWon + getMobName()); } else mobMove(); } private void mobMove() { if (heroHpFinal > 0 && mobHpFinal > 0) { System.out.println("\n" + getMobName() + " turn \n"); int EqualRandom = randomCreatureDamage(); System.out.print(getMobName() + " hits you on " + EqualRandom + " Health point"); heroHpFinal -= EqualRandom; System.out.println("\nNow You Have " + heroHpFinal + " Health point"); } if (heroHpFinal <= 0) { System.out.println(FightDescription.youLose + getMobName()); defeatOptions(); } else getMoveOptions(); } private void spell() { if (mobHpFinal > 0 && heroHpFinal > 0) { int randomDamage = randomSpell(); System.out.println("You Hit " + getMobName() + " using spell on " + randomDamage + " Health point "); if (!Setting.isIsGameAgainstBoss()) { System.out.print("Now " + getMobName() + " have "); System.out.println(mobHpFinal - randomDamage + " Health point "); mobHpFinal -= randomDamage; } if (Setting.isIsGameAgainstBoss()) { System.out.println("After Recovering " + getMobRestoreHp() + " health point " + getMobName() + " have " + ((mobHpFinal + getMobRestoreHp()) - randomDamage) + " Health point "); mobHpFinal = (mobHpFinal + getMobRestoreHp()) - randomDamage; } if (getHeroMinSpell() <= 0 && getHeroMaxSpell() <= 0) { System.out.println("\nSorry but you can't do that, Try something else"); getMoveOptions(); } } if (mobHpFinal <= 0) { System.out.println(FightDescription.youWon + getMobName()); } else mobMove(); } private void heal() { while (mobHpFinal > 0 && heroHpFinal > 0) { if (heroManaFinal >= DEFAULT_HEAL_CAST) { heroHpFinal += (DEFAULT_RESTORE_HP_INDEX + getHeroRestoreHp()); System.out.println("\nYou chose Healing yourself "); heroManaFinal -= DEFAULT_HEAL_CAST; System.out.println("Now your health point equal " + heroHpFinal); System.out.println("Now you have left " + heroManaFinal + " Mana "); System.out.println(FightDescription.turnSecondOptions); switch (SCANNER.nextInt()) { case 1 -> heroMove(); case 2 -> spell(); case 3 -> { System.err.println("\nYou gave up \n And turn back to Main Menu"); Menu.main(); } } } if (heroManaFinal < DEFAULT_HEAL_CAST) { System.err.println("\nSorry, but you haven't Mana\nPlease Select Something else"); getMoveOptions(); break; } } } private int randomSpell() { return (int) ((Math.random() * (getHeroMaxSpell() - getHeroMinSpell())) + getHeroMinSpell()); } private int randomCreatureDamage() { int result; int num = new Random().nextInt(100); if (num < getMobChanceToSuperDamage()) { result = getMobChanceToSuperDamage(); System.out.println(getMobName() + " uses Super Damage "); } else if (Setting.isIsGameAgainstBoss() && mobHpFinal < 30) { result = SUPER_DAMAGE; System.out.println(getMobName() + " Have less than 30 hp, his damage will be increased."); } else result = (int) (Math.random() * (getMobMaxDamage() - getMobMinDamage())) + getMobMinDamage(); return result; } private static void defeatOptions() { System.out.println("\n\n\n Select option: " + "\n 1. Create new Hero and play Again ? " + "\n 2. Play again from " + Setting.getLevelCount() + " Level " + "\n 3. Back to Main Menu "); switch (SCANNER.nextInt()) { case 1 -> Menu.second(); case 2 -> LaunchGame.getLevel(Setting.getLevelCount(), Setting.getLevelDifficult()); case 3 -> Menu.main(); } } }<file_sep>package spring.controller.gameController; import lombok.AllArgsConstructor; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import spring.model.databaseModel.LocationModel; import spring.model.User; import spring.model.gameModel.Game_Fight_Model; import spring.model.gameModel.Game_Hero_Model; import spring.model.gameModel.Game_Location_Model; import spring.repository.gameRepository.Game_FightRepository; import spring.repository.gameRepository.Game_HeroRepository; import spring.repository.gameRepository.Game_LocationRepository; import spring.service.imp.LocationServiceImp; @Controller @RequestMapping("game/location/") @AllArgsConstructor public class SelectLocation { private final LocationServiceImp locationServiceImp; private final Game_HeroRepository gameHeroRepository; private final Game_LocationRepository gameLocationRepository; private final Game_FightRepository gameFightRepository; @GetMapping("show") public String findAll(@AuthenticationPrincipal User currentUser, Model model) { Game_Fight_Model fight = gameFightRepository.findByUsername(currentUser.getUsername()); Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); if (fight.getIsGameStarted() == 1) { return "rpg/forbidden_move"; } model.addAttribute("location", locationServiceImp.findAll()); model.addAttribute("hero", hero); return "rpg/select_location"; } @GetMapping("save/{locationId}") public String save(@AuthenticationPrincipal User currentUser, @PathVariable("locationId") Long locationId) { LocationModel location = locationServiceImp.findOneById(locationId); Game_Hero_Model hero = gameHeroRepository.findByUsername(currentUser.getUsername()); Game_Location_Model game_location = gameLocationRepository.findByUsername(currentUser.getUsername()); hero.setHp(hero.getHp() + location.getHeroHp()); hero.setDamage(hero.getDamage() + location.getHeroDamage()); hero.setEnergy(hero.getEnergy() + location.getHeroEnergy()); hero.setMinSpell(hero.getMinSpell() + location.getHeroSpellDamage()); hero.setMaxSpell(hero.getMaxSpell() + location.getHeroSpellDamage()); hero.setMana(hero.getMana() + location.getHeroMana()); hero.setRestore(hero.getRestore() + location.getHeroRestoreHealth()); game_location.setName(location.getName()); game_location.setUsername(currentUser.getUsername()); game_location.setHeroHp(location.getHeroHp()); game_location.setHeroEnergy(location.getHeroEnergy()); game_location.setHeroDamage(location.getHeroDamage()); game_location.setHeroSpellDamage(location.getHeroSpellDamage()); game_location.setHeroRestoreHealth(location.getHeroRestoreHealth()); game_location.setHeroMana(location.getHeroMana()); game_location.setCreatureHp(location.getCreatureHp()); game_location.setCreatureDamage(location.getCreatureDamage()); game_location.setCreatureChance(location.getCreatureChance()); gameLocationRepository.save(game_location); gameHeroRepository.save(hero); return "redirect:/game/menu/get-level"; } } <file_sep>package spring.service; import spring.model.databaseModel.EquipmentModel; import spring.model.databaseModel.Type; import java.util.List; public interface EquipmentService { List<EquipmentModel> findAll(); EquipmentModel findOneById(Long id); EquipmentModel save(EquipmentModel heroModel); void delete(Long id); List<EquipmentModel> findByArmorsAndTypes(int armors_id, int type_id ); } <file_sep>package spring.controller.gameController; import org.junit.Assert; import org.junit.Test; public class FightControllerTest { @Test public void mobMove() { int damage = (int) ((Math.random() * (50 - 40)) + 40); int superDamage = (int) (50 * 1.5); boolean result = damage > 40 && damage < 50; Assert.assertEquals(result, result); Assert.assertEquals(75, superDamage); } }
1125af215fa4e3626b30bf36ad10d250693b2ed2
[ "Java", "INI" ]
39
Java
OlehIvato/GameRPG
7530ab407a48f663dd629bb32b547fbff551b714
3828c0e0b438f47210870dda1a943e09d881cb50
refs/heads/main
<file_sep>import { RouterModule } from '@angular/router'; import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NgxMaskModule } from 'ngx-mask'; import { NgxCurrencyModule } from 'ngx-currency'; import { PessoasComponent } from './pessoas.component'; import { DetalharComponent } from './components/detalhar/detalhar.component'; import { PagarComponent } from './components/pagar/pagar.component'; import { PessoasRoutingModule } from './pessoas-routing.module'; import { MonetarioPipe } from 'src/app/shared/pipes/monetario.pipe'; import { FormularioPessoaComponent } from './components/formulario-pessoa/formulario-pessoa.component'; @NgModule({ imports: [ CommonModule, PessoasRoutingModule, RouterModule, FormsModule, ReactiveFormsModule, NgxCurrencyModule, NgxMaskModule.forRoot(), ], declarations: [ PessoasComponent, FormularioPessoaComponent, PagarComponent, DetalharComponent, MonetarioPipe ], exports: [ MonetarioPipe ] }) export class PessoasModule { }<file_sep>import { Component } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { ToastrService } from 'ngx-toastr'; import { Pessoa } from 'src/app/shared/models/pessoa.model'; import { PessoasServices } from 'src/app/core/services/pessoas.service'; import { PagamentosServices } from './../../../../core/services/pagamentos.service'; @Component({ selector: 'vc-pagar', templateUrl: './pagar.component.html', }) export class PagarComponent { form: FormGroup; pessoas: Pessoa[] = []; constructor( private pessoasServices: PessoasServices, formBuilder: FormBuilder, private pagamentosServices: PagamentosServices, private router: Router, private activatedRoute: ActivatedRoute, private toastr: ToastrService ) { this.form = formBuilder.group({ idPagador: [null, Validators.required], idRecebedor: [null, Validators.required], valor: [null, Validators.required], }); this.carregarPessoas(); } ngOnInit() { if (this.activatedRoute.snapshot.params.idPessoa) { this.form.patchValue({ idRecebedor: this.activatedRoute.snapshot.params.idPessoa }) this.form.get('idRecebedor').disable() } } enviarPagamento() { this.form.value.idPagador = parseInt(this.form.value.idPagador); this.form.value.idRecebedor = parseInt(this.form.value.idRecebedor); if (this.form.getRawValue().idPagador === this.form.getRawValue().idRecebedor) { this.toastr.warning('O REMETENTE não pode ser igual ao DESTINATÁRIO', '', { timeOut: 3000, positionClass: 'toast-top-center' }) return; } if(!this.form.getRawValue().valor){ this.toastr.error('O valor não pode ser igual a ZERO', 'ERRO', { timeOut: 3000, positionClass: 'toast-top-center' }) return } this.pagamentosServices .realizarPagamento(this.form.getRawValue()) .subscribe((pagamento) => { this.toastr.success('PAGAMENTO', `Transferência enviada com sucesso!`, { timeOut: 3000, positionClass: 'toast-top-center' }) this.router.navigate(['/pessoas']); }); } redirecionarHome() { this.router.navigate(['/pessoas']); } private carregarPessoas() { this.pessoasServices.listarTodasPessoas().subscribe((pessoas) => { this.pessoas = pessoas; }); } } <file_sep>import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Historico } from './../../shared/models/historico.model'; import { Pagamento } from './../../shared/models/pagamento.model'; const API_URL = "http://localhost:3000" @Injectable({ providedIn: 'root' }) export class PagamentosServices{ constructor(private httpClient: HttpClient){ } realizarPagamento(pagamento: Pagamento): Observable<Pagamento>{ return this.httpClient.post<Pagamento>(API_URL + '/pagamentos', pagamento); } consultarHistorico(idPessoa: number): Observable<Historico>{ return this.httpClient.get<Historico>(API_URL + `/pagamentos/detalhar/${idPessoa}`) } }<file_sep>import { Injectable } from '@angular/core'; import {HttpClient} from '@angular/common/http'; import { Observable } from 'rxjs'; import {Pessoa} from './../../shared/models/pessoa.model' const API_URL = 'http://localhost:3000'; @Injectable({ providedIn: 'root' }) export class PessoasServices{ constructor(private http: HttpClient){ } listarTodasPessoas(): Observable<Pessoa[]>{ return this.http.get<Pessoa[]>(API_URL + '/pessoas'); } cadastrarPessoa(pessoa: Pessoa): Observable<Pessoa>{ return this.http.post<Pessoa>(API_URL + '/pessoas', pessoa); } deletarPessoa(idPessoa: number): Observable<Pessoa>{ return this.http.delete<Pessoa>(API_URL + `/pessoas/${idPessoa}`); } buscarPessoaPorId(idPessoa: number): Observable<Pessoa>{ return this.http.get<Pessoa>(API_URL + `/pessoas/${idPessoa}`); } atualizarPessoa(idPessoa: number, pessoa: Pessoa): Observable<Pessoa>{ return this.http.patch<Pessoa>(API_URL + `/pessoas/${idPessoa}`, pessoa ); } }<file_sep>import { Component } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Router, ActivatedRoute } from '@angular/router'; import { ToastrService } from 'ngx-toastr'; import { PessoasServices } from 'src/app/core/services/pessoas.service'; @Component({ selector: 'vc-formulario-pessoas', templateUrl: './formulario-pessoa.component.html' }) export class FormularioPessoaComponent{ form: FormGroup; btnNome = 'Cadastrar'; expressaoEmailRegEx = /\S+@\S+\.\S+/; constructor( formBuilder: FormBuilder, private pessoasService: PessoasServices, private router: Router, private activatedRoute: ActivatedRoute, private toastr: ToastrService ){ this.form = formBuilder.group({ pessoa_id: [null], nome: [null, [Validators.required, Validators.maxLength(50)]], email: [null, [Validators.required, Validators.email, Validators.maxLength(50)]] }); } ngOnInit(){ if(this.activatedRoute.snapshot.params.idPessoa){ this.buscarPessoaPorId(this.activatedRoute.snapshot.params.idPessoa); this.btnNome = 'Atualizar'; }else { this.btnNome = 'Cadastrar'; } console.log(this.activatedRoute.snapshot.params.idPessoa) } enviar(){ if(!this.expressaoEmailRegEx.test(this.form.value.email)){ this.toastr.error('Email Inválido', '', { timeOut: 3000, positionClass: 'toast-top-center' }) return } if(this.form.value.pessoa_id){ this.pessoasService.atualizarPessoa(this.form.value.pessoa_id, this.form.value) .subscribe(data => { this.toastr.success('Editado Com Sucesso!', '', { timeOut: 3000, positionClass: 'toast-top-center' }) this.router.navigate(['/pessoas']) }) }else{ this.pessoasService.cadastrarPessoa(this.form.value).subscribe(data => { this.toastr.success('Cadastrado Com Sucesso!', '', { timeOut: 3000, positionClass: 'toast-top-center' }) this.router.navigate(['/pessoas']) }); } } buscarPessoaPorId(idPessoa: number){ this.pessoasService.buscarPessoaPorId(idPessoa).subscribe(pessoa =>{ this.form.patchValue({ pessoa_id: pessoa.pessoa_id, nome: pessoa.nome, email: pessoa.email }) }) } redirecionarHome(){ this.router.navigate(['/pessoas']) } }<file_sep><button (click)="redirecionarHome()" class="btn"> Voltar </button> <div class="container d-flex flex-column"> <div class="row"> <div class="col-12 mb-5"> <h2>Histórico</h2> <label><strong>Nome:</strong> {{ historico?.nome }}</label><br> <label><strong>Email:</strong> {{ historico?.email }}</label> </div> <div class="col-6"> <h4>Comprovante de pagamento</h4> <table class="table"> <thead> <tr> <th scope="col">Destinatario</th> <th scope="col">Valor</th> <th scope="col">Data</th> </tr> </thead> <tbody> <tr *ngFor="let comprovante of historico?.pagador"> <td>{{ comprovante.nomeRecebedor }}</td> <td>{{ comprovante.valor | monetario }}</td> <td>{{ comprovante.data | date: 'dd/MM/yyyy h:mm a'}}</td> </tr> </tbody> </table> </div> <div class="col-6"> <h4>Comprovante de Recebimento</h4> <table class="table"> <thead> <tr> <th scope="col">Remetente</th> <th scope="col">Valor</th> <th scope="col">Data</th> </tr> </thead> <tbody> <tr *ngFor="let comprovante of historico?.recebedor"> <td>{{ comprovante.nomePagador }}</td> <td>{{ comprovante.valor | monetario}}</td> <td>{{ comprovante.data | date: 'dd/MM/yyyy h:mm a'}}</td> </tr> </tbody> </table> </div> </div> </div> <file_sep>import { Component } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { Historico } from './../../../../shared/models/historico.model'; import { PagamentosServices } from './../../../../core/services/pagamentos.service'; @Component({ selector: 'vc-detalhar', templateUrl: './detalhar.component.html', }) export class DetalharComponent { historico: Historico; constructor( private activatedRoute: ActivatedRoute, private pagamentosServices: PagamentosServices, private router: Router ) {} ngOnInit() { if (this.activatedRoute.snapshot.params.idPessoa) { this.pagamentosServices .consultarHistorico(this.activatedRoute.snapshot.params.idPessoa) .subscribe((historico) => { this.historico = historico; }); } } redirecionarHome() { this.router.navigate(['/pessoas']); } } <file_sep>import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { PessoasComponent } from './pessoas.component'; import { PagarComponent } from './components/pagar/pagar.component'; import { DetalharComponent } from './components/detalhar/detalhar.component'; import { FormularioPessoaComponent } from './components/formulario-pessoa/formulario-pessoa.component'; const routes: Routes = [ { path: 'listar', component: PessoasComponent }, { path: 'cadastrar', component: FormularioPessoaComponent }, { path: 'editar/:idPessoa', component: FormularioPessoaComponent }, { path: 'detalhar/:idPessoa', component: DetalharComponent }, { path: 'pagar', component: PagarComponent }, { path: 'pagar/:idPessoa', component: PagarComponent }, { path: '', redirectTo: 'listar', pathMatch: 'full' }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }) export class PessoasRoutingModule { }<file_sep>export interface Comprovante{ valor: number; data: string; nomePagador: string; nomeRecebedor: string; }<file_sep>import { Component, OnInit } from '@angular/core'; import Swal from 'sweetalert2'; import { Pessoa } from 'src/app/shared/models/pessoa.model'; import { PessoasServices } from './../../core/services/pessoas.service'; @Component({ selector: 'vc-pessoas', templateUrl: './pessoas.component.html', }) export class PessoasComponent implements OnInit { pessoas: Pessoa[] = []; constructor(private pessoaService: PessoasServices) {} ngOnInit() { this.buscarPessoa(); } buscarPessoa() { this.pessoaService.listarTodasPessoas().subscribe((data) => { console.log(data); this.pessoas = data; }); } confirmarRemover(idPessoa: number) { Swal.fire({ title: 'Tem Certeza', text: `Você tem certeza que deseja REMOVER #id ${idPessoa}?`, icon: 'warning', showCancelButton: true, confirmButtonText: 'Sim', cancelButtonText: 'Não', }).then((result) => { if (result.value) { this.removerPessoa(idPessoa); Swal.fire('Deletado com Sucesso!'); } else if (result.dismiss === Swal.DismissReason.cancel) { Swal.fire('Operação Cancelada!'); } }); } removerPessoa(idPessoa: number) { this.pessoaService.deletarPessoa(idPessoa).subscribe((data) => { this.buscarPessoa(); }); } } <file_sep>export interface Pagamento{ idPagador: number, valor: number, idRecebedor: number }<file_sep>import { Comprovante } from './comprovante.model'; export interface Historico{ pessoa_id: number; nome: string; email: string; pagador: Comprovante[]; recebedor: Comprovante[]; }<file_sep>import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'monetario' }) export class MonetarioPipe implements PipeTransform { transform(valor: number) { return `R$ ${valor}`; } }
967a7e0a45465eede83daf75391bba5f9cec411f
[ "TypeScript", "HTML" ]
13
TypeScript
JohnatanCarlos/CRUD-em-Angular
0ab2cff200669cd41a1f08f54b1f22c429ea8f8d
09b5f452d6fa6b959b3b7d7543c2ed0fc3620f3a
refs/heads/master
<file_sep>// // PhotoCell.swift // pxlr // // Created by r3d on 29/09/2017. // Copyright © 2017 <NAME>. All rights reserved. // import UIKit class PhotoCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) } required init?(coder aDecoder: NSCoder) { fatalError("has not been implemented") } } <file_sep>// // Constants.swift // pxlr // // Created by r3d on 29/09/2017. // Copyright © 2017 <NAME>. All rights reserved. // import Foundation let DROPPABLE_PIN = "droppablePin" //Flickr let API_KEY = "<KEY>" func flickrUrl(withAnnotation annotation: DroppablePin, andNumberOfPhotos number: Int) -> String { return "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=\(API_KEY)&lat=\(annotation.coordinate.latitude)&lon=\(annotation.coordinate.longitude)&radius=1&radius_units=mi&per_page=\(number)&format=json&nojsoncallback=1" } <file_sep># pxlr Swift 4 | Location based photo viewer, using MapKit &amp; Flickr REST API ![img_5534](https://user-images.githubusercontent.com/19235301/31045079-e3459cd2-a5d3-11e7-859b-e348a9a84581.jpg) ![img_5535](https://user-images.githubusercontent.com/19235301/31045076-e33e975c-a5d3-11e7-9059-3d6e87fc64a1.jpg) ![img_5536](https://user-images.githubusercontent.com/19235301/31045078-e34022ca-a5d3-11e7-8678-5d95105d4b98.jpg) ![img_5537](https://user-images.githubusercontent.com/19235301/31045077-e33fa426-a5d3-11e7-8b37-180de2ff0ea5.jpg)
b84e81f2e2ea7326190295bbb4b78429fe88cf0f
[ "Swift", "Markdown" ]
3
Swift
r3dm4n/pxlr
17b3c4460ab7d65cfbad1d10d240b099527bd460
e0adaf748f2e0eeb29c47f20ae66904c497f8996
refs/heads/master
<file_sep>whitelist-node-attrs Cookbook CHANGELOG ======================================= This file is used to list changes made in each version of the whitelist-node-attrs cookbook. ##v1.1.1 (2015-09-29): * Update readme with warning that this cookbook functionality is now in core chef * Add .foodcritic file to exclude rules * Add gitignore and chefignore files * Add basic chefspec * Add gemfile with dev depedencies * Add basic .kitchen.yml file * Add Rubocop file * Add Travis CI config * Update contributing and testing docs * Add Rakefile for simplified testing * Add maintainers files and a rake task for generating MD * Add travis and cookbook version badges to the readme * Add new Supermarket metadata * Update Opscode -> Chef Software ## v1.1.0: * [COOK-1886] - add `ohai_time` as a default whitelisted attribute ## v1.0.0: * Initial release <file_sep># # Author:: <NAME> (<<EMAIL>>) # Copyright:: Copyright (c) 2011 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # class Whitelist # filter takes two arguments - the data you want to filter, and a # whitelisted map of the keys you want included. Note we are only using the # keys in this hash - if the values are anything other than another hash, we # ignore them. (You can't magically morph into a blacklist with "false" as a # value in the whitelist.) # # Whitelist.filter( # { "filesystem" => { # "/dev/disk0s2" => { # "size" => "10mb" # }, # "map - autohome' => { # "size" => "10mb" # } # }, # { # "filesystem" => { # "/dev/disk0s2" => true # } # }) # # Will drop the entire "map - autohome" tree. def self.filter(data, whitelist) return nil if data.nil? new_data = data.reject { |key, _value| !whitelist.keys.include?(key) } whitelist.each do |k, v| new_data[k] = filter(new_data[k], v) if v.is_a?(Hash) end new_data end end class Chef class Node alias_method :old_save, :save def save Chef::Log.info('Whitelisting node attributes') whitelist = self[:whitelist].to_hash self.default_attrs = Whitelist.filter(default_attrs, whitelist) self.normal_attrs = Whitelist.filter(normal_attrs, whitelist) self.override_attrs = Whitelist.filter(override_attrs, whitelist) self.automatic_attrs = Whitelist.filter(automatic_attrs, whitelist) old_save end end end <file_sep>whitelist-node-attrs Cookbook ================== [![Build Status](https://travis-ci.org/chef-cookbooks/whitelist-node-attrs.svg?branch=master)](http://travis-ci.org/chef-cookbooks/whitelist-node-attrs) [![Cookbook Version](https://img.shields.io/cookbook/v/whitelist-node-attrs.svg)](https://supermarket.chef.io/cookbooks/whitelist-node-attrs) This cookbook provides a library that allows you to set a whitelist of node attributes that should be saved on the server. All of the attributes are still available throughout the chef run, but only those specifically listed will be saved to the server. # DEPRECATION This functionality now exists in Chef core therefore this cookbook is no longer necessary. [Whitelist attributes](https://docs.chef.io/attributes.html#whitelist-attributes) are supported in modern versions of Chef and are the recommended practice for managing node attributes. Requirements ============ Chef 0.9.0+ Requires chef-client and a Chef Server - this cookbook doesn't make sense, nor work, with chef-solo. Works on any platform. Attributes ========== `node[:whitelist]` provides a map of node attributes to store. The defaults are provided by this cookbook, and the map is: node.default[:whitelist] = { "domain" => true, "fqdn" => true, "hostname" => true, "ipaddress" => true, "macaddress" => true, "platform" => true, "platform_version" => true, "kernel" => { "machine" => true, "name" => true, "os" => true, "release" => true, "version" => true } } This cookbook honors the fact that attributes are set at different precedence levels. Usage ===== Upload the cookbook, and make sure that it is included as a dependency in another cookbooks metadata, or that the recipe (which does nothing) is included in the role. Whenever node.save is called, such as at the end of the run, the whitelist will be applied. License and Author ================== Author:: <NAME> (<<EMAIL>>) Copyright:: 2011-2015, Chef Software, Inc (<<EMAIL>>) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. <file_sep>name 'whitelist-node-attrs' maintainer '<NAME>, Inc' maintainer_email '<EMAIL>' license 'Apache 2.0' description 'Allows you to specify a whitelist of node attributes to save on the Chef Server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '1.1.1' source_url 'https://github.com/chef-cookbooks/whitelist-node-attrs' if respond_to?(:source_url) issues_url 'https://github.com/chef-cookbooks/whitelist-node-attrs/issues' if respond_to?(:issues_url)
09230b7f15847c491ac39125c40d024727465a0e
[ "Markdown", "Ruby" ]
4
Markdown
opscode-cookbooks/whitelist-node-attrs
8bd7cafd5fb007ec104ec48761750b9476905b8a
ec42d1b73e43954f869ebe7be52f21672029c1f0
refs/heads/master
<file_sep>// // UDPServer.c // SerialPortSample // // Created by <NAME> on 10/06/16. // // #include <stdio.h> #include <arpa/inet.h> #include <netinet/in.h> #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <string.h> #include <fcntl.h> #include <errno.h> #include "Datagram.h" #include <netdb.h> #define BUFLEN 512 #define NPACK 10 #define PORT_IN 49000 #define PORT_OUT 40011 int socketIn = -1, socketOut = -1; void debugnote(char *msg) { printf("// DEBUG : %s\n", msg); fflush(stdout); } int udpServerInit(void) { if ((socketIn = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) return 1; int flags = fcntl(socketIn, F_GETFL, 0); if(flags > -1) fcntl(socketIn, F_SETFL, flags | O_NONBLOCK); const char* hostname=0; /* wildcard */ struct addrinfo hints; memset(&hints,0,sizeof(hints)); hints.ai_family=AF_UNSPEC; hints.ai_socktype=SOCK_DGRAM; hints.ai_protocol=0; hints.ai_flags=AI_PASSIVE|AI_ADDRCONFIG; struct addrinfo* res=0; int err=getaddrinfo(hostname,"40010",&hints,&res); if (err!=0) { debugnote(strerror(errno)); return 10; } if (bind(socketIn, res->ai_addr, res->ai_addrlen)==-1) { debugnote(strerror(errno)); return 2; } if ((socketOut = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) return 1; flags = fcntl(socketOut, F_GETFL, 0); if(flags > -1) fcntl(socketOut, F_SETFL, flags | O_NONBLOCK); return 0; } ssize_t udpClient(const char *buf, ssize_t size) { struct sockaddr_in si_other; memset((char *) &si_other, 0, sizeof(si_other)); si_other.sin_family = AF_INET; si_other.sin_port = htons(PORT_OUT); if (inet_aton("127.0.0.1", &si_other.sin_addr)==0) { fprintf(stderr, "inet_aton() failed\n"); return 0; } return sendto(socketOut, buf, size, 0, (const struct sockaddr*) &si_other, sizeof(si_other)); } void udpServerCleanup(void) { if(socketIn > -1) close(socketIn); if(socketOut > -1) close(socketOut); } int udpServerInput(bool ready) { struct SimLinkSensor buf; long packetSize = 0; packetSize = read(socketIn, &buf, sizeof(buf)); if(ready && packetSize == sizeof(buf)) { datagramTxStart(DG_SIMLINK); datagramTxOut((const uint8_t*) &buf, (int) sizeof(buf)); datagramTxEnd(); return 1; } return 0; } <file_sep>/* File: SerialPortSample.c Abstract: Command line tool that demonstrates how to use IOKitLib to find all serial ports on OS X. Also shows how to open, write to, read from, and close a serial port. Version: 1.5 Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (C) 2013 Apple Inc. All Rights Reserved. */ #include <sys/stat.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <errno.h> #include <paths.h> #include <termios.h> #include <sysexits.h> #include <sys/param.h> #include <sys/select.h> #include <sys/time.h> #include <time.h> #include <CoreFoundation/CoreFoundation.h> #include <IOKit/IOKitLib.h> #include <IOKit/serial/IOSerialKeys.h> #include <IOKit/serial/ioss.h> #include <IOKit/IOBSD.h> #include "Log.h" #include "LogDump.h" #include "Datagram.h" // Find the first device that matches the callout device path MATCH_PATH. // If this is undefined, return the first device found. #define MATCH_PATH "/dev/cu.usbmodem1411" const int kNumRetries = 3; // Hold the original termios attributes so we can reset them static struct termios gOriginalTTYAttrs; // Function prototypes static kern_return_t findModems(io_iterator_t *matchingServices); static kern_return_t getModemPath(io_iterator_t serialPortIterator, char *bsdPath, CFIndex maxPathSize); static int openSerialPort(const char *bsdPath); static void closeSerialPort(int serialPort); // Returns an iterator across all known modems. Caller is responsible for // releasing the iterator when iteration is complete. static kern_return_t findModems(io_iterator_t *matchingServices) { kern_return_t kernResult; CFMutableDictionaryRef classesToMatch; // Serial devices are instances of class IOSerialBSDClient. // Create a matching dictionary to find those instances. classesToMatch = IOServiceMatching(kIOSerialBSDServiceValue); if (classesToMatch == NULL) { printf("// IOServiceMatching returned a NULL dictionary.\n"); } else { // Look for devices that claim to be modems. CFDictionarySetValue(classesToMatch, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDModemType)); // Each serial device object has a property with key // kIOSerialBSDTypeKey and a value that is one of kIOSerialBSDAllTypes, // kIOSerialBSDModemType, or kIOSerialBSDRS232Type. You can experiment with the // matching by changing the last parameter in the above call to CFDictionarySetValue. // As shipped, this sample is only interested in modems, // so add this property to the CFDictionary we're matching on. // This will find devices that advertise themselves as modems, // such as built-in and USB modems. However, this match won't find serial modems. } // Get an iterator across all matching devices. kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, classesToMatch, matchingServices); if (KERN_SUCCESS != kernResult) { printf("// IOServiceGetMatchingServices returned %d\n", kernResult); goto exit; } exit: return kernResult; } // Given an iterator across a set of modems, return the BSD path to the first one with the callout device // path matching MATCH_PATH if defined. // If MATCH_PATH is not defined, return the first device found. // If no modems are found the path name is set to an empty string. static kern_return_t getModemPath(io_iterator_t serialPortIterator, char *bsdPath, CFIndex maxPathSize) { io_object_t modemService; kern_return_t kernResult = KERN_FAILURE; Boolean modemFound = false; // Initialize the returned path *bsdPath = '\0'; // Iterate across all modems found. In this example, we bail after finding the first modem. while ((modemService = IOIteratorNext(serialPortIterator)) && !modemFound) { CFTypeRef bsdPathAsCFString; // Get the callout device's path (/dev/cu.xxxxx). The callout device should almost always be // used: the dialin device (/dev/tty.xxxxx) would be used when monitoring a serial port for // incoming calls, e.g. a fax listener. bsdPathAsCFString = IORegistryEntryCreateCFProperty(modemService, CFSTR(kIOCalloutDeviceKey), kCFAllocatorDefault, 0); if (bsdPathAsCFString) { Boolean result; // Convert the path from a CFString to a C (NUL-terminated) string for use // with the POSIX open() call. result = CFStringGetCString(bsdPathAsCFString, bsdPath, maxPathSize, kCFStringEncodingUTF8); CFRelease(bsdPathAsCFString); if (strncmp(bsdPath, MATCH_PATH, strlen(MATCH_PATH)) != 0) { result = false; } if (result) { printf("// Modem found with BSD path: %s", bsdPath); modemFound = true; kernResult = KERN_SUCCESS; } } printf("\n"); // Release the io_service_t now that we are done with it. (void) IOObjectRelease(modemService); } return kernResult; } bool initConsoleInput() { struct termios attrs; // Get the current options and save them so we can restore the default settings later. if (tcgetattr(STDIN_FILENO, &attrs) == -1) { printf("Error getting tty attributes - %s(%d).\n", strerror(errno), errno); return false; } // Set raw input (non-canonical) mode, with reads blocking until either a single character // has been received or a one second timeout expires. // See tcsetattr(4) <x-man-page://4/tcsetattr> and termios(4) <x-man-page://4/termios> for details. attrs.c_lflag &= ~ICANON; attrs.c_lflag &= ~ECHO; attrs.c_cc[VMIN] = 0; attrs.c_cc[VTIME] = 0; // Cause the new options to take effect immediately. if (tcsetattr(STDIN_FILENO, TCSANOW, &attrs) == -1) { printf("Error setting tty attributes - %s(%d).\n", strerror(errno), errno); return false; } return true; } // Given the path to a serial device, open the device and configure it. // Return the file descriptor associated with the device. static int openSerialPort(const char *bsdPath) { int serialPort = -1; int handshake; struct termios options; // Open the serial port read/write, with no controlling terminal, and don't wait for a connection. // The O_NONBLOCK flag also causes subsequent I/O on the device to be non-blocking. // See open(2) <x-man-page://2/open> for details. serialPort = open(bsdPath, O_RDWR | O_NOCTTY | O_NONBLOCK); if (serialPort == -1) { printf("Error opening serial port %s - %s(%d).\n", bsdPath, strerror(errno), errno); goto error; } // Note that open() follows POSIX semantics: multiple open() calls to the same file will succeed // unless the TIOCEXCL ioctl is issued. This will prevent additional opens except by root-owned // processes. // See tty(4) <x-man-page//4/tty> and ioctl(2) <x-man-page//2/ioctl> for details. if (ioctl(serialPort, TIOCEXCL) == -1) { printf("Error setting TIOCEXCL on %s - %s(%d).\n", bsdPath, strerror(errno), errno); goto error; } // Now that the device is open, clear the O_NONBLOCK flag so subsequent I/O will block. // See fcntl(2) <x-man-page//2/fcntl> for details. if (fcntl(serialPort, F_SETFL, 0) == -1) { printf("Error clearing O_NONBLOCK %s - %s(%d).\n", bsdPath, strerror(errno), errno); goto error; } // Get the current options and save them so we can restore the default settings later. if (tcgetattr(serialPort, &gOriginalTTYAttrs) == -1) { printf("Error getting tty attributes %s - %s(%d).\n", bsdPath, strerror(errno), errno); goto error; } // The serial port attributes such as timeouts and baud rate are set by modifying the termios // structure and then calling tcsetattr() to cause the changes to take effect. Note that the // changes will not become effective without the tcsetattr() call. // See tcsetattr(4) <x-man-page://4/tcsetattr> for details. options = gOriginalTTYAttrs; // Print the current input and output baud rates. // See tcsetattr(4) <x-man-page://4/tcsetattr> for details. printf("// Current input baud rate is %d\n", (int) cfgetispeed(&options)); printf("// Current output baud rate is %d\n", (int) cfgetospeed(&options)); // Set raw input (non-canonical) mode, with reads blocking until either a single character // has been received or a one second timeout expires. // See tcsetattr(4) <x-man-page://4/tcsetattr> and termios(4) <x-man-page://4/termios> for details. cfmakeraw(&options); options.c_cc[VMIN] = 0; options.c_cc[VTIME] = 0; // The baud rate, word length, and handshake options can be set as follows: cfsetspeed(&options, B115200); // Set 19200 baud options.c_cflag |= (CS8); // The IOSSIOSPEED ioctl can be used to set arbitrary baud rates // other than those specified by POSIX. The driver for the underlying serial hardware // ultimately determines which baud rates can be used. This ioctl sets both the input // and output speed. /* speed_t speed = 115200; // Set 14400 baud if (ioctl(serialPort, IOSSIOSPEED, &speed) == -1) { printf("Error calling ioctl(..., IOSSIOSPEED, ...) %s - %s(%d).\n", bsdPath, strerror(errno), errno); } */ // Print the new input and output baud rates. Note that the IOSSIOSPEED ioctl interacts with the serial driver // directly bypassing the termios struct. This means that the following two calls will not be able to read // the current baud rate if the IOSSIOSPEED ioctl was used but will instead return the speed set by the last call // to cfsetspeed. printf("// Input baud rate changed to %d\n", (int) cfgetispeed(&options)); printf("// Output baud rate changed to %d\n", (int) cfgetospeed(&options)); // Cause the new options to take effect immediately. if (tcsetattr(serialPort, TCSANOW, &options) == -1) { printf("Error setting tty attributes %s - %s(%d).\n", bsdPath, strerror(errno), errno); goto error; } // To set the modem handshake lines, use the following ioctls. // See tty(4) <x-man-page//4/tty> and ioctl(2) <x-man-page//2/ioctl> for details. // Assert Data Terminal Ready (DTR) if (ioctl(serialPort, TIOCSDTR) == -1) { printf("Error asserting DTR %s - %s(%d).\n", bsdPath, strerror(errno), errno); } // Clear Data Terminal Ready (DTR) if (ioctl(serialPort, TIOCCDTR) == -1) { printf("Error clearing DTR %s - %s(%d).\n", bsdPath, strerror(errno), errno); } // Set the modem lines depending on the bits set in handshake handshake = TIOCM_DTR | TIOCM_RTS | TIOCM_CTS | TIOCM_DSR; if (ioctl(serialPort, TIOCMSET, &handshake) == -1) { printf("Error setting handshake lines %s - %s(%d).\n", bsdPath, strerror(errno), errno); } // To read the state of the modem lines, use the following ioctl. // See tty(4) <x-man-page//4/tty> and ioctl(2) <x-man-page//2/ioctl> for details. // Store the state of the modem lines in handshake if (ioctl(serialPort, TIOCMGET, &handshake) == -1) { printf("Error getting handshake lines %s - %s(%d).\n", bsdPath, strerror(errno), errno); } printf("// Handshake lines currently set to %d\n", handshake); unsigned long mics = 1000UL; // Set the receive latency in microseconds. Serial drivers use this value to determine how often to // dequeue characters received by the hardware. Most applications don't need to set this value: if an // app reads lines of characters, the app can't do anything until the line termination character has been // received anyway. The most common applications which are sensitive to read latency are MIDI and IrDA // applications. if (ioctl(serialPort, IOSSDATALAT, &mics) == -1) { // set latency to 1 microsecond printf("Error setting read latency %s - %s(%d).\n", bsdPath, strerror(errno), errno); goto error; } // Success return serialPort; // Failure path error: if (serialPort != -1) { close(serialPort); } return -1; } int datagrams, datagramsGood; int hearbeatCount = 0; bool receivingLog = false; #define MAX_LOG_SIZE (1<<24) uint16_t logStorage[MAX_LOG_SIZE]; int logTotal; struct LogInfo logInfo; char modelName[NAME_LEN+1]; bool backupBusy = false; FILE *backupFile = NULL, *logFile = NULL; int serialPort = -1; #define BUF_LEN 1000 void backupOpen(const char *name) { char fileName[BUF_LEN]; int count = 0; while(1) { snprintf(fileName, BUF_LEN, "/Users/veivi/Desktop/VeiviPilotData/Params/%s_%d.txt", modelName, count); backupFile = fopen(fileName, "r"); if(!backupFile) { backupFile = fopen(fileName, "w"); if(backupFile) backupBusy = true; return; } fclose(backupFile); count++; } } void backupClose() { if(backupFile) fclose(backupFile); backupBusy = false; backupFile = NULL; } bool logOpen(struct LogInfo *info) { char fileName[BUF_LEN]; snprintf(fileName, BUF_LEN, "/Users/veivi/Desktop/VeiviPilotData/Log/%s", info->name); mkdir(fileName, 0777); snprintf(fileName, BUF_LEN, "/Users/veivi/Desktop/VeiviPilotData/Log/%s/%s_%d.banal", info->name, info->name, info->stamp); logFile = fopen(fileName, "w"); if(logFile) return true; return false; } void logClose() { if(logFile) fclose(logFile); receivingLog = false; logFile = NULL; } void serialWrite(const char *string, ssize_t len) { while(len > 0) { ssize_t numBytes = write(serialPort, string, len); if(numBytes > 0) { string += numBytes; len -= numBytes; } } } #define MAX_DG_SIZE (1<<16) int maxDatagramSize = MAX_DG_SIZE; uint8_t datagramRxStore[MAX_DG_SIZE]; void datagramSerialOut(uint8_t c) { serialWrite((const char*) &c, 1); } void sendCommand(const char *str) { datagramTxStart(DG_CONSOLE); datagramTxOut((const uint8_t*) str, (int) strlen(str)+1); datagramTxEnd(); } void consolePrintf(const char *format, ...) { va_list args; va_start(args, format); vfprintf(stdout, format, args); va_end(args); fflush(stdout); } void consoleWrite(const uint8_t *data, size_t size) { if(receivingLog && logFile) fwrite((void*) data, size, 1, logFile); else if(backupBusy && backupFile) fwrite((void*) data, size, 1, backupFile); else { fwrite((void*) data, size, 1, stdout); fflush(stdout); } } void logStore(const uint16_t *data, int count) { if(logTotal + count < MAX_LOG_SIZE) { memcpy(&logStorage[logTotal], data, count*sizeof(uint16_t)); logTotal += count; consolePrintf("// RECEIVED %d ENTRIES\r", logTotal); } else { consolePrintf("// LOG STORAGE OVERFLOW\n"); } } void logDisplay() { if(receivingLog) { logDump(logFile, &logInfo, logStorage, logTotal); logClose(); if(logTotal > 0) consolePrintf("\n"); consolePrintf("// LOG DUMP COMPLETED\n"); } logTotal = 0; } uint32_t heartbeatCount; bool dumpDone = false, heartbeatReset = false, initDone = false, logReady = false; int tickCount = 0; void tickProcess(void) { if(tickCount < 3) { heartbeatCount = 0; tickCount++; } else heartbeatReset = true; if(heartbeatReset) { datagramTxStart(DG_HEARTBEAT); datagramTxEnd(); } } bool autoClearDone = false; void datagramInterpreter(uint8_t t, const uint8_t *data, int size) { switch(t) { case DG_HEARTBEAT: // Heartbeat if(heartbeatReset) memcpy((void*) &heartbeatCount, data, sizeof(heartbeatCount)); // consolePrintf("beat %d\n", heartbeatCount); break; case DG_CONSOLE: // Console output consoleWrite(data, size); break; case DG_INITIALIZED: initDone = true; break; case DG_READY: // Initialization done // consolePrintf("ready\n"); logReady = true; break; case DG_LOGDATA: // Log data if(size > 0) logStore((const uint16_t*) data, size/2); else if(receivingLog) { logDisplay(); logClose(); // Auto clear if(!autoClearDone) sendCommand("clear"); autoClearDone = true; } break; case DG_LOGINFO: // Log stamp memcpy(&logInfo, data, sizeof(logInfo)); consolePrintf("// LOG %d OF MODEL %s\n", logInfo.stamp, logInfo.name); receivingLog = logOpen(&logInfo); break; case DG_PARAMS: // Param backup if(size > 0) { memset(modelName, '\0', NAME_LEN); memcpy(modelName, (char*) data, size); consolePrintf("// BACKUP %s START\n", modelName); backupOpen(modelName);; } else { consolePrintf("// BACKUP END\n"); backupClose(); } break; case DG_SIMLINK: // Simulator link control record udpClient(data, size); break; default: consolePrintf("!! FUNNY DATAGRAM TYPE = %d SIZE = %d\n", t, size); } } const int buflen = 1<<10; char cmdBuffer[buflen]; int cmdLen; void handleKey(char k) { switch(k) { case '\b': case 127: if(cmdLen > 0) { consolePrintf("\b \b"); cmdLen--; } break; case '\r': case '\n': consolePrintf("\r"); cmdBuffer[cmdLen++] = '\0'; sendCommand(cmdBuffer); cmdLen = 0; usleep(1E6/20); break; default: if(cmdLen < buflen) { cmdBuffer[cmdLen++] = k; consolePrintf("%c", k); } break; } } bool simulatorConnected = false; static Boolean dumpLog(void) { char buffer[1024]; // Input buffer ssize_t numBytes; // Number of bytes read or written Boolean result = false; time_t prev = 0; bool idle = true; while (1) { idle = true; // Tick time_t current = time(NULL); if(current > prev) { tickProcess(); prev = current; } // Local input if((numBytes = read(STDIN_FILENO, buffer, sizeof(buffer))) > 0) { idle = false; for(int i = 0; i < numBytes; i++) handleKey(buffer[i]); } // Link input if((numBytes = read(serialPort, buffer, sizeof(buffer))) > 0) { idle = false; for(int i = 0; i < numBytes; i++) datagramRxInputChar(buffer[i]); } // Simulator sensor input if(udpServerInput(initDone)) { simulatorConnected = true; idle = false; } if(logReady && !dumpDone && !simulatorConnected) { // Auto dump sendCommand("dumpz"); dumpDone = true; } if(idle) usleep(1E6/100); } return result; } // Given the file descriptor for a serial device, close that device. void closeSerialPort(int serialPort) { // Block until all written output has been sent from the device. // Note that this call is simply passed on to the serial device driver. // See tcsendbreak(3) <x-man-page://3/tcsendbreak> for details. if (tcdrain(serialPort) == -1) { printf("Error waiting for drain - %s(%d).\n", strerror(errno), errno); } // Traditionally it is good practice to reset a serial port back to // the state in which you found it. This is why the original termios struct // was saved. if (tcsetattr(serialPort, TCSANOW, &gOriginalTTYAttrs) == -1) { printf("Error resetting tty attributes - %s(%d).\n", strerror(errno), errno); } close(serialPort); } int main(int argc, const char * argv[]) { kern_return_t kernResult; io_iterator_t serialPortIterator; char bsdPath[MAXPATHLEN]; if(udpServerInit()) { printf("Simulator link input port open failed.\n"); return -1; } kernResult = findModems(&serialPortIterator); if (KERN_SUCCESS != kernResult) { printf("No modems were found.\n"); return -1; } kernResult = getModemPath(serialPortIterator, bsdPath, sizeof(bsdPath)); if (KERN_SUCCESS != kernResult) { printf("Could not get path for modem.\n"); return -2; } IOObjectRelease(serialPortIterator); // Release the iterator. // Now open the modem port we found, initialize the modem, then close it if (!bsdPath[0]) { printf("No modem port found.\n"); return EX_UNAVAILABLE; } if(!initConsoleInput()) return 0; serialPort = openSerialPort(bsdPath); if (-1 == serialPort) { return EX_IOERR; } if (dumpLog()) { // printf("Log dumped successfully, size = %dk+%d entries.\n", (int) logSize/(1<<10), logSize%(1<<10)); } else { printf("Could not initialize modem.\n"); } closeSerialPort(serialPort); printf("Modem port closed.\n"); return EX_OK; } <file_sep>// // LogDump.c // SerialPortSample // // Created by <NAME> on 10/02/16. // // #include <math.h> #include <string.h> #include <stdio.h> #include <stdarg.h> #include "LogDump.h" #include "Log.h" uint32_t logLen; static FILE *outputFile; static int col = 0; static bool first = false, tick = false; static void logOutputInit(void) { col = 20; first = true; tick = false; } long valueCount; void printNum(float v, int p) { const char fmt[] = {'%', '.', '0'+p, 'f', '\0'}; fprintf(outputFile, fmt, (double) v); } void printString(const char *f, ...) { va_list args; va_start(args, f); vfprintf(outputFile, f, args); va_end(args); } static void logOutputValue(float v) { float av = fabs(v); if(!first) { printString(","); col++; } if(col > 60) { float progress = 100.0 * (float) valueCount / logLen / lc_channels; printString(" // %d%%\n", (int) progress); col = 0; } if(av < 0.001) { col++; printString("0"); } else if(fabs(av - 1.0) < 0.001){ printString(v < 0.0 ? "-1" : "1"); col += v < 0.0 ? 2 : 1; } else { int decimals = av < 1 ? 3 : av < 10 ? 2 : av < 100 ? 1 : 0; printNum(v, decimals); col += 3 + (v < 0.0 ? 1 : 0) + (decimals > 0 ? 1 : 0) + (av < 1.0 ? 1 : 0) + (av >= 1000.0 ? 1 : 0) + (av >= 10000.0 ? 1 : 0); } first = false; } static void logOutputString(const char *s) { if(!first) { printString(", "); col++; } if(col > 72) { printString(""); col = 0; } printString("\"%s\"", s); col += strlen(s) + 2; first = false; } static void logOutputVariableName(int stamp, const char *name) { if(!first) { printString(";"); col++; } if(col > 72) { printString(""); col = 0; } printString("fdr_%d_%s", stamp, name); col += 4 + 3 + 1 + strlen(name); first = false; } static void logOutputValueInvalid(float small, float large) { logOutputValue(tick ? small : large); tick = !tick; } void logDumpCh(int ch, int stamp, const uint16_t *store) { printString("// CHANNEL %d (%s) DATA\n", ch, logChannels[ch].name); printString("fdr_%d_%s = [ ", stamp, logChannels[ch].name); float small = logChannels[ch].small, large = logChannels[ch].large; int currentCh = -1, nextCh = -1; uint16_t valueRaw = 0; bool valueValid = false; float value = 0.0; logOutputInit(); // Initialize for(int32_t i = 0; i < logLen; i++) { valueCount++; uint16_t entry = store[i]; if(ENTRY_IS_TOKEN(entry) && ENTRY_VALUE(entry) < t_delta) { LogToken_t token = (LogToken_t) ENTRY_VALUE(entry); switch(token) { case t_stamp: // End marker, a count follows, ignore both i++; break; case t_start: break; case t_mark: // Mark for(int j = 0; j < 10; j++) logOutputValueInvalid(small, large); break; default: if(token >= t_channel && token < t_channel+lc_channels) { // Valid channel id nextCh = token - t_channel; } else { // Invalid token printString(" // *** Invalid entry 0x%X\n", token); break; } } } else { // A log value entry if(!ENTRY_IS_TOKEN(entry)) currentCh = nextCh; if(logChannels[currentCh].tick) { if(valueValid) logOutputValue(value); else logOutputValueInvalid(small, large); } if(currentCh == ch) { if(ENTRY_IS_TOKEN(entry)) { // Delta value valueRaw = ENTRY_VALUE(valueRaw + ((ENTRY_VALUE(entry) & DELTA_MASK)<< 1)); } else { // Absolute value valueRaw = entry; } value = small + (float) valueRaw / (float) VALUE_MASK * (large - small); valueValid = true; } if(currentCh > -1) nextCh = currentCh + 1; } } printString(" ]\n"); } void logDump(FILE *output, struct LogInfo *info, const uint16_t *store, int len) { outputFile = output; logLen = len; valueCount = 0; for(int ch = 0; ch < lc_channels; ch++) logDumpCh(ch, info->stamp, store); printString("fdr_"); printNum(info->stamp, 0); printString("_matrix = [ "); logOutputInit(); for(int ch = 0; ch < lc_channels; ch++) logOutputVariableName(info->stamp, logChannels[ch].name); printString(" ]\n"); printString("// FLIGHT DATA RECORD WITH INDEX\n"); printString("fdr_"); printNum(info->stamp, 0); printString(" = { fdr_"); printNum(info->stamp, 0); printString("_matrix, "); logOutputInit(); for(int ch = 0; ch < lc_channels; ch++) logOutputString(logChannels[ch].name); printString(" }\n"); printString("fdr = fdr_%d\n", info->stamp); } <file_sep>// // LogDump.h // SerialPortSample // // Created by <NAME> on 10/02/16. // // #ifndef LogDump_h #define LogDump_h #include <stdint.h> #include <stdio.h> #include "Log.h" void logDump(FILE *output, struct LogInfo *info, const uint16_t *store, int len); #endif /* LogDump_h */
0b6c3313e29889298c5ac8047b8e42d7f5a6f76a
[ "C" ]
4
C
veivi/SerialPortSample2
1d968cbfdd6a26ec151fd5902c3c95cc846e8c21
d3a70be7a2d9fa7ff1de0cdc97106d73bed424df
refs/heads/master
<file_sep># Catch cd typos alias cd..="cd .." # Make a new directory and cd into it immediately mkcdir () { mkdir -p -- "$1" && cd -P -- "$1" } # File listing aliases alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' # Find a file by file name function find_file(){ find -type f -name $1 } # Convert a markdown file to pdf function md_to_pdf(){ pandoc -s -V geometry:margin=1in -o $2 $1 } # Move up n directories. Saves cd ../../../.... function up() { times=$1 while [ "$times" -gt "0" ]; do cd .. times=$(($times - 1)) done } # Handle the mess of extracting different file types function extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.tar.xz) tar Jxvf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) rar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xvf $1 ;; *.tbz2) tar xvjf $1 ;; *.tgz) tar xvzf $1 ;; *.zip) unzip -d `echo $1 | sed 's/\(.*\)\.zip/\1/'` $1;; *.Z) uncompress $1 ;; *.7z) 7z x $1 ;; *) echo "don't know how to extract '$1'" ;; esac else echo "'$1' is not a valid file!" fi } # Refresh tmux alias tmux_update="tmux source-file ~/.tmux.conf" # Colouring ls commands if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi
574a9369e14ff21b2fe2ec3d72abd8b1f9725e63
[ "Shell" ]
1
Shell
thomaspinder/dotfiles
76e5333322234fe34f2d62c2d494a3a1ccdb111a
8c6f229e1b3c40deb91dcb7af6f06c46a2277a7f
refs/heads/master
<file_sep>##cross_validation.py from sklearn.model_selection import KFold,cross_val_score from sklearn import metrics from sklearn.model_selection import ShuffleSplit from sklearn.grid_search import GridSearchCV def do_cross_validate(x, y): # k_fold = KFold(n_splits = num_folds) # cross_val_score(learner, x_train, y_train, scoring=how_to_score) train_gs_X, test_gs_X, train_gs_Y, test_gs_Y = train_test_split(x,y,train_size=0.1 ) gb_grid_params = {'learning_rate': [0.1, 0.05, 0.02, 0.01], 'max_depth': [4, 6, 8], 'min_samples_leaf': [20, 50,100,150], } print(gb_grid_params) gb_gs = GradientBoostingRegressor(n_estimators = 600) reg = grid_search.GridSearchCV(gb_gs, gb_grid_params, cv=2, scoring='rmse', verbose = 3 ); reg.fit(train_gs_X, train_gs_Y); <file_sep>import csv import pdb import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC, SVC, SVR from sklearn.metrics import accuracy_score SEED_VAL = 1991 df = pd.read_csv('data/cleaned_data_ENG.csv') #figure out salary buckets min_sal_sorted_df = df.sort_values(by=['min_salary']) max_sal_sorted_df = df.sort_values(by=['max_salary']) plt.plot(min_sal_sorted_df['min_salary'].tolist(), 'bo') plt.plot(max_sal_sorted_df['max_salary'].tolist(), 'ro') #plt.savefig("salary_scurve.png") #Ok lets do some bucketing min_sal_buckets = range(50000,210000,10000) num_buckets = len(min_sal_buckets)+1 def bucket_to_range(bucket): if bucket == 0: bucket_str = "<" + str(min_sal_buckets[0]) return bucket_str if bucket == len(min_sal_buckets): bucket_str = ">" + str(min_sal_buckets[-1]) return bucket_str bottom = min_sal_buckets[bucket-1] top = min_sal_buckets[bucket] return str(bottom) + "-" + str(top) def min_class_bucket(row): proper_bucket = -1 if row.min_salary < min_sal_buckets[0]: return 0 elif row.min_salary >= min_sal_buckets[-1]: return len(min_sal_buckets) for i in range(1,len(min_sal_buckets)): if row.min_salary >= min_sal_buckets[i-1] and row.min_salary < min_sal_buckets[i]: return i df['salary_bucket'] = df.apply(min_class_bucket, axis=1) df = df.astype( {'salary_bucket':int } ) df.to_csv("data/train_data_with_salary_buckets_ENG.csv") df_XforSVM = df.filter(['is_acquired', 'is_public', 'remote_ok', 'NYC', \ 'LA', 'SF', 'SEA', 'senior', 'back_end', 'full_stack', 'front_end'], axis=1) df_YforSVM = df.filter(['salary_bucket'], axis=1 ) clf = LinearSVC(random_state=0, tol=1e-5, max_iter=10000) X_train, X_test, Y_train, Y_test = train_test_split( df_XforSVM.values, df_YforSVM.values.ravel() , test_size=500, random_state=1991) clf.fit(X_train, Y_train) #Let's also try on a different type of svm with rbf kernel rbf_clf = SVC(gamma = 'scale') rbf_clf.fit(X_train,Y_train) ##Let's try testing this: Y_test_pred = clf.predict(X_test) Y_test_rbf = rbf_clf.predict(X_test) #See how correct you are: test_perf = accuracy_score(Y_test, Y_test_pred) test_perf_rbf = accuracy_score(Y_test, Y_test_rbf) print("Linear Performance on test set: " + str(test_perf) ) print("RBF Performance on test set: " + str(test_perf_rbf) ) #Performance on train set Y_train_pred = clf.predict(X_train) train_perf = accuracy_score(Y_train, Y_train_pred) #Lets look at how far we are off dif_matrix = Y_train - Y_train_pred unique, counts = np.unique(dif_matrix, return_counts=True) my_class_counts = dict(zip(unique, counts)) dif_matrix_abs = np.abs(dif_matrix) unique, counts = np.unique(dif_matrix_abs, return_counts=True) my_class_counts_abs = dict(zip(unique, counts)) x_count = [int(v) for v in my_class_counts.keys()] y_count = [my_class_counts[v] for v in my_class_counts.keys()] x_count_abs = [int(v) for v in my_class_counts_abs.keys()] y_count_abs = [my_class_counts_abs[v] for v in my_class_counts_abs.keys()] plt.clf() plt.bar(x_count,y_count) plt.xlabel('Error Misclassification') plt.ylabel('Number of Occurences') plt.title('Number of Buckets SVM Was Off By') #plt.show() plt.clf() plt.bar(x_count_abs,y_count_abs) plt.xlabel('Magnitude of Error Misclassification') plt.ylabel('Number of Occurences') plt.title('Number of Buckets SVM Was Off By') #plt.show() #total records total_rec = sum(y_count_abs) zero_to_one_bucket = sum(y_count_abs[0:2]) print("Percentage off by 1 bucket or less: " + str( zero_to_one_bucket / total_rec) ) ##Perform same analysis for test set dif_matrix_abs_test = np.abs(Y_test - Y_test_pred) unique, counts = np.unique(dif_matrix_abs_test, return_counts=True) plt.clf() plt.bar(unique,counts) plt.xlabel('Magnitude of Error Misclassification on Test Set') plt.ylabel('Number of Occurences') plt.title('Number of Buckets SVM Was Off By on Test Set') #plt.show() total_rec = sum(counts) zero_to_one_bucket = sum(counts[0:2]) print("Percentage off by 1 bucket or less on test set: " + str( zero_to_one_bucket / total_rec) ) Y_train_pred_rbf = rbf_clf.predict(X_train) train_perf_rbf = accuracy_score(Y_train, Y_train_pred_rbf) print("Linear performance on train set: " + str(train_perf) ) print("RBF performance on train set: " + str(train_perf_rbf) ) #Lets take a look at what's being predicted; i.e. where am I doing poorly? #pdb.set_trace() df_results = pd.DataFrame( {'ytrain': Y_train, 'ypred' : Y_train_pred} ) df_count = df_results.groupby(df_results.columns.tolist()).size().reset_index().rename(columns={0:'count'}) ybase = df_count['ytrain'] ypd = df_count['ypred'] ypairs = list(zip(ybase, ypd)) plt.clf() y_pos = np.arange(len(ypairs)) plt.bar( y_pos, df_count['count'] ) plt.xticks(y_pos, ypairs ) plt.xticks(rotation=90) plt.xlabel("Pair (true_class,predicted_class)") plt.ylabel("Count") plt.title("Error Analysis for Multi-Class SVM") plt.savefig("SVM_error_analysis") #plt.show() ##Notes: #Only predicting really into 3 classes for anything 0,3,4,6 and sometimes 8. #does that mean I should try fewer buckets? #1) try to incorporate company size; filter out cases with no size print("Done!") <file_sep>from sklearn import linear_model from sklearn.model_selection import train_test_split, cross_val_score from sklearn.metrics import mean_absolute_error, mean_squared_error, median_absolute_error, r2_score import pandas as pd from statistics import mean import sys import operator import matplotlib.pyplot as plt import altair as alt MAX_FEATS = 10 full_data = pd.read_csv('cleaned_data_better.csv') all_columns = list(full_data.columns) features = ['is_acquired', 'is_public', 'remote_ok', 'NYC', \ 'LA', 'SF', 'SEA', 'senior', 'back_end', 'full_stack', 'front_end','total_investments'] for column in all_columns: if "seniority_" in column or "skills_" in column: features.append(column) # print(features) max_flag = True y_string = "max_salary" if max_flag else "min_salary" y_data = full_data.filter([y_string]) cv_scorers_types ={ "Mean Abs Error" :'neg_mean_absolute_error', "Mean Sq. Error":'neg_mean_squared_error', "Median Abs Error":'neg_median_absolute_error', "R-squared": 'r2' } loss_functions = { "Mean Abs Error" : mean_absolute_error, "Mean Sq. Error": mean_squared_error, "Median Abs Error": median_absolute_error, "R-squared": r2_score } final_scores = {} for score_name, cv_scorer_type in cv_scorers_types.items(): print(f"Running scores for {score_name}") loss_func = loss_functions[score_name] f = open(f"output/feature_losses_{cv_scorer_type}_{y_string}.txt","w") feat_copy = features.copy() output = "" model_features = [] train_scores = [] test_scores = [] for iteration in range(MAX_FEATS): print(f"{iteration+1} features:\n",file=f) scores = {} for column in feat_copy: model_feats_i = model_features + [column] X_i = full_data.filter(model_feats_i) X_train, X_test, y_train, y_test = train_test_split(X_i.values, y_data.values, test_size=500, random_state=1991) model = linear_model.LinearRegression() cv_score = mean(map(float,cross_val_score(model, X_train, y_train, scoring=cv_scorer_type, cv = 10))) scores[column] = cv_score print(f"Score for feature set: {','.join(model_feats_i)}:\t {cv_score}", file=f) # add feature with best performance to feature set max_key = max(scores.items(), key=operator.itemgetter(1))[0] model_features.append(max_key) x_run = full_data.filter(model_features) # resplit data with the appropriate model features X_train, X_test, y_train, y_test = train_test_split(x_run.values, y_data.values, test_size=500, random_state=1991) model_run = linear_model.LinearRegression() model_run.fit(X_train,y_train) # Take the root if it is mean squared error train_score_i = abs(scores[max_key])**(1/2) if score_name == "Mean Sq. Error" else abs(scores[max_key]) train_scores.append(train_score_i) y_pred_test = model_run.predict(X_test) test_score_i = loss_func(y_test,y_pred_test) test_score_i = test_score_i**(1/2) if score_name == "Mean Sq. Error" else test_score_i test_scores.append(test_score_i) print(f"Max Score feature set: {','.join(model_features)}\t {scores[max_key]}\n\n", file=f) feat_copy.remove(max_key) # Plot performance final_scores[score_name] = {"train" : train_scores[-1], "test" : test_scores[-1]} title = "Maximum" if max_flag else "Minimum" title += f" Salary Prediction Performance - {score_name}" fig, ax = plt.subplots() x = range(MAX_FEATS) ax.plot(x, train_scores) ax.plot(x, test_scores) ax.legend([f"Train {score_name}",f"Test {score_name}"]) plt.xlabel("Number of Features") plt.ylabel(f"{score_name}") plt.title(title) fig.savefig(f"output/LR_{cv_scorer_type}_{y_string}.png") # plt.show() with open(f"output/results_{y_string}.txt","w") as results_fp: for score, scores in final_scores.items(): print(score, file=results_fp) for type_set, final_score in scores.items(): print(f"\t{type_set}: {final_score}", file=results_fp) # print(f"TRAIN SCORES: {train_scores}") # print(f"TEST SCORES: {test_scores}") # X_data = data.filter(features) # y_max_data = data.filter(["max_salary"]) # y_min_data = data.filter(["min_salary"]) # print(scores)<file_sep># Readme The code for our models can be found in the following files: - **Data Processing**: `data_process.py` - **Embedding Creation**: `embedding_to_model.py`, `embedding_to_avg_max_model.py`, `word_embeddings.py` - **Linear Regression (manual features)**: `LR.py` - **Linear Regression (TF-IDF)**: `bow_tfidf.py`, `bow_visualizations.ipynb` - **Linear Regression (GloVe)**: `glove_max_avg.ipynb`, `glove_model.ipynb` - **Multi-class SVM**: `SVM_base.py`, `SVM_more_features.py` - **XGBoosted Trees**:`xgboosted_tree.py` - **Gaussian Mixture Models**: `gmm_seniority.py` Additionally, there are various charts and raw output files in the `/output` folder <file_sep>import xgboost as xgb from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV from sklearn import metrics import time import pdb import numpy as np import matplotlib.pyplot as plt def save_result_to_file(filename, dic, rmse_train, rmse_test): f = open(filename,'w') f.write(filename+'\n') f.write('\n') f.write(str(dic)) f.write('\n') f.write('train RMSE: '+ str(rmse_train)+'\n') f.write('test RMSE: '+str(rmse_test)+'\n') f.close() def quickplot(y_train_rmse, y_test_rmse): ### for cv ax = plt.figure() plt.plot(y_train_rmse, 'r-', label='RMSE on train set', linewidth=2) # plt.hold(True) plt.plot(y_test_rmse, 'bo', label='RMSE on test set') ax.legend() filename = './output/xgb_cv_result' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) # plt.show() #tree_runxgb.py def runxgb(x,y,ft): # x_train, x_test, y_train, y_test = train_test_split (x,y, test_size = 0.1) x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=500, random_state=1991) xgb_train = xgb.DMatrix(x_train, label = y_train, feature_names = ft) xgb_train_tester = xgb.DMatrix(x_train, feature_names = ft) xgb_test = xgb.DMatrix(x_test, feature_names=ft) # params = {'max_depth': 5, 'gamma': 0.1, 'seed' : 27, # 'min_child_weight' : 1, 'subsample': 1, 'scale_pos_weight' : 1, # 'lambda': .2, 'eta': .3, 'colsample_bytree': 0.3, # 'silent': 0, 'objective': 'reg:linear', # 'tree_method': 'exact', 'eval_metric': 'rmse'} params = {'max_depth': 5, 'gamma': .1, 'seed' : 27, 'min_child_weight' : .5, 'subsample': .5, 'scale_pos_weight' : .8, 'lambda': .8, 'eta': 0.3, 'colsample_bytree': 0.8, 'silent': 1, 'objective': 'reg:linear', 'tree_method': 'exact', 'eval_metric': 'rmse'} # params = {'max_depth': 15, 'gamma': 0.8, 'seed' : 27, # 'min_child_weight' : 1, 'subsample': .8, # 'scale_pos_weight' : 1, 'lambda': .5, 'eta': .15, # 'colsample_bytree': 0.8, 'silent': 1, 'objective': 'reg:linear', # 'tree_method': 'exact', 'eval_metric': 'rmse'} # params = {'max_depth': 120, 'eta': .8, 'silent': 1, 'objective': 'reg:linear', 'tree_method': 'exact', 'eval_metric': 'rmse'} plst = list(params.items()) # # watchlist = [(xgb_train, 'train'), (xgb_val, 'val')] # num_rounds = 100 start_time = time.time() model = xgb.train(plst, xgb_train) # model = xgb.XGBRegressor(plist) # model.fit(x_train, y_train) # print('took', time.time() - start_time) # pdb.set_trace() print('...training...') start_time = time.time() print('(', time.time() - start_time, 's)') print('--------------------------------------') print('Result tree:', model) # print('--- train results') y_pred_train = model.predict(xgb_train_tester) # y_pred_train= model.predict(x_train) rmse_train = np.sqrt(metrics.mean_squared_error(y_train, y_pred_train)) mse_train = metrics.mean_squared_error(y_train, y_pred_train) print('Train RMSE == ', rmse_train) print('Train MSE == ', mse_train) y_pred = model.predict(xgb_test) # y_pred= model.predict(x_test) rmse = np.sqrt(metrics.mean_squared_error(y_test, y_pred)) mse = metrics.mean_squared_error(y_test, y_pred) print('Test RMSE == ', rmse) print('Test MSE == ', mse) filename = './output/xgb_parm_rmse' + time.strftime("%m%d_%H%M") + '.txt' save_result_to_file(filename, params, rmse_train, rmse) diff_train = np.array((y_train - y_pred_train)) diff_test = np.array((y_test - y_pred)) cv_results = GridSearchCV(model, params, n_jobs=1, scoring='rmse', refit=True) # pdb.set_trace() # cv_results = xgb.cv(dtrain=xgb_train, params = params, nfold = 5, num_boost_round=500, early_stopping_rounds = 50, metrics='rmse', seed=123) # train_val = cv_results['train-rmse-mean'].tail(1) # test_val = cv_results['test-rmse-mean'].tail(1) # # print('CV result, train RMSE', str(train_val)) # print('CV result, test RMSE', str(test_val)) # f=open(filename, "a+") # f.write('CV result, train RMSE: '+ str(train_val)+'\n') # f.write('CV result, test RMSE: '+str(test_val)+'\n') # y2 = list(cv_results['test-rmse-mean']); y1 = list(cv_results['train-rmse-mean']) # quickplot(y1, y2) return rmse, model, [diff_train, diff_test], filename <file_sep>#tree_evaluation.py import pandas as pd import numpy as np from sklearn import metrics import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix import pdb from sklearn import tree from plot_confusion_matrix import plot_confusion_matrix ##can optimize this to numpy but it works so i'm going to leave it def mask(df, key, value): # print(df[key] > value) return df[np.abs(df[key]) > value] def reg_eval(reg_tree, y_test, y_pred): rmse = np.sqrt(metrics.mean_squared_error(y_test, y_pred)) # print('Mean Absolute Error: ', metrics.mean_absolute_error(y_test, y_pred)) # print('Mean Squared Error: ', metrics.mean_squared_error(y_test, y_pred)) print('Root Mean Squared Error: ', rmse) print('') # print('============================== RESULT ===============================') #########finding assholes with biggest errors, fyi # diff = pd.DataFrame({'diff' : (y_test - y_pred)}) diff = np.array((y_test - y_pred)) # pd.DataFrame.mask = mask # big_errors = diff.mask('diff', 80000) # pick out the ones with errors bigger than 80000 # print('your big errors culprits:') # print(big_errors) # for y_test plt.figure() plt.scatter(range(0,np.shape(diff)[0]),diff, s=1) plt.xlabel('Distribution of y- y_pred Error') plt.ylabel('prediction error') # filename = './output/regressor_result.png' # plt.savefig(filename) plt.show() # # big_errors.index.tolist() # # # # dope graphics -- NEED LABELS # dot_data = tree.export_graphviz(reg, feature_names = labels, # filled=True, # special_characters=True) # graph = graphviz.Source(dot_data) # graph.format = 'png' # # graph = pydotplus.graph_from_dot_data(dot_data) # # graph.render("./output/salary-predict", view=True) #plt.show return rmse def clf_eval(clf_tree, y_test, y_pred): acc_score =accuracy_score(y_test, y_pred) # print('accuracy score (train set): {}'.format(accuracy_score(y_train, y_pred_train_clf))) print('accuracy score (test set): {}'.format(acc_score)) # cnf_matrix = confusion_matrix(y_test_np, y_test_np) cnf_matrix = confusion_matrix(y_test, y_pred) # pdb.set_trace() plt.figure() plt.matshow(cnf_matrix) plt.title('Confusion matrix of the classifier') plt.colorbar() filename = './output/confusion_matrix.png' plt.savefig(filename) return acc_score <file_sep>import csv ##bread and butter packages import pdb import pandas as pd import numpy as np import math import matplotlib.pyplot as plt #for tree: from sklearn import tree from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor #for data visualization & result analysis from sklearn import metrics from sklearn.metrics import accuracy_score from sklearn.metrics import confusion_matrix # import pydot, pydotplus import graphviz from plot_confusion_matrix import plot_confusion_matrix from tree_evaluation import reg_eval, clf_eval from rf_tune import * def random_forest_reg(x_train, y_train, x_test, y_test, num_estimator=20, min_samples_split =2, max_depth = None, max_features = 'auto', random=1,tune=False): reg = RandomForestRegressor(n_estimators = num_estimator, random_state= random, max_depth = max_depth, min_samples_split = min_samples_split, max_features = max_features) # print('=================Baseline performance===============') reg.fit(x_train, y_train) print("on train set::") y_pred_train = reg.predict(x_train) reg_eval(reg, y_train.values.ravel(), y_pred_train) print("on test set::") y_pred_reg = reg.predict(x_test) y_test_reg = y_test.values.ravel() # pdb.set_trace() # result = pd.DataFrame({'Actual': y_test, 'Predicted': y_pred_reg}) reg_eval(reg, y_test_reg, y_pred_reg) if tune == True: print('Tuning...') find_n_estimators('reg', reg, x_train, x_test, y_train, y_test) find_max_depth('reg', reg, x_train, x_test, y_train, y_test) find_min_sample_split('reg', reg, x_train, x_test, y_train, y_test) find_max_features('reg', reg, x_train, x_test, y_train, y_test) # dot_data = tree.export_graphviz(reg, feature_names = labels, # filled=True, # special_characters=True) # graph = graphviz.Source(dot_data) # graph.format = 'png' # graph = pydotplus.graph_from_dot_data(dot_data) # graph.render("./output/salary-predict", view=True) #plt.show # # dope graphics # dot_data = StringIO()t_file=dot_data) # graph = pydot.graph_from_dot_data(dot_data.getvalue()) # graph.write_pdf("graph.pdf") # pdb.set_trace() # pdb.set_trace() def random_forest_clf(x_train, y_train, x_test, y_test, num_estimator=20, min_samples_split =2, max_depth = None, max_features = 'auto', random=1,tune=False): clf = RandomForestClassifier(n_estimators = num_estimator, random_state= random, max_depth = max_depth, min_samples_split = min_samples_split, max_features = max_features) clf.fit(x_train, y_train) # print('============BASELINE=======') print("on train set::") y_pred_train = clf.predict(x_train) clf_eval(clf, y_train.values.ravel(), y_pred_train.ravel()) print("on test set::") y_pred_clf = clf.predict(x_test) # y_test_clf = y_test.values.ravel() clf_eval(clf, y_test.values.ravel(), y_pred_clf.ravel()) # pdb.set_trace() # result = pd.DataFrame({'Actual': y_test, 'Predicted': y_pred_clf}) if tune == True: print('Tuning...') find_n_estimators('clf', clf, x_train, x_test, y_train, y_test) find_max_depth('clf', clf, x_train, x_test, y_train, y_test) find_min_sample_split('clf', clf, x_train, x_test, y_train, y_test) find_max_features('clf', clf, x_train, x_test, y_train, y_test) # pass <file_sep>import csv import pdb import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC, SVC, SVR from sklearn.metrics import accuracy_score df = pd.read_csv('data/train_data_with_salary_buckets.csv') print("Num datapoints: " + str(len(df))) ##filter out low salaries df = df[ (df.min_salary > 40000) & (df.max_salary > 40000) ] print("Num datapoints after removing low salaries: " + str(len(df))) ##filter out companies with no average size df = df[ df.avg_size.notnull() ] print("Num datapoints after no num employees: " + str(len(df))) df_XforSVM = df.filter(['is_acquired', 'is_public', 'remote_ok', 'NYC', \ 'LA', 'SF', 'SEA', 'senior', 'back_end', 'full_stack', 'front_end', 'avg_size'], axis=1) df_YforSVM = df.filter(['salary_bucket'], axis=1 ) clf = LinearSVC(random_state=0, tol=1e-5, max_iter=10000) X_train, X_test, Y_train, Y_test = train_test_split( df_XforSVM.values, df_YforSVM.values.ravel() , test_size=0.05) clf.fit(X_train, Y_train) #Let's also try on a different type of svm with rbf kernel rbf_clf = SVC(gamma = 'scale') rbf_clf.fit(X_train,Y_train) ##Let's try testing this: Y_test_pred = clf.predict(X_test) Y_test_rbf = rbf_clf.predict(X_test) #See how correct you are: test_perf = accuracy_score(Y_test, Y_test_pred) test_perf_rbf = accuracy_score(Y_test, Y_test_rbf) print("Linear Performance on test set: " + str(test_perf) ) print("RBF Performance on test set: " + str(test_perf_rbf) ) #Performance on train set Y_train_pred = clf.predict(X_train) train_perf = accuracy_score(Y_train, Y_train_pred) Y_train_pred_rbf = rbf_clf.predict(X_train) train_perf_rbf = accuracy_score(Y_train, Y_train_pred_rbf) print("Linear performance on train set: " + str(train_perf) ) print("RBF performance on train set: " + str(train_perf_rbf) ) #Lets take a look at what's being predicted; i.e. where am I doing poorly? #pdb.set_trace() df_results = pd.DataFrame( {'ytrain': Y_train, 'ypred' : Y_train_pred} ) df_count = df_results.groupby(df_results.columns.tolist()).size().reset_index().rename(columns={0:'count'}) ybase = df_count['ytrain'] ypd = df_count['ypred'] ypairs = list(zip(ybase, ypd)) plt.clf() y_pos = np.arange(len(ypairs)) plt.bar( y_pos, df_count['count'] ) plt.xticks(y_pos, ypairs ) plt.xticks(rotation=90) plt.xlabel("Pair (true_class,predicted_class)") plt.ylabel("Count") plt.title("Error Analysis for Multi-Class SVM") #plt.savefig("SVM_error_analysis") plt.show() ##Notes: #Only predicting really into 3 classes for anything 0,3,4,6 and sometimes 8. #does that mean I should try fewer buckets? #1) try to incorporate company size; filter out cases with no size print("Done!") <file_sep>import pickle import csv import pdb import re from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import LinearRegression, Ridge, Lasso, LassoCV from sklearn.model_selection import train_test_split from sklearn.metrics import mean_absolute_error, mean_squared_error, median_absolute_error, r2_score dataset_dictionary = {} header_index = {} #seed_val = 126 seed_val = 146 #datatype = ["int", "int", "str", "str", "str", "int", "int", "str", "str", "str", "int", "int", "bool", "bool", "str", "str", "bool", "int", "str", "str"] catch_outlier = True with open('data/train.csv') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',' ) line_count = 0 for row in csv_reader: if line_count == 0: print(f'Column names are {", ".join(row)}') for header in range(0, len(row)): dataset_dictionary[row[header]] = [] header_index[header] = row[header] line_count += 1 else: ##lets skip points with salary range at 0 if row[0] == "0" or row[1] == "0" or row[0] == "" or row[1] == "": continue if catch_outlier: if row[0] == "49000000": print("Saw crazy it outlier") row[0] = "49000" row[1] = "49000" for i in range(0, len(row)): dataset_dictionary[ header_index[i] ].append(row[i]) line_count += 1 ##now lets concatenate all the words we care about for a particular job posting #job title, seniority, address, skills, roles, industries, stage ## then I'll make words for "is_public, is_acquired, and remote_ok" based on T/F values for i in range(len(dataset_dictionary["address"])): dataset_dictionary["address"][i] = dataset_dictionary["address"][i].replace(" ", "_") dataset_dictionary["avg_salary"] = [] for i in range(len(dataset_dictionary["min_salary"])): avg = ( float(dataset_dictionary["min_salary"][i]) + float(dataset_dictionary["max_salary"][i] ) ) / 2 dataset_dictionary["avg_salary"].append(avg) dataset_processed = zip( dataset_dictionary["job_title"], dataset_dictionary["seniority"], dataset_dictionary["address"], dataset_dictionary["skills"], dataset_dictionary["roles"], dataset_dictionary["industries"], dataset_dictionary["stage"] ) # ('Linux C Developer', 'regular', 'Salt Lake City_UT_USA', 'artificial_intelligence,deep_learning,machine_learning,linux,c,embedded', 'developer', 'consumer_electronics,aerospace,software,drones', '') dataset_merged = [] for record in dataset_processed: ##got a tuple, now iterate through all its values new_list = [] for t in record: tlist = t.split(",") tlist = [val for val in tlist if val != ''] new_list.extend(tlist) dataset_merged.append(new_list) for i in range(len(dataset_merged)): job_desc = dataset_merged[i][0] job_desc = job_desc.replace("/", " ") job_desc = job_desc.replace("(", " ") job_desc = job_desc.replace(")", " ") job_desc = job_desc.lower() job_desc = re.sub(r'back[\s-]end', "backend", job_desc) job_desc = re.sub(r'front[\s-]end', "frontend", job_desc) ##fix front end and backend cleaned_desc = job_desc.split(" ") del dataset_merged[i][0] new_list = cleaned_desc + dataset_merged[i] dataset_merged[i] = new_list for i in range(len(dataset_merged)): pub = dataset_dictionary["is_public"][i] acq = dataset_dictionary["is_acquired"][i] remote = dataset_dictionary["remote_ok"][i] if pub == "True": dataset_merged[i].append("is_pub") elif pub == "False": dataset_merged[i].append("isnt_pub") if acq == "True": dataset_merged[i].append("is_acq") elif acq == "False": dataset_merged[i].append("isnt_acq") if remote == "True": dataset_merged[i].append("is_remote") elif remote == "False": dataset_merged[i].append("isnt_remote") dataset_strings = [] for i in range(len(dataset_merged)): dataset_strings.append( " ".join(dataset_merged[i]) ) ##lets output our dataset strings to a pickled file so we have it for later dataset_to_out = [] for i in range(len(dataset_strings)): min_sal = float(dataset_dictionary["min_salary"][i]) max_sal = float(dataset_dictionary["max_salary"][i]) avg_sal = (max_sal + min_sal) / 2 my_tup = (min_sal, max_sal, avg_sal, dataset_strings[i]) dataset_to_out.append(my_tup) pickle.dump(dataset_to_out, open("string_records.p", "wb")) vectorizer = TfidfVectorizer() X = vectorizer.fit_transform(dataset_strings) #print(vectorizer.get_feature_names() ) print(X.shape) ##train test split salary_options = ["avg_salary", "min_salary", "max_salary"] salary_model_data = {} ##convert min and max salaries to floats for sal_in in range(len(dataset_dictionary["min_salary"])): dataset_dictionary["min_salary"][sal_in] = float( dataset_dictionary["min_salary"][sal_in] ) dataset_dictionary["max_salary"][sal_in] = float( dataset_dictionary["max_salary"][sal_in] ) for el in salary_options: X_train, X_test, y_train, y_test = train_test_split( X, dataset_dictionary[el] , random_state=seed_val, test_size=250) salary_model_data[el] = {} salary_model_data[el]["X_train"] = X_train salary_model_data[el]["X_test"] = X_test salary_model_data[el]["y_train"] = y_train salary_model_data[el]["y_test"] = y_test #salary_model_data[el]["regressor"] = LinearRegression(fit_intercept=True) #salary_model_data[el]["regressor"] = Ridge(fit_intercept=True) #salary_model_data[el]["regressor"] = Lasso(max_iter=5000, alpha=1.0, fit_intercept=True) salary_model_data[el]["regressor"] = LassoCV(cv=20, max_iter=5000, fit_intercept=True) for el in salary_options: salary_model_data[el]["regressor"].fit( X=salary_model_data[el]["X_train"], \ y=salary_model_data[el]["y_train"] ) ##Calculate how good the model is for el in salary_options: #mean_absolute_error, mean_squared_error, median_absolute_error, r2_score y_pred = salary_model_data[el]["regressor"].predict( salary_model_data[el]["X_test"] ) y_true = salary_model_data[el]["y_test"] y_pred_train = salary_model_data[el]["regressor"].predict( salary_model_data[el]["X_train"] ) y_true_train = salary_model_data[el]["y_train"] datasets = [ ("test", y_pred, y_true), ("train", y_pred_train, y_true_train) ] for d in datasets: salary_model_data[el]["MSE_"+d[0]] = mean_squared_error(d[2], d[1]) salary_model_data[el]["MAE_"+d[0]] = mean_absolute_error(d[2], d[1]) salary_model_data[el]["MEDAE_"+d[0]] = median_absolute_error(d[2], d[1]) salary_model_data[el]["r2_"+d[0]] = r2_score(d[2], d[1]) metric_names = ["MSE", "MAE", "MEDAE", "r2"] dataset_names = ["_test", "_train"] for el in salary_options: print("Summary data for " + str(el) + " model ") for m in metric_names: print(m + ":") for d in dataset_names: print(d + ": " + str(salary_model_data[el][m+d])) print("Done reading in.") <file_sep>import pickle import pdb import pandas as pd import pdb import re df = pd.read_csv('data/cleaned_data_ENG.csv') ##munge the job title column df['job_title'] = df['job_title'].str.lower() df['job_title'] = df['job_title'].str.replace('software engineer', 'softwarengineer') df['job_title'] = df['job_title'].str.replace('machine learning', 'machinelearning') df['job_title'] = df['job_title'].str.replace('front end', 'frontend') df['job_title'] = df['job_title'].str.replace('front-end', 'frontend') df['job_title'] = df['job_title'].str.replace('back end', 'backend') df['job_title'] = df['job_title'].str.replace('back-end', 'backend') df['job_title'] = df['job_title'].str.replace('/', ' ') df['job_title'] = df['job_title'].str.replace('(', ' ') df['job_title'] = df['job_title'].str.replace(')', ' ') df['job_title'] = df['job_title'].str.replace('-', '') df['job_title'] = df['job_title'].str.replace(':', '') df['job_title'] = df['job_title'].str.replace(',', ' ') ##munge the address df["address"].replace( to_replace="^([a-zA-Z\s]+)_.+", value=r"\1", regex=True, inplace=True) df["address"].replace( to_replace="\s+", value="", regex=True, inplace=True) df["address"] = df["address"].str.lower() ##fix the skills column df["skills"].replace( to_replace="_", value="", regex=True, inplace=True ) df["skills"].replace( to_replace=",", value=" ", regex=True, inplace=True ) ##fix the roles column df["roles"].replace( to_replace="_", value="", regex=True, inplace=True ) df["roles"].replace( to_replace=",", value=" ", regex=True, inplace=True ) ##fix the industries column df["industries"].replace( to_replace="health_care", value="healthcare", regex=True, inplace=True ) df["industries"].replace( to_replace="social_media", value="socialmedia", regex=True, inplace=True ) df["industries"].replace( to_replace="big_data", value="bigdata", regex=True, inplace=True ) df["industries"].replace( to_replace="real_estate", value="realestate", regex=True, inplace=True ) df["industries"].replace( to_replace="machine_learning", value="machinelearning", regex=True, inplace=True ) df["industries"].replace( to_replace="finance_technology", value="fintech", regex=True, inplace=True ) df["industries"].replace( to_replace="_and_", value=" and ", regex=True, inplace=True ) df["industries"].replace( to_replace="artificial_intelligence", value="ai", regex=True, inplace=True ) df["industries"].replace( to_replace="-", value="", regex=True, inplace=True ) df["industries"].replace( to_replace=",", value=" ", regex=True, inplace=True ) df["industries"].replace( to_replace="_", value=" ", regex=True, inplace=True ) ##Create new columns for acquired and public df["acquired_string"] = df.apply(lambda row: "acquired" if row.is_acquired == True else "not acquired" , axis=1) df["acquired_string"] = df.apply(lambda row: "acquired" if row.is_acquired == True else "" , axis=1) df["public_string"] = df.apply(lambda row: "public-company" if row.is_public == True else "" , axis=1) df["remote_string"] = df.apply(lambda row: "work-from-home" if row.remote_ok == True else "" , axis=1) #look at funding df["stage"].replace( to_replace="([A-Za-z])\sRound", value=r"Series\1", regex=True, inplace=True ) df["stage"].replace( to_replace="Pre Seed", value="pre-seed", regex=True, inplace=True ) df["stage"].replace( to_replace="Late Stage", value="late-stage", regex=True, inplace=True ) dataset_name = "./data/data_for_glove_embeddings_ENG.csv" df.to_csv(dataset_name) print("Cleaned dataset output as " + dataset_name) <file_sep>import pickle import pandas as pd import pdb import csv import math import numpy as np GLOVE_SIZE = 300 df = pd.read_csv('data/data_for_glove_embeddings_ENG.csv') print("Num records: " + str(len(df))) df_small = df[["job_title", "address", "skills", "roles", "industries", "acquired_string", "public_string", "remote_string", "stage" ]] df_small = df_small.fillna(value="N/A") list_of_data = df_small.values.tolist() list_of_tups = [] df_sals = df[["min_salary", "max_salary"]] list_of_sals = df_sals.values.tolist() glove_data_file = "./glove/glove.840B.300d.txt" words = pd.read_table(glove_data_file, sep=" ", index_col=0, header=None, quoting=csv.QUOTE_NONE) def vec(w): try: x = np.array(words.loc[w].values) except KeyError: x = np.zeros((GLOVE_SIZE,)) return x embedding_matrix = np.zeros( (len(list_of_data), GLOVE_SIZE ) ) for l in range(len(list_of_data)): print("Starting on example " + str(l) ) list_filtered = [x for x in list_of_data[l] if x != "N/A"] single_embed = np.zeros( (len(list_filtered), GLOVE_SIZE) ) for xi,x in enumerate(list_filtered): all_words = x.split(" ") word_embed = np.zeros( (len(all_words), GLOVE_SIZE) ) for i,w in enumerate(all_words): word_embed[i,:] = vec(w) avg_word_embed = np.mean(word_embed, axis=0) single_embed[xi,:] = avg_word_embed embedding_matrix[l,:] = np.amax(single_embed , axis=0) matrix_output = "./data/glove_embeddings_avg_max_ENG.mat" np.save( matrix_output, embedding_matrix ) salary_info = [] for i in range(len(list_of_sals)): sal_info_tup = (list_of_sals[i][0], list_of_sals[i][1] ) salary_info.append(sal_info_tup) salary_output = "./data/glove_embedding_salinfo_avg_max_ENG.pkl" pickle.dump( salary_info, open( salary_output, "wb") ) print("Done") <file_sep>#tree_brute_force_tokenization.py import csv import pdb import pandas as pd import numpy as np import collections import math import sys from nltk import word_tokenize import scipy.sparse as sp from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfVectorizer def preprocess(): #adapted from Jen's data_process.py df = pd.read_csv('../data/train.csv') NUM_SKILLS = 15 ##Filter out positions where min salary is 0 and where max salary is 0 print("Original data size") print(len(df)) df = df[df.min_salary != 0] df = df[df.min_salary.notnull()] print("Filtered out min salary zero or missing. New size " + str(len(df)) ) df = df[df.max_salary != 0] df = df[df.max_salary.notnull()] print("Filtered out max salary zero or missing. New size " + str(len(df)) ) ##Filter out non-engineering or developer roles df = df[df['job_title'].str.contains("engineer") | df['job_title'].str.contains("Engineer") \ | df['job_title'].str.contains("developer") | df['job_title'].str.contains("Developer")] print("Filtered out non-engineering roles. New size " + str(len(df)) ) #write out new dataset dataset_name = './output/processed_data.csv' df.to_csv(dataset_name) print("Cleaned dataset output as " + dataset_name) def vectorize(x, lab): print('CURRENTLY USING DUMB VECTORIZATION') return_x = pd.DataFrame() # d = collections.defaultdict(lambda: 0) feature_set = set() # pdb.set_trace() for i in range(0,x.shape[0]): temp_set = set(x[lab][i]) feature_set = feature_set.union(temp_set) # pdb.set_trace() feature_set.remove('.') feature_set.remove(':') # set.remove('\'s') print('adding ', len(feature_set), ' new features: ') feature_dict = dict.fromkeys(list(feature_set)) feature_dict.update((k,0) for k in feature_set) # pdb.set_trace() for key in feature_dict: print(key) for j in range(x.shape[0]): return_x[key] = pd.Series([0] * x.shape[0]) if key in x[lab][j]: return_x[key][j] +=1 return return_x def count_vectorize(x, lab): #build corpus: corpus = [] for j in range(x.shape[0]): corpus.append(x[lab][j]) vectorizer = CountVectorizer() encoded_x = vectorizer.fit_transform(corpus) feat_names = vectorizer.get_feature_names() #add label at the end of the feature name to prevent duplicates for i in range(len(feat_names)): feat_names[i] = feat_names[i] + '_' + lab # pdb.set_trace() return encoded_x, feat_names # pdb.set_trace() # print(X.toarray()) # [[0 1 1 1 0 0 1 0 1] # [0 2 0 1 0 1 1 0 1] # [1 0 0 1 1 0 1 1 1] # [0 1 1 1 0 0 1 0 1]] def tfidf_vectorize(x, lab): tfidf = TfidfVectorizer() corpus = [] for j in range(x.shape[0]): corpus.append(x[lab][j]) encoded_x = tfidf.fit_transform(corpus) feat_names = tfidf.get_feature_names() # pdb.set_trace() #add label at the end of the feature name to prevent duplicates for i in range(len(feat_names)): feat_names[i] = feat_names[i] + '_' + lab return encoded_x, feat_names def tokenize(x): print('=========TOKENIZING YOUR DATA===========') labels = list(x) feature_names = [] result_x = sp.csr_matrix((x.shape[0],1)) for lab in labels: idx= x[lab].first_valid_index() if type(x[lab][idx]) == str: print('updating ', lab) x[lab] = x[lab].fillna('N/A') if lab == 'address': x[lab] = x[lab].str.split(pat='_') x[lab] = x[lab].str.join(' ') # this_x = vectorize(x,lab) # x_part, feat_part= count_vectorize(x, lab) x_part, feat_part= tfidf_vectorize(x, lab) elif lab == 'job_title' or lab=='company_description': x[lab] = x[lab].apply(word_tokenize) x[lab] = x[lab].str.join(' ') # this_x = vectorize(x,lab) # x_part, feat_part= count_vectorize(x, lab) x_part, feat_part= tfidf_vectorize(x, lab) # pdb.set_trace() else: x[lab] = x[lab].str.split(pat=',') x[lab] = x[lab].str.join(' ') # this_x = vectorize(x,lab) # x_part, feat_part= count_vectorize(x, lab) x_part, feat_part= tfidf_vectorize(x, lab) # dict_list.append(d) # pdb.set_trace() # return_x = pd.concat([return_x, this_x], axis=1, sort=False) # result_x = sp.hstack([result_x, x_part]) else: x[lab] = x[lab].fillna(0.0) print('NOT updating ', lab) x_part = np.expand_dims(x[lab].values, axis=1) feat_part = [lab] # pdb.set_trace() result_x = sp.hstack([result_x, x_part]) feature_names.extend(feat_part) # pdb.set_trace() result_x= sp.lil_matrix(sp.csr_matrix(result_x)[:,1:]) return result_x, feature_names def hand_picked_x(x, feature_names, filename): build = sp.csr_matrix((x.shape[0],1)) new_feature_names = [] f = open(filename,'r') linecount = 0 for line in f: linecount +=1 keyword = line[:-1] new_feature_names.append(keyword) here=feature_names.index(keyword) # pdb.set_trace() # out1 = x.tocsc()[here,here+1] # pdb.set_trace() build=sp.hstack([build,x[:,here]]) # pdb.set_trace() print(linecount) return sp.lil_matrix(sp.csr_matrix(build)[:,1:]), new_feature_names <file_sep>import xgboost as xgb import pandas as pd import numpy as np import pdb import nltk from nltk import * from tree_brute_force_tokenization import tokenize, hand_picked_x from tree_runxgb import runxgb from tree_extreme_plots import plotty_plots """ specify what you'd like to train the data on: """ WANT = 'max_salary' # WANT = 'min_salary' NOT_WANT = 'min_salary' # NOT_WANT = 'max_salary' data = pd.read_csv('./output/processed_data.csv') data = data.drop(['Unnamed: 0', NOT_WANT, 'coolness_reasons', 'job_description', 'company_description'], axis=1) # data = data.fillna('N/A') print('XGBoost for ', WANT) print('dropped company description') y = data[WANT] raw_x = data.drop([WANT], axis=1) labels = list(raw_x) # additional data processing x, feature_names = tokenize(raw_x) x, feature_names = hand_picked_x(x, feature_names, './output/most_important1213_1115.txt') # pdb.set_trace() rmse, model, diff, filename = runxgb(x,y,feature_names) # cver.fit(x, y) plotty_plots(diff, model, filename) # dtrain = xgb.DMatrix('./data') <file_sep>from sklearn.mixture import GaussianMixture from sklearn.model_selection import train_test_split, cross_val_score import pandas as pd from statistics import mean import sys import operator import os import matplotlib.pyplot as plt import altair as alt MAX_FEATS = 10 full_data = pd.read_csv('./output/cleaned_data_better.csv') COLORS = ['tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', 'tab:pink', 'tab:brown', 'tab:gray', 'tab:olive', 'tab:cyan'] all_columns = list(full_data.columns) def plot_gmm_preds(x, z, predictions): """Plot GMM predictions on a 2D dataset `x` with labels `z`. Write to the output directory, including `plot_id` in the name, and appending 'ss' if the GMM had supervision. """ plt.figure(figsize=(12, 8)) plt.title('{} GMM'.format('Predictions' if predictions else 'Actual')) plt.xlabel('max_salary') plt.ylabel('min_salary') for x_1, x_2, z_ in zip(x[:, 0], x[:, 1], z): color = 'gray' if z_ < 0 else COLORS[int(z_)] alpha = 0.25 if z_ < 0 else 0.75 plt.scatter(x_1, x_2, marker='.', c=color, alpha=alpha) file_name = 'gmm_4class_{}.pdf'.format('predictions' if predictions else 'actual') save_path = os.path.join('output', file_name) plt.savefig(save_path) # features = ['is_acquired', 'is_public', 'remote_ok', 'NYC', \ # 'LA', 'SF', 'SEA', 'senior', 'back_end', 'full_stack', 'front_end','total_investments'] num_distros = 0 y_cols = [] for column in all_columns: if "gmm_" in column: num_distros += 1 y_cols.append(column) # print(num_distros) gmm = GaussianMixture(n_components=num_distros) features = ["max_salary", "min_salary"] X = full_data.filter(features) # for feature in features: # max_mean = X[feature].mean() # max_std = X[feature].std() # X[feature] = (X[feature] - max_mean) / max_std y = full_data.filter(y_cols).values y_indexed = [y_i.tolist().index(True) for y_i in y] X_train, X_test, y_train, y_test = train_test_split(X.values, y_indexed, test_size=0.15, random_state=1) gmm.fit(X_train) y_pred = gmm.predict(X_test) plot_gmm_preds(X_test, y_pred, True) plot_gmm_preds(X_test, y_test, False) # plot_gmm_preds(X_train, y_train, False) # for idx, pred in enumerate(y_pred): # print(f"PREDICTION: {pred}\nTRUE VALUE:{y_test[idx]}") # if idx > 10: # break <file_sep>import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv('data/cleaned_data.csv') #figure out salary buckets min_sal_sorted_df = df.sort_values(by=['min_salary']) max_sal_sorted_df = df.sort_values(by=['max_salary']) plt.plot(min_sal_sorted_df['min_salary'].tolist(), 'bo') plt.plot(max_sal_sorted_df['max_salary'].tolist(), 'ro') plt.show() plt.savefig("salary_scurve.png") plt.clf() print("Lets clear out giant outlier.") min_sal_sorted_df = min_sal_sorted_df[ min_sal_sorted_df.min_salary < 500000 ] max_sal_sorted_df = max_sal_sorted_df[ max_sal_sorted_df.min_salary < 500000 ] plt.plot(min_sal_sorted_df['min_salary'].tolist(), 'bo') plt.plot(max_sal_sorted_df['max_salary'].tolist(), 'ro') plt.xlabel('Job Listings (sorted by Salary)') plt.ylabel('Salary ($)') plt.title('S-curve of job listings and salary') plt.legend(["MinSalary", "MaxSalary"] ) plt.show() # <file_sep>import pandas as pd import pdb df = pd.read_csv('data/cleaned_data.csv') df = df[ (df.min_salary > 40000) & (df.max_salary > 40000) ] df.to_csv('data/low_salaries_removed.csv') <file_sep>import csv import pdb import pandas as pd import numpy as np import math import sys df = pd.read_csv('../data/train.csv') NUM_SKILLS = 15 ##Filter out positions where min salary is 0 and where max salary is 0 print("Original data size") print(len(df)) df = df[df.min_salary != 0] df = df[df.min_salary.notnull()] print("Filtered out min salary zero or missing. New size " + str(len(df)) ) df = df[df.max_salary != 0] df = df[df.max_salary.notnull()] print("Filtered out max salary zero or missing. New size " + str(len(df)) ) ##Filter out non-engineering or developer roles df = df[df['job_title'].str.contains("engineer") | df['job_title'].str.contains("Engineer") \ | df['job_title'].str.contains("developer") | df['job_title'].str.contains("Developer")] print("Filtered out non-engineering roles. New size " + str(len(df)) ) <<<<<<< HEAD # # def bay_area_filter(row): # found = False # found |= 'San Francisco' in row.address # found |= 'Menlo Park' in row.address # found |= 'Palo Alto' in row.address # found |= 'Mountain View' in row.address # found |= 'Redwood City' in row.address # return found # # #Create New Columns for geographies # df['NYC'] = df.apply(lambda row: 'New York' in row.address, axis=1) # df['LA'] = df.apply(lambda row: 'Los Angeles' in row.address, axis=1) # df['SF'] = df.apply(bay_area_filter, axis=1) # df['SEA'] = df.apply(lambda row: 'Seattle' in row.address, axis=1) # # ##Create binary variable for seniority # df['senior'] = df.apply(lambda row: row.seniority == 'senior' or row.seniority == 'staff', axis=1) # # ##Create binary variable for each seniority bucket # seniority_types = df.seniority.unique() # for seniority in seniority_types: # df[f"seniority_{seniority}"] = df.apply(lambda row: row.seniority == seniority, axis=1) # # ##Create binary variable for each skill type # skill_types = df.skills.unique() # skills = [] # for skill in skill_types: # if type(skill) is float: # continue # skills.extend(skill.split(",")) # # skills = list(set(skills)) # skill_counts = {skill:0 for skill in skills} # # for idx, row in df.iterrows(): # if type(row.skills) is float: # continue # for skill in row.skills.split(","): # skill_counts[skill] +=1 # # # sorted_skills = [item[0] for item in sorted(skill_counts.items(), key=lambda x: x[1], reverse=True)] # # # sorted_skills = sorted_skills[:NUM_SKILLS] # # for skill in sorted_skills: # df[f"skills_{skill}"] = df.apply(lambda row: skill in str(row.skills), axis=1) ======= def bay_area_filter(row): found = False found |= 'San Francisco' in row.address found |= 'Menlo Park' in row.address found |= 'Palo Alto' in row.address found |= 'Mountain View' in row.address found |= 'Redwood City' in row.address return found #Create New Columns for geographies df['NYC'] = df.apply(lambda row: 'New York' in row.address, axis=1) df['LA'] = df.apply(lambda row: 'Los Angeles' in row.address, axis=1) df['SF'] = df.apply(bay_area_filter, axis=1) df['SEA'] = df.apply(lambda row: 'Seattle' in row.address, axis=1) ##Create binary variable for seniority df['senior'] = df.apply(lambda row: row.seniority == 'senior' or row.seniority == 'staff', axis=1) ##Create binary variable for each seniority bucket seniority_types = df.seniority.unique() seniority_counts = {} for seniority in seniority_types: df[f"seniority_{seniority}"] = df.apply(lambda row: row.seniority == seniority, axis=1) s = f"seniority_{seniority}" print(f"{seniority}: {df[s].sum()}") ##Seniority categories for GMM gmm_seniority = {} gmm_seniority["junior"] = ["junior","intern"] gmm_seniority["regular"] = ["regular"] gmm_seniority["senior"] = ["senior","staff","manager"] gmm_seniority["executive"] = ["director","vp","cxo"] for category, group in gmm_seniority.items(): df[f"gmm_{category}"] = df.apply(lambda row: row.seniority in group, axis=1) ##Create binary variable for each skill type skill_types = df.skills.unique() skills = [] for skill in skill_types: if type(skill) is float: continue skills.extend(skill.split(",")) skills = list(set(skills)) skill_counts = {skill:0 for skill in skills} for idx, row in df.iterrows(): if type(row.skills) is float: continue for skill in row.skills.split(","): skill_counts[skill] +=1 sorted_skills = [item[0] for item in sorted(skill_counts.items(), key=lambda x: x[1], reverse=True)] sorted_skills = sorted_skills[:NUM_SKILLS] for skill in sorted_skills: df[f"skills_{skill}"] = df.apply(lambda row: skill in str(row.skills), axis=1) >>>>>>> e20d5e0fe2dd946acea04d20645fb228d226f44a ##first replace any NaN values in this column; instead put in string "N/A" # values = {'roles' : "N/A"} # df = df.fillna(value=values) # values = {'stage': 'N/A'} # # # ##Create binary variable for full_stack, back_end, front_end # df['back_end'] = df.apply(lambda row: 'back_end' in row.roles, axis=1) # df['full_stack'] = df.apply(lambda row: 'full_stack' in row.roles, axis=1) # df['front_end'] = df.apply(lambda row: 'front_end' in row.roles, axis=1) # # ##Create a column for average company size # #define function to compute average # def avg_size(row): # if math.isnan(row.max_size) or math.isnan(row.min_size): # return float('nan') # else: # return ((row.max_size)+(row.min_size) ) / 2 #apply function to dataframe # df['avg_size'] = df.apply(avg_size, axis=1) #####Todo: feature scaling for faster convergence #write out new dataset dataset_name = './output/processed_data.csv' df.to_csv(dataset_name) print("Cleaned dataset output as " + dataset_name) <file_sep>import pickle import pandas as pd import pdb import csv import math import numpy as np GLOVE_SIZE = 300 df = pd.read_csv('data/data_for_glove_embeddings_ENG.csv') print("Num records: " + str(len(df))) df_small = df[["job_title", "address", "skills", "roles", "industries", "acquired_string", "public_string", "remote_string", "stage" ]] df_small = df_small.fillna(value="N/A") list_of_data = df_small.values.tolist() list_of_tups = [] df_sals = df[["min_salary", "max_salary"]] list_of_sals = df_sals.values.tolist() for l in range(len(list_of_data)): list_filtered = [x for x in list_of_data[l] if x != "N/A"] string_joined = " ".join(list_filtered) string_joined = string_joined.lower() tup = ( list_of_sals[l][0], list_of_sals[l][1], string_joined ) list_of_tups.append(tup) #let's create an embedding matrix per row maxlen = -1 for l in list_of_tups: words = len(l[2].split()) if words > maxlen: maxlen = words embedding_matrix = np.zeros( (len(list_of_tups), maxlen, GLOVE_SIZE ) ) glove_data_file = "./glove/glove.840B.300d.txt" words = pd.read_table(glove_data_file, sep=" ", index_col=0, header=None, quoting=csv.QUOTE_NONE) def vec(w): try: x = np.array(words.loc[w].values) except KeyError: x = np.zeros((GLOVE_SIZE,)) return x salary_info = [] for i in range(len(list_of_tups)): print("Embedding element: " + str(i) ) string_val = list_of_tups[i][2] split_string = string_val.split() sal_info_tup = (list_of_tups[i][0], list_of_tups[i][1], len(split_string) ) salary_info.append(sal_info_tup) for j in range(len(split_string)): embed = vec(split_string[j]) embedding_matrix[i,j,:] = embed matrix_output = "./data/glove_embeddings_of_dataset_ENG.mat" np.save( matrix_output, embedding_matrix ) salary_output = "./data/glove_embedding_salinfo_ENG.pkl" pickle.dump( salary_info, open( salary_output, "wb") ) print("Done") <file_sep>import csv ##bread and butter packages import pdb import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split #for tree: from sklearn import tree from sklearn.tree import DecisionTreeRegressor from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor # import pydot, pydotplus import graphviz from sklearn import preprocessing #import external functions from plot_confusion_matrix import plot_confusion_matrix from perform_random_forest import random_forest_reg, random_forest_clf from tree_evaluation import reg_eval, clf_eval data = pd.read_csv('output/cleaned_data_better.csv') # data.shapemax #build the feature matrix want = 'max_salary' # want = 'min_salary' y = data[want] # pdb.set_trace() # y = data[['min_salary', 'max_salary']] labels = ['NYC', 'LA', 'SF', 'SEA', 'senior', 'back_end', 'full_stack', 'front_end', 'remote_ok', 'is_acquired', 'is_public'] X = data[labels] print('=============your data statistics=============') print(data.describe()) print('===============================================') # pdb.set_trace() ##################### uncomment the section below if ################## wish to use label encoder (includes NaN) ############## # # # preprocess string labels as decision tree can't take # # string features. Literally NO STRING VALUES ON DATASET # # (later goest through dtype.int32 conversion for comparison; current DT can't # # process categorical variables -- known issue.) # # # for label in labels: # # print(label, ' is ', X[label].dtype , 'dtype') # # le = preprocessing.LabelEncoder() # for label in labels: # # pdb.set_trace() # # assuming all dtypes are in dtype == bool. # # obviously this assumption needs to change as we use complicated features # # # X.loc[:, label] turned out to be a little bitch that returns # # a copy of the specific column not the original data itself # # Can't update directly # # ===>Need Pandas to Pandas copy # # X.loc[:, label] = le.fit_transform(X[label]) # encoded = le.fit_transform(X[label].astype(bool)) #returns numpy array # processed_val = pd.DataFrame({'Column1': encoded}) # Numpy -> Pandas # X.loc[:,label] = processed_val.values #Pandas to Pandas copy by values ############Alternative to label encoding ############################# def transform(input): # pdb.set_trace() # print(input) if str(input) == 'True' or '1': return 1.0 elif str(input) == 'False' or '0': return 0 for label in labels: X[label].apply(transform) ############Alternative to label encoding ############################# # X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.1, random_state = 0) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=500, random_state=1991) # pdb.set_trace() ############################################################################### # Regression Tree ############################################################# print('Single regression tree') reg = DecisionTreeRegressor() reg.fit(X_train, y_train) y_pred_reg_train = reg.predict(X_train) y_pred_reg = reg.predict(X_test) print('on train set:') reg_eval(reg, y_train, y_pred_reg_train) print('on test set:') reg_eval(reg, y_test.values.ravel(),y_pred_reg ) # # # dope graphics # # dot_data = StringIO()t_file=dot_data) # # graph = pydot.graph_from_dot_data(dot_data.getvalue()) # # graph.write_pdf("graph.pdf") # dot_data = tree.export_graphviz(reg, feature_names = labels, # filled=True, # special_characters=True) # graph = graphviz.Source(dot_data) # graph.format = 'png' # # graph = pydotplus.graph_from_dot_data(dot_data) # # graph.render("./output/salary-predict", view=True) #plt.show ############################################################################### # Random Forest Regressor #################################################### # print("Baseline case - Regressor: ") random_forest_reg(X_train, y_train, X_test, y_test, tune=False) print("Optimized case - Regressor: ") random_forest_reg(X_train, y_train, X_test, y_test, num_estimator=250, min_samples_split =0.01, max_depth = 20, max_features = 4, random=1,tune=False) # def random_forest_reg(x_train, y_train, x_test, y_test,estimator,state) # pdb.set_trace() # ############################################################################### #Classification Tree ######################################################### # data bucketing # min_salary = y.min() # max_salary = y.max() # num_buckets =200 # increment = (max_salary - min_salary ) * 1.0 /num_buckets # quick_bucket_cutoff_lines = [min_salary + i * increment for i in range (0,num_buckets)] # # #dumb way of bucketing but whatever it works # new_y = np.zeros(shape=(np.shape(y))) # for i in range(0,len(y)): # for j in range(0,len(quick_bucket_cutoff_lines)): # if y[i] > quick_bucket_cutoff_lines[j] : # new_y[i] = j # continue # # # pdb.set_trace() # y_clf = pd.DataFrame({'bucket_y': new_y}) # X_train, X_test, y_train, y_test = train_test_split(X, y_clf, test_size = 0.1, random_state = 0) # # clf = DecisionTreeClassifier() # clf.fit(X_train, y_train) # y_pred_clf = clf.predict(X_test) # y_pred_train_clf = clf.predict(X_train) # # y_test_np = pd.Series.as_matrix(y_test) # y_test_np = y_test.values.ravel() # # # # pdb.set_trace() # # result = pd.DataFrame({'Actual': y_test_np, 'Predicted': y_pred_reg}) # result = pd.DataFrame({'Actual (clf)': y_test_np, 'Predicted (clf)': y_pred_clf}) # # print('====================SINGLE CLASSIFIER===================') # print("on train set::") # clf_eval(clf, y_train.values.ravel(), y_pred_train_clf) # print("on test set::") # clf_eval(clf, y_test.values.ravel(), y_pred_clf.ravel()) # np.set_printoptions(precision=2) # # print("Optimized case - Classifier: ") # random_forest_clf(X_train, y_train, X_test, y_test, num_estimator=250, min_samples_split =0.01, # max_depth = 10, max_features = 4, random=1,tune=False) # # cnf_matrix = confusion_matrix(y_test_np, y_test_np) # # # pdb.set_trace() # # plt.figure() # # plt.matshow(cnf_matrix) # # plt.title('Confusion matrix of the classifier') # # plt.colorbar() # # filename = './output/confusion_matrix.png' # # plt.savefig(filename) # # plt.show() # # pdb.set_trace() # # plot_confusion_matrix(cnf_matrix, quick_bucket_cutoff_lines, title='Confusion matrix, without normalization') # # plt.figure() # # plot_confusion_matrix(cnf_matrix, quick_bucket_cutoff_lines,normalize = True, title='Confusion matrix, without normalization') # # plt.show() <file_sep>#tree_extreme_plots.py import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import xgboost as xgb import time import pdb def plotty_plots(diff, model, parm_file): diff_train, diff_test = diff fig2 = plt.figure() plt.scatter(range(0,np.shape(diff_train)[0]),diff_train, s=1) plt.title('RMSE error on train set') plt.xlabel(' y- y_pred Error') plt.ylabel('prediction error') filename = "sparse_weight_" + time.strftime("%m%d_%H%M") + ".pkl" filename = './output/xgb_rmse_train_' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) # plt.show() # plt.close() fig3 = plt.figure() plt.scatter(range(0,np.shape(diff_test)[0]),diff_test, s=1) plt.title('RMSE error on test set') plt.xlabel(' y- y_pred Error') plt.ylabel('prediction error') filename = './output/xgb_rmse_test_' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) #### tree plots -- will slow down your system if max depth is too big # pdb.set_trace() # fig1,ax = plt.figure() # plt.figure(2) # xgb.plot_tree(model, num_trees=0,rankdir='LR') # # plt.figure(3) # xgb.plot_tree(model, num_trees=1,rankdir='LR') # plt.figure(4) # xgb.plot_tree(model, num_trees=2,rankdir='LR') # plt.figure(5) # xgb.plot_tree(model, num_trees=3,rankdir='LR') # plt.figure(6) fig, ax = plt.subplots(figsize=(100, 100)) ax = xgb.plot_tree(model, num_trees=5,rankdir='LR', ax = ax) filename = './output/xgb_tree_plot' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) # plt.show() fig4 = plt.figure() sns.set(color_codes=True) ls_diff = list(diff_train) ax = sns.distplot(ls_diff, kde=False, rug=True) ax.set_title('RMSE error distribution on train set') filename = './output/xgb_rmse_distribution_train_' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) fig5 = plt.figure() sns.set(color_codes=True) ls_diff = list(diff_test) ax = sns.distplot(ls_diff, kde=False, rug=True) ax.set_title('RMSE error distribution on test set') filename = './output/xgb_rmse_distribution_test_' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) # plt.show() fig6 = plt.figure() xgb.plot_importance(model, max_num_features=10) # plt.rcParams['figure.figsize'] = [15, 15] filename = './output/xgb_importance_plot' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) # plt.show() fig7 = plt.figure() feature_important = model.get_score(importance_type='weight') keys = list(feature_important.keys()) values = list(feature_important.values()) importance = pd.DataFrame(data=values, index=keys, columns=["score"]) # pdb.set_trace() importance.nlargest(20, columns='score').plot(kind='barh') most_important = list(importance.nlargest(20, columns='score').index) filename = './output/most_important' + time.strftime("%m%d_%H%M") + '.txt' f=open(filename, "w") # f.write('\n') # f.write('top 50 features:: '+'\n') for ff in most_important: f.write(ff) f.write('\n') f.close() filename = './output/xgb_importance_plot_by score' + time.strftime("%m%d_%H%M") + '.png' plt.savefig(filename) # plt.show() # pdb.set_trace() <file_sep>##rf_tune.py import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor from tree_evaluation import reg_eval,clf_eval def find_n_estimators(treetype, tree, x_train, x_test, y_train, y_test): print('finding best number of estimators....') print('-----------------------------------------') # estimators = np.logspace(1, 4, 10).astype(int) estimators = np.linspace(1,2000,10).astype(int) rmse_train= [] rmse_test= [] if treetype == 'reg': maketree = RandomForestRegressor elif treetype == 'clf': maketree = RandomForestClassifier else: print('wrong tree type') exit() for est in estimators: rf = maketree(n_estimators = est) rf.fit(x_train, y_train) y_pred_train = rf.predict(x_train) rmse_train.append(reg_eval(rf, y_train, y_pred_train)) y_pred_test = rf.predict(x_test) rmse_test.append(reg_eval(rf, y_test, y_pred_test)) plt.figure() x = range(0,len(estimators)) plt.plot(estimators,rmse_train, 'b', label='train rmse') plt.plot(estimators,rmse_test, 'r', label='test rmse') plt.legend() plt.xlabel('Number of estimators') plt.ylabel('RMSE error') # plt.show() filename = './output/rf_tuning/n_estimators_opt_'+ treetype+'.png' plt.savefig(filename) def find_max_depth(treetype, tree, x_train, x_test, y_train, y_test): print('finding maximum depth....') print('-----------------------------------------') depth_list = np.linspace(1,50,25).astype(int) rmse_train= [] rmse_test= [] if treetype == 'reg': maketree = RandomForestRegressor elif treetype == 'clf': maketree = RandomForestClassifier else: print('wrong tree type') exit() for depth in depth_list: rf = maketree(max_depth = depth) rf.fit(x_train, y_train) y_pred_train = rf.predict(x_train) rmse_train.append(reg_eval(rf, y_train, y_pred_train)) y_pred_test = rf.predict(x_test) rmse_test.append(reg_eval(rf, y_test, y_pred_test)) plt.figure() plt.plot(depth_list,rmse_train, 'b', label='train rmse') plt.plot(depth_list,rmse_test, 'r', label='test rmse') plt.legend() plt.xlabel('Maximum Depth') plt.ylabel('RMSE error') # plt.show() filename = './output/rf_tuning/Maximum_depth_opt_'+ treetype+'.png' plt.savefig(filename) def find_min_sample_split(treetype, tree, x_train, x_test, y_train, y_test): print('finding minimum sample split...') print('-----------------------------------------') how_many_split = np.linspace(0.1, 1.0, 10) rmse_train= [] rmse_test= [] if treetype == 'reg': maketree = RandomForestRegressor elif treetype == 'clf': maketree = RandomForestClassifier else: print('ERROR:: wrong tree type') exit() for split in how_many_split: rf = maketree(min_samples_split = split) rf.fit(x_train, y_train) y_pred_train = rf.predict(x_train) rmse_train.append(reg_eval(rf, y_train, y_pred_train)) y_pred_test = rf.predict(x_test) rmse_test.append(reg_eval(rf, y_test, y_pred_test)) plt.figure() plt.plot(how_many_split,rmse_train, 'b', label='train rmse') plt.plot(how_many_split,rmse_test, 'r', label='test rmse') plt.legend() plt.xlabel('Minimum Sample Split') plt.ylabel('RMSE error') # plt.show() filename = './output/rf_tuning/min_split_'+ treetype+'.png' plt.savefig(filename) def find_max_features(treetype, tree, x_train, x_test, y_train, y_test): print('finding maximum features...') print('-----------------------------------------') how_many_features = np.linspace(1,np.shape(x_train)[1],np.shape(x_train)[1]).astype(int) rmse_train= [] rmse_test= [] if treetype == 'reg': maketree = RandomForestRegressor elif treetype == 'clf': maketree = RandomForestClassifier else: print('ERROR:: wrong tree type') exit() for ftr in how_many_features: rf = maketree(max_features = ftr) rf.fit(x_train, y_train) y_pred_train = rf.predict(x_train) rmse_train.append(reg_eval(rf, y_train, y_pred_train)) y_pred_test = rf.predict(x_test) rmse_test.append(reg_eval(rf, y_test, y_pred_test)) plt.figure() plt.plot(how_many_features,rmse_train, 'b', label='train rmse') plt.plot(how_many_features,rmse_test, 'r', label='test rmse') plt.legend() plt.xlabel('Maximum Number of Features') plt.ylabel('RMSE error') # plt.show() filename = './output/rf_tuning/max_features_'+ treetype+'.png' plt.savefig(filename) <file_sep>import csv import pdb import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.svm import LinearSVC, SVC, SVR from sklearn.metrics import accuracy_score use_full_data = False #Use full data if use_full_data: df = pd.read_csv('data/cleaned_data.csv') else: df = pd.read_csv('data/low_salaries_removed.csv') df = df[df.min_salary < 500000] df_XforSVM = df.filter(['is_acquired', 'is_public', 'remote_ok', 'NYC', \ 'LA', 'SF', 'SEA', 'senior', 'back_end', 'full_stack', 'front_end'], axis=1) df_minYforSVM = df.filter(['min_salary'], axis=1 ) df_maxYforSVM = df.filter(['max_salary'], axis=1 ) X_train_min, X_test_min, Y_train_min, Y_test_min = train_test_split( df_XforSVM.values, df_minYforSVM.values.ravel() , test_size=0.05) X_train_max, X_test_max, Y_train_max, Y_test_max = train_test_split( df_XforSVM.values, df_maxYforSVM.values.ravel() , test_size=0.05) #currently episilon is at default, 0.1 min_rbf_SVR = SVR(gamma='scale') min_rbf_SVR.fit(X_train_min, Y_train_min) #test for max salary max_rbf_SVR = SVR(gamma='scale') max_rbf_SVR.fit(X_train_max, Y_train_max) ##look at performance Y_train_pred_min = min_rbf_SVR.predict(X_train_min) Y_train_pred_max = max_rbf_SVR.predict(X_train_max) #plot plt.scatter(x=Y_train_min, y=Y_train_pred_min) plt.xlabel('Actual Min Salary') plt.ylabel('Predicted Min Salary') plt.title('SVR Model performance for Min Salary') plt.show() plt.clf() plt.scatter(x=Y_train_max, y=Y_train_pred_max) plt.xlabel('Actual Max Salary') plt.ylabel('Predicted Max Salary') plt.title('SVR Model performance for Max Salary') plt.show() ##Well this currently sucks! Let's try on a smaller subset, where we only look at salaries above 40k ##You'd make at least 40k on minimum wage, so lets only predict things in that range
38b12c576aac9a24e34849e730718bfd56ff9096
[ "Markdown", "Python" ]
22
Python
09jvilla/salary-predict
95edf37388973cea9372af5f0c443adbb7abc1bb
5024491d19e904c09014087a47e396f10f14f3a7
refs/heads/master
<file_sep>class Brand < ApplicationRecord has_many :items_brands has_many :items through: :items_brands end <file_sep>class BottomCategory < ApplicationRecord has_many :items belongs_to :mid_category end <file_sep>class TopCategory < ApplicationRecord has_many :mid_categories end <file_sep>class User < ApplicationRecord has_many :items, dependent: :destroy has_one :profile, dependent: :destroy has_many :comments, dependent: :destroy has_many :sell_items, dependent: :destroy has_many :trade_items, dependent: :destroy has_many :sold_items, dependent: :destroy end <file_sep># README ## usersテーブル |Column|Type|Options| |------|----|-------| |nickname|string|null: false| |email|string|null: false| |password|string|null: false| ### Asociation - has_many :items, dependent::destroy - has_one :profile, dependent::destroy - has_many :comments, dependent::destroy - has_many :sell_items, dependent::destroy - has_many :trade_items, dependent::destroy - has_many :sold_items, dependent::destroy ## itemsテーブル |Column|Type|Options| |------|----|-------| |name|string|null: false| |image|string|| |price|integer|null: false| |size|string|| |description|text|| |condition|string|null: false| |shipping_fee|string|null: false| |shipping_method|string|null: false| |prefecture|string|null: false| |user_id|references|null: false, foreign_key: true| |bottom_category_id|references|null: false, foreign_key: true| ### Asociation - has_many :comments, dependent::destroy - has_many :items_brands - has_many :brands, through: :items_brands - belongs_to :user - belongs_to :bottom_category ## brandsテーブル |Column|Type|Options| |------|----|-------| |name|string|null: false| ### Asociation - has_many :items_brands - has_many :items through: :items_brands ## items_brandsテーブル |Column|Type|Options| |------|----|-------| |item_id|references|foreign_key: true| |brand_id|references|foreign_key: true| ### Asociation - belongs_to :item - belongs_to :brand ## commentsテーブル |Column|Type|Options| |------|----|-------| |body|text|| |user_id|references|foreign_key: true| |item_id|references|foreign_key: true| ### Asociation - belongs_to :user - belongs_to :item ## profilesテーブル |Column|Type|Options| |------|----|-------| |first_name|string|null: false| |last_name|string|null: false| |kana_first_name|string|null: false| |kana_last_name|string|null: false| |birth_year|integer|null: false| |birth_month|integer|null: false| |birth_day|integer|null: false| |postal_code|string|null: false| |prefecture|string|null: false| |city|string|null: false| |address|string|null: false| |profile_text|string|| |user_id|references|null: false, foreign_key: true| ### Asociation - belongs_to :user ## sell_itemsテーブル |Column|Type|Options| |------|----|-------| |sell_item|string|| |user_id|references|null: false, foreign_key: true| ### Asociation - belongs_to :user ## sold_itemsテーブル |Column|Type|Options| |------|----|-------| |sold_item|string|| |user_id|references|null: false, foreign_key: true| ### Asociation - belongs_to :user ## trade_itemsテーブル |Column|Type|Options| |------|----|-------| |trade_item|string|| |user_id|references|null: false, foreign_key: true| ### Asociation - belongs_to :user ## top_categoriesテーブル |Column|Type|Options| |------|----|-------| |name|string|null: false| ### Asociation - has_many :mid_categories ## mid_categoriesテーブル |Column|Type|Options| |------|----|-------| |name|string|null: false| |top_category_id|references|null: false, foreign_key: true| ### Asociation - has_many :bottom_categories - belongs_to :top_category ## bottom_categoriesテーブル |Column|Type|Options| |------|----|-------| |name|string|null: false| |mid_category_id|references|null: false, foreign_key: ture| ### Asociation - has_many :items - belongs_to :mid_category <file_sep>class CreateItems < ActiveRecord::Migration[5.2] def change create_table :items do |t| # 型 カラム 制約 t.string :name, null: false t.string :image t.integer :price, null: false t.string :size t.text :description t.string :condition, null: false t.string :shipping_fee, null: false t.string :shipping_method, null: false t.string :prefecture, null: false t.references :user, null: false, foreign_key: true t.timestamps end end end <file_sep>class Item < ApplicationRecord has_many :comments, dependent: :destroy has_many :items_brands has_many :brands, through: :items_brands belongs_to :user belongs_to :bottom_category end <file_sep>class MidCategory < ApplicationRecord has_many :bottom_categories belongs_to :top_category end
78b94e6d521fe1ccb14d6c4d33a4aebe63f684e5
[ "Markdown", "Ruby" ]
8
Ruby
takanobu726/freemarket_sample_47A
ae3d943fbdfda8e2b12b979d051ec28ee5ea0381
4f52cafa7cbe04d72a1a8221d6589bfc23b89d50
refs/heads/main
<repo_name>xartreal/frf-pane<file_sep>/pane.ini [default] step=30 debug=1 pidfile= port=:3000 <file_sep>/words.go package main var stopwords=` без близко более больше большой будем будет будете будешь будто буду будут будь бывает был была были было быть важная важное важные важный вам вами вас ваш ваша ваше ваши ведь везде весь вид вместе вне вниз внизу вокруг вон вообще вопрос вот впрочем времени время все всегда всего всем всеми всему всех всею всю всюду вся всё где говорил говорит говорить год года году давать давно даже дальше дать дел делал делать делаю дело для должен должно должный дом друг другая другие других друго другое другой думать его ему если есть еще ещё жить занят занята занято заняты затем зато зачем здесь знать значит значить иди идти или имеет имел именно иметь ими имя каждая каждое каждые каждый кажется казаться как какая какой кем когда кого кому конец конечно которая которого которой которые который которых кроме кругом кто куда лет лишь лучше мало между менее меньше меня мимо мне много многочисленная многочисленное многочисленные многочисленный мной мною мог могу могут может можно мои мой мочь моя моё над надо назад наиболее найти наконец нам нами нас начала начать наш наша наше наши него недавно недалеко нее ней некоторый нельзя нем немного нему нередко несколько нет нею неё нибудь ниже низко никакой никогда никто никуда ним ними них ничего ничто новый нужно нужный оба обычно один однако одного одной оказаться около она они оно опять особенно ответить откуда отовсюду отсюда очень первый перед писать под подойди подумать пожалуйста позже пойти пока пол получить помнить понимать понять пора после последний посмотреть посреди потом потому почему почти правда прекрасно при про просто против работа работать раз разве рано раньше решить ряд рядом сам сама сами самим самими самих само самого самой самом самому саму самый свет свое своего своей свои своих свой свою сделать себе себя сегодня сейчас сидеть сих сказал сказала сказать сколько слишком слово случай смотреть сначала снова собой собою совсем спасибо спросить сразу стал старый стать суть считать так такая также таки такие такое такой там твои твой твоя твоё тебе тебя тем теми теперь тобой тобою тогда того тоже только том тому тот туда тут увидеть уже улица уметь хороший хорошо хотел хотеть хоть хотя хочешь час часто часть чаще чего человек чем чему через что чтоб чтобы чуть эта эти этим этими этих это этого этой этом этому этот эту являюсь `<file_sep>/sort.go // sort package main import ( "sort" ) type lxrec struct { id string tmark string } func timesort(list []string) []string { //return list //debug slist := []lxrec{} for i := 0; i < len(list); i++ { //mk sortlist tbin, _ := TlxDB.MyCollection.Get([]byte(list[i])) slist = append(slist, lxrec{list[i], string(tbin)}) } sort.SliceStable(slist, func(i, j int) bool { return slist[i].tmark > slist[j].tmark }) xlist := []string{} for i := 0; i < len(slist); i++ { //mk outlist xlist = append(xlist, slist[i].id) } return xlist } // from https://gist.github.com/johnwesonga/6301924 func uniqueNonEmptyElementsOf(s []string) []string { unique := make(map[string]bool, len(s)) us := make([]string, len(unique)) for _, elem := range s { if len(elem) != 0 { if !unique[elem] { us = append(us, elem) unique[elem] = true } } } return us } <file_sep>/pane-main.go package main import ( "fmt" "os" ) func helpprog() { fmt.Printf("Usage: \n") fmt.Printf("build indexes: frf-pane build <feed>\n") fmt.Printf("list feeds: frf-pane list all\n") fmt.Printf("server: frf-pane server <feed>\n") os.Exit(1) } func main() { fmt.Printf("Frf-pane %s\n\n", myversion) args, flags := parseCL() if len(args) != 2 { helpprog() } feedname := args[1] if feedname == "@myname" { feedname = ReadBFConf() } if (feedname != "all") && !isexists("feeds/"+feedname) { outerror(2, "Feed '%s' not found\n", feedname) } ReadConf() //flags for _, v := range flags { if v == "i" { RunCfg.ftsenabled = true } } MkFeedPath(feedname) dbpath := RunCfg.feedpath + "pane/" switch args[0] { case "build": os.RemoveAll(RunCfg.feedpath + "pane") os.Mkdir(RunCfg.feedpath+"pane", 0755) indexer(dbpath) case "list": listFeeds(feedname) case "server": if !isexists(dbpath + "list.db") { outerror(2, "FATAL: No index DB found\n") } openDB(dbpath+"list.db", "pane", &ListDB) openDB(dbpath+"hashtag.db", "pane", &HashtagDB) openDB(dbpath+"tym.db", "pane", &ByMonthDB) defer closeDB(&ListDB) defer closeDB(&HashtagDB) defer closeDB(&ByMonthDB) RunCfg.ftsenabled = isexists(dbpath + "index.db") if RunCfg.ftsenabled { openDB(dbpath+"index.db", "pane", &IdxDB) openDB(dbpath+"timelx.db", pane, &TlxDB) defer closeDB(&IdxDB) defer closeDB(&TlxDB) } loadtemplates() RunCfg.maxlastlist = (len(recsDB(&ListDB)) - 1) * Config.step if len(Config.pidfile) > 2 { writepid() } startServer() default: outerror(2, "Unknown command '%s'\n", os.Args[1]) } } <file_sep>/funcs.go // funcs package main import ( "fmt" "io/ioutil" "os" "strings" ) func isexists(filename string) bool { _, err := os.Stat(filename) return err == nil } func outerror(code int, format string, a ...interface{}) { fmt.Printf(format, a...) os.Exit(code) } func MkFeedPath(feedname string) { feedpath := "" if strings.Contains(feedname, "filter:") { feedpath = strings.Replace(feedname, ":", "/", -1) } else { feedpath = "feeds/" + feedname } RunCfg.feedpath = feedpath + "/" RunCfg.feedname = feedname } func addtolist(list []byte, item string) []byte { qlist := strings.Split(string(list), "\n") for _, qitem := range qlist { if qitem == item { return []byte(strings.Join(qlist, "\n")) } } qlist = append(qlist, item) return []byte(strings.Join(qlist, "\n")) } func inlistcount(listname string, indb *KVBase) int { rec, _ := indb.MyCollection.Get([]byte(listname)) if len(rec) < 5 { //rec not found return 0 } return len(strings.Split(string(rec), "\n")) - 1 } func writepid() { ioutil.WriteFile(Config.pidfile, []byte(fmt.Sprintf("%d", os.Getpid())), 0644) } func rmpid() { os.Remove(Config.pidfile) } func bToMb(b uint64) uint64 { return b / 1024 / 1024 } func parseCL() ([]string, []string) { var args = []string{} var flags = []string{} for i := 1; i < len(os.Args); i++ { if strings.HasPrefix(os.Args[i], "-") { //flags flags = append(flags, strings.TrimPrefix(os.Args[i], "-")) } else { args = append(args, os.Args[i]) } } return args, flags } <file_sep>/db.go package main import ( // "fmt" // "io/ioutil" "log" "os" "github.com/steveyen/gkvlite" ) type KVBase struct { StoreFile *os.File MyStore *gkvlite.Store MyCollection *gkvlite.Collection } func openDB(dbname string, colname string, outdb *KVBase) { var err error outdb.StoreFile, err = os.OpenFile(dbname, os.O_RDWR, 0755) if err != nil { println("FATAL: Can't open database") log.Printf("FATAL: Can't open database %s\n", dbname) os.Exit(1) } outdb.MyStore, _ = gkvlite.NewStore(outdb.StoreFile) outdb.MyCollection = outdb.MyStore.GetCollection(colname) } func closeDB(outdb *KVBase) { outdb.MyStore.Flush() outdb.StoreFile.Sync() outdb.StoreFile.Close() } func syncDB(outdb *KVBase) { outdb.MyStore.Flush() outdb.StoreFile.Sync() } func createDB(dbname string, colname string, indb *KVBase) { f, err := os.Create(dbname) if err != nil { println("FATAL: Can't create database") log.Printf("FATAL: Can't create database %s\n", dbname) os.Exit(1) } indb.StoreFile = f indb.MyStore, _ = gkvlite.NewStore(indb.StoreFile) indb.MyStore.SetCollection(colname, nil) indb.MyStore.Flush() indb.StoreFile.Sync() indb.StoreFile.Close() } func recsDB(indb *KVBase) []string { var outlist = []string{} indb.MyCollection.VisitItemsAscend([]byte(""), false, func(i *gkvlite.Item) bool { // This visitor callback will be invoked with every item // with key "ford" and onwards, in key-sorted order. // So: "mercedes", "tesla" are visited, in that ascending order, // but not "bmw". // If we want to stop visiting, return false; // otherwise return true to keep visiting. //fmt.Printf("up: %s\n", string(i.Key)) outlist = append(outlist, string(i.Key)) //ulisttxt += string(i.Key) return true }) return outlist } <file_sep>/server.go // server package main import ( "fmt" "net/url" "strconv" "strings" "github.com/facette/natsort" "github.com/labstack/echo" "github.com/xartreal/frfpanehtml" ) var e *echo.Echo func startServer() { e = echo.New() e.Static("/media", RunCfg.feedpath+"media") e.Static("/x", "template") e.GET("/", mainpage) e.GET("/t/:id", thandler) e.GET("/m/:id", mhandler) e.GET("/h/:id", hhandler) e.GET("/s", stathandler) e.GET("/f", findFrontHandler) e.POST("/f", findBackHandler) e.GET("/c", changeFeedFront) e.GET("/cx/:feed", changeFeedHandler) e.GET("/p/:id", phandler) e.Start(RunCfg.port) } func mainpage(c echo.Context) error { return c.Redirect(307, "/t/0") } func thandler(c echo.Context) error { lnum := c.Param("id") if lnum == "all" { return tlisthandler(c) } fbin, _ := ListDB.MyCollection.Get([]byte("list_" + lnum)) // fmt.Printf("lnum=%s file=%s\n", lnum, RunCfg.feedpath+"pane/list_"+lnum) list := strings.Split(string(fbin), "\n") title := "Timeline (from " + lnum + ")" return c.HTML(200, genhtml(list, lnum, true, title, "")) } func tlisthandler(c echo.Context) error { out := "<h2>Timeline</h2>" list := recsDB(&ListDB) natsort.Sort(list) for i := 0; i < len(list); i++ { if len(list[i]) > 1 { item := strings.TrimPrefix(list[i], "list_") out += "<a href=/t/" + item + "> offset " + item + "</a><br>" } } return c.HTML(200, mkhtml(out, "Timeline")) } func mhandler(c echo.Context) error { lnum := c.Param("id") if lnum == "all" { return mlisthandler(c) } fbin, _ := ByMonthDB.MyCollection.Get([]byte(lnum)) list := strings.Split(string(fbin), "\n") title := "Month: " + lnum return c.HTML(200, genhtml(list, lnum, false, title, "")) } func mlisthandler(c echo.Context) error { out := "<h2>By month</h2>" out += calendar(recsDB(&ByMonthDB)) out = "<tr><td>" + out + "</td></tr>" return c.HTML(200, mkhtml(out, "By month")) } func hhandler(c echo.Context) error { htag, _ := url.QueryUnescape(c.Param("id")) if htag == "all" { return hlisthandler(c) } fbin, _ := HashtagDB.MyCollection.Get([]byte(htag)) list := strings.Split(string(fbin), "\n") title := "Hashtag #" + htag return c.HTML(200, genhtml(list, htag, false, title, "")) } func hlisthandler(c echo.Context) error { out := "<h2>Hashtags</h2>" list := recsDB(&HashtagDB) for i := 0; i < len(list); i++ { if len(list[i]) > 2 { out += fmt.Sprintf("<a href=/h/%s>%s</a> (%d)<br>", list[i], list[i], inlistcount(list[i], &HashtagDB)) } } return c.HTML(200, mkhtml(out, "Hashtags")) } func phandler(c echo.Context) error { id := c.Param("id") out := "" if !isexists(RunCfg.feedpath + "json/" + id) { out = mkhtml("Not found error", "Error") } else { out = genhtml([]string{id}, "", false, id, "") } return c.HTML(200, out) } func statdb(indb *KVBase, title string) string { list := recsDB(indb) out := fmt.Sprintf("<p><b>%s</b>: %d items</p><p>", title, len(list)-1) for i := 0; i < len(list); i++ { if len(list[i]) > 3 { items, _ := indb.MyCollection.Get([]byte(list[i])) xi := strings.Split(string(items), "\n") out += fmt.Sprintf("%s (%d), ", list[i], len(xi)-1) } } return out } func stathandler(c echo.Context) error { out := "<h2>Statistics</h2>" list := recsDB(&ListDB) out += fmt.Sprintf("<p><b>Pages</b>: %d (~%d records)</p>", len(list)-1, (len(list)-1)*30) + statdb(&ByMonthDB, "By month") + statdb(&HashtagDB, "By hashtag") return c.HTML(200, mkhtml(out, "Statistics")) } func findFrontHandler(c echo.Context) error { return c.HTML(200, mkhtml(loadtfile("template/template_kfind.html"), "Find")) } func findBackHandler(c echo.Context) error { qword := c.FormValue("qword") if len([]rune(qword)) < 3 { return c.HTML(200, mkhtml("Request too small", "Error")) } if RunCfg.ftsenabled { return findFTSHandler(c) } xlist := recsDB(&ListDB) natsort.Sort(xlist) founded := []string{} for i := 0; i < len(xlist); i++ { fbin, _ := ListDB.MyCollection.Get([]byte(xlist[i])) list := strings.Split(string(fbin), "\n") for j := 0; j < len(list); j++ { if len(list[j]) > 4 { ftxt := frfpanehtml.LoadJson(jpath + list[j]).TextOnly() if strings.Contains(ftxt, qword) { founded = append(founded, list[j]) } } } } return c.HTML(200, genhtml(founded, "0", false, "Find: "+qword+" ("+strconv.Itoa(len(founded))+")", qword)) } func findFTSHandler(c echo.Context) error { qword := c.FormValue("qword") keys := recsDB(&IdxDB) var founded = []string{} for i := 0; i < len(keys); i++ { if strings.Contains(keys[i], qword) { vbin, _ := IdxDB.MyCollection.Get([]byte(keys[i])) vx := strings.Split(string(vbin), "\n") founded = append(founded, vx...) } } closeDB(&IdxDB) founded = uniqueNonEmptyElementsOf(founded) founded = timesort(founded) return c.HTML(200, genhtml(founded, "0", false, "Find: "+qword+" ("+strconv.Itoa(len(founded))+")", qword)) } func changeFeedFront(c echo.Context) error { feedlist := getFeedList() out := "<h3>Select feed</h3>" out += "<table>" for k, v := range feedlist { if strings.Contains(v, "#") || !isexists("feeds/"+k+"/pane/list.db") { continue //no active jsons or no pane index } out += fmt.Sprintf(`<tr><td><a href=/cx/%s>%s</a></td><td>%s</td></tr>`, k, k, v) } out += "</table>" return c.HTML(200, mkhtml(out, "Change feed")) } func changeFeedHandler(c echo.Context) error { newfeed := c.Param("feed") if !isexists("feeds/" + newfeed + "/pane/list.db") { return c.HTML(200, mkhtml("Incorrect or noindexed feed", "Change feed")) } closeDB(&ListDB) closeDB(&HashtagDB) closeDB(&ByMonthDB) if RunCfg.ftsenabled { closeDB(&IdxDB) closeDB(&TlxDB) } MkFeedPath(newfeed) dbpath := RunCfg.feedpath + "pane/" openDB(dbpath+"list.db", "pane", &ListDB) openDB(dbpath+"hashtag.db", "pane", &HashtagDB) openDB(dbpath+"tym.db", "pane", &ByMonthDB) RunCfg.ftsenabled = isexists(dbpath + "index.db") if RunCfg.ftsenabled { openDB(dbpath+"index.db", "pane", &IdxDB) openDB(dbpath+"timelx.db", "pane", &TlxDB) } loadtemplates() RunCfg.maxlastlist = (len(recsDB(&ListDB)) - 1) * Config.step e.Static("/media", RunCfg.feedpath+"media") //rewrite server rules out := "Changed to feed '" + newfeed + "'" return c.HTML(200, mkhtml(out, "Change feed")) } <file_sep>/structs.go // structs package main type FrFjson struct { Posts struct { Id string `json:"id"` Body string `json:"body"` PostedTo []string `json:"postedTo"` CreatedAt string `json:"createdAt"` CreatedBy string `json:"createdBy"` Attachments []string `json:"attachments"` Likes []string `json:"likes"` Comments []string `json:"comments"` } `json:"posts"` Comments []struct { Body string `json:"body"` UpdatedAt string `json:"updatedAt"` Likes string `json:"likes"` CreatedBy string `json:"createdBy"` } `json:"comments"` } <file_sep>/indexer.go // indexer package main import ( "encoding/json" "fmt" "io/ioutil" "runtime" "strconv" "strings" "time" "github.com/xartreal/frfpanehtml" ) var ( ListDB KVBase HashtagDB KVBase ByMonthDB KVBase IdxDB KVBase //fts TlxDB KVBase ) var dbgout string func addToDBList(list string, id string, indb *KVBase) { fbin, _ := indb.MyCollection.Get([]byte(list)) indb.MyCollection.Set([]byte(list), addtolist(fbin, id)) } func getHashList(text string) []string { hlist := frfpanehtml.RegHashtag.FindAllString(text, -1) //FindAllStringSubmatch ? for i := 0; i < len(hlist); i++ { e := hlist[i] idx := strings.Index(e, "#") + 1 hlist[i] = e[idx:] //clean excess chars if Config.debugmode == 1 { dbgout += fmt.Sprintf("%q --> %q\n", e, hlist[i]) } } return uniqueNonEmptyElementsOf(hlist) } const pane = "pane" func indexer(dbpath string) { createDB(dbpath+"list.db", pane, &ListDB) createDB(dbpath+"hashtag.db", pane, &HashtagDB) createDB(dbpath+"tym.db", pane, &ByMonthDB) openDB(dbpath+"list.db", pane, &ListDB) openDB(dbpath+"hashtag.db", pane, &HashtagDB) openDB(dbpath+"tym.db", pane, &ByMonthDB) if RunCfg.ftsenabled { createDB(dbpath+"index.db", pane, &IdxDB) createDB(dbpath+"timelx.db", pane, &TlxDB) openDB(dbpath+"index.db", pane, &IdxDB) openDB(dbpath+"timelx.db", pane, &TlxDB) } logtxt := "" hstart := 0 idx := make(index) start := time.Now() ilist := RunCfg.feedpath + "index/list_" jposts := RunCfg.feedpath + "json/" for isexists(ilist + strconv.Itoa(hstart)) { jpost := new(FrFjson) logtxt += fmt.Sprintf("offset %d\n", hstart) hcnt := strconv.Itoa(hstart) fbin, _ := ioutil.ReadFile(ilist + hcnt) postList := strings.Split(string(fbin), "\n") ListDB.MyCollection.Set([]byte("list_"+hcnt), fbin) // add to list.db for i := 0; i < len(postList); i++ { if len(postList[i]) < 2 { continue } postBin, _ := ioutil.ReadFile(jposts + postList[i]) json.Unmarshal(postBin, jpost) //timelist y-m utime, _ := strconv.ParseInt(jpost.Posts.CreatedAt, 10, 64) qCreated := time.Unix(utime/1000, 0).Format("2006-01") addToDBList(qCreated, postList[i], &ByMonthDB) //hashlist postText := jpost.Posts.Body for j := 0; j < len(jpost.Comments); j++ { postText += "\n" + jpost.Comments[j].Body } hashList := getHashList(postText) for j := 0; j < len(hashList); j++ { logtxt += fmt.Sprintf("%q\n", hashList[j]) addToDBList(hashList[j], postList[i], &HashtagDB) } if RunCfg.ftsenabled { TlxDB.MyCollection.Set([]byte(postList[i]), []byte(jpost.Posts.CreatedAt)) // index it! idx.add(postText, postList[i]) } } fmt.Printf("\roffset: %d", hstart) hstart += Config.step } closeDB(&ListDB) closeDB(&HashtagDB) closeDB(&ByMonthDB) if Config.debugmode == 1 { ioutil.WriteFile("pane.log", []byte(logtxt), 0755) ioutil.WriteFile("pane2.log", []byte(dbgout), 0755) } if RunCfg.ftsenabled { //mem var m runtime.MemStats runtime.ReadMemStats(&m) //save idx.save(&IdxDB) fmt.Printf("\nFTS: indexed %d items in %v (MemAlloc = %d MiB)\n", len(idx), time.Since(start), bToMb(m.TotalAlloc)) // coda closeDB(&IdxDB) closeDB(&TlxDB) } fmt.Printf("\n") } <file_sep>/microfts.go // microfts package main import ( // "fmt" "strings" "unicode" ) // based on SimpleFTS https://github.com/akrylysov/simplefts // tokenize returns a slice of tokens for the given text. func tokenize(text string) []string { return strings.FieldsFunc(text, func(r rune) bool { // Split on any character that is not a letter or a number. return !unicode.IsLetter(r) && !unicode.IsNumber(r) }) } // analyze analyzes the text and returns a slice of tokens. func analyze(text string) []string { tokens := tokenize(text) tokens = lowercaseFilter(tokens) tokens = stopwordFilter(tokens) // tokens = stemmerFilter(tokens) return tokens } // lowercaseFilter returns a slice of tokens normalized to lower case. func lowercaseFilter(tokens []string) []string { r := make([]string, len(tokens)) for i, token := range tokens { r[i] = strings.ToLower(token) } return r } // stopwordFilter returns a slice of tokens with stop words removed. func stopwordFilter(tokens []string) []string { r := make([]string, 0, len(tokens)) for _, token := range tokens { if !strings.Contains(stopwords, token) { r = append(r, token) } } return r } // index is an inverted index. It maps tokens to document IDs. type index map[string][]string // add adds documents to the index. func (idx index) add(text, id string) { for _, token := range analyze(text) { if len(token) > 2 { //skip if small len ids := idx[token] if ids != nil && ids[len(ids)-1] == id { // Don't add same ID twice. continue } idx[token] = append(ids, id) } } } // save index to db func (idx index) save(indb *KVBase) { for k, v := range idx { indb.MyCollection.Set([]byte(k), []byte(strings.Join(v, "\n"))) } } <file_sep>/go.mod module github.com/xartreal/frf-pane go 1.16 require ( github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb github.com/labstack/echo v3.3.10+incompatible github.com/labstack/gommon v0.3.0 // indirect github.com/steveyen/gkvlite v0.0.0-20141117050110-5b47ed6d7458 github.com/stretchr/testify v1.7.0 // indirect github.com/vaughan0/go-ini v0.0.0-20130923145212-a98ad7ee00ec github.com/xartreal/frfpanehtml v0.0.3 golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf // indirect ) <file_sep>/lister.go // lister package main import ( "fmt" "io/ioutil" ) func getFeedList() map[string]string { feedmap := map[string]string{} files, _ := ioutil.ReadDir("feeds") for _, item := range files { if !item.IsDir() { continue } flag := "" if !isexists("feeds/" + item.Name() + "/json/profile") { flag = " # no json data" } else { jfiles, _ := ioutil.ReadDir("feeds/" + item.Name() + "/json") flag = fmt.Sprintf(" %d jsons", len(jfiles)-1) if !isexists("feeds/" + item.Name() + "/pane/list.db") { flag += " (not indexed)" } else if isexists("feeds/" + item.Name() + "/pane/index.db") { flag += " (fts)" } } feedmap[item.Name()] = flag } return feedmap } func listFeeds(feedname string) { if !isexists("feeds") { outerror(1, "No feeds\n") } if feedname != "all" { outerror(1, "Incorrect list cmd\n") } fmt.Printf("Feeds:\n\n") feedmap := getFeedList() for k, v := range feedmap { fmt.Printf("%s: %s\n", k, v) } fmt.Printf("\n") } <file_sep>/html.go // html package main import ( "fmt" "io/ioutil" "strconv" "strings" "github.com/xartreal/frfpanehtml" ) var jpath string //json path func loadtfile(name string) string { fbin, err := ioutil.ReadFile(name) if err != nil { outerror(2, "FATAL: Template load error: '%s'\n", name) } return string(fbin) } func loadtemplates() { frfpanehtml.Templates = &frfpanehtml.THtmlTemplate{ Comment: loadtfile("template/template_comment.html"), Item: loadtfile("template/template_item.html"), File: loadtfile("template/template_kfile.html"), Cal: loadtfile("template/template_kcal.html"), } //+params frfpanehtml.Params = frfpanehtml.TParams{Feedpath: RunCfg.feedpath, Step: Config.step, Singlemode: false, IndexPrefix: "/t/", IndexPostfix: "", LocalLink: "<a href=/p/$id>☀</a>"} jpath = RunCfg.feedpath + "json/" } func genhtml(list []string, id string, isindex bool, title string, pen string) string { outtext := "<h2>" + title + "</h2>" for i := 0; i < len(list); i++ { if len(list[i]) > 1 { outtext += frfpanehtml.LoadJson(jpath+list[i]).ToHtml(list[i], pen) + "<hr>" } } ptitle := RunCfg.feedname + " - " + title + " - frf-pane" return frfpanehtml.MkHtmlPage(id, outtext, isindex, RunCfg.maxlastlist, RunCfg.feedname, ptitle) } func mkhtml(htmlText string, title string) string { ptitle := RunCfg.feedname + " - " + title + " - frf-pane" return frfpanehtml.MkHtmlPage("0", htmlText, false, 0, RunCfg.feedname, ptitle) } func calendar(list []string) string { // scan list min := 2030 max := 2000 for i := 0; i < len(list); i++ { z := strings.Split(list[i], "-") year, _ := strconv.Atoi(z[0]) if year < min { min = year } if year > max { max = year } } // fmt.Printf("min=%d max=%d\n", min, max) // builder tidx := [13]string{} tout := [13]string{} ccout := "" for i := min; i <= max; i++ { //years yout := fmt.Sprintf(`<span class="label is-error is-secondary"><b>%d</b></span>`, i) for j := 1; j < 13; j++ { //months tidx[j] = fmt.Sprintf("%%%02d", j) listname := fmt.Sprintf("%d-%02d", i, j) lcnt := inlistcount(listname, &ByMonthDB) // ltxt := strconv.Itoa(lcnt) if lcnt > 0 { tout[j] = `<br><b><a href=/m/` + listname + `>` + strconv.Itoa(lcnt) + `</a></b>` } else { tout[j] = "" } } // fmt.Printf("year=%d, tidx=%v, tout=%v\n", i, tidx, tout) xout := frfpanehtml.Templates.Cal for j := 1; j < 13; j++ { xout = strings.Replace(xout, tidx[j], tout[j], -1) } ccout += yout + xout } return ccout } <file_sep>/config.go // config package main import ( "strconv" "github.com/vaughan0/go-ini" ) var myversion = "0.3.5" //var useragent = "ARL backfrf/" + myversion var RunCfg struct { feedpath string port string myname string feedname string maxlastlist int ftsenabled bool } var Config struct { step int debugmode int maxlast int pidfile string } func getIniVar(file ini.File, section string, name string) string { rt, _ := file.Get(section, name) if len(rt) < 1 { outerror(2, "FATAL: Variable '%s' not defined\n", name) } return rt } func getIniNum(file ini.File, section string, name string) int { rt, err := strconv.Atoi(getIniVar(file, section, name)) if err != nil { return 0 } return rt } func ReadConf() { if !isexists("pane.ini") { Config.debugmode = 0 Config.step = 30 Config.pidfile = "" RunCfg.port = ":3000" return } file, err := ini.LoadFile("pane.ini") if err != nil { outerror(1, "\n! Configuration not available\n") } Config.step = getIniNum(file, "default", "step") Config.debugmode = getIniNum(file, "default", "debug") Config.pidfile, _ = file.Get("default", "pidfile") RunCfg.port, _ = file.Get("default", "port") } func ReadBFConf() string { file, err := ini.LoadFile("backfrf.ini") if err != nil { outerror(1, "\n! Configuration (backfrf.ini) not available, @myname is unknown\n") } RunCfg.myname, _ = file.Get("credentials", "myname") if len(RunCfg.myname) < 2 { outerror(1, "\n! @myname not defined in backfrf.ini\n") } return RunCfg.myname } <file_sep>/README.md # frf-pane Программа просмотра бэкапов фрифида
71f27ceb8d385c0da0b532d793f01dca52440645
[ "Markdown", "Go Module", "Go", "INI" ]
15
INI
xartreal/frf-pane
60c36372ca0a3e8f92b55050631c65da04170143
d5632021beb7491fad15b2206ddc84965d10cab5
refs/heads/master
<file_sep>#include <iostream> #include "emoji.h" using namespace std; int main() { cout << emojicpp::emojize("Emoji :smile: for c++ :+1:") << endl; return 0; } <file_sep>// util.cpp // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #include "util.h" #include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <sstream> #include <string> #include <ncursesw/ncurses.h> std::string Util::GetConfigDir() { return std::string(getenv("HOME")) + std::string("/.nchat"); } int Util::GetKeyCode(const std::string& p_KeyName) { static std::map<std::string, int> keyCodes = { // additional keys { "KEY_TAB", 9}, { "KEY_RETURN", 10}, // ctrl keys { "KEY_CTRL@", 0}, { "KEY_CTRLA", 1}, { "KEY_CTRLB", 2}, { "KEY_CTRLC", 3}, { "KEY_CTRLD", 4}, { "KEY_CTRLE", 5}, { "KEY_CTRLF", 6}, { "KEY_CTRLG", 7}, { "KEY_CTRLH", 8}, { "KEY_CTRLI", 9}, { "KEY_CTRLJ", 10}, { "KEY_CTRLK", 11}, { "KEY_CTRLL", 12}, { "KEY_CTRLM", 13}, { "KEY_CTRLN", 14}, { "KEY_CTRLO", 15}, { "KEY_CTRLP", 16}, { "KEY_CTRLQ", 17}, { "KEY_CTRLR", 18}, { "KEY_CTRLS", 19}, { "KEY_CTRLT", 20}, { "KEY_CTRLU", 21}, { "KEY_CTRLV", 22}, { "KEY_CTRLW", 23}, { "KEY_CTRLX", 24}, { "KEY_CTRLY", 25}, { "KEY_CTRLZ", 26}, { "KEY_CTRL[", 27}, { "KEY_CTRL\\", 28}, { "KEY_CTRL]", 29}, { "KEY_CTRL^", 30}, { "KEY_CTRL_", 31}, // ncurses keys { "KEY_DOWN", KEY_DOWN }, { "KEY_UP", KEY_UP }, { "KEY_LEFT", KEY_LEFT }, { "KEY_RIGHT", KEY_RIGHT }, { "KEY_HOME", KEY_HOME }, #ifdef __APPLE__ { "KEY_BACKSPACE", 127 }, #else { "KEY_BACKSPACE", KEY_BACKSPACE }, #endif { "KEY_F0", KEY_F0 }, { "KEY_F1", KEY_F(1) }, { "KEY_F2", KEY_F(2) }, { "KEY_F3", KEY_F(3) }, { "KEY_F4", KEY_F(4) }, { "KEY_F5", KEY_F(5) }, { "KEY_F6", KEY_F(6) }, { "KEY_F7", KEY_F(7) }, { "KEY_F8", KEY_F(8) }, { "KEY_F9", KEY_F(9) }, { "KEY_F10", KEY_F(10) }, { "KEY_F11", KEY_F(11) }, { "KEY_F12", KEY_F(12) }, { "KEY_DL", KEY_DL }, { "KEY_IL", KEY_IL }, { "KEY_DC", KEY_DC }, { "KEY_IC", KEY_IC }, { "KEY_EIC", KEY_EIC }, { "KEY_CLEAR", KEY_CLEAR }, { "KEY_EOS", KEY_EOS }, { "KEY_EOL", KEY_EOL }, { "KEY_SF", KEY_SF }, { "KEY_SR", KEY_SR }, { "KEY_NPAGE", KEY_NPAGE }, { "KEY_PPAGE", KEY_PPAGE }, { "KEY_STAB", KEY_STAB }, { "KEY_CTAB", KEY_CTAB }, { "KEY_CATAB", KEY_CATAB }, { "KEY_ENTER", KEY_ENTER }, { "KEY_PRINT", KEY_PRINT }, { "KEY_LL", KEY_LL }, { "KEY_A1", KEY_A1 }, { "KEY_A3", KEY_A3 }, { "KEY_B2", KEY_B2 }, { "KEY_C1", KEY_C1 }, { "KEY_C3", KEY_C3 }, { "KEY_BTAB", KEY_BTAB }, { "KEY_BEG", KEY_BEG }, { "KEY_CANCEL", KEY_CANCEL }, { "KEY_CLOSE", KEY_CLOSE }, { "KEY_COMMAND", KEY_COMMAND }, { "KEY_COPY", KEY_COPY }, { "KEY_CREATE", KEY_CREATE }, { "KEY_END", KEY_END }, { "KEY_EXIT", KEY_EXIT }, { "KEY_FIND", KEY_FIND }, { "KEY_HELP", KEY_HELP }, { "KEY_MARK", KEY_MARK }, { "KEY_MESSAGE", KEY_MESSAGE }, { "KEY_MOVE", KEY_MOVE }, { "KEY_NEXT", KEY_NEXT }, { "KEY_OPEN", KEY_OPEN }, { "KEY_OPTIONS", KEY_OPTIONS }, { "KEY_PREVIOUS", KEY_PREVIOUS }, { "KEY_REDO", KEY_REDO }, { "KEY_REFERENCE", KEY_REFERENCE }, { "KEY_REFRESH", KEY_REFRESH }, { "KEY_REPLACE", KEY_REPLACE }, { "KEY_RESTART", KEY_RESTART }, { "KEY_RESUME", KEY_RESUME }, { "KEY_SAVE", KEY_SAVE }, { "KEY_SBEG", KEY_SBEG }, { "KEY_SCANCEL", KEY_SCANCEL }, { "KEY_SCOMMAND", KEY_SCOMMAND }, { "KEY_SCOPY", KEY_SCOPY }, { "KEY_SCREATE", KEY_SCREATE }, { "KEY_SDC", KEY_SDC }, { "KEY_SDL", KEY_SDL }, { "KEY_SELECT", KEY_SELECT }, { "KEY_SEND", KEY_SEND }, { "KEY_SEOL", KEY_SEOL }, { "KEY_SEXIT", KEY_SEXIT }, { "KEY_SFIND", KEY_SFIND }, { "KEY_SHELP", KEY_SHELP }, { "KEY_SHOME", KEY_SHOME }, { "KEY_SIC", KEY_SIC }, { "KEY_SLEFT", KEY_SLEFT }, { "KEY_SMESSAGE", KEY_SMESSAGE }, { "KEY_SMOVE", KEY_SMOVE }, { "KEY_SNEXT", KEY_SNEXT }, { "KEY_SOPTIONS", KEY_SOPTIONS }, { "KEY_SPREVIOUS", KEY_SPREVIOUS }, { "KEY_SPRINT", KEY_SPRINT }, { "KEY_SREDO", KEY_SREDO }, { "KEY_SREPLACE", KEY_SREPLACE }, { "KEY_SRIGHT", KEY_SRIGHT }, { "KEY_SRSUME", KEY_SRSUME }, { "KEY_SSAVE", KEY_SSAVE }, { "KEY_SSUSPEND", KEY_SSUSPEND }, { "KEY_SUNDO", KEY_SUNDO }, { "KEY_SUSPEND", KEY_SUSPEND }, { "KEY_UNDO", KEY_UNDO }, { "KEY_MOUSE", KEY_MOUSE }, { "KEY_RESIZE", KEY_RESIZE }, { "KEY_EVENT", KEY_EVENT }, }; int keyCode = -1; std::map<std::string, int>::iterator it = keyCodes.find(p_KeyName); if (it != keyCodes.end()) { keyCode = it->second; } else if (!p_KeyName.empty() && std::all_of(p_KeyName.begin(), p_KeyName.end(), ::isdigit)) { keyCode = std::stoi(p_KeyName); } else { std::cerr << "warning: unknown key \"" << p_KeyName << "\"." << std::endl; } return keyCode; } std::vector<std::string> Util::WordWrap(std::string p_Text, unsigned p_LineLength) { std::ostringstream wrapped; bool first = true; std::string line; std::istringstream textss(p_Text); while (std::getline(textss, line)) { if (first) { first = false; } else { wrapped << '\n'; } std::istringstream words(line); std::string word; if (words >> word) { if (word.length() > p_LineLength) { std::string extra = word.substr(p_LineLength); std::stringstream wordsExtra; wordsExtra << extra; wordsExtra << words.rdbuf(); words = std::istringstream(wordsExtra.str()); word = word.substr(0, p_LineLength); } wrapped << word; size_t space_left = p_LineLength - word.length(); while (words >> word) { if (word.length() > p_LineLength) { std::string extra = word.substr(p_LineLength); std::stringstream wordsExtra; wordsExtra << extra; wordsExtra << words.rdbuf(); words = std::istringstream(wordsExtra.str()); word = word.substr(0, p_LineLength); } if (space_left < word.length() + 1) { wrapped << '\n' << word; space_left = p_LineLength - word.length(); } else { wrapped << ' ' << word; space_left -= word.length() + 1; } } } } std::stringstream stream(wrapped.str()); std::vector<std::string> lines; while (std::getline(stream, line)) { lines.push_back(line); } return lines; } std::string Util::ToString(const std::wstring& p_WStr) { size_t len = std::wcstombs(nullptr, p_WStr.c_str(), 0) + 1; char* cstr = new char[len]; std::wcstombs(cstr, p_WStr.c_str(), len); std::string str(cstr); delete[] cstr; return str; } std::wstring Util::ToWString(const std::string& p_Str) { size_t len = 1 + mbstowcs(nullptr, p_Str.c_str(), 0); wchar_t* wcstr = new wchar_t[len]; std::mbstowcs(wcstr, p_Str.c_str(), len); std::wstring wstr(wcstr); delete[] wcstr; return wstr; } <file_sep>g++ sample.cpp -std=c++11 -o out ./out<file_sep>// setup.cpp // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #include "setup.h" #include <iostream> #include <vector> #include "config.h" #include "protocol.h" bool Setup::SetupProtocol(Config& p_Config, std::vector<std::shared_ptr<Protocol>> p_Protocols) { std::cout << "Protocols:" << std::endl; size_t idx = 0; for (auto it = p_Protocols.begin(); it != p_Protocols.end(); ++it, ++idx) { std::cout << idx << ". " << (*it)->GetName() << std::endl; } std::cout << idx << ". Exit setup" << std::endl; size_t selectidx = 0; std::cout << "Select protocol (" << selectidx << "): "; std::string line; std::getline(std::cin, line); if (!line.empty()) { selectidx = stoi(line); } if (selectidx >= p_Protocols.size()) { std::cout << "Setup aborted, exiting." << std::endl; return false; } bool rv = p_Protocols.at(selectidx)->Setup(); if (rv) { std::string param(p_Protocols.at(selectidx)->GetName() + std::string("_is_enabled")); p_Config.Set(param, "1"); } return rv; } <file_sep>// message.h // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #pragma once #include "protocol.h" struct Message { std::int64_t m_Id; std::string m_Sender; std::int64_t m_ChatId; bool m_IsOutgoing; bool m_IsUnread; std::int32_t m_TimeSent; std::int64_t m_ReplyToId; std::string m_Content; Protocol* m_Protocol; std::string GetUniqueChatId() { return m_Protocol->GetName() + std::string("_") + std::to_string(m_ChatId); } }; <file_sep>// uicommon.cpp // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #include "uilite.h" #include <algorithm> #include <mutex> #include <set> #include <sstream> #include <locale.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <emoji.h> #include <ncursesw/ncurses.h> #include "chat.h" #include "config.h" #include "message.h" #include "protocol.h" #include "util.h" #define EMOJI_PAD 1 UiCommon::UiCommon(const std::string& p_Name) : m_Name(p_Name) { } UiCommon::~UiCommon() { } void UiCommon::Init() { // Config const std::map<std::string, std::string> commonConfig = { // keys {"key_next_chat", "KEY_TAB"}, {"key_prev_chat", "KEY_BTAB"}, {"key_next_page", "KEY_NPAGE"}, {"key_prev_page", "KEY_PPAGE"}, {"key_curs_up", "KEY_UP"}, {"key_curs_down", "KEY_DOWN"}, {"key_curs_left", "KEY_LEFT"}, {"key_curs_right", "KEY_RIGHT"}, {"key_backspace", "KEY_BACKSPACE"}, {"key_delete", "KEY_DC"}, {"key_linebreak", "KEY_RETURN"}, {"key_send", "KEY_CTRLS"}, {"key_next_unread", "KEY_CTRLU"}, {"key_exit", "KEY_CTRLX"}, {"key_toggle_emoji", "KEY_CTRLE"}, // layout {"input_rows", "3"}, }; std::map<std::string, std::string> defaultConfig = GetPrivateConfig(); defaultConfig.insert(commonConfig.begin(), commonConfig.end()); const std::string configPath(Util::GetConfigDir() + std::string("/") + m_Name + std::string(".conf")); m_Config = Config(configPath, defaultConfig); m_KeyNextChat = Util::GetKeyCode(m_Config.Get("key_next_chat")); m_KeyPrevChat = Util::GetKeyCode(m_Config.Get("key_prev_chat")); m_KeyNextPage = Util::GetKeyCode(m_Config.Get("key_next_page")); m_KeyPrevPage = Util::GetKeyCode(m_Config.Get("key_prev_page")); m_KeyCursUp = Util::GetKeyCode(m_Config.Get("key_curs_up")); m_KeyCursDown = Util::GetKeyCode(m_Config.Get("key_curs_down")); m_KeyCursLeft = Util::GetKeyCode(m_Config.Get("key_curs_left")); m_KeyCursRight = Util::GetKeyCode(m_Config.Get("key_curs_right")); m_KeyBackspace = Util::GetKeyCode(m_Config.Get("key_backspace")); m_KeyDelete = Util::GetKeyCode(m_Config.Get("key_delete")); m_KeyLinebreak = Util::GetKeyCode(m_Config.Get("key_linebreak")); m_KeySend = Util::GetKeyCode(m_Config.Get("key_send")); m_KeyNextUnread = Util::GetKeyCode(m_Config.Get("key_next_unread")); m_KeyExit = Util::GetKeyCode(m_Config.Get("key_exit")); m_KeyToggleEmoji = Util::GetKeyCode(m_Config.Get("key_toggle_emoji")); m_HighlightBold = (m_Config.Get("highlight_bold") == "1"); m_ShowEmoji = (m_Config.Get("show_emoji") == "1"); m_InHeight = std::stoi(m_Config.Get("input_rows")); PrivateInit(); pipe(m_Sockets); // Init screen setlocale(LC_ALL, ""); initscr(); noecho(); cbreak(); raw(); keypad(stdscr, TRUE); SetupWin(); } std::string UiCommon::GetName() { return m_Name; } void UiCommon::Cleanup() { m_Config.Set("show_emoji", std::to_string(m_ShowEmoji)); m_Config.Save(); CleanupWin(); wclear(stdscr); endwin(); } void UiCommon::AddProtocol(Protocol* p_Protocol) { const std::string& name = p_Protocol->GetName(); std::lock_guard<std::mutex> lock(m_Lock); if (m_Protocols.find(name) == m_Protocols.end()) { m_Protocols[name] = p_Protocol; } } void UiCommon::RemoveProtocol(Protocol* p_Protocol) { std::lock_guard<std::mutex> lock(m_Lock); m_Protocols.erase(p_Protocol->GetName()); } void UiCommon::UpdateChat(Chat p_Chat) { std::lock_guard<std::mutex> lock(m_Lock); m_Chats[p_Chat.GetUniqueId()] = p_Chat; RequestRedraw(m_ContactWinId | m_InputWinId); } void UiCommon::UpdateChats(std::vector<Chat> p_Chats) { std::lock_guard<std::mutex> lock(m_Lock); for (auto& chat : p_Chats) { m_Chats[chat.GetUniqueId()] = chat; if (m_CurrentChat.empty()) { SetCurrentChat(chat.GetUniqueId()); } } RequestRedraw(m_ContactWinId); } void UiCommon::UpdateMessages(std::vector<Message> p_Messages, bool p_ClearChat /* = false */) { std::lock_guard<std::mutex> lock(m_Lock); if (p_ClearChat && (!p_Messages.empty())) { m_Messages[p_Messages.at(0).GetUniqueChatId()].clear(); } for (auto& message : p_Messages) { m_Messages[message.GetUniqueChatId()][message.m_Id] = message; } RequestRedraw(m_OutputWinId | m_InputWinId); std::set<std::string> chatIds; for (auto& message : p_Messages) { chatIds.insert(message.GetUniqueChatId()); } for (auto& chatId : chatIds) { if (m_Chats.find(chatId) != m_Chats.end()) { const Chat& chat = m_Chats.at(chatId); chat.m_Protocol->RequestChatUpdate(chat.m_Id); } } } void UiCommon::Run() { m_Running = true; while (m_Running) { fd_set fds; FD_ZERO(&fds); FD_SET(STDIN_FILENO, &fds); FD_SET(m_Sockets[0], &fds); int maxfd = std::max(STDIN_FILENO, m_Sockets[0]); struct timeval tv = {1, 0}; int rv = select(maxfd + 1, &fds, NULL, NULL, &tv); if (rv == 0) continue; if (FD_ISSET(m_Sockets[0], &fds)) { char mask = 0; char buf[128]; int len = read(m_Sockets[0], buf, sizeof(buf)); for (int i = 0; i < len; ++i) { mask |= buf[i]; } if (mask & m_OutputWinId) { RedrawOutputWin(); } if (mask & m_ContactWinId) { RedrawContactWin(); } if (mask & m_InputWinId) { RedrawInputWin(); } } if (FD_ISSET(STDIN_FILENO, &fds)) { wint_t ch; get_wch(&ch); int key = (int)ch; if (key == KEY_RESIZE) { CleanupWin(); SetupWin(); RequestRedraw(m_ContactWinId | m_InputWinId | m_OutputWinId); } else if (key == m_KeyNextChat) { NextChat(1); } else if (key == m_KeyPrevChat) { NextChat(-1); } else if (key == m_KeyNextPage) { NextPage(1); } else if (key == m_KeyPrevPage) { NextPage(-1); } else if ((key == m_KeyCursUp) || (key == m_KeyCursDown) || (key == m_KeyCursLeft) || (key == m_KeyCursRight)) { MoveInputCursor(key); } else if (key == m_KeyBackspace) { Backspace(); } else if (key == m_KeyDelete) { Delete(); } else if (key == m_KeyLinebreak) { InputBuf((wint_t)10); } else if (key == m_KeySend) { Send(); } else if (key == m_KeyNextUnread) { NextUnread(); } else if (key == m_KeyExit) { Exit(); } else if (key == m_KeyToggleEmoji) { ToggleEmoji(); } else { InputBuf(ch); } } } } void UiCommon::RequestRedraw(char p_WinId) { write(m_Sockets[1], &p_WinId, 1); } void UiCommon::RedrawInputWin() { std::lock_guard<std::mutex> lock(m_Lock); std::wstring input = m_Input[m_CurrentChat]; const size_t inputPos = m_InputCursorPos[m_CurrentChat]; std::wstring line; std::vector<std::wstring> lines; size_t x = 0; size_t y = 0; size_t cx = 0; size_t cy = 0; for (size_t i = 0; i <= input.size(); ++i) { if (i == inputPos) { cx = x; cy = y; } if (i < input.size()) { wchar_t wcr = input.at(i); if (wcr != 10) { line.push_back(wcr); ++x; } else { x = 0; ++y; lines.push_back(line); line.clear(); } if (x == m_InWidth) { x = 0; ++y; lines.push_back(line); line.clear(); } } } if (line.size() > 0) { lines.push_back(line); line.clear(); } size_t yoffs = (cy < (m_InHeight - 1)) ? 0 : (cy - (m_InHeight - 1)); werase(m_InWin); for (size_t i = 0; i < m_InHeight; ++i) { if ((i + yoffs) < lines.size()) { line = lines.at(i + yoffs).c_str(); line.erase(std::remove(line.begin(), line.end(), EMOJI_PAD), line.end()); mvwaddwstr(m_InWin, i, 0, line.c_str()); } } wmove(m_InWin, cy - yoffs, cx); wrefresh(m_InWin); m_InputLines[m_CurrentChat] = lines; m_InputCursorX[m_CurrentChat] = cx; m_InputCursorY[m_CurrentChat] = cy; } void UiCommon::RedrawOutputWin() { std::lock_guard<std::mutex> lock(m_Lock); werase(m_OutWin); if (m_ShowMsgIdBefore[m_CurrentChat].empty()) return; const std::map<std::int64_t, Message>& chatMessages = m_Messages.at(m_CurrentChat); int messageWidth = m_OutWidth; int messageY = m_OutHeight - 2; std::vector<std::int64_t> viewedMessageIds; for (auto it = chatMessages.rbegin(); it != chatMessages.rend(); ++it) { if ((m_ShowMsgIdBefore[m_CurrentChat].top() != 0) && (it->second.m_Id >= m_ShowMsgIdBefore[m_CurrentChat].top())) continue; const std::string& rawText = it->second.m_Content; const std::string& text = m_ShowEmoji ? rawText : emojicpp::textize(rawText); const std::vector<std::string>& lines = Util::WordWrap(text, messageWidth); for (auto line = lines.rbegin(); line != lines.rend(); ++line) { if (messageY < 0) break; mvwprintw(m_OutWin, messageY, 0, "%s", line->c_str()); messageY--; } if (it->second.m_ReplyToId != 0) { auto replyIt = chatMessages.find(it->second.m_ReplyToId); if (replyIt != chatMessages.end()) { const std::string& rawReplyText = replyIt->second.m_Content; const std::string& replyText = m_ShowEmoji ? rawReplyText : emojicpp::textize(rawReplyText); const std::vector<std::string>& replyLines = Util::WordWrap(replyText, messageWidth - 2); for (auto replyLine = replyLines.rbegin(); replyLine != replyLines.rend(); ++replyLine) { if (messageY < 0) break; mvwprintw(m_OutWin, messageY, 0, "| %s", replyLine->c_str()); messageY--; } } else { if (messageY < 0) break; mvwprintw(m_OutWin, messageY, 0, "| [Non-cached message]"); messageY--; } } if (messageY < 0) break; time_t rawtime = it->second.m_TimeSent; struct tm* timeinfo; timeinfo = localtime(&rawtime); char senttimestr[64]; strftime(senttimestr, sizeof(senttimestr), "%H:%M", timeinfo); std::string senttime(senttimestr); char sentdatestr[64]; strftime(sentdatestr, sizeof(sentdatestr), "%Y-%m-%d", timeinfo); std::string sentdate(sentdatestr); time_t nowtime = time(NULL); struct tm* nowtimeinfo = localtime(&nowtime); char nowdatestr[64]; strftime(nowdatestr, sizeof(nowdatestr), "%Y-%m-%d", nowtimeinfo); std::string nowdate(nowdatestr); std::string sender = it->second.m_Sender; sender.erase(sender.find_last_not_of(" \n\r\t") + 1); std::string timestr = (sentdate == nowdate) ? senttime : sentdate + std::string(" ") + senttime; wattron(m_OutWin, m_HighlightBold ? A_BOLD : A_NORMAL); mvwprintw(m_OutWin, messageY, 0, "%s (%s):", sender.c_str(), timestr.c_str()); wattroff(m_OutWin, m_HighlightBold ? A_BOLD : A_NORMAL); messageY -= 2; viewedMessageIds.push_back(it->second.m_Id); } if ((messageY < 0) && (viewedMessageIds.size() > 0)) { m_LowestMsgIdShown[m_CurrentChat] = viewedMessageIds.back(); } if (m_Chats.find(m_CurrentChat) != m_Chats.end()) { const Chat& chat = m_Chats.at(m_CurrentChat); chat.m_Protocol->MarkRead(chat.m_Id, viewedMessageIds); chat.m_Protocol->RequestChatUpdate(chat.m_Id); } wrefresh(m_OutWin); } void UiCommon::NextPage(int p_Offset) { std::lock_guard<std::mutex> lock(m_Lock); if (p_Offset < 0) { if (!m_ShowMsgIdBefore[m_CurrentChat].empty() && (m_ShowMsgIdBefore[m_CurrentChat].top() != m_LowestMsgIdShown[m_CurrentChat])) { m_ShowMsgIdBefore[m_CurrentChat].push(m_LowestMsgIdShown[m_CurrentChat]); } } else if (p_Offset > 0) { if (m_ShowMsgIdBefore[m_CurrentChat].size() > 1) { m_ShowMsgIdBefore[m_CurrentChat].pop(); } } else { return; } if (m_Chats.find(m_CurrentChat) != m_Chats.end()) { const Chat& chat = m_Chats.at(m_CurrentChat); const int maxMsg = (m_OutHeight / 3) + 1; chat.m_Protocol->RequestMessages(chat.m_Id, m_ShowMsgIdBefore[m_CurrentChat].top(), maxMsg); } } void UiCommon::MoveInputCursor(int p_Key) { std::lock_guard<std::mutex> lock(m_Lock); bool needRedraw = false; std::vector<std::wstring>& lines = m_InputLines[m_CurrentChat]; size_t& cx = m_InputCursorX[m_CurrentChat]; size_t& cy = m_InputCursorY[m_CurrentChat]; size_t& pos = m_InputCursorPos[m_CurrentChat]; if (p_Key == m_KeyCursUp) { if (cy > 0) { pos -= cx + 1 + ((lines.at(cy - 1).size() > cx) ? (lines.at(cy - 1).size() - cx) : 0); } else { pos = 0; } needRedraw = true; } else if (p_Key == m_KeyCursDown) { if ((cy + 1) < lines.size()) { pos += lines.at(cy).size() + 1; pos = std::min(pos, m_Input[m_CurrentChat].size()); } else { pos = m_Input[m_CurrentChat].size(); } needRedraw = true; } else if (p_Key == m_KeyCursLeft) { if (m_InputCursorPos[m_CurrentChat] > 0) { m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] - 1; needRedraw = true; } } else if (p_Key == m_KeyCursRight) { if (m_InputCursorPos[m_CurrentChat] < m_Input[m_CurrentChat].size()) { m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] + 1; needRedraw = true; } } if (needRedraw) { if (m_ShowEmoji) { if (m_InputCursorPos[m_CurrentChat] < m_Input[m_CurrentChat].size()) { if (m_Input[m_CurrentChat].at(m_InputCursorPos[m_CurrentChat]) == EMOJI_PAD) { if (p_Key == KEY_RIGHT) { m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] + 1; } else if (m_InputCursorPos[m_CurrentChat] > 0) { m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] - 1; } } } } RequestRedraw(m_InputWinId); } } void UiCommon::NextChat(int p_Offset) { std::lock_guard<std::mutex> lock(m_Lock); auto currentIt = m_Chats.find(m_CurrentChat); while (p_Offset > 0) { ++currentIt; --p_Offset; if (currentIt == m_Chats.end()) { currentIt = m_Chats.begin(); } } while (p_Offset < 0) { if (currentIt == m_Chats.begin()) { currentIt = m_Chats.end(); } --currentIt; ++p_Offset; } SetCurrentChat(currentIt->first); } void UiCommon::Backspace() { std::lock_guard<std::mutex> lock(m_Lock); if (m_InputCursorPos[m_CurrentChat] > 0) { if (m_ShowEmoji) { const bool wasPad = (m_Input[m_CurrentChat].at(m_InputCursorPos[m_CurrentChat] - 1) == EMOJI_PAD); m_Input[m_CurrentChat].erase(m_InputCursorPos[m_CurrentChat] - 1, 1); m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] - 1; if (wasPad) { m_Input[m_CurrentChat].erase(m_InputCursorPos[m_CurrentChat] - 1, 1); m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] - 1; } } else { m_Input[m_CurrentChat].erase(m_InputCursorPos[m_CurrentChat] - 1, 1); m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] - 1; } RequestRedraw(m_InputWinId); } } void UiCommon::Delete() { std::lock_guard<std::mutex> lock(m_Lock); if (m_Input[m_CurrentChat].size() > m_InputCursorPos[m_CurrentChat]) { m_Input[m_CurrentChat].erase(m_InputCursorPos[m_CurrentChat], 1); if (m_ShowEmoji && (m_Input[m_CurrentChat].size() > m_InputCursorPos[m_CurrentChat])) { if (m_Input[m_CurrentChat].at(m_InputCursorPos[m_CurrentChat]) == EMOJI_PAD) { m_Input[m_CurrentChat].erase(m_InputCursorPos[m_CurrentChat], 1); } } RequestRedraw(m_InputWinId); } } void UiCommon::Send() { std::lock_guard<std::mutex> lock(m_Lock); if (m_Chats.find(m_CurrentChat) != m_Chats.end()) { if (!m_Input[m_CurrentChat].empty()) { const Chat& chat = m_Chats.at(m_CurrentChat); std::wstring wstr = m_Input[m_CurrentChat]; if (m_ShowEmoji) { wstr.erase(std::remove(wstr.begin(), wstr.end(), EMOJI_PAD), wstr.end()); } else { wstr = Util::ToWString(emojicpp::emojize(Util::ToString(m_Input[m_CurrentChat]))); } std::string str = Util::ToString(wstr); chat.m_Protocol->SendMessage(chat.m_Id, str); m_Input[m_CurrentChat].clear(); m_InputCursorPos[m_CurrentChat] = 0; RequestRedraw(m_InputWinId); } } } void UiCommon::NextUnread() { std::lock_guard<std::mutex> lock(m_Lock); for (auto& chat : m_Chats) { if (chat.second.m_IsUnread) { SetCurrentChat(chat.first); break; } } } void UiCommon::Exit() { std::lock_guard<std::mutex> lock(m_Lock); m_Running = false; } void UiCommon::SetCurrentChat(const std::string& p_Chat) { if (p_Chat != m_CurrentChat) { m_CurrentChat = p_Chat; m_ShowMsgIdBefore[m_CurrentChat] = std::stack<std::int64_t>(); m_ShowMsgIdBefore[m_CurrentChat].push(0); m_LowestMsgIdShown[m_CurrentChat] = std::numeric_limits<std::int64_t>::max(); const Chat& chat = m_Chats.at(m_CurrentChat); const int maxMsg = (m_OutHeight / 3) + 1; chat.m_Protocol->RequestMessages(chat.m_Id, m_ShowMsgIdBefore[m_CurrentChat].top(), maxMsg); RequestRedraw(m_ContactWinId | m_InputWinId); } } void UiCommon::InputBuf(wint_t ch) { std::lock_guard<std::mutex> lock(m_Lock); m_Input[m_CurrentChat].insert(m_InputCursorPos[m_CurrentChat], 1, ch); m_InputCursorPos[m_CurrentChat] = m_InputCursorPos[m_CurrentChat] + 1; if ((m_ShowEmoji) && (ch == L':')) { std::wstring before = m_Input[m_CurrentChat]; std::wstring after = Util::ToWString(emojicpp::emojize(Util::ToString(m_Input[m_CurrentChat]))); if (before != after) { m_InputCursorPos[m_CurrentChat] += after.size() - before.size(); after.insert(m_InputCursorPos[m_CurrentChat], std::wstring(1, EMOJI_PAD)); m_Input[m_CurrentChat] = after; m_InputCursorPos[m_CurrentChat] += 1; } } RequestRedraw(m_InputWinId); } void UiCommon::ToggleEmoji() { m_ShowEmoji = !m_ShowEmoji; RequestRedraw(m_InputWinId | m_OutputWinId); } <file_sep>// util.h // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #pragma once #include <string> #include <vector> class Util { public: static std::string GetConfigDir(); static int GetKeyCode(const std::string& p_KeyName); static std::vector<std::string> WordWrap(std::string p_Text, unsigned p_LineLength); static std::string ToString(const std::wstring& p_WStr); static std::wstring ToWString(const std::string& p_Str); }; <file_sep>// uilite.h // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #pragma once #include <map> #include <mutex> #include <stack> #include <string> #include <vector> #include <ncursesw/ncurses.h> #include "config.h" #include "uicommon.h" class Config; class Contact; struct Message; class Protocol; class UiLite : public UiCommon { public: UiLite(); virtual ~UiLite(); private: virtual std::map<std::string, std::string> GetPrivateConfig(); virtual void PrivateInit(); virtual void RedrawContactWin(); virtual void SetupWin(); virtual void CleanupWin(); WINDOW* m_StatusWin = NULL; }; <file_sep>#!/bin/bash # genman.sh builds application and (re-)generates its man-page mkdir -p build && cd build && cmake .. && make -s && cd .. && \ help2man -n "ncurses chat" -N -o src/nchat.1 ./build/bin/nchat exit ${?} <file_sep>// setup.h // // Copyright (c) 2019 <NAME> // All rights reserved. // // nchat is distributed under the MIT license, see LICENSE for details. #pragma once #include <memory> #include <vector> class Config; class Protocol; class Setup { public: static bool SetupProtocol(Config& p_Config, std::vector<std::shared_ptr<Protocol>> p_Protocols); }; <file_sep>brew "gperf" brew "cmake" brew "openssl" brew "ncurses"
8d7a6c12200f32cf5696a9477ddf83ca317579a7
[ "Ruby", "C++", "Shell" ]
11
C++
vilkoz/nchat
23e19b53a51fd62085f319a5577d8761e087cbd3
2d09b590a2936dcda535973079350b1fa0302281
refs/heads/master
<repo_name>ben9105/temp<file_sep>/README.md # temp temp converter <file_sep>/Temp.py numTemp = float(raw_input("What is the Temperature in F?")) degF = numTemp kelvin = 9/5 * (degF - 273) + 32 print "The Temperature in Kelvin is: ", kelvin
b052e00f7232a14b40c22294b29b29b4285d52ef
[ "Markdown", "Python" ]
2
Markdown
ben9105/temp
b675dadaf022f27be158c9d751b243e4632acbfd
7bd7b45987106a9857a3adc27547e22f96a83397
refs/heads/master
<repo_name>RubenBergshoeff/MPD_SpaceRacer<file_sep>/SpaceRacer/Assets/Scripts/PlatformSpecific/Mobile/M_InputHandler.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class M_InputHandler : IInputHandler { private Gyroscope gyro { get { if (!Input.gyro.enabled) { Input.gyro.enabled = true; } return Input.gyro; } } public float HorizontalAxis () { return Input.acceleration.x; } public Vector2 AimDirection () { throw new System.NotImplementedException (); } public bool FirePressed () { throw new System.NotImplementedException (); } } <file_sep>/SpaceRacer/Assets/Scripts/EnemyObjects/Astroid.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class Astroid : MonoBehaviour, IUpdatable { private float speed = 5; public void MyUpdate () { transform.position += Vector3.down * speed * Time.deltaTime; if (transform.position.y < GameManager.bottomlimit) { DestroyThis (); } } public void DestroyThis () { AstroidManager.AstroidDestroyed (this); Destroy (gameObject); } } <file_sep>/SpaceRacer/Assets/Scripts/Interfaces/IUpdatable.cs public interface IUpdatable { void MyUpdate (); } <file_sep>/SpaceRacer/Assets/Scripts/Managers/UpdateManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class UpdateManager : MonoBehaviour { private static UpdateManager Instance { get { if (hiddenInstance == null) { hiddenInstance = new GameObject ("UpdateManager").AddComponent <UpdateManager> (); hiddenInstance.updateList = new List<IUpdatable> (); hiddenInstance.removedUpdates = new List<IUpdatable> (); } return hiddenInstance; } } private static UpdateManager hiddenInstance; private List<IUpdatable> updateList; private List<IUpdatable> removedUpdates; private void Update () { for (int i = 0; i < updateList.Count; i++) { if (removedUpdates.Contains (updateList [i])) { RemoveUpdateable (updateList [i]); i--; } } foreach (var obj in updateList) { obj.MyUpdate (); } } public static void Subscribe (IUpdatable updatableObj) { if (!Instance.updateList.Contains (updatableObj)) { Instance.updateList.Add (updatableObj); } } public static void UnSubscribe (IUpdatable updatableObj) { if (Instance.updateList.Contains (updatableObj)) { Instance.removedUpdates.Add (updatableObj); } } private void RemoveUpdateable (IUpdatable updatable) { updateList.Remove (updatable); removedUpdates.Remove (updatable); if (updateList.Count == 0) { Destroy (gameObject); } } } <file_sep>/SpaceRacer/Assets/Scripts/Player/PlayerControl.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerControl : IUpdatable { PlayerModel playerModel; PlayerView playerView; IInputHandler input; private bool isAlive; public PlayerControl (PlayerView view, PlayerModel model, IInputHandler inputhandler) { playerView = view; playerView.OnCollided += DeathCollision; playerModel = model; isAlive = true; this.input = inputhandler; UpdateManager.Subscribe (this); } public void MyUpdate () { UpdateView (); } private void UpdateView () { playerView.ShipRotation += playerModel.rotationSpeed * -input.HorizontalAxis () * Time.deltaTime; playerView.ShipPosition += Vector2.right * playerModel.moveSpeed * input.HorizontalAxis () * Time.deltaTime; playerView.MyUpdate (); } public bool IsAlive () { return isAlive; } public void DestroyThis () { UpdateManager.UnSubscribe (this); } public void DeathCollision () { isAlive = false; // Debug.Log ("collision"); } } <file_sep>/SpaceRacer/Assets/Scripts/Player/PlayerModel.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerModel { public float moveSpeed = 6; public float rotationSpeed = 80; } <file_sep>/SpaceRacer/Assets/Scripts/Managers/SubMenuManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class SubMenuManager : MonoBehaviour { private MenuManager mManager; public void Setup (MenuManager manager) { mManager = manager; } public void StartGame () { mManager.StartGame (); } } <file_sep>/SpaceRacer/Assets/Scripts/Managers/MenuManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class MenuManager : MonoBehaviour { // Use this for initialization void Start () { GameObject menuObj = Instantiate (Resources.Load ("PlatformSpecific/MenuCanvas") as GameObject); menuObj.GetComponent <SubMenuManager> ().Setup (this); } public void StartGame () { SceneManager.LoadScene (1); } }<file_sep>/SpaceRacer/Assets/Editor/BuildManagement/BuildMenuItems.cs using UnityEngine; using UnityEditor; using UnityEditor.Build; using System.IO; using System.Collections.Generic; public class BuildMenuItems : IActiveBuildTargetChanged { static string resourceFolder = "/Resources/PlatformSpecific"; static string pcTemp = "/_PCFiles"; static string dpcTemp = Application.dataPath + pcTemp; static string mTemp = "/_MFiles"; static string dmTemp = Application.dataPath + mTemp; [MenuItem ("Platform/OSX")] public static void PerformSwitchOSX () { if (!Directory.Exists (dpcTemp)) { throw new System.ArgumentException ("No directory exists at " + dpcTemp); } DirectoryInfo dir; FileInfo[] files; if (!Directory.Exists (Application.dataPath + resourceFolder)) { if (!Directory.Exists (Application.dataPath + "/Recources")) { AssetDatabase.CreateFolder ("Assets", "Resources"); } AssetDatabase.CreateFolder ("Assets/Resources", "PlatformSpecific"); } else { dir = new DirectoryInfo (Application.dataPath + resourceFolder); files = dir.GetFiles (); foreach (FileInfo file in files) { if (file.Name.EndsWith (".meta")) { continue; } bool status = AssetDatabase.DeleteAsset ("Assets" + resourceFolder + "/" + file.Name); if (!status) { Debug.Log ("failed " + file.Name); } } } dir = new DirectoryInfo (dpcTemp); files = dir.GetFiles (); foreach (FileInfo file in files) { if (file.Name.EndsWith (".meta")) { continue; } bool status = AssetDatabase.CopyAsset ( "Assets" + pcTemp + "/" + file.Name, "Assets" + resourceFolder + "/" + file.Name); if (!status) { Debug.Log ("failed " + file.Name); } } AssetDatabase.Refresh (); Debug.Log ("Folders updated"); // // Switch to OSX standalone build. EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTargetGroup.Standalone, BuildTarget.StandaloneOSXUniversal); } [MenuItem ("Platform/Android")] public static void PerformSwitchAndroid () { if (!Directory.Exists (dmTemp)) { throw new System.ArgumentException ("No directory exists at " + dmTemp); } DirectoryInfo dir; FileInfo[] files; if (!Directory.Exists (Application.dataPath + resourceFolder)) { if (!Directory.Exists (Application.dataPath + "/Recources")) { AssetDatabase.CreateFolder ("Assets", "Resources"); } AssetDatabase.CreateFolder ("Assets/Resources", "PlatformSpecific"); } else { dir = new DirectoryInfo (Application.dataPath + resourceFolder); files = dir.GetFiles (); foreach (FileInfo file in files) { if (file.Name.EndsWith (".meta")) { continue; } bool status = AssetDatabase.DeleteAsset ("Assets" + resourceFolder + "/" + file.Name); if (!status) { Debug.Log ("failed " + file.Name); } } } dir = new DirectoryInfo (dmTemp); files = dir.GetFiles (); foreach (FileInfo file in files) { if (file.Name.EndsWith (".meta")) { continue; } bool status = AssetDatabase.CopyAsset ( "Assets" + mTemp + "/" + file.Name, "Assets" + resourceFolder + "/" + file.Name); if (!status) { Debug.Log ("failed " + file.Name); } } AssetDatabase.Refresh (); Debug.Log ("Folders updated"); // Switch to Android standalone build. EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTargetGroup.Android, BuildTarget.Android); } public int callbackOrder { get { return 0; } } public void OnActiveBuildTargetChanged (BuildTarget previousTarget, BuildTarget newTarget) { Debug.Log ("Active platform is now " + newTarget); } }<file_sep>/SpaceRacer/Assets/Scripts/PlatformSpecific/Dummy/D_InputHandler.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class D_InputHandler : IInputHandler { public float HorizontalAxis () { throw new System.NotImplementedException (); } public Vector2 AimDirection () { throw new System.NotImplementedException (); } public bool FirePressed () { throw new System.NotImplementedException (); } } <file_sep>/SpaceRacer/Assets/Scripts/PlatformSpecific/Base/InputHandler.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public interface IInputHandler { float HorizontalAxis (); Vector2 AimDirection (); bool FirePressed (); } <file_sep>/SpaceRacer/Assets/Scripts/Managers/GameManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class GameManager : MonoBehaviour, IUpdatable { public static float bottomlimit = -12; public Vector3 playerSpawnPosition; public List<Wave> waves; private Quaternion upRotation = Quaternion.Euler (new Vector3 (90, 180, 0)); private PlayerControl player; private float currentWaveStart; private int currentWave; private int currentWavePos; private float timeSinceLastWave = 0; // Use this for initialization void Awake () { // DontDestroyOnLoad (gameObject); UpdateManager.Subscribe (this); SetupLevel (); } void Start () { currentWaveStart = Time.time; currentWave = 0; currentWavePos = 0; } // Update is called once per frame public void MyUpdate () { if (!player.IsAlive ()) { SceneManager.LoadScene (0); } if (currentWave >= waves.Count) { timeSinceLastWave += Time.deltaTime; if (timeSinceLastWave > 10) { SceneManager.LoadScene (0); } return; } if (currentWavePos >= waves [currentWave].spawnEvents.Count) { currentWaveStart = Time.time; currentWave++; currentWavePos = 0; return; } if (Time.time - currentWaveStart > waves [currentWave].spawnEvents [currentWavePos].spawnTime) { AstroidManager.CreateAstroidAt (waves [currentWave].spawnEvents [currentWavePos].spawnPosition, waves [currentWave].spawnEvents [currentWavePos].astroidType); currentWavePos++; } } private void SetupLevel () { GameObject playerObject = Instantiate (Resources.Load ("PlatformSpecific/playerRocket") as GameObject, playerSpawnPosition, upRotation); PlayerView playerView = playerObject.AddComponent <PlayerView> (); PlayerModel playerModel = new PlayerModel (); player = new PlayerControl (playerView, playerModel, InputManager.Instance); } } <file_sep>/SpaceRacer/Assets/Scripts/PlatformSpecific/PC/PC_InputHandler.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class PC_InputHandler: IInputHandler { public float HorizontalAxis () { return Input.GetAxis ("Horizontal"); } public Vector2 AimDirection () { throw new System.NotImplementedException (); } public bool FirePressed () { throw new System.NotImplementedException (); } } <file_sep>/SpaceRacer/Assets/Scripts/Managers/AstroidManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class AstroidManager : MonoBehaviour, IUpdatable { private static AstroidManager Instance { get { if (hiddenInstance == null) { hiddenInstance = new GameObject ("AstroidManager").AddComponent <AstroidManager> (); hiddenInstance.astroids = new List<Astroid> (); hiddenInstance.diedAstroids = new List<Astroid> (); } return hiddenInstance; } } private static AstroidManager hiddenInstance; private List<Astroid> astroids; private List<Astroid> diedAstroids; private void Start () { UpdateManager.Subscribe (this); } public void MyUpdate () { for (int i = 0; i < astroids.Count; i++) { if (diedAstroids.Contains (astroids [i])) { RemoveAstroid (astroids [i]); i--; } } foreach (var astroid in astroids) { astroid.MyUpdate (); } } public static void CreateAstroidAt (Vector3 position, AstroidType type) { GameObject astroidObject = AstroidBuilder.ProvideAstroidOfType (type); astroidObject.transform.position = position; Astroid astroid = astroidObject.GetComponent <Astroid> (); Instance.astroids.Add (astroid); } public static void AstroidDestroyed (Astroid astroid) { if (Instance.astroids.Contains (astroid)) { Instance.diedAstroids.Add (astroid); } } private void RemoveAstroid (Astroid astroid) { astroids.Remove (astroid); diedAstroids.Remove (astroid); if (astroids.Count == 0) { UpdateManager.UnSubscribe (this); Destroy (gameObject); } } } <file_sep>/SpaceRacer/Assets/Scripts/PlatformSpecific/ManagersAndFactories/AstroidBuilder.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public enum AstroidType { SMALL, LARGE } public class AstroidBuilder { public static GameObject ProvideAstroidOfType (AstroidType astroidType) { GameObject astroidObject; #if UNITY_EDITOR || UNITY_STANDALONE_OSX switch (astroidType) { case AstroidType.SMALL: astroidObject = GameObject.Instantiate (Resources.Load ("PlatformSpecific/projectile") as GameObject); astroidObject.AddComponent <Astroid> (); return astroidObject; case AstroidType.LARGE: astroidObject = GameObject.Instantiate (Resources.Load ("PlatformSpecific/projectileLarge") as GameObject); astroidObject.AddComponent <Astroid> (); return astroidObject; default: astroidObject = GameObject.Instantiate (Resources.Load ("PlatformSpecific/projectile") as GameObject); astroidObject.AddComponent <Astroid> (); return astroidObject; } #elif UNITY_ANDROID switch (astroidType) { case AstroidType.SMALL: astroidObject = GameObject.Instantiate (Resources.Load ("PlatformSpecific/projectile") as GameObject); astroidObject.AddComponent <Astroid> (); return astroidObject; case AstroidType.LARGE: astroidObject = GameObject.Instantiate (Resources.Load ("PlatformSpecific/projectile") as GameObject); astroidObject.transform.localScale *= 1.5f; astroidObject.AddComponent <Astroid> (); return astroidObject; default: astroidObject = GameObject.Instantiate (Resources.Load ("PlatformSpecific/projectile") as GameObject); astroidObject.AddComponent <Astroid> (); return astroidObject; } #else switch (astroidType) { case AstroidType.SMALL: break; case AstroidType.LARGE: break; default: break; } #endif } } <file_sep>/SpaceRacer/Assets/Scripts/PlatformSpecific/ManagersAndFactories/InputManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Diagnostics; public static class InputManager { public static IInputHandler Instance { get { if (hiddenInstance == null) { hiddenInstance = CreateInstance (); } return hiddenInstance; } } private static IInputHandler hiddenInstance; private static IInputHandler CreateInstance () { #if UNITY_EDITOR || UNITY_STANDALONE_OSX return new PC_InputHandler (); #elif UNITY_ANDROID return new M_InputHandler (); #else return new D_InputHandler (); #endif } } <file_sep>/SpaceRacer/Assets/Scripts/Player/PlayerView.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerView : MonoBehaviour, IUpdatable { public delegate void PlayerViewEvent (); public PlayerViewEvent OnCollided; public float ShipRotation { get { return transform.rotation.eulerAngles.y; } set { if (value < 140) { value = 140; } if (value > 220) { value = 220; } transform.rotation = Quaternion.Euler (new Vector3 (transform.rotation.eulerAngles.x, value, transform.rotation.eulerAngles.z)); } } public Vector2 ShipPosition { get { return transform.position; } set { transform.position = value; } } public void MyUpdate () { } void OnCollisionEnter (Collision collision) { // Debug.Log (collision.collider.name); if (OnCollided != null) { OnCollided (); } } } <file_sep>/SpaceRacer/Assets/Scripts/EnemyObjects/Wave.cs using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public class SpawnEvent { public float spawnTime; public Vector2 spawnPosition = new Vector2 (0, 12); public AstroidType astroidType; } [CreateAssetMenu (fileName = "AstroidWave", menuName = "Astroid Wave", order = 1)] public class Wave : ScriptableObject { public List<SpawnEvent> spawnEvents; }
a34e676dd154d30a88d045a44940a00e6b91f745
[ "C#" ]
18
C#
RubenBergshoeff/MPD_SpaceRacer
b15c4e7aed3797e5dfe3d3dc27732d55806f795f
2d75ac357c1b5a57d0db31da01036b4a2ca0ee13
refs/heads/master
<file_sep><?php require 'calcSalary.php'; $salary = $_GET["salary"]; $inss = calc::calcInss($salary); $salary -= $inss; $irpf = calc::calcIrpf($salary); $salary -= $irpf; $result = array('salary' => $salary, 'inss' => $inss , 'irpf' => $irpf); echo json_encode($result); ?>
418110bda226f223a1f988e2e2bc3cdb968906b6
[ "PHP" ]
1
PHP
ricardo-faria/Ricardo-PayCheck
fc65ddc3ab8192a047aa4620ca8e483b61b934a4
040fa5b1617bf0facef7c01a0735af0398586d44
refs/heads/master
<repo_name>vattevaii/LinkedList<file_sep>/LinkList/Program.cs using System; namespace LinkList { class Program { static void Main() { LIST list = null; bool b; do { b = true; Console.Clear(); const string A = " 1 -- New List\n"; const string B = " 2 -- Display List\n"; const string E = " 3 -- Delete List\n"; const string F = " 4 -- Go To A List\n"; const string M = " 5 -- Merge Two Lists\n"; const string C = " 6 -- Exit\n"; const string D = " Please Insert Valid Choice\n"; // TODO Merge 2 Similar types of List in main Console.WriteLine(A+B+E+F+M+C); Console.Write("Your Choice : "); string choice = Console.ReadLine(); switch (choice) { case "1": int dex = CreateList(ref list); Console.WriteLine($"List {dex} Created."); break; case "2": int count = 0; DisplayList(list, "",ref count); if(count != 0)System.Console.WriteLine(); count = 0; DisplayList(list, "Normal",ref count); if(count != 0)System.Console.WriteLine(); count = 0; DisplayList(list, "Circular", ref count); if(count != 0)System.Console.WriteLine(); count = 0; DisplayList(list, "TwoWay", ref count); break; case "3": DeleteList(ref list); break; case "4": LoadNodes(ref list); break; case "5": MergeLists(ref list); break; case "6": b = false; break; default: Console.WriteLine(D); break; } Console.ReadKey(); } while (b); } /// <summary> /// Valid Input indicates a number which is not less than 1 /// </summary> /// <param name="a"></param> /// <returns></returns> private static int ValidInput(string a) { int input; bool tries = true; do { if (tries == false) Console.WriteLine("Please Enter Valid Number\n"); Console.Write(a); string s = Console.ReadLine(); if (!int.TryParse(s, out input)) { tries = false; } else { tries = true; } input--; //input of less than 0 if (input < 0) { Console.WriteLine("Invalid List"); tries = false; } } while (tries == false); return input; } /// <summary> /// Load a single List /// upto line 118 /// </summary> /// <param name="list"></param> private static void LoadNodes(ref LIST list) { //No Lists if(list == null) { Console.WriteLine("Please Create A List Before Loading Them\n"); } else { //Get valid Input const string A = "Which List do You Want to Load\n?"; int input = ValidInput(A); LIST l = list; while ((l != null) && (l.index != input)) { l = l.GetNext(); } // Not found if (l == null) { Console.WriteLine($"List {input + 1} not found in the Created Lists"); } //While statement run or not.. ie Node with input found else { l.LoadList(); } } } /// <summary> /// Deletion Of A List /// upto Line 164 /// </summary> /// <param name="ll"></param> private static void DeleteList(ref LIST ll) { // List is Empty if (ll == null) { Console.WriteLine("Create A List First"); } //not Empty else { //Get valid Input const string A = "Which List Do you Want to Delete\n?"; int input = ValidInput(A); //To Delete LIST l = ll; //Parent of the element to delete LIST p = null; while ((l != null) && (l.index != input)) { p = l; l = l.GetNext(); } // Not found if (l == null) { Console.WriteLine($"List {input + 1} not found in the Created Lists"); } //While statement not run.. ie First List Delete //First List = Second List else if (p == null) { Console.WriteLine("Type : " + l.Type); ll = l.GetNext(); //l = null; Console.WriteLine($"List {input + 1} was deleted.."); } //Delete Parent->next else { p.DeleteNext(ref l); Console.WriteLine($"List {input + 1} was deleted.."); } } } /// <summary> /// Creation Of List ... /// NOTE : No data inserted /// </summary> /// <param name="ll"></param> public static int CreateList(ref LIST ll) { int ind; // = new int(); if(ll == null) { ll = new LIST(); ind = ll.index; } else { LIST index = LIST.GetMaxList(ll); ind = index.index + 1; LIST.PutAnotherList(index, ind); } return (ind+1); } /// <summary> /// Displaying List according to given type /// Not Nodes /// </summary> /// <param name="ll"></param> public static void DisplayList(LIST ll, string type, ref int count) { LIST next = ll; if (next == null) { if(type == "") Console.WriteLine("NO Lists CREATED..."); } else { while (next != null) { LIST.DisplayList(next, type, ref count); next = next.GetNext(); } } } /// <summary> /// Merging Two Similar Lists /// </summary> /// <param name="list"></param> private static void MergeLists(ref LIST list) { // List is Empty if (list == null) { Console.WriteLine("Create A List First"); return; } int count1 = 0, count2 = 0, count3 = 0; DisplayList(list, "Normal", ref count1); DisplayList(list, "Circular", ref count2); DisplayList(list, "TwoWay", ref count3); if (count1 > 1) { Console.WriteLine(" Merge Two Normal LinkedList\n?(Y/N)"); string opt = Console.ReadLine(); if (opt.ToLower() == "y") { LIST.MergeLists(ref list, "Normal"); return; } } if (count2 > 1) { Console.WriteLine(" Merge Two Circular LinkedList\n?(Y/N)"); string opt = Console.ReadLine(); if (opt.ToLower() == "y") { LIST.MergeLists(ref list, "Circular"); return; } } if(count3 > 1) { Console.WriteLine(" Merge Two TwoWay LinkedList\n?(Y/N)"); string opt = Console.ReadLine(); if (opt.ToLower() == "y") { LIST.MergeLists(ref list, "TwoWay"); return; } } System.Console.Write("Insufficient number of lists.\nOr,YOU DID NOT CHOOSE TO MERGE"); } //End Of Class PROGRAM } } <file_sep>/LinkList/Options.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace LinkList { public static class Option { private const string I = "Insert New Node"; private const string D = "Delete Node"; private const string Di = "Display Nodes for this List"; private const string E = "Exit from List"; private const string G = "Go Back"; public static void OptionList() => Console.WriteLine( " 1 -- Normal List\n" +" 2 -- Circular List\n" +" 3 -- TwoWay List\n" +" 4 -- " + E + '\n' ); public static void OptionsCommon() => Console.WriteLine( " 1 -- " + I + '\n' + " 2 -- " + D + '\n' + " 3 -- " + Di + '\n' + " 4 -- " + E + '\n' ); public static void InsertTwoWay() => Console.WriteLine( "1 -- " + I + " (in the front of List)\n" + "2 -- " + I + " (in the end of List)\n" + "3 -- " + I + " After _____\n" + "4 -- " + I + " Before _____\n" + "5 -- " + G + " \n"); public static void DeleteTwoWay() => Console.WriteLine( "1 -- " + D + " (first)\n" + "2 -- " + D + " (last)\n" + "3 -- " + D + " (known Data) \n" + "4 -- " + G + " \n"); public static void InsertCircular() => Console.WriteLine( "1 -- " + I + " \n" + "2 -- " + I + " After _____\n" + "3 -- " + G + " \n"); public static void DeleteCircular() => Console.WriteLine( "1 -- " + D + " (any)\n" + "2 -- " + D + " (known Data) \n" + "3 -- " + G + " \n"); public static void InsertNormal() => Console.WriteLine( "1 -- " + I + " (in the front of List)\n" + "2 -- " + I + " (in the end of List)\n" + "3 -- " + I + " After _____\n" + "4 -- " + G + " \n"); public static void DeleteNormal() => Console.WriteLine( "1 -- " + D + " (first)\n" + "2 -- " + D + " (last)\n" + "3 -- " + D + " (known Data) \n" + "4 -- " + G + " \n"); } } <file_sep>/README.md # LinkedList C# used ... CONSOLE APPLICATION EveryThing but Merge Works... <file_sep>/LinkList/NormalNode.cs using System; using System.Collections.Generic; using System.Text; namespace LinkList { class NormalNode : INode { private NormalNode next; private string info; public NormalNode() { info = ""; next = null; } void INode.InsertNodes() { bool b;// = new bool(); do { const string C = " Please Insert Valid Choice\n"; b = true; Console.Clear(); Option.InsertNormal(); this.DisplayAll(); Console.Write("Your Choice : "); string choice = Console.ReadLine(); switch (choice) { case "1": InsertFront(); break; case "2": InsertLast(); break; case "3": InsertAfter(); break; case "4": b = false; break; default: Console.WriteLine(C); Console.ReadKey(); break; } } while (b); } private void InsertAfter() { Console.Write("Enter The Data You Want To Store : "); string ii; do { ii = Console.ReadLine(); } while (ii == ""); if (info == "") { Console.WriteLine("No Data present in the List..\n DATA NOT INSERTED"); Console.ReadKey(); } else { NormalNode newNode = new NormalNode { info = ii }; NormalNode current = this; Console.Write("\nAfter which Data You want to Store : "); String cmp = Console.ReadLine(); while ((current != null) && (current.info.ToLower().Equals(cmp.ToLower()) == false)) { current = current.next; } if(current == null) { Console.WriteLine($"{cmp} not found in Nodes..\n DATA NOT INSERTED"); Console.ReadKey(); } else { newNode.next = current.next; current.next = newNode; } } } private void InsertLast() { Console.Write("Enter The Data You Want To Store : "); string ii; do { ii = Console.ReadLine(); } while (ii == ""); if (info == "") { info = ii; } else { NormalNode newNode = new NormalNode { info = ii }; NormalNode current = this; while(current.next != null) { current = current.next; } current.next = newNode; } } private void InsertFront() { Console.Write("Enter The Data You Want To Store : "); string ii; do { ii = Console.ReadLine(); } while (ii == ""); if (info == "") { info = ii; } else { NormalNode newNode = new NormalNode { info = this.info, next = this.next }; this.info = ii; this.next = newNode; } } void INode.DeleteNodes() { bool b;// = new bool(); do { const string C = " Please Insert Valid Choice\n"; b = true; Console.Clear(); Option.DeleteNormal(); this.DisplayAll(); Console.Write("Your Choice : "); string choice = Console.ReadLine(); switch (choice) { case "1": DeleteFirst(); break; case "2": DeleteLast(); break; case "3": DeleteData(); break; case "4": b = false; break; default: Console.WriteLine(C); Console.ReadKey(); break; } } while (b); } private void DeleteLast() { if (info == "") { Console.WriteLine("No Data Present To Delete..\n Deletition couldn't be performed"); Console.ReadKey(); } else { NormalNode current = this; NormalNode parent = null; while (current.next != null) { parent = current; current = current.next; } if(parent == null) { this.DeleteFirst(); } else { parent.next = null; //current = null; } } } private void DeleteFirst() { if (info == "") { Console.WriteLine("No Data Present To Delete.."); Console.ReadKey(); } else { NormalNode current = this.next; if(current == null) { this.info = ""; } else { this.info = current.info; this.next = current.next; //current = null; } } } private void DeleteData() { if (info == "") { Console.WriteLine("No Data Present To Delete..\n Deletition couldn't be performed"); Console.ReadKey(); } else { NormalNode current = this; NormalNode parent = null; Console.Write("\nWhich Data You want to Delete : "); String cmp = Console.ReadLine(); while ((current != null) && (current.info.ToLower().Equals(cmp.ToLower()) == false)) { parent = current; current = current.next; } if(current == null) { Console.WriteLine($"{cmp} Not Present..\n Deletition couldn't be performed"); Console.ReadKey(); } else if(parent == null) { this.DeleteFirst(); } else { parent.next = current.next; //current = null; } } } void INode.DisplayNodes() { this.DisplayAll(); } private void DisplayAll() { NormalNode current = this; Console.Write("Nodes :"); if (info == "") { Console.WriteLine(" Empty Linear Node\n"); } else { do { Console.Write($" {current.info} "); current = current.next; } while (current != null); Console.WriteLine("\n"); } } } } <file_sep>/LinkList/LIST.cs using System; using System.Collections.Generic; using System.Text; namespace LinkList { public class LIST { public int index; private LIST next; private string type; private INode head = null; public string Type => type; public LIST(int i = 0, LIST nxt = null) { index = i; next = nxt; type = ""; } // New List public static void PutAnotherList(LIST index, int i) { LIST newList = new LIST(i); index.next = newList; } public static LIST GetMaxList(LIST ll) { LIST current = ll; while (current.next != null) { current = current.next; } return current; } public LIST GetNext() { return this.next; } public static void DisplayList(LIST ll, string type, ref int count) { if (ll.type == type) { if(count == 0) { if (type == "") type = "Unspecified"; Console.Write($" All {type} Lists : "); } Console.Write((ll.index + 1) + " "); count++; } } public void DeleteNext(ref LIST deleted) { Console.WriteLine("Type : " + deleted.type); this.next = deleted.next; deleted = null; } public void LoadList() { bool b; if (type == "") { do { const string C = " Please Insert Valid Choice\n"; b = true; Console.Clear(); Option.OptionList(); Console.Write("Which List Do you Want To make\n?"); string choice = Console.ReadLine(); switch (choice) { case "1": type = "Normal"; head = new NormalNode(); break; case "2": type = "Circular"; head = new CircularNode(); break; case "3": type = "TwoWay"; head = new TwoWayNode(); break; case "4": break; default: b = false; Console.WriteLine(C); break; } } while (!b); } if (type != "") { do { const string C = " Please Insert Valid Choice\n"; b = true; Console.Clear(); Console.WriteLine($"List {index + 1} Loaded. Type : {type} LinkedList\n"); Option.OptionsCommon(); Console.Write("Your Choice : "); string choice = Console.ReadLine(); switch (choice) { case "1": head.InsertNodes(); break; case "2": head.DeleteNodes(); break; case "3": head.DisplayNodes(); break; case "4": b = false; break; default: Console.Write(C); Console.ReadKey(); break; } } while (b); } } internal static void MergeLists(ref LIST list, string v) { Console.Clear(); Console.WriteLine($"Merger of {v} LinkedLists\n"); int neww = Program.CreateList(ref list); System.Console.WriteLine("Merged LinkedList will be stored in List " + neww); int c = 0; Program.DisplayList(list, v, ref c); Console.WriteLine(); Console.WriteLine("Merge : "); int one,two; try { Console.Write("1st List number :"); one = Console.Read(); Console.Write("2nd List Number : "); two = Console.Read(); } catch(Exception e) { Console.WriteLine(e.Message); } } } }<file_sep>/LinkList/INode.cs using System; using System.Collections.Generic; using System.Text; namespace LinkList { interface INode { void InsertNodes(); void DeleteNodes(); void DisplayNodes(); } }
ba9de01d3ce4e0a4e5b54ededb716ed9b70bfc4e
[ "Markdown", "C#" ]
6
C#
vattevaii/LinkedList
36d0e386c6c714f928351c01598662ce5085fa29
8e1cd9a9f21836c51e4824e5a6840f287c93ba9a
refs/heads/master
<file_sep># python-opencv-ffmpeg-lambda Lambda function with python, Opencv, & ffmpeg. ````text testing: docker run -it -v $PWD:/var/task lambci/lambda:build bash e.g. (windows) docker run -it -v /C/Projects/python-opencv-ffmpeg-lambda/:/var/task lambci/lambda:build bash ./build.sh copy .mpg into /C/Projects/python-opencv-ffmpeg-lambda export PATH=$PATH:/var/task/lib python lambda_function.py ```` ````text validate: running python lambda_function.py display: version true It Works ls -lrta /tmp list image_0.jpeg with a size ```` <file_sep>#!/bin/sh -x export BUILD_DIR=$PWD yum groupinstall -y "Development Tools" && yum install -y cmake bsdtar nasm yum install -y python-devel curl -O https://bootstrap.pypa.io/get-pip.py && python get-pip.py pip install numpy NUMPY=/usr/local/lib64/python2.7/site-packages/numpy/core/include set -x && mkdir -pv ~/tmp && cd ~/tmp \ && curl https://ffmpeg.org/releases/ffmpeg-3.0.2.tar.bz2 | tar -jxf - && cd ffmpeg-* \ && ./configure --enable-shared --disable-static --disable-programs --disable-doc --prefix=/var/task \ && make install set -x && mkdir -pv ~/tmp && cd ~/tmp \ && curl -L https://github.com/Itseez/opencv/archive/3.1.0.zip | bsdtar -xf- && cd opencv-* \ && mkdir build && cd build \ && curl -L https://github.com/Itseez/opencv_contrib/archive/3.1.0.tar.gz | tar -zxf - && CONTRIB=$(ls -d opencv_contrib-*/modules) \ && PKG_CONFIG_PATH=/var/task/lib/pkgconfig cmake -D OPENCV_EXTRA_MODULES_PATH=$CONTRIB -D PYTHON2_NUMPY_INCLUDE_DIRS=$NUMPY -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_PYTHON_SUPPORT=ON -D CMAKE_INSTALL_PREFIX=/var/task ../ \ && LD_LIBRARY_PATH=/var/task/lib make install #PACKAGE cd $BUILD_DIR mkdir lambda lambda/lib cd lambda cd lib cp /var/task/lib . cd .. cp /root/tmp/opencv-3.1.0/build/lib/cv2.so cv2.so zip -r $BUILD_DIR/lambda.zip . cd .. zip -g lambda.zip lambda_function.py <file_sep>import cv2 def lambda_handler(event, context): print "OpenCV installed version:", cv2.__version__ fname = "./test.mpg" cam = cv2.VideoCapture(fname) print cam.isOpened() frameId = cam.get(1) ret, img = cam.read() imagesFolder = "/tmp" filename = imagesFolder + "/image_" + str(int(frameId)) + ".jpg" cv2.imwrite(filename, img) return "It works!" if __name__ == "__main__": lambda_handler(42, 42)
7db4e9c373d17362fcd1cc2c6a6ca7f6bdb6126d
[ "Markdown", "Python", "Shell" ]
3
Markdown
tkntobfrk/python-opencv-ffmpeg-lambda
4228efdc8b50a494f5dbb60e252020a470891c1c
60d0983059dece418ff551b008fda4391c375a28
refs/heads/master
<file_sep>import { useState, useCallback, useRef, useEffect } from 'react'; import useDebouncedCallback from './callback'; export default function useDebounce<T>(value: T, delay: number, options?: { maxWait?: number }): [T, () => void] { const [state, dispatch] = useState(value); const [callback, cancel] = useDebouncedCallback(useCallback((value) => dispatch(value), []), delay, options); const previousValue = useRef(value); useEffect(() => { // We need to use this condition otherwise we will run debounce timer for the first render (including maxWait option) if (previousValue.current !== value) { callback(value); previousValue.current = value; } }, [value, callback]); return [state, cancel]; } <file_sep>import useDebounce from './cache'; import useDebouncedCallback from './callback'; export { useDebounce, useDebouncedCallback };
d0331d5efae9be6cda6d17f753f1300d69097097
[ "TypeScript" ]
2
TypeScript
frantallukas10/use-debounce
8c463a3668898a30890f86c677ceb0c29d969fa1
d2a73cd61ad44d1b104dfa8c7a9956574eabee60
refs/heads/master
<repo_name>agile-swift/ATFoundation<file_sep>/ATFoundation/Classes/DateExtension.swift // // NSDateExtension.swift // Pods // // Created by Spider on 17/9/11. // // import Foundation let WEEK:Double = 604800 let DAY:Double = 86400 let HOUR:Double = 3600 let unitSet:Set<Calendar.Component> = [Calendar.Component.year, Calendar.Component.month, Calendar.Component.day, Calendar.Component.hour, Calendar.Component.second, Calendar.Component.minute, Calendar.Component.weekday, Calendar.Component.weekdayOrdinal] public enum DateUnit: Int{ case Seconds = 1 case Minute = 60 case Hour = 3600 case Day = 86400 case Week = 604800 } public protocol DateType { var date : Date { get } } extension Date : DateType { public var date: Date { return self } } extension NSDate : DateType { public var date: Date { return self as Date } } extension TimeInterval : DateType { public var date : Date { return Date.init(timeIntervalSince1970: self) } } private let formatter:DateFormatter = DateFormatter() public func dateString(format:String,date:DateType)->String { if format != formatter.dateFormat { formatter.dateFormat = format } return formatter.string(from: date.date) } public extension Date { public static var now : Date { return Date() } public func before(_ value:UInt = 1,unit:DateUnit = .Day) -> Date { return self.addingTimeInterval(Double(-unit.rawValue * Int(value))) } public func after(_ value:UInt = 1,unit:DateUnit = .Day) -> Date { return self.addingTimeInterval(Double(unit.rawValue * Int(value))) } public func tomorrow(_ value:UInt = 1,unit:DateUnit = .Day) -> Date { return after(1, unit: .Day) } public func yesterday(_ value:UInt = 1,unit:DateUnit = .Day) -> Date { return before(1, unit: .Day) } public func afterHours(_ value:UInt = 1,unit:DateUnit = .Hour) -> Date { return after(value, unit: unit) } public func beforeHours(_ value:UInt = 1,unit:DateUnit = .Hour) -> Date { return before(value, unit: unit) } public func isEqualToDateIgnorTime(_ date: Date)->Bool { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents let component2:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:date) as NSDateComponents return (component1.year == component2.year) && (component1.month == component2.month) && (component1.day == component2.day) } public func isToday()->Bool { return isEqualToDateIgnorTime(Date.now) } public func isTomorrow()->Bool { return isEqualToDateIgnorTime(tomorrow()) } public func isYesterday()->Bool { return isEqualToDateIgnorTime(yesterday()) } public func isSameWeekAsDate(_ date: Date)->Bool { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents let component2:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:date) as NSDateComponents if component1.weekOfYear != component2.weekOfYear { return false } return self.timeIntervalSince(date as Date)<WEEK } public func isThisWeek() -> Bool { return isSameWeekAsDate(Date.now) } public func isSameYearAsDate(_ date: Date) -> Bool { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents let component2:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:date) as NSDateComponents return component1.year == component2.year } public func isThisYear() -> Bool { return isSameWeekAsDate(Date.now) } public func hour() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.hour } public func minute() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.minute } public func seconds() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.second } public func day() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.day } public func month() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.month } public func week() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.weekOfYear } public func weekDay() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.weekday } public func nthWeekday() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.weekdayOrdinal } public func year() -> Int { let component1:NSDateComponents = NSCalendar.current.dateComponents(unitSet, from:self) as NSDateComponents return component1.year } } <file_sep>/ATFoundation/Classes/StringExtension.swift // // StringExtension.swift // Pods // // Created by Spider on 17/9/13. // // import Foundation extension String { //分割字符串 - 遇见多少个就分割多少个 public func split(str: String) -> [String] { if str.isEmpty { var strArr = [String]() for char in self { strArr.append(String(char)) } return strArr //空的话、无缝分割 } return self.components(separatedBy: str) } //颠倒字符串 public func reverse() -> String { let str = self.split(str: "").reversed() var newStr = "" for s in str { newStr += s } return newStr } //统计字符串个数 public func howMany(str: String) -> Int { let strArr = str.split(str: "") var console = 0 //控制字符 var times = 0 for char in self { if String(char) == strArr[console] { console += 1 if console >= strArr.count { console = 0 times += 1 } } else { console = 0 } } return times } /** 格式化字符串 e.g. input 12345002 output 123,450.02 or ¥123,450.02 */ public func formatMoney(hasSymbol:Bool,unit:String,toIntIfNeed:Bool) -> String { numberFormat.shared.currencySymbol = (!hasSymbol) ?"":"¥YYY" let moneyNum:NSNumber = NSNumber.init(value:(self as NSString).doubleValue * 0.01) var moneyStr = numberFormat.shared.string(from: moneyNum)! as String let strArray:[String] = moneyStr.components(separatedBy: ".") if toIntIfNeed && strArray.count == 2 && strArray.last! == "00" { moneyStr = strArray.first! } else if !toIntIfNeed && strArray.count == 1 { moneyStr = moneyStr + ".00" } if !unit.isEmpty { moneyStr += unit } return moneyStr } /** 去掉左右的空格和换行符 */ public func trim() -> String { return self.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) } /** 如果swift再次升级改变函数,这样修改起来方便 */ public func has(other:String) -> Bool { return self.contains(other) } /** 这个太经典了,获取指定位置和大小的字符串(这里仿OC中NSString的语法) - parameter start : 起始位置 - parameter length : 长度 - returns : 字符串 */ public func subString(start:Int, length:Int = -1) -> String { var len = length if len == -1 { len = self.count - start } let st = self.index(self.startIndex, offsetBy:start) let en = self.index(st, offsetBy:len) let range = st ..< en return String(self[range]) } /** 替换字符串 */ public func replace(of:String,with:String) -> String { return self.replacingOccurrences(of: of, with: with) } /** 单行字符串的size */ public func sizeWithFont(font:UIFont) -> CGSize { let strs = [NSAttributedString.Key.font:font] let string:NSString = self as NSString return string.size(withAttributes: strs) } /** 获取文字的宽高 */ public func textSize(text:String,font:UIFont,fontNumber:CGFloat) -> CGSize { let attributes = [NSAttributedString.Key.font:font]; let option = NSStringDrawingOptions.usesLineFragmentOrigin let size = CGSize(width:CGFloat(MAXFLOAT),height:fontNumber) let rect:CGRect = text.boundingRect(with: size, options: option, attributes: attributes, context: nil) return rect.size } /** 将16进制字符串转为Int */ public var hexInt:Int { return Int(self,radix:16) ?? 0 } /** 获取字符串长度 */ public var length:Int { return self.count } } public final class numberFormat: NumberFormatter { static let shared = numberFormat() private override init() { super.init() self.numberStyle = .decimal self.currencyCode = "" } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } } <file_sep>/Example/ATFoundation/ViewController.swift // // ViewController.swift // ATFoundation // // Created by TimeToThink on 09/11/2017. // Copyright (c) 2017 TimeToThink. All rights reserved. // import UIKit import ATFoundation class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource,UIAlertViewDelegate { let clickBlock:(_ a:Int)->() = {(_ a) in logN("执行了 Block "+a.description) } lazy var modelArray:[Model] = { var models : [Model] = [] for i in 0..<20 { var model = Model() model.name = "Celestial Ruler Supreme God " model.age = 20 + i model.gender = " male" models.append(model) } return models }() override func viewDidLoad() { super.viewDidLoad() initTableView() } func initTableView(){ let ScreenHeight = UIScreen.main.bounds.size.height let tableView = UITableView.init(frame:CGRect(x: 0, y: 64, width: 375, height: ScreenHeight-64), style: .plain) tableView.delegate = self tableView.dataSource = self tableView.rowHeight = 50 tableView.register(DemoCell.classForCoder(), forCellReuseIdentifier: "identifier") self.view.addSubview(tableView) } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.modelArray.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let identifier = "identifier" let cell:DemoCell? = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) as? DemoCell cell?.model = self.modelArray[indexPath.row] return cell! } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { clickBlock(indexPath.row) logN("my kkk is kkkkk".howMany(str: "")) } } <file_sep>/Example/Podfile use_frameworks! target 'ATFoundation_Example' do pod 'ATFoundation', :path => '../' target 'ATFoundation_Tests' do inherit! :search_paths end end <file_sep>/Example/ATFoundation/DemoCell.swift // // DemoCell.swift // ATFoundation // // Created by Spider on 17/9/18. // Copyright © 2017年 CocoaPods. All rights reserved. // import UIKit class DemoCell: UITableViewCell { private let label = UILabel() internal var model:Model = Model(){ didSet { self.label.text = self.model.name + model.age.description + model.gender // print(self.label.text ?? "默认") } } override init(style: UITableViewCellStyle, reuseIdentifier: String?) { self.model = Model() super.init(style: style, reuseIdentifier: reuseIdentifier) setUpUI() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } func setUpUI() { self.label.frame = CGRect.init(x: 20, y: 15, width: 200, height: 20) self.label.font = UIFont.boldSystemFont(ofSize: 14) self.contentView.addSubview(self.label) } } <file_sep>/Example/ATFoundation/Model.swift // // Model.swift // ATFoundation // // Created by Spider on 17/9/18. // Copyright © 2017年 CocoaPods. All rights reserved. // import UIKit class Model: NSObject { var name = "" var age = 0 var gender = "" } <file_sep>/ATFoundation/Classes/FoundationMacros.swift // // FoundationMacros.swift // Pods // // Created by 凯文马 on 2017/12/12. // import UIKit // MARK: Lock public typealias Lock = AnyObject public func synchronized(_ lock:Lock,closure:()->()) { objc_sync_enter(lock) closure() objc_sync_exit(lock) } <file_sep>/ATFoundation/Classes/LogManager.swift // // LogManager.swift // Pods // // Created by Spider on 17/9/18. // // import Foundation /// log level of customer log public enum LogLevel : String{ case normal = "💚" case warning = "💛 " case error = "💔" case none = "" } /// obtain log message delegate, for class only public protocol LogManagerDelegate : class { func logManager(_ logManager : LogManager, didReceiveLog log : String) } /// the manager of log final public class LogManager { private init() { } public static let shared = LogManager() weak public var delegate : LogManagerDelegate? public var logEnable : Bool { get { return _logEnable } } /// enable log , default is true in DEBUG, otherwise false public func enableLog(){ _logEnable = true } public func disableLog(){ _logEnable = false } private var _logEnable:Bool = { ()->Bool in #if DEBUG return true #else return false #endif }() } /// log method instead of the system print, just like log in Android. /// i think you need to copy this method to your project, and blank in your own key /// output : 'kevin 💚 ViewController.swift.15 ViewController ["call Block 1"]' /// /// - Parameters: /// - key: keyword to filter /// - level: log level,filter too /// - function: call this methed in which function /// - file: log in file /// - line: log of line /// - message: log message public func logger(key:String = "", level:LogLevel = .normal, function : String = #function , file : String = #file, line : Int = #line, _ message: Any...){ if LogManager.shared.logEnable { let fileStr = file.components(separatedBy: CharacterSet.init(charactersIn: "/")).last ?? "" let str = convert(items: message) let keyStr = key.count != 0 ? "\(key)" : "" LogManager.shared.delegate?.logManager(LogManager.shared, didReceiveLog: str) print(level.rawValue + keyStr + "\t\(fileStr).\(line)\t\(function)\t\(str)\n") } } public func logN(key:String = "", function : String = #function , file : String = #file, line : Int = #line, _ message: Any...){ logger(key: key, level: .normal, function: function, file: file, line: line, message) } public func logW(key:String = "", function : String = #function , file : String = #file, line : Int = #line, _ message: Any...){ logger(key: key, level: .warning, function: function, file: file, line: line, message) } public func logE(key:String = "", function : String = #function , file : String = #file, line : Int = #line, _ message: Any...){ logger(key: key, level: .error, function: function, file: file, line: line, message) } private func convert(items : [Any]?) -> String { let strings = (items ?? []).map { (item) -> String in return "\(item)" } let string = strings.joined(separator: " ") return string } extension LogManagerDelegate { func logManager(_ logManager : LogManager, didReceiveLog log : String) { } } <file_sep>/ATFoundation/Classes/App.swift // // NSApp.swift // Pods // // Created by Spider on 17/9/12. // // import UIKit import Foundation /// message of app final public class App : NSObject { /// device name public class var iPhoneName : String { return UIDevice.current.name } /// app name public class var appName : String { let name = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String return name ?? "None" } /// app version public class var appVersion : String { let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String return version } public class var appDetailVersion : String { let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String return version } public class var betteryLevel : Float { return UIDevice.current.batteryLevel } public class var localizedMode : String { return UIDevice.current.localizedModel } public class var systemVersion : String { return UIDevice.current.systemVersion } public class var systemName : String { return UIDevice.current.systemName } public class var uuid : String { return UIDevice.current.identifierForVendor?.uuidString ?? "" } public class var deviceName : String { var systemInfo = utsname() uname(&systemInfo) let machineMirror = Mirror(reflecting: systemInfo.machine) let identifier = machineMirror.children.reduce("") { identifier, element in guard let value = element.value as? Int8, value != 0 else { return identifier } return identifier + String(UnicodeScalar(UInt8(value))) } switch identifier { case "iPod5,1": return "iPod Touch 5" case "iPod7,1": return "iPod Touch 6" case "iPhone3,1", "iPhone3,2", "iPhone3,3": return "iPhone 4" case "iPhone4,1": return "iPhone 4s" case "iPhone5,1", "iPhone5,2": return "iPhone 5" case "iPhone5,3", "iPhone5,4": return "iPhone 5c" case "iPhone6,1", "iPhone6,2": return "iPhone 5s" case "iPhone7,2": return "iPhone 6" case "iPhone7,1": return "iPhone 6 Plus" case "iPhone8,1": return "iPhone 6s" case "iPhone8,2": return "iPhone 6s Plus" case "iPhone8,4": return "iPhone SE" case "iPhone9,1","iPhone9,3": return "iPhone 7" case "iPhone9,2","iPhone9,4": return "iPhone 7 Plus" case "iPhone10,1","iPhone10,4": return "iPhone 8" case "iPhone10,2","iPhone10,5": return "iPhone 8 Plus" case "iPhone10,3","iPhone10,6": return "iPhone X" case "iPad1,1": return "iPad" case "iPad1,2": return "iPad 3G" case "iPad2,1": return "iPad 2 (WiFi)" case "iPad2,2","iPad2,4": return "iPad 2" case "iPad2,3": return "iPad 2 (CDMA)" case "iPad2,5": return "iPad Mini (WiFi)" case "iPad2,6": return "iPad Mini" case "iPad2,7": return "iPad Mini (GSM+CDMA)" case "iPad3,1": return "iPad 3 (WiFi)" case "iPad3,2": return "iPad 3 (GSM+CDMA)" case "iPad3,3": return "iPad 3" case "iPad3,4": return "iPad 4 (WiFi)" case "iPad3,5": return "iPad 4" case "iPad3,6": return "iPad 4 (GSM+CDMA)" case "iPad4,1": return "iPad Air (WiFi)" case "iPad4,2": return "iPad Air (Cellular)" case "iPad4,4": return "iPad Mini 2 (WiFi)" case "iPad4,5": return "iPad Mini 2 (Cellular)" case "iPad4,6": return "iPad Mini 2" case "iPad4,7","iPad4,8","iPad4,9": return "iPad Mini 3" case "iPad5,1": return "iPad Mini 4 (WiFi)" case "iPad5,2": return "iPad Mini 4 (LTE)" case "iPad5,3","iPad5,4": return "iPad Air 2" case "iPad6,3","iPad6,4": return "iPad Pro 9.7" case "iPad6,7","iPad6,8": return "iPad Pro 12.9" case "i386","x86_64": return "Simulator" default: return identifier } } } <file_sep>/ATFoundation/Classes/DictionaryExtension.swift // // DictionaryExtension.swift // Pods // // Created by Spider on 17/9/12. // // import Foundation public extension Dictionary { static public func += (a:inout Dictionary,b:Dictionary) { for (key,value) in b { a.updateValue(value, forKey: key) } } } <file_sep>/README.md # ATFoundation 基本功能 ## 集成([CocoaPods](http://cocoapods.org)) 在 podfile 文件中添加 ``` source "https://github.com/agile-swift/Specs.git" pod 'ATFoundation' ``` ## 详细信息 请移步[https://github.com/agile-swift/AgileTools/blob/master/README.md](https://github.com/agile-swift/AgileTools/blob/master/README.md) ## 功能 * 应用信息获取 * String扩展 * Dictionary扩展 * Date扩展 * 自定义日志输出管理 ## 反馈 <EMAIL>,<EMAIL>, <EMAIL>
4077e7a7dbfb348ccd9b9041e686a72a5a894088
[ "Swift", "Ruby", "Markdown" ]
11
Swift
agile-swift/ATFoundation
2995d2fb3c559bde8ed40fb98915645df5655647
3c56644d5d1c115319e8094353aa5052db7d9705
refs/heads/master
<repo_name>rponline/lektor<file_sep>/tests/test_images.py import io import os from datetime import datetime import pytest from lektor._compat import iteritems from lektor.imagetools import get_image_info def almost_equal(a, b, e=0.00001): return abs(a - b) < e @pytest.fixture(scope='function') def make_svg(): def _make_svg(size_unit=None, with_declaration=True, w=100, h=100): emotional_face = """<svg xmlns="http://www.w3.org/2000/svg" \ height="{h}{unit}" width="{w}{unit}"> <circle cx="50" cy="50" r="50" fill="lightgrey"/> <circle cx="30" cy="30" r="10" fill="black"/> <circle cx="60" cy="30" r="10" fill="black"/> <path stroke="black" d="M30 70 l30 0" stroke-width="5"/> </svg>""" \ .format(unit=size_unit or '', w=w, h=h) \ .encode('utf-8') if with_declaration: xml_declaration = b'<?xml version="1.0" standalone="yes"?>' svg = xml_declaration + emotional_face else: svg = emotional_face return io.BytesIO(svg) return _make_svg def test_exif(pad): image = pad.root.attachments.images.get('test.jpg') assert image is not None assert image.exif assert almost_equal(image.exif.altitude, 779.0293) assert almost_equal(image.exif.aperture, 2.275) assert image.exif.artist is None assert image.exif.camera == 'Apple iPhone 6' assert image.exif.camera_make == 'Apple' assert image.exif.camera_model == 'iPhone 6' assert image.exif.copyright is None assert image.exif.created_at == datetime(2015, 12, 6, 11, 37, 38) assert image.exif.exposure_time == '1/33' assert image.exif.f == u'\u0192/2.2' assert almost_equal(image.exif.f_num, 2.2) assert image.exif.flash_info == 'Flash did not fire, compulsory flash mode' assert image.exif.focal_length == '4.2mm' assert image.exif.focal_length_35mm == '29mm' assert image.exif.iso == 160 assert almost_equal(image.exif.latitude, 46.6338333) assert image.exif.lens == 'Apple iPhone 6 back camera 4.15mm f/2.2' assert image.exif.lens_make == 'Apple' assert image.exif.lens_model == 'iPhone 6 back camera 4.15mm f/2.2' assert almost_equal(image.exif.longitude, 13.4048333) assert image.exif.location == (image.exif.latitude, image.exif.longitude) assert image.exif.shutter_speed == '1/33' assert image.exif.documentname == 'testName' assert image.exif.description == 'testDescription' assert image.exif.is_rotated assert isinstance(image.exif.to_dict(), dict) for key, value in iteritems(image.exif.to_dict()): assert getattr(image.exif, key) == value def test_image_attributes(pad): for img in ( 'test.jpg', 'test-sof-last.jpg', # same image but with SOF marker last 'test-progressive.jpg', # same image, but with progressive encoding ): image = pad.root.attachments.images.get(img) assert image is not None assert image.width == 512 assert image.height == 384 assert image.format == 'jpeg' def test_image_info_svg_declaration(make_svg): w, h = 100, 100 svg_with_xml_decl = make_svg(with_declaration=True, h=h, w=w) svg_no_xml_decl = make_svg(with_declaration=False, h=h, w=w) info_svg_no_xml_decl = get_image_info(svg_no_xml_decl) info_svg_with_xml_decl = get_image_info(svg_with_xml_decl) expected = 'svg', w, h assert info_svg_with_xml_decl == expected assert info_svg_no_xml_decl == expected def test_image_info_svg_length(make_svg): w, h = 100, 100 svg_with_unit_px = make_svg(size_unit='px', w=w, h=h) svg_no_unit = make_svg(size_unit=None, w=w, h=h) info_with_unit_px = get_image_info(svg_with_unit_px) info_no_unit = get_image_info(svg_no_unit) expected = 'svg', 100, 100 assert info_with_unit_px == expected assert info_no_unit == expected def test_thumbnail_height(builder): builder.build_all() with open(os.path.join(builder.destination_path, 'index.html')) as f: html = f.read() # Thumbnail is half the original width, so its computed height is half. assert '<img src="./test@192.jpg" width="192" height="256">' in html def test_thumbnail_quality(builder): builder.build_all() image_file = os.path.join(builder.destination_path, 'test@192x256_q20.jpg') image_size = os.path.getsize(image_file) # See if the image file with said quality suffix exists assert os.path.isfile(image_file) # And the filesize is less than 9200 bytes assert image_size < 9200
3e6df8586cd926023861a34cfe8505e08472ed97
[ "Python" ]
1
Python
rponline/lektor
8c490ce31cf4f1d59531bc6682da1ece6e8e6426
3a748d8c188dbba0ef2f458da83e4f773ac946c3
refs/heads/master
<repo_name>cihanmehmet/PDO-LOGIN<file_sep>/index.php <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> <?php session_start(); if(isset($_SESSION['kadi'])) { echo "<br>Hosgeldiniz ".$_SESSION['kullanici']."</br>"; echo '<br><a href="cikis.php">Cikis</a></br>'; } else { echo "<h1>Sisteme Kayit Yapamadiniz</h1>"; echo '<a href="giris.php">Giris</a></br>'; echo '<a href="kayit.php">Kayit</a></br>'; } ?><file_sep>/ayar.php <?php try{ $username = 'root'; $password = ''; $db = new pdo("mysql:host=localhost;dbname=basit_uyelik;charset=UTF8", $username, $password); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $db; } catch(PDOException $e){ echo 'ERROR', $e->getMessage(); } ?><file_sep>/uyeler.sql CREATE TABLE IF NOT EXISTS `uyeler` ( `uye_id` int(11) NOT NULL AUTO_INCREMENT, `kadi` varchar(200) COLLATE utf8mb4_turkish_ci NOT NULL, `sifre` varchar(200) COLLATE utf8mb4_turkish_ci NOT NULL, PRIMARY KEY (`uye_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_turkish_ci AUTO_INCREMENT=36 ; INSERT INTO `uyeler` (`uye_id`, `kadi`, `sifre`) VALUES (1, 'cihan', 'cihan'); <file_sep>/giris.php <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> <?php if(!$_POST) { ?> <table> <h1>Giris</h1> <form method="POST"> <input type="text" name="kadi" placeholder="<NAME>"><br /> <input type="password" name="sifre" placeholder="<PASSWORD>"><br /> <input type="submit"> </form> </table> <?php } else if(!empty($_POST['kadi']) && !empty($_POST['sifre'])) { session_start(); if(isset($_POST['kadi']) && isset($_POST['sifre'])){ require 'ayar.php'; $sorgu = $db->prepare("SELECT kadi, sifre FROM uyeler WHERE kadi=:kadi AND sifre=:sifre"); //$sorgu->bindParam(':kadi',$_POST['kadi']); //$sorgu->bindParam(':sifre',$_POST['sifre']); //$sorgu->execute(); $sorgu->execute(array(':kadi'=>$_POST['kadi'],':sifre'=>$_POST['sifre'])); //bindParam'lı 3 satır ile tek satır array aynı işlevi yaparlar if($sorgu->rowCount()>0) //bulunan sıfır sayısı sıfırdan büyükse { $row=$sorgu->fetch(); //PDO nesnelerini kullanabilmemiz için fetch yapmalıyız $_SESSION['kadi']=$row['kadi']; echo "Giris Basarili Yonlendiriliyorsunuz"; header("Refresh:3;url=index.php"); } else { echo "Giriş Başarısız Yönlendiriliyorsunuz."; header("Refresh:3;url=giris.php"); } } } else { echo "Kullaci Adi ve Sifre Bos Birakilamaz Tekrar Deneyiniz Yonlendiriliyorunuz"; header("Refresh:3;url=giris.php"); } ?><file_sep>/kayit.php <meta http-equiv="Content-Type" content="text/html; charset=UTF8"> <?php if(!$_POST){ ?> <h1>KAYİT</h1> <form method="POST"> <input type="text" name="kadi" placeholder="adiniz" ><br /> <input type="password" name="sifre" placeholder="<PASSWORD>"><br /> <input type="submit" name="giris" value="KAYIT OL"> </form> <?php } else if(!empty($_POST['kadi']) && !empty($_POST['sifre'])) { $kadi=$_POST['kadi']; $sifre=$_POST['sifre']; include "ayar.php"; $varmi=$db->prepare("SELECT * FROM uyeler WHERE kadi=:kadi "); $varmi->execute(array(':kadi'=>$kadi)); if($varmi->rowCount()<1) { $insert=$db->prepare("INSERT INTO uyeler (kadi,sifre) VALUES(:kadi,:sifre)"); $insert->bindParam(':kadi',$kadi); $insert->bindParam(':sifre',$sifre); $insert->execute(); if($insert) { echo "İşlem Başarılı.Yönlendiriliyorsunuz."; header("Refresh:3;url=giris.php"); } else { echo "İşlem Başarısız,Yönlendiriliyorsunuz."; header("Refresh:3;url=kayit.php"); } } else { echo "HATA aynı kullanıcı adı mevcut Yönlendiriliyorsunuz Tekrar Deneyiniz"; header("Refresh:3;url=kayit.php"); } } else { echo "Kullaci Adi ve Sifre Bos Birakilamaz Tekrar Deneyiniz Yonlendiriliyorunuz"; header("Refresh:3;url=kayit.php"); } ?><file_sep>/README.md # PDO-LOGIN PHP PDO Yöntemi kullanılarak oluşturulan basit kullanıcı girişi ve kayıtı sağlayan program, session kavramını öğrenmek isteyenler için yararlı olabilir +Üye Girişi +Üye Kontrolü +Üye Kayıtı Veritabanı kurulum dosyası uyeler.sql dosyası içerisindedir
6f2b8156f7c90118113d1106fc1817b0f79d18bf
[ "Markdown", "SQL", "PHP" ]
6
PHP
cihanmehmet/PDO-LOGIN
ce3f5873149d63d83e5f47b63f254f40d32e0ffb
bbb80ffc08c4f736b3b5e0514a8e8e5593cbcf58
refs/heads/master
<file_sep>using UnityEngine; public class PlayerCollision : MonoBehaviour { public Movement movement; // Skapar en referens till movement skriptet för spelaren. // Det här skriptet hanterar kollisioner av spelaren. // Spelaren explodera till ett 100-tal mindre bitar som då sprider sig i en radie runt spelaren. public Material playerMaterial; // Sätter en variabel för materialet för dessa mindre kuber. public float cubeSize = 0.2f; // Offentliga variablar för att kunna ändra storlek och hur många kuber som ska skapas. public int cubesInRow = 5; public float cubesPivotDistance; public Vector3 cubesPivot; // Egenskaper för att bestämma hur stark explosionen ska vara. Dessa kan ändras i Unity. public float explosionForce = 50f; public float explosionRadius = 4f; public float explosionUpward = 0.4f; void Start() { GetComponent<AudioSource>(); // Kalkylerar Pivot distance (Sväng avstånd) cubesPivotDistance = cubeSize * cubesInRow / 2; cubesPivot = new Vector3(cubesPivotDistance, cubesPivotDistance, cubesPivotDistance); } void OnCollisionEnter(Collision collisionInfo) // "Trigger"n för kollisionen. { if (collisionInfo.collider.tag == "Obstacle") // Explosionen händer bara om det spelaren kolliderar med har en tag "Obstacle" { explode(); // Kallar explode metoden. movement.enabled = false; // Stänger av movement skriptet för spelaren. FindObjectOfType<GameManager>().GameOver(); // Kallar GameOver metoden/funktionen i GameManager } } private void explode() // Metoden/funktionen som hanterar själva explosionen. { // Tar bort spelar objektet. gameObject.SetActive(false); // Itererar igenom det 3 gånger för varje axis. x, y, z for (int x = 0; x < cubesInRow; x++) { for (int y = 0; y < cubesInRow; y++) { for (int z = 0; z < cubesInRow; z++) { createPiece(x, y, z); // Skapar kuberna } } } // Hämtar positionen för explosionen. Vector3 explosionPos = transform.position; // Hämtar en collider för explosionen. Collider[] colliders = Physics.OverlapSphere(explosionPos, explosionRadius); // Lägger till en kraft för varje collider. foreach (Collider hit in colliders) { // Hämtar RigidBody komponenten från Collidern Rigidbody rb = hit.GetComponent<Rigidbody>(); if (rb != null) // Om RigidBody inte är null { // Tillämpar en explosionskraft med givna parametrar. rb.AddExplosionForce(explosionForce, transform.position, explosionRadius, explosionUpward); } } } void createPiece(int x, int y, int z) { // Skapar mindre bitarna av spelaren. GameObject piece; piece = GameObject.CreatePrimitive(PrimitiveType.Cube); // Vilken form bitarna har. // Sätter bitarna position och skala piece.transform.position = transform.position + new Vector3(cubeSize * x, cubeSize * y, cubeSize * z) - cubesPivot; piece.transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize); // Lägger till en RigidBody till varje bit. piece.AddComponent<Rigidbody>(); piece.GetComponent<Rigidbody>().mass = cubeSize; // Sätter material för varje bit. piece.GetComponent<Renderer>().material = playerMaterial; } }
568ac6f63f99be29ef779621fe074a9e4c8c9059
[ "C#" ]
1
C#
MikaelArtiola/Blockrun-SV-
c18b749077d4de3b626232074b9f3843b639fc13
5f550f4dcbae159b165b8c20dab4af80430f878b
refs/heads/master
<file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 14:27:12 2018 @author: pixel14 """ from DSIII_Classes.Personnage import Perso from DSIII_Classes.Item import Arme, Consommable, ForgeItem import DSIII_Classes.Enum as E import Globals as G import Tools as T import MenuDivers as Menu import random as R def MainGame(): while G.ContinueGame: if G.joueur == False: Menu.MenuNewGame() else: Menu.MenuPrincipal() def NewHero(): T.Cls() print("--- Création d'un nouveau héros ---\n") nom = input("Quel est le nom de votre personnage ?\n") #choix de la classe Menu.MenuChoixClasse(nom) print("\nCréation du personnage OK...!") T.NextStep() print("\nPuisse votre aventure se faire dans la souffrance, {}...".format(G.joueur.Nom)) T.NextStep() def GestionPersonnage(): G.StayInMenuPerso = True Menu.MenuPersonnage() def TestFunc(): T.Cls() print("--- FONCTION DE TEST / DEV SPACE ---\n") T.NextStep() def GenererEnnemi(niveau): points = niveau + 90 prefixList = ["Phalange", "Ombre", "Carcasse", "Squelette", "Réanimé", "Assassin", "Gargouille", "Sorcier", "Chien-Zombie", "Chevalier"] nameList = ["Boucher", "DarkSasougay", "Orochipartu", "Naizu", "Gérard", "Nexflix-Fanboy", "Netflix-Fangirl", "Quick-addict", "Ronald", "Serge"] nom = R.choice(prefixList) + " " + R.choice(nameList) caracList = [0,0,0,0,0,0,0,0,0] while points > 0: carac = R.randint(0, 8) caracList[carac] +=1 points -= 1 E = Perso(nom, caracList[0], caracList[1], caracList[2], caracList[3], caracList[4], caracList[5], caracList[6], caracList[7], caracList[8]) return E def GenererArme(degBaseMin, degBaseMax, totalRatio): """nom, pxAchat, pxVente, poids, baseDeg, ratioForce, ratioDex, ratioInt, ratioFoi, ratioLuck""" points = totalRatio nameList = ["Dague", "Épée", "Lance", "Masse"] suffixList = ["Longue", "Lourde", "Magique", "Chaotique", "Bénie", "Tempêtueuse", "Ténébreuse"] nom = R.choice(nameList) + " " + R.choice(suffixList) degBase = R.randint(degBaseMin, degBaseMax) poids = (R.randint(5, 50) / 10) caracList = [0, 0, 0, 0, 0] while points > 0: carac = R.randint(0, 4) caracList[carac] += 0.1 points -= 0.1 W = Arme(nom, 100, 100, poids, degBase, caracList[0], caracList[1], caracList[2], caracList[3], caracList[4]) return W def GenererLootAmes(): return R.randint(30, 1200) def FightTurn(Atk, Def): if type(Atk) is Perso and type(Def) is Perso: Attaquant = Atk Defenseur = Def print("--- COMBAT ---\n") print("Tour de {} ->\n".format(Attaquant.Nom)) Attaquant.Attaquer(Defenseur) def Combat(): T.Cls() ennemi = GenererEnnemi(10) w = GenererArme(1, 10, 5) ennemi.EquiperArme(w, False) print("Nouveau Combat !!! L'ennemi {} apparait !!".format(ennemi.Nom)) T.NextStep() while(G.joueur.Hp > 0 and ennemi.Hp > 0): FightTurn(G.joueur, ennemi) if ennemi.Hp > 0: FightTurn(ennemi, G.joueur) if(G.joueur.Hp == 0): G.joueur.Mourir() elif(ennemi.Hp == 0): print("Vous avez remporté le combat et il vous reste {} points de vie !!".format(G.joueur.Hp)) G.joueur.GagnerAmes(GenererLootAmes()) T.NextStep() <file_sep># -*- coding: utf-8 -*- """ Created on Wed Dec 12 11:10:23 2018 @author: pixel14 """ from enum import Enum class TypeConso(Enum): SOIN = "Consommable de restauration de points de vie" FOCUS = "Consommable de restauration de points de focus" OFFENSIF = "Consommable utilisé pour infliger des dégâts" NULL = "Aucun type défini pour le consommable" class ClassHero(Enum): CHEVALIER = "Chevalier" ASSASSIN = "Assassin" SORCIER = "Sorcier" PRETRE = "Prêtre" EMPOISONNEUR = "Empoisonneur" NULL = "Aucune classe définie pour le héros" class UpgradeMaterial(Enum): TITANITE = "Petite titanite" GRANDE_TITANITE = "Grande titanite" ECLAT_TITANITE = "Éclat de titanite" TABLETTE_TITANITE = "Tablette de titanite" ECAILLE_TITANITE = "Écaille de titanite" TITANITE_SCINTILLANTE = "Titanite scintillante" NULL = "Aucun type défini pour le matériel de forge" class RareteArme(Enum): BASIQUE = 10 UNIQUE = 5 BOSS = 5 @classmethod def has_value(cls, name): return any(name == item for item in cls) class EcoleMagie(Enum): SORCELLERIE = "Art de manier les arcanes de la magie pure" MIRACLE = "Faire acte de foi en la puissance divine" PYRO = "Forme primitive de magie du feu des Grands-Marais" NULL = "Aucune école définie pour le sort" @classmethod def has_value(cls, name): return any(name == item for item in cls) class Element(Enum): PHYSIQUE = "Élément associé aux armes traditionnelles (tranchantes, contondantes ou perforantes)" FEU = "Brûle et peut provoquer la panique" LUMIERE = "Élément sacré, bannissant les serviteurs des ténèbres, associé aux miracles" FOUDRE = "Élément puissant contre les armues de métal et les dragons, associé aux miracles" MAGIE = "Élément associé aux sorcelleries" TENEBRES = "Élément opposé à la lumière, associé à toutes les écoles de magie" NULL = "Aucun élément défini" @classmethod def has_value(cls, name): return any(name == item for item in cls) """ heal hot heal zone hot zone cleanse cleanse zone larme du déni buffdef buffdefelem buffoff buffarme buffshield degat mono hit degat multi hit dot bleed poison malediction voeu de silence anti aggro boost aggro invisibilité """ class TypeSpell(Enum): HEAL = "Régénère les points de santé" CLEANSE = "Supprime les effets néfastes" BUFFDEF = "Améliore la défense" BUFFAR = "Améliore les dégâts" BUFFWEAPON = "Ajoute un bonus de dégâts élémentaire à l'arme" BUFFSHIELD = "Améliore la stabilité du bouclier" DAMAGE = "Sort offensif infligeant des dégâts" AUX = "Sort offensif infligeant un effet auxiliaire (poison, saignement, givre ou malédiction" UTILITY = "Sort utilitaire" @classmethod def has_value(cls, name): return any(name == item for item in cls)<file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 11:33:54 2018 @author: pixel14 """ import DSIII_Classes.Item import DSIII_Classes.Inventaire as Inv import DSIII_Classes.Enum as E import Tools as T class Perso : def __init__(self, nom, vita, memo, endu, vigu, forc, dext, inte, foi, luck): """Constructeur du personnage de base""" self.Nom = nom self.Vitalite = vita self.Memoire = memo self.Endurance = endu self.Vigueur = vigu self.Force = forc self.Dexterite = dext self.Intelligence = inte self.Foi = foi self.Chance = luck self.ArmeEquipee = None self.NiveauDispo = 0 self.Niveau = 0 self.Ames = 0 self.AmesNextLevel = 0 self.Classe = E.ClassHero.NULL self.Inventaire = Inv.Inventaire(self.Vigueur) self._calculerCaracSecondaires() @property def Nom(self): return self._nom @Nom.setter def Nom(self, value): if len(value) > 25 or len(value) == 0: raise ValueError("Erreur : nom trop long") else: self._nom = value @property def Vitalite(self): return self._vitalite @Vitalite.setter def Vitalite(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._vitalite = value @property def Memoire(self): return self._memoire @Memoire.setter def Memoire(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._memoire = value @property def Endurance(self): return self._endurance @Endurance.setter def Endurance(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._endurance = value @property def Vigueur(self): return self._vigueur @Vigueur.setter def Vigueur(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._vigueur = value @property def Force(self): return self._force @Force.setter def Force(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._force = value @property def Dexterite(self): return self._dexterite @Dexterite.setter def Dexterite(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._dexterite = value @property def Intelligence(self): return self._intelligence @Intelligence.setter def Intelligence(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._intelligence = value @property def Foi(self): return self._foi @Foi.setter def Foi(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._foi = value @property def Chance(self): return self._chance @Chance.setter def Chance(self, value): if value < 0: raise ValueError("Erreur : une carac ne peut être négative") else: self._chance = value def __str__(self): """Quand on entre notre objet dans l'interpréteur""" return "Nom: {}\nHp : {} / {}\nFocus : {} / {}\nArme : {}".format(self.Nom, self.Hp, self.HpMax, self.Focus, self.FocusMax, self.ArmeEquipee) def _calculerNiveauActuel(self): totalCarac = 0 totalCarac += self.Vitalite totalCarac += self.Memoire totalCarac += self.Vigueur totalCarac += self.Endurance totalCarac += self.Force totalCarac += self.Dexterite totalCarac += self.Intelligence totalCarac += self.Foi totalCarac += self.Chance if totalCarac <= 90: self.Niveau = 1 else: self.Niveau = totalCarac - 90 def _calculerNextLevelAmesRequises(self): base = 300 self.AmesNextLevel = int(base + (base * (self.Niveau / 3))) def AfficherCarac(self): T.Cls() print("--- Détail des caractéristiques de {} ---\n".format(self.Nom)) print("{0} de niveau {1}".format(self.Classe.value, self.Niveau)) print("{0} âmes (coût prochain niveau : {1} âmes)\n".format(self.Ames, self.AmesNextLevel)) print("Hp : {0} / {1}\nFocus : {2} / {3}\n".format(self.Hp, self.HpMax, self.Focus, self.FocusMax)) print("{0:<12} : {1}".format("Vitalité", self.Vitalite)) print("{0:<12} : {1}".format("Mémoire", self.Memoire)) print("{0:<12} : {1}".format("Endurance", self.Endurance)) print("{0:<12} : {1}".format("Vigueur", self.Vigueur)) print("{0:<12} : {1}".format("Force", self.Force)) print("{0:<12} : {1}".format("Dextérité", self.Dexterite)) print("{0:<12} : {1}".format("Intelligence", self.Intelligence)) print("{0:<12} : {1}".format("Foi", self.Foi)) print("{0:<12} : {1}\n".format("Chance", self.Chance)) T.NextStep() def AfficherArme(self): T.Cls() if self.ArmeEquipee != None and type(self.ArmeEquipee) is DSIII_Classes.Item.Arme: w = self.ArmeEquipee w.Afficher(self) else: print("Vous n'avez aucune arme équipée.") T.NextStep() def EquiperArme(self, arme, ok=True): T.Cls() if type(arme) is DSIII_Classes.Item.Arme: self.ArmeEquipee = arme if ok: print("{0} a équipé l'arme : {1}".format(self.Nom, self.ArmeEquipee.Nom)) else: if ok: print("Equipement de l'arme impossible !") if ok: T.NextStep() def DesequiperArme(self) : T.Cls() if self.ArmeEquipee is None: print("Il n'y a aucune arme à déséquiper.") else: print("Vous avez déséquipé l'arme {0}".format(self.ArmeEquipee.Nom)) self.ArmeEquipee = None def _calculerDegatsArme(self): totalDeg = 0 if self._isArmeEquipee(): weapon = self.ArmeEquipee totalDeg += weapon.BaseDegat totalDeg += weapon.RatioForce * self.Force totalDeg += weapon.RatioDexterite * self.Dexterite totalDeg += weapon.RatioIntelligence * self.Intelligence totalDeg += weapon.RatioFoi * self.Foi totalDeg += weapon.RatioChance * self.Chance totalDeg = int(totalDeg) return totalDeg def _calculerDegatsMainsNues(self): totalDeg = 0 totalDeg += self.Force * 2 + self.Dexterite * 1 return totalDeg def _isArmeEquipee(self): if self.ArmeEquipee is not None and type(self.ArmeEquipee) is DSIII_Classes.Item.Arme: return True else: return False def SubirDegats(self, degats): if degats >= self.Hp : deg = self.Hp self.Hp = 0 return deg else : self.Hp -= degats return degats def DefClasseHeros(self, classeHeros): if classeHeros in E.ClassHero: self.Classe = classeHeros print("{0} est désormais un {1}.".format(self.Nom, classeHeros.value)) else: print("{0} n'est pas une classe de héros".format(type(classeHeros))) def UtiliserConso(self, cible, item): effet = item.Utiliser() if effet < 0: print("{0} utilise {1} sur {2} et lui inflige {3} points de dégâts.".format(self.Nom, item.Nom, cible.Nom, (effet * -1))) elif effet > 0: if item.Type == E.TypeConso.SOIN: mr = self.RestituerVie(effet) print("{0} utilise {1} et se soigne {2} points de vie.".format(self.Nom, item.Nom, mr)) elif item.Type == E.TypeConso.FOCUS: mr = self.RestituerFocus(effet) print("{0} utilise {1} et se soigne {2} points de focus.".format(self.Nom, item.Nom, mr)) def RestituerVie(self, qtte): montantRendu = 0 if (self.Hp + qtte) < self.HpMax: montantRendu = qtte self.Hp += qtte else: montantRendu = self.HpMax - self.Hp self.Hp = self.HpMax return montantRendu def RestituerFocus(self, qtte): montantRendu = 0 if (self.Focus + qtte) < self.FocusMax: montantRendu = qtte self.Focus += qtte else: montantRendu = self.FocusMax - self.Focus self.Focus = self.FocusMax return montantRendu def Attaquer(self, cible): if self._isArmeEquipee(): atk = self._calculerDegatsArme() print("{0} a attaqué {1} avec {2} pour lui infliger {3} dégâts !".format(self.Nom, cible.Nom, self.ArmeEquipee.Nom, cible.SubirDegats(atk))) else: atk = self._calculerDegatsMainsNues() print("{0} a attaqué {1} à mains nues pour lui infliger {2} dégâts !".format(self.Nom, cible.Nom, cible.SubirDegats(atk))) if(cible.Hp <= 0): print("\n{0} a succombé à l'attaque de {1} !!".format(cible.Nom, self.Nom)) T.NextStep() def _calculerCaracSecondaires(self): """On met à jour niveau et âmes requises pour next level""" self._calculerNiveauActuel() self._calculerNextLevelAmesRequises() """on met à jour les carac secondaires dépendant des caracs primaires""" self.HpMax = self.Vitalite * 30 self.Hp = self.HpMax self.FocusMax = (self.Memoire * 9) + 30 self.Focus = self.FocusMax self.Inventaire.ContenanceMax = self.Vigueur def GagnerAmes(self, qtteAmes): if qtteAmes > 0: self.Ames += qtteAmes print("{0} âmes gagnées...".format(qtteAmes)) else: raise ValueError("Erreur : impossible de gagner montant négatif d'âmes") def _depenserAmesLevelUp(self): self.Ames -= self.AmesNextLevel def Mourir(self): self.Ames = 0 print("Vous êtes mort...") T.Revive() self.Hp = self.HpMax self.Focus = self.FocusMax T.Cls() def MonterNiveau(self): T.Cls() if self.Ames >= self.AmesNextLevel: up = False print("--- MENU Personnage - Dépenser les âmes ---\n".format(self.Nom)) print("1 -> Vitalité") print("2 -> Mémoire") print("3 -> Endurance") print("4 -> Vigueur") print("5 -> Force") print("6 -> Dexterite") print("7 -> Intelligence") print("8 -> Foi") print("9 -> Chance") print("0 -> Annuler") choix = T.InputChoice("\nChoisissez une caractéristiques à améliorer en tapant le nombre associé : ", 0, 9, "Veuillez saisir une option entre 0 et 9 SVP") if choix != 0: if choix == 1: self.Vitalite += 1 elif choix == 2: self.Memoire += 1 elif choix == 3: self.Endurance += 1 elif choix == 4: self.Vigueur += 1 elif choix == 5: self.Force += 1 elif choix == 6: self.Dexterite += 1 elif choix == 7: self.Intelligence += 1 elif choix == 8: self.Foi += 1 elif choix == 9: self.Chance += 1 else: pass #descendre les ames du montant requis self._depenserAmesLevelUp() self._calculerCaracSecondaires() print("\nVous avez gagné un niveau..., il vous reste {0} âmes".format(self.Ames)) else : print("\nVous n'avez pas assez d'âmes pour gagner un niveau...") T.NextStep()<file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 14:42:53 2018 @author: pixel14 """ <file_sep># -*- coding: utf-8 -*- """ Created on Tue Dec 4 09:27:25 2018 @author: pixel14 """ import os def Cls(): os.system('cls' if os.name=='nt' else 'clear') def NextStep(): input("\nAppuyez sur ENTER pour continuer...") Cls() def Revive(): input("\nAppuyez sur ENTER pour revenir au dernier feu de camp...") Cls() def InputChoice(mess, mini, maxi, errMess="Erreur : valeur invalide"): choix = None while choix is None: choix = input(mess) try: choix = int(choix) if choix < mini or choix > maxi: choix = None else: return choix except: choix = None if choix is None: print(errMess) <file_sep># -*- coding: utf-8 -*- """ Created on Wed Dec 19 14:47:03 2018 @author: pixel14 """ import Globals as G import Tools as T def MenuGardienneDuFeu(): while G.StayInMenuGardienneDuFeu: T.Cls() print("--- Gardienne du Feu ---\n") print("1 -> Dépenser âmes ({0} âmes / {1} pour le prochain niveau)".format(G.joueur.Ames, G.joueur.AmesNextLevel)) print("2 -> Discuter") print("3 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 3, "Veuillez saisir une option entre 1 et 3 SVP") LancerFonctionGardienneDuFeu(choix) def LancerFonctionGardienneDuFeu(choix): if choix == 1: #dépenser un niveau G.joueur.MonterNiveau() elif choix == 2: print("dialogue avec Gardienne du Feu") T.NextStep() elif choix == 3: G.StayInMenuGardienneDuFeu = False def MenuServante(): while G.StayInMenuServante: T.Cls() print("--- Servante du Sanctuaire ---\n") print("1 -> Acheter") print("2 -> Vendre") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionServante(choix) def LancerFonctionServante(choix): if choix == 1: #acheter print("Acheter menu") T.NextStep() elif choix == 2: #vendre print("Vendre menu...") T.NextStep() elif choix == 3: #discuter print("dialogue avec Servante du sanctuaire") T.NextStep() elif choix == 4: G.StayInMenuServante = False def MenuForgeron(): while G.StayInMenuForgeron: T.Cls() print("--- André, Forgeron du Sanctuaire ---\n") print("1 -> Améliorer une arme") print("2 -> Enchanter une arme") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionForgeron(choix) def LancerFonctionForgeron(choix): if choix == 1: #améliorer print("améliorer arme") T.NextStep() elif choix == 2: #vendre print("enchanter une arme") T.NextStep() elif choix == 3: #discuter print("dialogue avec André le forgeron") T.NextStep() elif choix == 4: G.StayInMenuForgeron = False def MenuPyromancien(): while G.StayInMenuPyromancien: T.Cls() print("--- Cornyx le pyromancien ---\n") print("1 -> Apprendre une pyromancie") print("2 -> Acheter") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionPyromancien(choix) def LancerFonctionPyromancien(choix): if choix == 1: #acheter pyro print("apprendre une pyromancie") T.NextStep() elif choix == 2: #acheter print("acheter") T.NextStep() elif choix == 3: #discuter print("dialogue avec Cornyx le pyromancien") T.NextStep() elif choix == 4: G.StayInMenuPyromancien = False def MenuVoleur(): while G.StayInMenuVoleur: T.Cls() print("--- Greirat ---\n") print("1 -> Acheter") print("2 -> Vendre") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionVoleur(choix) def LancerFonctionVoleur(choix): if choix == 1: #acheter print("Acheter menu") T.NextStep() elif choix == 2: #vendre print("Vendre menu...") T.NextStep() elif choix == 3: #discuter print("dialogue avec Greirat") T.NextStep() elif choix == 4: G.StayInMenuVoleur = False def MenuOrbeck(): while G.StayInMenuOrbeck: T.Cls() print("--- Orbeck, Sorcier-Assassin de Vinheim ---\n") print("1 -> Apprendre la sorcellerie") print("2 -> Acheter") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionOrbeck(choix) def LancerFonctionOrbeck(choix): if choix == 1: #acheter sorcellerie print("apprendre une sorcellerie") T.NextStep() elif choix == 2: #acheter print("acheter") T.NextStep() elif choix == 3: #discuter print("dialogue avec Orbeck") T.NextStep() elif choix == 4: G.StayInMenuOrbeck = False def MenuIrina(): while G.StayInMenuIrina: T.Cls() print("--- <NAME> ---\n") print("1 -> Lire un miracle") print("2 -> Acheter") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionIrina(choix) def LancerFonctionIrina(choix): if choix == 1: #acheter miracle print("apprendre un miracle") T.NextStep() elif choix == 2: #acheter print("acheter") T.NextStep() elif choix == 3: #discuter print("dialogue avec Irina") T.NextStep() elif choix == 4: G.StayInMenuIrina = False def MenuLondor(): while G.StayInMenuLondor: T.Cls() print("--- <NAME> <NAME> ---\n") print("1 -> Révéler la véritable puissance") print("2 -> Acheter") print("3 -> Discuter") print("4 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionLondor(choix) def LancerFonctionLondor(choix): if choix == 1: #puissance carcasse print("Révéler la véritable puissance") T.NextStep() elif choix == 2: #acheter print("acheter") T.NextStep() elif choix == 3: #discuter print("dialogue avec Yoel et Yuria") T.NextStep() elif choix == 4: G.StayInMenuLondor = False def MenuLeonhard(): while G.StayInMenuLeonhard: T.Cls() print("--- <NAME> ---\n") print("1 -> Envahir") print("2 -> Discuter") print("3 -> Prendre congé") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 3, "Veuillez saisir une option entre 1 et 3 SVP") LancerFonctionLeonhard(choix) def LancerFonctionLeonhard(choix): if choix == 1: #invasion print("Envahir un joueur") T.NextStep() elif choix == 2: #discuter print("discuter avec Leonhard") T.NextStep() elif choix == 3: G.StayInMenuLeonhard = False<file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 14:43:10 2018 @author: pixel14 """ <file_sep># -*- coding: utf-8 -*- """ Created on Wed Dec 19 14:52:26 2018 @author: pixel14 """ from DSIII_Classes.Personnage import Perso from DSIII_Classes.Item import Arme, Consommable, ForgeItem from DSIII_Fonctions import MainFunctions as Main import DSIII_Classes.Enum as E import Globals as G import Tools as T import MenuNpc as NPC def MenuPrincipal(): T.Cls() print("--- MENU PRINCIPAL - Aventure de {} ---\n".format(G.joueur.Nom)) print("1 -> Gestion du personnage") print("2 -> Sanctuaire de Lige Feu") print("3 -> Téléportation vers zone de combat") print("4 -> Quitter") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionPrincipale(choix) def MenuCombat(): T.Cls() print("--- MENU DE COMBAT - Options ---") print("1 -> Attaquer") print("2 -> Utiliser magie") print("3 -> Lever son bouclier") print("4 -> Utiliser objet") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionCombat(choix) def MenuNewGame(): T.Cls() print("--- Aucun personnage chargé ---\n") print("1 -> Créer un nouveau personnage") print("2 -> Charger un personnage existant") print("3 -> Quitter") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 3, "Veuillez saisir une option entre 1 et 3 SVP") LancerFonctionNewGame(choix) def MenuPersonnage(): while G.StayInMenuPerso: T.Cls() print("--- MENU PERSONNAGE ---\n") print("1 -> Afficher fiche perso") print("2 -> Afficher détails arme") print("3 -> Inventaire") print("4 -> Retourner au menu principal") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 4, "Veuillez saisir une option entre 1 et 4 SVP") LancerFonctionPersonnage(choix) def MenuInventaire(): while G.StayInMenuInventaire: T.Cls() print("--- MENU INVENTAIRE ---\n") print("1 -> Afficher l'inventaire") print("2 -> Supprimer un objet") print("3 -> Retourner au menu personnage") choix = T.InputChoice("\nChoisissez une option en tapant le nombre associé : ", 1, 3, "Veuillez saisir une option entre 1 et 3 SVP") LancerFonctionInventaire(choix) def MenuSanctuaire(): while G.StayInMenuSanctuaire: T.Cls() print("--- Sanctuaire de Lige Feu ---\n") print("1 -> <NAME>") print("2 -> Servante du Sanctuaire") print("3 -> André, forgeron du Sanctuaire") print("4 -> Cornyx, pyromancien des Grands Marais") print("5 -> Greirat, voleur") print("6 -> Orbeck, sorcier de Vinheim") print("7 -> Yoel et Yuria, carcasses de Londor") print("8 -> Irina, Prêtresse de Carim") print("9 -> Leonhard, Phalange de Rosaria") print("0 -> Quitter") choix = T.InputChoice("\nParlez au personnage en tapant le nombre associé : ", 0, 9, "Veuillez saisir une option entre 0 et 9 SVP") LancerFonctionSanctuaire(choix) def LancerFonctionCombat(choix): if choix == 1: #attaquer pass elif choix == 2: #magie #G.StayInMenuChoixMagie = True #menu choix magie pass elif choix == 3: #bouclier pass elif choix == 4: #consommable #menu conso & stay in menu conso pass def LancerFonctionSanctuaire(choix): if choix == 1: #gardienne du feu G.StayInMenuGardienneDuFeu = True NPC.MenuGardienneDuFeu() elif choix == 2: #servante G.StayInMenuServante = True NPC.MenuServante() elif choix == 3: #André G.StayInMenuForgeron = True NPC.MenuForgeron() elif choix == 4: #Cornyx G.StayInMenuPyromancien = True NPC.MenuPyromancien() elif choix == 5: #Greirat G.StayInMenuVoleur = True NPC.MenuVoleur() elif choix == 6: #<NAME> G.StayInMenuOrbeck = True NPC.MenuOrbeck() elif choix == 7: #Yoel et <NAME> G.StayInMenuLondor = True NPC.MenuLondor() elif choix == 8: #<NAME> G.StayInMenuIrina = True NPC.MenuIrina() elif choix == 9: #Leonhard G.StayInMenuLeonhard = True NPC.MenuLeonhard() elif choix == 0: #quitter le menu du sanctuaire G.StayInMenuSanctuaire = False def LancerFonctionInventaire(choix): if choix == 1: G.joueur.Inventaire.Afficher() T.NextStep() elif choix == 2: w = G.joueur.Inventaire.MenuSuppression() if w != False: if G.joueur.ArmeEquipee.Nom == w.Nom: G.joueur.DesequiperArme() T.NextStep() elif choix == 3: G.StayInMenuInventaire = False def LancerFonctionNewGame(choix): if choix == 1: #créer un nouveau personnage Main.NewHero() elif choix == 2: #charger une partie """ creation par défaut d'un personnage en attendant la gestion des sauvegardes """ G.joueur = Perso("Hilda", 100, 100, 100, 100, 100, 100, 100, 100, 100) weapon = Arme("Lance de Longinus", 1000, 1000, 0.7, 1.5, 0.7, 2.5, 0, 0, 1.7, 0, E.RareteArme.UNIQUE, 2, 0.1, 0.5, 0, 0, 0.2) titanites = ForgeItem("Titanite", 10, 10, E.UpgradeMaterial.TITANITE, 30) weapon.Forger(titanites) weapon.Forger(titanites) G.joueur.Inventaire.Add(weapon) G.joueur.EquiperArme(weapon) conso1 = Consommable("Bombe(s)", 50, 10, 0.3, E.TypeConso.OFFENSIF, 100, 5, 30) G.joueur.Inventaire.Add(conso1) elif choix == 3: #fonction quitter jeu G.ContinueGame = False def LancerFonctionPersonnage(choix): if choix == 1: #détails des caractéristiques du joueur G.joueur.AfficherCarac() elif choix == 2: #détails de l'arme équipée G.joueur.AfficherArme() elif choix == 3: #gestion de l'inventaire G.StayInMenuInventaire = True MenuInventaire() elif choix == 4: #quitter le menu personnage G.StayInMenuPerso = False def LancerFonctionPrincipale(choix): if choix == 1: Main.GestionPersonnage() elif choix == 2: G.StayInMenuSanctuaire = True MenuSanctuaire() elif choix == 3: #fonction combat """à remplacer par le menu de téléportation dans le monde aventure""" Main.Combat() elif choix == 4: #fonction quitter jeu G.ContinueGame = False else: #fonction cachée de dev pass def MenuChoixClasse(nom): T.Cls() print("--- Choix de la classe ---\n") print("1 -> Chevalier") print("2 -> Assassin") print("3 -> Sorcier") print("4 -> Prêtre") print("5 -> Empoisonneur") #choix = int(input("\nChoisissez la classe de votre personnage {} en tapant le nombre associé : ".format(nom))) choix = T.InputChoice("\nChoisissez la classe de votre personnage {} en tapant le nombre associé : ".format(nom), 1, 5, "Choisissez une option qui existe !!") LancerFonctionChoixClasse(choix, nom) def LancerFonctionChoixClasse(choix, nom): #nom, vita, memo, endu, vigu, forc, dext, inte, foi, luck if choix == 1: """Chevalier""" G.joueur = Perso(nom, 12, 7, 12, 16, 13, 12, 9, 9, 7) weapon = Arme("Epee", 100, 100, 4.5, 30, 2.5, 1.5, 0, 0, 1) G.joueur.Inventaire.Add(weapon) G.joueur.EquiperArme(weapon) G.joueur.DefClasseHeros(E.ClassHero.CHEVALIER) elif choix == 2: """Assassin""" G.joueur = Perso(nom, 10, 10, 10, 8, 7, 13, 9, 5, 6) weapon = Arme("Estoc", 100, 100, 2.7, 18, 0.7, 2.5, 0, 0, 1.7) G.joueur.Inventaire.Add(weapon) G.joueur.EquiperArme(weapon) G.joueur.DefClasseHeros(E.ClassHero.ASSASSIN) elif choix == 3: """Sorcier""" G.joueur = Perso(nom, 8, 16, 9, 6, 5, 7, 15, 5, 4) weapon = Arme("Dague Magique", 100, 100, 0.5, 1, 0.7, 1.5, 2.5, 0, 1.7) G.joueur.Inventaire.Add(weapon) G.joueur.EquiperArme(weapon) G.joueur.DefClasseHeros(E.ClassHero.SORCIER) elif choix == 4: """Pretre""" G.joueur = Perso(nom, 13, 13, 13, 13, 9, 7, 5, 15, 4) weapon = Arme("Masse sacrée", 100, 100, 0.7, 13, 1.3, 1.3, 0, 1.3, 0.1) G.joueur.Inventaire.Add(weapon) G.joueur.EquiperArme(weapon) G.joueur.DefClasseHeros(E.ClassHero.PRETRE) elif choix == 5: """Empoisonneur""" G.joueur = Perso(nom, 10, 10, 10, 10, 7, 11, 9, 9, 16) weapon = Arme("Dague", 100, 100, 0.7, 3, 0.7, 1.5, 0, 0, 2.7) G.joueur.Inventaire.Add(weapon) G.joueur.EquiperArme(weapon) G.joueur.DefClasseHeros(E.ClassHero.EMPOISONNEUR) else: print("Choisissez une option qui existe !!") T.NextStep() MenuChoixClasse(nom) def MenuArmeForge(): #lister les armes améliorables pass<file_sep># -*- coding: utf-8 -*- """ Created on Wed Dec 12 14:04:15 2018 @author: pixel14 """ import DSIII_Classes.Item import Tools as T import copy as C class Inventaire: def __init__(self, contenanceMax): self.ContenanceMax = contenanceMax self.Items = [] self._armeAmeliorables = [] def PoidsActuel(self): poidsTotal = 0 for i in self.Items: poidsTotal += i.Poids return poidsTotal def PoidsDispo(self): return self.ContenanceMax - self.PoidsActuel() def Add(self, item): if isinstance(item, DSIII_Classes.Item.Item): if type(item) is DSIII_Classes.Item.Consommable: pds = item.PoidsStack() else: pds = item.Poids if self.PoidsDispo() >= pds: self.Items.append(item) print("L'objet {} a été ajouté à l'inventaire.".format(item.Nom)) else: print("L'objet {} est trop lourd : votre inventaire ne peut plus contenir que {} kg.".format(item.Nom, self.PoidsDispo())) else: print("Vous ne pouvez ajouter {} à votre inventaire.".format(type(item))) def Del(self, item): if isinstance(item, DSIII_Classes.Item.Item): if item in self.Items: print("Suppression de {} de votre inventaire".format(item.Nom)) self.Items.remove(item) else: print("Erreur : {} n'est pas dans votre inventaire".format(item.Nom)) else: print("Erreur : {} n'est même pas un item".format(type(item))) def Afficher(self): T.Cls() x = 0 pdsTotal = 0 print("--- Liste des objets de l'inventaire ---\n") for i in self.Items: x += 1 if type(i) is not DSIII_Classes.Item.Consommable: pds = i.Poids pdsTotal += pds print("{} - {} ({} kg)".format(x, i.Nom, pds)) if type(i) is DSIII_Classes.Item.Consommable: pds = i.PoidsStack() pdsTotal += pds print("{} - {} : {} / {} (total de {} kg)".format(x, i.Nom, i.Stack, i.MaxStack, i.PoidsStack())) print("\nPoids total de l'inventaire : {} / {} kg max".format(pdsTotal, self.ContenanceMax)) def AfficherArmesForge(self): T.Cls() x = 0 self._armeAmeliorables = [] print("--- Liste des armes pouvant être améliorées ---\n") for i in self.Items: if type(i) is DSIII_Classes.Item.Arme: if i.Niveau < i.NiveauMax: self._armeAmeliorables.append(i) for arme in self._armeAmeliorables: x += 1 print("{0} - {1}".format(x, arme.Nom)) def MenuSuppression(self): choix = -42 while (choix < 0 or choix > (len(self.Items)+1)): self.Afficher() choix = int(input("\nVeuillez saisir l'index de l'objet à supprimer (entre {} et {} - \"0\" pour annuler)\n".format(1, len(self.Items)))) if choix != 0: itemCopie = C.copy(self.Items[choix-1]) del self.Items[choix-1] print("Vous avez bien supprimé l'objet {} de votre inventaire.".format(itemCopie.Nom)) if type(itemCopie) is DSIII_Classes.Item.Arme: print("\nVous serez déséquipé si l'objet supprimé était votre arme courante.") T.NextStep() return itemCopie else: return False else: print("Annulation de la suppression d'objet") return False def MenuArmeForge(self): choix = -42 self.AfficherArmesForge() T.NextStep() <file_sep># -*- coding: utf-8 -*- """ Created on Fri Jan 18 18:24:18 2019 @author: Abscience """ import DSIII_Classes.Enum as E class Spell: def __init__(self, nom, ecole, typeSpell, coutFP, spellBoostRatio, base): self._nom = nom if (not E.EcoleMagie.has_value(ecole)): raise ValueError('ERROR') if ecole in E.EcoleMagie: self._ecole = ecole self._coutFocus = coutFP if (not E.TypeSpell.has_value(typeSpell)): raise ValueError('ERROR') if typeSpell in E.TypeSpell: self._typeSpell = typeSpell self._spellBoostRatio = spellBoostRatio self._base = base @property def Nom(self): return self._nom @property def Ecole(self): return self._ecole @property def CoutFocus(self): return self._coutFocus @property def TypeSpell(self): return self._typeSpell @property def SpellBoostRatio(self): return self._spellBoostRatio @property def Base(self): return self._base """ heal hot heal zone hot zone cleanse cleanse zone larme du déni buffdef buffdefelem buffoff buffarme buffshield degat mono hit degat multi hit dot bleed poison malediction voeu de silence anti aggro boost aggro invisibilité """<file_sep># DSIII_Simulator DarkSouls 3 RPG console adventure simulator <file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 13:50:32 2018 @author: pixel14 """ import DSIII_Classes.Enum as E class Item: def __init__(self, nom, pxAchat, pxVente, poids): self._nom = nom self._prixAchat = pxAchat self._prixVente = pxVente self._poids = poids @property def Nom(self): return self._nom @Nom.setter def Nom(self, value): if len(value) > 20 or len(value) == 0: raise ValueError("Erreur : nom incorrect") self._nom = value @property def PrixAchat(self): return self._prixAchat @property def PrixVente(self): return self._prixVente @property def Poids(self): return self._poids class Arme(Item): def __init__(self, nom, pxAchat, pxVente, poids, baseDeg, ratioForce, ratioDex, ratioInt, ratioFoi, ratioLuck, niveau=0, rareteArme=E.RareteArme.BASIQUE, baseDegParNv=0, rForceParNv=0, rDexteParNv=0, rIntelParNv=0, rFoiParNv=0, rChanceParNv=0): super().__init__(nom, pxAchat, pxVente, poids) self._baseDegat = baseDeg self._ratioForce = ratioForce self._ratioDexterite = ratioDex self._ratioIntelligence = ratioInt self._ratioFoi = ratioFoi self._ratioChance = ratioLuck self._niveau = niveau #print(rareteArme in E.RareteArme) if (not E.RareteArme.has_value(rareteArme)): raise ValueError('ERROR') if rareteArme in E.RareteArme: self._rarete = rareteArme self._niveauMax = self._rarete.value self._baseDegatParNv = baseDegParNv self._rForceParNv = rForceParNv self._rDexteParNv = rDexteParNv self._rIntelParNv = rIntelParNv self._rFoiParNv = rFoiParNv self._rChanceParNv = rChanceParNv @property def BaseDegat(self): return self._baseDegat + (self._baseDegatParNv * self.Niveau) @property def RatioForce(self): return self._ratioForce + (self._rForceParNv * self.Niveau) @property def RatioDexterite(self): return self._ratioDexterite + (self._rDexteParNv * self.Niveau) @property def RatioIntelligence(self): return self._ratioIntelligence + (self._rIntelParNv * self.Niveau) @property def RatioFoi(self): return self._ratioFoi + (self._rFoiParNv * self.Niveau) @property def RatioChance(self): return self._ratioChance + (self._rChanceParNv * self.Niveau) @property def Niveau(self): return self._niveau @property def NiveauMax(self): return self._niveauMax @property def Rarete(self): if self._rarete is E.RareteArme.BASIQUE: return "Arme de base" elif self._rarete is E.RareteArme.UNIQUE: return "Arme unique" else: return "Arme d'âme de boss" def Afficher(self, perso=False): if perso == False: print("--- Détail de l'arme \"{0}\" - niveau {1} ---\n".format(self.Nom, self.Niveau)) print("Dégâts de base : {}\n".format(self.BaseDegat)) print("Ratios") print(" -> {0:>12} : {1:>4%}".format("Force", self.RatioForce)) print(" -> {0:>12} : {1:>4%}".format("Dextérité", self.RatioDexterite)) print(" -> {0:>12} : {1:>4%}".format("Intelligence", self.RatioIntelligence)) print(" -> {0:>12} : {1:>4%}".format("Foi", self.RatioFoi)) print(" -> {0:>12} : {1:>4%}".format("Chance", self.RatioChance)) else: totalDeg = self.BaseDegat degForce = self.RatioForce * perso.Force degDexte = self.RatioDexterite * perso.Dexterite degIntel = self.RatioIntelligence * perso.Intelligence degFoi = self.RatioFoi * perso.Foi degChance = self.RatioChance * perso.Chance totalDeg += degForce totalDeg += degDexte totalDeg += degIntel totalDeg += degFoi totalDeg += degChance totalDeg = int(totalDeg) print("--- Détail de l'arme \"{0}\" - niveau {1} ---\n".format(self.Nom, self.Niveau)) print("Dégâts de base : {}\n".format(self.BaseDegat)) print("Ratios") print(" -> {0:>12} : {1:>4.0%} = {2:>3d}".format("Force", self.RatioForce, int(degForce))) print(" -> {0:>12} : {1:>4.0%} = {2:>3d}".format("Dextérité", self.RatioDexterite, int(degDexte))) print(" -> {0:>12} : {1:>4.0%} = {2:>3d}".format("Intelligence", self.RatioIntelligence, int(degIntel))) print(" -> {0:>12} : {1:>4.0%} = {2:>3d}".format("Foi", self.RatioFoi, int(degFoi))) print(" -> {0:>12} : {1:>4.0%} = {2:>3d}".format("Chance", self.RatioChance, int(degChance))) print("\n -> Total dégâts : {}".format(totalDeg)) def _calculerMaterielRequis(self): req = 0 if self._rarete is E.RareteArme.BASIQUE: if self.Niveau == 0 or self.Niveau == 3 or self.Niveau == 6: req = 2 elif self.Niveau == 1 or self.Niveau == 4 or self.Niveau == 7: req = 4 elif self.Niveau == 2 or self.Niveau == 5 or self.Niveau == 8: req = 6 elif self.Niveau == 9: req = 1 else: if self.Niveau == 0: req = 2 elif self.Niveau == 1: req = 4 elif self.Niveau == 2: req = 6 elif self.Niveau == 3: req = 8 elif self.Niveau == 4: req = 1 return req def Forger(self, upgradeMaterial): letsForge = False QtteReq = self._calculerMaterielRequis() if type(upgradeMaterial) == ForgeItem: # on vérifie qu'on a assez de matos d'upgrade if QtteReq > upgradeMaterial.Quantite: print("Matériaux insuffisants") else: if self._rarete is E.RareteArme.BASIQUE: #on vérifie le type de matériel en fonction du niveau if self.Niveau < 4 and upgradeMaterial.Type is E.UpgradeMaterial.TITANITE: letsForge = True elif self.Niveau >= 4 and self.Niveau <6 and upgradeMaterial.Type is E.UpgradeMaterial.GRANDE_TITANITE: letsForge = True elif self.Niveau >= 6 and self.Niveau <9 and upgradeMaterial.Type is E.UpgradeMaterial.ECLAT_TITANITE: letsForge = True elif self.Niveau == 9 and upgradeMaterial.Type is E.UpgradeMaterial.TABLETTE_TITANITE: letsForge = True else: print("Impossible d'améliorer : niveau de l'arme max ou mauvais matériel") elif self._rarete is E.RareteArme.UNIQUE: if self.Niveau < 4 and upgradeMaterial.Type is E.UpgradeMaterial.ECAILLE_TITANITE: letsForge = True elif self.Niveau == 4 and upgradeMaterial.Type is E.UpgradeMaterial.TABLETTE_TITANITE: letsForge = True else: print("Impossible d'améliorer : niveau de l'arme max ou mauvais matériel") elif self._rarete is E.RareteArme.BOSS: if self.Niveau < 4 and upgradeMaterial.Type is E.UpgradeMaterial.TITANITE_SCINTILLANTE: letsForge = True elif self.Niveau == 4 and upgradeMaterial.Type is E.UpgradeMaterial.TABLETTE_TITANITE: letsForge = True else: print("Impossible d'améliorer : niveau de l'arme max ou mauvais matériel") else: raise ValueError("Erreur : type de l'arme non défini, impossible de forger") if letsForge: self.GagnerNiveau() else: raise ValueError("Ceci n'est pas un matériel de forge : {0}".format(upgradeMaterial)) return letsForge def GagnerNiveau(self): if self.Niveau < self._niveauMax: self._niveau += 1 print("Votre {0} a gagné un niveau.".format(self.Nom)) else: raise ValueError("Erreur : impossible d'améliorer l'arme au dessus de son niveau maximum") class Consommable(Item): def __init__(self, nom, pxAchat, pxVente, poids, typeConso, points, stack, maxStack): super().__init__(nom, pxAchat, pxVente, poids) if typeConso in E.TypeConso: self.Type = typeConso else: self.Type = E.TypeConso.NULL print("Erreur : le conso n'a pas de type définit") self.PointsEffet = points self.Stack = stack self.MaxStack = maxStack def PoidsStack(self): return self.Stack * self.Poids def AfficherType(self): print("{}".format(self.Type.value)) def Utiliser(self): """On va retourner les points d'effets, qui seront utilisés comme : en cas de conso de soin : degats negatifs sur le joueur en cas de conso offensif : degats positifs sur l'ennemi""" effet = 0 if self.Stack > 0: if self.Type == E.TypeConso.OFFENSIF: effet -= self.PointsEffet elif self.Type != E.TypeConso.NULL: effet += self.PointsEffet self.Stack -= 1 print("Vous avez utilisé {}, il vous en reste {}.".format(self.Nom, self.Stack)) else: print("Vous n'avez plus de {}".format(self.Nom)) return effet def AddToStack(self, qtte): if qtte > 0: if (self.Stack + qtte) < self.MaxStack: self.Stack += qtte else: self.Stack = self.MaxStack print("Vous avez désormais {} {}, sur un maximum de {}".format(self.Stack, self.Nom, self.MaxStack)) else: print("Vous ne pouvez pas ajouter une quantité négative d'objets") def Vendre(self, qtte): prixTotal = 0 if qtte > 0 and qtte <= self.Stack and self.Stack > 0: prixTotal = qtte * self.PrixVente self.Stack -= qtte print("Vous avez vendu {} {} pour en retirer {} âmes.".format(qtte, self.Nom, prixTotal)) return prixTotal class ForgeItem(Item): def __init__(self, nom, pxAchat, pxVente, typeForgeItem, quantite=0): super().__init__(nom, pxAchat, pxVente, 0) if typeForgeItem in E.UpgradeMaterial: self._type = typeForgeItem else: self._type = E.UpgradeMaterial.NULL self._quantite = quantite @property def Type(self): return self._type @property def Quantite(self): return self._quantite def AddToStack(self, qtte): if qtte > 0: self._quantite += qtte print("Vous avez désormais {0} {1}.".format(self.Quantite, self.Nom)) else: raise ValueError("Impossible d'ajouter une quantité négative à la stack") def Utiliser(self, qtte): if qtte <= self.Quantite: self._quantite -= qtte print("Vous avez utilisé {0} {1}.".format(self.Quantite, self.Nom)) else: print("Vous n'avez pas assez de {0}".format(self.Nom)) <file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 15:55:39 2018 @author: pixel14 """ from DSIII_Classes.Personnage import Perso joueur = False ContinueGame = True StayInMenuPerso = False StayInMenuInventaire = False StayInMenuSanctuaire = False StayInMenuGardienneDuFeu = False StayInMenuServante = False StayInMenuForgeron = False StayInMenuPyromancien = False StayInMenuVoleur = False StayInMenuOrbeck = False StayInMenuLondor = False StayInMenuIrina = False StayInMenuLeonhard = False<file_sep># -*- coding: utf-8 -*- """ Created on Mon Dec 3 11:44:51 2018 @author: pixel14 """ import DSIII_Fonctions.MainFunctions DSIII_Fonctions.MainFunctions.MainGame()
999be6746a2dd187ed46e0b3bad787fcbac09322
[ "Markdown", "Python" ]
14
Python
shaiscytale/DSIII_Simulator
91cd7516dd3abad55ad38c816f50f2185e64c727
838c422b8883d9558cf127b6c51d51027337e34f
refs/heads/master
<file_sep>module.exports = { mongoURI: 'mongodb://christof123:christof123@ds149353.mlab.com:49353/devconnector', secretOrKey: 'secret' };
3617ba57e67d106c26d07337e724088b61c227f8
[ "JavaScript" ]
1
JavaScript
ChimeraBlack1/DevConnect2
c90913f6e208bf9e09f3cd561d1946333f0ede4d
f80214671d413fccc35ac4a8c06067aae444552e
refs/heads/master
<file_sep>CREATE TABLE `profit` ( `id` bigint(11) unsigned NOT NULL, `askServiceId` int(11) NOT NULL DEFAULT '0', `bidServiceId` int(11) NOT NULL DEFAULT '0', `profit` double DEFAULT NULL, `prcDate` datetime DEFAULT NULL, PRIMARY KEY (`id`,`askServiceId`,`bidServiceId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;<file_sep>package arbitrage.service; import java.time.LocalDateTime; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import arbitrage.dao.ArbitrageTransactionDao; import arbitrage.dao.PriceHistoryDao; import arbitrage.dao.ProfitsDao; import arbitrage.dto.ArbitrageTransactionDto; import arbitrage.dto.TradeHistoryDto; import arbitrage.util.BitCoinServiceEnum; import arbitrage.util.BitCoinUtil; import arbitrage.util.StatusEnum; import arbitrage.vo.ArbitrageTargetVo; import arbitrage.vo.OrderBookByServiceVo; import arbitrage.vo.ProfitVo; public class ArbitrageExecutorService { private static Logger log = LoggerFactory.getLogger(ArbitrageExecutorService.class); private final ArbitrageTransactionDao dao; public ArbitrageExecutorService() throws Exception { dao = new ArbitrageTransactionDao(); } public void execute(ArbitrageTargetVo arbitrageTargetVo, boolean canExecute) throws Exception { if(!canExecute){ return; } log.info("start execute"); if (hasFailedOrder()) { return; } double amount = ArbitragePropertiesService.getInstance().getDealAmount(); // 最初に取得データを保存する long newTransactionId = insertArbitrageData(arbitrageTargetVo, amount); printDealInfomationLog(arbitrageTargetVo, newTransactionId); // アービトラージ可能かどうかの金額をチェック if (!arbitrageTargetVo.isCanExecute()) { log.info("end execute for not deal"); savePriceData(arbitrageTargetVo,newTransactionId); return; } // bitFlyer,zaifはサービス側の原因でapiが落ちることがあるので、先に行う if (isContainZaifService(arbitrageTargetVo.getAskTarget(), arbitrageTargetVo.getBidTarget())) { dealForNotStableService(BitCoinServiceEnum.Zaif,arbitrageTargetVo, amount, newTransactionId); }else if (isContainBitFlyerService(arbitrageTargetVo.getAskTarget(), arbitrageTargetVo.getBidTarget())) { dealForNotStableService(BitCoinServiceEnum.BIT_FLYER,arbitrageTargetVo, amount, newTransactionId); } else { log.info("start bid proc"); boolean isSuccess = executeBid(arbitrageTargetVo, newTransactionId, amount); log.info("end bid proc"); if (isSuccess) { log.info("start ask proc"); executeAsk(arbitrageTargetVo, newTransactionId, amount); log.info("end ask proc"); } } savePriceData(arbitrageTargetVo,newTransactionId); } private void savePriceData(ArbitrageTargetVo arbitrageTargetDto,long newTransactionId) { PriceHistoryDao priceHistoryDao = new PriceHistoryDao(); insertProfits(arbitrageTargetDto.getProfitsList(), newTransactionId); arbitrageTargetDto.getOrderBookList().stream().forEach(p -> priceHistoryDao.insert(newTransactionId, p)); } private void dealForNotStableService(BitCoinServiceEnum service,ArbitrageTargetVo arbitrageTargetDto, double amount, long newTransactionId) throws Exception { if (service.getServiceId() == arbitrageTargetDto.getAskTarget().getServiceId()) { log.info("First proc is "+service.getServiceCaption()+" ask."); boolean isSuccess = executeAsk(arbitrageTargetDto, newTransactionId, amount); if (isSuccess) { executeBid(arbitrageTargetDto, newTransactionId, amount); } } else if (service.getServiceId() == arbitrageTargetDto.getBidTarget().getServiceId()) { log.info("First proc is "+service.getServiceCaption() +" bid."); boolean isSuccess = executeBid(arbitrageTargetDto, newTransactionId, amount); if (isSuccess) { executeAsk(arbitrageTargetDto, newTransactionId, amount); } } } private boolean isContainBitFlyerService(OrderBookByServiceVo ask, OrderBookByServiceVo bid) { return BitCoinServiceEnum.BIT_FLYER.getServiceId() == ask.getServiceId() || BitCoinServiceEnum.BIT_FLYER.getServiceId() == bid.getServiceId(); } private boolean isContainZaifService(OrderBookByServiceVo ask, OrderBookByServiceVo bid) { return BitCoinServiceEnum.Zaif.getServiceId() == ask.getServiceId() || BitCoinServiceEnum.Zaif.getServiceId() == bid.getServiceId(); } private void printDealInfomationLog(ArbitrageTargetVo arbitrageTargetDto, long newTransactionId) { log.info("transaction id is " + newTransactionId); log.info("[ask service book] price=" + arbitrageTargetDto.getAskTarget().getBuyPrice()); arbitrageTargetDto.getAskTarget().getBuyOrderBooks().stream().limit(10) .forEach(o -> log.info("price:" + o.getPrice() + " amount:" + o.getAmount())); log.info("[bid service book] price=" + arbitrageTargetDto.getBidTarget().getSellPrice()); arbitrageTargetDto.getBidTarget().getSellOrderBooks().stream().limit(10) .forEach(o -> log.info("price:" + o.getPrice() + " amount:" + o.getAmount())); } private void insertProfits(List<ProfitVo> profitsList, long newTransactionId) { ProfitsDao profitsDao = new ProfitsDao(); profitsList.stream().forEach(p -> profitsDao.insert(p, newTransactionId)); } private boolean executeBid(ArbitrageTargetVo arbitrageTargetDto, long newTransactionId, double amount) throws Exception { log.info(LocalDateTime.now() + " bid start"); BitCoinServiceHandler bitCoinServiceHandler = new BitCoinServiceHandler( arbitrageTargetDto.getBidTarget().getServiceId()); double sellPrice = arbitrageTargetDto.getBidTarget().getSellPrice(); TradeHistoryDto dto = bitCoinServiceHandler.sell(newTransactionId, sellPrice, amount); log.info("bid " + "service:" + BitCoinUtil.getServiceCaption(arbitrageTargetDto.getBidTarget().getServiceId()) + " " + dto.isSuccess()); if (dto.isSuccess()) { // DBのstatusをupdate(売却注文済みに) updateArbitrageData(newTransactionId, StatusEnum.BIDED.getStatus()); } log.info("bid end"); return dto.isSuccess(); } private boolean hasFailedOrder() { ArbitrageTransactionDao dao = new ArbitrageTransactionDao(); List<ArbitrageTransactionDto> list = dao.getFailedOrder(); return !list.isEmpty(); } private boolean executeAsk(ArbitrageTargetVo arbitrageTargetDto, long arbitrageTransactionId, double amount) throws Exception { BitCoinServiceHandler bitCoinServiceHandler = new BitCoinServiceHandler( arbitrageTargetDto.getAskTarget().getServiceId()); TradeHistoryDto tradeHistoryDto = bitCoinServiceHandler.buy(arbitrageTransactionId, arbitrageTargetDto.getAskTarget().getBuyPrice(), amount); log.info("ask " + "service:" + BitCoinUtil.getServiceCaption(arbitrageTargetDto.getAskTarget().getServiceId()) + " " + tradeHistoryDto.isSuccess()); if (tradeHistoryDto.isSuccess()) { // DBのstatusをupdate(購入済みに) updateArbitrageData(arbitrageTransactionId, StatusEnum.ASKED.getStatus()); } return tradeHistoryDto.isSuccess(); } private void updateArbitrageData(long transactionId, int status) { dao.update(transactionId, status); } private long insertArbitrageData(ArbitrageTargetVo arbitrageTargetDto, double amount) { return dao .insert(ArbitrageTransactionDto.builder().askServiceId(arbitrageTargetDto.getAskTarget().getServiceId()) .bidServiceId(arbitrageTargetDto.getBidTarget().getServiceId()).currency("bitCoin") .amount(amount).askAmount(arbitrageTargetDto.getAskTarget().getBuyPrice()) .bidAmount(arbitrageTargetDto.getBidTarget().getSellPrice()) .difference(arbitrageTargetDto.getDifference()).build()); } } <file_sep>package arbitrage.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import arbitrage.dto.ArbitrageTransactionDto; import arbitrage.util.StatusEnum; public class ArbitrageTransactionDao4MySql extends AbstractDao { public void update(long transactionId, int status) { Connection con = null; PreparedStatement ps = null; try { String updateColumn = ""; if (status == StatusEnum.ASKED.getStatus()) { updateColumn = "buyDate"; } else { updateColumn = "sellDate"; } Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection(host, user, pass); String sql = "UPDATE arbitrageTransaction SET " + updateColumn + "=CURRENT_TIMESTAMP,prcDate=CURRENT_TIMESTAMP WHERE id=?"; ps = con.prepareStatement(sql); ps.setLong(1, transactionId); ps.executeUpdate(); } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; public long insert(ArbitrageTransactionDto dto) { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection(host, user, pass); String sql = "insert into arbitrageTransaction (askServiceId,bidServiceId,currency,amount,askAmount,bidAmount,difference,createdDate,prcDate) values (?,?,?,?,?,?,?,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP)"; ps = con.prepareStatement(sql); ps.setInt(1, dto.getAskServiceId()); ps.setInt(2, dto.getBidServiceId()); ps.setString(3, dto.getCurrency()); ps.setDouble(4, dto.getAmount()); ps.setDouble(5, dto.getAskAmount()); ps.setDouble(6, dto.getBidAmount()); ps.setDouble(7, dto.getDifference()); ps.executeUpdate(); rs = ps.executeQuery("select LAST_INSERT_ID() AS LAST"); long newTransactionId = 0; if (rs != null && rs.next()) { newTransactionId = rs.getLong("LAST"); } return newTransactionId; } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { rs.close(); ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return 0; } public List<ArbitrageTransactionDto> getFailedOrder() { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; List<ArbitrageTransactionDto> list = new ArrayList<ArbitrageTransactionDto>(); try { Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection(host, user, pass); String sql = "SELECT * from arbitrageTransaction where not ((buyDate is null and sellDate is null) or (buyDate is not null and sellDate is not null))"; ps = con.prepareStatement(sql); rs = ps.executeQuery(sql); while (rs != null && rs.next()) { list.add(ArbitrageTransactionDto.builder().id(rs.getInt("id")).askServiceId(rs.getInt("askServiceId")) .bidServiceId(rs.getInt("bidServiceId")).currency(rs.getString("currency")) .amount(rs.getDouble("amount")).askAmount(rs.getDouble("askAmount")) .bidAmount(rs.getDouble("bidAmount")).difference(rs.getDouble("difference")).build()); } return list; } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { rs.close(); ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return list; } } <file_sep>/* * Copyright (c) 2016, nyatla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those * of the authors and should not be interpreted as representing official policies, * either expressed or implied, of the FreeBSD Project. */ package jp.nyatla.jzaif.api; import org.json.JSONObject; import jp.nyatla.jzaif.api.result.StreamingNotify; import jp.nyatla.jzaif.io.IWebsocketClient; import jp.nyatla.jzaif.io.IWebsocketObserver; import jp.nyatla.jzaif.io.JsrWebsocketClient; import jp.nyatla.jzaif.types.CurrencyPair; /** * ZaifストリーミングAPIのラッパークラスです。 * https://corp.zaif.jp/api-docs/trade-api/ * このクラスは継承して使います。 * 通知される非同期メッセージは、{@link #onUpdate}関数をオーバライドして受信します。 * */ public class StreamingApi { final private String API_URL_PREFIX="ws://api.zaif.jp:8888/stream?currency_pair="; final private IWebsocketClient _client; /** * カスタムインタフェイスを使う場合に使用します。 * @param i_client * @param i_cpair */ public StreamingApi(IWebsocketClient i_client,CurrencyPair i_cpair) { i_client.connect(API_URL_PREFIX+i_cpair.symbol,new WsObserver(this)); this._client=i_client; } /** * 通貨ペアに対応したAPIラッパーを構築します。 * @param i_cpair * 通貨ペアの種類。 */ public StreamingApi(CurrencyPair i_cpair) { this(new JsrWebsocketClient(),i_cpair); } /** * インスタンスをシャットダウンします。 * 関数終了後に、非同期イベントが停止しします。 */ public void shutdown() { this._client.disconnect(); } private class WsObserver implements IWebsocketObserver { final StreamingApi _parent; WsObserver(StreamingApi i_parent){ this._parent=i_parent; } @Override public void onStringPacket(String i_value) { this._parent.onUpdate(i_value); JSONObject jso=new JSONObject(i_value); this._parent.onUpdate(new StreamingNotify(jso)); return; } @Override public void onError(String i_message) { } } /** * Notyfyの受信を生JSONで通知します。受信するにはこの関数をオーバライドしてください。 * @param i_data * JSONテキストデータ。 */ public void onUpdate(String i_data) { } /** * Notyfyの受信をパースして通知します。受信するにはこの関数をオーバライドしてください。 * @param i_data * パース済のNotifyオブジェクト。 */ public void onUpdate(StreamingNotify i_data) { } } <file_sep>package arbitrage.main; import java.io.PrintWriter; import java.io.StringWriter; import java.util.Timer; import java.util.TimerTask; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import arbitrage.dao.PriceHistoryDao4MySql; import arbitrage.service.ArbitrageCollectorService; import arbitrage.service.ArbitrageExecutorService; import arbitrage.service.ArbitragePropertiesService; import arbitrage.service.BalanceService; import arbitrage.vo.ArbitrageTargetVo; public class ArbitrageExecutor { private static Logger log = LoggerFactory.getLogger(ArbitrageExecutor.class); public static void main(String[] args) throws Exception { final Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { try { ArbitrageCollectorService dealService = new ArbitrageCollectorService(); ArbitrageTargetVo arbitrageTargetDto = dealService.getTarget(); ArbitragePropertiesService a = ArbitragePropertiesService.getInstance(); if (arbitrageTargetDto != null) { ArbitrageExecutorService arbitrageService = new ArbitrageExecutorService(); arbitrageService.execute(arbitrageTargetDto,a.canExecute()); BalanceService bs = new BalanceService(); bs.saveBalanceByHours(arbitrageTargetDto.getOrderBookList()); } } catch (Exception e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); pw.flush(); log.info(sw.toString()); e.printStackTrace(); } } }, 0, 36000); } } <file_sep>CREATE TABLE `priceHistory` ( `transactionId` bigint(11) unsigned NOT NULL, `serviceId` int(11) NOT NULL DEFAULT '0', `buyPrice` double DEFAULT NULL, `sellPrice` double DEFAULT NULL, `balanceJpy` double DEFAULT NULL, `balanceBtc` double DEFAULT NULL, `reserveBalanceJpy` double DEFAULT NULL, `reserveBalanceBtc` double DEFAULT NULL, `prcDate` datetime DEFAULT NULL, PRIMARY KEY (`transactionId`,`serviceId`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;<file_sep>package arbitrage.dto; import java.sql.Date; import lombok.Builder; import lombok.Data; @Builder @Data public class BalanceDto { long id; int serviceId; Date date; int hour; double balanceJPY; double balanceBTC; double reserveBalanceJPY; double reserveBalanceBTC; double rate; double total; } <file_sep>package arbitrage.util; public class BitCoinUtil { public static String getServiceCaption(int serviceId) { for (BitCoinServiceEnum e : BitCoinServiceEnum.values()) { if (serviceId == e.getServiceId()) { return e.getServiceCaption(); } } return ""; } } <file_sep>CREATE TABLE `sequence` ( `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=164018 DEFAULT CHARSET=latin1;<file_sep>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package coincheck; import java.util.Map; import org.json.JSONObject; /** * * @author Administrator */ public class Trade { private CoinCheck client; public Trade(CoinCheck client) { this.client = client; } /** * 最新の取引履歴を取得できます。 * * @throws java.lang.Exception * * @return JSONObject */ public String all() throws Exception { String response = this.client.request("GET", "api/trades", ""); return response; } } <file_sep>/* * Copyright (c) 2016, nyatla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those * of the authors and should not be interpreted as representing official policies, * either expressed or implied, of the FreeBSD Project. */ package jp.nyatla.jzaif.api.result; import jp.nyatla.jzaif.types.Currency; import jp.nyatla.jzaif.types.NamedEnum; import org.json.JSONObject; /** * ExchangeAPIのベースクラスです。 */ public class ExchangeCommonResult { /** APIが成功したかのフラグ値です。 */ final public boolean success; /** 失敗理由を格納するテキスト。{@link #success}がfalseのときのみ有効。 */ final public String error_text; final public ErrorType error_type; public ExchangeCommonResult(boolean i_success, String i_error_text) { this.success = i_success; this.error_text = i_error_text; ErrorType et; try { et = ErrorType.toEnum(i_error_text); } catch (IllegalArgumentException e) { et = ErrorType.UNKNOWN; } this.error_type = et; } /** パース済みJSONからインスタンスを構築します。 */ public ExchangeCommonResult(JSONObject i_jso) { boolean s = i_jso.getInt("success") == 1; String er = (s ? null : i_jso.getString("error")); this.success = s; this.error_text = er; if (!s) { // エラーの時だけ ErrorType et; try { et = ErrorType.toEnum(er); } catch (IllegalArgumentException e) { et = ErrorType.UNKNOWN; } this.error_type = et; } else { this.error_type = null; } } public static class Funds { final public double jpy; final public double btc; final public double mona; final public double xem; final public double eth; public Funds(double i_jpy,double i_btc,double i_mona,double i_xem,double i_eth){ this.jpy=i_jpy; this.btc=i_btc; this.mona=i_mona; this.xem=i_xem; this.eth=i_eth; } public Funds(JSONObject i_jso) { this(i_jso.getDouble("jpy"), i_jso.getDouble("btc"), i_jso.getDouble("mona"), i_jso.has("xem") ? i_jso.getDouble("xem") : 0, i_jso.has("ETH") ? i_jso.getDouble("ETH") : 0); } } public static enum ErrorType implements NamedEnum.Interface { NONCE_NOT_INCREMENTED("nonce not incremented", 1), INVALID_AMOUNT_PARAMETER("invalid amount parameter", 2), INSUFFICIENT_FUNDS("insufficient funds", 3), INVALID_ORDER_ID_PARAMETER( "invalid order_id parameter", 4), ORDER_NOT_FOUND("order not found", 5), UNKNOWN("unknown", 254), NONE("", 255); /** エラーメッセージのenum値です。 */ final public String symbol; final public int id; private ErrorType(String i_symbol, int i_id) { this.id = i_id; this.symbol = i_symbol; } @Override final public int getId() { return this.id; } @Override final public String getSymbol() { return this.symbol; } public static ErrorType toEnum(String i_symbol) { return NamedEnum.toEnum(ErrorType.class, i_symbol); } public static ErrorType toEnum(int i_id) { return NamedEnum.toEnum(ErrorType.class, i_id); } public static void main(String[] i_args) { System.out.println(ErrorType.toEnum(3)); return; } } } <file_sep># coincheck-java ```java CoinCheck client = new CoinCheck("ACCESS-KEY", "SECRET-KEY"); /** * Public API */ client.ticker().all(); client.trade().all(); client.orderBook().all(); /** * Private API */ // 新規注文 // "buy" 指値注文 現物取引 買い // "sell" 指値注文 現物取引 売り // "market_buy" 成行注文 現物取引 買い // "market_sell" 成行注文 現物取引 売り // "leverage_buy" 指値注文 レバレッジ取引新規 買い // "leverage_sell" 指値注文 レバレッジ取引新規 売り // "close_long" 指値注文 レバレッジ取引決済 売り // "close_short" 指値注文 レバレッジ取引決済 買い JSONObject orderObj = new JSONObject(); orderObj.put("rate", "28500"); orderObj.put("amount", "0.00508771"); orderObj.put("order_type", "buy"); orderObj.put("pair", "btc_jpy"); client.order().create(orderObj); // 未決済の注文一覧 client.order().opens(); // 注文のキャンセル client.order().cancel("2953613"); // 取引履歴 client.order().transactions(); // ポジション一覧 Map<String, String> positions = new HashMap<>(); client.leverage().positions(positions); // 残高 client.account().balance(); // レバレッジアカウントの残高 client.account().leverageBalance(); // アカウント情報 client.account().info(); // ビットコインの送金 JSONObject sendObj = new JSONObject(); sendObj.put("address", "1Gp9MCp7FWqNgaUWdiUiRPjGqNVdqug2hY"); sendObj.put("amount", "0.0002"); client.send().create(sendObj); // ビットコインの送金履歴 Map<String, String> sendParam = new HashMap<>(); sendParam.put("currency", "BTC"); client.send().all(sendParam); // ビットコインの受け取り履歴 client.deposit().all(sendParam); // ビットコインの高速入金 JSONObject depositObj = new JSONObject(); orderObj.put("id", "2222"); client.deposit().fast(depositObj); // 銀行口座一覧 client.bankAccount().all(); // 銀行口座の登録 JSONObject bankAccObj = new JSONObject(); bankAccObj.put("bank_name", "MUFG"); bankAccObj.put("branch_name", "Tokyo"); bankAccObj.put("bank_account_type", "toza"); bankAccObj.put("number", "1234567"); bankAccObj.put("name", "<NAME>"); client.bankAccount().create(bankAccObj); // 銀行口座の削除 client.bankAccount().delete("23334"); // 出金履歴 client.withdraw().all(); // 出金申請の作成 JSONObject withdrawObj = new JSONObject(); withdrawObj.put("bank_account_id", "23335"); withdrawObj.put("amount", "20000"); withdrawObj.put("currency", "JPY"); withdrawObj.put("is_fast", "false"); client.withdraw().create(withdrawObj); // 出金申請のキャンセル client.withdraw().cancel("15678"); // 借入申請 JSONObject borrowObj = new JSONObject(); borrowObj.put("amount", "0.01"); borrowObj.put("currency", "BTC"); client.borrow().create(borrowObj); // 借入中一覧 client.borrow().matches(); // 返済 JSONObject borrowRepayObj = new JSONObject(); borrowRepayObj.put("id", "100"); client.borrow().repay(borrowRepayObj); // レバレッジアカウントへの振替 JSONObject transferToObj = new JSONObject(); transferToObj.put("amount", "100"); transferToObj.put("currency", "JPY"); client.transfer().to_leverage(transferToObj); // レバレッジアカウントからの振替 JSONObject transferFromObj = new JSONObject(); transferFromObj.put("amount", "100"); transferFromObj.put("currency", "JPY"); client.transfer().from_leverage(transferFromObj); ``` <file_sep># Overview 仮想通貨の取引所間で裁定取引をするbotです # Description 設定された取引所をクローリングして、価格差が発生した瞬間に買い、売り、同時に注文を入れます。 取引を行う条件については、下記の設定ファイルで指定することができます https://github.com/haruhiko-tano/arbitrage-bot/blob/master/arbitrageCore/arbitrage.properties.sample 詳細については下記にまとめてあります。 https://qiita.com/haruhiko_tano/items/87aa88aef7b0c421e837 対応通貨 - JPY - BTC - ETH 対応取引所 - Coincheck - Zaif - bitbank - Liquid by Quoine - bitFlyer <file_sep>package arbitrage.service.external; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import arbitrage.dto.TradeHistoryDto; import arbitrage.util.BitCoinServiceEnum; import arbitrage.vo.BalanceVo; import arbitrage.vo.OrderBookByServiceVo; import arbitrage.vo.OrderVo; import coincheck.CoinCheck; public class CoinCheckService implements BitCoinService { private CoinCheck client; private static CoinCheckService instance; public static CoinCheckService getInstance() throws Exception { if (instance == null) { instance = new CoinCheckService(); } return instance; } private CoinCheckService() throws Exception { client = new CoinCheck(BitCoinServiceEnum.COIN_CHECK.getAccessKey(), BitCoinServiceEnum.COIN_CHECK.getSecretAccessKey()); } @Override public TradeHistoryDto buy(double buyPrice, double amount) throws Exception { JSONObject result = null; JSONObject orderObj = new JSONObject(); orderObj.put("rate", buyPrice); orderObj.put("amount", amount); orderObj.put("order_type", "buy"); orderObj.put("pair", "btc_jpy"); result = client.order().create(orderObj); int id = 0; try { id = result.getInt("id"); } catch (JSONException e) { } return TradeHistoryDto.builder().orderId(String.valueOf(id)).isSuccess(result.getBoolean("success")).build(); } @Override public TradeHistoryDto sell(double sellPrice, double amount) throws Exception { JSONObject result = null; JSONObject sell = new JSONObject(); sell.put("rate", sellPrice); sell.put("amount", amount); sell.put("order_type", "sell"); sell.put("pair", "btc_jpy"); result = client.order().create(sell); return makeTradeHistoryDto(result); } private TradeHistoryDto makeTradeHistoryDto(JSONObject result) { int id = 0; try { id = result.getInt("id"); } catch (JSONException e) { } return TradeHistoryDto.builder().orderId(String.valueOf(id)).isSuccess(result.getBoolean("success")).build(); } @Override public BalanceVo getBalance() throws Exception { double balanceJpy = 0; double balanceBtc = 0; double reserveBalanceJpy = 0; double reserveBalanceBtc = 0; JSONObject result = client.account().balance(); try { balanceJpy = result.getDouble("jpy"); balanceBtc = result.getDouble("btc"); reserveBalanceJpy = result.getDouble("jpy_reserved"); reserveBalanceBtc = result.getDouble("btc_reserved"); } catch (JSONException e) { } return BalanceVo.builder().balanceJpy(balanceJpy).balanceBtc(balanceBtc).reserveJpy(reserveBalanceJpy) .reserveBtc(reserveBalanceBtc).build(); } @Override public OrderBookByServiceVo getOrderBook() throws Exception { JSONObject ob = client.orderBook().all(); JSONArray asks = ob.getJSONArray("asks"); JSONArray bids = ob.getJSONArray("bids"); List<OrderVo> askOrders = new ArrayList<>(); List<OrderVo> bidOrders = new ArrayList<>(); for (int i = 0; i < asks.length(); i++) { JSONArray ask = asks.getJSONArray(i); askOrders.add(OrderVo.builder().price(ask.getDouble(0)).amount(ask.getDouble(1)).build()); } for (int i = 0; i < bids.length(); i++) { JSONArray bid = bids.getJSONArray(i); bidOrders.add(OrderVo.builder().price(bid.getDouble(0)).amount(bid.getDouble(1)).build()); } return OrderBookByServiceVo.builder().buyOrderBooks(askOrders).sellOrderBooks(bidOrders).build(); } } <file_sep>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package coincheck; import java.util.List; import java.util.Map; import org.apache.http.NameValuePair; import org.json.JSONObject; /** * * @author Administrator */ public class Ticker { private CoinCheck client; public Ticker(CoinCheck client) { this.client = client; } /** * 各種最新情報を簡易に取得することができます。 * * @throws java.lang.Exception * * @return JSONObject */ public JSONObject all() throws Exception { String response = this.client.request("GET", "api/ticker", ""); JSONObject jsonObj = new JSONObject(response); return jsonObj; } } <file_sep>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package coincheck; import java.util.Map; import org.json.JSONObject; /** * * @author Administrator */ public class Deposit { private CoinCheck client; public Deposit(CoinCheck client) { this.client = client; } /** * Deposit Bitcoin Faster * * @param params * @throws java.lang.Exception * * @return JSONObject */ public JSONObject fast(JSONObject params) throws Exception { String response = this.client.request("POST", "api/deposit_money", params.toString()); JSONObject jsonObj = new JSONObject(response); return jsonObj; } /** * You Get Deposit history * * @param params * @throws java.lang.Exception * * @return JSONObject */ public JSONObject all(Map<String, String> params) throws Exception { String stringParam = Util.httpBuildQuery(params); String response = this.client.request("GET", "api/deposit_money", stringParam); JSONObject jsonObj = new JSONObject(response); return jsonObj; } } <file_sep>/* * Copyright (c) 2016, nyatla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those * of the authors and should not be interpreted as representing official policies, * either expressed or implied, of the FreeBSD Project. */ package jp.nyatla.jzaif.api.result; import org.json.JSONObject; /** * PublicAPIのticker APIの戻り値を格納するクラスです。 */ public class TickerResult { /** 終値(last_priceに相当)*/ final public double last; /** 過去24時間の高値*/ final public double high; /** 過去24時間の安値*/ final public double low; /** 過去24時間の加重平均*/ final public double vwap; /** 過去24時間の出来高*/ final public double volume; /** 買気配値*/ final public double bid; /** 売気配値*/ final public double ask; /** パース済みJSONからインスタンスを構築します。*/ public TickerResult(JSONObject i_jso) { this.last=i_jso.getDouble("last"); this.high=i_jso.getDouble("high"); this.low=i_jso.getDouble("low"); this.vwap=i_jso.getDouble("vwap"); this.volume=i_jso.getDouble("volume"); this.bid=i_jso.getDouble("bid"); this.ask=i_jso.getDouble("ask"); return; } @Override public String toString() { return String.format("last:%f\thigh:%f\tlow:%f\tvwap:%f\tvoulme:%f\tbid:%f\task:%f\t", this.last,this.high,this.low,this.vwap,this.volume,this.bid,this.ask); } } <file_sep>package arbitrage.dao; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import arbitrage.dto.BalanceDto; public class BalanceDao extends AbstractDao { public List<BalanceDto> get(Date date,int hour) { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; List<BalanceDto> list = new ArrayList<BalanceDto>(); try { Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection(sqLitePath); String sql = "SELECT * FROM balances WHERE date=? AND hour=?"; ps = con.prepareStatement(sql); ps.setDate(1, date); ps.setInt(2, hour); rs = ps.executeQuery(); while (rs != null && rs.next()) { list.add(BalanceDto.builder().id(rs.getLong("id")).serviceId(rs.getInt("service_id")) .date(rs.getDate("date")).balanceJPY(rs.getDouble("balance_jpy")) .balanceBTC(rs.getDouble("balance_btc")).rate(rs.getDouble("rate")).total(rs.getDouble("total")) .build()); } return list; } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { rs.close(); ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return list; } public void insert(BalanceDto balance) { Connection con = null; PreparedStatement ps = null; try { Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection(sqLitePath); String sql = "INSERT INTO balances (service_id,date,hour,balance_jpy,balance_btc,reserve_balance_jpy,reserve_balance_btc,rate,total,created_at,updated_at) values (?,?,?,?,?,?,?,?,?,datetime(CURRENT_TIMESTAMP,'localtime'),datetime(CURRENT_TIMESTAMP,'localtime'))"; ps = con.prepareStatement(sql); ps.setInt(1, balance.getServiceId()); ps.setDate(2, balance.getDate()); ps.setInt(3, balance.getHour()); ps.setDouble(4, balance.getBalanceJPY()); ps.setDouble(5, balance.getBalanceBTC()); ps.setDouble(6, balance.getReserveBalanceJPY()); ps.setDouble(7, balance.getReserveBalanceBTC()); ps.setDouble(8, balance.getRate()); ps.setDouble(9, balance.getTotal()); ps.executeUpdate(); } catch (SQLException | ClassNotFoundException e) { e.printStackTrace(); } finally { try { ps.close(); con.close(); } catch (SQLException e) { e.printStackTrace(); } } } } <file_sep>package arbitrage.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; import arbitrage.dto.BalanceDto; import arbitrage.vo.ProfitVo; public class ProfitsDao extends AbstractDao { public void insert(ProfitVo profits, long transactionId) { Connection con = null; PreparedStatement ps = null; try { Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection(sqLitePath); String sql = "INSERT INTO profits (transaction_id,ask_service_id,bid_service_id,profit,created_at,updated_at) values (?,?,?,?,datetime(CURRENT_TIMESTAMP,'localtime'),datetime(CURRENT_TIMESTAMP,'localtime'))"; ps = con.prepareStatement(sql); ps.setLong(1, transactionId); ps.setInt(2, profits.getAskOrderBook().getServiceId()); ps.setInt(3, profits.getBidOrderBook().getServiceId()); ps.setDouble(4, profits.getProfit()); ps.executeUpdate(); } catch (SQLException | ClassNotFoundException e) { e.printStackTrace(); } finally { try { ps.close(); con.close(); } catch (SQLException e) { e.printStackTrace(); } } } } <file_sep>package arbitrage.service; import java.io.FileInputStream; import java.io.InputStream; import java.util.Properties; import arbitrage.util.CurrencyEnum; import arbitrage.util.PairEnum; public class ArbitragePropertiesService { private Properties properties = new Properties(); private static ArbitragePropertiesService instance; public static ArbitragePropertiesService getInstance() { if (instance == null) { instance = new ArbitragePropertiesService(); } return instance; } public ArbitragePropertiesService() { String file = "arbitrage.properties"; try { InputStream inputStream = new FileInputStream(file); properties.load(inputStream); inputStream.close(); } catch (Exception ex) { System.out.println(ex.getMessage()); } } public String getSQLiteFilePath() { return properties.getProperty("sqLiteFilePath"); } public String getDbHost() { return properties.getProperty("dbHost"); } public String getDbUser() { return properties.getProperty("dbUser"); } public String getDbPass() { return properties.getProperty("dbPass"); } public double getDealAmount() { return Double.valueOf(properties.getProperty("dealAmount")); } public double getDealDifference() { return Double.valueOf(properties.getProperty("dealDifference")); } public double getKeepBalanceDifference() { return Double.valueOf(properties.getProperty("keepBalanceDifference")); } public int getDealOrderMargin() { return Integer.valueOf(properties.getProperty("dealOrderMargin")); } public int getDealStopperAmount() { return Integer.valueOf(properties.getProperty("dealStopperAmount")); } public String getCoinCheckAccessKey() { return properties.getProperty("coinCheckAccessKey"); } public String getCoinCheckSecretAccessKey() { return properties.getProperty("coinCheckSecretAccessKey"); } public String getZaifAccessKey() { return properties.getProperty("zaifAccessKey"); } public String getZaifSecretAccessKey() { return properties.getProperty("zaifSecretAccessKey"); } public String getBitBankAccessKey() { return properties.getProperty("bitBankAccessKey"); } public String getBitBankSecretAccessKey() { return properties.getProperty("bitBankSecretAccessKey"); } public String getQuoineAccessKey() { return properties.getProperty("quoineAccessKey"); } public String getBitFlyerSecretAccessKey() { return properties.getProperty("bitFlyerSecretAccessKey"); } public String getBitFlyerAccessKey() { return properties.getProperty("bitFlyerAccessKey"); } public String getQuoineSecretAccessKey() { return properties.getProperty("quoineSecretAccessKey"); } public boolean canExecute() { return Boolean.valueOf(properties.getProperty("canExecute")); } public PairEnum getPair() { return PairEnum.valueOf(properties.getProperty("pair")); } public double getCoinCheckDealFee() { return Double.valueOf(properties.getProperty("coinCheckDealFee")); } public double getZaifDealFee() { return Double.valueOf(properties.getProperty("zaifDealFee")); } public double getBitBankDealFee() { return Double.valueOf(properties.getProperty("bitBankDealFee")); } public double getQuoineDealFee() { return Double.valueOf(properties.getProperty("quoineDealFee")); } public double getBitFlyerDealFee() { return Double.valueOf(properties.getProperty("bitflyerDealFee")); } } <file_sep>package arbitrage.vo; import lombok.Builder; import lombok.Data; @Builder @Data public class OrderVo { private double price; private double amount; } <file_sep>package arbitrage.vo; import java.util.List; import lombok.Builder; import lombok.Data; @Builder @Data public class ArbitrageTargetVo { OrderBookByServiceVo askTarget; OrderBookByServiceVo bidTarget; List<OrderBookByServiceVo> orderBookList; List<ProfitVo> profitsList; double difference; boolean canExecute; } <file_sep>package test; import org.junit.Assert; import org.junit.Test; import arbitrage.dao.PriceHistoryDao; import arbitrage.dto.TradeHistoryDto; import arbitrage.service.BitCoinServiceHandler; import arbitrage.util.BitCoinServiceEnum; import arbitrage.vo.BalanceVo; import arbitrage.vo.OrderBookByServiceVo; import coincheck.OrderBook; public class ApiTest { @Test public void sqliteTest() throws Exception { // PriceHistoryDao dao = new PriceHistoryDao(); // dao.insert(1, OrderBookByServiceVo.builder().build()); } @Test public void bitFlyerTest() throws Exception { // BitCoinServiceHandler bitCoinService = new // BitCoinServiceHandler(BitCoinServiceEnum.Zaif.getServiceId()); // bitCoinService.buy(0, 400000, 0.1); // TradeHistoryDto buyResult = bitCoinService.buy(1, 322640, 0.1); // TradeHistoryDto sellResult = bitCoinService.sell(1, 452640, 0.1); // Assert.assertTrue(buyResult.isSuccess()); // Assert.assertTrue(sellResult.isSuccess()); } @Test public void balanceTest() throws Exception { getBalance(BitCoinServiceEnum.Zaif); getOrder(BitCoinServiceEnum.Zaif); getBalance(BitCoinServiceEnum.BIT_BANK); getOrder(BitCoinServiceEnum.BIT_BANK); getBalance(BitCoinServiceEnum.QUOINE); getOrder(BitCoinServiceEnum.QUOINE); getBalance(BitCoinServiceEnum.BIT_FLYER); getOrder(BitCoinServiceEnum.BIT_FLYER); } @Test public void deailFeeTest() { for (BitCoinServiceEnum e : BitCoinServiceEnum.values()) { System.out.println(e.getDealFee()); } } @Test public void buyTest() throws Exception { // buy(BitCoinServiceEnum.BIT_FLYER); // sell(BitCoinServiceEnum.BIT_FLYER); } private void getBalance(BitCoinServiceEnum bs) throws Exception { BitCoinServiceHandler bitCoinServiceHandler = new BitCoinServiceHandler(bs.getServiceId()); BalanceVo b = bitCoinServiceHandler.getBalance(); System.out.println(b); } private void getOrder(BitCoinServiceEnum bs) throws Exception { BitCoinServiceHandler bitCoinServiceHandler = new BitCoinServiceHandler(bs.getServiceId()); OrderBookByServiceVo b = bitCoinServiceHandler.getOrderBook(); System.out.println(b); } private void buy(BitCoinServiceEnum bs) throws Exception { BitCoinServiceHandler bitCoinServiceHandler = new BitCoinServiceHandler(bs.getServiceId()); TradeHistoryDto dto = bitCoinServiceHandler.buy(0, 0.09, 0.01); System.out.println(dto); } private void sell(BitCoinServiceEnum bs) throws Exception { BitCoinServiceHandler bitCoinServiceHandler = new BitCoinServiceHandler(bs.getServiceId()); TradeHistoryDto dto = bitCoinServiceHandler.sell(0, 0.11, 0.01); System.out.println(dto); } } <file_sep><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>zaif</groupId> <artifactId>zaif</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <dependency> <groupId>libNyanSat</groupId> <artifactId>libNyanSat</artifactId> <version>1.0.0</version> </dependency> <!-- https://mvnrepository.com/artifact/org.json/json --> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20160810</version> </dependency> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.25</version> </dependency> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic --> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version> </dependency> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-core --> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.2.3</version> </dependency> <!-- https://mvnrepository.com/artifact/javax.websocket/javax.websocket-api --> <dependency> <groupId>javax.websocket</groupId> <artifactId>javax.websocket-api</artifactId> <version>1.1</version> <scope>provided</scope> </dependency> </dependencies> </project> <file_sep>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package coincheck; import java.util.Map; import org.json.JSONObject; /** * * @author Administrator */ public class Leverage { private CoinCheck client; public Leverage(CoinCheck client) { this.client = client; } /** * Get a leverage positions list. * * @param params * @throws java.lang.Exception * * @return JSONObject */ public JSONObject positions(Map<String, String> params) throws Exception { String stringParam = Util.httpBuildQuery(params); String response = this.client.request("GET", "api/exchange/leverage/positions", stringParam); JSONObject jsonObj = new JSONObject(response); return jsonObj; } } <file_sep>package arbitrage.service.external; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fckey.bitcoin.bitflyer.api.BitflyerRequestHeaderFactory; import com.fckey.bitcoin.bitflyer.api.PrivateApiClient; import com.fckey.bitcoin.bitflyer.api.PublicApiClient; import com.fckey.bitcoin.bitflyer.common.Currency; import com.fckey.bitcoin.bitflyer.common.OrderType; import com.fckey.bitcoin.bitflyer.common.ProductCode; import com.fckey.bitcoin.bitflyer.common.TimeInForce; import com.fckey.bitcoin.bitflyer.model.Board; import com.fckey.bitcoin.bitflyer.model.Board.Order; import com.fckey.bitcoin.bitflyer.model.order.ChildOrder; import com.fckey.bitcoin.bitflyer.model.order.response.OrderResponse; import com.fckey.bitcoin.bitflyer.model.order.state.ChildOrderState; import com.fckey.bitcoin.core.api.AccessParams; import com.fckey.bitcoin.core.common.BuySell; import arbitrage.dto.TradeHistoryDto; import arbitrage.util.BitCoinServiceEnum; import arbitrage.util.CurrencyEnum; import arbitrage.util.PairEnum; import arbitrage.vo.BalanceVo; import arbitrage.vo.OrderBookByServiceVo; import arbitrage.vo.OrderVo; public class BitFlyerService implements BitCoinService { private static BitFlyerService instance; private PrivateApiClient privateClient; private PublicApiClient publicClient; private static Logger log = LoggerFactory.getLogger(BitFlyerService.class); private ProductCode pair() { if (PairEnum.BTC_JPY.equals(getPair())) { return ProductCode.BTC_JPY; } else if (PairEnum.ETH_BTC.equals(getPair())) { return ProductCode.ETH_BTC; } return null; } private Currency baseCurrency() { if (CurrencyEnum.BTC.equals(getBaseCurrency())) { return Currency.BTC; } else if (CurrencyEnum.ETH.equals(getBaseCurrency())) { return Currency.ETH; } else if (CurrencyEnum.JPY.equals(getBaseCurrency())) { return Currency.JPY; } return null; } private Currency targetCurrency() { if (CurrencyEnum.BTC.equals(getTargetCurrency())) { return Currency.BTC; } else if (CurrencyEnum.ETH.equals(getTargetCurrency())) { return Currency.ETH; } else if (CurrencyEnum.JPY.equals(getTargetCurrency())) { return Currency.JPY; } return null; } public static BitFlyerService getInstance() throws Exception { if (instance == null) { instance = new BitFlyerService(); } return instance; } private BitFlyerService() throws Exception { BitflyerRequestHeaderFactory.init(new AccessParams(BitCoinServiceEnum.BIT_FLYER.getAccessKey(), BitCoinServiceEnum.BIT_FLYER.getSecretAccessKey())); privateClient = PrivateApiClient.getInstance(); publicClient = PublicApiClient.getInstance(); } @Override public TradeHistoryDto buy(double buyPrice, double amount) throws Exception { ChildOrder childOrder = new ChildOrder(pair(), OrderType.LIMIT, BuySell.BUY, buyPrice, amount, 43200, TimeInForce.GTC); OrderResponse order = privateClient.sendChildOrder(childOrder); // statusが正しく取引されてもtrueにならないのでログを出す log.info(order.toString()); // こちらにrequestが返ってきてから非同期処理で注文を執行しているようなので、一旦待つ TimeUnit.SECONDS.sleep(3); // なぜか200で返ってきても注文されていない時があるので、orederをチェック boolean isSuccess = checkOrderState(pair(), order.getResponseId()); return TradeHistoryDto.builder().isSuccess(isSuccess).orderId(order.getResponseId()).isSuccess(true).build(); } @Override public TradeHistoryDto sell(double sellPrice, double amount) throws Exception { ChildOrder childOrder = new ChildOrder(pair(), OrderType.LIMIT, BuySell.SELL, sellPrice, amount, 43200, TimeInForce.GTC); OrderResponse order = privateClient.sendChildOrder(childOrder); // statusが正しく取引されてもtrueにならないのでログを出す log.info(order.toString()); TimeUnit.SECONDS.sleep(3); boolean isSuccess = checkOrderState(pair(), order.getResponseId()); return TradeHistoryDto.builder().isSuccess(isSuccess).orderId(order.getResponseId()).isSuccess(true).build(); } @Override public BalanceVo getBalance() throws Exception { List<com.fckey.bitcoin.bitflyer.model.Balance> balance = privateClient.getBalance(); com.fckey.bitcoin.bitflyer.model.Balance balanceJpy = balance.stream() .filter(s -> baseCurrency().toString().equals(s.getCurrency())).findFirst().get(); com.fckey.bitcoin.bitflyer.model.Balance balanceBtc = balance.stream() .filter(s -> targetCurrency().toString().equals(s.getCurrency())).findFirst().get(); return BalanceVo.builder().balanceJpy(balanceJpy.getAvailable()).balanceBtc(balanceBtc.getAvailable()) .reserveJpy(balanceJpy.getAmount() - balanceJpy.getAvailable()) .reserveBtc(balanceBtc.getAmount() - balanceBtc.getAvailable()).build(); } @Override public OrderBookByServiceVo getOrderBook() throws Exception { Board board = publicClient.getBoard(pair()); List<Order> asks = board.getAsks(); List<Order> bids = board.getBids(); List<OrderVo> askOrders = new ArrayList<>(); List<OrderVo> bidOrders = new ArrayList<>(); for (Order a : asks) { askOrders.add(OrderVo.builder().price(a.getPrice()).amount(a.getSize()).build()); } for (Order b : bids) { bidOrders.add(OrderVo.builder().price(b.getPrice()).amount(b.getSize()).build()); } return OrderBookByServiceVo.builder().buyOrderBooks(askOrders).sellOrderBooks(bidOrders).build(); } public boolean checkOrderState(ProductCode productCode, String childOrderAcceptanceId) throws IOException { List<ChildOrderState> list = privateClient.getChildOrderStates(productCode, childOrderAcceptanceId); return list != null && !list.isEmpty(); } } <file_sep>CREATE TABLE `arbitrageTransaction` ( `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT, `askServiceId` int(11) DEFAULT NULL, `bidServiceId` int(11) DEFAULT NULL, `currency` varchar(2000) DEFAULT NULL, `amount` double DEFAULT NULL, `askAmount` double DEFAULT NULL, `bidAmount` double DEFAULT NULL, `difference` double DEFAULT NULL, `buyDate` datetime DEFAULT NULL, `sellDate` datetime DEFAULT NULL, `createdDate` datetime DEFAULT NULL, `prcDate` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=311495 DEFAULT CHARSET=latin1;<file_sep><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>arbitrage</groupId> <artifactId>arbitrage</artifactId> <version>0.0.1-SNAPSHOT</version> <dependencies> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic --> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.3</version> </dependency> <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-core --> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.2.3</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.3.3</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.3.6</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.9.1</version> </dependency> <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.42</version> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20160810</version> </dependency> <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.25</version> </dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.16.18</version> </dependency> <dependency> <groupId>org.xerial</groupId> <artifactId>sqlite-jdbc</artifactId> <version>3.8.11.2</version> </dependency> </dependencies> </project><file_sep>CREATE TABLE `tradeHistory` ( `transactionId` bigint(11) NOT NULL, `orderId` varchar(767) NOT NULL DEFAULT '0', `isSuccess` varchar(11) DEFAULT NULL, `errorContent` varchar(2000) DEFAULT NULL, `prcDate` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1;<file_sep>CREATE TABLE `balance` ( `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT, `serviceId` int(11) DEFAULT NULL, `date` date DEFAULT NULL, `hour` int(11) DEFAULT NULL, `balanceJPY` double DEFAULT NULL, `balanceBTC` double DEFAULT NULL, `reserveBalanceJpy` double DEFAULT NULL, `reserveBalanceBtc` double DEFAULT NULL, `rate` double DEFAULT NULL, `total` double DEFAULT NULL, `prcDate` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6301 DEFAULT CHARSET=latin1;<file_sep>package arbitrage.dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import arbitrage.dto.ArbitrageTransactionDto; import arbitrage.util.StatusEnum; public class ArbitrageTransactionDao extends AbstractDao { public void update(long transactionId, int status) { Connection con = null; PreparedStatement ps = null; try { String updateColumn = ""; if (status == StatusEnum.ASKED.getStatus()) { updateColumn = "buy_date"; } else { updateColumn = "sell_date"; } Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection(sqLitePath); String sql = "UPDATE arbitrage_transactions SET " + updateColumn + "=datetime(CURRENT_TIMESTAMP,'localtime'),updated_at=datetime(CURRENT_TIMESTAMP,'localtime') WHERE id=?"; ps = con.prepareStatement(sql); ps.setLong(1, transactionId); ps.executeUpdate(); } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }; public long insert(ArbitrageTransactionDto dto) { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; try { Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection(sqLitePath); String sql = "insert into arbitrage_transactions (ask_service_id,bid_service_id,currency,amount,ask_amount,bid_amount,difference,created_at,updated_at) values (?,?,?,?,?,?,?,datetime(CURRENT_TIMESTAMP,'localtime'),datetime(CURRENT_TIMESTAMP,'localtime'))"; ps = con.prepareStatement(sql); ps.setInt(1, dto.getAskServiceId()); ps.setInt(2, dto.getBidServiceId()); ps.setString(3, dto.getCurrency()); ps.setDouble(4, dto.getAmount()); ps.setDouble(5, dto.getAskAmount()); ps.setDouble(6, dto.getBidAmount()); ps.setDouble(7, dto.getDifference()); ps.executeUpdate(); ps.close(); ps = con.prepareStatement("select LAST_INSERT_ROWID()"); rs = ps.executeQuery(); long newTransactionId = 0; if (rs != null && rs.next()) { newTransactionId = rs.getLong("LAST_INSERT_ROWID()"); } return newTransactionId; } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { rs.close(); ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return 0; } public List<ArbitrageTransactionDto> getFailedOrder() { Connection con = null; PreparedStatement ps = null; ResultSet rs = null; List<ArbitrageTransactionDto> list = new ArrayList<ArbitrageTransactionDto>(); try { Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection(sqLitePath); String sql = "SELECT * from arbitrage_transactions where updated_at> datetime('now','localtime','-6 hours') and not ((buy_date is null and sell_date is null) or (buy_date is not null and sell_date is not null))"; ps = con.prepareStatement(sql); rs = ps.executeQuery(); while (rs != null && rs.next()) { list.add(ArbitrageTransactionDto.builder().id(rs.getInt("id")).askServiceId(rs.getInt("ask_service_id")) .bidServiceId(rs.getInt("bid_service_id")).currency(rs.getString("currency")) .amount(rs.getDouble("amount")).askAmount(rs.getDouble("ask_amount")) .bidAmount(rs.getDouble("bid_amount")).difference(rs.getDouble("difference")).build()); } return list; } catch (SQLException | ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { rs.close(); ps.close(); con.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return list; } } <file_sep>/* * Copyright (c) 2016, nyatla * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those * of the authors and should not be interpreted as representing official policies, * either expressed or implied, of the FreeBSD Project. */ package jp.nyatla.jzaif.api.result; import java.util.Date; import org.json.JSONObject; /** * ExchangeAPIのgetinfo APIの戻り値を格納するクラスです。 * 拡張パラメータは{@link #success}がtrueのときのみ有効です。 */ public class GetInfoResult extends ExchangeCommonResult { /** パース済みJSONからインスタンスを構築します。*/ public GetInfoResult(JSONObject i_jso) { super(i_jso); if(!this.success){ this.funds=null; this.deposit=null; this.rights=null; this.trade_count=0; this.open_orders=0; this.server_time=null; return; } JSONObject r=i_jso.getJSONObject("return"); this.funds=new Funds(r.getJSONObject("funds")); this.deposit=new Deposit(r.getJSONObject("deposit")); this.rights=new Rights(r.getJSONObject("rights")); this.trade_count=r.getLong("trade_count"); this.open_orders=r.getInt("open_orders"); this.server_time=new Date(r.getLong("server_time")*1000); } public class Deposit{ final public double jpy; final public double btc; final public double mona; final public double eth; public Deposit(JSONObject i_jso) { this.jpy=i_jso.getDouble("jpy"); this.btc=i_jso.getDouble("btc"); this.mona=i_jso.getDouble("mona"); this.eth =i_jso.getDouble("ETH"); } } public class Rights{ final public boolean info; final public boolean trade; final public boolean withdraw; public Rights(JSONObject i_jso) { this.info=i_jso.getInt("info")==1?true:false; this.trade=i_jso.getInt("trade")==1?true:false; this.withdraw=i_jso.getInt("withdraw")==1?true:false; } } final public Funds funds; final public Deposit deposit; final public Rights rights; final public long trade_count; final public int open_orders; final public Date server_time; } <file_sep>package arbitrage.util; public enum CurrencyEnum { JPY, BTC, ETH; }
24d0c9ffb2f261b0c5c70975f981e7784b502d9b
[ "Java", "SQL", "Maven POM", "Markdown" ]
33
SQL
haruhiko-tano/arbitrage-bot
b26bdea63b3acd217736ce60bcc1e787d0bac67e
5c35db75e2ff146ab4614ef50e6a068aa29eb51f
refs/heads/master
<file_sep>import React from 'react'; import axios from 'axios'; const {Consumer, Provider} = React.createContext(); function QuestionConsumer(WrappedComponent) { return function (props) { return ( <Consumer> {(valueFromProvider) => ( <WrappedComponent {...props} questions={valueFromProvider.questions} oneQuestion={valueFromProvider.oneQuestion} answeredQuestions={valueFromProvider.answeredQuestions} points={valueFromProvider.points} style={valueFromProvider.style} isAnswered={valueFromProvider.isAnswered} showButton={valueFromProvider.showButton} getAllQuestions={valueFromProvider.getAllQuestions} getRandomQuestion={valueFromProvider.getRandomQuestion} morePoints={valueFromProvider.morePoints} isCorrect={valueFromProvider.isCorrect} nextQuestion={valueFromProvider.nextQuestion} restartGame={valueFromProvider.restartGame} /> )} </Consumer> ) } } class QuestionProvider extends React.Component { state = { questions: [], oneQuestion: {}, answeredQuestions:[], points: 0, style: ['answer', 'answer', 'answer'], isAnswered: false, showButton: false } getAllQuestions = () => { axios .get(process.env.REACT_APP_API_URL + '/api') .then((response) => { this.setState({questions: response.data}); this.getRandomQuestion() }) .catch((err) => console.log(err)) }; getRandomQuestion = () => { const {questions, answeredQuestions} = this.state; const randomQuestion = questions[Math.floor(Math.random()*questions.length)]; for (let i = 0; i<questions.length; i++) { let someQuestion = (question) => question._id === randomQuestion._id; let isThere = answeredQuestions.some(someQuestion); if(answeredQuestions.length === 0 || !isThere) { const newAnswered = [...answeredQuestions]; newAnswered.push(randomQuestion); this.setState({oneQuestion:randomQuestion, answeredQuestions:newAnswered}); break; } else { return this.getRandomQuestion(); } } } morePoints = () => { const {oneQuestion, points} = this.state; let updatedPoints = points; updatedPoints += oneQuestion.points this.setState({points: updatedPoints}) } isCorrect = (index) => { const {style, isAnswered, oneQuestion, showButton} = this.state; if(!isAnswered) { const updateStyle = style if (index === oneQuestion.correctAnswer) { updateStyle[index] += ' ' + 'correct'; this.morePoints() } else { updateStyle[index] += ' ' + 'incorrect'; } this.setState({isAnswered:!isAnswered, style:updateStyle, showButton:!showButton}) } } nextQuestion = () => { const {isAnswered, showButton} = this.state; const resetStyle = ['answer', 'answer', 'answer']; this.setState({ isAnswered:!isAnswered, showButton:!showButton, style: resetStyle }); this.getRandomQuestion() } restartGame = () => { const resetStyle = ['answer', 'answer', 'answer']; this.setState({ questions: [], oneQuestion: {}, answeredQuestions:[], points: 0, style: resetStyle, isAnswered: false, showButton: false }); } render() { const { questions, oneQuestion, answeredQuestions, points, style, isAnswered, showButton } = this.state; const { getAllQuestions, getRandomQuestion, morePoints, isCorrect, nextQuestion, restartGame } = this; return ( <Provider value={{ questions, oneQuestion, answeredQuestions, points, style, isAnswered, showButton, getAllQuestions, getRandomQuestion, morePoints, isCorrect, nextQuestion, restartGame }}> {this.props.children} </Provider> ) } } export {QuestionProvider, QuestionConsumer} <file_sep>import React from "react"; import "./App.css"; import { Switch, Route } from "react-router-dom"; import SplashScreen from "./pages/SplashScreen"; import GameScreen from './pages/GameScreen' import EndScreen from './pages/EndScreen' function App() { return ( <div className='main'> <Switch> <Route exact path="/" component={SplashScreen} /> <Route path="/game" component={GameScreen}/> <Route path="/end" component={EndScreen}/> </Switch> </div> ); } export default App; <file_sep>import React, { Component } from 'react' import {QuestionConsumer} from './../lib/QuestionProvider' import {Link} from 'react-router-dom' class GameScreen extends Component { componentDidMount() { this.props.getAllQuestions() } render() { const { oneQuestion, questions, answeredQuestions, points, style, showButton } = this.props; let actualNumber = answeredQuestions.length; const totalNumber = questions.length; return ( <div className='question-container'> <div className='red-container'> <div className='points'> <p>Points: {points}</p> </div> <div className='white-container'> <p className='number-question'>Question {actualNumber} / {totalNumber}</p> <p className='theQuestion'>{oneQuestion.question}</p> <img src={oneQuestion.picture} alt="Random gif that makes you laugh"/> </div> </div> <div className='answers-container'> <div className='p-container'> <p>Select the correct answer</p> </div> <div className='answer-part'> <div className='center-answer'> <ol> {oneQuestion.question && oneQuestion.answers.map((answer, index) => { return ( <li key={index}> <button onClick={() => this.props.isCorrect(index)} className={style[index]}>{answer}</button> </li> )})} </ol> { showButton ? <div className='next-btn'> {actualNumber === totalNumber ? <Link to={'/end'} className='finish'>Finish quiz!</Link> : <button onClick={this.props.nextQuestion}>➡</button> } </div> : null } </div> </div> </div> </div> ) } } export default QuestionConsumer(GameScreen) <file_sep># D&D 5ed Quiz Game! ![](https://www.tribality.com/wp-content/uploads/2014/10/cover-dnd-e1501645849868.jpg) ## What is it about? Hello fellow adventurer! In this game you will know if you are an expert of the most famous role-playing game in the world (only 5ed) answering to some challenging questions. Are you ready? Roll the dice! You can play the game here: https://dnd-quiz-game.herokuapp.com/ #### Backlog - User can select a language to play (ENG/SPA). - Add a ranking to see who has more points. - User can create their own quizzes. - Users can play other users' quizzes. ### Client/Front-end ------ #### React Router Routes | Path | Component | Component Description | | :---: | :----------: | :-----------------------------------------: | | / | SplashScreen | Shows main screen when users enter. | | /game | GameScreen | Shows game screen | | /end | EndScreen | Shows the end of the quiz with final points | ### Server/Back-end ------ ##### Models Question model `{` `question: String,` `picture: String,` `answers:[String],` `correctAnswer:Number,` `points:Number` `}` #### API Endpoints (backend routes) | HTTP Method | URL | Success Status | Error Status | Description | | :---------: | :--: | :------------: | :----------: | :----------------------------: | | GET | /api | 200 | 500 | Gets all questions and details | ### Links ------ [Back-end:](https://github.com/arimagic-8bit/D-D-Quiz-Game-Server) [Front-end](https://github.com/arimagic-8bit/D-D-Quiz-Game-Client)<file_sep>import React from "react"; import { Link } from "react-router-dom"; export default function SplashScreen() { return ( <div className='splash-screen'> <h1>A <span className='dnd'>D&D</span> 5ed QUIZ</h1> <p> Adventurer, test your knowledge in this game plenty of misterious questions and reveal your destiny </p> <Link className='start-btn' to={"/game"}>Start Game</Link> </div> ); } <file_sep>import React, { Component } from 'react' import {Link} from 'react-router-dom' import {QuestionConsumer} from './../lib/QuestionProvider' class EndScreen extends Component { render() { const {points, restartGame} = this.props const showThis = () => { if (points <= 50) { return ( <div> <img src='https://res.cloudinary.com/dywatr6gy/image/upload/v1592212060/DnD/26488B41-010D-4A17-A093-D10C4ECC62B4_ryyifk.png' alt='An npc face' className='image-type' /> <h3 className='type'>You are an NPC!</h3> <p className='funny-text'>Hey! At least you exist.</p> </div> ) } else if (points > 50 && points <= 100) { return ( <div> <img src='https://res.cloudinary.com/dywatr6gy/image/upload/v1592213918/DnD/9ece767ba78291f07e1921dca469a0de_orpo6s.jpg' alt='Female and male adventurer' className='image-type' /> <h3 className='type'>You are an adventurer!</h3> <p className='funny-text'>You started a journey full of surprises and perils. Only destiny knows what you will encounter.</p> </div> ) } else if (points > 100 && points <= 150) { return ( <div> <img src='https://res.cloudinary.com/dywatr6gy/image/upload/v1592213920/DnD/2a29bf496a26823dd910500ac476019e_ytnl2b.jpg' alt='Old mage' className='image-type' /> <h3 className='type'>You are a wielder of knowledge!</h3> <p className='funny-text'>You surpassed a lot of perils and forged a name. Bards sing your adventures.</p> </div> ) } else if (points > 150) { return ( <div> <img src='https://res.cloudinary.com/dywatr6gy/image/upload/v1592213921/DnD/e1962e90f6814bda054e8c0888aee6e7_slbdwf.jpg' alt='Game Master' className='image-type' /> <h3 className='type'>Are you a DM?</h3> <p className='funny-text'>I'm impress! Only people with this knowledge can be a DM. Continue sharing your stories with everyone.</p> </div> ) } } return ( <div className='end-container'> <div className='endScreen'> <p className='final-score'>Your score: {points}</p> {showThis()} <Link onClick={() => restartGame()} className='try-btn' to={'/'}>Try again?</Link> </div> </div> ) } } export default QuestionConsumer(EndScreen)
05787186168ac38ee9bb68d8b1b33fec8740c4f0
[ "JavaScript", "Markdown" ]
6
JavaScript
arimagic-8bit/D-D-Quiz-Game-Client
c904b69f3b3aeb9681fdbda2951a25ae611e5b2b
78162bade6f5245c96fa5158d7c76244a7ba5e97
refs/heads/master
<repo_name>robmayhew/java-quick-data-store<file_sep>/src/com/robmayhew/qds/QuickDataStoreInterface.java package com.robmayhew.qds; import java.util.ArrayList; import java.util.List; /** * Copyright 2012 <NAME> * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public interface QuickDataStoreInterface { public String getFilePath(); public void save(String key, Object value); public Object load(String key); } <file_sep>/src/com/robmayhew/qds/FileValueStore.java /** * * Copyright 2013 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.robmayhew.qds; import java.io.*; public class FileValueStore implements ValueStore { private final String filePath; public FileValueStore(String filePath) { this.filePath = filePath; } public void writeValue(String key, String value) throws QDSException { File f = new File(filePath); File swapFile = new File(filePath + ".swap"); if (swapFile.exists()) { if (!swapFile.delete()) throw new QDSException("Unable to delete swap file " + swapFile.getPath()); } try { renameToSwapFile(f, swapFile); if (!swapFile.exists()) { // First write PrintWriter writer = new PrintWriter(new FileWriter(filePath)); try { writer.println(key + "=" + value); } finally { writer.flush(); writer.close(); } return; } replaceValueInFile(key, value, swapFile); } catch (Exception e) { throw new RuntimeException("Error writing file", e); } } private void replaceValueInFile(String key, String value, File swapFile) throws IOException { PrintWriter writer = new PrintWriter(new FileWriter(filePath)); BufferedReader reader = new BufferedReader(new FileReader(swapFile)); boolean valueWritten = false; try { while (reader.ready()) { String line = reader.readLine(); if (line.startsWith(key + "=")) { writer.println(key + "=" + value); valueWritten = true; } else { writer.println(line); } } if(!valueWritten) writer.println(key + "=" + value); } finally { reader.close(); writer.flush(); writer.close(); cleanupSwapFile(swapFile); } } private void renameToSwapFile(File f, File swapFile) { if (f.exists()) { if (!f.renameTo(swapFile)) throw new RuntimeException("Unable to rename file " + filePath + " for writing"); } } private void cleanupSwapFile(File swapFile) { if (!swapFile.delete()) { System.err.println("Unable to delete swap file " + swapFile.getPath()); } } public String loadValue(String key) { File f = new File(filePath); if (!f.exists()) return null; String jsonString = null; try { BufferedReader reader = new BufferedReader(new FileReader(filePath)); try { while (reader.ready()) { String line = reader.readLine(); if (line.startsWith(key + "=")) { int i = line.indexOf("="); jsonString = line.substring(i + 1); } } } finally { reader.close(); } } catch (Exception e) { throw new RuntimeException("Error loading " + filePath, e); } return jsonString; } } <file_sep>/test/com/robmayhew/qds/FooObjectTest.java /** * * Copyright 2012 <NAME> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.robmayhew.qds; import junit.framework.TestCase; import java.io.File; public class FooObjectTest extends TestCase { private QuickDataStore store; String filePath = "fooTest"; public void setUp() { store = new QuickDataStore(new FileValueStore(filePath)); store = new QuickDataStore(new PreferencesValueStore(FooObjectTest.class.getSimpleName())); File testFile = new File(filePath); testFile.delete(); } public void tearDown() { File testFile = new File(filePath); testFile.delete(); } public void testSaveFoo() { Foo value = new Foo(); String key = "foo"; store.save(key,value); Foo result = (Foo)store.load(key); assertEquals(value,result); } public void testSaveFooWithData() { Foo value = new Foo(); value.setActive(true); value.setName("Testing\nYES testing"); value.setAge(321); value.setValue(09709.3434); String key = "foo"; store.save(key,value); Foo result = (Foo)store.load(key); assertEquals(value,result); } } <file_sep>/README.md # Java Quick Data Store (QDS) # What is it? QDS is a simple persistent storage system for simple java apps. Inspired by NSUserDefaults in objective-c. Java Quick Datastore provides a simple key value persistent map for java. QDS is extremely easy to use with as little as one line to save or load persistent data. QDS is not a database and should not be used as one. It is only meant for simple use cases like a demo application, or some other experimental code. Given that there is a simple upgrade path when you are ready to use a real database backend. QDS will store + String + boolean + int + long + double + Simple Java objects containing the above + and java.util.List of the above. Examples: Quick and dirty, QDS will pick a filename based on the package the first save or load is called from and place the file in the System.getProperty(‘user.home’) folder. ```java QDS.save("Testing", "A String"); String s = (String)QDS.load("Testing"); ``` You can specify where to store data by calling ```java QDS.usePath("pathname"); ``` before save or load to specify exactly where you want the persistent file placed. To replace the guts of QDS use the useInstance method provinding your own impletation of the QuickDataStoreInterface ```java QDS.useInstance(QuickDataStoreInterface qds) ``` <file_sep>/test/com/robmayhew/qds/RealWorldTests.java package com.robmayhew.qds; /** * Created with IntelliJ IDEA. * User: rob * Date: 12-09-08 * Time: 2:00 PM * To change this template use File | Settings | File Templates. */ public class RealWorldTests { }
96267ed81da0e5cc3cf83bc93b2faffdcb597018
[ "Markdown", "Java" ]
5
Java
robmayhew/java-quick-data-store
cc83531b484bd9f3617bd1da2623717c1f3d1828
da708fa7ea5b870b7e62d3e8c3d6c8ee03e130d2
refs/heads/master
<file_sep><?php use Elementor\Controls_Manager; use Elementor\Group_Control_Typography; use Elementor\Widget_Base; if ( ! defined('ABSPATH') ) { exit; // Exit if accessed directly. } class JHDC_Elementor_WithLove_Widget extends Widget_Base { /** * Get widget name. * Retrieve Branding widget name. * * @return string Widget name. * @since 1.0.0 * @access public */ public function get_name() { return 'jhdc-branding-withlove'; } /** * Get widget title. * Retrieve oEmbed widget title. * * @return string Widget title. * @since 1.0.0 * @access public */ public function get_title() { return __('With Love', 'jhdc-branding-elementor-extension'); } /** * Get widget icon. * Retrieve oEmbed widget icon. * * @return string Widget icon. * @since 1.0.0 * @access public */ public function get_icon() { return 'fa fa-heart'; } /** * Get widget categories. * Retrieve the list of categories the oEmbed widget belongs to. * * @return array Widget categories. * @since 1.0.0 * @access public */ public function get_categories() { return [ 'jhdc-elementor-widgets' ]; } /** * Register oEmbed widget controls. * Adds different input fields to allow the user to change and customize the widget settings. * * @since 1.0.0 * @access protected */ protected function _register_controls() { $this->start_controls_section('brand_colors', [ 'label' => __('Colors', 'jhdc-branding-elementor-extension'), 'tab' => Controls_Manager::TAB_STYLE, ]); $this->add_control('color', [ 'label' => __('Color', 'jhdc-branding-elementor-extension'), 'type' => Controls_Manager::COLOR, 'default' => '#ababab', //'scheme' => [ // 'type' => Scheme_Color::get_type(), // 'value' => Scheme_Color::COLOR_1, //], 'selectors' => [ '{{WRAPPER}} a' => 'color: {{VALUE}}', ], ]); $this->add_group_control(Group_Control_Typography::get_type(), [ 'name' => 'typography', 'selector' => '{{WRAPPER}} a', ]); $this->end_controls_section(); } /** * Render oEmbed widget output on the frontend. * Written in PHP and used to generate the final HTML. * * @since 1.0.0 * @access protected */ protected function render() { $settings = $this->get_settings_for_display(); echo '<div class="jhdc-branding-withlove">'; //$url = $settings["url"]; $url = "https://jimmyhowe.com"; $color = $settings["color"]; echo "<a href='{$url}' target='_blank'>Made with ❤ by JimmyHowe.com</a>"; echo '</div>'; } protected function _content_template() { ?> <div class="jhdc-branding-withlove"> <a href='https://jimmyhowe.com/' style='{{{ settings.color }}}' target='_blank'>Made with ❤ by JimmyHowe.com</a> </div> <?php } }
643d19d7a6214c8069195b47c9ccb7f25f8f98dd
[ "PHP" ]
1
PHP
jimmyhowedotcom/jhdc-branding-elementor-extension
dea87f8e36628e8eae2829adf6409d98a75a7215
b7bf69e4d972c64c5d706f87f9d2c96dd7f7cc99
refs/heads/master
<file_sep>view.mark.count.perpage=10 <file_sep>package services; import java.util.Set; import javax.ejb.Remote; @Remote public interface Config { Set<String> getConfigNames(); void setConfig(String key, String value); String getValue(String key); } <file_sep>package services; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import javax.annotation.PostConstruct; import javax.ejb.AccessTimeout; import javax.ejb.AsyncResult; import javax.ejb.Asynchronous; import javax.ejb.DependsOn; import javax.ejb.Singleton; import javax.ejb.Startup; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Singleton @Startup @AccessTimeout(value = 15, unit = TimeUnit.SECONDS) @DependsOn("ConfigBean") public class HardProcessBean implements HardProcess { private final static Logger logger = LoggerFactory .getLogger(HardProcessBean.class); @PostConstruct void init() { logger.info("Construct HardProceesBean"); } @Asynchronous @Override public Future<String> process(String value) { try { for (int i = 0; i < 5; i++) { System.out.println("Step " + i + " for " + value); Thread.sleep(1000); } } catch (InterruptedException e) { return new AsyncResult<String>("error"); } return new AsyncResult<String>(value); } } <file_sep>13_EJB_EJBModules ================= Бизнес уровень приложения. Использует бины: 1) Stateless(запросы в БД); 2) Statefull(хранение данных пользователя); 3) Singleton (хранение конфигураций для веб-уровня); Использует интерцепторы для логирования CarServiceBean. <file_sep>package dao; import java.sql.SQLException; import java.util.List; import javax.ejb.Local; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.LockModeType; import javax.persistence.PersistenceContext; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; import domain.Mark; import domain.Mark_; @Local @Stateless public class CarDAOBean implements CarDAO { @PersistenceContext(unitName = "EProjectEJB") EntityManager entityManager; @Override public int getCount() throws SQLException { CriteriaBuilder builder = entityManager.getCriteriaBuilder(); CriteriaQuery<Long> query = builder.createQuery(Long.class); Root<Mark> mark = query.from(Mark.class); query.select(builder.count(mark)); query.where(builder.equal(mark.get(Mark_.deleted), 0)); return entityManager.createQuery(query) .getSingleResult().intValue(); } @Override public List<Mark> getMarks(int offset, int count) throws SQLException { CriteriaBuilder builder = entityManager.getCriteriaBuilder(); CriteriaQuery<Mark> query = builder.createQuery(Mark.class); Root<Mark> mark = query.from(Mark.class); query.select(mark); query.where(builder.equal(mark.get(Mark_.deleted), 0)); return entityManager.createQuery(query.select(mark)) .setMaxResults(count).setFirstResult(offset).getResultList(); } @Override public Mark get(long id) { CriteriaBuilder builder = entityManager.getCriteriaBuilder(); CriteriaQuery<Mark> query = builder.createQuery(Mark.class); Root<Mark> mark = query.from(Mark.class); query.select(mark); query.where(builder.equal(mark.get(Mark_.id), id)); return entityManager.createQuery(query.select(mark)) .getSingleResult(); } @Override public void create(Mark mark) { entityManager.persist(mark); } @Override public void delete(long id) { Mark m = entityManager.find(Mark.class, id, LockModeType.OPTIMISTIC); if(m!=null){ m.setDeleted(1); entityManager.persist(m); } } } <file_sep>package domain; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Version; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; /** * @author Aleksei_Ivshin * */ @Entity @Table(name = "mark") @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) public class Mark implements Serializable { /** * */ private static final long serialVersionUID = -6437859440145961767L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private long id; @Column(name = "name") private String name; @Column(name = "deleted") private int deleted; @Version protected short version; public Mark() { } public Mark(long id, String name) { this.id = id; this.name = name; this.deleted = 0; } public Mark(String name) { this.name = name; this.deleted = 0; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getDeleted() { return deleted; } public void setDeleted(int deleted) { this.deleted = deleted; } public short getVersion() { return version; } public void setVersion(short version) { this.version = version; } }
5b1cec39614ee6cf3afd76d2e8357e1e138e5293
[ "Markdown", "Java", "INI" ]
6
INI
AlekseiIvshin/13_EJB_EJBModules
2e18c52a2d08f902d003f6ac7639acf8c25a02f5
d210189544b8aa6c772dc61fadaa6217fd7a8289
refs/heads/master
<repo_name>YanZhang233/NoFaceMonster<file_sep>/index.js var monster = document.getElementById("monster"); var msg = document.getElementById("msg"); var loading = document.getElementById("loading"); var heart = document.getElementById("heart"); monster.addEventListener("click", function () { msg.classList.remove("hide"); setTimeout(popHeart, 2500); }); function popHeart() { loading.classList.add("hide"); heart.classList.remove("hide"); } heart.addEventListener("click", function () { heart.classList.add("heart-active"); }); <file_sep>/README.md # NoFaceMonster An animation of no-face monster. https://yanzhang233.github.io/NoFaceMonster
037c7b8d6fff948e778577fe8b95ad24ee6fe463
[ "JavaScript", "Markdown" ]
2
JavaScript
YanZhang233/NoFaceMonster
0b5a4d016f3bfd7ad4a575f18c34ccbe7640e42a
56b8c027ffe37ab147ba776b139cf35a130ecf3e
refs/heads/master
<repo_name>hdknr/XmJose<file_sep>/XmJose/Json/StreamExtensions.cs using System; using System.IO; using System.Collections.Generic; using System.Linq; namespace XmJose.Json { public static class StreamExtensions { public static readonly int BUFFER_SIZE = 4096 * 8; /// <summary> /// Compress with Microsoft Compression /// </summary> /// <param name="src">source data in byte array</param> /// <returns>compressed data in byte array</returns> public static byte[] ToCompressed(this byte[] src) { return Deflate.CompressBytes(src); } /// <summary> /// Uncompress with Microsoft COmpression /// </summary> /// <param name="src">Compressed byte array</param> /// <returns>Original data in byte array</returns> public static byte[] ToDecompressed(this byte[] src) { return Deflate.DecompressToBytes(src); } public static byte[] ToByteArray(this Stream stream) { return stream.ToByteArray (); } public static byte[] ToByteArray(this string str) { return System.Text.Encoding.UTF8.GetBytes(str); } public static char[] ToCharArray(this string str) { return null; } public static string ToUtf8(this byte[] octets) { return System.Text.Encoding.UTF8.GetString(octets,0, octets.Length); } /// <summary> /// Convert 64 bit ulong integer into byte array /// </summary> /// <param name="value">ulong integer</param> /// <returns>byte[]</returns> public static byte[] ToOctetString(this ulong value) { var ret = BitConverter.GetBytes(value); if (BitConverter.IsLittleEndian) Array.Reverse(ret); return ret; } /// <summary> /// Convert 32 bit uint into byte array /// </summary> /// <param name="value">uint integer</param> /// <returns>byte[]</returns> public static byte[] ToOctetString(this uint value) { var ret = BitConverter.GetBytes(value); if (BitConverter.IsLittleEndian) Array.Reverse(ret); return ret; } public static ulong ToUint32(this byte[] seqence) { if (BitConverter.IsLittleEndian) Array.Reverse (seqence); return BitConverter.ToUInt32 (seqence, 0); } public static byte[] Slice(this byte[] org,int start, int end = int.MaxValue) { if (end < 0) { end = org.Length + end; } start = Math.Max(0, start); end = Math.Max(start, end); return org.Skip(start).Take(end - start).ToArray(); } public static byte[] Slice(this byte[] org, uint start, uint end = int.MaxValue) { return org.Slice((int)start, (int)end); } public static Dictionary<string, string> ParseQuery(this string query) { return query .Split ("?&".ToCharArray ()) .Where (i => string.IsNullOrEmpty (i) == false) .Select (i => i.Split ('=')) .ToDictionary ( i => Uri.UnescapeDataString (i [0]), i => Uri.UnescapeDataString (i [1])); } } } <file_sep>/README.md # JOSE for Xamarin - [JWA](https://tools.ietf.org/html/rfc7518) - [JWK](https://tools.ietf.org/html/rfc7517) - [JWS](https://tools.ietf.org/html/rfc7515) - [JWE](https://tools.ietf.org/html/rfc7516) - [JWT](https://tools.ietf.org/html/rfc7519) # Dependencies ## Nugets - [Portable.BouncyCastle](https://www.nuget.org/packages/Portable.BouncyCastle/) - [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - [FubarCoder.RestSharp.Portable](https://www.nuget.org/packages/FubarCoder.RestSharp.Portable.Core/) <file_sep>/XmJoseUnit/Json/Base64Test.cs using NUnit.Framework; using System; using XmJose.Json; namespace XmJoseUnit.Json { [TestFixture ()] public class Base64Test { /// <summary> /// JWS /// Appendix C. Notes on Implementing base64url Encoding without Padding /// /// https://tools.ietf.org/html/rfc7515#appendix-C /// </summary> [Test ()] public void TestCaseBase64Url () { var src = new byte[]{3,236,255,224,193 }; Assert.AreEqual ( src.ToBase64Url (), // Extension Methods "A-z_4ME"); } } } <file_sep>/XmJose/Json/BaseObject.cs using System; using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Linq; namespace XmJose.Json { public class BaseObject { [JsonExtensionData] public IDictionary<string, JToken> Addtionals = new Dictionary<string, JToken>(); public JToken this[string name] { get { return this.Addtionals[name]; } set { this.Addtionals[name] = value; } } public T ConvertAddtionals<T>() where T: BaseObject { return FromJson<T>(this.AddtionalsToJson()); } public string AddtionalsToJson() { return JsonConvert.SerializeObject(this.Addtionals); } public void MergeObject(BaseObject obj) { this.Addtionals = ((Dictionary<string, JToken>)this.Addtionals).Merge(obj.ToDict()); } public virtual string ToJson() { return JsonConvert.SerializeObject(this, Formatting.None, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.None, DefaultValueHandling = DefaultValueHandling.Ignore, }); } public string ToBase64Url() { return this.ToJson().ToBase64Url(); } public Dictionary<string, JToken> ToDict() { return JsonConvert.DeserializeObject<Dictionary<string, JToken>>(this.ToJson()); } public bool IsSameObject(BaseObject obj) { var d1 = this.ToDict(); var d2 = obj.ToDict(); // Dictionary<string, JToken> => compare after ToString() return d1.All(x => x.Value.ToString() == d2[x.Key].ToString()); } public static T FromJson<T>(string jsonstr) where T : BaseObject { var ret = JsonConvert.DeserializeObject<T>(jsonstr, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore } ); return ret; } public static T FromDict<T>(Dictionary<string,string> dict) where T: BaseObject { return FromJson<T> ( JsonConvert.SerializeObject(dict)); } public static T FromDict<T>(Dictionary<string,object> dict) where T: BaseObject { return FromJson<T> ( JsonConvert.SerializeObject(dict)); } public static T FromBase64Url<T>(string b64url) where T: BaseObject { var json = b64url.ToStringFromBase64Url (); return FromJson<T> (json); } public static T FromQueryString<T>(string query) where T: BaseObject { return FromDict<T> (query.ParseQuery ()); } [JsonIgnore] public DateTime LastUpdated{ get; set; } public static T Cascade<T>(params BaseObject[] joseobjects) where T:BaseObject { JObject result = new JObject(); foreach (BaseObject obj in joseobjects) { if (obj == null) continue; JObject parsed = JObject.Parse( obj.ToJson() ); foreach (var property in parsed) result[property.Key] = property.Value; } return FromJson<T>(result.ToString()); } public virtual string ToQueryString() { // PCL doens't support HttpUtility.UrlEncode var vars = ToDict().Select( value => String.Format("{0}={1}", Uri.EscapeUriString(value.Key), Uri.EscapeUriString(value.Value.ToString()) ) ).ToArray<string>(); return string.Join("&",vars); } } } <file_sep>/XmJose/Json/ProtectedObject.cs using System; using Newtonsoft.Json; namespace XmJose.Json { public class ProtectedObject : BaseObject { /// <summary> /// Base64url Cache /// </summary> /// <value>The b64u.</value> [JsonIgnore] public string b64u { get; set; } } } <file_sep>/XmJose/Jwe.cs /// <summary> /// https://tools.ietf.org/html/rfc7516 /// </summary> using System; namespace XmJose { public class Jwe : Json.BaseObject { public Jwe () { } } } <file_sep>/XmJose/Json/Base64Extensions.cs using System; using System.IO; using System.Text; using System.Collections.Generic; using System.Linq; using Org.BouncyCastle.Math; namespace XmJose.Json { public static class Base64Extensions { public static string ToBase64Url(this byte[] bytes) { StringBuilder result = new StringBuilder( Convert.ToBase64String(bytes).TrimEnd('=')); result.Replace('+', '-'); result.Replace('/', '_'); return result.ToString(); } public static byte[] ToBytesFromBase64Url(this string base64ForUrlInput) { int padChars = (base64ForUrlInput.Length % 4) == 0 ? 0 : (4 - (base64ForUrlInput.Length % 4)); StringBuilder result = new StringBuilder(base64ForUrlInput, base64ForUrlInput.Length + padChars); result.Append(String.Empty.PadRight(padChars, '=')); result.Replace('-', '+'); result.Replace('_', '/'); return Convert.FromBase64String(result.ToString()); } #region BigInteger public static string ToBase64Url(this BigInteger bg) { var bytes = bg.ToByteArrayUnsigned (); return bytes.ToBase64Url (); } public static BigInteger ToBigIntegerFromBase64url(this string src) { int UNSIGNED = 1; return new BigInteger(UNSIGNED, src.ToBytesFromBase64Url()); } #endregion #region string public static string ToBase64Url(this string src) { return src.ToByteArray().ToBase64Url(); } public static string ToStringFromBase64Url(this string base64url) { var bytes = base64url.ToBytesFromBase64Url (); return Encoding.UTF8.GetString(bytes, 0, bytes.Length); } #endregion #region chars public static char[] ToCharsFromBase64Url(this string base64url) { return Encoding.UTF8.GetChars( base64url.ToBytesFromBase64Url() ); } #endregion } } <file_sep>/XmJose/Json/Deflate.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.IO.Compression; // with Microsoft Compression Nuget Libary namespace XmJose.Json { public class Deflate { public static byte[] Compress(object data) { using (var writer = new StreamWriter(new MemoryStream())) { writer.Write(data); writer.Flush(); writer.BaseStream.Position = 0; return Compress(writer.BaseStream); } } public static byte[] CompressBytes(byte[] data) { using (var mem = new MemoryStream()) { mem.Write(data, 0, data.Length); mem.Flush(); mem.Position = 0; return Compress(mem); } } public static byte[] Compress(Stream input) { using (var compressStream = new MemoryStream()) using (var compressor = new DeflateStream( compressStream, CompressionMode.Compress)) { input.CopyTo(compressor); compressor.Flush (); return compressStream.ToArray(); } } public static Stream DecompressToStream(byte[] input) { var output = new MemoryStream(); using (var compressStream = new MemoryStream(input)) using (var decompressor = new DeflateStream( compressStream, CompressionMode.Decompress)) decompressor.CopyTo(output); output.Position = 0; return output; } public static byte[] DecompressToBytes(byte[] input) { using (var memoryStream = new MemoryStream()) { DecompressToStream(input).CopyTo(memoryStream); return memoryStream.ToArray(); } } public static string DecompressToString(byte[] input) { using (var reader = new StreamReader( DecompressToStream(input) )) { return reader.ReadToEnd(); } } } }<file_sep>/XmJose/Jwa/Iana.cs using System; namespace XmJose.Jwa { /// <summary> /// 7. IANA Considerations /// /// https://tools.ietf.org/html/rfc7518 /// </summary> public class Iana { public Iana () { } } } <file_sep>/XmJose/Jwt.cs /// <summary> /// https://tools.ietf.org/html/rfc7519 /// </summary> using System; namespace XmJose { public class Jwt : Json.BaseObject { public Jwt () { } } } <file_sep>/XmJoseUnit/Json/BaseObjectTest.cs using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; namespace XmJoseUnit.Json { [TestFixture ()] public class BaseObjectTest { public class Profile : XmJose.Json.BaseObject { public string name {get;set; } public int age {get;set; } } [Test ()] public void TestCaseDict() { var d = new Dictionary<string, object> { { "name", "alice"}, {"age", 35}}; var p = Profile.FromDict<Profile>(d); Assert.AreEqual(p.name, d["name"]); Assert.AreEqual(p.age, d["age"]); } [Test ()] public void TestCaseAdditionals(){ var d = new Dictionary<string, object> { { "name", "alice"}, {"age", 35}, {"phone#mobile", "090-9999-9999"}}; var p = Profile.FromDict<Profile>(d); Assert.AreEqual (p ["phone#mobile"].ToString(), d ["phone#mobile"]); var p2 = Profile.FromJson<Profile> (p.ToJson ()); Assert.AreEqual ( p ["phone#mobile"].ToString(), p2["phone#mobile"].ToString()); var d2 = p2.ToDict (); Assert.AreEqual (d ["phone#mobile"], d2 ["phone#mobile"].ToString ()); } } } <file_sep>/XmJose/JwkSet.cs using System; namespace XmJose { public class JwkSet : Json.BaseObject { public JwkSet () { } } } <file_sep>/XmJose/Json/CollectionsExtensions.cs using System; using System.Collections.Generic; using System.Linq; namespace XmJose.Json { public static class CollectionsExtensions { public static Dictionary<T1, T2> Merge<T1, T2>( this Dictionary<T1, T2> first, Dictionary<T1, T2> second) { if (first == null) throw new ArgumentNullException("first"); if (second == null) throw new ArgumentNullException("second"); return first.Concat(second).ToDictionary(kvp => kvp.Key, kvp => kvp.Value); } } } <file_sep>/XmJose/Jwk.cs /// <summary> /// https://tools.ietf.org/html/rfc7517 /// </summary> using System; namespace XmJose { public class Jwk : Json.BaseObject { public Jwk () { } } } <file_sep>/XmJose/Jws.cs /// <summary> /// https://tools.ietf.org/html/rfc7515 /// </summary> using System; namespace XmJose { public class Jws : Json.BaseObject { public Jws () { } } }
385ae51ec892603efcded4e9a75f2727b378dc03
[ "Markdown", "C#" ]
15
C#
hdknr/XmJose
9d6922010f87c218e748c8e8ea16d5b3b9a20d52
333915001cd23137838d1c58fd71172e389d4d78
refs/heads/master
<repo_name>Aliaksandr-Strr/Parser_Doctors<file_sep>/vrachi.py import json import math import pandas import requests class Parser: def __init__(self): # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=16116' # Камянск # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=873'# Била церква # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=20347' # Одеса # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # Одеса # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=23977' # львов # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # львов # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=18172' # Чернивци # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # Чернивци # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=18589' Харьков self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # Харьков # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=9232' # Rivne # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=10259' # Poltava # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=21525' # Zaporogie # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # Zaporogie # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=12106' # Sumi # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=15752' # Dnipro # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # Dnipro # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=1&settlementId=1' # Kiiv # self.url = 'https://helsi.me/api/healthy/organizations?level=0&limit=30&page=' # Kiiv self.url_doctors = 'https://helsi.me/api/healthy/doctors?limit=11&organizationId=' self.url_phone = 'https://helsi.me/api/healthy/doctors/' self.json = 'offices.json' self.fio = [] def processing_data(self): for i in range(1, 5): result = requests.get(f"{self.url}{i}&settlementId=18589") all_data = result.json()['data'] for data in all_data: id = data['id'] hospital_specialization = data['specialization'] if hospital_specialization == 'PrimaryCare': hospital_specialization = 'Сімейні лікарі' elif hospital_specialization == 'Outpatient': hospital_specialization = 'Вузькі спеціалісти' elif hospital_specialization == 'Undefined': hospital_specialization = 'Приватна клініка' result = requests.get(f"{self.url_doctors}{id}&page=1") paging = result.json()['paging'] pages = (math.ceil(paging['length'] / paging['limit'])) for i in range(1, pages + 1): # for i in range(1,2): result = requests.get(f"{self.url_doctors}{id}&page={i}") all_data = result.json()['data'] for data in all_data: resourceId = data['resourceId'] phone_url = requests.get(f"{self.url_phone}{resourceId}") try: phone = phone_url.json()['contactPhones'][0] except Exception: phone = '-' last_name = data['lastName'] first_name = data['firstName'] try: middle_name = data['middleName'] except KeyError: middle_name = '---' doc = '' try: speciality = data['speciality'] for i in speciality: doc += f" {i['doctorSpeciality']}" except KeyError: doc += '---' organization = data['organization']['name'] addresses = data['organization']['addresses']['address']['addressText'] self.fio.append( {'ФИО': f"{last_name} {first_name} {middle_name}", 'Специальность': doc, 'Организация': organization, 'Адрес': addresses, 'Тип': hospital_specialization, 'Телефон': phone } ) # print(self.fio) print(len(self.fio)) df_master = None for info in self.fio: df = pandas.DataFrame(info, index=[0]) if df_master is None: df_master = df else: df_master = pandas.concat([df_master, df]) with pandas.ExcelWriter("Харьков.xlsx", engine="openpyxl", mode="w") as writer: df_master.to_excel(writer) if __name__ == '__main__': p = Parser() p.processing_data()
d73a3eb583103cc032e681393d8f38752351b6c9
[ "Python" ]
1
Python
Aliaksandr-Strr/Parser_Doctors
3b7fa7f020799d2ecea1d0391886613098de4afc
522c867ead57f13e116a65d6a4170b0820bb6239
refs/heads/master
<file_sep>package main import ( "fmt" "encoding/json" "io/ioutil" "os" ) type Conf struct { DbHost string DbUsername string DbPassword string DbName string } func IsValideConf(c Conf) bool { if c.DbHost == "" { return false } if c.DbUsername == "" { return false } if c.DbPassword == "" { return false } if c.DbName == "" { return false } return true } func LoadConf() Conf { file, e := ioutil.ReadFile("conf.env") if e != nil { fmt.Printf("File error: %v\n", e) os.Exit(1) } var conf Conf json.Unmarshal(file, &conf) if !IsValideConf(conf) { fmt.Printf("Configuration invalide") os.Exit(1) } return conf } <file_sep>package main import ( "fmt" "encoding/json" "io/ioutil" "os" ) func WriteOutPutStatGeneral(s StatGenerale) bool { output, err := json.Marshal(s) if(err != nil) { fmt.Println("erreur lors de la sérialisation des stats generale", err) return false } err = ioutil.WriteFile("output/statgeneral.json", output, 0644) if(err != nil) { fmt.Println("erreur lors de l'écriture des stats generale", err) return false } return true } func WriteOutPutProfils(p PseudoProfils) bool { output, err := json.Marshal(p) if(err != nil) { fmt.Println("erreur lors de la sérialisation de ", p.Infos.Pseudo, ":", err) return false } path := GeneratePathFile("profils/", p.Infos.Pseudo, 3) err = ioutil.WriteFile(path, output, 0644) if(err != nil) { fmt.Println("erreur lors de l'écriture de ", p.Infos.Pseudo, ":", err) return false } return true } func WriteOutPutSimilaire(pseudo string, s []Similaire) bool { output, err := json.Marshal(s) if(err != nil) { fmt.Println("erreur lors de la sérialisation de ", pseudo, ":", err) return false } path := GeneratePathFile("similaires/", pseudo, 3) err = ioutil.WriteFile(path, output, 0644) if(err != nil) { fmt.Println("erreur lors de l'écriture de ", pseudo, ":", err) return false } return true } func GeneratePathFile(subFolder string, pseudo string, nbLvl int) string { path := "output/" + subFolder for i := 0; i < nbLvl; i++ { path += string(pseudo[i]) + "/" if(!folderExists(path)) { os.MkdirAll(path, 0777) } } return path + pseudo + ".json" } func FileExiste(subFolder string, pseudo string, nbLvl int) bool { path := GeneratePathFile(subFolder, pseudo, nbLvl); if _, err := os.Stat(path); os.IsNotExist(err) { return false } return true } func folderExists(path string) (bool) { _, err := os.Stat(path) if err == nil { return true } if os.IsNotExist(err) { return false } return true } <file_sep>package main import ( "fmt" "time" "os" "sort" "bufio" ) type PseudoProfils struct { Infos Auteur AnalyseTextuel []WordOccurence SujetByYear []LabelSerie SujetByLastMouth []LabelSerie Sujets []Sujet Similaires []Similaire } type Similaire struct { Pseudo string ID uint Nb_messages uint Pourc float64 Img_lien string Banni uint } type StatGenerale struct { NbPseudo uint NbSujet uint NbReponse uint NbRepSujet float64 ReponseByYear []LabelSerie ReponseByLastMouth []LabelSerie Sujets []Sujet Auteurs []Auteur AnalyseTextuel []WordOccurence } func main() { conf := LoadConf() start := time.Now() bdd := Impl{} bdd.InitDB(conf) bdd.InitSchema() argsWithProg := os.Args[1:] if len(argsWithProg) == 0 { fmt.Println("Aucun mode choisi, fin du programme") os.Exit(0) } switch argsWithProg[0] { case "-profils": pseudos := bdd.GetAllPseudo() GenerateProfils(pseudos, bdd) case "-similaires": pseudos := bdd.GetAllPseudo() GenerateSimilaires(pseudos, bdd) case "-statsgeneral": GenerateStatGeneral(bdd) default: fmt.Println("Aucun mode valide choisi, fin du programme") os.Exit(0) } end := time.Now() fmt.Println(argsWithProg, len(argsWithProg), end.Sub(start)) } func GenerateStatGeneral(bdd Impl) { var stats StatGenerale stats.NbPseudo = uint(bdd.CountAuteur()) stats.NbSujet = uint(bdd.CountSujets()) stats.NbReponse = uint(bdd.CountNbReponseSujets()) stats.NbRepSujet = float64(float64(stats.NbReponse) / float64(stats.NbSujet)) stats.ReponseByYear = bdd.CountNbReponseByYear() stats.ReponseByLastMouth = bdd.CountNbReponseByLastMouth() stats.Sujets = bdd.TopSujets() stats.Auteurs = bdd.TopAuteurs() stats.AnalyseTextuel = GenerateAllWords(bdd) WriteOutPutStatGeneral(stats) } func GenerateProfils(pseudos []string, bdd Impl) { nb := len(pseudos) excludeWord := getExcludeWordFile("input/excludeWord.csv") for i := 0; i < nb; i++ { start := time.Now() pourc := (float64(i)/float64(nb))*100 p := PseudoProfils{} p.Infos = bdd.GetAuteurByPseudo(pseudos[i]) p.Sujets = bdd.GetSujetByAuteur(int(p.Infos.ID)) p.SujetByYear = StatSujetsByYear(p.Sujets) p.SujetByLastMouth = StatSujetsByLastMouth(p.Sujets) p.AnalyseTextuel = analyseTextuelSujets(p.Sujets, excludeWord) WriteOutPutProfils(p) end := time.Now() fmt.Println(pourc, end.Sub(start), p.Infos.Pseudo) } } func GenerateSimilaires(pseudos []string, bdd Impl) { nb := len(pseudos) for i := 0; i < nb; i++ { if FileExiste("similaires/", pseudos[i], 3) { continue } start := time.Now() pourc := (float64(i)/float64(nb))*100 similaires := getSimilaires(pseudos[i], pseudos, bdd) WriteOutPutSimilaire(pseudos[i], similaires) end := time.Now() fmt.Println(pourc, end.Sub(start), pseudos[i]) } } func getSimilaires(target string, pseudos []string, bdd Impl) []Similaire { var s []Similaire pFounds := CalcDistPseudo(target, pseudos) for _,v := range pFounds { tempo := Similaire{} infos := bdd.GetAuteurByPseudo(v.S) tempo.Pseudo = infos.Pseudo tempo.ID = infos.ID tempo.Nb_messages = infos.Nb_messages tempo.Img_lien = infos.Img_lien tempo.Banni = infos.Banni tempo.Pourc = v.Dist * 100 s = append(s, tempo) } return s } func GenerateAllWords(bdd Impl) []WordOccurence{ var words map[string]int words = make(map[string]int) excludeWord := getExcludeWordFile("input/excludeWord.csv") compteur := 0 file, err := os.Open("input/sujets.csv") if err != nil { panic("erreur") } defer file.Close() scanner := bufio.NewScanner(file) for scanner.Scan() { var t []string t = append(t, scanner.Text()) GenrateMapFromUrl(words, t) compteur += 1 if compteur % 1000000 == 0 { fmt.Println(compteur) } } if err := scanner.Err(); err != nil { panic("erreur") } final := ConvertMapWordToSlice(words) final = cleanArrayWords(final, excludeWord) sort.Slice(final, func(i, j int) bool { return final[i].Nb > final[j].Nb }) return final[0:100] } <file_sep>package main import ( "strconv" "time" "sort" ) type TimestampSerie struct { T int Nb int } type LabelSerie struct { Label string Nb int } func monthFrench(x int) string { var m []string m = append(m, "Jan") m = append(m, "Fev") m = append(m, "Mar") m = append(m, "Avr") m = append(m, "Mai") m = append(m, "Juin") m = append(m, "Jui") m = append(m, "Aou") m = append(m, "Sep") m = append(m, "Oct") m = append(m, "Nov") m = append(m, "Dec") return m[x - 1] } func MonthToTimestamp(y int, m int) int { then := time.Date(y, time.Month(m), 1, 0, 0, 0, 0, time.UTC) return int(then.Unix()) } func YearToTimestamp(y int) int { return MonthToTimestamp(y, 1) } func TimestampToYear(t int) string { date := time.Unix(int64(t), 0) return strconv.Itoa(date.Year()) } func TimestampToMounth(t int) string { date := time.Unix(int64(t), 0) year := date.Year() month := int(date.Month()) frenchMonth := monthFrench(month) return strconv.Itoa(year) + "-" + frenchMonth } func RangeYear(start int, end int) map[int]int { var m map[int]int m = make(map[int]int) for i := start; i <= end; i++ { timestamp := YearToTimestamp(i) m[timestamp] = 0 } return m } func RangeLastMonth(startY int, startM int, nbMonth int) map[int]int { var final map[int]int final = make(map[int]int) compteur := 0 for y := startY; y > 0; y-- { for m := startM; m > 0; m-- { timestamp := MonthToTimestamp(y, m) final[timestamp] = 0 compteur += 1 if(compteur == nbMonth) { return final } } startM = 12 } return final } func ConvertTimeMapToArray(m map[int]int) []TimestampSerie { var timesSerie []TimestampSerie for k,v := range m { var t TimestampSerie t.T = k t.Nb = v timesSerie = append(timesSerie, t) } sort.Slice(timesSerie, func(i, j int) bool { return timesSerie[i].T > timesSerie[j].T }) return timesSerie } func StatSujetsByYear(sujets []Sujet) []LabelSerie { current := time.Now() statsDict := RangeYear(2004, current.Year()) var timesSerie []TimestampSerie var labelSerie []LabelSerie for _,v := range sujets { key := YearToTimestamp(v.Initialised_at.Year()) if _, ok:= statsDict[key]; ok { statsDict[key] += 1 } } timesSerie = ConvertTimeMapToArray(statsDict) for _,v := range timesSerie { var t LabelSerie t.Label = TimestampToYear(v.T) t.Nb = v.Nb labelSerie = append(labelSerie, t) } return labelSerie } func StatSujetsByLastMouth(sujets []Sujet) []LabelSerie { current := time.Now() statsDict := RangeLastMonth(current.Year(), int(current.Month()), 12) var timesSerie []TimestampSerie var labelSerie []LabelSerie for _,v := range sujets { y := v.Initialised_at.Year() m := int(v.Initialised_at.Month()) key := MonthToTimestamp(y, m) if _, ok:= statsDict[key]; ok { statsDict[key] += 1 } } timesSerie = ConvertTimeMapToArray(statsDict) for _,v := range timesSerie { var t LabelSerie t.Label = TimestampToMounth(v.T) t.Nb = v.Nb labelSerie = append(labelSerie, t) } return labelSerie } <file_sep>package main import ( "sort" "github.com/xrash/smetrics" "regexp" "strings" "os" "io" "bufio" "encoding/csv" "fmt" ) type DistString struct { S string Dist float64 } type WordOccurence struct { Word string Nb int } func getExcludeWordFile(path string) []string { csvFile, _ := os.Open(path) reader := csv.NewReader(bufio.NewReader(csvFile)) words := []string{} for { line, error := reader.Read() if error == io.EOF { break } if error != nil { fmt.Println(error) } if len(line) > 0 { words = append(words, line[0]) } } return words } func CalcDistPseudo(c string, pseudos []string) []DistString { var dists []DistString for _, v := range pseudos { x := DistString{} x.S = v x.Dist = smetrics.Jaro(c, v) dists = append(dists, x) } sort.Slice(dists, func(i, j int) bool { return dists[i].Dist > dists[j].Dist }) return dists[0:60] } func isFlood(s string) bool { if strings.Contains(s,"www") { return true } if strings.Contains(s,"ww") { return true } if strings.Contains(s,"wmwmw") { return true } if len(s) > 15 { return true } return false } func CleanUrls(urls []string) []string { var finals []string r, _ := regexp.Compile("http://www.jeuxvideo.com/forums/[0-9]*-[0-9]*-[0-9]*-[0-9]*-[0-9]*-[0-9]*-[0-9]*-(.*).htm") for _, v := range urls { found := r.FindStringSubmatch(v) if found != nil { finals = append(finals, found[1]) } } return finals } func ConvertMapWordToSlice(m map[string]int) []WordOccurence { var conversion []WordOccurence for k,v := range m { var t WordOccurence t.Word = k t.Nb = v conversion = append(conversion, t) } return conversion } func AnalyseUrls(urls []string) []WordOccurence { var words map[string]int words = make(map[string]int) urlsCleans := CleanUrls(urls) for _,v := range urlsCleans { for _, w := range strings.Split(v, "-") { if _, ok:= words[w]; ok { words[w] += 1 } else { words[w] = 1 } } } final := ConvertMapWordToSlice(words) sort.Slice(final, func(i, j int) bool { return final[i].Nb > final[j].Nb }) return final } func cleanArrayWords(src []WordOccurence, exclude []string) []WordOccurence { var clean []WordOccurence for _,v := range src { isValide := true for _,e := range exclude { if v.Word == e { isValide = false } } if(isValide) { clean = append(clean, v) } } return clean } func analyseTextuelSujets(sujets []Sujet, exclude []string) []WordOccurence { var urls []string for _,v := range sujets { urls = append(urls, v.Url) } final := AnalyseUrls(urls) return cleanArrayWords(final, exclude) } func fusionListeWordOccurence(a []WordOccurence, b []WordOccurence) []WordOccurence { var final []WordOccurence for _,v := range a { final = append(final, v) } for _,b := range b { present := false for i,f := range final { if f.Word == b.Word { present = true final[i].Nb += b.Nb } } if !present { final = append(final, b) } } return final } func GenrateMapFromUrl(words map[string]int, urls []string) { urlsCleans := CleanUrls(urls) for _,v := range urlsCleans { for _, w := range strings.Split(v, "-") { if isFlood(w) { continue } if _, ok:= words[w]; ok { words[w] += 1 } else { words[w] = 1 } } } }<file_sep>package main import ( "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" "time" "fmt" "strconv" "sort" ) type Impl struct { DB *gorm.DB } type Auteur struct { ID uint `gorm:"primary_key"` Pseudo string `gorm:"column:pseudo"` Created_at time.Time `gorm:"column:created_at"` Updated_at time.Time `gorm:"column:updated_at"` Cheked_profil uint `gorm:"column:cheked_profil"` Pays string `gorm:"column:pays"` Nb_messages uint `gorm:"column:nb_messages"` Img_lien string `gorm:"column:img_lien"` Nb_relation uint `gorm:"column:nb_relation"` Banni uint `gorm:"column:banni"` Date_inscription time.Time `gorm:"column:date_inscription"` Coord_X float64 `gorm:"column:coord_X"` Coord_Y float64 `gorm:"column:coord_Y"` } type Sujet struct { ID uint `gorm:"primary_key"` Created_at time.Time `gorm:"column:created_at"` Updated_at time.Time `gorm:"column:updated_at"` Parcoured uint `gorm:"column:parcoured"` Url string `gorm:"column:url"` Title string `gorm:"column:title"` Auteur uint `gorm:"column:auteur"` Nb_reponses uint `gorm:"column:nb_reponses"` Initialised_at time.Time `gorm:"column:initialised_at"` } func (i *Impl) InitDB(conf Conf) { var err error c := conf.DbUsername + ":" + conf.DbPassword + "@/" + conf.DbName + "?charset=utf8&parseTime=True&loc=Local" i.DB, err = gorm.Open("mysql", c) if err != nil { fmt.Println(err) panic("Got error when connect database, the error is '%v'") } } func (i *Impl) InitSchema() { i.DB.AutoMigrate(&Auteur{}, &Sujet{}) } func (i *Impl) Close() { fmt.Println("Fermeture") i.DB.Close() } func (i *Impl) GetAllPseudo() []string { var names []string i.DB.Model(&Auteur{}).Pluck("pseudo", &names) fmt.Println(len(names)) var final []string for _,v := range names { if(v != "Pseudosupprimé") { final = append(final, v) } } return final } func (i *Impl) GetAuteur(id int) Auteur { var a Auteur i.DB.Find(&a, id) return a } func (i *Impl) GetAuteurByPseudo(id string) Auteur { var a Auteur i.DB.Where("pseudo = ?", id).First(&a) return a } func (i *Impl) GetSujetByAuteur(id int) []Sujet { var a []Sujet i.DB.Where("auteur = ?", id).Find(&a) return a } func (i *Impl) CountAuteur() int { var count int i.DB.Table("auteurs").Count(&count) return count } func (i *Impl) CountSujets() int { var count int i.DB.Table("sujets").Count(&count) return count } func (i *Impl) CountNbReponseSujets() int { type Result struct { Total int } var results []Result i.DB.Table("sujets").Select("sum(nb_reponses) as total").Scan(&results) return results[0].Total } func (i *Impl) CountNbReponseByYear() []LabelSerie { var results []LabelSerie i.DB.Table("sujets").Select("Year(initialised_at) as label, sum(nb_reponses) as nb").Group("label").Scan(&results) sort.Slice(results, func(i, j int) bool { yearI, _ := strconv.Atoi(results[i].Label) yearJ, _ := strconv.Atoi(results[j].Label) return yearI > yearJ }) return results } func (i *Impl) CountNbReponseByLastMouth() []LabelSerie { var results []LabelSerie i.DB.Table("sujets").Select("DATE_FORMAT(initialised_at, '%Y-%m') as label, sum(nb_reponses) as nb").Group("label").Scan(&results) return results[len(results)-12:] } func (i *Impl) TopSujets() []Sujet { var s []Sujet i.DB.Order("nb_reponses desc").Limit(30).Find(&s) return s } func (i *Impl) TopAuteurs() []Auteur { var a []Auteur i.DB.Order("nb_messages desc").Limit(30).Find(&a) return a } func (i *Impl) GetAllUrlSujets(offset int, lim int) []string { var url []string i.DB.Model(&Sujet{}).Offset(offset).Limit(lim).Pluck("url", &url) return url }
c0d72838645c6d5ec30b4efe711445b10ea20e07
[ "Go" ]
6
Go
nausicaa59/map-generates-stats-go
55b5ae545fc017bdcf336617d5fbcaa0636b29ba
0a17f3a463c563dec2c055b778a192ca6ffc0560
refs/heads/master
<file_sep>#!/bin/sh # #- # Copyright (c) 2018 - 2020 genneko # All rights reserved. # # This script is based on the jng utility in the FreeBSD source tree # (in share/examples/jails). # # Original notice follows. # #- # Copyright (c) 2016 <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD: releng/11.2/share/examples/jails/jng 295587 2016-02-13 00:28:48Z dteske $ # ############################################################ IDENT(1) # # $Title: netgraph(4) management script for vnet jails $ # ############################################################ INFORMATION # # Use this tool with jail.conf(5) (or rc.conf(5) ``legacy'' configuration) to # manage `vnet' interfaces for jails. Designed to automate the creation of vnet # interface(s) during jail `prestart' and destroy said interface(s) during jail # `poststop'. # # In jail.conf(5) format: # # ### BEGIN EXCERPT ### # # xxx { # host.hostname = "xxx.yyy"; # path = "/vm/xxx"; # # # # # NB: Below 2-lines required # # NB: The number of ngN_xxx interfaces should match the number of # # arguments given to `jng bridge xxx' in exec.prestart value. # # # vnet; # vnet.interface = "ng0_xxx ng1_xxx ..."; # # exec.clean; # exec.system_user = "root"; # exec.jail_user = "root"; # # # # # NB: Below 2-lines required # # NB: The number of arguments after `jng bridge xxx' should match # # the number of ngN_xxx arguments in vnet.interface value. # # # exec.prestart += "jng bridge xxx em0 em1 ..."; # exec.poststop += "jng shutdown xxx"; # # # Standard recipe # exec.start += "/bin/sh /etc/rc"; # exec.stop = "/bin/sh /etc/rc.shutdown"; # exec.consolelog = "/var/log/jail_xxx_console.log"; # mount.devfs; # # # Optional (default off) # #allow.mount; # #allow.set_hostname = 1; # #allow.sysvipc = 1; # #devfs_ruleset = "11"; # rule to unhide bpf for DHCP # } # # ### END EXCERPT ### # # In rc.conf(5) ``legacy'' format (used when /etc/jail.conf does not exist): # # ### BEGIN EXCERPT ### # # jail_enable="YES" # jail_list="xxx" # # # # # Global presets for all jails # # # jail_devfs_enable="YES" # mount devfs # # # # # Global options (default off) # # # #jail_mount_enable="YES" # mount /etc/fstab.{name} # #jail_set_hostname_allow="YES" # Allow hostname to change # #jail_sysvipc_allow="YES" # Allow SysV Interprocess Comm. # # # xxx # jail_xxx_hostname="xxx.shxd.cx" # hostname # jail_xxx_rootdir="/vm/xxx" # root directory # jail_xxx_vnet_interfaces="ng0_xxx ng1xxx ..." # vnet interface(s) # jail_xxx_exec_prestart0="jng bridge xxx em0 em1 ..." # bridge interface(s) # jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) # #jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx # #jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP # # ### END EXCERPT ### # # Note that the legacy rc.conf(5) format is converted to # /var/run/jail.{name}.conf by /etc/rc.d/jail if jail.conf(5) is missing. # # ASIDE: dhclient(8) inside a vnet jail... # # To allow dhclient(8) to work inside a vnet jail, make sure the following # appears in /etc/devfs.rules (which should be created if it doesn't exist): # # [devfsrules_jail=11] # add include $devfsrules_hide_all # add include $devfsrules_unhide_basic # add include $devfsrules_unhide_login # add path 'bpf*' unhide # # And set ether devfs.ruleset="11" (jail.conf(5)) or # jail_{name}_devfs_ruleset="11" (rc.conf(5)). # # NB: While this tool can't create every type of desirable topology, it should # handle most setups, minus some which considered exotic or purpose-built. # ############################################################ GLOBALS pgm="${0##*/}" # Program basename # # Global exit status # SUCCESS=0 FAILURE=1 ############################################################ FUNCTIONS usage() { local action usage descr exec >&2 echo "Usage: $pgm action [arguments]" echo "Actions:" for action in \ add \ delete \ eiface \ list \ list_jail \ graph \ stats \ table \ ; do eval usage=\"\$vnet_${action}_usage\" [ "$usage" ] || continue eval descr=\"\$vnet_${action}_descr\" printf "\t%s\n\t\t%s\n" "$usage" "$descr" done exit $FAILURE } action_usage() { local usage descr action="$1" eval usage=\"\$vnet_${action}_usage\" echo "Usage: $pgm $usage" >&2 eval descr=\"\$vnet_${action}_descr\" printf "\t\t%s\n" "$descr" exit $FAILURE } derive_mac() { local OPTIND=1 OPTARG __flag local __mac_num= __make_pair= while getopts 2n: __flag; do case "$__flag" in 2) __make_pair=1 ;; n) __mac_num=${OPTARG%%[^0-9]*} ;; esac done shift $(( $OPTIND - 1 )) if [ ! "$__mac_num" ]; then eval __mac_num=\${_${iface}_num:--1} __mac_num=$(( $__mac_num + 1 )) eval _${iface}_num=\$__mac_num fi local __iface="$1" __name="$2" __var_to_set="$3" __var_to_set_b="$4" local __iface_devid __new_devid __num __new_devid_b # # Calculate MAC address derived from given iface. # # The formula I'm using is ``NP:SS:SS:II:II:II'' where: # + N denotes 4 bits used as a counter to support branching # each parent interface up to 15 times under the same jail # name (see S below). # + P denotes the special nibble whose value, if one of # 2, 6, A, or E (but usually 2) denotes a privately # administered MAC address (while remaining routable). # + S denotes 16 bits, the sum(1) value of the jail name. # + I denotes bits that are inherited from parent interface. # # The S bits are a CRC-16 checksum of NAME, allowing the jail # to change link numbers in ng_bridge(4) without affecting the # MAC address. Meanwhile, if... # + the jail NAME changes (e.g., it was duplicated and given # a new name with no other changes) # + the underlying network interface changes # + the jail is moved to another host # the MAC address will be recalculated to a new, similarly # unique value preventing conflict. # __iface_devid=$( ifconfig $__iface ether | awk '/ether/,$0=$2' ) # ??:??:??:II:II:II __new_devid=${__iface_devid#??:??:??} # => :II:II:II # => :SS:SS:II:II:II __num=$( set -- `echo -n "$__name" | sum` && echo $1 ) __new_devid=$( printf :%02x:%02x \ $(( $__num >> 8 & 255 )) $(( $__num & 255 )) )$__new_devid # => P:SS:SS:II:II:II case "$__iface_devid" in ?2:*) __new_devid=a$__new_devid __new_devid_b=e$__new_devid ;; ?[Ee]:*) __new_devid=2$__new_devid __new_devid_b=6$__new_devid ;; *) __new_devid=2$__new_devid __new_devid_b=e$__new_devid esac # => NP:SS:SS:II:II:II __new_devid=$( printf %x $(( $__mac_num & 15 )) )$__new_devid __new_devid_b=$( printf %x $(( $__mac_num & 15 )) )$__new_devid_b # # Return derivative MAC address(es) # if [ "$__make_pair" ]; then if [ "$__var_to_set" -a "$__var_to_set_b" ]; then eval $__var_to_set=\$__new_devid eval $__var_to_set_b=\$__new_devid_b else echo $__new_devid $__new_devid_b fi else if [ "$__var_to_set" ]; then eval $__var_to_set=\$__new_devid else echo $__new_devid fi fi } mustberoot_to_continue() { if [ "$( id -u )" -ne 0 ]; then echo "Must run as root!" >&2 exit $FAILURE fi } get_ether_bridge() { local iface="$1" [ "$iface" ] && ngctl show "$iface:" 2>/dev/null | awk '$1 == "upper"{print $2}' } is_ether_being_used() { local iface="$1" [ "$iface" ] && ngctl show \ $(get_ether_bridge $iface): 2>/dev/null | awk '/Num hooks:/{ print $9 }' | awk '$1 > 2{ ok=1 } END{ exit !ok }' } get_eiface_bridge() { local iface="$1" [ "$iface" ] && ngctl show "$iface:" 2>/dev/null | awk '$1 == "ether"{print $2}' } is_eiface_being_used() { local iface="$1" [ "$iface" ] && ngctl show \ $(get_eiface_bridge $iface): 2>/dev/null | awk '/Num hooks:/{ print $9 }' | awk '$1 > 1{ ok=1 } END{ exit !ok }' } vnet_eiface_usage="eiface [-dD] [-4 ip4] [-6 ip6] iface" vnet_eiface_descr="Create/destroy virtual interface (eiface) iface" vnet_eiface() { local OPTIND=1 OPTARG ip4 ip6 destroy force while getopts 'dD4:6:' flag; do case "$flag" in d) destroy=1 ;; D) destroy=1; force=1 ;; 4) ip4="$OPTARG" [ "$ip4" ] || action_usage eiface ;; # NOTREACHED 6) ip6="$OPTARG" [ "$ip6" ] || action_usage eiface ;; # NOTREACHED *) action_usage eiface # NOTREACHED esac done shift $(( $OPTIND - 1 )) local iface="$1" [ "${iface:-x}" = "${iface#*[!0-9a-zA-Z_]}" ] || action_usage eiface # NOTREACHED mustberoot_to_continue if [ "$destroy" ]; then local iftype=$(get_nodetype $iface) if [ "$iftype" == "eiface" ] && ngctl msg "$iface:" getifname > /dev/null 2>&1; then if ! is_eiface_being_used "$iface" || [ "$force" ]; then ngctl shut "$iface:" fi fi return fi if ! ngctl msg "$iface:" getifname > /dev/null 2>&1; then local eiface i=0 ri=255 ngctl mkpeer eiface ether ether eiface=$(ngctl list | sort -k 6 | grep ngeth | tail -n 1 | awk '{print $2}') i=${eiface##*[!0-9]} ri=$(( $ri - $i )) ifconfig "$eiface" ether $(printf "02:00:%02x:%02x:%02x:%02x" $ri $i $ri $i) ifconfig "$eiface" up ngctl name "$eiface:" "$iface" ifconfig "$eiface" name "$iface" fi if [ "$ip4" ]; then if ! ifconfig "$iface" | grep -q "${ip4%%[!0-9.]*}"; then ifconfig "$iface" inet $ip4 fi fi if [ "$ip6" ]; then if ! ifconfig "$iface" | grep -q "${ip6%%[!0-9a-f:]*}"; then ifconfig "$iface" inet6 $ip6 fi fi } # Returns the node type of a specified netgraph node. get_nodetype() { ngctl show "$1:" 2> /dev/null | awk '$1 == "Name:" && $3 == "Type:" { print $4 }' } get_nextlink() { local bridge="$1" local num=${2:-0} if ngctl info $bridge: > /dev/null 2>&1; then while ngctl msg $bridge: getstats $num > /dev/null 2>&1 do num=$(( $num + 1 )) done else num=-1 fi echo $num } is_member() { local bridge="$1" local interface="$2" [ "$bridge" -a "$interface" ] && ngctl show $bridge: 2> /dev/null | awk '$1 ~ /link/ { print $2 }' | grep -qw $interface } get_vif_jail_addr(){ local jail addr4 addr6 local interface="$1" if [ "$interface" ]; then jail=$(vnet_list_jail -l | grep -w $interface | cut -f1 -d:) if [ "$jail" ]; then addr4=$(jexec $jail ifconfig -f inet:cidr $interface | fgrep "inet " | cut -f3 -w | tr '\n' ',' | sed 's/,$//') addr6=$(jexec $jail ifconfig -f inet6:cidr $interface | fgrep "inet6 " | cut -f3 -w | tr '\n' ',' | sed 's/,$//') else addr4=$(ifconfig -f inet:cidr $interface | fgrep "inet " | cut -f3 -w | tr '\n' ',' | sed 's/,$//') addr6=$(ifconfig -f inet6:cidr $interface | fgrep "inet6 " | cut -f3 -w | tr '\n' ',' | sed 's/,$//') fi echo "$jail $addr4 $addr6" else echo fi } vnet_list_jail_usage="list_jail [-l]" vnet_list_jail_descr="List VNET jails (and their interfaces)." vnet_list_jail() { local OPTIND=1 OPTARG long=0 while getopts 'l' flag; do case "$flag" in l) long=1 ;; *) action_usage list_jail esac done shift $(( $OPTIND - 1 )) mustberoot_to_continue for jail in $(jls -s vnet name | grep "vnet=\(new\|1\)" | sed 's/.*name=//'); do echo -n "$jail" if [ "$long" -eq 1 ]; then echo -n ": $(jexec $jail ifconfig -l)" fi echo done } vnet_list_usage="list [-lr] [NETWORK_NAME]" vnet_list_descr="Lists various objects in VNET world. vnet list [-l] - lists networks vnet list [-l] NETWORK_NAME - lists interfaces in the network vnet list -r [-l] [NETWORK_NAME] - recursively lists networks, jails, interfaces and addresses" vnet_list() { local OPTIND=1 OPTARG long=0 recursive=0 vnet vif buf jail addrs addr4 addr6 while getopts 'lr' flag; do case "$flag" in l) long=1 ;; r) recursive=1 ;; *) action_usage list esac done shift $(( $OPTIND - 1 )) local network="$1" shift 1 # network mustberoot_to_continue if [ "$network" ]; then if [ "$recursive" -eq 1 ]; then echo $network for vif in $(vnet_list $network); do buf=$(get_vif_jail_addr $vif) jail=${buf%% *} addrs=${buf#* } addr4=${addrs%% *} addr6=${addrs##* } if [ "$long" -eq 1 ]; then echo " ${jail:-$(hostname -s)(HOST)}" echo " $vif" [ "$addr4" ] && echo " $addr4" | sed 's/,/, /g' [ "$addr6" ] && echo " $addr6" | sed 's/,/, /g' else echo -n " ${jail:-$(hostname -s)(HOST)}" echo -n " $vif" [ "$addr4" ] && echo -n " $addr4" | sed 's/,/, /g' [ "$addr6" ] && echo -n " $addr6" | sed 's/,/, /g' echo fi done elif [ "$long" -eq 1 ]; then ngctl show "${network}br:" 2>/dev/null else ngctl show "${network}br:" 2>/dev/null | awk '$1 ~ /link/ { print $2 }' | sort | uniq fi else if [ "$recursive" -eq 1 ]; then for vnet in $(vnet_list); do if [ "$long" -eq 1 ]; then vnet_list -rl $vnet else vnet_list -r $vnet fi done elif [ "$long" -eq 1 ]; then ngctl list 2>/dev/null | awk '$4 == "bridge" { print $0 }' | sort else ngctl list 2>/dev/null | awk '$4 == "bridge" { sub(/br$/, "", $2); print $2 }' | sort fi fi } vnet_delete_usage="delete [-k] NETWORK_NAME [iface0 ...]" vnet_delete_descr="Delete iface0 ... and/or NETWORK_NAME. If no iface0 ... is left after deletion, the network bridge {NETWORK_NAME}br and the host interface {NETWORK_NANE} will also be deleted unless -k (keep host interface) option is specified." vnet_delete() { local OPTIND=1 OPTARG keephostif=0 while getopts 'k' flag; do case "$flag" in k) keephostif=1 ;; *) action_usage delete # NOTREACHED esac done shift $(( $OPTIND - 1 )) local network="$1" [ "${network:-x}" = "${network#*[!0-9a-zA-Z_]}" ] || action_usage delete # NOTREACHED shift 1 # network mustberoot_to_continue local bridge=${network}br local iface iftype for iface in $*; do iftype=$(get_nodetype $iface) if [ "$iftype" == "eiface" ]; then if is_member $bridge $iface; then vnet_eiface -D $iface fi fi done # for iface local hostiftype=$(get_nodetype $network) if [ "$hostiftype" == "eiface" ]; then if [ $keephostif == 0 ]; then vnet_eiface -d $network fi elif [ "$hostiftype" == "ether" ]; then if ! is_ether_being_used $network; then ngctl rmhook $network: lower || return ngctl rmhook $network: upper || return fi fi } vnet_add_usage="add [-b] [-4 ip4] [-6 ip6] NETWORK_NAME [iface0 ...]" vnet_add_descr="Create and/or add iface0 ... to the network. The network will be also created if it doesn't exist. Note that 'network' here means a ng_bridge which is named '{NETWORK_NAME}br'. An interface for the host is also created with the name '{NETWORK_NAME}' unless -b option is specified. IPv4/IPv6 address can be assigned to the host interface using -4 and -6 options." vnet_add() { local OPTIND=1 OPTARG bronly=0 ip4 ip6 hostif opts= while getopts 'b4:6:' flag; do case "$flag" in b) bronly=1 ;; 4) opts="${opts}-4 $OPTARG " ;; 6) opts="${opts}-6 $OPTARG " ;; *) action_usage add # NOTREACHED esac done shift $(( $OPTIND - 1 )) local network="$1" [ "${network:-x}" = "${network#*[!0-9a-zA-Z_]}" ] || action_usage add # NOTREACHED shift 1 # network mustberoot_to_continue if [ $bronly == 0 ]; then local hostiftype=$(get_nodetype $network) if [ ! "$hostiftype" -o "$hostiftype" == "eiface" ]; then vnet_eiface $opts $network || return elif [ "$hostiftype" != "ether" ]; then echo "NETWORK_NAME must be a host interface of type ether or eiface." >&2 exit $FAILURE fi hostif="$network" fi local bridge=${network}br local iface iftype num for iface in $hostif $*; do if [ "${iface}" = "" ]; then continue fi # Create a virtual interface iftype=$(get_nodetype $iface) if [ ! "$iftype" ]; then vnet_eiface "$iface" iftype=$(get_nodetype $iface) fi # Bring the interface up ifconfig $iface up || return local ether if [ "$iftype" == "ether" ]; then ether=1 elif [ "$iftype" == "eiface" ]; then ether= else echo "ifaceX must be a interface of type ether or eiface." >&2 exit $FAILURE fi # Set promiscuous mode and don't overwrite src addr if [ "$ether" ]; then ngctl msg $iface: setpromisc 1 || return ngctl msg $iface: setautosrc 0 || return fi # If the network bridge exists, just connect the interface. if ngctl info $bridge: > /dev/null 2>&1; then if ! is_member $bridge $iface; then num=$(get_nextlink $bridge) if [ "$ether" ]; then ngctl connect $bridge: $iface: link$num lower || return num=$(( $num + 1 )) num=$(get_nextlink $bridge $num) ngctl connect $bridge: $iface: link$num upper || return else ngctl connect $bridge: $iface: link$num ether || return fi fi else # If the network bridge doesn't exist, first create it. if [ "$ether" ]; then ngctl mkpeer $iface: bridge lower link0 || return ngctl connect $iface: $iface:lower upper link1 || return ngctl name $iface:lower $bridge || return else ngctl mkpeer $iface: bridge ether link0 || return ngctl name $iface:ether $bridge || return fi fi done # for iface } vnet_graph_usage="graph [-f] [-T type] [-o output]" vnet_graph_descr="Generate network graph (default output is \`jng.svg')" vnet_graph() { local OPTIND=1 OPTARG flag local output=jng.svg output_type= force= while getopts fo:T: flag; do case "$flag" in f) force=1 ;; o) output="$OPTARG" ;; T) output_type="$OPTARG" ;; *) action_usage graph # NOTREACHED esac done shift $(( $OPTIND - 1 )) [ $# -eq 0 -a "$output" ] || action_usage graph # NOTREACHED mustberoot_to_continue if [ -e "$output" -a ! "$force" ]; then echo "$output: Already exists (use \`-f' to overwrite)" >&2 return $FAILURE fi if [ ! "$output_type" ]; then local valid suffix valid=$( dot -Txxx 2>&1 ) for suffix in ${valid##*:}; do [ "$output" != "${output%.$suffix}" ] || continue output_type=$suffix break done fi ngctl dot | dot ${output_type:+-T "$output_type"} -o "$output" } vnet_stats_usage="stats NETWORK_NAME" vnet_stats_descr="Show ng_bridge link statistics for NETWORK_NAME interfaces" vnet_stats() { local OPTIND=1 OPTARG flag while getopts "" flag; do case "$flag" in *) action_usage stats # NOTREACHED esac done shift $(( $OPTIND -1 )) local iface="$1" [ "${iface:-x}" = "${iface#*[!0-9a-zA-Z_]}" -a $# -eq 1 ] || action_usage stats # NOTREACHED mustberoot_to_continue for eiface in $( vnet_list "$iface" ); do echo "$eiface:" ngctl show $eiface: | awk ' $3 == "bridge" && $5 ~ /^link/ { bridge = $2 link = substr($5, 5) system(sprintf("ngctl msg %s: getstats %u", bridge, link)) }' | fmt 2 | awk ' /=/ && fl = index($0, "=") { printf "%20s = %s\n", substr($0, 0, fl-1), substr($0, 0, fl+1) } ' # END-QUOTE done } vnet_table_usage="table NETWORK_NAME" vnet_table_descr="Show ng_bridge forwarding table for NETWORK_NAME." vnet_table() { local network="$1" [ "${network:-x}" = "${network#*[!0-9a-zA-Z_]}" ] || action_usage table # NOTREACHED shift 1 # network mustberoot_to_continue local bridge=${network}br ngctl msg $bridge: gettable | tr '{' '\n' | awk ' $1 ~ /numHosts=/{ print $1; printf("%17s %4s %4s %4s\n", "Address", "Link", "Age", "Stale"); } $1 ~ /addr=/{ if(! /linkNum=/){ $4 = $3; $3 = $2; $2 = "linkNum=0"; } gsub(/addr=/, ""); gsub(/linkNum=/, ""); gsub(/age=/, ""); gsub(/staleness=/, ""); printf("%17s %4d %4d %4d\n", $1, $2, $3, $4); } ' # END-QUOTE } ############################################################ MAIN # # Load ng_ether (if not loaded yet) # # Excerpts from ng_ether(4): # BUGS # The automatic KLD module loading mechanism that works for most other # Netgraph node types does not work for the ether node type, because ether # nodes are not created on demand; instead, they are created when Ethernet # interfaces are attached or when the KLD is first loaded. Therefore, if # the KLD is not statically compiled into the kernel, it is necessary to # load the KLD manually in order to bring the ether nodes into existence. # kldload -n ng_ether # # Command-line arguments # action="$1" [ "$action" ] || usage # NOTREACHED # # Validate action argument # if [ "$BASH_VERSION" ]; then type="$( type -t "vnet_$action" )" || usage # NOTREACHED else type="$( type "vnet_$action" 2> /dev/null )" || usage # NOTREACHED fi case "$type" in *function) shift 1 # action eval "vnet_$action" \"\$@\" ;; *) usage # NOTREACHED esac ################################################################################ # END ################################################################################
f50433b21ee3d098bd8d85539c7ac97ad399e458
[ "Shell" ]
1
Shell
genneko/freebsd-vimage-jails
3abed26d4cf3239c34758fba1509bafd77d77cb1
8360c962956515ba2642186667cd85805a016cb3
refs/heads/master
<repo_name>tskielce/LearnCS<file_sep>/ProjectWebApi/Data/Helpers/CreateMsSqlEnvironment.cs using System; using System.Collections.Generic; using System.Text; namespace Data.Helpers { class CreateMsSqlEnvironment { protected string queryEnv = "USE master;" + "IF DB_ID('WebApiDb') IS NULL" + "BEGIN" + " CREATE DATABASE WebApiDb;" + "END" + "GO" + "IF DB_ID('WebApiDb') IS NOT NULL" + "BEGIN" + " USE WebApiDb;" + "END" + "GO" + "IF OBJECT_ID('dbo.TabCalculation') IS NULL" + "BEGIN" + " CREATE TABLE[dbo].[TabCalculation]" + " (" + " [id] INT IDENTITY(1, 1) NOT NULL,"+ " [Number1] FLOAT(53) NULL,"+ " [Number2] FLOAT(53) NULL,"+ " [Result] FLOAT(53) NULL,"+ " [CreateDate] DATETIME DEFAULT(GETDATE()) NOT NULL,"+ " [UpdateDate] DATETIME NOT NULL"+ " );"+ "END"; } } <file_sep>/ProjectWebApi/Calculator/Numbers.cs namespace Calculator { public class Number { public double[] Ids; public double? addition; public Number() { } public Number(double[] ids, ICalculate calculate) { Ids = ids; addition = calculate.Addition(); } } } <file_sep>/ProjectWebApi/Calculator/ICalculate.cs namespace Calculator { public interface ICalculate { double[] Ids { get; set; } double? Addition(); double? Subtraction(); double? Multiplication(); double? Division(); } } <file_sep>/ProjectWebApi/ProjectWebApi/Controllers/ApiController.cs using Data.Providers; using Microsoft.AspNetCore.Mvc; using ProjectWebApi.View; namespace ProjectWebApi.Controllers { [Route("[controller]")] [ApiController] public class ApiController : ControllerBase { // GET api/Api [HttpGet("{id1}/{id2}")] public ActionResult<string> Get(string id1, string id2) { var parameters = Startup.parameters; Request request = new Request(id1, id2); _ = new TextFileDataProvider(request.Numbers, parameters); _ = new MsSqlDataProvider(request.Numbers, parameters); return $"Wynik dodawania {request.Numbers.Ids[0]} i {request.Numbers.Ids[1]} rowna sie {request.Numbers.addition}"; } // POST api/Api [HttpPost()] public void Post([FromBody] string value) { } // PUT api/Api/5 [HttpPut("{id}")] public void Put(int id, [FromBody] string value) { } // DELETE api/Api/5 [HttpDelete("{id}")] public void Delete(int id) { } } } <file_sep>/ProjectWebApi/Common/Parameters.cs namespace Common { public class Parameter { public string ConnectionStringMsSql { get; set; } public string ConnectionStringMySql { get; set; } public string Path { get; set; } public string FileName { get; set; } } } <file_sep>/ProjectWebApi/ProjectWebApi/Request.cs using Calculator; namespace ProjectWebApi.View { public class Request { private readonly double[] Ids = new double[2]; public Number Numbers; public Request(string id1, string id2) { Ids[0] = ConvertToInt(id1); Ids[1] = ConvertToInt(id2); var calculate = new Calculate(Ids); Numbers = new Number(Ids,calculate); } private int ConvertToInt(string id) { return (int.TryParse(id, out _)) ? int.Parse(id) : 0; } } } <file_sep>/ProjectWebApi/Data/Providers/MsSqlDataProvider.cs using Calculator; using Common; using System; using System.Data.SqlClient; namespace Data.Providers { public class MsSqlDataProvider { private readonly Number Numbers; private readonly string ConnectionString; public MsSqlDataProvider(Number numbers, Parameter parameters) { Numbers = numbers; ConnectionString = parameters.ConnectionStringMsSql; SendDataToDatabase(); } private void SendDataToDatabase() { using (SqlConnection connection = new SqlConnection(ConnectionString)) { connection.Open(); SqlCommand sqlCommand = new SqlCommand(SetEnvironemnt(), connection); sqlCommand.ExecuteNonQuery(); sqlCommand = new SqlCommand(InserData(),connection); sqlCommand.ExecuteNonQuery(); connection.Close(); } } private string InserData() { return $"INSERT INTO WebApiDb.dbo.TabCalculation (Number1, Number2, Result) VALUES ({Numbers.Ids[0].ToString()},{Numbers.Ids[1].ToString()},{Numbers.addition.ToString()})"; } private string SetEnvironemnt() { string query = @" IF OBJECT_ID('WebApiDb.dbo.TabCalculation') IS NULL CREATE TABLE WebApiDb.dbo.TabCalculation(id INT IDENTITY(1, 1) NOT NULL, Number1 FLOAT, Number2 FLOAT, Result FLOAT, CreateDate DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, UpdateDate DATETIME NOT NULL)"; return query; } } } <file_sep>/ProjectWebApi/Data/Providers/TextFileDataProvider.cs using System.IO; using Calculator; using Common; namespace Data.Providers { public class TextFileDataProvider { private readonly string PathFile; private readonly Parameter Parameters; private readonly Number Numbers; public TextFileDataProvider(Number Numbers, Parameter Parameters) { this.Numbers = Numbers; this.Parameters = Parameters; PathFile = $"{Parameters.Path}\\{Parameters.FileName}.txt"; SendDataToFile(); } private void SendDataToFile() { CreateDirectoryAndFile(); WriteDataToFile(); } private void CreateDirectoryAndFile() { if (!Directory.Exists(Parameters.Path)) { Directory.CreateDirectory(Parameters.Path); } if (!File.Exists(PathFile)) { File.Create(PathFile); } } public void WriteDataToFile() { using (StreamWriter sw = File.AppendText(PathFile)) { sw.WriteLine($"{Numbers.Ids[0]}\t{Numbers.Ids[1]}\t{Numbers.addition}"); } } } } <file_sep>/ProjectWebApi/Calculator/Calculate.cs namespace Calculator { public class Calculate : ICalculate { public double[] Ids { get; set; } public Calculate(double[] ids) { Ids = ids; } /// <summary> /// Dodawanie /// </summary> /// <returns></returns> public double? Addition() { double? result = null; if (Ids.Length > 0) { result = Ids[0]; for (int i = 1; i < Ids.Length; i++) { result += Ids[i]; } } return result; } /// <summary> /// Dzielenie /// </summary> /// <returns></returns> public double? Division() { double? result = null; if (Ids.Length > 0) { result = Ids[0]; for (int i = 1; i < Ids.Length; i++) { result /= Ids[i]; } } return result; } /// <summary> /// Mnozenie /// </summary> /// <returns></returns> public double? Multiplication() { double? result = null; if (Ids.Length > 0) { result = Ids[0]; for (int i = 1; i < Ids.Length; i++) { result *= Ids[i]; } } return result; } /// <summary> /// Odejmowanie /// </summary> /// <returns></returns> public double? Subtraction() { double? result = null; if (Ids.Length > 0) { result = Ids[0]; for (int i = 1; i < Ids.Length; i++) { result *= Ids[i]; } } return result; } } }
e943e84a56b1a5441376a87d0964cee8af8b22e3
[ "C#" ]
9
C#
tskielce/LearnCS
5402baf7acb4f8576ff4bbd5cb19c87f3893d5d5
4f1d25cb80a1b26353ae2cfb1e51d282081b66d4
refs/heads/master
<repo_name>JohnEssam235/Electric-Water-Heater<file_sep>/Electric_Heater/app.c #include "App.h" #include "EEPROM.h" /* global vars................... */ // the 2 variables of the temperature extern uint8 temp1; extern uint8 temp2; // the flag of the SSD Task to display both displays..... uint8 SSD_FLAG = 0; // flag for Heating Element LED TASK uint8 heat_elem_flag = 0; // variable for set temp. in ADC task uint8 set_temp; /* ADC Variables..........*/ uint8 adc_flag = 0; //flag for enabling ADC uint16 read[10]; // array to store the readings uint8 count = 0; // number of ADC readings count uint8 average; // variable to calculate the average temp. uint8 dodo; // variable used in the ADC TASK :) uint8 temp_var; // temporary variable used in the ADC task // the flag in the Os.c that indicates if the button heater is pressed or not extern uint8 elec_heater_flag; // electric heater is closed // counter for the heating element LED Task to handle its timing uint8 led_count; /* variables for the SSD_blinking task...*/ uint8 SSD_blinking_flag = 0; // flag for operating the SSD blinking task.. uint8 SSD_blinking_counter = 0; // counter for the task to handle the timing uint8 SSD_Enable_flag = 0; // flag for enabling/disabling the SSD task void Init_Task() // Init Task called by the OS { PEIE_bit = 1; // initializing the interrupt global variable and PEIE for the timer GIE_bit = 1; ADCON0 = 0x91; // initializing the ADC ADCON1 = 0xC0; } void SSD_TASK() /* this task only displays the temp */ { if(SSD_Enable_flag != 1) // This task should be disabled(flag=1) when SSD_blinking task is operating //(specially when the SSD turns off in blinking) so SSD Task should not operate once // as i wanna make the SSD off so it couldnt display the temp. { if(SSD_FLAG == 0) // flag used to display both SSD and to switch between them { PORTA.RA5 = 0; switch(temp1) { case 2: PORTD = 0x5B; break; case 3: PORTD = 0x4F; break; case 4: PORTD = 0x66; break; case 5: PORTD = 0x6D; break; case 6: PORTD = 0x7D; break; case 7: PORTD = 0x07; break; case 8: PORTD = 0x7F; break; } PORTA.RA4 = 1; SSD_FLAG = 1; } else if(SSD_FLAG == 1) { PORTA.RA4 = 0; switch(temp2) { case 0: PORTD = 0x3F; break; case 1: PORTD = 0x06; break; case 2: PORTD = 0x5B; break; case 3: PORTD = 0x4F; break; case 4: PORTD = 0x66; break; case 5: PORTD = 0x6D; break; case 6: PORTD = 0x7D; break; case 7: PORTD = 0x07; break; case 8: PORTD = 0x7F; break; case 9: PORTD = 0x6F; break; } PORTA.RA5 = 1; SSD_FLAG = 0; } } } void up_ButtonTask() // task for raising the temperature { if(RB1_bit == 0) // raise the temp by 5 { SSD_blinking_flag = 1; // we have entered the set mode right now... SSD_blinking_counter=0; // counter for SSD_blinking task to control the timing(clear the counter) if((temp1 == 7) && (temp2 == 5)) { } else if(temp2 == 0) { temp2 = temp2 + 5; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } else if(temp2 == 5) { temp2=0; temp1++; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } set_temp = (temp1*10)+temp2; } } void down_ButtonTask() // task for decreasing the temperature { if(RB2_bit == 0) // decrease the temp by 5 { SSD_blinking_flag=1; // we have entered the set mode right now... SSD_blinking_counter=0; // counter for SSD_blinking task to control the timing (clear the counter) if((temp1 == 3) && (temp2 == 5)) { } else if(temp2 == 5) { temp2 = 0; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } else if(temp2 == 0) { temp2 = 5; temp1 = temp1 - 1; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } set_temp = (temp1*10)+temp2; } } void Heater_Led_Task() // The Led task that operates when the cooler or heater operate { if(RC5_bit == 1) // heating element is ON { led_count = led_count + 2; // count variable to control the timing if(led_count == 10) { PORTB.RB7 = !PORTB.RB7; led_count = 0; } } else if(RC2_bit == 1) { PORTB.RB7 = 1; } } void ADC_Task() { if(adc_flag != 0) // flag to enable the ADC task when the temperature is setted { if(count == 9) // last reading { read[count] = (ADC_Read(2)*0.0048828)/0.01; average = (read[0]+read[1]+read[2]+read[3]+read[4]+read[5]+read[6]+read[7]+read[8]+read[9])/10; temp_var = average; // temp_var is used to not corrupting the average temp variable // for loop to seperate the two digits of the average temperature... for(dodo=0;dodo<2;dodo++) { if(dodo==0) { temp2 = temp_var%10; temp_var = temp_var/10; } else { temp1 = temp_var; } } // make a decision depending on the average temperature if((average - set_temp) >= 5) { // operate the fan PORTC.RC2 = 1; // close the heater PORTC.RC5 = 0; } else if((average - set_temp) <= -5) { // operate the heater PORTC.RC5 = 1; //close the fan PORTC.RC2=0; } count = 0; // clearing the count of the readings } else { read[count] = (ADC_Read(2)*0.0048828)/0.01; count++; } } } void heater_task() // task indicates if the heater is OFF or ON { if(RB0_bit == 0) { elec_heater_flag = !elec_heater_flag; // toggle the flag of the elec. heater if(elec_heater_flag == 0) // if heater became off { PORTD = 0; //close the SSD PORTA.RA5 = 0; // close the two control lines delay_ms(100); PORTA.RA4 = 0; delay_ms(100); PORTC.RC2 = 0; // close the fan PORTC.RC5 =0; // close the heating element adc_flag = 0; // turn ADC off.... PORTB.RB7 = 0; //turn heater led off } } } void SSD_blinking() // blinking Task { if(SSD_blinking_flag==1) // if we are in the setting mode right now { if(SSD_blinking_counter == 0 || SSD_blinking_counter==10 || SSD_blinking_counter==20 || SSD_blinking_counter==30 || SSD_blinking_counter==40) { PORTD = 0; // close the SSD PORTD(data port) SSD_Enable_flag = 1; } SSD_blinking_counter = SSD_blinking_counter+1; // counter to control the timing of the Task if(SSD_blinking_counter==5 || SSD_blinking_counter==15 || SSD_blinking_counter==25 || SSD_blinking_counter==35) { SSD_Enable_flag = 0; } else if(SSD_blinking_counter == 45) { PORTA.RA4 = 0; PORTA.RA5 = 0; SSD_blinking_counter = 0; SSD_blinking_flag = 0; SSD_Enable_flag = 0; // enable the SSD once again to display the temp. adc_flag = 1; // enable the adc to control the temp. } } }<file_sep>/swift_act project/Os.h #ifndef OS_H_ #define OS_H_ #include "std_types.h" /* Timer counting time(Base Time) in ms */ #define OS_BASE_TIME 20 /* Function responsible for: * 1. Initialize the Os * 2. Execute the Init Task * 3. Start the Scheduler to run the tasks */ void Os_start(void); /* The Engine of the Os Scheduler used for switch between different tasks */ void Os_scheduler(void); /* Function called by the Timer Driver in the MCAL layer */ void Os_newTimerTick(void); #endif /* OS_H_ */ <file_sep>/Electric_Heater/app.cp #line 1 "D:/swift act files/app.c" #line 1 "d:/swift act files/app.h" #line 1 "d:/swift act files/std_types.h" #line 20 "d:/swift act files/std_types.h" typedef unsigned char uint8; typedef signed char sint8; typedef unsigned int uint16; typedef signed int sint16; typedef unsigned long uint32; typedef signed long sint32; typedef unsigned long long uint64; typedef signed long long sint64; typedef float float32; typedef double float64; #line 8 "d:/swift act files/app.h" void Init_Task(); void SSD_TASK(); void up_ButtonTask(); void down_ButtonTask(); void Heater_Led_Task(); void ADC_Task(); void heater_task(); void SSD_blinking(); #line 1 "d:/swift act files/eeprom.h" #line 1 "d:/swift act files/std_types.h" #line 15 "d:/swift act files/eeprom.h" void EEPROM_init(void); void EEPROM_writeByte(unsigned short my_data,uint8 add); uint8 EEPROM_readByte(uint8 add); #line 8 "D:/swift act files/app.c" extern uint8 temp1; extern uint8 temp2; uint8 SSD_FLAG = 0; uint8 heat_elem_flag = 0; uint8 set_temp; uint8 adc_flag = 0; uint16 read[10]; uint8 count = 0; uint8 average; uint8 dodo; uint8 temp_var; extern uint8 elec_heater_flag; uint8 led_count; uint8 SSD_blinking_flag = 0; uint8 SSD_blinking_counter = 0; uint8 SSD_Enable_flag = 0; void Init_Task() { PEIE_bit = 1; GIE_bit = 1; ADCON0 = 0x91; ADCON1 = 0xC0; } void SSD_TASK() { if(SSD_Enable_flag != 1) { if(SSD_FLAG == 0) { PORTA.RA5 = 0; switch(temp1) { case 2: PORTD = 0x5B; break; case 3: PORTD = 0x4F; break; case 4: PORTD = 0x66; break; case 5: PORTD = 0x6D; break; case 6: PORTD = 0x7D; break; case 7: PORTD = 0x07; break; case 8: PORTD = 0x7F; break; } PORTA.RA4 = 1; SSD_FLAG = 1; } else if(SSD_FLAG == 1) { PORTA.RA4 = 0; switch(temp2) { case 0: PORTD = 0x3F; break; case 1: PORTD = 0x06; break; case 2: PORTD = 0x5B; break; case 3: PORTD = 0x4F; break; case 4: PORTD = 0x66; break; case 5: PORTD = 0x6D; break; case 6: PORTD = 0x7D; break; case 7: PORTD = 0x07; break; case 8: PORTD = 0x7F; break; case 9: PORTD = 0x6F; break; } PORTA.RA5 = 1; SSD_FLAG = 0; } } } void up_ButtonTask() { if(RB1_bit == 0) { SSD_blinking_flag = 1; SSD_blinking_counter=0; if((temp1 == 7) && (temp2 == 5)) { } else if(temp2 == 0) { temp2 = temp2 + 5; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } else if(temp2 == 5) { temp2=0; temp1++; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } set_temp = (temp1*10)+temp2; } } void down_ButtonTask() { if(RB2_bit == 0) { SSD_blinking_flag=1; SSD_blinking_counter=0; if((temp1 == 3) && (temp2 == 5)) { } else if(temp2 == 5) { temp2 = 0; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } else if(temp2 == 0) { temp2 = 5; temp1 = temp1 - 1; EEPROM_writeByte(temp1,2); EEPROM_writeByte(temp2,3); } set_temp = (temp1*10)+temp2; } } void Heater_Led_Task() { if(RC5_bit == 1) { led_count = led_count + 2; if(led_count == 10) { PORTB.RB7 = !PORTB.RB7; led_count = 0; } } else if(RC2_bit == 1) { PORTB.RB7 = 1; } } void ADC_Task() { if(adc_flag != 0) { if(count == 9) { read[count] = (ADC_Read(2)*0.0048828)/0.01; average = (read[0]+read[1]+read[2]+read[3]+read[4]+read[5]+read[6]+read[7]+read[8]+read[9])/10; temp_var = average; for(dodo=0;dodo<2;dodo++) { if(dodo==0) { temp2 = temp_var%10; temp_var = temp_var/10; } else { temp1 = temp_var; } } if((average - set_temp) >= 5) { PORTC.RC2 = 1; PORTC.RC5 = 0; } else if((average - set_temp) <= -5) { PORTC.RC5 = 1; PORTC.RC2=0; } count = 0; } else { read[count] = (ADC_Read(2)*0.0048828)/0.01; count++; } } } void heater_task() { if(RB0_bit == 0) { elec_heater_flag = !elec_heater_flag; if(elec_heater_flag == 0) { PORTD = 0; PORTA.RA5 = 0; delay_ms(100); PORTA.RA4 = 0; delay_ms(100); PORTC.RC2 = 0; PORTC.RC5 =0; adc_flag = 0; PORTB.RB7 = 0; } } } void SSD_blinking() { if(SSD_blinking_flag==1) { if(SSD_blinking_counter == 0 || SSD_blinking_counter==10 || SSD_blinking_counter==20 || SSD_blinking_counter==30 || SSD_blinking_counter==40) { PORTD = 0; SSD_Enable_flag = 1; } SSD_blinking_counter = SSD_blinking_counter+1; if(SSD_blinking_counter==5 || SSD_blinking_counter==15 || SSD_blinking_counter==25 || SSD_blinking_counter==35) { SSD_Enable_flag = 0; } else if(SSD_blinking_counter == 45) { PORTA.RA4 = 0; PORTA.RA5 = 0; SSD_blinking_counter = 0; SSD_blinking_flag = 0; SSD_Enable_flag = 0; adc_flag = 1; } } } <file_sep>/Electric_Heater/EEPROM.h.ini [Position] Line=17 Column=74 [FoldedLines] Count=0 <file_sep>/Electric_Heater/gpt.cp #line 1 "D:/swift act files/gpt.c" #line 1 "d:/swift act files/gpt.h" #line 1 "d:/swift act files/std_types.h" #line 20 "d:/swift act files/std_types.h" typedef unsigned char uint8; typedef signed char sint8; typedef unsigned int uint16; typedef signed int sint16; typedef unsigned long uint32; typedef signed long sint32; typedef unsigned long long uint64; typedef signed long long sint64; typedef float float32; typedef double float64; #line 7 "d:/swift act files/gpt.h" void Timer1_start(uint8 my_tick); #line 1 "d:/swift act files/os.h" #line 1 "d:/swift act files/std_types.h" #line 15 "d:/swift act files/os.h" void Os_start(void); void Os_scheduler(void); void Os_newTimerTick(void); #line 5 "D:/swift act files/gpt.c" static uint8 count = 0; #line 12 "D:/swift act files/gpt.c" void Timer1_start(uint8 my_tick) { TMR1L = 0; TMR1H = 0; T1CKPS0_bit = 0; T1CKPS1_bit = 0; TMR1CS_bit = 0; TMR1ON_bit = 1; CCPR1 = my_tick; CCP1CON = 0x0B; CCP1IE_bit = 1; } #line 37 "D:/swift act files/gpt.c" void interrupt() { if(CCP1IF_bit) { count++; if(count==100) { Os_newTimerTick(); count = 0; } CCP1IF_bit = 0; } #line 58 "D:/swift act files/gpt.c" } <file_sep>/Electric_Heater/EEPROM.cp #line 1 "D:/swift act files/EEPROM.c" #line 1 "d:/swift act files/eeprom.h" #line 1 "d:/swift act files/std_types.h" #line 20 "d:/swift act files/std_types.h" typedef unsigned char uint8; typedef signed char sint8; typedef unsigned int uint16; typedef signed int sint16; typedef unsigned long uint32; typedef signed long sint32; typedef unsigned long long uint64; typedef signed long long sint64; typedef float float32; typedef double float64; #line 15 "d:/swift act files/eeprom.h" void EEPROM_init(void); void EEPROM_writeByte(unsigned short my_data,uint8 add); uint8 EEPROM_readByte(uint8 add); #line 2 "D:/swift act files/EEPROM.c" void EEPROM_init(void) { I2C1_Init(100000); } void EEPROM_writeByte(uint8 my_data,uint8 add) { I2C1_Start(); I2C1_Wr(0xA2); I2C1_Wr(add); I2C1_Wr(my_data); I2C1_Stop(); } uint8 EEPROM_readByte(uint8 add) { uint8 my_data; I2C1_Start(); I2C1_Wr(0xA2); I2C1_Wr(add); I2C1_Repeated_Start(); I2C1_Wr(0xA3); my_data = I2C1_Rd(0u); I2C1_Stop(); return my_data; } <file_sep>/Electric_Heater/i2c.c.ini [Position] Line=10 Column=50 [FoldedLines] Count=0 <file_sep>/swift_act project/MyProject.c.ini [Position] Line=45 Column=20 [FoldedLines] Count=0 <file_sep>/Electric_Heater/MyProject.c.ini [Position] Line=27 Column=61 [FoldedLines] Count=0 <file_sep>/Electric_Heater/gpt.h.ini [Position] Line=9 Column=48 [FoldedLines] Count=0 <file_sep>/Electric_Heater/MyProject.c #include "Os.h" #include "EEPROM.h" #include "common_macros.h" uint8 elec_heater_flag = 0; // global variable for flaging if the button heater is pressed or not uint8 temp1; // two global variables for the temperature uint8 temp2; void main() { uint8 current_state; // variable to determine if its the first time or not EEPROM_init(); /*EEPROM_writeByte(0xFF,2); // these two lines are used to reset the electric heater temperature EEPROM_writeByte(0XFF,3); */ // if you uncomment these two lines so the temp. will be set again delay_ms(10); // to 60(as you bought the heater for the first time) // so every time you load the the hex file to the picgenios or turning off/on // the heater ,the displayed temp will be the last set temp. // so if you want to reset the whole system as it operates for the first time // you have to uncomment these two lines and build and load it to the picgenios // and after that uncomment them and build and the heater will be operated // as it is the first time :) // when you turn off and then on the heater it will display the last // set temp. .... you dont have to uncomment these two lines of course // but if you want to reset the system at all uncomment them and make // what i have said :) /* OFF/ON heater button */ TRISB.RB0 = 1; /* SSD PORTD (PORT OF THE DATA) */ TRISD = 0; TRISA.RA4 = 0; // select of second display TRISA.RA5 = 0; // select of first display /* up and down buttons */ TRISB.RB1 = 1; // up TRISB.RB2 = 1; // down /* heating element led */ TRISB.RB7 = 0; PORTB.RB7 = 0; /* Fan pin */ TRISC.RC2 = 0; PORTC.RC2 = 0; /* Heater pin */ TRISC.RC5 = 0; PORTC.RC5 = 0; while(RB0_bit == 1); // if heater button is pressed delay_ms(200); elec_heater_flag = 1; current_state = EEPROM_readByte(2); if(current_state == 0xFF) { temp1 = 6; temp2 = 0; EEPROM_writeByte(6,2); EEPROM_writeByte(0,3); } else { temp1 = EEPROM_readByte(2); temp2 = EEPROM_readByte(3); } Os_start(); // after reading the last setted temperature ... start the OS }<file_sep>/Electric_Heater/gpt.h #ifndef GPT_H #define GPT_H #include "std_types.h" void Timer1_start(uint8 my_tick); /* Points to the required function in the OS upper layer Scheduler */ /* this could be used if you wanna design the system with a call back function void Timer1_setCallBack(void (*Ptr2Func)(void)); */ #endif /* GPT_H */<file_sep>/Electric_Heater/app.c.ini [Position] Line=294 Column=17 [FoldedLines] Count=0 <file_sep>/Electric_Heater/gpt.c.ini [Position] Line=45 Column=30 [FoldedLines] Count=0 <file_sep>/swift_act project/Os.c #include "Os.h" #include "App.h" #include "Gpt.h" #include "i2c.h" uint8 counto = 0; /* Global variable to indicate the the timer has a new tick */ uint8 time_flag=0; /* Global variable store the Os Time */ static uint8 timer_count = 0; // extern of electric heater flag extern uint8 elec_heater_flag; // extern temp1 and temp2 to set them after turning off the heater and then turning it on extern uint8 temp1; extern uint8 temp2; /*********************************************************************************************/ void Os_start(void) { /* * Set the Call Back function call to Scheduler_New_Timer_Tick * this function will be called every Timer0 Compare Interrupt(20ms) */ //Timer1_setCallBack(Os_newTimerTick); /* this is used if you wanna implpement the driver using the /* call back function .. but its not applicable due to /* RAM error(RAM shortage) in the PIC16F877A */ /* Start compare mode (CCP module) with a base time 20ms */ Timer1_start(400); Init_Task(); /* Start the Os Scheduler */ Os_scheduler(); } /*********************************************************************************************/ void Os_newTimerTick(void) { /* increment the Os time by OS_BASE_TIME */ timer_count += OS_BASE_TIME; /* Set the flag to 1 to indicate that there is a new timer tick */ time_flag=1; } /*********************************************************************************************/ void Os_scheduler(void) { while(1) { if(time_flag==1 && elec_heater_flag == 1) // if heater is ON and timer flag = 1 { switch(timer_count) { case 20: case 40: case 60: case 80: case 120: case 140: case 160: case 180: SSD_TASK(); time_flag = 0; break; case 100: SSD_TASK(); ADC_Task(); time_flag = 0; break; case 200: SSD_TASK(); heater_task(); up_ButtonTask(); down_ButtonTask(); SSD_blinking(); ADC_Task(); Heater_Led_Task(); time_flag = 0; timer_count = 0; // clear the counter at 200ms break; } } else if(elec_heater_flag == 0) // heater is off { if(RB0_bit == 0) // when the heater button is ON again { temp1 = EEPROM_readByte(2); // read the last setted temp. temp2 = EEPROM_readByte(3); elec_heater_flag = 1; // raise the heater flag } } } } <file_sep>/Electric_Heater/gpt.c #include "Gpt.h" #include "Os.h" // global variable used in handling the interrupt time of the compare module static uint8 count = 0; /* Global pointer to function used to point upper layer functions * to be used in Call Back ... if you want to use call back... static volatile void (*g_Timer0_Call_Back_Ptr)(void) = NULL; */ /*********************************************************************************************/ void Timer1_start(uint8 my_tick) // ana m43'lo ka compare mode .... fa hb3tlo el tick_time..... { //--[ Configure The Timer1 Module To Operate In Timer Mode ]-- TMR1L = 0; TMR1H = 0; T1CKPS0_bit = 0; T1CKPS1_bit = 0; TMR1CS_bit = 0; TMR1ON_bit = 1; //--[ Configure The CCP1 Module To Operate in Compare Mode ]-- // Preload The CCPR1 Register CCPR1 = my_tick; // CCP in Compare Mode, CCPx Pin Is Unchanged & Trigger Special Event CCP1CON = 0x0B; // Enable CCP1 Interrupt CCP1IE_bit = 1; } /*********************************************************************************************/ /* this is used if you wanna design the system with call back function void Timer1_setCallBack(void(*Ptr2Func)(void)) { g_Timer0_Call_Back_Ptr = Ptr2Func; } */ /*********************************************************************************************/ /* Interrupt Service Routine for Timer1 compare mode */ void interrupt() { if(CCP1IF_bit) { count++; if(count==100) { Os_newTimerTick(); count = 0; } CCP1IF_bit = 0; } // This could be used if you wanna design the system using the call back function /* Check if the Timer1_setCallBack is already called */ /*if(g_Timer0_Call_Back_Ptr != NULL) { (*g_Timer0_Call_Back_Ptr)(); //call the function in the scheduler using call-back concept } */ } /*********************************************************************************************/<file_sep>/swift_act project/EEPROM.c #include "i2c.h" void EEPROM_init(void) { I2C1_Init(100000); // initialize I2C communication } void EEPROM_writeByte(uint8 my_data,uint8 add) { I2C1_Start(); // issue I2C start signal I2C1_Wr(0xA2); // send byte via I2C (device address + W) I2C1_Wr(add); // send byte (address of EEPROM location) I2C1_Wr(my_data); // send data (data to be written) I2C1_Stop(); // issue I2C stop signal } uint8 EEPROM_readByte(uint8 add) { uint8 my_data; I2C1_Start(); // issue I2C start signal I2C1_Wr(0xA2); // send byte via I2C (device address + W) I2C1_Wr(add); // send byte (data address) I2C1_Repeated_Start(); // issue I2C signal repeated start I2C1_Wr(0xA3); // send byte (device address + R) my_data = I2C1_Rd(0u); // Read the data (NO acknowledge) I2C1_Stop(); // issue I2C stop signal return my_data; } <file_sep>/Electric_Heater/common_macros.h.ini [Position] Line=11 Column=37 [FoldedLines] Count=0 <file_sep>/swift_act project/MyProject.c #include "Os.h" #include "i2c.h" #include "common_macros.h" uint8 elec_heater_flag = 0; // global variable for flaging if the button heater is pressed or not uint8 temp1; // two global variables for the temperature uint8 temp2; void main() { uint8 current_state; // variable to determine if its the first time or not EEPROM_init(); /*EEPROM_writeByte(0,2); // these two lines are used to reset the electric heater EEPROM_writeByte(0,3); */ delay_ms(10); /* OFF/ON heater button */ TRISB.RB0 = 1; /* SSD PORTD (PORT OF THE DATA) */ TRISD = 0; TRISA.RA4 = 0; // select of second display TRISA.RA5 = 0; // select of first display /* up and down buttons */ TRISB.RB1 = 1; // up TRISB.RB2 = 1; // down /* heating element led */ TRISB.RB7 = 0; PORTB.RB7 = 0; /* Fan pin */ TRISC.RC2 = 0; PORTC.RC2 = 0; /* Heater pin */ TRISC.RC5 = 0; PORTC.RC5 = 0; while(RB0_bit == 1); // if heater button is pressed delay_ms(200); elec_heater_flag = 1; current_state = EEPROM_readByte(2); if(current_state == 0) { temp1 = 6; temp2 = 0; } else { temp1 = EEPROM_readByte(2); temp2 = EEPROM_readByte(3); } Os_start(); // after reading the last setted temperature ... start the OS }<file_sep>/swift_act project/gpt.h #ifndef GPT_H #define GPT_H #include "std_types.h" void Timer1_start(uint8 my_tick); /* Points to the required function in the OS upper layer Scheduler */ /* this could be used if you wanna design the system with a call back function void Timer1_setCallBack(void (*Ptr2Func)(void)); */ #endif /* GPT_H */ <file_sep>/Electric_Heater/app.h #ifndef APP_H_ #define APP_H_ #include "Std_Types.h" void Init_Task(); void SSD_TASK(); void up_ButtonTask(); void down_ButtonTask(); void Heater_Led_Task(); void ADC_Task(); void heater_task(); void SSD_blinking(); #endif /* APP_H_ */<file_sep>/Electric_Heater/MyProject.cp #line 1 "D:/swift act files/MyProject.c" #line 1 "d:/swift act files/os.h" #line 1 "d:/swift act files/std_types.h" #line 20 "d:/swift act files/std_types.h" typedef unsigned char uint8; typedef signed char sint8; typedef unsigned int uint16; typedef signed int sint16; typedef unsigned long uint32; typedef signed long sint32; typedef unsigned long long uint64; typedef signed long long sint64; typedef float float32; typedef double float64; #line 15 "d:/swift act files/os.h" void Os_start(void); void Os_scheduler(void); void Os_newTimerTick(void); #line 1 "d:/swift act files/eeprom.h" #line 1 "d:/swift act files/std_types.h" #line 15 "d:/swift act files/eeprom.h" void EEPROM_init(void); void EEPROM_writeByte(unsigned short my_data,uint8 add); uint8 EEPROM_readByte(uint8 add); #line 1 "d:/swift act files/common_macros.h" #line 5 "D:/swift act files/MyProject.c" uint8 elec_heater_flag = 0; uint8 temp1; uint8 temp2; void main() { uint8 current_state; EEPROM_init(); #line 16 "D:/swift act files/MyProject.c" delay_ms(10); #line 29 "D:/swift act files/MyProject.c" TRISB.RB0 = 1; TRISD = 0; TRISA.RA4 = 0; TRISA.RA5 = 0; TRISB.RB1 = 1; TRISB.RB2 = 1; TRISB.RB7 = 0; PORTB.RB7 = 0; TRISC.RC2 = 0; PORTC.RC2 = 0; TRISC.RC5 = 0; PORTC.RC5 = 0; while(RB0_bit == 1); delay_ms(200); elec_heater_flag = 1; current_state = EEPROM_readByte(2); if(current_state == 0xFF) { temp1 = 6; temp2 = 0; EEPROM_writeByte(6,2); EEPROM_writeByte(0,3); } else { temp1 = EEPROM_readByte(2); temp2 = EEPROM_readByte(3); } Os_start(); } <file_sep>/Electric_Heater/i2c.h.ini [Position] Line=10 Column=43 [FoldedLines] Count=0 <file_sep>/README.md # Electric-Water-Heater Electric Water Heater using PICF877A microcontroller.The Project design is a time triggered design,I have implemented an OS to schedule the Project Tasks. All the header and source files are located in the swift act Project folder <file_sep>/swift_act project/app.h #ifndef APP_H_ #define APP_H_ #include "Std_Types.h" void Init_Task(); void SSD_TASK(); void up_ButtonTask(); void down_ButtonTask(); void Heater_Led_Task(); void ADC_Task(); void heater_task(); void SSD_blinking(); #endif /* APP_H_ */
c3c8da3c95546528a24944127827b7fa2ba5e0c6
[ "Markdown", "C", "C++", "INI" ]
25
C
JohnEssam235/Electric-Water-Heater
579e0d31638f28a17a8878138294e40ef458c2e5
258aaea237c89f0a6d029cc5b52bd70c4a6dcdd0
refs/heads/master
<file_sep>import $ from 'jquery'; import 'what-input'; // Foundation JS relies on a global varaible. In ES6, all imports are hoisted // to the top of the file so if we used`import` to import Foundation, // it would execute earlier than we have assigned the global variable. // This is why we have to use CommonJS require() here since it doesn't // have the hoisting behavior. window.jQuery = $; // require('foundation-sites'); // If you want to pick and choose which modules to include, comment out the above and uncomment // the line below import './lib/foundation-explicit-pieces'; import './lib/slick.min.js'; $(document).foundation(); let sliderNew = $('.ba-slider-new'); sliderNew.slick({ slidesToShow: 3, slidesToScroll: 1, dots: false, arrows: true, nextArrow: '.ba-slide-next', prevArrow: '.ba-slide-previous', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, dots: false } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); let sliderFeedback = $('.ba-slider-feedback'); sliderFeedback.slick({ slidesToShow: 1, slidesToScroll: 1, dots: false, arrows: true, nextArrow: '.ba-slide-next', prevArrow: '.ba-slide-previous', responsive: [ { breakpoint: 1024, settings: { slidesToShow: 1, slidesToScroll: 1, infinite: true, dots: false } }, { breakpoint: 600, settings: { slidesToShow: 1, slidesToScroll: 1 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] })
10f593826ac25d5f90cccbb4302053dd51a434bd
[ "JavaScript" ]
1
JavaScript
vikitoriia/cbd
b4cc4cf7158979dccbca0731f571c096356a7bb3
41695203ff1f32a1e5fbc621a5268f374629ab1b
refs/heads/master
<repo_name>nscarlyon/Cypress<file_sep>/cypress/integration/cypress.spec.ts context('Cypress Tests', () => { beforeEach(() => { cy.visit('/') }); it('', () => { }); }); <file_sep>/cypress/support/sequences.ts export class Sequences { }
b7af3c6253ecf6954c53f283af27891904b4b2a6
[ "TypeScript" ]
2
TypeScript
nscarlyon/Cypress
318bf0a0a9a2bb58fb10f086e9bb97bdc383da60
929da20a76a6eafbf077169eb473737708a8fcc8
refs/heads/main
<repo_name>Vipprajofficial/Streamlit<file_sep>/streamlit1.py # -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import streamlit as st import pandas as pd import numpy as np st.title("Nanosoft") st.write("First App") df= pd.DataFrame({ 'first column':[1,2,3,4], 'second column':[10,20,30,40]}) df chart_data=pd.DataFrame(np.random.randn(20,3),columns=['a','b','c']) st.line_chart(chart_data) map_data=pd.DataFrame(np.random.randn(1000,2) / [50,50] + [37.76,-122.4], columns=['lat','lon']) st.map(map_data) if st.checkbox(('show dataframe')): chart_data=pd.DataFrame(np.random.randn(20,3),columns=['a','b','c']) chart_data option = st.sidebar.selectbox('Which number do you like best?',df['first column']) 'You Selected: ', option left_column,right_column=st.columns(2) pressed=left_column.button('Press me?') if pressed: right_column.write('wohoo!') expander=st.expander("FAQ") expander.write('Here you couldput in some really , really long Explanations') import time 'Starting a long Computation...' #placeholder latest_iteration=st.empty() bar=st.progress(0) for i in range(10): latest_iteration.text(f'Iteration {i+1}') bar.progress(i+1) time.sleep(0.1) '>>>>>>> Now we have done...........'
79862598a5ebc28c9cda846960018a7a1394ad66
[ "Python" ]
1
Python
Vipprajofficial/Streamlit
eaa96e416e5c3adf46c9b4840bcb0c65360fd749
451c84c87d10d29851670d396427e5554f917eea
refs/heads/master
<repo_name>pritomsaha/Multiclass_AUC<file_sep>/multiclass_auc.py import numpy as np import itertools """ MAUCpy ~~~~~~ Contains two equations from Hand and Till's 2001 paper on a multi-class approach to the AUC. The a_value() function is the probabilistic approximation of the AUC found in equation 3, while MAUC() is the pairwise averaging of this value for each of the classes. This is equation 7 in their paper. """ def a_value(y_true, y_pred_prob, zero_label=0, one_label=1): """ Approximates the AUC by the method described in Hand and Till 2001, equation 3. NB: The class labels should be in the set [0,n-1] where n = # of classes. The class probability should be at the index of its label in the predicted probability list. Args: y_true: actual labels of test data y_pred_prob: predicted class probability zero_label: label for positive class one_label: label for negative class Returns: The A-value as a floating point. """ idx = np.isin(y_true, [zero_label, one_label]) labels = y_true[idx] prob = y_pred_prob[idx, zero_label] sorted_ranks = labels[np.argsort(prob)] n0, n1, sum_ranks = 0, 0, 0 n0 = np.count_nonzero(sorted_ranks==zero_label) n1 = np.count_nonzero(sorted_ranks==one_label) sum_ranks = np.sum(np.where(sorted_ranks==zero_label)) + n0 return (sum_ranks - (n0*(n0+1)/2.0)) / float(n0 * n1) # Eqn 3 def MAUC(y_true, y_pred_prob, num_classes): """ Calculates the MAUC over a set of multi-class probabilities and their labels. This is equation 7 in Hand and Till's 2001 paper. NB: The class labels should be in the set [0,n-1] where n = # of classes. The class probability should be at the index of its label in the probability list. Args: y_true: actual labels of test data y_pred_prob: predicted class probability zero_label: label for positive class one_label: label for negative class num_classes (int): The number of classes in the dataset. Returns: The MAUC as a floating point value. """ # Find all pairwise comparisons of labels class_pairs = [x for x in itertools.combinations(range(num_classes), 2)] # Have to take average of A value with both classes acting as label 0 as this # gives different outputs for more than 2 classes sum_avals = 0 for pairing in class_pairs: sum_avals += (a_value(y_true, y_pred_prob, zero_label=pairing[0], one_label=pairing[1]) + a_value(y_true, y_pred_prob, zero_label=pairing[1], one_label=pairing[0])) / 2.0 return sum_avals * (2 / float(num_classes * (num_classes-1))) # Eqn 7
676d768c6c685e409f3ad4b34b800caf80aefc45
[ "Python" ]
1
Python
pritomsaha/Multiclass_AUC
5c8694ad8a4c14cc623523cb650ae036f4e00dd8
1bc567d26c72188a794ced78b21e1e4b73f73fdf
refs/heads/master
<repo_name>cfxiao/FreeStreamer<file_sep>/build.sh #! /bin/sh set -e xcodebuild -project FreeStreamerMobile/FreeStreamerMobile.xcodeproj \ -scheme "FreeStreamerMobile" build \ -sdk iphonesimulator -arch i386 ONLY_ACTIVE_ARCH=NO xcodebuild -project FreeStreamerDesktop/FreeStreamerDesktop.xcodeproj \ -scheme "FreeStreamerDesktop" build \ -arch x86_64 ONLY_ACTIVE_ARCH=NO
f2ede8248b641f5d5a7b16146fbda1f61640825a
[ "Shell" ]
1
Shell
cfxiao/FreeStreamer
cf85d045b0360a9ccefdc759dbedc03fc2b1706a
a865e1d5d3b4812d489d8110940860e5e0bb44e2
refs/heads/master
<repo_name>vdk1212/vdk1212.github.io<file_sep>/acrostia/js/script.js $(document).ready(function(){ /*PRELOADER*/ $(window).on('load', function () { var $preload = $('#preloader'), $icon = $preload.find('.preloader_icon'); $icon.fadeOut(); $preload.delay(500).fadeOut('slow'); }); /*NAV-BUTTON*/ $('.navbar-toggler').click(function(){ $(this).toggleClass('active_button'); $('#header').toggleClass('header_active'); $('section, footer').toggleClass('blur'); }) $('.menu li').click(function(){ if($(window).width()<768) { $('#header').removeClass('header_active'); $('.menu').removeClass('show'); $('.navbar-toggler').removeClass('active_button'); $('section, footer').removeClass('blur'); } }) /*PORTFOLIO MENU*/ $('#Container').mixItUp(); $('.portfolio_nav li').click(function(){ $('.portfolio_nav li').removeClass('active'); $(this).addClass('active'); }) /*POPUP*/ $('.open-popup-link').magnificPopup({ type: 'inline', midClick: true, closeOnContentClick: true }); $(".mix").each(function(i){ $(this).find("a").attr("href", "#work_" + i); $(this).find(".item").attr("id", "work_" + i); }); /*FORM VALIDATION*/ var $form = $("#form"), $successMsg = $(".alert"); $.validator.addMethod("letters", function(value, element) { return this.optional(element) || value == value.match(/^[a-zA-Z ]*$/); }); $form.validate({ rules: { name: { required: true, minlength: 3, letters: true }, email: { required: true, email: true }, text: { required: true, minlength: 20, letters: true } }, messages: { name: "*please specify your name (only letters and spaces are allowed)", email: "*please specify a valid email address", text: "*please specify your message (min length is 30 letters)" }, submitHandler: function() { $successMsg.show(); } }); }); //MAP function initMap() { var location = {lat: -25.363, lng: 131.044}; var map = new google.maps.Map(document.getElementById('map'), { zoom: 15, center: location }); var marker = new google.maps.Marker({ position: location, map: map }); }<file_sep>/Endorfine/js/index.js $(document).ready(function(){ /*STUDIO, GALERIA*/ $('.visual-content').click(function(){ $('body').removeClass('bg-non') $('.gallery').removeClass('text-page') $('#studio, #galeria, .hidden-content').removeClass('non') $('#usun-tatuaz, #regulamin').addClass('non') }) /*USUŃ TATUAŻ*/ $('#text-content-1').click(function(){ $('#usun-tatuaz').removeClass('non') $('body').addClass('bg-non') $('.gallery').addClass('text-page') $('#studio, #galeria, #regulamin, .hidden-content').addClass('non') }) //REGULAMIN $('#text-content-2').click(function(){ $('#regulamin').removeClass('non') $('body').addClass('bg-non') $('.gallery').addClass('text-page') $('#studio, #galeria, #usun-tatuaz, .hidden-content').addClass('non') }) //MENU $('#menu-button').click(function(){ $('.navigation').slideToggle(100); }); $(window).resize(function(){ if($(window).width() > 425 ){ $('.navigation').removeAttr('style'); } }); //SLIDER-1 $('#hex-1') .click(function(){ $(this).toggleClass('active-hex-1-2') $('#hex-2, #hex-3, #hex-4, #hex-5, #hex-6, #hex-7, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-1-3') $('#slider-1').slideToggle(); }) //SLIDER-2 $('#hex-2').click(function(){ $(this).toggleClass('active-hex-1-2') $('#hex-1, #hex-3, #hex-4, #hex-5, #hex-6, #hex-7, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-1-3') $('#slider-2').slideToggle(); }) //SLIDER-3 $('#hex-3').click(function(){ $(this).toggleClass('active-hex-3') $('#hex-1, #hex-2, #hex-4, #hex-5, #hex-6, #hex-7, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-1-3') $('#slider-3').slideToggle(); }) //SLIDER-4 $('#hex-4').click(function(){ $(this).toggleClass('active-hex-4-5') $('#hex-1, #hex-2, #hex-3, #hex-5, #hex-6, #hex-7, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-4-8') $('#slider-4').slideToggle(); }) //SLIDER-5 $('#hex-5').click(function(){ $(this).toggleClass('active-hex-4-5') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-6, #hex-7, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-4-8') $('#slider-5').slideToggle(); }) //SLIDER-6 $('#hex-6').click(function(){ $(this).toggleClass('active-hex-6-8') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-5, #hex-7, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-4-8') $('#slider-6').slideToggle(); }) //SLIDER-7 $('#hex-7').click(function(){ $(this).toggleClass('active-hex-6-8') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-5, #hex-6, #hex-8, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-4-8') $('#slider-7').slideToggle(); }) //SLIDER-8 $('#hex-8').click(function(){ $(this).toggleClass('active-hex-6-8') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-5, #hex-6, #hex-7, #hex-9, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-4-8') $('#slider-8').slideToggle(); }) //SLIDER-9 $('#hex-9').click(function(){ $(this).toggleClass('active-hex-9-11') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-5, #hex-6, #hex-7, #hex-8, #hex-10, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-9-11') $('#slider-9').slideToggle(); }) //SLIDER-10 $('#hex-10').click(function(){ $(this).toggleClass('active-hex-9-11') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-5, #hex-6, #hex-7, #hex-8, #hex-9, #hex-11, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-9-11') $('#slider-10').slideToggle(); }) //SLIDER-11 $('#hex-11').click(function(){ $(this).toggleClass('active-hex-9-11') $('#hex-1, #hex-2, #hex-3, #hex-4, #hex-5, #hex-6, #hex-7, #hex-8, #hex-9, #hex-10, .zest').toggleClass('non') $('.hex-wrap').toggleClass('hex-wrap-active') $('.hidden-content').toggleClass('up-9-11') $('#slider-11').slideToggle(); }) }); //MAP function initMap() { var endorfine = {lat: 50.038725, lng: 22.003184}; /*50.038716, 22.003185*/ var map = new google.maps.Map(document.getElementById('map'), { zoom: 15, center: endorfine }); var marker = new google.maps.Marker({ position: endorfine, map: map }); }
ffd006455c3da8f66a116871bf5084978444db8f
[ "JavaScript" ]
2
JavaScript
vdk1212/vdk1212.github.io
f4da757570764bd3f6f2400b0aa5fa53ba7c57d6
e61b17b97cf51cf412f0ab72c12952e593c22d0a
refs/heads/master
<repo_name>GingkathFox/audius-music<file_sep>/commands/play.js module.exports = { name: "play", description: "Play a song in VC!", aliases: "p", async execute(bot, msg, args, serverQueue, youtube) { args = JSON.stringify(args) const getLinks = require("../functions/getLinks"); const discord = require("discord.js"); const axios = require("axios"); const request = require("request"); const buffer = require('audio-buffer') const voiceChannel = msg.member.voice.channel; if (!voiceChannel) { return msg.channel.send( `It seems you aren't in a voice channel.` ); } const permissions = voiceChannel.permissionsFor(msg.client.user); if (!permissions.has("CONNECT")) { return msg.channel.send( `I may not have permissions to connect to vc... could someone please check?` ); } if (!permissions.has("SPEAK")) { return msg.channel.send( `i may not have permissions to speak in vc... could someone please check?` ); } getLinks(msg, args, voiceChannel, youtube) } };<file_sep>/README.md # audius-music a music bot for the Audius discord server add it here: https://discordapp.com/oauth2/authorize?scope=bot&permissions=66440512&client_id=653410619587821568 ### commands m!play - Plays new song and autojoins if used. - Usage: m!play [audius/soundcloud link/ search term]) m!skip - Skips currently playing song. m!stop - Stops music queue. m!leave - Disconnects Music Bot. m!clear - Clears all current queue entries. m!volume - Select volume for the audio. - Usage: m!volume [0 - 200] m!q - Displays all current songs in the queue. m!pause - Pauses audio m!resume - Resumes audio<file_sep>/commands/help.js module.exports = { name: 'help', description: 'help i need somebody', execute(bot, msg, args, serverQueue) { return msg.channel.send(`\`\`\`m!play (Plays new song and autojoins if used. Usage: m!play [link/ search term]) m!skip (Skips currently playing song.) m!stop (Stops music queue) m!leave (Disconnects Music Bot) m!clear (Clears all current queue entries) m!volume (Select volume for the audio. Usage: m!volume [0 - 200 (no limit but don't go higher)] m!q (Displays all current songs in the queue. Usage: m!q/ m!queue m!pause (Pauses audio) m!resume (Resumes audio)\`\`\``) }, }<file_sep>/commands/queue.js module.exports = { name: 'queue', description: 'Bot queue', execute(bot, msg, args, serverQueue) { if (!serverQueue) return msg.channel.send("There is nothing playing.") if (global.queue.get(msg.guild.id) == undefined) return return msg.channel.send({ embed: { title: `Queue:`, description: `${serverQueue.songs .map(song => `**-** [${song.title}](${song.link})`) .join("\n")}\n**Now playing: **[${ serverQueue.songs[0].title }](serverQueue.songs[0].link)` } }) }, }
f68fd21e366c57140b017613189f05d20ac4e253
[ "JavaScript", "Markdown" ]
4
JavaScript
GingkathFox/audius-music
e25498bdf3992cdcceed63329e646e3a77873b70
d8cdbd1cd535840a4dcadd115ef5d1ae0262e532
refs/heads/master
<repo_name>cvgw/k8s_admission_webhooks<file_sep>/vault_initializer/main.go package main import ( "encoding/json" "os" "os/signal" "syscall" "time" log "github.com/sirupsen/logrus" appsV1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" vaultApi "github.com/hashicorp/vault/api" "github.com/pkg/errors" "fmt" ) const ( initializerName = "vault.initializer.cvgw.me" requireAnnotation = true annotation = "initializer.cvgw.me/vault" vaultAddressVar = "VAULT_ADDRESS" vaultTokenVar = "VAULT_TOKEN" vaultClientCertPathVar = "VAULT_CLIENT_CERT_PATH" keyName = "/secret/foo" ) var ( vaultAddress string vaultToken string vaultClientCertPath string ) func getKeyFromVault() (string, string, error) { config := vaultApi.Config{ Address: vaultAddress, } tlsConfig := vaultApi.TLSConfig{ CACert: vaultClientCertPath, } config.ConfigureTLS(&tlsConfig) client, err := vaultApi.NewClient(&config) if err != nil { return "", "", err } client.SetToken(vaultToken) secretValues, err := client.Logical().Read(keyName) if err != nil { return "", "", err } var name, value string for key, val := range secretValues.Data { var ok bool name = key value, ok = val.(string) if !ok { return "", "", errors.New("couldn't assert as string") } } return name, value, nil } func processDeployment(depl *appsV1.Deployment) error { name, value, err := getKeyFromVault() if err != nil { return err } depl.ObjectMeta.Annotations["vault-initializer"] = fmt.Sprintf("%s-%s", name, value) return nil } func processAdd(deployment *appsV1.Deployment, clientSet *kubernetes.Clientset) error { if deployment.ObjectMeta.GetInitializers() != nil { pendingInitializers := deployment.ObjectMeta.GetInitializers().Pending if initializerName == pendingInitializers[0].Name { log.Info("starting initialization") initializedDeployment := deployment.DeepCopy() // Remove self from the list of pending Initializers while preserving ordering. if len(pendingInitializers) == 1 { initializedDeployment.ObjectMeta.Initializers = nil } else { initializedDeployment.ObjectMeta.Initializers.Pending = append(pendingInitializers[:0], pendingInitializers[1:]...) } if requireAnnotation { a := deployment.ObjectMeta.GetAnnotations() log.Infof("Annotations: %s", a) _, ok := a[annotation] if !ok { log.Infof("Required '%s' annotation missing; skipping envoy container injection", annotation) _, err := clientSet.AppsV1().Deployments(deployment.Namespace).Update(initializedDeployment) if err != nil { return err } return nil } } err := processDeployment(initializedDeployment) if err != nil { return err } oldData, err := json.Marshal(deployment) if err != nil { return err } newData, err := json.Marshal(initializedDeployment) if err != nil { return err } patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, appsV1.Deployment{}) if err != nil { return err } _, err = clientSet.AppsV1().Deployments(deployment.Namespace).Patch(deployment.Name, types.StrategicMergePatchType, patchBytes) if err != nil { return err } } } return nil } func main() { ns := "default" resource := "deployments" vaultAddress = os.Getenv(vaultAddressVar) vaultToken = os.Getenv(vaultTokenVar) vaultClientCertPath = os.Getenv(vaultClientCertPathVar) log.Info("starting initializer") // creates the in-cluster config config, err := rest.InClusterConfig() if err != nil { log.Fatal(err) } clientSet, err := kubernetes.NewForConfig(config) if err != nil { log.Fatal(err) } listOpts := metav1.ListOptions{} deploymentList, err := clientSet.AppsV1().Deployments(ns).List(listOpts) if err != nil { log.Fatal(err) } for _, deployment := range deploymentList.Items { log.Info(deployment) } // Watch uninitialized Deployments in all namespaces. restClient := clientSet.AppsV1().RESTClient() watchlist := cache.NewListWatchFromClient(restClient, resource, ns, fields.Everything()) // Wrap the returned watchlist to workaround the inability to include // the `IncludeUninitialized` list option when setting up watch clients. // TODO this can possibly be updated using the list options modifier argument includeUninitializedWatchlist := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.IncludeUninitialized = true return watchlist.List(options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.IncludeUninitialized = true return watchlist.Watch(options) }, } resyncPeriod := 30 * time.Second _, controller := cache.NewInformer(includeUninitializedWatchlist, &appsV1.Deployment{}, resyncPeriod, cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { log.Info("add triggered") err := processAdd(obj.(*appsV1.Deployment), clientSet) if err != nil { log.Error(err) } }, }, ) stop := make(chan struct{}) go controller.Run(stop) signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM) <-signalChan log.Info("Shutdown signal received, exiting...") close(stop) } <file_sep>/echo_webhook/Dockerfile FROM ubuntu:16.04 as builder RUN apt-get update && apt-get install -y curl build-essential unzip git RUN curl -O https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz RUN tar -xvf go1.10.3.linux-amd64.tar.gz -C /usr/local ENV GOROOT=/usr/local/go ENV PATH=$PATH:/usr/local/go/bin RUN mkdir -p /golang/src RUN mkdir -p /golang/bin ENV GOPATH=/golang ENV GOBIN=$GOPATH/bin ENV PATH=$PATH:$GOBIN RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh RUN mkdir -p /golang/src/echo_webhook WORKDIR /golang/src/echo_webhook COPY Gopkg.lock Gopkg.toml ./ COPY vendor ./vendor COPY main.go ./ RUN dep check RUN go build FROM ubuntu:16.04 RUN apt-get update COPY --from=builder /golang/src/echo_webhook/echo_webhook /echo_webhook COPY server-key.pem server.crt ./ ENV CERT_FILE_PATH=/server.crt ENV SERVER_KEY_FILE_PATH=/server-key.pem ENV PORT=443 CMD ["/echo_webhook"] <file_sep>/config_mutator_webhook/README.md # Config Mutator Webhook ## Description A simple mutating admission webhook that adds an EnvFrom ConfigMap to all containers in a Pod <file_sep>/config_mutator_webhook/scripts/create_webhook_config.sh #!/usr/bin/env bash set -e CA_BUNDLE=$(kubectl get configmap -n kube-system extension-apiserver-authentication -o=jsonpath='{.data.client-ca-file}' | base64 | tr -d '\n') cat <<EOF | kubectl create -f - apiVersion: admissionregistration.k8s.io/v1beta1 kind: MutatingWebhookConfiguration metadata: name: config-mutator-cfg labels: app: config-mutator webhooks: - name: config-mutator.cvgw.me clientConfig: service: name: config-mutator namespace: default path: "/mutate" caBundle: | ${CA_BUNDLE} failurePolicy: Fail rules: - apiGroups: - "" apiVersions: - v1 operations: - "CREATE" resources: - "pods" EOF <file_sep>/config_mutator_webhook/scripts/install_cfssl.sh #!/usr/bin/env bash set -e curl -L https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 -o cfssl chmod +x cfssl sudo ln -s $(pwd)/cfssl /usr/bin/cfssl curl -L https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 -o cfssljson chmod +x cfssljson sudo ln -s $(pwd)/cfssljson /usr/bin/cfssljson <file_sep>/echo_webhook/main.go package main import ( "k8s.io/api/admission/v1beta1" log "github.com/sirupsen/logrus" coreV1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" "encoding/json" "net/http" "fmt" "io/ioutil" "crypto/tls" "os" ) const ( certFilePathVar = "CERT_FILE_PATH" serverKeyFilePathVar = "SERVER_KEY_FILE_PATH" portVar = "PORT" ) type WebhookServer struct { server *http.Server } func (ws *WebhookServer) handleWebhook(w http.ResponseWriter, r *http.Request) { var body []byte if r.Body != nil { if data, err := ioutil.ReadAll(r.Body); err == nil { body = data } } response := processWebhook(body) resp, err := json.Marshal(response) if err != nil { log.Error(err) } _, err = w.Write(resp) if err != nil { log.Error(err) } } func processWebhook(body []byte) v1beta1.AdmissionReview { reviewResponse := &v1beta1.AdmissionResponse{ Allowed: true, } ar := v1beta1.AdmissionReview{} deserializer := scheme.Codecs.UniversalDeserializer() _, _, err := deserializer.Decode(body, nil, &ar) if err != nil { log.Error(err) } var pod coreV1.Pod req := ar.Request err = json.Unmarshal(req.Object.Raw, &pod) if err != nil { log.Error(err) } log.Info(&pod.ObjectMeta) response := v1beta1.AdmissionReview{} response.Response = reviewResponse response.Response.UID = ar.Request.UID return response } func main () { certFilePath := os.Getenv(certFilePathVar) serverKeyFilePath := os.Getenv(serverKeyFilePathVar) port := os.Getenv(portVar) switch { case certFilePath == "": log.Fatal("cert file path cannot be blank") case serverKeyFilePath == "": log.Fatal("server key file path cannot be blank") } pair, err := tls.LoadX509KeyPair(certFilePath, serverKeyFilePath) if err != nil { log.Fatal(err) } whsvr := &WebhookServer { server: &http.Server { Addr: fmt.Sprintf(":%v", port), TLSConfig: &tls.Config{Certificates: []tls.Certificate{pair}}, }, } mux := http.NewServeMux() mux.HandleFunc("/mutate", whsvr.handleWebhook) whsvr.server.Handler = mux log.Fatal(whsvr.server.ListenAndServeTLS("", "")) } <file_sep>/vault_initializer/substitute_config_map.sh #!/bin/bash set -e (echo "cat <<EOF"; cat ./kubernetes/config-map.yml; echo EOF) | sh <file_sep>/annotating_initializer/delete_k8s_resources.sh #!/usr/bin/env bash set -e kubectl delete initializerconfiguration/annotator kubectl delete deployments/annotator kubectl delete rolebindings/initialize-deployments kubectl delete role/deployment-initializer kubectl delete serviceaccounts/demo-init <file_sep>/vault_initializer/README.md # Vault Initializer ## Description Demo initializer to show modifying an initializing k8s resource with data pulled from vault ## Requirements * deployed and unsealed vault instance * kubenetes api-server with admission plugin `Initializers` added * kubenetes api-server with api-resource type `admissionregistration.k8s.io/v1alpha1` ## Setup Create a new policy in vault named `mypolicy` using the included file `vault_policy.hcl` ```` vault policy write mypolicy vault_policy.hcl ```` Create a token for `mypolicy` ```` vault token create --policy=mypolicy ```` Copy the token value and export it in your shell as `VAULT_TOKEN` ```` export VAULT_TOKEN=xxxxx ```` Write the test value to vault ```` vault write /secret/foo --value=TEST_VALUE ```` Build the vault-initializer docker image ```` docker build -t vault-initializer . ```` Create the kubernetes resources ```` ./init_resources.sh ```` ## Usage Create the test deployment ```` kubectl create -f ./kubernetes/sleep.yml ```` Verify that the deployment was annotated with the value from vault ```` kubectl get deployments/sleep -o yaml annotations: deployment.kubernetes.io/revision: "1" initializer.cvgw.me/vault: "true" vault-initializer: --value-TEST_VALUE ```` ## Cleanup Delete the test deployment ```` kubectl delete deployments/sleep ```` Delete the vault-initializer resources ```` ./delete_resources.sh ```` <file_sep>/vault_initializer/init_resources.sh #!/bin/bash set -e echo Creating K8s resources kubectl create serviceaccount test kubectl create clusterrolebinding test-cluster-admin --clusterrole cluster-admin --serviceaccount default:test ./substitute_config_map.sh | kubectl create -f - kubectl create -f ./kubernetes/deployment.yml kubectl create -f ./kubernetes/admission-config.yml <file_sep>/README.md # Kubernetes Admission Examples ## Description Examples of validating and mutating admission webhooks as well as initializers. More to come ## Examples * [Echo Webhook](https://github.com/cvgw/k8s_admission_examples/tree/master/echo_webhook) * [Annotating Initializer](https://github.com/cvgw/k8s_admission_examples/tree/master/annotating_initializer) * [Vault Initializer](https://github.com/cvgw/k8s_admission_examples/tree/master/vault_initializer) <file_sep>/config_mutator_webhook/scripts/create_k8s_resources.sh #!/usr/bin/env bash set -e ./scripts/k8s_cert.sh kubectl create -f ./kubernetes/deployment.yaml kubectl create -f ./kubernetes/svc.yaml kubectl create -f ./kubernetes/config-map.yaml ./scripts/create_webhook_config.sh <file_sep>/config_mutator_webhook/main.go package main import ( "crypto/tls" "encoding/json" "fmt" "io/ioutil" "net/http" "os" "github.com/mattbaird/jsonpatch" "github.com/pkg/errors" log "github.com/sirupsen/logrus" "k8s.io/api/admission/v1beta1" coreV1 "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes/scheme" ) const ( certFilePathVar = "CERT_FILE_PATH" serverKeyFilePathVar = "SERVER_KEY_FILE_PATH" portVar = "PORT" ) type WebhookServer struct { server *http.Server } func (ws *WebhookServer) handleWebhook(w http.ResponseWriter, r *http.Request) { var body []byte if r.Body != nil { if data, err := ioutil.ReadAll(r.Body); err == nil { body = data } } ar, err := reviewFromBody(body) if err != nil { log.Error(err) } response, err := processAdmissionRequest(ar) if err != nil { log.Error(err) } resp, err := json.Marshal(response) if err != nil { log.Error(err) } _, err = w.Write(resp) if err != nil { log.Error(err) } } func reviewFromBody(body []byte) (v1beta1.AdmissionReview, error) { ar := v1beta1.AdmissionReview{} deserializer := scheme.Codecs.UniversalDeserializer() _, _, err := deserializer.Decode(body, nil, &ar) if err != nil { err = errors.Wrap(err, "couldn't decode webhook body") return ar, err } return ar, nil } func processAdmissionRequest(ar v1beta1.AdmissionReview) (v1beta1.AdmissionReview, error) { reviewResponse := &v1beta1.AdmissionResponse{ Allowed: true, } response := v1beta1.AdmissionReview{} response.Response = reviewResponse req := ar.Request pod, err := podFromRequest(req) if err != nil { err = errors.Wrap(err, "couldn't get pod from request") return response, err } patchBytes, patchType, err := addConfigToPod(&pod) if err != nil { err = errors.Wrap(err, "couldn't generate patch") return response, err } reviewResponse.Patch = patchBytes reviewResponse.PatchType = &patchType response.Response.UID = ar.Request.UID return response, nil } func podFromRequest(req *v1beta1.AdmissionRequest) (coreV1.Pod, error) { var pod coreV1.Pod err := json.Unmarshal(req.Object.Raw, &pod) if err != nil { err = errors.Wrap(err, "couldn't unmarshall pod") return pod, err } return pod, nil } func addConfigToPod(pod *coreV1.Pod) ([]byte, v1beta1.PatchType, error) { if pod.Annotations == nil { pod.Annotations = make(map[string]string) } updatedPod := pod.DeepCopy() containers := updatedPod.Spec.Containers if containers != nil { source := coreV1.EnvFromSource{ ConfigMapRef: &coreV1.ConfigMapEnvSource{ LocalObjectReference: coreV1.LocalObjectReference{ Name: "mutating-demo-configmap", }, }, } updatedContainers := make([]coreV1.Container, 0) for _, container := range containers { envFrom := container.EnvFrom if envFrom == nil { envFrom = make([]coreV1.EnvFromSource, 0) } envFrom = append(envFrom, source) container.EnvFrom = envFrom updatedContainers = append(updatedContainers, container) } updatedPod.Spec.Containers = updatedContainers } return createPodPatch(pod, updatedPod) } func createPodPatch(pod, updatedPod *coreV1.Pod) ([]byte, v1beta1.PatchType, error) { patchType := v1beta1.PatchTypeJSONPatch oldData, err := json.Marshal(pod) if err != nil { return nil, patchType, err } else { log.Infof("old data %s", string(oldData)) } newData, err := json.Marshal(updatedPod) if err != nil { return nil, patchType, err } else { log.Infof("new data %s", string(newData)) } patch, err := jsonpatch.CreatePatch(oldData, newData) if err != nil { return nil, patchType, err } patchBytes, err := json.Marshal(patch) if err != nil { return nil, patchType, err } return patchBytes, patchType, nil } func main() { certFilePath := os.Getenv(certFilePathVar) serverKeyFilePath := os.Getenv(serverKeyFilePathVar) port := os.Getenv(portVar) switch { case certFilePath == "": log.Fatal("cert file path cannot be blank") case serverKeyFilePath == "": log.Fatal("server key file path cannot be blank") } pair, err := tls.LoadX509KeyPair(certFilePath, serverKeyFilePath) if err != nil { log.Fatal(err) } whsvr := &WebhookServer{ server: &http.Server{ Addr: fmt.Sprintf(":%v", port), TLSConfig: &tls.Config{Certificates: []tls.Certificate{pair}}, }, } mux := http.NewServeMux() mux.HandleFunc("/mutate", whsvr.handleWebhook) whsvr.server.Handler = mux log.Fatal(whsvr.server.ListenAndServeTLS("", "")) } <file_sep>/vault_initializer/delete_resources.sh #!/usr/bin/env bash set -e echo Deleting K8s resources kubectl delete initializerconfiguration.admissionregistration.k8s.io/vault kubectl delete deployments vault-initializer kubectl delete configmaps vault-initializer-config kubectl delete clusterrolebindings test-cluster-admin kubectl delete serviceaccounts test <file_sep>/echo_webhook/README.md # Echo Webhook ## Description A simple mutating admission webhook that just logs info about the resource being created <file_sep>/annotating_initializer/main.go package main import ( "encoding/json" "os" "os/signal" "syscall" "time" log "github.com/sirupsen/logrus" appsV1 "k8s.io/api/apps/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/tools/cache" ) const ( initializerName = "annotator.initializer.cvgw.me" ) func handleAdd(deployment *appsV1.Deployment, clientSet *kubernetes.Clientset) error { if deployment.ObjectMeta.GetInitializers() != nil { pendingInitializers := deployment.ObjectMeta.GetInitializers().Pending if initializerName == pendingInitializers[0].Name { initializedDeployment := deployment.DeepCopy() // Remove initializer name from pending list and preserve order. if len(pendingInitializers) == 1 { initializedDeployment.ObjectMeta.Initializers = nil } else { initializedDeployment.ObjectMeta.Initializers.Pending = append( pendingInitializers[:0], pendingInitializers[1:]..., ) } if initializedDeployment.ObjectMeta.Annotations == nil { initializedDeployment.ObjectMeta.Annotations = make(map[string]string) } // Modify the deployment spec to include the new annotation initializedDeployment.ObjectMeta.Annotations["annotating-initializer"] = "meow" oldData, err := json.Marshal(deployment) if err != nil { return err } newData, err := json.Marshal(initializedDeployment) if err != nil { return err } patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, appsV1.Deployment{}) if err != nil { return err } _, err = clientSet.AppsV1().Deployments(deployment.Namespace).Patch( deployment.Name, types.StrategicMergePatchType, patchBytes, ) if err != nil { return err } } } return nil } func main() { log.Info("starting initializer") config, err := rest.InClusterConfig() if err != nil { log.Fatal(err) } clientSet, err := kubernetes.NewForConfig(config) if err != nil { log.Fatal(err) } restClient := clientSet.AppsV1().RESTClient() watchlist := cache.NewListWatchFromClient( restClient, "deployments", "default", fields.Everything(), ) // NewListWatchFromClient does not allow IncludeUninitialized to be set // TODO this can possibly be updated using the list options modifier argument includeUninitializedWatchlist := &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { options.IncludeUninitialized = true return watchlist.List(options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { options.IncludeUninitialized = true return watchlist.Watch(options) }, } resyncPeriod := 30 * time.Second _, controller := cache.NewInformer(includeUninitializedWatchlist, &appsV1.Deployment{}, resyncPeriod, cache.ResourceEventHandlerFuncs{ AddFunc: func(obj interface{}) { log.Info("add triggered") err := handleAdd(obj.(*appsV1.Deployment), clientSet) if err != nil { log.Error(err) } }, }, ) stop := make(chan struct{}) go controller.Run(stop) signalChan := make(chan os.Signal, 1) signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM) <-signalChan log.Info("Shutdown signal received, exiting...") close(stop) } <file_sep>/annotating_initializer/create_k8s_resources.sh #!/usr/bin/env bash set -e kubectl create serviceaccount demo-init kubectl create -f ./kubernetes/rbac.yaml kubectl create -f ./kubernetes/role-binding.yaml kubectl create -f ./kubernetes/deployment.yaml kubectl create -f ./kubernetes/admission-config.yaml <file_sep>/echo_webhook/scripts/k8s_cert.sh #!/usr/bin/env bash SVC_NAME=echo-webhook POD_NAME=echo-webhook NAMESPACE=default cat <<EOF | cfssl genkey - | cfssljson -bare server { "hosts": [ "${SVC_NAME}.${NAMESPACE}.svc.cluster.local", "${POD_NAME}.${NAMESPACE}.pod.cluster.local", "${SVC_NAME}.${NAMESPACE}.svc" ], "CN": "${POD_NAME}.${NAMESPACE}.pod.cluster.local", "key": { "algo": "ecdsa", "size": 256 } } EOF cat <<EOF | kubectl create --kubeconfig ./kubeconfig.yml -f - apiVersion: certificates.k8s.io/v1beta1 kind: CertificateSigningRequest metadata: name: ${SVC_NAME}.${NAMESPACE} spec: groups: - system:authenticated request: $(cat server.csr | base64 | tr -d '\n') usages: - digital signature - key encipherment - server auth EOF kubectl --kubeconfig ./kubeconfig.yml certificate approve ${SVC_NAME}.${NAMESPACE} kubectl --kubeconfig ./kubeconfig.yml get csr ${SVC_NAME}.${NAMESPACE} -o jsonpath='{.status.certificate}' \ | base64 --decode > server.crt <file_sep>/annotating_initializer/Dockerfile FROM ubuntu:16.04 as builder RUN apt-get update && apt-get install -y curl build-essential unzip git RUN curl -O https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz RUN tar -xvf go1.10.3.linux-amd64.tar.gz -C /usr/local ENV GOROOT=/usr/local/go ENV PATH=$PATH:/usr/local/go/bin RUN mkdir -p /golang/src RUN mkdir -p /golang/bin ENV GOPATH=/golang ENV GOBIN=$GOPATH/bin ENV PATH=$PATH:$GOBIN RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh # End of golang & dep boilerplate RUN mkdir -p /golang/src/annotating_initializer WORKDIR /golang/src/annotating_initializer COPY main.go . COPY Gopkg.lock Gopkg.toml ./ COPY vendor ./vendor RUN dep check RUN go build FROM ubuntu:16.04 WORKDIR /tmp RUN apt-get update WORKDIR / COPY --from=builder /golang/src/annotating_initializer/annotating_initializer / CMD ["/bin/bash", "-c", "./annotating_initializer"] <file_sep>/config_mutator_webhook/Dockerfile FROM ubuntu:16.04 as builder RUN apt-get update && apt-get install -y curl build-essential unzip git RUN curl -O https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz RUN tar -xvf go1.10.3.linux-amd64.tar.gz -C /usr/local ENV GOROOT=/usr/local/go ENV PATH=$PATH:/usr/local/go/bin RUN mkdir -p /golang/src RUN mkdir -p /golang/bin ENV GOPATH=/golang ENV GOBIN=$GOPATH/bin ENV PATH=$PATH:$GOBIN RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh RUN mkdir -p /golang/src/config-mutator WORKDIR /golang/src/config-mutator COPY Gopkg.lock Gopkg.toml ./ COPY vendor ./vendor COPY main.go ./ RUN dep check RUN go build FROM ubuntu:16.04 RUN apt-get update COPY --from=builder /golang/src/config-mutator/config-mutator /config-mutator CMD ["/config-mutator"] <file_sep>/config_mutator_webhook/scripts/delete_k8s_resources.sh #!/usr/bin/env bash set -e kubectl delete csr/config-mutator.default deployments/config-mutator-deployment configmaps/mutator-config mutatingwebhookconfiguration/config-mutator-cfg svc/config-mutator configmaps/mutating-demo-configmap
f3806e06cf6d567f7b251d16586ce84c6ad1da86
[ "Markdown", "Go", "Dockerfile", "Shell" ]
21
Go
cvgw/k8s_admission_webhooks
0153978cebae41ed110995e9efb24f509939b236
cca718fb02823fe8196193f3e1443788615afd2f
refs/heads/master
<repo_name>huyserp/calculator<file_sep>/scripts/calc.js const numDisplay = document.querySelector('.numdisplay'); function checkDisplayLength() { let displayLength = numDisplay.textContent; if(displayLength.length > 7){ numDisplay.textContent = displayLength.slice(0, 8); }; }; let numArr = []; let latestOperator; ////////////////////////////////////////////////// ///////////////// Number Buttons ///////////////// ////////////////////////////////////////////////// const btnZero = document.querySelector('.zero') btnZero.addEventListener('click', () => { numDisplay.textContent += btnZero.textContent; checkDisplayLength(); }); const btnPoint = document.querySelector('.point'); btnPoint.addEventListener('click', () => { if (numDisplay.textContent.includes('.')) { return; } else { numDisplay.textContent += btnPoint.textContent; }; checkDisplayLength(); }); const btnOne = document.querySelector('.one'); btnOne.addEventListener('click', () => { numDisplay.textContent += btnOne.textContent; checkDisplayLength(); }); const btnTwo = document.querySelector('.two'); btnTwo.addEventListener('click', () => { numDisplay.textContent += btnTwo.textContent; checkDisplayLength(); }); const btnThree = document.querySelector('.three'); btnThree.addEventListener('click', () => { numDisplay.textContent += btnThree.textContent; checkDisplayLength(); }); const btnFour = document.querySelector('.four'); btnFour.addEventListener('click', () => { numDisplay.textContent += btnFour.textContent; checkDisplayLength(); }); const btnFive = document.querySelector('.five'); btnFive.addEventListener('click', () => { numDisplay.textContent += btnFive.textContent; checkDisplayLength(); }); const btnSix = document.querySelector('.six'); btnSix.addEventListener('click', () => { numDisplay.textContent += btnSix.textContent; checkDisplayLength(); }); const btnSeven = document.querySelector('.seven'); btnSeven.addEventListener('click', () => { numDisplay.textContent += btnSeven.textContent; checkDisplayLength(); }); const btnEight = document.querySelector('.eight'); btnEight.addEventListener('click', () => { numDisplay.textContent += btnEight.textContent; checkDisplayLength(); }); const btnNine = document.querySelector('.nine'); btnNine.addEventListener('click', () => { numDisplay.textContent += btnNine.textContent; checkDisplayLength(); }); document.addEventListener('keydown', useKeyboard); function useKeyboard(e) { if(e.key === '1' || e.key === '2' || e.key === '3' || e.key === '4' || e.key === '5' || e.key === '6' || e.key === '7' || e.key === '8' || e.key === '9' || e.key === '.') { numDisplay.textContent += `${e.key}`; } else { return; }; checkDisplayLength(); }; /////////////////////////////////////////////////// ///////////////// Control Buttons ///////////////// /////////////////////////////////////////////////// function clearDisplay() { numDisplay.textContent = ''; } function clearAll() { numArr = []; } const btnClear = document.querySelector('.clear'); btnClear.addEventListener('click', () => { clearDisplay(); clearAll(); }); const btnBackspace = document.querySelector('.backspace'); btnBackspace.addEventListener('click', goBackspace); function goBackspace() { let del = numDisplay.textContent; let oneLess = del.substring(0, del.length - 1); numDisplay.textContent = oneLess; }; const btnPlusMinus = document.querySelector('.plusminus'); btnPlusMinus.addEventListener('click', () => { let flip = numDisplay.textContent; if (!flip.includes('-')) { let oppSign = '-' + flip; numDisplay.textContent = oppSign; } else { let oppSign = flip.substring(1, flip.length); numDisplay.textContent = oppSign; }; }); //////////////////////////////////////////////////// ///////////////// Operator Buttons ///////////////// //////////////////////////////////////////////////// const btnDivide = document.querySelector('#divide'); btnDivide.addEventListener('click', () => { latestOperator = btnDivide.textContent; numArr.push(+numDisplay.textContent); divide(); }); const btnMultiply = document.querySelector('#multiply'); btnMultiply.addEventListener('click', () => { latestOperator = btnMultiply.textContent; numArr.push(+numDisplay.textContent); multiply(); }); const btnSubtract = document.querySelector('#subtract'); btnSubtract.addEventListener('click', () => { latestOperator = btnSubtract.textContent; numArr.push(+numDisplay.textContent); subtract(); }); const btnAdd = document.querySelector('#add'); btnAdd.addEventListener('click', () => { latestOperator = btnAdd.textContent; numArr.push(+numDisplay.textContent); add(); }); const btnEquals = document.querySelector('.equals'); btnEquals.addEventListener('click', () => { numArr.push(+numDisplay.textContent); equals(); }); function add() { if (numArr[1]) { let sum = numArr[0] + numArr[1]; numArr = []; numArr.push(sum); numDisplay.textContent = ''; curbLongAnswer(); } else { numDisplay.textContent = ''; }; }; function subtract() { if (numArr[1]) { let dif = numArr[0] - numArr[1]; numArr = []; numArr.push(dif); numDisplay.textContent = ''; curbLongAnswer(); } else { numDisplay.textContent = ''; }; }; function multiply() { if (numArr[1]) { let product = numArr[0] * numArr[1]; numArr = []; numArr.push(product); numDisplay.textContent = ''; curbLongAnswer(); } else { numDisplay.textContent = ''; }; }; function divide() { if (numArr[1] && numArr[0] !== 0 && numArr[1] !== 0) { let product = numArr[0] / numArr[1]; numArr = []; numArr.push(product); numDisplay.textContent = ''; curbLongAnswer(); } else if (numArr[0] === 0 || numArr[1] === 0) { numArr[0] = "NOPE!"; } else { numDisplay.textContent = ''; }; }; function equals() { if(!latestOperator) { return; } else if(latestOperator === "+") { add(); numDisplay.textContent = numArr[0]; curbLongAnswer(); clearAll(); } else if (latestOperator === "-") { subtract(); numDisplay.textContent = numArr[0]; curbLongAnswer(); clearAll(); } else if (latestOperator === "x") { multiply(); numDisplay.textContent = numArr[0]; curbLongAnswer(); clearAll(); } else if (latestOperator === "÷") { divide(); numDisplay.textContent = numArr[0]; curbLongAnswer(); clearAll(); }; }; function curbLongAnswer() { let answer = numDisplay.textContent; if(parseFloat(answer) < 1 && answer.length > 7){ numDisplay.textContent = parseFloat(answer).toFixed(7); } else if(parseInt(answer) > 1 && answer.length > 7){ numDisplay.textContent = parseInt(answer).toExponential(3); }; }; function checkForStringOp() { // if (NumArr[1] && an operator button was just pushed){ // numArr[0] = numArr[1]; // numArr.pop(1); // continue with rest of function...or something like that };
d724bec49e47357478769c3eb87b793fa1f1daf6
[ "JavaScript" ]
1
JavaScript
huyserp/calculator
d8f774ec615321518612333c30ab8ea36501e733
c6af9a161ccb4eab32ff7a121cd542826b11ec2c
refs/heads/master
<repo_name>szager/chrome-blink-automerger<file_sep>/history_rewrite_scripts/config.py # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. AUTOMERGER_NAME = 'Chromium+Blink automerger' AUTOMERGER_EMAIL = '<EMAIL>' BLINK_REPO_URL = 'https://chromium.googlesource.com/chromium/blink.git' CHROMIUM_REPO_URL = 'https://chromium.googlesource.com/chromium/src.git' # 'ref/in/chromium' -> 'ref/in/blink' BRANCHES_TO_MERGE = [ ('refs/heads/master', 'refs/heads/master'), ('refs/branch-heads/2214', 'refs/branch-heads/chromium/2214'), ('refs/branch-heads/2272', 'refs/branch-heads/chromium/2272'), ('refs/branch-heads/2311', 'refs/branch-heads/chromium/2311'), ] MERGE_MSG = """Merge Chromium + Blink git repositories Chromium SHA1: %(chromium_sha)s Chromium position: %(chromium_branch)s@{#%(chromium_pos)s} Blink SHA1: %(blink_sha)s Blink revision: %(blink_branch)s@%(blink_rev)s BUG=431458 Cr-Commit-Position: %(chromium_branch)s@{#%(chromium_next_pos)s} """
b5d33a6a63935964288a2e0cc90949e3bdceeb67
[ "Python" ]
1
Python
szager/chrome-blink-automerger
84cafad8f7e188163ff794eaf02443ccff4259ca
c2c882a2a4c3ecf7696ef482fba6273d2d0628c0
refs/heads/master
<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh # | python | go | ruby | js | php #python | + | + | + | + | + | #go | + | + | + | + | + | #ruby | + | + | + | + | + | #js | + | + | + | + | + | #php | + | + | + | + | + | # GO <--> RUBY echo ".. testing SECURE CELL, SEAL MODE, go <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passw1" `go run ./tools/go/scell_seal_string_echo.go "enc" "passw1" "go-ruby test"` check_result_zero echo ".. testing SECURE CELL, SEAL MODE, ruby <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passw3" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passw3" "ruby-go test"` check_result_zero ## with context echo ".. testing SECURE CELL, SEAL MODE CONTEXT, go <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passw2" `go run ./tools/go/scell_seal_string_echo.go "enc" "passw2" "go-ruby with context" "somecontext"` "somecontext" check_result_zero echo ".. testing SECURE CELL, SEAL MODE CONTEXT, ruby <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passw4" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passw4" "ruby-go with context" "somecontext"` "somecontext" check_result_zero # GO <--> NODE echo ".. testing SECURE CELL, SEAL MODE, go <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passw1" `go run ./tools/go/scell_seal_string_echo.go "enc" "passw1" "go->node test"` check_result_zero echo ".. testing SECURE CELL, SEAL MODE, node <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passw3" `node ./tools/js/scell_seal_string_echo.js "enc" "passw3" "node->go test"` check_result_zero ## with context echo ".. testing SECURE CELL, SEAL MODE CONTEXT, go <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passw2" `go run ./tools/go/scell_seal_string_echo.go "enc" "passw2" "go->node with context" "somecontext"` "somecontext" check_result_zero echo ".. testing SECURE CELL, SEAL MODE CONTEXT, node <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passw4" `node ./tools/js/scell_seal_string_echo.js "enc" "passw4" "node->go with context" "somecontext"` "somecontext" check_result_zero # GO <--> PHP echo ".. testing SECURE CELL, SEAL MODE, go <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passw1" `go run ./tools/go/scell_seal_string_echo.go "enc" "passw1" "go->php test"` check_result_zero echo ".. testing SECURE CELL, SEAL MODE, php <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passw3" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passw3" "php->go test"` check_result_zero ## with context echo ".. testing SECURE CELL, SEAL MODE CONTEXT, go <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passw2" `go run ./tools/go/scell_seal_string_echo.go "enc" "passw2" "go->php with context" "somecontext"` "somecontext" check_result_zero echo ".. testing SECURE CELL, SEAL MODE CONTEXT, php <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passw4" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passw4" "php->go with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> RUBY echo ".. testing secure cell, seal mode, ruby <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passwd" "ruby->python seal"` check_result_zero echo ".. testing secure cell, seal mode, python <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->ruby seal"` check_result_zero ## with context echo ".. testing secure cell, seal mode context, ruby <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passwd" "ruby->python seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, seal mode context, python <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->ruby seal with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> NODE echo ".. testing secure cell, seal mode, node <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `node ./tools/js/scell_seal_string_echo.js "enc" "passwd" "node->python seal"` check_result_zero echo ".. testing secure cell, seal mode, python <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->node seal"` check_result_zero ## with context echo ".. testing secure cell, seal mode context, node <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `node ./tools/js/scell_seal_string_echo.js "enc" "passwd" "node->python seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, seal mode context, python <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->node seal with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> PHP echo ".. testing secure cell, seal mode, php <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->python seal"` check_result_zero echo ".. testing secure cell, seal mode, python <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->php seal"` check_result_zero ## with context echo ".. testing secure cell, seal mode context, php <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->python seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, seal mode, python <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->php seal with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> GO echo ".. testing secure cell, seal mode, go <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `go run ./tools/go/scell_seal_string_echo.go "enc" "passwd" "go->python seal"` check_result_zero echo ".. testing secure cell, seal mode, python <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->go seal"` check_result_zero ## with context echo ".. testing secure cell, seal mode context, go <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passwd" `go run ./tools/go/scell_seal_string_echo.go "enc" "passwd" "go->python seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, seal mode context, python <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passwd" `python ./tools/python/scell_seal_string_echo.py "enc" "passwd" "python->go seal with context" "somecontext"` "somecontext" check_result_zero # PHP <--> RUBY echo ".. testing secure cell, ruby <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passwd" "ruby->php seal"` check_result_zero echo ".. testing secure cell, php <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->ruby seal"` check_result_zero ## with context echo ".. testing secure cell context, ruby <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passwd" "ruby->php seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell context, php <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->ruby seal with context" "somecontext"` "somecontext" check_result_zero ## NODE <--> RUBY echo ".. testing secure cell, seal mode, ruby <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passwd" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passwd" "ruby->node seal"` check_result_zero echo ".. testing secure cell, seal mode, node <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passwd" `node ./tools/js/scell_seal_string_echo.js "enc" "passwd" "node->ruby seal"` check_result_zero ## with context echo ".. testing secure cell, seal mode context, ruby <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passwd" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passwd" "ruby->node seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, seal mode context, node <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passwd" `node ./tools/js/scell_seal_string_echo.js "enc" "passwd" "node->ruby seal with context" "somecontext"` "somecontext" check_result_zero ## NODE <--> PHP echo ".. testing secure cell, seal mode, php <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->node seal"` check_result_zero echo ".. testing secure cell, seal mode, node <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `node ./tools/js/scell_seal_string_echo.js "enc" "passwd" "node->php seal"` check_result_zero ## with context echo ".. testing secure cell, seal mode context, php <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->node seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, seal mode context, node <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `node ./tools/js/scell_seal_string_echo.js "enc" "passwd" "node->php seal with context" "somecontext"` "somecontext" check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh # | python | go | ruby | js | php #python | + | + | + | + | + | #go | + | + | + | + | + | #ruby | + | + | + | + | + | #js | + | + | + | + | + | #php | + | + | + | + | + | # NODE <-> RUBY echo ".. testing secure cell, context imprint mode, node <--> ruby" ruby ./tools/ruby/scell_context_string_echo.rb "dec" "passwd" `node ./tools/js/scell_context_string_echo.js "enc" "passwd" "node->ruby with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, ruby <--> node" node ./tools/js/scell_context_string_echo.js "dec" "passwd" `ruby ./tools/ruby/scell_context_string_echo.rb "enc" "passwd" "ruby->node with context" "somecontext"` "somecontext" check_result_zero # PHP <--> RUBY echo ".. testing secure cell, context imprint mode, php <--> ruby" ruby ./tools/ruby/scell_context_string_echo.rb "dec" "passwd" `php -f ./tools/php/scell_context_string_echo.php "enc" "passwd" "php->ruby with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, ruby <--> php" php -f ./tools/php/scell_context_string_echo.php "dec" "passwd" `ruby ./tools/ruby/scell_context_string_echo.rb "enc" "passwd" "ruby->php with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> RUBY echo ".. testing secure cell, context imprint mode, python <--> ruby" ruby ./tools/ruby/scell_context_string_echo.rb "dec" "passwd" `python ./tools/python/scell_context_string_echo.py "enc" "passwd" "python->ruby with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, ruby <--> python" python ./tools/python/scell_context_string_echo.py "dec" "passwd" `ruby ./tools/ruby/scell_context_string_echo.rb "enc" "passwd" "ruby->python with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> NODE echo ".. testing secure cell, context imprint mode, python <--> node" node ./tools/js/scell_context_string_echo.js "dec" "passwd" `python ./tools/python/scell_context_string_echo.py "enc" "passwd" "python->node with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, node <--> python" python ./tools/python/scell_context_string_echo.py "dec" "passwd" `node ./tools/js/scell_context_string_echo.js "enc" "passwd" "node->python with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> PHP echo ".. testing secure cell, context imprint mode, python <--> php" php -f ./tools/php/scell_context_string_echo.php "dec" "passwd" `python ./tools/python/scell_context_string_echo.py "enc" "passwd" "python->php with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, php <--> python" python ./tools/python/scell_context_string_echo.py "dec" "passwd" `php -f ./tools/php/scell_context_string_echo.php "enc" "passwd" "php->python with context" "somecontext"` "somecontext" check_result_zero # PYTHON <--> GO echo ".. testing secure cell, context imprint mode, python <--> go" go run ./tools/go/scell_context_string_echo.go "dec" "passwd" `python ./tools/python/scell_context_string_echo.py "enc" "passwd" "python->go with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, go <--> python" python ./tools/python/scell_context_string_echo.py "dec" "passwd" `go run ./tools/go/scell_context_string_echo.go "enc" "passwd" "go->python with context" "somecontext"` "somecontext" check_result_zero # NODE <--> GO echo ".. testing secure cell, context imprint mode, node <--> go" go run ./tools/go/scell_context_string_echo.go "dec" "passwd" `node ./tools/js/scell_context_string_echo.js "enc" "passwd" "node->go with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, go <--> node" node ./tools/js/scell_context_string_echo.js "dec" "passwd" `go run ./tools/go/scell_context_string_echo.go "enc" "passwd" "go->node with context" "somecontext"` "somecontext" check_result_zero # NODE <--> GO echo ".. testing secure cell, context imprint mode, node <--> php" php -f ./tools/php/scell_context_string_echo.php "dec" "passwd" `node ./tools/js/scell_context_string_echo.js "enc" "passwd" "node->php with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, context imprint mode, php <--> node" node ./tools/js/scell_context_string_echo.js "dec" "passwd" `php -f ./tools/php/scell_context_string_echo.php "enc" "passwd" "php->node with context" "somecontext"` "somecontext" check_result_zero # RUBY <--> GO echo ".. testing SECURE CELL, CONTEXT IMPRINT MODE, go <--> ruby" ruby ./tools/ruby/scell_context_string_echo.rb "dec" "passw2" `go run ./tools/go/scell_context_string_echo.go "enc" "passw2" "go-ruby with context" "somecontext"` "somecontext" check_result_zero echo ".. testing SECURE CELL, CONTEXT IMPRINT MODE, ruby <--> go" go run ./tools/go/scell_context_string_echo.go "dec" "passw4" `ruby ./tools/ruby/scell_context_string_echo.rb "enc" "passw4" "ruby-go with context" "somecontext"` "somecontext" check_result_zero # PHP <--> GO echo ".. testing SECURE CELL, CONTEXT IMPRINT MODE, go <--> php" php -f ./tools/php/scell_context_string_echo.php "dec" "passw2" `go run ./tools/go/scell_context_string_echo.go "enc" "passw2" "go-php with context" "somecontext"` "somecontext" check_result_zero echo ".. testing SECURE CELL, CONTEXT IMPRINT MODE, php <--> go" go run ./tools/go/scell_context_string_echo.go "dec" "passw4" `php -f ./tools/php/scell_context_string_echo.php "enc" "passw4" "php-go with context" "somecontext"` "somecontext" check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh echo ".. testing secure cell seal, ruby <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passr" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passr" "ruby seal test"` check_result_zero echo ".. testing secure cell seal context, ruby <--> ruby" ruby ./tools/ruby/scell_seal_string_echo.rb "dec" "passr" `ruby ./tools/ruby/scell_seal_string_echo.rb "enc" "passr" "ruby seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell context imprint, ruby <--> ruby" ruby ./tools/ruby/scell_context_string_echo.rb "dec" "passw2" `ruby ./tools/ruby/scell_context_string_echo.rb "enc" "passw2" "ruby context with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell token protect, ruby <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passw1" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passw1" "ruby token test"` check_result_zero echo ".. testing secure cell token protect context, ruby <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passw2" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passw2" "ruby token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure message encryption, ruby <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby secure message"` check_result_zero echo ".. testing secure message signing, ruby <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby secure message"` check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh echo ".. testing secure cell seal, go <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passg" `go run ./tools/go/scell_seal_string_echo.go "enc" "passg" "go seal test"` check_result_zero echo ".. testing secure cell seal context, go <--> go" go run ./tools/go/scell_seal_string_echo.go "dec" "passg" `go run ./tools/go/scell_seal_string_echo.go "enc" "passg" "go seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell context imprint, go <--> go" go run ./tools/go/scell_context_string_echo.go "dec" "passg" `go run ./tools/go/scell_context_string_echo.go "enc" "passg" "go context with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell token protect, go <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passg" `go run ./tools/go/scell_token_string_echo.go "enc" "passg" "go token test"` check_result_zero echo ".. testing secure cell token protect context, go <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passg" `go run ./tools/go/scell_token_string_echo.go "enc" "passg" "go token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure message encryption, go <--> go" go run ./tools/go/smessage_encryption.go "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go secure message"` check_result_zero echo ".. testing secure message signing, go <--> go" go run ./tools/go/smessage_encryption.go "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go secure message"` check_result_zero exit ${status}<file_sep># Themis ChangeLog ## [0.9.6](https://github.com/cossacklabs/themis/releases/tag/0.9.6), December 14th 2017 **TL;DR:** OpenSSL 1.1 support. _Docs:_ - Significant update of the [Contributing section](https://github.com/cossacklabs/themis/wiki/Contribute) in Wiki. _Infrastructure:_ - Removed support for _Ubuntu Precise_. - Fixed `.rpm` package versioning ([#240](https://github.com/cossacklabs/themis/pull/240)). - Added a handy command for preparing and running of all the tests `make test` ([#243](https://github.com/cossacklabs/themis/issues/243)). - Added small changes and updates into [Makefile](https://github.com/cossacklabs/themis/blob/master/Makefile) to make it even better and fixed the installing dependencies ([#236](https://github.com/cossacklabs/themis/pull/236), [#239](https://github.com/cossacklabs/themis/pull/239), [#250](https://github.com/cossacklabs/themis/pull/250)). _Code:_ - **Core:** - added OpenSSL 1.1 support ([#208](https://github.com/cossacklabs/themis/issues/208)). - **Android wrapper**: - fixed Secure Cell in token protect mode ([#251](https://github.com/cossacklabs/themis/pull/251)); - fixed casting warnings in JNI code ([#246](https://github.com/cossacklabs/themis/pull/246)). - **iOS wrapper:** - updated wrapper to be compatible with Swift4 ([#230](https://github.com/cossacklabs/themis/issues/230)); - added nullability support ([#255](https://github.com/cossacklabs/themis/pull/255)); - made the NSError autoreleasing ([#257](https://github.com/cossacklabs/themis/pull/257), [#259](https://github.com/cossacklabs/themis/pull/259)) from [@valeriyvan](https://github.com/valeriyvan); - fixed warnings that appeared due to renaming `error.h` files ([#247](https://github.com/cossacklabs/themis/pull/247)); - updated and refactored tests ([#231](https://github.com/cossacklabs/themis/pull/231), [#232](https://github.com/cossacklabs/themis/pull/232)). - **GoThemis:** - added compatibility with old Go (1.2) ([#253](https://github.com/cossacklabs/themis/issues/253)); - fixed tests ([#261](https://github.com/cossacklabs/themis/pull/261)). - **JSThemis:** - fixed installation path for macOS ([#237](https://github.com/cossacklabs/themis/issues/237), [#238](https://github.com/cossacklabs/themis/pull/238/)). - **PyThemis:** - fixed compatibility with version 0.9.5 ([#241](https://github.com/cossacklabs/themis/pull/241)), pushed as a separate package [0.9.5.1](https://pypi.python.org/pypi/pythemis/0.9.5.1). ## [0.9.5](https://github.com/cossacklabs/themis/releases/tag/0.9.5), September 13th 2017 **TL;DR:** Mostly usability fixes for wrappers. _Infrastructure:_ - You can now download pre-built Themis packages from **our package server**. - Enhanced building process for **MacOS** (working now!) ([#215](https://github.com/cossacklabs/themis/issues/215)). - Enhanced building process for **Debian 9.x** (working even better now!). - Updated documentation and examples to make it easier to understand. - Now we use Bitrise as a separate CI for iOS wrapper. - Test and code coverage are automagically measured now! _Code:_ - **Core:** disabled SHA1 support. - **Secure Comparator:** magically improved code readability ([#196](https://github.com/cossacklabs/themis/issues/196), [#195](https://github.com/cossacklabs/themis/issues/195)). - **iOS wrapper:** added support of dynamic frameworks and bitcode ([#222](https://github.com/cossacklabs/themis/issues/222), [#219](https://github.com/cossacklabs/themis/issues/219), [#205](https://github.com/cossacklabs/themis/issues/205)). - **GoThemis:** refactored custom error (`themisError`) type. - **PHP wrapper:** updated tests. - **PyThemis:** considerably improved example projects. ## [0.9.4](https://github.com/cossacklabs/themis/releases/tag/0.9.4), November 22nd 2016 This is tiny intermediary release to lock ongoing changes in stable form for all languages: * **BoringSSL** support on **Android** and **Linux** * Fixed some leaks and code styling problems (thanks to [@bryongloden](https://github.com/bryongloden)) * Memory management updates for stability in languages, which rely on sloppy GC * Fix Themis build errors under certain conditions * **Secure Comparator** examples for many languages * **Swift3** support + numerous enhancements from [@valeriyvan](https://github.com/valeriyvan), thanks a lot! * **GoThemis**: fixed rare behavior in Secure Session wrapper * GoThemis examples * **JsThemis** syntax corrections and style fixes * JsThemis Nan usage to enhance compatibility * More and better **Themis Server examples** * Enhanced **error messages** (now with proper spelling!) * Corrections for **[RD_Themis](https://github.com/cossacklabs/rd_themis)** ## [0.9.3.1](https://github.com/cossacklabs/themis/releases/tag/0.9.3.1), August 24th 2016 Updating podspec to be compatible with CocoaPods 1.0 ## [0.9.3](https://github.com/cossacklabs/themis/releases/tag/0.9.3), May 24th 2016 _Infrastructure_: * Lots of new high-level language wrappers * Enhanced **[documentation](https://github.com/cossacklabs/themis/wiki)** * Lots of various demo projects * Updated **[Themis Server](https://themis.cossacklabs.com)** * Better **make** system verbosity (now you can actually see what succeeded and what didn't) * Infrastructure to **build Java** on all platforms _Code_: * **iOS wrapper** now has umbrella header. * We added **Swift** language [examples](https://github.com/cossacklabs/themis/tree/master/docs/examples/swift) and [howto](https://github.com/cossacklabs/themis/wiki/Swift-Howto). * Themis wrapper for **Go** language: [howto](https://github.com/cossacklabs/themis/wiki/Go-HowTo) (examples coming soon). * Themis wrapper for **NodeJS**: [examples](https://github.com/cossacklabs/themis/tree/master/docs/examples/nodejs) and [howto](https://github.com/cossacklabs/themis/wiki/NodeJS-Howto). * Google Chrome-friendly spin-off called [WebThemis](https://github.com/cossacklabs/webthemis) was released. * Themis wrapper for **C++**: [examples](https://github.com/cossacklabs/themis/tree/master/docs/examples/c%2B%2B) and [howto](https://github.com/cossacklabs/themis/wiki/CPP-Howto). * **[Secure Comparator](https://www.cossacklabs.com/files/secure-comparator-paper-rev12.pdf)** got [serious updates](https://cossacklabs.com/fixing-secure-comparator.html) to eliminate possible security drawbacks pointed out by cryptographic community. ## [0.9.2](https://github.com/cossacklabs/themis/releases/tag/0.9.2), November 4th 2015 _Infrastructure_: - **Much better documentation** - We've introduced **Themis Server**, interactive environment to debug your apps and learn how Themis works. - **Tests** for all platforms and languages. - Themis is now integrated with **Circle CI**, with controls every repository change and tests it - Added **conditional compilation for advanced features** (see 4.5 and our blog for more information) - **Doxygen**-friendly comments in code _Code_: - **Python Themis wrapper** is now Python 3 / PEP friendly. - **Android Themis wrapper** for Secure Message now works in Sign/Verify mode, too. - **PHP Themis** wrapper now supports Secure Session (although with some advice on use cases, see docs). - **iOS wrapper** supports iOS 9, lots of minor fixes. - **Better exceptions** and verbose errors in some wrappers. - **Longer RSA keys** support - **Better abstractions for cryptosystem parameters** like key lengths. - **Zero Knowledge Proof-based authentication** called Secure Comparator. Advanced experimental feature. <file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh echo ".. testing secure cell seal, python <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passr" `python ./tools/python/scell_seal_string_echo.py "enc" "passr" "python seal test"` check_result_zero echo ".. testing secure cell seal context, python <--> python" python ./tools/python/scell_seal_string_echo.py "dec" "passr" `python ./tools/python/scell_seal_string_echo.py "enc" "passr" "python seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell context imprint, python <--> python" python ./tools/python/scell_context_string_echo.py "dec" "passw2" `python ./tools/python/scell_context_string_echo.py "enc" "passw2" "python context with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell token protect, python <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passw1" `python ./tools/python/scell_token_string_echo.py "enc" "passw1" "python token test"` check_result_zero echo ".. testing secure cell token protect context, python <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passw2" `python ./tools/python/scell_token_string_echo.py "enc" "<PASSWORD>" "python token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure message encryption, python <--> python" python ./tools/python/smessage_encryption.py "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python secure message"` check_result_zero echo ".. testing secure message signing, python <--> python" python ./tools/python/smessage_encryption.py "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python secure message"` check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh # | python | go | ruby | js | php #python | + | + | + | + | + | #go | + | + | + | + | + | #ruby | + | + | + | + | + | #js | + | + | + | + | + | #php | + | + | + | + | + | ## NODE <--> RUBY echo ".. testing secure cell, token protect mode, node <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "node->ruby token test"` check_result_zero echo ".. testing secure cell, token protect mode, ruby <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->node token test"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, node <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "node->ruby token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, ruby <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->node token with context" "somecontext"` "somecontext" check_result_zero ## GO <--> RUBY echo ".. testing secure cell, token protect mode, go <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->ruby token test"` check_result_zero echo ".. testing secure cell, token protect mode, ruby <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->go token test"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, go <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->ruby token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, ruby <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->go token with context" "somecontext"` "somecontext" check_result_zero ## GO <--> NODE echo ".. testing secure cell, token protect mode, node <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "node->go token"` check_result_zero echo ".. testing secure cell, token protect mode, go <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->node token"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, node <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "node->go token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, go <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->node token with context" "somecontext"` "somecontext" check_result_zero ## NODE <--> PHP echo ".. testing secure cell, token protect mode, node <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "php->node token"` check_result_zero echo ".. testing secure cell, token protect mode, php <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "node->php token"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, node <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "php->node token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, php <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "node->php token with context" "somecontext"` "somecontext" check_result_zero ## NODE <--> PYTHON echo ".. testing secure cell, token protect mode, node <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "python->node token"` check_result_zero echo ".. testing secure cell, token protect mode, python <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "node->python token"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, node <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `node ./tools/js/scell_token_string_echo.js "enc" "passwd" "python->node token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, python <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "node->python token with context" "somecontext"` "somecontext" check_result_zero ## PHP <--> RUBY echo ".. testing secure cell, token protect mode, php <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "php->ruby token test"` check_result_zero echo ".. testing secure cell, token protect mode, ruby <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->php token test"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, php <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "php->ruby token test with content" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, ruby <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->php token test with context" "somecontext"` "somecontext" check_result_zero ## PHP <--> GO echo ".. testing secure cell, token protect mode, php <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "php->go token"` check_result_zero echo ".. testing secure cell, token protect mode, go <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->php token"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, php <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "php->go token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, go <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->php token with context" "somecontext"` "somecontext" check_result_zero ## PYTHON <--> RUBY echo ".. testing secure cell, token protect mode, python <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "python->ruby token test"` check_result_zero echo ".. testing secure cell, token protect mode, ruby <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->python token test"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, python <--> ruby" ruby ./tools/ruby/scell_token_string_echo.rb "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "python->ruby with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, ruby <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `ruby ./tools/ruby/scell_token_string_echo.rb "enc" "passwd" "ruby->python with context" "somecontext"` "somecontext" check_result_zero ## PYTHON <--> GO echo ".. testing secure cell, token protect mode, python <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "python->go token"` check_result_zero echo ".. testing secure cell, token protect mode, go <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->python token"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, python <--> go" go run ./tools/go/scell_token_string_echo.go "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "python->go token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, go <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `go run ./tools/go/scell_token_string_echo.go "enc" "passwd" "go->python token with context" "somecontext"` "somecontext" check_result_zero ## PYTHON <--> PHP echo ".. testing secure cell, token protect mode, python <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "php->python token"` check_result_zero echo ".. testing secure cell, token protect mode, php <--> python" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "python->php token"` check_result_zero ## with context echo ".. testing secure cell, token protect mode context, python <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `python ./tools/python/scell_token_string_echo.py "enc" "passwd" "php->python token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell, token protect mode context, ph <--> pythonp" python ./tools/python/scell_token_string_echo.py "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "python->php token with context" "somecontext"` "somecontext" check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh echo ".. test js" sh ./tests/_integration/integration_js.sh check_result_zero echo ".. test python" sh ./tests/_integration/integration_python.sh check_result_zero echo ".. test php" sh ./tests/_integration/integration_php.sh check_result_zero echo ".. test ruby" sh ./tests/_integration/integration_ruby.sh check_result_zero echo ".. test go" sh ./tests/_integration/integration_go.sh check_result_zero echo ".. test cell context imprint" sh ./tests/_integration/integration_scell_context_imprint.sh check_result_zero echo ".. test cell seal" sh ./tests/_integration/integration_scell_seal.sh check_result_zero echo ".. test cell token protect" sh ./tests/_integration/integration_scell_token_protect.sh check_result_zero echo ".. test message encryption" sh ./tests/_integration/integration_smessage_encryption.sh check_result_zero echo ".. test message signing" sh ./tests/_integration/integration_smessage_signing.sh check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh # | python | go | ruby | js | php #python | + | + | + | + | + | #go | + | + | + | + | + | #ruby | + | + | + | + | + | #js | + | + | + | + | + | #php | + | + | + | + | + | # RUBY <--> NODE echo ".. testing secure message, node <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> ruby secure message"` check_result_zero echo ".. testing secure message, ruby <--> node" node ./tools/js/smessage_encryption.js "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> node secure message"` check_result_zero # NODE <--> GO echo ".. testing secure message, node <--> go" go run ./tools/go/smessage_encryption.go "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> go secure message"` check_result_zero echo ".. testing secure message, go <--> node" node ./tools/js/smessage_encryption.js "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> node secure message"` check_result_zero # PHP <--> NODE echo ".. testing secure message, node <--> php" php -f ./tools/php/smessage_encryption.php "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> php secure message"` check_result_zero echo ".. testing secure message, php <--> node" node ./tools/js/smessage_encryption.js "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> node secure message"` check_result_zero # PYTHON <--> NODE echo ".. testing secure message, node <--> python" python ./tools/python/smessage_encryption.py "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> python secure message"` check_result_zero echo ".. testing secure message, python <--> node" node ./tools/js/smessage_encryption.js "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> node secure message"` check_result_zero # RUBY <--> PHP echo ".. testing secure message, php <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> ruby secure message"` check_result_zero echo ".. testing secure message, ruby <--> php" php -f ./tools/php/smessage_encryption.php "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> php secure message"` check_result_zero # GO <--> PHP echo ".. testing secure message, php <--> go" go run ./tools/go/smessage_encryption.go "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> go secure message"` check_result_zero echo ".. testing secure message, go <--> php" php -f ./tools/php/smessage_encryption.php "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> php secure message"` check_result_zero # GO <--> PYTHON echo ".. testing secure message, go <--> python" python ./tools/python/smessage_encryption.py "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> python secure message"` check_result_zero echo ".. testing secure message, python <--> go" go run ./tools/go/smessage_encryption.go "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> go secure message"` check_result_zero # RUBY <--> PYTHON echo ".. testing secure message, python <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> ruby secure message"` check_result_zero echo ".. testing secure message, ruby <--> python" python ./tools/python/smessage_encryption.py "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> python secure message"` check_result_zero # PYTHON <--> PHP echo ".. testing secure message, python <--> php" php -f ./tools/php/smessage_encryption.php "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> php secure message"` check_result_zero echo ".. testing secure message, php <--> python" python ./tools/python/smessage_encryption.py "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> python secure message"` check_result_zero # RUBY <--> GO echo ".. testing secure message, go <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> python secure message"` check_result_zero echo ".. testing secure message, ruby <--> go" go run ./tools/go/smessage_encryption.go "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> go secure message"` check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh # PHP <-> PHP echo ".. testing secure cell seal, php <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->php seal"` check_result_zero echo ".. testing secure cell seal context, php <--> php" php -f ./tools/php/scell_seal_string_echo.php "dec" "passwd" `php -f ./tools/php/scell_seal_string_echo.php "enc" "passwd" "php->php seal with context" "context"` "context" check_result_zero echo ".. testing secure cell context imprint, php <--> php" php -f ./tools/php/scell_context_string_echo.php "dec" "passwd" `php -f ./tools/php/scell_context_string_echo.php "enc" "passwd" "php->php seal context message" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell token protect, php <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "php->php token"` check_result_zero echo ".. testing secure cell token protect context, php <--> php" php -f ./tools/php/scell_token_string_echo.php "dec" "passwd" `php -f ./tools/php/scell_token_string_echo.php "enc" "passwd" "php->php token with context" "context"` "context" check_result_zero echo ".. testing secure message encryption, php <--> php" php -f ./tools/php/smessage_encryption.php "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php secure message"` check_result_zero echo ".. testing secure message signing, php <--> php" php -f ./tools/php/smessage_encryption.php "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php secure message"` check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh # | python | go | ruby | js | php #python | + | + | + | + | + | #go | + | + | + | + | + | #ruby | + | + | + | + | + | #js | + | + | + | + | + | #php | + | + | + | + | + | # NODE <--> RUBY echo ".. testing secure message, node <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> ruby secure message"` check_result_zero echo ".. testing secure message, ruby <--> node" node ./tools/js/smessage_encryption.js "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> node secure message"` check_result_zero # NODE <--> GO echo ".. testing secure message, node <--> go" go run ./tools/go/smessage_encryption.go "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> go secure message"` check_result_zero echo ".. testing secure message, go <--> node" node ./tools/js/smessage_encryption.js "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> node secure message"` check_result_zero # NODE <--> PHP echo ".. testing secure message, node <--> php" php -f ./tools/php/smessage_encryption.php "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> php secure message"` check_result_zero echo ".. testing secure message, php <--> node" node ./tools/js/smessage_encryption.js "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> node secure message"` check_result_zero # NODE <--> PYTHON echo ".. testing secure message, node <--> python" python ./tools/python/smessage_encryption.py "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node -> python secure message"` check_result_zero echo ".. testing secure message, python <--> node" node ./tools/js/smessage_encryption.js "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> node secure message"` check_result_zero # RUBY <--> PHP echo ".. testing secure message, php <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> ruby secure message"` check_result_zero echo ".. testing secure message, ruby <--> php" php -f ./tools/php/smessage_encryption.php "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> php secure message"` check_result_zero # PHP <--> GO echo ".. testing secure message, php <--> go" go run ./tools/go/smessage_encryption.go "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> go secure message"` check_result_zero echo ".. testing secure message, go <--> php" php -f ./tools/php/smessage_encryption.php "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> php secure message"` check_result_zero # PYTHON <--> GO echo ".. testing secure message, go <--> python" python ./tools/python/smessage_encryption.py "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> python secure message"` check_result_zero echo ".. testing secure message, python <--> go" go run ./tools/go/smessage_encryption.go "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> go secure message"` check_result_zero # PYTHON <--> RUBY echo ".. testing secure message, python <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> ruby secure message"` check_result_zero echo ".. testing secure message, ruby <--> python" python ./tools/python/smessage_encryption.py "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby -> python secure message"` check_result_zero # PYTHON <--> PHP echo ".. testing secure message, python <--> php" php -f ./tools/php/smessage_encryption.php "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `python ./tools/python/smessage_encryption.py "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "python -> php secure message"` check_result_zero echo ".. testing secure message, php <--> python" python ./tools/python/smessage_encryption.py "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `php -f ./tools/php/smessage_encryption.php "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "php -> python secure message"` check_result_zero # GO <--> RUBY echo ".. testing SECURE MESSAGE, go <--> ruby" ruby ./tools/ruby/smessage_encryption.rb "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `go run ./tools/go/smessage_encryption.go "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "go -> python secure message"` check_result_zero echo ".. testing SECURE MESSAGE, ruby <--> go" go run ./tools/go/smessage_encryption.go "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `ruby ./tools/ruby/smessage_encryption.rb "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "ruby secure message"` check_result_zero exit ${status}<file_sep>#!/bin/bash -e # import functions . tests/_integration/utils.sh echo ".. testing secure cell seal, node <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passr" `node ./tools/js/scell_seal_string_echo.js "enc" "passr" "node seal test"` check_result_zero echo ".. testing secure cell seal context, node <--> node" node ./tools/js/scell_seal_string_echo.js "dec" "passr" `node ./tools/js/scell_seal_string_echo.js "enc" "passr" "node seal with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell context imprint, node <--> node" node ./tools/js/scell_context_string_echo.js "dec" "passw2" `node ./tools/js/scell_context_string_echo.js "enc" "passw2" "node context with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure cell token protect, node <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passw1" `node ./tools/js/scell_token_string_echo.js "enc" "passw1" "node token test"` check_result_zero echo ".. testing secure cell token protect context, node <--> node" node ./tools/js/scell_token_string_echo.js "dec" "passw2" `node ./tools/js/scell_token_string_echo.js "enc" "passw2" "node token with context" "somecontext"` "somecontext" check_result_zero echo ".. testing secure message encryption, node <--> node" node ./tools/js/smessage_encryption.js "dec" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "enc" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node secure message"` check_result_zero echo ".. testing secure message signing, node <--> node" node ./tools/js/smessage_encryption.js "verify" "./tests/_integration/keys/server.priv" "./tests/_integration/keys/client.pub" `node ./tools/js/smessage_encryption.js "sign" "./tests/_integration/keys/client.priv" "./tests/_integration/keys/server.pub" "node secure message"` check_result_zero exit ${status}<file_sep>#!/bin/bash -e rm -f composer.json ln -s composer-php7.json composer.json php composer.phar update
3ecb7262787ad7fce51f12af0020b4f60582a821
[ "Markdown", "Shell" ]
13
Shell
mozhmike/themis
df018853251b6c4bb3cb6dd025a58e7a54dcc0b9
4c0ed561de1f93b4f7c6ea4e9632a78bc3a0f9a6
refs/heads/master
<file_sep>from django.db import models class Info(models.Model): name = models.CharField(max_length=200) phone = models.IntegerField(null=True, blank=True) email = models.EmailField() address = models.CharField(max_length=200) photo = models.ImageField() def __str__(self): return self.name
70c7545383f35b3f8f3f1135dae0201b8ff8d7ef
[ "Python" ]
1
Python
zakiradel/myproject
82813c1de00aec387bb6b3ffd81dc5476a659d3f
4975d66be5c403362f266d6101599481ad7c9778
refs/heads/main
<file_sep>import sys import numpy as np import csv import mediapipe as mp import time import glob import cv2 import os import threading # construct the argument parser and parse the arguments # initialize the color descriptor class Indexer: def __init__(self, Outputfile="HAND.csv"): # open the output index file for writing if os.path.exists(Outputfile): os.remove(Outputfile) output = open(Outputfile, "w") # use glob to grab the image paths and loop over them for imagePath in glob.glob("dataset" + ("/*.*g")): print(imagePath) # extract the image ID (i.e. the unique filename) from the image # path and load the image itself imageID = imagePath[imagePath.rfind("/") + 1:] image = cv2.imread(imagePath) _, features = out(image) # describe the image # write the features to file features = [str(f) for f in features] output.write("%s,%s\n" % (imagePath, ",".join(features))) # close the index file output.close() class Searcher: def __init__(self, indexPath): # store our index path self.results=dict() self.indexPath = indexPath with open(self.indexPath) as f: # initialize the CSV reader SList = csv.reader(f) for row in SList: # parse out the image ID and features, then compute the # chi-squared distance between the features in our index # and our query features features = [float(x) for x in row[1:]] self.results[row[0]] = features f.close() #print(self.results) def search(self, queryFeatures, limit=10): RESults=dict() # initialize our dictionary of results # open the index file for reading # initialize the CSV reader # loop over the rows in the index for key,value in self.results.items(): d = self.chi2_distance(value, queryFeatures) # now that we have the distance between the two feature # vectors, we can udpate the results dictionary -- the # key is the current image ID in the index and the # value is the distance we just computed, representing # how 'similar' the image in the index is to our query RESults[key] = d # close the reader # sort our results, so that the smaller distances (i.e. the # more relevant images are at the front of the list) RESults = sorted([(v, k) for (k, v) in RESults.items()]) # return our (limited) results return RESults[0:2] def chi2_distance(self, histA, histB, eps=1e-10): # compute the chi-squared distance d = np.sum([((a - b) ** 2)/ len(histA) #(a + b + eps) for (a, b) in zip(histA, histB)]) # return the chi-squared distance return d mpHands = mp.solutions.hands hands = mpHands.Hands()#,min_detection_confidence=0.9) mpDraw = mp.solutions.drawing_utils # cap = cv2.imread('5.jpg') def out(cap): imgRGB = cv2.cvtColor(cap, cv2.COLOR_BGR2RGB) results = hands.process(imgRGB) # print(results.multi_hand_landmarks) olist = list() if results.multi_hand_landmarks: for handLms in results.multi_hand_landmarks: for id, lm in enumerate(handLms.landmark): # print(id, lm) h, w, c = cap.shape cx, cy = int(lm.x * w), int(lm.y * h) # print(id, cx, cy) # if id == 4: cv2.circle(cap, (cx, cy), 15, (255, 0, 255), cv2.FILLED) #cv2.putText(cap, str(int(id)), (cx, cy), cv2.FONT_HERSHEY_PLAIN, 3, #(255, 0, 255), 3) olist.append([cx, cy]) mpDraw.draw_landmarks(cap, handLms, mpHands.HAND_CONNECTIONS) else: #print("error invalid picture\nexiting"); return False, [] # print(olist) hop = olist[0] for i, _ in enumerate(olist): if not i: olist[i] = [0, 0];continue x = olist[i][0] - hop[0] y = olist[i][1] - hop[1] # print(i,' ',x,' ',y) olist[i] = [x, y] features = [int(o) for f in olist for o in f] return True, np.absolute(features / np.linalg.norm(features)) <file_sep>import csv import re from pathlib import Path cwd = Path.cwd() import os def dataset_formatter(text): #the 8 is indexc of dataset/ dot_index=text.find(".") return(text[8:dot_index]) # reading file.cv def read_cv(): names=[] with open(os.path.join(str(cwd),'HAND.csv')) as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: if line_count == 0: line_count += 1 else: names.append(row[0]) line_count += 1 return names # appending the data def append_cv(filename,features): modfied_filename="dataset/"+filename+"."# to adhere to the standared print(modfied_filename) featuresOut = [str(f) for f in features] with open('HAND.csv','a') as output: output.write("%s,%s\n" % (modfied_filename, ",".join(featuresOut))) <file_sep>import mediapipe as mp import numpy as np import cv2 def out(capIn): mpHands = mp.solutions.hands hands = mpHands.Hands() imgRGB = cv2.cvtColor(capIn, cv2.COLOR_BGR2RGB) results = hands.process(imgRGB) olist = list() if results.multi_hand_landmarks: for handLms in results.multi_hand_landmarks: for idHand, lm in enumerate(handLms.landmark): h, w, c = capIn.shape cx, cy = int(lm.x * w), int(lm.y * h) cv2.putText(capIn, str(int(idHand)), (cx, cy), cv2.FONT_HERSHEY_PLAIN, 3, (255, 0, 255), 3) olist.append([cx, cy]) else: print("error invalid picture\nexiting") return False, [] hop = olist[0] for i, _ in enumerate(olist): if not i: olist[i] = [0, 0] continue x = olist[i][0] - hop[0] y = olist[i][1] - hop[1] olist[i] = [x, y] featuresList = [int(o) for f in olist for o in f] return True, np.absolute(featuresList / np.linalg.norm(featuresList)) def drawContours(capIn): img = np.copy(capIn) # convert to grayscale grey = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # applying gaussian blur value = (35, 35) blurred = cv2.GaussianBlur(grey, value, 0) # thresholding: Otsu's Binarization method _, thresh1 = cv2.threshold(blurred, 127, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU) contours, hierarchy = cv2.findContours(thresh1.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE) contours_image = np.copy(img) # find contour with max area maxContour = max(contours, key=lambda x: cv2.contourArea(x)) cv2.drawContours(contours_image, maxContour, -1, (255, 0, 255), 3) return thresh1, contours_image, maxContour def drawDefects(maxContour, img): hull = cv2.convexHull(maxContour, returnPoints=False) hull[::-1].sort(axis=0) convexityDefects = cv2.convexityDefects(maxContour, hull) defectsImg = np.copy(img) for defect in convexityDefects: s, e, f, d = defect[0] start = tuple(maxContour[s][0]) end = tuple(maxContour[e][0]) far = tuple(maxContour[f][0]) defectsImg = cv2.line(defectsImg, start, end, (0, 0, 255), 3) defectsImg = cv2.line(defectsImg, start, far, (255, 0, 0), 3) defectsImg = cv2.line(defectsImg, end, far, (0, 255, 0), 3) return defectsImg <file_sep>imutils==0.5.4 mediapipe==0.8.5 numpy==1.19.4 opencv_python==4.5.1.48 Pillow==8.2.0 <file_sep>import glob import os import sys import threading import cv2 from utils import out class Indexer: def __init__(self, outputFile="HAND.csv"): # open the output index file for writing if os.path.exists(outputFile): os.remove(outputFile) output = open(outputFile, "w") # use glob to grab the image paths and loop over them for imagePath in glob.glob("dataset" + "/*.*g"): print(imagePath) # extract the image ID (i.e. the unique filename) from the image # path and load the image itself image = cv2.imread(imagePath) _, featuresOut = out(image) # describe the image # write the features to file featuresOut = [str(f) for f in featuresOut] output.write("%s,%s\n" % (imagePath, ",".join(featuresOut))) # close the index file output.close() <file_sep># Hand-Gesture-and-Signs-recognition ## this project is aimed to transalte sign language to plain English text by detecting multiple hand gesturnes and translating each ## Team Work: - <NAME> - <NAME> - <NAME> - <NAME> - <NAME> ## Features: - Translation of 10 different hand gestures and sign languages into plain English text - possiblity of adding more gestures in the future without having to do it in development ( add gesture button ) ## Future plans: - Supporting voice in addition to the text to facilitate the communicaiton - support mobile verison of the app (facilitate the usage) - support web app and connect it to the mobile app - enhance the accuracy of our model ## example of the hand gestures recognized: ![alt text](vector-illustrations-hand-gestures-their-meanings-vector-hand-gestures-meanings-168705246.jpg)
6c0a8165f2bdc46709bd19fab5fec8ab576ff0da
[ "Markdown", "Python", "Text" ]
6
Python
atf01/Hand-Gesture-recognizer
bec94b416c25aac8e65757000310c64228a395ba
bd103734b59675bf4db05965d0baeca288f3fdc2
refs/heads/master
<repo_name>jennyjaderborn/wordgame-app<file_sep>/ProfileScreen.js import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; export default class ProfileScreen extends React.Component { render() { return ( <View style={styles.container}> <Text style={styles.name}>Amanda</Text> <Text style={styles.rating}>Rating</Text> <Text style={styles.rating}>⭐️ ⭐️ ⭐️ ⭐️ ⭐️ </Text> <Text style={styles.rounds}>Antal spelade omgångar: 29</Text> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: 'rgba(0,21,72,1)', alignItems: 'center', justifyContent: 'center', }, name: { color: 'white', fontSize: 25, }, rating: { color: 'white', }, rounds: { color: 'white', } });
df861fd1bc4683a3ceffd59acd5c2e136955d8cf
[ "JavaScript" ]
1
JavaScript
jennyjaderborn/wordgame-app
87d92a26054182f4e4982f0a5ace8fe7ff4ebd77
aca898a1b4e19c9dc1879caec146feebf4928efc
refs/heads/master
<file_sep>'use strict'; (function () { var ORIGINAL_AVATAR_URL = 'img/muffin-grey.svg'; var FILE_TYPES = ['gif', 'jpg', 'jpeg', 'png', 'svg']; var PHOTO_ALT = '<NAME>'; var PhotoSize = { WIDTH: 70, HEIGHT: 70 }; var avatarElement = document.querySelector('.ad-form-header__preview img'); var avatarChooserElement = document.querySelector('.ad-form-header__input'); var photoChooserElement = document.querySelector('.ad-form__input'); var photoContainerElement = document.querySelector('.ad-form__photo-container'); var photoElement = photoContainerElement.querySelector('.ad-form__photo'); var fileList = []; var getPhotoElements = function () { return document.querySelectorAll('.ad-form__photo'); }; var removePhotos = function () { Array.from(getPhotoElements()).forEach(function (item) { item.remove(); }); }; var createAvatar = function (result) { avatarElement.src = result; }; var createPhotoPreviews = function (result) { var newPhoto = photoElement.cloneNode(); var photo = document.createElement('img'); photo.width = PhotoSize.WIDTH; photo.height = PhotoSize.HEIGHT; photo.alt = PHOTO_ALT; photo.src = result; newPhoto.appendChild(photo); photoContainerElement.appendChild(newPhoto); }; var readFile = function (chooser, cb) { Array.from(chooser.files).forEach(function (file) { if (file) { var fileName = file.name.toLowerCase(); var matches = FILE_TYPES.some(function (item) { return fileName.endsWith(item); }); if (matches) { var reader = new FileReader(); reader.addEventListener('load', function (evt) { var currentFile = evt.target; cb(currentFile.result); }); reader.readAsDataURL(file); } } }); }; var savePhotos = function () { var photos = photoChooserElement.files; Array.from(photos).forEach(function (item) { fileList.push(item); }); }; avatarChooserElement.addEventListener('change', function () { readFile(avatarChooserElement, createAvatar); }); photoChooserElement.addEventListener('change', function () { photoElement.remove(); readFile(photoChooserElement, createPhotoPreviews); savePhotos(); }); window.photos = { reset: function () { removePhotos(); photoContainerElement.appendChild(photoElement.cloneNode()); avatarElement.src = ORIGINAL_AVATAR_URL; }, fileList: fileList }; })(); <file_sep>'use strict'; (function () { window.utils = { isRender: false, key: { ENTER: 'Enter', ESCAPE: 'Escape' } }; })(); <file_sep>'use strict'; (function () { var ADVERTISEMENTS_COUNT = 5; var PinSize = { WIDTH: 50, HEIGHT: 70 }; var description = { ROOMS: ' комнаты для ', GUESTS: ' гостей', CHECKIN: 'Заезд после ', CHECKOUT: ', выезд до ', PRICE: '₽/ночь' }; var ApartmentTypeMap = { 'PALACE': 'Дворец', 'FLAT': 'Квартира', 'HOUSE': 'Дом', 'BUNGALO': 'Бунгало' }; var offersElement = window.elements.mapElement.querySelector('.map__pins'); var offerTemplate = document.querySelector('#pin') .content.querySelector('.map__pin'); var mapFiltersElement = document.querySelector('.map__filters-container'); var cardPopupTemplate = document.querySelector('#card').content.querySelector('.map__card'); var cardPopupPhotoTemplate = cardPopupTemplate.querySelector('.popup__photo'); var advertisements = []; var filteredAdvertisements = []; // Объявления var renderAdvertisement = function (element) { var advertisementElement = offerTemplate.cloneNode(true); advertisementElement.style.left = (element.location.x - PinSize.WIDTH / 2) + 'px'; advertisementElement.style.top = (element.location.y - PinSize.HEIGHT) + 'px'; advertisementElement.querySelector('img').src = element.author.avatar; advertisementElement.querySelector('img').alt = element.offer.title; return advertisementElement; }; var renderAdvertisementsNearbyList = function (elements) { var fragment = document.createDocumentFragment(); elements.forEach(function (item) { fragment.appendChild(renderAdvertisement(item)); }); offersElement.appendChild(fragment); }; // Карточки var createCard = function (element) { var roomsCount = element.offer.rooms + description.ROOMS; var guestsCount = element.offer.guests + description.GUESTS; var checkinDescription = description.CHECKIN + element.offer.checkin; var checkoutDescription = description.CHECKOUT + element.offer.checkout; var photos = element.offer.photos; var cardElement = cardPopupTemplate.cloneNode(true); var fragment = document.createDocumentFragment(); cardElement.querySelector('.popup__photo').remove(); photos.forEach(function () { var cardPhotoElement = cardPopupPhotoTemplate.cloneNode(); fragment.appendChild(cardPhotoElement); }); cardElement.querySelector('.popup__photos').appendChild(fragment); var photoElements = cardElement.querySelectorAll('.popup__photo'); photoElements.forEach(function (item, index) { item.src = element.offer.photos[index]; }); cardElement.querySelector('.popup__title').textContent = element.offer.title; cardElement.querySelector('.popup__text--address').textContent = element.offer.address; cardElement.querySelector('.popup__text--price') .textContent = element.offer.price + description.PRICE; cardElement.querySelector('.popup__type').textContent = ApartmentTypeMap[element.offer.type]; cardElement.querySelector('.popup__text--capacity').textContent = roomsCount + guestsCount; cardElement.querySelector('.popup__text--time') .textContent = checkinDescription + checkoutDescription; cardElement.querySelector('.popup__features') .textContent = element.offer.features.join(', '); cardElement.querySelector('.popup__description').textContent = element.offer.description; cardElement.querySelector('.popup__avatar').src = element.author.avatar; return cardElement; }; var generateCards = function (elements) { return elements.map(function (item) { return createCard(item); }); }; var getMapCardElement = function () { return window.elements.mapElement.querySelector('.map__card'); }; var popupEscPressHandler = function (evt) { if (evt.key === window.utils.key.ESCAPE) { window.form.removeCard(); document.removeEventListener('keydown', popupEscPressHandler); } }; var popupCloseClickHandler = function () { window.form.removeCard(); }; var renderCard = function (elements) { var mapPinElements = offersElement.querySelectorAll('.map__pin:not(.map__pin--main)'); var cards = generateCards(elements); Array.from(mapPinElements).forEach(function (item, index) { var pinClickHandler = function () { window.form.removeCard(); window.elements.mapElement.insertBefore(cards[index], mapFiltersElement); item.classList.add('map__pin--active'); getMapCardElement().querySelector('.popup__close') .addEventListener('click', popupCloseClickHandler); document.addEventListener('keydown', popupEscPressHandler); }; item.addEventListener('click', pinClickHandler); }); }; // Активация карты и формы var checkAdvertisements = function (item) { return item.offer; }; var getFinalCount = function (elements) { return elements.slice(0, ADVERTISEMENTS_COUNT); }; var activateMap = function () { window.elements.mapElement.classList.remove('map--faded'); if (!window.utils.isRender) { renderAdvertisementsNearbyList(filteredAdvertisements); window.utils.isRender = true; } }; var successHandler = function (elements) { advertisements = elements.slice().filter(checkAdvertisements); filteredAdvertisements = getFinalCount(advertisements); activateMap(); window.form.activateForm(); renderCard(filteredAdvertisements); }; var happenByClick = function (evt) { window.backend.load(successHandler, window.form.errorHandler); window.move(evt); }; var mainPinMouseDownHandler = function (evt) { happenByClick(evt); }; var mainPinKeyDownHandler = function (evt) { if (evt.key === window.utils.key.ENTER) { happenByClick(evt); } }; window.elements.mainPinElement.addEventListener('mousedown', mainPinMouseDownHandler); window.elements.mainPinElement.addEventListener('keydown', mainPinKeyDownHandler); window.map = { getAdvertisementsList: function () { return advertisements; }, renderAdvertisementsNearbyList: renderAdvertisementsNearbyList, renderCard: renderCard, getFinalCount: getFinalCount }; })(); <file_sep>'use strict'; (function () { var mainElement = document.querySelector('main'); var mapElement = mainElement.querySelector('.map'); var mainPinElement = mapElement.querySelector('.map__pin--main'); var mapfiltersElement = mapElement.querySelector('.map__filters'); window.elements = { mainElement: mainElement, mapElement: mapElement, mainPinElement: mainPinElement, mapfiltersElement: mapfiltersElement }; })();
090883a0df64aa1da46e2129e3c86be1b901409f
[ "JavaScript" ]
4
JavaScript
sasha-who/277207-keksobooking-18
a43c0cb3b9fb055cf3218ed02f628944664879a2
b647c24f3a7937395d2c9a64bdd9a3dda6330356
refs/heads/master
<repo_name>ireyoner/Eksploracja-danych<file_sep>/the_bridges_of_trident/the_bridges_of_trident.py # coding=utf-8 import Orange def simple_instances(data, indexes=[5,7,40]): # przykładowe instancje for x in indexes: if x <= len(data): print x, ":", data[x] def class_variable(data): # listę wartości zmiennej celu i histogram zmiennej celu from collections import Counter import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt import pylab as plb items = Counter([d[data.domain.attributes[-1]].value for d in data if not d[data.domain.attributes[-1]].is_special()]) print "Class variable values and counts:" print data.domain.attributes[-1].name for item in items.items(): print "%-21s : %4d" % item # generacja histogramu za pomocą matplotlib cm = plb.get_cmap('gist_rainbow') for index, item in enumerate(items): plt.bar(index+.1, item[1], label=item[0], color=cm(1.*index/len(items))) plt.xlabel('Group') plt.ylabel('Bridges') plt.axes().get_xaxis().set_visible(False) plt.title('Bridges by '+data.domain.classVar.name) plt.legend() plt.tight_layout() plt.show() def attributes_names_and_types(data): # liczbę, nazwy i typy atrybutów z podziałem na atrybuty ciągłe i dyskretne a_Continuous = [x.name for x in data.domain.attributes if x.var_type==Orange.feature.Type.Continuous] a_Discrete = [x.name for x in data.domain.attributes if x.var_type==Orange.feature.Type.Discrete] print "%d attributes:" % len(data.domain.attributes) print "\t", len(a_Continuous), "continuous:", a_Continuous print "\t", len(a_Discrete), "discrete:", a_Discrete def attributes_values(data): # wartości średnie (lub modalne) dla każdego atrybutu from collections import Counter average = lambda xs: sum(xs)/float(len(xs)) print "%-15s %s" % ("Feature", "Mean or Mode") for x in data.domain.attributes: if x.var_type == Orange.feature.Type.Continuous: print "%-15s %.2f" % (x.name, average([d[x] for d in data if not d[x].is_special()])) if x.var_type == Orange.feature.Type.Discrete: print "%-15s %s" % (x.name, [d[0] for d in Counter([d[x].value for d in data if not d[x].is_special()]).most_common(1)]) def missing_values_count(data): # liczbę brakujących wartości dla każdego atrybutu print "Missing values count for each column:" for x in data.domain.features: n_miss = sum(1 for d in data if d[x].is_special()) print "%6d %s" % (n_miss, x.name) def small_instance_simple(data, procent = 10): # przykład niewielkiej próbki instancji import random import math print "random %d%% of original data:" % procent for d in random.sample(data, (int) (math.ceil((len(data)*procent)/100))): print d def bridges_functions(): data = Orange.data.Table("bridges") functions = [ simple_instances , class_variable , attributes_names_and_types , missing_values_count , attributes_values , small_instance_simple ] for func in functions: print "\nFunction '%s':\n" % func.__name__ func(data) bridges_functions()
eebde09f8271fc0f9795eb1c86fd22fc2282337c
[ "Python" ]
1
Python
ireyoner/Eksploracja-danych
1fe7b87ece8541c594bd2784e0a1977e622bb546
4af6a27f24875646fe288e7ece09d69cdd01a018
refs/heads/master
<file_sep>FROM php:7.4-apache ARG PLATFORM COPY . /var/www/html/<file_sep>nsx_admin = '@@{cred_nsx_api.username}@@' nsx_password = '@@{cred_nsx_api.secret}@@' nsx_ip = '@@{nsx_mgr_ip}@@' nsx_dhcp = '@@{NSX_DHCP_SERVER}@@' nsx_tier0_id = '@@{t0Id}@@' tenant_uuid = '@@{TENANT_UUID}@@' nsx_edge_cluster_uuid = '@@{ecUuid}@@' nsx_ipam_gw = '@@{defaultGwIp}@@' nsx_ipam_range = '@@{dhcp_range}@@' nsx_ipam_cidr = '@@{network_cidr}@@' nsx_tz_uuid = '@@{tzUuid}@@' headers = {'Content-Type': 'application/json', 'Accept':'application/json'} url = 'https://raw.githubusercontent.com/pipoe2h/calm/master/demo/nsx-t/tenant_template.json' payload = urlreq( url, headers=headers, verify=False ) print(payload) # payload = { # "resource_type": "Infra", # "id": "infra", # "children": [ # { # "Tier1": { # "tier0_path": "/infra/tier-0s/{}".format(nsx_tier0_id), # "failover_mode": "NON_PREEMPTIVE", # "dhcp_config_paths": [ # "/infra/dhcp-server-configs/{}".format(nsx_dhcp) # ], # "force_whitelisting": "false", # "default_rule_logging": "false", # "disable_firewall": "false", # "resource_type": "Tier1", # "id": "{}-tier-1-gw".format(tenant_uuid), # "description": "{}-tier-1-gw".format(tenant_uuid), # "display_name": "{}-tier-1-gw".format(tenant_uuid), # "route_advertisement_types": [ # "TIER1_CONNECTED", # "TIER1_STATIC_ROUTES" # ], # "tags": [ # {"scope": "calm", "tag": "{}".format(tenant_uuid)} # ], # "children": [ # { # "resource_type": "ChildLocaleServices", # "LocaleServices":{ # "resource_type": "LocaleServices", # "id": "default", # "edge_cluster_path": "/infra/sites/default/enforcement-points/default/edge-clusters/{}".format(nsx_edge_cluster_uuid) # } # }, # { # "Segment": { # "subnets": [ # { # "gateway_address": "{}".format(nsx_ipam_gw), # "dhcp_ranges": [ # "{}".format(nsx_ipam_range) # ], # "network": "{}".format(nsx_ipam_cidr) # } # ], # "resource_type": "Segment", # "id": "{}-segment-default".format(tenant_uuid), # "description": "{}-segment-default".format(tenant_uuid), # "display_name": "{}-segment-default".format(tenant_uuid), # "transport_zone_path": "/infra/sites/default/enforcement-points/default/transport-zones/{}".format(nsx_tz_uuid), # "tags": [ # {"scope": "calm", "tag": "{}".format(tenant_uuid)} # ], # "marked_for_delete": "false" # }, # "resource_type": "ChildSegment", # "marked_for_delete": "false" # } # ], # "marked_for_delete": "false" # }, # "resource_type": "ChildTier1", # "marked_for_delete": "false" # }, # { # "resource_type": "ChildDomain", # "marked_for_delete": "false", # "Domain":{ # "id": "default", # "resource_type": "Domain", # "marked_for_delete": "false", # "children":[ # { # "resource_type": "ChildGroup", # "Group":{ # "resource_type": "Group", # "marked_for_delete": "false", # "id": "{}-TENANT".format(tenant_uuid), # "display_name": "{}-TENANT".format(tenant_uuid), # "tags": [ # {"scope": "calm", "tag": "{}".format(tenant_uuid)} # ], # "expression": [ # { # "member_type": "VirtualMachine", # "key": "Name", # "operator": "STARTSWITH", # "value": "{}".format(tenant_uuid), # "resource_type": "Condition", # "marked_for_delete": "false" # }, # { # "conjunction_operator": "OR", # "resource_type": "ConjunctionOperator", # "marked_for_delete": "false" # }, # { # "member_type": "LogicalSwitch", # "key": "Tag", # "operator": "EQUALS", # "value": "calm|{}".format(tenant_uuid), # "resource_type": "Condition", # "marked_for_delete": "false" # } # ] # } # }, # { # "resource_type": "ChildSecurityPolicy", # "marked_for_delete": "false", # "SecurityPolicy":{ # "resource_type": "SecurityPolicy", # "category": "Environment", # "marked_for_delete": "false", # "id": "{}-POLICY".format(tenant_uuid), # "display_name": "{}-POLICY".format(tenant_uuid), # "tags": [ # {"scope": "calm", "tag": "{}".format(tenant_uuid)} # ], # "rules": [ # { # "sequence_number": 10, # "sources_excluded": "false", # "destinations_excluded": "false", # "source_groups": [ # "/infra/domains/default/groups/{}-TENANT".format(tenant_uuid) # ], # "destination_groups": [ # "ANY" # ], # "services": [ # "ANY" # ], # "profiles": [ # "ANY" # ], # "action": "ALLOW", # "logged": "false", # "scope": [ # "/infra/domains/default/groups/{}-TENANT".format(tenant_uuid) # ], # "disabled": "false", # "notes": "", # "direction": "IN_OUT", # "tags": [ # { # "scope": "calm", # "tag": "{}".format(tenant_uuid) # } # ], # "ip_protocol": "IPV4_IPV6", # "resource_type": "Rule", # "id": "{}-ALLOW-OUT".format(tenant_uuid), # "display_name": "{}-ALLOW-OUT".format(tenant_uuid), # "marked_for_delete": "false" # } # ] # } # } # ] # } # } # ], # "marked_for_delete": "false", # "connectivity_strategy": "WHITELIST" # } api_action = '/policy/api/v1/infra' url = 'https://{}{}'.format( nsx_ip, api_action ) r = urlreq( url, verb='PATCH', auth='BASIC', user=nsx_admin, passwd=nsx_password, params=json.dumps(payload), headers=headers, verify=False ) if r.ok: exit(0) else: print "Post request failed", r.content exit(1)<file_sep># REST API call # setup common variables api_host = '@@{API_HOST}@@' username = '@@{CREDS_API.username}@@' password = '@@{CREDS_API.<PASSWORD>}@@' headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } verify_ssl = False ###################### DEFINE FUNCTIONS ###################### def rest_call( url, method, payload="", username, password, headers, ssl ): resp = urlreq( url, verb = method, params = json.dumps(payload), auth = "BASIC", user = username, passwd = password, headers = headers, verify = ssl ) if resp.ok: return resp else: print("Request failed") print("Headers: {}".format(headers)) print("Payload: {}".format(json.dumps(payload))) print('Status code: {}'.format(resp.status_code)) print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4))) exit(1) ############################################################## ###################### EXAMPLES ###################### ##### 1. Mock API (mocky.io) ##### base_url = 'https://{}/'.format(api_host) endpoint = 'v2' url = '{}/{}'.format( base_url, endpoint ) method = 'GET' response = rest_call(url, method, '', username, password, headers, ssl) print response ################################## ###################################################### url = "https://{}/PrismGateway/services/rest/v2.0/protection_domains/{}/dr_snapshots?proxyClusterUuid={}".format( uri, hostname, cluster_uuid ) method = 'GET' response = rest_call(url=url,method=method) entities = response['entities'] snapshot_list = [] # create list of all snapshot ids for entity in entities: snapshot_list.append(entity['snapshot_id']) # sort list of snaps descending snapshot_list.sort(reverse=True) print(','.join(snapshot_list))<file_sep>#script # Search VM IP address within the Calm application logs jwt = '@@{<PASSWORD>}@@' appUuid = '@@{POSH_APP_UUID}@@' api_url = 'https://localhost:9440/api/nutanix/v3/apps/%s/app_runlogs/' % appUuid headers = {'Content-Type': 'application/json', 'Accept':'application/json', 'Authorization': 'Bearer {}'.format(jwt)} actionParentReference = '' actionData = '' payload = { "filter": "application_reference==@@{POSH_APP_UUID}@@;(type==action_runlog,type==audit_runlog)" } r = urlreq(api_url + 'list', verb='POST', params=json.dumps(payload), headers=headers, verify=False) entities = json.loads(r.content)['entities'] if r.ok: for entity in entities: if entity['metadata']['uuid'] == '@@{TASK_ID}@@': actionName = entity['status']['action_reference']['name'] if actionName == 'AZ Deploy VM': actionParentReference = entity['metadata']['uuid'] actionData = '{{"filter": "root_reference=={0}"}}'.format(actionParentReference) r = urlreq(api_url + 'list', verb='POST', params=actionData, headers=headers, verify=False) entities = json.loads(r.content)['entities'] for entity in entities: if 'task_reference' in entity['status']: taskName = entity['status']['task_reference']['name'] taskUuid = entity['metadata']['uuid'] r = urlreq(api_url + taskUuid + '/output', verb='GET', headers=headers, verify=False) outputList = json.loads(r.content)['status']['output_list'] output = outputList[0]['output'] print "VM_IP={0}".format(output.rstrip()) exit(0) else: print "Post request failed", r.content exit(1) <file_sep># Hybrid Cloud Application Demo * You will need an Azure Service Principal account for this blueprint * Make sure to have an Azure resource group fully configured and available in the Calm project before importing the blueprint * The Apache service running on Azure uses private IP connectivity. You can switch to public if no VPN is available between on-prem and Azure * The load balancer runs on AHV on-prem * This is the simple web page that this blueprint uses <https://github.com/pipoe2h/calm/tree/master/demo/webpage> <file_sep><?php $platform = $_ENV['PLATFORM']; ?> <!DOCTYPE html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous"> <link href="style.css" rel="stylesheet"> <title>Nutanix</title> </head> <body> <main class="main"> <div class="container"> <div class="row"> <div class="col-lg-12"> <h1>Nutanix Hybrid Cloud Application</h1> </div> </div> <div class="row"> <div class="mt-5 mb-5 col-lg-6"> <p class="text-center"> <a href="#" class="btn btn-md btn-secondary">Host: <?php echo gethostname(); ?></a> </p> </div> <div class="mt-5 mb-5 col-lg-6"> <p class="text-center"> <a href="#" class="<?php echo $platform ?> btn btn-md btn-secondary">Cloud: <?php echo $platform ?></a> </p> </div> </div> <div class="row"> <div class="mt-5 mb-5 col-lg-12"> <img class="img-fluid" src="nutanix_hybrid_cloud.png"> </div> </div> </div> </main> <footer class="footer"> <div class="container"> <div class="row"> <div class="col"> <a href="https://github.com/pipoe2h" target="_blank">Designed by <NAME></a> </div> <div class="col"> <a href="https://nutanix.com" target="_blank"><img class="img-fluid" src="nutanix_logo.png"></a> </div> <div class="col"> <a class="float-right" href="<?php echo 'http://' .getenv('CALM_LB'). ':8080/stats'; ?>" target="_blank">Load Balancer</a> </div> </div> </div> </footer> <!-- Optional JavaScript --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="<KEY>" crossorigin="anonymous"> </script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="<KEY>" crossorigin="anonymous"> </script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="<KEY>" crossorigin="anonymous"> </script> </body> </html><file_sep>#!/bin/sh set -e echo "Hello world" # echo "@@{VM1_cloned_0.address}@@" echo "$1"<file_sep>ARG VARIANT="3.7" FROM python:${VARIANT} ARG CALM_DSL_TARBALL="https://github.com/nutanix/calm-dsl/archive/master.zip" WORKDIR /root RUN mkdir -p `python3 -m site --user-site` ENV PATH=/root/.local/bin:$PATH RUN apt-get update && apt-get install -y sudo jq \ && rm -rf /var/lib/apt/lists/* RUN wget -q -O /tmp/calm-dsl.zip $CALM_DSL_TARBALL RUN unzip /tmp/calm-dsl.zip -d /tmp \ && rm /tmp/calm-dsl.zip \ && cd /tmp/calm-dsl-master \ && pip3 install --no-cache-dir -r requirements.txt virtualenv --user \ && make dist \ && pip3 install --no-cache-dir dist/calm.dsl*.whl --user \ && cd ~ \ && rm -fR /tmp/calm-dsl-master CMD ["bash"]<file_sep>api_url = 'https://localhost:9440/api/nutanix/v3/apps/@@{calm_application_uuid}@@/app_runlogs/list' headers = {'Content-Type': 'application/json'} username = '@@{<EMAIL>}@@' password = '@@{<EMAIL>}@@' payload = {"filter":"application_reference==@@{calm_application_uuid}@@;(type==action_runlog)"} r = urlreq(api_url, verb='POST', auth='BASIC', user=username, passwd=password, params=json.dumps(payload), headers=headers) if r.ok: resp = json.loads(r.content) headers = {'Accept-Encoding': 'gzip, deflate, br'} api_url = 'https://localhost:9440/api/nutanix/v3/apps/@@{calm_application_uuid}@@/app_runlogs/{}/output/download'.format(resp['entities'][0]['metadata']['uuid']) r = urlreq(api_url, verb='GET', auth='BASIC', user=username, passwd=<PASSWORD>, headers=headers) if r.ok: base64_file = base64.b64encode(r.content) """base64_file contains an encoded ZIP file""" else: print("Post request failed", r.content) exit(1) else: print("Post request failed", r.content) exit(1)<file_sep>import requests try: import json except ImportError: pass class ApiManager(): # Initialise the options def __init__(self, ip_addr, port, username, password, ssl=True): self.ip_addr = ip_addr self.port = port self.username = username self.password = <PASSWORD> self.ssl = ssl self.rest_params_init() # Initialise REST API parameters def rest_params_init(self, sub_url='', method='', body=None, content_type='application/json'): self.sub_url = sub_url self.method = method self.body = body self.content_type = content_type # Create a REST client session. def rest_call(self): if self.ssl is True: base_url = 'https://{}:{}/{}'.format( self.ip_addr, self.port, self.sub_url) else: base_url = 'http://{}:{}/{}'.format( self.ip_addr, self.port, self.sub_url) if self.body and self.content_type == 'application/json': self.body = json.dumps(self.body) req = requests.Request(url=base_url, data=self.body) req.auth = (self.username, self.password) req.headers = ({'Content-Type': '{}'.format(self.content_type), 'Accept': '{}'.format(self.content_type)}) req.method = self.method r = req.prepare() s = requests.Session() try: resp = s.send(r, verify=False) if resp.ok: return json.loads(resp.content) else: return resp.raise_for_status() except requests.HTTPError as e: return 'Error: {}'.format(e.args) except Exception as e: return 'Error: {}'.format(e.args) def head(self, sub_url=''): self.rest_params_init(sub_url=sub_url, method='HEAD') return self.rest_call() def get(self, sub_url=''): self.rest_params_init(sub_url=sub_url, method='GET') return self.rest_call() def post(self, sub_url='', body=None): self.rest_params_init(sub_url=sub_url, method='POST', body=body) return self.rest_call() def put(self, sub_url='', body=None): self.rest_params_init(sub_url=sub_url, method='PUT', body=body) return self.rest_call() def patch(self, sub_url='', body=None): self.rest_params_init(sub_url=sub_url, method='PATCH', body=body) return self.rest_call() def delete(self, sub_url=''): self.rest_params_init(sub_url=sub_url, method='DELETE') return self.rest_call() # payload = {'kind': 'vm'} # pc = ApiManager("192.168.1.1","9440","user","password") # print(root.post(sub_url='api/nutanix/v3/vms/list', body=payload)) # print(pc.get(sub_url='api/nutanix/v3/vms/d6cae3d8-fe92-4eb1-88f5-ee5bbfe6f6ca')) # awx = ApiManager("awx","80","user","password",False) # print(awx.get(sub_url='api/v2/settings/'))<file_sep># Automating Citrix Golden Templates with Calm and MDT --- **NOTE** * Tested with PC 2020.9, Calm 3.1.0, MDT 6.3.8456.1000 and Citrix Studio 172.16.58.3 --- ## Requirements * Have ready Nutanix Calm with an AHV entitled project * An existing MDT deployment with a working Deployment Share and Task Sequence that includes CVDA installation * An existing MDT bootstrap ISO image available in the AHV Image Service for Calm to boot the VM with it. Example of a `bootstrap.ini`: ```ini [Settings] Priority=Default [Default] DeployRoot=\\YOUR_MDT_HOST\YOUR_MDT_SHARED_FOLDER$ UserDomain=YOUR_DOMAIN UserID=YOUR_DOMAIN_SERVICE_ACCOUNT UserPassword=<PASSWORD> SkipBDDWelcome=YES ``` * An existing Citrix deployment ## Installation 1. Download the [Calm blueprint](https://raw.githubusercontent.com/pipoe2h/calm/master/blueprints/euc-golden-template/ntc-euc-template.json). Right-click, Save Link As... 2. Upload blueprint into Calm and choose a project with an AHV provider 3. Complete the credentials: * Administrator: This is the local Administrator account for the template * Cred_Citrix: This is a service account that can connect to the server running Citrix Studio * Cred_PE_Calm: This is a service account that has `Cluster Admin` role in Nutanix Prism Element cluster to perform snapshot tasks * Click **Save** ![Set Credentials](images/01_calm_template_credentials.png) 4. Configure the Windows Service: * Set the `Image` for `Disk (1)`. This is the MDT bootstrap ISO image available in the AHV Image Service * Set the `network adapter` to the desire project network * Click **Save** ![Configure Windows](images/02_calm_template_windows.png) 5. Launch blueprint completing the inputs <file_sep>nsx_admin = '@@{nsx_admin}@@' nsx_password = <PASSWORD>}@@' nsx_ip = '@@{nsx_mgr_ip}@@' tenant_uuid = '@@{TENANT_UUID}@@' group_name = '@@{nsgroup_name}@@' membership_criteria = '@@{nsgroup_membership_criteria}@@' headers = {'Content-Type': 'application/json', 'Accept':'application/json'} payload = { "resource_type": "Infra", "id": "infra", "children": [ { "resource_type": "ChildDomain", "marked_for_delete": "false", "Domain":{ "id": "default", "resource_type": "Domain", "marked_for_delete": "false", "children":[ { "resource_type": "ChildGroup", "Group":{ "resource_type": "Group", "marked_for_delete": "false", "id": "{}-{}".format(tenant_uuid, group_name), "display_name": "{}-{}".format(tenant_uuid, group_name), "tags": [ {"scope": "calm", "tag": "{}".format(tenant_uuid)} ], "expression": [ { "expressions": [ { "member_type": "{}".format(membership_criteria), "key": "Tag", "operator": "EQUALS", "value": "{}|{}".format(tenant_uuid, group_name), "resource_type": "Condition", "marked_for_delete": "false" }, { "conjunction_operator": "AND", "resource_type": "ConjunctionOperator", "marked_for_delete": "false", }, { "member_type": "{}".format(membership_criteria), "key": "Tag", "operator": "EQUALS", "value": "calm|{}".format(tenant_uuid), "resource_type": "Condition", "marked_for_delete": "false", } ], "resource_type": "NestedExpression", "marked_for_delete": "false", } ] } } ] } } ], "marked_for_delete": "false", "connectivity_strategy": "WHITELIST" } api_action = '/policy/api/v1/infra' url = 'https://{}{}'.format( nsx_ip, api_action ) r = urlreq( url, verb='PATCH', auth='BASIC', user=nsx_admin, passwd=<PASSWORD>, params=json.dumps(payload), headers=headers, verify=False ) if r.ok: print("Request successful") exit(0) else: print "Post request failed", r.content exit(1)<file_sep>nsx_admin = '@@{nsx_admin}@@' nsx_password = '@@{nsx_password}@@' nsx_ip = '@@{nsx_mgr_ip}@@' tenant_uuid = '@@{TENANT_UUID}@@' nsx_dfw_rulename = '@@{nsx_dfw_rulename}@@' nsx_dfw_sourcegroup = '@@{nsx_dfw_sourcegroup}@@' nsx_dfw_destinationgroup = '@@{nsx_dfw_destinationgroup}@@' nsx_dfw_action = '@@{nsx_dfw_action}@@' nsx_dfw_logging = '@@{nsx_dfw_logging}@@' nsx_dfw_direction = '@@{nsx_dfw_direction}@@' nsx_dfw_ipversion = '@@{nsx_dfw_ipversion}@@' nsx_dfw_sequence = '@@{nsx_dfw_sequence}@@' nsx_dfw_sourcesexcluded = '@@{nsx_dfw_sourcesexcluded}@@' nsx_dfw_destinationsexcluded = '@@{nsx_dfw_destinationsexcluded}@@' nsx_dfw_services = '@@{nsx_dfw_services}@@' nsx_dfw_profiles = '@@{nsx_dfw_profiles}@@' nsx_dfw_disabled = '@@{nsx_dfw_disabled}@@' nsx_dfw_notes = '@@{nsx_dfw_notes}@@' headers = {'Content-Type': 'application/json', 'Accept':'application/json'} payload = { "resource_type": "Infra", "id": "infra", "children": [ { "resource_type": "ChildDomain", "marked_for_delete": "false", "Domain":{ "id": "default", "resource_type": "Domain", "marked_for_delete": "false", "children":[ { "resource_type": "ChildSecurityPolicy", "marked_for_delete": "false", "SecurityPolicy":{ "resource_type": "SecurityPolicy", "category": "Application", "marked_for_delete": "false", "id": "{}-POLICY".format(tenant_uuid), "display_name": "{}-POLICY".format(tenant_uuid), "tags": [ {"scope": "calm", "tag": "{}".format(tenant_uuid)} ], "rules": [ { "sequence_number": int(nsx_dfw_sequence), "sources_excluded": "{}".format(nsx_dfw_sourcesexcluded), "destinations_excluded": "{}".format(nsx_dfw_destinationsexcluded), "source_groups": [ "/infra/domains/default/groups/{}-{}".format(tenant_uuid,nsx_dfw_sourcegroup) ], "destination_groups": [ "/infra/domains/default/groups/{}-{}".format(tenant_uuid,nsx_dfw_destinationgroup) ], "services": [ "{}".format(nsx_dfw_services) ], "profiles": [ "{}".format(nsx_dfw_profiles) ], "action": "{}".format(nsx_dfw_action), "logged": "{}".format(nsx_dfw_logging), "scope": [ "/infra/domains/default/groups/{}-TENANT".format(tenant_uuid) ], "disabled": "{}".format(nsx_dfw_disabled), "notes": "{}".format(nsx_dfw_notes), "direction": "{}".format(nsx_dfw_direction), "tags": [ { "scope": "calm", "tag": "{}".format(tenant_uuid) } ], "ip_protocol": "{}".format(nsx_dfw_ipversion), "resource_type": "Rule", "id": "{}-{}-{}".format(tenant_uuid,nsx_dfw_action,nsx_dfw_rulename), "display_name": "{}-{}-{}".format(tenant_uuid,nsx_dfw_action,nsx_dfw_rulename), "marked_for_delete": "false" } ] } } ] } } ], "marked_for_delete": "false", "connectivity_strategy": "WHITELIST" } api_action = '/policy/api/v1/infra' url = 'https://{}{}'.format( nsx_ip, api_action ) r = urlreq( url, verb='PATCH', auth='BASIC', user=nsx_admin, passwd=<PASSWORD>, params=json.dumps(payload), headers=headers, verify=False ) if r.ok: print("Request successful") exit(0) else: print "Post request failed", r.content exit(1)<file_sep>#script jwt = <PASSWORD>}@@' runlogUuid = '@@{TASK_ID}@@' appUuid = '@@{POSH_APP_UUID}@@' payload = {} api_url = 'https://localhost:9440/api/nutanix/v3/apps/%s/app_runlogs/%s' % (appUuid, runlogUuid) headers = {'Content-Type': 'application/json', 'Accept':'application/json', 'Authorization': 'Bearer {}'.format(jwt)} state = 'SUCCESS' # Monitor the operation for x in range(20): r = urlreq(api_url, verb='GET', params=json.dumps(payload), headers=headers, verify=False) print json.loads(r.content) # If complete, break out of loop if json.loads(r.content)['status']['state'] == state: print "Task finished." break print "Sleeping for 45 seconds." print "Status: {0}".format(json.loads(r.content)['status']['state']) sleep(45) # If the operation did not complete within 20 minutes, assume it's not successful and error out if json.loads(r.content)['status']['state'] != state: print "Stopping timed out", json.dumps(json.loads(r.content), indent=4) exit(1) <file_sep># Azure blueprints ## List of blueprints * [**jg-azureSdk-BootDiagnostics**](https://github.com/pipoe2h/calm/blob/master/blueprints/azure/jg-azureSdk-BootDiagnostics.json) - This blueprint deploys a single VM in Azure and enable Boot Diagnostics. * [**jg-azureSdk-vmBackup**](https://github.com/pipoe2h/calm/blob/master/blueprints/azure/jg-azureSdk-vmBackup.json) - This blueprint deploys a single VM in Azure and allows to enable backup as a day 2 action. <file_sep>#script jwt = '@@{calm_jwt}@@' appUuid = '@@{POSH_APP_UUID}@@' payload = { "name": "AZ Deploy VM", "args": [ { "name": "AC_AZURE_LOCATION_NAME", "value": "@@{AC_AZURE_LOCATION_NAME}@@" }, { "name": "AC_AZURE_VM_USER_PASSWORD", "value": "@@{CRED.secret}@@" }, { "name": "AC_AZURE_VM_USERNAME", "value": "@@{CRED.username}@@" }, { "name": "AC_AZURE_VM_IMAGE", "value": "@@{AC_AZURE_VM_IMAGE}@@" }, { "name": "AC_AZURE_VM_NAME", "value": "@@{AC_AZURE_VM_NAME}@@" }, { "name": "AC_AZURE_RG_NAME", "value": "@@{AC_AZURE_RG_NAME}@@" } ] } api_url = 'https://localhost:9440/api/nutanix/v3/apps/%s/actions/run' % appUuid headers = {'Content-Type': 'application/json', 'Accept':'application/json', 'Authorization': 'Bearer {}'.format(jwt)} r = urlreq(api_url, verb='POST', params=json.dumps(payload), headers=headers, verify=False) if r.ok: print "TASK_ID={0}".format(json.loads(r.content)['runlog_uuid']) exit(0) else: print "Post request failed", r.content exit(1) <file_sep>name = '@@{variable_name}@@' print(name)
46a2d78996c60da95938203311eed6cd8a929470
[ "Markdown", "Python", "PHP", "Dockerfile", "Shell" ]
17
Dockerfile
pipoe2h/calm
a340ba4146f48584125b42952e406ecac45ebbbc
dd09836e04fea3044f0dfea578661acfc63e092b
refs/heads/master
<file_sep>package ru.sabteh.service; public class ServiceService { }
3af5fb7dc89c0b68e5a1b5b3b446ce646ccd1867
[ "Java" ]
1
Java
elex82/vcxvcx
ca375e7f9025f4184f8da554ff89852f5fd942cf
9f932141e5a197d860511b86178222af33271fcc
refs/heads/main
<repo_name>VaiBhav029/petmart<file_sep>/frontend/src/actions/userAction.js import axios from 'axios' import { ORDER_LIST_MY_RESET } from '../constants/orderConstant' import { USER_DELETE_FAIL, USER_DELETE_REQUEST, USER_DELETE_SUCCESS, USER_DETAILS_FAIL, USER_DETAILS_REQUEST, USER_DETAILS_RESET, USER_DETAILS_SUCCESS, USER_LIST_FAIL, USER_LIST_REQUEST, USER_LIST_RESET, USER_LIST_SUCCESS, USER_LOGIN_FAIL, USER_LOGIN_REQUEST, USER_LOGIN_SUCCESS, USER_LOGOUT, USER_REGISTER_FAIL, USER_REGISTER_REQUEST, USER_REGISTER_SUCCESS, USER_UPDATE_PROFILE_FAIL, USER_UPDATE_PROFILE_REQUEST, USER_UPDATE_PROFILE_SUCCESS } from '../constants/userConstant' export const login = (email,password) => async(dispatch) =>{ try { dispatch({ type:USER_LOGIN_REQUEST }) const config = { headers:{ 'Content-Type':'application/json' } } const {data} = await axios.post('/api/user/login', {email,password}, config) dispatch({ type:USER_LOGIN_SUCCESS, payload:data }) localStorage.setItem('userInfo',JSON.stringify(data)) } catch (error) { dispatch({ type:USER_LOGIN_FAIL, payload:error.response && error.response.data.message ? error.response.data.message : error.message }) } } export const logout = () => (dispatch) =>{ localStorage.removeItem('userInfo') dispatch({type:USER_LOGOUT}) dispatch({type:USER_DETAILS_RESET}) dispatch({type:ORDER_LIST_MY_RESET}) dispatch({type:USER_LIST_RESET}) } export const register = (name,email,password) => async(dispatch) =>{ try { dispatch({ type:USER_REGISTER_REQUEST }) const config = { headers:{ 'Content-Type':'application/json' } } const {data} = await axios.post('/api/user', {name,email,password}, config) dispatch({ type:USER_REGISTER_SUCCESS, payload:data }) dispatch({ type:USER_LOGIN_SUCCESS, payload:data }) localStorage.setItem('userInfo',JSON.stringify(data)) } catch (error) { dispatch({ type:USER_REGISTER_FAIL, payload:error.response && error.response.data.message ? error.response.data.message : error.message }) } } export const getUserDetails = (id) => async (dispatch, getState) => { try { dispatch({ type: USER_DETAILS_REQUEST, }) const { userLogin: { userInfo }, } = getState() const config = { headers: { 'Content-Type' : 'application/json', Authorization: `Bearer ${userInfo.token}`, }, } const { data } = await axios.get(`/api/user/${id}`, config) dispatch({ type: USER_DETAILS_SUCCESS, payload: data, }) } catch (error) { dispatch({ type: USER_DETAILS_FAIL, payload: error.response && error.response.data.message ? error.response.data.message : error.message }) } } export const updateUserProfile = (user) => async (dispatch, getState) => { try { dispatch({ type: USER_UPDATE_PROFILE_REQUEST, }) const { userLogin: { userInfo }, } = getState() const config = { headers: { 'Content-Type' : 'application/json', Authorization: `Bearer ${userInfo.token}`, }, } const { data } = await axios.put(`/api/user/profile`, user,config) dispatch({ type: USER_UPDATE_PROFILE_SUCCESS, payload: data, }) } catch (error) { dispatch({ type: USER_UPDATE_PROFILE_FAIL, payload: error.response && error.response.data.message ? error.response.data.message : error.message }) } } export const listUsers = () => async (dispatch, getState) => { try { dispatch({ type: USER_LIST_REQUEST, }) const { userLogin: { userInfo }, } = getState() const config = { headers: { Authorization: `Bearer ${userInfo.token}` }, } const { data } = await axios.get(`/api/user`,config) dispatch({ type: USER_LIST_SUCCESS, payload: data, }) } catch (error) { dispatch({ type: USER_LIST_FAIL, payload: error.response && error.response.data.message ? error.response.data.message : error.message }) } } export const deleteUser = (id) => async (dispatch, getState) => { try { dispatch({ type: USER_DELETE_REQUEST, }) const { userLogin: { userInfo }, } = getState() const config = { headers: { Authorization: `Bearer ${userInfo.token}` }, } const { data } = await axios.delete(`/api/user/${id}`,config) dispatch({ type: USER_DELETE_SUCCESS }) } catch (error) { dispatch({ type: USER_DELETE_FAIL, payload: error.response && error.response.data.message ? error.response.data.message : error.message }) } }<file_sep>/backend/data/products.js const products = [{ name: 'Pedigree pro expert nutrition', image: '/images/image1.jpeg', description: 'Premium natural nutrition tailor-made to maintain your adult dog’s whole body health FEATURES Protein-rich food for the muscle health of your dog Includes essential vitamins, minerals & antioxidants for immune protection Contains Omega 3&6 fatty acids for a healthy skin and shiny coat With Real Chicken for a complete and balanced nutrition, with no artificial colors or flavors', brand: 'pedigree', category: 'dogs', price: 450, countInStock: 50, rating: 4.2, numReviews: 12, }, { name: 'RED COLOR MEDIUM QUALITY DOG BELT Dog Collar & Leash ', image: '/images/image2.jpeg', description: 'This collar is of large size & is 1.5 inch in width. Collar is suitable for large breed dogs.', brand: 'udak', category: 'dogs', price: 200, countInStock: 15, rating: 4.0, numReviews: 8, }, { name: ' Basic Charm Round Steel Pet Bowl', image: '/images/image3.jpeg', description: 'This stylish red colored steel bowl for your dog from the latest collection of TommyChew is an ideal pick against your valuable currency. This bowl comes with a floor grip to ensure that the bowl does not slide when your dog eats food in a hurry. Now say goodbye to cleaning mess while your dog has completed his eating session by grabbing this printed bowl.', brand: 'Tommychew', category: 'dogs', price: 150, countInStock: 20, rating: 4.3, numReviews: 12, }, { name: '<NAME>ten (2-12 months) Mackeral 1.1 kg Dry Young Cat Food', image: '/images/image4.jpeg', description: 'Whiskas kitten food is a complete and balanced meal designed to take care of your cats daily nutritional requirements. Whiskas food for kittens provides 41 essential nutrients including Antioxidant and 23 Vitamins and Minerals for lively and energetic baby cats. It contains Calcium, Phosphorus and Vitamin D for healthy bone and body growth. Whiskas Junior Food is suitable for mother and baby cat from 2 to 12 months. This dry cat food helps support healthy eyesight with Vitamin A and Taurine, and promote healthy coat with Omega 6 and Zinc. In addition, with a texture that appeals to the palate of your feline, Whiskas ensures meal time is filling and fun!', brand: 'Whiskas', category: 'cats', price: 500, countInStock: 11, rating: 4.8, numReviews: 12, }, { name: 'slatters be royal store RBB107 S Pet Bed (Blue, Black)', image: '/images/image5.jpeg', description: 'The luxurious Pet bed is the original Slatters pet bed, its stylish yet simplistic design offers the highest level of comfort for your pet.our product is manufactured using high grade raw material that ensures their durability.we never compromise with quality.we use premium quality of polyster for long life of product.our product is use indoor as well as outdoor because we using water resistance base for beds.', brand: 'slatters', category: 'cats', price: 1500, countInStock: 20, rating: 4.3, numReviews: 10, }, { name: '<NAME> Zoey Shiny & Mew Anti-microbial, Anti-fungal, Anti-itching, Conditioning Artificial Fragrance Free Cat Shampoo (200 ml)', image: '/images/image6.jpeg', description: ' Captain Zack - Shiny & Mew is a SULPHATE FREE cat & kitten shampoo specially formulated for sensitive, delicate or dry skin. The calming and healing effects of Lavender along with Lemongrass’s natural deodorizing properties make this shampoo usable for our purry friends.', brand: 'captain Zack', category: 'cats', price: 300, countInStock: 25, rating: 4, numReviews: 12, }, { name: 'Morvin Anti-microbial, Conditioning, Anti-fungal, Flea and Tick, Anti-dandruff, Anti-itching, Hypoallergenic, Whitening and Color Enhancing Fresh Dog Shampoo (200 ml)', image: '/images/image7.jpeg', description: 'Type: Anti-microbial, Conditioning, Anti-fungal, Flea and Tick, Anti-dandruff, Anti-itching, Hypoallergenic, Whitening and Color Enhancing', brand: 'morvin', category: 'dogs', price: 300, countInStock: 25, rating: 4.6, numReviews: 22, }, { name: 'Purepet Real Biscuit Chicken Dog Chew (0.455 kg, Pack of 1)', image: '/images/image8.jpeg', description: 'Petting your dog isn’t enough - you need to give him/her a treat or two to appreciate the things that he/she does to keep you happy. Enriched with vitamins and minerals, this pack of dog treats not only keeps your dog active and healthy, but it also gives him/her all the more reason to wag his/her tail in joy.', brand: 'purepet', category: 'dogs', price: 340, countInStock: 25, rating: 4.6, numReviews: 22, }, { name: 'Smartcraft Double Sided Dog Brush Grooming Shedding Brush Comb for Pets Small Pin Brush for Dogs and Cats Plastic Handle with Two Rubber Sides (Small) Slicker Brushes for Dog,', image: '/images/image9.jpeg', description: 'Size:8.5 inch Just image that : you are have fun with your beloved pet, and it is so cute that you can’t help to giving a gentle touch to him, then you will find out that your hands are full of fur. Shedding fur from cats and dogs spread around the room bothers pet lovers a lot, but with the help of the double-sided grooming brush, it will not be a problem anymore Reasons to use our Pin and Bristle Shedding Brush 1.', brand: 'Smartcraft', category: 'dogs', price: 100, countInStock: 29, rating: 3.8, numReviews: 32, }, { name: 'Pet Needs Pet Dog/Cats Double Headed Toothbrush Pet Toothbrush (Dog)', image: '/images/image10.jpeg', description: 'Our dental care range is curated with the goal of making the brushing experience completely hassle-free yet effective. Make your pet’s oral care your top priority with Pets Double Headed Toothbrush for Dogs! The soft bristles gently remove plaque and build-up along the gumline, reducing your pet’s risk of disease, cavities, tooth decay, bad breath, gum recession and more serious conditions like gingivitis. ', brand: 'pet needs', category: 'dogs', price: 195, countInStock: 12, rating: 3.6, numReviews: 12, }, { name: 'Bruno Wild Essentials Tuna with Salmon & Parsley In Gravy (pack of 12) Tuna, Salmon 1 kg (12x0.08 kg) Wet Adult, Young, Senior Cat Food', image: '/images/image11.jpeg', description: 'Our dental care range is curated with the goal of making the brushing experience completely hassle-free yet effective. Make your pet’s oral care your top priority with Pets Double Headed Toothbrush for Dogs! The soft bristles gently remove plaque and build-up along the gumline, reducing your pet’s risk of disease, cavities, tooth decay, bad breath, gum recession and more serious conditions like gingivitis. ', brand: 'Bruno', category: 'cats', price: 280, countInStock: 52, rating: 4.3, numReviews: 53, }, { name: 'Dr Venture Anti-tick and Flea Neem Shampoo 200 ml + Anti Dandruff & Conditioning Eucalyptus 200 ml', image: '/images/image12.jpeg', description: 'Cat Shampoo Anti-microbial, Conditioning, Anti-fungal, Flea and Tick, Anti-dandruff, Allergy Relief, Whitening and Color Enhancing, Anti-itching neem and eucalyptus Dog Shampoo.', brand: 'Dr Venture', category: 'cats', price: 50, countInStock: 22, rating: 3.3, numReviews: 45, }, ] export default products<file_sep>/backend/controller/userController.js import asyncHandler from 'express-async-handler' import User from '../models/userModel.js' import generateToken from '../utills/generateToken.js' //@desc Auth user and get Token //@route POST /user/login //@acces public const authUser = asyncHandler(async(req,res)=>{ const {email,password} = req.body const user = await User.findOne({email}) if(user && (await user.matchPassword(password))) { res.json({ _id:user._id, name:user.name, email:user.email, isAdmin:user.isAdmin, token:generateToken(user._id) }) } else{ res.status(401) throw new Error('inavid username or password') } }) //@desc get user //@route GET api/user/profile //@acces priavte const getUserProfile = asyncHandler(async(req,res)=>{ const user = await User.findById(req.user._id) if(user){ res.json({ _id:user._id, name:user.name, email:user.email, isAdmin:user.isAdmin }) } else{ res.status(404) throw new Error('user not found') } }) //@desc Auth user and get Token //@route POST /user/login //@acces public const registerUser = asyncHandler(async(req,res)=>{ const {name,email,password} = req.body const userExist = await User.findOne({email}) if(userExist){ res.status(400) throw new Error('User Already exist') } else{ const user = await User.create({ name,email,password }) if(user){ res.json( { _id:user._id, name:user.name, email:user.email, isAdmin:user.isAdmin } ) } } }) //@desc Update user profile //@route PUT api/user/profile //@acces priavte const updateUserProfile = asyncHandler(async(req,res)=>{ const user = await User.findById(req.user._id) if(user){ user.name = req.body.name || user.name user.email = req.body.email || user.email if(req.body.password){ user.password = req.body.password } const updatedUser = await user.save() res.json({ _id:updatedUser._id, name:updatedUser.name, email:updatedUser.email, isAdmin:updatedUser.isAdmin, token:generateToken(updatedUser._id) }) } else{ res.status(404) throw new Error('user not found') } }) //@desc get all users //@route GET api/users //@acces priavte/Admin const getUsers = asyncHandler(async(req,res)=>{ const user = await User.find({}) res.json(user) }) //@desc delete users //@route DELETE api/user/:id //@acces priavte/Admin const deleteUser = asyncHandler(async(req,res)=>{ const user = await User.findById(req.params.id) if(user){ await user.remove() res.json({msg:"removed"}) } else{ res.status(404) throw new Error('User not found') } }) export { authUser, getUserProfile, registerUser, updateUserProfile, getUsers, deleteUser }<file_sep>/backend/routes/productRoutes.js import express from 'express' const router = express.Router() import { getProducts, getProductById, deleteProduct, createProduct, updateProduct } from '../controller/productControler.js' import { admin, protect } from '../middleware/authMiddleware.js' router.route('/').get(getProducts).post(protect, admin, createProduct) router.route('/:id').get(getProductById).put(protect, admin, updateProduct) router.route('/:id').delete(protect, admin, deleteProduct) export default router<file_sep>/backend/controller/productControler.js import asyncHandler from 'express-async-handler' import Product from '../models/productModel.js' //@desc Fetch all product //@route GET /api/product //@acces public const getProducts = asyncHandler(async (req, res) => { const keyword = req.query.keyword ? { name: { $regex: req.query.keyword, $options: 'i', }, } : {} const product = await Product.find({...keyword}) res.json(product) }) //@desc Fetch signle product //@route GET /api/product/:id //@acces public const getProductById = asyncHandler(async (req, res) => { const product = await Product.findById(req.params.id) if (product) { res.json(product) } else { res.status(404) throw new Error('Product not found') } }) //@desc Dleteproduct //@route DELETE /api/product/:id //@acces private/admin const deleteProduct = asyncHandler(async (req, res) => { const product = await Product.findById(req.params.id) if (product) { await product.remove() res.json({ msg: "removed" }) } else { res.status(401) throw new Error('Product not Found') } }) //@desc creating product //@route POST /api/products/ //@acces private/admin const createProduct = asyncHandler(async (req, res) => { const product = new Product({ name: '<NAME>', price: 0, user: req.user._id, image: '/images/sample.jpg', brand: 'sample', category: 'sample', countInStock: 0, numReviews: 0, description: 'sample' }) const createdProduct = await product.save() res.status(201).json(createdProduct) }) //@desc Update product //@route PUT /api/products/id //@acces private/admin const updateProduct = asyncHandler(async (req, res) => { const { name, price, image, brand, category, countInStock, description } = req.body const product = await Product.findById(req.params.id) if (product) { product.name = name product.price = price product.image = image product.brand = brand product.category = category product.countInStock = countInStock product.description = description const updatedProduct = await product.save() res.json(updatedProduct) } else { res.status(404) throw new Error('Product not found') } }) export { getProductById, getProducts, deleteProduct, createProduct, updateProduct }<file_sep>/backend/routes/userRoutes.js import express from 'express' const router = express.Router() import {authUser,getUserProfile,registerUser,updateUserProfile,getUsers, deleteUser} from '../controller/userController.js' import {admin, protect} from '../middleware/authMiddleware.js' router.route('/').post(registerUser).get(protect,admin,getUsers) router.post('/login',authUser) router.route('/profile').get(protect,getUserProfile).put(protect,updateUserProfile) router.route('/:id').delete(protect,admin,deleteUser) export default router<file_sep>/README.md # Petmart ## Online shopping website for all type of pet accessories,food,toys and clothes.(MERN STACK) ## Front End - [React Js](https://reactjs.org/) ## Back End - [Node Js](https://reactjs.org/) - [Express Js](https://expressjs.com/) - [Mongo DB](https://www.mongodb.com/cloud/atlas/lp/try2-in?utm_source=google&utm_campaign=gs_apac_india_search_core_brand_atlas_desktop&utm_term=mongodb&utm_medium=cpc_paid_search&utm_ad=e&utm_ad_campaign_id=12212624347) ### FOllowed Tutorial by <NAME>(udemy course) - [<NAME>](https://github.com/bradtraversy) - [Udemy Course](https://www.udemy.com/course/mern-ecommerce/) <file_sep>/frontend/src/components/Footer.js import React from 'react' import { Col, Container, Row } from 'react-bootstrap' const Footer = () => { return ( <footer className='bg-primary text-white' expand='lg'> <Container > <Row> <Col className="text-center py-3"> <h6 className='text-white'>Follow us Social Media</h6> <i className='fab fa-instagram' style={{color:'pink',fontSize:"30px"}}><h6 className='text-white'>Instgram</h6></i><br/> <i className='fab fa-facebook'style={{color:'blue',fontSize:"30px"}}><h6 className='text-white'>facebook</h6></i><br/> <i className='fab fa-twitter' style={{color:'blue',fontSize:"30px"}}><h6 className='text-white'>Instgram</h6></i><br/> <i className='fab fa-youtube'style={{color:'red',fontSize:"30px"}}><h6 className='text-white'>Instgram</h6></i> </Col> <Col className="text-center py-3"> <h6 className='text-white'>HaedQuter</h6> <p>1238 Massachusetts Avenue Washington, DC,Washington DC, 20005, 202-662-3102 </p> <h6 className='text-white'>Branch:1</h6> <p >1238 Massachusetts Avenue Washington, DC,Washington DC, 20005, 202-662-3102 </p> <h6 className='text-white'> Branch: 2</h6> <p>1238 Massachusetts Avenue Washington, DC,Washington DC, 20005, 202-662-3102 </p> </Col> <Col className="text-center py-3"> <h6 className='text-white'>Acheivements</h6> <p>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. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </Col> </Row> </Container> </footer> ) } export default Footer <file_sep>/frontend/src/constants/cartConstant.js export const CART_ADD_ITEM = 'CART_ADD_ITEM' export const CART_REMOVE_ITEM = 'CART_REMOVE_ITEM' export const CART_SAVE_SHIPPING_ADDRESS = 'CART_SAVE_SHIPPING_ADDRESS' export const SAVE_PAYMENT_METHOD = 'SAVE_PAYMENT_METHOD' export const CART_CLEAR_ITEM = 'CART_CLEAR_ITEM'<file_sep>/backend/routes/orderRoutes.js import express from 'express' const router = express.Router() import {addOrderItems, getMyorders, getOrderById, getorders, updateOrderToDelivered, updateOrderToPaid} from '../controller/orderControler.js' import {admin, protect} from '../middleware/authMiddleware.js' router.route('/').post(protect,addOrderItems).get(protect,admin,getorders) router.route('/myorders').get(protect,getMyorders) router.route('/:id').get(protect,getOrderById) router.route('/:id/pay').put(protect,updateOrderToPaid) router.route('/:id/deliver').put(protect,admin,updateOrderToDelivered) export default router
96b47bfea05da2d6c4641dd070900515e1c2a17e
[ "JavaScript", "Markdown" ]
10
JavaScript
VaiBhav029/petmart
5136b7f6081658dfcabb15809e68b0273eec9518
e058570673fb2f0930ec653946c3e180b73b8f1e
refs/heads/master
<file_sep>import { LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE, } from '../actionTypes' let initialState = { loading: false, error: null, status: 0 } export default (state = initialState, action) => { switch (action.type) { case LOGIN_REQUEST: return { ...state, loading: true } case LOGIN_SUCCESS: return { ...state, loading: false, status: 1 } case LOGIN_FAILURE: return { ...state, loading: false, error : action.error } default : return state } }<file_sep>import { LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE, } from '../actionTypes'; export const loginMe = (data) => { return ((dispatch) => { dispatch({ type: LOGIN_REQUEST }) if (data.username === "admin" && data.password === "<PASSWORD>") { console.log('ok') dispatch({ type: LOGIN_SUCCESS, payload: 'login success' }) } else { console.log('Login Error') dispatch({ type: LOGIN_FAILURE, error: 'Invalid login' }) } }) } <file_sep>import React from 'react'; import { Field, reduxForm } from 'redux-form'; const validate = (values) => { const error = {} if(!values.username){ error.username = "Enter username" } if(!values.password){ error.password = "<PASSWORD>" } return error; } let textInput = (props) => { const { input, type, label, placeholder, meta : {touched , error } } = props; return ( <div> <label>{label}</label> <input {...input} type={type} placeholder={placeholder} /> {touched && error ? <span style={{"color":"red"}}>{error}</span> : ''} </div> ) } /* let textInput2 = ({input, type, label, placeholder, meta : {touched , error } }) => ( <div> <label>{label}</label> <input {...input} type={type} placeholder={placeholder} /> {touched && error ? <span style={{"color":"red"}}>{error}</span> : ''} </div> ) */ let LoginForm = (props) => { const { handleSubmit } = props; return ( <form onSubmit={handleSubmit}> <Field name="username" type="text" label="Username" placeholder="Enter username (admin)" component={textInput} /> <Field name="password" type="<PASSWORD>" label="Password" placeholder="Enter password (<PASSWORD>)" component={textInput} /> <button type="submit">Login</button> </form> ) } const Loginform = reduxForm({ form: 'loginform', validate })(LoginForm); export default Loginform;<file_sep>export const GET_PHOTOS_REQUEST = 'GET_PHOTOS_REQUEST' export const GET_PHOTOS_SUCCESS = 'GET_PHOTOS_SUCCESS' export const GET_PHOTOS_FAILURE = 'GET_PHOTOS_FAILURE'<file_sep>import * as photo from './photos'; export default { photo }<file_sep>import { toast } from 'react-toastify'; import 'react-toastify/dist/ReactToastify.css'; export const successMsg = (msg) =>{ console.log('Sucess MSH') toast.success(msg, { position: toast.POSITION.TOP_RIGHT }); } export const errorMsg = (msg) =>{ toast.error(msg, { position: toast.POSITION.TOP_RIGHT }); }<file_sep>import React, { Component } from 'react'; import { NavLink } from 'react-router-dom'; class Header extends Component { render() { return ( <div> <ul style={{ "listStyleType": "none" }}> <li><NavLink to="/dashboard">Home</NavLink></li> <li><NavLink to="/photos">Photos</NavLink></li> </ul> <hr /> </div> ) } } export default Header; <file_sep>import { GET_PHOTOS_REQUEST, GET_PHOTOS_SUCCESS, GET_PHOTOS_FAILURE, } from '../actionTypes'; import api from '../apis'; export const get_photos = () => { return ((dispatch) => { dispatch({ type: GET_PHOTOS_REQUEST }) return api.photo.get_photos_now().then(response => { console.log('Photo List=>',response.data.slice(0,100)); dispatch({ type: GET_PHOTOS_SUCCESS, payload: response.data.slice(0,100) }) }) .catch(error => { dispatch({ type: GET_PHOTOS_FAILURE, error }) }) }) } <file_sep>import React, { Component } from 'react'; import { connect } from 'react-redux'; import { NavLink } from 'react-router-dom'; import { get_photos } from '../store/actions'; class photos extends Component { componentWillMount() { this.props.dispatch(get_photos()); } photoList = (photo, index) => { return ( <div key={index}> <b>{photo.title}</b> <br/> <img src={photo.url} width="100" height="100"/> </div> ) } render() { const { photoList, isloading } = this.props; return ( <div> <h1>Photo List</h1> <NavLink to="/dashboard">Back To Dashboard</NavLink> { (isloading ? <i className="fa fa-spinner fa-pulse fa-3x fa-fw"></i> : (photoList && photoList.length > 0 ? photoList.map((photo, index) => { return this.photoList(photo, index) }) : 'No Data' ) ) } </div> ); } } const mapStateToProps = (state) => { const { photo } = state; return { isloading: photo.loading, photoList: photo.photos } } export default connect(mapStateToProps)(photos);
b048f2dcabba52772b7dffbf1b2d13aaf0bc260f
[ "JavaScript" ]
9
JavaScript
dipeshmali/dm-react-redux-boilerplate
1adf3eab6edf2cc323c2152fcb6c97b22bc51010
5cfe4fca8505c6dac24fa76229ae331f0e0b259c
refs/heads/master
<repo_name>lucasmiranda5/Aplicativo-1-Semestre-IFNMG-2014-Pirapora<file_sep>/js/script.js const URLBASE = "http://sizetech.com.br/app_if/"; //const URLBASE = "http://localhost/aplicativo_if/"; function pessoas(){ var lista = ''; $.post(URLBASE+'pessoas.php', {}, function(data) { var x = 0; var y = 1; $.each( data, function( ) { if(y == 1){ lista += '<div class="ui-grid-a">'; lista += '<div class="ui-block-a">'; lista += '<center><img src="'+URLBASE+'fotos/'+data[x].foto+'" class="img-redondo"></center>'; lista += '<a class="ui-btn" href="#"><b>'+data[x].nome+'</b> - '+data[x].cidade+'</a>'; lista += '</div>'; }else{ lista += '<div class="ui-block-b">'; lista += '<center><img src="'+URLBASE+'fotos/'+data[x].foto+'" class="img-redondo"></center>'; lista += '<a class="ui-btn ui-btn-b" data-theme="b" href="#"><b>'+data[x].nome+'</b> - '+data[x].cidade+'</a>'; lista += '</div>'; } if(y == 2){ y = 0; lista += '</div>'; } y++; x++; }); if(y == 2){ lista += '</div>'; } $('#conteudoEstive').html(lista); }, 'json'); } function capturarImagem(){ $('#validar').val(1); navigator.camera.getPicture(uploadPhoto, function(message) { $('#validar').val(0); },{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.CAMERA, correctOrientation:true, AllowEdit: true } ); } function PegarImagem(){ $('#validar').val(1); navigator.camera.getPicture(uploadPhoto, function(message) { $('#validar').val(0); },{ quality: 50, destinationType: navigator.camera.DestinationType.FILE_URI, sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY, correctOrientation:true, AllowEdit: true } ); } function uploadPhoto(imageURI) { $('#htmlImagem').attr('src',imageURI); $('#validar').val(1); var options = new FileUploadOptions(); options.fileKey="file"; options.fileName=imageURI.substr(imageURI.lastIndexOf('/')+1); options.mimeType="image/jpeg"; var params = new Object(); params.value1 = "test"; params.value2 = "param"; options.params = params; options.chunkedMode = false; var ft = new FileTransfer(); ft.upload(imageURI, URLBASE+"upload.php", win, fail, options); } function win(r) { $("#arquivo").val(r.response); $('#validar').val(0); } function fail(error) { $('#htmlImagem').attr('src',''); $('#validar').val(0); } $(function(){ formEstaraqui $('#formEstaraqui').submit(function(){ var d = 1; if($('#validar').val == 1){ alert('Por favor aguarde estamos fazendo upload da sua linda foto'); }else{ if($('#arquivo').val() == ''){ alert("Por Favor coloque uma foto"); d = 0; } if($('#email').val() == ''){ alert("Por Favor coloque seu email"); d = 0; } if($('#nome').val() == ''){ alert("Por Favor coloque seu nome"); d = 0; } if($('#cidade').val() == ''){ alert("Por Favor coloque sua cidade"); d = 0; } if(d == 1){ $.post(URLBASE+'gravarPessoas.php', $(this).serialize(), function(data) { var x = 0; $.each( data, function( ) { if(data.retorno){ alert("Obrigador por estar conosco =D"); $('#arquivo').val(''); $('#email').val(''); $('#nome').val(''); $('#cidade').val(''); $('#htmlImagem').attr('src',''); pessoas(); $('html,body').animate({scrollTop: 0},'slow'); }else{ alert("Você já estar cadastrado =D"); } }); }, 'json'); } } return false; }) $('#calcularimc').submit(function(){ var altura = $('#altura_imc').val(); var peso = $('#peso_imc').val(); if(altura == '' || peso == ''){ alert('Preencha todos os campos'); }else{ altura = altura.replace(',','.'); peso = peso.replace(',','.'); peso = parseFloat(peso); altura = parseFloat(altura); var valor = peso / (altura*altura); if(valor < 17) var tipo = "Muito abaixo do peso"; else if(valor >= 17 && valor <= 18.49) var tipo = "Abaixo do peso"; else if(valor >= 18.5 && valor <= 24.99) var tipo = "com o Peso normal"; else if(valor >= 25 && valor <= 29.99) var tipo = "Acima do peso"; else if(valor >= 30 && valor <= 34.99) var tipo = "com Obesidade I"; else if(valor >= 35 && valor <= 39.99) var tipo = "com Obesidade II (severa)"; else var tipo = "com Obesidade III (mórbida)"; $('#resultadoIMC').html("Seu IMC é: "+valor.toFixed(2)+" você estar "+tipo); } return false; }) $('#calcularpesoideal').submit(function(){ var sexo = $('#sexo_peso').val(); var altura = $('#altura_peso').val(); if(altura == '' || sexo == ''){ alert('Preencha todos os campos'); }else{ altura = altura.replace(',','.'); altura = parseFloat(altura); altura = altura * 100; if(sexo == 'h'){ var PI = (altura - 100) - ((altura - 150)/4); }else{ var PI = (altura - 100) - ((altura - 150)/4); } $('#resultadoPeso').html("Seu Peso ideal é: "+PI.toFixed(2)); } return false; }) }) function abrirCoollapsible(a){ var t = $(a).find( "form" ).css("display"); if(t == 'none') $(a).find( "form" ).css("display","block"); else $(a).find( "form" ).css("display",'none'); } function todasDicas(){ var lista = ''; var resposta = ''; var ab = 'a'; $.post(URLBASE+'dicas.php', {}, function(data) { var x = 0; $.each( data, function( ) { if(x % 2 == 0) ab = 'b'; else ab = 'a'; lista += ' <li onclick="abrirCoollapsible(this);" data-theme="'+ab+'" ><a href="#">'+data[x].titulo+'</a>'; lista += ' <form style="display:none">'; lista += ' <p align="center">'+data[x].descricao+'</p>'; lista += ' <a href="#dica" onClick="abrirDicas('+data[x].id_noticia+');"class="ui-btn ui-btn-'+ab+'">LEIA MAIS</a>'; lista += ' </form>'; lista += ' </li>'; x++; }); $('#dicasLista').html(lista); $('#dicasLista').listview("refresh"); }, 'json'); } function abrirDicas(id){ $.post(URLBASE+'dica.php', {id:id}, function(data) { var x = 0; $.each( data, function( ) { $('#titutloDica').html(data.titulo); $('#subDica').html(data.sub); $('#textoDica').html(data.texto); $('#fonteDica').html(data.fonte); }); }, 'json'); } function todosVideos(){ var lista = ''; var resposta = ''; var ab = 'a'; $.post(URLBASE+'videos.php', {}, function(data) { var x = 0; $.each( data, function( ) { if(x % 2 == 0) ab = 'b'; else ab = 'a'; lista += ' <li data-theme="'+ab+'" ><a onClick="abrirVideo('+data[x].id_video+');" href="#video">'+data[x].nome+'</a>'; lista += ' </li>'; x++; }); $('#videoLista').html(lista); $('#videoLista').listview("refresh"); }, 'json'); } function abrirVideo(id){ $.post(URLBASE+'video.php', {id:id}, function(data) { var x = 0; $.each( data, function( ) { $('#titutloVideo').html(data.nome); $('#videoCode').html(data.video); }); }, 'json'); } function onLoad() { document.addEventListener("deviceready", onDeviceReady, false); } // device APIs are available // function onDeviceReady() { // Register the event listener document.addEventListener("menubutton", onMenuKeyDown, false); } // Handle the menu button // function onMenuKeyDown() { $( ".selector" ).panel( "open" ); }
79c22e38369fa18c8527a07d050237353fa766eb
[ "JavaScript" ]
1
JavaScript
lucasmiranda5/Aplicativo-1-Semestre-IFNMG-2014-Pirapora
86cb1952ddced772d226a2d7ac72b9a763169375
576dab9fa2968093a8918189ee4b3e5977f223ec
refs/heads/master
<file_sep>package Vehicle; import java.awt.Color; public class Runner { public static void main(String[] args) { BMW obj1 = new BMW("X", 2020, "basd32eas4", "good one", "something", true, 50000, 250, "XL"); Benz obj2 = new Benz("C", 2020, "sdfw34sdf", true, true, "Gas", true, 458000, 350, "XL"); Benz obj3 = new Benz("C", 2019, "saf3sdf23323", false, true, "Gas", true, 451200, 252, "L", "Benz", "C Class", 4, 35000, "The fancy one", Color.WHITE); Vehicle[] cars = {obj1, obj2, obj3}; for (int i = 0; i < cars.length; i++) { System.out.println(cars[i]); System.out.println(); } } }
6918f2681a3835b21f568f5243aa961401fac0ec
[ "Java" ]
1
Java
almaskotwal/vehicle
269ac46ed05217eb89184cc38f0e55b5bcf64f43
a0f579133e9c78736424ab7deec84814d2bad815
refs/heads/master
<file_sep>(function() { 'use strict'; angular.module('ngFoursquareApp') .controller('LoginCtrl', function ($scope, foursquareApiService) { }) })();<file_sep>(function(){ 'use strict'; angular.module('ngFoursquareApp') .controller('MainCtrl', function($scope) { $scope.links = [ { sref: 'home', title: 'Home' }, { sref: 'profile', title: 'Profile' }, { sref: 'places', title: 'Places' } ] }) })();<file_sep>(function() { 'use strict'; angular.module('ngFoursquareApp').directive('places', function(){ return { restrict: 'E', require: '^ngModel', scope: true, templateUrl: 'js/common/directives/places/places.tpl.html', link: function(scope, element, attrs){ scope.filterQuery = ''; scope.selectedIndex = 0; scope.selectedPlace = scope.places[0]; // Filter for places scope.filterPlaces = function(item){ return item.name.toLowerCase().indexOf(scope.filterQuery.toLowerCase())>=0; }; // Select place and open details scope.selectPlace = function(index){ scope.selectedPlace = scope.limitedPlaces[index]; scope.selectedIndex = index; }; // Pagination scope.totalItems = scope.places.length; scope.itemsPerPage = 10; scope.currentPage = 1; scope.maxSize = 5; scope.bigTotalItems = 175; scope.bigCurrentPage = 1; scope.pageCount = function () { return Math.ceil(scope.places.length / scope.itemsPerPage); }; scope.$watch('currentPage + itemsPerPage', function() { var begin = ((scope.currentPage - 1) * scope.itemsPerPage), end = begin + scope.itemsPerPage; scope.limitedPlaces = scope.places.slice(begin, end); }); } }; }); })();<file_sep>(function() { 'use strict'; angular.module('ngFoursquareApp') .controller('ProfileCtrl', function ($scope, foursquareApiService) { //$scope.getCheckins = foursquareApiService.getCheckins(); }) })();<file_sep>(function () { 'use strict'; angular.module('ngFoursquareApp', ['ngResource', 'ngSanitize', 'ui.router', 'ui.bootstrap', 'ngAnimate']); })(); <file_sep>(function() { 'use strict'; angular.module('ngFoursquareApp') .controller('PlacesCtrl', function ($scope, foursquareApiService) { $scope.nearBy = 'Kharkiv'; $scope.search = function () { $scope.places = foursquareApiService.places({ near: $scope.nearBy, query: $scope.query }); }; }) })();<file_sep>(function(){ 'use strict'; angular.module('ngFoursquareApp') .constant('appConfig', { api: { baseURL: 'https://api.foursquare.com/v2', clientId: '<KEY>', clientSecret: '<KEY>', version: '20130815' } }); })();
cba6eb41b2f02f846f7917eafec6a39a188fa5e4
[ "JavaScript" ]
7
JavaScript
oksspo/Foursquare
f1384116c667cfefc4d529318d3183916f7018c2
ee17d9a6fcd8a3797149096fa3ca8a73125fe2f0
refs/heads/main
<file_sep>package com.linebizplus.exchange.virtual.routes import com.linebizplus.exchange.virtual.classification.HEADER_API_KEY import com.linebizplus.exchange.virtual.dto.request.InitializeOrderbookRequest import com.linebizplus.exchange.virtual.exceptions.CommonException import com.linebizplus.exchange.virtual.services.OrderService import io.ktor.application.* import io.ktor.http.* import io.ktor.request.* import io.ktor.response.* import io.ktor.routing.* fun Routing.adminRouter() { route("/api/admin/v2") { post("/orderbook") { val admin = validateMember(call.request.header(HEADER_API_KEY)) val dto = call.receive<InitializeOrderbookRequest>() OrderService.initializeOrdersByAdmin(admin, dto.pair, dto.asks, dto.bids) call.respond(HttpStatusCode.OK) } delete("/orderbook") { try { validateMember(call.request.header(HEADER_API_KEY)) val pair = call.request.queryParameters["pair"] if (pair != null) { OrderService.cancelAllOrdersByPair(pair) } else { OrderService.cancelAllOrders() } call.respond(HttpStatusCode.OK) } catch (e: CommonException) { errorRespond(call, e.error) } } } } <file_sep>package com.linebizplus.exchange.virtual.dto import java.math.BigDecimal data class Spread(val price: BigDecimal, val amount: BigDecimal) <file_sep>package com.linebizplus.exchange.virtual.dto.streams import com.linebizplus.exchange.virtual.dto.Spread data class OrderbookStream(val lastUpdatedId: Long, val asks: List<Spread>, val bids: List<Spread>) <file_sep>package com.linebizplus.exchange.virtual.dto.streams import java.math.BigDecimal /** * @param pair 페어 * @param tradeId 거래ID * @param price 체결가격 * @param amount 체결수량 * @param buyerOrderId 매수주문ID * @param sellerOrderId 매도주문ID * @param tradeTime 거래시간 * @param isTheBuyerTheMarketMaker true: 매수주문이 메이커 false: 매도주문이 메이커 */ data class TradeStream( val pair: String, val tradeId: Long, val price: BigDecimal, val amount: BigDecimal, val buyerOrderId: Long, val sellerOrderId: Long, val tradeTime: Long, val isTheBuyerTheMarketMaker: Boolean ) <file_sep>package com.linebizplus.exchange.virtual.model import java.math.BigDecimal data class Balance(val asset: String, var amount: BigDecimal, var locked: BigDecimal) { val available: BigDecimal get() = amount - locked } <file_sep>package com.linebizplus.exchange.virtual.dto.request import java.math.BigDecimal data class InitializeOrderbookRequest( val pair: String, val asks: List<List<BigDecimal>>, val bids: List<List<BigDecimal>> ) <file_sep>package com.linebizplus.exchange.virtual.extensions import io.ktor.config.* import io.ktor.util.* import java.math.BigDecimal import java.util.concurrent.atomic.AtomicLong val runtimeAt = AtomicLong(System.currentTimeMillis()) /** * Returns the sum of all values produced by [selector] function applied to each element in * the collection. */ inline fun <T> Iterable<T>.sumByBigDecimal(selector: (T) -> BigDecimal): BigDecimal { var sum: BigDecimal = BigDecimal.ZERO for (element in this) { sum += selector(element) } return sum } @KtorExperimentalAPI fun ApplicationConfigValue.getBoolean() = getString() == "true" @KtorExperimentalAPI fun ApplicationConfigValue.getInt() = getString().toInt() fun String.baseAsset() = split("-")[0] fun String.quoteAsset() = split("-")[1] fun generateOrderId() = runtimeAt.addAndGet(1) fun generateTradeId() = runtimeAt.addAndGet(1) fun BigDecimal.isEquals(other: BigDecimal) = this.compareTo(other) == 0 fun BigDecimal.isZero() = this.compareTo(BigDecimal.ZERO) == 0 <file_sep>ktorVersion=1.4.1 kotlin.code.style=official kotlinVersion=1.4.10 logbackVersion=1.2.1 exposedVersion=0.24.1 mysqlVersion=8.0.21 hikaricpVersion=3.4.5 <file_sep>package com.linebizplus.exchange.virtual.entities import com.linebizplus.exchange.virtual.classification.Liquidity import com.linebizplus.exchange.virtual.classification.OrderSide import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.`java-time`.timestamp object TransactionTable : Table("transactions") { val tradeId = long("trade_id") val orderId = (long("order_id") references OrderTable.orderId) val clientOrderId = varchar("client_order_id", 45).nullable() val relatedOrderId = long("related_order_id") val memberId = (long("member_id") references MemberTable.id) val pair = varchar("pair", 45) val side = enumerationByName("side", 4, OrderSide::class) val price = decimal("price", 20, 8) val amount = decimal("amount", 20, 8) val feeCurrency = varchar("fee_currency", 5) val fee = decimal("fee", 20, 8) val executedTime = timestamp("executed_time") val liquidity = enumerationByName("liquidity", 5, Liquidity::class) override val primaryKey = PrimaryKey(tradeId, orderId) } <file_sep>package com.linebizplus.exchange.virtual import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.SerializationFeature import com.linebizplus.exchange.virtual.components.DatabaseComponent import com.linebizplus.exchange.virtual.components.deserialize import com.linebizplus.exchange.virtual.components.query import com.linebizplus.exchange.virtual.configuration.AppConfig import com.linebizplus.exchange.virtual.dto.WebSocketFeed import com.linebizplus.exchange.virtual.entities.MemberTable import com.linebizplus.exchange.virtual.routes.adminRouter import com.linebizplus.exchange.virtual.routes.privateRouter import com.linebizplus.exchange.virtual.routes.publicRouter import com.linebizplus.exchange.virtual.services.MemberService import com.linebizplus.exchange.virtual.services.OrderService import com.linebizplus.exchange.virtual.services.WebSocketFeedService import io.ktor.application.* import io.ktor.features.* import io.ktor.http.cio.websocket.* import io.ktor.jackson.* import io.ktor.request.* import io.ktor.routing.* import io.ktor.util.* import io.ktor.websocket.* import kotlinx.coroutines.channels.ClosedReceiveChannelException import org.jetbrains.exposed.sql.select import org.slf4j.event.Level import java.time.Duration @KtorExperimentalAPI suspend fun main(args: Array<String>) { val argsMap = args.mapNotNull { it.splitPair('=') }.toMap() val profile = argsMap["-profile"] AppConfig.loadConfig(profile) DatabaseComponent.init() MemberService.initialize() OrderService.reset() return io.ktor.server.netty.EngineMain.main(args) } fun Application.module() { install(CallLogging) { level = Level.INFO filter { call -> call.request.path().startsWith("/") } } // install(CORS) { // method(HttpMethod.Options) // method(HttpMethod.Put) // method(HttpMethod.Delete) // method(HttpMethod.Patch) // header(HttpHeaders.Authorization) // header("MyCustomHeader") // allowCredentials = true // anyHost() // @TODO: Don't do this in production if possible. Try to limit it. // } install(WebSockets) { pingPeriod = Duration.ofSeconds(15) timeout = Duration.ofSeconds(15) maxFrameSize = Long.MAX_VALUE masking = false } install(ContentNegotiation) { jackson { enable(SerializationFeature.INDENT_OUTPUT) enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN) } } install(Routing) { publicRouter() privateRouter() adminRouter() } routing { webSocket("/ws/stream") { var memberId = 0L val socketId = this.toString().substringAfterLast("@") WebSocketFeedService.join(socketId, this) val apiKey = call.request.queryParameters["apiKey"] if (apiKey != null) { query { val row = MemberTable.select { MemberTable.apiKey eq apiKey }.singleOrNull() row?.let { memberId = it[MemberTable.id] } } if (memberId != 0L) { MemberService.addWebSocket(memberId, socketId) } } try { while (true) { val text = (incoming.receive() as Frame.Text).readText() val dto = deserialize<WebSocketFeed>(text) when (dto.type) { "subscribe" -> WebSocketFeedService.subscribe(socketId, dto.channels) "unsubscribe" -> WebSocketFeedService.unsubscribe(socketId, dto.channels) } } } catch (e: ClosedReceiveChannelException) { println("onClose ${closeReason.await()}") } catch (e: Throwable) { println("onError ${closeReason.await()}") } finally { WebSocketFeedService.leave(socketId) MemberService.removeWebSocket(memberId, socketId) } } } } private fun String.splitPair(ch: Char): Pair<String, String>? = indexOf(ch).let { idx -> when (idx) { -1 -> null else -> Pair(take(idx), drop(idx + 1)) } } <file_sep># 가상거래소 OPEN API - 암호화폐 거래소의 OPEN API 테스트 환경을 제공합니다. - 대부분의 거래소와 비슷한 형태로 제작 되었습니다. - FIX 프로토콜은 현재 제공되지 않습니다. ## Get Started - 먼저 사용할 데이터베이스를 생성합니다. - resource/application.conf 에서 database 설정을 변경 할 수 있습니다. (default: virtual) - 처음 실행하면 balance, members, orders, transactions 테이블이 생성 됩니다. - 회원 가입/탈퇴 API는 별도로 존재하지 않으므로 members 테이블에 수동으로 계정을 생성 합니다. - 관리자 이름은 `admin` 이여야 합니다. - `/api/v2/deposit` API를 사용해서 자산을 증가 시킨 후에 사용 합니다. ## REST API ### General API Information - 모든 엔드 포인트는 JSON 객체 또는 배열을 반환합니다. - 모든 시간 및 타임 스탬프 관련 필드는 **milliseconds** 단위 입니다. ### Endpoint security - PRIVATE API 호출은 `X-API-KEY` 헤더를 포함해야 합니다. ### PUBLIC API #### Order book Get an order book. ``` GET /api/v2/orderbook ``` Parameters: | Name | Type | Mandatory | |:-------|:-------|:-------| | pair | STRING | YES | Response: ``` { "lastUpdatedId": 1603937171353, "asks": [ { "price": 8690.2900, "amount": 1.67515100 } ], "bids": [ { "price": 8660.2200, "amount": 0.02436300 } ] } ``` ### PRIVATE API #### New Order Send in a new order. ``` POST /api/v2/order ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | pair | STRING | YES | | | side | ENUM | YES | `BUY` `SELL`| | type | ENUM | YES | `MARKET` `LIMIT`| | amount | DECIMAL | YES | | | price | DECIMAL | NO | | clientOrderId | STRING | NO | | | timeInForce | ENUM | NO | `GTC` `IOC` `FOK`| Response: ``` { "order": { "pair": "BTC-USDT", "memberId": 3, "clientOrderId": "1603947165773", "orderId": 1603947173716, "price": 4000, "amount": 1, "remainAmount": 0, "status": "FILLED", "type": "LIMIT", "side": "SELL", "timeInForce": "GTC", "openedTime": 1603947185653, "canceledTime": null, "lastTradeTime": null }, "transactions": [ { "pair": "BTC-USDT", "memberId": 3, "tradeId": 1603947173717, "orderId": 1603947173716, "clientOrderId": "1603947165773", "relatedOrderId": 1603947173715, "executedTime": 1603947185670, "price": 4000, "amount": 1, "side": "SELL", "fee": 0, "feeCurrency": "USDT", "liquidity": "TAKER" } ] } ``` #### Cancel Order Cancel an active order. ``` DELETE /api/v2/order ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | orderId | LONG | NO | Either orderId or clientOrderId must be sent.| | clientOrderId | STRING | NO | Either orderId or clientOrderId must be sent. | Response: ``` { "pair": "BTC-USDT", "memberId": 3, "clientOrderId": "1603947737510", "orderId": 1603947173719, "price": 4000, "amount": 1, "remainAmount": 1, "status": "CANCELED", "type": "LIMIT", "side": "BUY", "timeInForce": "GTC", "openedTime": 1603947757373, "canceledTime": 1603947765063, "lastTradeTime": null } ``` #### Query Order Check an order's status. ``` GET /api/v2/queryOrder ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | orderId | LONG | NO | Either orderId or clientOrderId must be sent.| | clientOrderId | STRING | NO | Either orderId or clientOrderId must be sent. | Response: ``` { "pair": "BTC-USDT", "memberId": 3, "clientOrderId": "1603947816463", "orderId": 1603947173720, "price": 4000.00000000, "amount": 1.00000000, "remainAmount": 1.00000000, "status": "NEW", "type": "LIMIT", "side": "BUY", "timeInForce": "GTC", "openedTime": 1603947836334, "canceledTime": null, "lastTradeTime": null } ``` #### Current open orders Get all open orders. ``` GET /api/v2/openOrders ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | pair | STRING | NO | If pair is set, it will get all orders on a pair. Response: ``` [ { "pair": "BTC-USDT", "memberId": 3, "clientOrderId": "1603954218108", "orderId": 1603954214957, "price": 4000, "amount": 1, "remainAmount": 1, "status": "NEW", "type": "LIMIT", "side": "BUY", "timeInForce": "GTC", "openedTime": 1603954238125, "canceledTime": null, "lastTradeTime": null } ] ``` #### Account Balance Get all balances in the current account. ``` GET /api/v2/balances ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | asset | STRING | NO | If asset is set, it will get a balance on the asset. Response: ``` [ { "asset": "BTC", "amount": 100.97563700, "locked": 0.00000000, "available": 100.97563700 } ] ``` #### Account trade list Get trades for a specific account and pair. ``` GET /api/v2/trades ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | pair | STRING | YES | | fromId | STRING | NO | TradeId to fetch from. Default gets most recent trades. | startTime | STRING | NO | | endTime | STRING | NO | | limit | INT | NO | Default 500; max 1000. Response: ``` [ { "pair": "BTC-USDT", "memberId": 3, "tradeId": 1603956122419, "orderId": 1603956122417, "clientOrderId": "1603956107909", "relatedOrderId": 1603956122418, "executedTime": 1603956133230, "price": 4000.00000000, "amount": 1.00000000, "side": "BUY", "fee": 0.00000000, "feeCurrency": "BTC", "liquidity": "MAKER" } ] ``` #### Deposit ``` POST /api/v2/deposit ``` Parameters: | Name | Type | Mandatory |:-------|:-------|:-------| | pair | STRING | YES | amount | DECIMAL | YES Response: ``` { "asset": "BTC", "amount": 107.97563700, "locked": 0.00000000, "available": 107.97563700 } ``` #### Withdrawal ``` POST /api/v2/withdrawal ``` Parameters: | Name | Type | Mandatory |:-------|:-------|:-------| | pair | STRING | YES | amount | DECIMAL | YES Response: ``` { "asset": "BTC", "amount": 101.97563700, "locked": 0.00000000, "available": 101.97563700 } ``` ### ADMIN API #### Initialize order book Place orders using admin account. All existing orders will be cancelled. ``` POST /api/admin/v2/orderbook ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | pair | STRING | YES | | | bids | ARRAY | YES | First: price Second: amount| | asks | ARRAY | YES | First: price Second: amount| Response: ``` 200 OK ``` #### Clear order book Cancel all orders. ``` DELETE /api/admin/v2/orderbook ``` Parameters: | Name | Type | Mandatory | Description | |:-------|:-------|:-------|:-------| | pair | STRING | NO | If pair is set, only cancel orders for that pair. | Response: ``` 200 OK ``` ## WEBSOCKET API ### General API Information - API Key를 사용하여 다음 주소로 연결 합니다. `/ws/{API_KEY}` - 유저 데이터는 구독하지 않아도 전송되며 마켓 데이터(오더북, 체결내역)는 페어별로 구독한 채널의 정보만 전송 됩니다. - Subscribe to a stream ``` { "type": "subscribe", "channels": ["BTC-USDT@OrderBook", "BTC-USDT@Trades"] } ``` Market Data -------------------- #### Order book Sent every time the order book is changed. ``` { "channel":"OrderBook", "pair":"BTC-USDT", "eventTime":1603959851584, "data":{ "lastUpdatedId":1603959851584, "asks":[ { "price":8690.2900, "amount":1.67515100 } ], "bids":[ { "price":8660.2200, "amount":0.02436300 } ] } ``` #### Market Trades Sent with every transaction. ``` { "channel":"Trades", "pair":"BTC-USDT", "eventTime":1603960052445, "data":{ "tradeId":1603958263038, "price":8659.6900, "amount":0.97563700, "buyerOrderId":1603958263021, "sellerOrderId":1603958263036, "tradeTime":1603960052409, "isTheBuyerTheMarketMaker":true } } ``` User Data --------------- #### Order Update Sent whenever an order changes. (execcutionType: `NEW` `TRADE` `CANCELED`) ``` { "channel" : "OrderUpdate", "pair" : "BTC-USDT", "eventTime" : 1603960052437, "data" : { "orderId" : 1603958263036, "clientOrderId" : "1603960032436", "orderSide" : "SELL", "orderType" : "LIMIT", "timeInForce" : "GTC", "orderAmount" : 1, "orderPrice" : 4000, "executionType" : "TRADE", "orderStatus" : "FILLED", "executedAmount" : 0.97563700, "excutedPrice" : 8659.6900, "feeAmount" : 0E-12, "feeAsset" : "USDT", "transactionTime" : 1603960052409, "tradeId" : 1603958263038 } } ``` <file_sep>package com.linebizplus.exchange.virtual.classification import java.math.BigDecimal const val HEADER_API_KEY = "X-API-KEY" // WebSocket Event Name const val TRADE_CHANNEL = "Trades" const val ORDERBOOK_CHANNEL = "OrderBook" const val ORDER_UPDATE_CHANNEL = "OrderUpdate" val MAKER_FEE_RATE = BigDecimal(0.0) val TAKER_FEE_RATE = BigDecimal(0.0) <file_sep>package com.linebizplus.exchange.virtual.classification enum class OrderType { LIMIT, MARKET } <file_sep>package com.linebizplus.exchange.virtual.dto.response import com.linebizplus.exchange.virtual.dto.Order import com.linebizplus.exchange.virtual.dto.Transaction data class AddOrderResponse(val order: Order, val transactions: List<Transaction>?) <file_sep>package com.linebizplus.exchange.virtual.entities import org.jetbrains.exposed.sql.Table object BalanceTable : Table("balance") { private val id = long("id").autoIncrement() val memberId = (long("member_id") references MemberTable.id) val asset = varchar("asset", 5) val amount = decimal("amount", 20, 8) val locked = decimal("locked", 20, 8) init { index(true, memberId, asset) } override val primaryKey = PrimaryKey(id) } <file_sep>package com.linebizplus.exchange.virtual.services import com.linebizplus.exchange.virtual.model.Subscriber import io.ktor.http.cio.websocket.* import java.util.concurrent.ConcurrentHashMap object WebSocketFeedService { private val subscribers = ConcurrentHashMap<String, Subscriber>() fun join(socketId: String, socket: WebSocketSession) { subscribers[socketId] = Subscriber(socket) } fun leave(socketId: String) { subscribers.remove(socketId) } fun subscribe(socketId: String, channels: List<String>) { channels.forEach { subscribers[socketId]?.subscribe(it) } } fun unsubscribe(socketId: String, channels: List<String>) { channels.forEach { subscribers[socketId]?.unsubscribe(it) } } suspend fun <T> send(socketId: String, value: T) { subscribers[socketId]?.send(value) } suspend fun <T> broadcast(channel: String, value: T) { subscribers.values.forEach { if (it.channels.contains(channel)) { it.send(value) } } } } <file_sep>package com.linebizplus.exchange.virtual.services import com.linebizplus.exchange.virtual.classification.* import com.linebizplus.exchange.virtual.components.query import com.linebizplus.exchange.virtual.configuration.AppConfig import com.linebizplus.exchange.virtual.dto.Order import com.linebizplus.exchange.virtual.dto.Transaction import com.linebizplus.exchange.virtual.dto.request.AddOrderRequestDto import com.linebizplus.exchange.virtual.dto.streams.OrderUpdateStream import com.linebizplus.exchange.virtual.dto.streams.OrderbookStream import com.linebizplus.exchange.virtual.dto.streams.TradeStream import com.linebizplus.exchange.virtual.dto.streams.WebSocketStream import com.linebizplus.exchange.virtual.entities.BalanceTable import com.linebizplus.exchange.virtual.entities.OrderTable import com.linebizplus.exchange.virtual.entities.TransactionTable import com.linebizplus.exchange.virtual.exceptions.CommonException import com.linebizplus.exchange.virtual.extensions.* import com.linebizplus.exchange.virtual.model.Member import com.linebizplus.exchange.virtual.model.Orderbook import io.ktor.util.* import org.jetbrains.exposed.exceptions.ExposedSQLException import org.jetbrains.exposed.sql.* import java.math.BigDecimal import java.time.Instant object OrderService { private val orderbooks = mutableMapOf<String, Orderbook>() @KtorExperimentalAPI suspend fun reset() { val pairs = AppConfig.Service.pairs for (pair in pairs) { orderbooks[pair] = Orderbook(pair) } // 체결되지 않은 주문이 있다면 모두 취소 val openOrders = mutableListOf<Order>() query { openOrders.addAll( OrderTable.select { (OrderTable.status.eq(OrderStatus.NEW) or OrderTable.status.eq(OrderStatus.PARTIAL)) }.map { Order( it[OrderTable.pair], it[OrderTable.memberId], it[OrderTable.clientOrderId], it[OrderTable.orderId], it[OrderTable.price], it[OrderTable.origQty], it[OrderTable.remainQty], it[OrderTable.status], it[OrderTable.type], it[OrderTable.side], it[OrderTable.timeInForce], it[OrderTable.openedTime].toEpochMilli(), it[OrderTable.lastTradeTime]?.toEpochMilli() ) }) } openOrders.forEach { val member = MemberService.getMemberById(it.memberId) if (member != null) { cancelOrderQuery(it) } } } /** * 관리자 계정으로 주문 생성 * 기존 주문들은 모두 취소한다. */ suspend fun initializeOrdersByAdmin( admin: Member, pair: String, asks: List<List<BigDecimal>>, bids: List<List<BigDecimal>> ) { // 기존 주문들은 모두 취소 cancelAllOrdersByPair(pair) asks.forEach { val price = it[0] val amount = it[1] addOrder( admin, AddOrderRequestDto( TimeInForce.GTC, pair, OrderSide.SELL, OrderType.LIMIT, amount, price ) ) } bids.forEach { val price = it[0] val amount = it[1] addOrder( admin, AddOrderRequestDto( TimeInForce.GTC, pair, OrderSide.BUY, OrderType.LIMIT, amount, price ) ) } } suspend fun cancelAllOrders() { orderbooks.forEach { cancelAllOrdersByPair(it.key) } } suspend fun cancelAllOrdersByPair(pair: String) { orderbooks[pair]?.asks?.forEach { askSpread -> askSpread.value.forEach { val member = MemberService.getMemberById(it.memberId) if (member != null) { cancelOrderQuery(it) member.cancelOrder(it) } } } orderbooks[pair]?.bids?.forEach { bidSpread -> bidSpread.value.forEach { val member = MemberService.getMemberById(it.memberId) if (member != null) { cancelOrderQuery(it) member.cancelOrder(it) } } } orderbooks[pair]?.asks?.clear() orderbooks[pair]?.bids?.clear() } fun getOrderbookSnapshot(pair: String): OrderbookStream = orderbooks[pair]?.createSnapshot() ?: throw IllegalArgumentException("Invalid pair: $pair") suspend fun addOrder(member: Member, req: AddOrderRequestDto): Pair<Order, List<Transaction>?> { if (req.amount <= BigDecimal.ZERO) { throw CommonException(Error.INVALID_ORDER_AMOUNT) } if (!isEnoughBalance(member, req.pair, req.side, req.type, req.price, req.amount)) { throw CommonException(Error.NOT_ENOUGH_BALANCE) } if (req.type == OrderType.LIMIT && req.price == null) { throw CommonException(Error.REQUIRED_PARAMETER) } if (req.clientOrderId != null && member.findOpenOrderByClientOrderId(req.clientOrderId) != null) { throw CommonException(Error.DUPLICATE_CLIENT_ORDER_ID) } val orderbook = orderbooks[req.pair] ?: throw CommonException(Error.INVALID_PAIR) val order = Order( req.pair, member.id, req.clientOrderId, generateOrderId(), req.price, req.amount, req.amount, OrderStatus.NEW, req.type, req.side, req.timeInForce, Instant.now().toEpochMilli() ) query { addOrderQuery(order) if (order.type == OrderType.LIMIT) { when (order.side) { OrderSide.BUY -> { lockBalance(order.memberId, order.pair.quoteAsset(), order.price!! * order.amount) } OrderSide.SELL -> { lockBalance(order.memberId, order.pair.baseAsset(), order.amount) } } } } // 주문접수 알림 member.notify( ORDER_UPDATE_CHANNEL, order.pair, OrderUpdateStream( order.pair, order.orderId, order.clientOrderId, order.side, order.type, order.timeInForce, order.amount, order.price, ExecutionType.NEW, OrderStatus.NEW ) ) return when (order.type) { OrderType.LIMIT -> { when (order.side) { OrderSide.BUY -> { limitBuy(member, order, orderbook) } OrderSide.SELL -> { limitSell(member, order, orderbook) } } } OrderType.MARKET -> { when (order.side) { OrderSide.BUY -> marketBuy(member, order, orderbook) OrderSide.SELL -> marketSell(member, order, orderbook) } } } } suspend fun cancelOrderByOrderId(member: Member, orderId: Long): Order { val order = member.findOpenOrderByOrderId(orderId) ?: throw CommonException(Error.NOT_FOUND_ORDER) val orderbook = orderbooks[order.pair] ?: throw CommonException(Error.INVALID_PAIR) cancelOrderQuery(order) orderbook.removeOrder(order) member.cancelOrder(order) return order } suspend fun cancelOrderByClientOrderId(member: Member, clientOrderId: String): Order { val order = member.findOpenOrderByClientOrderId(clientOrderId) ?: throw CommonException(Error.NOT_FOUND_ORDER) return cancelOrderByOrderId(member, order.orderId) } private suspend fun limitBuy( member: Member, order: Order, orderbook: Orderbook ): Pair<Order, List<Transaction>?> { return if ( order.timeInForce != TimeInForce.IOC && (!orderbook.asks.any() || order.price!! < orderbook.asks.firstKey()) ) { orderbook.addOrder(order) member.addOrder(order) Pair(order, null) } else { val transactions = tryExecute(member, order, orderbook) Pair(order, transactions) } } private suspend fun limitSell( member: Member, order: Order, orderbook: Orderbook ): Pair<Order, List<Transaction>?> { return if (order.timeInForce != TimeInForce.IOC && (!orderbook.bids.any() || order.price!! > orderbook.bids.firstKey()) ) { orderbook.addOrder(order) member.addOrder(order) Pair(order, null) } else { val transactions = tryExecute(member, order, orderbook) Pair(order, transactions) } } private suspend fun marketBuy( member: Member, order: Order, orderbook: Orderbook ): Pair<Order, List<Transaction>?> { val transactions = tryExecute(member, order, orderbook) return Pair(order, transactions) } private suspend fun marketSell( member: Member, order: Order, orderbook: Orderbook ): Pair<Order, List<Transaction>?> { val transactions = tryExecute(member, order, orderbook) return Pair(order, transactions) } /** * */ private suspend fun tryExecute( taker: Member, takerOrder: Order, orderbook: Orderbook ): List<Transaction> { val spreads: MutableMap<BigDecimal, MutableList<Order>> = if (takerOrder.side == OrderSide.BUY) orderbook.asks else orderbook.bids // 오더북에서 삭제할 주문들(주문이 모두 체결되어 수량이 0이 됨) val toRemove = mutableListOf<Order>() // 테이커 주문의 체결 내역 val takerTransactions = arrayListOf<Transaction>() spreads.forEach SPREAD_LOOP@{ spread -> if (takerOrder.remainAmount.isZero()) { return@SPREAD_LOOP } val price = spread.key val makerOrders = spread.value.filter { it.remainAmount > BigDecimal.ZERO } /* 시장가 주문: 요청한 수량을 모두 체결할 때까지 순차적으로 호가 탐색 지정가 매도: 지정가보다 큰 호가까지 순차적으로 탐색 지정가 매수: 지정가보다 작은 호가까지 순차적으로 탐색 */ if (takerOrder.type == OrderType.MARKET || (takerOrder.side == OrderSide.SELL && takerOrder.price!! <= price) || (takerOrder.side == OrderSide.BUY && takerOrder.price!! >= price) ) { makerOrders.forEach { makerOrder -> val maker = MemberService.getMemberById(makerOrder.memberId) ?: throw CommonException(Error.NOT_FOUND_MAKER) val amount = makerOrder.remainAmount.min(takerOrder.remainAmount) // 체결수량 val tradeId = generateTradeId() val now = Instant.now() val makerTransaction = createTransaction( makerOrder, Liquidity.MAKER, takerOrder.orderId, price, amount, tradeId, now ) val takerTransaction = createTransaction( takerOrder, Liquidity.TAKER, makerOrder.orderId, price, amount, tradeId, now ) query { execute(now, makerOrder, makerTransaction) execute(now, takerOrder, takerTransaction) } orderbook.matchOrder(makerOrder, takerOrder, amount) // 메이커 체결 maker.onTransaction(makerOrder, makerTransaction) // 테이커 체결 taker.onTransaction(takerOrder, takerTransaction) // 주문 응답에 제공하기 위한 데이터 takerTransactions.add(takerTransaction) if (makerOrder.remainAmount <= BigDecimal.ZERO) { toRemove.add(makerOrder) } } } } // 오더북 물량이 부족해서 모든 물량을 체결시키지 못했을 때 if (BigDecimal.ZERO < takerOrder.remainAmount && takerOrder.timeInForce == TimeInForce.GTC) { // 남은 물량을 오더북에 추가 orderbook.addOrder(takerOrder) taker.addOrder(takerOrder) } else if (takerOrder.timeInForce == TimeInForce.IOC || takerOrder.type == OrderType.MARKET) { // 남은 물량은 취소 taker.cancelOrder(takerOrder) } // 모두 체결된 주문은 오더북에서 제거 toRemove.forEach { orderbook.removeOrder(it) } takerTransactions.forEach { val now = Instant.now().toEpochMilli() val buyerOrderId = if (takerOrder.side == OrderSide.BUY) takerOrder.orderId else it.relatedOrderId val sellerOrderId = if (takerOrder.side == OrderSide.SELL) takerOrder.orderId else it.relatedOrderId // 테이커의 주문이 매도주문이면, 메이커의 주문은 매수주문이 된다. val isTheBuyerTheMarketMaker = (it.side == OrderSide.SELL && it.liquidity == Liquidity.TAKER) val stream = WebSocketStream( TRADE_CHANNEL, it.pair, now, TradeStream( it.pair, it.tradeId, it.price, it.amount, buyerOrderId, sellerOrderId, it.executedTime, isTheBuyerTheMarketMaker ) ) WebSocketFeedService.broadcast("${it.pair}@$TRADE_CHANNEL", stream) } return takerTransactions } private fun createTransaction( order: Order, liquidity: Liquidity, relatedOrderId: Long, matchPrice: BigDecimal, matchAmount: BigDecimal, tradeId: Long, now: Instant ): Transaction { val feeRate = if (liquidity == Liquidity.MAKER) MAKER_FEE_RATE else TAKER_FEE_RATE val fee = if (order.side == OrderSide.SELL) feeRate * matchAmount * matchPrice else feeRate * matchAmount val feeAsset = if (order.side == OrderSide.BUY) order.pair.baseAsset() else order.pair.quoteAsset() return Transaction( order.pair, order.memberId, tradeId, order.orderId, order.clientOrderId, relatedOrderId, now.toEpochMilli(), matchPrice, matchAmount, order.side, fee, feeAsset, liquidity ) } /** * 주문 생성 */ private fun addOrderQuery(order: Order) { try { OrderTable.insert { it[pair] = order.pair it[memberId] = order.memberId it[orderId] = order.orderId it[clientOrderId] = order.clientOrderId it[price] = order.price it[origQty] = order.amount it[remainQty] = order.amount it[status] = order.status it[type] = order.type it[side] = order.side it[timeInForce] = order.timeInForce it[openedTime] = Instant.ofEpochMilli(order.openedTime) } } catch (e: ExposedSQLException) { e.message?.contains("Duplicate")?.let { if (it) { throw CommonException(Error.DUPLICATE_CLIENT_ORDER_ID) } } throw e } } /** * 거래 체결 * * @param order 원주문 * @param now 체결시간 */ private fun execute( now: Instant, order: Order, transaction: Transaction ) { insertTradeQuery(now, transaction) updateOrderQuery(order, transaction.amount, now) updateBalanceQuery(order, transaction.price, transaction.amount, transaction.fee) } private suspend fun cancelOrderQuery(order: Order) { query { OrderTable.update({ OrderTable.orderId eq order.orderId }) { it[status] = OrderStatus.CANCELED it[canceledTime] = Instant.now() } order.status = OrderStatus.CANCELED order.canceledTime = Instant.now().toEpochMilli() if (order.type == OrderType.LIMIT) { when (order.side) { OrderSide.BUY -> { unlockBalance( order.memberId, order.pair.quoteAsset(), order.remainAmount * order.price!! ) } OrderSide.SELL -> { unlockBalance(order.memberId, order.pair.baseAsset(), order.remainAmount) } } } } } /** * 거래정보 추가 */ private fun insertTradeQuery( now: Instant, transaction: Transaction ) { TransactionTable.insert { it[tradeId] = transaction.tradeId it[orderId] = transaction.orderId it[clientOrderId] = transaction.clientOrderId it[relatedOrderId] = transaction.relatedOrderId it[memberId] = transaction.memberId it[pair] = transaction.pair it[side] = transaction.side it[price] = transaction.price it[amount] = transaction.amount it[feeCurrency] = transaction.feeAsset it[fee] = transaction.fee it[executedTime] = now it[liquidity] = transaction.liquidity } } /** * 주문상태 업데이트(남은수량, 주문상태) * @param order 원주문 * @param amount 체결수량 * @param now 체결시간 */ private fun updateOrderQuery(order: Order, amount: BigDecimal, now: Instant) { OrderTable.update({ OrderTable.orderId eq order.orderId }) { it[remainQty] = order.remainAmount - amount it[status] = if ((order.remainAmount - amount).isZero()) OrderStatus.FILLED else OrderStatus.PARTIAL it[lastTradeTime] = now } } /** * 잔고 업데이트 * * @param order 원주문 * @param price 체결가격 * @param amount 체결수량 */ private fun updateBalanceQuery(order: Order, price: BigDecimal, amount: BigDecimal, fee: BigDecimal) { val baseAsset = order.pair.baseAsset() val quoteAsset = order.pair.quoteAsset() when (order.side) { OrderSide.BUY -> { BalanceTable.update({ (BalanceTable.memberId eq order.memberId) and (BalanceTable.asset eq baseAsset) }) { with(SqlExpressionBuilder) { it.update(BalanceTable.amount, BalanceTable.amount + (amount - fee)) } } BalanceTable.update({ (BalanceTable.memberId eq order.memberId) and (BalanceTable.asset eq quoteAsset) }) { with(SqlExpressionBuilder) { it.update(BalanceTable.amount, BalanceTable.amount - (price * amount)) } } if (order.type == OrderType.LIMIT) { unlockBalance(order.memberId, quoteAsset, price * amount) } } OrderSide.SELL -> { BalanceTable.update({ (BalanceTable.memberId eq order.memberId) and (BalanceTable.asset eq baseAsset) }) { with(SqlExpressionBuilder) { it.update(BalanceTable.amount, BalanceTable.amount - amount) } } BalanceTable.update({ (BalanceTable.memberId eq order.memberId) and (BalanceTable.asset eq quoteAsset) }) { with(SqlExpressionBuilder) { it.update(BalanceTable.amount, BalanceTable.amount + (price * amount - fee)) } } if (order.type == OrderType.LIMIT) { unlockBalance(order.memberId, baseAsset, amount) } } } } private fun lockBalance(memberId: Long, asset: String, amount: BigDecimal) { BalanceTable.update({ (BalanceTable.memberId eq memberId) and (BalanceTable.asset eq asset) }) { with(SqlExpressionBuilder) { it.update(locked, locked + amount) } } MemberService.getMemberById(memberId)?.lockBalance(asset, amount) } private fun unlockBalance(memberId: Long, asset: String, amount: BigDecimal) { BalanceTable.update({ (BalanceTable.memberId eq memberId) and (BalanceTable.asset eq asset) }) { with(SqlExpressionBuilder) { it.update(locked, locked - amount) } } MemberService.getMemberById(memberId)?.unlockBalance(asset, amount) } /** * 유저의 잔고가 거래하기 충분한지 체크 * @param member 사용자 * @param pair 페어 * @param side 매수, 매도 * @param type 지정가, 시장가 * @param price 요청가격 * @param amount 요청수량 */ private fun isEnoughBalance( member: Member, pair: String, side: OrderSide, type: OrderType, price: BigDecimal?, amount: BigDecimal ): Boolean { val baseAssetBalance = member.getAvailableBalance(pair.baseAsset()) val quoteAssetBalance = member.getAvailableBalance(pair.quoteAsset()) return when (side) { OrderSide.SELL -> baseAssetBalance >= amount OrderSide.BUY -> { return when (type) { OrderType.LIMIT -> { quoteAssetBalance >= price!! * amount } OrderType.MARKET -> { quoteAssetBalance >= getOrderbookSnapshot(pair).asks.first().price * amount } } } } } } <file_sep>val ktorVersion: String by project val kotlinVersion: String by project val logbackVersion: String by project val exposedVersion: String by project val mysqlVersion: String by project val hikaricpVersion: String by project plugins { application kotlin("jvm") version "1.4.10" } group = "com.linebizplus.exchange.virtual" version = "0.0.1" application { mainClassName = "com.linebizplus.exchange.virtual.ApplicationKt" } repositories { mavenLocal() jcenter() maven { url = uri("https://kotlin.bintray.com/ktor") } } dependencies { implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion") implementation("io.ktor:ktor-server-netty:$ktorVersion") implementation("ch.qos.logback:logback-classic:$logbackVersion") implementation("io.ktor:ktor-server-core:$ktorVersion") implementation("io.ktor:ktor-websockets:$ktorVersion") implementation("io.ktor:ktor-jackson:$ktorVersion") implementation("org.jetbrains.exposed:exposed-core:$exposedVersion") implementation("org.jetbrains.exposed:exposed-dao:$exposedVersion") implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion") implementation("org.jetbrains.exposed:exposed-java-time:$exposedVersion") implementation("mysql:mysql-connector-java:$mysqlVersion") implementation("com.zaxxer:HikariCP:$hikaricpVersion") testImplementation("io.ktor:ktor-server-tests:$ktorVersion") } kotlin.sourceSets["main"].kotlin.srcDirs("src") kotlin.sourceSets["test"].kotlin.srcDirs("test") sourceSets["main"].resources.srcDirs("resources") sourceSets["test"].resources.srcDirs("testresources") tasks.withType<Jar> { manifest { attributes["Main-Class"] = "com.linebizplus.exchange.virtual.ApplicationKt" } // To add all of the dependencies from(sourceSets.main.get().output) dependsOn(configurations.runtimeClasspath) from({ configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) } }) } tasks.register<Copy>("deploy") { from(file("./build/libs/virtual-exchange-${version}.jar".replace("\'", ""))) rename { "virtual-exchange.jar" } into("./build/libs") } <file_sep>package com.linebizplus.exchange.virtual.classification enum class TimeInForce { GTC, IOC, FOK, } <file_sep>rootProject.name = "virtual-exchange" <file_sep>package com.linebizplus.exchange.virtual.configuration import com.linebizplus.exchange.virtual.extensions.getBoolean import com.linebizplus.exchange.virtual.extensions.getInt import com.typesafe.config.ConfigFactory import io.ktor.config.* import io.ktor.util.* @KtorExperimentalAPI object AppConfig { private lateinit var appConfig: HoconApplicationConfig fun loadConfig(profile: String?) { val url = javaClass.classLoader.getResource("application.$profile.conf") val fileConfig = url?.let { println("config -> $url") ConfigFactory.parseURL(url) } ?: ConfigFactory.load() appConfig = HoconApplicationConfig(fileConfig) } object Database { private val host = appConfig.property("ktor.database.host").getString() private val port = appConfig.property("ktor.database.port").getInt() private val schema = appConfig.property("ktor.database.schema").getString() private val properties = appConfig.property("ktor.database.properties").getList() val jdbcUrl = "jdbc:mysql://$host:$port/$schema?${properties.joinToString("&") { it }}" val driverClassName = appConfig.property("ktor.database.driverClassName").getString() val maximumPoolSize = appConfig.property("ktor.database.maximumPoolSize").getInt() val isAutoCommit = appConfig.property("ktor.database.isAutoCommit").getBoolean() val username = appConfig.property("ktor.database.username").getString() val password = appConfig.property("ktor.database.password").getString() val transactionIsolation = appConfig.property("ktor.database.transactionIsolation").getString() } object Service { val pairs = appConfig.property("ktor.service.pairs").getList() } } <file_sep>package com.linebizplus.exchange.virtual.components import com.fasterxml.jackson.databind.SerializationFeature import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fasterxml.jackson.module.kotlin.readValue object JsonComponent { val mapper = jacksonObjectMapper() init { mapper.enable(SerializationFeature.INDENT_OUTPUT) } } fun <T> serialize(value: T): String { return JsonComponent.mapper.writeValueAsString(value) } inline fun <reified T> deserialize(json: String): T { return JsonComponent.mapper.readValue(json) } <file_sep>package com.linebizplus.exchange.virtual.services import com.linebizplus.exchange.virtual.components.query import com.linebizplus.exchange.virtual.entities.BalanceTable import com.linebizplus.exchange.virtual.entities.MemberTable import com.linebizplus.exchange.virtual.model.Member import org.jetbrains.exposed.sql.selectAll object MemberService { private val members = mutableMapOf<Long, Member>() /** * DB에서 회원정보를 모두 불러온다 */ suspend fun initialize() { query { MemberTable.selectAll().map { members[it[MemberTable.id]] = Member(it[MemberTable.id], it[MemberTable.name], it[MemberTable.apiKey]) } BalanceTable.selectAll().map { members[it[BalanceTable.memberId]]?.initializeBalance( it[BalanceTable.asset], it[BalanceTable.amount], it[BalanceTable.locked] ) } } } fun getMemberById(id: Long) = members[id] fun getMemberByApiKey(apiKey: String) = members.values.find { it.apiKey == apiKey } fun addWebSocket(memberId: Long, socketId: String) { members[memberId]?.addSocketId(socketId) } fun removeWebSocket(memberId: Long, socketId: String) { members[memberId]?.removeSocketId(socketId) } } <file_sep>package com.linebizplus.exchange.virtual.exceptions import com.linebizplus.exchange.virtual.classification.Error class CommonException(val error: Error) : Exception() <file_sep>package com.linebizplus.exchange.virtual.dto.streams import com.linebizplus.exchange.virtual.classification.* import java.math.BigDecimal data class OrderUpdateStream( val pair: String, val orderId: Long, val clientOrderId: String?, val side: OrderSide, val type: OrderType, val timeInForce: TimeInForce, val orderAmount: BigDecimal, val orderPrice: BigDecimal?, val executionType: ExecutionType, val orderStatus: OrderStatus, val executedAmount: BigDecimal = BigDecimal.ZERO, val excutedPrice: BigDecimal = BigDecimal.ZERO, val feeAmount: BigDecimal = BigDecimal.ZERO, val feeAsset: String? = null, val tradeTime: Long? = null, val tradeId: Long? = null, val liquidity: Liquidity? = null ) <file_sep>package com.linebizplus.exchange.virtual.classification enum class Liquidity { TAKER, MAKER } <file_sep>package com.linebizplus.exchange.virtual.classification enum class OrderSide { BUY, SELL } <file_sep>package com.linebizplus.exchange.virtual.dto data class WebSocketFeed(val type: String, val channels: List<String>) <file_sep>package com.linebizplus.exchange.virtual.routes import com.linebizplus.exchange.virtual.classification.Error import com.linebizplus.exchange.virtual.exceptions.CommonException import com.linebizplus.exchange.virtual.model.Member import com.linebizplus.exchange.virtual.services.MemberService import io.ktor.application.* import io.ktor.http.* import io.ktor.response.* fun validateParameter(queryParameters: Parameters, parameter: String): String { return queryParameters[parameter] ?: throw CommonException(Error.REQUIRED_PARAMETER) } fun validateMember(apiKey: String?): Member { apiKey ?: throw CommonException(Error.INVALID_API_KEY) return MemberService.getMemberByApiKey(apiKey) ?: throw CommonException(Error.INVALID_API_KEY) } suspend fun errorRespond(call: ApplicationCall, error: Error) { val httpStatusCode = when (error) { Error.INVALID_API_KEY, Error.PERMISSION_DENIED -> HttpStatusCode.Unauthorized else -> HttpStatusCode.BadRequest } call.respond(httpStatusCode, object { val code = error.code val message = error.message }) } <file_sep>package com.linebizplus.exchange.virtual.components import com.linebizplus.exchange.virtual.configuration.AppConfig import com.linebizplus.exchange.virtual.entities.BalanceTable import com.linebizplus.exchange.virtual.entities.MemberTable import com.linebizplus.exchange.virtual.entities.OrderTable import com.linebizplus.exchange.virtual.entities.TransactionTable import com.zaxxer.hikari.HikariConfig import com.zaxxer.hikari.HikariDataSource import io.ktor.util.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.SchemaUtils.create import org.jetbrains.exposed.sql.transactions.transaction object DatabaseComponent { @KtorExperimentalAPI fun init() { Database.connect(HikariDataSource(hikariConfig())) println("connected") transaction { // create table if not exists create(OrderTable) create(BalanceTable) create(MemberTable) create(TransactionTable) } } } @KtorExperimentalAPI private fun hikariConfig() = HikariConfig().apply { driverClassName = AppConfig.Database.driverClassName jdbcUrl = AppConfig.Database.jdbcUrl maximumPoolSize = AppConfig.Database.maximumPoolSize isAutoCommit = AppConfig.Database.isAutoCommit username = AppConfig.Database.username password = AppConfig.Database.password transactionIsolation = AppConfig.Database.transactionIsolation validate() } suspend fun <T> query(block: () -> T): T = withContext(Dispatchers.IO) { transaction { block() } } <file_sep>package com.linebizplus.exchange.virtual.model import com.linebizplus.exchange.virtual.classification.* import com.linebizplus.exchange.virtual.components.query import com.linebizplus.exchange.virtual.dto.Order import com.linebizplus.exchange.virtual.dto.Transaction import com.linebizplus.exchange.virtual.dto.streams.OrderUpdateStream import com.linebizplus.exchange.virtual.dto.streams.WebSocketStream import com.linebizplus.exchange.virtual.entities.BalanceTable import com.linebizplus.exchange.virtual.entities.OrderTable import com.linebizplus.exchange.virtual.entities.TransactionTable import com.linebizplus.exchange.virtual.exceptions.CommonException import com.linebizplus.exchange.virtual.extensions.baseAsset import com.linebizplus.exchange.virtual.extensions.isZero import com.linebizplus.exchange.virtual.extensions.quoteAsset import com.linebizplus.exchange.virtual.services.WebSocketFeedService import org.jetbrains.exposed.sql.* import java.math.BigDecimal import java.time.Instant class Member(val id: Long, val name: String, val apiKey: String?) { private val socketIds = mutableListOf<String>() private val balances = mutableMapOf<String, Balance>() private val openOrders = mutableMapOf<Long, Order>() private val clientOrderIds = mutableMapOf<String, Long>() fun addSocketId(socketId: String) { socketIds.add(socketId) } fun removeSocketId(socketId: String) { socketIds.remove(socketId) } fun initializeBalance(asset: String, available: BigDecimal, holds: BigDecimal) { balances[asset] = Balance(asset, available, holds) } fun getAvailableBalance(asset: String): BigDecimal { return balances[asset]?.available ?: BigDecimal.ZERO } fun getBalance(asset: String?): List<Balance> { return if (asset != null) { balances.values.filter { it.asset == asset } } else { balances.values.toList() } } fun lockBalance(asset: String, amount: BigDecimal) { balances[asset]?.locked = balances[asset]?.locked?.plus(amount)!! } fun unlockBalance(asset: String, amount: BigDecimal) { balances[asset]?.locked = balances[asset]?.locked?.minus(amount)!! } suspend fun deposit(asset: String, amount: BigDecimal): Balance { if (!balances.containsKey(asset)) { throw CommonException(Error.INVALID_ASSET) } query { BalanceTable.update({ BalanceTable.memberId eq id and (BalanceTable.asset eq asset) }) { with(SqlExpressionBuilder) { it.update(BalanceTable.amount, BalanceTable.amount + amount) } } } balances[asset]?.amount = balances[asset]!!.amount.plus(amount) return balances[asset]!! } suspend fun withdrawal(asset: String, amount: BigDecimal): Balance { if (!balances.containsKey(asset)) { throw CommonException(Error.INVALID_ASSET) } val available = balances[asset]?.available ?: BigDecimal.ZERO if (available < amount) { throw CommonException(Error.NOT_ENOUGH_BALANCE) } query { BalanceTable.update({ BalanceTable.memberId eq id and (BalanceTable.asset eq asset) }) { with(SqlExpressionBuilder) { it.update(BalanceTable.amount, BalanceTable.amount - amount) } } } balances[asset]?.amount = balances[asset]!!.amount.minus(amount) return balances[asset]!! } fun addOrder(order: Order) { openOrders.putIfAbsent(order.orderId, order) if (order.clientOrderId != null) { clientOrderIds[order.clientOrderId] = order.orderId } } suspend fun cancelOrder(order: Order) { openOrders.remove(order.orderId) clientOrderIds.remove(order.clientOrderId) notify( ORDER_UPDATE_CHANNEL, order.pair, OrderUpdateStream( order.pair, order.orderId, order.clientOrderId, order.side, order.type, order.timeInForce, order.amount, order.price, ExecutionType.CANCELED, order.status ) ) } fun getOpenOrders(pair: String?): List<Order> { return if (pair != null) { openOrders.values.filter { it.pair == pair } } else { openOrders.values.toList() } } suspend fun getTrades( pair: String, fromId: Long?, start: Instant?, end: Instant?, limit: Int, ): List<Transaction> { return query { val condition = when { fromId != null && start != null && end != null -> { Op.build { (TransactionTable.memberId eq id) and (TransactionTable.pair eq pair) and (TransactionTable.tradeId greaterEq fromId) and (TransactionTable.executedTime greaterEq start) and (TransactionTable.executedTime lessEq end) } } fromId != null && start != null -> { Op.build { (TransactionTable.memberId eq id) and (TransactionTable.pair eq pair) and (TransactionTable.tradeId greaterEq fromId) and (TransactionTable.executedTime greaterEq start) } } fromId != null && end != null -> { Op.build { (TransactionTable.memberId eq id) and (TransactionTable.pair eq pair) and (TransactionTable.tradeId greaterEq fromId) and (TransactionTable.executedTime lessEq end) } } fromId != null -> { Op.build { (TransactionTable.memberId eq id) and (TransactionTable.pair eq pair) and (TransactionTable.tradeId greaterEq fromId) } } start != null -> { Op.build { (TransactionTable.memberId eq id) and (TransactionTable.pair eq pair) and (TransactionTable.executedTime greaterEq start) } } end != null -> { Op.build { (TransactionTable.memberId eq id) and (TransactionTable.pair eq pair) and (TransactionTable.executedTime lessEq end) } } else -> Op.build { TransactionTable.memberId eq id and (TransactionTable.pair eq pair) } } return@query TransactionTable.select(condition).limit(limit) .orderBy(TransactionTable.tradeId to SortOrder.DESC).map { Transaction( it[TransactionTable.pair], it[TransactionTable.memberId], it[TransactionTable.tradeId], it[TransactionTable.orderId], it[TransactionTable.clientOrderId], it[TransactionTable.relatedOrderId], it[TransactionTable.executedTime].toEpochMilli(), it[TransactionTable.price], it[TransactionTable.amount], it[TransactionTable.side], it[TransactionTable.fee], it[TransactionTable.feeCurrency], it[TransactionTable.liquidity] ) } } } suspend fun findOrderByOrderId(orderId: Long): Order? { return query { return@query OrderTable.select { OrderTable.orderId eq orderId }.map { Order( it[OrderTable.pair], it[OrderTable.memberId], it[OrderTable.clientOrderId], it[OrderTable.orderId], it[OrderTable.price], it[OrderTable.origQty], it[OrderTable.remainQty], it[OrderTable.status], it[OrderTable.type], it[OrderTable.side], it[OrderTable.timeInForce], it[OrderTable.openedTime].toEpochMilli(), it[OrderTable.lastTradeTime]?.toEpochMilli() ) }.singleOrNull() } } suspend fun findOrderByOrderId(clientOrderId: String): Order? { val orderId = clientOrderIds[clientOrderId] return if (orderId == null) { null } else { findOrderByOrderId(orderId) } } fun findOpenOrderByOrderId(orderId: Long): Order? { return openOrders[orderId] } fun findOpenOrderByClientOrderId(clientOrderId: String): Order? { val orderId = clientOrderIds[clientOrderId] return if (orderId == null) { null } else { findOpenOrderByOrderId(orderId) } } suspend fun onTransaction(order: Order, transaction: Transaction) { val feeRate = if (transaction.liquidity == Liquidity.MAKER) MAKER_FEE_RATE else TAKER_FEE_RATE val fee = if (transaction.side == OrderSide.SELL) feeRate * transaction.amount * transaction.price else feeRate * transaction.amount val baseAsset = transaction.pair.baseAsset() val quoteAsset = transaction.pair.quoteAsset() when (transaction.side) { OrderSide.BUY -> { balances[baseAsset]?.amount = balances[baseAsset]?.amount?.plus(transaction.amount - fee)!! if (transaction.liquidity == Liquidity.MAKER) { balances[quoteAsset]?.locked = balances[quoteAsset]?.locked?.minus((transaction.price * transaction.amount))!! } } OrderSide.SELL -> { balances[quoteAsset]?.amount = balances[quoteAsset]?.amount?.plus((transaction.price * transaction.amount - fee))!! if (transaction.liquidity == Liquidity.MAKER) { balances[baseAsset]?.locked = balances[baseAsset]?.locked?.minus((transaction.amount))!! } } } order.status = if (order.remainAmount.isZero()) OrderStatus.FILLED else OrderStatus.PARTIAL if (order.status == OrderStatus.FILLED) { openOrders.remove(order.orderId) } val tradeStream = OrderUpdateStream( order.pair, order.orderId, order.clientOrderId, order.side, order.type, order.timeInForce, order.amount, order.price, ExecutionType.TRADE, order.status, transaction.amount, transaction.price, transaction.fee, transaction.feeAsset, transaction.executedTime, transaction.tradeId, transaction.liquidity ) notify(ORDER_UPDATE_CHANNEL, transaction.pair, tradeStream) } suspend fun <T> notify(channel: String, pair: String, data: T) { val now = Instant.now().toEpochMilli() val stream = WebSocketStream(channel, pair, now, data) socketIds.forEach { WebSocketFeedService.send(it, stream) } } } <file_sep>package com.linebizplus.exchange.virtual.model import com.linebizplus.exchange.virtual.components.serialize import io.ktor.http.cio.websocket.* import java.util.concurrent.CancellationException class Subscriber(private val session: WebSocketSession) { val channels = mutableListOf<String>() fun subscribe(channel: String) { channels.add(channel) } fun unsubscribe(channel: String) { channels.remove(channel) } suspend fun <T> send(value: T) { try { session.send(Frame.Text(serialize(value))) } catch (e: CancellationException) { println(e.message) } } } <file_sep>package com.linebizplus.exchange.virtual.routes import com.linebizplus.exchange.virtual.classification.* import com.linebizplus.exchange.virtual.dto.request.AddOrderRequestDto import com.linebizplus.exchange.virtual.dto.response.AddOrderResponse import com.linebizplus.exchange.virtual.exceptions.CommonException import com.linebizplus.exchange.virtual.services.OrderService import io.ktor.application.* import io.ktor.http.* import io.ktor.request.* import io.ktor.response.* import io.ktor.routing.* import java.math.BigDecimal import java.time.Instant import kotlin.math.min /** * 사용자 인증이 필요한 endpoint * 주문 및 계정 관리에 사용 * 모든 요청은 등록된 API Key를 통해서만 실행 가능 * * Content-Type: application/json */ fun Routing.privateRouter() { route("/api/v2") { post("/order") { try { val member = validateMember(call.request.header(HEADER_API_KEY)) val parameters = call.receiveParameters() val dto = validateOrder(parameters) val result = OrderService.addOrder(member, dto) val order = result.first val transactions = result.second call.respond(AddOrderResponse(order, transactions)) } catch (e: CommonException) { errorRespond(call, e.error) } } delete("/order") { try { val member = validateMember(call.request.header(HEADER_API_KEY)) val orderId = call.request.queryParameters["orderId"] if (orderId != null) { call.respond(OrderService.cancelOrderByOrderId(member, orderId.toLong())) } else { val clientOrderId = validateParameter(call.request.queryParameters, "clientOrderId") call.respond(OrderService.cancelOrderByClientOrderId(member, clientOrderId)) } } catch (e: CommonException) { errorRespond(call, e.error) } } get("/queryOrder") { try { val member = validateMember(call.request.header(HEADER_API_KEY)) val orderId = call.request.queryParameters["orderId"] if (orderId != null) { call.respond( member.findOrderByOrderId(orderId.toLong()) ?: throw CommonException(Error.NOT_FOUND_ORDER) ) } else { val clientOrderId = validateParameter(call.request.queryParameters, "clientOrderId") call.respond( member.findOrderByOrderId(clientOrderId) ?: throw CommonException(Error.NOT_FOUND_ORDER) ) } } catch (e: CommonException) { errorRespond(call, e.error) } } get("/openOrders") { val member = validateMember(call.request.header(HEADER_API_KEY)) val pair = call.request.queryParameters["pair"] call.respond(member.getOpenOrders(pair)) } get("/trades") { val member = validateMember(call.request.header(HEADER_API_KEY)) val pair = validateParameter(call.request.queryParameters, "pair") val fromId = call.request.queryParameters["fromId"] val startTime = call.request.queryParameters["startTime"] val endTime = call.request.queryParameters["endTime"] val limit = call.request.queryParameters["limit"] call.respond( member.getTrades( pair, fromId?.toLong(), startTime?.toLong()?.let { Instant.ofEpochMilli(it) }, endTime?.toLong()?.let { Instant.ofEpochMilli(it) }, limit?.toInt()?.let { min(it, 1000) } ?: 500 ) ) } get("/balances") { val member = validateMember(call.request.header(HEADER_API_KEY)) val asset = call.request.queryParameters["asset"] call.respond(member.getBalance(asset)) } post("/deposit") { try { val member = validateMember(call.request.header(HEADER_API_KEY)) val parameters = call.receiveParameters() val asset = validateParameter(parameters, "asset") val amount = validateParameter(parameters, "amount") call.respond(member.deposit(asset, BigDecimal(amount))) } catch (e: CommonException) { errorRespond(call, e.error) } } post("/withdrawal") { try { val member = validateMember(call.request.header(HEADER_API_KEY)) val parameters = call.receiveParameters() val asset = validateParameter(parameters, "asset") val amount = validateParameter(parameters, "amount") call.respond(member.withdrawal(asset, BigDecimal(amount))) } catch (e: CommonException) { errorRespond(call, e.error) } } } } private fun validateOrder(queryParameters: Parameters): AddOrderRequestDto { val pair = validateParameter(queryParameters, "pair") val side = validateParameter(queryParameters, "side") val type = validateParameter(queryParameters, "type") val amount = validateParameter(queryParameters, "amount") val price = validateParameter(queryParameters, "price") val timeInForce = queryParameters["timeInForce"] ?: "GTC" val clientOrderId = queryParameters["clientOrderId"] return AddOrderRequestDto( TimeInForce.valueOf(timeInForce.toUpperCase()), pair, OrderSide.valueOf(side.toUpperCase()), OrderType.valueOf(type.toUpperCase()), BigDecimal(amount), BigDecimal(price), clientOrderId ) } <file_sep>package com.linebizplus.exchange.virtual.dto.streams data class WebSocketStream<T>(val channel: String, val pair: String, val eventTime: Long, val data: T) <file_sep>package com.linebizplus.exchange.virtual.entities import org.jetbrains.exposed.sql.Table object MemberTable : Table("members") { val id = long("id").autoIncrement() val name = varchar("name", 255).uniqueIndex() val apiKey = varchar("api_key", 64).uniqueIndex().nullable() override val primaryKey = PrimaryKey(id) } <file_sep>package com.linebizplus.exchange.virtual.dto.request import com.linebizplus.exchange.virtual.classification.OrderSide import com.linebizplus.exchange.virtual.classification.OrderType import com.linebizplus.exchange.virtual.classification.TimeInForce import java.math.BigDecimal data class AddOrderRequestDto( val timeInForce: TimeInForce, val pair: String, val side: OrderSide, val type: OrderType, val amount: BigDecimal, val price: BigDecimal?, val clientOrderId: String? = null ) <file_sep>package com.linebizplus.exchange.virtual.dto.request data class CancelOrderRequest(val pair: String, val orderId: Long?, val clientOrderId: String?) <file_sep>package com.linebizplus.exchange.virtual.dto import com.linebizplus.exchange.virtual.classification.Liquidity import com.linebizplus.exchange.virtual.classification.OrderSide import java.math.BigDecimal data class Transaction( val pair: String, val memberId: Long, val tradeId: Long, val orderId: Long, val clientOrderId: String? = null, val relatedOrderId: Long, val executedTime: Long, val price: BigDecimal, val amount: BigDecimal, val side: OrderSide, val fee: BigDecimal, val feeAsset: String, val liquidity: Liquidity ) <file_sep>package com.linebizplus.exchange.virtual.routes import com.linebizplus.exchange.virtual.exceptions.CommonException import com.linebizplus.exchange.virtual.services.OrderService import io.ktor.application.* import io.ktor.response.* import io.ktor.routing.* /** * 인증 없이 호출 할 수 있는 endpoint */ fun Routing.publicRouter() { route("/api/v2") { get("/orderbook") { try { val pair = validateParameter(call.request.queryParameters, "pair") call.respond(OrderService.getOrderbookSnapshot(pair)) } catch (e: CommonException) { errorRespond(call, e.error) } } } } <file_sep>package com.linebizplus.exchange.virtual.classification enum class ExecutionType { NEW, CANCELED, REJECTED, TRADE, EXPIRED } <file_sep>package com.linebizplus.exchange.virtual.model import com.linebizplus.exchange.virtual.classification.ORDERBOOK_CHANNEL import com.linebizplus.exchange.virtual.classification.OrderSide import com.linebizplus.exchange.virtual.dto.Order import com.linebizplus.exchange.virtual.dto.Spread import com.linebizplus.exchange.virtual.dto.streams.OrderbookStream import com.linebizplus.exchange.virtual.dto.streams.WebSocketStream import com.linebizplus.exchange.virtual.extensions.sumByBigDecimal import com.linebizplus.exchange.virtual.services.WebSocketFeedService import java.math.BigDecimal import java.time.Instant class Orderbook(private val pair: String) { val asks = sortedMapOf<BigDecimal, MutableList<Order>>() val bids = sortedMapOf<BigDecimal, MutableList<Order>>(reverseOrder()) fun createSnapshot(): OrderbookStream { val lastUpdatedId = Instant.now().toEpochMilli() val asks = asks.map { ask -> Spread(ask.key, ask.value.sumByBigDecimal { it.remainAmount }) } val bids = bids.map { bid -> Spread(bid.key, bid.value.sumByBigDecimal { it.remainAmount }) } return OrderbookStream(lastUpdatedId, asks.sortedByDescending { it.price }, bids) } /** * Add the order to the order book. * * @param order Verified order */ suspend fun addOrder(order: Order) { if (order.price != null) { when (order.side) { OrderSide.BUY -> bids[order.price]?.add(order) ?: bids.put(order.price, mutableListOf(order)) OrderSide.SELL -> asks[order.price]?.add(order) ?: asks.put(order.price, mutableListOf(order)) } broadcastOrderbook() } } suspend fun matchOrder(makerOrder: Order, takerOrder: Order, matchAmount: BigDecimal) { takerOrder.remainAmount -= matchAmount makerOrder.remainAmount -= matchAmount broadcastOrderbook() } suspend fun removeOrder(order: Order) { val spreads = when (order.side) { OrderSide.SELL -> asks OrderSide.BUY -> bids } // 호가내에서 삭제 spreads[order.price]?.remove(order) // 오더북에서 해당 호가 삭제 if (!spreads[order.price]?.any()!!) { spreads.remove(order.price) } broadcastOrderbook() } private suspend fun broadcastOrderbook() { val now = Instant.now().toEpochMilli() val stream = WebSocketStream(ORDERBOOK_CHANNEL, pair, now, createSnapshot()) WebSocketFeedService.broadcast("$pair@$ORDERBOOK_CHANNEL", stream) } } <file_sep>package com.linebizplus.exchange.virtual.classification enum class Error(val message: String, val code: Int) { INVALID_API_KEY("Invalid API Key", -1001), PERMISSION_DENIED("Permission denied", -1002), REQUIRED_PARAMETER("Required parameter", -1005), INVALID_PAIR("Invalid pair", -1121), INVALID_ASSET("Invalid asset", -1122), NOT_FOUND_ORDER("Not found order", -2013), NOT_FOUND_MAKER("Not found maker", -2014), INVALID_ORDER_AMOUNT("Order amount cannot be less than zero", -2015), NOT_ENOUGH_BALANCE("Not enough balnce", -2016), DUPLICATE_CLIENT_ORDER_ID("The clOrdId is already in use", -2017), } <file_sep>package com.linebizplus.exchange.virtual.classification enum class OrderStatus { NEW, PARTIAL, FILLED, CANCELED, REJECTED, EXPIRED } <file_sep>package com.linebizplus.exchange.virtual.dto import com.linebizplus.exchange.virtual.classification.OrderSide import com.linebizplus.exchange.virtual.classification.OrderStatus import com.linebizplus.exchange.virtual.classification.OrderType import com.linebizplus.exchange.virtual.classification.TimeInForce import java.math.BigDecimal data class Order( val pair: String, val memberId: Long, val clientOrderId: String?, val orderId: Long, val price: BigDecimal?, val amount: BigDecimal, var remainAmount: BigDecimal, var status: OrderStatus, val type: OrderType, val side: OrderSide, val timeInForce: TimeInForce = TimeInForce.GTC, val openedTime: Long, var canceledTime: Long? = null, val lastTradeTime: Long? = null ) <file_sep>package com.linebizplus.exchange.virtual.entities import com.linebizplus.exchange.virtual.classification.OrderSide import com.linebizplus.exchange.virtual.classification.OrderStatus import com.linebizplus.exchange.virtual.classification.OrderType import com.linebizplus.exchange.virtual.classification.TimeInForce import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.`java-time`.timestamp object OrderTable : Table("orders") { val pair = varchar("pair", 11) val memberId = long("member_id") val orderId = long("order_id").uniqueIndex() val clientOrderId = varchar("client_order_id", 45).nullable() val price = decimal("price", 20, 8).nullable() val origQty = decimal("amount", 20, 8) val remainQty = decimal("remain_amount", 20, 8) val status = enumerationByName("status", 8, OrderStatus::class) val type = enumerationByName("order_type", 6, OrderType::class) val side = enumerationByName("side", 4, OrderSide::class) val timeInForce = enumerationByName("time_in_force", 3, TimeInForce::class) val openedTime = timestamp("opened_time") val canceledTime = timestamp("canceled_time").nullable() val lastTradeTime = timestamp("last_trade_time").nullable() init { index(true, memberId, clientOrderId) } }
0c3e255ccd3de6c67711cf05b846f8cdb9decf61
[ "Markdown", "Kotlin", "INI" ]
45
Kotlin
somnium-labs/virtual-exchange
aa2c58266fefac715f11efcc43400e771ad42b66
fc962d41dce38c075fa07ce62530eca7b65352a8
refs/heads/master
<repo_name>samyak-io/Project25<file_sep>/sketch.js var helicopterIMG, helicopterSprite, packageSprite,packageIMG; var packageBody,ground const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; var paperBall; var dustbin1; var ground; function preload() { } function setup() { createCanvas(1200, 700); engine = Engine.create(); world = engine.world; //Create the Bodies Here. paperBall = new Paper(200,450, 70); //dustbin base dustbin1 = new Dustbin(1000, 650); ground = new Ground(600,height - 30,1200,20); Engine.run(engine); keyPressed(); } function draw() { Engine.update(engine); rectMode(CENTER); background(255); paperBall.display(); dustbin1.display(); ground.display(); drawSprites(); } function keyPressed(){ if (keyCode === UP_ARROW) { Matter.Body.applyForce(paperBall.body, paperBall.body.position, {x: 200, y: -600}); } }
32892dbbdda68a75a1a0e98a077168adde4c20c9
[ "JavaScript" ]
1
JavaScript
samyak-io/Project25
eb4c8c55970fa9eab233ff4afc89c062f4b2b75a
ef1608659f3ff757e9e23358c8f56d434fe31134
refs/heads/master
<repo_name>CBMNguyen/Cat-Mouse-Dog<file_sep>/horse.js var chalk = require('chalk'); function Horse(name){ this.name = name; this.age = 1; this.weight = 50; } Horse.prototype.run = function() { console.log(chalk.blue(this.name) + ' run and shout: ' + chalk.red('hi hi hi @@')); }; Horse.eat = function() { console.log('vegetable'); console.log('leaf'); console.log('water'); }; module.exports = Horse;<file_sep>/hello.js console.log('Please, say hello me!'); console.log('oke, i must merge it');<file_sep>/cat.js function Cat(name){ this.name = name this.age = 1; this.weight = 1; this.color = "orange"; this.stomach = []; } Cat.prototype.eat = function(mouse) { this.stomach.push(mouse); return this; }; module.exports = Cat;<file_sep>/index.js var chalk = require('chalk'); var Dog = require('./dog.js'); var Cat = require('./cat.js'); var Horse = require('./horse'); var dog = new Dog('<NAME>'); var cat = new Cat('tiny'); var horse = new Horse('Thien ma'); console.log('Dog cannot eat Horse') try{ dog.eat(horse); }catch{ console.log( chalk.green('Error:') + chalk.red(' Cannot eat Horse')); } console.log(dog);
8188b500661b975bfb0c75d2274593e60ccd4fe2
[ "JavaScript" ]
4
JavaScript
CBMNguyen/Cat-Mouse-Dog
cc3730254ed7f830eee3cf1ff86ec8e43b71f69d
c6bca3d2ea65cbf6d31de018f972f8be39cab446
refs/heads/master
<file_sep>#include <iostream> using namespace std; class Stock1 { public: void Sell() { cout << "股票1卖出" << endl; } void Buy() { cout << "股票1买入" << endl; } }; class Stock2 { public: void Sell() { cout << "股票2卖出" << endl; } void Buy() { cout << "股票2买入" << endl; } }; class Stock3 { public: void Sell() { cout << "股票3卖出" << endl; } void Buy() { cout << "股票3买入" << endl; } }; class NationalDebt1 { public: void Sell() { cout << "国债1卖出" << endl; } void Buy() { cout << "国债1买入" << endl; } }; class Realty1 { public: void Sell() { cout << "房地产1卖出" << endl; } void Buy() { cout << "房地产1买入" << endl; } }; class Fund { public: Fund() { stock1 = new Stock1(); stock2 = new Stock2(); stock3 = new Stock3(); nd1 = new NationalDebt1(); rt1 = new Realty1(); } void BuyFund() { stock1->Buy(); stock2->Buy(); stock3->Buy(); nd1->Buy(); rt1->Buy(); } void SellFund() { stock1->Sell(); stock2->Sell(); stock3->Sell(); nd1->Sell(); rt1->Sell(); } private: Stock1 *stock1; Stock2 *stock2; Stock3 *stock3; NationalDebt1 *nd1; Realty1 *rt1; }; int main() { Fund *jijin = new Fund(); jijin->BuyFund(); jijin->SellFund(); return 0; }<file_sep>#include <iostream> using namespace std; class Singleton { public: static Singleton *getInstance(); private: Singleton() {} ~Singleton(); static Singleton *m_pInstance; }; Singleton* Singleton::m_pInstance = new Singleton(); Singleton* Singleton::getInstance() { return m_pInstance; } int main() { Singleton *instance1 = Singleton::getInstance(); Singleton *instance2 = Singleton::getInstance(); if (instance1 == instance2) { cout << "instance1 == instance2" << endl; } return 0; }<file_sep>#include <iostream> using namespace std; class Component { public: virtual void Operation() = 0; }; class ConcreteComponent : public Component { public: void Operation() { cout << "具体对象的操作" << endl; } }; class Decorator: public Component { protected: Component *component; public: Decorator(Component *component) { this->component = component; } void Operation() { if (component != nullptr) { component->Operation(); } } }; class ConcreteDecoratorA : public Decorator { private: string addedState; public: ConcreteDecoratorA(Component *component) : Decorator(component) {} void Operation() { addedState = "New State"; cout << "具体装饰对象A的操作" << endl; } }; class ConcreteDecoratorB : public Decorator { private: string addedState; public: ConcreteDecoratorB(Component *component) : Decorator(component) {} void Operation() { addedState = "New State"; cout << "具体装饰对象B的操作" << endl; } void AddedBehavior() {} }; int main() { ConcreteComponent c; ConcreteDecoratorA d1(&c); ConcreteDecoratorB d2(&d1); d2.Operation(); return 0; } <file_sep>#include <iostream> using namespace std; class Girl { public: Girl(char *name = "") : mName(name) {} char *getName() { return mName; } private: char *mName; }; class GiveGift { public: virtual void GiveDolls() = 0; }; class Pursuit : public GiveGift { public: Pursuit(Girl mm) : girl(mm) {} void GiveDolls() { cout << "give " << girl.getName() << " dolls!" << endl; } private: Girl girl; }; class Proxy : public GiveGift { public: Proxy(Girl mm) { pursuit = new Pursuit(mm); } void GiveDolls() { pursuit->GiveDolls(); } private: Pursuit *pursuit; }; int main() { Girl girl("jiaojiao"); Proxy proxy(girl); proxy.GiveDolls(); return 0; }
4dc711acff01bab2c888531dbf9d4b96c9fdb081
[ "C++" ]
4
C++
cheewing/design-pattern
c8e5f535a95b92a5283bff4fa518bb5fecb40d56
e7c005cc858503c5cdeb7793511ab41f33c4e9c5
refs/heads/master
<repo_name>liangz0707/mywebsite<file_sep>/mysite/views.py from django.http import HttpResponse def index(request): print "aaa" return HttpResponse("Hello, world. You're at LiangZhe's Site")
cfaaf72e338560645c12d25613b31692b0f4d93e
[ "Python" ]
1
Python
liangz0707/mywebsite
e669bfdadacceaabaf1415ceaca25eb5d90361ac
43a9f3779cd97971ea9be9d187321352904002b9
refs/heads/main
<repo_name>famkepj/js.8eopdracht<file_sep>/script.js /* function declaration*/ function cal1 (number1, number2){ const result1 = number1*number1 + number2*number2; return result1*result1; } /* function expression*/ const cal2 = function(number1, number2) { const result2 = number1*number1 + number2*number2; return result2*result2; }; /* arrow function */ const cal3 = (number1, number2) =>{ const result2 = number1*number1 + number2*number2; return result2*result2; }; /*functies aanroepen*/ console.log(cal1(10,5)); console.log(cal2(10,5)); console.log(cal3(10,5));
45dfd72c062d237bcf3dfca983b9a7057a3df385
[ "JavaScript" ]
1
JavaScript
famkepj/js.8eopdracht
929d8393778f08b473f031e07e3d0df156d8652d
d4ba9806cb8c998ab37cb23648c15e618a68c92d
refs/heads/master
<file_sep>'use strict'; const serverless = require('serverless-http'); const express = require('express') const app = express() const utils = require('./utils') const gameMock = require('./models/sports/mocks/gameMock.js').gameResponse const leaguesMock= require('./models/sports/mocks/leaguesMock.js').leaguesResponse app.get('/', function (req, res) { res.send('Healthy!') }) app.get('/matchups', async function (req, res) { let response = await utils.sendRes(200, [gameMock, gameMock, gameMock]) return res.json(response) }) app.get('/leagues', async function (req, res) { let response = await utils.sendRes(200, leaguesMock) return res.json(response) }) app.post('/wager', async function (req, res) { let wager = req.body.data if (wager.name && bet.wager && bet.id) { return res.json({status: 200, message: "Wager placed!"}) } }) module.exports.handler = serverless(app); // Use this code if you don't use the http event with the LAMBDA-PROXY integration // callback(null, { message: 'Go Serverless v1.0! Your function executed successfully!', event }); <file_sep> const leaguesResponse = { "Leagues": [ { "LeagueId": "1", "Name": "NFL", "Sport": "Football", "Status": "On" }, { "LeagueId": "1", "Name": "College", "Sport": "Football", "Status": "On" }, { "LeagueId": "2", "Name": "NBA", "Sport": "Basketball", "Status": "On" } ] } module.exports = { "leaguesResponse": leaguesResponse }
e173837f0f828a7cde847ced973a1f0fe4aa84cc
[ "JavaScript" ]
2
JavaScript
huntermcp/picksapp-api
81a702d852bccc316d7e78bef30788fe6b5424d0
1f9b031eff20cc696586c7c952ee09ef050ef19b
refs/heads/master
<file_sep>#define _CRT_SECURE_NO_WARNINGS #include "DHCList.h" #include <malloc.h> #include <assert.h> #include <stdio.h> //带头结点的双向循环链表 DHCLNode* BuyDHCListNode(DLDataType data) { DHCLNode* newNode = (DHCLNode*)malloc(sizeof(DHCLNode)); if (NULL == newNode) return NULL; newNode->data = 0; newNode->next = NULL; newNode->prev = NULL; return newNode; } //只需要将头结点申请好 DHCLNode* DHCListInit() { DHCLNode* head = BuyDHCListNode(0); head->next = head; head->prev = head; return head; } //尾插 void DHCListPushBack(DHCLNode* pHead, DLDataType data) { DHCListInsrt(pHead, data); } //尾删 void DHCListPopBack(DHCLNode* pHead) { if (DHCListEmpty(pHead)) return; DHCListErase(pHead->prev); } void DHCListPushFront(DHCLNode* pHead, DLDataType data) { if (DHCListEmpty(pHead)) return; DHCListInsrt(pHead->next, data); } void DHCListPopFront(DHCLNode* pHead) { if (DHCListEmpty(pHead)) return; DHCListErase(pHead->next); } void DHCListInsrt(DHCLNode* pos, DLDataType data) { if (pos == NULL) return 0; //0.申请新节点 DHCLNode* newNode = BuyDHCListNode(data); //1.将新节点链接到原链表中 newNode->next = pos; newNode->prev = pos->prev; //2.断开新链表,插入新节点 pos->prev = newNode; newNode->prev->next = newNode; } //任意位置删除 void DHCListErase(DHCLNode* pos) { if (pos == NULL) return; pos->prev->next = pos->next; pos->next->prev = pos->prev; free(pos); } DHCLNode* DHCListFind(DHCLNode* pHead, DLDataType data) { DHCLNode* cur = pHead->next; while (cur != pHead) { if (cur->data == data) return cur; cur = cur->next; } return NULL; } int DHCListSize(DHCLNode* pHead) { DHCLNode* cur = pHead->next; int count = 0; while (cur != pHead) { ++count; cur = cur->next; } return count; } int DHCListEmpty(DHCLNode* pHead) { return pHead->next == pHead; } void DHCListClear(DHCLNode* pHead) { DHCLNode* cur = pHead->next; while (cur != pHead) { pHead->next = cur->next; free(cur); cur = cur->next; } //链表已经为空 pHead->next = pHead; pHead->prev = pHead; } void DHCListDestroy(DHCLNode** pHead) { DHCListClear(*pHead); free(*pHead); *pHead == NULL; } void TestDHCList() { DHCLNode* head = DHCListInit(); DHCListPushBack(head, 1); DHCListPushBack(head, 2); DHCListPushBack(head, 3); DHCListPushBack(head, 4); DHCListPushBack(head, 5); PrintDHCList(head); DHCListPushFront(head, 0); PrintDHCList(head); DHCListPopBack(head); DHCListPopFront(head); PrintDHCList(head); DHCListInsrt(DHCListFind(head, 3), 100); PrintDHCList(head); DHCListErase(DHCListFind(head, 3)); PrintDHCList(head); DHCListDestroy(&head); }<file_sep>#pragma once typedef int DLDataType; typedef struct DHCListNode { DLDataType data; struct DHCListNode* next; // 指向当前节点的下一个节点 struct DHCListNode* prev; // 指向当前节点的前一个节点 }DHCLNode; // 将头节点创建好 DHCLNode* DHCListInit(); void DHCListPushBack(DHCLNode* pHead, DLDataType data); void DHCListPopBack(DHCLNode* pHead); void DHCListPushFront(DHCLNode* pHead, DLDataType data); void DHCListPopFront(DHCLNode* pHead); void DHCListInsrt(DHCLNode* pos, DLDataType data); void DHCListErase(DHCLNode* pos); DHCLNode* DHCListFind(DHCLNode* pHead, DLDataType data); int DHCListSize(DHCLNode* pHead); int DHCListEmpty(DHCLNode* pHead); void DHCListClear(DHCLNode* pHead); void DHCListDestroy(DHCLNode** pHead); void TestDHCList();<file_sep>#define _CRT_SECURE_NO_WARNINGS #include "DHCList.h" int main() { TestDHCList(); return 0; }
ed8f17f49b33820ec8127c0b706a81bebc785bdc
[ "C" ]
3
C
892944774/Project
e4592bb3afe053ed46b88eaf2c2854cee59e60ee
7d6c441092d85204cfd4df1618c0ddafd46b2da7
refs/heads/master
<repo_name>ju5td0m7m1nd/nextts-graphql-starter<file_sep>/src/graphql/query/hello.ts export const getHello = async (_parent, _args, { db }, _info) => { try { // Retrieve data and respond return 'Hello'; } catch (e) { return false; } }; <file_sep>/src/pages/_document.js import React, { Fragment } from 'react'; import Document, { Html, Head, Main, NextScript } from 'next/document'; import { GA_TRACKING_ID } from '../lib/gtag'; export default class CustomDocument extends Document { static async getInitialProps(ctx) { const initialProps = await Document.getInitialProps(ctx); // Check if in production const isProduction = process.env.NODE_ENV === 'production'; return { ...initialProps, isProduction, }; } render() { const { isProduction } = this.props; return ( <Html lang="en"> <Head> <link rel="icon" href="/favicon.png" /> <meta name="description" content="" /> {/* We only want to add the scripts if in production */} {isProduction && ( { /** * Init some third party extentions if needed. */ } )} </Head> <body> <Main /> <NextScript /> </body> </Html> ); } } <file_sep>/src/graphql/mutation/index.ts import * as Mutation from './hello'; export default { ...Mutation, }; <file_sep>/src/pages/_app.js import React from 'react'; import '../../styles/globals.css'; import Router from 'next/router'; import { withApollo } from '../graphql/client'; function MyApp({ Component, pageProps }) { return <Component {...pageProps}></Component>; } export default withApollo(MyApp); <file_sep>/src/global.d.ts interface Window { gtag?: typeof dataLayer; } <file_sep>/src/pages/api/graphql.ts import { ApolloServer, gql, makeExecutableSchema } from 'apollo-server-micro'; import { MongoClient, Db } from 'mongodb'; import Mutation from '../../graphql/mutation'; import Query from '../../graphql/query'; const typeDefs = gql` type Query { getHello: String } type Mutation { sayHello: Boolean } `; const resolvers = { Query, Mutation, }; export const schema = makeExecutableSchema({ typeDefs, resolvers, }); let db: Db; const apolloServer = new ApolloServer({ schema, context: async () => { if (!db) { try { /** * Create db client and set into context */ const dbClient = new MongoClient('mongodb://localhost:27017/', { useNewUrlParser: true, useUnifiedTopology: true, }); if (!dbClient.isConnected()) await dbClient.connect(); db = dbClient.db('aselecat'); // database name } catch (e) { console.log('--->error while connecting with graphql context (db)', e); } } return { db }; }, playground: process.env.NODE_ENV === 'production' ? false : true, }); export const config = { api: { bodyParser: false, }, }; export default apolloServer.createHandler({ path: '/api/graphql' }); <file_sep>/src/graphql/mutation/hello.ts export const sayHello = async ( _parent, _args, _context, _info ) => { //Do some mutation here return true };
6476c0e93dd17c1bd871bbad75364388b979d5cd
[ "JavaScript", "TypeScript" ]
7
TypeScript
ju5td0m7m1nd/nextts-graphql-starter
dac0caff0302bb1f54ec565a27bc43a228f830d3
78387e4564d7a3ffd270b3bdf3632f30427dde1b
refs/heads/master
<file_sep>import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; @Component({ selector: 'app-banner', templateUrl: './banner.page.html', styleUrls: ['./banner.page.scss'], }) export class BannerPage implements OnInit { list: any; constructor(private route: ActivatedRoute, private router: Router) { this.route.queryParams.subscribe(params => { if (params && params.special) { this.list = JSON.parse(params.special); } if (this.router.getCurrentNavigation().extras.state){ this.list = this.router.getCurrentNavigation().extras.state.special } }) } ngOnInit() { } } <file_sep>import { Component, OnInit } from '@angular/core'; import { SpursService } from '../services/spurs.service'; @Component({ selector: 'app-tab1', templateUrl: 'tab1.page.html', styleUrls: ['tab1.page.scss'] }) export class Tab1Page implements OnInit { public teams = {}; public teamname = ''; public last = {}; public player = {}; constructor(private spursService: SpursService) {} ngOnInit(): void { this.spursService.getDetail().subscribe(result => { this.teams = result; this.teamname = result['teams']['strTeam']; }) this.spursService.getLastMatch().subscribe(result => { this.last = result; }) this.spursService.getPlayer().subscribe(result => { this.player = result; }) } trimString(string, length) { return string.length > length ? string.substring(0, length) + "..." : string; } } <file_sep>import { TestBed } from '@angular/core/testing'; import { SpursService } from './spurs.service'; describe('SpursService', () => { let service: SpursService; beforeEach(() => { TestBed.configureTestingModule({}); service = TestBed.inject(SpursService); }); it('should be created', () => { expect(service).toBeTruthy(); }); }); <file_sep>import { Component } from '@angular/core'; import Swal from 'sweetalert2'; @Component({ selector: 'app-tab3', templateUrl: 'tab3.page.html', styleUrls: ['tab3.page.scss'] }) export class Tab3Page { public fav; constructor() { this.fav = JSON.parse(localStorage.getItem('fav')); } async delete() { Swal.fire({ icon: 'error', title: 'Gagal delete!', text: 'Favorit masih kosong silahkan tambah lewat forecast!', confirmButtonColor: '#d33', }) if (localStorage.length > 0 ) { Swal.fire({ title: 'Are you sure?', text: "Semua data di favorit akan terhapus!", icon: 'warning', showCancelButton: true, confirmButtonColor: '#28a745', cancelButtonColor: '#d33', confirmButtonText: 'Ya, delete aja', cancelButtonText: 'moh', reverseButtons: false }).then((result) => { if (result.value) { localStorage.clear(); Swal.fire( { title: 'Berhasil dihapus', text: 'Semua data berhasil dihapus silakan pull untuk merefresh page.', icon: 'success', confirmButtonColor: '#28a745', cancelButtonColor: '#3085d6', } ) } else if ( /* Read more about handling dismissals below */ result.dismiss === Swal.DismissReason.cancel ) { Swal.fire( { title: 'Dibatalkan', text: 'Gak jadi lurd :)', icon: 'error', confirmButtonColor: '#d33', cancelButtonColor: '#d33', } ) } }) } } doRefresh(event) { setTimeout(() => { this.fav = JSON.parse(localStorage.getItem('fav')); event.target.complete(); }, 2000); } } <file_sep>import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import Swal from 'sweetalert2'; @Component({ selector: 'app-detailnext', templateUrl: './detailnext.page.html', styleUrls: ['./detailnext.page.scss'], }) export class DetailnextPage implements OnInit { asu: any; constructor(private route: ActivatedRoute, private router: Router) { this.route.queryParams.subscribe(params => { if (params && params.special) { this.asu = JSON.parse(params.special); } if (this.router.getCurrentNavigation().extras.state){ this.asu = this.router.getCurrentNavigation().extras.state.special } }) } ngOnInit() { } async save() { let data = JSON.parse(localStorage.getItem('fav')) || [], isExist = data.findIndex((obj) => { // Disini semua value akan di kompare untuk di validasi berdasarkan "keunikannya" return obj.date == this.asu.date && obj.time == this.asu.time && obj.round == this.asu.round && obj.title == this.asu.title; }) != -1; if (isExist) { Swal.fire({ icon: 'error', title: 'Gagal!', text: 'Match yang difavorit tidak boleh sama!', confirmButtonColor: '#d33', }) } else { Swal.fire( { title: 'Sukses!', text: 'Match berhasil difavoritkan!', icon: 'success', confirmButtonColor: '#28a745', } ) data.push(this.asu); localStorage.setItem('fav', JSON.stringify(data)); } } } <file_sep>import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { SpursService } from '../services/spurs.service'; @Component({ selector: 'app-epldetails', templateUrl: './epldetails.page.html', styleUrls: ['./epldetails.page.scss'], }) export class EpldetailsPage implements OnInit { list: any; public last = {}; constructor(private route: ActivatedRoute, private router: Router, private spursService: SpursService) { this.route.queryParams.subscribe(params => { if (params && params.special) { this.list = JSON.parse(params.special); } if (this.router.getCurrentNavigation().extras.state){ this.list = this.router.getCurrentNavigation().extras.state.special } }) } ngOnInit(): void { this.spursService.getLastMatch().subscribe(result => { this.last = result; }) } trimString(string, length) { return string.length > length ? string.substring(0, length) + "..." : string; } } <file_sep>import { Component, OnInit } from '@angular/core'; import { SpursService } from '../services/spurs.service'; import { NavigationExtras, Router } from '@angular/router'; import { LoadingController } from '@ionic/angular'; @Component({ selector: 'app-tab4', templateUrl: './tab4.page.html', styleUrls: ['./tab4.page.scss'], }) export class Tab4Page implements OnInit { public teams = {}; public epl_list = ''; public teamdetails = {}; constructor(private spursService: SpursService, private router: Router, public loadingController: LoadingController) {} async ngOnInit(): Promise<void> { const loading = await this.loadingController.create({ message: 'Please wait...', duration: 3000, backdropDismiss: true }); await loading.present(); { this.spursService.getAllTeams().subscribe(result => { this.teams = result; this.teamdetails = result['teams']; }) } await loading.onDidDismiss(); } eplel(epl:string): void { let list = { name: epl['strTeam'], formed: epl['intFormedYear'], badge: epl['strTeamBadge'], league: epl['strLeague'], kit: epl['strTeamJersey'], stadiumname: epl['strStadium'], stadiumimg: epl['strStadiumThumb'], stadiumdesc: epl['strStadiumDescription'], stadiummap: epl ['strStadiumLocation'], desc: epl['strDescriptionEN'], } let extras: NavigationExtras = { state: { special: list } }; this.router.navigate(['/epldetails'], extras); } banner(epl:string): void { let list = { name: epl['strTeam'], pic1: epl['strTeamFanart1'], pic2: epl['strTeamFanart2'], pic3: epl['strTeamFanart3'], pic4: epl['strTeamFanart4'], } let extras: NavigationExtras = { state: { special: list } }; this.router.navigate(['/banner'], extras); } } <file_sep>import { Component, OnInit } from '@angular/core'; import { SpursService } from '../services/spurs.service'; import { LoadingController } from '@ionic/angular'; @Component({ selector: 'app-table', templateUrl: './table.page.html', styleUrls: ['./table.page.scss'], }) export class TablePage implements OnInit { public table = {}; constructor(private spursService: SpursService, public loadingController: LoadingController) { } async ngOnInit(): Promise<void> { const loading = await this.loadingController.create({ message: 'Fetching data...', duration: 5000, backdropDismiss: true }); await loading.present(); { this.spursService.getTable().subscribe(result => { this.table = result; }) } await loading.onDidDismiss(); } } <file_sep>import { Component, OnInit } from '@angular/core'; import { SpursService } from '../services/spurs.service'; import { NavigationExtras, Router } from '@angular/router'; import { LoadingController } from '@ionic/angular'; @Component({ selector: 'app-tab2', templateUrl: 'tab2.page.html', styleUrls: ['tab2.page.scss'] }) export class Tab2Page implements OnInit{ public nextmatchList; public last = {}; constructor(private spursService: SpursService, private router: Router, public loadingController: LoadingController) {} // ngOnInit(): void { // this.spursService.getNextMatch().subscribe(result => { // this.nextmatchList = result['events']; // }); // this.spursService.getDetail().subscribe(result => { // this.last = result; // }) // } async ngOnInit(): Promise<void> { const loading = await this.loadingController.create({ message: 'Please wait...', duration: 1000, backdropDismiss: true }); await loading.present(); { this.spursService.getNextMatch().subscribe(result => { this.nextmatchList = result['events']; }); this.spursService.getDetail().subscribe(result => { this.last = result; }) } await loading.onDidDismiss(); } nextdetail(t:string): void{ let asu = { title: t['strEvent'], league: t['strLeague'], season: t['strSeason'], type: t['strSport'], round: t['intRound'], time: t['strTime'], date: t['dateEvent'], }; let extras: NavigationExtras = { state: { special: asu } }; this.router.navigate(['/detailnext'], extras); } } <file_sep>import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class SpursService { lookup = 'https://www.thesportsdb.com/api/v1/json/1/lookupteam.php'; lastmatch = 'https://www.thesportsdb.com/api/v1/json/1/eventslast.php'; nextmatch = 'https://www.thesportsdb.com/api/v1/json/1/eventsnext.php'; allteam = 'https://www.thesportsdb.com/api/v1/json/1/search_all_teams.php'; table = 'https://www.thesportsdb.com/api/v1/json/1/lookuptable.php?l=4328&s=2019-2020'; player = 'https://www.thesportsdb.com/api/v1/json/1/searchplayers.php'; /**Team Id * Tottenham 133616. * Arsenal 133604. * <NAME> 133601. * Bournemouth 134301. * Burnley 133623. */ teamid = '133616'; /**League Name * English Premier League * Spanish La Liga * German Bundesliga * Italian Serie A * American Major League */ league = 'English Premier League'; name = '<NAME>'; constructor(private http: HttpClient) { } getDetail(){ return this.http.get(`${this.lookup}?id=${this.teamid}`); } getLastMatch(){ return this.http.get(`${this.lastmatch}?id=${this.teamid}`); } getNextMatch(){ return this.http.get(`${this.nextmatch}?id=${this.teamid}`); } getAllTeams(){ return this.http.get(`${this.allteam}?l=${this.league}`); } getTable(){ return this.http.get(`${this.table}`); } getPlayer(){ return this.http.get(`${this.player}?p=${this.name}`); } }
0074649e0ae96449e23930be88af792241dadbb5
[ "TypeScript" ]
10
TypeScript
fleetimee/tottenham-app-ionic
506f21939c61ae89faf90c710cd1bdb7e23edae4
cc6f08771a4833f085bad33b46beff8d76a4693f
refs/heads/master
<repo_name>shrawan2015/AboutCanada<file_sep>/Canada/Scene/AboutUseCase.swift // // AboutUseCase.swift // Canada // // Created by <NAME> on 05/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import Foundation class AboutUseCase:BaseUseCase<AboutList.FetchAboutCanada.Request, AboutList.FetchAboutCanada.Response> { override func getRequest(request: AboutList.FetchAboutCanada.Request?, completionHandler: @escaping (AboutList.FetchAboutCanada.Response?, Error?) -> Void) { AFWrapper.sharedInstance.fetchData(using:""){ data,error in if(error != nil){ completionHandler(nil,error) return } do { let responseStrInISOLatin = String(data: data!, encoding: String.Encoding.windowsCP1252) guard let modifiedDataInUTF8Format = responseStrInISOLatin?.data(using: String.Encoding.utf16) else { return } let resultModel = try JSONDecoder().decode(Canada.self, from: modifiedDataInUTF8Format) let response = AboutList.FetchAboutCanada.Response(results: resultModel) completionHandler(response,nil) return } catch let exception { completionHandler(nil,exception) } } } } <file_sep>/Canada/view/AboutTableViewCell.swift // // AboutTableViewCell.swift // Canada // // Created by <NAME> on 05/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import UIKit class AboutTableViewCell: UITableViewCell { @IBOutlet weak var descriptiion: UILabel! @IBOutlet weak var title: UILabel! @IBOutlet weak var gallaryImage: CustomImageView! override func awakeFromNib() { super.awakeFromNib() // Initialization code } var about:About?{ didSet{ descriptiion.text = about?.description title.text = about?.title gallaryImage.loadImageUsingUrlString(urlString: about?.imageHref ?? "") } } override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } } <file_sep>/Canada/Base/BaseVC.swift // // BaseVC.swift // Tinder // // Created by <NAME> on 27/06/20.. // Copyright © 2020 Shrawan. All rights reserved. // import Foundation import UIKit class BaseVC: UIViewController { override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } override func viewDidLoad() { super.viewDidLoad() edgesForExtendedLayout = [] self.navigationItem.backBarButtonItem = UIBarButtonItem(title:"", style:.plain, target:nil, action:nil) self.extendedLayoutIncludesOpaqueBars = true print("Screen Name \(self)") showNavigationShadow() } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) self.view.endEditing(true) } } extension BaseVC { func hideNavigationShadow() { self.navigationController?.navigationBar.layer.cornerRadius = 0 self.navigationController?.navigationBar.layer.shadowColor = UIColor.clear.cgColor self.navigationController?.navigationBar.layer.shadowOpacity = 1 self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 0, height: 0) self.navigationController?.navigationBar.layer.shadowRadius = 0.0 } func showNavigationShadow() { self.navigationController?.navigationBar.layer.cornerRadius = 6 self.navigationController?.navigationBar.layer.shadowColor = #colorLiteral(red: 0.13, green: 0.13, blue: 0.13, alpha: 0.24) self.navigationController?.navigationBar.layer.shadowOpacity = 1 self.navigationController?.navigationBar.layer.shadowOffset = CGSize(width: 2, height: 2) self.navigationController?.navigationBar.layer.shadowRadius = 4 } } <file_sep>/Canada/Scene/AboutModel.swift // // AboutModel.swift // Canada // // Created by <NAME> on 05/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import Foundation struct Canada: Codable { let title:String? let rows: [About]? } struct About: Codable { let title: String? let imageHref:String? let description:String? } struct AboutRequest { } struct AboutResponse{ } struct AboutViewModel{ } enum AboutList { // MARK: Use cases enum FetchAboutCanada { struct Request { } struct Response { let results: Canada? } struct ViewModel { struct DisplayedAbout { let title:String? let rows: [About]? } var displayedAbout: DisplayedAbout? } } } <file_sep>/Canada/Scene/AboutInteractor.swift // // AboutInteractor.swift // Canada // // Created by <NAME> on 05/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import Foundation protocol AboutDataStore{ var about: AboutList.FetchAboutCanada.ViewModel?{ get } } protocol AboutBusninessLogic { func fetchAbout() } class AboutInteractor : AboutBusninessLogic,AboutDataStore{ var presenter:AboutPresentor? var about:AboutList.FetchAboutCanada.ViewModel? func fetchAbout(){ let request = AboutList.FetchAboutCanada.Request() AboutUseCase.service(request: request) { [weak self] (response, error) in self?.presenter?.presentAboutResponse(response: response, error: error) } } } <file_sep>/Canada/Scene/AboutPresenter.swift // // AboutPresenter.swift // Canada // // Created by <NAME> on 05/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import Foundation protocol AboutPresentationLogic { func presentAboutResponse(response: AboutList.FetchAboutCanada.Response?, error:Error?) } class AboutPresentor:AboutPresentationLogic{ func presentAboutResponse(response: AboutList.FetchAboutCanada.Response?, error:Error?){ if error != nil { viewController?.displayError(error?.localizedDescription ?? "") }else { guard let results = response?.results else{ viewController?.displayError(error?.localizedDescription ?? "") return } let displayedAbout = AboutList.FetchAboutCanada.ViewModel.DisplayedAbout(title: results.title, rows: results.rows) viewController?.showAbout(displayedAbout) } } weak var viewController:AboutViewController? } <file_sep>/Canada/Service/NetworkCall.swift // // NetworkCall.swift // Canada // // Created by <NAME> on 06/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import Foundation import Alamofire protocol NetworkCall { func fetchData(using request: String,completion: @escaping (Data?, Error?) -> Void) } class AFWrapper: NetworkCall { static let sharedInstance = AFWrapper() let url = "https://dl.dropboxusercontent.com/s/2iodh4vg0eortkl/facts.json" func fetchData(using request: String,completion: @escaping (Data?, Error?) -> Void){ AF.request(url).response { (response) in completion(response.data, response.error) } } } extension String { func toJSON() -> Any? { guard let data = self.data(using: .utf8, allowLossyConversion: false) else { return nil } return try? JSONSerialization.jsonObject(with: data, options: .mutableContainers) } } <file_sep>/Canada/Scene/AboutViewController.swift // // AboutViewController.swift // Canada // // Created by <NAME> on 05/07/20. // Copyright © 2020 Shrawan. All rights reserved. // import UIKit protocol AboutDisplayLogic{ func displayError(_ error: String) func showAbout(_ about:AboutList.FetchAboutCanada.ViewModel.DisplayedAbout) } class AboutViewController: BaseVC { @IBOutlet weak var errorMessage: ErrorMessage! @IBOutlet weak var tableView: UITableView! private let refreshControl = UIRefreshControl() private var interactor:AboutInteractor? private let cellID = "AboutTableViewCell" private var abouts:AboutList.FetchAboutCanada.ViewModel.DisplayedAbout? override func viewDidLoad() { super.viewDidLoad() setUp() } final func setUp(){ tableView.dataSource = self let nib = UINib.init(nibName: cellID, bundle: nil) self.tableView.register(nib, forCellReuseIdentifier:cellID) self.tableView.tableFooterView = UIView() if #available(iOS 10.0, *) { tableView.refreshControl = refreshControl } else { tableView.addSubview(refreshControl) } refreshControl.addTarget(self, action: #selector(refreshWeatherData(_:)), for: .valueChanged) tableView.rowHeight = UITableView.automaticDimension tableView.estimatedRowHeight = UITableView.automaticDimension interactor?.fetchAbout() self.errorMessage.delegate = self } @objc private func refreshWeatherData(_ sender: Any) { interactor?.fetchAbout() } // MARK:- Object lifecycle override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) setupDependencyConfigurator() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setupDependencyConfigurator() } } extension AboutViewController:AboutDisplayLogic{ final func displayError(_ error: String){ self.errorMessage.isHidden = false self.tableView.isHidden = true } final func showAbout(_ about:AboutList.FetchAboutCanada.ViewModel.DisplayedAbout){ DispatchQueue.main.async { self.title = about.title self.abouts = about self.tableView.reloadData() self.refreshControl.endRefreshing() self.errorMessage.isHidden = true self.tableView.isHidden = false } } } // MARK:- Configuration Logic extension AboutViewController { fileprivate func setupDependencyConfigurator() { let interactor = AboutInteractor() let presenter = AboutPresentor() self.interactor = interactor interactor.presenter = presenter presenter.viewController = self } } extension AboutViewController:UITableViewDataSource{ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.abouts?.rows?.count ?? 0 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier:cellID, for: indexPath) as! AboutTableViewCell if let rows = self.abouts?.rows{ cell.about = rows[indexPath.row] } return cell } func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { return UITableView.automaticDimension } } extension AboutViewController : ReConnect{ final func reConnect(){ interactor?.fetchAbout() } }
400538b260d11b2cffefb96bfb8c34882004fd98
[ "Swift" ]
8
Swift
shrawan2015/AboutCanada
1962b8e6f68cceed424df3564bf205167ca12171
71c57370c3469f42ee608c7d906292d5aa212a44
refs/heads/master
<file_sep> <KEY><file_sep>const forest = `data:audio/midi;base64,TVRoZAAAAAYAAQAPAYBNVHJrAAAAHgD/UQMMNQAA/1gEBQMYCIdA/1gEBAIYCIvoAP8vAE1Ucms AAAHSAP8DCVtBLTEwXSAqUwC5AAAAuSACAMkAALkHf/BAmTZkYIk2ZIsgmTZkYIk2ZIsgmTZkYI k<KEY>Is<KEY> Is<KEY> m<KEY> CJ<KEY> TZ<KEY> iy<KEY> Z<KEY> BkY<KEY> <KEY> <KEY> R<KEY> Kn+<KEY>/<KEY> g4QBAAJElfwbhAD4G4QA8B+EAOgbhADgH4QA2BuEANAbhADIH4QAwBuEALgfhACsG4QApBuEAJw fhACUG4QAjB+EAIQbhAB8G4QAdB+EAGwbhABkH4QAWBuEAFAbhABIH4QAQBuEADgfhAAwG4QAKB uEACAfhAAYG4QAEB4ElfwCBHX8A4QBAAJEef4sggR5/AJElf2CBJX8AkR5/iQCBHn8AkSp/gwCB Kn8AkSl/iyCBKX8AkSR/YIEkfwCRHX+JAIEdf2CRHX9ggR1/YJEef4sgkSV/YIEef2CBJX8AkR5 /gUCBHn9gkR5/YIEef4FAkR<KEY> <KEY> <KEY> /<KEY> d/<KEY> IEjfwCRIn+GAIEifwCRKX+<KEY> TjcA4U43AOFONwPhATQD4QE0AOEBNAThKzEA4Ss<KEY>0A4VYtA+FW<KEY>sAOE PLAbhRSgA4UUoAOFFKA3hLCUA4SwlAOEsJQbhViID4VYiAOFWIgrhCR8A4QkfAOEJHwbhKxsA4S sbBOErGwnhARkA4QEZAOEBGQPhVhYA4VYWAOFWFgThARQA4QEUA+EBFAbhEg4A4RIOAOESDgfhI wwA4SMMAOEjDAbhNAoA4TQK<KEY> <KEY> gi<KEY> BN<KEY> <KEY> <KEY> k<KEY> /giCBNX8<KEY> TN/<KEY> hg<KEY>iy<KEY>lfw<KEY> /AJEdf4kAgR1/YJEdf2CBHX9gkR5/iy<KEY>/YIElfwCRHn+BQIEef2CRHn9ggR5/gUCRHn +EQIEefwCRKn+DAIEqfwCRKX+<KEY>BQ<KEY>/AJEdf4FAgR1/YJEdf2CBH X+CIJEdf4Ug4QBAAJElfwbhAD4G4QA8B+EAOgbhADgH4QA2BuEANAbhADIH4QAwBuEALgfhACsG 4QApBuEAJwfhACUG4QAjB+EAIQbhAB8G4QAdB+EAGwbhABkH4QAWBuEAFAbhABIH4QAQBuEADgf hAAwG4QAKBuEACAfhAAYG4QAEB4ElfwCBHX8A4QBAAJEef4sggR5/AJElf2CBJX8AkR5/iQCBHn 8AkSp/gwCBKn8AkSl/iyCBKX8AkSR/YIEkfwCRHX+JAIEdf2CRHX9ggR1/YJEef4sgkSV/YIEef 2CBJX8AkR5/gUCBHn9gkR5/<KEY> <KEY> <KEY> g<KEY> q<KEY> s7BOErOwbhTjcA4U43AOFONwPhATQD4QE0AOEBNAThKzEA4Ss<KEY> ywA4Q8sAOEPLAbhRSgA4UUoAOFFKA3hLCUA4SwlAOEsJQbhViID4VYiAOFWIgrhCR8A4QkfAOEJ HwbhKxsA4SsbBOErGwnhARkA4QEZAOEBGQPhVhYA4VYWAOFWFgThARQA4QEUA+EBFAbhEg4A4RI OAOESDgfhIwwA4SMMAOEjDAb<KEY> <KEY> Ak<KEY> <KEY> n<KEY> k<KEY> pf<KEY> Z/<KEY> iCBLn8AkTV/giCBNX8AkTN/giCBM38AkS5/gUCBLn8AkSd/gUCBJ38AkSl/giCBKX8AkTB/giCB MH8AkSl/g2CBKX8AkSl/YIEpfwCRLH9ggSx/AJEpf2CBKX8AkSR/gUCBJH8AkSV/giCBJX8AkSx /giCBLH8AkTN/gUCBM38AkTF/gwCBMX8AkTB/gwCBMH8AkSl/giCBKX8AkSR/giCBJH8AkSl/gU CBKX8AkR1/hgCBHX8AkR5/iyCBHn8AkSV/YIElfwCRHn+JAIEefwCRKn+DAIEqfwCRKX+LIIEpf wCRJH9ggSR/AJEdf4kAgR1/YJEdf2CBHX9gkR5/iyCRJX9ggR5/YIElfwCRHn+BQIEef2CRHn9g gR5/gUCRHn+EQIEefwCRKn+DAIEqfwCRKX+JAIEpf2CRJH+BQIEkfwCRKX9ggSl/AJEdf4FAgR1 /YJEdf2CBHX+CIJEdf4Ug4QBAAJElfwbhAD4G4QA8B+EAOgbhADgH4QA2BuEANAbhADIH4QAwBu EALgfhACsG4QApBuEAJwfhACUG4QAjB+EAIQbhAB8G4QAdB+EAGwbhABkH4QAWBuEAFAbhABIH4 QAQBuEADgfhAAwG4QAKBuEACAfhAAYG4QAEB4ElfwCBHX8A4QBAAJEef4sggR5/AJElf2CBJX8A kR5/iQCBHn8AkSp/gwCBKn8AkSl/iyCBKX8AkSR/YIEkfwCRHX+JAIEdf2CRHX9ggR1/YJEef4s gkSV/YIEef2CB<KEY> <KEY> AbhEg4A4RIOAO<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> g<KEY>giC BJ<KEY> <KEY> i<KEY> JH<KEY> Asgd1ALIKQOcg<KEY>Ej4G4jQ<KEY> 4<KEY> gDiViIH4hodAOIaHQPiGh024lYiAOJWIgDiViIH4lYmAOJWJgDiViYN4jQqAOI0KgDiNCoJ4lYt AOJWLQDiVi0H4gAwAOIAMAPiADAG4gE0AOIBNADiATQK4k43AOJONwPiTjcG4jQ6AOI0OgTiNDo J4iM8AOIjPAPiIzwX4gk/AOIJPwDiCT8Z4gBAAOIAQADiAECENIJUfwCSUn+DAIJSfwCSV3+CII JXfwCSVn8wglZ/AJJVfzCCVX8AklR/hgCCVH8AklJ/gwCCUn8AklB/gwCCUH8Akk9/A+IaPQDiG j0<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> i<KEY> ID4jkuAOI5LgDiOS4D4g8sAO<KEY> <KEY> <KEY> PQDiGj0A4<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> CTTWSYAINNZACDRmQAk0hkAJNPZJgAg09kAINIZACTRmQAk01kmACDTWQAg0ZkAJNPZACTSGSYA INIZACDT2QAk0ZkAJNNZJgAg01kAINGZACTT2QAk0<KEY> <KEY> <KEY> <KEY> k<KEY> pAgeEAlENtgUCEQ20AlEFtgUCEQW0AlEZtgUCERm0AlENthECEQ20AlD9tgUCEP20AlDxtjACEP G2bAJRDbYMAhENtAJREbYMAhERtAJRGbY<KEY> hEZk<KEY>gCES<KEY>hEtkAIQ/Z<KEY> 9ZACEQmQAhDtkAJQ6Z<KEY>ZIYAhEhkAJRGZIMAhEZkAJRLZIIghEtkAJRKZDCESm QAlElkMIRJZACUSGQAlE1kg<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> S<KEY>Dx<KEY>Dx<KEY>SC0UCUQ2<KEY> <KEY> <KEY> UTWSDAIRNZACUS2SDAIRLZACUTWSDAIRNZACESGQAlElkgwCESWQAhERkAIRBZACEOmQAlEZkAJ RC<KEY> WQAlDxkAJRN<KEY>tkAJRNZIMAhE1kAIQ8ZACEQWQAlEFkAJQ8ZACUSGSMAIRI ZACEPGQAhEFkAP8vAE1UcmsAAA1TAP8DCVtBLTA2XSBQSQC1AAAAtSAA<KEY>1CmyBx0C VWX+CAIVZfwCVWVqCAIVZWgCVWTyCAIVZPACVWR6CAIVZHoEAlVdkgQCFV2QAlVxkgQCFXGQAlV VkgQCFVWQAlVRkMIVUZACVVWQwhVVkAJVUZIIghVRkhgCVUmSBAIVSZACVV2SBAIVXZACVUGSBA IVQZACVT2QwhU9kAJVQZDCFUGQAlU9kgiCFT2SVAJVZf<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> AJVZHoIAhVkegQCVV2SBAIVXZACVXGSBAIVcZACVVWSBAIVVZACVVGQwhVRkAJVVZDCFVWQAlVR kgiCF<KEY> <KEY> tk<KEY> <KEY> Y<KEY> GO2SJYJY7ZGCGO2RgljtkYIY<KEY>YIY7ZGCWO2<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> n<KEY> <KEY> /<KEY> <KEY> <KEY> Y<KEY> gjE9/<KEY>Gf2 CMS<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> t/<KEY> n<KEY>S fwCcUn9gjEZ/AJxGf2CMS38AnEt/<KEY>/<KEY>/YIxLfwCcS39gjE1 /AJ<KEY>AnFJ/Y<KEY>gjEt/AJ<KEY>E1/YIxSfwCcUn9gjEZ/AJxGf2CMS3 8AnEt/Y<KEY>/AJ<KEY>/Y<KEY>/AJ<KEY>/YIxGf wCcSH9gjEt/<KEY>/ AJ<KEY> An<KEY> Cc<KEY> JxIf2CMS38AnEt/<KEY>/<KEY> nFJ/<KEY>Et/AJ<KEY>1/<KEY>/<KEY>Et/YIxNfwC cTX9gjFJ/AJ<KEY>/YIxLfwCcS39gjE1/<KEY>/YIxGfwCcRn9gjEt/AJ x<KEY> EZ/<KEY> Un<KEY> Pf<KEY> t/<KEY> <KEY> f<KEY> /Y<KEY>/AJ<KEY>/<KEY>3 9gjE1/<KEY> 2CMS38AnEt/YIxNfwCcTX9gjFJ/<KEY>/YIxLfwCcS39gjE1/<KEY>/ YIx<KEY>Et/AJ<KEY>1/Y<KEY>EZ/AJxGf2CMS38AnEt/Y<KEY> gjFJ/AJ<KEY>Eh/YIxLfwCcS39gjE1/AJxPf2CMUn8AnFB/<KEY>/AJxLf2 CMT38AnE9/Y<KEY>AJxIf2CMS38AnEt/<KEY>Y Ix<KEY>Et/<KEY> j<KEY> MU<KEY> x<KEY>/AJ<KEY>/Y<KEY>1/AJ<KEY>/Y<KEY> Et/AJxLf2CMTX8AnE1/YIxSfwCcUn9gjEZ/AJxGf2CMS38AnEt/YIxNfwCcTX9gjFJ/AJxSf2CM Rn8AnEZ/YIxLfwCcS39gjE1/AJxNf2CMUn8AnFJ/YIxGfwCcRn9gjEt/AJxLf2CMTX8AnE1/YIx SfwCcUn9gjEZ/AJxGf2CMS38AnEt/YIxNfwCcTX9gjFJ/AJxSf2CMRn8AnEZ/YIxLfwCcS3<KEY> <KEY> n<KEY>9<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> /AJ<KEY>UX 9gjE5/AJxVf2CM<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> j<KEY> <KEY> x<KEY> E<KEY> S<KEY> G<KEY> J/<KEY> X<KEY> fw<KEY> /AJxIf2CMS38AnEt/Y<KEY>/<KEY>/YIxLfwCcS<KEY>UH 8AnFB/YIxIf<KEY> AJ<KEY> An<KEY> Cc<KEY> Jx<KEY> n<KEY> c<KEY> x<KEY> E<KEY>fwCc S39gjE<KEY> If<KEY> B/<KEY> X<KEY> f<KEY> /<KEY> <KEY> <KEY> Y<KEY>/AJ<KEY>/Y<KEY> gjEt/AJxLf2CMT38AnE9/Y<KEY>gjEh/AJxIf2CMS38AnEt/YIxPfwCcT39gjFB/AJxQf2 CMSH8<KEY> <KEY> <KEY> <KEY> <KEY> L<KEY> h/<KEY> H<KEY> fw<KEY> /<KEY> w<KEY> AJ<KEY> An<KEY> Cc<KEY> Jx<KEY> j<KEY> MRH8AnEN/MIxDfwCcRH8wjER/<KEY>AnEh/MI<KEY>/AJxNfzCMTX8AnE9/MI x<KEY> <KEY> <KEY> <KEY> <KEY> <KEY> <KEY> J/<KEY>/<KEY> Un<KEY> N<KEY> t/<KEY> n<KEY> fw<KEY> /AJ<KEY>/<KEY>/<KEY>3 8AnEt/<KEY>/<KEY> wCcSH9gjEt/AJxLf2CMT38AnE9/YIxQfwCcUH9gjEh/AJxGf2CMS38AnEt/<KEY>FB/ AJxSf2CMRn8AnEZ/YIxL<KEY> <KEY> <KEY> Jx<KEY> n<KEY> c<KEY> x<KEY> Eh/<KEY> UH<KEY> Nf<KEY>/Y<KEY>/<KEY>1/<KEY>E t/Y<KEY> <KEY> f<KEY> /<KEY> <KEY> <KEY> Y<KEY> gj<KEY> CM<KEY> IxLfwCcS39gjE1/<KEY>/Y<KEY>/<KEY>g jEZ/AJxGf2CMS3<KEY> <KEY> Et/<KEY> SH<KEY> Q<KEY> <KEY> <KEY> fw<KEY> /AJ<KEY>/YIxLfwCcS39gjE1/<KEY>/<KEY>/AJxLf2CMTX 8AnE1/YIxSfwCcUn9<KEY> <KEY> <KEY> <KEY> <KEY> n<KEY> c<KEY> x<KEY> Et/<KEY> Rn9gjEt/AJxLf2CM<KEY> <KEY> <KEY> <KEY> <KEY> d<KEY>1XZIMAjV<KEY> <KEY> <KEY> <KEY> BAD<KEY> FCADtRQgH7SsLAO0rCwDtKwsJ7SMMAO0jDADtIwwK7QAQAO0AEADtABAK7QEUAO0BFADtARQM7V Y<KEY> ADtDywA7Q8sDe09KQDtPSkD7T0pDe0sJQDtLCUA7SwlDe1WIgPtViIA7VYiCo1UZADtEh4A7RIe A+0SHgbtKxsA7SsbAO0rGwftHRgD7R0YAO0dGAPtLBUA7SwVAO0sFQrtKxEA7SsRCe0jDADtIww A7SMMCu09CQDtPQkA7T0JCe06BADtOgQA7ToECu0PAQDtDwEA7Q8BCu0AAADtAAAA7QAAgwbtHQ ID7R0dB+06BADtOgQA7ToECe1FCAPtRQgA7UUIB+0rCwDtKwsA7SsLCe0jDADtIwwA7SMMCu0AE ADtABAA7QAQCu0BFADtARQA7QEUDO1WFgDtVhYA7VYWB+0BGQDtARkA7QEZCe0rGwTtKxsA7Ssb Bu0aHQDtGh0A7RodCu0rIQPtKyEA7SshBu0sJQDtLCUD7SwlBO1FKADtRSgA7UUoA+0rKwDtKys D7SsrA+1yLADtciwA7XIsA+0dLwDtHS8A7R0vB+1WMgDtVjIA7VYyBu0sNQDtLDUA7Sw1A+1FOA DtRTgE7UU4Bu0rOwDtKzsA7Ss7Cu0SPgDtEj4A7RI+DP8vAA==`; module.exports.forest = forest; <file_sep>import Vue from 'vue'; import Vuex from 'vuex'; Vue.use(Vuex); export default new Vuex.Store({ state: { screenMounted: false, chancellor: { move: { walkingFront: { id: 1, name: 'chancellorWalkingFront', frames: 4, fps: 3, }, }, }, crono: { move: { walkingLeft: { id: 1, name: 'cronoWalkingLeft', frames: 6, fps: 7, }, immobileBack: { id: 2, name: 'cronoImmobileBack', frames: null, fps: null, }, }, }, judge: { speaking: true, }, dialog: { intro: [ 'Hello Visitor!', 'My name is Gregory, I\'m 31 and I\'m a front-end developper.', 'What\'s your name?', 'Nice to meet you ', 'This appearance doesn\'t suit you... Hmm... Wait!', 'It\'s better!', 'So... Who do you want to talk with?', 'Nice to meet you ', 'So... Who do you want to talk with?', ], blue: [ 'Watch a movie?', 'Which movie do you want to see?', ], red: [ 'I\'m not ready yet...', ], green: [ 'I\'m not ready yet...', ], }, instructions: { input: 'Press Enter', tap: 'Tap on screen', tapOrInput: 'Tap or Press Enter', select: 'Select a character', }, }, getters: { crono: state => state.crono, chancellor: state => state.chancellor, judge: state => state.judge, dialog: state => state.dialog, instructions: state => state.instructions, }, }); <file_sep>import axios from 'axios'; /* eslint-disable */ export default() => { axios.get('https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=1&q=revolver+trailer&key=<KEY>') .then((response) => { this.data = response; }) .catch((error) => { return error; }); }; <file_sep>import Vue from 'vue'; import Router from 'vue-router'; import Screen from '@/components/Screen-Page/Screen'; import Homepage from '@/components/Homepage'; Vue.use(Router); export default new Router({ mode: 'history', routes: [ { path: '/', name: 'Homepage', component: Homepage, }, { path: '/experience', name: 'Screen', component: Screen, }, ], }); <file_sep>export default function () { if (window.innerWidth < 768) { return 'mobile'; } if (window.innerWidth <= 1024 && window.innerWidth > 767) { return 'tablet'; } return 'desktop'; }
1441354bc03efe4c7155d027eb56865b8ec9df43
[ "JavaScript" ]
6
JavaScript
KikuDev/ScreenMe_vuejs
61b5862a05f6e8623b03ec7b79d4fd7d4f773b9b
bb4bcbce7860adefb303c0726d13907dcf027764
refs/heads/master
<repo_name>IllidanS4/Arctium-RE<file_sep>/Framework.Serialization/Serializator.cs using System; using System.Collections.Generic; using System.IO; using System.Runtime.Serialization.Formatters.Binary; namespace Framework.Serialization { public class Serializator { public static void Save<T>(List<T> charList, string file) { FileStream fileStream = Serializator.smethod_0(file, FileMode.Create); try { Serializator.smethod_2(Serializator.smethod_1(), fileStream, charList); } finally { if (fileStream != null) { while (true) { IL_4B: uint arg_33_0 = 804601919u; while (true) { uint num; switch ((num = (arg_33_0 ^ 1403878915u)) % 3u) { case 0u: goto IL_4B; case 1u: Serializator.smethod_3(fileStream); arg_33_0 = (num * 4098417610u ^ 1804271180u); continue; } goto Block_5; } } Block_5:; } } } public static void Save2<T, T2>(Dictionary<T, T2> dic, string file) { FileStream fileStream = Serializator.smethod_0(file, FileMode.Create); try { Serializator.smethod_2(Serializator.smethod_1(), fileStream, dic); } finally { if (fileStream != null) { while (true) { IL_4B: uint arg_33_0 = 2703141299u; while (true) { uint num; switch ((num = (arg_33_0 ^ 2511251952u)) % 3u) { case 1u: Serializator.smethod_3(fileStream); arg_33_0 = (num * 3945790786u ^ 4177737970u); continue; case 2u: goto IL_4B; } goto Block_5; } } Block_5:; } } } public static List<T> Get<T>(string file) { if (!Serializator.smethod_4(file)) { return null; } FileStream fileStream = Serializator.smethod_0(file, FileMode.Open); List<T> result; try { result = (List<T>)Serializator.smethod_5(Serializator.smethod_1(), fileStream); } catch { result = null; } finally { if (fileStream != null) { while (true) { IL_65: uint arg_4D_0 = 1696969754u; while (true) { uint num; switch ((num = (arg_4D_0 ^ 2131503219u)) % 3u) { case 0u: goto IL_65; case 1u: Serializator.smethod_3(fileStream); arg_4D_0 = (num * 3729924721u ^ 992887841u); continue; } goto Block_8; } } Block_8:; } } return result; } public static Dictionary<T, T2> Get2<T, T2>(string file) { if (!Serializator.smethod_4(file)) { return null; } FileStream fileStream = Serializator.smethod_0(file, FileMode.Open); Dictionary<T, T2> result; try { result = (Dictionary<T, T2>)Serializator.smethod_5(Serializator.smethod_1(), fileStream); } catch { while (true) { IL_5C: uint arg_33_0 = 2332307995u; while (true) { uint num; switch ((num = (arg_33_0 ^ 2725480770u)) % 3u) { case 1u: result = null; arg_33_0 = (num * 3158769671u ^ 3855982817u); continue; case 2u: goto IL_5C; } goto Block_6; } } Block_6:; } finally { if (fileStream != null) { while (true) { IL_9A: uint arg_82_0 = 3298939252u; while (true) { uint num; switch ((num = (arg_82_0 ^ 2725480770u)) % 3u) { case 1u: Serializator.smethod_3(fileStream); arg_82_0 = (num * 2435844654u ^ 983069321u); continue; case 2u: goto IL_9A; } goto Block_9; } } Block_9:; } } return result; } static FileStream smethod_0(string string_0, FileMode fileMode_0) { return new FileStream(string_0, fileMode_0); } static BinaryFormatter smethod_1() { return new BinaryFormatter(); } static void smethod_2(BinaryFormatter binaryFormatter_0, Stream stream_0, object object_0) { binaryFormatter_0.Serialize(stream_0, object_0); } static void smethod_3(IDisposable idisposable_0) { idisposable_0.Dispose(); } static bool smethod_4(string string_0) { return File.Exists(string_0); } static object smethod_5(BinaryFormatter binaryFormatter_0, Stream stream_0) { return binaryFormatter_0.Deserialize(stream_0); } } } <file_sep>/Bgs.Protocol.Authentication.V1/GameAccountSelectedRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class GameAccountSelectedRequest : IMessage<GameAccountSelectedRequest>, IEquatable<GameAccountSelectedRequest>, IDeepCloneable<GameAccountSelectedRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountSelectedRequest.__c __9 = new GameAccountSelectedRequest.__c(); internal GameAccountSelectedRequest cctor>b__29_0() { return new GameAccountSelectedRequest(); } } private static readonly MessageParser<GameAccountSelectedRequest> _parser = new MessageParser<GameAccountSelectedRequest>(new Func<GameAccountSelectedRequest>(GameAccountSelectedRequest.__c.__9.<.cctor>b__29_0)); public const int ResultFieldNumber = 1; private uint result_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public static MessageParser<GameAccountSelectedRequest> Parser { get { return GameAccountSelectedRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[16]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountSelectedRequest.Descriptor; } } public uint Result { get { return this.result_; } set { this.result_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public GameAccountSelectedRequest() { } public GameAccountSelectedRequest(GameAccountSelectedRequest other) : this() { this.result_ = other.result_; this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); } public GameAccountSelectedRequest Clone() { return new GameAccountSelectedRequest(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountSelectedRequest); } public bool Equals(GameAccountSelectedRequest other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1231102829) % 9) { case 0: goto IL_B0; case 1: arg_72_0 = ((this.Result != other.Result) ? 1613309053 : 688743851); continue; case 2: goto IL_41; case 3: return false; case 4: return false; case 6: return false; case 7: arg_72_0 = ((!GameAccountSelectedRequest.smethod_0(this.GameAccountId, other.GameAccountId)) ? 614453928 : 1016538616); continue; case 8: return true; } break; } return true; IL_41: arg_72_0 = 2013261718; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1666204037 : 54047534); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_7A: uint arg_5E_0 = 1925848129u; while (true) { uint num2; switch ((num2 = (arg_5E_0 ^ 2046370864u)) % 4u) { case 1u: num ^= this.Result.GetHashCode(); arg_5E_0 = (((this.gameAccountId_ != null) ? 2476017180u : 3639015982u) ^ num2 * 3062255914u); continue; case 2u: num ^= this.GameAccountId.GetHashCode(); arg_5E_0 = (num2 * 3682886118u ^ 2172377216u); continue; case 3u: goto IL_7A; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_96: uint arg_76_0 = 2945661096u; while (true) { uint num; switch ((num = (arg_76_0 ^ 3639963850u)) % 5u) { case 1u: output.WriteUInt32(this.Result); arg_76_0 = (num * 1325381911u ^ 2051547615u); continue; case 2u: goto IL_96; case 3u: arg_76_0 = (((this.gameAccountId_ != null) ? 654720575u : 1181479780u) ^ num * 2821488695u); continue; case 4u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_76_0 = (num * 117333958u ^ 3967108281u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_7B: uint arg_5F_0 = 3871845381u; while (true) { uint num2; switch ((num2 = (arg_5F_0 ^ 4027619206u)) % 4u) { case 0u: goto IL_7B; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_5F_0 = (num2 * 2837001384u ^ 1612172860u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Result); arg_5F_0 = (((this.gameAccountId_ == null) ? 3696635493u : 3015637334u) ^ num2 * 3656224379u); continue; } return num; } } return num; } public void MergeFrom(GameAccountSelectedRequest other) { if (other == null) { goto IL_54; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 3083016765u)) % 9u) { case 0u: this.Result = other.Result; arg_BC_0 = (num * 2359437629u ^ 942660998u); continue; case 1u: this.gameAccountId_ = new EntityId(); arg_BC_0 = (num * 2052484588u ^ 229593190u); continue; case 2u: arg_BC_0 = (((this.gameAccountId_ != null) ? 81773963u : 274863240u) ^ num * 1785518467u); continue; case 3u: goto IL_FC; case 4u: goto IL_54; case 5u: arg_BC_0 = ((other.gameAccountId_ != null) ? 2922043090u : 3804220162u); continue; case 6u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_BC_0 = 3804220162u; continue; case 8u: return; } break; } return; IL_54: arg_BC_0 = 3075276873u; goto IL_B7; IL_FC: arg_BC_0 = ((other.Result == 0u) ? 2714855696u : 2368466547u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14F: uint num; uint arg_103_0 = ((num = input.ReadTag()) != 0u) ? 1548516507u : 1020247418u; while (true) { uint num2; switch ((num2 = (arg_103_0 ^ 1019864074u)) % 12u) { case 1u: arg_103_0 = ((num != 8u) ? 1746257208u : 1907664673u); continue; case 2u: this.gameAccountId_ = new EntityId(); arg_103_0 = (num2 * 3221857946u ^ 4055922806u); continue; case 3u: this.Result = input.ReadUInt32(); arg_103_0 = 560929765u; continue; case 4u: input.ReadMessage(this.gameAccountId_); arg_103_0 = 144012006u; continue; case 5u: arg_103_0 = 1548516507u; continue; case 6u: arg_103_0 = (((num != 18u) ? 2865069496u : 2360699291u) ^ num2 * 3024415828u); continue; case 7u: arg_103_0 = (num2 * 3644815762u ^ 3700064560u); continue; case 8u: goto IL_14F; case 9u: arg_103_0 = ((this.gameAccountId_ != null) ? 1828344722u : 275264688u); continue; case 10u: input.SkipLastField(); arg_103_0 = (num2 * 2566610462u ^ 314941589u); continue; case 11u: arg_103_0 = (num2 * 764129279u ^ 2760319735u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/ByteBuffer.cs using System; using System.IO; using System.Reflection; using System.Text; namespace AuthServer.Game.Packets.PacketHandler { public class ByteBuffer : IDisposable { private byte BitPosition = 8; private byte BitValue; private BinaryWriter writeStream; private BinaryReader readStream; public ByteBuffer() { this.writeStream = ByteBuffer.smethod_1(ByteBuffer.smethod_0()); } public ByteBuffer(byte[] data) { while (true) { IL_4A: uint arg_32_0 = 1277383585u; while (true) { uint num; switch ((num = (arg_32_0 ^ 2012861080u)) % 3u) { case 0u: goto IL_4A; case 1u: this.readStream = ByteBuffer.smethod_3(ByteBuffer.smethod_2(data)); arg_32_0 = (num * 2507189274u ^ 3739588549u); continue; } return; } } } public void Dispose() { if (this.writeStream != null) { goto IL_4B; } goto IL_81; uint arg_55_0; while (true) { IL_50: uint num; switch ((num = (arg_55_0 ^ 3141536099u)) % 5u) { case 0u: goto IL_4B; case 1u: ByteBuffer.smethod_5(this.readStream); arg_55_0 = (num * 3360933649u ^ 248521375u); continue; case 3u: ByteBuffer.smethod_4(this.writeStream); arg_55_0 = (num * 1806868308u ^ 3140808729u); continue; case 4u: goto IL_81; } break; } return; IL_4B: arg_55_0 = 3451079971u; goto IL_50; IL_81: arg_55_0 = ((this.readStream == null) ? 4156338860u : 3236659808u); goto IL_50; } public sbyte ReadInt8() { this.ResetBitPos(); return ByteBuffer.smethod_6(this.readStream); } public short ReadInt16() { this.ResetBitPos(); return ByteBuffer.smethod_7(this.readStream); } public int ReadInt32() { this.ResetBitPos(); return ByteBuffer.smethod_8(this.readStream); } public long ReadInt64() { this.ResetBitPos(); return ByteBuffer.smethod_9(this.readStream); } public byte ReadUInt8() { this.ResetBitPos(); return ByteBuffer.smethod_10(this.readStream); } public ushort ReadUInt16() { this.ResetBitPos(); return ByteBuffer.smethod_11(this.readStream); } public uint ReadUInt32() { this.ResetBitPos(); return ByteBuffer.smethod_12(this.readStream); } public ulong ReadUInt64() { this.ResetBitPos(); return ByteBuffer.smethod_13(this.readStream); } public float ReadFloat() { this.ResetBitPos(); return ByteBuffer.smethod_14(this.readStream); } public double ReadDouble() { this.ResetBitPos(); return ByteBuffer.smethod_15(this.readStream); } public string ReadCString() { this.ResetBitPos(); StringBuilder stringBuilder; while (true) { IL_C3: uint arg_9B_0 = 1215227309u; while (true) { uint num; switch ((num = (arg_9B_0 ^ 2004767394u)) % 7u) { case 0u: { char c; char c2; arg_9B_0 = ((c == c2) ? 966518197u : 2082839769u); continue; } case 1u: { char c = ByteBuffer.smethod_17(this.readStream); arg_9B_0 = (num * 1216300234u ^ 329147855u); continue; } case 2u: stringBuilder = ByteBuffer.smethod_16(); arg_9B_0 = (num * 4167127647u ^ 4056163422u); continue; case 4u: { char c = ByteBuffer.smethod_17(this.readStream); char c2 = ByteBuffer.smethod_20(ByteBuffer.smethod_19(ByteBuffer.smethod_18(), new byte[1])); arg_9B_0 = (num * 1188310877u ^ 4251549052u); continue; } case 5u: goto IL_C3; case 6u: { char c; ByteBuffer.smethod_21(stringBuilder, c); arg_9B_0 = 1510893395u; continue; } } goto Block_2; } } Block_2: return ByteBuffer.smethod_22(stringBuilder); } public string ReadString(uint length) { if (length != 0u) { goto IL_27; } IL_03: int arg_0D_0 = -2091770556; IL_08: switch ((arg_0D_0 ^ -1865938317) % 4) { case 0: IL_27: this.ResetBitPos(); arg_0D_0 = -275579210; goto IL_08; case 2: goto IL_03; case 3: return ""; } return ByteBuffer.smethod_19(ByteBuffer.smethod_18(), this.ReadBytes(length)); } public bool ReadBool() { this.ResetBitPos(); return ByteBuffer.smethod_23(this.readStream); } public byte[] ReadBytes(uint count) { this.ResetBitPos(); return ByteBuffer.smethod_24(this.readStream, (int)count); } public void Skip(int count) { this.ResetBitPos(); while (true) { IL_4B: uint arg_33_0 = 1271571993u; while (true) { uint num; switch ((num = (arg_33_0 ^ 89898627u)) % 3u) { case 0u: goto IL_4B; case 2u: { Stream expr_13 = ByteBuffer.smethod_25(this.readStream); ByteBuffer.smethod_27(expr_13, ByteBuffer.smethod_26(expr_13) + (long)count); arg_33_0 = (num * 1673848751u ^ 246242862u); continue; } } return; } } } public byte ReadBit() { if (this.BitPosition == 8) { goto IL_3C; } goto IL_88; uint arg_64_0; while (true) { IL_5F: uint num; switch ((num = (arg_64_0 ^ 2495703843u)) % 6u) { case 0u: this.BitPosition += 1; arg_64_0 = (num * 874961674u ^ 2504799792u); continue; case 2u: goto IL_88; case 3u: goto IL_3C; case 4u: this.BitPosition = 0; arg_64_0 = (num * 167866094u ^ 965148865u); continue; case 5u: this.BitValue = this.ReadUInt8(); arg_64_0 = (num * 199237547u ^ 3430839254u); continue; } break; } int bitValue; return (byte)(bitValue >> 7); IL_3C: arg_64_0 = 3589106364u; goto IL_5F; IL_88: bitValue = (int)this.BitValue; this.BitValue = (byte)(2 * bitValue); arg_64_0 = 2785765217u; goto IL_5F; } public bool HasBit() { if (this.BitPosition == 8) { goto IL_2D; } goto IL_53; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2460502305u)) % 4u) { case 0u: goto IL_2D; case 1u: this.BitValue = this.ReadUInt8(); this.BitPosition = 0; arg_37_0 = (num * 2908268954u ^ 2056153033u); continue; case 2u: goto IL_53; } break; } this.BitPosition += 1; int bitValue; return ByteBuffer.smethod_28(bitValue >> 7); IL_2D: arg_37_0 = 4001561160u; goto IL_32; IL_53: bitValue = (int)this.BitValue; this.BitValue = (byte)(2 * bitValue); arg_37_0 = 2301562614u; goto IL_32; } public T ReadBits<T>(int bitCount) { int num = 0; while (true) { IL_B9: uint arg_8D_0 = 3465226812u; while (true) { uint num2; switch ((num2 = (arg_8D_0 ^ 2196184328u)) % 8u) { case 0u: arg_8D_0 = (num2 * 1576970896u ^ 3006736875u); continue; case 1u: { int num3; num |= 1 << num3; arg_8D_0 = (num2 * 1102446751u ^ 761069744u); continue; } case 3u: { int num3; arg_8D_0 = ((num3 < 0) ? 3363807146u : 2758948141u); continue; } case 4u: { int num3 = bitCount - 1; arg_8D_0 = (num2 * 3390901102u ^ 2048271424u); continue; } case 5u: arg_8D_0 = ((!this.HasBit()) ? 2564258623u : 3838308889u); continue; case 6u: goto IL_B9; case 7u: { int num3; num3--; arg_8D_0 = 2853753067u; continue; } } goto Block_3; } } Block_3: return (T)((object)ByteBuffer.smethod_30(num, ByteBuffer.smethod_29(typeof(T).TypeHandle))); } public void WriteInt8<T>(T data) { this.FlushBits(); ByteBuffer.smethod_32(this.writeStream, ByteBuffer.smethod_31(data)); } public void WriteInt16<T>(T data) { this.FlushBits(); ByteBuffer.smethod_34(this.writeStream, ByteBuffer.smethod_33(data)); } public void WriteInt32<T>(T data) { this.FlushBits(); ByteBuffer.smethod_36(this.writeStream, ByteBuffer.smethod_35(data)); } public void WriteInt64<T>(T data) { this.FlushBits(); while (true) { IL_48: uint arg_30_0 = 1036369819u; while (true) { uint num; switch ((num = (arg_30_0 ^ 2045628314u)) % 3u) { case 0u: goto IL_48; case 2u: ByteBuffer.smethod_38(this.writeStream, ByteBuffer.smethod_37(data)); arg_30_0 = (num * 3421296959u ^ 841904661u); continue; } return; } } } public void WriteUInt8<T>(T data) { this.FlushBits(); while (true) { IL_48: uint arg_30_0 = 2920097871u; while (true) { uint num; switch ((num = (arg_30_0 ^ 4038053612u)) % 3u) { case 0u: goto IL_48; case 1u: ByteBuffer.smethod_40(this.writeStream, ByteBuffer.smethod_39(data)); arg_30_0 = (num * 232515336u ^ 978410188u); continue; } return; } } } public void WriteUInt16<T>(T data) { this.FlushBits(); ByteBuffer.smethod_42(this.writeStream, ByteBuffer.smethod_41(data)); } public void WriteUInt32<T>(T data) { this.FlushBits(); while (true) { IL_48: uint arg_30_0 = 3198963542u; while (true) { uint num; switch ((num = (arg_30_0 ^ 2893365727u)) % 3u) { case 0u: goto IL_48; case 2u: ByteBuffer.smethod_44(this.writeStream, ByteBuffer.smethod_43(data)); arg_30_0 = (num * 1716597332u ^ 1347428387u); continue; } return; } } } public void WriteUInt64<T>(T data) { this.FlushBits(); ByteBuffer.smethod_46(this.writeStream, ByteBuffer.smethod_45(data)); } public void WriteFloat<T>(T data) { this.FlushBits(); ByteBuffer.smethod_48(this.writeStream, ByteBuffer.smethod_47(data)); } public void WriteDouble<T>(T data) { this.FlushBits(); ByteBuffer.smethod_50(this.writeStream, ByteBuffer.smethod_49(data)); } public void WriteCString(string str) { if (ByteBuffer.smethod_51(str)) { goto IL_20; } goto IL_4A; uint arg_2A_0; while (true) { IL_25: uint num; switch ((num = (arg_2A_0 ^ 2656609575u)) % 5u) { case 0u: goto IL_20; case 2u: goto IL_4A; case 3u: this.WriteUInt8<int>(0); arg_2A_0 = (num * 1886522064u ^ 1900289982u); continue; case 4u: return; } break; } return; IL_20: arg_2A_0 = 3676467903u; goto IL_25; IL_4A: this.WriteString(str); this.WriteUInt8<int>(0); arg_2A_0 = 2810720667u; goto IL_25; } public void WriteString(string str) { byte[] data = ByteBuffer.smethod_52(ByteBuffer.smethod_18(), str); this.WriteBytes(data); } public void WriteBytes(byte[] data) { this.FlushBits(); ByteBuffer.smethod_53(this.writeStream, data, 0, data.Length); } public void WriteBytes(byte[] data, uint count) { this.FlushBits(); ByteBuffer.smethod_53(this.writeStream, data, 0, (int)count); } public void WriteBytes(ByteBuffer buffer) { this.WriteBytes(buffer.GetData()); } public void Replace<T>(int pos, T value) { int int_ = (int)ByteBuffer.smethod_26(ByteBuffer.smethod_54(this.writeStream)); ByteBuffer.smethod_55(this.writeStream, pos, SeekOrigin.Begin); string text = ByteBuffer.smethod_56(ByteBuffer.smethod_29(typeof(T).TypeHandle)); while (true) { IL_704: uint arg_627_0 = 1638050503u; while (true) { uint num; switch ((num = (arg_627_0 ^ 1694542224u)) % 52u) { case 0u: { uint num2; arg_627_0 = (((num2 != 423635464u) ? 3714613865u : 2727776960u) ^ num * 2465125661u); continue; } case 1u: { uint num2; arg_627_0 = ((num2 != 765439473u) ? 146628923u : 1181320609u); continue; } case 2u: arg_627_0 = (num * 1605995385u ^ 570591926u); continue; case 3u: arg_627_0 = (num * 2857082033u ^ 961444247u); continue; case 4u: arg_627_0 = ((!ByteBuffer.smethod_57(text, Module.smethod_33<string>(3216441273u))) ? 451905569u : 2074048763u); continue; case 5u: arg_627_0 = (num * 4239927339u ^ 46014827u); continue; case 6u: arg_627_0 = (num * 55303795u ^ 1742785194u); continue; case 7u: arg_627_0 = (num * 1348080724u ^ 4188159500u); continue; case 8u: arg_627_0 = (num * 233709226u ^ 1605014112u); continue; case 9u: { uint num2; arg_627_0 = (((num2 == 697196164u) ? 3448985298u : 3558868657u) ^ num * 1068338810u); continue; } case 10u: arg_627_0 = (num * 4184828199u ^ 4069931930u); continue; case 11u: this.WriteInt64<long>(ByteBuffer.smethod_37(value)); arg_627_0 = 1809284071u; continue; case 12u: { uint num2; arg_627_0 = (((num2 <= 1283547685u) ? 844171113u : 262452932u) ^ num * 4014795075u); continue; } case 13u: arg_627_0 = (num * 3253110964u ^ 2940982788u); continue; case 14u: { uint num2; arg_627_0 = (((num2 != 1324880019u) ? 2818429901u : 2386097546u) ^ num * 1396287726u); continue; } case 15u: this.WriteFloat<float>(ByteBuffer.smethod_47(value)); arg_627_0 = 132211917u; continue; case 16u: ByteBuffer.smethod_55(this.writeStream, int_, SeekOrigin.Begin); arg_627_0 = 1037442282u; continue; case 17u: this.WriteInt8<sbyte>(ByteBuffer.smethod_31(value)); arg_627_0 = 1327002064u; continue; case 18u: arg_627_0 = (num * 450477039u ^ 2714719670u); continue; case 19u: { uint num2 = <PrivateImplementationDetails>.ComputeStringHash(text); arg_627_0 = (num * 4068470158u ^ 182657414u); continue; } case 20u: this.WriteUInt8<byte>(ByteBuffer.smethod_39(value)); arg_627_0 = 677785995u; continue; case 21u: { uint num2; arg_627_0 = (((num2 != 3538687084u) ? 3784888270u : 2296096518u) ^ num * 3771703622u); continue; } case 22u: goto IL_704; case 23u: arg_627_0 = (num * 4267998005u ^ 3401975623u); continue; case 24u: arg_627_0 = (ByteBuffer.smethod_57(text, Module.smethod_37<string>(2367085557u)) ? 184043425u : 311443422u); continue; case 25u: arg_627_0 = (num * 2332540575u ^ 2412614503u); continue; case 26u: this.WriteInt16<short>(ByteBuffer.smethod_33(value)); arg_627_0 = 814680403u; continue; case 27u: arg_627_0 = (ByteBuffer.smethod_57(text, Module.smethod_33<string>(2781839893u)) ? 2122639723u : 762611598u); continue; case 28u: arg_627_0 = (ByteBuffer.smethod_57(text, Module.smethod_33<string>(116627772u)) ? 134025371u : 1279434374u); continue; case 29u: { uint num2; arg_627_0 = (((num2 == 1323747186u) ? 1838954536u : 10204720u) ^ num * 1453766222u); continue; } case 30u: arg_627_0 = (ByteBuffer.smethod_57(text, Module.smethod_34<string>(2489397489u)) ? 1797296816u : 1811522181u); continue; case 31u: { uint num2; arg_627_0 = (((num2 == 3409549631u) ? 662254437u : 665021480u) ^ num * 3575541591u); continue; } case 32u: { uint num2; arg_627_0 = ((num2 == 2711245919u) ? 864026850u : 215120303u); continue; } case 33u: arg_627_0 = (num * 1089749385u ^ 1938289173u); continue; case 34u: this.WriteInt32<int>(ByteBuffer.smethod_35(value)); arg_627_0 = 923165457u; continue; case 35u: arg_627_0 = (num * 726906172u ^ 366734052u); continue; case 36u: this.WriteUInt16<ushort>(ByteBuffer.smethod_41(value)); arg_627_0 = 1327002064u; continue; case 37u: { uint num2; arg_627_0 = (((num2 > 697196164u) ? 222624305u : 1840450012u) ^ num * 3783047748u); continue; } case 38u: arg_627_0 = ((!ByteBuffer.smethod_57(text, Module.smethod_36<string>(950035757u))) ? 899175091u : 779950078u); continue; case 39u: arg_627_0 = (num * 1718563350u ^ 4113844018u); continue; case 40u: this.WriteUInt64<ulong>(ByteBuffer.smethod_45(value)); arg_627_0 = 1327002064u; continue; case 41u: arg_627_0 = ((!ByteBuffer.smethod_57(text, Module.smethod_35<string>(1254630331u))) ? 1076183673u : 8430830u); continue; case 42u: arg_627_0 = (num * 1591322098u ^ 213133932u); continue; case 43u: arg_627_0 = (num * 3804430574u ^ 1762133146u); continue; case 44u: { uint num2; arg_627_0 = ((num2 > 1324880019u) ? 1676189624u : 913038541u); continue; } case 45u: arg_627_0 = (num * 46792096u ^ 3031530608u); continue; case 46u: arg_627_0 = ((!ByteBuffer.smethod_57(text, Module.smethod_35<string>(2681632874u))) ? 1903291235u : 602944264u); continue; case 47u: { uint num2; arg_627_0 = (((num2 == 1283547685u) ? 2872933897u : 2744565704u) ^ num * 2536509434u); continue; } case 48u: arg_627_0 = (ByteBuffer.smethod_57(text, Module.smethod_35<string>(3073353507u)) ? 1960848480u : 9149034u); continue; case 49u: arg_627_0 = (num * 2116399870u ^ 3150899462u); continue; case 51u: this.WriteUInt32<uint>(ByteBuffer.smethod_43(value)); arg_627_0 = 1327002064u; continue; } return; } } } public bool WriteBit(object bit) { this.BitPosition -= 1; while (true) { IL_F2: uint arg_CA_0 = 1625335300u; while (true) { uint num; switch ((num = (arg_CA_0 ^ 1808142760u)) % 7u) { case 1u: arg_CA_0 = ((this.BitPosition == 0) ? 884119853u : 1515143354u); continue; case 2u: this.BitValue |= (byte)(1 << (int)this.BitPosition); arg_CA_0 = (num * 501221808u ^ 3594316173u); continue; case 3u: ByteBuffer.smethod_40(this.writeStream, this.BitValue); arg_CA_0 = (num * 957592711u ^ 788086247u); continue; case 4u: arg_CA_0 = ((ByteBuffer.smethod_58(bit) ? 2249557286u : 3244849081u) ^ num * 1717938463u); continue; case 5u: this.BitPosition = 8; this.BitValue = 0; arg_CA_0 = (num * 1311305030u ^ 1907158322u); continue; case 6u: goto IL_F2; } goto Block_3; } } Block_3: return ByteBuffer.smethod_58(bit); } public void WriteBits(object bit, int count) { int num = count - 1; while (true) { IL_8F: uint arg_6B_0 = 2883024490u; while (true) { uint num2; switch ((num2 = (arg_6B_0 ^ 2424808432u)) % 6u) { case 1u: this.WriteBit(ByteBuffer.smethod_35(bit) >> num & 1); arg_6B_0 = 3842977497u; continue; case 2u: arg_6B_0 = (num2 * 2170514368u ^ 2594333672u); continue; case 3u: num--; arg_6B_0 = (num2 * 2536534661u ^ 1003645477u); continue; case 4u: arg_6B_0 = ((num < 0) ? 2940466672u : 3709056609u); continue; case 5u: goto IL_8F; } return; } } } public void WritePackedTime() { DateTime now = DateTime.Now; this.WriteUInt32<uint>(Convert.ToUInt32(now.Year - 2000 << 24 | now.Month - 1 << 20 | now.Day - 1 << 14 | (int)((int)now.DayOfWeek << 11) | now.Hour << 6 | now.Minute)); } public int GetPosition() { long num = 0L; while (true) { IL_D3: uint arg_AB_0 = 2961494348u; while (true) { uint num2; switch ((num2 = (arg_AB_0 ^ 3009875001u)) % 7u) { case 0u: arg_AB_0 = (num2 * 1096810581u ^ 1736428796u); continue; case 2u: arg_AB_0 = (((this.writeStream == null) ? 2755453271u : 4267780409u) ^ num2 * 1242134569u); continue; case 3u: num = ByteBuffer.smethod_26(ByteBuffer.smethod_25(this.readStream)); arg_AB_0 = (num2 * 3016629675u ^ 2045850323u); continue; case 4u: num = ByteBuffer.smethod_26(ByteBuffer.smethod_54(this.writeStream)); arg_AB_0 = (num2 * 3894290057u ^ 3404457118u); continue; case 5u: goto IL_D3; case 6u: arg_AB_0 = ((this.readStream == null) ? 2869123286u : 3813280566u); continue; } goto Block_3; } } Block_3: return (int)num; } public void SetPosition(long pos) { if (this.writeStream != null) { goto IL_37; } goto IL_6D; uint arg_41_0; while (true) { IL_3C: uint num; switch ((num = (arg_41_0 ^ 3786834332u)) % 5u) { case 0u: goto IL_6D; case 2u: goto IL_37; case 3u: ByteBuffer.smethod_27(ByteBuffer.smethod_25(this.readStream), pos); arg_41_0 = (num * 1655322744u ^ 1321440459u); continue; case 4u: goto IL_78; } break; } return; IL_78: ByteBuffer.smethod_27(ByteBuffer.smethod_54(this.writeStream), pos); return; IL_37: arg_41_0 = 2204217955u; goto IL_3C; IL_6D: arg_41_0 = ((this.readStream == null) ? 3692447091u : 4112260037u); goto IL_3C; } public void FlushBits() { if (this.BitPosition != 8) { goto IL_2D; } IL_09: int arg_13_0 = -2069191959; IL_0E: switch ((arg_13_0 ^ -1107548226) % 4) { case 0: goto IL_09; case 2: IL_2D: ByteBuffer.smethod_40(this.writeStream, this.BitValue); this.BitValue = 0; arg_13_0 = -180495177; goto IL_0E; case 3: return; } this.BitPosition = 8; } public void ResetBitPos() { if (this.BitPosition <= 7) { goto IL_2D; } IL_09: int arg_13_0 = -135490617; IL_0E: switch ((arg_13_0 ^ -1494272891) % 4) { case 1: IL_2D: this.BitPosition = 8; this.BitValue = 0; arg_13_0 = -1839859391; goto IL_0E; case 2: return; case 3: goto IL_09; } } public byte[] GetData() { Stream currentStream = this.GetCurrentStream(); byte[] array = new byte[ByteBuffer.smethod_59(currentStream)]; long long_ = ByteBuffer.smethod_26(currentStream); while (true) { IL_98: uint arg_77_0 = 1066532498u; while (true) { uint num; switch ((num = (arg_77_0 ^ 513493344u)) % 5u) { case 1u: { int num2; array[num2] = (byte)ByteBuffer.smethod_61(currentStream); num2++; arg_77_0 = 1039632003u; continue; } case 2u: { int num2; arg_77_0 = ((num2 < array.Length) ? 535420235u : 120473455u); continue; } case 3u: { ByteBuffer.smethod_60(currentStream, 0L, SeekOrigin.Begin); int num2 = 0; arg_77_0 = (num * 952820921u ^ 3161584481u); continue; } case 4u: goto IL_98; } goto Block_2; } } Block_2: ByteBuffer.smethod_60(currentStream, long_, SeekOrigin.Begin); return array; } public uint GetSize() { return (uint)ByteBuffer.smethod_59(this.GetCurrentStream()); } public Stream GetCurrentStream() { if (this.writeStream != null) { return ByteBuffer.smethod_54(this.writeStream); } return ByteBuffer.smethod_25(this.readStream); } public void Clear() { this.BitPosition = 8; this.BitValue = 0; this.writeStream = ByteBuffer.smethod_1(ByteBuffer.smethod_0()); } static MemoryStream smethod_0() { return new MemoryStream(); } static BinaryWriter smethod_1(Stream stream_0) { return new BinaryWriter(stream_0); } static MemoryStream smethod_2(byte[] byte_0) { return new MemoryStream(byte_0); } static BinaryReader smethod_3(Stream stream_0) { return new BinaryReader(stream_0); } static void smethod_4(BinaryWriter binaryWriter_0) { binaryWriter_0.Dispose(); } static void smethod_5(BinaryReader binaryReader_0) { binaryReader_0.Dispose(); } static sbyte smethod_6(BinaryReader binaryReader_0) { return binaryReader_0.ReadSByte(); } static short smethod_7(BinaryReader binaryReader_0) { return binaryReader_0.ReadInt16(); } static int smethod_8(BinaryReader binaryReader_0) { return binaryReader_0.ReadInt32(); } static long smethod_9(BinaryReader binaryReader_0) { return binaryReader_0.ReadInt64(); } static byte smethod_10(BinaryReader binaryReader_0) { return binaryReader_0.ReadByte(); } static ushort smethod_11(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt16(); } static uint smethod_12(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt32(); } static ulong smethod_13(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt64(); } static float smethod_14(BinaryReader binaryReader_0) { return binaryReader_0.ReadSingle(); } static double smethod_15(BinaryReader binaryReader_0) { return binaryReader_0.ReadDouble(); } static StringBuilder smethod_16() { return new StringBuilder(); } static char smethod_17(BinaryReader binaryReader_0) { return binaryReader_0.ReadChar(); } static Encoding smethod_18() { return Encoding.UTF8; } static string smethod_19(Encoding encoding_0, byte[] byte_0) { return encoding_0.GetString(byte_0); } static char smethod_20(string string_0) { return Convert.ToChar(string_0); } static StringBuilder smethod_21(StringBuilder stringBuilder_0, char char_0) { return stringBuilder_0.Append(char_0); } static string smethod_22(object object_0) { return object_0.ToString(); } static bool smethod_23(BinaryReader binaryReader_0) { return binaryReader_0.ReadBoolean(); } static byte[] smethod_24(BinaryReader binaryReader_0, int int_0) { return binaryReader_0.ReadBytes(int_0); } static Stream smethod_25(BinaryReader binaryReader_0) { return binaryReader_0.BaseStream; } static long smethod_26(Stream stream_0) { return stream_0.Position; } static void smethod_27(Stream stream_0, long long_0) { stream_0.Position = long_0; } static bool smethod_28(int int_0) { return Convert.ToBoolean(int_0); } static Type smethod_29(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static object smethod_30(object object_0, Type type_0) { return Convert.ChangeType(object_0, type_0); } static sbyte smethod_31(object object_0) { return Convert.ToSByte(object_0); } static void smethod_32(BinaryWriter binaryWriter_0, sbyte sbyte_0) { binaryWriter_0.Write(sbyte_0); } static short smethod_33(object object_0) { return Convert.ToInt16(object_0); } static void smethod_34(BinaryWriter binaryWriter_0, short short_0) { binaryWriter_0.Write(short_0); } static int smethod_35(object object_0) { return Convert.ToInt32(object_0); } static void smethod_36(BinaryWriter binaryWriter_0, int int_0) { binaryWriter_0.Write(int_0); } static long smethod_37(object object_0) { return Convert.ToInt64(object_0); } static void smethod_38(BinaryWriter binaryWriter_0, long long_0) { binaryWriter_0.Write(long_0); } static byte smethod_39(object object_0) { return Convert.ToByte(object_0); } static void smethod_40(BinaryWriter binaryWriter_0, byte byte_0) { binaryWriter_0.Write(byte_0); } static ushort smethod_41(object object_0) { return Convert.ToUInt16(object_0); } static void smethod_42(BinaryWriter binaryWriter_0, ushort ushort_0) { binaryWriter_0.Write(ushort_0); } static uint smethod_43(object object_0) { return Convert.ToUInt32(object_0); } static void smethod_44(BinaryWriter binaryWriter_0, uint uint_0) { binaryWriter_0.Write(uint_0); } static ulong smethod_45(object object_0) { return Convert.ToUInt64(object_0); } static void smethod_46(BinaryWriter binaryWriter_0, ulong ulong_0) { binaryWriter_0.Write(ulong_0); } static float smethod_47(object object_0) { return Convert.ToSingle(object_0); } static void smethod_48(BinaryWriter binaryWriter_0, float float_0) { binaryWriter_0.Write(float_0); } static double smethod_49(object object_0) { return Convert.ToDouble(object_0); } static void smethod_50(BinaryWriter binaryWriter_0, double double_0) { binaryWriter_0.Write(double_0); } static bool smethod_51(string string_0) { return string.IsNullOrEmpty(string_0); } static byte[] smethod_52(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static void smethod_53(BinaryWriter binaryWriter_0, byte[] byte_0, int int_0, int int_1) { binaryWriter_0.Write(byte_0, int_0, int_1); } static Stream smethod_54(BinaryWriter binaryWriter_0) { return binaryWriter_0.BaseStream; } static long smethod_55(BinaryWriter binaryWriter_0, int int_0, SeekOrigin seekOrigin_0) { return binaryWriter_0.Seek(int_0, seekOrigin_0); } static string smethod_56(MemberInfo memberInfo_0) { return memberInfo_0.Name; } static bool smethod_57(string string_0, string string_1) { return string_0 == string_1; } static bool smethod_58(object object_0) { return Convert.ToBoolean(object_0); } static long smethod_59(Stream stream_0) { return stream_0.Length; } static long smethod_60(Stream stream_0, long long_0, SeekOrigin seekOrigin_0) { return stream_0.Seek(long_0, seekOrigin_0); } static int smethod_61(Stream stream_0) { return stream_0.ReadByte(); } } } <file_sep>/Bgs.Protocol.Friends.V1/ViewFriendsResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class ViewFriendsResponse : IMessage<ViewFriendsResponse>, IEquatable<ViewFriendsResponse>, IDeepCloneable<ViewFriendsResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ViewFriendsResponse.__c __9 = new ViewFriendsResponse.__c(); internal ViewFriendsResponse cctor>b__24_0() { return new ViewFriendsResponse(); } } private static readonly MessageParser<ViewFriendsResponse> _parser = new MessageParser<ViewFriendsResponse>(new Func<ViewFriendsResponse>(ViewFriendsResponse.__c.__9.<.cctor>b__24_0)); public const int FriendsFieldNumber = 1; private static readonly FieldCodec<Friend> _repeated_friends_codec = FieldCodec.ForMessage<Friend>(10u, Friend.Parser); private readonly RepeatedField<Friend> friends_ = new RepeatedField<Friend>(); public static MessageParser<ViewFriendsResponse> Parser { get { return ViewFriendsResponse._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return ViewFriendsResponse.Descriptor; } } public RepeatedField<Friend> Friends { get { return this.friends_; } } public ViewFriendsResponse() { } public ViewFriendsResponse(ViewFriendsResponse other) : this() { this.friends_ = other.friends_.Clone(); } public ViewFriendsResponse Clone() { return new ViewFriendsResponse(this); } public override bool Equals(object other) { return this.Equals(other as ViewFriendsResponse); } public bool Equals(ViewFriendsResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 351796002) % 7) { case 0: return true; case 1: goto IL_7A; case 2: return false; case 3: goto IL_3E; case 4: arg_48_0 = ((!this.friends_.Equals(other.friends_)) ? 1546253097 : 2140403594); continue; case 6: return false; } break; } return true; IL_3E: arg_48_0 = 2006988750; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 926456398 : 147531392); goto IL_43; } public override int GetHashCode() { return 1 ^ ViewFriendsResponse.smethod_0(this.friends_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.friends_.WriteTo(output, ViewFriendsResponse._repeated_friends_codec); } public int CalculateSize() { return 0 + this.friends_.CalculateSize(ViewFriendsResponse._repeated_friends_codec); } public void MergeFrom(ViewFriendsResponse other) { if (other == null) { return; } this.friends_.Add(other.friends_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) != 0u) ? 359049588u : 2126554113u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 128639523u)) % 6u) { case 0u: input.SkipLastField(); arg_68_0 = (num2 * 1764236601u ^ 4116206068u); continue; case 1u: goto IL_9B; case 2u: arg_68_0 = 359049588u; continue; case 3u: arg_68_0 = ((num != 10u) ? 1515546423u : 1707017196u); continue; case 5u: this.friends_.AddEntriesFrom(input, ViewFriendsResponse._repeated_friends_codec); arg_68_0 = 709866624u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/UpdateChannelStateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class UpdateChannelStateRequest : IMessage<UpdateChannelStateRequest>, IEquatable<UpdateChannelStateRequest>, IDeepCloneable<UpdateChannelStateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateChannelStateRequest.__c __9 = new UpdateChannelStateRequest.__c(); internal UpdateChannelStateRequest cctor>b__29_0() { return new UpdateChannelStateRequest(); } } private static readonly MessageParser<UpdateChannelStateRequest> _parser = new MessageParser<UpdateChannelStateRequest>(new Func<UpdateChannelStateRequest>(UpdateChannelStateRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int StateChangeFieldNumber = 2; private ChannelState stateChange_; public static MessageParser<UpdateChannelStateRequest> Parser { get { return UpdateChannelStateRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateChannelStateRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public ChannelState StateChange { get { return this.stateChange_; } set { this.stateChange_ = value; } } public UpdateChannelStateRequest() { } public UpdateChannelStateRequest(UpdateChannelStateRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.StateChange = ((other.stateChange_ != null) ? other.StateChange.Clone() : null); } public UpdateChannelStateRequest Clone() { return new UpdateChannelStateRequest(this); } public override bool Equals(object other) { return this.Equals(other as UpdateChannelStateRequest); } public bool Equals(UpdateChannelStateRequest other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 1681943319) % 9) { case 0: goto IL_B5; case 1: return false; case 3: return true; case 4: return false; case 5: goto IL_6D; case 6: arg_77_0 = ((!UpdateChannelStateRequest.smethod_0(this.StateChange, other.StateChange)) ? 249755790 : 813194476); continue; case 7: return false; case 8: arg_77_0 = ((!UpdateChannelStateRequest.smethod_0(this.AgentId, other.AgentId)) ? 413430495 : 2035742093); continue; } break; } return true; IL_6D: arg_77_0 = 1555078173; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? 1730069376 : 1855602883); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_29; } goto IL_4F; uint arg_33_0; while (true) { IL_2E: uint num2; switch ((num2 = (arg_33_0 ^ 706254530u)) % 4u) { case 0u: goto IL_29; case 1u: num ^= UpdateChannelStateRequest.smethod_1(this.AgentId); arg_33_0 = (num2 * 3602720319u ^ 3868761782u); continue; case 3u: goto IL_4F; } break; } return num; IL_29: arg_33_0 = 685926663u; goto IL_2E; IL_4F: num ^= UpdateChannelStateRequest.smethod_1(this.StateChange); arg_33_0 = 1776258796u; goto IL_2E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_08; } goto IL_83; uint arg_5F_0; while (true) { IL_5A: uint num; switch ((num = (arg_5F_0 ^ 1107313464u)) % 6u) { case 1u: output.WriteMessage(this.StateChange); arg_5F_0 = (num * 3918776426u ^ 2067353922u); continue; case 2u: output.WriteRawTag(10); arg_5F_0 = (num * 1959480156u ^ 2134354956u); continue; case 3u: goto IL_83; case 4u: output.WriteMessage(this.AgentId); arg_5F_0 = (num * 1192338562u ^ 2335006013u); continue; case 5u: goto IL_08; } break; } return; IL_08: arg_5F_0 = 29689570u; goto IL_5A; IL_83: output.WriteRawTag(18); arg_5F_0 = 121745973u; goto IL_5A; } public int CalculateSize() { int num = 0; while (true) { IL_89: uint arg_69_0 = 3348303196u; while (true) { uint num2; switch ((num2 = (arg_69_0 ^ 3263655705u)) % 5u) { case 0u: goto IL_89; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.StateChange); arg_69_0 = 3297555913u; continue; case 2u: arg_69_0 = (((this.agentId_ == null) ? 3822655513u : 3933738768u) ^ num2 * 3314874941u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_69_0 = (num2 * 3939517333u ^ 1775150512u); continue; } return num; } } return num; } public void MergeFrom(UpdateChannelStateRequest other) { if (other == null) { goto IL_C9; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 3907021353u)) % 11u) { case 0u: this.stateChange_ = new ChannelState(); arg_105_0 = (num * 3870817261u ^ 2465983244u); continue; case 1u: this.StateChange.MergeFrom(other.StateChange); arg_105_0 = 4173495461u; continue; case 2u: goto IL_C9; case 3u: arg_105_0 = ((other.stateChange_ != null) ? 2320109507u : 4173495461u); continue; case 4u: goto IL_14D; case 5u: arg_105_0 = (((this.stateChange_ != null) ? 780831461u : 1163386980u) ^ num * 720174191u); continue; case 6u: return; case 7u: this.AgentId.MergeFrom(other.AgentId); arg_105_0 = 2840675756u; continue; case 8u: this.agentId_ = new EntityId(); arg_105_0 = (num * 4167579291u ^ 3097430373u); continue; case 10u: arg_105_0 = (((this.agentId_ == null) ? 3695877262u : 3234078410u) ^ num * 1510610179u); continue; } break; } return; IL_C9: arg_105_0 = 3925112538u; goto IL_100; IL_14D: arg_105_0 = ((other.agentId_ == null) ? 2840675756u : 3544201528u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_183: uint num; uint arg_133_0 = ((num = input.ReadTag()) != 0u) ? 3435356681u : 3634287023u; while (true) { uint num2; switch ((num2 = (arg_133_0 ^ 3225479728u)) % 13u) { case 0u: arg_133_0 = 3435356681u; continue; case 1u: this.stateChange_ = new ChannelState(); arg_133_0 = (num2 * 1461606854u ^ 577107048u); continue; case 3u: arg_133_0 = ((this.agentId_ != null) ? 2219842068u : 3174485647u); continue; case 4u: arg_133_0 = (((num != 18u) ? 1386048217u : 1775404250u) ^ num2 * 1651130454u); continue; case 5u: input.ReadMessage(this.stateChange_); arg_133_0 = 4246699404u; continue; case 6u: this.agentId_ = new EntityId(); arg_133_0 = (num2 * 2283840704u ^ 1549136212u); continue; case 7u: arg_133_0 = (num2 * 3175832254u ^ 2060522730u); continue; case 8u: goto IL_183; case 9u: arg_133_0 = ((num == 10u) ? 3178824278u : 3909017054u); continue; case 10u: arg_133_0 = ((this.stateChange_ != null) ? 2642851582u : 3657163849u); continue; case 11u: input.ReadMessage(this.agentId_); arg_133_0 = 4246699404u; continue; case 12u: input.SkipLastField(); arg_133_0 = (num2 * 2314427981u ^ 3084184740u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/AccountSettingsNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class AccountSettingsNotification : IMessage<AccountSettingsNotification>, IEquatable<AccountSettingsNotification>, IDeepCloneable<AccountSettingsNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountSettingsNotification.__c __9 = new AccountSettingsNotification.__c(); internal AccountSettingsNotification cctor>b__44_0() { return new AccountSettingsNotification(); } } private static readonly MessageParser<AccountSettingsNotification> _parser = new MessageParser<AccountSettingsNotification>(new Func<AccountSettingsNotification>(AccountSettingsNotification.__c.__9.<.cctor>b__44_0)); public const int LicensesFieldNumber = 1; private static readonly FieldCodec<AccountLicense> _repeated_licenses_codec = FieldCodec.ForMessage<AccountLicense>(10u, AccountLicense.Parser); private readonly RepeatedField<AccountLicense> licenses_ = new RepeatedField<AccountLicense>(); public const int IsUsingRidFieldNumber = 2; private bool isUsingRid_; public const int IsPlayingFromIgrFieldNumber = 3; private bool isPlayingFromIgr_; public const int CanReceiveVoiceFieldNumber = 4; private bool canReceiveVoice_; public const int CanSendVoiceFieldNumber = 5; private bool canSendVoice_; public static MessageParser<AccountSettingsNotification> Parser { get { return AccountSettingsNotification._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return AccountSettingsNotification.Descriptor; } } public RepeatedField<AccountLicense> Licenses { get { return this.licenses_; } } public bool IsUsingRid { get { return this.isUsingRid_; } set { this.isUsingRid_ = value; } } public bool IsPlayingFromIgr { get { return this.isPlayingFromIgr_; } set { this.isPlayingFromIgr_ = value; } } public bool CanReceiveVoice { get { return this.canReceiveVoice_; } set { this.canReceiveVoice_ = value; } } public bool CanSendVoice { get { return this.canSendVoice_; } set { this.canSendVoice_ = value; } } public AccountSettingsNotification() { } public AccountSettingsNotification(AccountSettingsNotification other) : this() { while (true) { IL_86: uint arg_6A_0 = 218359194u; while (true) { uint num; switch ((num = (arg_6A_0 ^ 1666565613u)) % 4u) { case 0u: goto IL_86; case 2u: this.canReceiveVoice_ = other.canReceiveVoice_; this.canSendVoice_ = other.canSendVoice_; arg_6A_0 = (num * 1687759339u ^ 205535570u); continue; case 3u: this.licenses_ = other.licenses_.Clone(); this.isUsingRid_ = other.isUsingRid_; this.isPlayingFromIgr_ = other.isPlayingFromIgr_; arg_6A_0 = (num * 201548354u ^ 46454853u); continue; } return; } } } public AccountSettingsNotification Clone() { return new AccountSettingsNotification(this); } public override bool Equals(object other) { return this.Equals(other as AccountSettingsNotification); } public bool Equals(AccountSettingsNotification other) { if (other == null) { goto IL_69; } goto IL_143; int arg_ED_0; while (true) { IL_E8: switch ((arg_ED_0 ^ -1778785587) % 15) { case 0: arg_ED_0 = ((this.IsPlayingFromIgr != other.IsPlayingFromIgr) ? -651007002 : -704167543); continue; case 2: arg_ED_0 = ((!this.licenses_.Equals(other.licenses_)) ? -804974790 : -382211745); continue; case 3: goto IL_143; case 4: return true; case 5: return false; case 6: return false; case 7: arg_ED_0 = ((this.IsUsingRid == other.IsUsingRid) ? -668966273 : -1511575436); continue; case 8: return false; case 9: return false; case 10: return false; case 11: goto IL_69; case 12: arg_ED_0 = ((this.CanReceiveVoice != other.CanReceiveVoice) ? -8199090 : -600000608); continue; case 13: return false; case 14: arg_ED_0 = ((this.CanSendVoice == other.CanSendVoice) ? -1508854551 : -1892915336); continue; } break; } return true; IL_69: arg_ED_0 = -1925363386; goto IL_E8; IL_143: arg_ED_0 = ((other != this) ? -1040235890 : -456146504); goto IL_E8; } public override int GetHashCode() { int num = 1; while (true) { IL_165: uint arg_130_0 = 489533788u; while (true) { uint num2; switch ((num2 = (arg_130_0 ^ 1127735010u)) % 10u) { case 0u: arg_130_0 = (this.CanSendVoice ? 862896278u : 733767533u); continue; case 2u: num ^= this.CanSendVoice.GetHashCode(); arg_130_0 = (num2 * 292496546u ^ 2739270149u); continue; case 3u: num ^= this.CanReceiveVoice.GetHashCode(); arg_130_0 = (num2 * 3761153758u ^ 1738159424u); continue; case 4u: arg_130_0 = (this.CanReceiveVoice ? 1237599627u : 629075534u); continue; case 5u: num ^= this.IsPlayingFromIgr.GetHashCode(); arg_130_0 = (num2 * 1934430522u ^ 4274906556u); continue; case 6u: num ^= AccountSettingsNotification.smethod_0(this.licenses_); arg_130_0 = ((this.IsUsingRid ? 3990766808u : 3449943203u) ^ num2 * 1638083873u); continue; case 7u: goto IL_165; case 8u: num ^= this.IsUsingRid.GetHashCode(); arg_130_0 = (num2 * 2602591381u ^ 1615029065u); continue; case 9u: arg_130_0 = ((!this.IsPlayingFromIgr) ? 16269650u : 1536096193u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.licenses_.WriteTo(output, AccountSettingsNotification._repeated_licenses_codec); while (true) { IL_188: uint arg_14F_0 = 495961434u; while (true) { uint num; switch ((num = (arg_14F_0 ^ 978438041u)) % 11u) { case 1u: arg_14F_0 = ((!this.IsPlayingFromIgr) ? 1664259808u : 1045109861u); continue; case 2u: output.WriteRawTag(16); output.WriteBool(this.IsUsingRid); arg_14F_0 = (num * 3549147341u ^ 1576404271u); continue; case 3u: output.WriteRawTag(40); output.WriteBool(this.CanSendVoice); arg_14F_0 = (num * 972444187u ^ 2632580604u); continue; case 4u: goto IL_188; case 5u: output.WriteRawTag(32); output.WriteBool(this.CanReceiveVoice); arg_14F_0 = (num * 766339123u ^ 1902005302u); continue; case 6u: arg_14F_0 = (this.CanReceiveVoice ? 590365651u : 1702045320u); continue; case 7u: arg_14F_0 = ((this.IsUsingRid ? 380292207u : 1234798237u) ^ num * 2510634881u); continue; case 8u: output.WriteRawTag(24); arg_14F_0 = (num * 3116491206u ^ 3854773624u); continue; case 9u: output.WriteBool(this.IsPlayingFromIgr); arg_14F_0 = (num * 1085906633u ^ 1476803057u); continue; case 10u: arg_14F_0 = (this.CanSendVoice ? 1048315200u : 975893279u); continue; } return; } } } public int CalculateSize() { int num = 0 + this.licenses_.CalculateSize(AccountSettingsNotification._repeated_licenses_codec); while (true) { IL_130: uint arg_FB_0 = 1622271010u; while (true) { uint num2; switch ((num2 = (arg_FB_0 ^ 78467823u)) % 10u) { case 0u: num += 2; arg_FB_0 = (num2 * 4075358430u ^ 1745597744u); continue; case 1u: arg_FB_0 = (this.CanReceiveVoice ? 1152169692u : 1087577057u); continue; case 2u: num += 2; arg_FB_0 = (num2 * 1620761979u ^ 3726185422u); continue; case 3u: arg_FB_0 = (this.IsPlayingFromIgr ? 881636957u : 1809029192u); continue; case 4u: num += 2; arg_FB_0 = (num2 * 1194156111u ^ 2217954901u); continue; case 5u: arg_FB_0 = (((!this.IsUsingRid) ? 1456312898u : 1535203913u) ^ num2 * 1932324130u); continue; case 6u: arg_FB_0 = ((!this.CanSendVoice) ? 1304110639u : 1091925385u); continue; case 7u: goto IL_130; case 9u: num += 2; arg_FB_0 = (num2 * 2401873746u ^ 2484596407u); continue; } return num; } } return num; } public void MergeFrom(AccountSettingsNotification other) { if (other == null) { goto IL_10C; } goto IL_153; uint arg_116_0; while (true) { IL_111: uint num; switch ((num = (arg_116_0 ^ 3763359347u)) % 12u) { case 0u: goto IL_10C; case 1u: return; case 2u: this.IsUsingRid = other.IsUsingRid; arg_116_0 = (num * 426850819u ^ 3270016114u); continue; case 3u: this.CanReceiveVoice = other.CanReceiveVoice; arg_116_0 = (num * 906977232u ^ 1330688332u); continue; case 4u: goto IL_153; case 5u: this.IsPlayingFromIgr = other.IsPlayingFromIgr; arg_116_0 = (num * 2813059589u ^ 3067566595u); continue; case 6u: arg_116_0 = ((other.IsUsingRid ? 4049107635u : 4056428694u) ^ num * 2026741387u); continue; case 7u: arg_116_0 = (other.CanSendVoice ? 2804164725u : 2258845275u); continue; case 9u: arg_116_0 = (other.CanReceiveVoice ? 4219680988u : 3159158396u); continue; case 10u: this.CanSendVoice = other.CanSendVoice; arg_116_0 = (num * 1358678234u ^ 907456327u); continue; case 11u: arg_116_0 = (other.IsPlayingFromIgr ? 2902840426u : 3837677182u); continue; } break; } return; IL_10C: arg_116_0 = 3531186630u; goto IL_111; IL_153: this.licenses_.Add(other.licenses_); arg_116_0 = 2779244229u; goto IL_111; } public void MergeFrom(CodedInputStream input) { while (true) { IL_214: uint num; uint arg_1B0_0 = ((num = input.ReadTag()) != 0u) ? 3495378525u : 2413231537u; while (true) { uint num2; switch ((num2 = (arg_1B0_0 ^ 3154027975u)) % 18u) { case 0u: arg_1B0_0 = (((num == 10u) ? 2473347846u : 3470284160u) ^ num2 * 1468357766u); continue; case 1u: arg_1B0_0 = ((num != 24u) ? 2982846380u : 2394016742u); continue; case 2u: arg_1B0_0 = 3495378525u; continue; case 3u: arg_1B0_0 = (num2 * 1127702003u ^ 2838387814u); continue; case 4u: this.CanSendVoice = input.ReadBool(); arg_1B0_0 = 3502934673u; continue; case 5u: this.licenses_.AddEntriesFrom(input, AccountSettingsNotification._repeated_licenses_codec); arg_1B0_0 = 3502934673u; continue; case 6u: this.IsUsingRid = input.ReadBool(); arg_1B0_0 = 3502934673u; continue; case 7u: arg_1B0_0 = (((num != 40u) ? 1003771042u : 469859078u) ^ num2 * 821494993u); continue; case 8u: input.SkipLastField(); arg_1B0_0 = 3954558655u; continue; case 9u: this.CanReceiveVoice = input.ReadBool(); arg_1B0_0 = 2355186218u; continue; case 11u: arg_1B0_0 = (((num == 32u) ? 2200797959u : 2474857797u) ^ num2 * 75774073u); continue; case 12u: arg_1B0_0 = ((num <= 16u) ? 2839597479u : 3983516164u); continue; case 13u: arg_1B0_0 = (num2 * 4068064730u ^ 2439985677u); continue; case 14u: arg_1B0_0 = (num2 * 3819140786u ^ 2171007969u); continue; case 15u: arg_1B0_0 = (((num == 16u) ? 4119688228u : 2932483101u) ^ num2 * 2048611903u); continue; case 16u: goto IL_214; case 17u: this.IsPlayingFromIgr = input.ReadBool(); arg_1B0_0 = 3502934673u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Challenge.V1/SendChallengeToUserResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class SendChallengeToUserResponse : IMessage<SendChallengeToUserResponse>, IEquatable<SendChallengeToUserResponse>, IDeepCloneable<SendChallengeToUserResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendChallengeToUserResponse.__c __9 = new SendChallengeToUserResponse.__c(); internal SendChallengeToUserResponse cctor>b__24_0() { return new SendChallengeToUserResponse(); } } private static readonly MessageParser<SendChallengeToUserResponse> _parser = new MessageParser<SendChallengeToUserResponse>(new Func<SendChallengeToUserResponse>(SendChallengeToUserResponse.__c.__9.<.cctor>b__24_0)); public const int IdFieldNumber = 1; private uint id_; public static MessageParser<SendChallengeToUserResponse> Parser { get { return SendChallengeToUserResponse._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return SendChallengeToUserResponse.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public SendChallengeToUserResponse() { } public SendChallengeToUserResponse(SendChallengeToUserResponse other) : this() { while (true) { IL_3E: uint arg_26_0 = 567720194u; while (true) { uint num; switch ((num = (arg_26_0 ^ 683765103u)) % 3u) { case 0u: goto IL_3E; case 2u: this.id_ = other.id_; arg_26_0 = (num * 3875838278u ^ 1413634056u); continue; } return; } } } public SendChallengeToUserResponse Clone() { return new SendChallengeToUserResponse(this); } public override bool Equals(object other) { return this.Equals(other as SendChallengeToUserResponse); } public bool Equals(SendChallengeToUserResponse other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -1585371029) % 7) { case 1: return false; case 2: arg_43_0 = ((this.Id == other.Id) ? -1220501530 : -2089021917); continue; case 3: return true; case 4: goto IL_12; case 5: return false; case 6: goto IL_75; } break; } return true; IL_12: arg_43_0 = -1079337530; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? -698115180 : -1586180064); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 3505358641u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 3724596583u)) % 4u) { case 1u: num ^= this.Id.GetHashCode(); arg_50_0 = (num2 * 4137887214u ^ 2571471181u); continue; case 2u: arg_50_0 = (((this.Id == 0u) ? 2940849575u : 2865091442u) ^ num2 * 1482096342u); continue; case 3u: goto IL_6C; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Id != 0u) { while (true) { IL_5A: uint arg_3E_0 = 3113054620u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 2801760683u)) % 4u) { case 0u: goto IL_5A; case 2u: output.WriteUInt32(this.Id); arg_3E_0 = (num * 1056603098u ^ 4120282494u); continue; case 3u: output.WriteRawTag(8); arg_3E_0 = (num * 137703656u ^ 2642869953u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.Id != 0u) { while (true) { IL_46: uint arg_2E_0 = 1926666305u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 367983422u)) % 3u) { case 0u: goto IL_46; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_2E_0 = (num2 * 844415134u ^ 243911233u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(SendChallengeToUserResponse other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 4132920506u)) % 5u) { case 0u: goto IL_63; case 1u: this.Id = other.Id; arg_37_0 = (num * 2892930602u ^ 4202310922u); continue; case 2u: goto IL_12; case 3u: return; } break; } return; IL_12: arg_37_0 = 2686637141u; goto IL_32; IL_63: arg_37_0 = ((other.Id == 0u) ? 3111154168u : 3757049455u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_95: uint num; uint arg_62_0 = ((num = input.ReadTag()) != 0u) ? 2436697995u : 2988155914u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 3614959017u)) % 6u) { case 0u: this.Id = input.ReadUInt32(); arg_62_0 = 4214667437u; continue; case 1u: input.SkipLastField(); arg_62_0 = (num2 * 3760131431u ^ 1148809580u); continue; case 2u: goto IL_95; case 3u: arg_62_0 = 2436697995u; continue; case 4u: arg_62_0 = ((num != 8u) ? 3240962878u : 3307727707u); continue; } return; } } } } } <file_sep>/Framework.Network.Packets/BitUnpack.cs using System; using System.Globalization; namespace Framework.Network.Packets { public class BitUnpack { public PacketReader reader; private int Position; private byte Value; public BitUnpack(PacketReader reader) { while (true) { IL_39: uint arg_21_0 = 3619155731u; while (true) { uint num; switch ((num = (arg_21_0 ^ 3422909037u)) % 3u) { case 0u: goto IL_39; case 2u: this.reader = reader; arg_21_0 = (num * 1788001478u ^ 905818698u); continue; } goto Block_1; } } Block_1: this.Position = 8; this.Value = 0; } public bool GetBit() { if (this.Position == 8) { goto IL_32; } goto IL_58; uint arg_3C_0; while (true) { IL_37: uint num; switch ((num = (arg_3C_0 ^ 497678941u)) % 4u) { case 0u: goto IL_32; case 1u: this.Value = this.reader.Read<byte>(); this.Position = 0; arg_3C_0 = (num * 2850176051u ^ 881797017u); continue; case 3u: goto IL_58; } break; } int value; return BitUnpack.smethod_0(value >> 7); IL_32: arg_3C_0 = 475497020u; goto IL_37; IL_58: value = (int)this.Value; this.Value = (byte)(2 * value); this.Position++; arg_3C_0 = 1735234387u; goto IL_37; } public T GetBits<T>(byte bitCount) { int num = 0; while (true) { IL_99: uint arg_71_0 = 2709643282u; while (true) { uint num2; int arg_47_0; switch ((num2 = (arg_71_0 ^ 4046007670u)) % 7u) { case 0u: goto IL_99; case 1u: { if (!this.GetBit()) { arg_71_0 = 2840728327u; continue; } int num3; arg_47_0 = (1 << num3 | num); goto IL_47; } case 2u: arg_47_0 = num; goto IL_47; case 3u: arg_71_0 = (num2 * 2404994528u ^ 3373856103u); continue; case 5u: { int num3; arg_71_0 = ((num3 >= 0) ? 2463017341u : 3620381330u); continue; } case 6u: { int num3 = (int)(checked(bitCount - 1)); arg_71_0 = (num2 * 2650002771u ^ 1736851699u); continue; } } goto Block_3; IL_47: num = arg_47_0; checked { int num3; num3--; arg_71_0 = 3409958279u; } } } Block_3: return (T)((object)BitUnpack.smethod_3(num, BitUnpack.smethod_1(typeof(T).TypeHandle), BitUnpack.smethod_2())); } public T GetNameLength<T>(byte bitCount) { int num = 0; while (true) { IL_B3: uint arg_87_0 = 3218337352u; while (true) { uint num2; int arg_61_0; switch ((num2 = (arg_87_0 ^ 2211964791u)) % 8u) { case 0u: goto IL_B3; case 1u: { if (!this.GetBit()) { arg_87_0 = 3412645637u; continue; } int num3; arg_61_0 = (1 << num3 | num); goto IL_61; } case 2u: arg_61_0 = num; goto IL_61; case 3u: checked { int num3; num3--; } arg_87_0 = (num2 * 501925676u ^ 199027471u); continue; case 4u: { int num3; arg_87_0 = ((num3 >= 0) ? 2498537230u : 4019268314u); continue; } case 6u: { int num3 = (int)(checked(bitCount - 1)); arg_87_0 = (num2 * 3080884236u ^ 249762499u); continue; } case 7u: this.GetBit(); arg_87_0 = (num2 * 1040566224u ^ 4030753881u); continue; } goto Block_3; IL_61: num = arg_61_0; arg_87_0 = 3501782828u; } } Block_3: return (T)((object)BitUnpack.smethod_3(num, BitUnpack.smethod_1(typeof(T).TypeHandle), BitUnpack.smethod_2())); } public ulong GetPackedValue(byte[] mask, byte[] bytes) { bool[] array = new bool[mask.Length]; byte[] array2 = new byte[bytes.Length]; while (true) { IL_146: uint arg_108_0 = 441439160u; while (true) { uint num; switch ((num = (arg_108_0 ^ 933494351u)) % 12u) { case 1u: { int num2; array[num2] = this.GetBit(); arg_108_0 = 100237289u; continue; } case 2u: { byte b; b += 1; arg_108_0 = 1431210321u; continue; } case 3u: { int num2 = 0; arg_108_0 = (num * 3603751290u ^ 3824160768u); continue; } case 4u: { byte b; arg_108_0 = (array[(int)mask[(int)b]] ? 1046048734u : 1931556653u); continue; } case 5u: arg_108_0 = (num * 282635419u ^ 972547060u); continue; case 6u: { int num2; num2++; arg_108_0 = (num * 1247566402u ^ 658749947u); continue; } case 7u: goto IL_146; case 8u: { int num2; arg_108_0 = ((num2 < array.Length) ? 1770688634u : 1352437388u); continue; } case 9u: { byte b; array2[(int)bytes[(int)b]] = (this.reader.Read<byte>() ^ 1); arg_108_0 = (num * 2213970219u ^ 2011673462u); continue; } case 10u: { byte b; arg_108_0 = (((int)b < bytes.Length) ? 1631324147u : 952807511u); continue; } case 11u: { byte b = 0; arg_108_0 = (num * 2097342126u ^ 297623515u); continue; } } goto Block_4; } } Block_4: return BitUnpack.smethod_4(array2, 0); } static bool smethod_0(int int_0) { return Convert.ToBoolean(int_0); } static Type smethod_1(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static CultureInfo smethod_2() { return CultureInfo.InvariantCulture; } static object smethod_3(object object_0, Type type_0, IFormatProvider iformatProvider_0) { return Convert.ChangeType(object_0, type_0, iformatProvider_0); } static ulong smethod_4(byte[] byte_0, int int_0) { return BitConverter.ToUInt64(byte_0, int_0); } } } <file_sep>/Framework.Logging.IO/LogWriter.cs using System; using System.IO; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace Framework.Logging.IO { public class LogWriter : IDisposable { private FileStream logStream; public string LogFile { get; set; } public LogWriter(string directory, string file) { this.LogFile = string.Format(Module.smethod_36<string>(4256782u), directory, DateTime.Now.ToString(Module.smethod_34<string>(1967451405u)), file); this.logStream = new FileStream(this.LogFile, FileMode.Append, FileAccess.Write, FileShare.ReadWrite, 4096, true); } [AsyncStateMachine(typeof(LogWriter.<Write>d__6))] public Task Write(string logMessage) { LogWriter.<Write>d__6 <Write>d__; <Write>d__.__4__this = this; while (true) { IL_86: uint arg_66_0 = 3441431780u; while (true) { uint num; switch ((num = (arg_66_0 ^ 3941022718u)) % 5u) { case 0u: { AsyncTaskMethodBuilder __t__builder = <Write>d__.__t__builder; arg_66_0 = (num * 4128570838u ^ 1090046890u); continue; } case 1u: <Write>d__.logMessage = logMessage; <Write>d__.__t__builder = AsyncTaskMethodBuilder.Create(); <Write>d__.__1__state = -1; arg_66_0 = (num * 830523851u ^ 2357483913u); continue; case 2u: { AsyncTaskMethodBuilder __t__builder; __t__builder.Start<LogWriter.<Write>d__6>(ref <Write>d__); arg_66_0 = (num * 1718702455u ^ 1371248976u); continue; } case 4u: goto IL_86; } goto Block_1; } } Block_1: return <Write>d__.__t__builder.Task; } public void Dispose() { this.LogFile = ""; LogWriter.smethod_0(this.logStream); } static void smethod_0(Stream stream_0) { stream_0.Dispose(); } } } <file_sep>/AuthServer.WorldServer.Managers/Manager.cs using AuthServer.Game.Managers; using Framework.Misc; using System; namespace AuthServer.WorldServer.Managers { public class Manager { public static ActionManager ActionMgr; public static ObjectManager ObjectMgr; public static SkillManager SkillMgr; public static SpellManager SpellMgr; public static SpawnManager SpawnMgr; public static WorldManager WorldMgr; public static EquipmentManager Equipments; public static void Initialize() { Manager.ActionMgr = Singleton<ActionManager>.GetInstance(); Manager.Equipments = Singleton<EquipmentManager>.GetInstance(); while (true) { IL_67: uint arg_4B_0 = 636662863u; while (true) { uint num; switch ((num = (arg_4B_0 ^ 2064959537u)) % 4u) { case 1u: Manager.SpellMgr = Singleton<SpellManager>.GetInstance(); arg_4B_0 = (num * 436624283u ^ 3934160218u); continue; case 2u: Manager.SkillMgr = Singleton<SkillManager>.GetInstance(); arg_4B_0 = (num * 3638131236u ^ 1896839496u); continue; case 3u: goto IL_67; } goto Block_1; } } Block_1: Manager.ObjectMgr = Singleton<ObjectManager>.GetInstance(); Manager.WorldMgr = Singleton<WorldManager>.GetInstance(); Manager.SpawnMgr = Singleton<SpawnManager>.GetInstance(); } } } <file_sep>/Bgs.Protocol/RpcTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class RpcTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return RpcTypesReflection.descriptor; } } static RpcTypesReflection() { RpcTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(RpcTypesReflection.smethod_1(RpcTypesReflection.smethod_0(new string[] { Module.smethod_34<string>(3862025699u), Module.smethod_33<string>(189163425u), Module.smethod_37<string>(3682925804u), Module.smethod_34<string>(3487079251u), Module.smethod_35<string>(1265756808u), Module.smethod_37<string>(1140958268u), Module.smethod_34<string>(1612347011u), Module.smethod_35<string>(1923277752u), Module.smethod_36<string>(1417096744u), Module.smethod_36<string>(4149190520u), Module.smethod_34<string>(112561219u), Module.smethod_37<string>(439758364u), Module.smethod_34<string>(1884404515u), Module.smethod_33<string>(4281356897u), Module.smethod_34<string>(1134511619u), Module.smethod_36<string>(688487896u), Module.smethod_33<string>(906638865u), Module.smethod_36<string>(1475794424u), Module.smethod_37<string>(702590444u) })), new FileDescriptor[] { MethodOptionsReflection.Descriptor, ServiceOptionsReflection.Descriptor, FieldOptionsReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(NO_RESPONSE).TypeHandle), NO_RESPONSE.Parser, null, null, null, null), new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(Address).TypeHandle), Address.Parser, new string[] { Module.smethod_35<string>(3839151959u), Module.smethod_36<string>(1620479514u) }, null, null, null), new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(ProcessId).TypeHandle), ProcessId.Parser, new string[] { Module.smethod_34<string>(46694345u), Module.smethod_33<string>(3463200641u) }, null, null, null), new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(ObjectAddress).TypeHandle), ObjectAddress.Parser, new string[] { Module.smethod_36<string>(4123806119u), Module.smethod_33<string>(3239342614u) }, null, null, null), new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(NoData).TypeHandle), NoData.Parser, null, null, null, null), new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(ErrorInfo).TypeHandle), ErrorInfo.Parser, new string[] { Module.smethod_36<string>(2830101776u), Module.smethod_33<string>(4108545374u), Module.smethod_34<string>(3179800227u), Module.smethod_36<string>(584204812u) }, null, null, null), new GeneratedCodeInfo(RpcTypesReflection.smethod_2(typeof(Header).TypeHandle), Header.Parser, new string[] { Module.smethod_36<string>(3243956043u), Module.smethod_37<string>(3916462632u), Module.smethod_36<string>(1194885711u), Module.smethod_33<string>(3239342614u), Module.smethod_34<string>(1454131333u), Module.smethod_35<string>(2244350093u), Module.smethod_36<string>(4196148664u), Module.smethod_36<string>(998059079u), Module.smethod_36<string>(2974786866u), Module.smethod_33<string>(3731547835u), Module.smethod_37<string>(907067788u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf.WellKnownTypes/TimeExtensions.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [ComVisible(true)] public static class TimeExtensions { public static Timestamp ToTimestamp(this DateTime dateTime) { return Timestamp.FromDateTime(dateTime); } public static Timestamp ToTimestamp(this DateTimeOffset dateTimeOffset) { return Timestamp.FromDateTimeOffset(dateTimeOffset); } public static Duration ToDuration(this TimeSpan timeSpan) { return Duration.FromTimeSpan(timeSpan); } } } <file_sep>/AuthServer.WorldServer.Managers/ItemManager.cs using Framework.Misc; using System; namespace AuthServer.WorldServer.Managers { public class ItemManager : Singleton<ItemManager> { private ItemManager() { } } } <file_sep>/Google.Protobuf.Reflection/FileDescriptorSet.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class FileDescriptorSet : IMessage, IMessage<FileDescriptorSet>, IEquatable<FileDescriptorSet>, IDeepCloneable<FileDescriptorSet> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FileDescriptorSet.__c __9 = new FileDescriptorSet.__c(); internal FileDescriptorSet cctor>b__24_0() { return new FileDescriptorSet(); } } private static readonly MessageParser<FileDescriptorSet> _parser = new MessageParser<FileDescriptorSet>(new Func<FileDescriptorSet>(FileDescriptorSet.__c.__9.<.cctor>b__24_0)); public const int FileFieldNumber = 1; private static readonly FieldCodec<FileDescriptorProto> _repeated_file_codec = FieldCodec.ForMessage<FileDescriptorProto>(10u, FileDescriptorProto.Parser); private readonly RepeatedField<FileDescriptorProto> file_ = new RepeatedField<FileDescriptorProto>(); public static MessageParser<FileDescriptorSet> Parser { get { return FileDescriptorSet._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return FileDescriptorSet.Descriptor; } } public RepeatedField<FileDescriptorProto> File { get { return this.file_; } } public FileDescriptorSet() { } public FileDescriptorSet(FileDescriptorSet other) : this() { this.file_ = other.file_.Clone(); } public FileDescriptorSet Clone() { return new FileDescriptorSet(this); } public override bool Equals(object other) { return this.Equals(other as FileDescriptorSet); } public bool Equals(FileDescriptorSet other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1005784169) % 7) { case 0: goto IL_3E; case 1: return false; case 2: arg_48_0 = (this.file_.Equals(other.file_) ? 732756913 : 303562816); continue; case 4: goto IL_7A; case 5: return false; case 6: return true; } break; } return true; IL_3E: arg_48_0 = 715977448; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 384276521 : 1674580822); goto IL_43; } public override int GetHashCode() { return 1 ^ FileDescriptorSet.smethod_0(this.file_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.file_.WriteTo(output, FileDescriptorSet._repeated_file_codec); } public int CalculateSize() { return 0 + this.file_.CalculateSize(FileDescriptorSet._repeated_file_codec); } public void MergeFrom(FileDescriptorSet other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 1852508849; IL_08: switch ((arg_0D_0 ^ 1621860010) % 4) { case 0: goto IL_03; case 1: IL_27: this.file_.Add(other.file_); arg_0D_0 = 897118344; goto IL_08; case 3: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 2067997756u : 1467689829u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 2134981203u)) % 7u) { case 0u: input.SkipLastField(); arg_77_0 = (num2 * 3303453636u ^ 1424539745u); continue; case 1u: arg_77_0 = ((num == 10u) ? 1941942812u : 1927614387u); continue; case 2u: this.file_.AddEntriesFrom(input, FileDescriptorSet._repeated_file_codec); arg_77_0 = 817556162u; continue; case 3u: arg_77_0 = (num2 * 3678640650u ^ 645686838u); continue; case 4u: goto IL_AE; case 6u: arg_77_0 = 2067997756u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Misc/Extensions.cs using System; using System.Collections.Generic; using System.IO; using System.Numerics; using System.Reflection; using System.Runtime.CompilerServices; namespace Framework.Misc { public static class Extensions { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Extensions.__c __9 = new Extensions.__c(); internal object cctor>b__11_0(BinaryReader br) { return Extensions.__c.smethod_0(br); } internal object cctor>b__11_1(BinaryReader br) { return Extensions.__c.smethod_1(br); } internal object cctor>b__11_2(BinaryReader br) { return Extensions.__c.smethod_2(br); } internal object cctor>b__11_3(BinaryReader br) { return Extensions.__c.smethod_3(br); } internal object cctor>b__11_4(BinaryReader br) { return Extensions.__c.smethod_4(br); } internal object cctor>b__11_5(BinaryReader br) { return Extensions.__c.smethod_5(br); } internal object cctor>b__11_6(BinaryReader br) { return Extensions.__c.smethod_6(br); } internal object cctor>b__11_7(BinaryReader br) { return Extensions.__c.smethod_7(br); } internal object cctor>b__11_8(BinaryReader br) { return Extensions.__c.smethod_8(br); } internal object cctor>b__11_9(BinaryReader br) { return Extensions.__c.smethod_9(br); } internal object cctor>b__11_10(BinaryReader br) { return Extensions.__c.smethod_10(br); } internal object cctor>b__11_11(BinaryReader br) { return Extensions.__c.smethod_11(br); } static bool smethod_0(BinaryReader binaryReader_0) { return binaryReader_0.ReadBoolean(); } static sbyte smethod_1(BinaryReader binaryReader_0) { return binaryReader_0.ReadSByte(); } static byte smethod_2(BinaryReader binaryReader_0) { return binaryReader_0.ReadByte(); } static char smethod_3(BinaryReader binaryReader_0) { return binaryReader_0.ReadChar(); } static short smethod_4(BinaryReader binaryReader_0) { return binaryReader_0.ReadInt16(); } static ushort smethod_5(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt16(); } static int smethod_6(BinaryReader binaryReader_0) { return binaryReader_0.ReadInt32(); } static uint smethod_7(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt32(); } static float smethod_8(BinaryReader binaryReader_0) { return binaryReader_0.ReadSingle(); } static long smethod_9(BinaryReader binaryReader_0) { return binaryReader_0.ReadInt64(); } static ulong smethod_10(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt64(); } static double smethod_11(BinaryReader binaryReader_0) { return binaryReader_0.ReadDouble(); } } public static Dictionary<Type, Func<BinaryReader, object>> ReadValue = new Dictionary<Type, Func<BinaryReader, object>> { { Extensions.smethod_0(typeof(bool).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_0) }, { Extensions.smethod_0(typeof(sbyte).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_1) }, { Extensions.smethod_0(typeof(byte).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_2) }, { Extensions.smethod_0(typeof(char).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_3) }, { Extensions.smethod_0(typeof(short).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_4) }, { Extensions.smethod_0(typeof(ushort).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_5) }, { Extensions.smethod_0(typeof(int).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_6) }, { Extensions.smethod_0(typeof(uint).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_7) }, { Extensions.smethod_0(typeof(float).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_8) }, { Extensions.smethod_0(typeof(long).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_9) }, { Extensions.smethod_0(typeof(ulong).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_10) }, { Extensions.smethod_0(typeof(double).TypeHandle), new Func<BinaryReader, object>(Extensions.__c.__9.<.cctor>b__11_11) } }; public static BigInteger ToBigInteger<T>(this T value, bool isBigEndian = false) { BigInteger result = BigInteger.Zero; while (true) { IL_19C: uint arg_157_0 = 738196809u; while (true) { uint num; switch ((num = (arg_157_0 ^ 1881679713u)) % 14u) { case 0u: { byte[] array; result = new BigInteger(array.Combine(new byte[1])); arg_157_0 = 1243074766u; continue; } case 2u: goto IL_1A3; case 3u: arg_157_0 = (num * 3809464151u ^ 121923501u); continue; case 4u: goto IL_19C; case 5u: arg_157_0 = (num * 104884441u ^ 2709228320u); continue; case 6u: arg_157_0 = (((!isBigEndian) ? 3935607711u : 2903685637u) ^ num * 874937281u); continue; case 7u: { byte[] array = value as byte[]; arg_157_0 = 852318715u; continue; } case 8u: { string string_; arg_157_0 = ((Extensions.smethod_2(string_, Module.smethod_34<string>(3746852854u)) ? 4030407210u : 4191734426u) ^ num * 2223128030u); continue; } case 9u: result = (BigInteger)Extensions.smethod_4(value, Extensions.smethod_0(typeof(BigInteger).TypeHandle)); arg_157_0 = 215214242u; continue; case 10u: { byte[] array; Extensions.smethod_3(array); arg_157_0 = (num * 2021617067u ^ 188326575u); continue; } case 11u: arg_157_0 = (num * 1358535682u ^ 1128118610u); continue; case 12u: { string string_ = Extensions.smethod_1(Extensions.smethod_0(typeof(T).TypeHandle)); arg_157_0 = (num * 1912532131u ^ 2190573618u); continue; } case 13u: { string string_; arg_157_0 = ((Extensions.smethod_2(string_, Module.smethod_33<string>(4146773235u)) ? 1965301917u : 1104158180u) ^ num * 3173283713u); continue; } } goto Block_4; } } Block_4: return result; IL_1A3: throw Extensions.smethod_6(Extensions.smethod_5(Module.smethod_34<string>(3653116242u), Extensions.smethod_1(Extensions.smethod_0(typeof(T).TypeHandle)))); } public static T Read<T>(this BinaryReader br) { Type arg_4C_0; if (Extensions.smethod_7(Extensions.smethod_0(typeof(T).TypeHandle))) { arg_4C_0 = Extensions.smethod_8(Extensions.smethod_0(typeof(T).TypeHandle)); goto IL_4C; } IL_22: int arg_2C_0 = 901987807; IL_27: switch ((arg_2C_0 ^ 752898713) % 3) { case 0: goto IL_22; case 1: arg_4C_0 = Extensions.smethod_0(typeof(T).TypeHandle); goto IL_4C; } Type key; return (T)((object)Extensions.ReadValue[key](br)); IL_4C: key = arg_4C_0; arg_2C_0 = 2115462080; goto IL_27; } public static uint LeftRotate(this uint value, int shiftCount) { return value << shiftCount | value >> 32 - shiftCount; } public static byte[] ToByteArray(this string s) { byte[] array = new byte[Extensions.smethod_9(s) / 2]; while (true) { IL_9B: uint arg_77_0 = 1740915620u; while (true) { uint num; switch ((num = (arg_77_0 ^ 193058088u)) % 6u) { case 0u: { int num2; arg_77_0 = ((num2 >= Extensions.smethod_9(s)) ? 1754018344u : 953576485u); continue; } case 1u: { int num2; num2 += 2; arg_77_0 = (num * 3520985443u ^ 2491188557u); continue; } case 2u: { int num2 = 0; arg_77_0 = (num * 3641561811u ^ 2529371062u); continue; } case 3u: { int num2; array[num2 / 2] = Extensions.smethod_11(Extensions.smethod_10(s, num2, 2), 16); arg_77_0 = 555942589u; continue; } case 5u: goto IL_9B; } return array; } } return array; } public static byte[] GenerateRandomKey(this byte[] s, int length) { Random random_ = Extensions.smethod_12((int)((uint)(Guid.NewGuid().GetHashCode() ^ 0 ^ 42)).LeftRotate(13)); byte[] array; while (true) { IL_13B: uint arg_105_0 = 120113419u; while (true) { uint num; switch ((num = (arg_105_0 ^ 1256982358u)) % 10u) { case 0u: { int num2; int num3; array[num2] = (byte)num3; arg_105_0 = 1719345575u; continue; } case 1u: { int num3; arg_105_0 = (((num3 <= 0) ? 3384374318u : 3091792628u) ^ num * 4266107050u); continue; } case 2u: goto IL_13B; case 3u: { int num2; arg_105_0 = ((num2 < length) ? 996703468u : 216281029u); continue; } case 4u: { int num3 = -1; arg_105_0 = 56133732u; continue; } case 6u: { int num2; int num3 = (int)(((uint)Extensions.smethod_13(random_, 255)).LeftRotate(1) ^ (uint)num2); arg_105_0 = ((num3 <= 255) ? 1923677886u : 1723990471u); continue; } case 7u: { array = new byte[length]; int num2 = 0; arg_105_0 = (num * 1583590343u ^ 3566949175u); continue; } case 8u: arg_105_0 = (num * 1084251023u ^ 3191990515u); continue; case 9u: { int num2; num2++; arg_105_0 = (num * 2817311159u ^ 4236777410u); continue; } } return array; } } return array; } public static bool Compare(this byte[] b, byte[] b2) { int num = 0; while (true) { IL_8C: uint arg_64_0 = 3291318834u; while (true) { uint num2; switch ((num2 = (arg_64_0 ^ 4055349845u)) % 7u) { case 0u: num++; arg_64_0 = 3026166759u; continue; case 1u: arg_64_0 = ((b[num] == b2[num]) ? 3750588544u : 3567267048u); continue; case 3u: goto IL_8C; case 4u: return false; case 5u: arg_64_0 = (num2 * 2293459859u ^ 2107014082u); continue; case 6u: arg_64_0 = ((num < b2.Length) ? 3202267482u : 3101804024u); continue; } return true; } } return true; } public static byte[] Combine(this byte[] data, byte[] data2) { byte[] array = new byte[data.Length + data2.Length]; Extensions.smethod_14(data, 0, array, 0, data.Length); Extensions.smethod_14(data2, 0, array, data.Length, data2.Length); return array; } public static string ToHexString(this byte[] data) { string string_ = ""; int num = 0; while (true) { IL_A1: uint arg_7C_0 = 3025571063u; while (true) { uint num2; switch ((num2 = (arg_7C_0 ^ 2262366021u)) % 6u) { case 1u: arg_7C_0 = ((num < data.Length) ? 3077999305u : 3082205453u); continue; case 2u: { byte b = data[num]; arg_7C_0 = 3263439534u; continue; } case 3u: goto IL_A1; case 4u: arg_7C_0 = (num2 * 2873672719u ^ 425117212u); continue; case 5u: { byte b; string_ = Extensions.smethod_15(string_, Extensions.smethod_5(Module.smethod_37<string>(726286206u), b)); num++; arg_7C_0 = (num2 * 2798341389u ^ 3425487517u); continue; } } goto Block_2; } } Block_2: return Extensions.smethod_16(string_); } public static BigInteger MakeBigInteger(this byte[] data, bool isBigEndian = false) { if (isBigEndian) { while (true) { IL_35: uint arg_1D_0 = 698627849u; while (true) { uint num; switch ((num = (arg_1D_0 ^ 930933096u)) % 3u) { case 0u: goto IL_35; case 1u: Extensions.smethod_3(data); arg_1D_0 = (num * 2848130399u ^ 1535533374u); continue; } goto Block_2; } } Block_2:; } return new BigInteger(data.Combine(new byte[1])); } public static BigInteger AssignValue<T>(this T value, bool isBigEndian = false) { BigInteger result = BigInteger.Zero; while (true) { IL_12A: uint arg_F5_0 = 953985398u; while (true) { uint num; switch ((num = (arg_F5_0 ^ 1752643158u)) % 10u) { case 0u: goto IL_12A; case 1u: goto IL_131; case 2u: { string string_ = Extensions.smethod_1(Extensions.smethod_0(typeof(T).TypeHandle)); arg_F5_0 = (num * 1078732044u ^ 3318060986u); continue; } case 4u: arg_F5_0 = (num * 3287323447u ^ 3136656083u); continue; case 5u: result = (BigInteger)Extensions.smethod_4(value, Extensions.smethod_0(typeof(BigInteger).TypeHandle)); arg_F5_0 = 995841158u; continue; case 6u: { string string_; arg_F5_0 = (((!Extensions.smethod_2(string_, Module.smethod_36<string>(2054699854u))) ? 3601814283u : 3356641915u) ^ num * 2724701389u); continue; } case 7u: result = (value as byte[]).MakeBigInteger(isBigEndian); arg_F5_0 = 365760265u; continue; case 8u: arg_F5_0 = (num * 393761767u ^ 1734055609u); continue; case 9u: { string string_; arg_F5_0 = ((Extensions.smethod_2(string_, Module.smethod_36<string>(3151577565u)) ? 1077484870u : 1388529681u) ^ num * 2864711009u); continue; } } goto Block_3; } } Block_3: return result; IL_131: throw Extensions.smethod_6(Extensions.smethod_5(Module.smethod_33<string>(2248670866u), Extensions.smethod_1(Extensions.smethod_0(typeof(T).TypeHandle)))); } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static string smethod_1(MemberInfo memberInfo_0) { return memberInfo_0.Name; } static bool smethod_2(string string_0, string string_1) { return string_0 == string_1; } static void smethod_3(Array array_0) { Array.Reverse(array_0); } static object smethod_4(object object_0, Type type_0) { return Convert.ChangeType(object_0, type_0); } static string smethod_5(string string_0, object object_0) { return string.Format(string_0, object_0); } static NotSupportedException smethod_6(string string_0) { return new NotSupportedException(string_0); } static bool smethod_7(Type type_0) { return type_0.IsEnum; } static Type smethod_8(Type type_0) { return type_0.GetEnumUnderlyingType(); } static int smethod_9(string string_0) { return string_0.Length; } static string smethod_10(string string_0, int int_0, int int_1) { return string_0.Substring(int_0, int_1); } static byte smethod_11(string string_0, int int_0) { return Convert.ToByte(string_0, int_0); } static Random smethod_12(int int_0) { return new Random(int_0); } static int smethod_13(Random random_0, int int_0) { return random_0.Next(int_0); } static void smethod_14(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static string smethod_15(string string_0, string string_1) { return string_0 + string_1; } static string smethod_16(string string_0) { return string_0.ToUpper(); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GetAchievementsFileResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GetAchievementsFileResponse : IMessage<GetAchievementsFileResponse>, IEquatable<GetAchievementsFileResponse>, IDeepCloneable<GetAchievementsFileResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAchievementsFileResponse.__c __9 = new GetAchievementsFileResponse.__c(); internal GetAchievementsFileResponse cctor>b__24_0() { return new GetAchievementsFileResponse(); } } private static readonly MessageParser<GetAchievementsFileResponse> _parser = new MessageParser<GetAchievementsFileResponse>(new Func<GetAchievementsFileResponse>(GetAchievementsFileResponse.__c.__9.<.cctor>b__24_0)); public const int ContentHandleFieldNumber = 1; private ContentHandle contentHandle_; public static MessageParser<GetAchievementsFileResponse> Parser { get { return GetAchievementsFileResponse._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return GetAchievementsFileResponse.Descriptor; } } public ContentHandle ContentHandle { get { return this.contentHandle_; } set { this.contentHandle_ = value; } } public GetAchievementsFileResponse() { } public GetAchievementsFileResponse(GetAchievementsFileResponse other) : this() { this.ContentHandle = ((other.contentHandle_ != null) ? other.ContentHandle.Clone() : null); } public GetAchievementsFileResponse Clone() { return new GetAchievementsFileResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetAchievementsFileResponse); } public bool Equals(GetAchievementsFileResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1091212789) % 7) { case 0: goto IL_3E; case 1: return false; case 2: arg_48_0 = (GetAchievementsFileResponse.smethod_0(this.ContentHandle, other.ContentHandle) ? 1215725019 : 823294605); continue; case 3: return true; case 4: return false; case 5: goto IL_7A; } break; } return true; IL_3E: arg_48_0 = 775459893; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 598185604 : 20023786); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 2305690618u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 3645522797u)) % 4u) { case 0u: goto IL_69; case 1u: num ^= GetAchievementsFileResponse.smethod_1(this.ContentHandle); arg_4D_0 = (num2 * 4037621187u ^ 1694381152u); continue; case 3u: arg_4D_0 = (((this.contentHandle_ == null) ? 2658343728u : 3753364951u) ^ num2 * 1890891881u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.contentHandle_ != null) { while (true) { IL_5B: uint arg_3F_0 = 1510243727u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 1346079777u)) % 4u) { case 0u: goto IL_5B; case 2u: output.WriteRawTag(10); arg_3F_0 = (num * 4060003978u ^ 3612647446u); continue; case 3u: output.WriteMessage(this.ContentHandle); arg_3F_0 = (num * 4046616517u ^ 22387015u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_6B: uint arg_4F_0 = 393306164u; while (true) { uint num2; switch ((num2 = (arg_4F_0 ^ 903726525u)) % 4u) { case 0u: goto IL_6B; case 1u: arg_4F_0 = (((this.contentHandle_ != null) ? 2020608526u : 160690639u) ^ num2 * 23830280u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ContentHandle); arg_4F_0 = (num2 * 564302645u ^ 1928061552u); continue; } return num; } } return num; } public void MergeFrom(GetAchievementsFileResponse other) { if (other == null) { goto IL_15; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 4146359975u)) % 7u) { case 0u: this.contentHandle_ = new ContentHandle(); arg_7A_0 = (num * 3012817987u ^ 2535435534u); continue; case 1u: arg_7A_0 = (((this.contentHandle_ != null) ? 2751001615u : 3950844082u) ^ num * 790963209u); continue; case 3u: return; case 4u: this.ContentHandle.MergeFrom(other.ContentHandle); arg_7A_0 = 2304303825u; continue; case 5u: goto IL_B1; case 6u: goto IL_15; } break; } return; IL_15: arg_7A_0 = 2872367537u; goto IL_75; IL_B1: arg_7A_0 = ((other.contentHandle_ != null) ? 2746779344u : 2304303825u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) != 0u) ? 2278426093u : 3284117644u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 3682691536u)) % 9u) { case 0u: goto IL_F3; case 1u: arg_B3_0 = ((this.contentHandle_ != null) ? 3456065100u : 3525891659u); continue; case 2u: input.ReadMessage(this.contentHandle_); arg_B3_0 = 2996628051u; continue; case 3u: arg_B3_0 = (num2 * 4105314507u ^ 3511464207u); continue; case 4u: arg_B3_0 = ((num == 10u) ? 3330101382u : 3905589687u); continue; case 5u: this.contentHandle_ = new ContentHandle(); arg_B3_0 = (num2 * 95149221u ^ 3546672299u); continue; case 6u: input.SkipLastField(); arg_B3_0 = (num2 * 1195574400u ^ 3691173060u); continue; case 7u: arg_B3_0 = 2278426093u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.IO/LalParser.cs using Arctium_WoW_ClientDB_Viewer.ClientDB; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Reflection.Emit; using System.Text.RegularExpressions; using System.Threading; namespace Arctium_WoW_ClientDB_Viewer.IO { internal class LalParser { private List<string> keyWords = new List<string> { Module.smethod_34<string>(229441821u) }; private List<string> types = new List<string> { Module.smethod_34<string>(2330057163u), Module.smethod_37<string>(4086281002u), Module.smethod_34<string>(1514091022u), Module.smethod_33<string>(2088974017u), Module.smethod_33<string>(1647815300u), Module.smethod_34<string>(3399569773u), Module.smethod_34<string>(108041842u), Module.smethod_34<string>(1486427655u), Module.smethod_33<string>(2082416680u), Module.smethod_33<string>(2408367715u), Module.smethod_37<string>(2128715485u), Module.smethod_37<string>(1894972360u), Module.smethod_33<string>(1814069486u), Module.smethod_36<string>(1548752093u) }; public static LalFile Parse(string file) { string text = LalParser.smethod_0(file); LalFile expr_0C = new LalFile(); LalParser.ParseFileOptions(expr_0C, ref text); LalParser.ParseTypeName(expr_0C, ref text); LalParser.ParseFields(expr_0C, ref text); return expr_0C; } private static void ParseFileOptions(LalFile lalFile, ref string fileContent) { Match match_ = LalParser.smethod_1(fileContent, Module.smethod_33<string>(3610078847u)); if (LalParser.smethod_3(LalParser.smethod_2(match_)) == 2) { while (true) { IL_BF: uint arg_A3_0 = 48035529u; while (true) { uint num; switch ((num = (arg_A3_0 ^ 1449306096u)) % 4u) { case 0u: fileContent = LalParser.smethod_9(fileContent, LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 0)), ""); arg_A3_0 = (num * 888027102u ^ 355448175u); continue; case 1u: lalFile.FileOptions = (Arctium_WoW_ClientDB_Viewer.ClientDB.FileOptions)LalParser.smethod_8(LalParser.smethod_4(typeof(Arctium_WoW_ClientDB_Viewer.ClientDB.FileOptions).TypeHandle), LalParser.smethod_7(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 1)), new char[] { ' ' })); arg_A3_0 = (num * 1662666148u ^ 4263500748u); continue; case 2u: goto IL_BF; } goto Block_2; } } Block_2:; } } private static void ParseTypeName(LalFile lalFile, ref string fileContent) { Match match_ = LalParser.smethod_1(fileContent, Module.smethod_36<string>(2954750933u)); if (LalParser.smethod_3(LalParser.smethod_2(match_)) == 2) { goto IL_8E; } goto IL_B8; uint arg_98_0; while (true) { IL_93: uint num; switch ((num = (arg_98_0 ^ 2246949106u)) % 5u) { case 0u: return; case 2u: goto IL_B8; case 3u: goto IL_8E; case 4u: lalFile.TypeName = LalParser.smethod_10(LalParser.smethod_7(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 1)), new char[] { ' ' }), Module.smethod_34<string>(698124881u), ""); fileContent = LalParser.smethod_9(fileContent, LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 0)), ""); arg_98_0 = (num * 4169154842u ^ 3725544783u); continue; } break; } return; IL_8E: arg_98_0 = 2794222649u; goto IL_93; IL_B8: LalParser.smethod_11(Module.smethod_33<string>(836216381u)); arg_98_0 = 2986272894u; goto IL_93; } private static void ParseFields(LalFile lalFile, ref string fileContent) { fileContent = LalParser.smethod_10(fileContent, Module.smethod_33<string>(4044680227u), ""); string[] array = LalParser.smethod_12(fileContent, new string[] { Module.smethod_36<string>(1391877413u), Module.smethod_37<string>(1748879223u) }, StringSplitOptions.RemoveEmptyEntries); int num = 0; while (true) { IL_AF7: uint arg_ABA_0 = 1484983441u; while (true) { uint num2; LalField lalField; Match match_; string string_; int arg_4E6_0; IEnumerator enumerator; switch ((num2 = (arg_ABA_0 ^ 1058820709u)) % 11u) { case 0u: lalField = new LalField(); lalField.Name = LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 1)); arg_ABA_0 = (num2 * 2206441011u ^ 1453140542u); continue; case 1u: match_ = LalParser.smethod_1(string_, Module.smethod_37<string>(2859151699u)); arg_ABA_0 = (num2 * 19887995u ^ 2446759507u); continue; case 2u: goto IL_5B6; case 3u: { int count = 0; arg_ABA_0 = (((!int.TryParse(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 2)), out count)) ? 158362706u : 1763962982u) ^ num2 * 3396028457u); continue; } case 4u: lalField.Type = LalParser.smethod_4(typeof(LalTypes.LalList).TypeHandle); arg_ABA_0 = 1691254943u; continue; case 5u: { int count; lalField.Count = count; arg_ABA_0 = (num2 * 1289185944u ^ 2669991515u); continue; } case 6u: lalField.CountField = LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 2)); arg_ABA_0 = 411774275u; continue; case 7u: break; case 8u: IL_4D6: if (num >= array.Length) { arg_4E6_0 = 26573409; goto IL_4E1; } break; case 9u: { if (LalParser.smethod_13(string_, Module.smethod_37<string>(2479315437u))) { arg_ABA_0 = (num2 * 1116820749u ^ 4207479811u); continue; } int count2; while (true) { IL_90: count2 = 0; int arg_77_0 = 1781959800; while (true) { switch ((arg_77_0 ^ 1058820709) % 3) { case 1: goto IL_90; case 2: arg_77_0 = 2025344770; continue; } goto Block_2; } } IL_9A: enumerator = LalParser.smethod_15(LalParser.smethod_14(string_, Module.smethod_35<string>(3874797942u))); try { while (true) { IL_450: uint arg_3E3_0 = LalParser.smethod_22(enumerator) ? 1300706457u : 135954734u; while (true) { switch ((num2 = (arg_3E3_0 ^ 1058820709u)) % 20u) { case 0u: arg_3E3_0 = 1300706457u; continue; case 1u: { LalField lalField2; Match match_2; lalField2.Name = LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 2)); lalField2.Type = LalTypeMapper.ReadValue[LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 1))]; arg_3E3_0 = 497203653u; continue; } case 2u: { LalField lalField2; lalField2.Type = LalParser.smethod_19(lalField2.Type); arg_3E3_0 = 497203653u; continue; } case 3u: { LalField lalField2; string[] array2; lalField2.Name = array2[0]; arg_3E3_0 = (num2 * 3441136566u ^ 4039319588u); continue; } case 4u: { LalField lalField2; lalFile.Fields.Add(lalField2.Name, lalField2); arg_3E3_0 = 1933705408u; continue; } case 5u: { string[] array2; arg_3E3_0 = ((int.TryParse(array2[1], out count2) ? 899283194u : 1707677606u) ^ num2 * 1576736428u); continue; } case 6u: { Match match_2; arg_3E3_0 = (((!LalParser.smethod_17(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 2)), Module.smethod_35<string>(3357156987u))) ? 4123448422u : 2981478371u) ^ num2 * 1635760263u); continue; } case 8u: { Match match_2 = (Match)LalParser.smethod_16(enumerator); LalField lalField2 = new LalField(); arg_3E3_0 = 1047333543u; continue; } case 9u: { LalField lalField2; Match match_2; lalField2.Type = LalParser.smethod_19(LalTypeMapper.ReadValue[LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 1))]); arg_3E3_0 = (num2 * 899378993u ^ 869144234u); continue; } case 10u: arg_3E3_0 = (num2 * 1893172718u ^ 3659220617u); continue; case 11u: { LalField lalField2; lalField2.Count = count2; arg_3E3_0 = (num2 * 616472215u ^ 653733557u); continue; } case 12u: { Match match_2; string[] array2 = LalParser.smethod_18(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 2)), new char[] { ',' }); arg_3E3_0 = (num2 * 2239082508u ^ 2451866668u); continue; } case 13u: { Match match_2; arg_3E3_0 = (((!LalParser.smethod_20(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 1)), Module.smethod_33<string>(1654372637u))) ? 3120592684u : 3529357398u) ^ num2 * 2613277203u); continue; } case 14u: { LalField lalField2; string[] array2; lalField2.CountField = array2[1]; Match match_2; lalField2.Type = LalTypeMapper.ReadValue[LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 1))]; arg_3E3_0 = (num2 * 2492547944u ^ 186733518u); continue; } case 15u: { Match match_2; arg_3E3_0 = ((LalParser.smethod_20(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_2), 1)), Module.smethod_36<string>(512027337u)) ? 3688620915u : 2470893792u) ^ num2 * 3584088089u); continue; } case 16u: { LalField lalField2; lalField2.Type = LalParser.smethod_21(LalParser.smethod_4(typeof(List__).TypeHandle), new Type[] { lalField2.Type }); arg_3E3_0 = (num2 * 2000398997u ^ 240492983u); continue; } case 17u: goto IL_450; case 18u: arg_3E3_0 = (num2 * 1030411593u ^ 904127691u); continue; case 19u: { LalField lalField2; string[] array2; lalField2.Name = array2[0]; arg_3E3_0 = 567916307u; continue; } } goto Block_14; } } Block_14:; } finally { IDisposable disposable = enumerator as IDisposable; while (true) { IL_4C8: uint arg_4AB_0 = 492483066u; while (true) { switch ((num2 = (arg_4AB_0 ^ 1058820709u)) % 4u) { case 0u: goto IL_4C8; case 1u: LalParser.smethod_23(disposable); arg_4AB_0 = (num2 * 2428450929u ^ 2607384174u); continue; case 3u: arg_4AB_0 = (((disposable != null) ? 2691626095u : 2801039380u) ^ num2 * 177541341u); continue; } goto Block_18; } } Block_18:; } goto IL_4D0; Block_2: goto IL_9A; } case 10u: goto IL_AF7; default: goto IL_5B6; } string_ = array[num]; arg_ABA_0 = 521850888u; continue; IL_4E1: switch ((arg_4E6_0 ^ 1058820709) % 3) { case 1: goto IL_4D6; case 2: IL_502: arg_4E6_0 = 217027748; goto IL_4E1; } return; IL_4D0: num++; goto IL_502; IL_5B6: lalField.Value = new LalTypes.LalList(); enumerator = LalParser.smethod_15(LalParser.smethod_14(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_), 3)), Module.smethod_37<string>(2537758586u))); try { while (true) { IL_9CE: uint arg_965_0 = LalParser.smethod_22(enumerator) ? 1672334713u : 1672136332u; while (true) { switch ((num2 = (arg_965_0 ^ 1058820709u)) % 19u) { case 0u: goto IL_9CE; case 1u: { LalField lalField3; Match match_3; lalField3.Type = LalTypeMapper.ReadValue[LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 1))]; arg_965_0 = ((LalParser.smethod_20(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 1)), Module.smethod_36<string>(512027337u)) ? 3997377174u : 2646884777u) ^ num2 * 3420361559u); continue; } case 2u: { LalField lalField3; string[] array3; ((LalTypes.LalList)lalField.Value).Fields.Add(array3[0], lalField3); arg_965_0 = 1198504658u; continue; } case 4u: arg_965_0 = 1672334713u; continue; case 5u: { Match match_3 = (Match)LalParser.smethod_16(enumerator); arg_965_0 = 1138778410u; continue; } case 6u: { Match match_3; arg_965_0 = (((!LalParser.smethod_17(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 2)), Module.smethod_35<string>(3357156987u))) ? 510099539u : 5492353u) ^ num2 * 638669356u); continue; } case 7u: { LalField lalField3; string[] array3; lalField3.Name = array3[0]; arg_965_0 = (num2 * 1351782445u ^ 1586121538u); continue; } case 8u: { Match match_3; ((LalTypes.LalList)lalField.Value).Fields.Add(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 2)), new LalField { Name = LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 2)), Type = LalTypeMapper.ReadValue[LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 1))] }); arg_965_0 = 1198504658u; continue; } case 9u: { LalField lalField3 = new LalField(); arg_965_0 = 1183109674u; continue; } case 10u: arg_965_0 = (num2 * 2216412817u ^ 536817293u); continue; case 11u: arg_965_0 = (num2 * 3596800634u ^ 850867408u); continue; case 12u: { int count; Match match_3; string[] array3; ((LalTypes.LalList)lalField.Value).Fields.Add(array3[0], new LalField { Name = array3[0], Count = count, Type = LalParser.smethod_19(LalTypeMapper.ReadValue[LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 1))]) }); arg_965_0 = (num2 * 2871084302u ^ 149273108u); continue; } case 13u: { Match match_3; string[] array3 = LalParser.smethod_18(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 2)), new char[] { ',' }); arg_965_0 = (num2 * 1155440148u ^ 2030793012u); continue; } case 14u: { LalField lalField3; string[] array3; lalField3.CountField = array3[1]; arg_965_0 = (num2 * 1490940552u ^ 2765525279u); continue; } case 15u: { LalField lalField3; lalField3.Type = LalParser.smethod_21(LalParser.smethod_4(typeof(List__).TypeHandle), new Type[] { lalField3.Type }); arg_965_0 = (num2 * 3792481497u ^ 1451514239u); continue; } case 16u: { Match match_3; arg_965_0 = (((!LalParser.smethod_20(LalParser.smethod_6(LalParser.smethod_5(LalParser.smethod_2(match_3), 1)), Module.smethod_37<string>(1894972360u))) ? 2771168239u : 3539991657u) ^ num2 * 4061374352u); continue; } case 17u: { int count; string[] array3; arg_965_0 = ((int.TryParse(array3[1], out count) ? 2791513213u : 3825198839u) ^ num2 * 3676104902u); continue; } case 18u: { LalField lalField3; lalField3.Type = LalParser.smethod_19(lalField3.Type); arg_965_0 = 1707575115u; continue; } } goto Block_24; } } Block_24:; } finally { IDisposable disposable = enumerator as IDisposable; while (true) { IL_A46: uint arg_A29_0 = 1097970408u; while (true) { switch ((num2 = (arg_A29_0 ^ 1058820709u)) % 4u) { case 1u: arg_A29_0 = (((disposable != null) ? 4166600810u : 2434598868u) ^ num2 * 2932860529u); continue; case 2u: LalParser.smethod_23(disposable); arg_A29_0 = (num2 * 3516599910u ^ 1656150021u); continue; case 3u: goto IL_A46; } goto Block_28; } } Block_28:; } lalFile.Fields.Add(lalField.Name, lalField); goto IL_4D0; } } } public static Tuple<Type, Dictionary<Tuple<string, string>, Array>, Dictionary<Tuple<string, string>, string>, Arctium_WoW_ClientDB_Viewer.ClientDB.FileOptions> CreateType(LalFile lalFile) { if (lalFile == null) { goto IL_A7; } goto IL_E3; uint arg_B1_0; ModuleBuilder moduleBuilder_; string typeName; TypeBuilder typeBuilder_; Dictionary<Tuple<string, string>, Array> dictionary; Dictionary<Tuple<string, string>, string> dictionary2; while (true) { IL_AC: uint num; switch ((num = (arg_B1_0 ^ 15419579u)) % 9u) { case 0u: goto IL_A7; case 1u: goto IL_E3; case 2u: typeBuilder_ = LalParser.smethod_29(moduleBuilder_, typeName, TypeAttributes.Public | TypeAttributes.AutoClass | TypeAttributes.BeforeFieldInit, LalParser.smethod_4(typeof(object).TypeHandle)); arg_B1_0 = (num * 942524104u ^ 1939291948u); continue; case 3u: new Dictionary<string, Type>(); arg_B1_0 = (num * 2030176622u ^ 2356821604u); continue; case 4u: { AssemblyName assemblyName_; moduleBuilder_ = LalParser.smethod_28(LalParser.smethod_27(LalParser.smethod_26(), assemblyName_, AssemblyBuilderAccess.Run), typeName); arg_B1_0 = (num * 4000518090u ^ 2889643907u); continue; } case 6u: { AssemblyName assemblyName_; LalParser.smethod_25(assemblyName_, typeName); arg_B1_0 = (num * 100443052u ^ 506180307u); continue; } case 7u: goto IL_735; case 8u: { dictionary = new Dictionary<Tuple<string, string>, Array>(); dictionary2 = new Dictionary<Tuple<string, string>, string>(); AssemblyName assemblyName_ = LalParser.smethod_24(); arg_B1_0 = (num * 595552796u ^ 507178737u); continue; } } break; } using (Dictionary<string, LalField>.Enumerator enumerator = lalFile.Fields.GetEnumerator()) { while (true) { IL_702: KeyValuePair<string, LalField> current; Type type; if (enumerator.MoveNext()) { TypeBuilder typeBuilder_2; while (true) { IL_18E: current = enumerator.Current; uint arg_16D_0 = 410578653u; while (true) { uint num; switch ((num = (arg_16D_0 ^ 15419579u)) % 5u) { case 0u: typeBuilder_2 = LalParser.smethod_29(moduleBuilder_, current.Key, TypeAttributes.Public | TypeAttributes.AutoClass | TypeAttributes.BeforeFieldInit, LalParser.smethod_4(typeof(object).TypeHandle)); arg_16D_0 = (num * 399109714u ^ 3274743919u); continue; case 1u: goto IL_18E; case 3u: arg_16D_0 = 1525299149u; continue; case 4u: if (LalParser.smethod_30(current.Value.Type, LalParser.smethod_4(typeof(LalTypes.LalList).TypeHandle))) { arg_16D_0 = (num * 2624883420u ^ 1334639623u); continue; } goto IL_6E0; } goto Block_6; } } IL_19E: using (Dictionary<string, LalField>.Enumerator enumerator2 = ((LalTypes.LalList)current.Value.Value).Fields.GetEnumerator()) { while (true) { IL_39B: uint arg_356_0 = (!enumerator2.MoveNext()) ? 427631032u : 158090009u; while (true) { uint num; switch ((num = (arg_356_0 ^ 15419579u)) % 10u) { case 0u: arg_356_0 = 158090009u; continue; case 1u: { KeyValuePair<string, LalField> current2; LalParser.smethod_35(typeBuilder_2, current2.Key, current2.Value.Type, FieldAttributes.Public); arg_356_0 = 1967242083u; continue; } case 2u: { KeyValuePair<string, LalField> current2 = enumerator2.Current; arg_356_0 = ((!LalParser.smethod_31(current2.Value.Type)) ? 632281821u : 1208095778u); continue; } case 4u: { KeyValuePair<string, LalField> current2; arg_356_0 = ((current2.Value.Count != -1) ? 454254818u : 2028484060u); continue; } case 5u: { KeyValuePair<string, LalField> current2; arg_356_0 = ((!LalParser.smethod_33(current2.Value.CountField)) ? 1163462514u : 1513878685u); continue; } case 6u: goto IL_39B; case 7u: { KeyValuePair<string, LalField> current2; dictionary2.Add(Tuple.Create<string, string>(current.Key, current2.Key), current2.Value.CountField); arg_356_0 = (num * 2968662757u ^ 2968556817u); continue; } case 8u: { KeyValuePair<string, LalField> current2; arg_356_0 = ((LalParser.smethod_32(current2.Value.Type) ? 2022810550u : 1216053832u) ^ num * 1768732942u); continue; } case 9u: { KeyValuePair<string, LalField> current2; dictionary.Add(Tuple.Create<string, string>(current.Key, current2.Key), LalParser.smethod_34(current2.Value.Type, new object[] { current2.Value.Count }) as Array); arg_356_0 = (num * 1206323925u ^ 1991522769u); continue; } } goto Block_20; } } Block_20:; } type = LalParser.smethod_36(typeBuilder_2); goto IL_539; Block_6: goto IL_19E; } uint arg_677_0 = 227544863u; while (true) { IL_672: uint num; switch ((num = (arg_677_0 ^ 15419579u)) % 19u) { case 0u: dictionary.Add(Tuple.Create<string, string>(lalFile.TypeName, current.Key), LalParser.smethod_34(current.Value.Type, new object[] { current.Value.Count }) as Array); arg_677_0 = (num * 2191491227u ^ 2074769772u); continue; case 1u: LalParser.smethod_35(typeBuilder_, current.Key, type, FieldAttributes.Public); arg_677_0 = 231630780u; continue; case 2u: arg_677_0 = ((current.Value.Count == -1) ? 953902779u : 133976172u); continue; case 3u: arg_677_0 = (num * 3504080691u ^ 3491596885u); continue; case 4u: goto IL_702; case 5u: dictionary2.Add(Tuple.Create<string, string>(lalFile.TypeName, current.Key), current.Value.CountField); arg_677_0 = (num * 3936314229u ^ 2363937753u); continue; case 6u: type = LalParser.smethod_19(type); arg_677_0 = (num * 3687777923u ^ 1631836316u); continue; case 7u: dictionary2.Add(Tuple.Create<string, string>(typeName, current.Key), current.Value.CountField); arg_677_0 = (num * 1946601831u ^ 794486070u); continue; case 9u: goto IL_539; case 10u: dictionary.Add(Tuple.Create<string, string>(typeName, current.Key), LalParser.smethod_34(type, new object[] { current.Value.Count }) as Array); arg_677_0 = (num * 2392230552u ^ 2586742411u); continue; case 11u: arg_677_0 = (num * 3621362825u ^ 72620167u); continue; case 12u: arg_677_0 = ((LalParser.smethod_33(current.Value.CountField) ? 4223961564u : 3448767313u) ^ num * 2917935756u); continue; case 13u: arg_677_0 = ((LalParser.smethod_33(current.Value.CountField) ? 3085320494u : 2267419280u) ^ num * 4063420489u); continue; case 14u: goto IL_6E0; case 15u: type = LalParser.smethod_21(LalParser.smethod_4(typeof(List__).TypeHandle), new Type[] { type }); arg_677_0 = (num * 866117937u ^ 641229923u); continue; case 16u: arg_677_0 = (num * 3593916999u ^ 1220321514u); continue; case 17u: LalParser.smethod_35(typeBuilder_, current.Key, current.Value.Type, FieldAttributes.Public); arg_677_0 = 1822950704u; continue; case 18u: arg_677_0 = ((current.Value.Count != -1) ? 1786420790u : 915152435u); continue; } goto Block_12; } IL_539: arg_677_0 = 1613233896u; goto IL_672; IL_6E0: arg_677_0 = ((!LalParser.smethod_31(current.Value.Type)) ? 915152435u : 535817718u); goto IL_672; } Block_12:; } return Tuple.Create<Type, Dictionary<Tuple<string, string>, Array>, Dictionary<Tuple<string, string>, string>, Arctium_WoW_ClientDB_Viewer.ClientDB.FileOptions>(LalParser.smethod_36(typeBuilder_), dictionary, dictionary2, lalFile.FileOptions); IL_735: return null; IL_A7: arg_B1_0 = 440927792u; goto IL_AC; IL_E3: typeName = lalFile.TypeName; arg_B1_0 = 2090040595u; goto IL_AC; } internal static IList CreateList(Type type) { return LalParser.smethod_37(LalParser.smethod_21(LalParser.smethod_4(typeof(List__).TypeHandle), new Type[] { type })) as IList; } static string smethod_0(string string_0) { return File.ReadAllText(string_0); } static Match smethod_1(string string_0, string string_1) { return Regex.Match(string_0, string_1); } static GroupCollection smethod_2(Match match_0) { return match_0.Groups; } static int smethod_3(GroupCollection groupCollection_0) { return groupCollection_0.Count; } static Type smethod_4(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static Group smethod_5(GroupCollection groupCollection_0, int int_0) { return groupCollection_0[int_0]; } static string smethod_6(Capture capture_0) { return capture_0.Value; } static string smethod_7(string string_0, char[] char_0) { return string_0.Trim(char_0); } static object smethod_8(Type type_0, string string_0) { return Enum.Parse(type_0, string_0); } static string smethod_9(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static string smethod_10(string string_0, string string_1, string string_2) { return Regex.Replace(string_0, string_1, string_2); } static void smethod_11(string string_0) { Console.WriteLine(string_0); } static string[] smethod_12(string string_0, string[] string_1, StringSplitOptions stringSplitOptions_0) { return string_0.Split(string_1, stringSplitOptions_0); } static bool smethod_13(string string_0, string string_1) { return string_0.StartsWith(string_1); } static MatchCollection smethod_14(string string_0, string string_1) { return Regex.Matches(string_0, string_1); } static IEnumerator smethod_15(MatchCollection matchCollection_0) { return matchCollection_0.GetEnumerator(); } static object smethod_16(IEnumerator ienumerator_0) { return ienumerator_0.Current; } static bool smethod_17(string string_0, string string_1) { return string_0.Contains(string_1); } static string[] smethod_18(string string_0, char[] char_0) { return string_0.Split(char_0); } static Type smethod_19(Type type_0) { return type_0.MakeArrayType(); } static bool smethod_20(string string_0, string string_1) { return string_0 != string_1; } static Type smethod_21(Type type_0, Type[] type_1) { return type_0.MakeGenericType(type_1); } static bool smethod_22(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_23(IDisposable idisposable_0) { idisposable_0.Dispose(); } static AssemblyName smethod_24() { return new AssemblyName(); } static void smethod_25(AssemblyName assemblyName_0, string string_0) { assemblyName_0.Name = string_0; } static AppDomain smethod_26() { return Thread.GetDomain(); } static AssemblyBuilder smethod_27(AppDomain appDomain_0, AssemblyName assemblyName_0, AssemblyBuilderAccess assemblyBuilderAccess_0) { return appDomain_0.DefineDynamicAssembly(assemblyName_0, assemblyBuilderAccess_0); } static ModuleBuilder smethod_28(AssemblyBuilder assemblyBuilder_0, string string_0) { return assemblyBuilder_0.DefineDynamicModule(string_0); } static TypeBuilder smethod_29(ModuleBuilder moduleBuilder_0, string string_0, TypeAttributes typeAttributes_0, Type type_0) { return moduleBuilder_0.DefineType(string_0, typeAttributes_0, type_0); } static bool smethod_30(Type type_0, Type type_1) { return type_0 == type_1; } static bool smethod_31(Type type_0) { return type_0.IsArray; } static bool smethod_32(Type type_0) { return type_0.IsGenericType; } static bool smethod_33(string string_0) { return string.IsNullOrEmpty(string_0); } static object smethod_34(Type type_0, object[] object_0) { return Activator.CreateInstance(type_0, object_0); } static FieldBuilder smethod_35(TypeBuilder typeBuilder_0, string string_0, Type type_0, FieldAttributes fieldAttributes_0) { return typeBuilder_0.DefineField(string_0, type_0, fieldAttributes_0); } static Type smethod_36(TypeBuilder typeBuilder_0) { return typeBuilder_0.CreateType(); } static object smethod_37(Type type_0) { return Activator.CreateInstance(type_0); } } } <file_sep>/AuthServer.WorldServer.Game.Chat.Commands/PlayerCommands.cs using AuthServer.Game.Entities; using AuthServer.Game.Chat; using AuthServer.Game.PacketHandler; using AuthServer.Game.Packets.PacketHandler; using AuthServer.Game.WorldEntities; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Game.Packets.PacketHandler; using AuthServer.WorldServer.Managers; using Framework.Constants; using Framework.Constants.Net; using Framework.Misc; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace AuthServer.WorldServer.Game.Chat.Commands { public class PlayerCommands { [ChatCommand("token", "Usage: !fly #state (Turns the fly mode 'on' or 'off')")] public static void Token(string[] args, WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.TokenBalance, true); while (true) { IL_6F: uint arg_57_0 = 1763307969u; while (true) { uint num; switch ((num = (arg_57_0 ^ 1636081516u)) % 3u) { case 1u: packetWriter.WriteUInt32(0u); packetWriter.WriteUInt64(100uL); packetWriter.WriteUInt64(100uL); packetWriter.WriteUInt32(0u); packetWriter.WriteUInt8(128); arg_57_0 = (num * 1182945109u ^ 3991643388u); continue; case 2u: goto IL_6F; } goto Block_1; } } Block_1: session.Send(ref packetWriter); } [ChatCommand("pepe", "Usage: !fly #state (Turns the fly mode 'on' or 'off')")] public static void Pepe(string[] args, WorldClass session) { uint key = Command.Read<uint>(args, 1); while (true) { IL_1B6: uint arg_179_0 = 1718620233u; while (true) { uint num; switch ((num = (arg_179_0 ^ 632479821u)) % 12u) { case 0u: { Character character; character.SetUpdateField<uint>(197, Manager.WorldMgr.SpellVisualIds[key], 0); ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_179_0 = (num * 1482540242u ^ 3396001420u); continue; } case 1u: { Character character; arg_179_0 = (((character.TargetGuid != 0uL) ? 3547717079u : 4139604592u) ^ num * 2531616229u); continue; } case 2u: goto IL_1B6; case 3u: { Character character; WorldObject worldObject; arg_179_0 = ((character.InRangeObjects.TryGetValue(character.TargetGuid, out worldObject) ? 610091185u : 910267601u) ^ num * 472408399u); continue; } case 4u: { Character character = session.Character; arg_179_0 = (num * 3588819684u ^ 2278578907u); continue; } case 5u: { WorldObject worldObject; worldObject.SetUpdateField<uint>(51, Manager.WorldMgr.SpellVisualIds[key], 0); arg_179_0 = (num * 4251318012u ^ 1944527522u); continue; } case 6u: return; case 7u: { WorldObject worldObject; worldObject.SetUpdateField<uint>(197, Manager.WorldMgr.SpellVisualIds[key], 0); arg_179_0 = (num * 2587597175u ^ 1311852375u); continue; } case 8u: { Character character; character.SetUpdateField<uint>(51, Manager.WorldMgr.SpellVisualIds[key], 0); arg_179_0 = 716724225u; continue; } case 10u: { Character character; arg_179_0 = (((character == null) ? 3347781018u : 2509900318u) ^ num * 616928269u); continue; } case 11u: { WorldObject worldObject; ObjectHandler.HandleUpdateObjectValues(ref session, worldObject, false); arg_179_0 = (num * 2614470153u ^ 102468488u); continue; } } goto Block_4; } } Block_4:; } [ChatCommand("additem", "Usage: !additem #id (space seperated)")] public static void AddItem(string[] args, WorldClass session) { int num = 1; while (true) { IL_434: uint arg_3C6_0 = 1829759189u; while (true) { uint num2; switch ((num2 = (arg_3C6_0 ^ 1674950473u)) % 24u) { case 1u: ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_3C6_0 = (num2 * 537081957u ^ 3186376958u); continue; case 2u: num++; arg_3C6_0 = 75021146u; continue; case 3u: { string[] array; arg_3C6_0 = (((array.Length == 2) ? 1232050948u : 1915115869u) ^ num2 * 2595338616u); continue; } case 4u: arg_3C6_0 = ((session.Character != null) ? 291931743u : 1735681059u); continue; case 5u: { string[] array; string key = array[1]; arg_3C6_0 = (num2 * 4197116070u ^ 1286010251u); continue; } case 6u: { Item item; session.Character.Bag.Add((byte)(23 + session.Character.Bag.Count), item); SmartGuid smartGuid; ObjectHandler.HandleUpdateObjectCreateItem(smartGuid, item, ref session); session.Character.SetUpdateField<ulong>(1085 + (23 + (session.Character.Bag.Count - 1)) * 4, smartGuid.Guid, 0); arg_3C6_0 = (num2 * 2906721303u ^ 2992431741u); continue; } case 7u: { SmartGuid smartGuid = new SmartGuid((ulong)((long)(session.Character.Equipment.Count + session.Character.Bag.Count) + 1L), 0, global::GuidType.Item, 0uL); arg_3C6_0 = 427942867u; continue; } case 8u: { string key; Item item2; Tuple<int, int> value; arg_3C6_0 = (((!item2.DisplayInfoIds.TryGetValue(key, out value)) ? 147921934u : 415209884u) ^ num2 * 980580965u); continue; } case 9u: { Item item; item.ModId = 0; arg_3C6_0 = (num2 * 1739646005u ^ 1970339299u); continue; } case 10u: { KeyValuePair<string, Tuple<int, int>> keyValuePair; Tuple<int, int> value = keyValuePair.Value; arg_3C6_0 = (num2 * 2872625823u ^ 1149135434u); continue; } case 11u: arg_3C6_0 = (((!session.Character.Bag.ContainsKey((byte)(23 + session.Character.Bag.Count))) ? 3267056309u : 2867974769u) ^ num2 * 501669318u); continue; case 12u: arg_3C6_0 = (num2 * 2629657664u ^ 2925816922u); continue; case 13u: { Item item; item.DisplayInfoId = 0; arg_3C6_0 = 1924704u; continue; } case 14u: { SmartGuid smartGuid; session.Character.SetUpdateField<ulong>(1085 + (23 + (session.Character.Bag.Count - 1)) * 4 + 2, smartGuid.HighGuid, 0); arg_3C6_0 = (num2 * 19108411u ^ 1876869570u); continue; } case 15u: { Item item2; KeyValuePair<string, Tuple<int, int>> keyValuePair = item2.DisplayInfoIds.First<KeyValuePair<string, Tuple<int, int>>>(); arg_3C6_0 = (num2 * 1957593868u ^ 2780049903u); continue; } case 16u: { Item item; Tuple<int, int> value; item.ModId = value.Item2; arg_3C6_0 = (num2 * 618062442u ^ 2937530254u); continue; } case 17u: { Command.Read<string>(args, num); string[] array = PlayerCommands.smethod_0(args[num], new char[] { ',' }); int key2 = int.Parse(array[0]); string key = Module.smethod_35<string>(792828044u); arg_3C6_0 = 1184314290u; continue; } case 18u: { Item item; SmartGuid smartGuid; item.Guid = smartGuid.Guid; arg_3C6_0 = (num2 * 663636228u ^ 349664418u); continue; } case 19u: arg_3C6_0 = ((num < args.Length) ? 66922632u : 1568779497u); continue; case 20u: { Item item2; Item item = Manager.WorldMgr.Clone<Item>(item2); arg_3C6_0 = (((item2.DisplayInfoIds.Count > 0) ? 2398290181u : 3862010328u) ^ num2 * 1331310107u); continue; } case 21u: { Item item; Tuple<int, int> value; item.DisplayInfoId = value.Item1; arg_3C6_0 = 1870228257u; continue; } case 22u: { Item item2; int key2; arg_3C6_0 = ((Manager.Equipments.AvailableItems.TryGetValue(key2, out item2) ? 249080243u : 952724005u) ^ num2 * 849715817u); continue; } case 23u: goto IL_434; } return; } } } public static void redirect(string[] args, WorldClass session) { Command.Read<byte>(args, 1); ushort port = Command.Read<ushort>(args, 2); AuthenticationHandler.HandleConnectTo(session, port, 1, null); } public static void resume(string[] args, WorldClass2 session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.ResumeComms, true); AuthenticationHandler.session2.Send(ref packetWriter); } [ChatCommand("scale", "Usage: !morph #size")] public static void Scale(string[] args, WorldClass session) { float value = Command.Read<float>(args, 1); while (true) { IL_88: uint arg_68_0 = 4283022209u; while (true) { uint num; switch ((num = (arg_68_0 ^ 2334673387u)) % 5u) { case 1u: { Character character = session.Character; arg_68_0 = (((character != null) ? 2875468458u : 2165037985u) ^ num * 3832046762u); continue; } case 2u: ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_68_0 = (num * 4030837747u ^ 3617015413u); continue; case 3u: goto IL_88; case 4u: { Character character; character.SetUpdateField<float>(11, value, 0); arg_68_0 = (num * 4124739661u ^ 604476506u); continue; } } return; } } } [ChatCommand("morph", "Usage: !morph #displayId (Change the current displayId for your own character)")] public static void Morph(string[] args, WorldClass session) { uint value = Command.Read<uint>(args, 1); while (true) { IL_158: uint arg_11F_0 = 63500067u; while (true) { uint num; switch ((num = (arg_11F_0 ^ 476227230u)) % 11u) { case 1u: return; case 2u: { Character character; character.SetUpdateField<uint>(105, value, 0); character.SetUpdateField<uint>(106, value, 0); arg_11F_0 = 613835216u; continue; } case 3u: { Character character = session.Character; arg_11F_0 = (num * 476781196u ^ 1888348752u); continue; } case 4u: { Character character; WorldObject worldObject; arg_11F_0 = (((!character.InRangeObjects.TryGetValue(character.TargetGuid, out worldObject)) ? 2509420664u : 3957326664u) ^ num * 340830921u); continue; } case 5u: ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_11F_0 = (num * 3531595648u ^ 3174139861u); continue; case 6u: { WorldObject worldObject; worldObject.SetUpdateField<uint>(106, value, 0); ObjectHandler.HandleUpdateObjectValues(ref session, worldObject, false); arg_11F_0 = (num * 2802560967u ^ 1545472198u); continue; } case 7u: { WorldObject worldObject; worldObject.SetUpdateField<uint>(105, value, 0); arg_11F_0 = (num * 1539819193u ^ 1189985039u); continue; } case 8u: { Character character; arg_11F_0 = (((character.TargetGuid == 0uL) ? 882975940u : 1605636547u) ^ num * 1709330534u); continue; } case 9u: { Character character; arg_11F_0 = (((character != null) ? 2401194492u : 3921580979u) ^ num * 3948722587u); continue; } case 10u: goto IL_158; } return; } } } [ChatCommand("move", "")] public static void MoveMonster(string[] args, WorldClass session) { Character character = session.Character; while (true) { IL_AC: uint arg_90_0 = 1715452917u; while (true) { uint num; switch ((num = (arg_90_0 ^ 101168722u)) % 4u) { case 0u: goto IL_AC; case 1u: { WorldObject worldObject; character.InRangeObjects.TryGetValue(character.TargetGuid, out worldObject); arg_90_0 = (num * 1873354886u ^ 1428528878u); continue; } case 3u: new BitPack(new PacketWriter(ServerMessage.MonsterMove, true), 0uL, 0uL, 0uL, 0uL); arg_90_0 = (((character.TargetGuid == 0uL) ? 307058786u : 1196434273u) ^ num * 3633925430u); continue; } return; } } } [ChatCommand("ad", "")] public static void Ad(string[] args, WorldClass session) { CharacterHandler.chatRunning = !CharacterHandler.chatRunning; } [ChatCommand("emote", "")] public static void Emote(string[] args, WorldClass session) { uint num = Command.Read<uint>(args, 1); Character character = session.Character; while (true) { IL_117: uint arg_E6_0 = 2943245641u; while (true) { uint num2; switch ((num2 = (arg_E6_0 ^ 4158616629u)) % 9u) { case 0u: { WorldObject obj; EmoteHandler.SendEmote(num, session, obj); arg_E6_0 = (num2 * 3198014440u ^ 740941437u); continue; } case 2u: goto IL_117; case 3u: Manager.SpawnMgr.UpdateSpawnEmote(character.TargetGuid, (int)num); arg_E6_0 = (num2 * 337297984u ^ 3395473971u); continue; case 4u: arg_E6_0 = (((character == null) ? 3050889447u : 3931306584u) ^ num2 * 356843814u); continue; case 5u: return; case 6u: arg_E6_0 = (((character.TargetGuid == 0uL) ? 2416919021u : 3702899840u) ^ num2 * 1965687462u); continue; case 7u: EmoteHandler.SendEmote(num, session, null); arg_E6_0 = 2151236751u; continue; case 8u: { WorldObject obj; arg_E6_0 = ((character.InRangeObjects.TryGetValue(character.TargetGuid, out obj) ? 2180342551u : 2149252405u) ^ num2 * 3369828462u); continue; } } return; } } } [ChatCommand2("fly", "Usage: !fly #state (Turns the fly mode 'on' or 'off')")] public static void Fly(string[] args, WorldClass2 session) { string string_ = Command.Read<string>(args, 1); ChatMessageValues chatMessage; WorldClass session2; while (true) { IL_143: uint arg_111_0 = 74139009u; while (true) { uint num; string arg_97_0; string message; switch ((num = (arg_111_0 ^ 751543426u)) % 9u) { case 0u: goto IL_143; case 1u: arg_111_0 = (PlayerCommands.smethod_1(string_, Module.smethod_35<string>(1142952995u)) ? 1156352228u : 1876095834u); continue; case 2u: if (!PlayerCommands.smethod_1(string_, Module.smethod_34<string>(3568268802u))) { arg_111_0 = (num * 889914241u ^ 4118200537u); continue; } arg_97_0 = Module.smethod_33<string>(1125855370u); goto IL_97; case 3u: arg_97_0 = Module.smethod_33<string>(1343156060u); goto IL_97; case 4u: chatMessage = new ChatMessageValues(MessageType.ChatMessageSystem, message, false, false, ""); arg_111_0 = ((PlayerCommands.smethod_1(string_, Module.smethod_36<string>(1227666401u)) ? 2103906062u : 285076005u) ^ num * 40417034u); continue; case 6u: goto IL_14B; case 7u: MoveHandler.HandleMoveUnsetCanFly(ref session); ChatHandler.SendMessage(ref session2, chatMessage, null); arg_111_0 = (num * 901046953u ^ 3272910860u); continue; case 8u: MoveHandler.HandleMoveSetCanFly(ref session); arg_111_0 = (num * 2102033886u ^ 2020440812u); continue; } return; IL_97: message = arg_97_0; session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_111_0 = 1815729218u; } } return; IL_14B: ChatHandler.SendMessage(ref session2, chatMessage, null); } [ChatCommand("loc", "Usage: !loc #name (If name is used the location will be written to 'locations.txt'")] public static void Loc(string[] args, WorldClass session) { StringBuilder stringBuilder = PlayerCommands.smethod_2(); while (true) { IL_1DD: uint arg_1A7_0 = 3261115234u; while (true) { uint num; switch ((num = (arg_1A7_0 ^ 3513100511u)) % 10u) { case 0u: { Character character; string text; PlayerCommands.smethod_3(stringBuilder, Module.smethod_36<string>(4228929354u), new object[] { character.Position.X, character.Position.Y, character.Position.Z, character.Map, text }); WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_1A7_0 = 3547119953u; continue; } case 1u: { Character character = session.Character; arg_1A7_0 = (num * 1193712059u ^ 205718962u); continue; } case 2u: { WorldClass session2; ChatMessageValues chatMessageValues; ChatHandler.SendMessage(ref session2, chatMessageValues, null); arg_1A7_0 = (((args.Length == 2) ? 3301650u : 861707431u) ^ num * 2532835481u); continue; } case 3u: goto IL_1DD; case 5u: { string text = Command.Read<string>(args, 1); arg_1A7_0 = (num * 3003187881u ^ 3619766294u); continue; } case 6u: { string text = Module.smethod_34<string>(2443429458u); arg_1A7_0 = (((args.Length == 2) ? 2241954866u : 4138748003u) ^ num * 403371386u); continue; } case 7u: { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSay, "", false, false, ""); string message; chatMessageValues.Message = message; arg_1A7_0 = (num * 3459372250u ^ 2827844733u); continue; } case 8u: { string message = PlayerCommands.smethod_4(stringBuilder); arg_1A7_0 = (num * 604131715u ^ 1080288080u); continue; } case 9u: PlayerCommands.smethod_6(PlayerCommands.smethod_5(Helper.DataDirectory(), Module.smethod_37<string>(205042696u)), PlayerCommands.smethod_4(stringBuilder)); arg_1A7_0 = (num * 365716950u ^ 1501688729u); continue; } return; } } } public static void Pos(string[] args, WorldClass session) { StringBuilder stringBuilder = PlayerCommands.smethod_2(); Character character = session.Character; while (true) { IL_9A: uint arg_82_0 = 1957202373u; while (true) { uint num; switch ((num = (arg_82_0 ^ 1639149000u)) % 3u) { case 1u: PlayerCommands.smethod_3(stringBuilder, Module.smethod_34<string>(2818375906u), new object[] { character.Position.X, character.Position.Y, character.Position.Z, character.Map }); arg_82_0 = (num * 185926334u ^ 559745566u); continue; case 2u: goto IL_9A; } goto Block_1; } } Block_1: PlayerCommands.smethod_7(Module.smethod_35<string>(751232362u), PlayerCommands.smethod_4(stringBuilder)); } [ChatCommand2("tele", "Usage: !tele [#x #y #z #o #map]")] public static void Teleport(string[] args, WorldClass2 session) { Character character = session.Character; Vector4 vector = null; while (true) { IL_242: uint arg_1F0_0 = 2112909349u; while (true) { uint num; switch ((num = (arg_1F0_0 ^ 700326001u)) % 17u) { case 0u: arg_1F0_0 = (((args.Length != 6) ? 705920024u : 1577708191u) ^ num * 4023469191u); continue; case 1u: goto IL_249; case 2u: { WorldClass session2; ObjectHandler.HandleUpdateObjectCreate(ref session2, false); arg_1F0_0 = (num * 588693918u ^ 1430701430u); continue; } case 3u: { uint num2 = 0u; arg_1F0_0 = (num * 4163379390u ^ 2139403819u); continue; } case 4u: { vector.O = Command.Read<float>(args, 4); uint num2 = Command.Read<uint>(args, 5); arg_1F0_0 = (num * 3616440802u ^ 4146376212u); continue; } case 5u: goto IL_242; case 6u: arg_1F0_0 = ((vector == null) ? 1586124666u : 1574237313u); continue; case 7u: { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_1F0_0 = (num * 1045242768u ^ 3372533483u); continue; } case 8u: { uint num2; Manager.ObjectMgr.SetMap(ref character, num2, true); arg_1F0_0 = (num * 2796418504u ^ 3686915041u); continue; } case 9u: arg_1F0_0 = (((args.Length > 2) ? 2243806273u : 3241221484u) ^ num * 3475097384u); continue; case 10u: { uint num2 = Command.Read<uint>(args, 4); arg_1F0_0 = 1218564924u; continue; } case 11u: { uint num2; arg_1F0_0 = (((character.Map != num2) ? 287739596u : 1286675196u) ^ num * 2806516929u); continue; } case 13u: MoveHandler.HandleMoveTeleport(ref session, vector); arg_1F0_0 = (num * 2679361539u ^ 963707279u); continue; case 14u: arg_1F0_0 = (num * 1975813144u ^ 2471817556u); continue; case 15u: { uint num2; MoveHandler.HandleTransferPending(ref session, num2); MoveHandler.HandleNewWorld(ref session, vector, num2); Manager.ObjectMgr.SetPosition(ref character, vector, true); arg_1F0_0 = 161756150u; continue; } case 16u: vector = new Vector4 { X = Command.Read<float>(args, 1), Y = Command.Read<float>(args, 2), Z = Command.Read<float>(args, 3) }; arg_1F0_0 = (num * 3137894414u ^ 1911778908u); continue; } goto Block_5; } } Block_5: return; IL_249: Manager.ObjectMgr.SetPosition(ref character, vector, true); } [ChatCommand2("flightspeed", "Usage: !flightspeed #speed (Set the current flight speed)")] public static void FlightSpeed(string[] args, WorldClass2 session) { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); while (true) { IL_1B9: uint arg_174_0 = 3755792972u; while (true) { uint num; switch ((num = (arg_174_0 ^ 3686115593u)) % 14u) { case 1u: arg_174_0 = (((args.Length != 1) ? 837379586u : 860848558u) ^ num * 1164964500u); continue; case 2u: arg_174_0 = (num * 1509042133u ^ 4259098934u); continue; case 3u: { float num2 = Command.Read<float>(args, 1); arg_174_0 = 2384937691u; continue; } case 4u: return; case 5u: { float num2; arg_174_0 = (((num2 <= 0f) ? 593964588u : 1056003193u) ^ num * 549373294u); continue; } case 6u: { float num2; chatMessageValues.Message = PlayerCommands.smethod_8(Module.smethod_34<string>(1908673153u), num2, Module.smethod_37<string>(1841067745u)); MoveHandler.HandleMoveSetFlightSpeed(ref session, num2); arg_174_0 = (num * 1788690956u ^ 734722931u); continue; } case 7u: chatMessageValues.Message = Module.smethod_34<string>(3259395599u); arg_174_0 = 2150161397u; continue; case 8u: { float num2; arg_174_0 = (((num2 > 1000f) ? 2497142980u : 2458282412u) ^ num * 3544215381u); continue; } case 9u: goto IL_1B9; case 10u: ChatHandler.SendMessage(ref session2, chatMessageValues, null); arg_174_0 = (num * 787953366u ^ 548096069u); continue; case 11u: chatMessageValues.Message = Module.smethod_37<string>(2308760292u); arg_174_0 = 2443999411u; continue; case 12u: goto IL_1CB; case 13u: MoveHandler.HandleMoveSetFlightSpeed(ref session, 7f); arg_174_0 = (num * 2392267140u ^ 3730153113u); continue; } goto Block_4; } } Block_4: ChatHandler.SendMessage(ref session2, chatMessageValues, null); return; IL_1CB: ChatHandler.SendMessage(ref session2, chatMessageValues, null); } [ChatCommand2("swimspeed", "Usage: !swimspeed #speed (Set the current swim speed)")] public static void SwimSpeed(string[] args, WorldClass2 session) { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); while (true) { IL_180: uint arg_143_0 = 242268950u; while (true) { uint num; switch ((num = (arg_143_0 ^ 940840503u)) % 12u) { case 0u: goto IL_180; case 1u: return; case 2u: MoveHandler.HandleMoveSetSwimSpeed(ref session, 4.72222f); arg_143_0 = (num * 2795734267u ^ 1376101017u); continue; case 3u: { float num2; chatMessageValues.Message = PlayerCommands.smethod_8(Module.smethod_36<string>(263734244u), num2, Module.smethod_34<string>(3168640974u)); MoveHandler.HandleMoveSetSwimSpeed(ref session, num2); arg_143_0 = (num * 1452786484u ^ 1555171921u); continue; } case 4u: goto IL_188; case 5u: { float num2; arg_143_0 = (((num2 <= 1000f) ? 3836652238u : 2314080613u) ^ num * 3097301610u); continue; } case 6u: ChatHandler.SendMessage(ref session2, chatMessageValues, null); arg_143_0 = (num * 753213370u ^ 1140599134u); continue; case 8u: arg_143_0 = (num * 3335570767u ^ 3509745444u); continue; case 9u: arg_143_0 = (((args.Length != 1) ? 3443313538u : 3990332174u) ^ num * 3823416731u); continue; case 10u: { float num2 = Command.Read<float>(args, 1); arg_143_0 = 1929187494u; continue; } case 11u: { float num2; arg_143_0 = (((num2 > 0f) ? 1835697547u : 156303292u) ^ num * 2145833633u); continue; } } goto Block_4; } } Block_4: goto IL_1A2; IL_188: chatMessageValues.Message = Module.smethod_35<string>(2793876848u); ChatHandler.SendMessage(ref session2, chatMessageValues, null); return; IL_1A2: chatMessageValues.Message = Module.smethod_34<string>(1158780257u); ChatHandler.SendMessage(ref session2, chatMessageValues, null); } [ChatCommand2("runspeed", "Usage: !runspeed #speed (Set the current run speed)")] public static void RunSpeed(string[] args, WorldClass2 session) { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); WorldClass session2; while (true) { IL_1D3: uint arg_18A_0 = 4176309388u; while (true) { uint num; switch ((num = (arg_18A_0 ^ 2405970416u)) % 15u) { case 0u: { float num2; chatMessageValues.Message = PlayerCommands.smethod_8(Module.smethod_35<string>(1506754294u), num2, Module.smethod_37<string>(1841067745u)); arg_18A_0 = (num * 800059025u ^ 804599302u); continue; } case 1u: ChatHandler.SendMessage(ref session2, chatMessageValues, null); arg_18A_0 = (num * 2170197594u ^ 4269691514u); continue; case 2u: { float num2; arg_18A_0 = (((num2 <= 0f) ? 3407314960u : 3517761121u) ^ num * 3494936206u); continue; } case 3u: { float num2; MoveHandler.HandleMoveSetRunSpeed(ref session, num2); arg_18A_0 = (num * 1321767256u ^ 546749099u); continue; } case 4u: session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_18A_0 = (((args.Length != 1) ? 2264077066u : 2271036540u) ^ num * 1290353334u); continue; case 5u: goto IL_1D3; case 6u: goto IL_1DA; case 7u: arg_18A_0 = (num * 2749398746u ^ 1648528065u); continue; case 8u: MoveHandler.HandleMoveSetRunSpeed(ref session, 7f); arg_18A_0 = (num * 3682433977u ^ 2828595402u); continue; case 9u: ChatHandler.SendMessage(ref session2, chatMessageValues, null); arg_18A_0 = (num * 1659224401u ^ 3391581061u); continue; case 10u: { float num2 = Command.Read<float>(args, 1); arg_18A_0 = 3617948030u; continue; } case 11u: { float num2; arg_18A_0 = (((num2 > 1000f) ? 284787890u : 1964456558u) ^ num * 523364555u); continue; } case 12u: chatMessageValues.Message = Module.smethod_36<string>(3678851464u); arg_18A_0 = 2344925435u; continue; case 14u: return; } goto Block_4; } } Block_4: return; IL_1DA: chatMessageValues.Message = Module.smethod_36<string>(3875678096u); ChatHandler.SendMessage(ref session2, chatMessageValues, null); } [ChatCommand("mount", "Usage: !mount #displayId (Without 'displayId' to remove the mount)")] public static void Mount(string[] args, WorldClass session) { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); Character character = session.Character; if (args.Length == 1) { goto IL_58; } goto IL_C5; uint arg_99_0; int value; while (true) { IL_94: uint num; switch ((num = (arg_99_0 ^ 2431579815u)) % 8u) { case 0u: return; case 1u: SpellHandler.AuraUpdate(session2, 0u); arg_99_0 = (num * 1897529436u ^ 2432020601u); continue; case 2u: character.SetUpdateField<int>(107, 0, 0); ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_99_0 = (num * 1759251590u ^ 717662379u); continue; case 3u: goto IL_58; case 4u: character.SetUpdateField<int>(107, value, 0); arg_99_0 = (num * 1260205911u ^ 1736463469u); continue; case 5u: goto IL_C5; case 6u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_99_0 = (num * 1281342187u ^ 2294839322u); continue; } break; } return; IL_58: arg_99_0 = 2607041774u; goto IL_94; IL_C5: value = Command.Read<int>(args, 1); arg_99_0 = 2767437739u; goto IL_94; } public static void SpellMount(string[] args, WorldClass session) { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); while (true) { IL_165: uint arg_127_0 = 1441926884u; while (true) { uint num; switch ((num = (arg_127_0 ^ 1257404313u)) % 12u) { case 0u: { uint spellId; SpellHandler.AuraUpdate(session2, spellId); arg_127_0 = 758146703u; continue; } case 1u: { Character character = session.Character; arg_127_0 = (((args.Length == 1) ? 1635089121u : 184635616u) ^ num * 1962911094u); continue; } case 3u: { int value = Command.Read<int>(args, 1); uint spellId = 61451u; arg_127_0 = 483423801u; continue; } case 4u: goto IL_165; case 5u: { Character character; character.SetUpdateField<int>(107, 0, 0); ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_127_0 = (num * 116139448u ^ 1724334562u); continue; } case 6u: { Character character; int value; character.SetUpdateField<int>(107, value, 0); arg_127_0 = (num * 3023767135u ^ 824396802u); continue; } case 7u: { uint spellId = Command.Read<uint>(args, 2); arg_127_0 = (num * 1481116793u ^ 3667671958u); continue; } case 8u: arg_127_0 = (((args.Length != 3) ? 3247025893u : 2640440978u) ^ num * 1421287721u); continue; case 9u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_127_0 = (num * 2642789649u ^ 129902054u); continue; case 10u: SpellHandler.AuraUpdate(session2, 0u); arg_127_0 = (num * 3266202374u ^ 1678561344u); continue; case 11u: return; } return; } } } [ChatCommand("anim", "Usage: !anim #animId (Without 'displayId' to remove the mount)")] public static void Anim(string[] args, WorldClass session) { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); while (true) { IL_F5: uint arg_C4_0 = 748655597u; while (true) { uint num; switch ((num = (arg_C4_0 ^ 69853152u)) % 9u) { case 0u: { Character character; character.SetUpdateField<int>(198, 0, 0); arg_C4_0 = (num * 1018807500u ^ 2773365502u); continue; } case 2u: { Character character = session.Character; arg_C4_0 = (num * 4218065386u ^ 4232213979u); continue; } case 3u: return; case 4u: { int value = Command.Read<int>(args, 1); arg_C4_0 = 1409293650u; continue; } case 5u: goto IL_F5; case 6u: arg_C4_0 = (((args.Length != 1) ? 2369793173u : 3333729281u) ^ num * 278843252u); continue; case 7u: { Character character; int value; character.SetUpdateField<int>(198, value, 0); ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_C4_0 = (num * 914865269u ^ 2817355795u); continue; } case 8u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_C4_0 = (num * 345280611u ^ 1528605511u); continue; } return; } } } [ChatCommand("addspell", "")] public static void AddSpell(string[] args, WorldClass session) { List<uint> list = new List<uint>(); while (true) { IL_FB: uint arg_CA_0 = 153344653u; while (true) { uint num; switch ((num = (arg_CA_0 ^ 738334050u)) % 9u) { case 0u: goto IL_FB; case 1u: { int num2; arg_CA_0 = ((num2 < args.Length) ? 95648395u : 969937008u); continue; } case 2u: { int num2; num2++; arg_CA_0 = (num * 3437627881u ^ 3609141513u); continue; } case 3u: { int num2 = 1; arg_CA_0 = (num * 4043879021u ^ 3278567395u); continue; } case 4u: { int num2; uint num3 = Command.Read<uint>(args, num2); arg_CA_0 = 1470943964u; continue; } case 5u: { uint num3; list.Add(num3); arg_CA_0 = (num * 540092637u ^ 61050278u); continue; } case 7u: { uint num3; session.Character.SpellList.Add(new PlayerSpell { SpellId = num3, State = PlayerSpellState.Unchanged }); arg_CA_0 = (num * 3755660076u ^ 47272571u); continue; } case 8u: Manager.ObjectMgr.SaveChar(session.Character); arg_CA_0 = (num * 3670958506u ^ 1293082197u); continue; } goto Block_2; } } Block_2: SpellHandler.HandleLearnedSpells(ref session, list); } [ChatCommand("scene", "")] public static void PlayScene(string[] args, WorldClass session) { Command.Read<int>(args, 1); new PacketWriter(ServerMessage.LevelUpInfo, true); } [ChatCommand2("commentator", "Usage: !anim #animId (Without 'displayId' to remove the mount)")] public static void commentator(string[] args, WorldClass2 session) { string string_ = Command.Read<string>(args, 1); while (true) { IL_216: uint arg_1D4_0 = 1066883875u; while (true) { uint num; switch ((num = (arg_1D4_0 ^ 37456894u)) % 13u) { case 0u: { Vector4 vector; Character character; MoveHandler.HandleNewWorld(ref session, vector, character.Map); arg_1D4_0 = (num * 301003948u ^ 1875652667u); continue; } case 2u: { WorldClass session2; ObjectHandler.HandleUpdateObjectCreate(ref session2, false); arg_1D4_0 = (num * 799125543u ^ 2279749415u); continue; } case 3u: { Character character; Manager.ObjectMgr.SetMap(ref character, character.Map, true); arg_1D4_0 = (num * 2576046294u ^ 2362481632u); continue; } case 4u: goto IL_216; case 5u: { Character character = session.Character; arg_1D4_0 = (((!PlayerCommands.smethod_1(string_, Module.smethod_34<string>(3568268802u))) ? 2646011147u : 3872167317u) ^ num * 242888976u); continue; } case 6u: { Character character; character.SetUpdateField<int>(224, 0, 0); arg_1D4_0 = (num * 758568693u ^ 3149285992u); continue; } case 7u: { Character character; character.SetUpdateField<int>(224, 4718592, 0); arg_1D4_0 = (num * 1402365876u ^ 2413476074u); continue; } case 8u: { Vector4 vector; Character character; Manager.ObjectMgr.SetPosition(ref character, vector, true); arg_1D4_0 = (num * 1715737310u ^ 1279218844u); continue; } case 9u: { Character character; Vector4 vector = new Vector4 { X = character.Position.X, Y = character.Position.Y, Z = character.Position.Z, O = character.Position.O }; MoveHandler.HandleTransferPending(ref session, character.Map); arg_1D4_0 = 449833418u; continue; } case 10u: { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_1D4_0 = (num * 1103425487u ^ 2672189u); continue; } case 11u: arg_1D4_0 = (PlayerCommands.smethod_1(string_, Module.smethod_34<string>(342814116u)) ? 459696942u : 118508920u); continue; case 12u: arg_1D4_0 = (num * 3228837998u ^ 1371421640u); continue; } return; } } } [ChatCommand("phase", "")] public static void Phase(string[] args, WorldClass session) { string string_ = Command.Read<string>(args, 1); while (true) { IL_218: uint arg_1D2_0 = 2832763991u; while (true) { uint num; switch ((num = (arg_1D2_0 ^ 4194529215u)) % 14u) { case 0u: { WorldClass2 expr_1B0 = Manager.WorldMgr.GetSession2(session.Character.Guid); PacketWriter packetWriter; expr_1B0.Send(ref packetWriter); expr_1B0.Send(ref packetWriter); arg_1D2_0 = (num * 3654543458u ^ 2215459279u); continue; } case 1u: { int num2; string[] array; arg_1D2_0 = ((num2 < array.Length) ? 3145040889u : 2170365812u); continue; } case 3u: { PacketWriter packetWriter; packetWriter.WriteUInt16(1); arg_1D2_0 = (num * 664224499u ^ 3130443040u); continue; } case 4u: { PacketWriter packetWriter; string s; packetWriter.WriteUInt16(ushort.Parse(s)); int num2; num2++; arg_1D2_0 = (num * 3034986035u ^ 2189235004u); continue; } case 5u: { PacketWriter packetWriter; ushort data; packetWriter.WriteUInt16(data); arg_1D2_0 = (num * 3997316103u ^ 3353737090u); continue; } case 6u: { int num2; string[] array; string s = array[num2]; arg_1D2_0 = 2341843464u; continue; } case 7u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); packetWriter.WriteInt32(PlayerCommands.smethod_0(string_, new char[] { ',' }).Length); packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); string[] array = PlayerCommands.smethod_0(string_, new char[] { ',' }); int num2 = 0; arg_1D2_0 = (num * 304268429u ^ 4156627557u); continue; } case 8u: { ushort data2 = Command.Read<ushort>(args, 2); arg_1D2_0 = (num * 1842233139u ^ 2123076014u); continue; } case 9u: goto IL_218; case 10u: { PacketWriter packetWriter; ushort data2; packetWriter.WriteUInt16(data2); packetWriter.WriteUInt32(0u); arg_1D2_0 = (num * 3373873840u ^ 726305087u); continue; } case 11u: { PacketWriter packetWriter; packetWriter.WriteUInt32(2u); arg_1D2_0 = (num * 2506387890u ^ 19162419u); continue; } case 12u: { PacketWriter packetWriter; packetWriter.WriteUInt32(2u); arg_1D2_0 = (num * 864160562u ^ 2644623478u); continue; } case 13u: { ushort data = Command.Read<ushort>(args, 3); PacketWriter packetWriter = new PacketWriter(ServerMessage.PhaseChange, true); packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); arg_1D2_0 = (num * 2966518844u ^ 814912192u); continue; } } return; } } } [ChatCommand("level", "")] public static void level(string[] args, WorldClass session) { int num = Command.Read<int>(args, 1); if (num > 0) { while (true) { IL_1EF: uint arg_1A1_0 = 4066609599u; while (true) { uint num2; switch ((num2 = (arg_1A1_0 ^ 2842339712u)) % 16u) { case 0u: { Character character = session.Character; arg_1A1_0 = (num2 * 1933870507u ^ 3369180597u); continue; } case 1u: { int num3; num3++; arg_1A1_0 = (num2 * 2488008533u ^ 3389246535u); continue; } case 2u: { int num3; arg_1A1_0 = ((num3 >= 6) ? 2888380605u : 3443604526u); continue; } case 3u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.LevelUpInfo, true); arg_1A1_0 = (num2 * 4072169897u ^ 4211103565u); continue; } case 4u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_1A1_0 = (num2 * 3752315970u ^ 2916894440u); continue; } case 5u: { Character character; character.SetUpdateField<int>(84, num, 0); character.Level = (byte)num; arg_1A1_0 = (num2 * 2914383052u ^ 42211909u); continue; } case 6u: { PacketWriter packetWriter; packetWriter.WriteInt32(num); packetWriter.WriteInt32(1); int num3 = 0; arg_1A1_0 = (num2 * 3471677199u ^ 2790679640u); continue; } case 7u: { int num4; arg_1A1_0 = ((num4 >= 4) ? 3503452600u : 3071209260u); continue; } case 8u: { PacketWriter packetWriter; packetWriter.WriteInt32(1); arg_1A1_0 = (num2 * 3164345364u ^ 669271012u); continue; } case 9u: { ObjectHandler.HandleUpdateObjectValues(ref session, false); Character character; Manager.ObjectMgr.SaveChar(character); arg_1A1_0 = (num2 * 1022661948u ^ 2345124311u); continue; } case 10u: goto IL_1EF; case 12u: { PacketWriter packetWriter; packetWriter.WriteInt32(0); int num4; num4++; arg_1A1_0 = 2992839095u; continue; } case 13u: { int num4 = 0; arg_1A1_0 = (num2 * 3427952374u ^ 502175529u); continue; } case 14u: { PacketWriter packetWriter; packetWriter.WriteInt32(0); arg_1A1_0 = 3687856897u; continue; } case 15u: arg_1A1_0 = (((num < 111) ? 2251810583u : 3230732159u) ^ num2 * 1465466636u); continue; } goto Block_5; } } Block_5:; } } [ChatCommand("addnpc", "")] public static void AddNpc(string[] args, WorldClass session) { Character character = session.Character; int num = Command.Read<int>(args, 1); Creature arg_124_0; if (Manager.ObjectMgr.Creatures.ContainsKey(num)) { arg_124_0 = Manager.ObjectMgr.Creatures[num]; goto IL_124; } goto IL_F4; uint arg_FE_0; Creature creature; while (true) { IL_F9: uint num2; switch ((num2 = (arg_FE_0 ^ 2534362544u)) % 6u) { case 1u: goto IL_123; case 2u: goto IL_F4; case 3u: arg_FE_0 = (((creature != null) ? 2702037040u : 3458726402u) ^ num2 * 2983178236u); continue; case 4u: { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); arg_FE_0 = (num2 * 2079116983u ^ 102561659u); continue; } case 5u: { CreatureSpawn expr_43 = new CreatureSpawn(212); expr_43.Guid = CreatureSpawn.GetLastGuid() + 1uL; expr_43.Id = num; expr_43.Creature = creature; expr_43.Position = character.Position; expr_43.Map = character.Map; ChatMessageValues chatMessageValues; chatMessageValues.Message = Module.smethod_34<string>(2415766091u); expr_43.AddToWorld(); ChatHandler.SendMessage(ref session, chatMessageValues, null); arg_FE_0 = (num2 * 2976917232u ^ 2653811486u); continue; } } break; } return; IL_123: arg_124_0 = null; goto IL_124; IL_F4: arg_FE_0 = 2690437133u; goto IL_F9; IL_124: creature = arg_124_0; arg_FE_0 = 3975361229u; goto IL_F9; } [ChatCommand("addobj", "")] public static void AddObj(string[] args, WorldClass session) { Character character = session.Character; while (true) { IL_193: uint arg_15D_0 = 2409484771u; while (true) { uint num; GameObject arg_A8_0; GameObject gameObject; switch ((num = (arg_15D_0 ^ 2771311783u)) % 10u) { case 0u: goto IL_193; case 1u: { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); arg_15D_0 = (num * 1088631807u ^ 904937051u); continue; } case 2u: { int num2 = Command.Read<int>(args, 1); arg_15D_0 = (num * 1675425073u ^ 2677720368u); continue; } case 3u: { int num2; if (!Manager.ObjectMgr.GameObjects.ContainsKey(num2)) { arg_15D_0 = (num * 3721396215u ^ 3360830707u); continue; } arg_A8_0 = Manager.ObjectMgr.GameObjects[num2]; goto IL_A8; } case 4u: { ChatMessageValues chatMessageValues; GameObjectSpawn gameObjectSpawn; chatMessageValues.Message = PlayerCommands.smethod_9(Module.smethod_36<string>(2115977944u), gameObjectSpawn.Guid); gameObjectSpawn.AddToWorld(); arg_15D_0 = (num * 2922612322u ^ 1570456389u); continue; } case 5u: arg_A8_0 = null; goto IL_A8; case 6u: { ChatMessageValues chatMessageValues; ChatHandler.SendMessage(ref session, chatMessageValues, null); arg_15D_0 = (num * 4198403952u ^ 2777288528u); continue; } case 8u: arg_15D_0 = (((gameObject == null) ? 2291507222u : 4252875860u) ^ num * 1343743451u); continue; case 9u: { int num2; GameObjectSpawn gameObjectSpawn = new GameObjectSpawn(33) { Guid = GameObjectSpawn.GetLastGuid() + 1uL, Id = num2, GameObject = gameObject, Position = character.Position, Map = character.Map }; arg_15D_0 = (num * 3162054964u ^ 1030765125u); continue; } } return; IL_A8: gameObject = arg_A8_0; arg_15D_0 = 3084081077u; } } } [ChatCommand("delobj", "")] public static void DelObj(string[] args, WorldClass session) { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); while (true) { IL_1E9: uint arg_1AF_0 = 506554980u; while (true) { uint num; switch ((num = (arg_1AF_0 ^ 294601927u)) % 11u) { case 0u: goto IL_1E9; case 1u: { PacketWriter packetWriter; BitPack arg_190_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(0u); Character character; packetWriter.WriteUInt16((ushort)character.Map); arg_190_0.Write<bool>(true); arg_190_0.Flush(); arg_1AF_0 = (num * 1793924343u ^ 670418767u); continue; } case 3u: { GameObjectSpawn gameObjectSpawn; Manager.SpawnMgr.RemoveSpawn(gameObjectSpawn); arg_1AF_0 = (num * 3980062442u ^ 1628117540u); continue; } case 4u: goto IL_1F1; case 5u: { PacketWriter packetWriter; Character character; packetWriter.WriteUInt16((ushort)character.Map); packetWriter.WriteUInt32(1u); GameObjectSpawn gameObjectSpawn; packetWriter.WriteSmartGuid(gameObjectSpawn.SGuid); character.InRangeObjects.Remove(gameObjectSpawn.Guid); arg_1AF_0 = (num * 478705733u ^ 643532772u); continue; } case 6u: { GameObjectSpawn gameObjectSpawn; Manager.SpawnMgr.RemoveSpawn(gameObjectSpawn); PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_1AF_0 = (num * 3130564786u ^ 1002002126u); continue; } case 7u: { long guid = Command.Read<long>(args, 1); Character character = session.Character; arg_1AF_0 = (num * 1999704058u ^ 2069843722u); continue; } case 8u: { PacketWriter packetWriter; packetWriter.WriteInt32(0); session.Send(ref packetWriter); chatMessageValues.Message = Module.smethod_37<string>(3565125905u); arg_1AF_0 = (num * 974640372u ^ 3306596998u); continue; } case 9u: { long guid; GameObjectSpawn gameObjectSpawn = Manager.SpawnMgr.FindSpawn(guid); arg_1AF_0 = (((gameObjectSpawn != null) ? 2183375789u : 2809248709u) ^ num * 318700939u); continue; } case 10u: chatMessageValues.Message = Module.smethod_33<string>(1061694192u); ChatHandler.SendMessage(ref session, chatMessageValues, null); arg_1AF_0 = 372086733u; continue; } return; } } return; IL_1F1: ChatHandler.SendMessage(ref session, chatMessageValues, null); } [ChatCommand("delnpc", "")] public static void DeleteNpc(string[] args, WorldClass session) { ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSystem, "", false, false, ""); Character character = session.Character; CreatureSpawn creatureSpawn = Manager.SpawnMgr.FindSpawn(character.TargetGuid); if (creatureSpawn != null) { goto IL_F8; } goto IL_1E1; uint arg_1A3_0; while (true) { IL_19E: uint num; switch ((num = (arg_1A3_0 ^ 2072920967u)) % 12u) { case 0u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_1A3_0 = (num * 3844952634u ^ 2173330347u); continue; } case 1u: { PacketWriter packetWriter; packetWriter.WriteUInt16((ushort)character.Map); packetWriter.WriteUInt32(1u); packetWriter.WriteSmartGuid(creatureSpawn.SGuid); character.InRangeObjects.Remove(creatureSpawn.Guid); arg_1A3_0 = (num * 2873974358u ^ 799837162u); continue; } case 2u: { Manager.SpawnMgr.RemoveSpawn(creatureSpawn, true); PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_1A3_0 = (num * 47304701u ^ 1964397943u); continue; } case 3u: ChatHandler.SendMessage(ref session, chatMessageValues, null); arg_1A3_0 = (num * 3704620640u ^ 2790218823u); continue; case 5u: goto IL_F8; case 6u: { PacketWriter packetWriter; BitPack arg_D9_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(0u); packetWriter.WriteUInt16((ushort)character.Map); arg_D9_0.Write<bool>(true); arg_D9_0.Flush(); arg_1A3_0 = (num * 3804477740u ^ 1720354034u); continue; } case 7u: return; case 8u: chatMessageValues.Message = Module.smethod_33<string>(844393502u); arg_1A3_0 = (num * 1013692842u ^ 4107925085u); continue; case 9u: goto IL_1E1; case 10u: ChatHandler.SendMessage(ref session, chatMessageValues, null); arg_1A3_0 = (num * 3738969421u ^ 2060519994u); continue; case 11u: { Manager.SpawnMgr.RemoveSpawn(creatureSpawn, true); PacketWriter packetWriter; packetWriter.WriteInt32(0); arg_1A3_0 = (num * 773743163u ^ 1507818754u); continue; } } break; } return; IL_F8: arg_1A3_0 = 86060769u; goto IL_19E; IL_1E1: chatMessageValues.Message = Module.smethod_33<string>(1061694192u); arg_1A3_0 = 753816660u; goto IL_19E; } static string[] smethod_0(string string_0, char[] char_0) { return string_0.Split(char_0); } static bool smethod_1(string string_0, string string_1) { return string_0 == string_1; } static StringBuilder smethod_2() { return new StringBuilder(); } static StringBuilder smethod_3(StringBuilder stringBuilder_0, string string_0, object[] object_0) { return stringBuilder_0.AppendFormat(string_0, object_0); } static string smethod_4(object object_0) { return object_0.ToString(); } static string smethod_5(string string_0, string string_1) { return string_0 + string_1; } static void smethod_6(string string_0, string string_1) { File.AppendAllText(string_0, string_1); } static void smethod_7(string string_0, string string_1) { File.WriteAllText(string_0, string_1); } static string smethod_8(object object_0, object object_1, object object_2) { return object_0 + object_1 + object_2; } static string smethod_9(string string_0, object object_0) { return string.Format(string_0, object_0); } } } <file_sep>/Bgs.Protocol.Account.V1/GetAuthorizedDataResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetAuthorizedDataResponse : IMessage<GetAuthorizedDataResponse>, IEquatable<GetAuthorizedDataResponse>, IDeepCloneable<GetAuthorizedDataResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAuthorizedDataResponse.__c __9 = new GetAuthorizedDataResponse.__c(); internal GetAuthorizedDataResponse cctor>b__24_0() { return new GetAuthorizedDataResponse(); } } private static readonly MessageParser<GetAuthorizedDataResponse> _parser = new MessageParser<GetAuthorizedDataResponse>(new Func<GetAuthorizedDataResponse>(GetAuthorizedDataResponse.__c.__9.<.cctor>b__24_0)); public const int DataFieldNumber = 1; private static readonly FieldCodec<AuthorizedData> _repeated_data_codec = FieldCodec.ForMessage<AuthorizedData>(10u, AuthorizedData.Parser); private readonly RepeatedField<AuthorizedData> data_ = new RepeatedField<AuthorizedData>(); public static MessageParser<GetAuthorizedDataResponse> Parser { get { return GetAuthorizedDataResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[27]; } } MessageDescriptor IMessage.Descriptor { get { return GetAuthorizedDataResponse.Descriptor; } } public RepeatedField<AuthorizedData> Data { get { return this.data_; } } public GetAuthorizedDataResponse() { } public GetAuthorizedDataResponse(GetAuthorizedDataResponse other) : this() { this.data_ = other.data_.Clone(); } public GetAuthorizedDataResponse Clone() { return new GetAuthorizedDataResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetAuthorizedDataResponse); } public bool Equals(GetAuthorizedDataResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1931417315) % 7) { case 0: goto IL_7A; case 1: return false; case 2: goto IL_3E; case 3: arg_48_0 = ((!this.data_.Equals(other.data_)) ? -109050142 : -688286187); continue; case 4: return true; case 6: return false; } break; } return true; IL_3E: arg_48_0 = -1628249450; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -219058854 : -797118600); goto IL_43; } public override int GetHashCode() { return 1 ^ GetAuthorizedDataResponse.smethod_0(this.data_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.data_.WriteTo(output, GetAuthorizedDataResponse._repeated_data_codec); } public int CalculateSize() { return 0 + this.data_.CalculateSize(GetAuthorizedDataResponse._repeated_data_codec); } public void MergeFrom(GetAuthorizedDataResponse other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -1115598663; IL_08: switch ((arg_0D_0 ^ -1928457469) % 4) { case 1: IL_27: this.data_.Add(other.data_); arg_0D_0 = -1476075793; goto IL_08; case 2: return; case 3: goto IL_03; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) == 0u) ? 2105610770u : 1173120909u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 68476262u)) % 6u) { case 0u: arg_68_0 = 1173120909u; continue; case 1u: goto IL_9B; case 3u: input.SkipLastField(); arg_68_0 = (num2 * 2699704939u ^ 818698708u); continue; case 4u: this.data_.AddEntriesFrom(input, GetAuthorizedDataResponse._repeated_data_codec); arg_68_0 = 1439354213u; continue; case 5u: arg_68_0 = ((num == 10u) ? 1983802908u : 40186165u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Resources.V1/ContentHandleRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Resources.V1 { [DebuggerNonUserCode] public sealed class ContentHandleRequest : IMessage<ContentHandleRequest>, IEquatable<ContentHandleRequest>, IDeepCloneable<ContentHandleRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ContentHandleRequest.__c __9 = new ContentHandleRequest.__c(); internal ContentHandleRequest cctor>b__34_0() { return new ContentHandleRequest(); } } private static readonly MessageParser<ContentHandleRequest> _parser = new MessageParser<ContentHandleRequest>(new Func<ContentHandleRequest>(ContentHandleRequest.__c.__9.<.cctor>b__34_0)); public const int ProgramFieldNumber = 1; private uint program_; public const int StreamFieldNumber = 2; private uint stream_; public const int VersionFieldNumber = 3; private uint version_; public static MessageParser<ContentHandleRequest> Parser { get { return ContentHandleRequest._parser; } } public static MessageDescriptor Descriptor { get { return ResourceServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return ContentHandleRequest.Descriptor; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Stream { get { return this.stream_; } set { this.stream_ = value; } } public uint Version { get { return this.version_; } set { this.version_ = value; } } public ContentHandleRequest() { } public ContentHandleRequest(ContentHandleRequest other) : this() { this.program_ = other.program_; this.stream_ = other.stream_; this.version_ = other.version_; } public ContentHandleRequest Clone() { return new ContentHandleRequest(this); } public override bool Equals(object other) { return this.Equals(other as ContentHandleRequest); } public bool Equals(ContentHandleRequest other) { if (other == null) { goto IL_8D; } goto IL_DD; int arg_97_0; while (true) { IL_92: switch ((arg_97_0 ^ 939620478) % 11) { case 0: return true; case 1: return false; case 2: goto IL_8D; case 3: goto IL_DD; case 4: return false; case 5: arg_97_0 = ((this.Version != other.Version) ? 1606711556 : 149153421); continue; case 6: return false; case 7: return false; case 8: arg_97_0 = ((this.Program != other.Program) ? 1578846239 : 1603122601); continue; case 9: arg_97_0 = ((this.Stream != other.Stream) ? 2111800084 : 180410102); continue; } break; } return true; IL_8D: arg_97_0 = 1764465170; goto IL_92; IL_DD: arg_97_0 = ((other == this) ? 339175193 : 2033301593); goto IL_92; } public override int GetHashCode() { int num = 1; while (true) { IL_A4: uint arg_84_0 = 110021148u; while (true) { uint num2; switch ((num2 = (arg_84_0 ^ 995499366u)) % 5u) { case 0u: goto IL_A4; case 2u: arg_84_0 = (((this.Version == 0u) ? 3745304004u : 3405634988u) ^ num2 * 1496738207u); continue; case 3u: num ^= this.Version.GetHashCode(); arg_84_0 = (num2 * 2947445366u ^ 195338156u); continue; case 4u: num ^= this.Program.GetHashCode(); num ^= this.Stream.GetHashCode(); arg_84_0 = (num2 * 3032279369u ^ 132581432u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); output.WriteFixed32(this.Program); output.WriteRawTag(21); while (true) { IL_AB: uint arg_8B_0 = 830469958u; while (true) { uint num; switch ((num = (arg_8B_0 ^ 2040654274u)) % 5u) { case 0u: output.WriteRawTag(29); output.WriteFixed32(this.Version); arg_8B_0 = (num * 270846916u ^ 1591348490u); continue; case 1u: output.WriteFixed32(this.Stream); arg_8B_0 = (num * 2505594027u ^ 4010972358u); continue; case 3u: goto IL_AB; case 4u: arg_8B_0 = (((this.Version == 0u) ? 1669674894u : 122290535u) ^ num * 839847226u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_90: uint arg_6C_0 = 682876754u; while (true) { uint num2; switch ((num2 = (arg_6C_0 ^ 321931457u)) % 6u) { case 0u: arg_6C_0 = (((this.Version == 0u) ? 2942812029u : 3360786753u) ^ num2 * 2042009441u); continue; case 1u: num += 5; arg_6C_0 = (num2 * 1496843209u ^ 56344140u); continue; case 2u: num += 5; arg_6C_0 = (num2 * 2333432314u ^ 2726581419u); continue; case 3u: goto IL_90; case 5u: num += 5; arg_6C_0 = (num2 * 2194961247u ^ 673170555u); continue; } return num; } } return num; } public void MergeFrom(ContentHandleRequest other) { if (other == null) { goto IL_AE; } goto IL_F8; uint arg_B8_0; while (true) { IL_B3: uint num; switch ((num = (arg_B8_0 ^ 1481117938u)) % 9u) { case 0u: goto IL_AE; case 1u: this.Version = other.Version; arg_B8_0 = (num * 4020831897u ^ 1413714585u); continue; case 2u: arg_B8_0 = ((other.Stream == 0u) ? 683100910u : 1408589707u); continue; case 3u: this.Program = other.Program; arg_B8_0 = (num * 580779127u ^ 3999245948u); continue; case 4u: goto IL_F8; case 6u: return; case 7u: this.Stream = other.Stream; arg_B8_0 = (num * 3032042521u ^ 4080198719u); continue; case 8u: arg_B8_0 = ((other.Version == 0u) ? 427059833u : 1295170322u); continue; } break; } return; IL_AE: arg_B8_0 = 373455822u; goto IL_B3; IL_F8: arg_B8_0 = ((other.Program != 0u) ? 1402660202u : 425095124u); goto IL_B3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13B: uint num; uint arg_F3_0 = ((num = input.ReadTag()) == 0u) ? 2832475028u : 3875868814u; while (true) { uint num2; switch ((num2 = (arg_F3_0 ^ 3782351043u)) % 11u) { case 1u: arg_F3_0 = (((num == 29u) ? 3818001735u : 3066532278u) ^ num2 * 651130996u); continue; case 2u: arg_F3_0 = 3875868814u; continue; case 3u: arg_F3_0 = ((num != 13u) ? 3940609223u : 4198650164u); continue; case 4u: arg_F3_0 = (((num != 21u) ? 1354523183u : 198975072u) ^ num2 * 4093704052u); continue; case 5u: this.Version = input.ReadFixed32(); arg_F3_0 = 3713331752u; continue; case 6u: goto IL_13B; case 7u: arg_F3_0 = (num2 * 2379059398u ^ 3225345686u); continue; case 8u: input.SkipLastField(); arg_F3_0 = (num2 * 3483037519u ^ 2753519197u); continue; case 9u: this.Stream = input.ReadFixed32(); arg_F3_0 = 3713331752u; continue; case 10u: this.Program = input.ReadFixed32(); arg_F3_0 = 3713331752u; continue; } return; } } } } } <file_sep>/Google.Protobuf.Reflection/MessageOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class MessageOptions : IMessage, IMessage<MessageOptions>, IEquatable<MessageOptions>, IDeepCloneable<MessageOptions> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MessageOptions.__c __9 = new MessageOptions.__c(); internal MessageOptions cctor>b__44_0() { return new MessageOptions(); } } private static readonly MessageParser<MessageOptions> _parser = new MessageParser<MessageOptions>(new Func<MessageOptions>(MessageOptions.__c.__9.<.cctor>b__44_0)); public const int MessageSetWireFormatFieldNumber = 1; private bool messageSetWireFormat_; public const int NoStandardDescriptorAccessorFieldNumber = 2; private bool noStandardDescriptorAccessor_; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int MapEntryFieldNumber = 7; private bool mapEntry_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<MessageOptions> Parser { get { return MessageOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return MessageOptions.Descriptor; } } public bool MessageSetWireFormat { get { return this.messageSetWireFormat_; } set { this.messageSetWireFormat_ = value; } } public bool NoStandardDescriptorAccessor { get { return this.noStandardDescriptorAccessor_; } set { this.noStandardDescriptorAccessor_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public bool MapEntry { get { return this.mapEntry_; } set { this.mapEntry_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public MessageOptions() { } public MessageOptions(MessageOptions other) : this() { this.messageSetWireFormat_ = other.messageSetWireFormat_; this.noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_; this.deprecated_ = other.deprecated_; this.mapEntry_ = other.mapEntry_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public MessageOptions Clone() { return new MessageOptions(this); } public override bool Equals(object other) { return this.Equals(other as MessageOptions); } public bool Equals(MessageOptions other) { if (other == null) { goto IL_BF; } goto IL_146; int arg_F0_0; while (true) { IL_EB: switch ((arg_F0_0 ^ 129061972) % 15) { case 0: return false; case 1: arg_F0_0 = ((this.MessageSetWireFormat != other.MessageSetWireFormat) ? 1143277538 : 293193125); continue; case 2: goto IL_BF; case 3: return false; case 4: arg_F0_0 = ((this.MapEntry == other.MapEntry) ? 188161069 : 418308042); continue; case 5: return true; case 6: return false; case 7: return false; case 8: arg_F0_0 = ((this.NoStandardDescriptorAccessor == other.NoStandardDescriptorAccessor) ? 835511718 : 610945513); continue; case 9: arg_F0_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? 145537365 : 1601676194); continue; case 10: return false; case 11: goto IL_146; case 13: arg_F0_0 = ((this.Deprecated == other.Deprecated) ? 1973854612 : 1306739759); continue; case 14: return false; } break; } return true; IL_BF: arg_F0_0 = 178283921; goto IL_EB; IL_146: arg_F0_0 = ((other != this) ? 1772637099 : 1242292813); goto IL_EB; } public override int GetHashCode() { int num = 1; while (true) { IL_173: uint arg_13A_0 = 3601003430u; while (true) { uint num2; switch ((num2 = (arg_13A_0 ^ 2893664131u)) % 11u) { case 0u: arg_13A_0 = (this.MapEntry ? 2862238555u : 4252389209u); continue; case 1u: num ^= this.MapEntry.GetHashCode(); arg_13A_0 = (num2 * 2823033378u ^ 261659625u); continue; case 2u: num ^= this.Deprecated.GetHashCode(); arg_13A_0 = (num2 * 2637011675u ^ 2603965016u); continue; case 4u: arg_13A_0 = (((!this.MessageSetWireFormat) ? 2207165731u : 2536552230u) ^ num2 * 357695350u); continue; case 5u: num ^= this.MessageSetWireFormat.GetHashCode(); arg_13A_0 = (num2 * 2472637877u ^ 2688762570u); continue; case 6u: goto IL_173; case 7u: arg_13A_0 = (this.Deprecated ? 3308289404u : 3669613693u); continue; case 8u: num ^= this.NoStandardDescriptorAccessor.GetHashCode(); arg_13A_0 = (num2 * 2550384430u ^ 3335414055u); continue; case 9u: num ^= this.uninterpretedOption_.GetHashCode(); arg_13A_0 = 2317778736u; continue; case 10u: arg_13A_0 = (this.NoStandardDescriptorAccessor ? 4004307022u : 3339948273u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.MessageSetWireFormat) { goto IL_79; } goto IL_198; uint arg_148_0; while (true) { IL_143: uint num; switch ((num = (arg_148_0 ^ 2861861006u)) % 13u) { case 0u: arg_148_0 = ((!this.MapEntry) ? 2869423946u : 3900091774u); continue; case 1u: output.WriteBool(this.MapEntry); arg_148_0 = (num * 1962923183u ^ 1680019624u); continue; case 2u: output.WriteRawTag(8); arg_148_0 = (num * 2526939653u ^ 3701647225u); continue; case 4u: output.WriteRawTag(56); arg_148_0 = (num * 1354141248u ^ 2516758064u); continue; case 5u: this.uninterpretedOption_.WriteTo(output, MessageOptions._repeated_uninterpretedOption_codec); arg_148_0 = 2581372634u; continue; case 6u: output.WriteBool(this.NoStandardDescriptorAccessor); arg_148_0 = (num * 689629506u ^ 429407760u); continue; case 7u: output.WriteRawTag(24); output.WriteBool(this.Deprecated); arg_148_0 = (num * 2711552234u ^ 3807633186u); continue; case 8u: goto IL_79; case 9u: output.WriteBool(this.MessageSetWireFormat); arg_148_0 = (num * 2133100045u ^ 1608349690u); continue; case 10u: goto IL_198; case 11u: output.WriteRawTag(16); arg_148_0 = (num * 3629660958u ^ 3459846665u); continue; case 12u: arg_148_0 = (this.Deprecated ? 3871238144u : 2274402030u); continue; } break; } return; IL_79: arg_148_0 = 3989120349u; goto IL_143; IL_198: arg_148_0 = ((!this.NoStandardDescriptorAccessor) ? 2361273514u : 3629109853u); goto IL_143; } public int CalculateSize() { int num = 0; while (true) { IL_120: uint arg_EB_0 = 2672977064u; while (true) { uint num2; switch ((num2 = (arg_EB_0 ^ 2313346712u)) % 10u) { case 0u: num += 2; arg_EB_0 = (num2 * 2631670652u ^ 590750990u); continue; case 1u: num += 2; arg_EB_0 = (num2 * 3017527088u ^ 2989012407u); continue; case 2u: arg_EB_0 = (((!this.MessageSetWireFormat) ? 1284146519u : 566721713u) ^ num2 * 504832295u); continue; case 3u: arg_EB_0 = (this.Deprecated ? 2423381410u : 2399723116u); continue; case 4u: arg_EB_0 = (this.MapEntry ? 2498378192u : 2174925806u); continue; case 5u: goto IL_120; case 7u: num += 2; arg_EB_0 = (num2 * 3336194984u ^ 2776993917u); continue; case 8u: num += 2; arg_EB_0 = (num2 * 3671120592u ^ 1952111948u); continue; case 9u: arg_EB_0 = ((!this.NoStandardDescriptorAccessor) ? 3559163637u : 2734961397u); continue; } goto Block_5; } } Block_5: return num + this.uninterpretedOption_.CalculateSize(MessageOptions._repeated_uninterpretedOption_codec); } public void MergeFrom(MessageOptions other) { if (other == null) { goto IL_F0; } goto IL_142; uint arg_FA_0; while (true) { IL_F5: uint num; switch ((num = (arg_FA_0 ^ 808311907u)) % 11u) { case 0u: goto IL_F0; case 1u: this.MessageSetWireFormat = other.MessageSetWireFormat; arg_FA_0 = (num * 3246275114u ^ 1612692251u); continue; case 2u: this.NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor; arg_FA_0 = (num * 2506065365u ^ 2356993201u); continue; case 3u: arg_FA_0 = ((!other.NoStandardDescriptorAccessor) ? 402864360u : 1618873878u); continue; case 4u: return; case 5u: goto IL_142; case 6u: this.Deprecated = other.Deprecated; arg_FA_0 = (num * 2233122381u ^ 2429029434u); continue; case 7u: arg_FA_0 = (other.Deprecated ? 1997045737u : 863932600u); continue; case 9u: this.MapEntry = other.MapEntry; arg_FA_0 = (num * 55876113u ^ 3079603292u); continue; case 10u: arg_FA_0 = ((!other.MapEntry) ? 878065272u : 1486919559u); continue; } break; } this.uninterpretedOption_.Add(other.uninterpretedOption_); return; IL_F0: arg_FA_0 = 403572051u; goto IL_F5; IL_142: arg_FA_0 = (other.MessageSetWireFormat ? 1384417060u : 1651946685u); goto IL_F5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_229: uint num; uint arg_1C1_0 = ((num = input.ReadTag()) != 0u) ? 3469620998u : 3630242310u; while (true) { uint num2; switch ((num2 = (arg_1C1_0 ^ 2243419113u)) % 19u) { case 0u: this.Deprecated = input.ReadBool(); arg_1C1_0 = 4234244018u; continue; case 1u: arg_1C1_0 = (num2 * 1644263179u ^ 1170768354u); continue; case 2u: goto IL_229; case 3u: input.SkipLastField(); arg_1C1_0 = 2369499066u; continue; case 4u: arg_1C1_0 = (((num == 16u) ? 2225045656u : 2169105142u) ^ num2 * 1051808150u); continue; case 5u: this.NoStandardDescriptorAccessor = input.ReadBool(); arg_1C1_0 = 2208996371u; continue; case 6u: arg_1C1_0 = 3469620998u; continue; case 7u: this.uninterpretedOption_.AddEntriesFrom(input, MessageOptions._repeated_uninterpretedOption_codec); arg_1C1_0 = 2369499066u; continue; case 8u: arg_1C1_0 = (((num == 7994u) ? 138419680u : 227237099u) ^ num2 * 1910417148u); continue; case 9u: this.MapEntry = input.ReadBool(); arg_1C1_0 = 2369499066u; continue; case 10u: arg_1C1_0 = (((num == 8u) ? 3686731008u : 3021766251u) ^ num2 * 3755396946u); continue; case 12u: arg_1C1_0 = (num2 * 370407906u ^ 961682190u); continue; case 13u: arg_1C1_0 = ((num != 24u) ? 4272774463u : 3566958352u); continue; case 14u: arg_1C1_0 = (num2 * 3078376082u ^ 1948281938u); continue; case 15u: this.MessageSetWireFormat = input.ReadBool(); arg_1C1_0 = 2728242621u; continue; case 16u: arg_1C1_0 = ((num > 16u) ? 3204990346u : 2966243978u); continue; case 17u: arg_1C1_0 = (((num == 56u) ? 3181980743u : 2795719428u) ^ num2 * 3530361039u); continue; case 18u: arg_1C1_0 = (num2 * 1415060401u ^ 821814353u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.UserManager.V1/RecentPlayersRemovedNotification.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class RecentPlayersRemovedNotification : IMessage<RecentPlayersRemovedNotification>, IEquatable<RecentPlayersRemovedNotification>, IDeepCloneable<RecentPlayersRemovedNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RecentPlayersRemovedNotification.__c __9 = new RecentPlayersRemovedNotification.__c(); internal RecentPlayersRemovedNotification cctor>b__24_0() { return new RecentPlayersRemovedNotification(); } } private static readonly MessageParser<RecentPlayersRemovedNotification> _parser = new MessageParser<RecentPlayersRemovedNotification>(new Func<RecentPlayersRemovedNotification>(RecentPlayersRemovedNotification.__c.__9.<.cctor>b__24_0)); public const int PlayerFieldNumber = 1; private static readonly FieldCodec<RecentPlayer> _repeated_player_codec = FieldCodec.ForMessage<RecentPlayer>(10u, RecentPlayer.Parser); private readonly RepeatedField<RecentPlayer> player_ = new RepeatedField<RecentPlayer>(); public static MessageParser<RecentPlayersRemovedNotification> Parser { get { return RecentPlayersRemovedNotification._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return RecentPlayersRemovedNotification.Descriptor; } } public RepeatedField<RecentPlayer> Player { get { return this.player_; } } public RecentPlayersRemovedNotification() { } public RecentPlayersRemovedNotification(RecentPlayersRemovedNotification other) : this() { this.player_ = other.player_.Clone(); } public RecentPlayersRemovedNotification Clone() { return new RecentPlayersRemovedNotification(this); } public override bool Equals(object other) { return this.Equals(other as RecentPlayersRemovedNotification); } public bool Equals(RecentPlayersRemovedNotification other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1128086653) % 7) { case 1: return false; case 2: arg_48_0 = (this.player_.Equals(other.player_) ? -1978510517 : -769861487); continue; case 3: return true; case 4: return false; case 5: goto IL_7A; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = -1894230107; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -569615792 : -1960070258); goto IL_43; } public override int GetHashCode() { return 1 ^ RecentPlayersRemovedNotification.smethod_0(this.player_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.player_.WriteTo(output, RecentPlayersRemovedNotification._repeated_player_codec); } public int CalculateSize() { return 0 + this.player_.CalculateSize(RecentPlayersRemovedNotification._repeated_player_codec); } public void MergeFrom(RecentPlayersRemovedNotification other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -1981457882; IL_08: switch ((arg_0D_0 ^ -414899836) % 4) { case 0: goto IL_03; case 1: IL_27: this.player_.Add(other.player_); arg_0D_0 = -499730125; goto IL_08; case 2: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) == 0u) ? 89162293u : 595678782u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 206768347u)) % 6u) { case 0u: arg_68_0 = 595678782u; continue; case 1u: arg_68_0 = ((num != 10u) ? 1623553462u : 963561662u); continue; case 2u: goto IL_9B; case 3u: input.SkipLastField(); arg_68_0 = (num2 * 1940763454u ^ 107829789u); continue; case 5u: this.player_.AddEntriesFrom(input, RecentPlayersRemovedNotification._repeated_player_codec); arg_68_0 = 967036283u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/SubscriptionUpdateResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class SubscriptionUpdateResponse : IMessage<SubscriptionUpdateResponse>, IEquatable<SubscriptionUpdateResponse>, IDeepCloneable<SubscriptionUpdateResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscriptionUpdateResponse.__c __9 = new SubscriptionUpdateResponse.__c(); internal SubscriptionUpdateResponse cctor>b__24_0() { return new SubscriptionUpdateResponse(); } } private static readonly MessageParser<SubscriptionUpdateResponse> _parser = new MessageParser<SubscriptionUpdateResponse>(new Func<SubscriptionUpdateResponse>(SubscriptionUpdateResponse.__c.__9.<.cctor>b__24_0)); public const int RefFieldNumber = 1; private static readonly FieldCodec<SubscriberReference> _repeated_ref_codec = FieldCodec.ForMessage<SubscriberReference>(10u, SubscriberReference.Parser); private readonly RepeatedField<SubscriberReference> ref_ = new RepeatedField<SubscriberReference>(); public static MessageParser<SubscriptionUpdateResponse> Parser { get { return SubscriptionUpdateResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return SubscriptionUpdateResponse.Descriptor; } } public RepeatedField<SubscriberReference> Ref { get { return this.ref_; } } public SubscriptionUpdateResponse() { } public SubscriptionUpdateResponse(SubscriptionUpdateResponse other) : this() { this.ref_ = other.ref_.Clone(); } public SubscriptionUpdateResponse Clone() { return new SubscriptionUpdateResponse(this); } public override bool Equals(object other) { return this.Equals(other as SubscriptionUpdateResponse); } public bool Equals(SubscriptionUpdateResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1766069471) % 7) { case 0: return false; case 1: goto IL_7A; case 2: return false; case 3: return true; case 4: goto IL_3E; case 6: arg_48_0 = (this.ref_.Equals(other.ref_) ? -591953562 : -611880218); continue; } break; } return true; IL_3E: arg_48_0 = -314018968; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -395265759 : -110640070); goto IL_43; } public override int GetHashCode() { return 1 ^ SubscriptionUpdateResponse.smethod_0(this.ref_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.ref_.WriteTo(output, SubscriptionUpdateResponse._repeated_ref_codec); } public int CalculateSize() { return 0 + this.ref_.CalculateSize(SubscriptionUpdateResponse._repeated_ref_codec); } public void MergeFrom(SubscriptionUpdateResponse other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 1983725271; IL_08: switch ((arg_0D_0 ^ 2096316593) % 4) { case 0: goto IL_03; case 2: return; case 3: IL_27: this.ref_.Add(other.ref_); arg_0D_0 = 193908724; goto IL_08; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) == 0u) ? 2519376809u : 3420373307u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 3424488679u)) % 7u) { case 0u: goto IL_AE; case 1u: arg_77_0 = ((num == 10u) ? 2764384404u : 3521703815u); continue; case 2u: arg_77_0 = 3420373307u; continue; case 3u: input.SkipLastField(); arg_77_0 = (num2 * 4092986896u ^ 2399762539u); continue; case 5u: this.ref_.AddEntriesFrom(input, SubscriptionUpdateResponse._repeated_ref_codec); arg_77_0 = 4050220892u; continue; case 6u: arg_77_0 = (num2 * 3647175931u ^ 58767384u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GetPlayerVariablesResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GetPlayerVariablesResponse : IMessage<GetPlayerVariablesResponse>, IEquatable<GetPlayerVariablesResponse>, IDeepCloneable<GetPlayerVariablesResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetPlayerVariablesResponse.__c __9 = new GetPlayerVariablesResponse.__c(); internal GetPlayerVariablesResponse cctor>b__24_0() { return new GetPlayerVariablesResponse(); } } private static readonly MessageParser<GetPlayerVariablesResponse> _parser = new MessageParser<GetPlayerVariablesResponse>(new Func<GetPlayerVariablesResponse>(GetPlayerVariablesResponse.__c.__9.<.cctor>b__24_0)); public const int PlayerVariablesFieldNumber = 1; private static readonly FieldCodec<PlayerVariables> _repeated_playerVariables_codec; private readonly RepeatedField<PlayerVariables> playerVariables_ = new RepeatedField<PlayerVariables>(); public static MessageParser<GetPlayerVariablesResponse> Parser { get { return GetPlayerVariablesResponse._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return GetPlayerVariablesResponse.Descriptor; } } public RepeatedField<PlayerVariables> PlayerVariables { get { return this.playerVariables_; } } public GetPlayerVariablesResponse() { } public GetPlayerVariablesResponse(GetPlayerVariablesResponse other) : this() { this.playerVariables_ = other.playerVariables_.Clone(); } public GetPlayerVariablesResponse Clone() { return new GetPlayerVariablesResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetPlayerVariablesResponse); } public bool Equals(GetPlayerVariablesResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1821048962) % 7) { case 1: return false; case 2: return true; case 3: return false; case 4: goto IL_7A; case 5: arg_48_0 = (this.playerVariables_.Equals(other.playerVariables_) ? -2071647934 : -609633962); continue; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = -338527247; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1277708312 : -1433226669); goto IL_43; } public override int GetHashCode() { return 1 ^ GetPlayerVariablesResponse.smethod_0(this.playerVariables_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.playerVariables_.WriteTo(output, GetPlayerVariablesResponse._repeated_playerVariables_codec); } public int CalculateSize() { return 0 + this.playerVariables_.CalculateSize(GetPlayerVariablesResponse._repeated_playerVariables_codec); } public void MergeFrom(GetPlayerVariablesResponse other) { if (other == null) { return; } this.playerVariables_.Add(other.playerVariables_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) == 0u) ? 2154109635u : 3860832072u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 3845951503u)) % 7u) { case 0u: arg_77_0 = 3860832072u; continue; case 1u: arg_77_0 = ((num != 10u) ? 3425798282u : 3117562333u); continue; case 2u: input.SkipLastField(); arg_77_0 = (num2 * 3785593697u ^ 1102691208u); continue; case 3u: goto IL_AE; case 4u: arg_77_0 = (num2 * 945352882u ^ 307359120u); continue; case 5u: this.playerVariables_.AddEntriesFrom(input, GetPlayerVariablesResponse._repeated_playerVariables_codec); arg_77_0 = 2686913716u; continue; } return; } } } static GetPlayerVariablesResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 67092142u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 117545711u)) % 3u) { case 0u: goto IL_57; case 2u: GetPlayerVariablesResponse._repeated_playerVariables_codec = FieldCodec.ForMessage<PlayerVariables>(10u, Bgs.Protocol.GameUtilities.V1.PlayerVariables.Parser); arg_3F_0 = (num * 2076155346u ^ 1654495655u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/ChannelServiceReflection.cs using Bgs.Protocol.Account.V1; using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public static class ChannelServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ChannelServiceReflection.descriptor; } } static ChannelServiceReflection() { ChannelServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(ChannelServiceReflection.smethod_1(ChannelServiceReflection.smethod_0(new string[] { Module.smethod_35<string>(3524312636u), Module.smethod_34<string>(2229118351u), Module.smethod_35<string>(544387228u), Module.smethod_35<string>(4181833580u), Module.smethod_33<string>(2944864749u), Module.smethod_37<string>(1606499432u), Module.smethod_33<string>(3763021005u), Module.smethod_36<string>(2745794668u), Module.smethod_36<string>(325177404u), Module.smethod_36<string>(3057271180u), Module.smethod_35<string>(447519516u), Module.smethod_33<string>(3453917597u), Module.smethod_35<string>(797361148u), Module.smethod_36<string>(718830668u), Module.smethod_34<string>(3421625119u), Module.smethod_33<string>(1817605085u), Module.smethod_34<string>(2671732223u), Module.smethod_37<string>(4177880104u), Module.smethod_35<string>(3777286556u), Module.smethod_36<string>(313437868u), Module.smethod_35<string>(4127128188u), Module.smethod_34<string>(1546892879u), Module.smethod_37<string>(1928157784u), Module.smethod_36<string>(2269964652u), Module.smethod_35<string>(1497044412u), Module.smethod_36<string>(3821098636u), Module.smethod_34<string>(3217235039u), Module.smethod_36<string>(695351596u), Module.smethod_36<string>(3045531644u), Module.smethod_36<string>(1482658124u), Module.smethod_36<string>(4214751900u), Module.smethod_34<string>(2092395695u), Module.smethod_33<string>(3964382637u), Module.smethod_34<string>(1342502799u), Module.smethod_37<string>(525757976u), Module.smethod_34<string>(592609903u), Module.smethod_35<string>(2196727676u), Module.smethod_37<string>(3272202856u), Module.smethod_33<string>(3146226381u), Module.smethod_37<string>(175158024u), Module.smethod_36<string>(3092489788u), Module.smethod_36<string>(1529616268u), Module.smethod_37<string>(2337112472u), Module.smethod_37<string>(3885634888u), Module.smethod_36<string>(754049276u), Module.smethod_37<string>(788590056u), Module.smethod_34<string>(2535009567u), Module.smethod_35<string>(1020715820u), Module.smethod_37<string>(642467448u), Module.smethod_34<string>(2160063119u), Module.smethod_35<string>(3343120284u), Module.smethod_35<string>(2685599340u), Module.smethod_34<string>(285330879u), Module.smethod_37<string>(291867496u), Module.smethod_34<string>(3830405279u), Module.smethod_35<string>(55515564u), Module.smethod_37<string>(2132635128u), Module.smethod_36<string>(2293443724u), Module.smethod_33<string>(3965794829u), Module.smethod_36<string>(3462663980u), Module.smethod_34<string>(1580726591u), Module.smethod_33<string>(3249731581u), Module.smethod_34<string>(830833695u), Module.smethod_37<string>(2979957640u), Module.smethod_37<string>(1635912568u), Module.smethod_34<string>(455887247u), Module.smethod_33<string>(693169805u), Module.smethod_36<string>(3844577708u), Module.smethod_34<string>(2876122303u), Module.smethod_36<string>(336916940u), Module.smethod_36<string>(3069010716u), Module.smethod_36<string>(1506137196u), Module.smethod_34<string>(1100115583u), Module.smethod_36<string>(177296780u), Module.smethod_36<string>(2909390556u), Module.smethod_37<string>(815645512u), Module.smethod_37<string>(465045560u), Module.smethod_37<string>(2013567976u), Module.smethod_35<string>(3615591004u), Module.smethod_36<string>(3303043820u), Module.smethod_36<string>(2122084028u), Module.smethod_35<string>(3307911692u), Module.smethod_37<string>(3065367832u), Module.smethod_36<string>(1728430764u), Module.smethod_36<string>(4078610812u), Module.smethod_34<string>(1270671951u), Module.smethod_35<string>(2650390748u), Module.smethod_36<string>(3684957548u), Module.smethod_35<string>(3000232380u), Module.smethod_37<string>(611168168u), Module.smethod_36<string>(3673218012u), Module.smethod_35<string>(3657753324u), Module.smethod_34<string>(2191121215u), Module.smethod_37<string>(3007013096u), Module.smethod_36<string>(1334777500u), Module.smethod_37<string>(4204935560u), Module.smethod_36<string>(2885911484u), Module.smethod_37<string>(114445608u), Module.smethod_36<string>(4055131740u) })), new FileDescriptor[] { AccountTypesReflection.Descriptor, EntityTypesReflection.Descriptor, ChannelTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(AddMemberRequest).TypeHandle), AddMemberRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_33<string>(1041715912u), Module.smethod_35<string>(2692553068u), Module.smethod_36<string>(3782294397u), Module.smethod_36<string>(3175281664u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(RemoveMemberRequest).TypeHandle), RemoveMemberRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_35<string>(873829892u), Module.smethod_33<string>(3909504503u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(UnsubscribeMemberRequest).TypeHandle), UnsubscribeMemberRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_34<string>(503862199u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(SendMessageRequest).TypeHandle), SendMessageRequest.Parser, new string[] { Module.smethod_37<string>(3916609987u), Module.smethod_33<string>(2780121432u), Module.smethod_35<string>(3475994334u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(UpdateChannelStateRequest).TypeHandle), UpdateChannelStateRequest.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_36<string>(1230494416u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(UpdateMemberStateRequest).TypeHandle), UpdateMemberStateRequest.Parser, new string[] { Module.smethod_33<string>(2714350708u), Module.smethod_35<string>(314309936u), Module.smethod_36<string>(3476391380u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(DissolveRequest).TypeHandle), DissolveRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_33<string>(3909504503u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(SetRolesRequest).TypeHandle), SetRolesRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_33<string>(789209099u), Module.smethod_36<string>(1126211332u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(JoinNotification).TypeHandle), JoinNotification.Parser, new string[] { Module.smethod_33<string>(2990864785u), Module.smethod_34<string>(1385901585u), Module.smethod_34<string>(2764287398u), Module.smethod_35<string>(4035437254u), Module.smethod_34<string>(1323785393u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(MemberAddedNotification).TypeHandle), MemberAddedNotification.Parser, new string[] { Module.smethod_36<string>(3817903102u), Module.smethod_35<string>(4035437254u), Module.smethod_35<string>(409323662u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(LeaveNotification).TypeHandle), LeaveNotification.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_33<string>(3323373157u), Module.smethod_33<string>(3909504503u), Module.smethod_33<string>(4242012875u), Module.smethod_36<string>(1133525086u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(MemberRemovedNotification).TypeHandle), MemberRemovedNotification.Parser, new string[] { Module.smethod_33<string>(2714350708u), Module.smethod_36<string>(1126211332u), Module.smethod_36<string>(3148134426u), Module.smethod_34<string>(14248441u), Module.smethod_35<string>(409323662u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(SendMessageNotification).TypeHandle), SendMessageNotification.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_36<string>(3785962563u), Module.smethod_34<string>(2510740929u), Module.smethod_34<string>(215450163u), Module.smethod_34<string>(14248441u), Module.smethod_34<string>(1323785393u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(UpdateChannelStateNotification).TypeHandle), UpdateChannelStateNotification.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_33<string>(2121662025u), Module.smethod_34<string>(14248441u), Module.smethod_35<string>(409323662u) }, null, null, null), new GeneratedCodeInfo(ChannelServiceReflection.smethod_2(typeof(UpdateMemberStateNotification).TypeHandle), UpdateMemberStateNotification.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_35<string>(314309936u), Module.smethod_33<string>(3425466165u), Module.smethod_35<string>(4035437254u), Module.smethod_37<string>(583346466u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.UserManager.V1/ClearRecentPlayersResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class ClearRecentPlayersResponse : IMessage<ClearRecentPlayersResponse>, IEquatable<ClearRecentPlayersResponse>, IDeepCloneable<ClearRecentPlayersResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ClearRecentPlayersResponse.__c __9 = new ClearRecentPlayersResponse.__c(); internal ClearRecentPlayersResponse cctor>b__24_0() { return new ClearRecentPlayersResponse(); } } private static readonly MessageParser<ClearRecentPlayersResponse> _parser = new MessageParser<ClearRecentPlayersResponse>(new Func<ClearRecentPlayersResponse>(ClearRecentPlayersResponse.__c.__9.<.cctor>b__24_0)); public const int PlayersRemovedFieldNumber = 1; private static readonly FieldCodec<uint> _repeated_playersRemoved_codec = FieldCodec.ForFixed32(10u); private readonly RepeatedField<uint> playersRemoved_ = new RepeatedField<uint>(); public static MessageParser<ClearRecentPlayersResponse> Parser { get { return ClearRecentPlayersResponse._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return ClearRecentPlayersResponse.Descriptor; } } public RepeatedField<uint> PlayersRemoved { get { return this.playersRemoved_; } } public ClearRecentPlayersResponse() { } public ClearRecentPlayersResponse(ClearRecentPlayersResponse other) : this() { this.playersRemoved_ = other.playersRemoved_.Clone(); } public ClearRecentPlayersResponse Clone() { return new ClearRecentPlayersResponse(this); } public override bool Equals(object other) { return this.Equals(other as ClearRecentPlayersResponse); } public bool Equals(ClearRecentPlayersResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1655083623) % 7) { case 0: goto IL_7A; case 1: return true; case 2: goto IL_3E; case 3: return false; case 4: return false; case 5: arg_48_0 = (this.playersRemoved_.Equals(other.playersRemoved_) ? -89490350 : -1267983531); continue; } break; } return true; IL_3E: arg_48_0 = -1601938418; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -1092524674 : -2000694162); goto IL_43; } public override int GetHashCode() { return 1 ^ ClearRecentPlayersResponse.smethod_0(this.playersRemoved_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.playersRemoved_.WriteTo(output, ClearRecentPlayersResponse._repeated_playersRemoved_codec); } public int CalculateSize() { return 0 + this.playersRemoved_.CalculateSize(ClearRecentPlayersResponse._repeated_playersRemoved_codec); } public void MergeFrom(ClearRecentPlayersResponse other) { if (other == null) { return; } this.playersRemoved_.Add(other.playersRemoved_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_DB: uint num; uint arg_A0_0 = ((num = input.ReadTag()) == 0u) ? 970551748u : 1842560647u; while (true) { uint num2; switch ((num2 = (arg_A0_0 ^ 2025713626u)) % 8u) { case 0u: input.SkipLastField(); arg_A0_0 = (num2 * 1999685195u ^ 946908771u); continue; case 1u: arg_A0_0 = (num2 * 3579601320u ^ 688075493u); continue; case 2u: arg_A0_0 = (((num != 13u) ? 28896124u : 615864208u) ^ num2 * 2458255419u); continue; case 3u: arg_A0_0 = 1842560647u; continue; case 4u: this.playersRemoved_.AddEntriesFrom(input, ClearRecentPlayersResponse._repeated_playersRemoved_codec); arg_A0_0 = 1793716493u; continue; case 5u: arg_A0_0 = ((num != 10u) ? 184739128u : 1743181190u); continue; case 7u: goto IL_DB; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Database.Auth.Entities/Component.cs using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Framework.Database.Auth.Entities { public class Component { [Key, Column(Order = 0)] public string Program { get; set; } [Key, Column(Order = 1)] public string Platform { get; set; } public int Build { get; set; } } } <file_sep>/Google.Protobuf/FieldCodec.cs using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public static class FieldCodec { private static class WrapperCodecs { private static readonly Dictionary<Type, object> Codecs = new Dictionary<Type, object> { { FieldCodec.WrapperCodecs.smethod_0(typeof(bool).TypeHandle), FieldCodec.ForBool(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(int).TypeHandle), FieldCodec.ForInt32(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(long).TypeHandle), FieldCodec.ForInt64(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(uint).TypeHandle), FieldCodec.ForUInt32(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(ulong).TypeHandle), FieldCodec.ForUInt64(WireFormat.MakeTag(1, WireFormat.WireType.Varint)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(float).TypeHandle), FieldCodec.ForFloat(WireFormat.MakeTag(1, WireFormat.WireType.Fixed32)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(double).TypeHandle), FieldCodec.ForDouble(WireFormat.MakeTag(1, WireFormat.WireType.Fixed64)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(string).TypeHandle), FieldCodec.ForString(WireFormat.MakeTag(1, WireFormat.WireType.LengthDelimited)) }, { FieldCodec.WrapperCodecs.smethod_0(typeof(ByteString).TypeHandle), FieldCodec.ForBytes(WireFormat.MakeTag(1, WireFormat.WireType.LengthDelimited)) } }; internal static FieldCodec<T> GetCodec<T>() { object obj; if (!FieldCodec.WrapperCodecs.Codecs.TryGetValue(FieldCodec.WrapperCodecs.smethod_0(typeof(T).TypeHandle), out obj)) { throw FieldCodec.WrapperCodecs.smethod_2(FieldCodec.WrapperCodecs.smethod_1(Module.smethod_36<string>(372525645u), FieldCodec.WrapperCodecs.smethod_0(typeof(T).TypeHandle))); } return (FieldCodec<T>)obj; } internal static T Read<T>(CodedInputStream input, FieldCodec<T> codec) { int byteLimit = input.ReadLength(); T result; while (true) { IL_FA: uint arg_C8_0 = 1476935752u; while (true) { uint num; switch ((num = (arg_C8_0 ^ 2018772964u)) % 9u) { case 0u: input.SkipLastField(); arg_C8_0 = 1768391466u; continue; case 1u: { uint num2; arg_C8_0 = (((num2 = input.ReadTag()) == 0u) ? 789788880u : 1000495088u); continue; } case 3u: arg_C8_0 = (num * 422428889u ^ 15908708u); continue; case 4u: result = codec.Read(input); arg_C8_0 = (num * 2015424451u ^ 1456283564u); continue; case 5u: { uint num2; arg_C8_0 = ((num2 == codec.Tag) ? 627669222u : 345821031u); continue; } case 6u: { input.CheckReadEndOfStreamTag(); int oldLimit; input.PopLimit(oldLimit); arg_C8_0 = (num * 1368242210u ^ 1133084529u); continue; } case 7u: { int oldLimit = input.PushLimit(byteLimit); result = codec.DefaultValue; arg_C8_0 = (num * 2466023856u ^ 3651674u); continue; } case 8u: goto IL_FA; } return result; } } return result; } internal static void Write<T>(CodedOutputStream output, T value, FieldCodec<T> codec) { output.WriteLength(codec.CalculateSizeWithTag(value)); codec.WriteTagAndValue(output, value); } internal static int CalculateSize<T>(T value, FieldCodec<T> codec) { int num = codec.CalculateSizeWithTag(value); return CodedOutputStream.ComputeLengthSize(num) + num; } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static string smethod_1(object object_0, object object_1) { return object_0 + object_1; } static InvalidOperationException smethod_2(string string_0) { return new InvalidOperationException(string_0); } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldCodec.__c __9 = new FieldCodec.__c(); public static Func<CodedInputStream, string> __9__0_0; public static Action<CodedOutputStream, string> __9__0_1; public static Func<CodedInputStream, ByteString> __9__1_0; public static Action<CodedOutputStream, ByteString> __9__1_1; public static Func<CodedInputStream, bool> __9__2_0; public static Action<CodedOutputStream, bool> __9__2_1; public static Func<CodedInputStream, int> __9__3_0; public static Action<CodedOutputStream, int> __9__3_1; public static Func<CodedInputStream, int> __9__4_0; public static Action<CodedOutputStream, int> __9__4_1; public static Func<CodedInputStream, uint> __9__5_0; public static Action<CodedOutputStream, uint> __9__5_1; public static Func<CodedInputStream, int> __9__6_0; public static Action<CodedOutputStream, int> __9__6_1; public static Func<CodedInputStream, uint> __9__7_0; public static Action<CodedOutputStream, uint> __9__7_1; public static Func<CodedInputStream, long> __9__8_0; public static Action<CodedOutputStream, long> __9__8_1; public static Func<CodedInputStream, long> __9__9_0; public static Action<CodedOutputStream, long> __9__9_1; public static Func<CodedInputStream, ulong> __9__10_0; public static Action<CodedOutputStream, ulong> __9__10_1; public static Func<CodedInputStream, long> __9__11_0; public static Action<CodedOutputStream, long> __9__11_1; public static Func<CodedInputStream, ulong> __9__12_0; public static Action<CodedOutputStream, ulong> __9__12_1; public static Func<CodedInputStream, float> __9__13_0; public static Action<CodedOutputStream, float> __9__13_1; public static Func<CodedInputStream, double> __9__14_0; public static Action<CodedOutputStream, double> __9__14_1; internal string <ForString>b__0_0(CodedInputStream input) { return input.ReadString(); } internal void <ForString>b__0_1(CodedOutputStream output, string value) { output.WriteString(value); } internal ByteString <ForBytes>b__1_0(CodedInputStream input) { return input.ReadBytes(); } internal void <ForBytes>b__1_1(CodedOutputStream output, ByteString value) { output.WriteBytes(value); } internal bool <ForBool>b__2_0(CodedInputStream input) { return input.ReadBool(); } internal void <ForBool>b__2_1(CodedOutputStream output, bool value) { output.WriteBool(value); } internal int <ForInt32>b__3_0(CodedInputStream input) { return input.ReadInt32(); } internal void <ForInt32>b__3_1(CodedOutputStream output, int value) { output.WriteInt32(value); } internal int <ForSInt32>b__4_0(CodedInputStream input) { return input.ReadSInt32(); } internal void <ForSInt32>b__4_1(CodedOutputStream output, int value) { output.WriteSInt32(value); } internal uint <ForFixed32>b__5_0(CodedInputStream input) { return input.ReadFixed32(); } internal void <ForFixed32>b__5_1(CodedOutputStream output, uint value) { output.WriteFixed32(value); } internal int <ForSFixed32>b__6_0(CodedInputStream input) { return input.ReadSFixed32(); } internal void <ForSFixed32>b__6_1(CodedOutputStream output, int value) { output.WriteSFixed32(value); } internal uint <ForUInt32>b__7_0(CodedInputStream input) { return input.ReadUInt32(); } internal void <ForUInt32>b__7_1(CodedOutputStream output, uint value) { output.WriteUInt32(value); } internal long <ForInt64>b__8_0(CodedInputStream input) { return input.ReadInt64(); } internal void <ForInt64>b__8_1(CodedOutputStream output, long value) { output.WriteInt64(value); } internal long <ForSInt64>b__9_0(CodedInputStream input) { return input.ReadSInt64(); } internal void <ForSInt64>b__9_1(CodedOutputStream output, long value) { output.WriteSInt64(value); } internal ulong <ForFixed64>b__10_0(CodedInputStream input) { return input.ReadFixed64(); } internal void <ForFixed64>b__10_1(CodedOutputStream output, ulong value) { output.WriteFixed64(value); } internal long <ForSFixed64>b__11_0(CodedInputStream input) { return input.ReadSFixed64(); } internal void <ForSFixed64>b__11_1(CodedOutputStream output, long value) { output.WriteSFixed64(value); } internal ulong <ForUInt64>b__12_0(CodedInputStream input) { return input.ReadUInt64(); } internal void <ForUInt64>b__12_1(CodedOutputStream output, ulong value) { output.WriteUInt64(value); } internal float <ForFloat>b__13_0(CodedInputStream input) { return input.ReadFloat(); } internal void <ForFloat>b__13_1(CodedOutputStream output, float value) { output.WriteFloat(value); } internal double <ForDouble>b__14_0(CodedInputStream input) { return input.ReadDouble(); } internal void <ForDouble>b__14_1(CodedOutputStream output, double value) { output.WriteDouble(value); } } [CompilerGenerated] [Serializable] private sealed class __c__16<T> where T : object, IMessage<T> { public static readonly FieldCodec.__c__16<T> __9 = new FieldCodec.__c__16<T>(); public static Action<CodedOutputStream, T> __9__16_1; public static Func<T, int> __9__16_2; internal void <ForMessage>b__16_1(CodedOutputStream output, T value) { output.WriteMessage(value); } internal int <ForMessage>b__16_2(T message) { return CodedOutputStream.ComputeMessageSize(message); } } public static FieldCodec<string> ForString(uint tag) { Func<CodedInputStream, string> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__0_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__0_0 = new Func<CodedInputStream, string>(FieldCodec.__c.__9.<ForString>b__0_0)); } Action<CodedOutputStream, string> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__0_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__0_1 = new Action<CodedOutputStream, string>(FieldCodec.__c.__9.<ForString>b__0_1)); } return new FieldCodec<string>(arg_4B_0, arg_4B_1, new Func<string, int>(CodedOutputStream.ComputeStringSize), tag); } public static FieldCodec<ByteString> ForBytes(uint tag) { Func<CodedInputStream, ByteString> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__1_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__1_0 = new Func<CodedInputStream, ByteString>(FieldCodec.__c.__9.<ForBytes>b__1_0)); } Action<CodedOutputStream, ByteString> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__1_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__1_1 = new Action<CodedOutputStream, ByteString>(FieldCodec.__c.__9.<ForBytes>b__1_1)); } return new FieldCodec<ByteString>(arg_4B_0, arg_4B_1, new Func<ByteString, int>(CodedOutputStream.ComputeBytesSize), tag); } public static FieldCodec<bool> ForBool(uint tag) { Func<CodedInputStream, bool> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__2_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__2_0 = new Func<CodedInputStream, bool>(FieldCodec.__c.__9.<ForBool>b__2_0)); } Action<CodedOutputStream, bool> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__2_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__2_1 = new Action<CodedOutputStream, bool>(FieldCodec.__c.__9.<ForBool>b__2_1)); } return new FieldCodec<bool>(arg_4B_0, arg_4B_1, new Func<bool, int>(CodedOutputStream.ComputeBoolSize), tag); } public static FieldCodec<int> ForInt32(uint tag) { Func<CodedInputStream, int> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__3_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__3_0 = new Func<CodedInputStream, int>(FieldCodec.__c.__9.<ForInt32>b__3_0)); } Action<CodedOutputStream, int> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__3_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__3_1 = new Action<CodedOutputStream, int>(FieldCodec.__c.__9.<ForInt32>b__3_1)); } return new FieldCodec<int>(arg_4B_0, arg_4B_1, new Func<int, int>(CodedOutputStream.ComputeInt32Size), tag); } public static FieldCodec<int> ForSInt32(uint tag) { Func<CodedInputStream, int> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__4_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__4_0 = new Func<CodedInputStream, int>(FieldCodec.__c.__9.<ForSInt32>b__4_0)); } Action<CodedOutputStream, int> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__4_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__4_1 = new Action<CodedOutputStream, int>(FieldCodec.__c.__9.<ForSInt32>b__4_1)); } return new FieldCodec<int>(arg_4B_0, arg_4B_1, new Func<int, int>(CodedOutputStream.ComputeSInt32Size), tag); } public static FieldCodec<uint> ForFixed32(uint tag) { Func<CodedInputStream, uint> arg_40_0; if ((arg_40_0 = FieldCodec.__c.__9__5_0) == null) { arg_40_0 = (FieldCodec.__c.__9__5_0 = new Func<CodedInputStream, uint>(FieldCodec.__c.__9.<ForFixed32>b__5_0)); } Action<CodedOutputStream, uint> arg_40_1; if ((arg_40_1 = FieldCodec.__c.__9__5_1) == null) { arg_40_1 = (FieldCodec.__c.__9__5_1 = new Action<CodedOutputStream, uint>(FieldCodec.__c.__9.<ForFixed32>b__5_1)); } return new FieldCodec<uint>(arg_40_0, arg_40_1, 4, tag); } public static FieldCodec<int> ForSFixed32(uint tag) { Func<CodedInputStream, int> arg_40_0; if ((arg_40_0 = FieldCodec.__c.__9__6_0) == null) { arg_40_0 = (FieldCodec.__c.__9__6_0 = new Func<CodedInputStream, int>(FieldCodec.__c.__9.<ForSFixed32>b__6_0)); } Action<CodedOutputStream, int> arg_40_1; if ((arg_40_1 = FieldCodec.__c.__9__6_1) == null) { arg_40_1 = (FieldCodec.__c.__9__6_1 = new Action<CodedOutputStream, int>(FieldCodec.__c.__9.<ForSFixed32>b__6_1)); } return new FieldCodec<int>(arg_40_0, arg_40_1, 4, tag); } public static FieldCodec<uint> ForUInt32(uint tag) { Func<CodedInputStream, uint> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__7_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__7_0 = new Func<CodedInputStream, uint>(FieldCodec.__c.__9.<ForUInt32>b__7_0)); } Action<CodedOutputStream, uint> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__7_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__7_1 = new Action<CodedOutputStream, uint>(FieldCodec.__c.__9.<ForUInt32>b__7_1)); } return new FieldCodec<uint>(arg_4B_0, arg_4B_1, new Func<uint, int>(CodedOutputStream.ComputeUInt32Size), tag); } public static FieldCodec<long> ForInt64(uint tag) { Func<CodedInputStream, long> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__8_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__8_0 = new Func<CodedInputStream, long>(FieldCodec.__c.__9.<ForInt64>b__8_0)); } Action<CodedOutputStream, long> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__8_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__8_1 = new Action<CodedOutputStream, long>(FieldCodec.__c.__9.<ForInt64>b__8_1)); } return new FieldCodec<long>(arg_4B_0, arg_4B_1, new Func<long, int>(CodedOutputStream.ComputeInt64Size), tag); } public static FieldCodec<long> ForSInt64(uint tag) { Func<CodedInputStream, long> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__9_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__9_0 = new Func<CodedInputStream, long>(FieldCodec.__c.__9.<ForSInt64>b__9_0)); } Action<CodedOutputStream, long> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__9_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__9_1 = new Action<CodedOutputStream, long>(FieldCodec.__c.__9.<ForSInt64>b__9_1)); } return new FieldCodec<long>(arg_4B_0, arg_4B_1, new Func<long, int>(CodedOutputStream.ComputeSInt64Size), tag); } public static FieldCodec<ulong> ForFixed64(uint tag) { Func<CodedInputStream, ulong> arg_40_0; if ((arg_40_0 = FieldCodec.__c.__9__10_0) == null) { arg_40_0 = (FieldCodec.__c.__9__10_0 = new Func<CodedInputStream, ulong>(FieldCodec.__c.__9.<ForFixed64>b__10_0)); } Action<CodedOutputStream, ulong> arg_40_1; if ((arg_40_1 = FieldCodec.__c.__9__10_1) == null) { arg_40_1 = (FieldCodec.__c.__9__10_1 = new Action<CodedOutputStream, ulong>(FieldCodec.__c.__9.<ForFixed64>b__10_1)); } return new FieldCodec<ulong>(arg_40_0, arg_40_1, 8, tag); } public static FieldCodec<long> ForSFixed64(uint tag) { Func<CodedInputStream, long> arg_40_0; if ((arg_40_0 = FieldCodec.__c.__9__11_0) == null) { arg_40_0 = (FieldCodec.__c.__9__11_0 = new Func<CodedInputStream, long>(FieldCodec.__c.__9.<ForSFixed64>b__11_0)); } Action<CodedOutputStream, long> arg_40_1; if ((arg_40_1 = FieldCodec.__c.__9__11_1) == null) { arg_40_1 = (FieldCodec.__c.__9__11_1 = new Action<CodedOutputStream, long>(FieldCodec.__c.__9.<ForSFixed64>b__11_1)); } return new FieldCodec<long>(arg_40_0, arg_40_1, 8, tag); } public static FieldCodec<ulong> ForUInt64(uint tag) { Func<CodedInputStream, ulong> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__12_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__12_0 = new Func<CodedInputStream, ulong>(FieldCodec.__c.__9.<ForUInt64>b__12_0)); } Action<CodedOutputStream, ulong> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__12_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__12_1 = new Action<CodedOutputStream, ulong>(FieldCodec.__c.__9.<ForUInt64>b__12_1)); } return new FieldCodec<ulong>(arg_4B_0, arg_4B_1, new Func<ulong, int>(CodedOutputStream.ComputeUInt64Size), tag); } public static FieldCodec<float> ForFloat(uint tag) { Func<CodedInputStream, float> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__13_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__13_0 = new Func<CodedInputStream, float>(FieldCodec.__c.__9.<ForFloat>b__13_0)); } Action<CodedOutputStream, float> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__13_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__13_1 = new Action<CodedOutputStream, float>(FieldCodec.__c.__9.<ForFloat>b__13_1)); } return new FieldCodec<float>(arg_4B_0, arg_4B_1, new Func<float, int>(CodedOutputStream.ComputeFloatSize), tag); } public static FieldCodec<double> ForDouble(uint tag) { Func<CodedInputStream, double> arg_4B_0; if ((arg_4B_0 = FieldCodec.__c.__9__14_0) == null) { arg_4B_0 = (FieldCodec.__c.__9__14_0 = new Func<CodedInputStream, double>(FieldCodec.__c.__9.<ForDouble>b__14_0)); } Action<CodedOutputStream, double> arg_4B_1; if ((arg_4B_1 = FieldCodec.__c.__9__14_1) == null) { arg_4B_1 = (FieldCodec.__c.__9__14_1 = new Action<CodedOutputStream, double>(FieldCodec.__c.__9.<ForDouble>b__14_1)); } return new FieldCodec<double>(arg_4B_0, arg_4B_1, new Func<double, int>(CodedOutputStream.ComputeDoubleSize), tag); } public static FieldCodec<T> ForEnum<T>(uint tag, Func<T, int> toInt32, Func<int, T> fromInt32) { return new FieldCodec<T>((CodedInputStream input) => fromInt32(input.ReadEnum()), delegate(CodedOutputStream output, T value) { output.WriteEnum(toInt32(value)); }, (T value) => CodedOutputStream.ComputeEnumSize(toInt32(value)), tag); } public static FieldCodec<T> ForMessage<T>(uint tag, MessageParser<T> parser) where T : object, IMessage<T> { Func<CodedInputStream, T> arg_56_0 = delegate(CodedInputStream input) { T t = parser.CreateTemplate(); input.ReadMessage(t); return t; }; Action<CodedOutputStream, T> arg_56_1; if ((arg_56_1 = FieldCodec.__c__16<T>.__9__16_1) == null) { arg_56_1 = (FieldCodec.__c__16<T>.__9__16_1 = new Action<CodedOutputStream, T>(FieldCodec.__c__16<T>.__9.<ForMessage>b__16_1)); } Func<T, int> arg_56_2; if ((arg_56_2 = FieldCodec.__c__16<T>.__9__16_2) == null) { arg_56_2 = (FieldCodec.__c__16<T>.__9__16_2 = new Func<T, int>(FieldCodec.__c__16<T>.__9.<ForMessage>b__16_2)); } return new FieldCodec<T>(arg_56_0, arg_56_1, arg_56_2, tag); } public static FieldCodec<T> ForClassWrapper<T>(uint tag) where T : class { FieldCodec<T> nestedCodec; while (true) { IL_3D: uint arg_25_0 = 32061328u; while (true) { uint num; switch ((num = (arg_25_0 ^ 856689924u)) % 3u) { case 1u: nestedCodec = FieldCodec.WrapperCodecs.GetCodec<T>(); arg_25_0 = (num * 65730384u ^ 3665532353u); continue; case 2u: goto IL_3D; } goto Block_1; } } Block_1: return new FieldCodec<T>((CodedInputStream input) => FieldCodec.WrapperCodecs.Read<T>(input, nestedCodec), delegate(CodedOutputStream output, T value) { FieldCodec.WrapperCodecs.Write<T>(output, value, nestedCodec); }, (T value) => FieldCodec.WrapperCodecs.CalculateSize<T>(value, nestedCodec), tag, default(T)); } public static FieldCodec<T?> ForStructWrapper<T>(uint tag) where T : struct { FieldCodec<T> nestedCodec; while (true) { IL_3D: uint arg_25_0 = 294747616u; while (true) { uint num; switch ((num = (arg_25_0 ^ 212518295u)) % 3u) { case 0u: goto IL_3D; case 1u: nestedCodec = FieldCodec.WrapperCodecs.GetCodec<T>(); arg_25_0 = (num * 2410490597u ^ 1481733282u); continue; } goto Block_1; } } Block_1: return new FieldCodec<T?>((CodedInputStream input) => new T?(FieldCodec.WrapperCodecs.Read<T>(input, nestedCodec)), delegate(CodedOutputStream output, T? value) { FieldCodec.WrapperCodecs.Write<T>(output, value.Value, nestedCodec); }, delegate(T? value) { if (value.HasValue) { return FieldCodec.WrapperCodecs.CalculateSize<T>(value.Value, nestedCodec); } return 0; }, tag, null); } } [ComVisible(true)] public sealed class FieldCodec<T> { private static readonly T DefaultDefault; private readonly Func<CodedInputStream, T> reader; private readonly Action<CodedOutputStream, T> writer; private readonly Func<T, int> sizeCalculator; private readonly uint tag; private readonly int tagSize; private readonly int fixedSize; private readonly T defaultValue; internal Func<T, int> ValueSizeCalculator { get { return this.sizeCalculator; } } internal Action<CodedOutputStream, T> ValueWriter { get { return this.writer; } } internal Func<CodedInputStream, T> ValueReader { get { return this.reader; } } internal int FixedSize { get { return this.fixedSize; } } public uint Tag { get { return this.tag; } } public T DefaultValue { get { return this.defaultValue; } } static FieldCodec() { if (FieldCodec<T>.smethod_0(typeof(T).TypeHandle) == FieldCodec<T>.smethod_0(typeof(string).TypeHandle)) { goto IL_64; } goto IL_9E; uint arg_6E_0; while (true) { IL_69: uint num; switch ((num = (arg_6E_0 ^ 262867608u)) % 6u) { case 0u: goto IL_64; case 1u: FieldCodec<T>.DefaultDefault = (T)((object)""); arg_6E_0 = (num * 866381392u ^ 3422013123u); continue; case 3u: goto IL_9E; case 4u: FieldCodec<T>.DefaultDefault = (T)((object)ByteString.Empty); arg_6E_0 = (num * 860465387u ^ 3234019736u); continue; case 5u: return; } break; } return; IL_64: arg_6E_0 = 1886581677u; goto IL_69; IL_9E: arg_6E_0 = ((FieldCodec<T>.smethod_0(typeof(T).TypeHandle) != FieldCodec<T>.smethod_0(typeof(ByteString).TypeHandle)) ? 1229572486u : 1401307714u); goto IL_69; } private static Func<T, bool> CreateDefaultValueCheck<TTmp>(Func<TTmp, bool> check) { return (Func<T, bool>)check; } internal FieldCodec(Func<CodedInputStream, T> reader, Action<CodedOutputStream, T> writer, Func<T, int> sizeCalculator, uint tag) : this(reader, writer, sizeCalculator, tag, FieldCodec<T>.DefaultDefault) { } internal FieldCodec(Func<CodedInputStream, T> reader, Action<CodedOutputStream, T> writer, Func<T, int> sizeCalculator, uint tag, T defaultValue) { this.reader = reader; this.writer = writer; this.sizeCalculator = sizeCalculator; this.fixedSize = 0; this.tag = tag; this.defaultValue = defaultValue; this.tagSize = CodedOutputStream.ComputeRawVarint32Size(tag); } internal FieldCodec(Func<CodedInputStream, T> reader, Action<CodedOutputStream, T> writer, int fixedSize, uint tag) { while (true) { IL_AF: uint arg_8B_0 = 3017510738u; while (true) { uint num; switch ((num = (arg_8B_0 ^ 2371091461u)) % 6u) { case 0u: this.fixedSize = fixedSize; this.tag = tag; arg_8B_0 = (num * 881978137u ^ 2738852917u); continue; case 1u: this.reader = reader; arg_8B_0 = (num * 1592895491u ^ 2147333601u); continue; case 2u: goto IL_AF; case 3u: this.sizeCalculator = ((T _) => fixedSize); arg_8B_0 = (num * 589634795u ^ 2685589926u); continue; case 5u: this.writer = writer; arg_8B_0 = (num * 2623320235u ^ 1911339515u); continue; } goto Block_1; } } Block_1: this.tagSize = CodedOutputStream.ComputeRawVarint32Size(tag); } public void WriteTagAndValue(CodedOutputStream output, T value) { if (!this.IsDefault(value)) { while (true) { IL_61: uint arg_45_0 = 936461950u; while (true) { uint num; switch ((num = (arg_45_0 ^ 454705023u)) % 4u) { case 0u: goto IL_61; case 1u: output.WriteTag(this.tag); arg_45_0 = (num * 2774526023u ^ 785160222u); continue; case 2u: this.writer(output, value); arg_45_0 = (num * 2200466085u ^ 4240235494u); continue; } goto Block_2; } } Block_2:; } } public T Read(CodedInputStream input) { return this.reader(input); } public int CalculateSizeWithTag(T value) { if (!this.IsDefault(value)) { return this.sizeCalculator(value) + this.tagSize; } return 0; } private bool IsDefault(T value) { return EqualityComparer<T>.Default.Equals(value, this.defaultValue); } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf/ServiceDescriptorProto.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class ServiceDescriptorProto : IMessage<ServiceDescriptorProto>, IEquatable<ServiceDescriptorProto>, IDeepCloneable<ServiceDescriptorProto>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServiceDescriptorProto.__c __9 = new ServiceDescriptorProto.__c(); internal ServiceDescriptorProto cctor>b__34_0() { return new ServiceDescriptorProto(); } } private static readonly MessageParser<ServiceDescriptorProto> _parser = new MessageParser<ServiceDescriptorProto>(new Func<ServiceDescriptorProto>(ServiceDescriptorProto.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int MethodFieldNumber = 2; private static readonly FieldCodec<MethodDescriptorProto> _repeated_method_codec = FieldCodec.ForMessage<MethodDescriptorProto>(18u, MethodDescriptorProto.Parser); private readonly RepeatedField<MethodDescriptorProto> method_ = new RepeatedField<MethodDescriptorProto>(); public const int OptionsFieldNumber = 3; private ServiceOptions options_; public static MessageParser<ServiceDescriptorProto> Parser { get { return ServiceDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return ServiceDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<MethodDescriptorProto> Method { get { return this.method_; } } public ServiceOptions Options { get { return this.options_; } set { this.options_ = value; } } public ServiceDescriptorProto() { } public ServiceDescriptorProto(ServiceDescriptorProto other) : this() { while (true) { IL_62: uint arg_46_0 = 3915433139u; while (true) { uint num; switch ((num = (arg_46_0 ^ 2623770550u)) % 4u) { case 0u: this.method_ = other.method_.Clone(); arg_46_0 = (num * 3572982429u ^ 1534429033u); continue; case 1u: this.name_ = other.name_; arg_46_0 = (num * 3271020854u ^ 1656734284u); continue; case 2u: goto IL_62; } goto Block_1; } } Block_1: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public ServiceDescriptorProto Clone() { return new ServiceDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as ServiceDescriptorProto); } public bool Equals(ServiceDescriptorProto other) { if (other == null) { goto IL_9F; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ 1852889617) % 11) { case 0: goto IL_9F; case 1: goto IL_EF; case 2: return false; case 3: return false; case 4: return true; case 6: arg_A9_0 = (this.method_.Equals(other.method_) ? 623059947 : 625696740); continue; case 7: arg_A9_0 = ((!ServiceDescriptorProto.smethod_1(this.Options, other.Options)) ? 398835058 : 648796043); continue; case 8: return false; case 9: arg_A9_0 = (ServiceDescriptorProto.smethod_0(this.Name, other.Name) ? 1694340483 : 1810479323); continue; case 10: return false; } break; } return true; IL_9F: arg_A9_0 = 2044946979; goto IL_A4; IL_EF: arg_A9_0 = ((other != this) ? 830976242 : 1295161829); goto IL_A4; } public override int GetHashCode() { int num = 1; while (true) { IL_D8: uint arg_B0_0 = 177291415u; while (true) { uint num2; switch ((num2 = (arg_B0_0 ^ 929857437u)) % 7u) { case 0u: num ^= ServiceDescriptorProto.smethod_3(this.Name); arg_B0_0 = (num2 * 2386536750u ^ 2982497503u); continue; case 1u: num ^= ServiceDescriptorProto.smethod_3(this.Options); arg_B0_0 = (num2 * 420513294u ^ 3747168286u); continue; case 3u: arg_B0_0 = (((ServiceDescriptorProto.smethod_2(this.Name) == 0) ? 5405613u : 110106025u) ^ num2 * 2983120147u); continue; case 4u: goto IL_D8; case 5u: num ^= ServiceDescriptorProto.smethod_3(this.method_); arg_B0_0 = 709404783u; continue; case 6u: arg_B0_0 = (((this.options_ == null) ? 1752114704u : 819068229u) ^ num2 * 4221174041u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (ServiceDescriptorProto.smethod_2(this.Name) != 0) { goto IL_79; } goto IL_C2; uint arg_9A_0; while (true) { IL_95: uint num; switch ((num = (arg_9A_0 ^ 532561702u)) % 7u) { case 0u: goto IL_C2; case 2u: output.WriteRawTag(10); arg_9A_0 = (num * 3668039352u ^ 1289889501u); continue; case 3u: goto IL_79; case 4u: output.WriteRawTag(26); output.WriteMessage(this.Options); arg_9A_0 = (num * 906297353u ^ 3698276626u); continue; case 5u: arg_9A_0 = (((this.options_ != null) ? 505584614u : 2043325018u) ^ num * 3095347555u); continue; case 6u: output.WriteString(this.Name); arg_9A_0 = (num * 682150429u ^ 2160442459u); continue; } break; } return; IL_79: arg_9A_0 = 256114714u; goto IL_95; IL_C2: this.method_.WriteTo(output, ServiceDescriptorProto._repeated_method_codec); arg_9A_0 = 2101951229u; goto IL_95; } public int CalculateSize() { int num = 0; while (true) { IL_E4: uint arg_BC_0 = 2304351466u; while (true) { uint num2; switch ((num2 = (arg_BC_0 ^ 2167656146u)) % 7u) { case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_BC_0 = (num2 * 3202721304u ^ 893593654u); continue; case 2u: arg_BC_0 = (((ServiceDescriptorProto.smethod_2(this.Name) != 0) ? 741262376u : 1849360262u) ^ num2 * 1047661160u); continue; case 3u: arg_BC_0 = (((this.options_ != null) ? 3235249978u : 3813721582u) ^ num2 * 3695095661u); continue; case 4u: goto IL_E4; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_BC_0 = (num2 * 794490854u ^ 1837980342u); continue; case 6u: num += this.method_.CalculateSize(ServiceDescriptorProto._repeated_method_codec); arg_BC_0 = 3137531978u; continue; } return num; } } return num; } public void MergeFrom(ServiceDescriptorProto other) { if (other == null) { goto IL_76; } goto IL_10D; uint arg_CD_0; while (true) { IL_C8: uint num; switch ((num = (arg_CD_0 ^ 2883181534u)) % 9u) { case 0u: this.Name = other.Name; arg_CD_0 = (num * 3524469547u ^ 1998055568u); continue; case 1u: this.method_.Add(other.method_); arg_CD_0 = ((other.options_ == null) ? 2612692522u : 2955395459u); continue; case 2u: goto IL_76; case 3u: goto IL_10D; case 4u: arg_CD_0 = (((this.options_ != null) ? 728042495u : 2091950185u) ^ num * 854758425u); continue; case 5u: return; case 6u: this.options_ = new ServiceOptions(); arg_CD_0 = (num * 3112143849u ^ 119982488u); continue; case 8u: this.Options.MergeFrom(other.Options); arg_CD_0 = 2612692522u; continue; } break; } return; IL_76: arg_CD_0 = 3519896567u; goto IL_C8; IL_10D: arg_CD_0 = ((ServiceDescriptorProto.smethod_2(other.Name) != 0) ? 2578254665u : 3159312077u); goto IL_C8; } public void MergeFrom(CodedInputStream input) { while (true) { IL_19C: uint num; uint arg_148_0 = ((num = input.ReadTag()) != 0u) ? 477095729u : 714123276u; while (true) { uint num2; switch ((num2 = (arg_148_0 ^ 1004400636u)) % 14u) { case 0u: arg_148_0 = 477095729u; continue; case 1u: this.Name = input.ReadString(); arg_148_0 = 1611562630u; continue; case 3u: this.method_.AddEntriesFrom(input, ServiceDescriptorProto._repeated_method_codec); arg_148_0 = 34718618u; continue; case 4u: arg_148_0 = (num2 * 2326279954u ^ 1754510403u); continue; case 5u: arg_148_0 = (((num != 18u) ? 1768803414u : 1023665341u) ^ num2 * 1195432452u); continue; case 6u: arg_148_0 = ((this.options_ != null) ? 711282343u : 1389860263u); continue; case 7u: input.ReadMessage(this.options_); arg_148_0 = 1302512855u; continue; case 8u: arg_148_0 = (num2 * 3404951067u ^ 969688597u); continue; case 9u: arg_148_0 = ((num != 10u) ? 426747805u : 1577486525u); continue; case 10u: arg_148_0 = (((num != 26u) ? 4268657928u : 3101548454u) ^ num2 * 971632228u); continue; case 11u: this.options_ = new ServiceOptions(); arg_148_0 = (num2 * 3838711229u ^ 3281683080u); continue; case 12u: input.SkipLastField(); arg_148_0 = (num2 * 2462231960u ^ 1304694775u); continue; case 13u: goto IL_19C; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants/AccountDataMasks.cs using System; namespace Framework.Constants { public enum AccountDataMasks : uint { GlobalCacheMask = 21u, CharacterCacheMask = 239u } } <file_sep>/Google.Protobuf.Reflection/SourceCodeInfo.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class SourceCodeInfo : IMessage, IMessage<SourceCodeInfo>, IEquatable<SourceCodeInfo>, IDeepCloneable<SourceCodeInfo> { [DebuggerNonUserCode] public static class Types { [DebuggerNonUserCode] internal sealed class Location : IMessage, IMessage<SourceCodeInfo.Types.Location>, IEquatable<SourceCodeInfo.Types.Location>, IDeepCloneable<SourceCodeInfo.Types.Location> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SourceCodeInfo.Types.Location.__c __9 = new SourceCodeInfo.Types.Location.__c(); internal SourceCodeInfo.Types.Location cctor>b__44_0() { return new SourceCodeInfo.Types.Location(); } } private static readonly MessageParser<SourceCodeInfo.Types.Location> _parser = new MessageParser<SourceCodeInfo.Types.Location>(new Func<SourceCodeInfo.Types.Location>(SourceCodeInfo.Types.Location.__c.__9.<.cctor>b__44_0)); public const int PathFieldNumber = 1; private static readonly FieldCodec<int> _repeated_path_codec; private readonly RepeatedField<int> path_ = new RepeatedField<int>(); public const int SpanFieldNumber = 2; private static readonly FieldCodec<int> _repeated_span_codec; private readonly RepeatedField<int> span_ = new RepeatedField<int>(); public const int LeadingCommentsFieldNumber = 3; private string leadingComments_ = ""; public const int TrailingCommentsFieldNumber = 4; private string trailingComments_ = ""; public const int LeadingDetachedCommentsFieldNumber = 6; private static readonly FieldCodec<string> _repeated_leadingDetachedComments_codec; private readonly RepeatedField<string> leadingDetachedComments_ = new RepeatedField<string>(); public static MessageParser<SourceCodeInfo.Types.Location> Parser { get { return SourceCodeInfo.Types.Location._parser; } } public static MessageDescriptor Descriptor { get { return SourceCodeInfo.Descriptor.NestedTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return SourceCodeInfo.Types.Location.Descriptor; } } public RepeatedField<int> Path { get { return this.path_; } } public RepeatedField<int> Span { get { return this.span_; } } public string LeadingComments { get { return this.leadingComments_; } set { this.leadingComments_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string TrailingComments { get { return this.trailingComments_; } set { this.trailingComments_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public RepeatedField<string> LeadingDetachedComments { get { return this.leadingDetachedComments_; } } public Location() { } public Location(SourceCodeInfo.Types.Location other) : this() { while (true) { IL_73: uint arg_57_0 = 3153497530u; while (true) { uint num; switch ((num = (arg_57_0 ^ 3289435179u)) % 4u) { case 0u: goto IL_73; case 1u: this.path_ = other.path_.Clone(); this.span_ = other.span_.Clone(); arg_57_0 = (num * 2096723653u ^ 658396857u); continue; case 3u: this.leadingComments_ = other.leadingComments_; arg_57_0 = (num * 931419334u ^ 4195484543u); continue; } goto Block_1; } } Block_1: this.trailingComments_ = other.trailingComments_; this.leadingDetachedComments_ = other.leadingDetachedComments_.Clone(); } public SourceCodeInfo.Types.Location Clone() { return new SourceCodeInfo.Types.Location(this); } public override bool Equals(object other) { return this.Equals(other as SourceCodeInfo.Types.Location); } public bool Equals(SourceCodeInfo.Types.Location other) { if (other == null) { goto IL_47; } goto IL_15D; int arg_107_0; while (true) { IL_102: switch ((arg_107_0 ^ 1099651523) % 15) { case 0: return false; case 1: return false; case 2: return true; case 3: return false; case 4: arg_107_0 = ((!this.path_.Equals(other.path_)) ? 542846911 : 311291481); continue; case 5: arg_107_0 = ((!SourceCodeInfo.Types.Location.smethod_0(this.TrailingComments, other.TrailingComments)) ? 2065850950 : 1609226087); continue; case 6: arg_107_0 = (this.span_.Equals(other.span_) ? 772020775 : 243829541); continue; case 7: return false; case 9: arg_107_0 = (SourceCodeInfo.Types.Location.smethod_0(this.LeadingComments, other.LeadingComments) ? 1091448227 : 208943912); continue; case 10: goto IL_47; case 11: goto IL_15D; case 12: return false; case 13: return false; case 14: arg_107_0 = ((!this.leadingDetachedComments_.Equals(other.leadingDetachedComments_)) ? 872150582 : 1291470615); continue; } break; } return true; IL_47: arg_107_0 = 521157702; goto IL_102; IL_15D: arg_107_0 = ((other == this) ? 273226328 : 1065212888); goto IL_102; } public override int GetHashCode() { int num = 1; while (true) { IL_11E: uint arg_ED_0 = 654438229u; while (true) { uint num2; switch ((num2 = (arg_ED_0 ^ 153121532u)) % 9u) { case 0u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.leadingDetachedComments_); arg_ED_0 = 431439889u; continue; case 1u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.TrailingComments); arg_ED_0 = (num2 * 3407997320u ^ 4289998114u); continue; case 2u: arg_ED_0 = (((SourceCodeInfo.Types.Location.smethod_2(this.LeadingComments) != 0) ? 2557086200u : 2721721143u) ^ num2 * 327053999u); continue; case 3u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.path_); arg_ED_0 = (num2 * 513971317u ^ 91723982u); continue; case 4u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.LeadingComments); arg_ED_0 = (num2 * 3721583087u ^ 1120960189u); continue; case 5u: goto IL_11E; case 6u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.span_); arg_ED_0 = (num2 * 89226662u ^ 3840611997u); continue; case 8u: arg_ED_0 = ((SourceCodeInfo.Types.Location.smethod_2(this.TrailingComments) == 0) ? 540392546u : 727603284u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.path_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_path_codec); this.span_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_span_codec); if (SourceCodeInfo.Types.Location.smethod_2(this.LeadingComments) != 0) { goto IL_64; } goto IL_DC; uint arg_A9_0; while (true) { IL_A4: uint num; switch ((num = (arg_A9_0 ^ 2318686640u)) % 6u) { case 0u: this.leadingDetachedComments_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec); arg_A9_0 = 2710623849u; continue; case 1u: output.WriteRawTag(26); output.WriteString(this.LeadingComments); arg_A9_0 = (num * 1409609262u ^ 2327915758u); continue; case 2u: goto IL_64; case 4u: goto IL_DC; case 5u: output.WriteRawTag(34); output.WriteString(this.TrailingComments); arg_A9_0 = (num * 2709206731u ^ 2005781299u); continue; } break; } return; IL_64: arg_A9_0 = 2152764343u; goto IL_A4; IL_DC: arg_A9_0 = ((SourceCodeInfo.Types.Location.smethod_2(this.TrailingComments) == 0) ? 2774488476u : 2675248797u); goto IL_A4; } public int CalculateSize() { int num = 0; while (true) { IL_112: uint arg_E6_0 = 3523705712u; while (true) { uint num2; switch ((num2 = (arg_E6_0 ^ 3089949609u)) % 8u) { case 0u: goto IL_112; case 1u: num += this.path_.CalculateSize(SourceCodeInfo.Types.Location._repeated_path_codec); arg_E6_0 = (num2 * 2271461720u ^ 2144918575u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.TrailingComments); arg_E6_0 = (num2 * 1150603920u ^ 4113252179u); continue; case 4u: arg_E6_0 = (((SourceCodeInfo.Types.Location.smethod_2(this.LeadingComments) != 0) ? 2475093608u : 4121376746u) ^ num2 * 1363156795u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.LeadingComments); arg_E6_0 = (num2 * 1965598942u ^ 1997466504u); continue; case 6u: num += this.span_.CalculateSize(SourceCodeInfo.Types.Location._repeated_span_codec); arg_E6_0 = (num2 * 2570412302u ^ 387008177u); continue; case 7u: arg_E6_0 = ((SourceCodeInfo.Types.Location.smethod_2(this.TrailingComments) != 0) ? 3349412114u : 2980270179u); continue; } goto Block_3; } } Block_3: return num + this.leadingDetachedComments_.CalculateSize(SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec); } public void MergeFrom(SourceCodeInfo.Types.Location other) { if (other == null) { goto IL_3E; } goto IL_E8; uint arg_B7_0; while (true) { IL_B2: uint num; switch ((num = (arg_B7_0 ^ 1503518762u)) % 9u) { case 0u: arg_B7_0 = (((SourceCodeInfo.Types.Location.smethod_2(other.LeadingComments) != 0) ? 2026406776u : 517504125u) ^ num * 3536642534u); continue; case 1u: arg_B7_0 = ((SourceCodeInfo.Types.Location.smethod_2(other.TrailingComments) != 0) ? 1832893644u : 34458745u); continue; case 2u: this.TrailingComments = other.TrailingComments; arg_B7_0 = (num * 4116098684u ^ 788569873u); continue; case 3u: goto IL_E8; case 4u: goto IL_3E; case 5u: return; case 6u: this.LeadingComments = other.LeadingComments; arg_B7_0 = (num * 79346819u ^ 562585227u); continue; case 8u: this.leadingDetachedComments_.Add(other.leadingDetachedComments_); arg_B7_0 = 1893843889u; continue; } break; } return; IL_3E: arg_B7_0 = 574794882u; goto IL_B2; IL_E8: this.path_.Add(other.path_); this.span_.Add(other.span_); arg_B7_0 = 2146525738u; goto IL_B2; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2E1: uint num; uint arg_265_0 = ((num = input.ReadTag()) == 0u) ? 1483763457u : 1479001340u; while (true) { uint num2; switch ((num2 = (arg_265_0 ^ 107348929u)) % 24u) { case 0u: arg_265_0 = ((num != 34u) ? 79836670u : 1505574110u); continue; case 1u: arg_265_0 = (((num != 26u) ? 3034790919u : 3782532919u) ^ num2 * 3794944720u); continue; case 2u: arg_265_0 = (num2 * 3436949538u ^ 1539315321u); continue; case 3u: arg_265_0 = (num2 * 1943314891u ^ 4211913218u); continue; case 4u: arg_265_0 = (((num != 8u) ? 2110742302u : 97112772u) ^ num2 * 223217767u); continue; case 5u: arg_265_0 = ((num <= 16u) ? 299304101u : 473983375u); continue; case 6u: this.LeadingComments = input.ReadString(); arg_265_0 = 1899788459u; continue; case 7u: arg_265_0 = (((num == 50u) ? 1754901085u : 1306296549u) ^ num2 * 3982955352u); continue; case 9u: this.path_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_path_codec); arg_265_0 = 890139260u; continue; case 10u: arg_265_0 = 1479001340u; continue; case 11u: arg_265_0 = (((num == 10u) ? 2564194827u : 2221768939u) ^ num2 * 3362498737u); continue; case 12u: input.SkipLastField(); arg_265_0 = 1315759386u; continue; case 13u: arg_265_0 = (num2 * 1292842976u ^ 2681886923u); continue; case 14u: arg_265_0 = ((num <= 26u) ? 1269126566u : 1718077737u); continue; case 15u: this.TrailingComments = input.ReadString(); arg_265_0 = 1077808276u; continue; case 16u: this.span_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_span_codec); arg_265_0 = 686456162u; continue; case 17u: arg_265_0 = (((num != 16u) ? 2552558833u : 3550599379u) ^ num2 * 3198891354u); continue; case 18u: goto IL_2E1; case 19u: arg_265_0 = (num2 * 679341760u ^ 2777545963u); continue; case 20u: this.leadingDetachedComments_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec); arg_265_0 = 1899788459u; continue; case 21u: arg_265_0 = (num2 * 2009467264u ^ 3530809131u); continue; case 22u: arg_265_0 = (num2 * 212837685u ^ 1746765123u); continue; case 23u: arg_265_0 = (((num == 18u) ? 572319557u : 1257503828u) ^ num2 * 22004932u); continue; } return; } } } static Location() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_7D: uint arg_61_0 = 3312851954u; while (true) { uint num; switch ((num = (arg_61_0 ^ 3421084927u)) % 4u) { case 0u: SourceCodeInfo.Types.Location._repeated_span_codec = FieldCodec.ForInt32(18u); SourceCodeInfo.Types.Location._repeated_leadingDetachedComments_codec = FieldCodec.ForString(50u); arg_61_0 = (num * 3524145418u ^ 1786628465u); continue; case 1u: SourceCodeInfo.Types.Location._repeated_path_codec = FieldCodec.ForInt32(10u); arg_61_0 = (num * 3025576672u ^ 2268289631u); continue; case 3u: goto IL_7D; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SourceCodeInfo.__c __9 = new SourceCodeInfo.__c(); internal SourceCodeInfo cctor>b__25_0() { return new SourceCodeInfo(); } } private static readonly MessageParser<SourceCodeInfo> _parser = new MessageParser<SourceCodeInfo>(new Func<SourceCodeInfo>(SourceCodeInfo.__c.__9.<.cctor>b__25_0)); public const int LocationFieldNumber = 1; private static readonly FieldCodec<SourceCodeInfo.Types.Location> _repeated_location_codec = FieldCodec.ForMessage<SourceCodeInfo.Types.Location>(10u, SourceCodeInfo.Types.Location.Parser); private readonly RepeatedField<SourceCodeInfo.Types.Location> location_ = new RepeatedField<SourceCodeInfo.Types.Location>(); public static MessageParser<SourceCodeInfo> Parser { get { return SourceCodeInfo._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[17]; } } MessageDescriptor IMessage.Descriptor { get { return SourceCodeInfo.Descriptor; } } public RepeatedField<SourceCodeInfo.Types.Location> Location { get { return this.location_; } } public SourceCodeInfo() { } public SourceCodeInfo(SourceCodeInfo other) : this() { this.location_ = other.location_.Clone(); } public SourceCodeInfo Clone() { return new SourceCodeInfo(this); } public override bool Equals(object other) { return this.Equals(other as SourceCodeInfo); } public bool Equals(SourceCodeInfo other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -532956177) % 7) { case 0: goto IL_3E; case 1: return true; case 2: arg_48_0 = (this.location_.Equals(other.location_) ? -1929615000 : -1746326698); continue; case 3: return false; case 5: return false; case 6: goto IL_7A; } break; } return true; IL_3E: arg_48_0 = -1621297987; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1440105885 : -1820910294); goto IL_43; } public override int GetHashCode() { return 1 ^ SourceCodeInfo.smethod_0(this.location_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.location_.WriteTo(output, SourceCodeInfo._repeated_location_codec); } public int CalculateSize() { return 0 + this.location_.CalculateSize(SourceCodeInfo._repeated_location_codec); } public void MergeFrom(SourceCodeInfo other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -1087798744; IL_08: switch ((arg_0D_0 ^ -1945718335) % 4) { case 0: goto IL_03; case 1: return; case 3: IL_27: this.location_.Add(other.location_); arg_0D_0 = -2129871437; goto IL_08; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) == 0u) ? 876340576u : 74489794u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 445779342u)) % 7u) { case 0u: input.SkipLastField(); arg_77_0 = (num2 * 3223753206u ^ 369690539u); continue; case 1u: arg_77_0 = ((num != 10u) ? 649945809u : 1536851786u); continue; case 2u: arg_77_0 = 74489794u; continue; case 4u: goto IL_AE; case 5u: this.location_.AddEntriesFrom(input, SourceCodeInfo._repeated_location_codec); arg_77_0 = 60810056u; continue; case 6u: arg_77_0 = (num2 * 1441373103u ^ 2985009577u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/AddMemberRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class AddMemberRequest : IMessage<AddMemberRequest>, IEquatable<AddMemberRequest>, IDeepCloneable<AddMemberRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AddMemberRequest.__c __9 = new AddMemberRequest.__c(); internal AddMemberRequest cctor>b__44_0() { return new AddMemberRequest(); } } private static readonly MessageParser<AddMemberRequest> _parser = new MessageParser<AddMemberRequest>(new Func<AddMemberRequest>(AddMemberRequest.__c.__9.<.cctor>b__44_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MemberIdentityFieldNumber = 2; private Identity memberIdentity_; public const int MemberStateFieldNumber = 3; private MemberState memberState_; public const int ObjectIdFieldNumber = 4; private ulong objectId_; public const int SubscribeFieldNumber = 5; private bool subscribe_; public static MessageParser<AddMemberRequest> Parser { get { return AddMemberRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return AddMemberRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public Identity MemberIdentity { get { return this.memberIdentity_; } set { this.memberIdentity_ = value; } } public MemberState MemberState { get { return this.memberState_; } set { this.memberState_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public bool Subscribe { get { return this.subscribe_; } set { this.subscribe_ = value; } } public AddMemberRequest() { } public AddMemberRequest(AddMemberRequest other) : this() { while (true) { IL_C2: uint arg_9E_0 = 4199530086u; while (true) { uint num; switch ((num = (arg_9E_0 ^ 2463711453u)) % 6u) { case 0u: goto IL_C2; case 1u: this.MemberIdentity = ((other.memberIdentity_ != null) ? other.MemberIdentity.Clone() : null); arg_9E_0 = 2999657564u; continue; case 3u: this.MemberState = ((other.memberState_ != null) ? other.MemberState.Clone() : null); this.objectId_ = other.objectId_; arg_9E_0 = 2964175625u; continue; case 4u: this.subscribe_ = other.subscribe_; arg_9E_0 = (num * 2500937776u ^ 3020702041u); continue; case 5u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_9E_0 = 3303005976u; continue; } return; } } } public AddMemberRequest Clone() { return new AddMemberRequest(this); } public override bool Equals(object other) { return this.Equals(other as AddMemberRequest); } public bool Equals(AddMemberRequest other) { if (other == null) { goto IL_F0; } goto IL_150; int arg_FA_0; while (true) { IL_F5: switch ((arg_FA_0 ^ -1463370366) % 15) { case 0: goto IL_F0; case 1: return false; case 2: return false; case 3: return false; case 4: goto IL_150; case 5: arg_FA_0 = (AddMemberRequest.smethod_0(this.MemberIdentity, other.MemberIdentity) ? -1028416299 : -1817098158); continue; case 6: return false; case 7: arg_FA_0 = ((this.Subscribe != other.Subscribe) ? -1488586723 : -793323907); continue; case 8: return false; case 10: arg_FA_0 = ((this.ObjectId != other.ObjectId) ? -661804099 : -2132724780); continue; case 11: arg_FA_0 = ((!AddMemberRequest.smethod_0(this.AgentId, other.AgentId)) ? -1226450445 : -1354017406); continue; case 12: return true; case 13: arg_FA_0 = (AddMemberRequest.smethod_0(this.MemberState, other.MemberState) ? -389696256 : -1472451839); continue; case 14: return false; } break; } return true; IL_F0: arg_FA_0 = -80871651; goto IL_F5; IL_150: arg_FA_0 = ((other != this) ? -638530721 : -1246317582); goto IL_F5; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_CA; } goto IL_100; uint arg_D4_0; while (true) { IL_CF: uint num2; switch ((num2 = (arg_D4_0 ^ 4077004151u)) % 8u) { case 0u: goto IL_CA; case 1u: goto IL_100; case 2u: arg_D4_0 = ((!this.Subscribe) ? 3097673776u : 2743228468u); continue; case 3u: num ^= this.Subscribe.GetHashCode(); arg_D4_0 = (num2 * 2284038362u ^ 795173694u); continue; case 4u: num ^= AddMemberRequest.smethod_1(this.MemberState); arg_D4_0 = (((this.ObjectId != 0uL) ? 774594277u : 542021297u) ^ num2 * 4216593201u); continue; case 5u: num ^= AddMemberRequest.smethod_1(this.AgentId); arg_D4_0 = (num2 * 792477970u ^ 3460712012u); continue; case 6u: num ^= this.ObjectId.GetHashCode(); arg_D4_0 = (num2 * 671531449u ^ 595499571u); continue; } break; } return num; IL_CA: arg_D4_0 = 2432507834u; goto IL_CF; IL_100: num ^= AddMemberRequest.smethod_1(this.MemberIdentity); arg_D4_0 = 3612315915u; goto IL_CF; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_80; } goto IL_11C; uint arg_EB_0; while (true) { IL_E6: uint num; switch ((num = (arg_EB_0 ^ 950128983u)) % 9u) { case 0u: output.WriteMessage(this.MemberState); arg_EB_0 = (num * 2127887172u ^ 1999254983u); continue; case 1u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_EB_0 = (num * 2896687767u ^ 17973319u); continue; case 2u: goto IL_11C; case 3u: output.WriteRawTag(32); output.WriteUInt64(this.ObjectId); arg_EB_0 = (num * 4180436527u ^ 1172770194u); continue; case 4u: goto IL_80; case 5u: arg_EB_0 = ((!this.Subscribe) ? 1358532228u : 1600741311u); continue; case 7u: arg_EB_0 = (((this.ObjectId != 0uL) ? 2151069278u : 2301379765u) ^ num * 4134163416u); continue; case 8u: output.WriteRawTag(40); output.WriteBool(this.Subscribe); arg_EB_0 = (num * 2543029296u ^ 1509958916u); continue; } break; } return; IL_80: arg_EB_0 = 202131074u; goto IL_E6; IL_11C: output.WriteRawTag(18); output.WriteMessage(this.MemberIdentity); output.WriteRawTag(26); arg_EB_0 = 136643094u; goto IL_E6; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_25; } goto IL_10D; uint arg_DC_0; while (true) { IL_D7: uint num2; switch ((num2 = (arg_DC_0 ^ 3536497418u)) % 9u) { case 0u: arg_DC_0 = ((!this.Subscribe) ? 3767949233u : 3188609461u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_DC_0 = (num2 * 2197476750u ^ 2671605598u); continue; case 2u: arg_DC_0 = (((this.ObjectId == 0uL) ? 3786373400u : 3077605362u) ^ num2 * 1134939575u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_DC_0 = (num2 * 3369199893u ^ 2321647504u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.MemberState); arg_DC_0 = (num2 * 551273994u ^ 695132476u); continue; case 5u: goto IL_10D; case 6u: goto IL_25; case 7u: num += 2; arg_DC_0 = (num2 * 589679588u ^ 2353631405u); continue; } break; } return num; IL_25: arg_DC_0 = 3441522556u; goto IL_D7; IL_10D: num += 1 + CodedOutputStream.ComputeMessageSize(this.MemberIdentity); arg_DC_0 = 3017059907u; goto IL_D7; } public void MergeFrom(AddMemberRequest other) { if (other == null) { goto IL_188; } goto IL_279; uint arg_211_0; while (true) { IL_20C: uint num; switch ((num = (arg_211_0 ^ 2052682461u)) % 19u) { case 0u: arg_211_0 = (((this.memberState_ == null) ? 1565603552u : 370065611u) ^ num * 2747308528u); continue; case 1u: this.Subscribe = other.Subscribe; arg_211_0 = (num * 4268931568u ^ 3029951486u); continue; case 2u: this.memberState_ = new MemberState(); arg_211_0 = (num * 3219484646u ^ 1939053877u); continue; case 3u: arg_211_0 = ((other.ObjectId == 0uL) ? 128639170u : 758551176u); continue; case 4u: goto IL_188; case 5u: this.MemberState.MergeFrom(other.MemberState); arg_211_0 = 116563233u; continue; case 6u: arg_211_0 = (((this.agentId_ != null) ? 4055168835u : 3440704929u) ^ num * 2793921173u); continue; case 7u: return; case 8u: this.agentId_ = new EntityId(); arg_211_0 = (num * 863328188u ^ 2991313252u); continue; case 9u: arg_211_0 = ((other.memberIdentity_ == null) ? 894764752u : 957869894u); continue; case 10u: this.AgentId.MergeFrom(other.AgentId); arg_211_0 = 1376955000u; continue; case 11u: this.memberIdentity_ = new Identity(); arg_211_0 = (num * 1849129419u ^ 2262866658u); continue; case 12u: goto IL_279; case 13u: this.MemberIdentity.MergeFrom(other.MemberIdentity); arg_211_0 = 894764752u; continue; case 14u: arg_211_0 = (((this.memberIdentity_ == null) ? 2737729289u : 2663897074u) ^ num * 404005354u); continue; case 15u: arg_211_0 = (other.Subscribe ? 802581312u : 2030902222u); continue; case 16u: this.ObjectId = other.ObjectId; arg_211_0 = (num * 1639626544u ^ 2528260658u); continue; case 17u: arg_211_0 = ((other.memberState_ == null) ? 116563233u : 2026546586u); continue; } break; } return; IL_188: arg_211_0 = 1307486605u; goto IL_20C; IL_279: arg_211_0 = ((other.agentId_ == null) ? 1376955000u : 833098826u); goto IL_20C; } public void MergeFrom(CodedInputStream input) { while (true) { IL_313: uint num; uint arg_28F_0 = ((num = input.ReadTag()) != 0u) ? 4044857384u : 3188450149u; while (true) { uint num2; switch ((num2 = (arg_28F_0 ^ 3450192181u)) % 26u) { case 0u: this.Subscribe = input.ReadBool(); arg_28F_0 = 3908897725u; continue; case 1u: arg_28F_0 = ((num <= 18u) ? 3643332990u : 2148535249u); continue; case 2u: arg_28F_0 = (num2 * 67528310u ^ 1014273677u); continue; case 3u: arg_28F_0 = 4044857384u; continue; case 4u: this.ObjectId = input.ReadUInt64(); arg_28F_0 = 3908897725u; continue; case 5u: input.ReadMessage(this.memberIdentity_); arg_28F_0 = 2871858045u; continue; case 6u: goto IL_313; case 7u: arg_28F_0 = ((this.memberState_ != null) ? 2184772726u : 3896127464u); continue; case 8u: this.agentId_ = new EntityId(); arg_28F_0 = (num2 * 2845939304u ^ 2441373573u); continue; case 9u: input.ReadMessage(this.memberState_); arg_28F_0 = 2562854363u; continue; case 10u: arg_28F_0 = (((num == 18u) ? 3160819718u : 2502408746u) ^ num2 * 1615286741u); continue; case 11u: arg_28F_0 = (((num == 40u) ? 890523941u : 234865853u) ^ num2 * 2892750678u); continue; case 12u: input.SkipLastField(); arg_28F_0 = 2942753811u; continue; case 13u: arg_28F_0 = (num2 * 330336019u ^ 2574405672u); continue; case 14u: arg_28F_0 = ((num != 26u) ? 3381744572u : 4228047026u); continue; case 15u: arg_28F_0 = (num2 * 529335448u ^ 2154970399u); continue; case 16u: input.ReadMessage(this.agentId_); arg_28F_0 = 3313196674u; continue; case 17u: this.memberState_ = new MemberState(); arg_28F_0 = (num2 * 1058249188u ^ 3080793506u); continue; case 18u: arg_28F_0 = ((this.agentId_ != null) ? 3232505797u : 3884079645u); continue; case 19u: arg_28F_0 = (((num == 10u) ? 190592725u : 405607525u) ^ num2 * 1172827208u); continue; case 20u: arg_28F_0 = (num2 * 446623897u ^ 597229579u); continue; case 21u: this.memberIdentity_ = new Identity(); arg_28F_0 = (num2 * 1508193639u ^ 453540233u); continue; case 23u: arg_28F_0 = ((this.memberIdentity_ != null) ? 2454435738u : 3551619904u); continue; case 24u: arg_28F_0 = (num2 * 1210349602u ^ 699255841u); continue; case 25u: arg_28F_0 = (((num != 32u) ? 1309180414u : 1814013509u) ^ num2 * 3118835236u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.WorldEntities/PlayerSpell.cs using System; using System.Runtime.Serialization; namespace AuthServer.Game.WorldEntities { [DataContract] [Serializable] public class PlayerSpell { [DataMember] public uint SpellId; [DataMember] public PlayerSpellState State; [DataMember] public bool Active; [DataMember] public bool Dependent; [DataMember] public bool Disabled; } } <file_sep>/Bgs.Protocol.Account.V1/GameSessionInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameSessionInfo : IMessage<GameSessionInfo>, IEquatable<GameSessionInfo>, IDeepCloneable<GameSessionInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameSessionInfo.__c __9 = new GameSessionInfo.__c(); internal GameSessionInfo cctor>b__49_0() { return new GameSessionInfo(); } } private static readonly MessageParser<GameSessionInfo> _parser = new MessageParser<GameSessionInfo>(new Func<GameSessionInfo>(GameSessionInfo.__c.__9.<.cctor>b__49_0)); public const int StartTimeFieldNumber = 3; private uint startTime_; public const int LocationFieldNumber = 4; private GameSessionLocation location_; public const int HasBenefactorFieldNumber = 5; private bool hasBenefactor_; public const int IsUsingIgrFieldNumber = 6; private bool isUsingIgr_; public const int ParentalControlsActiveFieldNumber = 7; private bool parentalControlsActive_; public const int StartTimeSecFieldNumber = 8; private ulong startTimeSec_; public static MessageParser<GameSessionInfo> Parser { get { return GameSessionInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[26]; } } MessageDescriptor IMessage.Descriptor { get { return GameSessionInfo.Descriptor; } } [Obsolete] public uint StartTime { get { return this.startTime_; } set { this.startTime_ = value; } } public GameSessionLocation Location { get { return this.location_; } set { this.location_ = value; } } public bool HasBenefactor { get { return this.hasBenefactor_; } set { this.hasBenefactor_ = value; } } public bool IsUsingIgr { get { return this.isUsingIgr_; } set { this.isUsingIgr_ = value; } } public bool ParentalControlsActive { get { return this.parentalControlsActive_; } set { this.parentalControlsActive_ = value; } } public ulong StartTimeSec { get { return this.startTimeSec_; } set { this.startTimeSec_ = value; } } public GameSessionInfo() { } public GameSessionInfo(GameSessionInfo other) : this() { while (true) { IL_D1: uint arg_A9_0 = 2466125595u; while (true) { uint num; switch ((num = (arg_A9_0 ^ 2256340435u)) % 7u) { case 0u: this.Location = ((other.location_ != null) ? other.Location.Clone() : null); arg_A9_0 = 3207309205u; continue; case 1u: this.startTime_ = other.startTime_; arg_A9_0 = (num * 751576854u ^ 2949448514u); continue; case 2u: this.hasBenefactor_ = other.hasBenefactor_; arg_A9_0 = (num * 2254480915u ^ 659429534u); continue; case 3u: goto IL_D1; case 4u: this.parentalControlsActive_ = other.parentalControlsActive_; this.startTimeSec_ = other.startTimeSec_; arg_A9_0 = (num * 2969300772u ^ 83680636u); continue; case 6u: this.isUsingIgr_ = other.isUsingIgr_; arg_A9_0 = (num * 862522026u ^ 3976954002u); continue; } return; } } } public GameSessionInfo Clone() { return new GameSessionInfo(this); } public override bool Equals(object other) { return this.Equals(other as GameSessionInfo); } public bool Equals(GameSessionInfo other) { if (other == null) { goto IL_C2; } goto IL_178; int arg_11A_0; while (true) { IL_115: switch ((arg_11A_0 ^ -881759902) % 17) { case 0: return false; case 1: arg_11A_0 = ((this.StartTimeSec != other.StartTimeSec) ? -1924195991 : -1411981080); continue; case 2: return false; case 3: return false; case 4: arg_11A_0 = ((this.ParentalControlsActive == other.ParentalControlsActive) ? -1831971842 : -648776736); continue; case 5: goto IL_C2; case 6: return false; case 7: return false; case 8: arg_11A_0 = ((this.IsUsingIgr == other.IsUsingIgr) ? -847152965 : -2119108665); continue; case 9: goto IL_178; case 10: return false; case 12: return false; case 13: return true; case 14: arg_11A_0 = ((this.StartTime == other.StartTime) ? -1424480500 : -666611259); continue; case 15: arg_11A_0 = (GameSessionInfo.smethod_0(this.Location, other.Location) ? -1105559243 : -1493566709); continue; case 16: arg_11A_0 = ((this.HasBenefactor != other.HasBenefactor) ? -1498592535 : -233535686); continue; } break; } return true; IL_C2: arg_11A_0 = -65926048; goto IL_115; IL_178: arg_11A_0 = ((other != this) ? -472125137 : -1912136655); goto IL_115; } public override int GetHashCode() { int num = 1; if (this.StartTime != 0u) { goto IL_15A; } goto IL_1D6; uint arg_185_0; while (true) { IL_180: uint num2; switch ((num2 = (arg_185_0 ^ 2077524348u)) % 13u) { case 0u: arg_185_0 = (this.ParentalControlsActive ? 526798160u : 478303397u); continue; case 1u: goto IL_1D6; case 3u: goto IL_15A; case 4u: arg_185_0 = (this.IsUsingIgr ? 901651707u : 2089751454u); continue; case 5u: num ^= this.ParentalControlsActive.GetHashCode(); arg_185_0 = (num2 * 75185912u ^ 3209569797u); continue; case 6u: num ^= this.StartTimeSec.GetHashCode(); arg_185_0 = (num2 * 3316906704u ^ 1529123188u); continue; case 7u: num ^= this.IsUsingIgr.GetHashCode(); arg_185_0 = (num2 * 2171780115u ^ 909756059u); continue; case 8u: num ^= this.Location.GetHashCode(); arg_185_0 = (num2 * 3662210957u ^ 3050357849u); continue; case 9u: num ^= this.StartTime.GetHashCode(); arg_185_0 = (num2 * 2773441531u ^ 1159740793u); continue; case 10u: arg_185_0 = (this.HasBenefactor ? 348721731u : 306583131u); continue; case 11u: num ^= this.HasBenefactor.GetHashCode(); arg_185_0 = (num2 * 3490595513u ^ 998355164u); continue; case 12u: arg_185_0 = ((this.StartTimeSec == 0uL) ? 2092041700u : 167187185u); continue; } break; } return num; IL_15A: arg_185_0 = 224462535u; goto IL_180; IL_1D6: arg_185_0 = ((this.location_ != null) ? 2057830158u : 303384211u); goto IL_180; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.StartTime != 0u) { goto IL_195; } goto IL_237; uint arg_1D7_0; while (true) { IL_1D2: uint num; switch ((num = (arg_1D7_0 ^ 2545468575u)) % 17u) { case 1u: output.WriteRawTag(48); arg_1D7_0 = (num * 1711086609u ^ 904847255u); continue; case 2u: arg_1D7_0 = ((!this.IsUsingIgr) ? 2158444164u : 3160019014u); continue; case 3u: goto IL_195; case 4u: output.WriteRawTag(56); output.WriteBool(this.ParentalControlsActive); arg_1D7_0 = (num * 833830620u ^ 3845757580u); continue; case 5u: output.WriteBool(this.HasBenefactor); arg_1D7_0 = (num * 3727423305u ^ 3409686278u); continue; case 6u: arg_1D7_0 = ((this.StartTimeSec == 0uL) ? 4054988565u : 3673362188u); continue; case 7u: output.WriteBool(this.IsUsingIgr); arg_1D7_0 = (num * 327577756u ^ 282560920u); continue; case 8u: arg_1D7_0 = ((!this.ParentalControlsActive) ? 2326364716u : 2453741447u); continue; case 9u: output.WriteRawTag(64); arg_1D7_0 = (num * 364958602u ^ 2054366896u); continue; case 10u: output.WriteRawTag(24); output.WriteUInt32(this.StartTime); arg_1D7_0 = (num * 435244820u ^ 2904108204u); continue; case 11u: arg_1D7_0 = (this.HasBenefactor ? 3996731400u : 3188045803u); continue; case 12u: output.WriteUInt64(this.StartTimeSec); arg_1D7_0 = (num * 4186789296u ^ 3974842277u); continue; case 13u: goto IL_237; case 14u: output.WriteRawTag(40); arg_1D7_0 = (num * 1430210595u ^ 1304483007u); continue; case 15u: output.WriteRawTag(34); arg_1D7_0 = (num * 426153255u ^ 3019981962u); continue; case 16u: output.WriteMessage(this.Location); arg_1D7_0 = (num * 3038145145u ^ 2759452002u); continue; } break; } return; IL_195: arg_1D7_0 = 3908530560u; goto IL_1D2; IL_237: arg_1D7_0 = ((this.location_ == null) ? 4095389818u : 3364794228u); goto IL_1D2; } public int CalculateSize() { int num = 0; if (this.StartTime != 0u) { goto IL_89; } goto IL_1A2; uint arg_152_0; while (true) { IL_14D: uint num2; switch ((num2 = (arg_152_0 ^ 4074447919u)) % 13u) { case 0u: num += 2; arg_152_0 = (num2 * 4288360532u ^ 2554675765u); continue; case 1u: goto IL_1A2; case 2u: arg_152_0 = ((!this.ParentalControlsActive) ? 3668875617u : 3877456878u); continue; case 4u: num += 2; arg_152_0 = (num2 * 3929447783u ^ 3820533381u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Location); arg_152_0 = (num2 * 1672690303u ^ 772324653u); continue; case 6u: num += 2; arg_152_0 = (num2 * 2836787885u ^ 3867388207u); continue; case 7u: arg_152_0 = ((!this.HasBenefactor) ? 2766230351u : 2180754383u); continue; case 8u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.StartTimeSec); arg_152_0 = (num2 * 1312749062u ^ 2305594532u); continue; case 9u: goto IL_89; case 10u: arg_152_0 = (this.IsUsingIgr ? 2382441205u : 3211468083u); continue; case 11u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.StartTime); arg_152_0 = (num2 * 405046287u ^ 2707719797u); continue; case 12u: arg_152_0 = ((this.StartTimeSec == 0uL) ? 3313935936u : 3608393993u); continue; } break; } return num; IL_89: arg_152_0 = 2673973251u; goto IL_14D; IL_1A2: arg_152_0 = ((this.location_ != null) ? 4238284972u : 2887782352u); goto IL_14D; } public void MergeFrom(GameSessionInfo other) { if (other == null) { goto IL_C8; } goto IL_227; uint arg_1C7_0; while (true) { IL_1C2: uint num; switch ((num = (arg_1C7_0 ^ 2478443145u)) % 17u) { case 0u: arg_1C7_0 = (other.HasBenefactor ? 3129099187u : 2454844683u); continue; case 1u: goto IL_227; case 2u: this.StartTimeSec = other.StartTimeSec; arg_1C7_0 = (num * 3248737853u ^ 432147070u); continue; case 3u: arg_1C7_0 = ((other.StartTimeSec == 0uL) ? 3377658018u : 3189170821u); continue; case 4u: this.location_ = new GameSessionLocation(); arg_1C7_0 = (num * 3202527743u ^ 3361131669u); continue; case 5u: return; case 6u: this.ParentalControlsActive = other.ParentalControlsActive; arg_1C7_0 = (num * 1377661240u ^ 599237339u); continue; case 7u: this.HasBenefactor = other.HasBenefactor; arg_1C7_0 = (num * 2584353663u ^ 2964882637u); continue; case 8u: this.StartTime = other.StartTime; arg_1C7_0 = (num * 2876987004u ^ 2312841249u); continue; case 9u: arg_1C7_0 = ((!other.IsUsingIgr) ? 3096597887u : 2524885574u); continue; case 10u: goto IL_C8; case 11u: this.Location.MergeFrom(other.Location); arg_1C7_0 = 2408391789u; continue; case 13u: arg_1C7_0 = ((other.location_ != null) ? 3197541954u : 2408391789u); continue; case 14u: this.IsUsingIgr = other.IsUsingIgr; arg_1C7_0 = (num * 2430292147u ^ 3018898882u); continue; case 15u: arg_1C7_0 = (((this.location_ != null) ? 814264011u : 1217490735u) ^ num * 2481307998u); continue; case 16u: arg_1C7_0 = ((!other.ParentalControlsActive) ? 2829763379u : 2443329138u); continue; } break; } return; IL_C8: arg_1C7_0 = 4214642525u; goto IL_1C2; IL_227: arg_1C7_0 = ((other.StartTime != 0u) ? 3225533561u : 4218033249u); goto IL_1C2; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2C8: uint num; uint arg_24C_0 = ((num = input.ReadTag()) != 0u) ? 2348574651u : 2508065388u; while (true) { uint num2; switch ((num2 = (arg_24C_0 ^ 3446334145u)) % 24u) { case 0u: arg_24C_0 = 2348574651u; continue; case 1u: arg_24C_0 = (num2 * 1307209329u ^ 1787694676u); continue; case 2u: input.ReadMessage(this.location_); arg_24C_0 = 3563601434u; continue; case 3u: arg_24C_0 = ((num == 48u) ? 2913512536u : 4112710726u); continue; case 4u: arg_24C_0 = ((this.location_ != null) ? 2793791091u : 2162992121u); continue; case 5u: arg_24C_0 = (num2 * 1673357506u ^ 1414583619u); continue; case 6u: arg_24C_0 = (num2 * 1698109597u ^ 148167027u); continue; case 7u: arg_24C_0 = (((num != 40u) ? 2571002761u : 2355584816u) ^ num2 * 3417564307u); continue; case 8u: this.location_ = new GameSessionLocation(); arg_24C_0 = (num2 * 1489011032u ^ 3515252019u); continue; case 9u: arg_24C_0 = (((num != 24u) ? 295738606u : 984138907u) ^ num2 * 822642700u); continue; case 10u: arg_24C_0 = ((num <= 40u) ? 2230334016u : 2924408690u); continue; case 11u: arg_24C_0 = (((num == 34u) ? 4177981163u : 2361545672u) ^ num2 * 1703345770u); continue; case 12u: this.HasBenefactor = input.ReadBool(); arg_24C_0 = 3977733200u; continue; case 13u: arg_24C_0 = (num2 * 917512504u ^ 3278835149u); continue; case 14u: this.StartTime = input.ReadUInt32(); arg_24C_0 = 2387262037u; continue; case 15u: this.StartTimeSec = input.ReadUInt64(); arg_24C_0 = 2387262037u; continue; case 16u: input.SkipLastField(); arg_24C_0 = 2934790292u; continue; case 17u: this.IsUsingIgr = input.ReadBool(); arg_24C_0 = 3784516895u; continue; case 18u: arg_24C_0 = (((num == 64u) ? 1531667984u : 884133415u) ^ num2 * 2993297395u); continue; case 19u: arg_24C_0 = (num2 * 28707751u ^ 3242705288u); continue; case 20u: goto IL_2C8; case 22u: this.ParentalControlsActive = input.ReadBool(); arg_24C_0 = 2387262037u; continue; case 23u: arg_24C_0 = (((num == 56u) ? 272402413u : 101972041u) ^ num2 * 1192989838u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } } } <file_sep>/Framework.Misc/HttpRequest.cs using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; namespace Framework.Misc { public class HttpRequest { public static HttpHeader Parse(byte[] data) { Dictionary<string, object> dictionary = new Dictionary<string, object>(); HttpHeader httpHeader; while (true) { IL_3A: uint arg_21_0 = 3306270342u; while (true) { uint num; switch ((num = (arg_21_0 ^ 2399452373u)) % 3u) { case 1u: httpHeader = new HttpHeader(); arg_21_0 = (num * 2817185367u ^ 950298830u); continue; case 2u: goto IL_3A; } goto Block_1; } } Block_1: StreamReader streamReader = HttpRequest.smethod_1(HttpRequest.smethod_0(data)); try { string[] array = HttpRequest.smethod_3(HttpRequest.smethod_2(streamReader), new string[] { Module.smethod_36<string>(2793817990u) }, StringSplitOptions.RemoveEmptyEntries); dictionary.Add(Module.smethod_36<string>(4166278524u), array[0]); while (true) { IL_2F0: uint arg_2A2_0 = 3324084926u; while (true) { uint num; switch ((num = (arg_2A2_0 ^ 2399452373u)) % 16u) { case 0u: dictionary.Add(HttpRequest.smethod_5(HttpRequest.smethod_4(array[0], Module.smethod_34<string>(3401163952u), "")), array[1]); arg_2A2_0 = (num * 476152534u ^ 4072731649u); continue; case 1u: dictionary.Add(HttpRequest.smethod_5(HttpRequest.smethod_4(array[0], Module.smethod_37<string>(1807587611u), "")), __c__DisplayClass0_.val); arg_2A2_0 = (num * 3971791676u ^ 413243399u); continue; case 2u: dictionary.Add(Module.smethod_35<string>(2307915410u), array[2]); arg_2A2_0 = (num * 1182890423u ^ 4235378950u); continue; case 3u: arg_2A2_0 = (((array.Length != 2) ? 855930612u : 387368386u) ^ num * 930194861u); continue; case 4u: arg_2A2_0 = (num * 1032400525u ^ 950737695u); continue; case 5u: goto IL_2F0; case 6u: arg_2A2_0 = ((array.Length > 2) ? 3461943362u : 3679532412u); continue; case 7u: { string val = ""; arg_2A2_0 = (num * 3808812237u ^ 3319968580u); continue; } case 9u: { string value = HttpRequest.smethod_2(streamReader); arg_2A2_0 = 3047714249u; continue; } case 10u: from s in array.Skip(1) select __c__DisplayClass0_.val = HttpRequest.__c__DisplayClass0_0.smethod_0(__c__DisplayClass0_.val, s); arg_2A2_0 = (num * 4171598521u ^ 1227765102u); continue; case 11u: dictionary.Add(Module.smethod_35<string>(168686531u), array[1]); arg_2A2_0 = (num * 1451970874u ^ 4272024969u); continue; case 12u: { string value; dictionary.Add(Module.smethod_37<string>(2538023825u), value); arg_2A2_0 = (num * 2805342277u ^ 1441398903u); continue; } case 13u: arg_2A2_0 = (num * 3001626507u ^ 3895757572u); continue; case 14u: arg_2A2_0 = ((!HttpRequest.smethod_6(streamReader)) ? 3016499402u : 3543724653u); continue; case 15u: array = HttpRequest.smethod_3(HttpRequest.smethod_2(streamReader), new string[] { Module.smethod_37<string>(2625673813u) }, StringSplitOptions.RemoveEmptyEntries); arg_2A2_0 = 2794843318u; continue; } goto Block_11; } } Block_11:; } finally { if (streamReader != null) { while (true) { IL_330: uint arg_317_0 = 3947859753u; while (true) { uint num; switch ((num = (arg_317_0 ^ 2399452373u)) % 3u) { case 0u: goto IL_330; case 1u: HttpRequest.smethod_7(streamReader); arg_317_0 = (num * 3360653210u ^ 620005523u); continue; } goto Block_14; } } Block_14:; } } PropertyInfo[] array2 = HttpRequest.smethod_8(typeof(HttpHeader).TypeHandle).method_0(); while (true) { IL_4BC: uint arg_482_0 = 4012525880u; while (true) { uint num; switch ((num = (arg_482_0 ^ 2399452373u)) % 11u) { case 1u: { PropertyInfo propertyInfo; object object_; HttpRequest.smethod_14(propertyInfo, httpHeader, HttpRequest.smethod_13(object_, HttpRequest.smethod_10(propertyInfo))); arg_482_0 = 4111537041u; continue; } case 2u: arg_482_0 = (num * 3971535260u ^ 1415198776u); continue; case 3u: { PropertyInfo propertyInfo; object object_; HttpRequest.smethod_14(propertyInfo, httpHeader, HttpRequest.smethod_13(HttpRequest.smethod_12(object_), HttpRequest.smethod_10(propertyInfo))); arg_482_0 = (num * 3214644057u ^ 2517217410u); continue; } case 4u: arg_482_0 = (num * 2530784154u ^ 4106248223u); continue; case 5u: { int num2; PropertyInfo propertyInfo = array2[num2]; object object_ = null; arg_482_0 = (dictionary.TryGetValue(HttpRequest.smethod_5(HttpRequest.smethod_9(propertyInfo)), out object_) ? 2568737180u : 4111537041u); continue; } case 6u: { int num2; num2++; arg_482_0 = 3992009476u; continue; } case 7u: { int num2 = 0; arg_482_0 = (num * 1310724303u ^ 1775278383u); continue; } case 8u: { PropertyInfo propertyInfo; arg_482_0 = (((!HttpRequest.smethod_11(HttpRequest.smethod_10(propertyInfo), HttpRequest.smethod_8(typeof(int).TypeHandle))) ? 674557239u : 1071341423u) ^ num * 3742317054u); continue; } case 9u: { int num2; arg_482_0 = ((num2 >= array2.Length) ? 2637554276u : 2694170979u); continue; } case 10u: goto IL_4BC; } return httpHeader; } } return httpHeader; } static MemoryStream smethod_0(byte[] byte_0) { return new MemoryStream(byte_0); } static StreamReader smethod_1(Stream stream_0) { return new StreamReader(stream_0); } static string smethod_2(TextReader textReader_0) { return textReader_0.ReadLine(); } static string[] smethod_3(string string_0, string[] string_1, StringSplitOptions stringSplitOptions_0) { return string_0.Split(string_1, stringSplitOptions_0); } static string smethod_4(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static string smethod_5(string string_0) { return string_0.ToLower(); } static bool smethod_6(StreamReader streamReader_0) { return streamReader_0.EndOfStream; } static void smethod_7(IDisposable idisposable_0) { idisposable_0.Dispose(); } static Type smethod_8(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } PropertyInfo[] method_0() { return base.GetProperties(); } static string smethod_9(MemberInfo memberInfo_0) { return memberInfo_0.Name; } static Type smethod_10(PropertyInfo propertyInfo_0) { return propertyInfo_0.PropertyType; } static bool smethod_11(Type type_0, Type type_1) { return type_0 == type_1; } static int smethod_12(object object_0) { return Convert.ToInt32(object_0); } static object smethod_13(object object_0, Type type_0) { return Convert.ChangeType(object_0, type_0); } static void smethod_14(PropertyInfo propertyInfo_0, object object_0, object object_1) { propertyInfo_0.SetValue(object_0, object_1); } } } <file_sep>/Bgs.Protocol.Report.V1/SendReportRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Report.V1 { [DebuggerNonUserCode] public sealed class SendReportRequest : IMessage<SendReportRequest>, IEquatable<SendReportRequest>, IDeepCloneable<SendReportRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendReportRequest.__c __9 = new SendReportRequest.__c(); internal SendReportRequest cctor>b__24_0() { return new SendReportRequest(); } } private static readonly MessageParser<SendReportRequest> _parser = new MessageParser<SendReportRequest>(new Func<SendReportRequest>(SendReportRequest.__c.__9.<.cctor>b__24_0)); public const int ReportFieldNumber = 1; private Report report_; public static MessageParser<SendReportRequest> Parser { get { return SendReportRequest._parser; } } public static MessageDescriptor Descriptor { get { return ReportServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return SendReportRequest.Descriptor; } } public Report Report { get { return this.report_; } set { this.report_ = value; } } public SendReportRequest() { } public SendReportRequest(SendReportRequest other) : this() { this.Report = ((other.report_ != null) ? other.Report.Clone() : null); } public SendReportRequest Clone() { return new SendReportRequest(this); } public override bool Equals(object other) { return this.Equals(other as SendReportRequest); } public bool Equals(SendReportRequest other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 932328396) % 7) { case 0: return false; case 1: return true; case 2: goto IL_3E; case 3: return false; case 4: arg_48_0 = ((!SendReportRequest.smethod_0(this.Report, other.Report)) ? 793070484 : 448038726); continue; case 5: goto IL_7A; } break; } return true; IL_3E: arg_48_0 = 1914697626; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 506379409 : 762316865); goto IL_43; } public override int GetHashCode() { return 1 ^ SendReportRequest.smethod_1(this.Report); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Report); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Report)); } public void MergeFrom(SendReportRequest other) { if (other == null) { goto IL_58; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 1867706803u)) % 7u) { case 1u: goto IL_B1; case 2u: this.Report.MergeFrom(other.Report); arg_7A_0 = 128416579u; continue; case 3u: goto IL_58; case 4u: arg_7A_0 = (((this.report_ != null) ? 4265969557u : 3723966703u) ^ num * 1582554616u); continue; case 5u: return; case 6u: this.report_ = new Report(); arg_7A_0 = (num * 2308280296u ^ 3151701701u); continue; } break; } return; IL_58: arg_7A_0 = 1189604338u; goto IL_75; IL_B1: arg_7A_0 = ((other.report_ != null) ? 1981697753u : 128416579u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DC: uint num; uint arg_A1_0 = ((num = input.ReadTag()) != 0u) ? 3369606922u : 3313808160u; while (true) { uint num2; switch ((num2 = (arg_A1_0 ^ 3498808671u)) % 8u) { case 0u: arg_A1_0 = 3369606922u; continue; case 1u: input.ReadMessage(this.report_); arg_A1_0 = 3496429633u; continue; case 2u: arg_A1_0 = ((this.report_ != null) ? 3737593326u : 2367589203u); continue; case 3u: input.SkipLastField(); arg_A1_0 = (num2 * 4251770814u ^ 3475891611u); continue; case 4u: this.report_ = new Report(); arg_A1_0 = (num2 * 1833074118u ^ 3537779878u); continue; case 5u: arg_A1_0 = ((num != 10u) ? 2373793772u : 3743695605u); continue; case 6u: goto IL_DC; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountStateTagged.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountStateTagged : IMessage<AccountStateTagged>, IEquatable<AccountStateTagged>, IDeepCloneable<AccountStateTagged>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountStateTagged.__c __9 = new AccountStateTagged.__c(); internal AccountStateTagged cctor>b__29_0() { return new AccountStateTagged(); } } private static readonly MessageParser<AccountStateTagged> _parser = new MessageParser<AccountStateTagged>(new Func<AccountStateTagged>(AccountStateTagged.__c.__9.<.cctor>b__29_0)); public const int AccountStateFieldNumber = 1; private AccountState accountState_; public const int AccountTagsFieldNumber = 2; private AccountFieldTags accountTags_; public static MessageParser<AccountStateTagged> Parser { get { return AccountStateTagged._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[32]; } } MessageDescriptor IMessage.Descriptor { get { return AccountStateTagged.Descriptor; } } public AccountState AccountState { get { return this.accountState_; } set { this.accountState_ = value; } } public AccountFieldTags AccountTags { get { return this.accountTags_; } set { this.accountTags_ = value; } } public AccountStateTagged() { } public AccountStateTagged(AccountStateTagged other) : this() { while (true) { IL_6B: int arg_51_0 = -1367725675; while (true) { switch ((arg_51_0 ^ -393299392) % 4) { case 0: this.AccountTags = ((other.accountTags_ != null) ? other.AccountTags.Clone() : null); arg_51_0 = -128194961; continue; case 1: this.AccountState = ((other.accountState_ != null) ? other.AccountState.Clone() : null); arg_51_0 = -705763784; continue; case 2: goto IL_6B; } return; } } } public AccountStateTagged Clone() { return new AccountStateTagged(this); } public override bool Equals(object other) { return this.Equals(other as AccountStateTagged); } public bool Equals(AccountStateTagged other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1065032306) % 9) { case 0: goto IL_6D; case 1: arg_77_0 = ((!AccountStateTagged.smethod_0(this.AccountTags, other.AccountTags)) ? -1356559502 : -1061962619); continue; case 2: return false; case 3: return false; case 4: return true; case 6: return false; case 7: goto IL_B5; case 8: arg_77_0 = ((!AccountStateTagged.smethod_0(this.AccountState, other.AccountState)) ? -343819474 : -1854343766); continue; } break; } return true; IL_6D: arg_77_0 = -1415315741; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -334717245 : -208732495); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.accountState_ != null) { goto IL_19; } goto IL_89; uint arg_5D_0; while (true) { IL_58: uint num2; switch ((num2 = (arg_5D_0 ^ 2078887461u)) % 5u) { case 1u: num ^= AccountStateTagged.smethod_1(this.AccountState); arg_5D_0 = (num2 * 3287096701u ^ 1385051508u); continue; case 2u: goto IL_89; case 3u: num ^= AccountStateTagged.smethod_1(this.AccountTags); arg_5D_0 = (num2 * 1335891318u ^ 2831423082u); continue; case 4u: goto IL_19; } break; } return num; IL_19: arg_5D_0 = 1010758090u; goto IL_58; IL_89: arg_5D_0 = ((this.accountTags_ == null) ? 2007221764u : 709204112u); goto IL_58; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountState_ != null) { goto IL_7E; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 3645186398u)) % 7u) { case 0u: goto IL_7E; case 1u: output.WriteRawTag(10); arg_88_0 = (num * 2825923017u ^ 3889110834u); continue; case 2u: output.WriteMessage(this.AccountTags); arg_88_0 = (num * 2861560723u ^ 1731604973u); continue; case 3u: goto IL_BF; case 5u: output.WriteMessage(this.AccountState); arg_88_0 = (num * 1126806568u ^ 991643224u); continue; case 6u: output.WriteRawTag(18); arg_88_0 = (num * 1877049487u ^ 813565000u); continue; } break; } return; IL_7E: arg_88_0 = 3167558101u; goto IL_83; IL_BF: arg_88_0 = ((this.accountTags_ != null) ? 2837354707u : 3462437026u); goto IL_83; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 893414563u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 2002907972u)) % 6u) { case 1u: arg_92_0 = ((this.accountTags_ == null) ? 622155378u : 138568932u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountTags); arg_92_0 = (num2 * 1080250790u ^ 1945675698u); continue; case 3u: arg_92_0 = (((this.accountState_ == null) ? 3319418888u : 3009189381u) ^ num2 * 3602118805u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountState); arg_92_0 = (num2 * 1513793806u ^ 4234266055u); continue; case 5u: goto IL_B6; } return num; } } return num; } public void MergeFrom(AccountStateTagged other) { if (other == null) { goto IL_82; } goto IL_147; uint arg_FF_0; while (true) { IL_FA: uint num; switch ((num = (arg_FF_0 ^ 53694967u)) % 11u) { case 1u: return; case 2u: this.AccountState.MergeFrom(other.AccountState); arg_FF_0 = 2129170001u; continue; case 3u: this.accountState_ = new AccountState(); arg_FF_0 = (num * 192644297u ^ 1771015179u); continue; case 4u: goto IL_147; case 5u: this.AccountTags.MergeFrom(other.AccountTags); arg_FF_0 = 1533868001u; continue; case 6u: arg_FF_0 = (((this.accountTags_ != null) ? 4098970194u : 2703138181u) ^ num * 2228702443u); continue; case 7u: goto IL_82; case 8u: this.accountTags_ = new AccountFieldTags(); arg_FF_0 = (num * 642756574u ^ 4265683150u); continue; case 9u: arg_FF_0 = (((this.accountState_ == null) ? 69905190u : 2047797234u) ^ num * 967211495u); continue; case 10u: arg_FF_0 = ((other.accountTags_ == null) ? 1533868001u : 194837943u); continue; } break; } return; IL_82: arg_FF_0 = 1594834299u; goto IL_FA; IL_147: arg_FF_0 = ((other.accountState_ == null) ? 2129170001u : 2104736337u); goto IL_FA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_183: uint num; uint arg_133_0 = ((num = input.ReadTag()) == 0u) ? 1596593153u : 397404980u; while (true) { uint num2; switch ((num2 = (arg_133_0 ^ 603696359u)) % 13u) { case 0u: arg_133_0 = 397404980u; continue; case 1u: input.ReadMessage(this.accountTags_); arg_133_0 = 789569758u; continue; case 2u: this.accountState_ = new AccountState(); arg_133_0 = (num2 * 3071308703u ^ 2217605743u); continue; case 3u: goto IL_183; case 4u: arg_133_0 = (((num == 18u) ? 4158239141u : 3356345441u) ^ num2 * 1106054806u); continue; case 5u: arg_133_0 = ((this.accountTags_ == null) ? 1531906712u : 1320074991u); continue; case 6u: this.accountTags_ = new AccountFieldTags(); arg_133_0 = (num2 * 1061439014u ^ 2243808821u); continue; case 7u: arg_133_0 = ((this.accountState_ != null) ? 351259321u : 548381581u); continue; case 8u: input.SkipLastField(); arg_133_0 = (num2 * 2510450477u ^ 2341366795u); continue; case 9u: input.ReadMessage(this.accountState_); arg_133_0 = 789569758u; continue; case 10u: arg_133_0 = ((num == 10u) ? 2002387230u : 270548858u); continue; case 12u: arg_133_0 = (num2 * 765490691u ^ 4259253762u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Misc/HttpResponse.cs using System; using System.IO; using System.Text; namespace Framework.Misc { public class HttpResponse { public static byte[] Create(HttpCode httpCode, HttpHeader header) { StringBuilder stringBuilder = HttpResponse.smethod_0(); StringWriter stringWriter = HttpResponse.smethod_1(stringBuilder); try { HttpResponse.smethod_3(stringWriter, HttpResponse.smethod_2(Module.smethod_34<string>(793455672u), (int)httpCode, httpCode.ToString())); while (true) { IL_14D: uint arg_128_0 = 3463570091u; while (true) { uint num; switch ((num = (arg_128_0 ^ 3407657466u)) % 6u) { case 0u: goto IL_14D; case 1u: { string arg = DateTime.Now.ToUniversalTime().ToString(Module.smethod_35<string>(3442331584u)); stringWriter.WriteLine(string.Format(Module.smethod_33<string>(2252403819u), arg)); arg_128_0 = (num * 3193603854u ^ 2500099970u); continue; } case 3u: stringWriter.WriteLine(); stringWriter.WriteLine(header.Content); arg_128_0 = (num * 2561694936u ^ 3069112476u); continue; case 4u: stringWriter.WriteLine(Module.smethod_34<string>(1984368261u)); stringWriter.WriteLine(Module.smethod_34<string>(672055693u)); arg_128_0 = (num * 3931759688u ^ 2273372317u); continue; case 5u: stringWriter.WriteLine(string.Format(Module.smethod_37<string>(609665147u), header.ContentLength)); stringWriter.WriteLine(Module.smethod_35<string>(3987891873u)); stringWriter.WriteLine(Module.smethod_34<string>(3147617483u)); arg_128_0 = (num * 2465592752u ^ 1798369301u); continue; } goto Block_3; } } Block_3:; } finally { if (stringWriter != null) { while (true) { IL_18D: uint arg_174_0 = 2977987066u; while (true) { uint num; switch ((num = (arg_174_0 ^ 3407657466u)) % 3u) { case 0u: goto IL_18D; case 2u: ((IDisposable)stringWriter).Dispose(); arg_174_0 = (num * 200705565u ^ 3116199384u); continue; } goto Block_6; } } Block_6:; } } return Encoding.UTF8.GetBytes(stringBuilder.ToString()); } static StringBuilder smethod_0() { return new StringBuilder(); } static StringWriter smethod_1(StringBuilder stringBuilder_0) { return new StringWriter(stringBuilder_0); } static string smethod_2(string string_0, object object_0, object object_1) { return string.Format(string_0, object_0, object_1); } static void smethod_3(TextWriter textWriter_0, string string_0) { textWriter_0.WriteLine(string_0); } } } <file_sep>/AuthServer.Game.Chat/ChatCommand2Attribute.cs using System; namespace AuthServer.Game.Chat { public class ChatCommand2Attribute : Attribute { public string ChatCommand { get; set; } public string Description { get; set; } public ChatCommand2Attribute(string chatCommand, string description = "") { while (true) { IL_53: uint arg_37_0 = 3801908600u; while (true) { uint num; switch ((num = (arg_37_0 ^ 2665727970u)) % 4u) { case 0u: goto IL_53; case 2u: this.ChatCommand = chatCommand; arg_37_0 = (num * 2319542741u ^ 1135011235u); continue; case 3u: this.Description = description; arg_37_0 = (num * 616513309u ^ 33410544u); continue; } return; } } } } } <file_sep>/Google.Protobuf/InvalidJsonException.cs using System; using System.IO; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public sealed class InvalidJsonException : IOException { internal InvalidJsonException(string message) : base(message) { } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GameUtilitiesTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public static class GameUtilitiesTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return GameUtilitiesTypesReflection.descriptor; } } static GameUtilitiesTypesReflection() { GameUtilitiesTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(GameUtilitiesTypesReflection.smethod_1(GameUtilitiesTypesReflection.smethod_0(new string[] { Module.smethod_37<string>(2454264009u), Module.smethod_35<string>(906488613u), Module.smethod_35<string>(1913851189u), Module.smethod_35<string>(1256330245u), Module.smethod_34<string>(1846613750u), Module.smethod_33<string>(2537401286u), Module.smethod_35<string>(3578734709u), Module.smethod_37<string>(64345u), Module.smethod_35<string>(598809301u), Module.smethod_34<string>(2062519036u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(GameUtilitiesTypesReflection.smethod_2(typeof(PlayerVariables).TypeHandle), PlayerVariables.Parser, new string[] { Module.smethod_34<string>(215450163u), Module.smethod_35<string>(4236255653u), Module.smethod_35<string>(1418463188u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesTypesReflection.smethod_2(typeof(ClientInfo).TypeHandle), ClientInfo.Parser, new string[] { Module.smethod_34<string>(1725213771u), Module.smethod_36<string>(388525893u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf.Collections/ReadOnlyDictionary.cs using System; using System.Collections; using System.Collections.Generic; namespace Google.Protobuf.Collections { internal sealed class ReadOnlyDictionary<TKey, TValue> : IEnumerable, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>> { private readonly IDictionary<TKey, TValue> wrapped; public ICollection<TKey> Keys { get { return this.wrapped.Keys; } } public ICollection<TValue> Values { get { return this.wrapped.Values; } } public TValue this[TKey key] { get { return this.wrapped[key]; } set { throw ReadOnlyDictionary<TKey, TValue>.smethod_0(); } } public int Count { get { return this.wrapped.Count; } } public bool IsReadOnly { get { return true; } } public ReadOnlyDictionary(IDictionary<TKey, TValue> wrapped) { this.wrapped = wrapped; } public void Add(TKey key, TValue value) { throw ReadOnlyDictionary<TKey, TValue>.smethod_0(); } public bool ContainsKey(TKey key) { return this.wrapped.ContainsKey(key); } public bool Remove(TKey key) { throw ReadOnlyDictionary<TKey, TValue>.smethod_0(); } public bool TryGetValue(TKey key, out TValue value) { return this.wrapped.TryGetValue(key, out value); } public void Add(KeyValuePair<TKey, TValue> item) { throw ReadOnlyDictionary<TKey, TValue>.smethod_0(); } public void Clear() { throw ReadOnlyDictionary<TKey, TValue>.smethod_0(); } public bool Contains(KeyValuePair<TKey, TValue> item) { return this.wrapped.Contains(item); } public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) { this.wrapped.CopyTo(array, arrayIndex); } public bool Remove(KeyValuePair<TKey, TValue> item) { throw ReadOnlyDictionary<TKey, TValue>.smethod_0(); } public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() { return this.wrapped.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return ReadOnlyDictionary<TKey, TValue>.smethod_1(this.wrapped); } public override bool Equals(object obj) { return ReadOnlyDictionary<TKey, TValue>.smethod_2(this.wrapped, obj); } public override int GetHashCode() { return ReadOnlyDictionary<TKey, TValue>.smethod_3(this.wrapped); } public override string ToString() { return ReadOnlyDictionary<TKey, TValue>.smethod_4(this.wrapped); } static InvalidOperationException smethod_0() { return new InvalidOperationException(); } static IEnumerator smethod_1(IEnumerable ienumerable_0) { return ienumerable_0.GetEnumerator(); } static bool smethod_2(object object_0, object object_1) { return object_0.Equals(object_1); } static int smethod_3(object object_0) { return object_0.GetHashCode(); } static string smethod_4(object object_0) { return object_0.ToString(); } } } <file_sep>/Google.Protobuf/UninterpretedOption.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class UninterpretedOption : IMessage<UninterpretedOption>, IEquatable<UninterpretedOption>, IDeepCloneable<UninterpretedOption>, IMessage { [DebuggerNonUserCode] public static class Types { [DebuggerNonUserCode] internal sealed class NamePart : IMessage<UninterpretedOption.Types.NamePart>, IEquatable<UninterpretedOption.Types.NamePart>, IDeepCloneable<UninterpretedOption.Types.NamePart>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UninterpretedOption.Types.NamePart.__c __9 = new UninterpretedOption.Types.NamePart.__c(); internal UninterpretedOption.Types.NamePart cctor>b__29_0() { return new UninterpretedOption.Types.NamePart(); } } private static readonly MessageParser<UninterpretedOption.Types.NamePart> _parser = new MessageParser<UninterpretedOption.Types.NamePart>(new Func<UninterpretedOption.Types.NamePart>(UninterpretedOption.Types.NamePart.__c.__9.<.cctor>b__29_0)); public const int NamePart_FieldNumber = 1; private string namePart_ = ""; public const int IsExtensionFieldNumber = 2; private bool isExtension_; public static MessageParser<UninterpretedOption.Types.NamePart> Parser { get { return UninterpretedOption.Types.NamePart._parser; } } public static MessageDescriptor Descriptor { get { return UninterpretedOption.Descriptor.NestedTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return UninterpretedOption.Types.NamePart.Descriptor; } } public string NamePart_ { get { return this.namePart_; } set { this.namePart_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool IsExtension { get { return this.isExtension_; } set { this.isExtension_ = value; } } public NamePart() { } public NamePart(UninterpretedOption.Types.NamePart other) : this() { while (true) { IL_4A: uint arg_32_0 = 1976136540u; while (true) { uint num; switch ((num = (arg_32_0 ^ 1244293618u)) % 3u) { case 1u: this.namePart_ = other.namePart_; this.isExtension_ = other.isExtension_; arg_32_0 = (num * 174545309u ^ 3078420831u); continue; case 2u: goto IL_4A; } return; } } } public UninterpretedOption.Types.NamePart Clone() { return new UninterpretedOption.Types.NamePart(this); } public override bool Equals(object other) { return this.Equals(other as UninterpretedOption.Types.NamePart); } public bool Equals(UninterpretedOption.Types.NamePart other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -240707439) % 9) { case 0: goto IL_68; case 1: goto IL_B0; case 3: return false; case 4: arg_72_0 = (UninterpretedOption.Types.NamePart.smethod_0(this.NamePart_, other.NamePart_) ? -1834379511 : -1962306246); continue; case 5: arg_72_0 = ((this.IsExtension != other.IsExtension) ? -2107856207 : -2113627448); continue; case 6: return false; case 7: return true; case 8: return false; } break; } return true; IL_68: arg_72_0 = -2057427097; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? -73274671 : -1398805737); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_BA: uint arg_96_0 = 959739975u; while (true) { uint num2; switch ((num2 = (arg_96_0 ^ 385134369u)) % 6u) { case 0u: arg_96_0 = ((!this.IsExtension) ? 237862345u : 1796776040u); continue; case 1u: num ^= UninterpretedOption.Types.NamePart.smethod_2(this.NamePart_); arg_96_0 = (num2 * 4137849973u ^ 669922486u); continue; case 3u: goto IL_BA; case 4u: arg_96_0 = (((UninterpretedOption.Types.NamePart.smethod_1(this.NamePart_) != 0) ? 4078877212u : 3369056007u) ^ num2 * 3572206844u); continue; case 5u: num ^= this.IsExtension.GetHashCode(); arg_96_0 = (num2 * 3813706059u ^ 3020682922u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (UninterpretedOption.Types.NamePart.smethod_1(this.NamePart_) != 0) { goto IL_65; } goto IL_9B; uint arg_6F_0; while (true) { IL_6A: uint num; switch ((num = (arg_6F_0 ^ 2196724152u)) % 5u) { case 0u: goto IL_65; case 1u: goto IL_9B; case 2u: output.WriteRawTag(10); output.WriteString(this.NamePart_); arg_6F_0 = (num * 3710217040u ^ 1616946663u); continue; case 4u: output.WriteRawTag(16); output.WriteBool(this.IsExtension); arg_6F_0 = (num * 4058525509u ^ 2603311045u); continue; } break; } return; IL_65: arg_6F_0 = 2475431821u; goto IL_6A; IL_9B: arg_6F_0 = ((!this.IsExtension) ? 4134694002u : 2434990451u); goto IL_6A; } public int CalculateSize() { int num = 0; while (true) { IL_AF: uint arg_8B_0 = 403354018u; while (true) { uint num2; switch ((num2 = (arg_8B_0 ^ 377619743u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.NamePart_); arg_8B_0 = (num2 * 2029000374u ^ 2222356071u); continue; case 1u: num += 2; arg_8B_0 = (num2 * 3772960006u ^ 939535701u); continue; case 3u: arg_8B_0 = (((UninterpretedOption.Types.NamePart.smethod_1(this.NamePart_) != 0) ? 3301955599u : 2853213553u) ^ num2 * 2186196082u); continue; case 4u: arg_8B_0 = (this.IsExtension ? 1955293006u : 1131743155u); continue; case 5u: goto IL_AF; } return num; } } return num; } public void MergeFrom(UninterpretedOption.Types.NamePart other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1416098489u)) % 7u) { case 0u: goto IL_6C; case 1u: this.NamePart_ = other.NamePart_; arg_76_0 = (num * 2321349572u ^ 2355579013u); continue; case 2u: arg_76_0 = (other.IsExtension ? 928139474u : 1542708421u); continue; case 4u: goto IL_AD; case 5u: return; case 6u: this.IsExtension = other.IsExtension; arg_76_0 = (num * 1891066871u ^ 3382239992u); continue; } break; } return; IL_6C: arg_76_0 = 1273922672u; goto IL_71; IL_AD: arg_76_0 = ((UninterpretedOption.Types.NamePart.smethod_1(other.NamePart_) == 0) ? 77492941u : 480561419u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F1: uint num; uint arg_B1_0 = ((num = input.ReadTag()) == 0u) ? 892360258u : 1848098736u; while (true) { uint num2; switch ((num2 = (arg_B1_0 ^ 1527141277u)) % 9u) { case 0u: goto IL_F1; case 1u: arg_B1_0 = (((num != 16u) ? 2248849807u : 3227524151u) ^ num2 * 3730220176u); continue; case 3u: input.SkipLastField(); arg_B1_0 = (num2 * 783818891u ^ 1987640322u); continue; case 4u: arg_B1_0 = ((num == 10u) ? 319223136u : 559492368u); continue; case 5u: arg_B1_0 = (num2 * 1269553354u ^ 293555476u); continue; case 6u: this.IsExtension = input.ReadBool(); arg_B1_0 = 894606036u; continue; case 7u: arg_B1_0 = 1848098736u; continue; case 8u: this.NamePart_ = input.ReadString(); arg_B1_0 = 55025149u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UninterpretedOption.__c __9 = new UninterpretedOption.__c(); internal UninterpretedOption cctor>b__55_0() { return new UninterpretedOption(); } } private static readonly MessageParser<UninterpretedOption> _parser = new MessageParser<UninterpretedOption>(new Func<UninterpretedOption>(UninterpretedOption.__c.__9.<.cctor>b__55_0)); public const int NameFieldNumber = 2; private static readonly FieldCodec<UninterpretedOption.Types.NamePart> _repeated_name_codec = FieldCodec.ForMessage<UninterpretedOption.Types.NamePart>(18u, UninterpretedOption.Types.NamePart.Parser); private readonly RepeatedField<UninterpretedOption.Types.NamePart> name_ = new RepeatedField<UninterpretedOption.Types.NamePart>(); public const int IdentifierValueFieldNumber = 3; private string identifierValue_ = ""; public const int PositiveIntValueFieldNumber = 4; private ulong positiveIntValue_; public const int NegativeIntValueFieldNumber = 5; private long negativeIntValue_; public const int DoubleValueFieldNumber = 6; private double doubleValue_; public const int StringValueFieldNumber = 7; private ByteString stringValue_ = ByteString.Empty; public const int AggregateValueFieldNumber = 8; private string aggregateValue_ = ""; public static MessageParser<UninterpretedOption> Parser { get { return UninterpretedOption._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[16]; } } MessageDescriptor IMessage.Descriptor { get { return UninterpretedOption.Descriptor; } } public RepeatedField<UninterpretedOption.Types.NamePart> Name { get { return this.name_; } } public string IdentifierValue { get { return this.identifierValue_; } set { this.identifierValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public ulong PositiveIntValue { get { return this.positiveIntValue_; } set { this.positiveIntValue_ = value; } } public long NegativeIntValue { get { return this.negativeIntValue_; } set { this.negativeIntValue_ = value; } } public double DoubleValue { get { return this.doubleValue_; } set { this.doubleValue_ = value; } } public ByteString StringValue { get { return this.stringValue_; } set { this.stringValue_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public string AggregateValue { get { return this.aggregateValue_; } set { this.aggregateValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public UninterpretedOption() { } public UninterpretedOption(UninterpretedOption other) : this() { this.name_ = other.name_.Clone(); this.identifierValue_ = other.identifierValue_; this.positiveIntValue_ = other.positiveIntValue_; this.negativeIntValue_ = other.negativeIntValue_; this.doubleValue_ = other.doubleValue_; this.stringValue_ = other.stringValue_; this.aggregateValue_ = other.aggregateValue_; } public UninterpretedOption Clone() { return new UninterpretedOption(this); } public override bool Equals(object other) { return this.Equals(other as UninterpretedOption); } public bool Equals(UninterpretedOption other) { if (other == null) { goto IL_CF; } goto IL_1B9; int arg_153_0; while (true) { IL_14E: switch ((arg_153_0 ^ -834992521) % 19) { case 0: return true; case 1: return false; case 2: arg_153_0 = (this.name_.Equals(other.name_) ? -716817409 : -459473560); continue; case 3: return false; case 4: goto IL_1B9; case 5: arg_153_0 = ((this.NegativeIntValue != other.NegativeIntValue) ? -101271841 : -1090118429); continue; case 6: arg_153_0 = ((this.PositiveIntValue == other.PositiveIntValue) ? -1071094369 : -1579270622); continue; case 8: return false; case 9: goto IL_CF; case 10: return false; case 11: arg_153_0 = (UninterpretedOption.smethod_0(this.AggregateValue, other.AggregateValue) ? -875588453 : -109048776); continue; case 12: return false; case 13: return false; case 14: return false; case 15: arg_153_0 = ((this.DoubleValue == other.DoubleValue) ? -890760204 : -2113171391); continue; case 16: arg_153_0 = ((this.StringValue != other.StringValue) ? -827684070 : -1768414627); continue; case 17: arg_153_0 = (UninterpretedOption.smethod_0(this.IdentifierValue, other.IdentifierValue) ? -1691479859 : -2043032386); continue; case 18: return false; } break; } return true; IL_CF: arg_153_0 = -900911114; goto IL_14E; IL_1B9: arg_153_0 = ((other == this) ? -1601259013 : -327653292); goto IL_14E; } public override int GetHashCode() { int num = 1; while (true) { IL_217: uint arg_1D1_0 = 121226271u; while (true) { uint num2; switch ((num2 = (arg_1D1_0 ^ 244279038u)) % 14u) { case 1u: num ^= this.DoubleValue.GetHashCode(); arg_1D1_0 = (num2 * 776969096u ^ 2519889091u); continue; case 2u: num ^= this.StringValue.GetHashCode(); arg_1D1_0 = (num2 * 2837066749u ^ 1960850103u); continue; case 3u: arg_1D1_0 = ((this.NegativeIntValue == 0L) ? 821405000u : 1979321526u); continue; case 4u: num ^= this.PositiveIntValue.GetHashCode(); arg_1D1_0 = (num2 * 893887503u ^ 3315099723u); continue; case 5u: arg_1D1_0 = ((this.AggregateValue.Length == 0) ? 413621592u : 330055364u); continue; case 6u: num ^= this.NegativeIntValue.GetHashCode(); arg_1D1_0 = (num2 * 4204302716u ^ 2284316584u); continue; case 7u: num ^= UninterpretedOption.smethod_1(this.name_); arg_1D1_0 = (((UninterpretedOption.smethod_2(this.IdentifierValue) == 0) ? 3871978092u : 3694688619u) ^ num2 * 1625987624u); continue; case 8u: arg_1D1_0 = ((this.DoubleValue == 0.0) ? 1445490331u : 440232581u); continue; case 9u: arg_1D1_0 = ((this.StringValue.Length != 0) ? 2093910176u : 634486353u); continue; case 10u: arg_1D1_0 = ((this.PositiveIntValue == 0uL) ? 1506716075u : 834053854u); continue; case 11u: num ^= UninterpretedOption.smethod_1(this.IdentifierValue); arg_1D1_0 = (num2 * 349163088u ^ 1084198484u); continue; case 12u: num ^= this.AggregateValue.GetHashCode(); arg_1D1_0 = (num2 * 555592377u ^ 3876853938u); continue; case 13u: goto IL_217; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.name_.WriteTo(output, UninterpretedOption._repeated_name_codec); while (true) { IL_270: uint arg_21F_0 = 2883184069u; while (true) { uint num; switch ((num = (arg_21F_0 ^ 2736303845u)) % 17u) { case 0u: arg_21F_0 = ((this.DoubleValue != 0.0) ? 2821627370u : 2464924987u); continue; case 1u: output.WriteString(this.IdentifierValue); arg_21F_0 = (num * 291130951u ^ 3693618500u); continue; case 2u: arg_21F_0 = (((UninterpretedOption.smethod_2(this.IdentifierValue) == 0) ? 875533667u : 1072263362u) ^ num * 1307995088u); continue; case 3u: arg_21F_0 = ((this.NegativeIntValue == 0L) ? 2593223181u : 4138770505u); continue; case 4u: output.WriteInt64(this.NegativeIntValue); arg_21F_0 = (num * 832241709u ^ 2389480842u); continue; case 5u: arg_21F_0 = ((UninterpretedOption.smethod_2(this.AggregateValue) != 0) ? 4066801087u : 4095490131u); continue; case 6u: output.WriteRawTag(66); output.WriteString(this.AggregateValue); arg_21F_0 = (num * 2464653385u ^ 1013380345u); continue; case 7u: output.WriteRawTag(26); arg_21F_0 = (num * 1346208650u ^ 370350530u); continue; case 8u: goto IL_270; case 9u: arg_21F_0 = ((this.StringValue.Length != 0) ? 2940965836u : 2250707955u); continue; case 10u: output.WriteRawTag(58); output.WriteBytes(this.StringValue); arg_21F_0 = (num * 1250981475u ^ 3847659304u); continue; case 11u: arg_21F_0 = ((this.PositiveIntValue == 0uL) ? 2645913297u : 2487333369u); continue; case 12u: output.WriteRawTag(49); arg_21F_0 = (num * 3230928854u ^ 3180593629u); continue; case 13u: output.WriteDouble(this.DoubleValue); arg_21F_0 = (num * 4019196058u ^ 2498563631u); continue; case 14u: output.WriteRawTag(40); arg_21F_0 = (num * 482647286u ^ 1581229230u); continue; case 16u: output.WriteRawTag(32); output.WriteUInt64(this.PositiveIntValue); arg_21F_0 = (num * 1519271072u ^ 154365777u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_222: uint arg_1D9_0 = 578665296u; while (true) { uint num2; switch ((num2 = (arg_1D9_0 ^ 231602063u)) % 15u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.IdentifierValue); arg_1D9_0 = (num2 * 4035234943u ^ 285999405u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.AggregateValue); arg_1D9_0 = (num2 * 4144756620u ^ 2778803321u); continue; case 3u: num += 1 + CodedOutputStream.ComputeInt64Size(this.NegativeIntValue); arg_1D9_0 = (num2 * 64268559u ^ 3737586771u); continue; case 4u: num += 1 + CodedOutputStream.ComputeBytesSize(this.StringValue); arg_1D9_0 = (num2 * 2944482510u ^ 2917640795u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.PositiveIntValue); arg_1D9_0 = (num2 * 2938771356u ^ 2411354165u); continue; case 6u: arg_1D9_0 = ((this.PositiveIntValue == 0uL) ? 1898059413u : 1937800599u); continue; case 7u: arg_1D9_0 = (((UninterpretedOption.smethod_2(this.IdentifierValue) == 0) ? 10929562u : 1701400390u) ^ num2 * 51591668u); continue; case 8u: num += 9; arg_1D9_0 = (num2 * 1744169153u ^ 329813791u); continue; case 9u: arg_1D9_0 = ((this.DoubleValue == 0.0) ? 455624757u : 1609498661u); continue; case 10u: goto IL_222; case 11u: arg_1D9_0 = ((UninterpretedOption.smethod_2(this.AggregateValue) == 0) ? 1779326305u : 1858957837u); continue; case 12u: num += this.name_.CalculateSize(UninterpretedOption._repeated_name_codec); arg_1D9_0 = (num2 * 3100982234u ^ 1087078854u); continue; case 13u: arg_1D9_0 = ((this.StringValue.Length != 0) ? 428527378u : 1901522957u); continue; case 14u: arg_1D9_0 = ((this.NegativeIntValue == 0L) ? 1046893493u : 1549218357u); continue; } return num; } } return num; } public void MergeFrom(UninterpretedOption other) { if (other == null) { goto IL_11E; } goto IL_1EC; uint arg_194_0; while (true) { IL_18F: uint num; switch ((num = (arg_194_0 ^ 1114628224u)) % 15u) { case 0u: arg_194_0 = ((other.DoubleValue != 0.0) ? 196026589u : 874501992u); continue; case 1u: arg_194_0 = ((other.NegativeIntValue != 0L) ? 540814357u : 484298769u); continue; case 2u: goto IL_1EC; case 3u: arg_194_0 = ((other.PositiveIntValue == 0uL) ? 2145573994u : 1965684533u); continue; case 4u: goto IL_11E; case 5u: return; case 7u: arg_194_0 = ((other.StringValue.Length == 0) ? 934436712u : 1705208154u); continue; case 8u: this.IdentifierValue = other.IdentifierValue; arg_194_0 = (num * 3822444702u ^ 3364505849u); continue; case 9u: this.NegativeIntValue = other.NegativeIntValue; arg_194_0 = (num * 1620854470u ^ 2639341871u); continue; case 10u: this.DoubleValue = other.DoubleValue; arg_194_0 = (num * 1581583582u ^ 3374578638u); continue; case 11u: arg_194_0 = ((UninterpretedOption.smethod_2(other.AggregateValue) != 0) ? 2141422802u : 996453827u); continue; case 12u: this.AggregateValue = other.AggregateValue; arg_194_0 = (num * 778111481u ^ 822269953u); continue; case 13u: this.StringValue = other.StringValue; arg_194_0 = (num * 3755830634u ^ 1327937836u); continue; case 14u: this.PositiveIntValue = other.PositiveIntValue; arg_194_0 = (num * 234271797u ^ 3439259667u); continue; } break; } return; IL_11E: arg_194_0 = 46404277u; goto IL_18F; IL_1EC: this.name_.Add(other.name_); arg_194_0 = ((UninterpretedOption.smethod_2(other.IdentifierValue) != 0) ? 148807602u : 1542981669u); goto IL_18F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_30C: uint num; uint arg_288_0 = ((num = input.ReadTag()) == 0u) ? 1039855931u : 394491425u; while (true) { uint num2; switch ((num2 = (arg_288_0 ^ 1351805455u)) % 26u) { case 0u: arg_288_0 = (((num != 49u) ? 3700557491u : 2381149507u) ^ num2 * 375902157u); continue; case 1u: arg_288_0 = ((num == 58u) ? 780404763u : 1967098733u); continue; case 2u: arg_288_0 = (num2 * 452455246u ^ 2824570707u); continue; case 3u: arg_288_0 = (num2 * 3373773775u ^ 2667582046u); continue; case 4u: arg_288_0 = (((num != 32u) ? 2176476268u : 4162572642u) ^ num2 * 4214996109u); continue; case 5u: arg_288_0 = (((num == 18u) ? 2057634904u : 1649392682u) ^ num2 * 2774073496u); continue; case 6u: arg_288_0 = (((num == 66u) ? 1591726240u : 456071525u) ^ num2 * 1003622303u); continue; case 7u: arg_288_0 = (num2 * 347462769u ^ 3634713218u); continue; case 8u: goto IL_30C; case 9u: this.IdentifierValue = input.ReadString(); arg_288_0 = 1799065335u; continue; case 10u: this.StringValue = input.ReadBytes(); arg_288_0 = 1140899485u; continue; case 11u: this.NegativeIntValue = input.ReadInt64(); arg_288_0 = 1140899485u; continue; case 12u: arg_288_0 = ((num <= 32u) ? 1364864830u : 981608400u); continue; case 13u: arg_288_0 = 394491425u; continue; case 15u: this.AggregateValue = input.ReadString(); arg_288_0 = 1140899485u; continue; case 16u: arg_288_0 = (num2 * 541097602u ^ 1381973641u); continue; case 17u: arg_288_0 = (num2 * 1824646663u ^ 3376562u); continue; case 18u: arg_288_0 = (((num == 40u) ? 684374924u : 1431234719u) ^ num2 * 520530304u); continue; case 19u: arg_288_0 = (((num == 26u) ? 119248795u : 1514334238u) ^ num2 * 3152538239u); continue; case 20u: input.SkipLastField(); arg_288_0 = 758259094u; continue; case 21u: this.PositiveIntValue = input.ReadUInt64(); arg_288_0 = 1017646469u; continue; case 22u: this.DoubleValue = input.ReadDouble(); arg_288_0 = 1140899485u; continue; case 23u: this.name_.AddEntriesFrom(input, UninterpretedOption._repeated_name_codec); arg_288_0 = 478788290u; continue; case 24u: arg_288_0 = (num2 * 2786412026u ^ 1207684269u); continue; case 25u: arg_288_0 = ((num <= 49u) ? 1682679617u : 460636926u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.WellKnownTypes/Duration.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Duration : IMessage<Duration>, IEquatable<Duration>, IDeepCloneable<Duration>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Duration.__c __9 = new Duration.__c(); internal Duration cctor>b__39_0() { return new Duration(); } } private static readonly MessageParser<Duration> _parser = new MessageParser<Duration>(new Func<Duration>(Duration.__c.__9.<.cctor>b__39_0)); public const int SecondsFieldNumber = 1; private long seconds_; public const int NanosFieldNumber = 2; private int nanos_; public const int NanosecondsPerSecond = 1000000000; public const int NanosecondsPerTick = 100; public const long MaxSeconds = 315576000000L; public const long MinSeconds = -315576000000L; public static MessageParser<Duration> Parser { get { return Duration._parser; } } public static MessageDescriptor Descriptor { get { return DurationReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Duration.Descriptor; } } public long Seconds { get { return this.seconds_; } set { this.seconds_ = value; } } public int Nanos { get { return this.nanos_; } set { this.nanos_ = value; } } public Duration() { } public Duration(Duration other) : this() { this.seconds_ = other.seconds_; this.nanos_ = other.nanos_; } public Duration Clone() { return new Duration(this); } public override bool Equals(object other) { return this.Equals(other as Duration); } public bool Equals(Duration other) { if (other == null) { goto IL_63; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -822716801) % 9) { case 0: goto IL_63; case 1: arg_6D_0 = ((this.Nanos == other.Nanos) ? -1889582540 : -1031598279); continue; case 2: return false; case 3: return false; case 4: return true; case 5: arg_6D_0 = ((this.Seconds == other.Seconds) ? -1607104054 : -315849016); continue; case 6: return false; case 7: goto IL_AB; } break; } return true; IL_63: arg_6D_0 = -1237393219; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? -2102175788 : -851502069); goto IL_68; } public override int GetHashCode() { int num = 1; while (true) { IL_B8: uint arg_94_0 = 3589131854u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 3896750523u)) % 6u) { case 0u: num ^= this.Seconds.GetHashCode(); arg_94_0 = (num2 * 2651281000u ^ 3407511537u); continue; case 1u: arg_94_0 = (((this.Seconds == 0L) ? 4133384583u : 3204986851u) ^ num2 * 2629093230u); continue; case 3u: num ^= this.Nanos.GetHashCode(); arg_94_0 = (num2 * 2610127473u ^ 4049640222u); continue; case 4u: arg_94_0 = ((this.Nanos != 0) ? 4072392642u : 3202418295u); continue; case 5u: goto IL_B8; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Seconds != 0L) { goto IL_4C; } goto IL_AB; uint arg_78_0; while (true) { IL_73: uint num; switch ((num = (arg_78_0 ^ 3954907304u)) % 6u) { case 0u: goto IL_AB; case 1u: output.WriteRawTag(8); output.WriteInt64(this.Seconds); arg_78_0 = (num * 2275524094u ^ 1130047906u); continue; case 2u: goto IL_4C; case 4u: output.WriteRawTag(16); arg_78_0 = (num * 2048335197u ^ 1784696699u); continue; case 5u: output.WriteInt32(this.Nanos); arg_78_0 = (num * 3492899611u ^ 459278314u); continue; } break; } return; IL_4C: arg_78_0 = 2803527439u; goto IL_73; IL_AB: arg_78_0 = ((this.Nanos == 0) ? 3877533863u : 2952532252u); goto IL_73; } public int CalculateSize() { int num = 0; if (this.Seconds != 0L) { goto IL_5A; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 568531787u)) % 5u) { case 0u: goto IL_5A; case 2u: goto IL_90; case 3u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Nanos); arg_64_0 = (num2 * 484218555u ^ 211908431u); continue; case 4u: num += 1 + CodedOutputStream.ComputeInt64Size(this.Seconds); arg_64_0 = (num2 * 818329190u ^ 2502904544u); continue; } break; } return num; IL_5A: arg_64_0 = 51306289u; goto IL_5F; IL_90: arg_64_0 = ((this.Nanos != 0) ? 40895790u : 1471354504u); goto IL_5F; } public void MergeFrom(Duration other) { if (other == null) { goto IL_51; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 3603750728u)) % 7u) { case 0u: this.Nanos = other.Nanos; arg_76_0 = (num * 3278455818u ^ 1761901619u); continue; case 1u: return; case 3u: goto IL_51; case 4u: goto IL_AD; case 5u: this.Seconds = other.Seconds; arg_76_0 = (num * 698656165u ^ 3033618027u); continue; case 6u: arg_76_0 = ((other.Nanos != 0) ? 3183702140u : 3095319611u); continue; } break; } return; IL_51: arg_76_0 = 3178366053u; goto IL_71; IL_AD: arg_76_0 = ((other.Seconds == 0L) ? 2970826122u : 2728581061u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_103: uint num; uint arg_BF_0 = ((num = input.ReadTag()) != 0u) ? 2033728869u : 1229172373u; while (true) { uint num2; switch ((num2 = (arg_BF_0 ^ 1103088744u)) % 10u) { case 0u: this.Nanos = input.ReadInt32(); arg_BF_0 = 1128464945u; continue; case 2u: arg_BF_0 = (((num == 16u) ? 3747183322u : 4214757864u) ^ num2 * 3309133003u); continue; case 3u: arg_BF_0 = (num2 * 1925888860u ^ 1258598285u); continue; case 4u: input.SkipLastField(); arg_BF_0 = (num2 * 3338416488u ^ 608443663u); continue; case 5u: arg_BF_0 = ((num == 8u) ? 534398182u : 10231084u); continue; case 6u: arg_BF_0 = 2033728869u; continue; case 7u: arg_BF_0 = (num2 * 3311575051u ^ 168001020u); continue; case 8u: this.Seconds = input.ReadInt64(); arg_BF_0 = 186302785u; continue; case 9u: goto IL_103; } return; } } } public TimeSpan ToTimeSpan() { return TimeSpan.FromTicks(checked(this.Seconds * 10000000L + unchecked((long)(this.Nanos / 100)))); } public static Duration FromTimeSpan(TimeSpan timeSpan) { long expr_07 = timeSpan.Ticks; long seconds = expr_07 / 10000000L; int nanos = checked((int)(expr_07 % 10000000L) * 100); return new Duration { Seconds = seconds, Nanos = nanos }; } public static Duration operator -(Duration value) { Preconditions.CheckNotNull<Duration>(value, Module.smethod_36<string>(1095253436u)); return checked(Duration.Normalize(0L - value.Seconds, 0 - value.Nanos)); } public static Duration operator +(Duration lhs, Duration rhs) { Preconditions.CheckNotNull<Duration>(lhs, Module.smethod_37<string>(609340966u)); Preconditions.CheckNotNull<Duration>(rhs, Module.smethod_33<string>(3930884737u)); return checked(Duration.Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos)); } public static Duration operator -(Duration lhs, Duration rhs) { Preconditions.CheckNotNull<Duration>(lhs, Module.smethod_33<string>(287819511u)); Preconditions.CheckNotNull<Duration>(rhs, Module.smethod_37<string>(1339777180u)); return checked(Duration.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos)); } internal static Duration Normalize(long seconds, int nanoseconds) { int num = nanoseconds / 1000000000; seconds += (long)num; while (true) { IL_150: uint arg_11F_0 = 2478481759u; while (true) { uint num2; switch ((num2 = (arg_11F_0 ^ 3818056266u)) % 9u) { case 0u: seconds += 1L; arg_11F_0 = (num2 * 1055736548u ^ 2346364461u); continue; case 2u: nanoseconds -= num * 1000000000; arg_11F_0 = (((seconds >= 0L) ? 3094736784u : 2654501620u) ^ num2 * 1375927109u); continue; case 3u: arg_11F_0 = (((nanoseconds < 0) ? 974085794u : 1116137840u) ^ num2 * 303522645u); continue; case 4u: arg_11F_0 = ((seconds <= 0L) ? 2706682594u : 4161403648u); continue; case 5u: nanoseconds -= 1000000000; arg_11F_0 = (num2 * 1553824198u ^ 1656070296u); continue; case 6u: seconds -= 1L; nanoseconds += 1000000000; arg_11F_0 = (num2 * 3589620177u ^ 965135992u); continue; case 7u: goto IL_150; case 8u: arg_11F_0 = (((nanoseconds <= 0) ? 1597989633u : 1070954060u) ^ num2 * 2479947144u); continue; } goto Block_5; } } Block_5: return new Duration { Seconds = seconds, Nanos = nanoseconds }; } } } <file_sep>/AuthServer.Network/WorldNetwork.cs using Framework.Constants.Misc; using Framework.Logging; using System; using System.Net; using System.Net.Sockets; using System.Runtime.CompilerServices; using System.Threading; namespace AuthServer.Network { public class WorldNetwork { public volatile bool listenSocket = true; private TcpListener listener; public bool Start(string host, int port) { bool result; try { this.listener = WorldNetwork.smethod_1(WorldNetwork.smethod_0(host), port); WorldNetwork.smethod_2(this.listener); result = true; } catch (Exception exception_) { while (true) { IL_87: uint arg_29_0 = 1724732895u; while (true) { uint num; switch ((num = (arg_29_0 ^ 215196056u)) % 4u) { case 0u: Log.Message(); arg_29_0 = (num * 1376418211u ^ 469886417u); continue; case 2u: goto IL_87; case 3u: Log.Message(LogType.Error, Module.smethod_37<string>(2717862335u), new object[] { WorldNetwork.smethod_3(exception_) }); arg_29_0 = (num * 946542784u ^ 1670786100u); continue; } goto Block_3; } } Block_3: result = false; } return result; } public void AcceptConnectionThread() { WorldNetwork.smethod_5(WorldNetwork.smethod_4(new ThreadStart(this.AcceptConnection))); } [AsyncStateMachine(typeof(WorldNetwork.<AcceptConnection>d__4))] private void AcceptConnection() { WorldNetwork.<AcceptConnection>d__4 <AcceptConnection>d__; <AcceptConnection>d__.__4__this = this; while (true) { IL_94: uint arg_70_0 = 4102925469u; while (true) { uint num; switch ((num = (arg_70_0 ^ 2445955702u)) % 6u) { case 0u: <AcceptConnection>d__.__1__state = -1; arg_70_0 = (num * 3555178732u ^ 551048441u); continue; case 1u: <AcceptConnection>d__.__t__builder = AsyncVoidMethodBuilder.Create(); arg_70_0 = (num * 4216505225u ^ 3917185513u); continue; case 2u: { AsyncVoidMethodBuilder __t__builder; __t__builder.Start<WorldNetwork.<AcceptConnection>d__4>(ref <AcceptConnection>d__); arg_70_0 = (num * 1497386464u ^ 1098818976u); continue; } case 3u: { AsyncVoidMethodBuilder __t__builder = <AcceptConnection>d__.__t__builder; arg_70_0 = (num * 3963560649u ^ 1801078611u); continue; } case 5u: goto IL_94; } return; } } } public void AcceptConnectionThread2() { WorldNetwork.smethod_5(WorldNetwork.smethod_4(new ThreadStart(this.AcceptConnection2))); } [AsyncStateMachine(typeof(WorldNetwork.<AcceptConnection2>d__6))] private void AcceptConnection2() { WorldNetwork.<AcceptConnection2>d__6 <AcceptConnection2>d__; <AcceptConnection2>d__.__4__this = this; <AcceptConnection2>d__.__t__builder = AsyncVoidMethodBuilder.Create(); while (true) { IL_7E: uint arg_5E_0 = 2123606309u; while (true) { uint num; switch ((num = (arg_5E_0 ^ 587440242u)) % 5u) { case 0u: goto IL_7E; case 2u: { AsyncVoidMethodBuilder __t__builder = <AcceptConnection2>d__.__t__builder; arg_5E_0 = (num * 995768624u ^ 917102891u); continue; } case 3u: <AcceptConnection2>d__.__1__state = -1; arg_5E_0 = (num * 2447264840u ^ 119976406u); continue; case 4u: { AsyncVoidMethodBuilder __t__builder; __t__builder.Start<WorldNetwork.<AcceptConnection2>d__6>(ref <AcceptConnection2>d__); arg_5E_0 = (num * 973801686u ^ 223050679u); continue; } } return; } } } static IPAddress smethod_0(string string_0) { return IPAddress.Parse(string_0); } static TcpListener smethod_1(IPAddress ipaddress_0, int int_0) { return new TcpListener(ipaddress_0, int_0); } static void smethod_2(TcpListener tcpListener_0) { tcpListener_0.Start(); } static string smethod_3(Exception exception_0) { return exception_0.Message; } static Thread smethod_4(ThreadStart threadStart_0) { return new Thread(threadStart_0); } static void smethod_5(Thread thread_0) { thread_0.Start(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Int32Value.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Int32Value : IMessage<Int32Value>, IEquatable<Int32Value>, IDeepCloneable<Int32Value>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Int32Value.__c __9 = new Int32Value.__c(); internal Int32Value cctor>b__24_0() { return new Int32Value(); } } private static readonly MessageParser<Int32Value> _parser = new MessageParser<Int32Value>(new Func<Int32Value>(Int32Value.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private int value_; public static MessageParser<Int32Value> Parser { get { return Int32Value._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return Int32Value.Descriptor; } } public int Value { get { return this.value_; } set { this.value_ = value; } } public Int32Value() { } public Int32Value(Int32Value other) : this() { while (true) { IL_3E: uint arg_26_0 = 1804220791u; while (true) { uint num; switch ((num = (arg_26_0 ^ 1581900384u)) % 3u) { case 1u: this.value_ = other.value_; arg_26_0 = (num * 4135993735u ^ 2153646638u); continue; case 2u: goto IL_3E; } return; } } } public Int32Value Clone() { return new Int32Value(this); } public override bool Equals(object other) { return this.Equals(other as Int32Value); } public bool Equals(Int32Value other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -1634842932) % 7) { case 1: return false; case 2: goto IL_39; case 3: return false; case 4: arg_43_0 = ((this.Value != other.Value) ? -961057384 : -1124101802); continue; case 5: goto IL_75; case 6: return true; } break; } return true; IL_39: arg_43_0 = -866185177; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? -817733575 : -179295982); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 4135753243u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 2564959002u)) % 4u) { case 0u: goto IL_6C; case 1u: arg_50_0 = (((this.Value == 0) ? 3758658162u : 2951197051u) ^ num2 * 1986698867u); continue; case 2u: num ^= this.Value.GetHashCode(); arg_50_0 = (num2 * 3961316342u ^ 3761227341u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value != 0) { while (true) { IL_47: uint arg_2F_0 = 3572854802u; while (true) { uint num; switch ((num = (arg_2F_0 ^ 3027452947u)) % 3u) { case 0u: goto IL_47; case 1u: output.WriteRawTag(8); output.WriteInt32(this.Value); arg_2F_0 = (num * 1802663389u ^ 3051821361u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.Value != 0) { while (true) { IL_46: uint arg_2E_0 = 852522544u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 2001946324u)) % 3u) { case 0u: goto IL_46; case 2u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Value); arg_2E_0 = (num2 * 2797276253u ^ 3481634520u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(Int32Value other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 541808812u)) % 5u) { case 1u: return; case 2u: goto IL_63; case 3u: goto IL_2D; case 4u: this.Value = other.Value; arg_37_0 = (num * 2378591240u ^ 2143410110u); continue; } break; } return; IL_2D: arg_37_0 = 1089335315u; goto IL_32; IL_63: arg_37_0 = ((other.Value == 0) ? 632715310u : 175303262u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A8: uint num; uint arg_71_0 = ((num = input.ReadTag()) == 0u) ? 919392537u : 937717755u; while (true) { uint num2; switch ((num2 = (arg_71_0 ^ 905453410u)) % 7u) { case 0u: arg_71_0 = 937717755u; continue; case 1u: arg_71_0 = ((num != 8u) ? 1120270762u : 1875403783u); continue; case 2u: this.Value = input.ReadInt32(); arg_71_0 = 146764270u; continue; case 3u: input.SkipLastField(); arg_71_0 = (num2 * 3333569259u ^ 2327061085u); continue; case 5u: arg_71_0 = (num2 * 3984621633u ^ 629657481u); continue; case 6u: goto IL_A8; } return; } } } } } <file_sep>/Bgs.Protocol.UserManager.V1/UserManagerTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public static class UserManagerTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return UserManagerTypesReflection.descriptor; } } static UserManagerTypesReflection() { UserManagerTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(UserManagerTypesReflection.smethod_1(UserManagerTypesReflection.smethod_0(new string[] { Module.smethod_35<string>(840090106u), Module.smethod_36<string>(1055466554u), Module.smethod_37<string>(1606086838u), Module.smethod_37<string>(3154609254u), Module.smethod_36<string>(279899562u), Module.smethod_35<string>(1847452682u), Module.smethod_34<string>(1144076693u), Module.smethod_37<string>(1255486886u), Module.smethod_33<string>(2806252103u), Module.smethod_37<string>(3125667654u), Module.smethod_33<string>(3624408359u) })), new FileDescriptor[] { EntityTypesReflection.Descriptor, AttributeTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(UserManagerTypesReflection.smethod_2(typeof(RecentPlayer).TypeHandle), RecentPlayer.Parser, new string[] { Module.smethod_36<string>(1294600521u), Module.smethod_36<string>(2505595523u), Module.smethod_33<string>(4276310429u), Module.smethod_37<string>(2628974565u), Module.smethod_36<string>(94729931u), Module.smethod_34<string>(3638149518u) }, null, null, null), new GeneratedCodeInfo(UserManagerTypesReflection.smethod_2(typeof(BlockedPlayer).TypeHandle), BlockedPlayer.Parser, new string[] { Module.smethod_35<string>(915065219u), Module.smethod_36<string>(2649665489u), Module.smethod_35<string>(2560812294u), Module.smethod_37<string>(759059036u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GameUtilitiesServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public static class GameUtilitiesServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return GameUtilitiesServiceReflection.descriptor; } } static GameUtilitiesServiceReflection() { GameUtilitiesServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(GameUtilitiesServiceReflection.smethod_1(GameUtilitiesServiceReflection.smethod_0(new string[] { Module.smethod_34<string>(761365721u), Module.smethod_35<string>(3892930358u), Module.smethod_37<string>(3154491370u), Module.smethod_36<string>(1712265446u), Module.smethod_37<string>(3358968714u), Module.smethod_35<string>(1262846582u), Module.smethod_34<string>(2806654329u), Module.smethod_36<string>(3668792230u), Module.smethod_34<string>(2056761433u), Module.smethod_34<string>(931922089u), Module.smethod_33<string>(4267432331u), Module.smethod_36<string>(2094179174u), Module.smethod_34<string>(556975641u), Module.smethod_37<string>(203569146u), Module.smethod_35<string>(3935092678u), Module.smethod_37<string>(1401491610u), Module.smethod_35<string>(4284934310u), Module.smethod_37<string>(2599414074u), Module.smethod_34<string>(2602264249u), Module.smethod_35<string>(2312371478u), Module.smethod_35<string>(1654850534u), Module.smethod_37<string>(4001813882u), Module.smethod_34<string>(1102478457u), Module.smethod_37<string>(904769050u), Module.smethod_37<string>(2453291466u), Module.smethod_36<string>(1306872646u), Module.smethod_34<string>(3897659961u), Module.smethod_33<string>(2530439003u), Module.smethod_33<string>(4268844523u), Module.smethod_37<string>(1518201082u), Module.smethod_36<string>(3704010838u), Module.smethod_35<string>(2143722198u), Module.smethod_37<string>(4264645962u), Module.smethod_33<string>(1712282747u), Module.smethod_34<string>(3419824569u), Module.smethod_34<string>(2294985225u), Module.smethod_34<string>(2669931673u), Module.smethod_37<string>(1021478522u), Module.smethod_33<string>(1814375755u), Module.smethod_33<string>(1916468763u), Module.smethod_37<string>(3767923402u), Module.smethod_35<string>(2493563830u), Module.smethod_33<string>(178063243u), Module.smethod_36<string>(566524262u), Module.smethod_33<string>(2018561771u), Module.smethod_34<string>(2840488041u), Module.smethod_33<string>(2836718027u), Module.smethod_35<string>(213321686u), Module.smethod_35<string>(3850768038u), Module.smethod_37<string>(612523834u), Module.smethod_34<string>(1715648697u), Module.smethod_37<string>(817001178u), Module.smethod_36<string>(3680531766u), Module.smethod_36<string>(2117658246u), Module.smethod_35<string>(2535726150u), Module.smethod_35<string>(3543088726u), Module.smethod_33<string>(1404591531u), Module.smethod_36<string>(4074185030u), Module.smethod_35<string>(4200609670u), Module.smethod_34<string>(1609984137u), Module.smethod_34<string>(1984930585u), Module.smethod_33<string>(1087014971u), Module.smethod_34<string>(1235037689u), Module.smethod_34<string>(110198345u), Module.smethod_36<string>(484347510u), Module.smethod_34<string>(3655272745u), Module.smethod_37<string>(1548557290u), Module.smethod_35<string>(2058264282u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, ContentHandleTypesReflection.Descriptor, EntityTypesReflection.Descriptor, GameUtilitiesTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(ClientRequest).TypeHandle), ClientRequest.Parser, new string[] { Module.smethod_35<string>(1418463188u), Module.smethod_35<string>(2370270415u), Module.smethod_37<string>(1053101983u), Module.smethod_36<string>(1993931775u), Module.smethod_37<string>(700380119u), Module.smethod_37<string>(204512218u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(ClientResponse).TypeHandle), ClientResponse.Parser, new string[] { Module.smethod_37<string>(1754272416u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(ServerRequest).TypeHandle), ServerRequest.Parser, new string[] { Module.smethod_37<string>(1754272416u), Module.smethod_34<string>(3421418748u), Module.smethod_34<string>(4183239592u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(ServerResponse).TypeHandle), ServerResponse.Parser, new string[] { Module.smethod_35<string>(1418463188u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(PresenceChannelCreatedRequest).TypeHandle), PresenceChannelCreatedRequest.Parser, new string[] { Module.smethod_37<string>(1783715023u), Module.smethod_36<string>(1993931775u), Module.smethod_36<string>(4043002107u), Module.smethod_35<string>(2370270415u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GetPlayerVariablesRequest).TypeHandle), GetPlayerVariablesRequest.Parser, new string[] { Module.smethod_34<string>(3186589685u), Module.smethod_34<string>(4183239592u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GetPlayerVariablesResponse).TypeHandle), GetPlayerVariablesResponse.Parser, new string[] { Module.smethod_34<string>(3186589685u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GameAccountOnlineNotification).TypeHandle), GameAccountOnlineNotification.Parser, new string[] { Module.smethod_33<string>(1846560140u), Module.smethod_36<string>(4123806119u), Module.smethod_33<string>(3138256852u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GameAccountOfflineNotification).TypeHandle), GameAccountOfflineNotification.Parser, new string[] { Module.smethod_34<string>(1031416304u), Module.smethod_37<string>(585674675u), Module.smethod_36<string>(544950519u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GetAchievementsFileRequest).TypeHandle), GetAchievementsFileRequest.Parser, new string[] { Module.smethod_33<string>(3022041924u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GetAchievementsFileResponse).TypeHandle), GetAchievementsFileResponse.Parser, new string[] { Module.smethod_33<string>(2703655472u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GetAllValuesForAttributeRequest).TypeHandle), GetAllValuesForAttributeRequest.Parser, new string[] { Module.smethod_37<string>(934948432u), Module.smethod_33<string>(2714350708u), Module.smethod_35<string>(2043171339u) }, null, null, null), new GeneratedCodeInfo(GameUtilitiesServiceReflection.smethod_2(typeof(GetAllValuesForAttributeResponse).TypeHandle), GetAllValuesForAttributeResponse.Parser, new string[] { Module.smethod_37<string>(2395820860u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmEntry.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmEntry { [DataMember(Name = "wowRealmAddress")] public int WowRealmAddress { get; set; } [DataMember(Name = "cfgTimezonesID")] public int CfgTimezonesID { get; set; } [DataMember(Name = "populationState")] public int PopulationState { get; set; } [DataMember(Name = "cfgCategoriesID")] public int CfgCategoriesID { get; set; } [DataMember(Name = "version")] public ClientVersion Version { get; set; } [DataMember(Name = "cfgRealmsID")] public int CfgRealmsID { get; set; } [DataMember(Name = "flags")] public int Flags { get; set; } [DataMember(Name = "name")] public string Name { get; set; } [DataMember(Name = "cfgConfigsID")] public int CfgConfigsID { get; set; } [DataMember(Name = "cfgLanguagesID")] public int CfgLanguagesID { get; set; } } } <file_sep>/Google.Protobuf/FrameworkPortability.cs using System; using System.Text.RegularExpressions; namespace Google.Protobuf { internal static class FrameworkPortability { internal static readonly RegexOptions CompiledRegexWhereAvailable; static FrameworkPortability() { // Note: this type is marked as 'beforefieldinit'. RegexOptions arg_3B_0; if (FrameworkPortability.smethod_1(FrameworkPortability.smethod_0(typeof(RegexOptions).TypeHandle), 8)) { arg_3B_0 = RegexOptions.Compiled; goto IL_3B; } IL_1A: int arg_24_0 = -1246723805; IL_1F: switch ((arg_24_0 ^ -1681007982) % 3) { case 1: arg_3B_0 = RegexOptions.None; goto IL_3B; case 2: goto IL_1A; } return; IL_3B: FrameworkPortability.CompiledRegexWhereAvailable = arg_3B_0; arg_24_0 = -519226386; goto IL_1F; } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static bool smethod_1(Type type_0, object object_0) { return Enum.IsDefined(type_0, object_0); } } } <file_sep>/AuthServer.AuthServer.JsonObjects/AuthenticationState.cs using System; namespace AuthServer.AuthServer.JsonObjects { public static class AuthenticationState { public static string Done { get { return Module.smethod_35<string>(1920161243u); } } public static string Authenticator { get { return Module.smethod_36<string>(1330576745u); } } public static string Legal { get { return Module.smethod_37<string>(615235166u); } } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/ClientInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class ClientInfo : IMessage<ClientInfo>, IEquatable<ClientInfo>, IDeepCloneable<ClientInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ClientInfo.__c __9 = new ClientInfo.__c(); internal ClientInfo cctor>b__29_0() { return new ClientInfo(); } } private static readonly MessageParser<ClientInfo> _parser = new MessageParser<ClientInfo>(new Func<ClientInfo>(ClientInfo.__c.__9.<.cctor>b__29_0)); public const int ClientAddressFieldNumber = 1; private string clientAddress_ = ""; public const int PrivilegedNetworkFieldNumber = 2; private bool privilegedNetwork_; public static MessageParser<ClientInfo> Parser { get { return ClientInfo._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return ClientInfo.Descriptor; } } public string ClientAddress { get { return this.clientAddress_; } set { this.clientAddress_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public bool PrivilegedNetwork { get { return this.privilegedNetwork_; } set { this.privilegedNetwork_ = value; } } public ClientInfo() { } public ClientInfo(ClientInfo other) : this() { this.clientAddress_ = other.clientAddress_; this.privilegedNetwork_ = other.privilegedNetwork_; } public ClientInfo Clone() { return new ClientInfo(this); } public override bool Equals(object other) { return this.Equals(other as ClientInfo); } public bool Equals(ClientInfo other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1514667057) % 9) { case 0: arg_72_0 = (ClientInfo.smethod_0(this.ClientAddress, other.ClientAddress) ? 1289140314 : 992735732); continue; case 1: goto IL_B0; case 3: return false; case 4: arg_72_0 = ((this.PrivilegedNetwork != other.PrivilegedNetwork) ? 1592151054 : 1631885719); continue; case 5: return true; case 6: goto IL_15; case 7: return false; case 8: return false; } break; } return true; IL_15: arg_72_0 = 1657040522; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 1143072667 : 755870066); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_BA: uint arg_96_0 = 1823374571u; while (true) { uint num2; switch ((num2 = (arg_96_0 ^ 1321231823u)) % 6u) { case 0u: arg_96_0 = ((!this.PrivilegedNetwork) ? 207524005u : 1086297652u); continue; case 1u: num ^= ClientInfo.smethod_2(this.ClientAddress); arg_96_0 = (num2 * 2043642343u ^ 807606238u); continue; case 3u: goto IL_BA; case 4u: arg_96_0 = (((ClientInfo.smethod_1(this.ClientAddress) == 0) ? 2177702765u : 2515048394u) ^ num2 * 1321300658u); continue; case 5u: num ^= this.PrivilegedNetwork.GetHashCode(); arg_96_0 = (num2 * 1899890417u ^ 2343043566u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (ClientInfo.smethod_1(this.ClientAddress) != 0) { goto IL_1F; } goto IL_B1; uint arg_7E_0; while (true) { IL_79: uint num; switch ((num = (arg_7E_0 ^ 1938423419u)) % 6u) { case 0u: goto IL_B1; case 1u: output.WriteRawTag(16); output.WriteBool(this.PrivilegedNetwork); arg_7E_0 = (num * 2766376552u ^ 893404676u); continue; case 2u: output.WriteString(this.ClientAddress); arg_7E_0 = (num * 3495520935u ^ 4176448973u); continue; case 4u: output.WriteRawTag(10); arg_7E_0 = (num * 2816689618u ^ 1823954087u); continue; case 5u: goto IL_1F; } break; } return; IL_1F: arg_7E_0 = 1112956587u; goto IL_79; IL_B1: arg_7E_0 = (this.PrivilegedNetwork ? 1272861666u : 1305748012u); goto IL_79; } public int CalculateSize() { int num = 0; while (true) { IL_AF: uint arg_8B_0 = 1342505967u; while (true) { uint num2; switch ((num2 = (arg_8B_0 ^ 24834948u)) % 6u) { case 0u: num += 2; arg_8B_0 = (num2 * 2419191727u ^ 99368886u); continue; case 1u: arg_8B_0 = (this.PrivilegedNetwork ? 1890929270u : 1996961240u); continue; case 3u: arg_8B_0 = (((ClientInfo.smethod_1(this.ClientAddress) == 0) ? 3309154074u : 3061107233u) ^ num2 * 2924625883u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.ClientAddress); arg_8B_0 = (num2 * 3038495357u ^ 840101359u); continue; case 5u: goto IL_AF; } return num; } } return num; } public void MergeFrom(ClientInfo other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 3568210730u)) % 7u) { case 0u: goto IL_6C; case 1u: this.PrivilegedNetwork = other.PrivilegedNetwork; arg_76_0 = (num * 1042289466u ^ 3457584430u); continue; case 2u: return; case 4u: this.ClientAddress = other.ClientAddress; arg_76_0 = (num * 3636611980u ^ 2163706387u); continue; case 5u: arg_76_0 = (other.PrivilegedNetwork ? 3978792791u : 3319477884u); continue; case 6u: goto IL_AD; } break; } return; IL_6C: arg_76_0 = 2344942335u; goto IL_71; IL_AD: arg_76_0 = ((ClientInfo.smethod_1(other.ClientAddress) == 0) ? 3080997827u : 2412380374u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_101: uint num; uint arg_BD_0 = ((num = input.ReadTag()) != 0u) ? 3626875460u : 2974083244u; while (true) { uint num2; switch ((num2 = (arg_BD_0 ^ 3105662621u)) % 10u) { case 0u: goto IL_101; case 1u: arg_BD_0 = ((num != 10u) ? 4097903230u : 3981918152u); continue; case 2u: arg_BD_0 = (num2 * 2884474460u ^ 392941161u); continue; case 4u: arg_BD_0 = (num2 * 2812153409u ^ 445760985u); continue; case 5u: arg_BD_0 = 3626875460u; continue; case 6u: input.SkipLastField(); arg_BD_0 = (num2 * 290076299u ^ 1242981091u); continue; case 7u: this.ClientAddress = input.ReadString(); arg_BD_0 = 3421214075u; continue; case 8u: this.PrivilegedNetwork = input.ReadBool(); arg_BD_0 = 3225855169u; continue; case 9u: arg_BD_0 = (((num == 16u) ? 2084529400u : 437404722u) ^ num2 * 519018431u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GetGameTimeRemainingInfoRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetGameTimeRemainingInfoRequest : IMessage<GetGameTimeRemainingInfoRequest>, IEquatable<GetGameTimeRemainingInfoRequest>, IDeepCloneable<GetGameTimeRemainingInfoRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetGameTimeRemainingInfoRequest.__c __9 = new GetGameTimeRemainingInfoRequest.__c(); internal GetGameTimeRemainingInfoRequest cctor>b__29_0() { return new GetGameTimeRemainingInfoRequest(); } } private static readonly MessageParser<GetGameTimeRemainingInfoRequest> _parser = new MessageParser<GetGameTimeRemainingInfoRequest>(new Func<GetGameTimeRemainingInfoRequest>(GetGameTimeRemainingInfoRequest.__c.__9.<.cctor>b__29_0)); public const int GameAccountIdFieldNumber = 1; private EntityId gameAccountId_; public const int AccountIdFieldNumber = 2; private EntityId accountId_; public static MessageParser<GetGameTimeRemainingInfoRequest> Parser { get { return GetGameTimeRemainingInfoRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[21]; } } MessageDescriptor IMessage.Descriptor { get { return GetGameTimeRemainingInfoRequest.Descriptor; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public GetGameTimeRemainingInfoRequest() { } public GetGameTimeRemainingInfoRequest(GetGameTimeRemainingInfoRequest other) : this() { this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); } public GetGameTimeRemainingInfoRequest Clone() { return new GetGameTimeRemainingInfoRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetGameTimeRemainingInfoRequest); } public bool Equals(GetGameTimeRemainingInfoRequest other) { if (other == null) { goto IL_41; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1517058990) % 9) { case 0: return false; case 1: goto IL_B5; case 2: return false; case 3: arg_77_0 = ((!GetGameTimeRemainingInfoRequest.smethod_0(this.AccountId, other.AccountId)) ? -978301388 : -1994741518); continue; case 4: goto IL_41; case 5: return true; case 6: return false; case 8: arg_77_0 = (GetGameTimeRemainingInfoRequest.smethod_0(this.GameAccountId, other.GameAccountId) ? -808644376 : -2021966820); continue; } break; } return true; IL_41: arg_77_0 = -2015329889; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -743007050 : -42957657); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_B2: uint arg_8E_0 = 1381888284u; while (true) { uint num2; switch ((num2 = (arg_8E_0 ^ 1145162271u)) % 6u) { case 0u: goto IL_B2; case 1u: arg_8E_0 = (((this.gameAccountId_ == null) ? 3663141773u : 3267568540u) ^ num2 * 1538832382u); continue; case 3u: num ^= GetGameTimeRemainingInfoRequest.smethod_1(this.GameAccountId); arg_8E_0 = (num2 * 569055248u ^ 488469991u); continue; case 4u: arg_8E_0 = ((this.accountId_ == null) ? 49524989u : 820983600u); continue; case 5u: num ^= GetGameTimeRemainingInfoRequest.smethod_1(this.AccountId); arg_8E_0 = (num2 * 527934718u ^ 1129963615u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameAccountId_ != null) { goto IL_60; } goto IL_96; uint arg_6A_0; while (true) { IL_65: uint num; switch ((num = (arg_6A_0 ^ 759228003u)) % 5u) { case 0u: goto IL_60; case 2u: goto IL_96; case 3u: output.WriteRawTag(18); output.WriteMessage(this.AccountId); arg_6A_0 = (num * 1100974186u ^ 4064306056u); continue; case 4u: output.WriteRawTag(10); output.WriteMessage(this.GameAccountId); arg_6A_0 = (num * 1011080418u ^ 2760688178u); continue; } break; } return; IL_60: arg_6A_0 = 2053200718u; goto IL_65; IL_96: arg_6A_0 = ((this.accountId_ != null) ? 2112735944u : 1659123014u); goto IL_65; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 1738476822u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 2089167117u)) % 6u) { case 0u: goto IL_B6; case 1u: arg_92_0 = (((this.gameAccountId_ != null) ? 699359674u : 1481475333u) ^ num2 * 4277952093u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_92_0 = (num2 * 2021288086u ^ 3517502106u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_92_0 = (num2 * 1071429732u ^ 1863189449u); continue; case 5u: arg_92_0 = ((this.accountId_ == null) ? 1780621493u : 762082490u); continue; } return num; } } return num; } public void MergeFrom(GetGameTimeRemainingInfoRequest other) { if (other == null) { goto IL_8F; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 3437735838u)) % 11u) { case 1u: arg_105_0 = (((this.accountId_ == null) ? 399400020u : 1903696825u) ^ num * 3388732586u); continue; case 2u: arg_105_0 = (((this.gameAccountId_ != null) ? 4115069245u : 3879778918u) ^ num * 668875594u); continue; case 3u: this.accountId_ = new EntityId(); arg_105_0 = (num * 320870621u ^ 1201506515u); continue; case 4u: goto IL_8F; case 5u: this.AccountId.MergeFrom(other.AccountId); arg_105_0 = 3753284106u; continue; case 6u: this.gameAccountId_ = new EntityId(); arg_105_0 = (num * 4105074833u ^ 3929834117u); continue; case 7u: goto IL_14D; case 8u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_105_0 = 3832924732u; continue; case 9u: return; case 10u: arg_105_0 = ((other.accountId_ != null) ? 2499070675u : 3753284106u); continue; } break; } return; IL_8F: arg_105_0 = 3213498114u; goto IL_100; IL_14D: arg_105_0 = ((other.gameAccountId_ == null) ? 3832924732u : 3219385976u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) == 0u) ? 3311766440u : 4184912952u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 3416525215u)) % 14u) { case 0u: arg_145_0 = 4184912952u; continue; case 1u: input.SkipLastField(); arg_145_0 = (num2 * 116751891u ^ 1139354191u); continue; case 2u: this.gameAccountId_ = new EntityId(); arg_145_0 = (num2 * 3449235869u ^ 3719633007u); continue; case 3u: arg_145_0 = ((this.gameAccountId_ != null) ? 3572878971u : 2803639739u); continue; case 4u: arg_145_0 = ((this.accountId_ == null) ? 3462671831u : 3602344126u); continue; case 5u: input.ReadMessage(this.accountId_); arg_145_0 = 3062920101u; continue; case 6u: input.ReadMessage(this.gameAccountId_); arg_145_0 = 2828758492u; continue; case 7u: arg_145_0 = (num2 * 2074479364u ^ 3079954961u); continue; case 8u: arg_145_0 = (((num != 18u) ? 3928668132u : 3219919795u) ^ num2 * 4130342853u); continue; case 10u: this.accountId_ = new EntityId(); arg_145_0 = (num2 * 2595496630u ^ 3099341710u); continue; case 11u: arg_145_0 = ((num != 10u) ? 4247090651u : 4025045030u); continue; case 12u: goto IL_199; case 13u: arg_145_0 = (num2 * 3229272188u ^ 375823313u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/LogonRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class LogonRequest : IMessage<LogonRequest>, IEquatable<LogonRequest>, IDeepCloneable<LogonRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly LogonRequest.__c __9 = new LogonRequest.__c(); internal LogonRequest cctor>b__89_0() { return new LogonRequest(); } } private static readonly MessageParser<LogonRequest> _parser = new MessageParser<LogonRequest>(new Func<LogonRequest>(LogonRequest.__c.__9.<.cctor>b__89_0)); public const int ProgramFieldNumber = 1; private string program_ = ""; public const int PlatformFieldNumber = 2; private string platform_ = ""; public const int LocaleFieldNumber = 3; private string locale_ = ""; public const int EmailFieldNumber = 4; private string email_ = ""; public const int VersionFieldNumber = 5; private string version_ = ""; public const int ApplicationVersionFieldNumber = 6; private int applicationVersion_; public const int PublicComputerFieldNumber = 7; private bool publicComputer_; public const int SsoIdFieldNumber = 8; private ByteString ssoId_ = ByteString.Empty; public const int DisconnectOnCookieFailFieldNumber = 9; private bool disconnectOnCookieFail_; public const int AllowLogonQueueNotificationsFieldNumber = 10; private bool allowLogonQueueNotifications_; public const int WebClientVerificationFieldNumber = 11; private bool webClientVerification_; public const int CachedWebCredentialsFieldNumber = 12; private ByteString cachedWebCredentials_ = ByteString.Empty; public const int EnableCookieFieldNumber = 13; private bool enableCookie_; public const int UserAgentFieldNumber = 14; private string userAgent_ = ""; public static MessageParser<LogonRequest> Parser { get { return LogonRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return LogonRequest.Descriptor; } } public string Program { get { return this.program_; } set { this.program_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string Platform { get { return this.platform_; } set { this.platform_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string Locale { get { return this.locale_; } set { this.locale_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string Email { get { return this.email_; } set { this.email_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string Version { get { return this.version_; } set { this.version_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public int ApplicationVersion { get { return this.applicationVersion_; } set { this.applicationVersion_ = value; } } public bool PublicComputer { get { return this.publicComputer_; } set { this.publicComputer_ = value; } } public ByteString SsoId { get { return this.ssoId_; } set { this.ssoId_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public bool DisconnectOnCookieFail { get { return this.disconnectOnCookieFail_; } set { this.disconnectOnCookieFail_ = value; } } public bool AllowLogonQueueNotifications { get { return this.allowLogonQueueNotifications_; } set { this.allowLogonQueueNotifications_ = value; } } public bool WebClientVerification { get { return this.webClientVerification_; } set { this.webClientVerification_ = value; } } public ByteString CachedWebCredentials { get { return this.cachedWebCredentials_; } set { this.cachedWebCredentials_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_36<string>(1095253436u)); } } public bool EnableCookie { get { return this.enableCookie_; } set { this.enableCookie_ = value; } } public string UserAgent { get { return this.userAgent_; } set { this.userAgent_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public LogonRequest() { } public LogonRequest(LogonRequest other) : this() { this.program_ = other.program_; this.platform_ = other.platform_; this.locale_ = other.locale_; this.email_ = other.email_; this.version_ = other.version_; this.applicationVersion_ = other.applicationVersion_; this.publicComputer_ = other.publicComputer_; this.ssoId_ = other.ssoId_; this.disconnectOnCookieFail_ = other.disconnectOnCookieFail_; this.allowLogonQueueNotifications_ = other.allowLogonQueueNotifications_; this.webClientVerification_ = other.webClientVerification_; this.cachedWebCredentials_ = other.cachedWebCredentials_; this.enableCookie_ = other.enableCookie_; this.userAgent_ = other.userAgent_; } public LogonRequest Clone() { return new LogonRequest(this); } public override bool Equals(object other) { return this.Equals(other as LogonRequest); } public bool Equals(LogonRequest other) { if (other == null) { goto IL_71; } goto IL_32B; int arg_28D_0; while (true) { IL_288: switch ((arg_28D_0 ^ -624451415) % 33) { case 0: arg_28D_0 = ((this.WebClientVerification == other.WebClientVerification) ? -353878660 : -1864779478); continue; case 1: arg_28D_0 = ((this.ApplicationVersion != other.ApplicationVersion) ? -1030451853 : -258771384); continue; case 2: arg_28D_0 = ((this.EnableCookie != other.EnableCookie) ? -1704431050 : -501403937); continue; case 3: arg_28D_0 = ((!LogonRequest.smethod_0(this.UserAgent, other.UserAgent)) ? -591818468 : -1358269044); continue; case 4: arg_28D_0 = ((!(this.SsoId != other.SsoId)) ? -637904810 : -1736154970); continue; case 5: arg_28D_0 = (LogonRequest.smethod_0(this.Email, other.Email) ? -1137417963 : -1008167692); continue; case 6: arg_28D_0 = ((!LogonRequest.smethod_0(this.Locale, other.Locale)) ? -435315410 : -2060443906); continue; case 7: arg_28D_0 = ((this.PublicComputer == other.PublicComputer) ? -1374669678 : -1504192134); continue; case 8: goto IL_32B; case 9: arg_28D_0 = (LogonRequest.smethod_0(this.Platform, other.Platform) ? -2060040324 : -955429483); continue; case 10: return false; case 11: return false; case 12: arg_28D_0 = ((this.DisconnectOnCookieFail != other.DisconnectOnCookieFail) ? -958646142 : -1505910930); continue; case 13: return false; case 14: arg_28D_0 = (LogonRequest.smethod_0(this.Program, other.Program) ? -146508907 : -90196792); continue; case 15: return false; case 16: arg_28D_0 = ((!LogonRequest.smethod_0(this.Version, other.Version)) ? -1202206414 : -1882836376); continue; case 17: return false; case 18: return false; case 19: goto IL_71; case 20: return false; case 21: return false; case 22: return false; case 23: return true; case 24: arg_28D_0 = ((this.AllowLogonQueueNotifications != other.AllowLogonQueueNotifications) ? -29951448 : -1774023606); continue; case 25: return false; case 26: return false; case 27: arg_28D_0 = ((!(this.CachedWebCredentials != other.CachedWebCredentials)) ? -1969595501 : -1266888876); continue; case 28: return false; case 30: return false; case 31: return false; case 32: return false; } break; } return true; IL_71: arg_28D_0 = -15379332; goto IL_288; IL_32B: arg_28D_0 = ((other == this) ? -2146521164 : -1223100167); goto IL_288; } public override int GetHashCode() { int num = 1; if (LogonRequest.smethod_1(this.Program) != 0) { goto IL_281; } goto IL_455; uint arg_3C5_0; while (true) { IL_3C0: uint num2; switch ((num2 = (arg_3C5_0 ^ 4274907584u)) % 29u) { case 0u: arg_3C5_0 = (this.EnableCookie ? 2209659900u : 3057852752u); continue; case 1u: num ^= LogonRequest.smethod_2(this.Email); arg_3C5_0 = (num2 * 1385320006u ^ 1591686055u); continue; case 2u: num ^= this.AllowLogonQueueNotifications.GetHashCode(); arg_3C5_0 = (num2 * 276360317u ^ 3021235159u); continue; case 3u: num ^= LogonRequest.smethod_2(this.Platform); arg_3C5_0 = (num2 * 3883172438u ^ 1734514181u); continue; case 4u: arg_3C5_0 = ((LogonRequest.smethod_1(this.Locale) == 0) ? 3544159768u : 2974693986u); continue; case 5u: arg_3C5_0 = (this.AllowLogonQueueNotifications ? 2639383172u : 4018899939u); continue; case 6u: arg_3C5_0 = ((LogonRequest.smethod_1(this.Email) != 0) ? 3587599993u : 2294040881u); continue; case 7u: num ^= this.SsoId.GetHashCode(); arg_3C5_0 = (num2 * 129551555u ^ 530497536u); continue; case 8u: arg_3C5_0 = ((this.SsoId.Length == 0) ? 2393722678u : 2313449810u); continue; case 9u: goto IL_281; case 10u: arg_3C5_0 = ((this.ApplicationVersion == 0) ? 2420401895u : 3695984682u); continue; case 11u: arg_3C5_0 = (this.WebClientVerification ? 3367259008u : 4171697669u); continue; case 12u: num ^= this.UserAgent.GetHashCode(); arg_3C5_0 = (num2 * 564731163u ^ 2098669655u); continue; case 13u: num ^= this.EnableCookie.GetHashCode(); arg_3C5_0 = (num2 * 29123883u ^ 648109380u); continue; case 14u: arg_3C5_0 = ((this.CachedWebCredentials.Length == 0) ? 3057888431u : 4109558594u); continue; case 15u: arg_3C5_0 = ((LogonRequest.smethod_1(this.Version) == 0) ? 2644340678u : 4087937896u); continue; case 16u: arg_3C5_0 = ((this.UserAgent.Length != 0) ? 3626327906u : 2537207105u); continue; case 17u: num ^= this.ApplicationVersion.GetHashCode(); arg_3C5_0 = (num2 * 1964770727u ^ 37424961u); continue; case 18u: num ^= LogonRequest.smethod_2(this.Locale); arg_3C5_0 = (num2 * 394351375u ^ 1271364198u); continue; case 19u: arg_3C5_0 = ((!this.PublicComputer) ? 3091421971u : 3202183215u); continue; case 20u: goto IL_455; case 21u: num ^= LogonRequest.smethod_2(this.Version); arg_3C5_0 = (num2 * 2608728721u ^ 4063710958u); continue; case 22u: num ^= this.DisconnectOnCookieFail.GetHashCode(); arg_3C5_0 = (num2 * 1220219704u ^ 1356250362u); continue; case 23u: num ^= this.PublicComputer.GetHashCode(); arg_3C5_0 = (num2 * 1113759175u ^ 1049518298u); continue; case 24u: num ^= this.WebClientVerification.GetHashCode(); arg_3C5_0 = (num2 * 1145498210u ^ 2667156101u); continue; case 25u: arg_3C5_0 = (this.DisconnectOnCookieFail ? 2887504392u : 2696042298u); continue; case 26u: num ^= LogonRequest.smethod_2(this.Program); arg_3C5_0 = (num2 * 3029002064u ^ 3791947398u); continue; case 28u: num ^= this.CachedWebCredentials.GetHashCode(); arg_3C5_0 = (num2 * 2176089512u ^ 3500930047u); continue; } break; } return num; IL_281: arg_3C5_0 = 3290500878u; goto IL_3C0; IL_455: arg_3C5_0 = ((LogonRequest.smethod_1(this.Platform) != 0) ? 3618536814u : 3199129713u); goto IL_3C0; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (LogonRequest.smethod_1(this.Program) != 0) { goto IL_49A; } goto IL_558; uint arg_4A4_0; while (true) { IL_49F: uint num; switch ((num = (arg_4A4_0 ^ 551742756u)) % 38u) { case 0u: goto IL_49A; case 1u: arg_4A4_0 = ((!this.EnableCookie) ? 2113981662u : 386258971u); continue; case 2u: output.WriteString(this.Platform); arg_4A4_0 = (num * 3766197311u ^ 1615202062u); continue; case 3u: output.WriteRawTag(98); arg_4A4_0 = (num * 1168921667u ^ 3342890475u); continue; case 4u: arg_4A4_0 = (this.AllowLogonQueueNotifications ? 1184087411u : 1988075115u); continue; case 5u: output.WriteRawTag(26); output.WriteString(this.Locale); arg_4A4_0 = (num * 1746083287u ^ 3268132534u); continue; case 6u: arg_4A4_0 = (this.DisconnectOnCookieFail ? 1955983995u : 769054282u); continue; case 7u: output.WriteRawTag(10); output.WriteString(this.Program); arg_4A4_0 = (num * 2858193803u ^ 3678218205u); continue; case 8u: output.WriteRawTag(42); output.WriteString(this.Version); arg_4A4_0 = (num * 2940775595u ^ 1029533728u); continue; case 9u: output.WriteRawTag(104); arg_4A4_0 = (num * 2148026300u ^ 1943758644u); continue; case 10u: output.WriteRawTag(114); arg_4A4_0 = (num * 695238446u ^ 2556537128u); continue; case 11u: arg_4A4_0 = (this.PublicComputer ? 1713071853u : 679089981u); continue; case 12u: output.WriteRawTag(34); arg_4A4_0 = (num * 87125895u ^ 2961465305u); continue; case 13u: arg_4A4_0 = ((this.SsoId.Length == 0) ? 2076049822u : 1535486430u); continue; case 14u: output.WriteBool(this.EnableCookie); arg_4A4_0 = (num * 2800021785u ^ 221790698u); continue; case 15u: output.WriteRawTag(80); arg_4A4_0 = (num * 4216925864u ^ 3049821537u); continue; case 16u: output.WriteString(this.UserAgent); arg_4A4_0 = (num * 3805668281u ^ 4122465780u); continue; case 17u: output.WriteRawTag(88); arg_4A4_0 = (num * 295366989u ^ 242132432u); continue; case 18u: output.WriteBytes(this.CachedWebCredentials); arg_4A4_0 = (num * 1137512744u ^ 1615381031u); continue; case 19u: arg_4A4_0 = ((LogonRequest.smethod_1(this.Email) != 0) ? 762225298u : 13726793u); continue; case 20u: arg_4A4_0 = ((LogonRequest.smethod_1(this.Locale) == 0) ? 826289281u : 1751125893u); continue; case 21u: arg_4A4_0 = ((this.CachedWebCredentials.Length != 0) ? 1234955303u : 1420278999u); continue; case 22u: goto IL_558; case 23u: output.WriteBool(this.PublicComputer); arg_4A4_0 = (num * 365761376u ^ 1829959581u); continue; case 25u: output.WriteBool(this.AllowLogonQueueNotifications); arg_4A4_0 = (num * 383173599u ^ 3086236520u); continue; case 26u: output.WriteRawTag(18); arg_4A4_0 = (num * 1396190342u ^ 373718400u); continue; case 27u: arg_4A4_0 = ((LogonRequest.smethod_1(this.Version) != 0) ? 270831956u : 1122840304u); continue; case 28u: output.WriteRawTag(48); arg_4A4_0 = (num * 605244989u ^ 1541056270u); continue; case 29u: output.WriteString(this.Email); arg_4A4_0 = (num * 533436969u ^ 1513685846u); continue; case 30u: arg_4A4_0 = ((this.ApplicationVersion == 0) ? 669740287u : 1910244154u); continue; case 31u: arg_4A4_0 = ((!this.WebClientVerification) ? 1705799969u : 902962751u); continue; case 32u: output.WriteInt32(this.ApplicationVersion); arg_4A4_0 = (num * 991911570u ^ 1778817063u); continue; case 33u: output.WriteRawTag(56); arg_4A4_0 = (num * 2179831287u ^ 1525468692u); continue; case 34u: output.WriteRawTag(66); output.WriteBytes(this.SsoId); arg_4A4_0 = (num * 4292429565u ^ 3563816588u); continue; case 35u: output.WriteBool(this.WebClientVerification); arg_4A4_0 = (num * 3053403724u ^ 622573285u); continue; case 36u: arg_4A4_0 = ((LogonRequest.smethod_1(this.UserAgent) != 0) ? 793732044u : 130392360u); continue; case 37u: output.WriteRawTag(72); output.WriteBool(this.DisconnectOnCookieFail); arg_4A4_0 = (num * 1631592045u ^ 4008946489u); continue; } break; } return; IL_49A: arg_4A4_0 = 947973875u; goto IL_49F; IL_558: arg_4A4_0 = ((LogonRequest.smethod_1(this.Platform) != 0) ? 822527472u : 282087338u); goto IL_49F; } public int CalculateSize() { int num = 0; while (true) { IL_448: uint arg_3C3_0 = 835489097u; while (true) { uint num2; switch ((num2 = (arg_3C3_0 ^ 1073333089u)) % 30u) { case 0u: arg_3C3_0 = ((LogonRequest.smethod_1(this.Locale) != 0) ? 1682846710u : 1375466767u); continue; case 1u: arg_3C3_0 = ((!this.AllowLogonQueueNotifications) ? 1734522112u : 84415537u); continue; case 2u: num += 2; arg_3C3_0 = (num2 * 228148763u ^ 4283351000u); continue; case 3u: arg_3C3_0 = ((this.CachedWebCredentials.Length == 0) ? 2007374073u : 1984595259u); continue; case 4u: arg_3C3_0 = ((this.SsoId.Length == 0) ? 1083234918u : 1506231760u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.Locale); arg_3C3_0 = (num2 * 2547495170u ^ 1432534305u); continue; case 6u: arg_3C3_0 = ((LogonRequest.smethod_1(this.Email) != 0) ? 935517770u : 592690942u); continue; case 7u: arg_3C3_0 = ((LogonRequest.smethod_1(this.Platform) != 0) ? 1676855956u : 1952137697u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.Version); arg_3C3_0 = (num2 * 3957165519u ^ 2958375817u); continue; case 9u: arg_3C3_0 = (this.DisconnectOnCookieFail ? 1963824673u : 354075160u); continue; case 10u: num += 1 + CodedOutputStream.ComputeInt32Size(this.ApplicationVersion); arg_3C3_0 = (num2 * 1606888652u ^ 1237266930u); continue; case 11u: num += 2; arg_3C3_0 = (num2 * 4112265570u ^ 1286277208u); continue; case 12u: num += 1 + CodedOutputStream.ComputeStringSize(this.Program); arg_3C3_0 = (num2 * 2620516617u ^ 2997328208u); continue; case 13u: num += 2; arg_3C3_0 = (num2 * 1738582862u ^ 3498452591u); continue; case 14u: num += 1 + CodedOutputStream.ComputeStringSize(this.UserAgent); arg_3C3_0 = (num2 * 1432016956u ^ 3357586970u); continue; case 16u: arg_3C3_0 = ((LogonRequest.smethod_1(this.UserAgent) == 0) ? 80842130u : 707024799u); continue; case 17u: arg_3C3_0 = ((LogonRequest.smethod_1(this.Version) != 0) ? 1118784359u : 1095004499u); continue; case 18u: arg_3C3_0 = ((this.ApplicationVersion != 0) ? 1794576771u : 1443091946u); continue; case 19u: num += 1 + CodedOutputStream.ComputeStringSize(this.Email); arg_3C3_0 = (num2 * 2333523838u ^ 568250068u); continue; case 20u: arg_3C3_0 = (((LogonRequest.smethod_1(this.Program) != 0) ? 3180012199u : 2483911046u) ^ num2 * 2096727127u); continue; case 21u: arg_3C3_0 = (this.PublicComputer ? 840006018u : 68727877u); continue; case 22u: num += 1 + CodedOutputStream.ComputeBytesSize(this.CachedWebCredentials); arg_3C3_0 = (num2 * 1048721411u ^ 3986136055u); continue; case 23u: arg_3C3_0 = ((!this.WebClientVerification) ? 781176022u : 569682710u); continue; case 24u: num += 2; arg_3C3_0 = (num2 * 794839526u ^ 1053816032u); continue; case 25u: num += 1 + CodedOutputStream.ComputeBytesSize(this.SsoId); arg_3C3_0 = (num2 * 596802020u ^ 3789243586u); continue; case 26u: num += 2; arg_3C3_0 = (num2 * 1777775339u ^ 1561356697u); continue; case 27u: num += 1 + CodedOutputStream.ComputeStringSize(this.Platform); arg_3C3_0 = (num2 * 1499882127u ^ 3166902330u); continue; case 28u: arg_3C3_0 = ((!this.EnableCookie) ? 884220617u : 739389073u); continue; case 29u: goto IL_448; } return num; } } return num; } public void MergeFrom(LogonRequest other) { if (other == null) { goto IL_5F; } goto IL_449; uint arg_3B1_0; while (true) { IL_3AC: uint num; switch ((num = (arg_3B1_0 ^ 45632921u)) % 31u) { case 0u: arg_3B1_0 = (other.PublicComputer ? 923119839u : 1599375736u); continue; case 1u: this.Version = other.Version; arg_3B1_0 = (num * 2046754500u ^ 831183556u); continue; case 2u: arg_3B1_0 = ((other.SsoId.Length == 0) ? 2040341273u : 1405205536u); continue; case 3u: this.PublicComputer = other.PublicComputer; arg_3B1_0 = (num * 2119225334u ^ 2171105852u); continue; case 4u: arg_3B1_0 = ((!other.EnableCookie) ? 692042171u : 797282795u); continue; case 5u: this.DisconnectOnCookieFail = other.DisconnectOnCookieFail; arg_3B1_0 = (num * 2948458062u ^ 1337742618u); continue; case 6u: goto IL_449; case 7u: arg_3B1_0 = (other.AllowLogonQueueNotifications ? 1138519231u : 255472494u); continue; case 8u: this.CachedWebCredentials = other.CachedWebCredentials; arg_3B1_0 = (num * 2934873551u ^ 4012844435u); continue; case 9u: arg_3B1_0 = ((LogonRequest.smethod_1(other.Platform) == 0) ? 2014633234u : 65354482u); continue; case 10u: arg_3B1_0 = ((other.CachedWebCredentials.Length != 0) ? 1093494867u : 1690129861u); continue; case 11u: arg_3B1_0 = ((LogonRequest.smethod_1(other.Email) != 0) ? 997307212u : 1120076108u); continue; case 12u: arg_3B1_0 = (other.DisconnectOnCookieFail ? 1586963951u : 953516782u); continue; case 13u: return; case 14u: arg_3B1_0 = ((LogonRequest.smethod_1(other.Version) == 0) ? 388390152u : 1923147130u); continue; case 15u: this.Program = other.Program; arg_3B1_0 = (num * 3331833768u ^ 4122650447u); continue; case 16u: this.UserAgent = other.UserAgent; arg_3B1_0 = (num * 3991172970u ^ 1750818535u); continue; case 17u: this.Locale = other.Locale; arg_3B1_0 = (num * 1461839585u ^ 2540913784u); continue; case 18u: arg_3B1_0 = (other.WebClientVerification ? 610639228u : 1399930228u); continue; case 19u: this.EnableCookie = other.EnableCookie; arg_3B1_0 = (num * 2601060676u ^ 3725535731u); continue; case 21u: this.Platform = other.Platform; arg_3B1_0 = (num * 1774630340u ^ 416598526u); continue; case 22u: arg_3B1_0 = ((LogonRequest.smethod_1(other.Locale) == 0) ? 323424413u : 648408860u); continue; case 23u: this.AllowLogonQueueNotifications = other.AllowLogonQueueNotifications; arg_3B1_0 = (num * 2566362415u ^ 3681353876u); continue; case 24u: this.SsoId = other.SsoId; arg_3B1_0 = (num * 3541005920u ^ 509724793u); continue; case 25u: this.Email = other.Email; arg_3B1_0 = (num * 1776963073u ^ 1407444377u); continue; case 26u: arg_3B1_0 = ((other.ApplicationVersion != 0) ? 2017837360u : 1849349608u); continue; case 27u: this.ApplicationVersion = other.ApplicationVersion; arg_3B1_0 = (num * 2659670447u ^ 3663871343u); continue; case 28u: goto IL_5F; case 29u: this.WebClientVerification = other.WebClientVerification; arg_3B1_0 = (num * 2778882127u ^ 2780982239u); continue; case 30u: arg_3B1_0 = ((LogonRequest.smethod_1(other.UserAgent) == 0) ? 1158754629u : 1253259444u); continue; } break; } return; IL_5F: arg_3B1_0 = 860163139u; goto IL_3AC; IL_449: arg_3B1_0 = ((LogonRequest.smethod_1(other.Program) == 0) ? 956815311u : 1637201481u); goto IL_3AC; } public void MergeFrom(CodedInputStream input) { while (true) { IL_5FE: uint num; uint arg_51A_0 = ((num = input.ReadTag()) == 0u) ? 2806874945u : 2563765579u; while (true) { uint num2; switch ((num2 = (arg_51A_0 ^ 2477557800u)) % 50u) { case 0u: this.PublicComputer = input.ReadBool(); arg_51A_0 = 2324673480u; continue; case 1u: this.DisconnectOnCookieFail = input.ReadBool(); arg_51A_0 = 2870668129u; continue; case 2u: this.Program = input.ReadString(); arg_51A_0 = 3796214575u; continue; case 4u: arg_51A_0 = (((num == 72u) ? 2169694357u : 3732286631u) ^ num2 * 1964943086u); continue; case 5u: this.Locale = input.ReadString(); arg_51A_0 = 2870668129u; continue; case 6u: this.SsoId = input.ReadBytes(); arg_51A_0 = 2870668129u; continue; case 7u: arg_51A_0 = 2563765579u; continue; case 8u: this.ApplicationVersion = input.ReadInt32(); arg_51A_0 = 2870668129u; continue; case 9u: arg_51A_0 = (((num != 80u) ? 2283742039u : 3331775815u) ^ num2 * 727158905u); continue; case 10u: arg_51A_0 = (((num == 42u) ? 3697760929u : 4239558633u) ^ num2 * 1868295782u); continue; case 11u: arg_51A_0 = (num2 * 253245460u ^ 4065464301u); continue; case 12u: input.SkipLastField(); arg_51A_0 = 4028836251u; continue; case 13u: arg_51A_0 = (num2 * 4096632714u ^ 3967500602u); continue; case 14u: arg_51A_0 = (((num != 10u) ? 387449027u : 525461210u) ^ num2 * 2606574189u); continue; case 15u: goto IL_5FE; case 16u: arg_51A_0 = (num2 * 1707378045u ^ 609759040u); continue; case 17u: arg_51A_0 = (((num != 56u) ? 1412970047u : 374204389u) ^ num2 * 2576843055u); continue; case 18u: arg_51A_0 = (num2 * 3892803957u ^ 2182300654u); continue; case 19u: arg_51A_0 = ((num <= 98u) ? 3611251904u : 2612344609u); continue; case 20u: arg_51A_0 = (((num != 98u) ? 2404678744u : 3621986436u) ^ num2 * 4030314015u); continue; case 21u: arg_51A_0 = (num2 * 2827799656u ^ 1321316489u); continue; case 22u: this.Platform = input.ReadString(); arg_51A_0 = 2917010841u; continue; case 23u: arg_51A_0 = (((num != 18u) ? 2221279314u : 3271214906u) ^ num2 * 2957171284u); continue; case 24u: this.AllowLogonQueueNotifications = input.ReadBool(); arg_51A_0 = 2870668129u; continue; case 25u: arg_51A_0 = (((num > 26u) ? 1321181962u : 2020891856u) ^ num2 * 300399088u); continue; case 26u: arg_51A_0 = (num2 * 3280196461u ^ 813514608u); continue; case 27u: arg_51A_0 = (num2 * 2055232640u ^ 645383905u); continue; case 28u: arg_51A_0 = (((num != 114u) ? 4152711456u : 4130663585u) ^ num2 * 1774416940u); continue; case 29u: arg_51A_0 = (num2 * 2349516996u ^ 1665039053u); continue; case 30u: arg_51A_0 = (((num != 26u) ? 549294485u : 545159959u) ^ num2 * 1956346141u); continue; case 31u: arg_51A_0 = (num2 * 3834766207u ^ 1154589780u); continue; case 32u: arg_51A_0 = (((num == 88u) ? 2877457731u : 2902116216u) ^ num2 * 1928957040u); continue; case 33u: arg_51A_0 = ((num == 104u) ? 3151043620u : 3294957476u); continue; case 34u: arg_51A_0 = (((num != 66u) ? 3353732628u : 3033916600u) ^ num2 * 3694139700u); continue; case 35u: arg_51A_0 = (((num != 34u) ? 3253302790u : 2345559006u) ^ num2 * 3423809394u); continue; case 36u: this.Email = input.ReadString(); arg_51A_0 = 2870668129u; continue; case 37u: this.Version = input.ReadString(); arg_51A_0 = 3350093667u; continue; case 38u: arg_51A_0 = (num2 * 1333008647u ^ 3377817665u); continue; case 39u: arg_51A_0 = ((num <= 56u) ? 2554724371u : 2206722191u); continue; case 40u: this.EnableCookie = input.ReadBool(); arg_51A_0 = 2406207519u; continue; case 41u: this.WebClientVerification = input.ReadBool(); arg_51A_0 = 3212105075u; continue; case 42u: this.CachedWebCredentials = input.ReadBytes(); arg_51A_0 = 2866468436u; continue; case 43u: arg_51A_0 = (num2 * 2981317732u ^ 879888988u); continue; case 44u: arg_51A_0 = ((num != 48u) ? 3744730423u : 3475540428u); continue; case 45u: arg_51A_0 = (num2 * 259521295u ^ 4138201944u); continue; case 46u: arg_51A_0 = ((num <= 42u) ? 2815725063u : 3476254602u); continue; case 47u: arg_51A_0 = ((num <= 80u) ? 2927941584u : 3378536197u); continue; case 48u: arg_51A_0 = (num2 * 495117516u ^ 2523615665u); continue; case 49u: this.UserAgent = input.ReadString(); arg_51A_0 = 2870668129u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/EnumOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class EnumOptions : IMessage<EnumOptions>, IEquatable<EnumOptions>, IDeepCloneable<EnumOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumOptions.__c __9 = new EnumOptions.__c(); internal EnumOptions cctor>b__34_0() { return new EnumOptions(); } } private static readonly MessageParser<EnumOptions> _parser = new MessageParser<EnumOptions>(new Func<EnumOptions>(EnumOptions.__c.__9.<.cctor>b__34_0)); public const int AllowAliasFieldNumber = 2; private bool allowAlias_; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec; private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<EnumOptions> Parser { get { return EnumOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return EnumOptions.Descriptor; } } public bool AllowAlias { get { return this.allowAlias_; } set { this.allowAlias_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public EnumOptions() { } public EnumOptions(EnumOptions other) : this() { this.allowAlias_ = other.allowAlias_; this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public EnumOptions Clone() { return new EnumOptions(this); } public override bool Equals(object other) { return this.Equals(other as EnumOptions); } public bool Equals(EnumOptions other) { if (other == null) { goto IL_92; } goto IL_E2; int arg_9C_0; while (true) { IL_97: switch ((arg_9C_0 ^ -1910624679) % 11) { case 0: goto IL_92; case 1: arg_9C_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? -548063137 : -394165008); continue; case 2: return false; case 3: return false; case 4: return false; case 5: return true; case 6: goto IL_E2; case 7: arg_9C_0 = ((this.Deprecated == other.Deprecated) ? -375963255 : -436903318); continue; case 9: arg_9C_0 = ((this.AllowAlias == other.AllowAlias) ? -1677668598 : -227991586); continue; case 10: return false; } break; } return true; IL_92: arg_9C_0 = -213049431; goto IL_97; IL_E2: arg_9C_0 = ((other != this) ? -217875738 : -632653244); goto IL_97; } public override int GetHashCode() { int num = 1; while (true) { IL_B8: uint arg_94_0 = 662764307u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 434661889u)) % 6u) { case 0u: goto IL_B8; case 1u: num ^= this.AllowAlias.GetHashCode(); arg_94_0 = (num2 * 1317999291u ^ 3303951973u); continue; case 2u: arg_94_0 = ((this.AllowAlias ? 3856317054u : 3628110016u) ^ num2 * 1870355635u); continue; case 3u: num ^= this.Deprecated.GetHashCode(); arg_94_0 = (num2 * 1011000578u ^ 2027505433u); continue; case 5u: arg_94_0 = ((!this.Deprecated) ? 1818777787u : 405839696u); continue; } goto Block_3; } } Block_3: return num ^ this.uninterpretedOption_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.AllowAlias) { goto IL_3D; } goto IL_B5; uint arg_82_0; while (true) { IL_7D: uint num; switch ((num = (arg_82_0 ^ 1785996414u)) % 6u) { case 0u: output.WriteRawTag(24); output.WriteBool(this.Deprecated); arg_82_0 = (num * 3034398429u ^ 3108608839u); continue; case 2u: goto IL_B5; case 3u: this.uninterpretedOption_.WriteTo(output, EnumOptions._repeated_uninterpretedOption_codec); arg_82_0 = 316185959u; continue; case 4u: goto IL_3D; case 5u: output.WriteRawTag(16); output.WriteBool(this.AllowAlias); arg_82_0 = (num * 1376385980u ^ 4245688958u); continue; } break; } return; IL_3D: arg_82_0 = 910693749u; goto IL_7D; IL_B5: arg_82_0 = ((!this.Deprecated) ? 335654157u : 1033784748u); goto IL_7D; } public int CalculateSize() { int num = 0; if (this.AllowAlias) { goto IL_1C; } goto IL_96; uint arg_66_0; while (true) { IL_61: uint num2; switch ((num2 = (arg_66_0 ^ 183028906u)) % 6u) { case 0u: num += 2; arg_66_0 = (num2 * 22908110u ^ 1110365872u); continue; case 1u: num += 2; arg_66_0 = (num2 * 2430781488u ^ 3366785547u); continue; case 2u: num += this.uninterpretedOption_.CalculateSize(EnumOptions._repeated_uninterpretedOption_codec); arg_66_0 = 1411401061u; continue; case 3u: goto IL_96; case 4u: goto IL_1C; } break; } return num; IL_1C: arg_66_0 = 1560560671u; goto IL_61; IL_96: arg_66_0 = (this.Deprecated ? 1180929110u : 353029240u); goto IL_61; } public void MergeFrom(EnumOptions other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 328842286u)) % 7u) { case 1u: arg_76_0 = ((!other.Deprecated) ? 235929150u : 10855467u); continue; case 2u: this.Deprecated = other.Deprecated; arg_76_0 = (num * 343793203u ^ 506585281u); continue; case 3u: goto IL_AD; case 4u: return; case 5u: this.AllowAlias = other.AllowAlias; arg_76_0 = (num * 4156891808u ^ 1337165750u); continue; case 6u: goto IL_15; } break; } this.uninterpretedOption_.Add(other.uninterpretedOption_); return; IL_15: arg_76_0 = 99781312u; goto IL_71; IL_AD: arg_76_0 = (other.AllowAlias ? 800095212u : 1130175222u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_156: uint num; uint arg_10A_0 = ((num = input.ReadTag()) == 0u) ? 3248300982u : 3320618331u; while (true) { uint num2; switch ((num2 = (arg_10A_0 ^ 2281986884u)) % 12u) { case 0u: this.uninterpretedOption_.AddEntriesFrom(input, EnumOptions._repeated_uninterpretedOption_codec); arg_10A_0 = 2261241155u; continue; case 1u: arg_10A_0 = (((num == 24u) ? 46542638u : 2096949146u) ^ num2 * 3068586311u); continue; case 2u: this.AllowAlias = input.ReadBool(); arg_10A_0 = 3399941536u; continue; case 3u: goto IL_156; case 4u: arg_10A_0 = (num2 * 1468470862u ^ 1088797755u); continue; case 5u: this.Deprecated = input.ReadBool(); arg_10A_0 = 2261241155u; continue; case 7u: arg_10A_0 = ((num != 16u) ? 2289746029u : 3459762166u); continue; case 8u: arg_10A_0 = 3320618331u; continue; case 9u: arg_10A_0 = (((num == 7994u) ? 100456838u : 1388107801u) ^ num2 * 1218509562u); continue; case 10u: arg_10A_0 = (num2 * 3877783733u ^ 4267172525u); continue; case 11u: input.SkipLastField(); arg_10A_0 = (num2 * 1283183021u ^ 1051969641u); continue; } return; } } } static EnumOptions() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_5A: uint arg_42_0 = 2940905022u; while (true) { uint num; switch ((num = (arg_42_0 ^ 2278178933u)) % 3u) { case 0u: goto IL_5A; case 2u: EnumOptions._repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); arg_42_0 = (num * 969419338u ^ 3520755602u); continue; } return; } } } } } <file_sep>/Bgs.Protocol/GenericInvitationRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class GenericInvitationRequest : IMessage<GenericInvitationRequest>, IEquatable<GenericInvitationRequest>, IDeepCloneable<GenericInvitationRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenericInvitationRequest.__c __9 = new GenericInvitationRequest.__c(); internal GenericInvitationRequest cctor>b__59_0() { return new GenericInvitationRequest(); } } private static readonly MessageParser<GenericInvitationRequest> _parser = new MessageParser<GenericInvitationRequest>(new Func<GenericInvitationRequest>(GenericInvitationRequest.__c.__9.<.cctor>b__59_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int InvitationIdFieldNumber = 3; private ulong invitationId_; public const int InviteeNameFieldNumber = 4; private string inviteeName_ = ""; public const int InviterNameFieldNumber = 5; private string inviterName_ = ""; public const int PreviousRoleFieldNumber = 6; private static readonly FieldCodec<uint> _repeated_previousRole_codec = FieldCodec.ForUInt32(50u); private readonly RepeatedField<uint> previousRole_ = new RepeatedField<uint>(); public const int DesiredRoleFieldNumber = 7; private static readonly FieldCodec<uint> _repeated_desiredRole_codec; private readonly RepeatedField<uint> desiredRole_ = new RepeatedField<uint>(); public const int ReasonFieldNumber = 8; private uint reason_; public static MessageParser<GenericInvitationRequest> Parser { get { return GenericInvitationRequest._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return GenericInvitationRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public ulong InvitationId { get { return this.invitationId_; } set { this.invitationId_ = value; } } public string InviteeName { get { return this.inviteeName_; } set { this.inviteeName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string InviterName { get { return this.inviterName_; } set { this.inviterName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public RepeatedField<uint> PreviousRole { get { return this.previousRole_; } } public RepeatedField<uint> DesiredRole { get { return this.desiredRole_; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public GenericInvitationRequest() { } public GenericInvitationRequest(GenericInvitationRequest other) : this() { while (true) { IL_11F: uint arg_F3_0 = 1056684561u; while (true) { uint num; switch ((num = (arg_F3_0 ^ 656536760u)) % 8u) { case 1u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.invitationId_ = other.invitationId_; arg_F3_0 = 1803462748u; continue; case 2u: goto IL_11F; case 3u: this.previousRole_ = other.previousRole_.Clone(); arg_F3_0 = (num * 1614153759u ^ 518473834u); continue; case 4u: this.inviteeName_ = other.inviteeName_; arg_F3_0 = (num * 2436642343u ^ 3638323978u); continue; case 5u: this.reason_ = other.reason_; arg_F3_0 = (num * 1624885727u ^ 1307742075u); continue; case 6u: this.inviterName_ = other.inviterName_; arg_F3_0 = (num * 396772190u ^ 645146175u); continue; case 7u: this.desiredRole_ = other.desiredRole_.Clone(); arg_F3_0 = (num * 1961823554u ^ 636699227u); continue; } return; } } } public GenericInvitationRequest Clone() { return new GenericInvitationRequest(this); } public override bool Equals(object other) { return this.Equals(other as GenericInvitationRequest); } public bool Equals(GenericInvitationRequest other) { if (other == null) { goto IL_156; } goto IL_1F5; int arg_187_0; while (true) { IL_182: switch ((arg_187_0 ^ 2554769) % 21) { case 0: arg_187_0 = ((this.InvitationId == other.InvitationId) ? 1187341796 : 597252070); continue; case 2: return false; case 3: return false; case 4: return true; case 5: return false; case 6: return false; case 7: return false; case 8: goto IL_156; case 9: return false; case 10: arg_187_0 = ((!this.previousRole_.Equals(other.previousRole_)) ? 385775927 : 1269190162); continue; case 11: arg_187_0 = ((this.Reason != other.Reason) ? 85917337 : 1472101041); continue; case 12: arg_187_0 = (GenericInvitationRequest.smethod_0(this.AgentId, other.AgentId) ? 860405672 : 2030615852); continue; case 13: return false; case 14: arg_187_0 = ((!GenericInvitationRequest.smethod_1(this.InviterName, other.InviterName)) ? 1111203385 : 2017946232); continue; case 15: return false; case 16: goto IL_1F5; case 17: arg_187_0 = (this.desiredRole_.Equals(other.desiredRole_) ? 847388837 : 543668250); continue; case 18: return false; case 19: arg_187_0 = ((!GenericInvitationRequest.smethod_0(this.TargetId, other.TargetId)) ? 573941248 : 1794205833); continue; case 20: arg_187_0 = ((!GenericInvitationRequest.smethod_1(this.InviteeName, other.InviteeName)) ? 496920135 : 641249287); continue; } break; } return true; IL_156: arg_187_0 = 1688067022; goto IL_182; IL_1F5: arg_187_0 = ((other == this) ? 979624104 : 1268568741); goto IL_182; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_80; } goto IL_1FF; uint arg_1AB_0; while (true) { IL_1A6: uint num2; switch ((num2 = (arg_1AB_0 ^ 3668793923u)) % 14u) { case 0u: num ^= this.InviterName.GetHashCode(); arg_1AB_0 = (num2 * 3105119018u ^ 1920523225u); continue; case 1u: num ^= this.InvitationId.GetHashCode(); arg_1AB_0 = (num2 * 2907974843u ^ 1138296540u); continue; case 2u: num ^= GenericInvitationRequest.smethod_2(this.AgentId); arg_1AB_0 = (num2 * 978015023u ^ 1227427652u); continue; case 3u: goto IL_1FF; case 4u: arg_1AB_0 = ((this.InviteeName.Length != 0) ? 3648582635u : 3405715959u); continue; case 5u: num ^= this.desiredRole_.GetHashCode(); arg_1AB_0 = (((this.Reason != 0u) ? 1760534979u : 1338576209u) ^ num2 * 3086973475u); continue; case 6u: num ^= this.InviteeName.GetHashCode(); arg_1AB_0 = (num2 * 2654621065u ^ 3146795807u); continue; case 7u: num ^= this.Reason.GetHashCode(); arg_1AB_0 = (num2 * 1350606940u ^ 1824336156u); continue; case 8u: arg_1AB_0 = ((this.InvitationId != 0uL) ? 3800659734u : 3368206283u); continue; case 9u: goto IL_80; case 10u: num ^= this.previousRole_.GetHashCode(); arg_1AB_0 = 3373854648u; continue; case 12u: arg_1AB_0 = ((this.InviterName.Length == 0) ? 2295113529u : 2777158387u); continue; case 13u: num ^= GenericInvitationRequest.smethod_2(this.TargetId); arg_1AB_0 = (num2 * 3841540767u ^ 3996508988u); continue; } break; } return num; IL_80: arg_1AB_0 = 2696048645u; goto IL_1A6; IL_1FF: arg_1AB_0 = ((this.targetId_ != null) ? 3632359544u : 3422325657u); goto IL_1A6; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_EA; } goto IL_266; uint arg_206_0; while (true) { IL_201: uint num; switch ((num = (arg_206_0 ^ 2703804494u)) % 17u) { case 0u: arg_206_0 = ((this.InvitationId != 0uL) ? 2741164820u : 3807102200u); continue; case 1u: output.WriteRawTag(42); arg_206_0 = (num * 4224070976u ^ 3240480962u); continue; case 3u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_206_0 = (num * 65370587u ^ 4211546450u); continue; case 4u: output.WriteString(this.InviterName); arg_206_0 = (num * 1174136751u ^ 250991848u); continue; case 5u: this.previousRole_.WriteTo(output, GenericInvitationRequest._repeated_previousRole_codec); this.desiredRole_.WriteTo(output, GenericInvitationRequest._repeated_desiredRole_codec); arg_206_0 = 3746839194u; continue; case 6u: output.WriteString(this.InviteeName); arg_206_0 = (num * 2912679448u ^ 2832240144u); continue; case 7u: arg_206_0 = (((this.Reason == 0u) ? 975868653u : 1069592898u) ^ num * 1875812251u); continue; case 8u: output.WriteRawTag(18); output.WriteMessage(this.TargetId); arg_206_0 = (num * 2883106574u ^ 953586593u); continue; case 9u: goto IL_266; case 10u: goto IL_EA; case 11u: output.WriteRawTag(34); arg_206_0 = (num * 3992346642u ^ 1492483036u); continue; case 12u: output.WriteFixed64(this.InvitationId); arg_206_0 = (num * 2431067256u ^ 3630880472u); continue; case 13u: arg_206_0 = ((GenericInvitationRequest.smethod_3(this.InviterName) == 0) ? 2663977436u : 2990680904u); continue; case 14u: arg_206_0 = ((GenericInvitationRequest.smethod_3(this.InviteeName) != 0) ? 3080624631u : 3603039120u); continue; case 15u: output.WriteRawTag(25); arg_206_0 = (num * 992336864u ^ 1053321202u); continue; case 16u: output.WriteRawTag(64); output.WriteUInt32(this.Reason); arg_206_0 = (num * 3277241106u ^ 2916850449u); continue; } break; } return; IL_EA: arg_206_0 = 3146441540u; goto IL_201; IL_266: arg_206_0 = ((this.targetId_ == null) ? 2617991701u : 2684588696u); goto IL_201; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_F7; } goto IL_21D; uint arg_1C5_0; while (true) { IL_1C0: uint num2; switch ((num2 = (arg_1C5_0 ^ 23272793u)) % 15u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_1C5_0 = (num2 * 3362377834u ^ 708245417u); continue; case 1u: arg_1C5_0 = ((this.InvitationId != 0uL) ? 1527262505u : 1070347458u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviteeName); arg_1C5_0 = (num2 * 28089224u ^ 2158905755u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviterName); arg_1C5_0 = (num2 * 758822467u ^ 1367341420u); continue; case 4u: arg_1C5_0 = ((GenericInvitationRequest.smethod_3(this.InviterName) == 0) ? 1077254645u : 1778755754u); continue; case 5u: num += this.previousRole_.CalculateSize(GenericInvitationRequest._repeated_previousRole_codec); arg_1C5_0 = 697265797u; continue; case 7u: goto IL_F7; case 8u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_1C5_0 = (num2 * 723041901u ^ 1776770218u); continue; case 9u: goto IL_21D; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_1C5_0 = (num2 * 673275115u ^ 2135025303u); continue; case 11u: num += this.desiredRole_.CalculateSize(GenericInvitationRequest._repeated_desiredRole_codec); arg_1C5_0 = (num2 * 1645559483u ^ 3344800299u); continue; case 12u: num += 9; arg_1C5_0 = (num2 * 3512338350u ^ 3846293730u); continue; case 13u: arg_1C5_0 = ((GenericInvitationRequest.smethod_3(this.InviteeName) == 0) ? 97184011u : 620582251u); continue; case 14u: arg_1C5_0 = (((this.Reason != 0u) ? 1601743729u : 1109968714u) ^ num2 * 2695303349u); continue; } break; } return num; IL_F7: arg_1C5_0 = 1198483859u; goto IL_1C0; IL_21D: arg_1C5_0 = ((this.targetId_ != null) ? 169500618u : 1185871735u); goto IL_1C0; } public void MergeFrom(GenericInvitationRequest other) { if (other == null) { goto IL_33; } goto IL_2A1; uint arg_239_0; while (true) { IL_234: uint num; switch ((num = (arg_239_0 ^ 3157404293u)) % 19u) { case 0u: arg_239_0 = ((GenericInvitationRequest.smethod_3(other.InviterName) == 0) ? 2569888407u : 3610149296u); continue; case 1u: return; case 2u: arg_239_0 = ((GenericInvitationRequest.smethod_3(other.InviteeName) != 0) ? 3023486354u : 3054335556u); continue; case 3u: this.Reason = other.Reason; arg_239_0 = (num * 3168351478u ^ 1038929435u); continue; case 4u: arg_239_0 = (((this.targetId_ != null) ? 1582581301u : 1280135609u) ^ num * 2657863670u); continue; case 5u: goto IL_2A1; case 6u: arg_239_0 = ((other.targetId_ != null) ? 3935460446u : 4142315601u); continue; case 7u: arg_239_0 = ((other.InvitationId != 0uL) ? 3459002342u : 4017967055u); continue; case 8u: this.TargetId.MergeFrom(other.TargetId); arg_239_0 = 4142315601u; continue; case 9u: this.InvitationId = other.InvitationId; arg_239_0 = (num * 3509536708u ^ 1843059459u); continue; case 10u: arg_239_0 = (((this.agentId_ != null) ? 1108786303u : 1490211736u) ^ num * 3027869808u); continue; case 11u: this.InviterName = other.InviterName; arg_239_0 = (num * 3131967730u ^ 2673140365u); continue; case 12u: this.agentId_ = new EntityId(); arg_239_0 = (num * 1600749415u ^ 1266821332u); continue; case 13u: this.targetId_ = new EntityId(); arg_239_0 = (num * 415070105u ^ 748424665u); continue; case 14u: this.InviteeName = other.InviteeName; arg_239_0 = (num * 2950567290u ^ 1200330162u); continue; case 16u: this.previousRole_.Add(other.previousRole_); this.desiredRole_.Add(other.desiredRole_); arg_239_0 = ((other.Reason == 0u) ? 4025871447u : 2820742935u); continue; case 17u: goto IL_33; case 18u: this.AgentId.MergeFrom(other.AgentId); arg_239_0 = 2594855818u; continue; } break; } return; IL_33: arg_239_0 = 3537964763u; goto IL_234; IL_2A1: arg_239_0 = ((other.agentId_ != null) ? 2998704206u : 2594855818u); goto IL_234; } public void MergeFrom(CodedInputStream input) { while (true) { IL_492: uint num; uint arg_3E2_0 = ((num = input.ReadTag()) == 0u) ? 3734054344u : 2188668987u; while (true) { uint num2; switch ((num2 = (arg_3E2_0 ^ 2705356212u)) % 37u) { case 0u: arg_3E2_0 = (num2 * 637882916u ^ 3122549969u); continue; case 2u: this.agentId_ = new EntityId(); arg_3E2_0 = (num2 * 2109008875u ^ 3977866597u); continue; case 3u: goto IL_492; case 4u: input.ReadMessage(this.agentId_); arg_3E2_0 = 3043883513u; continue; case 5u: arg_3E2_0 = (num2 * 3543989649u ^ 4033832630u); continue; case 6u: this.previousRole_.AddEntriesFrom(input, GenericInvitationRequest._repeated_previousRole_codec); arg_3E2_0 = 2270013140u; continue; case 7u: arg_3E2_0 = (((num != 58u) ? 1358985436u : 520083246u) ^ num2 * 4109305085u); continue; case 8u: arg_3E2_0 = (((num == 50u) ? 1186804065u : 111521762u) ^ num2 * 3816462622u); continue; case 9u: arg_3E2_0 = ((num == 25u) ? 3159300094u : 3763790057u); continue; case 10u: arg_3E2_0 = ((num != 56u) ? 3492098633u : 3784625703u); continue; case 11u: arg_3E2_0 = ((num > 50u) ? 2348462024u : 2333708677u); continue; case 12u: arg_3E2_0 = ((this.targetId_ == null) ? 3754495089u : 2351214613u); continue; case 13u: arg_3E2_0 = (((num == 34u) ? 790681514u : 892105291u) ^ num2 * 3166465151u); continue; case 14u: arg_3E2_0 = (num2 * 2895216382u ^ 3252839771u); continue; case 15u: arg_3E2_0 = (((num == 18u) ? 3220326863u : 3169650041u) ^ num2 * 2610532248u); continue; case 16u: arg_3E2_0 = (num2 * 308218081u ^ 3141739586u); continue; case 17u: arg_3E2_0 = (((num <= 18u) ? 2677893560u : 3010007428u) ^ num2 * 1239125738u); continue; case 18u: arg_3E2_0 = (((num != 42u) ? 3680361911u : 2538337726u) ^ num2 * 1828639801u); continue; case 19u: arg_3E2_0 = (((num == 64u) ? 2756916513u : 3258915250u) ^ num2 * 1537021519u); continue; case 20u: this.InvitationId = input.ReadFixed64(); arg_3E2_0 = 3043883513u; continue; case 21u: arg_3E2_0 = ((num > 42u) ? 2242478956u : 2288404060u); continue; case 22u: arg_3E2_0 = (((num == 10u) ? 1074440454u : 1943805218u) ^ num2 * 2788466931u); continue; case 23u: this.InviterName = input.ReadString(); arg_3E2_0 = 3229706190u; continue; case 24u: arg_3E2_0 = ((this.agentId_ != null) ? 3023503839u : 2757495834u); continue; case 25u: this.desiredRole_.AddEntriesFrom(input, GenericInvitationRequest._repeated_desiredRole_codec); arg_3E2_0 = 2255526898u; continue; case 26u: input.SkipLastField(); arg_3E2_0 = 3043883513u; continue; case 27u: arg_3E2_0 = (num2 * 2722281082u ^ 226042637u); continue; case 28u: arg_3E2_0 = 2188668987u; continue; case 29u: arg_3E2_0 = (num2 * 628235850u ^ 3319417229u); continue; case 30u: arg_3E2_0 = (num2 * 1142854635u ^ 597497275u); continue; case 31u: arg_3E2_0 = (((num != 48u) ? 4022198477u : 2853759047u) ^ num2 * 2554071608u); continue; case 32u: input.ReadMessage(this.targetId_); arg_3E2_0 = 2662233782u; continue; case 33u: this.targetId_ = new EntityId(); arg_3E2_0 = (num2 * 2306144477u ^ 2295088900u); continue; case 34u: arg_3E2_0 = (num2 * 873541815u ^ 3783909465u); continue; case 35u: this.InviteeName = input.ReadString(); arg_3E2_0 = 2304682859u; continue; case 36u: this.Reason = input.ReadUInt32(); arg_3E2_0 = 3043883513u; continue; } return; } } } static GenericInvitationRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_5E: uint arg_46_0 = 2658251277u; while (true) { uint num; switch ((num = (arg_46_0 ^ 2625550034u)) % 3u) { case 1u: GenericInvitationRequest._repeated_desiredRole_codec = FieldCodec.ForUInt32(58u); arg_46_0 = (num * 2668332511u ^ 3230558338u); continue; case 2u: goto IL_5E; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Channel.V1/ChannelId.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class ChannelId : IMessage<ChannelId>, IEquatable<ChannelId>, IDeepCloneable<ChannelId>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChannelId.__c __9 = new ChannelId.__c(); internal ChannelId cctor>b__34_0() { return new ChannelId(); } } private static readonly MessageParser<ChannelId> _parser = new MessageParser<ChannelId>(new Func<ChannelId>(ChannelId.__c.__9.<.cctor>b__34_0)); public const int TypeFieldNumber = 1; private uint type_; public const int HostFieldNumber = 2; private ProcessId host_; public const int IdFieldNumber = 3; private uint id_; public static MessageParser<ChannelId> Parser { get { return ChannelId._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return ChannelId.Descriptor; } } public uint Type { get { return this.type_; } set { this.type_ = value; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public ChannelId() { } public ChannelId(ChannelId other) : this() { this.type_ = other.type_; this.Host = ((other.host_ != null) ? other.Host.Clone() : null); this.id_ = other.id_; } public ChannelId Clone() { return new ChannelId(this); } public override bool Equals(object other) { return this.Equals(other as ChannelId); } public bool Equals(ChannelId other) { if (other == null) { goto IL_41; } goto IL_DF; int arg_99_0; while (true) { IL_94: switch ((arg_99_0 ^ -1356106063) % 11) { case 0: arg_99_0 = ((this.Type != other.Type) ? -1799962866 : -1789347240); continue; case 1: arg_99_0 = ((this.Id == other.Id) ? -1975440485 : -1063779756); continue; case 2: goto IL_41; case 3: arg_99_0 = (ChannelId.smethod_0(this.Host, other.Host) ? -229404485 : -1938785813); continue; case 4: return false; case 5: return false; case 6: return true; case 7: return false; case 9: goto IL_DF; case 10: return false; } break; } return true; IL_41: arg_99_0 = -895520380; goto IL_94; IL_DF: arg_99_0 = ((other == this) ? -1644978249 : -771296); goto IL_94; } public override int GetHashCode() { int num = 1; while (true) { IL_104: uint arg_D8_0 = 862454419u; while (true) { uint num2; switch ((num2 = (arg_D8_0 ^ 730202337u)) % 8u) { case 0u: num ^= this.Host.GetHashCode(); arg_D8_0 = (num2 * 3216021693u ^ 1490941584u); continue; case 1u: arg_D8_0 = ((this.Id != 0u) ? 1355644454u : 1352777933u); continue; case 2u: arg_D8_0 = (((this.Type == 0u) ? 135208347u : 972017152u) ^ num2 * 2022687418u); continue; case 3u: goto IL_104; case 5u: num ^= this.Type.GetHashCode(); arg_D8_0 = (num2 * 1782291565u ^ 413286878u); continue; case 6u: arg_D8_0 = ((this.host_ != null) ? 491064321u : 1870166000u); continue; case 7u: num ^= this.Id.GetHashCode(); arg_D8_0 = (num2 * 4140198779u ^ 1133303376u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Type != 0u) { goto IL_DC; } goto IL_12A; uint arg_E6_0; while (true) { IL_E1: uint num; switch ((num = (arg_E6_0 ^ 645334621u)) % 10u) { case 0u: goto IL_DC; case 1u: output.WriteRawTag(29); arg_E6_0 = (num * 25663557u ^ 1822911300u); continue; case 2u: output.WriteFixed32(this.Id); arg_E6_0 = (num * 2384463787u ^ 1865705265u); continue; case 3u: output.WriteRawTag(18); arg_E6_0 = (num * 1078558299u ^ 3172768798u); continue; case 4u: output.WriteMessage(this.Host); arg_E6_0 = (num * 2390927234u ^ 3675076490u); continue; case 5u: arg_E6_0 = ((this.Id == 0u) ? 16176617u : 410801280u); continue; case 6u: goto IL_12A; case 7u: output.WriteRawTag(8); arg_E6_0 = (num * 104707172u ^ 1660984688u); continue; case 9u: output.WriteUInt32(this.Type); arg_E6_0 = (num * 541826154u ^ 2440987181u); continue; } break; } return; IL_DC: arg_E6_0 = 1121908196u; goto IL_E1; IL_12A: arg_E6_0 = ((this.host_ != null) ? 432594208u : 99703762u); goto IL_E1; } public int CalculateSize() { int num = 0; while (true) { IL_F5: uint arg_C9_0 = 4119100922u; while (true) { uint num2; switch ((num2 = (arg_C9_0 ^ 2486802135u)) % 8u) { case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Type); arg_C9_0 = (num2 * 2744624564u ^ 4250275220u); continue; case 2u: num += 5; arg_C9_0 = (num2 * 3325943629u ^ 2513488101u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_C9_0 = (num2 * 3349484198u ^ 1108509547u); continue; case 4u: goto IL_F5; case 5u: arg_C9_0 = (((this.Type != 0u) ? 266003368u : 407062062u) ^ num2 * 1168509638u); continue; case 6u: arg_C9_0 = ((this.Id != 0u) ? 3151260565u : 2335924799u); continue; case 7u: arg_C9_0 = ((this.host_ != null) ? 4020777212u : 2797946505u); continue; } return num; } } return num; } public void MergeFrom(ChannelId other) { if (other == null) { goto IL_75; } goto IL_146; uint arg_FE_0; while (true) { IL_F9: uint num; switch ((num = (arg_FE_0 ^ 3897626590u)) % 11u) { case 0u: arg_FE_0 = (((this.host_ == null) ? 4184165751u : 3320284482u) ^ num * 2778159608u); continue; case 1u: goto IL_146; case 2u: arg_FE_0 = ((other.Id == 0u) ? 4139134554u : 3519276534u); continue; case 3u: return; case 4u: this.Type = other.Type; arg_FE_0 = (num * 1693337224u ^ 3849378217u); continue; case 5u: this.host_ = new ProcessId(); arg_FE_0 = (num * 2030024082u ^ 3867239720u); continue; case 6u: goto IL_75; case 8u: arg_FE_0 = ((other.host_ != null) ? 2316211571u : 3226900129u); continue; case 9u: this.Id = other.Id; arg_FE_0 = (num * 2478183901u ^ 3352249042u); continue; case 10u: this.Host.MergeFrom(other.Host); arg_FE_0 = 3226900129u; continue; } break; } return; IL_75: arg_FE_0 = 2692799248u; goto IL_F9; IL_146: arg_FE_0 = ((other.Type == 0u) ? 3765460713u : 3945575350u); goto IL_F9; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) == 0u) ? 2466564990u : 2225669676u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 3474758463u)) % 14u) { case 0u: arg_145_0 = 2225669676u; continue; case 1u: arg_145_0 = (((num != 29u) ? 3994887371u : 3763986791u) ^ num2 * 2034259621u); continue; case 2u: arg_145_0 = (((num != 18u) ? 2916157896u : 2992481201u) ^ num2 * 1213961647u); continue; case 3u: this.Id = input.ReadFixed32(); arg_145_0 = 3892108879u; continue; case 4u: arg_145_0 = ((this.host_ != null) ? 2902946160u : 2780840912u); continue; case 5u: input.ReadMessage(this.host_); arg_145_0 = 3479759777u; continue; case 6u: arg_145_0 = (num2 * 2379162471u ^ 162958221u); continue; case 8u: goto IL_199; case 9u: input.SkipLastField(); arg_145_0 = (num2 * 514804140u ^ 2519546165u); continue; case 10u: this.Type = input.ReadUInt32(); arg_145_0 = 3892108879u; continue; case 11u: this.host_ = new ProcessId(); arg_145_0 = (num2 * 3721039081u ^ 607999223u); continue; case 12u: arg_145_0 = (num2 * 1212441014u ^ 748105755u); continue; case 13u: arg_145_0 = ((num != 8u) ? 4017827843u : 3658350701u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } } } <file_sep>/Bgs.Protocol/MethodOptionsReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class MethodOptionsReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return MethodOptionsReflection.descriptor; } } static MethodOptionsReflection() { MethodOptionsReflection.descriptor = FileDescriptor.FromGeneratedCode(MethodOptionsReflection.smethod_1(MethodOptionsReflection.smethod_0(Module.smethod_33<string>(3366252778u), Module.smethod_33<string>(3468345786u), Module.smethod_35<string>(2930357009u), Module.smethod_37<string>(3040051165u))), new FileDescriptor[] { FileDescriptor.DescriptorProtoFileDescriptor }, new GeneratedCodeInfo(null, null)); } static string smethod_0(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.IO/LalField.cs using System; namespace Arctium_WoW_ClientDB_Viewer.IO { internal class LalField { public string Name { get; set; } public Type Type { get; set; } public int Bits { get; set; } public int Count { get; set; } public string CountField { get; set; } public object Value { get; set; } public LalField() { this.<Bits>k__BackingField = -1; this.<Count>k__BackingField = -1; base..ctor(); } } } <file_sep>/Google.Protobuf/EnumValueOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class EnumValueOptions : IMessage<EnumValueOptions>, IEquatable<EnumValueOptions>, IDeepCloneable<EnumValueOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumValueOptions.__c __9 = new EnumValueOptions.__c(); internal EnumValueOptions cctor>b__29_0() { return new EnumValueOptions(); } } private static readonly MessageParser<EnumValueOptions> _parser = new MessageParser<EnumValueOptions>(new Func<EnumValueOptions>(EnumValueOptions.__c.__9.<.cctor>b__29_0)); public const int DeprecatedFieldNumber = 1; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<EnumValueOptions> Parser { get { return EnumValueOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[13]; } } MessageDescriptor IMessage.Descriptor { get { return EnumValueOptions.Descriptor; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public EnumValueOptions() { } public EnumValueOptions(EnumValueOptions other) : this() { this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public EnumValueOptions Clone() { return new EnumValueOptions(this); } public override bool Equals(object other) { return this.Equals(other as EnumValueOptions); } public bool Equals(EnumValueOptions other) { if (other == null) { goto IL_3C; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -437566670) % 9) { case 1: arg_72_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? -938215988 : -1732494269); continue; case 2: goto IL_3C; case 3: arg_72_0 = ((this.Deprecated == other.Deprecated) ? -625092412 : -538636665); continue; case 4: return false; case 5: return false; case 6: return false; case 7: return true; case 8: goto IL_B0; } break; } return true; IL_3C: arg_72_0 = -1553798042; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? -396439773 : -1140720406); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.Deprecated) { goto IL_2C; } goto IL_52; uint arg_36_0; while (true) { IL_31: uint num2; switch ((num2 = (arg_36_0 ^ 1868574158u)) % 4u) { case 0u: goto IL_52; case 2u: goto IL_2C; case 3u: num ^= this.Deprecated.GetHashCode(); arg_36_0 = (num2 * 3832777165u ^ 4234247437u); continue; } break; } return num; IL_2C: arg_36_0 = 1795489561u; goto IL_31; IL_52: num ^= this.uninterpretedOption_.GetHashCode(); arg_36_0 = 1147256903u; goto IL_31; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Deprecated) { while (true) { IL_5A: uint arg_3E_0 = 3165138810u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 3302623733u)) % 4u) { case 0u: goto IL_5A; case 2u: output.WriteBool(this.Deprecated); arg_3E_0 = (num * 2642780841u ^ 3534470462u); continue; case 3u: output.WriteRawTag(8); arg_3E_0 = (num * 2703627813u ^ 193737820u); continue; } goto Block_2; } } Block_2:; } this.uninterpretedOption_.WriteTo(output, EnumValueOptions._repeated_uninterpretedOption_codec); } public int CalculateSize() { int num = 0; if (this.Deprecated) { goto IL_1F; } goto IL_45; uint arg_29_0; while (true) { IL_24: uint num2; switch ((num2 = (arg_29_0 ^ 75194031u)) % 4u) { case 0u: goto IL_45; case 2u: goto IL_1F; case 3u: num += 2; arg_29_0 = (num2 * 3737109011u ^ 3607457126u); continue; } break; } return num; IL_1F: arg_29_0 = 784902496u; goto IL_24; IL_45: num += this.uninterpretedOption_.CalculateSize(EnumValueOptions._repeated_uninterpretedOption_codec); arg_29_0 = 1661349550u; goto IL_24; } public void MergeFrom(EnumValueOptions other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2213461223u)) % 5u) { case 0u: goto IL_2D; case 1u: return; case 3u: goto IL_63; case 4u: this.Deprecated = other.Deprecated; arg_37_0 = (num * 978845515u ^ 2848557814u); continue; } break; } this.uninterpretedOption_.Add(other.uninterpretedOption_); return; IL_2D: arg_37_0 = 2459211834u; goto IL_32; IL_63: arg_37_0 = (other.Deprecated ? 4110591486u : 2623785893u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_E1: uint num; uint arg_A6_0 = ((num = input.ReadTag()) == 0u) ? 467991754u : 1542563083u; while (true) { uint num2; switch ((num2 = (arg_A6_0 ^ 1888616232u)) % 8u) { case 0u: this.uninterpretedOption_.AddEntriesFrom(input, EnumValueOptions._repeated_uninterpretedOption_codec); arg_A6_0 = 931461086u; continue; case 1u: arg_A6_0 = (((num != 7994u) ? 3971671739u : 3104538679u) ^ num2 * 4099945287u); continue; case 3u: arg_A6_0 = ((num == 8u) ? 766682487u : 1250534409u); continue; case 4u: input.SkipLastField(); arg_A6_0 = (num2 * 2645129090u ^ 4119556278u); continue; case 5u: arg_A6_0 = 1542563083u; continue; case 6u: goto IL_E1; case 7u: this.Deprecated = input.ReadBool(); arg_A6_0 = 931461086u; continue; } return; } } } } } <file_sep>/Bgs.Protocol/NO_RESPONSE.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class NO_RESPONSE : IMessage<NO_RESPONSE>, IEquatable<NO_RESPONSE>, IDeepCloneable<NO_RESPONSE>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly NO_RESPONSE.__c __9 = new NO_RESPONSE.__c(); internal NO_RESPONSE cctor>b__19_0() { return new NO_RESPONSE(); } } private static readonly MessageParser<NO_RESPONSE> _parser = new MessageParser<NO_RESPONSE>(new Func<NO_RESPONSE>(NO_RESPONSE.__c.__9.<.cctor>b__19_0)); public static MessageParser<NO_RESPONSE> Parser { get { return NO_RESPONSE._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return NO_RESPONSE.Descriptor; } } public NO_RESPONSE() { } public NO_RESPONSE(NO_RESPONSE other) : this() { } public NO_RESPONSE Clone() { return new NO_RESPONSE(this); } public override bool Equals(object other) { return this.Equals(other as NO_RESPONSE); } public bool Equals(NO_RESPONSE other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 1504404527; IL_08: switch ((arg_0D_0 ^ 1432572113) % 4) { case 0: goto IL_03; case 2: return false; case 3: IL_27: arg_0D_0 = 243796716; goto IL_08; } return true; } public override int GetHashCode() { return 1; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { } public int CalculateSize() { return 0; } public void MergeFrom(NO_RESPONSE other) { } public void MergeFrom(CodedInputStream input) { while (true) { IL_4D: int arg_27_0 = (input.ReadTag() != 0u) ? -1196816649 : -424471768; while (true) { switch ((arg_27_0 ^ -1361820811) % 4) { case 0: arg_27_0 = -1196816649; continue; case 2: input.SkipLastField(); arg_27_0 = -1152677838; continue; case 3: goto IL_4D; } return; } } } } } <file_sep>/UnitFields.cs using System; public enum UnitFields { Charm = 12, Summon = 16, Critter = 20, CharmedBy = 24, SummonedBy = 28, CreatedBy = 32, DemonCreator = 36, Target = 40, BattlePetCompanionGUID = 44, BattlePetDBID = 48, ChannelData = 50, SummonedByHomeRealm = 52, Sex, DisplayPower, OverrideDisplayPowerID, Health, Power = 58, MaxHealth = 64, MaxPower = 66, PowerRegenFlatModifier = 72, PowerRegenInterruptedFlatModifier = 78, Level = 84, EffectiveLevel, ScalingLevelMin, ScalingLevelMax, ScalingLevelDelta, FactionTemplate, VirtualItems, Flags = 96, Flags2, Flags3, AuraState, AttackRoundBaseTime, RangedAttackRoundBaseTime = 102, BoundingRadius, CombatReach, DisplayID, NativeDisplayID, MountDisplayID, MinDamage, MaxDamage, MinOffHandDamage, MaxOffHandDamage, AnimTier, PetNumber, PetNameTimestamp, PetExperience, PetNextLevelExperience, ModCastingSpeed, ModSpellHaste, ModHaste, ModRangedHaste, ModHasteRegen, ModTimeRate, CreatedBySpell, NpcFlags, EmoteState = 126, Stats, StatPosBuff = 131, StatNegBuff = 135, Resistances = 139, ResistanceBuffModsPositive = 146, ResistanceBuffModsNegative = 153, ModBonusArmor = 160, BaseMana, BaseHealth, ShapeshiftForm, AttackPower, AttackPowerModPos, AttackPowerModNeg, AttackPowerMultiplier, RangedAttackPower, RangedAttackPowerModPos, RangedAttackPowerModNeg, RangedAttackPowerMultiplier, SetAttackSpeedAura, MinRangedDamage, MaxRangedDamage, PowerCostModifier, PowerCostMultiplier = 182, MaxHealthModifier = 189, HoverHeight, MinItemLevelCutoff, MinItemLevel, MaxItemLevel, WildBattlePetLevel, BattlePetCompanionNameTimestamp, InteractSpellID, StateSpellVisualID, StateAnimID, StateAnimKitID, StateWorldEffectID, ScaleDuration = 204, LooksLikeMountID, LooksLikeCreatureID, LookAtControllerID, LookAtControllerTarget, End = 212 } <file_sep>/Framework.Cryptography.BNet/SRP6a.cs using Framework.Misc; using System; using System.Numerics; using System.Runtime.CompilerServices; using System.Security.Cryptography; using System.Text; namespace Framework.Cryptography.BNet { public sealed class SRP6a : IDisposable { public readonly BigInteger gBN; public readonly BigInteger k; public readonly byte[] N; public readonly byte[] S; public readonly byte[] g; private SHA256 sha256; private BigInteger A; private BigInteger BN; private BigInteger v; private BigInteger b; private BigInteger s; public byte[] I { get; private set; } public byte[] S2 { get; private set; } public byte[] V { get; private set; } public byte[] B { get; private set; } public byte[] SessionKey { get; private set; } public byte[] WoWSessionKey { get; private set; } public byte[] ClientM { get; private set; } public byte[] ServerM { get; private set; } public SRP6a(string salt, string accountName = "", string passwordVerifier = "") { while (true) { IL_11A: uint arg_FA_0 = 1990870343u; while (true) { uint num; switch ((num = (arg_FA_0 ^ 1565948384u)) % 5u) { case 0u: this.k = this.MakeBigInteger(SRP6a.smethod_3(this.sha256, this.N.Combine(this.g))); this.v = this.MakeBigInteger(passwordVerifier.ToByteArray()); arg_FA_0 = (num * 10374198u ^ 3275431934u); continue; case 1u: this.S = salt.ToByteArray(); this.g = new byte[] { 2 }; this.BN = this.MakeBigInteger(this.N); this.gBN = this.MakeBigInteger(this.g); arg_FA_0 = (num * 4125876422u ^ 2637048811u); continue; case 2u: { this.sha256 = SRP6a.smethod_0(); this.I = SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), accountName)); byte[] expr_3D = new byte[128]; SRP6a.smethod_4(expr_3D, fieldof(Framework.<PrivateImplementationDetails>.struct15_3).FieldHandle); this.N = expr_3D; arg_FA_0 = (num * 2174447120u ^ 1530330669u); continue; } case 3u: goto IL_11A; } return; } } } public void CalculateX(string accountName, string password, bool calcB) { this.I = SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), accountName)); while (true) { IL_A7: uint arg_8F_0 = 2553222655u; while (true) { uint num; switch ((num = (arg_8F_0 ^ 2695648094u)) % 3u) { case 0u: goto IL_A7; case 1u: { byte[] data = SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), SRP6a.smethod_6(this.I.ToHexString(), Module.smethod_33<string>(1968828782u), SRP6a.smethod_5(password)))); BigInteger x = this.MakeBigInteger(SRP6a.smethod_3(this.sha256, this.S.Combine(data))); this.CalculateV(x, calcB); arg_8F_0 = (num * 1788205373u ^ 735249050u); continue; } } return; } } } private void CalculateV(BigInteger x, bool calcB) { this.v = BigInteger.ModPow(this.gBN, x, this.BN); this.V = this.v.ToByteArray(); if (calcB) { while (true) { IL_5E: uint arg_46_0 = 3956925126u; while (true) { uint num; switch ((num = (arg_46_0 ^ 3179056548u)) % 3u) { case 1u: this.CalculateB(); arg_46_0 = (num * 2378183716u ^ 3313977404u); continue; case 2u: goto IL_5E; } goto Block_2; } } Block_2:; } } public void CalculateB() { byte[] array = new byte[128]; while (true) { IL_7C: uint arg_5C_0 = 3206230607u; while (true) { uint num; switch ((num = (arg_5C_0 ^ 2218348064u)) % 5u) { case 0u: this.S2 = array; arg_5C_0 = (num * 3988362356u ^ 2556367054u); continue; case 1u: this.b = this.MakeBigInteger(array); arg_5C_0 = (num * 3278302294u ^ 3633323988u); continue; case 3u: SRP6a.smethod_8(SRP6a.smethod_7(), array); arg_5C_0 = (num * 2572586182u ^ 1454878351u); continue; case 4u: goto IL_7C; } goto Block_1; } } Block_1: this.B = this.GetBytes(((this.k * this.v + BigInteger.ModPow(this.gBN, this.b, this.BN)) % this.BN).ToByteArray(), 128); } public void CalculateU(byte[] a) { this.A = this.MakeBigInteger(a); while (true) { IL_5C: uint arg_44_0 = 1038568804u; while (true) { uint num; switch ((num = (arg_44_0 ^ 1653931647u)) % 3u) { case 0u: goto IL_5C; case 2u: this.CalculateS(this.MakeBigInteger(SRP6a.smethod_3(this.sha256, a.Combine(this.B)))); arg_44_0 = (num * 3059919140u ^ 4120859160u); continue; } return; } } } private void CalculateS(BigInteger u) { this.s = BigInteger.ModPow(this.A * BigInteger.ModPow(this.v, u, this.BN) % this.BN, this.b, this.BN); this.CalculateSessionKey(); } public void CalculateSessionKey() { byte[] bytes = this.GetBytes(this.s.ToByteArray(), 128); while (true) { IL_232: uint arg_1DC_0 = 4222192858u; while (true) { uint num; switch ((num = (arg_1DC_0 ^ 2714582115u)) % 18u) { case 0u: { byte[] array = new byte[bytes.Length / 2]; int num2 = 0; arg_1DC_0 = (num * 2523120788u ^ 2676676707u); continue; } case 1u: { byte[] array; byte[] array2; this.SessionKey = new byte[array2.Length + array.Length]; arg_1DC_0 = (num * 2887321725u ^ 2668173759u); continue; } case 2u: { int num2; byte[] array2; arg_1DC_0 = ((num2 < array2.Length) ? 3962445998u : 3756537474u); continue; } case 3u: { int num2; byte[] array2; array2[num2] = bytes[num2 * 2]; arg_1DC_0 = 2790075746u; continue; } case 4u: this.CalculateWoWSessionKey(this.SessionKey); arg_1DC_0 = (num * 1938263627u ^ 2590204091u); continue; case 5u: { byte[] array2 = new byte[bytes.Length / 2]; arg_1DC_0 = (num * 3546247964u ^ 3107755769u); continue; } case 7u: { byte[] array2; int num3; arg_1DC_0 = ((num3 < array2.Length) ? 2889917647u : 3904964729u); continue; } case 8u: { byte[] array; int num3; this.SessionKey[num3 * 2 + 1] = array[num3]; num3++; arg_1DC_0 = (num * 1551608187u ^ 4285121882u); continue; } case 9u: { byte[] array; int num2; array[num2] = bytes[num2 * 2 + 1]; arg_1DC_0 = (num * 4267992268u ^ 1522922747u); continue; } case 10u: arg_1DC_0 = (num * 3995399878u ^ 4053259181u); continue; case 11u: { byte[] array2 = this.sha256.ComputeHash(array2); arg_1DC_0 = (num * 464323702u ^ 744207489u); continue; } case 12u: { byte[] array = this.sha256.ComputeHash(array); arg_1DC_0 = (num * 3857746972u ^ 965939648u); continue; } case 13u: { int num3 = 0; arg_1DC_0 = (num * 2686872880u ^ 2121102296u); continue; } case 14u: { int num2; num2++; arg_1DC_0 = (num * 4053533547u ^ 1941216609u); continue; } case 15u: goto IL_232; case 16u: { byte[] array2; int num3; this.SessionKey[num3 * 2] = array2[num3]; arg_1DC_0 = 2424620531u; continue; } case 17u: arg_1DC_0 = (num * 3198961250u ^ 2158511132u); continue; } return; } } } public void CalculateWoWSessionKey(byte[] arr) { while (true) { IL_1F8: uint arg_1A6_0 = 57912216u; while (true) { uint num; switch ((num = (arg_1A6_0 ^ 1862494343u)) % 17u) { case 0u: { byte[] array = new byte[arr.Length / 2]; arg_1A6_0 = (num * 598141279u ^ 3709953262u); continue; } case 1u: { byte[] array2 = SRP6a.smethod_10(SRP6a.smethod_9(), array2); byte[] array = SRP6a.smethod_10(SRP6a.smethod_9(), array); arg_1A6_0 = (num * 3150643284u ^ 2166396056u); continue; } case 2u: { byte[] array2; int num2; this.WoWSessionKey[num2 * 2] = array2[num2]; arg_1A6_0 = 2098472953u; continue; } case 3u: { byte[] array2; int num3; array2[num3] = arr[num3 * 2]; arg_1A6_0 = 472270212u; continue; } case 4u: { byte[] array2 = new byte[arr.Length / 2]; arg_1A6_0 = (num * 4031285479u ^ 4201713760u); continue; } case 5u: arg_1A6_0 = (num * 4069555469u ^ 1090867220u); continue; case 6u: { int num3; num3++; arg_1A6_0 = (num * 428409243u ^ 3952092863u); continue; } case 7u: { byte[] array2; int num3; arg_1A6_0 = ((num3 >= array2.Length) ? 435006772u : 552065601u); continue; } case 8u: { byte[] array; int num2; this.WoWSessionKey[num2 * 2 + 1] = array[num2]; arg_1A6_0 = (num * 1049171215u ^ 159242650u); continue; } case 9u: { int num2; num2++; arg_1A6_0 = (num * 2545200484u ^ 1484258480u); continue; } case 10u: { byte[] array; byte[] array2; this.WoWSessionKey = new byte[array2.Length + array.Length]; arg_1A6_0 = (num * 2279781675u ^ 167724743u); continue; } case 11u: { int num3 = 0; arg_1A6_0 = (num * 2477893337u ^ 1881340740u); continue; } case 12u: { byte[] array2; int num2; arg_1A6_0 = ((num2 < array2.Length) ? 460778666u : 814051148u); continue; } case 13u: { byte[] array; int num3; array[num3] = arr[num3 * 2 + 1]; arg_1A6_0 = (num * 3568307509u ^ 907486368u); continue; } case 15u: { int num2 = 0; arg_1A6_0 = (num * 1158626221u ^ 382197970u); continue; } case 16u: goto IL_1F8; } return; } } } public void CalculateClientM(byte[] a) { byte[] array = SRP6a.smethod_3(this.sha256, this.N); while (true) { IL_140: uint arg_113_0 = 2564275220u; while (true) { uint num; switch ((num = (arg_113_0 ^ 3263938703u)) % 8u) { case 0u: goto IL_140; case 1u: { byte[] byte_ = array.Combine(SRP6a.smethod_3(this.sha256, SRP6a.smethod_2(SRP6a.smethod_1(), this.I.ToHexString()))).Combine(this.S).Combine(a).Combine(this.B).Combine(this.SessionKey); this.ClientM = SRP6a.smethod_3(this.sha256, byte_); arg_113_0 = (num * 1130404651u ^ 272827307u); continue; } case 2u: { int num2; arg_113_0 = ((num2 < array.Length) ? 2194615946u : 2393073750u); continue; } case 3u: { byte[] array2 = SRP6a.smethod_3(this.sha256, this.g); arg_113_0 = (num * 3484930294u ^ 4152190963u); continue; } case 4u: { int num2; num2++; arg_113_0 = (num * 1293311391u ^ 2582903929u); continue; } case 5u: { byte[] expr_33_cp_0 = array; int num2; int expr_33_cp_1 = num2; byte[] array2; expr_33_cp_0[expr_33_cp_1] ^= array2[num2]; arg_113_0 = 3974963915u; continue; } case 6u: { int num2 = 0; arg_113_0 = (num * 1672443058u ^ 2395775225u); continue; } } return; } } } public void CalculateServerM(byte[] m1) { this.ServerM = this.sha256.ComputeHash(this.GetBytes(this.A.ToByteArray(), 128).Combine(m1).Combine(this.SessionKey)); } public byte[] GetBytes(byte[] data, int count = 64) { if (data.Length > count) { goto IL_2A; } IL_06: int arg_10_0 = -1099893497; IL_0B: byte[] array; switch ((arg_10_0 ^ -1023563484) % 4) { case 0: goto IL_06; case 2: IL_2A: array = new byte[count]; arg_10_0 = -1371147539; goto IL_0B; case 3: return data; } SRP6a.smethod_11(data, 0, array, 0, 64); return array; } public BigInteger MakeBigInteger(byte[] data) { return new BigInteger(data.Combine(new byte[1])); } public void Dispose() { this.SessionKey = null; this.ServerM = null; } static SHA256Managed smethod_0() { return new SHA256Managed(); } static Encoding smethod_1() { return Encoding.UTF8; } static byte[] smethod_2(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static byte[] smethod_3(HashAlgorithm hashAlgorithm_0, byte[] byte_0) { return hashAlgorithm_0.ComputeHash(byte_0); } static void smethod_4(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } static string smethod_5(string string_0) { return string_0.ToUpper(); } static string smethod_6(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } static RandomNumberGenerator smethod_7() { return RandomNumberGenerator.Create(); } static void smethod_8(RandomNumberGenerator randomNumberGenerator_0, byte[] byte_0) { randomNumberGenerator_0.GetBytes(byte_0); } static SHA1Managed smethod_9() { return new SHA1Managed(); } static byte[] smethod_10(HashAlgorithm hashAlgorithm_0, byte[] byte_0) { return hashAlgorithm_0.ComputeHash(byte_0); } static void smethod_11(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } } } <file_sep>/Bgs.Protocol.Challenge.V1/SendChallengeToUserRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class SendChallengeToUserRequest : IMessage<SendChallengeToUserRequest>, IEquatable<SendChallengeToUserRequest>, IDeepCloneable<SendChallengeToUserRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendChallengeToUserRequest.__c __9 = new SendChallengeToUserRequest.__c(); internal SendChallengeToUserRequest cctor>b__59_0() { return new SendChallengeToUserRequest(); } } private static readonly MessageParser<SendChallengeToUserRequest> _parser = new MessageParser<SendChallengeToUserRequest>(new Func<SendChallengeToUserRequest>(SendChallengeToUserRequest.__c.__9.<.cctor>b__59_0)); public const int PeerIdFieldNumber = 1; private ProcessId peerId_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int ChallengesFieldNumber = 3; private static readonly FieldCodec<Challenge> _repeated_challenges_codec; private readonly RepeatedField<Challenge> challenges_ = new RepeatedField<Challenge>(); public const int ContextFieldNumber = 4; private uint context_; public const int TimeoutFieldNumber = 5; private ulong timeout_; public const int AttributesFieldNumber = 6; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attributes_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attributes_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int HostFieldNumber = 7; private ProcessId host_; public const int AccountIdFieldNumber = 8; private EntityId accountId_; public static MessageParser<SendChallengeToUserRequest> Parser { get { return SendChallengeToUserRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return SendChallengeToUserRequest.Descriptor; } } public ProcessId PeerId { get { return this.peerId_; } set { this.peerId_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public RepeatedField<Challenge> Challenges { get { return this.challenges_; } } public uint Context { get { return this.context_; } set { this.context_ = value; } } public ulong Timeout { get { return this.timeout_; } set { this.timeout_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attributes { get { return this.attributes_; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public SendChallengeToUserRequest() { } public SendChallengeToUserRequest(SendChallengeToUserRequest other) : this() { this.PeerId = ((other.peerId_ != null) ? other.PeerId.Clone() : null); this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.challenges_ = other.challenges_.Clone(); this.context_ = other.context_; this.timeout_ = other.timeout_; this.attributes_ = other.attributes_.Clone(); this.Host = ((other.host_ != null) ? other.Host.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); } public SendChallengeToUserRequest Clone() { return new SendChallengeToUserRequest(this); } public override bool Equals(object other) { return this.Equals(other as SendChallengeToUserRequest); } public bool Equals(SendChallengeToUserRequest other) { if (other == null) { goto IL_D2; } goto IL_1F8; int arg_18A_0; while (true) { IL_185: switch ((arg_18A_0 ^ 816392964) % 21) { case 0: return false; case 1: return false; case 2: arg_18A_0 = ((this.Timeout == other.Timeout) ? 1973683729 : 148476780); continue; case 3: return false; case 4: return false; case 5: arg_18A_0 = (this.challenges_.Equals(other.challenges_) ? 805276243 : 2119394059); continue; case 6: return false; case 7: arg_18A_0 = (SendChallengeToUserRequest.smethod_0(this.AccountId, other.AccountId) ? 1555641405 : 1101387317); continue; case 8: arg_18A_0 = ((!SendChallengeToUserRequest.smethod_0(this.GameAccountId, other.GameAccountId)) ? 1528555393 : 702295765); continue; case 9: return false; case 10: goto IL_D2; case 11: goto IL_1F8; case 12: return false; case 13: return false; case 14: arg_18A_0 = (SendChallengeToUserRequest.smethod_0(this.Host, other.Host) ? 1505249358 : 117806071); continue; case 15: return true; case 16: arg_18A_0 = ((!this.attributes_.Equals(other.attributes_)) ? 710476854 : 347249981); continue; case 17: arg_18A_0 = ((this.Context == other.Context) ? 321762354 : 1765115181); continue; case 18: arg_18A_0 = (SendChallengeToUserRequest.smethod_0(this.PeerId, other.PeerId) ? 91940777 : 1659164101); continue; case 19: return false; } break; } return true; IL_D2: arg_18A_0 = 393889798; goto IL_185; IL_1F8: arg_18A_0 = ((other != this) ? 390114534 : 1676343103); goto IL_185; } public override int GetHashCode() { int num = 1; if (this.peerId_ != null) { goto IL_152; } goto IL_1CD; uint arg_17D_0; while (true) { IL_178: uint num2; switch ((num2 = (arg_17D_0 ^ 1469526432u)) % 13u) { case 1u: arg_17D_0 = ((this.accountId_ != null) ? 430245170u : 952864368u); continue; case 2u: goto IL_152; case 3u: num ^= this.Context.GetHashCode(); arg_17D_0 = (num2 * 1594817049u ^ 4017173347u); continue; case 4u: num ^= SendChallengeToUserRequest.smethod_1(this.challenges_); arg_17D_0 = 1250183453u; continue; case 5u: num ^= this.Timeout.GetHashCode(); arg_17D_0 = (num2 * 3849238828u ^ 196421032u); continue; case 6u: num ^= SendChallengeToUserRequest.smethod_1(this.GameAccountId); arg_17D_0 = (num2 * 2094139658u ^ 1429997788u); continue; case 7u: arg_17D_0 = (((this.Timeout != 0uL) ? 685310268u : 1850228172u) ^ num2 * 2038103430u); continue; case 8u: goto IL_1CD; case 9u: num ^= this.attributes_.GetHashCode(); arg_17D_0 = ((this.host_ != null) ? 1441635804u : 2268952u); continue; case 10u: num ^= this.AccountId.GetHashCode(); arg_17D_0 = (num2 * 3203737752u ^ 3372976320u); continue; case 11u: num ^= SendChallengeToUserRequest.smethod_1(this.PeerId); arg_17D_0 = (num2 * 2827307540u ^ 3774910836u); continue; case 12u: num ^= this.Host.GetHashCode(); arg_17D_0 = (num2 * 3756368091u ^ 428445964u); continue; } break; } return num; IL_152: arg_17D_0 = 673712767u; goto IL_178; IL_1CD: arg_17D_0 = ((this.gameAccountId_ == null) ? 1301436228u : 552034812u); goto IL_178; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.peerId_ != null) { goto IL_17F; } goto IL_25D; uint arg_1F9_0; while (true) { IL_1F4: uint num; switch ((num = (arg_1F9_0 ^ 955934729u)) % 18u) { case 0u: output.WriteMessage(this.Host); arg_1F9_0 = (num * 2864177080u ^ 4245169873u); continue; case 1u: output.WriteMessage(this.AccountId); arg_1F9_0 = (num * 1219684917u ^ 339204139u); continue; case 2u: output.WriteRawTag(58); arg_1F9_0 = (num * 3952257102u ^ 1552132723u); continue; case 3u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_1F9_0 = (num * 23210236u ^ 4238181025u); continue; case 4u: goto IL_17F; case 5u: output.WriteUInt64(this.Timeout); arg_1F9_0 = (num * 1502014313u ^ 2491244335u); continue; case 6u: output.WriteRawTag(40); arg_1F9_0 = (num * 3149943451u ^ 1360100766u); continue; case 7u: output.WriteRawTag(10); arg_1F9_0 = (num * 1921872438u ^ 2561342248u); continue; case 8u: arg_1F9_0 = ((this.accountId_ == null) ? 1552866474u : 390361845u); continue; case 9u: arg_1F9_0 = (((this.Timeout != 0uL) ? 4157300384u : 3926136477u) ^ num * 2811803877u); continue; case 10u: this.challenges_.WriteTo(output, SendChallengeToUserRequest._repeated_challenges_codec); output.WriteRawTag(37); arg_1F9_0 = 1267132571u; continue; case 11u: output.WriteMessage(this.PeerId); arg_1F9_0 = (num * 3157523864u ^ 2914234364u); continue; case 12u: output.WriteFixed32(this.Context); arg_1F9_0 = (num * 1346696627u ^ 3704766764u); continue; case 14u: output.WriteRawTag(66); arg_1F9_0 = (num * 2513242981u ^ 286329848u); continue; case 15u: this.attributes_.WriteTo(output, SendChallengeToUserRequest._repeated_attributes_codec); arg_1F9_0 = 1009243425u; continue; case 16u: arg_1F9_0 = (((this.host_ == null) ? 2172956529u : 3234786095u) ^ num * 1682611006u); continue; case 17u: goto IL_25D; } break; } return; IL_17F: arg_1F9_0 = 681367556u; goto IL_1F4; IL_25D: arg_1F9_0 = ((this.gameAccountId_ != null) ? 1310861030u : 324831717u); goto IL_1F4; } public int CalculateSize() { int num = 0; while (true) { IL_1F7: uint arg_1B2_0 = 4277040145u; while (true) { uint num2; switch ((num2 = (arg_1B2_0 ^ 4261678620u)) % 14u) { case 0u: goto IL_1F7; case 2u: arg_1B2_0 = (((this.host_ == null) ? 1905378242u : 1360465286u) ^ num2 * 169161333u); continue; case 3u: arg_1B2_0 = (((this.peerId_ != null) ? 2309856662u : 4221978431u) ^ num2 * 2553749829u); continue; case 4u: arg_1B2_0 = ((this.accountId_ != null) ? 3904465319u : 4048428569u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_1B2_0 = (num2 * 738502519u ^ 317467380u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_1B2_0 = (num2 * 1227799301u ^ 351687520u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.PeerId); arg_1B2_0 = (num2 * 3574357804u ^ 3703084890u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_1B2_0 = (num2 * 1366126951u ^ 3821280909u); continue; case 9u: num += this.challenges_.CalculateSize(SendChallengeToUserRequest._repeated_challenges_codec); num += 5; arg_1B2_0 = 4280288494u; continue; case 10u: arg_1B2_0 = ((this.gameAccountId_ != null) ? 3056721470u : 3443237155u); continue; case 11u: num += this.attributes_.CalculateSize(SendChallengeToUserRequest._repeated_attributes_codec); arg_1B2_0 = 2626270988u; continue; case 12u: arg_1B2_0 = (((this.Timeout != 0uL) ? 307235245u : 1926437689u) ^ num2 * 119794727u); continue; case 13u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Timeout); arg_1B2_0 = (num2 * 1424215640u ^ 244967887u); continue; } return num; } } return num; } public void MergeFrom(SendChallengeToUserRequest other) { if (other == null) { goto IL_18; } goto IL_346; uint arg_2CA_0; while (true) { IL_2C5: uint num; switch ((num = (arg_2CA_0 ^ 2413271149u)) % 24u) { case 0u: arg_2CA_0 = ((other.accountId_ == null) ? 3313360130u : 3632322190u); continue; case 1u: arg_2CA_0 = (((this.gameAccountId_ == null) ? 398630482u : 2020060101u) ^ num * 1372634115u); continue; case 2u: this.accountId_ = new EntityId(); arg_2CA_0 = (num * 2843947674u ^ 3614761691u); continue; case 3u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_2CA_0 = 3190399691u; continue; case 4u: this.Context = other.Context; arg_2CA_0 = (num * 3455852336u ^ 2579632816u); continue; case 5u: this.peerId_ = new ProcessId(); arg_2CA_0 = (num * 3844646213u ^ 2750565969u); continue; case 6u: arg_2CA_0 = (((this.peerId_ == null) ? 3636307108u : 3277677204u) ^ num * 1633066382u); continue; case 8u: this.Host.MergeFrom(other.Host); arg_2CA_0 = 2820718261u; continue; case 9u: this.attributes_.Add(other.attributes_); arg_2CA_0 = ((other.host_ == null) ? 2820718261u : 4244212060u); continue; case 10u: this.AccountId.MergeFrom(other.AccountId); arg_2CA_0 = 3313360130u; continue; case 11u: arg_2CA_0 = (((this.accountId_ == null) ? 2850665524u : 2189101812u) ^ num * 3660117225u); continue; case 12u: this.gameAccountId_ = new EntityId(); arg_2CA_0 = (num * 1210595705u ^ 3500073690u); continue; case 13u: arg_2CA_0 = ((other.Timeout == 0uL) ? 2429696588u : 4274268070u); continue; case 14u: this.challenges_.Add(other.challenges_); arg_2CA_0 = 3539660549u; continue; case 15u: goto IL_346; case 16u: arg_2CA_0 = (((other.Context != 0u) ? 1436063009u : 737944080u) ^ num * 3919293836u); continue; case 17u: arg_2CA_0 = (((this.host_ == null) ? 3478300605u : 2331119807u) ^ num * 1742705426u); continue; case 18u: this.host_ = new ProcessId(); arg_2CA_0 = (num * 49937716u ^ 3084086821u); continue; case 19u: this.Timeout = other.Timeout; arg_2CA_0 = (num * 1372806293u ^ 2825826155u); continue; case 20u: arg_2CA_0 = ((other.gameAccountId_ != null) ? 4242529956u : 3190399691u); continue; case 21u: this.PeerId.MergeFrom(other.PeerId); arg_2CA_0 = 3051121609u; continue; case 22u: goto IL_18; case 23u: return; } break; } return; IL_18: arg_2CA_0 = 3273901026u; goto IL_2C5; IL_346: arg_2CA_0 = ((other.peerId_ == null) ? 3051121609u : 2477138227u); goto IL_2C5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_4CA: uint num; uint arg_412_0 = ((num = input.ReadTag()) == 0u) ? 647491844u : 369582362u; while (true) { uint num2; switch ((num2 = (arg_412_0 ^ 281869114u)) % 39u) { case 0u: arg_412_0 = (num2 * 2370262348u ^ 625348009u); continue; case 1u: arg_412_0 = ((this.accountId_ != null) ? 946546012u : 1909102051u); continue; case 2u: arg_412_0 = ((num == 58u) ? 1064637769u : 306423866u); continue; case 3u: arg_412_0 = (num2 * 2156536632u ^ 1510389421u); continue; case 4u: arg_412_0 = (num2 * 1827677848u ^ 1880116493u); continue; case 5u: arg_412_0 = ((num > 37u) ? 652979775u : 1642881363u); continue; case 6u: this.gameAccountId_ = new EntityId(); arg_412_0 = (num2 * 726811745u ^ 3242506835u); continue; case 7u: this.Timeout = input.ReadUInt64(); arg_412_0 = 109179357u; continue; case 8u: this.attributes_.AddEntriesFrom(input, SendChallengeToUserRequest._repeated_attributes_codec); arg_412_0 = 109179357u; continue; case 9u: arg_412_0 = (num2 * 691471312u ^ 3322499965u); continue; case 10u: arg_412_0 = (num2 * 22859438u ^ 67724487u); continue; case 11u: arg_412_0 = ((this.gameAccountId_ == null) ? 1248685920u : 607233097u); continue; case 12u: arg_412_0 = ((this.host_ == null) ? 530350799u : 96245598u); continue; case 13u: arg_412_0 = 369582362u; continue; case 14u: arg_412_0 = (num2 * 238127734u ^ 3657844558u); continue; case 15u: input.ReadMessage(this.accountId_); arg_412_0 = 109179357u; continue; case 16u: arg_412_0 = ((num != 26u) ? 1874173965u : 1779664189u); continue; case 17u: arg_412_0 = (((num == 10u) ? 3870741577u : 3762541268u) ^ num2 * 1846989393u); continue; case 18u: arg_412_0 = ((num <= 50u) ? 338537226u : 986738219u); continue; case 19u: arg_412_0 = (num2 * 830921104u ^ 3597228112u); continue; case 20u: this.Context = input.ReadFixed32(); arg_412_0 = 1640669429u; continue; case 21u: arg_412_0 = (((num != 66u) ? 3134415600u : 3386884291u) ^ num2 * 2009525793u); continue; case 22u: this.accountId_ = new EntityId(); arg_412_0 = (num2 * 3974740629u ^ 748817169u); continue; case 23u: arg_412_0 = (((num <= 18u) ? 512957089u : 1886270726u) ^ num2 * 3309142974u); continue; case 24u: arg_412_0 = ((this.peerId_ != null) ? 528653029u : 1040259667u); continue; case 25u: arg_412_0 = (((num != 37u) ? 1225833052u : 1164309908u) ^ num2 * 1917369485u); continue; case 26u: input.ReadMessage(this.gameAccountId_); arg_412_0 = 466356868u; continue; case 27u: arg_412_0 = (((num == 50u) ? 517697390u : 1293653249u) ^ num2 * 1935495216u); continue; case 28u: goto IL_4CA; case 29u: this.host_ = new ProcessId(); arg_412_0 = (num2 * 2223429746u ^ 3880226884u); continue; case 30u: arg_412_0 = (((num == 40u) ? 774072884u : 350506528u) ^ num2 * 2101220189u); continue; case 31u: arg_412_0 = (((num != 18u) ? 2150171325u : 3482793705u) ^ num2 * 2824219719u); continue; case 32u: input.ReadMessage(this.peerId_); arg_412_0 = 120592769u; continue; case 33u: input.SkipLastField(); arg_412_0 = 1473868248u; continue; case 34u: this.challenges_.AddEntriesFrom(input, SendChallengeToUserRequest._repeated_challenges_codec); arg_412_0 = 109179357u; continue; case 35u: this.peerId_ = new ProcessId(); arg_412_0 = (num2 * 249684622u ^ 2381848795u); continue; case 36u: arg_412_0 = (num2 * 2339161036u ^ 843008628u); continue; case 38u: input.ReadMessage(this.host_); arg_412_0 = 66601032u; continue; } return; } } } static SendChallengeToUserRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_7B: uint arg_5F_0 = 1549260459u; while (true) { uint num; switch ((num = (arg_5F_0 ^ 1473151001u)) % 4u) { case 1u: SendChallengeToUserRequest._repeated_attributes_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(50u, Bgs.Protocol.Attribute.Parser); arg_5F_0 = (num * 4702695u ^ 3901611306u); continue; case 2u: SendChallengeToUserRequest._repeated_challenges_codec = FieldCodec.ForMessage<Challenge>(26u, Challenge.Parser); arg_5F_0 = (num * 1581132335u ^ 2196407098u); continue; case 3u: goto IL_7B; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Connection.V1/EchoRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class EchoRequest : IMessage<EchoRequest>, IEquatable<EchoRequest>, IDeepCloneable<EchoRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EchoRequest.__c __9 = new EchoRequest.__c(); internal EchoRequest cctor>b__34_0() { return new EchoRequest(); } } private static readonly MessageParser<EchoRequest> _parser = new MessageParser<EchoRequest>(new Func<EchoRequest>(EchoRequest.__c.__9.<.cctor>b__34_0)); public const int TimeFieldNumber = 1; private ulong time_; public const int NetworkOnlyFieldNumber = 2; private bool networkOnly_; public const int PayloadFieldNumber = 3; private ByteString payload_ = ByteString.Empty; public static MessageParser<EchoRequest> Parser { get { return EchoRequest._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return EchoRequest.Descriptor; } } public ulong Time { get { return this.time_; } set { this.time_ = value; } } public bool NetworkOnly { get { return this.networkOnly_; } set { this.networkOnly_ = value; } } public ByteString Payload { get { return this.payload_; } set { this.payload_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_35<string>(4287036u)); } } public EchoRequest() { } public EchoRequest(EchoRequest other) : this() { this.time_ = other.time_; this.networkOnly_ = other.networkOnly_; this.payload_ = other.payload_; } public EchoRequest Clone() { return new EchoRequest(this); } public override bool Equals(object other) { return this.Equals(other as EchoRequest); } public bool Equals(EchoRequest other) { if (other == null) { goto IL_15; } goto IL_DF; int arg_99_0; while (true) { IL_94: switch ((arg_99_0 ^ -86601140) % 11) { case 0: return false; case 2: arg_99_0 = ((!(this.Payload != other.Payload)) ? -1496505094 : -660761723); continue; case 3: return true; case 4: return false; case 5: return false; case 6: arg_99_0 = ((this.NetworkOnly != other.NetworkOnly) ? -1204440064 : -362744824); continue; case 7: arg_99_0 = ((this.Time != other.Time) ? -978869173 : -874239043); continue; case 8: return false; case 9: goto IL_15; case 10: goto IL_DF; } break; } return true; IL_15: arg_99_0 = -1021715310; goto IL_94; IL_DF: arg_99_0 = ((other == this) ? -1878058905 : -819457030); goto IL_94; } public override int GetHashCode() { int num = 1; while (true) { IL_109: uint arg_DD_0 = 2742806335u; while (true) { uint num2; switch ((num2 = (arg_DD_0 ^ 3318800813u)) % 8u) { case 0u: goto IL_109; case 1u: arg_DD_0 = ((this.Payload.Length == 0) ? 3065420483u : 2455775334u); continue; case 2u: arg_DD_0 = (((this.Time != 0uL) ? 1296366448u : 2052750729u) ^ num2 * 578801108u); continue; case 3u: num ^= this.Payload.GetHashCode(); arg_DD_0 = (num2 * 1853651204u ^ 1355710703u); continue; case 4u: arg_DD_0 = (this.NetworkOnly ? 3239212954u : 3400639428u); continue; case 5u: num ^= this.Time.GetHashCode(); arg_DD_0 = (num2 * 3174483862u ^ 1984492911u); continue; case 7u: num ^= this.NetworkOnly.GetHashCode(); arg_DD_0 = (num2 * 3678027102u ^ 4161134838u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Time != 0uL) { goto IL_1D; } goto IL_11A; uint arg_DA_0; while (true) { IL_D5: uint num; switch ((num = (arg_DA_0 ^ 2369891926u)) % 9u) { case 0u: output.WriteRawTag(16); output.WriteBool(this.NetworkOnly); arg_DA_0 = (num * 2328731504u ^ 51158440u); continue; case 1u: output.WriteRawTag(26); arg_DA_0 = (num * 2577548374u ^ 1406499449u); continue; case 2u: output.WriteFixed64(this.Time); arg_DA_0 = (num * 2573797471u ^ 3390794940u); continue; case 4u: output.WriteBytes(this.Payload); arg_DA_0 = (num * 1378202675u ^ 3864943733u); continue; case 5u: output.WriteRawTag(9); arg_DA_0 = (num * 45590544u ^ 3355449483u); continue; case 6u: arg_DA_0 = ((this.Payload.Length == 0) ? 3226059858u : 2819865805u); continue; case 7u: goto IL_11A; case 8u: goto IL_1D; } break; } return; IL_1D: arg_DA_0 = 3434816539u; goto IL_D5; IL_11A: arg_DA_0 = ((!this.NetworkOnly) ? 2771003368u : 4209395242u); goto IL_D5; } public int CalculateSize() { int num = 0; while (true) { IL_EF: uint arg_C3_0 = 48651325u; while (true) { uint num2; switch ((num2 = (arg_C3_0 ^ 1487710768u)) % 8u) { case 0u: arg_C3_0 = (this.NetworkOnly ? 340409030u : 1206308055u); continue; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Payload); arg_C3_0 = (num2 * 863509632u ^ 1330359785u); continue; case 3u: goto IL_EF; case 4u: num += 9; arg_C3_0 = (num2 * 2714362176u ^ 132992912u); continue; case 5u: arg_C3_0 = (((this.Time != 0uL) ? 2079520242u : 1095932862u) ^ num2 * 2162987622u); continue; case 6u: num += 2; arg_C3_0 = (num2 * 1005998740u ^ 167270127u); continue; case 7u: arg_C3_0 = ((this.Payload.Length == 0) ? 85520617u : 455918266u); continue; } return num; } } return num; } public void MergeFrom(EchoRequest other) { if (other == null) { goto IL_59; } goto IL_FA; uint arg_BA_0; while (true) { IL_B5: uint num; switch ((num = (arg_BA_0 ^ 388129929u)) % 9u) { case 0u: this.Payload = other.Payload; arg_BA_0 = (num * 2014430499u ^ 791063982u); continue; case 1u: arg_BA_0 = ((!other.NetworkOnly) ? 1009707794u : 1512697668u); continue; case 2u: this.Time = other.Time; arg_BA_0 = (num * 3123831087u ^ 4113661539u); continue; case 3u: return; case 4u: goto IL_FA; case 5u: goto IL_59; case 6u: this.NetworkOnly = other.NetworkOnly; arg_BA_0 = (num * 576467681u ^ 1278280255u); continue; case 8u: arg_BA_0 = ((other.Payload.Length == 0) ? 1779730331u : 367083598u); continue; } break; } return; IL_59: arg_BA_0 = 34636884u; goto IL_B5; IL_FA: arg_BA_0 = ((other.Time == 0uL) ? 340478398u : 772479034u); goto IL_B5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14E: uint num; uint arg_102_0 = ((num = input.ReadTag()) != 0u) ? 1696349830u : 903281157u; while (true) { uint num2; switch ((num2 = (arg_102_0 ^ 51017516u)) % 12u) { case 0u: arg_102_0 = (num2 * 2997527282u ^ 612303853u); continue; case 1u: arg_102_0 = (((num != 26u) ? 745249153u : 1673626474u) ^ num2 * 2765996049u); continue; case 2u: arg_102_0 = (((num != 16u) ? 517702679u : 1134912561u) ^ num2 * 1009225847u); continue; case 3u: this.Payload = input.ReadBytes(); arg_102_0 = 747996333u; continue; case 4u: arg_102_0 = (num2 * 4002428173u ^ 3511105957u); continue; case 5u: goto IL_14E; case 6u: arg_102_0 = 1696349830u; continue; case 7u: this.NetworkOnly = input.ReadBool(); arg_102_0 = 29192076u; continue; case 8u: input.SkipLastField(); arg_102_0 = (num2 * 3488423075u ^ 3955419457u); continue; case 10u: arg_102_0 = ((num == 9u) ? 1962422171u : 1341186274u); continue; case 11u: this.Time = input.ReadFixed64(); arg_102_0 = 932644868u; continue; } return; } } } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/MoveHandler.cs using AuthServer.Game.Entities; using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants.Movement; using Framework.Constants.Net; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.IO; namespace AuthServer.Game.Packets.PacketHandler { public class MoveHandler : Manager { private static int spellctr; [Opcode2(ClientMessage.MoveFallLand, "17930"), Opcode2(ClientMessage.MoveStartForward, "17930"), Opcode2(ClientMessage.MoveStop, "17930"), Opcode2(ClientMessage.MoveStopTurn, "17930"), Opcode2(ClientMessage.MoveJump, "17930"), Opcode2(ClientMessage.MoveStartTurnLeft, "17930"), Opcode2(ClientMessage.MoveStartTurnRight, "17930"), Opcode2(ClientMessage.MoveStartSwim, "17930"), Opcode2(ClientMessage.MoveStartBackward, "17930"), Opcode2(ClientMessage.MoveStopSwim, "17930"), Opcode2(ClientMessage.MoveHeartbeat, "17930")] public static void HandleMoveStartForward(ref PacketReader packet, WorldClass2 session) { ObjectMovementValues objectMovementValues = new ObjectMovementValues(); while (true) { IL_3FC: uint arg_37E_0 = 9147451u; while (true) { uint num; switch ((num = (arg_37E_0 ^ 841707322u)) % 28u) { case 0u: goto IL_3FC; case 1u: { BitUnpack bitUnpack; bitUnpack.GetBit(); bitUnpack.GetBit(); bitUnpack.GetBit(); arg_37E_0 = (num * 164979708u ^ 2503844216u); continue; } case 2u: { Character character; Vector4 vector; Manager.ObjectMgr.SetPosition(ref character, vector, false); arg_37E_0 = (num * 3277358720u ^ 4180822621u); continue; } case 3u: { int num2; num2++; arg_37E_0 = (num * 1248225183u ^ 893813217u); continue; } case 4u: arg_37E_0 = ((session != null) ? 942183456u : 788475741u); continue; case 5u: { packet.Read<float>(); packet.Read<float>(); uint num3 = MoveHandler.smethod_0(packet); arg_37E_0 = (num * 738142989u ^ 123470571u); continue; } case 6u: packet.Read<uint>(); arg_37E_0 = 605456785u; continue; case 7u: { BitUnpack bitUnpack; objectMovementValues.MovementFlags = (MovementFlag)bitUnpack.GetBits<uint>(30); arg_37E_0 = (num * 567317250u ^ 216306339u); continue; } case 8u: { BitUnpack bitUnpack; objectMovementValues.IsTransport = bitUnpack.GetBit(); arg_37E_0 = (num * 1358480096u ^ 3472073799u); continue; } case 9u: packet.ReadSmartGuid(); arg_37E_0 = (num * 1064059932u ^ 4173751561u); continue; case 10u: { Character character = session.Character; arg_37E_0 = (num * 4254926009u ^ 2349002053u); continue; } case 11u: objectMovementValues.Time = MoveHandler.smethod_0(packet); arg_37E_0 = (num * 1758499987u ^ 1415707915u); continue; case 12u: MoveHandler.smethod_0(packet); arg_37E_0 = (num * 2976330070u ^ 3154843192u); continue; case 13u: { Character character; arg_37E_0 = (((character == null) ? 295908821u : 538868416u) ^ num * 4149343592u); continue; } case 14u: { int num2; uint num3; arg_37E_0 = (((long)num2 >= (long)((ulong)num3)) ? 815086337u : 1127044852u); continue; } case 15u: { BitUnpack bitUnpack; objectMovementValues.MovementFlags2 = (MovementFlag2)bitUnpack.GetBits<uint>(18); arg_37E_0 = (num * 1605246375u ^ 272331799u); continue; } case 16u: objectMovementValues.FallTime = packet.Read<uint>(); objectMovementValues.JumpVelocity = packet.Read<float>(); arg_37E_0 = (num * 3691623988u ^ 973384501u); continue; case 17u: { BitUnpack bitUnpack = new BitUnpack(packet); arg_37E_0 = (num * 3008517940u ^ 1638105723u); continue; } case 18u: { int num2 = 0; arg_37E_0 = (num * 3853871540u ^ 809052057u); continue; } case 19u: { BitUnpack bitUnpack; objectMovementValues.HasJumpData = bitUnpack.GetBit(); arg_37E_0 = (num * 1640032596u ^ 1265380340u); continue; } case 20u: { Vector4 vector = new Vector4 { X = packet.Read<float>(), Y = packet.Read<float>(), Z = packet.Read<float>(), O = packet.Read<float>() }; arg_37E_0 = (num * 1655057484u ^ 2313516287u); continue; } case 21u: objectMovementValues.CurrentSpeed = packet.Read<float>(); arg_37E_0 = (num * 55900818u ^ 653765200u); continue; case 22u: arg_37E_0 = (((!objectMovementValues.IsFallingOrJumping) ? 1263911074u : 764650170u) ^ num * 743526344u); continue; case 23u: arg_37E_0 = (num * 3887360177u ^ 1013715343u); continue; case 24u: objectMovementValues.Sin = packet.Read<float>(); objectMovementValues.Cos = packet.Read<float>(); arg_37E_0 = (num * 1914487889u ^ 1823127267u); continue; case 25u: { BitUnpack bitUnpack; objectMovementValues.IsFallingOrJumping = bitUnpack.GetBit(); arg_37E_0 = (num * 449423416u ^ 3401972167u); continue; } case 26u: arg_37E_0 = ((objectMovementValues.HasJumpData ? 732155638u : 1159085886u) ^ num * 3311180246u); continue; } return; } } } public static void HandleMoveFallLand(ref PacketReader packet, WorldClass2 session) { ObjectMovementValues objectMovementValues = new ObjectMovementValues(); while (true) { IL_11E0: uint arg_1012_0 = 2336754510u; while (true) { uint num; switch ((num = (arg_1012_0 ^ 4122098701u)) % 112u) { case 0u: { int num2; byte[] array; arg_1012_0 = ((num2 >= array.Length) ? 3857558977u : 2952361748u); continue; } case 1u: { string string_ = Module.smethod_36<string>(4018457857u); arg_1012_0 = (num * 2632199611u ^ 1442968080u); continue; } case 2u: { PacketWriter packetWriter; byte[] array2; packetWriter.WriteBytes(array2, 0); arg_1012_0 = (num * 1568873463u ^ 79425833u); continue; } case 3u: { BitUnpack bitUnpack = new BitUnpack(packet); arg_1012_0 = (num * 1302032123u ^ 171453246u); continue; } case 4u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); arg_1012_0 = (num * 1629476114u ^ 4122705212u); continue; } case 5u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); arg_1012_0 = (num * 3489177227u ^ 3720173095u); continue; } case 6u: objectMovementValues.CurrentSpeed = packet.Read<float>(); arg_1012_0 = (num * 2889272145u ^ 3575978696u); continue; case 7u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_2 = Module.smethod_35<string>(2722945237u); arg_1012_0 = (num * 499606485u ^ 4026661745u); continue; } case 8u: { BitUnpack bitUnpack; bitUnpack.GetBit(); arg_1012_0 = (num * 3162029451u ^ 2237198493u); continue; } case 9u: { byte[] array; int num3; arg_1012_0 = ((num3 < array.Length) ? 4289373511u : 2912122745u); continue; } case 10u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); arg_1012_0 = (num * 1793778379u ^ 1664217850u); continue; } case 11u: arg_1012_0 = (num * 2832184775u ^ 4136422482u); continue; case 12u: { int num4; num4++; arg_1012_0 = (num * 2447411836u ^ 4090304689u); continue; } case 13u: packet.Read<float>(); arg_1012_0 = (num * 4280011957u ^ 2589750139u); continue; case 14u: { string string_; byte[] array2; int num5; array2[num5] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_, num5 * 2, 2), 16); num5++; arg_1012_0 = 2649301814u; continue; } case 15u: { PacketWriter packetWriter2 = new PacketWriter(ServerMessage.SpellStart, true); arg_1012_0 = (num * 2111439755u ^ 2212406335u); continue; } case 16u: { int num3; num3++; arg_1012_0 = (num * 3656972534u ^ 3161512884u); continue; } case 17u: { string string_2; byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; arg_1012_0 = (num * 3870232643u ^ 3145346707u); continue; } case 18u: packet.ReadSmartGuid(); arg_1012_0 = (num * 1916170578u ^ 1690304407u); continue; case 19u: { PacketWriter packetWriter2 = new PacketWriter(ServerMessage.AuraUpdate, true); arg_1012_0 = (num * 1016438456u ^ 3379166815u); continue; } case 20u: { BitUnpack bitUnpack; objectMovementValues.HasJumpData = bitUnpack.GetBit(); arg_1012_0 = (num * 3750381933u ^ 3881909850u); continue; } case 21u: { PacketWriter packetWriter2; packetWriter2.WriteUInt8(0); session.Send(ref packetWriter2); packetWriter2 = new PacketWriter(ServerMessage.GrmlTest, true); arg_1012_0 = (num * 1107293623u ^ 2871251063u); continue; } case 22u: arg_1012_0 = (((!objectMovementValues.IsFallingOrJumping) ? 1552573738u : 1144092785u) ^ num * 2627426854u); continue; case 23u: { int num6 = 0; arg_1012_0 = (num * 1017282037u ^ 786531606u); continue; } case 24u: arg_1012_0 = (num * 4000018646u ^ 875439089u); continue; case 25u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); arg_1012_0 = (num * 277068281u ^ 157280349u); continue; } case 26u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_2 = Module.smethod_36<string>(3387575955u); arg_1012_0 = (num * 504050403u ^ 2959272050u); continue; } case 27u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 2657349543u ^ 4268771366u); continue; } case 28u: { int num7; num7++; arg_1012_0 = (num * 2614890331u ^ 691882918u); continue; } case 29u: objectMovementValues.Sin = packet.Read<float>(); objectMovementValues.Cos = packet.Read<float>(); arg_1012_0 = (num * 3797978359u ^ 2708092048u); continue; case 30u: objectMovementValues.Time = MoveHandler.smethod_0(packet); arg_1012_0 = (num * 2969124810u ^ 3448081740u); continue; case 31u: { byte[] array; string string_2; int num8; array[num8] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num8 * 2, 2), 16); num8++; arg_1012_0 = 2236419567u; continue; } case 32u: arg_1012_0 = ((MoveHandler.smethod_1(objectMovementValues.MovementFlags2, MovementFlag2.Unknown16) ? 3121037322u : 3636738892u) ^ num * 2368365862u); continue; case 33u: { string string_2 = Module.smethod_37<string>(2425440293u); arg_1012_0 = (num * 816400999u ^ 502086756u); continue; } case 34u: { int num2; num2++; arg_1012_0 = (num * 1363230260u ^ 406403157u); continue; } case 35u: { byte[] array; string string_2; int num9; array[num9] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num9 * 2, 2), 16); arg_1012_0 = 2915863927u; continue; } case 36u: { int num3 = 0; arg_1012_0 = (num * 2374651997u ^ 2616132722u); continue; } case 37u: packet.Read<uint>(); arg_1012_0 = 3391268158u; continue; case 38u: { int num10; num10++; arg_1012_0 = (num * 2291014852u ^ 3725635463u); continue; } case 39u: goto IL_11E0; case 40u: { byte[] array; int num6; arg_1012_0 = ((num6 >= array.Length) ? 4189404378u : 4283844403u); continue; } case 41u: { string string_2 = Module.smethod_34<string>(3747977502u); byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; arg_1012_0 = (num * 2448105467u ^ 3493948812u); continue; } case 42u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_1012_0 = (num * 1992944536u ^ 3732619161u); continue; } case 43u: { Character character; Vector4 vector; Manager.ObjectMgr.SetPosition(ref character, vector, true); arg_1012_0 = (num * 4176983257u ^ 3486592258u); continue; } case 44u: { Character character = session.Character; arg_1012_0 = (num * 1392165433u ^ 2240045972u); continue; } case 45u: { string string_2 = Module.smethod_36<string>(293769454u); arg_1012_0 = (num * 837599323u ^ 3818307748u); continue; } case 46u: { PacketWriter packetWriter2; session.Send(ref packetWriter2); arg_1012_0 = (num * 1720660934u ^ 3285508074u); continue; } case 47u: { byte[] array; int num7; arg_1012_0 = ((num7 >= array.Length) ? 2790756016u : 3327162994u); continue; } case 48u: { MoveHandler.spellctr++; PacketWriter packetWriter2 = new PacketWriter(ServerMessage.AuraUpdate, true); new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_2 = Module.smethod_36<string>(2829036598u); byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; int num2 = 0; arg_1012_0 = (num * 469679657u ^ 2409827885u); continue; } case 49u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); arg_1012_0 = (num * 419245542u ^ 2830609471u); continue; } case 50u: { byte[] array; int num8; arg_1012_0 = ((num8 < array.Length) ? 2378279122u : 3866535620u); continue; } case 51u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); arg_1012_0 = (num * 2366108229u ^ 991962892u); continue; } case 52u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 3034763150u ^ 1900141793u); continue; } case 53u: { int num11 = 0; arg_1012_0 = (num * 413538065u ^ 12682669u); continue; } case 54u: { PacketWriter packetWriter2; session.Send(ref packetWriter2); packetWriter2 = new PacketWriter(ServerMessage.SpellStart, true); new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_2 = Module.smethod_34<string>(605512917u); byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; arg_1012_0 = (num * 3338675610u ^ 3844615013u); continue; } case 55u: arg_1012_0 = (((MoveHandler.spellctr == 0) ? 516618262u : 163229031u) ^ num * 485470333u); continue; case 56u: { int num11; uint num12; arg_1012_0 = (((long)num11 < (long)((ulong)num12)) ? 3164335592u : 3952697459u); continue; } case 57u: { PacketWriter packetWriter2; session.Send(ref packetWriter2); arg_1012_0 = (num * 785425877u ^ 708953562u); continue; } case 58u: { byte[] array; string string_2; int num3; array[num3] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num3 * 2, 2), 16); arg_1012_0 = 3433174237u; continue; } case 59u: { PacketWriter packetWriter2; session.Send(ref packetWriter2); packetWriter2 = new PacketWriter(ServerMessage.SpellGo, true); arg_1012_0 = (num * 3991410625u ^ 3029799724u); continue; } case 60u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 2619996098u ^ 1132407971u); continue; } case 61u: { int num9 = 0; arg_1012_0 = (num * 4293632955u ^ 750714003u); continue; } case 62u: { byte[] array; string string_2; int num10; array[num10] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num10 * 2, 2), 16); arg_1012_0 = 4153468651u; continue; } case 63u: { byte[] array; string string_2; int num7; array[num7] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num7 * 2, 2), 16); arg_1012_0 = 2201826977u; continue; } case 64u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 3432058493u ^ 3274529654u); continue; } case 65u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.GrmlTest, true); new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_1012_0 = 3311789980u; continue; } case 66u: { byte[] array; int num10; arg_1012_0 = ((num10 < array.Length) ? 3050507043u : 3424909216u); continue; } case 67u: arg_1012_0 = (((!objectMovementValues.HasJumpData) ? 4047015286u : 2482364648u) ^ num * 4086087272u); continue; case 68u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); arg_1012_0 = (num * 2342515193u ^ 1341456034u); continue; } case 69u: arg_1012_0 = (num * 1323917650u ^ 2108082831u); continue; case 70u: { string string_2; byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; arg_1012_0 = (num * 3640748560u ^ 359448986u); continue; } case 71u: { uint num12 = MoveHandler.smethod_0(packet); MoveHandler.smethod_0(packet); arg_1012_0 = (num * 3054379898u ^ 4122879870u); continue; } case 72u: { PacketWriter packetWriter2; session.Send(ref packetWriter2); arg_1012_0 = (num * 624014124u ^ 3289838210u); continue; } case 73u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 3910756805u ^ 746169568u); continue; } case 74u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 2010014894u ^ 3955064260u); continue; } case 75u: arg_1012_0 = (num * 811067946u ^ 434479610u); continue; case 77u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 673980217u ^ 1576262665u); continue; } case 78u: { BitUnpack bitUnpack; objectMovementValues.MovementFlags = (MovementFlag)bitUnpack.GetBits<uint>(30); arg_1012_0 = (num * 1981152365u ^ 2871270316u); continue; } case 79u: { string string_2; byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; arg_1012_0 = (num * 4283533296u ^ 341240386u); continue; } case 80u: { byte[] array; string string_2; int num4; array[num4] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num4 * 2, 2), 16); arg_1012_0 = 2680975553u; continue; } case 81u: { byte[] array; int num9; arg_1012_0 = ((num9 < array.Length) ? 4129258318u : 2467455789u); continue; } case 82u: { int num10 = 0; arg_1012_0 = (num * 2919940822u ^ 2867559882u); continue; } case 83u: { int num11; num11++; arg_1012_0 = (num * 997022664u ^ 3972334061u); continue; } case 84u: { BitUnpack bitUnpack; objectMovementValues.IsTransport = bitUnpack.GetBit(); objectMovementValues.IsFallingOrJumping = bitUnpack.GetBit(); bitUnpack.GetBit(); arg_1012_0 = 3046157925u; continue; } case 85u: { int num4 = 0; arg_1012_0 = (num * 1347780055u ^ 887381830u); continue; } case 86u: { string string_; byte[] array2 = new byte[MoveHandler.smethod_2(string_) / 2]; int num5 = 0; arg_1012_0 = (num * 596619402u ^ 2813980074u); continue; } case 87u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 3291488334u ^ 3010157740u); continue; } case 88u: { BitUnpack bitUnpack; bitUnpack.GetBit(); arg_1012_0 = (num * 1677305565u ^ 2991707587u); continue; } case 89u: { int num2; byte[] array; string string_2; array[num2] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num2 * 2, 2), 16); arg_1012_0 = 3430763295u; continue; } case 90u: { PacketWriter packetWriter2 = new PacketWriter(ServerMessage.SpellGo, true); arg_1012_0 = (num * 346050326u ^ 1455995504u); continue; } case 91u: { byte[] array2; int num5; arg_1012_0 = ((num5 >= array2.Length) ? 4248501135u : 2860852787u); continue; } case 92u: { byte[] array; int num4; arg_1012_0 = ((num4 >= array.Length) ? 2208847647u : 3496442733u); continue; } case 93u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 2406109233u ^ 159031336u); continue; } case 94u: { string string_2; byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; arg_1012_0 = (num * 1809620320u ^ 1536581736u); continue; } case 95u: { string string_2; byte[] array = new byte[MoveHandler.smethod_2(string_2) / 2]; int num8 = 0; arg_1012_0 = (num * 1708446177u ^ 1933454512u); continue; } case 96u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_1012_0 = (num * 1770549920u ^ 3005483001u); continue; } case 97u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_2 = Module.smethod_33<string>(559198681u); arg_1012_0 = (num * 4155217033u ^ 4128134427u); continue; } case 98u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); session.Send(ref packetWriter2); arg_1012_0 = (num * 4191279278u ^ 3036821589u); continue; } case 99u: arg_1012_0 = ((session == null) ? 3343846529u : 2645954049u); continue; case 100u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter2.WriteUInt8(0); session.Send(ref packetWriter2); packetWriter2 = new PacketWriter(ServerMessage.KnockBack, true); arg_1012_0 = (num * 630111994u ^ 42021488u); continue; } case 101u: { Character character; arg_1012_0 = (((character != null) ? 2050939632u : 1325872583u) ^ num * 1474414318u); continue; } case 102u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); arg_1012_0 = (num * 162247791u ^ 2184900669u); continue; } case 103u: { BitUnpack bitUnpack; objectMovementValues.MovementFlags2 = (MovementFlag2)bitUnpack.GetBits<uint>(18); arg_1012_0 = (num * 821092190u ^ 257935887u); continue; } case 104u: objectMovementValues.FallTime = packet.Read<uint>(); objectMovementValues.JumpVelocity = packet.Read<float>(); arg_1012_0 = (num * 3835120285u ^ 3498885089u); continue; case 105u: packet.Read<float>(); arg_1012_0 = (num * 2463597082u ^ 1670507402u); continue; case 106u: { int num9; num9++; arg_1012_0 = (num * 3953413923u ^ 1778203714u); continue; } case 107u: { int num6; num6++; arg_1012_0 = (num * 3459487084u ^ 3107853137u); continue; } case 108u: { byte[] array; PacketWriter packetWriter2; packetWriter2.WriteBytes(array, 0); arg_1012_0 = (num * 1501487652u ^ 2779420721u); continue; } case 109u: { Vector4 vector = new Vector4 { X = packet.Read<float>(), Y = packet.Read<float>(), Z = packet.Read<float>(), O = packet.Read<float>() }; arg_1012_0 = (num * 2969712791u ^ 3705721935u); continue; } case 110u: { byte[] array; string string_2; int num6; array[num6] = MoveHandler.smethod_4(MoveHandler.smethod_3(string_2, num6 * 2, 2), 16); arg_1012_0 = 2822122534u; continue; } case 111u: { int num7 = 0; arg_1012_0 = (num * 4069042922u ^ 3635515476u); continue; } } return; } } } public static void HandleMoveUpdate(ulong guid, ObjectMovementValues movementValues, Vector4 vector, uint index) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveUpdate, true); while (true) { IL_376: uint arg_310_0 = 1709358439u; while (true) { uint num; switch ((num = (arg_310_0 ^ 1535379137u)) % 22u) { case 0u: arg_310_0 = ((movementValues.IsFallingOrJumping ? 157493612u : 187883487u) ^ num * 3936920555u); continue; case 1u: packetWriter.WriteFloat(vector.Y); packetWriter.WriteFloat(vector.Z); arg_310_0 = (num * 3294803525u ^ 1203899079u); continue; case 2u: { WorldClass session; arg_310_0 = (((session != null) ? 2713376691u : 4067625320u) ^ num * 892598214u); continue; } case 3u: { BitPack bitPack; bitPack.Write<int>(0); arg_310_0 = (num * 2565185380u ^ 2783446850u); continue; } case 4u: { BitPack bitPack; bitPack.Write<uint>((uint)movementValues.MovementFlags, 30); bitPack.Write<uint>((uint)movementValues.MovementFlags2, 15); bitPack.Write<bool>(false); bitPack.Write<bool>(movementValues.IsFallingOrJumping); arg_310_0 = (num * 1354628250u ^ 3208723184u); continue; } case 5u: packetWriter.WriteFloat(movementValues.Sin); arg_310_0 = (num * 2518508666u ^ 1798548196u); continue; case 6u: { WorldClass session = Manager.WorldMgr.GetSession(guid); arg_310_0 = 1324365997u; continue; } case 7u: packetWriter.WriteUInt32(movementValues.FallTime); packetWriter.WriteFloat(movementValues.JumpVelocity); arg_310_0 = (num * 1888565882u ^ 2253619585u); continue; case 8u: { BitPack bitPack = new BitPack(packetWriter, guid, 0uL, 0uL, 0uL); packetWriter.WriteSmartGuid(guid, GuidType.Player); arg_310_0 = (num * 3522993941u ^ 1336476174u); continue; } case 9u: packetWriter.WriteFloat(vector.O); arg_310_0 = (num * 383189249u ^ 3164380569u); continue; case 10u: { BitPack bitPack; bitPack.Write<bool>(movementValues.HasJumpData); arg_310_0 = (num * 2405180942u ^ 2970168480u); continue; } case 11u: packetWriter.WriteUInt32(movementValues.Time); packetWriter.WriteFloat(vector.X); arg_310_0 = (num * 3253059658u ^ 3764035222u); continue; case 12u: packetWriter.WriteFloat(0f); packetWriter.WriteUInt32(0u); arg_310_0 = (num * 273422727u ^ 2635527047u); continue; case 13u: { BitPack bitPack; bitPack.Flush(); arg_310_0 = (num * 1976622339u ^ 4043511489u); continue; } case 14u: goto IL_376; case 16u: arg_310_0 = (((!movementValues.HasJumpData) ? 2185053323u : 2231335773u) ^ num * 2295440723u); continue; case 17u: packetWriter.WriteFloat(movementValues.Cos); packetWriter.WriteFloat(movementValues.CurrentSpeed); arg_310_0 = (num * 3373174205u ^ 114751702u); continue; case 18u: packetWriter.WriteUInt32(0u); arg_310_0 = (num * 2618583045u ^ 3915754039u); continue; case 19u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Flush(); arg_310_0 = (num * 3980437445u ^ 2468575432u); continue; } case 20u: { WorldClass session; Character character = session.Character; Manager.ObjectMgr.SetPosition(ref character, vector, false); session.Send(ref packetWriter); arg_310_0 = (num * 3533119749u ^ 2863587842u); continue; } case 21u: packetWriter.WriteFloat(0f); arg_310_0 = (num * 2103012468u ^ 3513773539u); continue; } return; } } } public static void HandleMoveSetWalkSpeed(ref WorldClass2 session, float speed = 2.5f) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveSetWalkSpeed, true); packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter.WriteUInt32(0u); while (true) { IL_59: uint arg_41_0 = 2501174224u; while (true) { uint num; switch ((num = (arg_41_0 ^ 3911917471u)) % 3u) { case 0u: goto IL_59; case 2u: packetWriter.WriteFloat(speed); arg_41_0 = (num * 2431358989u ^ 4152468385u); continue; } goto Block_1; } } Block_1: session.Send(ref packetWriter); } public static void HandleMoveSetRunSpeed(ref WorldClass2 session, float speed = 7f) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveSetRunSpeed, true); while (true) { IL_9E: uint arg_7A_0 = 2976821047u; while (true) { uint num; switch ((num = (arg_7A_0 ^ 2875931154u)) % 6u) { case 1u: packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_7A_0 = (num * 3950447154u ^ 1624550072u); continue; case 2u: packetWriter.WriteUInt32(0u); arg_7A_0 = (num * 3667540534u ^ 2335423744u); continue; case 3u: goto IL_9E; case 4u: packetWriter.WriteFloat(speed); arg_7A_0 = (num * 2986492733u ^ 3278978211u); continue; case 5u: session.Send(ref packetWriter); arg_7A_0 = (num * 1334163219u ^ 1579331567u); continue; } return; } } } public static void HandleMoveSetSwimSpeed(ref WorldClass2 session, float speed = 4.72222f) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveSetSwimSpeed, true); while (true) { IL_6C: uint arg_50_0 = 77726750u; while (true) { uint num; switch ((num = (arg_50_0 ^ 272458268u)) % 4u) { case 1u: packetWriter.WriteFloat(speed); arg_50_0 = (num * 3449230205u ^ 4075664677u); continue; case 2u: packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter.WriteUInt32(0u); arg_50_0 = (num * 1251771344u ^ 684545813u); continue; case 3u: goto IL_6C; } goto Block_1; } } Block_1: session.Send(ref packetWriter); } public static void HandleMoveSetFlightSpeed(ref WorldClass2 session, float speed = 7f) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveSetFlightSpeed, true); packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); while (true) { IL_75: uint arg_59_0 = 327570804u; while (true) { uint num; switch ((num = (arg_59_0 ^ 1398495645u)) % 4u) { case 0u: packetWriter.WriteFloat(speed); session.Send(ref packetWriter); arg_59_0 = (num * 2532511205u ^ 2036369727u); continue; case 1u: packetWriter.WriteUInt32(0u); arg_59_0 = (num * 2157390107u ^ 2040566234u); continue; case 3u: goto IL_75; } return; } } } public static void HandleMoveSetCanFly(ref WorldClass2 session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveSetCanFly, true); while (true) { IL_66: uint arg_4E_0 = 2228814122u; while (true) { uint num; switch ((num = (arg_4E_0 ^ 3126726555u)) % 3u) { case 1u: new BitPack(packetWriter, session.Character.Guid, 0uL, 0uL, 0uL); arg_4E_0 = (num * 707221193u ^ 347925818u); continue; case 2u: goto IL_66; } goto Block_1; } } Block_1: packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter.WriteUInt32(0u); session.Send(ref packetWriter); } public static void HandleMoveUnsetCanFly(ref WorldClass2 session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveUnsetCanFly, true); while (true) { IL_6E: uint arg_52_0 = 2557055423u; while (true) { uint num; switch ((num = (arg_52_0 ^ 3141659397u)) % 4u) { case 0u: goto IL_6E; case 1u: packetWriter.WriteUInt32(0u); session.Send(ref packetWriter); arg_52_0 = (num * 1246506569u ^ 3302854207u); continue; case 2u: packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_52_0 = (num * 986494822u ^ 246738284u); continue; } return; } } } public static void HandleMoveTeleport(ref WorldClass2 session, Vector4 vector) { bool flag = false; bool flag2 = false; PacketWriter packetWriter = new PacketWriter(ServerMessage.MoveTeleport, true); while (true) { IL_168: uint arg_13C_0 = 3241315517u; while (true) { uint num; switch ((num = (arg_13C_0 ^ 2710365947u)) % 8u) { case 0u: arg_13C_0 = ((!flag2) ? 4150708586u : 3338585470u); continue; case 1u: session.Send(ref packetWriter); arg_13C_0 = 3057069039u; continue; case 2u: packetWriter.WriteUInt64(0uL); arg_13C_0 = (num * 2787996010u ^ 810478047u); continue; case 3u: arg_13C_0 = (((!flag) ? 3326981106u : 3591763416u) ^ num * 3870844803u); continue; case 5u: packetWriter.WriteUInt8(0); arg_13C_0 = (num * 283861271u ^ 2192268441u); continue; case 6u: { BitPack arg_90_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter.WriteUInt32(0u); packetWriter.WriteFloat(vector.X); packetWriter.WriteFloat(vector.Y); packetWriter.WriteFloat(vector.Z); packetWriter.WriteFloat(vector.O); packetWriter.WriteUInt8(0); arg_90_0.Write<bool>(flag); arg_90_0.Write<bool>(flag2); arg_90_0.Flush(); arg_13C_0 = (num * 4217508530u ^ 476089492u); continue; } case 7u: goto IL_168; } return; } } } public static void HandleTransferPending(ref WorldClass2 session, uint mapId) { bool bit = false; while (true) { IL_8A: uint arg_72_0 = 4005644020u; while (true) { uint num; switch ((num = (arg_72_0 ^ 2679496220u)) % 3u) { case 0u: goto IL_8A; case 1u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.TransferPending, true); BitPack arg_44_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(mapId); arg_44_0.Write<bool>(false); arg_44_0.Write<bool>(bit); arg_44_0.Flush(); session.Send(ref packetWriter); arg_72_0 = (num * 3882105345u ^ 1487298396u); continue; } } return; } } } public static void HandleNewWorld(ref WorldClass2 session, Vector4 vector, uint mapId) { PacketWriter packetWriter = new PacketWriter(ServerMessage.NewWorld, true); while (true) { IL_108: uint arg_DC_0 = 3458489361u; while (true) { uint num; switch ((num = (arg_DC_0 ^ 3194201389u)) % 8u) { case 0u: packetWriter.WriteFloat(vector.X); packetWriter.WriteFloat(vector.Y); arg_DC_0 = (num * 723470497u ^ 3706238830u); continue; case 2u: goto IL_108; case 3u: packetWriter.WriteFloat(vector.Z); packetWriter.WriteFloat(vector.O); arg_DC_0 = (num * 386012771u ^ 1203923379u); continue; case 4u: packetWriter.WriteUInt32(mapId); arg_DC_0 = (num * 3527963227u ^ 4149576153u); continue; case 5u: packetWriter.WriteFloat(vector.Z); arg_DC_0 = (num * 3499751588u ^ 2567987087u); continue; case 6u: session.Send(ref packetWriter); arg_DC_0 = (num * 1150008196u ^ 2895725124u); continue; case 7u: packetWriter.WriteUInt32(0u); packetWriter.WriteFloat(vector.X); packetWriter.WriteFloat(vector.Y); arg_DC_0 = (num * 3734634920u ^ 356212256u); continue; } return; } } } static uint smethod_0(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt32(); } static bool smethod_1(Enum enum_0, Enum enum_1) { return enum_0.HasFlag(enum_1); } static int smethod_2(string string_0) { return string_0.Length; } static string smethod_3(string string_0, int int_0, int int_1) { return string_0.Substring(int_0, int_1); } static byte smethod_4(string string_0, int int_0) { return Convert.ToByte(string_0, int_0); } } } <file_sep>/Bgs.Protocol.Account.V1/GetAccountResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetAccountResponse : IMessage<GetAccountResponse>, IEquatable<GetAccountResponse>, IDeepCloneable<GetAccountResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAccountResponse.__c __9 = new GetAccountResponse.__c(); internal GetAccountResponse cctor>b__54_0() { return new GetAccountResponse(); } } private static readonly MessageParser<GetAccountResponse> _parser = new MessageParser<GetAccountResponse>(new Func<GetAccountResponse>(GetAccountResponse.__c.__9.<.cctor>b__54_0)); public const int BlobFieldNumber = 11; private AccountBlob blob_; public const int IdFieldNumber = 12; private AccountId id_; public const int EmailFieldNumber = 13; private static readonly FieldCodec<string> _repeated_email_codec = FieldCodec.ForString(106u); private readonly RepeatedField<string> email_ = new RepeatedField<string>(); public const int BattleTagFieldNumber = 14; private string battleTag_ = ""; public const int FullNameFieldNumber = 15; private string fullName_ = ""; public const int LinksFieldNumber = 16; private static readonly FieldCodec<GameAccountLink> _repeated_links_codec = FieldCodec.ForMessage<GameAccountLink>(130u, GameAccountLink.Parser); private readonly RepeatedField<GameAccountLink> links_ = new RepeatedField<GameAccountLink>(); public const int ParentalControlInfoFieldNumber = 17; private ParentalControlInfo parentalControlInfo_; public static MessageParser<GetAccountResponse> Parser { get { return GetAccountResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return GetAccountResponse.Descriptor; } } public AccountBlob Blob { get { return this.blob_; } set { this.blob_ = value; } } public AccountId Id { get { return this.id_; } set { this.id_ = value; } } public RepeatedField<string> Email { get { return this.email_; } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string FullName { get { return this.fullName_; } set { this.fullName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<GameAccountLink> Links { get { return this.links_; } } public ParentalControlInfo ParentalControlInfo { get { return this.parentalControlInfo_; } set { this.parentalControlInfo_ = value; } } public GetAccountResponse() { } public GetAccountResponse(GetAccountResponse other) : this() { while (true) { IL_E4: uint arg_C0_0 = 479651392u; while (true) { uint num; switch ((num = (arg_C0_0 ^ 1281516825u)) % 6u) { case 0u: this.links_ = other.links_.Clone(); arg_C0_0 = (num * 3462141348u ^ 1755973166u); continue; case 1u: this.Blob = ((other.blob_ != null) ? other.Blob.Clone() : null); arg_C0_0 = 102782118u; continue; case 2u: goto IL_E4; case 3u: this.ParentalControlInfo = ((other.parentalControlInfo_ != null) ? other.ParentalControlInfo.Clone() : null); arg_C0_0 = 1621667645u; continue; case 5u: this.Id = ((other.id_ != null) ? other.Id.Clone() : null); this.email_ = other.email_.Clone(); this.battleTag_ = other.battleTag_; this.fullName_ = other.fullName_; arg_C0_0 = 367259481u; continue; } return; } } } public GetAccountResponse Clone() { return new GetAccountResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetAccountResponse); } public bool Equals(GetAccountResponse other) { if (other == null) { goto IL_76; } goto IL_1CB; int arg_165_0; while (true) { IL_160: switch ((arg_165_0 ^ -54131751) % 19) { case 0: return true; case 1: return false; case 2: arg_165_0 = ((!this.links_.Equals(other.links_)) ? -363934197 : -982048418); continue; case 3: return false; case 4: return false; case 5: arg_165_0 = (GetAccountResponse.smethod_1(this.FullName, other.FullName) ? -1859047777 : -577609901); continue; case 6: return false; case 7: goto IL_1CB; case 8: return false; case 9: arg_165_0 = (GetAccountResponse.smethod_1(this.BattleTag, other.BattleTag) ? -784918044 : -1632760735); continue; case 10: return false; case 11: arg_165_0 = (GetAccountResponse.smethod_0(this.Id, other.Id) ? -1570142478 : -561847734); continue; case 12: arg_165_0 = ((!GetAccountResponse.smethod_0(this.Blob, other.Blob)) ? -1547833582 : -1816023599); continue; case 13: goto IL_76; case 14: return false; case 15: arg_165_0 = (GetAccountResponse.smethod_0(this.ParentalControlInfo, other.ParentalControlInfo) ? -1401973885 : -621972691); continue; case 16: return false; case 18: arg_165_0 = ((!this.email_.Equals(other.email_)) ? -150233498 : -632775231); continue; } break; } return true; IL_76: arg_165_0 = -466090710; goto IL_160; IL_1CB: arg_165_0 = ((other == this) ? -2146376582 : -1560394186); goto IL_160; } public override int GetHashCode() { int num = 1; while (true) { IL_1E6: uint arg_1A1_0 = 1261687381u; while (true) { uint num2; switch ((num2 = (arg_1A1_0 ^ 689187467u)) % 14u) { case 0u: num ^= GetAccountResponse.smethod_2(this.ParentalControlInfo); arg_1A1_0 = (num2 * 1827158351u ^ 422305972u); continue; case 2u: num ^= GetAccountResponse.smethod_2(this.email_); arg_1A1_0 = 2018948355u; continue; case 3u: num ^= GetAccountResponse.smethod_2(this.links_); arg_1A1_0 = 428135084u; continue; case 4u: arg_1A1_0 = (((this.blob_ == null) ? 4085702112u : 2240817162u) ^ num2 * 2546929943u); continue; case 5u: goto IL_1E6; case 6u: num ^= GetAccountResponse.smethod_2(this.FullName); arg_1A1_0 = (num2 * 1300329417u ^ 3524503772u); continue; case 7u: num ^= GetAccountResponse.smethod_2(this.BattleTag); arg_1A1_0 = (num2 * 3241925919u ^ 1869559610u); continue; case 8u: num ^= GetAccountResponse.smethod_2(this.Id); arg_1A1_0 = (num2 * 3309103230u ^ 579123001u); continue; case 9u: arg_1A1_0 = (((this.parentalControlInfo_ != null) ? 844261367u : 256005396u) ^ num2 * 2482038214u); continue; case 10u: arg_1A1_0 = ((GetAccountResponse.smethod_3(this.FullName) != 0) ? 77816953u : 491133662u); continue; case 11u: num ^= GetAccountResponse.smethod_2(this.Blob); arg_1A1_0 = (num2 * 4191679910u ^ 1600462720u); continue; case 12u: arg_1A1_0 = (((GetAccountResponse.smethod_3(this.BattleTag) == 0) ? 3991739005u : 2184565778u) ^ num2 * 139556476u); continue; case 13u: arg_1A1_0 = ((this.id_ == null) ? 959548257u : 1867189343u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.blob_ != null) { goto IL_184; } goto IL_205; uint arg_1B1_0; while (true) { IL_1AC: uint num; switch ((num = (arg_1B1_0 ^ 2508102449u)) % 14u) { case 1u: output.WriteRawTag(90); output.WriteMessage(this.Blob); arg_1B1_0 = (num * 1866735970u ^ 4246894417u); continue; case 2u: goto IL_184; case 3u: arg_1B1_0 = ((GetAccountResponse.smethod_3(this.FullName) == 0) ? 4082869034u : 3608655385u); continue; case 4u: this.email_.WriteTo(output, GetAccountResponse._repeated_email_codec); arg_1B1_0 = ((GetAccountResponse.smethod_3(this.BattleTag) == 0) ? 4292127244u : 2153727368u); continue; case 5u: output.WriteRawTag(114); output.WriteString(this.BattleTag); arg_1B1_0 = (num * 394601763u ^ 3795556935u); continue; case 6u: output.WriteRawTag(122); output.WriteString(this.FullName); arg_1B1_0 = (num * 2916977120u ^ 2615298090u); continue; case 7u: this.links_.WriteTo(output, GetAccountResponse._repeated_links_codec); arg_1B1_0 = 2472828314u; continue; case 8u: goto IL_205; case 9u: output.WriteMessage(this.Id); arg_1B1_0 = (num * 3653663604u ^ 3923605011u); continue; case 10u: output.WriteRawTag(138, 1); arg_1B1_0 = (num * 216250869u ^ 266659751u); continue; case 11u: output.WriteRawTag(98); arg_1B1_0 = (num * 4290992709u ^ 1195913795u); continue; case 12u: output.WriteMessage(this.ParentalControlInfo); arg_1B1_0 = (num * 2388941305u ^ 1692789867u); continue; case 13u: arg_1B1_0 = (((this.parentalControlInfo_ != null) ? 4253279548u : 3539904296u) ^ num * 1475994117u); continue; } break; } return; IL_184: arg_1B1_0 = 3291191894u; goto IL_1AC; IL_205: arg_1B1_0 = ((this.id_ == null) ? 3476899431u : 4012930086u); goto IL_1AC; } public int CalculateSize() { int num = 0; if (this.blob_ != null) { goto IL_5E; } goto IL_1C4; uint arg_178_0; while (true) { IL_173: uint num2; switch ((num2 = (arg_178_0 ^ 1730372379u)) % 12u) { case 1u: arg_178_0 = ((GetAccountResponse.smethod_3(this.FullName) == 0) ? 1025775248u : 1621150102u); continue; case 2u: num += this.email_.CalculateSize(GetAccountResponse._repeated_email_codec); arg_178_0 = ((GetAccountResponse.smethod_3(this.BattleTag) != 0) ? 626561552u : 1311549854u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_178_0 = (num2 * 3064277846u ^ 454720300u); continue; case 4u: goto IL_1C4; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.FullName); arg_178_0 = (num2 * 640624455u ^ 1598480011u); continue; case 6u: num += 2 + CodedOutputStream.ComputeMessageSize(this.ParentalControlInfo); arg_178_0 = (num2 * 1198731823u ^ 1833155529u); continue; case 7u: arg_178_0 = (((this.parentalControlInfo_ != null) ? 345939954u : 158128700u) ^ num2 * 3466193153u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Id); arg_178_0 = (num2 * 1595871187u ^ 277859929u); continue; case 9u: goto IL_5E; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Blob); arg_178_0 = (num2 * 1667151040u ^ 1241352719u); continue; case 11u: num += this.links_.CalculateSize(GetAccountResponse._repeated_links_codec); arg_178_0 = 442576372u; continue; } break; } return num; IL_5E: arg_178_0 = 853500629u; goto IL_173; IL_1C4: arg_178_0 = ((this.id_ != null) ? 233851591u : 833399309u); goto IL_173; } public void MergeFrom(GetAccountResponse other) { if (other == null) { goto IL_18; } goto IL_2D1; uint arg_261_0; while (true) { IL_25C: uint num; switch ((num = (arg_261_0 ^ 2397362828u)) % 21u) { case 0u: this.links_.Add(other.links_); arg_261_0 = 2815985814u; continue; case 1u: this.parentalControlInfo_ = new ParentalControlInfo(); arg_261_0 = (num * 3115925488u ^ 3058842625u); continue; case 2u: arg_261_0 = (((this.blob_ != null) ? 3977295776u : 2942386337u) ^ num * 1816651780u); continue; case 3u: arg_261_0 = (((GetAccountResponse.smethod_3(other.BattleTag) == 0) ? 1215152096u : 1604483164u) ^ num * 1234499639u); continue; case 4u: this.ParentalControlInfo.MergeFrom(other.ParentalControlInfo); arg_261_0 = 3836900061u; continue; case 5u: this.FullName = other.FullName; arg_261_0 = (num * 3959135758u ^ 3576130709u); continue; case 6u: arg_261_0 = ((other.id_ == null) ? 3594909369u : 4261921247u); continue; case 7u: arg_261_0 = ((GetAccountResponse.smethod_3(other.FullName) == 0) ? 4202723027u : 4279121033u); continue; case 8u: arg_261_0 = (((this.id_ == null) ? 3590348288u : 2628872039u) ^ num * 2388461246u); continue; case 10u: arg_261_0 = (((this.parentalControlInfo_ == null) ? 3000688374u : 4050319923u) ^ num * 2327021554u); continue; case 11u: arg_261_0 = (((other.parentalControlInfo_ == null) ? 2329168687u : 3139100319u) ^ num * 690466973u); continue; case 12u: this.id_ = new AccountId(); arg_261_0 = (num * 1316791261u ^ 288449283u); continue; case 13u: goto IL_2D1; case 14u: this.Id.MergeFrom(other.Id); arg_261_0 = 3594909369u; continue; case 15u: this.blob_ = new AccountBlob(); arg_261_0 = (num * 3962916789u ^ 991979929u); continue; case 16u: this.email_.Add(other.email_); arg_261_0 = 3758616554u; continue; case 17u: this.BattleTag = other.BattleTag; arg_261_0 = (num * 2247317993u ^ 3497045952u); continue; case 18u: return; case 19u: this.Blob.MergeFrom(other.Blob); arg_261_0 = 2622196731u; continue; case 20u: goto IL_18; } break; } return; IL_18: arg_261_0 = 2509255321u; goto IL_25C; IL_2D1: arg_261_0 = ((other.blob_ == null) ? 2622196731u : 4224406355u); goto IL_25C; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3EF: uint num; uint arg_353_0 = ((num = input.ReadTag()) != 0u) ? 3007706144u : 4155461288u; while (true) { uint num2; switch ((num2 = (arg_353_0 ^ 2603989750u)) % 32u) { case 0u: arg_353_0 = (num2 * 2996609483u ^ 4028759764u); continue; case 1u: arg_353_0 = (((num != 98u) ? 2317189061u : 4026275928u) ^ num2 * 3279174933u); continue; case 2u: goto IL_3EF; case 3u: this.id_ = new AccountId(); arg_353_0 = (num2 * 2291091017u ^ 2488680583u); continue; case 4u: arg_353_0 = (num2 * 1815957772u ^ 4038091044u); continue; case 5u: arg_353_0 = ((this.blob_ != null) ? 4210736891u : 3104335404u); continue; case 6u: arg_353_0 = (((num == 106u) ? 2438996744u : 3106865980u) ^ num2 * 2972184403u); continue; case 7u: input.ReadMessage(this.parentalControlInfo_); arg_353_0 = 3528790548u; continue; case 8u: arg_353_0 = ((num > 122u) ? 2947448445u : 3556524967u); continue; case 9u: arg_353_0 = (((num == 138u) ? 2236027406u : 4227820135u) ^ num2 * 542562905u); continue; case 10u: input.ReadMessage(this.id_); arg_353_0 = 3528790548u; continue; case 11u: arg_353_0 = ((num == 130u) ? 2889489765u : 3364919263u); continue; case 12u: this.email_.AddEntriesFrom(input, GetAccountResponse._repeated_email_codec); arg_353_0 = 2582074290u; continue; case 13u: input.ReadMessage(this.blob_); arg_353_0 = 3675929304u; continue; case 14u: arg_353_0 = (num2 * 1851863215u ^ 3485085030u); continue; case 15u: this.parentalControlInfo_ = new ParentalControlInfo(); arg_353_0 = (num2 * 983197300u ^ 952587261u); continue; case 16u: input.SkipLastField(); arg_353_0 = 3528790548u; continue; case 17u: arg_353_0 = (((num != 114u) ? 2269309509u : 3192992782u) ^ num2 * 1585834796u); continue; case 18u: arg_353_0 = (num2 * 3216014152u ^ 1290226742u); continue; case 19u: this.links_.AddEntriesFrom(input, GetAccountResponse._repeated_links_codec); arg_353_0 = 4142524843u; continue; case 20u: this.BattleTag = input.ReadString(); arg_353_0 = 3528790548u; continue; case 21u: arg_353_0 = 3007706144u; continue; case 22u: arg_353_0 = ((num <= 106u) ? 3108291594u : 2583847518u); continue; case 23u: this.FullName = input.ReadString(); arg_353_0 = 3361445046u; continue; case 24u: arg_353_0 = (num2 * 620073922u ^ 1361714902u); continue; case 25u: arg_353_0 = ((this.parentalControlInfo_ != null) ? 4133370545u : 2647163481u); continue; case 26u: this.blob_ = new AccountBlob(); arg_353_0 = (num2 * 1276933077u ^ 3715895705u); continue; case 27u: arg_353_0 = ((this.id_ != null) ? 3966189980u : 3242264245u); continue; case 28u: arg_353_0 = (((num != 90u) ? 1685858999u : 55517043u) ^ num2 * 1632196280u); continue; case 29u: arg_353_0 = (num2 * 479623307u ^ 543672683u); continue; case 31u: arg_353_0 = (((num != 122u) ? 3626143661u : 3845980552u) ^ num2 * 3399046487u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Profanity.V1/ProfanityFilterConfigReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Profanity.V1 { [DebuggerNonUserCode] public static class ProfanityFilterConfigReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ProfanityFilterConfigReflection.descriptor; } } static ProfanityFilterConfigReflection() { ProfanityFilterConfigReflection.descriptor = FileDescriptor.FromGeneratedCode(ProfanityFilterConfigReflection.smethod_1(ProfanityFilterConfigReflection.smethod_0(new string[] { Module.smethod_37<string>(1080393207u), Module.smethod_35<string>(1904141307u), Module.smethod_34<string>(3147973436u), Module.smethod_33<string>(2659669928u), Module.smethod_35<string>(1596461995u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ProfanityFilterConfigReflection.smethod_2(typeof(WordFilter).TypeHandle), WordFilter.Parser, new string[] { Module.smethod_37<string>(147837329u), Module.smethod_36<string>(2218130672u) }, null, null, null), new GeneratedCodeInfo(ProfanityFilterConfigReflection.smethod_2(typeof(WordFilters).TypeHandle), WordFilters.Parser, new string[] { Module.smethod_36<string>(2145788127u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/AuthServer.Game.Chat/ChatCommandParser.cs using AuthServer.Network; using System; using System.Collections.Generic; using System.Reflection; namespace AuthServer.Game.Chat { public class ChatCommandParser { public delegate void HandleChatCommand(string[] args, WorldClass session); public delegate void HandleChatCommand2(string[] args, WorldClass2 session); public static Dictionary<string, ChatCommandParser.HandleChatCommand> ChatCommands = new Dictionary<string, ChatCommandParser.HandleChatCommand>(); public static Dictionary<string, ChatCommandParser.HandleChatCommand2> ChatCommands2 = new Dictionary<string, ChatCommandParser.HandleChatCommand2>(); public static void DefineChatCommands() { Type[] array = ChatCommandParser.smethod_1(ChatCommandParser.smethod_0()); while (true) { IL_199: uint arg_153_0 = 119212129u; while (true) { uint num; switch ((num = (arg_153_0 ^ 1007403371u)) % 14u) { case 0u: { int num2; num2++; arg_153_0 = (num * 1657331071u ^ 1067304519u); continue; } case 1u: { ChatCommandAttribute customAttribute; arg_153_0 = (((customAttribute == null) ? 4070733108u : 3064879351u) ^ num * 3658418241u); continue; } case 2u: { int num2 = 0; arg_153_0 = (num * 495928625u ^ 1398255286u); continue; } case 3u: goto IL_199; case 4u: { int num2; arg_153_0 = ((num2 >= array.Length) ? 1429089151u : 1598209142u); continue; } case 5u: { ChatCommandAttribute customAttribute; MethodInfo methodInfo; ChatCommandParser.ChatCommands[customAttribute.ChatCommand] = (ChatCommandParser.HandleChatCommand)ChatCommandParser.smethod_4(ChatCommandParser.smethod_3(typeof(ChatCommandParser.HandleChatCommand).TypeHandle), methodInfo); arg_153_0 = (num * 1483645737u ^ 228464464u); continue; } case 6u: { int num3; num3++; arg_153_0 = 157078335u; continue; } case 7u: { int num3; MethodInfo[] array2; MethodInfo methodInfo = array2[num3]; arg_153_0 = 2129732795u; continue; } case 9u: arg_153_0 = (num * 589339086u ^ 1306721079u); continue; case 10u: { MethodInfo methodInfo; ChatCommandAttribute customAttribute = methodInfo.GetCustomAttribute<ChatCommandAttribute>(); arg_153_0 = (num * 1854628135u ^ 2009594928u); continue; } case 11u: { int num2; MethodInfo[] array2 = ChatCommandParser.smethod_2(array[num2]); arg_153_0 = 1177256068u; continue; } case 12u: { int num3; MethodInfo[] array2; arg_153_0 = ((num3 >= array2.Length) ? 2047522213u : 1377158200u); continue; } case 13u: { int num3 = 0; arg_153_0 = (num * 1157137936u ^ 3914591183u); continue; } } return; } } } public static void ExecuteChatHandler(string chatCommand, WorldClass session) { string[] array = ChatCommandParser.smethod_5(chatCommand, new string[] { Module.smethod_34<string>(1210918633u) }, StringSplitOptions.None); string key = ChatCommandParser.smethod_6(array[0], 0, 1); while (true) { IL_9A: uint arg_7E_0 = 4290933796u; while (true) { uint num; switch ((num = (arg_7E_0 ^ 3881183605u)) % 4u) { case 1u: arg_7E_0 = ((ChatCommandParser.ChatCommands.ContainsKey(key) ? 1983062844u : 1891696354u) ^ num * 4159093623u); continue; case 2u: ChatCommandParser.ChatCommands[key](array, session); arg_7E_0 = (num * 4266578640u ^ 2567288869u); continue; case 3u: goto IL_9A; } return; } } } public static void DefineChatCommands2() { Type[] array = ChatCommandParser.smethod_1(ChatCommandParser.smethod_0()); int num = 0; while (true) { IL_15B: uint arg_112_0 = (num < array.Length) ? 341848731u : 817372657u; while (true) { uint num2; switch ((num2 = (arg_112_0 ^ 654282741u)) % 11u) { case 0u: goto IL_15B; case 1u: { int num3; num3++; arg_112_0 = 1012403200u; continue; } case 2u: num++; arg_112_0 = (num2 * 2111411435u ^ 2583908411u); continue; case 4u: { MethodInfo[] array2 = ChatCommandParser.smethod_2(array[num]); int num3 = 0; arg_112_0 = 764609352u; continue; } case 5u: { int num3; MethodInfo[] array2; arg_112_0 = ((num3 >= array2.Length) ? 1096215134u : 710141588u); continue; } case 6u: { ChatCommand2Attribute customAttribute; MethodInfo methodInfo; ChatCommandParser.ChatCommands2[customAttribute.ChatCommand] = (ChatCommandParser.HandleChatCommand2)ChatCommandParser.smethod_4(ChatCommandParser.smethod_3(typeof(ChatCommandParser.HandleChatCommand2).TypeHandle), methodInfo); arg_112_0 = (num2 * 3328026769u ^ 1273914374u); continue; } case 7u: { int num3; MethodInfo[] array2; MethodInfo methodInfo = array2[num3]; ChatCommand2Attribute customAttribute = methodInfo.GetCustomAttribute<ChatCommand2Attribute>(); arg_112_0 = 1187497071u; continue; } case 8u: arg_112_0 = (num2 * 2651831975u ^ 3574536523u); continue; case 9u: arg_112_0 = 341848731u; continue; case 10u: { ChatCommand2Attribute customAttribute; arg_112_0 = (((customAttribute != null) ? 1045421015u : 2070827812u) ^ num2 * 1521676189u); continue; } } return; } } } public static void ExecuteChatHandler2(string chatCommand, WorldClass2 session) { string[] array = ChatCommandParser.smethod_5(chatCommand, new string[] { Module.smethod_36<string>(2793817990u) }, StringSplitOptions.None); string key = ChatCommandParser.smethod_6(array[0], 0, 1); if (ChatCommandParser.ChatCommands2.ContainsKey(key)) { while (true) { IL_75: uint arg_5D_0 = 2930766986u; while (true) { uint num; switch ((num = (arg_5D_0 ^ 4278760877u)) % 3u) { case 0u: goto IL_75; case 1u: ChatCommandParser.ChatCommands2[key](array, session); arg_5D_0 = (num * 1871045308u ^ 4256713516u); continue; } goto Block_2; } } Block_2:; } } public static bool CheckForCommand(string command) { string string_ = Module.smethod_35<string>(946384381u); while (true) { IL_56: uint arg_3A_0 = 792521532u; while (true) { uint num; switch ((num = (arg_3A_0 ^ 949174889u)) % 4u) { case 1u: arg_3A_0 = ((ChatCommandParser.smethod_7(command, string_) ? 4096386730u : 3826576652u) ^ num * 466054857u); continue; case 2u: return true; case 3u: goto IL_56; } return false; } } return false; } static Assembly smethod_0() { return Assembly.GetExecutingAssembly(); } static Type[] smethod_1(Assembly assembly_0) { return assembly_0.GetTypes(); } static MethodInfo[] smethod_2(Type type_0) { return type_0.GetMethods(); } static Type smethod_3(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static Delegate smethod_4(Type type_0, MethodInfo methodInfo_0) { return Delegate.CreateDelegate(type_0, methodInfo_0); } static string[] smethod_5(string string_0, string[] string_1, StringSplitOptions stringSplitOptions_0) { return string_0.Split(string_1, stringSplitOptions_0); } static string smethod_6(string string_0, int int_0, int int_1) { return string_0.Remove(int_0, int_1); } static bool smethod_7(string string_0, string string_1) { return string_0.StartsWith(string_1); } } } <file_sep>/Google.Protobuf.WellKnownTypes/EnumValue.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class EnumValue : IMessage<EnumValue>, IEquatable<EnumValue>, IDeepCloneable<EnumValue>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumValue.__c __9 = new EnumValue.__c(); internal EnumValue cctor>b__34_0() { return new EnumValue(); } } private static readonly MessageParser<EnumValue> _parser = new MessageParser<EnumValue>(new Func<EnumValue>(EnumValue.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int NumberFieldNumber = 2; private int number_; public const int OptionsFieldNumber = 3; private static readonly FieldCodec<Option> _repeated_options_codec; private readonly RepeatedField<Option> options_ = new RepeatedField<Option>(); public static MessageParser<EnumValue> Parser { get { return EnumValue._parser; } } public static MessageDescriptor Descriptor { get { return TypeReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return EnumValue.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public int Number { get { return this.number_; } set { this.number_ = value; } } public RepeatedField<Option> Options { get { return this.options_; } } public EnumValue() { } public EnumValue(EnumValue other) : this() { while (true) { IL_5D: uint arg_41_0 = 2231445404u; while (true) { uint num; switch ((num = (arg_41_0 ^ 3501973671u)) % 4u) { case 0u: goto IL_5D; case 2u: this.number_ = other.number_; arg_41_0 = (num * 3867589287u ^ 2608261520u); continue; case 3u: this.name_ = other.name_; arg_41_0 = (num * 4209793879u ^ 632356952u); continue; } goto Block_1; } } Block_1: this.options_ = other.options_.Clone(); } public EnumValue Clone() { return new EnumValue(this); } public override bool Equals(object other) { return this.Equals(other as EnumValue); } public bool Equals(EnumValue other) { if (other == null) { goto IL_18; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ -512433185) % 11) { case 0: return true; case 1: return false; case 2: return false; case 4: return false; case 5: arg_A1_0 = (this.options_.Equals(other.options_) ? -1903133210 : -1480881117); continue; case 6: arg_A1_0 = (EnumValue.smethod_0(this.Name, other.Name) ? -1595995581 : -868962309); continue; case 7: return false; case 8: goto IL_E7; case 9: arg_A1_0 = ((this.Number != other.Number) ? -938339373 : -174484004); continue; case 10: goto IL_18; } break; } return true; IL_18: arg_A1_0 = -418076002; goto IL_9C; IL_E7: arg_A1_0 = ((other == this) ? -1586976045 : -1055215621); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_D6: uint arg_AE_0 = 1064988111u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 2040140237u)) % 7u) { case 0u: num ^= this.options_.GetHashCode(); arg_AE_0 = 1995710253u; continue; case 1u: arg_AE_0 = (((EnumValue.smethod_1(this.Name) != 0) ? 3537811022u : 3185120199u) ^ num2 * 3832647134u); continue; case 2u: goto IL_D6; case 3u: num ^= this.Number.GetHashCode(); arg_AE_0 = (num2 * 3607780221u ^ 3418595652u); continue; case 5u: arg_AE_0 = ((this.Number != 0) ? 634032249u : 632418720u); continue; case 6u: num ^= EnumValue.smethod_2(this.Name); arg_AE_0 = (num2 * 1633772049u ^ 1425987156u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (EnumValue.smethod_1(this.Name) != 0) { goto IL_8C; } goto IL_CD; uint arg_96_0; while (true) { IL_91: uint num; switch ((num = (arg_96_0 ^ 3822672813u)) % 7u) { case 0u: goto IL_8C; case 1u: output.WriteString(this.Name); arg_96_0 = (num * 62901661u ^ 3564975114u); continue; case 2u: output.WriteRawTag(16); output.WriteInt32(this.Number); arg_96_0 = (num * 643378683u ^ 3800657900u); continue; case 3u: this.options_.WriteTo(output, EnumValue._repeated_options_codec); arg_96_0 = 4027557071u; continue; case 5u: output.WriteRawTag(10); arg_96_0 = (num * 4187124983u ^ 3646678561u); continue; case 6u: goto IL_CD; } break; } return; IL_8C: arg_96_0 = 4280372631u; goto IL_91; IL_CD: arg_96_0 = ((this.Number != 0) ? 3708351789u : 4283168876u); goto IL_91; } public int CalculateSize() { int num = 0; if (EnumValue.smethod_1(this.Name) != 0) { goto IL_21; } goto IL_B6; uint arg_83_0; while (true) { IL_7E: uint num2; switch ((num2 = (arg_83_0 ^ 549983787u)) % 6u) { case 1u: num += this.options_.CalculateSize(EnumValue._repeated_options_codec); arg_83_0 = 2013680429u; continue; case 2u: goto IL_B6; case 3u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Number); arg_83_0 = (num2 * 1440779219u ^ 296200937u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_83_0 = (num2 * 2107870636u ^ 1372212505u); continue; case 5u: goto IL_21; } break; } return num; IL_21: arg_83_0 = 342233061u; goto IL_7E; IL_B6: arg_83_0 = ((this.Number != 0) ? 1239656696u : 1726837248u); goto IL_7E; } public void MergeFrom(EnumValue other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 567684231u)) % 7u) { case 0u: goto IL_6C; case 1u: goto IL_AD; case 2u: return; case 4u: this.Name = other.Name; arg_76_0 = (num * 2625073886u ^ 1296062046u); continue; case 5u: arg_76_0 = ((other.Number == 0) ? 714936557u : 1588040007u); continue; case 6u: this.Number = other.Number; arg_76_0 = (num * 3772068530u ^ 2658697069u); continue; } break; } this.options_.Add(other.options_); return; IL_6C: arg_76_0 = 709932626u; goto IL_71; IL_AD: arg_76_0 = ((EnumValue.smethod_1(other.Name) != 0) ? 1210845964u : 795305684u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_150: uint num; uint arg_104_0 = ((num = input.ReadTag()) == 0u) ? 416293401u : 409600358u; while (true) { uint num2; switch ((num2 = (arg_104_0 ^ 666589009u)) % 12u) { case 0u: this.Name = input.ReadString(); arg_104_0 = 1442496323u; continue; case 1u: goto IL_150; case 2u: this.options_.AddEntriesFrom(input, EnumValue._repeated_options_codec); arg_104_0 = 974920364u; continue; case 3u: arg_104_0 = 409600358u; continue; case 4u: arg_104_0 = (((num != 26u) ? 3122312244u : 3964631275u) ^ num2 * 287224782u); continue; case 5u: input.SkipLastField(); arg_104_0 = (num2 * 1486795301u ^ 2674616021u); continue; case 6u: arg_104_0 = (num2 * 2771715597u ^ 3298766406u); continue; case 7u: this.Number = input.ReadInt32(); arg_104_0 = 1381355227u; continue; case 9u: arg_104_0 = (((num != 16u) ? 750795827u : 1747017632u) ^ num2 * 2740766954u); continue; case 10u: arg_104_0 = (num2 * 3564854786u ^ 2945959352u); continue; case 11u: arg_104_0 = ((num == 10u) ? 1937252605u : 1686097524u); continue; } return; } } } static EnumValue() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 63682824u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 75839514u)) % 3u) { case 0u: goto IL_57; case 1u: EnumValue._repeated_options_codec = FieldCodec.ForMessage<Option>(26u, Option.Parser); arg_3F_0 = (num * 2933116177u ^ 3836487746u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Connection.V1/ConnectionServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public static class ConnectionServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ConnectionServiceReflection.descriptor; } } static ConnectionServiceReflection() { ConnectionServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(ConnectionServiceReflection.smethod_1(ConnectionServiceReflection.smethod_0(new string[] { Module.smethod_35<string>(1663710459u), Module.smethod_34<string>(3965533756u), Module.smethod_36<string>(520098707u), Module.smethod_35<string>(1356031147u), Module.smethod_36<string>(1689318963u), Module.smethod_33<string>(2554752536u), Module.smethod_34<string>(1340908620u), Module.smethod_36<string>(1677579427u), Module.smethod_33<string>(3475001800u), Module.smethod_34<string>(965962172u), Module.smethod_36<string>(902012435u), Module.smethod_35<string>(390830891u), Module.smethod_37<string>(3301173927u), Module.smethod_33<string>(3577094808u), Module.smethod_37<string>(1197574215u), Module.smethod_34<string>(3011250780u), Module.smethod_36<string>(496619635u), Module.smethod_34<string>(2261357884u), Module.smethod_36<string>(1283926163u), Module.smethod_35<string>(3720597931u), Module.smethod_35<string>(1398193467u), Module.smethod_35<string>(740672523u), Module.smethod_33<string>(406562792u), Module.smethod_36<string>(2441406883u), Module.smethod_34<string>(3181807148u), Module.smethod_33<string>(2963124568u), Module.smethod_33<string>(3065217576u), Module.smethod_35<string>(2755397675u), Module.smethod_35<string>(432993211u), Module.smethod_34<string>(2056967804u), Module.smethod_34<string>(3453864652u), Module.smethod_37<string>(4060728567u), Module.smethod_33<string>(2658257736u), Module.smethod_34<string>(3078918204u), Module.smethod_33<string>(203788968u), Module.smethod_37<string>(2161606199u), Module.smethod_34<string>(1204185964u), Module.smethod_37<string>(3359528663u), Module.smethod_33<string>(2862443752u), Module.smethod_34<string>(829239516u), Module.smethod_37<string>(3213406055u), Module.smethod_35<string>(3901790283u), Module.smethod_33<string>(1226131240u), Module.smethod_34<string>(3624421020u), Module.smethod_36<string>(543577779u), Module.smethod_35<string>(1271706507u), Module.smethod_36<string>(2094711763u), Module.smethod_35<string>(1621548139u) })), new FileDescriptor[] { ContentHandleTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(ConnectRequest).TypeHandle), ConnectRequest.Parser, new string[] { Module.smethod_36<string>(262669066u), Module.smethod_37<string>(1139042653u), Module.smethod_36<string>(2042570221u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(ConnectionMeteringContentHandles).TypeHandle), ConnectionMeteringContentHandles.Parser, new string[] { Module.smethod_35<string>(3102972755u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(ConnectResponse).TypeHandle), ConnectResponse.Parser, new string[] { Module.smethod_34<string>(2190708473u), Module.smethod_36<string>(262669066u), Module.smethod_34<string>(3569094286u), Module.smethod_34<string>(3475357674u), Module.smethod_34<string>(2256781718u), Module.smethod_33<string>(2683074892u), Module.smethod_34<string>(3381621062u), Module.smethod_37<string>(1606528903u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(BoundService).TypeHandle), BoundService.Parser, new string[] { Module.smethod_35<string>(2551746086u), Module.smethod_36<string>(94729931u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(BindRequest).TypeHandle), BindRequest.Parser, new string[] { Module.smethod_36<string>(853148962u), Module.smethod_34<string>(624849436u), Module.smethod_35<string>(2782750371u), Module.smethod_34<string>(2791538023u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(BindResponse).TypeHandle), BindResponse.Parser, new string[] { Module.smethod_33<string>(3283930458u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(EchoRequest).TypeHandle), EchoRequest.Parser, new string[] { Module.smethod_36<string>(728664875u), Module.smethod_34<string>(1788098658u), Module.smethod_37<string>(3622537569u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(EchoResponse).TypeHandle), EchoResponse.Parser, new string[] { Module.smethod_37<string>(2979751343u), Module.smethod_34<string>(2069308494u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(DisconnectRequest).TypeHandle), DisconnectRequest.Parser, new string[] { Module.smethod_34<string>(3072747859u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(DisconnectNotification).TypeHandle), DisconnectNotification.Parser, new string[] { Module.smethod_37<string>(1840272028u), Module.smethod_35<string>(2972236010u) }, null, null, null), new GeneratedCodeInfo(ConnectionServiceReflection.smethod_2(typeof(EncryptRequest).TypeHandle), EncryptRequest.Parser, null, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.IO/LalTypeMapper.cs using System; using System.Collections.Generic; namespace Arctium_WoW_ClientDB_Viewer.IO { internal class LalTypeMapper { public static Dictionary<string, Type> ReadValue = new Dictionary<string, Type> { { Module.smethod_33<string>(3603521510u), LalTypeMapper.smethod_0(typeof(bool).TypeHandle) }, { Module.smethod_35<string>(1524474144u), LalTypeMapper.smethod_0(typeof(sbyte).TypeHandle) }, { Module.smethod_35<string>(3217276998u), LalTypeMapper.smethod_0(typeof(byte).TypeHandle) }, { Module.smethod_34<string>(1514091022u), LalTypeMapper.smethod_0(typeof(short).TypeHandle) }, { Module.smethod_35<string>(4000718264u), LalTypeMapper.smethod_0(typeof(ushort).TypeHandle) }, { Module.smethod_36<string>(2323869031u), LalTypeMapper.smethod_0(typeof(int).TypeHandle) }, { Module.smethod_36<string>(5629522u), LalTypeMapper.smethod_0(typeof(uint).TypeHandle) }, { Module.smethod_35<string>(3706998619u), LalTypeMapper.smethod_0(typeof(float).TypeHandle) }, { Module.smethod_35<string>(2923557353u), LalTypeMapper.smethod_0(typeof(long).TypeHandle) }, { Module.smethod_37<string>(2917594848u), LalTypeMapper.smethod_0(typeof(ulong).TypeHandle) }, { Module.smethod_36<string>(3617573374u), LalTypeMapper.smethod_0(typeof(double).TypeHandle) }, { Module.smethod_37<string>(2128715485u), LalTypeMapper.smethod_0(typeof(string).TypeHandle) }, { Module.smethod_33<string>(3471772470u), LalTypeMapper.smethod_0(typeof(LalTypes.LalGroup).TypeHandle) }, { Module.smethod_33<string>(1814069486u), LalTypeMapper.smethod_0(typeof(LalTypes.LalList).TypeHandle) }, { Module.smethod_36<string>(2291928492u), LalTypeMapper.smethod_0(typeof(LalTypes.Bit).TypeHandle) } }; static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Account.V1/CreateGameAccountRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class CreateGameAccountRequest : IMessage<CreateGameAccountRequest>, IEquatable<CreateGameAccountRequest>, IDeepCloneable<CreateGameAccountRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CreateGameAccountRequest.__c __9 = new CreateGameAccountRequest.__c(); internal CreateGameAccountRequest cctor>b__39_0() { return new CreateGameAccountRequest(); } } private static readonly MessageParser<CreateGameAccountRequest> _parser = new MessageParser<CreateGameAccountRequest>(new Func<CreateGameAccountRequest>(CreateGameAccountRequest.__c.__9.<.cctor>b__39_0)); public const int AccountFieldNumber = 1; private AccountId account_; public const int RegionFieldNumber = 2; private uint region_; public const int ProgramFieldNumber = 3; private uint program_; public const int RealmPermissionsFieldNumber = 4; private uint realmPermissions_; public static MessageParser<CreateGameAccountRequest> Parser { get { return CreateGameAccountRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return CreateGameAccountRequest.Descriptor; } } public AccountId Account { get { return this.account_; } set { this.account_ = value; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint RealmPermissions { get { return this.realmPermissions_; } set { this.realmPermissions_ = value; } } public CreateGameAccountRequest() { } public CreateGameAccountRequest(CreateGameAccountRequest other) : this() { this.Account = ((other.account_ != null) ? other.Account.Clone() : null); this.region_ = other.region_; this.program_ = other.program_; this.realmPermissions_ = other.realmPermissions_; } public CreateGameAccountRequest Clone() { return new CreateGameAccountRequest(this); } public override bool Equals(object other) { return this.Equals(other as CreateGameAccountRequest); } public bool Equals(CreateGameAccountRequest other) { if (other == null) { goto IL_95; } goto IL_114; int arg_C6_0; while (true) { IL_C1: switch ((arg_C6_0 ^ -249003560) % 13) { case 1: return false; case 2: arg_C6_0 = ((this.RealmPermissions == other.RealmPermissions) ? -1568411290 : -766468944); continue; case 3: return false; case 4: return true; case 5: return false; case 6: return false; case 7: goto IL_95; case 8: return false; case 9: goto IL_114; case 10: arg_C6_0 = ((this.Program != other.Program) ? -140775456 : -148313624); continue; case 11: arg_C6_0 = ((this.Region == other.Region) ? -365824200 : -1993322555); continue; case 12: arg_C6_0 = (CreateGameAccountRequest.smethod_0(this.Account, other.Account) ? -31535094 : -1766770922); continue; } break; } return true; IL_95: arg_C6_0 = -749154874; goto IL_C1; IL_114: arg_C6_0 = ((other == this) ? -1802759528 : -1583395068); goto IL_C1; } public override int GetHashCode() { int num = 1; if (this.account_ != null) { goto IL_42; } goto IL_12E; uint arg_EE_0; while (true) { IL_E9: uint num2; switch ((num2 = (arg_EE_0 ^ 2785630348u)) % 9u) { case 1u: num ^= this.RealmPermissions.GetHashCode(); arg_EE_0 = (num2 * 850646462u ^ 512667317u); continue; case 2u: num ^= this.Program.GetHashCode(); arg_EE_0 = (num2 * 3765859058u ^ 4158812337u); continue; case 3u: num ^= CreateGameAccountRequest.smethod_1(this.Account); arg_EE_0 = (num2 * 438115614u ^ 1675864493u); continue; case 4u: arg_EE_0 = ((this.RealmPermissions == 0u) ? 2338612997u : 3061241508u); continue; case 5u: arg_EE_0 = ((this.Program != 0u) ? 3463778334u : 2801528501u); continue; case 6u: goto IL_42; case 7u: num ^= this.Region.GetHashCode(); arg_EE_0 = (num2 * 4284914041u ^ 1084826133u); continue; case 8u: goto IL_12E; } break; } return num; IL_42: arg_EE_0 = 2381333668u; goto IL_E9; IL_12E: arg_EE_0 = ((this.Region == 0u) ? 3940457649u : 2514744904u); goto IL_E9; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.account_ != null) { goto IL_37; } goto IL_167; uint arg_11F_0; while (true) { IL_11A: uint num; switch ((num = (arg_11F_0 ^ 230160784u)) % 11u) { case 0u: arg_11F_0 = ((this.Program != 0u) ? 1163152432u : 242972u); continue; case 1u: output.WriteRawTag(16); output.WriteUInt32(this.Region); arg_11F_0 = (num * 3337491222u ^ 2540617464u); continue; case 2u: output.WriteUInt32(this.RealmPermissions); arg_11F_0 = (num * 2657175359u ^ 2968884665u); continue; case 3u: output.WriteFixed32(this.Program); arg_11F_0 = (num * 2522697288u ^ 4042007004u); continue; case 4u: output.WriteRawTag(29); arg_11F_0 = (num * 2154135761u ^ 1732843496u); continue; case 6u: output.WriteRawTag(10); output.WriteMessage(this.Account); arg_11F_0 = (num * 3869133661u ^ 2698044547u); continue; case 7u: arg_11F_0 = ((this.RealmPermissions != 0u) ? 1456359060u : 525952534u); continue; case 8u: goto IL_37; case 9u: output.WriteRawTag(32); arg_11F_0 = (num * 60057907u ^ 3847843789u); continue; case 10u: goto IL_167; } break; } return; IL_37: arg_11F_0 = 1450557807u; goto IL_11A; IL_167: arg_11F_0 = ((this.Region == 0u) ? 1064297410u : 1495557351u); goto IL_11A; } public int CalculateSize() { int num = 0; while (true) { IL_144: uint arg_10F_0 = 174722744u; while (true) { uint num2; switch ((num2 = (arg_10F_0 ^ 1550332559u)) % 10u) { case 0u: arg_10F_0 = ((this.Program != 0u) ? 640514914u : 863936304u); continue; case 1u: num += 5; arg_10F_0 = (num2 * 2072150188u ^ 127972364u); continue; case 2u: arg_10F_0 = ((this.Region != 0u) ? 56065612u : 1174086001u); continue; case 3u: arg_10F_0 = (((this.account_ == null) ? 3395145120u : 2291644804u) ^ num2 * 4040714363u); continue; case 5u: goto IL_144; case 6u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RealmPermissions); arg_10F_0 = (num2 * 2587798427u ^ 701951889u); continue; case 7u: arg_10F_0 = ((this.RealmPermissions != 0u) ? 1188017173u : 1853207215u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Account); arg_10F_0 = (num2 * 2315640678u ^ 3294837609u); continue; case 9u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_10F_0 = (num2 * 302074506u ^ 3806961263u); continue; } return num; } } return num; } public void MergeFrom(CreateGameAccountRequest other) { if (other == null) { goto IL_E9; } goto IL_190; uint arg_140_0; while (true) { IL_13B: uint num; switch ((num = (arg_140_0 ^ 3797545227u)) % 13u) { case 1u: this.Region = other.Region; arg_140_0 = (num * 3828092652u ^ 788776153u); continue; case 2u: this.Account.MergeFrom(other.Account); arg_140_0 = 2324000607u; continue; case 3u: this.account_ = new AccountId(); arg_140_0 = (num * 2448363307u ^ 2070372689u); continue; case 4u: goto IL_E9; case 5u: return; case 6u: this.Program = other.Program; arg_140_0 = (num * 1431110072u ^ 1479859669u); continue; case 7u: goto IL_190; case 8u: arg_140_0 = ((other.Region == 0u) ? 2915268697u : 3895245419u); continue; case 9u: arg_140_0 = ((other.RealmPermissions == 0u) ? 2975520723u : 2413421588u); continue; case 10u: arg_140_0 = ((other.Program == 0u) ? 3025937005u : 3408588618u); continue; case 11u: this.RealmPermissions = other.RealmPermissions; arg_140_0 = (num * 2165102662u ^ 772880809u); continue; case 12u: arg_140_0 = (((this.account_ != null) ? 1225328886u : 2092713020u) ^ num * 1372510715u); continue; } break; } return; IL_E9: arg_140_0 = 2230915422u; goto IL_13B; IL_190: arg_140_0 = ((other.account_ != null) ? 2282324118u : 2324000607u); goto IL_13B; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1FB: uint num; uint arg_19B_0 = ((num = input.ReadTag()) != 0u) ? 940774683u : 908233869u; while (true) { uint num2; switch ((num2 = (arg_19B_0 ^ 1997672707u)) % 17u) { case 0u: this.RealmPermissions = input.ReadUInt32(); arg_19B_0 = 1590267460u; continue; case 1u: arg_19B_0 = ((this.account_ == null) ? 280322639u : 1348662829u); continue; case 2u: this.account_ = new AccountId(); arg_19B_0 = (num2 * 608468580u ^ 1748666269u); continue; case 3u: input.ReadMessage(this.account_); arg_19B_0 = 1590267460u; continue; case 5u: arg_19B_0 = (num2 * 1724913591u ^ 2155323161u); continue; case 6u: arg_19B_0 = ((num > 16u) ? 915436999u : 1607642366u); continue; case 7u: input.SkipLastField(); arg_19B_0 = 1590267460u; continue; case 8u: this.Region = input.ReadUInt32(); arg_19B_0 = 76185591u; continue; case 9u: arg_19B_0 = (num2 * 2583620490u ^ 1993622988u); continue; case 10u: arg_19B_0 = (((num == 32u) ? 2336876992u : 4170418802u) ^ num2 * 2412141474u); continue; case 11u: arg_19B_0 = (((num == 10u) ? 1853795121u : 1709766382u) ^ num2 * 3737835416u); continue; case 12u: arg_19B_0 = (((num == 16u) ? 3497549752u : 2548432803u) ^ num2 * 375218965u); continue; case 13u: arg_19B_0 = 940774683u; continue; case 14u: goto IL_1FB; case 15u: arg_19B_0 = ((num != 29u) ? 1602301337u : 1016270375u); continue; case 16u: this.Program = input.ReadFixed32(); arg_19B_0 = 1590267460u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/UpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class UpdateRequest : IMessage<UpdateRequest>, IEquatable<UpdateRequest>, IDeepCloneable<UpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateRequest.__c __9 = new UpdateRequest.__c(); internal UpdateRequest cctor>b__39_0() { return new UpdateRequest(); } } private static readonly MessageParser<UpdateRequest> _parser = new MessageParser<UpdateRequest>(new Func<UpdateRequest>(UpdateRequest.__c.__9.<.cctor>b__39_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int FieldOperationFieldNumber = 2; private static readonly FieldCodec<FieldOperation> _repeated_fieldOperation_codec = FieldCodec.ForMessage<FieldOperation>(18u, Bgs.Protocol.Presence.V1.FieldOperation.Parser); private readonly RepeatedField<FieldOperation> fieldOperation_ = new RepeatedField<FieldOperation>(); public const int NoCreateFieldNumber = 3; private bool noCreate_; public const int AgentIdFieldNumber = 4; private EntityId agentId_; public static MessageParser<UpdateRequest> Parser { get { return UpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public RepeatedField<FieldOperation> FieldOperation { get { return this.fieldOperation_; } } public bool NoCreate { get { return this.noCreate_; } set { this.noCreate_ = value; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public UpdateRequest() { } public UpdateRequest(UpdateRequest other) : this() { while (true) { IL_B3: uint arg_8F_0 = 68886724u; while (true) { uint num; switch ((num = (arg_8F_0 ^ 1411109585u)) % 6u) { case 1u: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); arg_8F_0 = 1436985609u; continue; case 2u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_8F_0 = 1572481917u; continue; case 3u: goto IL_B3; case 4u: this.fieldOperation_ = other.fieldOperation_.Clone(); arg_8F_0 = (num * 111272954u ^ 2220325736u); continue; case 5u: this.noCreate_ = other.noCreate_; arg_8F_0 = (num * 345361720u ^ 1056357345u); continue; } return; } } } public UpdateRequest Clone() { return new UpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as UpdateRequest); } public bool Equals(UpdateRequest other) { if (other == null) { goto IL_73; } goto IL_11E; int arg_D0_0; while (true) { IL_CB: switch ((arg_D0_0 ^ -670954170) % 13) { case 0: return true; case 2: return false; case 3: return false; case 4: goto IL_11E; case 5: arg_D0_0 = ((this.NoCreate != other.NoCreate) ? -815282889 : -1752132457); continue; case 6: arg_D0_0 = (UpdateRequest.smethod_0(this.EntityId, other.EntityId) ? -1276029751 : -789257185); continue; case 7: return false; case 8: goto IL_73; case 9: return false; case 10: arg_D0_0 = (UpdateRequest.smethod_0(this.AgentId, other.AgentId) ? -113296083 : -1021009607); continue; case 11: return false; case 12: arg_D0_0 = (this.fieldOperation_.Equals(other.fieldOperation_) ? -1000432066 : -856723187); continue; } break; } return true; IL_73: arg_D0_0 = -1519701449; goto IL_CB; IL_11E: arg_D0_0 = ((other != this) ? -626836944 : -510553822); goto IL_CB; } public override int GetHashCode() { int num = 1 ^ UpdateRequest.smethod_1(this.EntityId); while (true) { IL_D1: uint arg_AD_0 = 2188839002u; while (true) { uint num2; switch ((num2 = (arg_AD_0 ^ 3859081690u)) % 6u) { case 0u: goto IL_D1; case 1u: num ^= this.AgentId.GetHashCode(); arg_AD_0 = (num2 * 4059267623u ^ 2168376890u); continue; case 2u: arg_AD_0 = ((this.agentId_ == null) ? 2817497377u : 3783202359u); continue; case 4u: num ^= UpdateRequest.smethod_1(this.fieldOperation_); arg_AD_0 = (((!this.NoCreate) ? 3961869002u : 2740181031u) ^ num2 * 4002434650u); continue; case 5u: num ^= this.NoCreate.GetHashCode(); arg_AD_0 = (num2 * 1945323051u ^ 3635167157u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.EntityId); while (true) { IL_10D: uint arg_E1_0 = 2564413229u; while (true) { uint num; switch ((num = (arg_E1_0 ^ 3342241682u)) % 8u) { case 0u: goto IL_10D; case 1u: output.WriteBool(this.NoCreate); arg_E1_0 = (num * 469558632u ^ 1781729704u); continue; case 2u: arg_E1_0 = ((this.agentId_ != null) ? 3777398038u : 3663351647u); continue; case 3u: arg_E1_0 = (((!this.NoCreate) ? 1620325017u : 554540741u) ^ num * 1486469323u); continue; case 4u: output.WriteRawTag(34); output.WriteMessage(this.AgentId); arg_E1_0 = (num * 1019396768u ^ 6084063u); continue; case 6u: output.WriteRawTag(24); arg_E1_0 = (num * 341876400u ^ 871466651u); continue; case 7u: this.fieldOperation_.WriteTo(output, UpdateRequest._repeated_fieldOperation_codec); arg_E1_0 = (num * 2844087273u ^ 2423835886u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_CD: uint arg_A9_0 = 645756133u; while (true) { uint num2; switch ((num2 = (arg_A9_0 ^ 1250301802u)) % 6u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); num += this.fieldOperation_.CalculateSize(UpdateRequest._repeated_fieldOperation_codec); arg_A9_0 = ((this.NoCreate ? 657582939u : 563999923u) ^ num2 * 3714346153u); continue; case 2u: num += 2; arg_A9_0 = (num2 * 281091113u ^ 1626666770u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_A9_0 = (num2 * 1004968020u ^ 4209709402u); continue; case 4u: arg_A9_0 = ((this.agentId_ == null) ? 2061933598u : 2076927015u); continue; case 5u: goto IL_CD; } return num; } } return num; } public void MergeFrom(UpdateRequest other) { if (other == null) { goto IL_11D; } goto IL_1BE; uint arg_16A_0; while (true) { IL_165: uint num; switch ((num = (arg_16A_0 ^ 3774413321u)) % 14u) { case 0u: arg_16A_0 = (((!other.NoCreate) ? 937672445u : 675517359u) ^ num * 2452320819u); continue; case 1u: this.agentId_ = new EntityId(); arg_16A_0 = (num * 1234601935u ^ 1003752257u); continue; case 2u: goto IL_11D; case 3u: this.fieldOperation_.Add(other.fieldOperation_); arg_16A_0 = 2974446445u; continue; case 4u: arg_16A_0 = ((other.agentId_ != null) ? 3520709639u : 2185809974u); continue; case 5u: this.EntityId.MergeFrom(other.EntityId); arg_16A_0 = 3461672940u; continue; case 6u: arg_16A_0 = (((this.agentId_ == null) ? 3584186358u : 3931990352u) ^ num * 4017086534u); continue; case 7u: this.AgentId.MergeFrom(other.AgentId); arg_16A_0 = 2185809974u; continue; case 8u: this.NoCreate = other.NoCreate; arg_16A_0 = (num * 2348197357u ^ 4077060499u); continue; case 10u: this.entityId_ = new EntityId(); arg_16A_0 = (num * 976762498u ^ 2650255448u); continue; case 11u: return; case 12u: goto IL_1BE; case 13u: arg_16A_0 = (((this.entityId_ == null) ? 3699404460u : 2276358055u) ^ num * 1127517717u); continue; } break; } return; IL_11D: arg_16A_0 = 2542406220u; goto IL_165; IL_1BE: arg_16A_0 = ((other.entityId_ != null) ? 2543401998u : 3461672940u); goto IL_165; } public void MergeFrom(CodedInputStream input) { while (true) { IL_265: uint num; uint arg_1F9_0 = ((num = input.ReadTag()) == 0u) ? 2520023447u : 3444146955u; while (true) { uint num2; switch ((num2 = (arg_1F9_0 ^ 2736724222u)) % 20u) { case 0u: arg_1F9_0 = ((this.agentId_ != null) ? 3131718950u : 2244750913u); continue; case 1u: arg_1F9_0 = ((num <= 18u) ? 3860256704u : 2982901706u); continue; case 2u: arg_1F9_0 = (((num != 10u) ? 2251724623u : 3349989659u) ^ num2 * 2937945195u); continue; case 3u: arg_1F9_0 = ((this.entityId_ == null) ? 2335212308u : 2173777757u); continue; case 4u: input.ReadMessage(this.agentId_); arg_1F9_0 = 2608688055u; continue; case 5u: arg_1F9_0 = (num2 * 1037783235u ^ 2591386406u); continue; case 6u: this.entityId_ = new EntityId(); arg_1F9_0 = (num2 * 2070523957u ^ 4019654703u); continue; case 7u: arg_1F9_0 = (((num != 18u) ? 544434455u : 767173560u) ^ num2 * 1757157496u); continue; case 8u: arg_1F9_0 = ((num != 24u) ? 4098886644u : 2947662168u); continue; case 10u: arg_1F9_0 = (((num != 34u) ? 3913012777u : 3751125430u) ^ num2 * 1904709774u); continue; case 11u: input.ReadMessage(this.entityId_); arg_1F9_0 = 2608688055u; continue; case 12u: arg_1F9_0 = (num2 * 1616808734u ^ 1165973799u); continue; case 13u: arg_1F9_0 = (num2 * 406352591u ^ 2132149044u); continue; case 14u: this.NoCreate = input.ReadBool(); arg_1F9_0 = 2861642995u; continue; case 15u: input.SkipLastField(); arg_1F9_0 = 3555059398u; continue; case 16u: arg_1F9_0 = 3444146955u; continue; case 17u: goto IL_265; case 18u: this.fieldOperation_.AddEntriesFrom(input, UpdateRequest._repeated_fieldOperation_codec); arg_1F9_0 = 2608688055u; continue; case 19u: this.agentId_ = new EntityId(); arg_1F9_0 = (num2 * 628593577u ^ 1292758065u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/ProcessId.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class ProcessId : IMessage<ProcessId>, IEquatable<ProcessId>, IDeepCloneable<ProcessId>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ProcessId.__c __9 = new ProcessId.__c(); internal ProcessId cctor>b__29_0() { return new ProcessId(); } } private static readonly MessageParser<ProcessId> _parser = new MessageParser<ProcessId>(new Func<ProcessId>(ProcessId.__c.__9.<.cctor>b__29_0)); public const int LabelFieldNumber = 1; private uint label_; public const int EpochFieldNumber = 2; private uint epoch_; public static MessageParser<ProcessId> Parser { get { return ProcessId._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ProcessId.Descriptor; } } public uint Label { get { return this.label_; } set { this.label_ = value; } } public uint Epoch { get { return this.epoch_; } set { this.epoch_ = value; } } public ProcessId() { } public ProcessId(ProcessId other) : this() { while (true) { IL_3E: uint arg_26_0 = 3063290638u; while (true) { uint num; switch ((num = (arg_26_0 ^ 2436499432u)) % 3u) { case 1u: this.label_ = other.label_; arg_26_0 = (num * 584904251u ^ 2122595840u); continue; case 2u: goto IL_3E; } goto Block_1; } } Block_1: this.epoch_ = other.epoch_; } public ProcessId Clone() { return new ProcessId(this); } public override bool Equals(object other) { return this.Equals(other as ProcessId); } public bool Equals(ProcessId other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ 206117669) % 9) { case 0: arg_6D_0 = ((this.Epoch != other.Epoch) ? 1501679079 : 594287445); continue; case 1: goto IL_AB; case 2: return false; case 3: arg_6D_0 = ((this.Label == other.Label) ? 1590624097 : 1733647903); continue; case 5: return true; case 6: return false; case 7: return false; case 8: goto IL_15; } break; } return true; IL_15: arg_6D_0 = 2057605337; goto IL_68; IL_AB: arg_6D_0 = ((other == this) ? 539630939 : 1390132602); goto IL_68; } public override int GetHashCode() { return 1 ^ this.Label.GetHashCode() ^ this.Epoch.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); output.WriteUInt32(this.Label); output.WriteRawTag(16); output.WriteUInt32(this.Epoch); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.Label)) + (1 + CodedOutputStream.ComputeUInt32Size(this.Epoch)); } public void MergeFrom(ProcessId other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 3071542993u)) % 7u) { case 0u: this.Epoch = other.Epoch; arg_76_0 = (num * 2122077845u ^ 3853770081u); continue; case 1u: arg_76_0 = ((other.Epoch == 0u) ? 2493328637u : 2614089469u); continue; case 2u: goto IL_AD; case 4u: return; case 5u: this.Label = other.Label; arg_76_0 = (num * 1885469232u ^ 321180858u); continue; case 6u: goto IL_15; } break; } return; IL_15: arg_76_0 = 2420299156u; goto IL_71; IL_AD: arg_76_0 = ((other.Label != 0u) ? 3583963357u : 3150253818u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_D9: uint num; uint arg_9E_0 = ((num = input.ReadTag()) != 0u) ? 1012932227u : 877148087u; while (true) { uint num2; switch ((num2 = (arg_9E_0 ^ 1541073719u)) % 8u) { case 1u: this.Epoch = input.ReadUInt32(); arg_9E_0 = 286447628u; continue; case 2u: this.Label = input.ReadUInt32(); arg_9E_0 = 286447628u; continue; case 3u: goto IL_D9; case 4u: arg_9E_0 = ((num == 8u) ? 713114029u : 1071426098u); continue; case 5u: arg_9E_0 = (((num != 16u) ? 3689775795u : 4151018444u) ^ num2 * 2006267818u); continue; case 6u: input.SkipLastField(); arg_9E_0 = (num2 * 2801947723u ^ 804626878u); continue; case 7u: arg_9E_0 = 1012932227u; continue; } return; } } } } } <file_sep>/Google.Protobuf.Reflection/OneofDescriptorProto.cs using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class OneofDescriptorProto : IMessage, IMessage<OneofDescriptorProto>, IEquatable<OneofDescriptorProto>, IDeepCloneable<OneofDescriptorProto> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly OneofDescriptorProto.__c __9 = new OneofDescriptorProto.__c(); internal OneofDescriptorProto cctor>b__24_0() { return new OneofDescriptorProto(); } } private static readonly MessageParser<OneofDescriptorProto> _parser = new MessageParser<OneofDescriptorProto>(new Func<OneofDescriptorProto>(OneofDescriptorProto.__c.__9.<.cctor>b__24_0)); public const int NameFieldNumber = 1; private string name_ = ""; public static MessageParser<OneofDescriptorProto> Parser { get { return OneofDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return OneofDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public OneofDescriptorProto() { } public OneofDescriptorProto(OneofDescriptorProto other) : this() { this.name_ = other.name_; } public OneofDescriptorProto Clone() { return new OneofDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as OneofDescriptorProto); } public bool Equals(OneofDescriptorProto other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 160548853) % 7) { case 0: goto IL_3E; case 1: return false; case 2: arg_48_0 = (OneofDescriptorProto.smethod_0(this.Name, other.Name) ? 740380643 : 1997557812); continue; case 3: return false; case 4: goto IL_7A; case 6: return true; } break; } return true; IL_3E: arg_48_0 = 906011499; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 1147039028 : 1837833880); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 4093631835u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 2849004273u)) % 4u) { case 0u: goto IL_6E; case 1u: num ^= OneofDescriptorProto.smethod_2(this.Name); arg_52_0 = (num2 * 1397723935u ^ 3537854193u); continue; case 2u: arg_52_0 = (((OneofDescriptorProto.smethod_1(this.Name) == 0) ? 1533380660u : 1176197354u) ^ num2 * 2745841641u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (OneofDescriptorProto.smethod_1(this.Name) != 0) { while (true) { IL_60: uint arg_44_0 = 886597418u; while (true) { uint num; switch ((num = (arg_44_0 ^ 1922158505u)) % 4u) { case 0u: goto IL_60; case 2u: output.WriteString(this.Name); arg_44_0 = (num * 1607138035u ^ 2103952198u); continue; case 3u: output.WriteRawTag(10); arg_44_0 = (num * 240653117u ^ 115277656u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_70: uint arg_54_0 = 821718222u; while (true) { uint num2; switch ((num2 = (arg_54_0 ^ 931918383u)) % 4u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_54_0 = (num2 * 2816127389u ^ 323497593u); continue; case 1u: arg_54_0 = (((OneofDescriptorProto.smethod_1(this.Name) == 0) ? 2810243550u : 4039763144u) ^ num2 * 1205480599u); continue; case 3u: goto IL_70; } return num; } } return num; } public void MergeFrom(OneofDescriptorProto other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 529495116u)) % 5u) { case 1u: return; case 2u: goto IL_63; case 3u: this.Name = other.Name; arg_37_0 = (num * 3529934907u ^ 661019711u); continue; case 4u: goto IL_12; } break; } return; IL_12: arg_37_0 = 1089835390u; goto IL_32; IL_63: arg_37_0 = ((OneofDescriptorProto.smethod_1(other.Name) != 0) ? 871025922u : 831617221u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_96: uint num; uint arg_63_0 = ((num = input.ReadTag()) == 0u) ? 1966173920u : 1765919479u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 1825018052u)) % 6u) { case 1u: arg_63_0 = ((num == 10u) ? 1199675965u : 733240905u); continue; case 2u: goto IL_96; case 3u: this.Name = input.ReadString(); arg_63_0 = 801006046u; continue; case 4u: arg_63_0 = 1765919479u; continue; case 5u: input.SkipLastField(); arg_63_0 = (num2 * 2370429378u ^ 1379865092u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeUserRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeUserRequest : IMessage<ChallengeUserRequest>, IEquatable<ChallengeUserRequest>, IDeepCloneable<ChallengeUserRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeUserRequest.__c __9 = new ChallengeUserRequest.__c(); internal ChallengeUserRequest cctor>b__49_0() { return new ChallengeUserRequest(); } } private static readonly MessageParser<ChallengeUserRequest> _parser = new MessageParser<ChallengeUserRequest>(new Func<ChallengeUserRequest>(ChallengeUserRequest.__c.__9.<.cctor>b__49_0)); public const int ChallengesFieldNumber = 1; private static readonly FieldCodec<Challenge> _repeated_challenges_codec; private readonly RepeatedField<Challenge> challenges_ = new RepeatedField<Challenge>(); public const int ContextFieldNumber = 2; private uint context_; public const int IdFieldNumber = 3; private uint id_; public const int DeadlineFieldNumber = 4; private ulong deadline_; public const int AttributesFieldNumber = 5; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attributes_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attributes_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int GameAccountIdFieldNumber = 6; private EntityId gameAccountId_; public static MessageParser<ChallengeUserRequest> Parser { get { return ChallengeUserRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeUserRequest.Descriptor; } } public RepeatedField<Challenge> Challenges { get { return this.challenges_; } } public uint Context { get { return this.context_; } set { this.context_ = value; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public ulong Deadline { get { return this.deadline_; } set { this.deadline_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attributes { get { return this.attributes_; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public ChallengeUserRequest() { } public ChallengeUserRequest(ChallengeUserRequest other) : this() { while (true) { IL_DE: uint arg_B6_0 = 229254168u; while (true) { uint num; switch ((num = (arg_B6_0 ^ 1271269179u)) % 7u) { case 0u: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); arg_B6_0 = 947561244u; continue; case 1u: this.id_ = other.id_; this.deadline_ = other.deadline_; arg_B6_0 = (num * 3991094323u ^ 630526029u); continue; case 2u: this.attributes_ = other.attributes_.Clone(); arg_B6_0 = (num * 2358047220u ^ 2818621137u); continue; case 4u: goto IL_DE; case 5u: this.context_ = other.context_; arg_B6_0 = (num * 4146722923u ^ 2660060192u); continue; case 6u: this.challenges_ = other.challenges_.Clone(); arg_B6_0 = (num * 3971548888u ^ 2645110455u); continue; } return; } } } public ChallengeUserRequest Clone() { return new ChallengeUserRequest(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeUserRequest); } public bool Equals(ChallengeUserRequest other) { if (other == null) { goto IL_11D; } goto IL_185; int arg_127_0; while (true) { IL_122: switch ((arg_127_0 ^ 858837617) % 17) { case 0: goto IL_11D; case 1: return false; case 2: return false; case 3: return false; case 4: arg_127_0 = ((!ChallengeUserRequest.smethod_0(this.GameAccountId, other.GameAccountId)) ? 1224345360 : 1422345378); continue; case 5: arg_127_0 = ((this.Context != other.Context) ? 262287171 : 1291426536); continue; case 6: return false; case 7: arg_127_0 = ((!this.challenges_.Equals(other.challenges_)) ? 1751376430 : 682624620); continue; case 8: arg_127_0 = ((this.Deadline != other.Deadline) ? 1790901358 : 120535380); continue; case 9: arg_127_0 = ((this.Id != other.Id) ? 82072354 : 1804740707); continue; case 10: return false; case 11: return false; case 12: goto IL_185; case 13: return true; case 15: arg_127_0 = (this.attributes_.Equals(other.attributes_) ? 1908038076 : 39378118); continue; case 16: return false; } break; } return true; IL_11D: arg_127_0 = 2009102167; goto IL_122; IL_185: arg_127_0 = ((other == this) ? 1357807438 : 1114146993); goto IL_122; } public override int GetHashCode() { int num = 1; while (true) { IL_15E: uint arg_129_0 = 953549573u; while (true) { uint num2; switch ((num2 = (arg_129_0 ^ 81860428u)) % 10u) { case 1u: num ^= this.attributes_.GetHashCode(); arg_129_0 = ((this.gameAccountId_ == null) ? 668879852u : 1736171649u); continue; case 2u: arg_129_0 = ((this.Deadline != 0uL) ? 1079037797u : 475941467u); continue; case 3u: num ^= ChallengeUserRequest.smethod_1(this.challenges_); arg_129_0 = (num2 * 2699092310u ^ 162514878u); continue; case 4u: num ^= this.Id.GetHashCode(); arg_129_0 = (num2 * 717187007u ^ 3088793976u); continue; case 5u: num ^= this.GameAccountId.GetHashCode(); arg_129_0 = (num2 * 392259091u ^ 1429690843u); continue; case 6u: arg_129_0 = (((this.Id == 0u) ? 3777737210u : 3987378098u) ^ num2 * 4231024633u); continue; case 7u: num ^= this.Deadline.GetHashCode(); arg_129_0 = (num2 * 1582248228u ^ 1784116383u); continue; case 8u: num ^= this.Context.GetHashCode(); arg_129_0 = (num2 * 2767103040u ^ 3562014408u); continue; case 9u: goto IL_15E; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.challenges_.WriteTo(output, ChallengeUserRequest._repeated_challenges_codec); output.WriteRawTag(21); while (true) { IL_19A: uint arg_15D_0 = 522842017u; while (true) { uint num; switch ((num = (arg_15D_0 ^ 1805320541u)) % 12u) { case 1u: output.WriteRawTag(50); output.WriteMessage(this.GameAccountId); arg_15D_0 = (num * 3018143777u ^ 3275503568u); continue; case 2u: arg_15D_0 = (((this.gameAccountId_ != null) ? 2170439992u : 4024776149u) ^ num * 1309831780u); continue; case 3u: output.WriteRawTag(32); arg_15D_0 = (num * 1726065625u ^ 1949175078u); continue; case 4u: output.WriteFixed32(this.Context); arg_15D_0 = (num * 412516272u ^ 2754815154u); continue; case 5u: output.WriteRawTag(24); arg_15D_0 = (num * 1951865049u ^ 669293214u); continue; case 6u: this.attributes_.WriteTo(output, ChallengeUserRequest._repeated_attributes_codec); arg_15D_0 = 324668495u; continue; case 7u: goto IL_19A; case 8u: output.WriteUInt64(this.Deadline); arg_15D_0 = (num * 1938654658u ^ 2471973843u); continue; case 9u: arg_15D_0 = ((this.Deadline == 0uL) ? 1594144195u : 49949302u); continue; case 10u: output.WriteUInt32(this.Id); arg_15D_0 = (num * 4243226738u ^ 3135843180u); continue; case 11u: arg_15D_0 = (((this.Id == 0u) ? 2765761576u : 3654472296u) ^ num * 4252842808u); continue; } return; } } } public int CalculateSize() { int num = 0 + this.challenges_.CalculateSize(ChallengeUserRequest._repeated_challenges_codec); while (true) { IL_145: uint arg_114_0 = 3162608546u; while (true) { uint num2; switch ((num2 = (arg_114_0 ^ 2701028312u)) % 9u) { case 0u: goto IL_145; case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Deadline); arg_114_0 = (num2 * 2530084115u ^ 1565093126u); continue; case 2u: num += this.attributes_.CalculateSize(ChallengeUserRequest._repeated_attributes_codec); arg_114_0 = 2458664968u; continue; case 4u: arg_114_0 = (((this.gameAccountId_ != null) ? 44364881u : 266060663u) ^ num2 * 3643872155u); continue; case 5u: arg_114_0 = ((this.Deadline == 0uL) ? 2532657924u : 3112007662u); continue; case 6u: num += 5; arg_114_0 = (((this.Id != 0u) ? 3602439411u : 2569309920u) ^ num2 * 1496811588u); continue; case 7u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_114_0 = (num2 * 2894325080u ^ 3152752768u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_114_0 = (num2 * 3522744847u ^ 957498768u); continue; } return num; } } return num; } public void MergeFrom(ChallengeUserRequest other) { if (other == null) { goto IL_57; } goto IL_1B7; uint arg_163_0; while (true) { IL_15E: uint num; switch ((num = (arg_163_0 ^ 1203381116u)) % 14u) { case 0u: this.Deadline = other.Deadline; arg_163_0 = (num * 3962570585u ^ 3321897997u); continue; case 1u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_163_0 = 1521961964u; continue; case 2u: this.Context = other.Context; arg_163_0 = (num * 303712998u ^ 4039849318u); continue; case 3u: arg_163_0 = (((this.gameAccountId_ != null) ? 2888578746u : 2623220786u) ^ num * 75474941u); continue; case 4u: this.Id = other.Id; arg_163_0 = (num * 2923783211u ^ 1751893247u); continue; case 5u: arg_163_0 = ((other.Deadline != 0uL) ? 1435431782u : 82651911u); continue; case 7u: goto IL_1B7; case 8u: arg_163_0 = (((other.gameAccountId_ != null) ? 555258729u : 1267324812u) ^ num * 2129435312u); continue; case 9u: this.gameAccountId_ = new EntityId(); arg_163_0 = (num * 1654886745u ^ 399573772u); continue; case 10u: goto IL_57; case 11u: this.attributes_.Add(other.attributes_); arg_163_0 = 381997102u; continue; case 12u: arg_163_0 = ((other.Id != 0u) ? 695376134u : 1528512129u); continue; case 13u: return; } break; } return; IL_57: arg_163_0 = 735999595u; goto IL_15E; IL_1B7: this.challenges_.Add(other.challenges_); arg_163_0 = ((other.Context == 0u) ? 480948778u : 271406910u); goto IL_15E; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2AC: uint num; uint arg_238_0 = ((num = input.ReadTag()) != 0u) ? 1861797852u : 328693633u; while (true) { uint num2; switch ((num2 = (arg_238_0 ^ 1661044335u)) % 22u) { case 1u: arg_238_0 = (num2 * 3851548275u ^ 2692400307u); continue; case 2u: arg_238_0 = (((num == 24u) ? 3544563086u : 3005075516u) ^ num2 * 1354580321u); continue; case 3u: arg_238_0 = ((num != 32u) ? 1967276945u : 1429323329u); continue; case 4u: this.gameAccountId_ = new EntityId(); arg_238_0 = (num2 * 477622374u ^ 761234845u); continue; case 5u: this.attributes_.AddEntriesFrom(input, ChallengeUserRequest._repeated_attributes_codec); arg_238_0 = 341371847u; continue; case 6u: arg_238_0 = (((num != 50u) ? 2243287798u : 3552492846u) ^ num2 * 4073867439u); continue; case 7u: arg_238_0 = ((num <= 24u) ? 1781526746u : 999529946u); continue; case 8u: arg_238_0 = (((num == 21u) ? 1489078201u : 1832520429u) ^ num2 * 1104463356u); continue; case 9u: arg_238_0 = 1861797852u; continue; case 10u: goto IL_2AC; case 11u: input.SkipLastField(); arg_238_0 = 448398246u; continue; case 12u: input.ReadMessage(this.gameAccountId_); arg_238_0 = 341371847u; continue; case 13u: this.Id = input.ReadUInt32(); arg_238_0 = 1092294630u; continue; case 14u: this.Deadline = input.ReadUInt64(); arg_238_0 = 341371847u; continue; case 15u: arg_238_0 = (((num == 10u) ? 945742589u : 858495243u) ^ num2 * 1388290096u); continue; case 16u: this.Context = input.ReadFixed32(); arg_238_0 = 341371847u; continue; case 17u: arg_238_0 = (num2 * 753172457u ^ 2455212342u); continue; case 18u: arg_238_0 = (((num == 42u) ? 3705632798u : 2436743137u) ^ num2 * 715210206u); continue; case 19u: arg_238_0 = (num2 * 1888686479u ^ 1182043968u); continue; case 20u: this.challenges_.AddEntriesFrom(input, ChallengeUserRequest._repeated_challenges_codec); arg_238_0 = 341371847u; continue; case 21u: arg_238_0 = ((this.gameAccountId_ != null) ? 1865161785u : 1391555465u); continue; } return; } } } static ChallengeUserRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 2163374874u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 3006805296u)) % 3u) { case 0u: goto IL_57; case 1u: ChallengeUserRequest._repeated_challenges_codec = FieldCodec.ForMessage<Challenge>(10u, Challenge.Parser); arg_3F_0 = (num * 2237696814u ^ 2743889092u); continue; } goto Block_1; } } Block_1: ChallengeUserRequest._repeated_attributes_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(42u, Bgs.Protocol.Attribute.Parser); } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/ContentHandle.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class ContentHandle : IMessage<ContentHandle>, IEquatable<ContentHandle>, IDeepCloneable<ContentHandle>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ContentHandle.__c __9 = new ContentHandle.__c(); internal ContentHandle cctor>b__39_0() { return new ContentHandle(); } } private static readonly MessageParser<ContentHandle> _parser = new MessageParser<ContentHandle>(new Func<ContentHandle>(ContentHandle.__c.__9.<.cctor>b__39_0)); public const int RegionFieldNumber = 1; private uint region_; public const int UsageFieldNumber = 2; private uint usage_; public const int HashFieldNumber = 3; private ByteString hash_ = ByteString.Empty; public const int ProtoUrlFieldNumber = 4; private string protoUrl_ = ""; public static MessageParser<ContentHandle> Parser { get { return ContentHandle._parser; } } public static MessageDescriptor Descriptor { get { return ContentHandleTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return ContentHandle.Descriptor; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public uint Usage { get { return this.usage_; } set { this.usage_ = value; } } public ByteString Hash { get { return this.hash_; } set { this.hash_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_36<string>(1095253436u)); } } public string ProtoUrl { get { return this.protoUrl_; } set { this.protoUrl_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public ContentHandle() { } public ContentHandle(ContentHandle other) : this() { this.region_ = other.region_; this.usage_ = other.usage_; this.hash_ = other.hash_; this.protoUrl_ = other.protoUrl_; } public ContentHandle Clone() { return new ContentHandle(this); } public override bool Equals(object other) { return this.Equals(other as ContentHandle); } public bool Equals(ContentHandle other) { if (other == null) { goto IL_44; } goto IL_116; int arg_C8_0; while (true) { IL_C3: switch ((arg_C8_0 ^ -1671093463) % 13) { case 0: arg_C8_0 = ((this.Usage != other.Usage) ? -1265670296 : -1620689695); continue; case 1: arg_C8_0 = ((this.Region != other.Region) ? -194907944 : -500464743); continue; case 2: return false; case 3: return false; case 4: return false; case 6: arg_C8_0 = (ContentHandle.smethod_0(this.ProtoUrl, other.ProtoUrl) ? -1279912574 : -100222763); continue; case 7: return false; case 8: goto IL_44; case 9: return true; case 10: arg_C8_0 = ((this.Hash != other.Hash) ? -1977153278 : -204270641); continue; case 11: return false; case 12: goto IL_116; } break; } return true; IL_44: arg_C8_0 = -420366030; goto IL_C3; IL_116: arg_C8_0 = ((other != this) ? -1213475696 : -64876340); goto IL_C3; } public override int GetHashCode() { int num = 1 ^ this.Region.GetHashCode(); while (true) { IL_C7: uint arg_A3_0 = 1646517667u; while (true) { uint num2; switch ((num2 = (arg_A3_0 ^ 317921148u)) % 6u) { case 0u: num ^= this.ProtoUrl.GetHashCode(); arg_A3_0 = (num2 * 3227089615u ^ 3203910007u); continue; case 1u: num ^= this.Usage.GetHashCode(); arg_A3_0 = (num2 * 1377244530u ^ 1617096702u); continue; case 2u: num ^= this.Hash.GetHashCode(); arg_A3_0 = (num2 * 3250719977u ^ 3329739869u); continue; case 3u: arg_A3_0 = (((this.ProtoUrl.Length != 0) ? 3609755830u : 2322032005u) ^ num2 * 294078350u); continue; case 4u: goto IL_C7; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); while (true) { IL_103: uint arg_D7_0 = 1324987083u; while (true) { uint num; switch ((num = (arg_D7_0 ^ 158427908u)) % 8u) { case 0u: output.WriteBytes(this.Hash); arg_D7_0 = (((ContentHandle.smethod_1(this.ProtoUrl) != 0) ? 2165241805u : 2910461791u) ^ num * 3006757172u); continue; case 1u: output.WriteRawTag(34); arg_D7_0 = (num * 27807896u ^ 2316960824u); continue; case 2u: goto IL_103; case 4u: output.WriteString(this.ProtoUrl); arg_D7_0 = (num * 1614975717u ^ 1595522571u); continue; case 5u: output.WriteRawTag(26); arg_D7_0 = (num * 2628973845u ^ 200440045u); continue; case 6u: output.WriteFixed32(this.Usage); arg_D7_0 = (num * 1900679743u ^ 1163813803u); continue; case 7u: output.WriteFixed32(this.Region); output.WriteRawTag(21); arg_D7_0 = (num * 2328750940u ^ 52848782u); continue; } return; } } } public int CalculateSize() { int num = 10 + (1 + CodedOutputStream.ComputeBytesSize(this.Hash)); if (ContentHandle.smethod_1(this.ProtoUrl) != 0) { while (true) { IL_61: uint arg_49_0 = 82695887u; while (true) { uint num2; switch ((num2 = (arg_49_0 ^ 2090860883u)) % 3u) { case 0u: goto IL_61; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.ProtoUrl); arg_49_0 = (num2 * 3787526208u ^ 2883850405u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(ContentHandle other) { if (other == null) { goto IL_65; } goto IL_14C; uint arg_104_0; while (true) { IL_FF: uint num; switch ((num = (arg_104_0 ^ 2811611724u)) % 11u) { case 0u: this.Region = other.Region; arg_104_0 = (num * 2919997010u ^ 839007443u); continue; case 1u: this.Usage = other.Usage; arg_104_0 = (num * 4112545442u ^ 887999064u); continue; case 2u: goto IL_14C; case 4u: this.Hash = other.Hash; arg_104_0 = (num * 1409846633u ^ 1569898026u); continue; case 5u: this.ProtoUrl = other.ProtoUrl; arg_104_0 = (num * 1883110423u ^ 1414102517u); continue; case 6u: arg_104_0 = ((ContentHandle.smethod_1(other.ProtoUrl) != 0) ? 4033790444u : 2555836053u); continue; case 7u: return; case 8u: goto IL_65; case 9u: arg_104_0 = ((other.Usage == 0u) ? 3905424246u : 4193376555u); continue; case 10u: arg_104_0 = ((other.Hash.Length == 0) ? 4230674379u : 3942972405u); continue; } break; } return; IL_65: arg_104_0 = 4029834591u; goto IL_FF; IL_14C: arg_104_0 = ((other.Region != 0u) ? 4140907085u : 2688696961u); goto IL_FF; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1DB: uint num; uint arg_17B_0 = ((num = input.ReadTag()) == 0u) ? 2494375871u : 3586499333u; while (true) { uint num2; switch ((num2 = (arg_17B_0 ^ 2664115468u)) % 17u) { case 0u: arg_17B_0 = (num2 * 3314211520u ^ 2186776925u); continue; case 1u: input.SkipLastField(); arg_17B_0 = 2299855128u; continue; case 2u: arg_17B_0 = ((num <= 21u) ? 2872680410u : 4243253880u); continue; case 3u: goto IL_1DB; case 4u: arg_17B_0 = ((num == 26u) ? 4112320615u : 2595459321u); continue; case 5u: this.ProtoUrl = input.ReadString(); arg_17B_0 = 2299855128u; continue; case 6u: this.Hash = input.ReadBytes(); arg_17B_0 = 3034558808u; continue; case 7u: arg_17B_0 = (((num != 13u) ? 3894968277u : 4163347591u) ^ num2 * 275449569u); continue; case 8u: arg_17B_0 = (((num != 21u) ? 2607366308u : 2472069547u) ^ num2 * 2578476141u); continue; case 9u: arg_17B_0 = 3586499333u; continue; case 10u: this.Region = input.ReadFixed32(); arg_17B_0 = 3219908427u; continue; case 11u: arg_17B_0 = (num2 * 1795491597u ^ 2785393331u); continue; case 13u: arg_17B_0 = (num2 * 3955093413u ^ 1781149500u); continue; case 14u: arg_17B_0 = (((num != 34u) ? 3529620521u : 3477737914u) ^ num2 * 4035144164u); continue; case 15u: arg_17B_0 = (num2 * 2328630830u ^ 2999940058u); continue; case 16u: this.Usage = input.ReadFixed32(); arg_17B_0 = 3467653787u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.WellKnownTypes/FieldMaskReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class FieldMaskReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return FieldMaskReflection.descriptor; } } static FieldMaskReflection() { FieldMaskReflection.descriptor = FileDescriptor.FromGeneratedCode(FieldMaskReflection.smethod_1(FieldMaskReflection.smethod_0(Module.smethod_35<string>(800271374u), Module.smethod_37<string>(3472613202u), Module.smethod_37<string>(3122013250u), Module.smethod_36<string>(4158349646u))), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(FieldMaskReflection.smethod_2(typeof(FieldMask).TypeHandle), FieldMask.Parser, new string[] { Module.smethod_36<string>(618748339u) }, null, null, null) })); } static string smethod_0(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeAnsweredResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeAnsweredResponse : IMessage<ChallengeAnsweredResponse>, IEquatable<ChallengeAnsweredResponse>, IDeepCloneable<ChallengeAnsweredResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeAnsweredResponse.__c __9 = new ChallengeAnsweredResponse.__c(); internal ChallengeAnsweredResponse cctor>b__34_0() { return new ChallengeAnsweredResponse(); } } private static readonly MessageParser<ChallengeAnsweredResponse> _parser = new MessageParser<ChallengeAnsweredResponse>(new Func<ChallengeAnsweredResponse>(ChallengeAnsweredResponse.__c.__9.<.cctor>b__34_0)); public const int DataFieldNumber = 1; private ByteString data_ = ByteString.Empty; public const int DoRetryFieldNumber = 2; private bool doRetry_; public const int RecordNotFoundFieldNumber = 3; private bool recordNotFound_; public static MessageParser<ChallengeAnsweredResponse> Parser { get { return ChallengeAnsweredResponse._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeAnsweredResponse.Descriptor; } } public ByteString Data { get { return this.data_; } set { this.data_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public bool DoRetry { get { return this.doRetry_; } set { this.doRetry_ = value; } } public bool RecordNotFound { get { return this.recordNotFound_; } set { this.recordNotFound_ = value; } } public ChallengeAnsweredResponse() { } public ChallengeAnsweredResponse(ChallengeAnsweredResponse other) : this() { while (true) { IL_69: uint arg_4D_0 = 3393470137u; while (true) { uint num; switch ((num = (arg_4D_0 ^ 4054376914u)) % 4u) { case 0u: goto IL_69; case 1u: this.recordNotFound_ = other.recordNotFound_; arg_4D_0 = (num * 944333340u ^ 2797693732u); continue; case 3u: this.data_ = other.data_; this.doRetry_ = other.doRetry_; arg_4D_0 = (num * 1013678656u ^ 800097251u); continue; } return; } } } public ChallengeAnsweredResponse Clone() { return new ChallengeAnsweredResponse(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeAnsweredResponse); } public bool Equals(ChallengeAnsweredResponse other) { if (other == null) { goto IL_92; } goto IL_E2; int arg_9C_0; while (true) { IL_97: switch ((arg_9C_0 ^ 1445842356) % 11) { case 0: return false; case 1: return false; case 2: goto IL_92; case 4: return false; case 5: return false; case 6: arg_9C_0 = ((this.Data != other.Data) ? 1900513050 : 1734213367); continue; case 7: arg_9C_0 = ((this.RecordNotFound != other.RecordNotFound) ? 1021738380 : 1585967627); continue; case 8: goto IL_E2; case 9: return true; case 10: arg_9C_0 = ((this.DoRetry != other.DoRetry) ? 2083838454 : 114641297); continue; } break; } return true; IL_92: arg_9C_0 = 1400224851; goto IL_97; IL_E2: arg_9C_0 = ((other == this) ? 1159741514 : 1966804990); goto IL_97; } public override int GetHashCode() { int num = 1; if (this.Data.Length != 0) { goto IL_62; } goto IL_E3; uint arg_AC_0; while (true) { IL_A7: uint num2; switch ((num2 = (arg_AC_0 ^ 2560264832u)) % 7u) { case 0u: num ^= this.DoRetry.GetHashCode(); arg_AC_0 = (num2 * 1687540986u ^ 3451330812u); continue; case 2u: num ^= this.RecordNotFound.GetHashCode(); arg_AC_0 = (num2 * 2676635953u ^ 637023954u); continue; case 3u: goto IL_62; case 4u: arg_AC_0 = ((!this.RecordNotFound) ? 3564766171u : 2663270873u); continue; case 5u: num ^= ChallengeAnsweredResponse.smethod_0(this.Data); arg_AC_0 = (num2 * 1736629555u ^ 417808301u); continue; case 6u: goto IL_E3; } break; } return num; IL_62: arg_AC_0 = 2253925554u; goto IL_A7; IL_E3: arg_AC_0 = (this.DoRetry ? 2408075789u : 2356813134u); goto IL_A7; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Data.Length != 0) { goto IL_C1; } goto IL_106; uint arg_CB_0; while (true) { IL_C6: uint num; switch ((num = (arg_CB_0 ^ 2722735510u)) % 8u) { case 0u: goto IL_C1; case 1u: goto IL_106; case 3u: output.WriteBool(this.DoRetry); arg_CB_0 = (num * 282569275u ^ 2521740147u); continue; case 4u: arg_CB_0 = (this.RecordNotFound ? 3506627736u : 2912725164u); continue; case 5u: output.WriteRawTag(10); output.WriteBytes(this.Data); arg_CB_0 = (num * 4250811345u ^ 3080094154u); continue; case 6u: output.WriteRawTag(24); output.WriteBool(this.RecordNotFound); arg_CB_0 = (num * 2562968716u ^ 1328812804u); continue; case 7u: output.WriteRawTag(16); arg_CB_0 = (num * 4270468542u ^ 131673751u); continue; } break; } return; IL_C1: arg_CB_0 = 4092160627u; goto IL_C6; IL_106: arg_CB_0 = ((!this.DoRetry) ? 3869945858u : 2206413289u); goto IL_C6; } public int CalculateSize() { int num = 0; while (true) { IL_EE: uint arg_C2_0 = 868266105u; while (true) { uint num2; switch ((num2 = (arg_C2_0 ^ 619060295u)) % 8u) { case 0u: goto IL_EE; case 1u: arg_C2_0 = ((!this.RecordNotFound) ? 538217050u : 1681869704u); continue; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Data); arg_C2_0 = (num2 * 2518846796u ^ 1907442660u); continue; case 3u: arg_C2_0 = ((!this.DoRetry) ? 818299182u : 466538555u); continue; case 4u: num += 2; arg_C2_0 = (num2 * 4060477802u ^ 1022559862u); continue; case 6u: arg_C2_0 = (((this.Data.Length != 0) ? 3438932111u : 2188479990u) ^ num2 * 3167851931u); continue; case 7u: num += 2; arg_C2_0 = (num2 * 570498362u ^ 99343804u); continue; } return num; } } return num; } public void MergeFrom(ChallengeAnsweredResponse other) { if (other == null) { goto IL_33; } goto IL_F5; uint arg_B5_0; while (true) { IL_B0: uint num; switch ((num = (arg_B5_0 ^ 3182566679u)) % 9u) { case 1u: return; case 2u: arg_B5_0 = ((!other.RecordNotFound) ? 2580426635u : 3106800373u); continue; case 3u: goto IL_F5; case 4u: arg_B5_0 = ((!other.DoRetry) ? 3611510989u : 4080597303u); continue; case 5u: this.Data = other.Data; arg_B5_0 = (num * 1594680232u ^ 3416666749u); continue; case 6u: this.RecordNotFound = other.RecordNotFound; arg_B5_0 = (num * 3593041253u ^ 2861756833u); continue; case 7u: goto IL_33; case 8u: this.DoRetry = other.DoRetry; arg_B5_0 = (num * 3576265773u ^ 3913994605u); continue; } break; } return; IL_33: arg_B5_0 = 3434105346u; goto IL_B0; IL_F5: arg_B5_0 = ((other.Data.Length == 0) ? 3176146973u : 3949601163u); goto IL_B0; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14B: uint num; uint arg_FF_0 = ((num = input.ReadTag()) != 0u) ? 2280525769u : 2479021777u; while (true) { uint num2; switch ((num2 = (arg_FF_0 ^ 3187733918u)) % 12u) { case 0u: arg_FF_0 = (num2 * 1839250332u ^ 553178723u); continue; case 1u: goto IL_14B; case 2u: this.DoRetry = input.ReadBool(); arg_FF_0 = 2865322776u; continue; case 3u: this.RecordNotFound = input.ReadBool(); arg_FF_0 = 2454431251u; continue; case 4u: arg_FF_0 = (((num != 24u) ? 3399289662u : 2860740189u) ^ num2 * 2355856800u); continue; case 5u: this.Data = input.ReadBytes(); arg_FF_0 = 3274817050u; continue; case 6u: arg_FF_0 = 2280525769u; continue; case 8u: input.SkipLastField(); arg_FF_0 = (num2 * 4017259650u ^ 2560986451u); continue; case 9u: arg_FF_0 = (((num != 16u) ? 774438640u : 2144650030u) ^ num2 * 255296614u); continue; case 10u: arg_FF_0 = (num2 * 83866992u ^ 844152499u); continue; case 11u: arg_FF_0 = ((num == 10u) ? 2747873907u : 2361592599u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/Identity.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class Identity : IMessage<Identity>, IEquatable<Identity>, IDeepCloneable<Identity>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Identity.__c __9 = new Identity.__c(); internal Identity cctor>b__34_0() { return new Identity(); } } private static readonly MessageParser<Identity> _parser = new MessageParser<Identity>(new Func<Identity>(Identity.__c.__9.<.cctor>b__34_0)); public const int AccountFieldNumber = 1; private AccountId account_; public const int GameAccountFieldNumber = 2; private GameAccountHandle gameAccount_; public const int ProcessFieldNumber = 3; private ProcessId process_; public static MessageParser<Identity> Parser { get { return Identity._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return Identity.Descriptor; } } public AccountId Account { get { return this.account_; } set { this.account_ = value; } } public GameAccountHandle GameAccount { get { return this.gameAccount_; } set { this.gameAccount_ = value; } } public ProcessId Process { get { return this.process_; } set { this.process_ = value; } } public Identity() { } public Identity(Identity other) : this() { while (true) { IL_87: int arg_6D_0 = -2136154793; while (true) { switch ((arg_6D_0 ^ -688484900) % 4) { case 0: goto IL_87; case 1: this.GameAccount = ((other.gameAccount_ != null) ? other.GameAccount.Clone() : null); this.Process = ((other.process_ != null) ? other.Process.Clone() : null); arg_6D_0 = -272762666; continue; case 3: this.Account = ((other.account_ != null) ? other.Account.Clone() : null); arg_6D_0 = -1163524115; continue; } return; } } } public Identity Clone() { return new Identity(this); } public override bool Equals(object other) { return this.Equals(other as Identity); } public bool Equals(Identity other) { if (other == null) { goto IL_18; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ -2015358824) % 11) { case 0: return true; case 1: return false; case 2: return false; case 3: arg_A9_0 = ((!Identity.smethod_0(this.Account, other.Account)) ? -2045615498 : -732525157); continue; case 5: return false; case 6: return false; case 7: arg_A9_0 = (Identity.smethod_0(this.Process, other.Process) ? -1926700879 : -570978331); continue; case 8: arg_A9_0 = ((!Identity.smethod_0(this.GameAccount, other.GameAccount)) ? -1963452861 : -392442474); continue; case 9: goto IL_EF; case 10: goto IL_18; } break; } return true; IL_18: arg_A9_0 = -1208722666; goto IL_A4; IL_EF: arg_A9_0 = ((other != this) ? -1020240109 : -972073099); goto IL_A4; } public override int GetHashCode() { int num = 1; if (this.account_ != null) { goto IL_73; } goto IL_D5; uint arg_9E_0; while (true) { IL_99: uint num2; switch ((num2 = (arg_9E_0 ^ 755699365u)) % 7u) { case 0u: arg_9E_0 = ((this.process_ == null) ? 1185614062u : 1573268212u); continue; case 2u: goto IL_D5; case 3u: goto IL_73; case 4u: num ^= Identity.smethod_1(this.GameAccount); arg_9E_0 = (num2 * 1504218401u ^ 4037256661u); continue; case 5u: num ^= Identity.smethod_1(this.Process); arg_9E_0 = (num2 * 4177593427u ^ 4073587373u); continue; case 6u: num ^= Identity.smethod_1(this.Account); arg_9E_0 = (num2 * 2838774171u ^ 3122355491u); continue; } break; } return num; IL_73: arg_9E_0 = 1951983386u; goto IL_99; IL_D5: arg_9E_0 = ((this.gameAccount_ == null) ? 1320755070u : 160443630u); goto IL_99; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.account_ != null) { goto IL_40; } goto IL_FB; uint arg_C0_0; while (true) { IL_BB: uint num; switch ((num = (arg_C0_0 ^ 2027548793u)) % 8u) { case 0u: output.WriteRawTag(26); arg_C0_0 = (num * 2213692137u ^ 2677396187u); continue; case 1u: output.WriteRawTag(18); output.WriteMessage(this.GameAccount); arg_C0_0 = (num * 1847217930u ^ 1043792942u); continue; case 2u: output.WriteMessage(this.Process); arg_C0_0 = (num * 687141282u ^ 3090639262u); continue; case 4u: goto IL_FB; case 5u: arg_C0_0 = ((this.process_ != null) ? 236065369u : 1630095322u); continue; case 6u: goto IL_40; case 7u: output.WriteRawTag(10); output.WriteMessage(this.Account); arg_C0_0 = (num * 139845040u ^ 2357367005u); continue; } break; } return; IL_40: arg_C0_0 = 1877036022u; goto IL_BB; IL_FB: arg_C0_0 = ((this.gameAccount_ != null) ? 112798208u : 1061870484u); goto IL_BB; } public int CalculateSize() { int num = 0; while (true) { IL_104: uint arg_D8_0 = 1236654924u; while (true) { uint num2; switch ((num2 = (arg_D8_0 ^ 1964195679u)) % 8u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Account); arg_D8_0 = (num2 * 461019566u ^ 1778512011u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccount); arg_D8_0 = (num2 * 3618175669u ^ 2629333020u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Process); arg_D8_0 = (num2 * 1439381249u ^ 3870770568u); continue; case 3u: arg_D8_0 = (((this.account_ != null) ? 54982951u : 1731874435u) ^ num2 * 1363038072u); continue; case 4u: arg_D8_0 = ((this.gameAccount_ != null) ? 1441083502u : 726591417u); continue; case 6u: arg_D8_0 = ((this.process_ != null) ? 1093706749u : 1073164074u); continue; case 7u: goto IL_104; } return num; } } return num; } public void MergeFrom(Identity other) { if (other == null) { goto IL_EA; } goto IL_1E5; uint arg_18D_0; while (true) { IL_188: uint num; switch ((num = (arg_18D_0 ^ 268859054u)) % 15u) { case 0u: this.process_ = new ProcessId(); arg_18D_0 = (num * 3831907367u ^ 2722688819u); continue; case 1u: this.account_ = new AccountId(); arg_18D_0 = (num * 3949577039u ^ 2252433245u); continue; case 2u: this.Process.MergeFrom(other.Process); arg_18D_0 = 1949670003u; continue; case 3u: arg_18D_0 = (((this.process_ != null) ? 1753107231u : 573597476u) ^ num * 895975477u); continue; case 4u: goto IL_1E5; case 5u: arg_18D_0 = ((other.process_ != null) ? 632898099u : 1949670003u); continue; case 6u: goto IL_EA; case 7u: arg_18D_0 = ((other.gameAccount_ == null) ? 163248446u : 516365208u); continue; case 9u: return; case 10u: arg_18D_0 = (((this.gameAccount_ != null) ? 2417037975u : 3468617793u) ^ num * 718598460u); continue; case 11u: this.GameAccount.MergeFrom(other.GameAccount); arg_18D_0 = 163248446u; continue; case 12u: this.Account.MergeFrom(other.Account); arg_18D_0 = 661219109u; continue; case 13u: arg_18D_0 = (((this.account_ == null) ? 554581499u : 2083116336u) ^ num * 3670622239u); continue; case 14u: this.gameAccount_ = new GameAccountHandle(); arg_18D_0 = (num * 3470925735u ^ 629812078u); continue; } break; } return; IL_EA: arg_18D_0 = 195646830u; goto IL_188; IL_1E5: arg_18D_0 = ((other.account_ != null) ? 1505532313u : 661219109u); goto IL_188; } public void MergeFrom(CodedInputStream input) { while (true) { IL_22C: uint num; uint arg_1C8_0 = ((num = input.ReadTag()) == 0u) ? 2588361256u : 3118244112u; while (true) { uint num2; switch ((num2 = (arg_1C8_0 ^ 3075276928u)) % 18u) { case 0u: arg_1C8_0 = ((this.gameAccount_ != null) ? 3466711917u : 4224067106u); continue; case 1u: input.ReadMessage(this.gameAccount_); arg_1C8_0 = 3143067899u; continue; case 2u: arg_1C8_0 = ((this.account_ == null) ? 3250739740u : 2762324184u); continue; case 3u: input.ReadMessage(this.process_); arg_1C8_0 = 4212170719u; continue; case 4u: this.gameAccount_ = new GameAccountHandle(); arg_1C8_0 = (num2 * 3359293953u ^ 3726916047u); continue; case 5u: input.SkipLastField(); arg_1C8_0 = (num2 * 4051944129u ^ 4251560506u); continue; case 6u: this.account_ = new AccountId(); arg_1C8_0 = (num2 * 2235358791u ^ 3728789916u); continue; case 7u: arg_1C8_0 = 3118244112u; continue; case 8u: arg_1C8_0 = ((num != 10u) ? 3152485406u : 3337708560u); continue; case 9u: goto IL_22C; case 10u: input.ReadMessage(this.account_); arg_1C8_0 = 3933861599u; continue; case 11u: arg_1C8_0 = (((num == 26u) ? 3395622382u : 4048389913u) ^ num2 * 1323166980u); continue; case 12u: arg_1C8_0 = ((this.process_ == null) ? 3267536183u : 2828445625u); continue; case 13u: arg_1C8_0 = (num2 * 4071273670u ^ 1854002429u); continue; case 14u: arg_1C8_0 = (((num != 18u) ? 1527373527u : 1477567392u) ^ num2 * 866403204u); continue; case 15u: arg_1C8_0 = (num2 * 3552554176u ^ 1613825183u); continue; case 17u: this.process_ = new ProcessId(); arg_1C8_0 = (num2 * 3559321122u ^ 3872949239u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Collections/MapField.cs using Google.Protobuf.Compatibility; using Google.Protobuf.Reflection; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; namespace Google.Protobuf.Collections { [ComVisible(true)] public sealed class MapField<TKey, TValue> : IEnumerable, IDictionary, ICollection, IDeepCloneable<MapField<TKey, TValue>>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEquatable<MapField<TKey, TValue>> { private class DictionaryEnumerator : IEnumerator, IDictionaryEnumerator { private readonly IEnumerator<KeyValuePair<TKey, TValue>> enumerator; public object Current { get { return this.Entry; } } public DictionaryEntry Entry { get { return new DictionaryEntry(this.Key, this.Value); } } public object Key { get { KeyValuePair<TKey, TValue> current = this.enumerator.Current; return current.Key; } } public object Value { get { KeyValuePair<TKey, TValue> current = this.enumerator.Current; return current.Value; } } internal DictionaryEnumerator(IEnumerator<KeyValuePair<TKey, TValue>> enumerator) { this.enumerator = enumerator; } public bool MoveNext() { return MapField<TKey, TValue>.DictionaryEnumerator.smethod_0(this.enumerator); } public void Reset() { MapField<TKey, TValue>.DictionaryEnumerator.smethod_1(this.enumerator); } static bool smethod_0(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_1(IEnumerator ienumerator_0) { ienumerator_0.Reset(); } } public sealed class Codec { internal class MessageAdapter : IMessage { private readonly MapField<TKey, TValue>.Codec codec; internal TKey Key { get; set; } internal TValue Value { get; set; } MessageDescriptor IMessage.Descriptor { get { return null; } } internal MessageAdapter(MapField<TKey, TValue>.Codec codec) { while (true) { IL_39: uint arg_21_0 = 1370978205u; while (true) { uint num; switch ((num = (arg_21_0 ^ 960216553u)) % 3u) { case 0u: goto IL_39; case 1u: this.codec = codec; arg_21_0 = (num * 470956029u ^ 1170415337u); continue; } return; } } } internal void Reset() { this.Key = this.codec.keyCodec.DefaultValue; while (true) { IL_58: uint arg_40_0 = 1698209103u; while (true) { uint num; switch ((num = (arg_40_0 ^ 466210016u)) % 3u) { case 0u: goto IL_58; case 2u: this.Value = this.codec.valueCodec.DefaultValue; arg_40_0 = (num * 572990784u ^ 580878625u); continue; } return; } } } public void MergeFrom(CodedInputStream input) { while (true) { IL_112: uint num; uint arg_D7_0 = ((num = input.ReadTag()) != 0u) ? 3303032382u : 3356458653u; while (true) { uint num2; switch ((num2 = (arg_D7_0 ^ 3451716539u)) % 8u) { case 0u: goto IL_112; case 1u: input.SkipLastField(); arg_D7_0 = 3676125403u; continue; case 2u: this.Key = this.codec.keyCodec.Read(input); arg_D7_0 = (num2 * 2290070049u ^ 4039667025u); continue; case 3u: this.Value = this.codec.valueCodec.Read(input); arg_D7_0 = (num2 * 3351502033u ^ 717773552u); continue; case 4u: arg_D7_0 = ((num == this.codec.valueCodec.Tag) ? 2864455040u : 3788498690u); continue; case 5u: arg_D7_0 = ((num != this.codec.keyCodec.Tag) ? 3819227879u : 3911048177u); continue; case 7u: arg_D7_0 = 3303032382u; continue; } return; } } } public void WriteTo(CodedOutputStream output) { this.codec.keyCodec.WriteTagAndValue(output, this.Key); this.codec.valueCodec.WriteTagAndValue(output, this.Value); } public int CalculateSize() { return this.codec.keyCodec.CalculateSizeWithTag(this.Key) + this.codec.valueCodec.CalculateSizeWithTag(this.Value); } } private readonly FieldCodec<TKey> keyCodec; private readonly FieldCodec<TValue> valueCodec; private readonly uint mapTag; internal uint MapTag { get { return this.mapTag; } } public Codec(FieldCodec<TKey> keyCodec, FieldCodec<TValue> valueCodec, uint mapTag) { this.keyCodec = keyCodec; this.valueCodec = valueCodec; this.mapTag = mapTag; } } private class MapView<T> : IEnumerable, ICollection, ICollection<T>, IEnumerable<T> { private readonly MapField<TKey, TValue> parent; private readonly Func<KeyValuePair<TKey, TValue>, T> projection; private readonly Func<T, bool> containsCheck; public int Count { get { return this.parent.Count; } } public bool IsReadOnly { get { return true; } } public bool IsSynchronized { get { return false; } } public object SyncRoot { get { return this.parent; } } internal MapView(MapField<TKey, TValue> parent, Func<KeyValuePair<TKey, TValue>, T> projection, Func<T, bool> containsCheck) { this.parent = parent; this.projection = projection; this.containsCheck = containsCheck; } public void Add(T item) { throw MapField<TKey, TValue>.MapView<T>.smethod_0(); } public void Clear() { throw MapField<TKey, TValue>.MapView<T>.smethod_0(); } public bool Contains(T item) { return this.containsCheck(item); } public void CopyTo(T[] array, int arrayIndex) { if (arrayIndex >= 0) { goto IL_49; } IL_13: int arg_1D_0 = -1120938110; IL_18: switch ((arg_1D_0 ^ -1829387815) % 5) { case 0: IL_49: arg_1D_0 = ((arrayIndex + this.Count < array.Length) ? -276659330 : -1024886501); goto IL_18; case 1: throw MapField<TKey, TValue>.MapView<T>.smethod_2(Module.smethod_35<string>(2082010867u), Module.smethod_33<string>(1880551425u)); case 3: goto IL_132; case 4: goto IL_13; } IEnumerator<T> enumerator = this.GetEnumerator(); try { while (true) { IL_E9: uint arg_BD_0 = (!MapField<TKey, TValue>.MapView<T>.smethod_3(enumerator)) ? 4009544974u : 2346551384u; while (true) { uint num; switch ((num = (arg_BD_0 ^ 2465579481u)) % 5u) { case 1u: { T current; array[arrayIndex++] = current; arg_BD_0 = (num * 1095831635u ^ 1260299999u); continue; } case 2u: { T current = enumerator.Current; arg_BD_0 = 3638568108u; continue; } case 3u: arg_BD_0 = 2346551384u; continue; case 4u: goto IL_E9; } goto Block_6; } } Block_6: return; } finally { if (enumerator != null) { while (true) { IL_12A: uint arg_112_0 = 2963618268u; while (true) { uint num; switch ((num = (arg_112_0 ^ 2465579481u)) % 3u) { case 1u: MapField<TKey, TValue>.MapView<T>.smethod_4(enumerator); arg_112_0 = (num * 647037918u ^ 1062834806u); continue; case 2u: goto IL_12A; } goto Block_10; } } Block_10:; } } IL_132: throw MapField<TKey, TValue>.MapView<T>.smethod_1(Module.smethod_34<string>(178897624u)); } public IEnumerator<T> GetEnumerator() { return this.parent.list.Select(this.projection).GetEnumerator(); } public bool Remove(T item) { throw MapField<TKey, TValue>.MapView<T>.smethod_0(); } IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public void CopyTo(Array array, int index) { if (index >= 0) { goto IL_49; } IL_13: int arg_1D_0 = -63406274; IL_18: switch ((arg_1D_0 ^ -289179319) % 5) { case 0: throw MapField<TKey, TValue>.MapView<T>.smethod_2(Module.smethod_35<string>(2082010867u), Module.smethod_37<string>(1194126108u)); case 1: IL_49: arg_1D_0 = ((index + this.Count < MapField<TKey, TValue>.MapView<T>.smethod_5(array)) ? -182547107 : -411928083); goto IL_18; case 3: goto IL_13; case 4: goto IL_130; } IEnumerator<T> enumerator = this.GetEnumerator(); try { while (true) { IL_E7: int arg_BF_0 = MapField<TKey, TValue>.MapView<T>.smethod_3(enumerator) ? -980863989 : -1838440544; while (true) { switch ((arg_BF_0 ^ -289179319) % 4) { case 0: arg_BF_0 = -980863989; continue; case 2: { T current = enumerator.Current; MapField<TKey, TValue>.MapView<T>.smethod_6(array, current, new int[] { index++ }); arg_BF_0 = -1938334234; continue; } case 3: goto IL_E7; } goto Block_6; } } Block_6: return; } finally { if (enumerator != null) { while (true) { IL_128: uint arg_110_0 = 2893450592u; while (true) { uint num; switch ((num = (arg_110_0 ^ 4005787977u)) % 3u) { case 0u: goto IL_128; case 1u: MapField<TKey, TValue>.MapView<T>.smethod_4(enumerator); arg_110_0 = (num * 3810399149u ^ 453040383u); continue; } goto Block_10; } } Block_10:; } } IL_130: throw MapField<TKey, TValue>.MapView<T>.smethod_1(Module.smethod_33<string>(1439392708u)); } static NotSupportedException smethod_0() { return new NotSupportedException(); } static ArgumentOutOfRangeException smethod_1(string string_0) { return new ArgumentOutOfRangeException(string_0); } static ArgumentException smethod_2(string string_0, string string_1) { return new ArgumentException(string_0, string_1); } static bool smethod_3(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_4(IDisposable idisposable_0) { idisposable_0.Dispose(); } static int smethod_5(Array array_0) { return array_0.Length; } static void smethod_6(Array array_0, object object_0, int[] int_0) { array_0.SetValue(object_0, int_0); } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MapField<TKey, TValue>.__c __9 = new MapField<TKey, TValue>.__c(); public static Func<KeyValuePair<TKey, TValue>, TKey> __9__15_0; public static Func<KeyValuePair<TKey, TValue>, TValue> __9__17_0; public static Func<KeyValuePair<TKey, TValue>, DictionaryEntry> __9__43_0; internal TKey <get_Keys>b__15_0(KeyValuePair<TKey, TValue> pair) { return pair.Key; } internal TValue <get_Values>b__17_0(KeyValuePair<TKey, TValue> pair) { return pair.Value; } internal DictionaryEntry CopyTo>b__43_0(KeyValuePair<TKey, TValue> pair) { return new DictionaryEntry(pair.Key, pair.Value); } } private readonly bool allowNullValues; private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> map = new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>(); private readonly LinkedList<KeyValuePair<TKey, TValue>> list = new LinkedList<KeyValuePair<TKey, TValue>>(); public TValue this[TKey key] { get { Preconditions.CheckNotNullUnconstrained<TKey>(key, Module.smethod_37<string>(2567348548u)); TValue result; if (!this.TryGetValue(key, out result)) { throw MapField<TKey, TValue>.smethod_3(); } return result; } set { Preconditions.CheckNotNullUnconstrained<TKey>(key, Module.smethod_33<string>(3567910441u)); LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode; while (true) { IL_134: uint arg_FF_0 = 3415560039u; while (true) { uint num; switch ((num = (arg_FF_0 ^ 3265137633u)) % 10u) { case 0u: goto IL_134; case 1u: arg_FF_0 = (((!this.map.TryGetValue(key, out linkedListNode)) ? 4013628177u : 2657022034u) ^ num * 3043306133u); continue; case 2u: arg_FF_0 = (((value == null) ? 198502020u : 1307246504u) ^ num * 2705987851u); continue; case 3u: { KeyValuePair<TKey, TValue> value2; linkedListNode = this.list.AddLast(value2); arg_FF_0 = 3962844499u; continue; } case 4u: Preconditions.CheckNotNullUnconstrained<TValue>(value, Module.smethod_34<string>(2130392831u)); arg_FF_0 = (num * 2453653874u ^ 1806060698u); continue; case 5u: return; case 7u: arg_FF_0 = (((!this.allowNullValues) ? 713015442u : 611864865u) ^ num * 653702333u); continue; case 8u: { KeyValuePair<TKey, TValue> value2; linkedListNode.Value = value2; arg_FF_0 = (num * 2159750764u ^ 1373043468u); continue; } case 9u: { KeyValuePair<TKey, TValue> value2 = new KeyValuePair<TKey, TValue>(key, value); arg_FF_0 = 3433467366u; continue; } } goto Block_4; } } Block_4: this.map[key] = linkedListNode; } } public ICollection<TKey> Keys { get { Func<KeyValuePair<TKey, TValue>, TKey> arg_2D_1; if ((arg_2D_1 = MapField<TKey, TValue>.__c.__9__15_0) == null) { arg_2D_1 = (MapField<TKey, TValue>.__c.__9__15_0 = new Func<KeyValuePair<TKey, TValue>, TKey>(MapField<TKey, TValue>.__c.__9.<get_Keys>b__15_0)); } return new MapField<TKey, TValue>.MapView<TKey>(this, arg_2D_1, new Func<TKey, bool>(this.ContainsKey)); } } public ICollection<TValue> Values { get { Func<KeyValuePair<TKey, TValue>, TValue> arg_2C_1; if ((arg_2C_1 = MapField<TKey, TValue>.__c.__9__17_0) == null) { arg_2C_1 = (MapField<TKey, TValue>.__c.__9__17_0 = new Func<KeyValuePair<TKey, TValue>, TValue>(MapField<TKey, TValue>.__c.__9.<get_Values>b__17_0)); } return new MapField<TKey, TValue>.MapView<TValue>(this, arg_2C_1, new Func<TValue, bool>(this.ContainsValue)); } } public bool AllowsNullValues { get { return this.allowNullValues; } } public int Count { get { return this.list.Count; } } public bool IsReadOnly { get { return false; } } bool IDictionary.IsFixedSize { get { return false; } } ICollection IDictionary.Keys { get { return (ICollection)this.Keys; } } ICollection IDictionary.Values { get { return (ICollection)this.Values; } } bool ICollection.IsSynchronized { get { return false; } } object ICollection.SyncRoot { get { return this; } } object IDictionary.this[object key] { get { Preconditions.CheckNotNull<object>(key, Module.smethod_36<string>(2587547248u)); TValue tValue; while (true) { IL_75: uint arg_55_0 = 3774691653u; while (true) { uint num; switch ((num = (arg_55_0 ^ 2379130955u)) % 5u) { case 0u: this.TryGetValue((TKey)((object)key), out tValue); arg_55_0 = 3929692879u; continue; case 2u: goto IL_83; case 3u: goto IL_75; case 4u: arg_55_0 = (((!(key is TKey)) ? 1194638497u : 1528963333u) ^ num * 1877142148u); continue; } goto Block_2; } } Block_2: return tValue; IL_83: return null; } set { this[(TKey)((object)key)] = (TValue)((object)value); } } public MapField() : this(MapField<TKey, TValue>.smethod_0(typeof(IMessage).TypeHandle).IsAssignableFrom(MapField<TKey, TValue>.smethod_0(typeof(TValue).TypeHandle)) || MapField<TKey, TValue>.smethod_1(MapField<TKey, TValue>.smethod_0(typeof(TValue).TypeHandle)) != null) { } public MapField(bool allowNullValues) { while (true) { IL_E2: uint arg_BA_0 = 3904158003u; while (true) { uint num; switch ((num = (arg_BA_0 ^ 3345331615u)) % 7u) { case 0u: arg_BA_0 = (((MapField<TKey, TValue>.smethod_1(MapField<TKey, TValue>.smethod_0(typeof(TValue).TypeHandle)) != null) ? 1562219801u : 1691107887u) ^ num * 3872711468u); continue; case 2u: goto IL_E9; case 3u: this.allowNullValues = allowNullValues; arg_BA_0 = 3112878605u; continue; case 4u: goto IL_E2; case 5u: arg_BA_0 = ((MapField<TKey, TValue>.smethod_0(typeof(TValue).TypeHandle).IsValueType() ? 1307305448u : 695315327u) ^ num * 3095455947u); continue; case 6u: arg_BA_0 = ((allowNullValues ? 79455233u : 295020405u) ^ num * 3160987932u); continue; } goto Block_4; } } Block_4: return; IL_E9: throw MapField<TKey, TValue>.smethod_2(Module.smethod_34<string>(2841932638u), Module.smethod_36<string>(4005735678u)); } public MapField<TKey, TValue> Clone() { MapField<TKey, TValue> mapField = new MapField<TKey, TValue>(this.allowNullValues); while (true) { IL_56: uint arg_3E_0 = 1167686490u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 1021116184u)) % 3u) { case 1u: if (MapField<TKey, TValue>.smethod_0(typeof(IDeepCloneable<TValue>).TypeHandle).IsAssignableFrom(MapField<TKey, TValue>.smethod_0(typeof(TValue).TypeHandle))) { arg_3E_0 = (num * 2024535756u ^ 3090371646u); continue; } goto IL_115; case 2u: goto IL_56; } goto Block_2; } } Block_2: using (LinkedList<KeyValuePair<TKey, TValue>>.Enumerator enumerator = this.list.GetEnumerator()) { while (true) { IL_F7: int arg_CF_0 = (!enumerator.MoveNext()) ? 1304906255 : 671437898; while (true) { switch ((arg_CF_0 ^ 1021116184) % 4) { case 0: arg_CF_0 = 671437898; continue; case 1: goto IL_F7; case 2: { KeyValuePair<TKey, TValue> current = enumerator.Current; mapField.Add(current.Key, (current.Value == null) ? current.Value : ((IDeepCloneable<TValue>)((object)current.Value)).Clone()); arg_CF_0 = 423902397; continue; } } goto Block_6; } } Block_6: return mapField; } IL_115: mapField.Add(this); return mapField; } public void Add(TKey key, TValue value) { if (!this.ContainsKey(key)) { goto IL_2D; } IL_09: int arg_13_0 = -757706476; IL_0E: switch ((arg_13_0 ^ -1805234047) % 4) { case 1: throw MapField<TKey, TValue>.smethod_2(Module.smethod_37<string>(4291170940u), Module.smethod_36<string>(2587547248u)); case 2: goto IL_09; case 3: IL_2D: this[key] = value; arg_13_0 = -1647647475; goto IL_0E; } } public bool ContainsKey(TKey key) { Preconditions.CheckNotNullUnconstrained<TKey>(key, Module.smethod_33<string>(3567910441u)); return this.map.ContainsKey(key); } private bool ContainsValue(TValue value) { EqualityComparer<TValue> comparer; TValue value; while (true) { IL_44: uint arg_2C_0 = 3055675477u; while (true) { uint num; switch ((num = (arg_2C_0 ^ 2190345178u)) % 3u) { case 0u: goto IL_44; case 2u: value = value2; comparer = EqualityComparer<TValue>.Default; arg_2C_0 = (num * 92960453u ^ 3129934038u); continue; } goto Block_1; } } Block_1: return this.list.Any((KeyValuePair<TKey, TValue> pair) => comparer.Equals(pair.Value, value)); } public bool Remove(TKey key) { Preconditions.CheckNotNullUnconstrained<TKey>(key, Module.smethod_37<string>(2567348548u)); while (true) { IL_8F: uint arg_6F_0 = 544457277u; while (true) { uint num; switch ((num = (arg_6F_0 ^ 96975899u)) % 5u) { case 0u: { this.map.Remove(key); LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode; linkedListNode.List.Remove(linkedListNode); arg_6F_0 = (num * 2794647973u ^ 2809640284u); continue; } case 1u: { LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode; arg_6F_0 = ((this.map.TryGetValue(key, out linkedListNode) ? 1991666715u : 1512426622u) ^ num * 4135140928u); continue; } case 3u: return true; case 4u: goto IL_8F; } return false; } } return false; } public bool TryGetValue(TKey key, out TValue value) { LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode; if (!this.map.TryGetValue(key, out linkedListNode)) { goto IL_34; } IL_10: int arg_1A_0 = -461974596; IL_15: switch ((arg_1A_0 ^ -1272543825) % 4) { case 0: IL_34: value = default(TValue); arg_1A_0 = -644787390; goto IL_15; case 2: goto IL_10; case 3: value = linkedListNode.Value.Value; return true; } return false; } public void Add(IDictionary<TKey, TValue> entries) { Preconditions.CheckNotNull<IDictionary<TKey, TValue>>(entries, Module.smethod_33<string>(3785211131u)); IEnumerator<KeyValuePair<TKey, TValue>> enumerator = entries.GetEnumerator(); try { while (true) { IL_8F: uint arg_63_0 = (!MapField<TKey, TValue>.smethod_4(enumerator)) ? 102600442u : 570581804u; while (true) { uint num; switch ((num = (arg_63_0 ^ 1421198152u)) % 5u) { case 1u: { KeyValuePair<TKey, TValue> current = enumerator.Current; arg_63_0 = 553006614u; continue; } case 2u: { KeyValuePair<TKey, TValue> current; this.Add(current.Key, current.Value); arg_63_0 = (num * 2408826796u ^ 1151598044u); continue; } case 3u: goto IL_8F; case 4u: arg_63_0 = 570581804u; continue; } goto Block_3; } } Block_3:; } finally { if (enumerator != null) { while (true) { IL_D0: uint arg_B8_0 = 1818409970u; while (true) { uint num; switch ((num = (arg_B8_0 ^ 1421198152u)) % 3u) { case 1u: MapField<TKey, TValue>.smethod_5(enumerator); arg_B8_0 = (num * 4118747341u ^ 3137542146u); continue; case 2u: goto IL_D0; } goto Block_7; } } Block_7:; } } } public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() { return this.list.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); } void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item) { this.Add(item.Key, item.Value); } public void Clear() { this.list.Clear(); while (true) { IL_42: uint arg_2A_0 = 3452911788u; while (true) { uint num; switch ((num = (arg_2A_0 ^ 3797466243u)) % 3u) { case 0u: goto IL_42; case 2u: this.map.Clear(); arg_2A_0 = (num * 2415783751u ^ 92902320u); continue; } return; } } } bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item) { TValue y; return this.TryGetValue(item.Key, out y) && EqualityComparer<TValue>.Default.Equals(item.Value, y); } void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) { this.list.CopyTo(array, arrayIndex); } bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item) { if (item.Key == null) { goto IL_A5; } goto IL_EA; uint arg_AF_0; LinkedListNode<KeyValuePair<TKey, TValue>> linkedListNode; while (true) { IL_AA: uint num; switch ((num = (arg_AF_0 ^ 1816634761u)) % 8u) { case 0u: goto IL_A5; case 1u: goto IL_105; case 2u: this.map.Remove(item.Key); arg_AF_0 = (num * 124005834u ^ 1014048690u); continue; case 4u: goto IL_EA; case 5u: return true; case 6u: arg_AF_0 = (((!EqualityComparer<TValue>.Default.Equals(item.Value, linkedListNode.Value.Value)) ? 3133751758u : 4017588495u) ^ num * 1239991746u); continue; case 7u: linkedListNode.List.Remove(linkedListNode); arg_AF_0 = (num * 1688063827u ^ 3535056073u); continue; } break; } return false; IL_105: throw MapField<TKey, TValue>.smethod_2(Module.smethod_33<string>(685397630u), Module.smethod_37<string>(2888741661u)); IL_A5: arg_AF_0 = 327567640u; goto IL_AA; IL_EA: arg_AF_0 = (this.map.TryGetValue(item.Key, out linkedListNode) ? 1422474855u : 2097746322u); goto IL_AA; } public override bool Equals(object other) { return this.Equals(other as MapField<TKey, TValue>); } public override int GetHashCode() { EqualityComparer<TValue> @default = EqualityComparer<TValue>.Default; int num = 0; using (LinkedList<KeyValuePair<TKey, TValue>>.Enumerator enumerator = this.list.GetEnumerator()) { while (true) { IL_AA: uint arg_7A_0 = enumerator.MoveNext() ? 1713585246u : 1482543118u; while (true) { uint num2; switch ((num2 = (arg_7A_0 ^ 1202140775u)) % 5u) { case 0u: arg_7A_0 = 1713585246u; continue; case 2u: { KeyValuePair<TKey, TValue> current = enumerator.Current; arg_7A_0 = 2141861222u; continue; } case 3u: { int arg_4F_0 = num; KeyValuePair<TKey, TValue> current; TKey key = current.Key; num = (arg_4F_0 ^ key.GetHashCode() * 31 + @default.GetHashCode(current.Value)); arg_7A_0 = (num2 * 75704509u ^ 3881396042u); continue; } case 4u: goto IL_AA; } goto Block_3; } } Block_3:; } return num; } public bool Equals(MapField<TKey, TValue> other) { if (other == null) { goto IL_39; } goto IL_78; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 559718338) % 7) { case 0: goto IL_39; case 2: goto IL_78; case 3: return false; case 4: return true; case 5: arg_43_0 = ((other.Count != this.Count) ? 506021359 : 1637480932); continue; case 6: return false; } break; } EqualityComparer<TValue> @default = EqualityComparer<TValue>.Default; IEnumerator<KeyValuePair<TKey, TValue>> enumerator = this.GetEnumerator(); try { bool result; while (true) { IL_169: uint arg_128_0 = (!MapField<TKey, TValue>.smethod_4(enumerator)) ? 1843242525u : 456522231u; while (true) { uint num; switch ((num = (arg_128_0 ^ 559718338u)) % 9u) { case 0u: arg_128_0 = 456522231u; continue; case 1u: goto IL_169; case 2u: goto IL_176; case 3u: { KeyValuePair<TKey, TValue> current = enumerator.Current; arg_128_0 = 970870785u; continue; } case 4u: { KeyValuePair<TKey, TValue> current; TValue x; arg_128_0 = (((!other.TryGetValue(current.Key, out x)) ? 783368694u : 1583793443u) ^ num * 4150100105u); continue; } case 5u: { KeyValuePair<TKey, TValue> current; TValue x; arg_128_0 = (@default.Equals(x, current.Value) ? 1170131668u : 1900238166u); continue; } case 6u: result = false; arg_128_0 = (num * 1044707454u ^ 1785143649u); continue; case 7u: goto IL_17B; } goto Block_9; } } Block_9: goto IL_17D; IL_176: result = false; IL_17B: return result; IL_17D:; } finally { if (enumerator != null) { while (true) { IL_1B6: uint arg_19D_0 = 1947491883u; while (true) { uint num; switch ((num = (arg_19D_0 ^ 559718338u)) % 3u) { case 0u: goto IL_1B6; case 1u: MapField<TKey, TValue>.smethod_5(enumerator); arg_19D_0 = (num * 4229434066u ^ 1546059497u); continue; } goto Block_13; } } Block_13:; } } return true; IL_39: arg_43_0 = 673969793; goto IL_3E; IL_78: arg_43_0 = ((other == this) ? 1909058213 : 1358360491); goto IL_3E; } public void AddEntriesFrom(CodedInputStream input, MapField<TKey, TValue>.Codec codec) { MapField<TKey, TValue>.Codec.MessageAdapter messageAdapter = new MapField<TKey, TValue>.Codec.MessageAdapter(codec); while (true) { IL_93: uint arg_73_0 = 628691396u; while (true) { uint num; switch ((num = (arg_73_0 ^ 371428270u)) % 5u) { case 0u: goto IL_93; case 1u: messageAdapter.Reset(); arg_73_0 = 698242948u; continue; case 3u: this[messageAdapter.Key] = messageAdapter.Value; arg_73_0 = ((input.MaybeConsumeTag(codec.MapTag) ? 2330632738u : 2210537095u) ^ num * 1602454558u); continue; case 4u: input.ReadMessage(messageAdapter); arg_73_0 = (num * 1112167940u ^ 2093906651u); continue; } return; } } } public void WriteTo(CodedOutputStream output, MapField<TKey, TValue>.Codec codec) { MapField<TKey, TValue>.Codec.MessageAdapter messageAdapter = new MapField<TKey, TValue>.Codec.MessageAdapter(codec); using (LinkedList<KeyValuePair<TKey, TValue>>.Enumerator enumerator = this.list.GetEnumerator()) { while (true) { IL_BD: uint arg_8A_0 = (!enumerator.MoveNext()) ? 1636633820u : 470078609u; while (true) { uint num; switch ((num = (arg_8A_0 ^ 527457419u)) % 6u) { case 0u: goto IL_BD; case 1u: { KeyValuePair<TKey, TValue> current; messageAdapter.Value = current.Value; output.WriteTag(codec.MapTag); arg_8A_0 = (num * 175971974u ^ 1001509484u); continue; } case 2u: { KeyValuePair<TKey, TValue> current = enumerator.Current; messageAdapter.Key = current.Key; arg_8A_0 = 1275309530u; continue; } case 4u: arg_8A_0 = 470078609u; continue; case 5u: output.WriteMessage(messageAdapter); arg_8A_0 = (num * 2751932437u ^ 2518150680u); continue; } goto Block_3; } } Block_3:; } } public int CalculateSize(MapField<TKey, TValue>.Codec codec) { if (this.Count != 0) { goto IL_2F; } IL_08: int arg_12_0 = 121135447; IL_0D: MapField<TKey, TValue>.Codec.MessageAdapter messageAdapter; int num; switch ((arg_12_0 ^ 708469546) % 4) { case 0: goto IL_08; case 1: return 0; case 2: IL_2F: messageAdapter = new MapField<TKey, TValue>.Codec.MessageAdapter(codec); num = 0; arg_12_0 = 1229441325; goto IL_0D; } using (LinkedList<KeyValuePair<TKey, TValue>>.Enumerator enumerator = this.list.GetEnumerator()) { while (true) { IL_FE: uint arg_CA_0 = enumerator.MoveNext() ? 371096569u : 2082850424u; while (true) { uint num2; switch ((num2 = (arg_CA_0 ^ 708469546u)) % 6u) { case 0u: { KeyValuePair<TKey, TValue> current; messageAdapter.Key = current.Key; messageAdapter.Value = current.Value; num += CodedOutputStream.ComputeRawVarint32Size(codec.MapTag); arg_CA_0 = (num2 * 2680746663u ^ 3971763513u); continue; } case 1u: { KeyValuePair<TKey, TValue> current = enumerator.Current; arg_CA_0 = 1610495656u; continue; } case 2u: arg_CA_0 = 371096569u; continue; case 3u: num += CodedOutputStream.ComputeMessageSize(messageAdapter); arg_CA_0 = (num2 * 3258543750u ^ 4285265397u); continue; case 5u: goto IL_FE; } goto Block_4; } } Block_4:; } return num; } public override string ToString() { StringBuilder stringBuilder = MapField<TKey, TValue>.smethod_6(); JsonFormatter.Default.WriteDictionary(stringBuilder, this); return MapField<TKey, TValue>.smethod_7(stringBuilder); } void IDictionary.Add(object key, object value) { this.Add((TKey)((object)key), (TValue)((object)value)); } bool IDictionary.Contains(object key) { return key is TKey && this.ContainsKey((TKey)((object)key)); } IDictionaryEnumerator IDictionary.GetEnumerator() { return new MapField<TKey, TValue>.DictionaryEnumerator(this.GetEnumerator()); } void IDictionary.Remove(object key) { Preconditions.CheckNotNull<object>(key, Module.smethod_34<string>(2908005883u)); while (true) { IL_73: uint arg_53_0 = 3880966263u; while (true) { uint num; switch ((num = (arg_53_0 ^ 3305223996u)) % 5u) { case 0u: goto IL_73; case 1u: this.Remove((TKey)((object)key)); arg_53_0 = 2755177987u; continue; case 3u: arg_53_0 = (((key is TKey) ? 3477137443u : 3012356763u) ^ num * 3160732414u); continue; case 4u: return; } return; } } } void ICollection.CopyTo(Array array, int index) { Func<KeyValuePair<TKey, TValue>, DictionaryEntry> arg_20_1; if ((arg_20_1 = MapField<TKey, TValue>.__c.__9__43_0) == null) { arg_20_1 = (MapField<TKey, TValue>.__c.__9__43_0 = new Func<KeyValuePair<TKey, TValue>, DictionaryEntry>(MapField<TKey, TValue>.__c.__9.<System.Collections.ICollection.CopyTo>b__43_0)); } MapField<TKey, TValue>.smethod_8(this.Select(arg_20_1).ToList<DictionaryEntry>(), array, index); } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static Type smethod_1(Type type_0) { return Nullable.GetUnderlyingType(type_0); } static ArgumentException smethod_2(string string_0, string string_1) { return new ArgumentException(string_0, string_1); } static KeyNotFoundException smethod_3() { return new KeyNotFoundException(); } static bool smethod_4(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_5(IDisposable idisposable_0) { idisposable_0.Dispose(); } static StringBuilder smethod_6() { return new StringBuilder(); } static string smethod_7(object object_0) { return object_0.ToString(); } static void smethod_8(ICollection icollection_0, Array array_0, int int_0) { icollection_0.CopyTo(array_0, int_0); } } } <file_sep>/Bgs.Protocol.Account.V1/CacheExpireRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class CacheExpireRequest : IMessage<CacheExpireRequest>, IEquatable<CacheExpireRequest>, IDeepCloneable<CacheExpireRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CacheExpireRequest.__c __9 = new CacheExpireRequest.__c(); internal CacheExpireRequest cctor>b__34_0() { return new CacheExpireRequest(); } } private static readonly MessageParser<CacheExpireRequest> _parser = new MessageParser<CacheExpireRequest>(new Func<CacheExpireRequest>(CacheExpireRequest.__c.__9.<.cctor>b__34_0)); public const int AccountFieldNumber = 1; private static readonly FieldCodec<AccountId> _repeated_account_codec; private readonly RepeatedField<AccountId> account_ = new RepeatedField<AccountId>(); public const int GameAccountFieldNumber = 2; private static readonly FieldCodec<GameAccountHandle> _repeated_gameAccount_codec; private readonly RepeatedField<GameAccountHandle> gameAccount_ = new RepeatedField<GameAccountHandle>(); public const int EmailFieldNumber = 3; private static readonly FieldCodec<string> _repeated_email_codec; private readonly RepeatedField<string> email_ = new RepeatedField<string>(); public static MessageParser<CacheExpireRequest> Parser { get { return CacheExpireRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return CacheExpireRequest.Descriptor; } } public RepeatedField<AccountId> Account { get { return this.account_; } } public RepeatedField<GameAccountHandle> GameAccount { get { return this.gameAccount_; } } public RepeatedField<string> Email { get { return this.email_; } } public CacheExpireRequest() { } public CacheExpireRequest(CacheExpireRequest other) : this() { this.account_ = other.account_.Clone(); this.gameAccount_ = other.gameAccount_.Clone(); this.email_ = other.email_.Clone(); } public CacheExpireRequest Clone() { return new CacheExpireRequest(this); } public override bool Equals(object other) { return this.Equals(other as CacheExpireRequest); } public bool Equals(CacheExpireRequest other) { if (other == null) { goto IL_9F; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ 2028384481) % 11) { case 0: goto IL_9F; case 1: return false; case 2: goto IL_EF; case 3: arg_A9_0 = (this.gameAccount_.Equals(other.gameAccount_) ? 1865814090 : 458481699); continue; case 4: arg_A9_0 = (this.account_.Equals(other.account_) ? 572908074 : 1262552959); continue; case 5: return true; case 6: return false; case 8: return false; case 9: arg_A9_0 = ((!this.email_.Equals(other.email_)) ? 423094484 : 643782940); continue; case 10: return false; } break; } return true; IL_9F: arg_A9_0 = 152707476; goto IL_A4; IL_EF: arg_A9_0 = ((other == this) ? 1255467517 : 418096540); goto IL_A4; } public override int GetHashCode() { return 1 ^ CacheExpireRequest.smethod_0(this.account_) ^ CacheExpireRequest.smethod_0(this.gameAccount_) ^ CacheExpireRequest.smethod_0(this.email_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.account_.WriteTo(output, CacheExpireRequest._repeated_account_codec); while (true) { IL_5F: uint arg_47_0 = 2009168373u; while (true) { uint num; switch ((num = (arg_47_0 ^ 744888371u)) % 3u) { case 1u: this.gameAccount_.WriteTo(output, CacheExpireRequest._repeated_gameAccount_codec); this.email_.WriteTo(output, CacheExpireRequest._repeated_email_codec); arg_47_0 = (num * 2041371489u ^ 112111183u); continue; case 2u: goto IL_5F; } return; } } } public int CalculateSize() { return 0 + this.account_.CalculateSize(CacheExpireRequest._repeated_account_codec) + this.gameAccount_.CalculateSize(CacheExpireRequest._repeated_gameAccount_codec) + this.email_.CalculateSize(CacheExpireRequest._repeated_email_codec); } public void MergeFrom(CacheExpireRequest other) { if (other == null) { goto IL_36; } goto IL_60; uint arg_40_0; while (true) { IL_3B: uint num; switch ((num = (arg_40_0 ^ 985347829u)) % 5u) { case 0u: goto IL_60; case 1u: return; case 2u: goto IL_36; case 4u: this.gameAccount_.Add(other.gameAccount_); this.email_.Add(other.email_); arg_40_0 = (num * 4195713929u ^ 3886400169u); continue; } break; } return; IL_36: arg_40_0 = 842446299u; goto IL_3B; IL_60: this.account_.Add(other.account_); arg_40_0 = 350570168u; goto IL_3B; } public void MergeFrom(CodedInputStream input) { while (true) { IL_15D: uint num; uint arg_111_0 = ((num = input.ReadTag()) == 0u) ? 3169452622u : 2560659789u; while (true) { uint num2; switch ((num2 = (arg_111_0 ^ 3099243811u)) % 12u) { case 0u: arg_111_0 = (((num != 18u) ? 3546171126u : 4147258318u) ^ num2 * 2045544474u); continue; case 2u: arg_111_0 = 2560659789u; continue; case 3u: input.SkipLastField(); arg_111_0 = (num2 * 3004249600u ^ 2117010971u); continue; case 4u: arg_111_0 = (num2 * 4183521191u ^ 2240725661u); continue; case 5u: arg_111_0 = (((num == 26u) ? 2336081049u : 2185408393u) ^ num2 * 2140435021u); continue; case 6u: arg_111_0 = ((num == 10u) ? 2157730539u : 4164752979u); continue; case 7u: arg_111_0 = (num2 * 2970974849u ^ 3928661130u); continue; case 8u: this.account_.AddEntriesFrom(input, CacheExpireRequest._repeated_account_codec); arg_111_0 = 2894041365u; continue; case 9u: this.gameAccount_.AddEntriesFrom(input, CacheExpireRequest._repeated_gameAccount_codec); arg_111_0 = 3168111932u; continue; case 10u: goto IL_15D; case 11u: this.email_.AddEntriesFrom(input, CacheExpireRequest._repeated_email_codec); arg_111_0 = 2894041365u; continue; } return; } } } static CacheExpireRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 3682359432u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2877718046u)) % 3u) { case 0u: goto IL_57; case 1u: CacheExpireRequest._repeated_account_codec = FieldCodec.ForMessage<AccountId>(10u, AccountId.Parser); arg_3F_0 = (num * 4250555591u ^ 321158372u); continue; } goto Block_1; } } Block_1: CacheExpireRequest._repeated_gameAccount_codec = FieldCodec.ForMessage<GameAccountHandle>(18u, GameAccountHandle.Parser); CacheExpireRequest._repeated_email_codec = FieldCodec.ForString(26u); } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/RecentPlayer.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class RecentPlayer : IMessage<RecentPlayer>, IEquatable<RecentPlayer>, IDeepCloneable<RecentPlayer>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RecentPlayer.__c __9 = new RecentPlayer.__c(); internal RecentPlayer cctor>b__49_0() { return new RecentPlayer(); } } private static readonly MessageParser<RecentPlayer> _parser = new MessageParser<RecentPlayer>(new Func<RecentPlayer>(RecentPlayer.__c.__9.<.cctor>b__49_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int ProgramFieldNumber = 2; private string program_ = ""; public const int TimestampPlayedFieldNumber = 3; private ulong timestampPlayed_; public const int AttributesFieldNumber = 4; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attributes_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(34u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attributes_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int IdFieldNumber = 5; private uint id_; public const int CounterFieldNumber = 6; private uint counter_; public static MessageParser<RecentPlayer> Parser { get { return RecentPlayer._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return RecentPlayer.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public string Program { get { return this.program_; } set { this.program_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public ulong TimestampPlayed { get { return this.timestampPlayed_; } set { this.timestampPlayed_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attributes { get { return this.attributes_; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public uint Counter { get { return this.counter_; } set { this.counter_ = value; } } public RecentPlayer() { } public RecentPlayer(RecentPlayer other) : this() { this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); this.program_ = other.program_; this.timestampPlayed_ = other.timestampPlayed_; this.attributes_ = other.attributes_.Clone(); this.id_ = other.id_; this.counter_ = other.counter_; } public RecentPlayer Clone() { return new RecentPlayer(this); } public override bool Equals(object other) { return this.Equals(other as RecentPlayer); } public bool Equals(RecentPlayer other) { if (other == null) { goto IL_71; } goto IL_182; int arg_124_0; while (true) { IL_11F: switch ((arg_124_0 ^ 1528374495) % 17) { case 0: arg_124_0 = ((!this.attributes_.Equals(other.attributes_)) ? 2123096710 : 1236673159); continue; case 1: return false; case 2: arg_124_0 = ((this.Counter == other.Counter) ? 536516678 : 1095108825); continue; case 3: goto IL_182; case 4: return false; case 5: return false; case 6: return false; case 8: arg_124_0 = ((this.TimestampPlayed != other.TimestampPlayed) ? 1289880461 : 704382841); continue; case 9: return false; case 10: return true; case 11: return false; case 12: return false; case 13: arg_124_0 = (RecentPlayer.smethod_0(this.EntityId, other.EntityId) ? 1611040530 : 2101626143); continue; case 14: goto IL_71; case 15: arg_124_0 = ((this.Id != other.Id) ? 2085063803 : 1030343108); continue; case 16: arg_124_0 = (RecentPlayer.smethod_1(this.Program, other.Program) ? 1729473078 : 1102240289); continue; } break; } return true; IL_71: arg_124_0 = 2108094579; goto IL_11F; IL_182: arg_124_0 = ((other == this) ? 114652429 : 918467404); goto IL_11F; } public override int GetHashCode() { int num = 1; while (true) { IL_18B: uint arg_152_0 = 51874705u; while (true) { uint num2; switch ((num2 = (arg_152_0 ^ 1417904044u)) % 11u) { case 0u: num ^= this.Id.GetHashCode(); arg_152_0 = (num2 * 3209373693u ^ 1171646058u); continue; case 1u: num ^= this.TimestampPlayed.GetHashCode(); arg_152_0 = (num2 * 2468686814u ^ 3784275685u); continue; case 2u: num ^= this.Counter.GetHashCode(); arg_152_0 = (num2 * 709410214u ^ 2230761807u); continue; case 3u: arg_152_0 = (((RecentPlayer.smethod_3(this.Program) != 0) ? 1321284844u : 1910728777u) ^ num2 * 1385784450u); continue; case 4u: arg_152_0 = ((this.TimestampPlayed == 0uL) ? 1788260067u : 1669988481u); continue; case 5u: arg_152_0 = ((this.Counter != 0u) ? 1575946302u : 1096477667u); continue; case 6u: num ^= this.attributes_.GetHashCode(); arg_152_0 = ((this.Id == 0u) ? 2128522536u : 1625188678u); continue; case 8u: num ^= RecentPlayer.smethod_2(this.EntityId); arg_152_0 = (num2 * 1293404417u ^ 2349941943u); continue; case 9u: goto IL_18B; case 10u: num ^= RecentPlayer.smethod_2(this.Program); arg_152_0 = (num2 * 2759240439u ^ 2761570449u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.EntityId); while (true) { IL_1F6: uint arg_1AD_0 = 3842380095u; while (true) { uint num; switch ((num = (arg_1AD_0 ^ 3859340503u)) % 15u) { case 0u: output.WriteRawTag(45); arg_1AD_0 = (num * 1122453479u ^ 364703633u); continue; case 1u: output.WriteFixed32(this.Id); arg_1AD_0 = (num * 2177376469u ^ 3134857059u); continue; case 2u: arg_1AD_0 = ((this.TimestampPlayed != 0uL) ? 3589613257u : 3232084480u); continue; case 3u: arg_1AD_0 = ((this.Counter == 0u) ? 2271492671u : 2915362004u); continue; case 4u: arg_1AD_0 = (((RecentPlayer.smethod_3(this.Program) != 0) ? 3469559251u : 3586038133u) ^ num * 2432769214u); continue; case 5u: output.WriteFixed32(this.Counter); arg_1AD_0 = (num * 2568598246u ^ 1754301711u); continue; case 6u: goto IL_1F6; case 8u: output.WriteRawTag(53); arg_1AD_0 = (num * 1777853276u ^ 1353845451u); continue; case 9u: output.WriteString(this.Program); arg_1AD_0 = (num * 3116816295u ^ 2656556352u); continue; case 10u: arg_1AD_0 = (((this.Id != 0u) ? 966498935u : 1078246265u) ^ num * 2213851186u); continue; case 11u: this.attributes_.WriteTo(output, RecentPlayer._repeated_attributes_codec); arg_1AD_0 = 2744478648u; continue; case 12u: output.WriteRawTag(18); arg_1AD_0 = (num * 484315659u ^ 1010363800u); continue; case 13u: output.WriteFixed64(this.TimestampPlayed); arg_1AD_0 = (num * 1504205820u ^ 1045189476u); continue; case 14u: output.WriteRawTag(25); arg_1AD_0 = (num * 2437077524u ^ 254493224u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_16B: uint arg_132_0 = 4248073214u; while (true) { uint num2; switch ((num2 = (arg_132_0 ^ 2626976041u)) % 11u) { case 0u: num += 5; arg_132_0 = (num2 * 3408626564u ^ 624713925u); continue; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Program); arg_132_0 = (num2 * 3170625849u ^ 2913037788u); continue; case 2u: goto IL_16B; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_132_0 = (num2 * 2705715825u ^ 719601252u); continue; case 4u: arg_132_0 = ((this.TimestampPlayed != 0uL) ? 3095267635u : 2423629567u); continue; case 5u: arg_132_0 = ((this.Counter == 0u) ? 2777491101u : 3921411967u); continue; case 6u: arg_132_0 = (((RecentPlayer.smethod_3(this.Program) == 0) ? 643458575u : 1392808946u) ^ num2 * 2783636702u); continue; case 8u: num += 9; arg_132_0 = (num2 * 1277683194u ^ 526065051u); continue; case 9u: num += this.attributes_.CalculateSize(RecentPlayer._repeated_attributes_codec); arg_132_0 = ((this.Id != 0u) ? 4063614214u : 3193586484u); continue; case 10u: num += 5; arg_132_0 = (num2 * 3584757243u ^ 1929213473u); continue; } return num; } } return num; } public void MergeFrom(RecentPlayer other) { if (other == null) { goto IL_129; } goto IL_206; uint arg_1AA_0; while (true) { IL_1A5: uint num; switch ((num = (arg_1AA_0 ^ 320149970u)) % 16u) { case 0u: this.Program = other.Program; arg_1AA_0 = (num * 2272838418u ^ 4056778992u); continue; case 1u: arg_1AA_0 = ((other.Counter == 0u) ? 249147517u : 86267967u); continue; case 2u: arg_1AA_0 = ((other.TimestampPlayed != 0uL) ? 325507300u : 1614261710u); continue; case 3u: return; case 4u: this.entityId_ = new EntityId(); arg_1AA_0 = (num * 3075307735u ^ 1362203241u); continue; case 5u: goto IL_129; case 6u: this.TimestampPlayed = other.TimestampPlayed; arg_1AA_0 = (num * 3906875270u ^ 2580783498u); continue; case 7u: this.EntityId.MergeFrom(other.EntityId); arg_1AA_0 = 1799671995u; continue; case 8u: arg_1AA_0 = (((this.entityId_ == null) ? 4241575774u : 3676291645u) ^ num * 1824707637u); continue; case 9u: arg_1AA_0 = ((RecentPlayer.smethod_3(other.Program) != 0) ? 1097725074u : 787867248u); continue; case 10u: arg_1AA_0 = (((other.Id == 0u) ? 2591935009u : 3742175371u) ^ num * 4238873773u); continue; case 11u: this.Id = other.Id; arg_1AA_0 = (num * 1176469634u ^ 3767990197u); continue; case 12u: this.attributes_.Add(other.attributes_); arg_1AA_0 = 2133685240u; continue; case 13u: this.Counter = other.Counter; arg_1AA_0 = (num * 3655671729u ^ 601028512u); continue; case 14u: goto IL_206; } break; } return; IL_129: arg_1AA_0 = 335902673u; goto IL_1A5; IL_206: arg_1AA_0 = ((other.entityId_ == null) ? 1799671995u : 1954926506u); goto IL_1A5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2D0: uint num; uint arg_254_0 = ((num = input.ReadTag()) != 0u) ? 1379269688u : 832680804u; while (true) { uint num2; switch ((num2 = (arg_254_0 ^ 1787985161u)) % 24u) { case 0u: arg_254_0 = (num2 * 4134492851u ^ 1987169630u); continue; case 1u: this.Program = input.ReadString(); arg_254_0 = 706861194u; continue; case 2u: arg_254_0 = (((num != 45u) ? 94209562u : 2101094320u) ^ num2 * 2232627248u); continue; case 3u: this.entityId_ = new EntityId(); arg_254_0 = (num2 * 2992904187u ^ 3745653551u); continue; case 4u: this.Counter = input.ReadFixed32(); arg_254_0 = 1358714390u; continue; case 5u: arg_254_0 = (num2 * 1651914266u ^ 1064099244u); continue; case 6u: arg_254_0 = (((num == 25u) ? 3946446213u : 3887840884u) ^ num2 * 2112067812u); continue; case 7u: input.ReadMessage(this.entityId_); arg_254_0 = 1358714390u; continue; case 8u: this.attributes_.AddEntriesFrom(input, RecentPlayer._repeated_attributes_codec); arg_254_0 = 1358714390u; continue; case 9u: this.Id = input.ReadFixed32(); arg_254_0 = 1795671697u; continue; case 10u: arg_254_0 = ((this.entityId_ == null) ? 806203850u : 394095390u); continue; case 11u: arg_254_0 = (num2 * 1555171874u ^ 2509590384u); continue; case 12u: this.TimestampPlayed = input.ReadFixed64(); arg_254_0 = 182088108u; continue; case 14u: arg_254_0 = (num2 * 1698262046u ^ 3374941922u); continue; case 15u: input.SkipLastField(); arg_254_0 = 395855087u; continue; case 16u: arg_254_0 = ((num == 34u) ? 1611923993u : 416495643u); continue; case 17u: arg_254_0 = ((num > 25u) ? 853455777u : 1063608707u); continue; case 18u: arg_254_0 = (((num != 10u) ? 3961573507u : 3273210727u) ^ num2 * 3342328598u); continue; case 19u: arg_254_0 = (((num != 53u) ? 2575968661u : 3731063246u) ^ num2 * 3489808473u); continue; case 20u: arg_254_0 = 1379269688u; continue; case 21u: arg_254_0 = (num2 * 1652631990u ^ 3600301144u); continue; case 22u: arg_254_0 = (((num != 18u) ? 951480197u : 1123706106u) ^ num2 * 2010946351u); continue; case 23u: goto IL_2D0; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Account.V1/GetGameSessionInfoResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetGameSessionInfoResponse : IMessage<GetGameSessionInfoResponse>, IEquatable<GetGameSessionInfoResponse>, IDeepCloneable<GetGameSessionInfoResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetGameSessionInfoResponse.__c __9 = new GetGameSessionInfoResponse.__c(); internal GetGameSessionInfoResponse cctor>b__24_0() { return new GetGameSessionInfoResponse(); } } private static readonly MessageParser<GetGameSessionInfoResponse> _parser = new MessageParser<GetGameSessionInfoResponse>(new Func<GetGameSessionInfoResponse>(GetGameSessionInfoResponse.__c.__9.<.cctor>b__24_0)); public const int SessionInfoFieldNumber = 2; private GameSessionInfo sessionInfo_; public static MessageParser<GetGameSessionInfoResponse> Parser { get { return GetGameSessionInfoResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[20]; } } MessageDescriptor IMessage.Descriptor { get { return GetGameSessionInfoResponse.Descriptor; } } public GameSessionInfo SessionInfo { get { return this.sessionInfo_; } set { this.sessionInfo_ = value; } } public GetGameSessionInfoResponse() { } public GetGameSessionInfoResponse(GetGameSessionInfoResponse other) : this() { while (true) { IL_44: int arg_2E_0 = -1149408739; while (true) { switch ((arg_2E_0 ^ -837304154) % 3) { case 0: goto IL_44; case 1: this.SessionInfo = ((other.sessionInfo_ != null) ? other.SessionInfo.Clone() : null); arg_2E_0 = -287329346; continue; } return; } } } public GetGameSessionInfoResponse Clone() { return new GetGameSessionInfoResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetGameSessionInfoResponse); } public bool Equals(GetGameSessionInfoResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 774071892) % 7) { case 1: arg_48_0 = ((!GetGameSessionInfoResponse.smethod_0(this.SessionInfo, other.SessionInfo)) ? 837568973 : 137284689); continue; case 2: return false; case 3: return true; case 4: goto IL_7A; case 5: return false; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = 1740017153; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 1078868686 : 987075472); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 3524161766u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 2444975324u)) % 4u) { case 1u: num ^= GetGameSessionInfoResponse.smethod_1(this.SessionInfo); arg_4D_0 = (num2 * 2622892187u ^ 867431307u); continue; case 2u: arg_4D_0 = (((this.sessionInfo_ == null) ? 810359432u : 988662373u) ^ num2 * 2404589168u); continue; case 3u: goto IL_69; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.sessionInfo_ != null) { while (true) { IL_5B: uint arg_3F_0 = 2155718327u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2251071386u)) % 4u) { case 0u: goto IL_5B; case 1u: output.WriteRawTag(18); arg_3F_0 = (num * 1154671195u ^ 1260777099u); continue; case 2u: output.WriteMessage(this.SessionInfo); arg_3F_0 = (num * 3961980151u ^ 1526855739u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.sessionInfo_ != null) { while (true) { IL_46: uint arg_2E_0 = 998331941u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 39996306u)) % 3u) { case 0u: goto IL_46; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SessionInfo); arg_2E_0 = (num2 * 910116637u ^ 940230898u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(GetGameSessionInfoResponse other) { if (other == null) { goto IL_70; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 2310062949u)) % 7u) { case 1u: goto IL_B1; case 2u: return; case 3u: goto IL_70; case 4u: this.SessionInfo.MergeFrom(other.SessionInfo); arg_7A_0 = 2942680112u; continue; case 5u: arg_7A_0 = (((this.sessionInfo_ != null) ? 1905370475u : 278533951u) ^ num * 4270842110u); continue; case 6u: this.sessionInfo_ = new GameSessionInfo(); arg_7A_0 = (num * 676447517u ^ 3097312865u); continue; } break; } return; IL_70: arg_7A_0 = 4053134634u; goto IL_75; IL_B1: arg_7A_0 = ((other.sessionInfo_ == null) ? 2942680112u : 2584701872u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) == 0u) ? 4229433777u : 3151085554u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 2977955129u)) % 9u) { case 0u: this.sessionInfo_ = new GameSessionInfo(); arg_B3_0 = (num2 * 2265532613u ^ 991414316u); continue; case 1u: input.ReadMessage(this.sessionInfo_); arg_B3_0 = 2543542583u; continue; case 3u: arg_B3_0 = ((num != 18u) ? 3595292320u : 4068540691u); continue; case 4u: goto IL_F3; case 5u: input.SkipLastField(); arg_B3_0 = (num2 * 2867864367u ^ 3356863122u); continue; case 6u: arg_B3_0 = ((this.sessionInfo_ != null) ? 3943595190u : 2555501291u); continue; case 7u: arg_B3_0 = (num2 * 1965624523u ^ 1111471907u); continue; case 8u: arg_B3_0 = 3151085554u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Config/ProtocolAlias.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Config { [DebuggerNonUserCode] public sealed class ProtocolAlias : IMessage<ProtocolAlias>, IEquatable<ProtocolAlias>, IDeepCloneable<ProtocolAlias>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ProtocolAlias.__c __9 = new ProtocolAlias.__c(); internal ProtocolAlias cctor>b__29_0() { return new ProtocolAlias(); } } private static readonly MessageParser<ProtocolAlias> _parser = new MessageParser<ProtocolAlias>(new Func<ProtocolAlias>(ProtocolAlias.__c.__9.<.cctor>b__29_0)); public const int ServerServiceNameFieldNumber = 1; private string serverServiceName_ = ""; public const int ClientServiceNameFieldNumber = 2; private string clientServiceName_ = ""; public static MessageParser<ProtocolAlias> Parser { get { return ProtocolAlias._parser; } } public static MessageDescriptor Descriptor { get { return RpcConfigReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ProtocolAlias.Descriptor; } } public string ServerServiceName { get { return this.serverServiceName_; } set { this.serverServiceName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string ClientServiceName { get { return this.clientServiceName_; } set { this.clientServiceName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public ProtocolAlias() { } public ProtocolAlias(ProtocolAlias other) : this() { while (true) { IL_4A: uint arg_32_0 = 3918313472u; while (true) { uint num; switch ((num = (arg_32_0 ^ 3914080008u)) % 3u) { case 0u: goto IL_4A; case 1u: this.serverServiceName_ = other.serverServiceName_; this.clientServiceName_ = other.clientServiceName_; arg_32_0 = (num * 3281380951u ^ 1297065091u); continue; } return; } } } public ProtocolAlias Clone() { return new ProtocolAlias(this); } public override bool Equals(object other) { return this.Equals(other as ProtocolAlias); } public bool Equals(ProtocolAlias other) { if (other == null) { goto IL_41; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -633517360) % 9) { case 0: return true; case 1: goto IL_B5; case 2: arg_77_0 = (ProtocolAlias.smethod_0(this.ServerServiceName, other.ServerServiceName) ? -516080716 : -1086625289); continue; case 4: return false; case 5: return false; case 6: goto IL_41; case 7: arg_77_0 = ((!ProtocolAlias.smethod_0(this.ClientServiceName, other.ClientServiceName)) ? -771582068 : -1817700418); continue; case 8: return false; } break; } return true; IL_41: arg_77_0 = -286104845; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? -1892792212 : -1634641742); goto IL_72; } public override int GetHashCode() { return 1 ^ ProtocolAlias.smethod_1(this.ServerServiceName) ^ ProtocolAlias.smethod_1(this.ClientServiceName); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteString(this.ServerServiceName); while (true) { IL_48: uint arg_30_0 = 4077820895u; while (true) { uint num; switch ((num = (arg_30_0 ^ 2735186285u)) % 3u) { case 0u: goto IL_48; case 1u: output.WriteRawTag(18); arg_30_0 = (num * 169533437u ^ 3563548898u); continue; } goto Block_1; } } Block_1: output.WriteString(this.ClientServiceName); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeStringSize(this.ServerServiceName)) + (1 + CodedOutputStream.ComputeStringSize(this.ClientServiceName)); } public void MergeFrom(ProtocolAlias other) { if (other == null) { goto IL_15; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 1110768161u)) % 7u) { case 0u: this.ServerServiceName = other.ServerServiceName; arg_7B_0 = (num * 3160359261u ^ 3249303661u); continue; case 1u: goto IL_B2; case 3u: this.ClientServiceName = other.ClientServiceName; arg_7B_0 = (num * 4117471774u ^ 3660073377u); continue; case 4u: arg_7B_0 = ((ProtocolAlias.smethod_2(other.ClientServiceName) == 0) ? 2042397099u : 1469754250u); continue; case 5u: goto IL_15; case 6u: return; } break; } return; IL_15: arg_7B_0 = 1702317201u; goto IL_76; IL_B2: arg_7B_0 = ((ProtocolAlias.smethod_2(other.ServerServiceName) == 0) ? 1600124855u : 437771651u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DA: uint num; uint arg_9F_0 = ((num = input.ReadTag()) != 0u) ? 2462312898u : 2163840056u; while (true) { uint num2; switch ((num2 = (arg_9F_0 ^ 3872662923u)) % 8u) { case 0u: input.SkipLastField(); arg_9F_0 = (num2 * 2812179537u ^ 3346822767u); continue; case 1u: arg_9F_0 = ((num != 10u) ? 3397476253u : 4184542961u); continue; case 2u: this.ServerServiceName = input.ReadString(); arg_9F_0 = 3456930159u; continue; case 4u: goto IL_DA; case 5u: arg_9F_0 = 2462312898u; continue; case 6u: arg_9F_0 = (((num == 18u) ? 3407624064u : 3267351519u) ^ num2 * 411174974u); continue; case 7u: this.ClientServiceName = input.ReadString(); arg_9F_0 = 3456930159u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Channel.V1/SetRolesRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class SetRolesRequest : IMessage<SetRolesRequest>, IEquatable<SetRolesRequest>, IDeepCloneable<SetRolesRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SetRolesRequest.__c __9 = new SetRolesRequest.__c(); internal SetRolesRequest cctor>b__34_0() { return new SetRolesRequest(); } } private static readonly MessageParser<SetRolesRequest> _parser = new MessageParser<SetRolesRequest>(new Func<SetRolesRequest>(SetRolesRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int RoleFieldNumber = 2; private static readonly FieldCodec<uint> _repeated_role_codec = FieldCodec.ForUInt32(18u); private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public const int MemberIdFieldNumber = 3; private static readonly FieldCodec<EntityId> _repeated_memberId_codec; private readonly RepeatedField<EntityId> memberId_ = new RepeatedField<EntityId>(); public static MessageParser<SetRolesRequest> Parser { get { return SetRolesRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return SetRolesRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public RepeatedField<uint> Role { get { return this.role_; } } public RepeatedField<EntityId> MemberId { get { return this.memberId_; } } public SetRolesRequest() { } public SetRolesRequest(SetRolesRequest other) : this() { while (true) { IL_7B: uint arg_5F_0 = 781895752u; while (true) { uint num; switch ((num = (arg_5F_0 ^ 877321634u)) % 4u) { case 0u: goto IL_7B; case 2u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.role_ = other.role_.Clone(); arg_5F_0 = 1382756633u; continue; case 3u: this.memberId_ = other.memberId_.Clone(); arg_5F_0 = (num * 1834046031u ^ 3035217842u); continue; } return; } } } public SetRolesRequest Clone() { return new SetRolesRequest(this); } public override bool Equals(object other) { return this.Equals(other as SetRolesRequest); } public bool Equals(SetRolesRequest other) { if (other == null) { goto IL_70; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ 85955203) % 11) { case 0: return true; case 1: return false; case 2: arg_A6_0 = (this.memberId_.Equals(other.memberId_) ? 1919508408 : 394562714); continue; case 3: goto IL_70; case 4: arg_A6_0 = ((!this.role_.Equals(other.role_)) ? 543269519 : 938799742); continue; case 5: return false; case 6: arg_A6_0 = ((!SetRolesRequest.smethod_0(this.AgentId, other.AgentId)) ? 1058741792 : 230303641); continue; case 7: return false; case 8: goto IL_EC; case 9: return false; } break; } return true; IL_70: arg_A6_0 = 80222284; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? 715924587 : 650029716); goto IL_A1; } public override int GetHashCode() { int num = 1; while (true) { IL_93: uint arg_73_0 = 1802368596u; while (true) { uint num2; switch ((num2 = (arg_73_0 ^ 966552300u)) % 5u) { case 0u: goto IL_93; case 1u: num ^= SetRolesRequest.smethod_1(this.AgentId); arg_73_0 = (num2 * 1909906304u ^ 2063105828u); continue; case 3u: arg_73_0 = (((this.agentId_ != null) ? 303672985u : 1004195404u) ^ num2 * 2517870315u); continue; case 4u: num ^= SetRolesRequest.smethod_1(this.role_); num ^= SetRolesRequest.smethod_1(this.memberId_); arg_73_0 = 1432070184u; continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_3C; } goto IL_66; uint arg_46_0; while (true) { IL_41: uint num; switch ((num = (arg_46_0 ^ 3495495817u)) % 5u) { case 0u: goto IL_3C; case 1u: output.WriteMessage(this.AgentId); arg_46_0 = (num * 1757427712u ^ 2783557841u); continue; case 2u: goto IL_66; case 3u: output.WriteRawTag(10); arg_46_0 = (num * 4146018325u ^ 2332849515u); continue; } break; } this.memberId_.WriteTo(output, SetRolesRequest._repeated_memberId_codec); return; IL_3C: arg_46_0 = 2316006622u; goto IL_41; IL_66: this.role_.WriteTo(output, SetRolesRequest._repeated_role_codec); arg_46_0 = 2436246591u; goto IL_41; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_4D; } goto IL_77; uint arg_57_0; while (true) { IL_52: uint num2; switch ((num2 = (arg_57_0 ^ 410904078u)) % 5u) { case 0u: goto IL_4D; case 1u: goto IL_77; case 2u: num += this.memberId_.CalculateSize(SetRolesRequest._repeated_memberId_codec); arg_57_0 = (num2 * 814307774u ^ 1198353049u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_57_0 = (num2 * 4200848335u ^ 1421383023u); continue; } break; } return num; IL_4D: arg_57_0 = 21169734u; goto IL_52; IL_77: num += this.role_.CalculateSize(SetRolesRequest._repeated_role_codec); arg_57_0 = 1176230476u; goto IL_52; } public void MergeFrom(SetRolesRequest other) { if (other == null) { goto IL_18; } goto IL_E4; uint arg_A9_0; while (true) { IL_A4: uint num; switch ((num = (arg_A9_0 ^ 991983304u)) % 8u) { case 1u: return; case 2u: goto IL_E4; case 3u: this.AgentId.MergeFrom(other.AgentId); arg_A9_0 = 1651710596u; continue; case 4u: this.role_.Add(other.role_); this.memberId_.Add(other.memberId_); arg_A9_0 = 941535640u; continue; case 5u: this.agentId_ = new EntityId(); arg_A9_0 = (num * 597136101u ^ 513523586u); continue; case 6u: arg_A9_0 = (((this.agentId_ == null) ? 477747403u : 430751933u) ^ num * 1838486793u); continue; case 7u: goto IL_18; } break; } return; IL_18: arg_A9_0 = 1645392585u; goto IL_A4; IL_E4: arg_A9_0 = ((other.agentId_ != null) ? 1581203390u : 1651710596u); goto IL_A4; } public void MergeFrom(CodedInputStream input) { while (true) { IL_214: uint num; uint arg_1B0_0 = ((num = input.ReadTag()) == 0u) ? 3105069941u : 4137529155u; while (true) { uint num2; switch ((num2 = (arg_1B0_0 ^ 3830572680u)) % 18u) { case 0u: input.ReadMessage(this.agentId_); arg_1B0_0 = 2827131808u; continue; case 1u: arg_1B0_0 = (num2 * 700086856u ^ 1806788297u); continue; case 2u: arg_1B0_0 = ((num == 18u) ? 3682234304u : 3683150683u); continue; case 4u: arg_1B0_0 = ((this.agentId_ != null) ? 2605181488u : 4055084605u); continue; case 5u: goto IL_214; case 6u: input.SkipLastField(); arg_1B0_0 = 3576906999u; continue; case 7u: arg_1B0_0 = (num2 * 3287791289u ^ 3862041670u); continue; case 8u: arg_1B0_0 = (num2 * 25342230u ^ 1543953056u); continue; case 9u: arg_1B0_0 = 4137529155u; continue; case 10u: arg_1B0_0 = (((num != 16u) ? 3177591428u : 4071339528u) ^ num2 * 3999144638u); continue; case 11u: this.agentId_ = new EntityId(); arg_1B0_0 = (num2 * 2129137488u ^ 2286336416u); continue; case 12u: this.role_.AddEntriesFrom(input, SetRolesRequest._repeated_role_codec); arg_1B0_0 = 3593722089u; continue; case 13u: arg_1B0_0 = (((num != 10u) ? 3349281738u : 3202770274u) ^ num2 * 2115226678u); continue; case 14u: arg_1B0_0 = (num2 * 2640414335u ^ 2012390745u); continue; case 15u: arg_1B0_0 = ((num <= 16u) ? 3212594357u : 2550054518u); continue; case 16u: this.memberId_.AddEntriesFrom(input, SetRolesRequest._repeated_memberId_codec); arg_1B0_0 = 3009717121u; continue; case 17u: arg_1B0_0 = (((num != 26u) ? 3409277318u : 3258607788u) ^ num2 * 2958334282u); continue; } return; } } } static SetRolesRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_63: uint arg_4B_0 = 567032888u; while (true) { uint num; switch ((num = (arg_4B_0 ^ 1701842741u)) % 3u) { case 0u: goto IL_63; case 2u: SetRolesRequest._repeated_memberId_codec = FieldCodec.ForMessage<EntityId>(26u, EntityId.Parser); arg_4B_0 = (num * 549361061u ^ 1916087246u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants.Net/BnetServiceHash.cs using System; namespace Framework.Constants.Net { public enum BnetServiceHash : uint { Unknown, AccountService = 1658456209u, AuthenticationServerService = 233634817u, ChallengeService = 3686756121u, ChannelService = 3073563442u, ConnectionService = 1698982289u, FriendsService = 2749215165u, GameUtilitiesService = 1069623117u, PresenceService = 4194801407u, ReportService = 2091868617u, ResourcesService = 3971904954u, UserManagerService = 1041835658u } } <file_sep>/Google.Protobuf.Reflection/EnumValueDescriptorProto.cs using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class EnumValueDescriptorProto : IMessage, IMessage<EnumValueDescriptorProto>, IEquatable<EnumValueDescriptorProto>, IDeepCloneable<EnumValueDescriptorProto> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumValueDescriptorProto.__c __9 = new EnumValueDescriptorProto.__c(); internal EnumValueDescriptorProto cctor>b__34_0() { return new EnumValueDescriptorProto(); } } private static readonly MessageParser<EnumValueDescriptorProto> _parser = new MessageParser<EnumValueDescriptorProto>(new Func<EnumValueDescriptorProto>(EnumValueDescriptorProto.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int NumberFieldNumber = 2; private int number_; public const int OptionsFieldNumber = 3; private EnumValueOptions options_; public static MessageParser<EnumValueDescriptorProto> Parser { get { return EnumValueDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return EnumValueDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public int Number { get { return this.number_; } set { this.number_ = value; } } public EnumValueOptions Options { get { return this.options_; } set { this.options_ = value; } } public EnumValueDescriptorProto() { } public EnumValueDescriptorProto(EnumValueDescriptorProto other) : this() { this.name_ = other.name_; this.number_ = other.number_; this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public EnumValueDescriptorProto Clone() { return new EnumValueDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as EnumValueDescriptorProto); } public bool Equals(EnumValueDescriptorProto other) { if (other == null) { goto IL_70; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ 1840541157) % 11) { case 0: arg_A1_0 = ((this.Number == other.Number) ? 878094131 : 1415942322); continue; case 1: return false; case 3: return true; case 4: goto IL_70; case 5: return false; case 6: goto IL_E7; case 7: return false; case 8: arg_A1_0 = ((!EnumValueDescriptorProto.smethod_0(this.Name, other.Name)) ? 1665612210 : 1718659749); continue; case 9: return false; case 10: arg_A1_0 = ((!EnumValueDescriptorProto.smethod_1(this.Options, other.Options)) ? 46153982 : 710840577); continue; } break; } return true; IL_70: arg_A1_0 = 1734122711; goto IL_9C; IL_E7: arg_A1_0 = ((other != this) ? 1913856769 : 1190987048); goto IL_9C; } public override int GetHashCode() { int num = 1; if (EnumValueDescriptorProto.smethod_2(this.Name) != 0) { goto IL_61; } goto IL_E0; uint arg_A9_0; while (true) { IL_A4: uint num2; switch ((num2 = (arg_A9_0 ^ 3869885749u)) % 7u) { case 0u: goto IL_E0; case 1u: num ^= EnumValueDescriptorProto.smethod_3(this.Name); arg_A9_0 = (num2 * 2590166497u ^ 341871494u); continue; case 2u: arg_A9_0 = ((this.options_ == null) ? 3759999374u : 3673493719u); continue; case 3u: goto IL_61; case 5u: num ^= this.Number.GetHashCode(); arg_A9_0 = (num2 * 1618593041u ^ 3849097665u); continue; case 6u: num ^= this.Options.GetHashCode(); arg_A9_0 = (num2 * 280181554u ^ 1013962154u); continue; } break; } return num; IL_61: arg_A9_0 = 2643661025u; goto IL_A4; IL_E0: arg_A9_0 = ((this.Number != 0) ? 3134094060u : 3799657384u); goto IL_A4; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (EnumValueDescriptorProto.smethod_2(this.Name) != 0) { goto IL_89; } goto IL_ED; uint arg_B6_0; while (true) { IL_B1: uint num; switch ((num = (arg_B6_0 ^ 520154637u)) % 7u) { case 0u: goto IL_ED; case 1u: output.WriteRawTag(26); output.WriteMessage(this.Options); arg_B6_0 = (num * 2431476233u ^ 3352763537u); continue; case 2u: goto IL_89; case 3u: arg_B6_0 = ((this.options_ != null) ? 1993183563u : 1360484839u); continue; case 4u: output.WriteRawTag(10); output.WriteString(this.Name); arg_B6_0 = (num * 3642561847u ^ 3529179594u); continue; case 6u: output.WriteRawTag(16); output.WriteInt32(this.Number); arg_B6_0 = (num * 1381156763u ^ 3884862749u); continue; } break; } return; IL_89: arg_B6_0 = 1020624441u; goto IL_B1; IL_ED: arg_B6_0 = ((this.Number != 0) ? 1156662935u : 1027245603u); goto IL_B1; } public int CalculateSize() { int num = 0; while (true) { IL_109: uint arg_DD_0 = 2168626081u; while (true) { uint num2; switch ((num2 = (arg_DD_0 ^ 2623945568u)) % 8u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_DD_0 = (num2 * 3370437486u ^ 676259282u); continue; case 1u: arg_DD_0 = (((EnumValueDescriptorProto.smethod_2(this.Name) != 0) ? 2052658303u : 2079846117u) ^ num2 * 2102187495u); continue; case 2u: arg_DD_0 = ((this.Number != 0) ? 3718694383u : 3654143070u); continue; case 4u: goto IL_109; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_DD_0 = (num2 * 2637414206u ^ 4200534853u); continue; case 6u: arg_DD_0 = ((this.options_ != null) ? 3190361549u : 2620277667u); continue; case 7u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Number); arg_DD_0 = (num2 * 2144113274u ^ 3956740728u); continue; } return num; } } return num; } public void MergeFrom(EnumValueDescriptorProto other) { if (other == null) { goto IL_D6; } goto IL_149; uint arg_101_0; while (true) { IL_FC: uint num; switch ((num = (arg_101_0 ^ 2361033034u)) % 11u) { case 0u: arg_101_0 = ((other.options_ != null) ? 3326123077u : 3412493915u); continue; case 1u: return; case 2u: goto IL_149; case 3u: goto IL_D6; case 4u: this.Name = other.Name; arg_101_0 = (num * 2089651179u ^ 3023085377u); continue; case 5u: arg_101_0 = (((this.options_ == null) ? 351839920u : 521341363u) ^ num * 643450108u); continue; case 6u: this.options_ = new EnumValueOptions(); arg_101_0 = (num * 1050700606u ^ 3795732595u); continue; case 7u: this.Number = other.Number; arg_101_0 = (num * 301779362u ^ 469411551u); continue; case 9u: this.Options.MergeFrom(other.Options); arg_101_0 = 3412493915u; continue; case 10u: arg_101_0 = ((other.Number != 0) ? 2721343409u : 2821167881u); continue; } break; } return; IL_D6: arg_101_0 = 2678849780u; goto IL_FC; IL_149: arg_101_0 = ((EnumValueDescriptorProto.smethod_2(other.Name) != 0) ? 3366434421u : 3786634388u); goto IL_FC; } public void MergeFrom(CodedInputStream input) { while (true) { IL_197: uint num; uint arg_143_0 = ((num = input.ReadTag()) == 0u) ? 3153443074u : 4249859298u; while (true) { uint num2; switch ((num2 = (arg_143_0 ^ 3537903097u)) % 14u) { case 0u: goto IL_197; case 1u: arg_143_0 = ((num == 10u) ? 3562366876u : 2214760667u); continue; case 2u: arg_143_0 = (((num == 16u) ? 1468204330u : 1456427168u) ^ num2 * 913208907u); continue; case 3u: this.Number = input.ReadInt32(); arg_143_0 = 3746306851u; continue; case 4u: arg_143_0 = (num2 * 819669225u ^ 2810706061u); continue; case 5u: this.Name = input.ReadString(); arg_143_0 = 2683550779u; continue; case 6u: input.SkipLastField(); arg_143_0 = (num2 * 1037936867u ^ 1949640027u); continue; case 7u: input.ReadMessage(this.options_); arg_143_0 = 2829432039u; continue; case 8u: arg_143_0 = (num2 * 1279973656u ^ 2427267287u); continue; case 9u: arg_143_0 = (((num == 26u) ? 3118754930u : 2591917724u) ^ num2 * 1466250463u); continue; case 10u: arg_143_0 = ((this.options_ != null) ? 2531700482u : 3340471554u); continue; case 12u: arg_143_0 = 4249859298u; continue; case 13u: this.options_ = new EnumValueOptions(); arg_143_0 = (num2 * 1583626810u ^ 1392843228u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountStateNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountStateNotification : IMessage<AccountStateNotification>, IEquatable<AccountStateNotification>, IDeepCloneable<AccountStateNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountStateNotification.__c __9 = new AccountStateNotification.__c(); internal AccountStateNotification cctor>b__39_0() { return new AccountStateNotification(); } } private static readonly MessageParser<AccountStateNotification> _parser = new MessageParser<AccountStateNotification>(new Func<AccountStateNotification>(AccountStateNotification.__c.__9.<.cctor>b__39_0)); public const int AccountStateFieldNumber = 1; private AccountState accountState_; public const int SubscriberIdFieldNumber = 2; private ulong subscriberId_; public const int AccountTagsFieldNumber = 3; private AccountFieldTags accountTags_; public const int SubscriptionCompletedFieldNumber = 4; private bool subscriptionCompleted_; public static MessageParser<AccountStateNotification> Parser { get { return AccountStateNotification._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[28]; } } MessageDescriptor IMessage.Descriptor { get { return AccountStateNotification.Descriptor; } } public AccountState AccountState { get { return this.accountState_; } set { this.accountState_ = value; } } public ulong SubscriberId { get { return this.subscriberId_; } set { this.subscriberId_ = value; } } public AccountFieldTags AccountTags { get { return this.accountTags_; } set { this.accountTags_ = value; } } public bool SubscriptionCompleted { get { return this.subscriptionCompleted_; } set { this.subscriptionCompleted_ = value; } } public AccountStateNotification() { } public AccountStateNotification(AccountStateNotification other) : this() { this.AccountState = ((other.accountState_ != null) ? other.AccountState.Clone() : null); this.subscriberId_ = other.subscriberId_; this.AccountTags = ((other.accountTags_ != null) ? other.AccountTags.Clone() : null); this.subscriptionCompleted_ = other.subscriptionCompleted_; } public AccountStateNotification Clone() { return new AccountStateNotification(this); } public override bool Equals(object other) { return this.Equals(other as AccountStateNotification); } public bool Equals(AccountStateNotification other) { if (other == null) { goto IL_9A; } goto IL_119; int arg_CB_0; while (true) { IL_C6: switch ((arg_CB_0 ^ 1452135408) % 13) { case 0: return false; case 1: return false; case 3: arg_CB_0 = ((this.SubscriptionCompleted == other.SubscriptionCompleted) ? 1742642543 : 581831702); continue; case 4: goto IL_9A; case 5: return false; case 6: arg_CB_0 = ((this.SubscriberId != other.SubscriberId) ? 756797795 : 582408559); continue; case 7: return false; case 8: goto IL_119; case 9: arg_CB_0 = ((!AccountStateNotification.smethod_0(this.AccountTags, other.AccountTags)) ? 994499204 : 284106692); continue; case 10: return false; case 11: return true; case 12: arg_CB_0 = (AccountStateNotification.smethod_0(this.AccountState, other.AccountState) ? 370643992 : 196404214); continue; } break; } return true; IL_9A: arg_CB_0 = 288825684; goto IL_C6; IL_119: arg_CB_0 = ((other != this) ? 1262514694 : 2058962405); goto IL_C6; } public override int GetHashCode() { int num = 1; if (this.accountState_ != null) { goto IL_A7; } goto IL_12E; uint arg_EE_0; while (true) { IL_E9: uint num2; switch ((num2 = (arg_EE_0 ^ 3945840594u)) % 9u) { case 0u: num ^= this.SubscriptionCompleted.GetHashCode(); arg_EE_0 = (num2 * 4169425603u ^ 3608974799u); continue; case 1u: num ^= this.AccountTags.GetHashCode(); arg_EE_0 = (num2 * 717553154u ^ 3279084773u); continue; case 2u: goto IL_A7; case 3u: arg_EE_0 = ((this.accountTags_ == null) ? 3281005981u : 4049636206u); continue; case 4u: num ^= this.SubscriberId.GetHashCode(); arg_EE_0 = (num2 * 582009716u ^ 2379800686u); continue; case 5u: arg_EE_0 = ((!this.SubscriptionCompleted) ? 3581878932u : 3782303835u); continue; case 6u: num ^= AccountStateNotification.smethod_1(this.AccountState); arg_EE_0 = (num2 * 1776695801u ^ 2295715884u); continue; case 7u: goto IL_12E; } break; } return num; IL_A7: arg_EE_0 = 2856262181u; goto IL_E9; IL_12E: arg_EE_0 = ((this.SubscriberId != 0uL) ? 3660406937u : 4059541138u); goto IL_E9; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountState_ != null) { goto IL_37; } goto IL_167; uint arg_11F_0; while (true) { IL_11A: uint num; switch ((num = (arg_11F_0 ^ 1513452570u)) % 11u) { case 0u: output.WriteRawTag(26); arg_11F_0 = (num * 279821300u ^ 1174708322u); continue; case 1u: output.WriteRawTag(32); output.WriteBool(this.SubscriptionCompleted); arg_11F_0 = (num * 457200737u ^ 364285202u); continue; case 2u: output.WriteMessage(this.AccountTags); arg_11F_0 = (num * 1880528597u ^ 2917843365u); continue; case 3u: arg_11F_0 = ((!this.SubscriptionCompleted) ? 1570147826u : 1131469050u); continue; case 4u: output.WriteUInt64(this.SubscriberId); arg_11F_0 = (num * 2189331606u ^ 4174522102u); continue; case 5u: arg_11F_0 = ((this.accountTags_ != null) ? 412086990u : 1266604333u); continue; case 7u: output.WriteRawTag(10); output.WriteMessage(this.AccountState); arg_11F_0 = (num * 637165977u ^ 1083121398u); continue; case 8u: goto IL_37; case 9u: goto IL_167; case 10u: output.WriteRawTag(16); arg_11F_0 = (num * 2848001928u ^ 500124522u); continue; } break; } return; IL_37: arg_11F_0 = 1772919711u; goto IL_11A; IL_167: arg_11F_0 = ((this.SubscriberId != 0uL) ? 52608084u : 1607794422u); goto IL_11A; } public int CalculateSize() { int num = 0; while (true) { IL_144: uint arg_10F_0 = 1949496358u; while (true) { uint num2; switch ((num2 = (arg_10F_0 ^ 2093775157u)) % 10u) { case 0u: num += 2; arg_10F_0 = (num2 * 2136309919u ^ 3254634235u); continue; case 1u: arg_10F_0 = ((this.SubscriberId == 0uL) ? 745903250u : 1549691912u); continue; case 3u: arg_10F_0 = (this.SubscriptionCompleted ? 1332256519u : 48250869u); continue; case 4u: goto IL_144; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SubscriberId); arg_10F_0 = (num2 * 921164637u ^ 4180832955u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountState); arg_10F_0 = (num2 * 2231214604u ^ 3891119536u); continue; case 7u: arg_10F_0 = (((this.accountState_ != null) ? 3298709450u : 2214602119u) ^ num2 * 1292714157u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountTags); arg_10F_0 = (num2 * 3426270503u ^ 808338192u); continue; case 9u: arg_10F_0 = ((this.accountTags_ != null) ? 777673975u : 2030156190u); continue; } return num; } } return num; } public void MergeFrom(AccountStateNotification other) { if (other == null) { goto IL_17C; } goto IL_1DE; uint arg_186_0; while (true) { IL_181: uint num; switch ((num = (arg_186_0 ^ 2075045109u)) % 15u) { case 0u: goto IL_17C; case 1u: this.SubscriberId = other.SubscriberId; arg_186_0 = (num * 1010108156u ^ 53522516u); continue; case 2u: arg_186_0 = (((this.accountState_ == null) ? 2028768150u : 468603605u) ^ num * 3483307593u); continue; case 3u: this.AccountTags.MergeFrom(other.AccountTags); arg_186_0 = 1668156851u; continue; case 4u: goto IL_1DE; case 5u: this.accountState_ = new AccountState(); arg_186_0 = (num * 2523573847u ^ 581465600u); continue; case 6u: return; case 7u: arg_186_0 = ((other.accountTags_ != null) ? 1376422712u : 1668156851u); continue; case 8u: arg_186_0 = ((other.SubscriberId == 0uL) ? 770216484u : 689212049u); continue; case 9u: this.SubscriptionCompleted = other.SubscriptionCompleted; arg_186_0 = (num * 3648249310u ^ 2631901457u); continue; case 10u: this.accountTags_ = new AccountFieldTags(); arg_186_0 = (num * 1000350336u ^ 2676707039u); continue; case 12u: arg_186_0 = (other.SubscriptionCompleted ? 325231383u : 602832621u); continue; case 13u: this.AccountState.MergeFrom(other.AccountState); arg_186_0 = 1258050909u; continue; case 14u: arg_186_0 = (((this.accountTags_ != null) ? 409758817u : 1680933831u) ^ num * 3028481462u); continue; } break; } return; IL_17C: arg_186_0 = 631106623u; goto IL_181; IL_1DE: arg_186_0 = ((other.accountState_ == null) ? 1258050909u : 1197228611u); goto IL_181; } public void MergeFrom(CodedInputStream input) { while (true) { IL_241: uint num; uint arg_1D9_0 = ((num = input.ReadTag()) == 0u) ? 223718952u : 707723924u; while (true) { uint num2; switch ((num2 = (arg_1D9_0 ^ 786966814u)) % 19u) { case 0u: arg_1D9_0 = 707723924u; continue; case 1u: arg_1D9_0 = (((num != 16u) ? 2868602504u : 3686041317u) ^ num2 * 4265199524u); continue; case 2u: input.ReadMessage(this.accountTags_); arg_1D9_0 = 1537448205u; continue; case 3u: this.SubscriberId = input.ReadUInt64(); arg_1D9_0 = 565011238u; continue; case 4u: arg_1D9_0 = (num2 * 326853759u ^ 3805914699u); continue; case 5u: arg_1D9_0 = ((num == 26u) ? 1726827363u : 1726415958u); continue; case 6u: arg_1D9_0 = ((this.accountState_ == null) ? 1504343701u : 554284367u); continue; case 7u: arg_1D9_0 = (((num == 10u) ? 1070549462u : 593823753u) ^ num2 * 3415855201u); continue; case 9u: arg_1D9_0 = ((num <= 16u) ? 45972526u : 593337091u); continue; case 10u: this.accountState_ = new AccountState(); arg_1D9_0 = (num2 * 3969661894u ^ 3339148237u); continue; case 11u: arg_1D9_0 = (((num == 32u) ? 4273302797u : 2662990140u) ^ num2 * 1929849425u); continue; case 12u: this.accountTags_ = new AccountFieldTags(); arg_1D9_0 = (num2 * 3728087481u ^ 2892175646u); continue; case 13u: goto IL_241; case 14u: arg_1D9_0 = (num2 * 3290339208u ^ 2738424996u); continue; case 15u: this.SubscriptionCompleted = input.ReadBool(); arg_1D9_0 = 565011238u; continue; case 16u: arg_1D9_0 = ((this.accountTags_ == null) ? 1571736044u : 626993660u); continue; case 17u: input.ReadMessage(this.accountState_); arg_1D9_0 = 565011238u; continue; case 18u: input.SkipLastField(); arg_1D9_0 = 565011238u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/FieldOperation.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class FieldOperation : IMessage<FieldOperation>, IEquatable<FieldOperation>, IDeepCloneable<FieldOperation>, IMessage { [DebuggerNonUserCode] public static class Types { public enum OperationType { SET, CLEAR } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldOperation.__c __9 = new FieldOperation.__c(); internal FieldOperation cctor>b__30_0() { return new FieldOperation(); } } private static readonly MessageParser<FieldOperation> _parser = new MessageParser<FieldOperation>(new Func<FieldOperation>(FieldOperation.__c.__9.<.cctor>b__30_0)); public const int FieldFieldNumber = 1; private Field field_; public const int OperationFieldNumber = 2; private FieldOperation.Types.OperationType operation_; public static MessageParser<FieldOperation> Parser { get { return FieldOperation._parser; } } public static MessageDescriptor Descriptor { get { return PresenceTypesReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return FieldOperation.Descriptor; } } public Field Field { get { return this.field_; } set { this.field_ = value; } } public FieldOperation.Types.OperationType Operation { get { return this.operation_; } set { this.operation_ = value; } } public FieldOperation() { } public FieldOperation(FieldOperation other) : this() { while (true) { IL_44: int arg_2E_0 = 792048638; while (true) { switch ((arg_2E_0 ^ 279942385) % 3) { case 0: goto IL_44; case 1: this.Field = ((other.field_ != null) ? other.Field.Clone() : null); arg_2E_0 = 434642937; continue; } goto Block_2; } } Block_2: this.operation_ = other.operation_; } public FieldOperation Clone() { return new FieldOperation(this); } public override bool Equals(object other) { return this.Equals(other as FieldOperation); } public bool Equals(FieldOperation other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -1364698782) % 9) { case 0: goto IL_68; case 1: return false; case 2: return false; case 3: arg_72_0 = ((!FieldOperation.smethod_0(this.Field, other.Field)) ? -1694221359 : -1827282237); continue; case 4: goto IL_B0; case 5: return true; case 6: return false; case 7: arg_72_0 = ((this.Operation == other.Operation) ? -1421417736 : -902022713); continue; } break; } return true; IL_68: arg_72_0 = -1828527938; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? -1401101305 : -1349094892); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.field_ != null) { goto IL_1C; } goto IL_95; uint arg_69_0; while (true) { IL_64: uint num2; switch ((num2 = (arg_69_0 ^ 1873885475u)) % 5u) { case 0u: goto IL_95; case 1u: num ^= FieldOperation.smethod_1(this.Field); arg_69_0 = (num2 * 1344886881u ^ 433652895u); continue; case 2u: num ^= this.Operation.GetHashCode(); arg_69_0 = (num2 * 2457124083u ^ 3655143396u); continue; case 3u: goto IL_1C; } break; } return num; IL_1C: arg_69_0 = 1401975424u; goto IL_64; IL_95: arg_69_0 = ((this.Operation != FieldOperation.Types.OperationType.SET) ? 1645487698u : 836426663u); goto IL_64; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.field_ != null) { goto IL_6F; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 1819362836u)) % 6u) { case 0u: goto IL_6F; case 1u: output.WriteEnum((int)this.Operation); arg_79_0 = (num * 1383902254u ^ 1847120498u); continue; case 2u: output.WriteRawTag(16); arg_79_0 = (num * 1805371482u ^ 2491418039u); continue; case 3u: goto IL_AC; case 5u: output.WriteRawTag(10); output.WriteMessage(this.Field); arg_79_0 = (num * 1392217118u ^ 994341101u); continue; } break; } return; IL_6F: arg_79_0 = 1456141589u; goto IL_74; IL_AC: arg_79_0 = ((this.Operation != FieldOperation.Types.OperationType.SET) ? 1317239346u : 772319136u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 435474633u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 321161722u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Field); arg_92_0 = (num2 * 2551021771u ^ 2596119188u); continue; case 1u: arg_92_0 = (((this.field_ != null) ? 3816497794u : 3273134788u) ^ num2 * 1955878028u); continue; case 2u: arg_92_0 = ((this.Operation != FieldOperation.Types.OperationType.SET) ? 126196643u : 495229763u); continue; case 3u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Operation); arg_92_0 = (num2 * 1787907356u ^ 4010761727u); continue; case 4u: goto IL_B6; } return num; } } return num; } public void MergeFrom(FieldOperation other) { if (other == null) { goto IL_B5; } goto IL_FF; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 3077115569u)) % 9u) { case 0u: goto IL_B5; case 1u: arg_BF_0 = ((other.Operation != FieldOperation.Types.OperationType.SET) ? 2240675928u : 3387827426u); continue; case 2u: arg_BF_0 = (((this.field_ != null) ? 3679974538u : 3006596628u) ^ num * 1693189795u); continue; case 3u: this.Operation = other.Operation; arg_BF_0 = (num * 3736260364u ^ 1779121422u); continue; case 4u: this.field_ = new Field(); arg_BF_0 = (num * 2846617018u ^ 3061706463u); continue; case 5u: goto IL_FF; case 6u: return; case 7u: this.Field.MergeFrom(other.Field); arg_BF_0 = 3824244900u; continue; } break; } return; IL_B5: arg_BF_0 = 3573181412u; goto IL_BA; IL_FF: arg_BF_0 = ((other.field_ == null) ? 3824244900u : 3172937142u); goto IL_BA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13A: uint num; uint arg_F2_0 = ((num = input.ReadTag()) != 0u) ? 554946449u : 1318784839u; while (true) { uint num2; switch ((num2 = (arg_F2_0 ^ 1226781366u)) % 11u) { case 0u: arg_F2_0 = 554946449u; continue; case 1u: this.field_ = new Field(); arg_F2_0 = (num2 * 1429008446u ^ 4210447663u); continue; case 2u: input.SkipLastField(); arg_F2_0 = (num2 * 3967077280u ^ 3786076113u); continue; case 3u: arg_F2_0 = ((this.field_ == null) ? 2119586572u : 1202347555u); continue; case 4u: arg_F2_0 = (((num != 16u) ? 949926187u : 1513085884u) ^ num2 * 2332716175u); continue; case 5u: input.ReadMessage(this.field_); arg_F2_0 = 1330177293u; continue; case 6u: goto IL_13A; case 7u: arg_F2_0 = ((num == 10u) ? 277593767u : 13730100u); continue; case 9u: this.operation_ = (FieldOperation.Types.OperationType)input.ReadEnum(); arg_F2_0 = 1330177293u; continue; case 10u: arg_F2_0 = (num2 * 706034641u ^ 1025138490u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.WorldEntities/SpellMethods.cs using System; using System.Collections.Generic; namespace AuthServer.Game.WorldEntities { public static class SpellMethods { public static PlayerSpell FindPlayerSpell(this List<PlayerSpell> SpellList, uint spellId) { return SpellList.Find((PlayerSpell p) => p.SpellId == spellId); } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountFieldOptions.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountFieldOptions : IMessage<GameAccountFieldOptions>, IEquatable<GameAccountFieldOptions>, IDeepCloneable<GameAccountFieldOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountFieldOptions.__c __9 = new GameAccountFieldOptions.__c(); internal GameAccountFieldOptions cctor>b__44_0() { return new GameAccountFieldOptions(); } } private static readonly MessageParser<GameAccountFieldOptions> _parser = new MessageParser<GameAccountFieldOptions>(new Func<GameAccountFieldOptions>(GameAccountFieldOptions.__c.__9.<.cctor>b__44_0)); public const int AllFieldsFieldNumber = 1; private bool allFields_; public const int FieldGameLevelInfoFieldNumber = 2; private bool fieldGameLevelInfo_; public const int FieldGameTimeInfoFieldNumber = 3; private bool fieldGameTimeInfo_; public const int FieldGameStatusFieldNumber = 4; private bool fieldGameStatus_; public const int FieldRafInfoFieldNumber = 5; private bool fieldRafInfo_; public static MessageParser<GameAccountFieldOptions> Parser { get { return GameAccountFieldOptions._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[16]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountFieldOptions.Descriptor; } } public bool AllFields { get { return this.allFields_; } set { this.allFields_ = value; } } public bool FieldGameLevelInfo { get { return this.fieldGameLevelInfo_; } set { this.fieldGameLevelInfo_ = value; } } public bool FieldGameTimeInfo { get { return this.fieldGameTimeInfo_; } set { this.fieldGameTimeInfo_ = value; } } public bool FieldGameStatus { get { return this.fieldGameStatus_; } set { this.fieldGameStatus_ = value; } } public bool FieldRafInfo { get { return this.fieldRafInfo_; } set { this.fieldRafInfo_ = value; } } public GameAccountFieldOptions() { } public GameAccountFieldOptions(GameAccountFieldOptions other) : this() { while (true) { IL_75: uint arg_59_0 = 3904285803u; while (true) { uint num; switch ((num = (arg_59_0 ^ 4190169394u)) % 4u) { case 0u: this.fieldGameLevelInfo_ = other.fieldGameLevelInfo_; this.fieldGameTimeInfo_ = other.fieldGameTimeInfo_; this.fieldGameStatus_ = other.fieldGameStatus_; arg_59_0 = (num * 3637457542u ^ 936607977u); continue; case 1u: this.allFields_ = other.allFields_; arg_59_0 = (num * 3164237577u ^ 1337552515u); continue; case 2u: goto IL_75; } goto Block_1; } } Block_1: this.fieldRafInfo_ = other.fieldRafInfo_; } public GameAccountFieldOptions Clone() { return new GameAccountFieldOptions(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountFieldOptions); } public bool Equals(GameAccountFieldOptions other) { if (other == null) { goto IL_93; } goto IL_141; int arg_EB_0; while (true) { IL_E6: switch ((arg_EB_0 ^ -1912299886) % 15) { case 0: return false; case 1: arg_EB_0 = ((this.FieldGameStatus != other.FieldGameStatus) ? -61864194 : -2028051094); continue; case 2: arg_EB_0 = ((this.FieldGameLevelInfo == other.FieldGameLevelInfo) ? -995940015 : -1161243802); continue; case 3: goto IL_93; case 4: arg_EB_0 = ((this.FieldGameTimeInfo != other.FieldGameTimeInfo) ? -1911197514 : -1017819570); continue; case 5: return false; case 6: return false; case 7: return false; case 8: return false; case 9: arg_EB_0 = ((this.FieldRafInfo != other.FieldRafInfo) ? -1041299901 : -1664507645); continue; case 10: return false; case 12: arg_EB_0 = ((this.AllFields == other.AllFields) ? -947360478 : -2158724); continue; case 13: goto IL_141; case 14: return true; } break; } return true; IL_93: arg_EB_0 = -1225373837; goto IL_E6; IL_141: arg_EB_0 = ((other != this) ? -1991681891 : -621879240); goto IL_E6; } public override int GetHashCode() { int num = 1; while (true) { IL_1A6: uint arg_169_0 = 2929957589u; while (true) { uint num2; switch ((num2 = (arg_169_0 ^ 2716006456u)) % 12u) { case 0u: num ^= this.FieldRafInfo.GetHashCode(); arg_169_0 = (num2 * 1807058915u ^ 3522538615u); continue; case 1u: arg_169_0 = (((!this.AllFields) ? 2023232668u : 1544234242u) ^ num2 * 2757837018u); continue; case 2u: num ^= this.FieldGameLevelInfo.GetHashCode(); arg_169_0 = (num2 * 3526971120u ^ 2244546223u); continue; case 3u: arg_169_0 = ((!this.FieldGameStatus) ? 2292821561u : 3020221724u); continue; case 4u: num ^= this.AllFields.GetHashCode(); arg_169_0 = (num2 * 3186402066u ^ 2846056734u); continue; case 5u: arg_169_0 = (this.FieldRafInfo ? 3116161360u : 2221464399u); continue; case 6u: goto IL_1A6; case 7u: arg_169_0 = ((!this.FieldGameTimeInfo) ? 3186265595u : 3505474525u); continue; case 8u: num ^= this.FieldGameStatus.GetHashCode(); arg_169_0 = (num2 * 739556763u ^ 2115227381u); continue; case 9u: num ^= this.FieldGameTimeInfo.GetHashCode(); arg_169_0 = (num2 * 1986520250u ^ 507585945u); continue; case 10u: arg_169_0 = (this.FieldGameLevelInfo ? 2814631738u : 2845844303u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.AllFields) { goto IL_161; } goto IL_1BB; uint arg_16B_0; while (true) { IL_166: uint num; switch ((num = (arg_16B_0 ^ 768326284u)) % 13u) { case 0u: goto IL_161; case 1u: arg_16B_0 = (this.FieldGameTimeInfo ? 1431796129u : 1804791325u); continue; case 2u: arg_16B_0 = (this.FieldRafInfo ? 432802945u : 1972059978u); continue; case 3u: arg_16B_0 = ((!this.FieldGameStatus) ? 492918527u : 726769156u); continue; case 4u: output.WriteBool(this.FieldGameLevelInfo); arg_16B_0 = (num * 319336391u ^ 3104763588u); continue; case 5u: output.WriteRawTag(32); output.WriteBool(this.FieldGameStatus); arg_16B_0 = (num * 4127560875u ^ 4057747495u); continue; case 6u: output.WriteRawTag(8); output.WriteBool(this.AllFields); arg_16B_0 = (num * 2197544760u ^ 1151921920u); continue; case 7u: output.WriteRawTag(16); arg_16B_0 = (num * 2581565360u ^ 2470230612u); continue; case 8u: output.WriteRawTag(40); output.WriteBool(this.FieldRafInfo); arg_16B_0 = (num * 2700471457u ^ 1519732071u); continue; case 9u: output.WriteRawTag(24); arg_16B_0 = (num * 733387183u ^ 1015806409u); continue; case 10u: output.WriteBool(this.FieldGameTimeInfo); arg_16B_0 = (num * 3274871479u ^ 2226491095u); continue; case 12u: goto IL_1BB; } break; } return; IL_161: arg_16B_0 = 1362941348u; goto IL_166; IL_1BB: arg_16B_0 = (this.FieldGameLevelInfo ? 919024471u : 24609340u); goto IL_166; } public int CalculateSize() { int num = 0; if (this.AllFields) { goto IL_1F; } goto IL_13C; uint arg_F4_0; while (true) { IL_EF: uint num2; switch ((num2 = (arg_F4_0 ^ 4205897665u)) % 11u) { case 0u: arg_F4_0 = ((!this.FieldGameStatus) ? 2979264677u : 3043936040u); continue; case 1u: goto IL_13C; case 2u: num += 2; arg_F4_0 = (num2 * 2105455401u ^ 3297090261u); continue; case 3u: arg_F4_0 = ((!this.FieldRafInfo) ? 3810452673u : 3694964841u); continue; case 4u: num += 2; arg_F4_0 = (num2 * 3930603953u ^ 1134374377u); continue; case 5u: num += 2; arg_F4_0 = (num2 * 3443409601u ^ 3119716620u); continue; case 7u: arg_F4_0 = (this.FieldGameTimeInfo ? 3198161031u : 2206550573u); continue; case 8u: num += 2; arg_F4_0 = (num2 * 999954021u ^ 2978535603u); continue; case 9u: num += 2; arg_F4_0 = (num2 * 1106558024u ^ 4175881089u); continue; case 10u: goto IL_1F; } break; } return num; IL_1F: arg_F4_0 = 4100285184u; goto IL_EF; IL_13C: arg_F4_0 = ((!this.FieldGameLevelInfo) ? 3640711947u : 3481988163u); goto IL_EF; } public void MergeFrom(GameAccountFieldOptions other) { if (other == null) { goto IL_E1; } goto IL_18C; uint arg_13C_0; while (true) { IL_137: uint num; switch ((num = (arg_13C_0 ^ 1341785072u)) % 13u) { case 0u: this.FieldRafInfo = other.FieldRafInfo; arg_13C_0 = (num * 1667212998u ^ 2844134137u); continue; case 1u: this.AllFields = other.AllFields; arg_13C_0 = (num * 3776997741u ^ 578204068u); continue; case 2u: this.FieldGameTimeInfo = other.FieldGameTimeInfo; arg_13C_0 = (num * 3252739106u ^ 428792486u); continue; case 3u: return; case 4u: goto IL_E1; case 6u: this.FieldGameLevelInfo = other.FieldGameLevelInfo; arg_13C_0 = (num * 2666669854u ^ 3196271171u); continue; case 7u: arg_13C_0 = (other.FieldGameStatus ? 1182244206u : 1774513244u); continue; case 8u: goto IL_18C; case 9u: arg_13C_0 = ((!other.FieldGameLevelInfo) ? 571147813u : 1637821165u); continue; case 10u: this.FieldGameStatus = other.FieldGameStatus; arg_13C_0 = (num * 4010449675u ^ 3046086294u); continue; case 11u: arg_13C_0 = (other.FieldGameTimeInfo ? 662051285u : 402497100u); continue; case 12u: arg_13C_0 = (other.FieldRafInfo ? 435569072u : 2142680953u); continue; } break; } return; IL_E1: arg_13C_0 = 282458111u; goto IL_137; IL_18C: arg_13C_0 = (other.AllFields ? 1840234999u : 277793375u); goto IL_137; } public void MergeFrom(CodedInputStream input) { while (true) { IL_227: uint num; uint arg_1BF_0 = ((num = input.ReadTag()) == 0u) ? 2688741484u : 3179296000u; while (true) { uint num2; switch ((num2 = (arg_1BF_0 ^ 4208370289u)) % 19u) { case 0u: arg_1BF_0 = (((num == 32u) ? 4027907946u : 2851179153u) ^ num2 * 3231878226u); continue; case 1u: arg_1BF_0 = ((num == 24u) ? 3512089590u : 2421918883u); continue; case 2u: this.FieldGameTimeInfo = input.ReadBool(); arg_1BF_0 = 3228861468u; continue; case 3u: arg_1BF_0 = (((num != 16u) ? 214184092u : 1459194655u) ^ num2 * 2083810325u); continue; case 4u: this.FieldGameStatus = input.ReadBool(); arg_1BF_0 = 4272189361u; continue; case 5u: arg_1BF_0 = ((num <= 16u) ? 2962275318u : 4068959392u); continue; case 6u: arg_1BF_0 = (num2 * 3580467876u ^ 3168447646u); continue; case 7u: this.AllFields = input.ReadBool(); arg_1BF_0 = 3228861468u; continue; case 8u: arg_1BF_0 = 3179296000u; continue; case 10u: this.FieldRafInfo = input.ReadBool(); arg_1BF_0 = 3228861468u; continue; case 11u: arg_1BF_0 = (((num == 40u) ? 602466759u : 1559370102u) ^ num2 * 2895268378u); continue; case 12u: arg_1BF_0 = (((num == 8u) ? 1568275512u : 2145505232u) ^ num2 * 1513703192u); continue; case 13u: arg_1BF_0 = (num2 * 3347123473u ^ 3450269148u); continue; case 14u: goto IL_227; case 15u: arg_1BF_0 = (num2 * 2934932377u ^ 2402165224u); continue; case 16u: input.SkipLastField(); arg_1BF_0 = 2370469008u; continue; case 17u: arg_1BF_0 = (num2 * 2091408256u ^ 287698844u); continue; case 18u: this.FieldGameLevelInfo = input.ReadBool(); arg_1BF_0 = 3029642341u; continue; } return; } } } } } <file_sep>/Bgs.Protocol/FieldOptionsReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class FieldOptionsReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return FieldOptionsReflection.descriptor; } } static FieldOptionsReflection() { FieldOptionsReflection.descriptor = FileDescriptor.FromGeneratedCode(FieldOptionsReflection.smethod_1(FieldOptionsReflection.smethod_0(new string[] { Module.smethod_33<string>(1360912256u), Module.smethod_33<string>(3099317776u), Module.smethod_34<string>(3545387972u), Module.smethod_33<string>(644849008u), Module.smethod_33<string>(4019567040u) })), new FileDescriptor[] { FileDescriptor.DescriptorProtoFileDescriptor }, new GeneratedCodeInfo(new Type[] { FieldOptionsReflection.smethod_2(typeof(LogOption).TypeHandle) }, null)); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/AuthServer.Network/WorldClass.cs using AuthServer.Game.Entities; using AuthServer.Game.PacketHandler; using AuthServer.Game.Packets.PacketHandler; using AuthServer.WorldServer.Game.Packets; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Cryptography.WoW; using Framework.Database.Auth.Entities; using Framework.Logging; using Framework.Misc; using Framework.Network.Packets; using System; using System.Collections; using System.IO; using System.IO.Compression; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; namespace AuthServer.Network { public sealed class WorldClass : IDisposable { public static WorldNetwork world; public Socket clientSocket; public Queue PacketQueue; public WoWCrypt Crypt; private byte[] DataBuffer; public bool initiated; public Account Account { get; set; } public Character Character { get; set; } public WorldClass() { while (true) { IL_42: uint arg_2A_0 = 182109382u; while (true) { uint num; switch ((num = (arg_2A_0 ^ 516975182u)) % 3u) { case 0u: goto IL_42; case 1u: this.DataBuffer = new byte[8192]; arg_2A_0 = (num * 3173822914u ^ 4165667664u); continue; } goto Block_1; } } Block_1: this.PacketQueue = WorldClass.smethod_0(); this.Crypt = new WoWCrypt(); } public void OnData() { PacketReader packetReader = null; while (true) { IL_FB: uint arg_D3_0 = 1616354313u; while (true) { uint num; switch ((num = (arg_D3_0 ^ 2111674241u)) % 7u) { case 0u: arg_D3_0 = (num * 2069654396u ^ 1403410597u); continue; case 2u: arg_D3_0 = (((WorldClass.smethod_1(this.PacketQueue) > 0) ? 3604674588u : 3317756979u) ^ num * 4268029870u); continue; case 3u: goto IL_FB; case 4u: packetReader = new PacketReader(this.DataBuffer, false, this.initiated); arg_D3_0 = 2040588781u; continue; case 5u: WorldClass.smethod_6(WorldClass.smethod_4((IPEndPoint)WorldClass.smethod_3(this.clientSocket)), Module.smethod_35<string>(2164558557u), WorldClass.smethod_5((IPEndPoint)WorldClass.smethod_3(this.clientSocket))); PacketManager.InvokeHandler(ref packetReader, this); arg_D3_0 = 897637803u; continue; case 6u: packetReader = (PacketReader)WorldClass.smethod_2(this.PacketQueue); arg_D3_0 = (num * 1511168572u ^ 2447408611u); continue; } return; } } } public void OnConnect() { PacketWriter arg_2E_0 = new PacketWriter(); WorldClass.smethod_7(this.clientSocket, this.DataBuffer, 0, this.DataBuffer.Length, SocketFlags.None, new AsyncCallback(this.Receive), null); arg_2E_0.WriteString(Module.smethod_37<string>(1753682996u), true); byte[] array = arg_2E_0.ReadDataToSend(true).Concat(new byte[] { 10 }).ToArray<byte>(); while (true) { IL_99: uint arg_81_0 = 2467266083u; while (true) { uint num; switch ((num = (arg_81_0 ^ 3013151267u)) % 3u) { case 0u: goto IL_99; case 1u: WorldClass.smethod_8(this.clientSocket, array, 0, array.Length, SocketFlags.None); arg_81_0 = (num * 4049714595u ^ 726147954u); continue; } return; } } } public void Receive(IAsyncResult result) { try { int num = WorldClass.smethod_9(this.clientSocket, result); while (true) { IL_303: uint arg_2A1_0 = 2144244013u; while (true) { uint num2; switch ((num2 = (arg_2A1_0 ^ 2097752605u)) % 21u) { case 0u: arg_2A1_0 = (((this.DataBuffer[0] == 10) ? 3516801827u : 2700854910u) ^ num2 * 2847739512u); continue; case 1u: this.OnData(); arg_2A1_0 = 1349214829u; continue; case 2u: { PacketReader packetReader = new PacketReader(WorldClass.smethod_11(WorldClass.smethod_10(), Module.smethod_36<string>(3253257661u)), false, false); arg_2A1_0 = 1263277281u; continue; } case 3u: this.Decode(ref this.DataBuffer); arg_2A1_0 = 337671581u; continue; case 4u: goto IL_303; case 5u: { byte[] array; int num3; WorldClass.smethod_13(this.DataBuffer, 0, array, 0, num3); arg_2A1_0 = (num2 * 916870607u ^ 1297900287u); continue; } case 6u: arg_2A1_0 = ((num <= 0) ? 194039135u : 1722859564u); continue; case 7u: arg_2A1_0 = (num2 * 2848342300u ^ 737308501u); continue; case 8u: arg_2A1_0 = (num2 * 1649544107u ^ 2180403397u); continue; case 9u: { int num3 = (int)(WorldClass.smethod_12(this.DataBuffer, 0) + 4); arg_2A1_0 = (num2 * 766592189u ^ 1651164332u); continue; } case 10u: arg_2A1_0 = ((!this.Crypt.IsInitialized) ? 1207177178u : 1132968486u); continue; case 11u: arg_2A1_0 = (((num == 1) ? 1586097055u : 2122513536u) ^ num2 * 3467687789u); continue; case 12u: arg_2A1_0 = ((this.DataBuffer[num - 1] != 10) ? 1349214829u : 656592899u); continue; case 13u: arg_2A1_0 = (((num == 0) ? 687461565u : 434568810u) ^ num2 * 663281082u); continue; case 14u: { byte[] array; PacketReader object_ = new PacketReader(array, true, true); WorldClass.smethod_14(this.PacketQueue, object_); int num3; num -= num3; WorldClass.smethod_13(this.DataBuffer, num3, this.DataBuffer, 0, num); this.OnData(); arg_2A1_0 = (num2 * 789004399u ^ 1857816743u); continue; } case 15u: { int num3; byte[] array = new byte[num3]; arg_2A1_0 = (num2 * 152044841u ^ 3418251853u); continue; } case 16u: arg_2A1_0 = (num2 * 354584314u ^ 3821096739u); continue; case 18u: WorldClass.smethod_7(this.clientSocket, this.DataBuffer, 0, this.DataBuffer.Length, SocketFlags.None, new AsyncCallback(this.Receive), null); arg_2A1_0 = 466592861u; continue; case 19u: arg_2A1_0 = ((this.initiated ? 1275411404u : 788338040u) ^ num2 * 4152913669u); continue; case 20u: { PacketReader packetReader; AuthenticationHandler.HandleAuthChallenge(ref packetReader, this); arg_2A1_0 = (num2 * 2478836290u ^ 3479432470u); continue; } } goto Block_9; } } Block_9:; } catch (Exception) { while (true) { IL_343: uint arg_314_0 = 794464263u; while (true) { uint num2; switch ((num2 = (arg_314_0 ^ 2097752605u)) % 3u) { case 0u: goto IL_343; case 2u: CharacterHandler.chatRunning = false; arg_314_0 = (num2 * 2798643116u ^ 1282738044u); continue; } goto Block_11; } } Block_11:; } } private void Decode(ref byte[] data) { this.Crypt.Decrypt(data, 4); } public static uint Adler32(byte[] data) { uint num = 55537u; uint num4; while (true) { IL_BE: uint arg_92_0 = 1454806432u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 235795070u)) % 8u) { case 0u: goto IL_BE; case 1u: { int num3; arg_92_0 = ((num3 < data.Length) ? 1132878706u : 328180532u); continue; } case 3u: num4 = (num4 + num) % 65521u; arg_92_0 = (num2 * 2301135219u ^ 507895184u); continue; case 4u: { int num3; num = (num + (uint)data[num3]) % 65521u; arg_92_0 = 1697866549u; continue; } case 5u: { int num3 = 0; arg_92_0 = (num2 * 3535326672u ^ 1948598311u); continue; } case 6u: num4 = 38951u; arg_92_0 = (num2 * 1817707444u ^ 3094025011u); continue; case 7u: { int num3; num3++; arg_92_0 = (num2 * 1245978631u ^ 1781619886u); continue; } } goto Block_2; } } Block_2: return (num4 << 16) + num; } public void Send(ref PacketWriter packet) { byte[] array = packet.ReadDataToSend(false); try { Log.Message(LogType.Packet, Module.smethod_36<string>(593506430u), new object[] { packet.Opcode, packet.Size }); byte[] array2; int int_; uint uint_; PacketWriter packetWriter2; while (true) { IL_155: uint arg_123_0 = 2199929490u; while (true) { uint num; switch ((num = (arg_123_0 ^ 3311393667u)) % 9u) { case 1u: { array2 = null; byte[] array3; int_ = array3.Length; uint_ = WorldClass.Adler32(array3); arg_123_0 = (num * 68058880u ^ 2153398968u); continue; } case 2u: goto IL_155; case 3u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ResetCompressionContext, true); arg_123_0 = (num * 1834449402u ^ 1107624411u); continue; } case 4u: if (this.Crypt.IsInitialized) { arg_123_0 = (num * 3545686980u ^ 39507906u); continue; } goto IL_374; case 5u: { PacketWriter packetWriter; this.Send(ref packetWriter); packetWriter2 = new PacketWriter(ServerMessage.Compression, true); arg_123_0 = (num * 1258462980u ^ 4146404091u); continue; } case 6u: { byte[] array3; byte[] array4; array3[1] = array4[1]; arg_123_0 = (num * 2425788949u ^ 3606182965u); continue; } case 7u: { byte[] array4 = WorldClass.smethod_15((ushort)packet.Opcode); byte[] array3 = new byte[array.Length - 4]; WorldClass.smethod_13(array, 4, array3, 0, array3.Length); array3[0] = array4[0]; arg_123_0 = (num * 2814429138u ^ 762017105u); continue; } case 8u: goto IL_3F8; } goto Block_4; } } uint arg_3B6_0; while (true) { IL_3B1: uint num; switch ((num = (arg_3B6_0 ^ 3311393667u)) % 13u) { case 0u: array2 = array2.Combine(new byte[] { 0, 0, 255, 255 }); arg_3B6_0 = 4135719112u; continue; case 1u: goto IL_374; case 2u: { WorldClass.smethod_23(packetWriter2, uint_); uint uint_2; WorldClass.smethod_23(packetWriter2, uint_2); WorldClass.smethod_24(packetWriter2, array2); arg_3B6_0 = (num * 4105965725u ^ 4017603929u); continue; } case 3u: { uint uint_2 = WorldClass.Adler32(array2); arg_3B6_0 = (num * 977288196u ^ 864158354u); continue; } case 4u: array[1] = (byte)(255 & array.Length - 4 >> 8); this.Crypt.Encrypt(array, 4); arg_3B6_0 = (num * 3558555324u ^ 1587990696u); continue; case 5u: array = packetWriter2.ReadDataToSend(false); arg_3B6_0 = (num * 1269215262u ^ 3837774562u); continue; case 6u: arg_3B6_0 = ((((array2[array2.Length - 1] & 8) != 8) ? 3170777306u : 2567516264u) ^ num * 894815154u); continue; case 7u: WorldClass.smethod_25(packet); arg_3B6_0 = (num * 214185292u ^ 269952291u); continue; case 9u: goto IL_3F8; case 10u: array2 = array2.Combine(new byte[1]); arg_3B6_0 = (num * 2738487785u ^ 951591865u); continue; case 11u: goto IL_271; case 12u: WorldClass.smethod_22(packetWriter2, int_); arg_3B6_0 = (num * 891587732u ^ 1040375321u); continue; } break; } return; Block_4: MemoryStream memoryStream = WorldClass.smethod_16(); try { DeflateStream deflateStream = WorldClass.smethod_17(memoryStream, CompressionLevel.Fastest); try { byte[] array3; WorldClass.smethod_18(deflateStream, array3, 0, array3.Length); while (true) { IL_1B0: uint arg_197_0 = 3252342619u; while (true) { uint num; switch ((num = (arg_197_0 ^ 3311393667u)) % 3u) { case 1u: WorldClass.smethod_19(deflateStream); arg_197_0 = (num * 3667174594u ^ 498565863u); continue; case 2u: goto IL_1B0; } goto Block_11; } } Block_11:; } finally { if (deflateStream != null) { while (true) { IL_1F2: uint arg_1D9_0 = 2488757830u; while (true) { uint num; switch ((num = (arg_1D9_0 ^ 3311393667u)) % 3u) { case 0u: goto IL_1F2; case 2u: WorldClass.smethod_20(deflateStream); arg_1D9_0 = (num * 1032679818u ^ 1481471478u); continue; } goto Block_14; } } Block_14:; } } array2 = WorldClass.smethod_21(memoryStream); } finally { if (memoryStream != null) { while (true) { IL_23E: uint arg_225_0 = 4248991174u; while (true) { uint num; switch ((num = (arg_225_0 ^ 3311393667u)) % 3u) { case 1u: WorldClass.smethod_20(memoryStream); arg_225_0 = (num * 4155117569u ^ 3966915401u); continue; case 2u: goto IL_23E; } goto Block_17; } } Block_17:; } } byte[] expr_24E_cp_0 = array2; int expr_24E_cp_1 = 0; expr_24E_cp_0[expr_24E_cp_1] -= 1; IL_271: arg_3B6_0 = 2766555372u; goto IL_3B1; IL_374: WorldClass.smethod_8(this.clientSocket, array, 0, array.Length, SocketFlags.None); arg_3B6_0 = 3877238322u; goto IL_3B1; IL_3F8: array[0] = (byte)(255 & array.Length - 4); arg_3B6_0 = 4257648992u; goto IL_3B1; } catch (Exception exception_) { while (true) { IL_48F: uint arg_41C_0 = 3929711820u; while (true) { uint num; switch ((num = (arg_41C_0 ^ 3311393667u)) % 4u) { case 0u: goto IL_48F; case 2u: WorldClass.smethod_27(this.clientSocket); CharacterHandler.chatRunning = false; arg_41C_0 = (num * 1852355598u ^ 3988322590u); continue; case 3u: Log.Message(LogType.Error, Module.smethod_36<string>(3490486299u), new object[] { WorldClass.smethod_26(exception_) }); Log.Message(); arg_41C_0 = (num * 3844434002u ^ 3766579695u); continue; } goto Block_19; } } Block_19:; } } public void Dispose() { this.Crypt.Dispose(); } static Queue smethod_0() { return new Queue(); } static int smethod_1(Queue queue_0) { return queue_0.Count; } static object smethod_2(Queue queue_0) { return queue_0.Dequeue(); } static EndPoint smethod_3(Socket socket_0) { return socket_0.RemoteEndPoint; } static IPAddress smethod_4(IPEndPoint ipendPoint_0) { return ipendPoint_0.Address; } static int smethod_5(IPEndPoint ipendPoint_0) { return ipendPoint_0.Port; } static string smethod_6(object object_0, object object_1, object object_2) { return object_0 + object_1 + object_2; } static IAsyncResult smethod_7(Socket socket_0, byte[] byte_0, int int_0, int int_1, SocketFlags socketFlags_0, AsyncCallback asyncCallback_0, object object_0) { return socket_0.BeginReceive(byte_0, int_0, int_1, socketFlags_0, asyncCallback_0, object_0); } static int smethod_8(Socket socket_0, byte[] byte_0, int int_0, int int_1, SocketFlags socketFlags_0) { return socket_0.Send(byte_0, int_0, int_1, socketFlags_0); } static int smethod_9(Socket socket_0, IAsyncResult iasyncResult_0) { return socket_0.EndReceive(iasyncResult_0); } static Encoding smethod_10() { return Encoding.ASCII; } static byte[] smethod_11(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static ushort smethod_12(byte[] byte_0, int int_0) { return BitConverter.ToUInt16(byte_0, int_0); } static void smethod_13(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static void smethod_14(Queue queue_0, object object_0) { queue_0.Enqueue(object_0); } static byte[] smethod_15(ushort ushort_0) { return BitConverter.GetBytes(ushort_0); } static MemoryStream smethod_16() { return new MemoryStream(); } static DeflateStream smethod_17(Stream stream_0, CompressionLevel compressionLevel_0) { return new DeflateStream(stream_0, compressionLevel_0); } static void smethod_18(Stream stream_0, byte[] byte_0, int int_0, int int_1) { stream_0.Write(byte_0, int_0, int_1); } static void smethod_19(Stream stream_0) { stream_0.Flush(); } static void smethod_20(IDisposable idisposable_0) { idisposable_0.Dispose(); } static byte[] smethod_21(MemoryStream memoryStream_0) { return memoryStream_0.ToArray(); } static void smethod_22(BinaryWriter binaryWriter_0, int int_0) { binaryWriter_0.Write(int_0); } static void smethod_23(BinaryWriter binaryWriter_0, uint uint_0) { binaryWriter_0.Write(uint_0); } static void smethod_24(BinaryWriter binaryWriter_0, byte[] byte_0) { binaryWriter_0.Write(byte_0); } static void smethod_25(BinaryWriter binaryWriter_0) { binaryWriter_0.Flush(); } static string smethod_26(Exception exception_0) { return exception_0.Message; } static void smethod_27(Socket socket_0) { socket_0.Close(); } } } <file_sep>/Framework.Cryptography.WoW/RsaData.cs using System; using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; namespace Framework.Cryptography.WoW { public class RsaData { public RSAParameters RsaParams; public RsaData(int keySize = 4096) { while (true) { IL_200: uint arg_1C7_0 = 1002716060u; while (true) { uint num; switch ((num = (arg_1C7_0 ^ 1205183536u)) % 11u) { case 1u: { RSACryptoServiceProvider rSACryptoServiceProvider = null; arg_1C7_0 = (num * 713026611u ^ 506908512u); continue; } case 2u: this.RsaParams.Modulus = this.RsaParams.Modulus.Reverse<byte>().ToArray<byte>(); arg_1C7_0 = (num * 2525738492u ^ 3687538248u); continue; case 3u: RsaData.smethod_0(false); arg_1C7_0 = (num * 3731004226u ^ 2956488030u); continue; case 4u: this.RsaParams.P = this.RsaParams.P.Reverse<byte>().ToArray<byte>(); arg_1C7_0 = (num * 1033657867u ^ 3740220601u); continue; case 5u: { RSACryptoServiceProvider rSACryptoServiceProvider; this.RsaParams = RsaData.smethod_3(rSACryptoServiceProvider, true); arg_1C7_0 = (num * 2199710247u ^ 2215492508u); continue; } case 6u: goto IL_200; case 7u: this.RsaParams.D = this.RsaParams.D.Reverse<byte>().ToArray<byte>(); arg_1C7_0 = (num * 1816969130u ^ 1094325837u); continue; case 8u: this.RsaParams.Q = this.RsaParams.Q.Reverse<byte>().ToArray<byte>(); arg_1C7_0 = (num * 4187008596u ^ 2383157349u); continue; case 9u: this.RsaParams.DP = this.RsaParams.DP.Reverse<byte>().ToArray<byte>(); this.RsaParams.DQ = this.RsaParams.DQ.Reverse<byte>().ToArray<byte>(); this.RsaParams.Exponent = this.RsaParams.Exponent.Reverse<byte>().ToArray<byte>(); this.RsaParams.InverseQ = this.RsaParams.InverseQ.Reverse<byte>().ToArray<byte>(); arg_1C7_0 = (num * 1597038983u ^ 1302256598u); continue; case 10u: { RSACryptoServiceProvider rSACryptoServiceProvider = RsaData.smethod_1(keySize); RsaData.smethod_2(rSACryptoServiceProvider, false); arg_1C7_0 = (num * 4124139865u ^ 3038071029u); continue; } } return; } } } private void WritePublicByteArray(ref StringBuilder sb, string name, byte[] data) { RsaData.smethod_4(sb, Module.smethod_33<string>(1101739191u), name); int num = 0; while (true) { IL_119: uint arg_E8_0 = 1108752587u; while (true) { uint num2; switch ((num2 = (arg_E8_0 ^ 487924337u)) % 9u) { case 0u: RsaData.smethod_6(sb, RsaData.smethod_5(Module.smethod_37<string>(785053536u), data[num])); arg_E8_0 = 1368211678u; continue; case 1u: arg_E8_0 = (num2 * 2447526073u ^ 1700002614u); continue; case 2u: RsaData.smethod_6(sb, RsaData.smethod_5(Module.smethod_35<string>(504568496u), data[num])); arg_E8_0 = (num2 * 2255774017u ^ 1823880514u); continue; case 3u: RsaData.smethod_7(sb); arg_E8_0 = (num2 * 3951439401u ^ 3110322468u); continue; case 4u: goto IL_119; case 6u: num++; arg_E8_0 = 530930524u; continue; case 7u: arg_E8_0 = ((num == data.Length - 1) ? 677679341u : 968760102u); continue; case 8u: arg_E8_0 = ((num < data.Length) ? 585820464u : 370895953u); continue; } return; } } } public void WriteRSAParamsToFile(string file) { StreamWriter streamWriter = RsaData.smethod_9(RsaData.smethod_8(file, FileMode.Append, FileAccess.Write)); try { StringBuilder stringBuilder = RsaData.smethod_10(); RsaData.smethod_11(stringBuilder, Module.smethod_35<string>(2980812616u)); while (true) { IL_215: uint arg_1DC_0 = 2660740231u; while (true) { uint num; switch ((num = (arg_1DC_0 ^ 2343539775u)) % 11u) { case 0u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_34<string>(3759193544u), this.RsaParams.Modulus); this.WritePublicByteArray(ref stringBuilder, Module.smethod_35<string>(2603051650u), this.RsaParams.P); arg_1DC_0 = (num * 2314009292u ^ 2798169866u); continue; case 1u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_36<string>(3595999631u), this.RsaParams.DQ); arg_1DC_0 = (num * 1905519383u ^ 3451028897u); continue; case 2u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_36<string>(2302295288u), this.RsaParams.InverseQ); arg_1DC_0 = (num * 3514015804u ^ 328205161u); continue; case 3u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_33<string>(500883625u), this.RsaParams.Q); RsaData.smethod_11(stringBuilder, Module.smethod_36<string>(1763956934u)); arg_1DC_0 = (num * 1093455388u ^ 2412630581u); continue; case 4u: RsaData.smethod_11(stringBuilder, Module.smethod_36<string>(325567501u)); arg_1DC_0 = (num * 1680973235u ^ 4159792120u); continue; case 5u: goto IL_215; case 6u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_37<string>(1281746625u), this.RsaParams.Exponent); arg_1DC_0 = (num * 2814766445u ^ 867682328u); continue; case 7u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_33<string>(1529783234u), this.RsaParams.DP); arg_1DC_0 = (num * 3044007253u ^ 3248738298u); continue; case 8u: RsaData.smethod_13(streamWriter, RsaData.smethod_12(stringBuilder)); arg_1DC_0 = (num * 1302357578u ^ 81819689u); continue; case 10u: this.WritePublicByteArray(ref stringBuilder, Module.smethod_34<string>(495328980u), this.RsaParams.D); arg_1DC_0 = (num * 692187761u ^ 2461323819u); continue; } goto Block_3; } } Block_3:; } finally { if (streamWriter != null) { while (true) { IL_253: uint arg_23B_0 = 3085176007u; while (true) { uint num; switch ((num = (arg_23B_0 ^ 2343539775u)) % 3u) { case 0u: goto IL_253; case 1u: RsaData.smethod_14(streamWriter); arg_23B_0 = (num * 4268890230u ^ 3143724438u); continue; } goto Block_6; } } Block_6:; } } this.RsaParams = default(RSAParameters); } static void smethod_0(bool bool_0) { RSACryptoServiceProvider.UseMachineKeyStore = bool_0; } static RSACryptoServiceProvider smethod_1(int int_0) { return new RSACryptoServiceProvider(int_0); } static void smethod_2(RSACryptoServiceProvider rsacryptoServiceProvider_0, bool bool_0) { rsacryptoServiceProvider_0.PersistKeyInCsp = bool_0; } static RSAParameters smethod_3(RSA rsa_0, bool bool_0) { return rsa_0.ExportParameters(bool_0); } static StringBuilder smethod_4(StringBuilder stringBuilder_0, string string_0, object object_0) { return stringBuilder_0.AppendFormat(string_0, object_0); } static string smethod_5(string string_0, object object_0) { return string.Format(string_0, object_0); } static StringBuilder smethod_6(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.Append(string_0); } static StringBuilder smethod_7(StringBuilder stringBuilder_0) { return stringBuilder_0.AppendLine(); } static FileStream smethod_8(string string_0, FileMode fileMode_0, FileAccess fileAccess_0) { return new FileStream(string_0, fileMode_0, fileAccess_0); } static StreamWriter smethod_9(Stream stream_0) { return new StreamWriter(stream_0); } static StringBuilder smethod_10() { return new StringBuilder(); } static StringBuilder smethod_11(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.AppendLine(string_0); } static string smethod_12(object object_0) { return object_0.ToString(); } static void smethod_13(TextWriter textWriter_0, string string_0) { textWriter_0.WriteLine(string_0); } static void smethod_14(IDisposable idisposable_0) { idisposable_0.Dispose(); } } } <file_sep>/Google.Protobuf.Reflection/DescriptorValidationException.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class DescriptorValidationException : Exception { private readonly string name; private readonly string description; public string ProblemSymbolName { get { return this.name; } } public string Description { get { return this.description; } } internal DescriptorValidationException(IDescriptor problemDescriptor, string description) : base(DescriptorValidationException.smethod_0(problemDescriptor.FullName, Module.smethod_37<string>(2625673813u), description)) { this.name = problemDescriptor.FullName; this.description = description; } internal DescriptorValidationException(IDescriptor problemDescriptor, string description, Exception cause) : base(DescriptorValidationException.smethod_0(problemDescriptor.FullName, Module.smethod_35<string>(1861489385u), description), cause) { this.name = problemDescriptor.FullName; this.description = description; } static string smethod_0(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } } } <file_sep>/Bgs.Protocol.Account.V1/GetGameTimeRemainingInfoResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetGameTimeRemainingInfoResponse : IMessage<GetGameTimeRemainingInfoResponse>, IEquatable<GetGameTimeRemainingInfoResponse>, IDeepCloneable<GetGameTimeRemainingInfoResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetGameTimeRemainingInfoResponse.__c __9 = new GetGameTimeRemainingInfoResponse.__c(); internal GetGameTimeRemainingInfoResponse cctor>b__24_0() { return new GetGameTimeRemainingInfoResponse(); } } private static readonly MessageParser<GetGameTimeRemainingInfoResponse> _parser = new MessageParser<GetGameTimeRemainingInfoResponse>(new Func<GetGameTimeRemainingInfoResponse>(GetGameTimeRemainingInfoResponse.__c.__9.<.cctor>b__24_0)); public const int GameTimeRemainingInfoFieldNumber = 1; private GameTimeRemainingInfo gameTimeRemainingInfo_; public static MessageParser<GetGameTimeRemainingInfoResponse> Parser { get { return GetGameTimeRemainingInfoResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[22]; } } MessageDescriptor IMessage.Descriptor { get { return GetGameTimeRemainingInfoResponse.Descriptor; } } public GameTimeRemainingInfo GameTimeRemainingInfo { get { return this.gameTimeRemainingInfo_; } set { this.gameTimeRemainingInfo_ = value; } } public GetGameTimeRemainingInfoResponse() { } public GetGameTimeRemainingInfoResponse(GetGameTimeRemainingInfoResponse other) : this() { while (true) { IL_44: int arg_2E_0 = -1850193031; while (true) { switch ((arg_2E_0 ^ -1627385568) % 3) { case 0: goto IL_44; case 2: this.GameTimeRemainingInfo = ((other.gameTimeRemainingInfo_ != null) ? other.GameTimeRemainingInfo.Clone() : null); arg_2E_0 = -282107425; continue; } return; } } } public GetGameTimeRemainingInfoResponse Clone() { return new GetGameTimeRemainingInfoResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetGameTimeRemainingInfoResponse); } public bool Equals(GetGameTimeRemainingInfoResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -615033511) % 7) { case 0: return false; case 1: return true; case 2: return false; case 3: arg_48_0 = ((!GetGameTimeRemainingInfoResponse.smethod_0(this.GameTimeRemainingInfo, other.GameTimeRemainingInfo)) ? -1845217933 : -1352124362); continue; case 4: goto IL_7A; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = -940611869; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -667819351 : -1136738818); goto IL_43; } public override int GetHashCode() { int num = 1; if (this.gameTimeRemainingInfo_ != null) { while (true) { IL_44: uint arg_2C_0 = 3084486980u; while (true) { uint num2; switch ((num2 = (arg_2C_0 ^ 3732806727u)) % 3u) { case 1u: num ^= GetGameTimeRemainingInfoResponse.smethod_1(this.GameTimeRemainingInfo); arg_2C_0 = (num2 * 2801914873u ^ 3239046217u); continue; case 2u: goto IL_44; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameTimeRemainingInfo_ != null) { while (true) { IL_5B: uint arg_3F_0 = 2374469297u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 3844618416u)) % 4u) { case 1u: output.WriteRawTag(10); arg_3F_0 = (num * 2294298509u ^ 3697320227u); continue; case 2u: output.WriteMessage(this.GameTimeRemainingInfo); arg_3F_0 = (num * 3505930853u ^ 4135322230u); continue; case 3u: goto IL_5B; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_6B: uint arg_4F_0 = 210524967u; while (true) { uint num2; switch ((num2 = (arg_4F_0 ^ 564953361u)) % 4u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameTimeRemainingInfo); arg_4F_0 = (num2 * 2899599596u ^ 2451172365u); continue; case 2u: arg_4F_0 = (((this.gameTimeRemainingInfo_ == null) ? 4189008721u : 3884964420u) ^ num2 * 2893778304u); continue; case 3u: goto IL_6B; } return num; } } return num; } public void MergeFrom(GetGameTimeRemainingInfoResponse other) { if (other == null) { goto IL_15; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 331874968u)) % 7u) { case 0u: this.gameTimeRemainingInfo_ = new GameTimeRemainingInfo(); arg_7A_0 = (num * 480447383u ^ 3114663512u); continue; case 2u: arg_7A_0 = (((this.gameTimeRemainingInfo_ == null) ? 2117536256u : 1058304792u) ^ num * 3304458052u); continue; case 3u: this.GameTimeRemainingInfo.MergeFrom(other.GameTimeRemainingInfo); arg_7A_0 = 1407983565u; continue; case 4u: goto IL_15; case 5u: return; case 6u: goto IL_B1; } break; } return; IL_15: arg_7A_0 = 1519580287u; goto IL_75; IL_B1: arg_7A_0 = ((other.gameTimeRemainingInfo_ == null) ? 1407983565u : 1436042395u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) != 0u) ? 924101912u : 2061022702u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 1329840488u)) % 9u) { case 0u: arg_B3_0 = 924101912u; continue; case 1u: input.ReadMessage(this.gameTimeRemainingInfo_); arg_B3_0 = 1088633394u; continue; case 2u: arg_B3_0 = ((this.gameTimeRemainingInfo_ != null) ? 2118789215u : 962560641u); continue; case 3u: input.SkipLastField(); arg_B3_0 = (num2 * 2994563450u ^ 3475800601u); continue; case 4u: arg_B3_0 = ((num != 10u) ? 493861634u : 1965777352u); continue; case 5u: this.gameTimeRemainingInfo_ = new GameTimeRemainingInfo(); arg_B3_0 = (num2 * 17560939u ^ 1083930428u); continue; case 6u: goto IL_F3; case 7u: arg_B3_0 = (num2 * 1165504773u ^ 2355753723u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/LogOption.cs using System; namespace Bgs.Protocol { public enum LogOption { NONE, HIDDEN, HEX } } <file_sep>/Framework.Constants/GuidType.cs using System; namespace Framework.Constants { [Serializable] public enum GuidType { Null, Uniq, Player, Item, WorldTransaction, StaticDoor, Transport, Conversation, Creature, Vehicle, Pet, GameObject, Unit = 8 } } <file_sep>/Bgs.Protocol.Authentication.V1/LogonQueueUpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class LogonQueueUpdateRequest : IMessage<LogonQueueUpdateRequest>, IEquatable<LogonQueueUpdateRequest>, IDeepCloneable<LogonQueueUpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly LogonQueueUpdateRequest.__c __9 = new LogonQueueUpdateRequest.__c(); internal LogonQueueUpdateRequest cctor>b__34_0() { return new LogonQueueUpdateRequest(); } } private static readonly MessageParser<LogonQueueUpdateRequest> _parser = new MessageParser<LogonQueueUpdateRequest>(new Func<LogonQueueUpdateRequest>(LogonQueueUpdateRequest.__c.__9.<.cctor>b__34_0)); public const int PositionFieldNumber = 1; private uint position_; public const int EstimatedTimeFieldNumber = 2; private ulong estimatedTime_; public const int EtaDeviationInSecFieldNumber = 3; private ulong etaDeviationInSec_; public static MessageParser<LogonQueueUpdateRequest> Parser { get { return LogonQueueUpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return LogonQueueUpdateRequest.Descriptor; } } public uint Position { get { return this.position_; } set { this.position_ = value; } } public ulong EstimatedTime { get { return this.estimatedTime_; } set { this.estimatedTime_ = value; } } public ulong EtaDeviationInSec { get { return this.etaDeviationInSec_; } set { this.etaDeviationInSec_ = value; } } public LogonQueueUpdateRequest() { } public LogonQueueUpdateRequest(LogonQueueUpdateRequest other) : this() { while (true) { IL_69: uint arg_4D_0 = 2110764486u; while (true) { uint num; switch ((num = (arg_4D_0 ^ 300864835u)) % 4u) { case 0u: goto IL_69; case 1u: this.position_ = other.position_; this.estimatedTime_ = other.estimatedTime_; arg_4D_0 = (num * 715426083u ^ 2112415803u); continue; case 3u: this.etaDeviationInSec_ = other.etaDeviationInSec_; arg_4D_0 = (num * 970424315u ^ 1982437460u); continue; } return; } } } public LogonQueueUpdateRequest Clone() { return new LogonQueueUpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as LogonQueueUpdateRequest); } public bool Equals(LogonQueueUpdateRequest other) { if (other == null) { goto IL_15; } goto IL_DA; int arg_94_0; while (true) { IL_8F: switch ((arg_94_0 ^ -1818821142) % 11) { case 0: arg_94_0 = ((this.EstimatedTime == other.EstimatedTime) ? -1092601146 : -2142212234); continue; case 1: arg_94_0 = ((this.Position == other.Position) ? -1381505508 : -940670111); continue; case 2: return false; case 3: arg_94_0 = ((this.EtaDeviationInSec == other.EtaDeviationInSec) ? -1746640821 : -321749010); continue; case 4: return false; case 5: return true; case 7: return false; case 8: return false; case 9: goto IL_15; case 10: goto IL_DA; } break; } return true; IL_15: arg_94_0 = -1239473574; goto IL_8F; IL_DA: arg_94_0 = ((other != this) ? -1932391385 : -1823634643); goto IL_8F; } public override int GetHashCode() { int num = 1; while (true) { IL_C9: uint arg_A5_0 = 3318102430u; while (true) { uint num2; switch ((num2 = (arg_A5_0 ^ 4030623537u)) % 6u) { case 0u: num ^= this.EstimatedTime.GetHashCode(); arg_A5_0 = (num2 * 1508356065u ^ 955824411u); continue; case 1u: num ^= this.Position.GetHashCode(); arg_A5_0 = (((this.EstimatedTime != 0uL) ? 1332064936u : 703646018u) ^ num2 * 2237531069u); continue; case 3u: goto IL_C9; case 4u: arg_A5_0 = ((this.EtaDeviationInSec != 0uL) ? 2552344042u : 3951435367u); continue; case 5u: num ^= this.EtaDeviationInSec.GetHashCode(); arg_A5_0 = (num2 * 3409107818u ^ 3944225225u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); output.WriteUInt32(this.Position); while (true) { IL_E2: uint arg_BA_0 = 1937638019u; while (true) { uint num; switch ((num = (arg_BA_0 ^ 761901952u)) % 7u) { case 0u: goto IL_E2; case 1u: output.WriteRawTag(24); output.WriteUInt64(this.EtaDeviationInSec); arg_BA_0 = (num * 2835013844u ^ 1493910251u); continue; case 2u: output.WriteUInt64(this.EstimatedTime); arg_BA_0 = (num * 3766526760u ^ 2519109804u); continue; case 4u: arg_BA_0 = (((this.EstimatedTime == 0uL) ? 1693817993u : 1715156562u) ^ num * 845969767u); continue; case 5u: output.WriteRawTag(16); arg_BA_0 = (num * 4006040366u ^ 1443994168u); continue; case 6u: arg_BA_0 = ((this.EtaDeviationInSec == 0uL) ? 687167271u : 2032648071u); continue; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.Position)); while (true) { IL_C6: uint arg_A2_0 = 38483644u; while (true) { uint num2; switch ((num2 = (arg_A2_0 ^ 15952688u)) % 6u) { case 0u: goto IL_C6; case 1u: arg_A2_0 = ((this.EtaDeviationInSec == 0uL) ? 859042946u : 234880459u); continue; case 2u: arg_A2_0 = (((this.EstimatedTime != 0uL) ? 962860201u : 1428860507u) ^ num2 * 3784449556u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.EtaDeviationInSec); arg_A2_0 = (num2 * 944212354u ^ 402524916u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.EstimatedTime); arg_A2_0 = (num2 * 3884531822u ^ 3865236405u); continue; } return num; } } return num; } public void MergeFrom(LogonQueueUpdateRequest other) { if (other == null) { goto IL_AE; } goto IL_F8; uint arg_B8_0; while (true) { IL_B3: uint num; switch ((num = (arg_B8_0 ^ 3086365112u)) % 9u) { case 0u: goto IL_AE; case 1u: arg_B8_0 = ((other.EstimatedTime != 0uL) ? 3058626605u : 3509444008u); continue; case 2u: return; case 3u: arg_B8_0 = ((other.EtaDeviationInSec != 0uL) ? 2244488532u : 3955051427u); continue; case 4u: this.EtaDeviationInSec = other.EtaDeviationInSec; arg_B8_0 = (num * 1150859818u ^ 3504962843u); continue; case 5u: this.EstimatedTime = other.EstimatedTime; arg_B8_0 = (num * 3040145819u ^ 1970513823u); continue; case 6u: goto IL_F8; case 8u: this.Position = other.Position; arg_B8_0 = (num * 2894661705u ^ 1849898459u); continue; } break; } return; IL_AE: arg_B8_0 = 3385016051u; goto IL_B3; IL_F8: arg_B8_0 = ((other.Position == 0u) ? 3273454731u : 3083528040u); goto IL_B3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_137: uint num; uint arg_EF_0 = ((num = input.ReadTag()) != 0u) ? 548686898u : 890504412u; while (true) { uint num2; switch ((num2 = (arg_EF_0 ^ 1511266981u)) % 11u) { case 0u: arg_EF_0 = (num2 * 1333366569u ^ 2207006487u); continue; case 1u: arg_EF_0 = (((num == 16u) ? 3325365498u : 3815587427u) ^ num2 * 1642363592u); continue; case 2u: this.EstimatedTime = input.ReadUInt64(); arg_EF_0 = 351138800u; continue; case 3u: input.SkipLastField(); arg_EF_0 = (num2 * 3143313333u ^ 3009371021u); continue; case 4u: this.Position = input.ReadUInt32(); arg_EF_0 = 351138800u; continue; case 5u: goto IL_137; case 6u: arg_EF_0 = ((num != 8u) ? 71230868u : 1719801838u); continue; case 8u: this.EtaDeviationInSec = input.ReadUInt64(); arg_EF_0 = 351138800u; continue; case 9u: arg_EF_0 = 548686898u; continue; case 10u: arg_EF_0 = (((num != 24u) ? 3319841572u : 3850272146u) ^ num2 * 3415702243u); continue; } return; } } } } } <file_sep>/Bgs.Protocol/ServiceOptionsReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class ServiceOptionsReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ServiceOptionsReflection.descriptor; } } static ServiceOptionsReflection() { ServiceOptionsReflection.descriptor = FileDescriptor.FromGeneratedCode(ServiceOptionsReflection.smethod_1(ServiceOptionsReflection.smethod_0(new string[] { Module.smethod_34<string>(3527083308u), Module.smethod_34<string>(3902029756u), Module.smethod_37<string>(1520647175u), Module.smethod_36<string>(3834435939u), Module.smethod_33<string>(2638487048u), Module.smethod_36<string>(708688899u), Module.smethod_35<string>(495708571u) })), new FileDescriptor[] { FileDescriptor.DescriptorProtoFileDescriptor }, new GeneratedCodeInfo(null, null)); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/GameObjectSpawn.cs using AuthServer.WorldServer.Managers; using Framework.ObjectDefines; using System; namespace AuthServer.WorldServer.Game.Entities { [Serializable] public class GameObjectSpawn : WorldObject { public int Id; public uint FactionTemplate; public byte AnimProgress; public byte State; public GameObject GameObject; public GameObjectSpawn(int updateLength = 33) : base(updateLength) { } public static ulong GetLastGuid() { return (ulong)((long)Manager.SpawnMgr.GameObjectSpawns.Count + 1L); } public void CreateFullGuid() { this.SGuid = new SmartGuid(this.Guid, this.Id, GuidType.GameObject, (ulong)this.Map); this.Guid = this.SGuid.Guid; } public void CreateData(GameObject gameobject) { this.GameObject = gameobject; } public bool AddToDB() { return false; } public void AddToWorld() { this.CreateFullGuid(); while (true) { IL_5C: uint arg_40_0 = 1977405627u; while (true) { uint num; switch ((num = (arg_40_0 ^ 658709834u)) % 4u) { case 0u: goto IL_5C; case 1u: this.CreateData(this.GameObject); arg_40_0 = (num * 3818611022u ^ 171797355u); continue; case 3u: Manager.SpawnMgr.AddSpawn(this); arg_40_0 = (num * 2673656784u ^ 3244605608u); continue; } return; } } } public override void SetUpdateFields() { base.SetUpdateField<ulong>(0, this.Guid, 0); while (true) { IL_2EF: uint arg_29E_0 = 999333535u; while (true) { uint num; switch ((num = (arg_29E_0 ^ 504559828u)) % 17u) { case 0u: base.SetUpdateField<float>(21, this.GameObject.Rot.O, 0); arg_29E_0 = (num * 748905259u ^ 2031209607u); continue; case 2u: base.SetUpdateField<byte>(24, 255, 3); arg_29E_0 = (num * 2507631249u ^ 571473568u); continue; case 3u: base.SetUpdateField<float>(18, this.GameObject.Rot.X, 0); arg_29E_0 = (num * 3516617196u ^ 2887152302u); continue; case 4u: { SmartGuid smartGuid = new SmartGuid(this.Guid, this.Id, GuidType.GameObject, (ulong)this.Map); base.SetUpdateField<ulong>(2, smartGuid.HighGuid, 0); base.SetUpdateField<ulong>(4, 0uL, 0); base.SetUpdateField<int>(8, 33, 0); base.SetUpdateField<int>(9, this.Id, 0); arg_29E_0 = (num * 2137176038u ^ 600593551u); continue; } case 5u: base.SetUpdateField<uint>(22, this.FactionTemplate, 0); base.SetUpdateField<int>(23, 0, 0); arg_29E_0 = (num * 533401104u ^ 3946632066u); continue; case 6u: base.SetUpdateField<byte>(24, (byte)this.GameObject.Type, 1); base.SetUpdateField<byte>(24, 0, 2); arg_29E_0 = (num * 644085778u ^ 388308084u); continue; case 7u: goto IL_2EF; case 8u: base.SetUpdateField<float>(19, this.GameObject.Rot.Y, 0); base.SetUpdateField<float>(20, this.GameObject.Rot.Z, 0); arg_29E_0 = (num * 624909204u ^ 3760992830u); continue; case 9u: base.SetUpdateField<int>(16, this.GameObject.DisplayInfoId, 0); arg_29E_0 = (num * 1489428309u ^ 666582131u); continue; case 10u: base.SetUpdateField<byte>(26, 255, 3); arg_29E_0 = (num * 3501202112u ^ 388806276u); continue; case 11u: base.SetUpdateField<byte>(24, this.State, 0); arg_29E_0 = (num * 2994032068u ^ 4098580944u); continue; case 12u: base.SetUpdateField<byte>(26, this.AnimProgress, 0); arg_29E_0 = (num * 3740736952u ^ 1920541854u); continue; case 13u: base.SetUpdateField<int>(17, 49, 0); arg_29E_0 = (num * 596278471u ^ 1729958822u); continue; case 14u: base.SetUpdateField<byte>(26, 0, 1); arg_29E_0 = (num * 2713790489u ^ 3859455500u); continue; case 15u: base.SetUpdateField<byte>(26, 255, 2); arg_29E_0 = (num * 2506023519u ^ 1216899585u); continue; case 16u: base.SetUpdateField<float>(11, this.GameObject.Size, 0); base.SetUpdateField<ulong>(12, 0uL, 0); arg_29E_0 = (num * 3058171710u ^ 441443711u); continue; } return; } } } } } <file_sep>/AuthServer.Network/WorldClass2.cs using AuthServer.Game.Entities; using AuthServer.Game.PacketHandler; using AuthServer.Game.Packets.PacketHandler; using AuthServer.WorldServer.Game.Packets; using AuthServer.WorldServer.Managers; using Framework.Constants.Misc; using Framework.Cryptography.WoW; using Framework.Database.Auth.Entities; using Framework.Logging; using Framework.Network.Packets; using System; using System.Collections; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; namespace AuthServer.Network { public sealed class WorldClass2 : IDisposable { public static WorldNetwork world; public Socket clientSocket; public Queue PacketQueue; public WoWCrypt Crypt; private byte[] DataBuffer; public bool initiated; public Account Account { get; set; } public Character Character { get; set; } public WorldClass2() { this.DataBuffer = new byte[10000]; this.PacketQueue = WorldClass2.smethod_0(); this.Crypt = new WoWCrypt(); } public void OnData() { PacketReader packetReader = null; if (WorldClass2.smethod_1(this.PacketQueue) > 0) { goto IL_13; } goto IL_B6; uint arg_92_0; while (true) { IL_8D: uint num; switch ((num = (arg_92_0 ^ 728961571u)) % 6u) { case 1u: goto IL_B6; case 2u: WorldClass2.smethod_6(WorldClass2.smethod_4((IPEndPoint)WorldClass2.smethod_3(this.clientSocket)), Module.smethod_33<string>(1968828782u), WorldClass2.smethod_5((IPEndPoint)WorldClass2.smethod_3(this.clientSocket))); arg_92_0 = 1105268257u; continue; case 3u: arg_92_0 = (num * 3788876196u ^ 3971847957u); continue; case 4u: packetReader = (PacketReader)WorldClass2.smethod_2(this.PacketQueue); arg_92_0 = (num * 3269895699u ^ 92473324u); continue; case 5u: goto IL_13; } break; } PacketManager.InvokeHandler(ref packetReader, this); return; IL_13: arg_92_0 = 1382663277u; goto IL_8D; IL_B6: packetReader = new PacketReader(this.DataBuffer, false, this.initiated); arg_92_0 = 1917673249u; goto IL_8D; } public void OnConnect() { PacketWriter arg_2E_0 = new PacketWriter(); WorldClass2.smethod_7(this.clientSocket, this.DataBuffer, 0, this.DataBuffer.Length, SocketFlags.None, new AsyncCallback(this.Receive), null); arg_2E_0.WriteString(Module.smethod_37<string>(1753682996u), true); byte[] array = arg_2E_0.ReadDataToSend(true).Concat(new byte[] { 10 }).ToArray<byte>(); while (true) { IL_99: uint arg_81_0 = 1075133308u; while (true) { uint num; switch ((num = (arg_81_0 ^ 981761687u)) % 3u) { case 1u: WorldClass2.smethod_8(this.clientSocket, array, 0, array.Length, SocketFlags.None); arg_81_0 = (num * 1060128331u ^ 2718837013u); continue; case 2u: goto IL_99; } return; } } } public void Receive(IAsyncResult result) { try { int num = WorldClass2.smethod_9(this.clientSocket, result); if (num != 0) { while (true) { IL_2F9: uint arg_297_0 = 2572528862u; while (true) { uint num2; switch ((num2 = (arg_297_0 ^ 2436941003u)) % 21u) { case 0u: this.OnData(); arg_297_0 = (num2 * 191845251u ^ 4089438739u); continue; case 1u: { int num3; WorldClass2.smethod_13(this.DataBuffer, num3, this.DataBuffer, 0, num); arg_297_0 = (num2 * 2952317215u ^ 3106640863u); continue; } case 2u: this.Decode(ref this.DataBuffer); arg_297_0 = 3699463717u; continue; case 3u: { PacketReader packetReader = new PacketReader(WorldClass2.smethod_11(WorldClass2.smethod_10(), Module.smethod_35<string>(2010718901u)), false, false); AuthenticationHandler.HandleAuthChallenge(ref packetReader, this); arg_297_0 = 3562505048u; continue; } case 4u: arg_297_0 = ((this.initiated ? 243683201u : 1619599055u) ^ num2 * 2769343958u); continue; case 5u: arg_297_0 = (((this.DataBuffer[0] != 10) ? 2585951529u : 2218927161u) ^ num2 * 852434365u); continue; case 6u: WorldClass2.smethod_7(this.clientSocket, this.DataBuffer, 0, this.DataBuffer.Length, SocketFlags.None, new AsyncCallback(this.Receive), null); arg_297_0 = 3583348697u; continue; case 7u: arg_297_0 = (num2 * 2462168781u ^ 1574046953u); continue; case 8u: { int num3; num -= num3; arg_297_0 = (num2 * 3321069430u ^ 2857468219u); continue; } case 9u: arg_297_0 = (((num == 1) ? 2789009040u : 2979273326u) ^ num2 * 2355032305u); continue; case 10u: goto IL_2F9; case 11u: arg_297_0 = ((!this.Crypt.IsInitialized) ? 3706980136u : 3470716317u); continue; case 12u: { byte[] array; PacketReader object_ = new PacketReader(array, true, this.initiated); WorldClass2.smethod_14(this.PacketQueue, object_); arg_297_0 = (num2 * 2996686111u ^ 503892096u); continue; } case 13u: { int num3; byte[] array = new byte[num3]; WorldClass2.smethod_13(this.DataBuffer, 0, array, 0, num3); arg_297_0 = (num2 * 1078701079u ^ 3964195659u); continue; } case 15u: arg_297_0 = (num2 * 20290101u ^ 3912917976u); continue; case 16u: this.OnData(); arg_297_0 = 4052475486u; continue; case 17u: arg_297_0 = (num2 * 262316136u ^ 981525821u); continue; case 18u: { int num3 = (int)(WorldClass2.smethod_12(this.DataBuffer, 0) + 4); arg_297_0 = (num2 * 1131685819u ^ 2940057169u); continue; } case 19u: arg_297_0 = ((num <= 0) ? 3545246949u : 3010332424u); continue; case 20u: arg_297_0 = ((this.DataBuffer[num - 1] != 10) ? 4052475486u : 3450847892u); continue; } goto Block_9; } } Block_9:; } } catch (Exception exception_) { while (true) { IL_3A1: uint arg_311_0 = 3652770445u; while (true) { uint num2; switch ((num2 = (arg_311_0 ^ 2436941003u)) % 4u) { case 0u: goto IL_3A1; case 1u: Manager.WorldMgr.DeleteSession(this.Character.Guid); arg_311_0 = (num2 * 3029153242u ^ 155694202u); continue; case 2u: Log.Message(LogType.Error, Module.smethod_36<string>(3490486299u), new object[] { WorldClass2.smethod_15(exception_) }); arg_311_0 = (((this.Character == null) ? 4239559022u : 4123036076u) ^ num2 * 3280453029u); continue; } goto Block_11; } } Block_11: CharacterHandler.chatRunning = false; } } private void Decode(ref byte[] data) { this.Crypt.Decrypt(data, 4); } public void Send(ref PacketWriter packet) { byte[] array = packet.ReadDataToSend(false); try { if (this.Crypt.IsInitialized) { goto IL_19; } goto IL_D0; uint arg_A8_0; while (true) { IL_A3: uint num; switch ((num = (arg_A8_0 ^ 283575599u)) % 7u) { case 0u: WorldClass2.smethod_16(packet); arg_A8_0 = (num * 935397368u ^ 752419448u); continue; case 2u: WorldClass2.smethod_8(this.clientSocket, array, 0, array.Length, SocketFlags.None); arg_A8_0 = (num * 3241794667u ^ 1690790458u); continue; case 3u: this.Crypt.Encrypt(array, 4); arg_A8_0 = (num * 3789761871u ^ 961221312u); continue; case 4u: array[0] = (byte)(255 & array.Length - 4); array[1] = (byte)(255 & array.Length - 4 >> 8); arg_A8_0 = (num * 3960662139u ^ 3351327311u); continue; case 5u: goto IL_19; case 6u: goto IL_D0; } break; } return; IL_19: arg_A8_0 = 1383073911u; goto IL_A3; IL_D0: Log.Message(LogType.Packet, Module.smethod_33<string>(332516270u), new object[] { packet.Opcode, packet.Size }); arg_A8_0 = 516732805u; goto IL_A3; } catch (Exception exception_) { Log.Message(LogType.Error, Module.smethod_33<string>(3822441984u), new object[] { WorldClass2.smethod_15(exception_) }); Log.Message(); while (true) { IL_172: uint arg_13A_0 = 653994054u; while (true) { uint num; switch ((num = (arg_13A_0 ^ 283575599u)) % 3u) { case 1u: CharacterHandler.chatRunning = false; WorldClass2.smethod_17(this.clientSocket); arg_13A_0 = (num * 3561998556u ^ 1357924445u); continue; case 2u: goto IL_172; } goto Block_5; } } Block_5:; } } public void Dispose() { this.Crypt.Dispose(); } static Queue smethod_0() { return new Queue(); } static int smethod_1(Queue queue_0) { return queue_0.Count; } static object smethod_2(Queue queue_0) { return queue_0.Dequeue(); } static EndPoint smethod_3(Socket socket_0) { return socket_0.RemoteEndPoint; } static IPAddress smethod_4(IPEndPoint ipendPoint_0) { return ipendPoint_0.Address; } static int smethod_5(IPEndPoint ipendPoint_0) { return ipendPoint_0.Port; } static string smethod_6(object object_0, object object_1, object object_2) { return object_0 + object_1 + object_2; } static IAsyncResult smethod_7(Socket socket_0, byte[] byte_0, int int_0, int int_1, SocketFlags socketFlags_0, AsyncCallback asyncCallback_0, object object_0) { return socket_0.BeginReceive(byte_0, int_0, int_1, socketFlags_0, asyncCallback_0, object_0); } static int smethod_8(Socket socket_0, byte[] byte_0, int int_0, int int_1, SocketFlags socketFlags_0) { return socket_0.Send(byte_0, int_0, int_1, socketFlags_0); } static int smethod_9(Socket socket_0, IAsyncResult iasyncResult_0) { return socket_0.EndReceive(iasyncResult_0); } static Encoding smethod_10() { return Encoding.ASCII; } static byte[] smethod_11(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static ushort smethod_12(byte[] byte_0, int int_0) { return BitConverter.ToUInt16(byte_0, int_0); } static void smethod_13(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static void smethod_14(Queue queue_0, object object_0) { queue_0.Enqueue(object_0); } static string smethod_15(Exception exception_0) { return exception_0.Message; } static void smethod_16(BinaryWriter binaryWriter_0) { binaryWriter_0.Flush(); } static void smethod_17(Socket socket_0) { socket_0.Close(); } } } <file_sep>/GameObjectFields.cs using System; public enum GameObjectFields { CreatedBy = 12, DisplayID = 16, Flags, ParentRotation, FactionTemplate = 22, Level, PercentHealth, SpellVisualID, StateSpellVisualID, SpawnTrackingStateAnimID, SpawnTrackingStateAnimKitID, StateWorldEffectID, End = 33 } <file_sep>/Google.Protobuf.WellKnownTypes/BytesValue.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class BytesValue : IMessage, IMessage<BytesValue>, IEquatable<BytesValue>, IDeepCloneable<BytesValue> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BytesValue.__c __9 = new BytesValue.__c(); internal BytesValue cctor>b__24_0() { return new BytesValue(); } } private static readonly MessageParser<BytesValue> _parser = new MessageParser<BytesValue>(new Func<BytesValue>(BytesValue.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private ByteString value_ = ByteString.Empty; public static MessageParser<BytesValue> Parser { get { return BytesValue._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return BytesValue.Descriptor; } } public ByteString Value { get { return this.value_; } set { this.value_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public BytesValue() { } public BytesValue(BytesValue other) : this() { this.value_ = other.value_; } public BytesValue Clone() { return new BytesValue(this); } public override bool Equals(object other) { return this.Equals(other as BytesValue); } public bool Equals(BytesValue other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 683592313) % 7) { case 0: arg_48_0 = ((!(this.Value != other.Value)) ? 652235535 : 996578275); continue; case 2: return false; case 3: goto IL_7A; case 4: return true; case 5: goto IL_12; case 6: return false; } break; } return true; IL_12: arg_48_0 = 1218751243; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 618196101 : 2036451939); goto IL_43; } public override int GetHashCode() { int num = 1; if (this.Value.Length != 0) { while (true) { IL_49: uint arg_31_0 = 2275274893u; while (true) { uint num2; switch ((num2 = (arg_31_0 ^ 3324681876u)) % 3u) { case 0u: goto IL_49; case 2u: num ^= BytesValue.smethod_0(this.Value); arg_31_0 = (num2 * 2954361594u ^ 2329351346u); continue; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value.Length != 0) { while (true) { IL_60: uint arg_44_0 = 3631218858u; while (true) { uint num; switch ((num = (arg_44_0 ^ 3322845955u)) % 4u) { case 1u: output.WriteRawTag(10); arg_44_0 = (num * 859552242u ^ 1997460187u); continue; case 2u: output.WriteBytes(this.Value); arg_44_0 = (num * 2944360117u ^ 3585588585u); continue; case 3u: goto IL_60; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_70: uint arg_54_0 = 2195808887u; while (true) { uint num2; switch ((num2 = (arg_54_0 ^ 3955346414u)) % 4u) { case 1u: arg_54_0 = (((this.Value.Length != 0) ? 1500120201u : 1924405691u) ^ num2 * 1083790369u); continue; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Value); arg_54_0 = (num2 * 2034812408u ^ 1168620562u); continue; case 3u: goto IL_70; } return num; } } return num; } public void MergeFrom(BytesValue other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2444393304u)) % 5u) { case 0u: goto IL_63; case 1u: return; case 2u: goto IL_2D; case 3u: this.Value = other.Value; arg_37_0 = (num * 1148991057u ^ 1649330358u); continue; } break; } return; IL_2D: arg_37_0 = 3417597038u; goto IL_32; IL_63: arg_37_0 = ((other.Value.Length == 0) ? 3520603776u : 3767567374u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) == 0u) ? 680166988u : 1821107942u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 8919087u)) % 7u) { case 0u: this.Value = input.ReadBytes(); arg_72_0 = 157599103u; continue; case 1u: arg_72_0 = ((num == 10u) ? 1443811098u : 1547626170u); continue; case 2u: arg_72_0 = (num2 * 2347725086u ^ 3138862833u); continue; case 3u: goto IL_A9; case 4u: input.SkipLastField(); arg_72_0 = (num2 * 2664935826u ^ 1414364828u); continue; case 6u: arg_72_0 = 1821107942u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/InvitationSuggestion.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class InvitationSuggestion : IMessage<InvitationSuggestion>, IEquatable<InvitationSuggestion>, IDeepCloneable<InvitationSuggestion>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly InvitationSuggestion.__c __9 = new InvitationSuggestion.__c(); internal InvitationSuggestion cctor>b__49_0() { return new InvitationSuggestion(); } } private static readonly MessageParser<InvitationSuggestion> _parser = new MessageParser<InvitationSuggestion>(new Func<InvitationSuggestion>(InvitationSuggestion.__c.__9.<.cctor>b__49_0)); public const int ChannelIdFieldNumber = 1; private EntityId channelId_; public const int SuggesterIdFieldNumber = 2; private EntityId suggesterId_; public const int SuggesteeIdFieldNumber = 3; private EntityId suggesteeId_; public const int SuggesterNameFieldNumber = 4; private string suggesterName_ = ""; public const int SuggesteeNameFieldNumber = 5; private string suggesteeName_ = ""; public const int SuggesterAccountIdFieldNumber = 6; private EntityId suggesterAccountId_; public static MessageParser<InvitationSuggestion> Parser { get { return InvitationSuggestion._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return InvitationSuggestion.Descriptor; } } public EntityId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public EntityId SuggesterId { get { return this.suggesterId_; } set { this.suggesterId_ = value; } } public EntityId SuggesteeId { get { return this.suggesteeId_; } set { this.suggesteeId_ = value; } } public string SuggesterName { get { return this.suggesterName_; } set { this.suggesterName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string SuggesteeName { get { return this.suggesteeName_; } set { this.suggesteeName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public EntityId SuggesterAccountId { get { return this.suggesterAccountId_; } set { this.suggesterAccountId_ = value; } } public InvitationSuggestion() { } public InvitationSuggestion(InvitationSuggestion other) : this() { while (true) { IL_D3: uint arg_B3_0 = 923504551u; while (true) { uint num; switch ((num = (arg_B3_0 ^ 101566266u)) % 5u) { case 0u: goto IL_D3; case 1u: this.suggesterName_ = other.suggesterName_; arg_B3_0 = (num * 831811723u ^ 3725736302u); continue; case 2u: this.suggesteeName_ = other.suggesteeName_; this.SuggesterAccountId = ((other.suggesterAccountId_ != null) ? other.SuggesterAccountId.Clone() : null); arg_B3_0 = 950075000u; continue; case 4u: this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); this.SuggesterId = ((other.suggesterId_ != null) ? other.SuggesterId.Clone() : null); this.SuggesteeId = ((other.suggesteeId_ != null) ? other.SuggesteeId.Clone() : null); arg_B3_0 = 1295009835u; continue; } return; } } } public InvitationSuggestion Clone() { return new InvitationSuggestion(this); } public override bool Equals(object other) { return this.Equals(other as InvitationSuggestion); } public bool Equals(InvitationSuggestion other) { if (other == null) { goto IL_12C; } goto IL_194; int arg_136_0; while (true) { IL_131: switch ((arg_136_0 ^ -1418549231) % 17) { case 0: goto IL_194; case 1: return false; case 2: goto IL_12C; case 3: arg_136_0 = ((!InvitationSuggestion.smethod_0(this.SuggesterAccountId, other.SuggesterAccountId)) ? -2136050683 : -218472277); continue; case 4: return false; case 5: arg_136_0 = (InvitationSuggestion.smethod_0(this.SuggesteeId, other.SuggesteeId) ? -895494629 : -1831385974); continue; case 6: return false; case 7: return false; case 8: arg_136_0 = (InvitationSuggestion.smethod_0(this.ChannelId, other.ChannelId) ? -1500949206 : -672596040); continue; case 9: arg_136_0 = (InvitationSuggestion.smethod_1(this.SuggesteeName, other.SuggesteeName) ? -847041342 : -1365576741); continue; case 10: return false; case 11: arg_136_0 = (InvitationSuggestion.smethod_1(this.SuggesterName, other.SuggesterName) ? -582847877 : -1568410003); continue; case 12: return true; case 13: return false; case 14: return false; case 15: arg_136_0 = ((!InvitationSuggestion.smethod_0(this.SuggesterId, other.SuggesterId)) ? -357839470 : -1251426085); continue; } break; } return true; IL_12C: arg_136_0 = -1670833078; goto IL_131; IL_194: arg_136_0 = ((other == this) ? -471326322 : -679116353); goto IL_131; } public override int GetHashCode() { int num = 1; if (this.channelId_ != null) { goto IL_72; } goto IL_14E; uint arg_119_0; while (true) { IL_114: uint num2; switch ((num2 = (arg_119_0 ^ 1240381045u)) % 10u) { case 0u: num ^= InvitationSuggestion.smethod_2(this.SuggesteeName); arg_119_0 = (num2 * 2802701932u ^ 2138981979u); continue; case 1u: num ^= InvitationSuggestion.smethod_2(this.SuggesterName); arg_119_0 = (num2 * 667275016u ^ 3012329370u); continue; case 2u: num ^= InvitationSuggestion.smethod_2(this.ChannelId); arg_119_0 = (num2 * 4005828524u ^ 1597893404u); continue; case 3u: arg_119_0 = ((InvitationSuggestion.smethod_3(this.SuggesteeName) != 0) ? 711576341u : 1118397147u); continue; case 4u: num ^= InvitationSuggestion.smethod_2(this.SuggesterAccountId); arg_119_0 = (num2 * 2183770001u ^ 3120043821u); continue; case 5u: goto IL_72; case 7u: goto IL_14E; case 8u: arg_119_0 = ((this.suggesterAccountId_ == null) ? 859635899u : 1083255107u); continue; case 9u: num ^= InvitationSuggestion.smethod_2(this.SuggesteeId); arg_119_0 = (((InvitationSuggestion.smethod_3(this.SuggesterName) == 0) ? 1007220131u : 1353237551u) ^ num2 * 203152565u); continue; } break; } return num; IL_72: arg_119_0 = 1891852499u; goto IL_114; IL_14E: num ^= InvitationSuggestion.smethod_2(this.SuggesterId); arg_119_0 = 983592072u; goto IL_114; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.channelId_ != null) { goto IL_45; } goto IL_1E4; uint arg_19B_0; while (true) { IL_196: uint num; switch ((num = (arg_19B_0 ^ 1401088666u)) % 15u) { case 0u: arg_19B_0 = ((this.suggesterAccountId_ == null) ? 1156015397u : 1950123970u); continue; case 1u: output.WriteMessage(this.ChannelId); arg_19B_0 = (num * 2197614798u ^ 3753927412u); continue; case 2u: goto IL_1E4; case 3u: arg_19B_0 = (((InvitationSuggestion.smethod_3(this.SuggesterName) != 0) ? 3332444920u : 2403610705u) ^ num * 790011979u); continue; case 4u: output.WriteRawTag(10); arg_19B_0 = (num * 464976099u ^ 4159653503u); continue; case 5u: arg_19B_0 = ((InvitationSuggestion.smethod_3(this.SuggesteeName) != 0) ? 2068816530u : 2142368912u); continue; case 6u: output.WriteRawTag(50); output.WriteMessage(this.SuggesterAccountId); arg_19B_0 = (num * 1932786831u ^ 3010384141u); continue; case 7u: output.WriteMessage(this.SuggesterId); arg_19B_0 = (num * 2408723726u ^ 801297002u); continue; case 9u: output.WriteString(this.SuggesterName); arg_19B_0 = (num * 3855396629u ^ 2363587688u); continue; case 10u: output.WriteRawTag(42); output.WriteString(this.SuggesteeName); arg_19B_0 = (num * 2599933363u ^ 3682726152u); continue; case 11u: output.WriteRawTag(26); arg_19B_0 = (num * 2736694029u ^ 2112272217u); continue; case 12u: goto IL_45; case 13u: output.WriteRawTag(34); arg_19B_0 = (num * 619878697u ^ 389352549u); continue; case 14u: output.WriteMessage(this.SuggesteeId); arg_19B_0 = (num * 4074381017u ^ 4097648481u); continue; } break; } return; IL_45: arg_19B_0 = 1161032975u; goto IL_196; IL_1E4: output.WriteRawTag(18); arg_19B_0 = 1445506212u; goto IL_196; } public int CalculateSize() { int num = 0; while (true) { IL_1A9: uint arg_16C_0 = 3179800592u; while (true) { uint num2; switch ((num2 = (arg_16C_0 ^ 2174748983u)) % 12u) { case 0u: arg_16C_0 = ((this.suggesterAccountId_ != null) ? 2683967130u : 4215314621u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_16C_0 = (num2 * 2277467505u ^ 1106949385u); continue; case 3u: arg_16C_0 = (((this.channelId_ == null) ? 2290530223u : 4103572065u) ^ num2 * 728596625u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.SuggesterName); arg_16C_0 = (num2 * 3903464918u ^ 1181517770u); continue; case 5u: arg_16C_0 = ((InvitationSuggestion.smethod_3(this.SuggesteeName) == 0) ? 2489075263u : 3702853953u); continue; case 6u: arg_16C_0 = (((InvitationSuggestion.smethod_3(this.SuggesterName) == 0) ? 2376649406u : 2948832887u) ^ num2 * 604669518u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SuggesterId); arg_16C_0 = 3256908080u; continue; case 8u: goto IL_1A9; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SuggesterAccountId); arg_16C_0 = (num2 * 340963548u ^ 1340387345u); continue; case 10u: num += 1 + CodedOutputStream.ComputeStringSize(this.SuggesteeName); arg_16C_0 = (num2 * 1022255053u ^ 1475356225u); continue; case 11u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SuggesteeId); arg_16C_0 = (num2 * 1170205037u ^ 2245506766u); continue; } return num; } } return num; } public void MergeFrom(InvitationSuggestion other) { if (other == null) { goto IL_260; } goto IL_31B; uint arg_2A3_0; while (true) { IL_29E: uint num; switch ((num = (arg_2A3_0 ^ 1006691244u)) % 23u) { case 0u: this.ChannelId.MergeFrom(other.ChannelId); arg_2A3_0 = 495137104u; continue; case 1u: arg_2A3_0 = ((other.suggesterAccountId_ == null) ? 1993422753u : 753686612u); continue; case 2u: goto IL_260; case 3u: arg_2A3_0 = (((this.suggesteeId_ == null) ? 1207044086u : 1967447391u) ^ num * 3364392259u); continue; case 4u: this.suggesterId_ = new EntityId(); arg_2A3_0 = (num * 1045098435u ^ 2702039702u); continue; case 5u: this.SuggesteeId.MergeFrom(other.SuggesteeId); arg_2A3_0 = 830495254u; continue; case 6u: this.SuggesterId.MergeFrom(other.SuggesterId); arg_2A3_0 = 576429852u; continue; case 7u: arg_2A3_0 = (((this.suggesterAccountId_ != null) ? 1605997734u : 147686950u) ^ num * 735477218u); continue; case 8u: arg_2A3_0 = ((other.suggesterId_ != null) ? 1249187981u : 576429852u); continue; case 9u: arg_2A3_0 = (((this.channelId_ == null) ? 57425618u : 1186019633u) ^ num * 3921884949u); continue; case 10u: this.SuggesterAccountId.MergeFrom(other.SuggesterAccountId); arg_2A3_0 = 1993422753u; continue; case 11u: arg_2A3_0 = (((this.suggesterId_ == null) ? 1252001890u : 1533694474u) ^ num * 1628961321u); continue; case 12u: this.SuggesteeName = other.SuggesteeName; arg_2A3_0 = (num * 4287128908u ^ 1153866285u); continue; case 13u: arg_2A3_0 = ((InvitationSuggestion.smethod_3(other.SuggesterName) == 0) ? 1866213443u : 2081000305u); continue; case 14u: this.suggesteeId_ = new EntityId(); arg_2A3_0 = (num * 102155408u ^ 612457071u); continue; case 15u: arg_2A3_0 = ((other.suggesteeId_ == null) ? 830495254u : 1760228764u); continue; case 16u: this.channelId_ = new EntityId(); arg_2A3_0 = (num * 4109819045u ^ 470032875u); continue; case 17u: goto IL_31B; case 18u: arg_2A3_0 = ((InvitationSuggestion.smethod_3(other.SuggesteeName) != 0) ? 1903844745u : 148607441u); continue; case 19u: this.SuggesterName = other.SuggesterName; arg_2A3_0 = (num * 1478669548u ^ 3841861631u); continue; case 21u: return; case 22u: this.suggesterAccountId_ = new EntityId(); arg_2A3_0 = (num * 1990182484u ^ 3168654430u); continue; } break; } return; IL_260: arg_2A3_0 = 1559605133u; goto IL_29E; IL_31B: arg_2A3_0 = ((other.channelId_ != null) ? 1957145519u : 495137104u); goto IL_29E; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3A6: uint num; uint arg_312_0 = ((num = input.ReadTag()) == 0u) ? 326491874u : 1160815361u; while (true) { uint num2; switch ((num2 = (arg_312_0 ^ 235255381u)) % 30u) { case 0u: arg_312_0 = (num2 * 1361077101u ^ 171641408u); continue; case 1u: arg_312_0 = ((this.suggesterId_ == null) ? 2127596175u : 948717331u); continue; case 2u: arg_312_0 = (num2 * 1684155503u ^ 3253587660u); continue; case 3u: arg_312_0 = (num2 * 4043847144u ^ 3515403356u); continue; case 4u: arg_312_0 = ((this.channelId_ != null) ? 2120109861u : 1583921255u); continue; case 5u: this.suggesteeId_ = new EntityId(); arg_312_0 = (num2 * 1791477655u ^ 2417178947u); continue; case 6u: input.ReadMessage(this.suggesterAccountId_); arg_312_0 = 1527009636u; continue; case 7u: input.SkipLastField(); arg_312_0 = 1572889767u; continue; case 8u: arg_312_0 = ((num <= 26u) ? 731568461u : 1356056686u); continue; case 9u: input.ReadMessage(this.suggesteeId_); arg_312_0 = 1527009636u; continue; case 10u: arg_312_0 = (((num == 26u) ? 98268982u : 329403365u) ^ num2 * 3319886274u); continue; case 11u: arg_312_0 = ((this.suggesteeId_ == null) ? 1231135192u : 182470248u); continue; case 12u: arg_312_0 = (num2 * 4280375714u ^ 1404292672u); continue; case 13u: arg_312_0 = ((num != 34u) ? 520046364u : 1819704682u); continue; case 14u: arg_312_0 = (num2 * 914542339u ^ 1634846994u); continue; case 15u: arg_312_0 = 1160815361u; continue; case 16u: arg_312_0 = (((num == 10u) ? 2562448477u : 2765934402u) ^ num2 * 2585703342u); continue; case 17u: arg_312_0 = (((num == 18u) ? 386177064u : 770102681u) ^ num2 * 2932145240u); continue; case 18u: this.suggesterId_ = new EntityId(); arg_312_0 = (num2 * 3321372159u ^ 2045773877u); continue; case 19u: this.SuggesteeName = input.ReadString(); arg_312_0 = 350701709u; continue; case 20u: arg_312_0 = ((this.suggesterAccountId_ == null) ? 731701949u : 739221281u); continue; case 21u: goto IL_3A6; case 22u: input.ReadMessage(this.suggesterId_); arg_312_0 = 1318476390u; continue; case 24u: input.ReadMessage(this.channelId_); arg_312_0 = 1527009636u; continue; case 25u: arg_312_0 = (((num != 42u) ? 60968406u : 814787386u) ^ num2 * 632838744u); continue; case 26u: this.suggesterAccountId_ = new EntityId(); arg_312_0 = (num2 * 1311257761u ^ 2464291529u); continue; case 27u: arg_312_0 = (((num == 50u) ? 3442620892u : 3389198585u) ^ num2 * 3760827891u); continue; case 28u: this.channelId_ = new EntityId(); arg_312_0 = (num2 * 3982606531u ^ 3338084147u); continue; case 29u: this.SuggesterName = input.ReadString(); arg_312_0 = 91172487u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Framework.Misc/Command.cs using Framework.Constants.Misc; using Framework.Logging; using System; using System.Globalization; namespace Framework.Misc { public class Command { public static T Read<T>(string[] args, int index) { try { return (T)((object)Command.smethod_3(args[index], Command.smethod_0(typeof(T).TypeHandle), Command.smethod_2(Command.smethod_1(Module.smethod_35<string>(1267173403u))))); } catch { while (true) { IL_76: uint arg_3A_0 = 890358424u; while (true) { uint num; switch ((num = (arg_3A_0 ^ 1357817321u)) % 3u) { case 1u: Log.Message(LogType.Error, Module.smethod_36<string>(1444018955u), Array.Empty<object>()); arg_3A_0 = (num * 2803661342u ^ 3561087243u); continue; case 2u: goto IL_76; } goto Block_3; } } Block_3:; } return default(T); } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static CultureInfo smethod_1(string string_0) { return CultureInfo.GetCultureInfo(string_0); } static NumberFormatInfo smethod_2(CultureInfo cultureInfo_0) { return cultureInfo_0.NumberFormat; } static object smethod_3(object object_0, Type type_0, IFormatProvider iformatProvider_0) { return Convert.ChangeType(object_0, type_0, iformatProvider_0); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeExternalRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeExternalRequest : IMessage<ChallengeExternalRequest>, IEquatable<ChallengeExternalRequest>, IDeepCloneable<ChallengeExternalRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeExternalRequest.__c __9 = new ChallengeExternalRequest.__c(); internal ChallengeExternalRequest cctor>b__34_0() { return new ChallengeExternalRequest(); } } private static readonly MessageParser<ChallengeExternalRequest> _parser = new MessageParser<ChallengeExternalRequest>(new Func<ChallengeExternalRequest>(ChallengeExternalRequest.__c.__9.<.cctor>b__34_0)); public const int RequestTokenFieldNumber = 1; private string requestToken_ = ""; public const int PayloadTypeFieldNumber = 2; private string payloadType_ = ""; public const int PayloadFieldNumber = 3; private ByteString payload_ = ByteString.Empty; public static MessageParser<ChallengeExternalRequest> Parser { get { return ChallengeExternalRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeExternalRequest.Descriptor; } } public string RequestToken { get { return this.requestToken_; } set { this.requestToken_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string PayloadType { get { return this.payloadType_; } set { this.payloadType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public ByteString Payload { get { return this.payload_; } set { this.payload_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public ChallengeExternalRequest() { } public ChallengeExternalRequest(ChallengeExternalRequest other) : this() { this.requestToken_ = other.requestToken_; this.payloadType_ = other.payloadType_; this.payload_ = other.payload_; } public ChallengeExternalRequest Clone() { return new ChallengeExternalRequest(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeExternalRequest); } public bool Equals(ChallengeExternalRequest other) { if (other == null) { goto IL_70; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ 1695910302) % 11) { case 0: arg_A6_0 = ((!(this.Payload != other.Payload)) ? 1519198458 : 625326582); continue; case 1: return false; case 3: goto IL_70; case 4: arg_A6_0 = (ChallengeExternalRequest.smethod_0(this.PayloadType, other.PayloadType) ? 1201012305 : 1992792721); continue; case 5: return false; case 6: return false; case 7: return false; case 8: goto IL_EC; case 9: arg_A6_0 = (ChallengeExternalRequest.smethod_0(this.RequestToken, other.RequestToken) ? 1315697662 : 1505883054); continue; case 10: return true; } break; } return true; IL_70: arg_A6_0 = 1221291662; goto IL_A1; IL_EC: arg_A6_0 = ((other == this) ? 2037068233 : 1295539271); goto IL_A1; } public override int GetHashCode() { int num = 1; while (true) { IL_10A: uint arg_DE_0 = 103090759u; while (true) { uint num2; switch ((num2 = (arg_DE_0 ^ 509881569u)) % 8u) { case 0u: num ^= ChallengeExternalRequest.smethod_2(this.RequestToken); arg_DE_0 = (num2 * 2813084955u ^ 1546608302u); continue; case 1u: num ^= ChallengeExternalRequest.smethod_2(this.PayloadType); arg_DE_0 = (num2 * 3775705742u ^ 38729699u); continue; case 3u: goto IL_10A; case 4u: arg_DE_0 = ((this.Payload.Length == 0) ? 1165224939u : 1411168868u); continue; case 5u: num ^= ChallengeExternalRequest.smethod_2(this.Payload); arg_DE_0 = (num2 * 3911931272u ^ 2853368899u); continue; case 6u: arg_DE_0 = (((ChallengeExternalRequest.smethod_1(this.RequestToken) == 0) ? 2013647004u : 770163971u) ^ num2 * 1711997567u); continue; case 7u: arg_DE_0 = ((ChallengeExternalRequest.smethod_1(this.PayloadType) != 0) ? 723734128u : 1034127757u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (ChallengeExternalRequest.smethod_1(this.RequestToken) != 0) { goto IL_63; } goto IL_11C; uint arg_DC_0; while (true) { IL_D7: uint num; switch ((num = (arg_DC_0 ^ 2462102150u)) % 9u) { case 0u: output.WriteString(this.PayloadType); arg_DC_0 = (num * 4286194588u ^ 3240584954u); continue; case 2u: output.WriteRawTag(10); arg_DC_0 = (num * 1105868492u ^ 2968398076u); continue; case 3u: goto IL_11C; case 4u: arg_DC_0 = ((this.Payload.Length == 0) ? 2458781918u : 3844947984u); continue; case 5u: output.WriteRawTag(18); arg_DC_0 = (num * 878246125u ^ 2200378580u); continue; case 6u: goto IL_63; case 7u: output.WriteRawTag(26); output.WriteBytes(this.Payload); arg_DC_0 = (num * 3069875685u ^ 3255387888u); continue; case 8u: output.WriteString(this.RequestToken); arg_DC_0 = (num * 4009652249u ^ 2485387475u); continue; } break; } return; IL_63: arg_DC_0 = 3757452087u; goto IL_D7; IL_11C: arg_DC_0 = ((ChallengeExternalRequest.smethod_1(this.PayloadType) == 0) ? 3238427694u : 3806665971u); goto IL_D7; } public int CalculateSize() { int num = 0; while (true) { IL_113: uint arg_E7_0 = 1979219713u; while (true) { uint num2; switch ((num2 = (arg_E7_0 ^ 1696789871u)) % 8u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.PayloadType); arg_E7_0 = (num2 * 50614569u ^ 965450504u); continue; case 1u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Payload); arg_E7_0 = (num2 * 3546594442u ^ 1235847903u); continue; case 3u: goto IL_113; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.RequestToken); arg_E7_0 = (num2 * 1141837711u ^ 4092122646u); continue; case 5u: arg_E7_0 = ((ChallengeExternalRequest.smethod_1(this.PayloadType) != 0) ? 1913222607u : 1705091752u); continue; case 6u: arg_E7_0 = (((ChallengeExternalRequest.smethod_1(this.RequestToken) != 0) ? 3271781957u : 3859358852u) ^ num2 * 3971099137u); continue; case 7u: arg_E7_0 = ((this.Payload.Length == 0) ? 1006945157u : 146706982u); continue; } return num; } } return num; } public void MergeFrom(ChallengeExternalRequest other) { if (other == null) { goto IL_18; } goto IL_105; uint arg_C5_0; while (true) { IL_C0: uint num; switch ((num = (arg_C5_0 ^ 3570964083u)) % 9u) { case 0u: this.Payload = other.Payload; arg_C5_0 = (num * 3188902421u ^ 3230562706u); continue; case 1u: goto IL_105; case 2u: arg_C5_0 = ((ChallengeExternalRequest.smethod_1(other.PayloadType) == 0) ? 3911114294u : 3825926423u); continue; case 3u: this.RequestToken = other.RequestToken; arg_C5_0 = (num * 725965706u ^ 2722436065u); continue; case 4u: arg_C5_0 = ((other.Payload.Length == 0) ? 2510022756u : 3925091309u); continue; case 5u: return; case 6u: this.PayloadType = other.PayloadType; arg_C5_0 = (num * 2260112763u ^ 2092969786u); continue; case 7u: goto IL_18; } break; } return; IL_18: arg_C5_0 = 3669477583u; goto IL_C0; IL_105: arg_C5_0 = ((ChallengeExternalRequest.smethod_1(other.RequestToken) != 0) ? 2305347568u : 4034249343u); goto IL_C0; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14E: uint num; uint arg_102_0 = ((num = input.ReadTag()) != 0u) ? 3500654313u : 3222165756u; while (true) { uint num2; switch ((num2 = (arg_102_0 ^ 3528836428u)) % 12u) { case 0u: this.Payload = input.ReadBytes(); arg_102_0 = 3817786284u; continue; case 1u: arg_102_0 = ((num == 10u) ? 2356274110u : 4221718145u); continue; case 2u: this.RequestToken = input.ReadString(); arg_102_0 = 2906630127u; continue; case 3u: this.PayloadType = input.ReadString(); arg_102_0 = 3670636303u; continue; case 5u: arg_102_0 = (((num != 18u) ? 976939095u : 2041464394u) ^ num2 * 3566441477u); continue; case 6u: arg_102_0 = 3500654313u; continue; case 7u: arg_102_0 = (num2 * 3038429617u ^ 1929840895u); continue; case 8u: goto IL_14E; case 9u: input.SkipLastField(); arg_102_0 = (num2 * 1718633076u ^ 3838185576u); continue; case 10u: arg_102_0 = (((num != 26u) ? 1442711103u : 1598577750u) ^ num2 * 2362987127u); continue; case 11u: arg_102_0 = (num2 * 4092972414u ^ 3856062614u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/CredentialUpdateResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class CredentialUpdateResponse : IMessage<CredentialUpdateResponse>, IEquatable<CredentialUpdateResponse>, IDeepCloneable<CredentialUpdateResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CredentialUpdateResponse.__c __9 = new CredentialUpdateResponse.__c(); internal CredentialUpdateResponse cctor>b__19_0() { return new CredentialUpdateResponse(); } } private static readonly MessageParser<CredentialUpdateResponse> _parser = new MessageParser<CredentialUpdateResponse>(new Func<CredentialUpdateResponse>(CredentialUpdateResponse.__c.__9.<.cctor>b__19_0)); public static MessageParser<CredentialUpdateResponse> Parser { get { return CredentialUpdateResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return CredentialUpdateResponse.Descriptor; } } public CredentialUpdateResponse() { } public CredentialUpdateResponse(CredentialUpdateResponse other) : this() { } public CredentialUpdateResponse Clone() { return new CredentialUpdateResponse(this); } public override bool Equals(object other) { return this.Equals(other as CredentialUpdateResponse); } public bool Equals(CredentialUpdateResponse other) { return other != null; } public override int GetHashCode() { return 1; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { } public int CalculateSize() { return 0; } public void MergeFrom(CredentialUpdateResponse other) { } public void MergeFrom(CodedInputStream input) { while (true) { IL_4D: int arg_27_0 = (input.ReadTag() == 0u) ? 584742882 : 1961906649; while (true) { switch ((arg_27_0 ^ 620734972) % 4) { case 0: goto IL_4D; case 1: input.SkipLastField(); arg_27_0 = 1831403312; continue; case 3: arg_27_0 = 1961906649; continue; } return; } } } } } <file_sep>/SceneObjectFields.cs using System; public enum SceneObjectFields { ScriptPackageID = 12, RndSeedVal, CreatedBy, SceneType = 18, End } <file_sep>/Framework.Cryptography.WoW/RsaCrypt.cs using Framework.Misc; using System; using System.Numerics; namespace Framework.Cryptography.WoW { public class RsaCrypt : IDisposable { private BigInteger e; private BigInteger n; private BigInteger p; private BigInteger q; private BigInteger dp; private BigInteger dq; private BigInteger iq; private bool isEncryptionInitialized; private bool isDecryptionInitialized; public RsaCrypt() { while (true) { IL_38: uint arg_20_0 = 1224067742u; while (true) { uint num; switch ((num = (arg_20_0 ^ 650372566u)) % 3u) { case 1u: this.Dispose(); arg_20_0 = (num * 1464307623u ^ 3537697434u); continue; case 2u: goto IL_38; } return; } } } public void InitializeEncryption(RsaData rsaData) { this.InitializeEncryption<byte[]>(rsaData.RsaParams.D, rsaData.RsaParams.P, rsaData.RsaParams.Q, rsaData.RsaParams.DP, rsaData.RsaParams.DQ, rsaData.RsaParams.InverseQ, false); } public void InitializeEncryption<T>(T d, T p, T q, T dp, T dq, T iq, bool isBigEndian = false) { this.p = p.ToBigInteger(isBigEndian); while (true) { IL_10B: uint arg_DF_0 = 2245496402u; while (true) { uint num; switch ((num = (arg_DF_0 ^ 4189837469u)) % 8u) { case 0u: goto IL_112; case 1u: this.dp = dp.ToBigInteger(isBigEndian); arg_DF_0 = (num * 3569613934u ^ 3627706137u); continue; case 2u: this.dq = dq.ToBigInteger(isBigEndian); this.iq = iq.ToBigInteger(isBigEndian); arg_DF_0 = (((!this.p.IsZero) ? 682123864u : 2063844238u) ^ num * 1766608332u); continue; case 3u: arg_DF_0 = (((!this.q.IsZero) ? 640972758u : 1519380307u) ^ num * 119177762u); continue; case 5u: this.isEncryptionInitialized = true; arg_DF_0 = 3035994489u; continue; case 6u: goto IL_10B; case 7u: this.q = q.ToBigInteger(isBigEndian); arg_DF_0 = (num * 4056462446u ^ 2986954358u); continue; } goto Block_3; } } Block_3: return; IL_112: throw new InvalidOperationException(Module.smethod_34<string>(2154924629u)); } public void InitializeDecryption(RsaData rsaData) { this.InitializeDecryption<byte[]>(rsaData.RsaParams.Exponent, rsaData.RsaParams.Modulus, false); } public void InitializeDecryption<T>(T e, T n, bool reverseBytes = false) { this.e = e.ToBigInteger(reverseBytes); this.n = n.ToBigInteger(reverseBytes); while (true) { IL_4D: uint arg_35_0 = 1713286744u; while (true) { uint num; switch ((num = (arg_35_0 ^ 848976753u)) % 3u) { case 1u: this.isDecryptionInitialized = true; arg_35_0 = (num * 481015517u ^ 2168650542u); continue; case 2u: goto IL_4D; } return; } } } public byte[] Encrypt<T>(T data, bool isBigEndian = false) { if (!this.isEncryptionInitialized) { goto IL_36; } goto IL_82; uint arg_5D_0; BigInteger bigInteger; while (true) { IL_58: uint num; switch ((num = (arg_5D_0 ^ 679079837u)) % 6u) { case 0u: bigInteger = this.p + bigInteger; arg_5D_0 = (num * 1985006744u ^ 19782673u); continue; case 1u: goto IL_EC; case 3u: goto IL_82; case 4u: goto IL_36; case 5u: arg_5D_0 = (((bigInteger.Sign == -1) ? 4028650168u : 2508738494u) ^ num * 699542497u); continue; } break; } goto IL_FC; IL_EC: throw RsaCrypt.smethod_0(Module.smethod_33<string>(232536431u)); IL_FC: BigInteger bigInteger2; return (bigInteger2 + bigInteger * this.q).ToByteArray(); IL_36: arg_5D_0 = 1134742188u; goto IL_58; IL_82: BigInteger expr_89 = data.ToBigInteger(isBigEndian); BigInteger left = BigInteger.ModPow(expr_89 % this.p, this.dp, this.p); bigInteger2 = BigInteger.ModPow(expr_89 % this.q, this.dq, this.q); bigInteger = this.iq * (left - bigInteger2) % this.p; arg_5D_0 = 1070365730u; goto IL_58; } public byte[] Decrypt<T>(T data, bool isBigEndian = false) { if (this.isDecryptionInitialized) { goto IL_2C; } IL_08: int arg_12_0 = 239526367; IL_0D: BigInteger bigInteger; switch ((arg_12_0 ^ 1966150740) % 4) { case 0: IL_2C: bigInteger = BigInteger.ModPow(data.ToBigInteger(isBigEndian), this.e, this.n); arg_12_0 = 1511172245; goto IL_0D; case 2: goto IL_08; case 3: throw RsaCrypt.smethod_0(Module.smethod_35<string>(280647186u)); } return bigInteger.ToByteArray(); } public void Dispose() { this.e = 0; while (true) { IL_C3: uint arg_9F_0 = 4065569097u; while (true) { uint num; switch ((num = (arg_9F_0 ^ 2974304486u)) % 6u) { case 0u: this.p = 0; this.q = 0; this.dp = 0; arg_9F_0 = (num * 2306955122u ^ 474136700u); continue; case 2u: this.isEncryptionInitialized = false; arg_9F_0 = (num * 3870332532u ^ 3333208883u); continue; case 3u: goto IL_C3; case 4u: this.dq = 0; this.iq = 0; arg_9F_0 = (num * 4065023096u ^ 1485229962u); continue; case 5u: this.n = 0; arg_9F_0 = (num * 413936356u ^ 2893227200u); continue; } goto Block_1; } } Block_1: this.isDecryptionInitialized = false; } static InvalidOperationException smethod_0(string string_0) { return new InvalidOperationException(string_0); } } } <file_sep>/Google.Protobuf/IMessage.cs using Google.Protobuf.Reflection; using System; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public interface IMessage { MessageDescriptor Descriptor { get; } void MergeFrom(CodedInputStream input); void WriteTo(CodedOutputStream output); int CalculateSize(); } [ComVisible(true)] public interface IMessage<T> : IEquatable<T>, IDeepCloneable<T>, IMessage where T : object, IMessage<T> { void MergeFrom(T message); } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengePickedResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengePickedResponse : IMessage<ChallengePickedResponse>, IEquatable<ChallengePickedResponse>, IDeepCloneable<ChallengePickedResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengePickedResponse.__c __9 = new ChallengePickedResponse.__c(); internal ChallengePickedResponse cctor>b__24_0() { return new ChallengePickedResponse(); } } private static readonly MessageParser<ChallengePickedResponse> _parser = new MessageParser<ChallengePickedResponse>(new Func<ChallengePickedResponse>(ChallengePickedResponse.__c.__9.<.cctor>b__24_0)); public const int DataFieldNumber = 1; private ByteString data_ = ByteString.Empty; public static MessageParser<ChallengePickedResponse> Parser { get { return ChallengePickedResponse._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengePickedResponse.Descriptor; } } public ByteString Data { get { return this.data_; } set { this.data_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_35<string>(4287036u)); } } public ChallengePickedResponse() { } public ChallengePickedResponse(ChallengePickedResponse other) : this() { while (true) { IL_3E: uint arg_26_0 = 2805006404u; while (true) { uint num; switch ((num = (arg_26_0 ^ 3179147556u)) % 3u) { case 0u: goto IL_3E; case 1u: this.data_ = other.data_; arg_26_0 = (num * 1947258650u ^ 2659167506u); continue; } return; } } } public ChallengePickedResponse Clone() { return new ChallengePickedResponse(this); } public override bool Equals(object other) { return this.Equals(other as ChallengePickedResponse); } public bool Equals(ChallengePickedResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -87630199) % 7) { case 0: goto IL_7A; case 1: arg_48_0 = ((this.Data != other.Data) ? -896903363 : -1889824472); continue; case 2: goto IL_12; case 3: return true; case 4: return false; case 6: return false; } break; } return true; IL_12: arg_48_0 = -1849173859; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -2138460242 : -549314834); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 1760463255u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 649614973u)) % 4u) { case 1u: num ^= ChallengePickedResponse.smethod_0(this.Data); arg_52_0 = (num2 * 2309627541u ^ 3187575080u); continue; case 2u: arg_52_0 = (((this.Data.Length == 0) ? 2805514967u : 3638764182u) ^ num2 * 3101521713u); continue; case 3u: goto IL_6E; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Data.Length != 0) { while (true) { IL_60: uint arg_44_0 = 2743080734u; while (true) { uint num; switch ((num = (arg_44_0 ^ 2908246661u)) % 4u) { case 0u: goto IL_60; case 1u: output.WriteBytes(this.Data); arg_44_0 = (num * 1625214539u ^ 2049915632u); continue; case 3u: output.WriteRawTag(10); arg_44_0 = (num * 4209332291u ^ 3369884993u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.Data.Length != 0) { while (true) { IL_4B: uint arg_33_0 = 3010724146u; while (true) { uint num2; switch ((num2 = (arg_33_0 ^ 3690942653u)) % 3u) { case 0u: goto IL_4B; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Data); arg_33_0 = (num2 * 2667910640u ^ 992826152u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(ChallengePickedResponse other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1439505469u)) % 5u) { case 0u: goto IL_2D; case 1u: goto IL_63; case 3u: this.Data = other.Data; arg_37_0 = (num * 3013708504u ^ 4268836230u); continue; case 4u: return; } break; } return; IL_2D: arg_37_0 = 1907645714u; goto IL_32; IL_63: arg_37_0 = ((other.Data.Length != 0) ? 369386015u : 387155254u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_96: uint num; uint arg_63_0 = ((num = input.ReadTag()) != 0u) ? 753317514u : 1279041146u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 1972414482u)) % 6u) { case 1u: goto IL_96; case 2u: arg_63_0 = ((num != 10u) ? 2018434581u : 878510082u); continue; case 3u: input.SkipLastField(); arg_63_0 = (num2 * 2757638124u ^ 768878309u); continue; case 4u: this.Data = input.ReadBytes(); arg_63_0 = 1255565713u; continue; case 5u: arg_63_0 = 753317514u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountFieldTags.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountFieldTags : IMessage<GameAccountFieldTags>, IEquatable<GameAccountFieldTags>, IDeepCloneable<GameAccountFieldTags>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountFieldTags.__c __9 = new GameAccountFieldTags.__c(); internal GameAccountFieldTags cctor>b__39_0() { return new GameAccountFieldTags(); } } private static readonly MessageParser<GameAccountFieldTags> _parser = new MessageParser<GameAccountFieldTags>(new Func<GameAccountFieldTags>(GameAccountFieldTags.__c.__9.<.cctor>b__39_0)); public const int GameLevelInfoTagFieldNumber = 2; private uint gameLevelInfoTag_; public const int GameTimeInfoTagFieldNumber = 3; private uint gameTimeInfoTag_; public const int GameStatusTagFieldNumber = 4; private uint gameStatusTag_; public const int RafInfoTagFieldNumber = 5; private uint rafInfoTag_; public static MessageParser<GameAccountFieldTags> Parser { get { return GameAccountFieldTags._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[14]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountFieldTags.Descriptor; } } public uint GameLevelInfoTag { get { return this.gameLevelInfoTag_; } set { this.gameLevelInfoTag_ = value; } } public uint GameTimeInfoTag { get { return this.gameTimeInfoTag_; } set { this.gameTimeInfoTag_ = value; } } public uint GameStatusTag { get { return this.gameStatusTag_; } set { this.gameStatusTag_ = value; } } public uint RafInfoTag { get { return this.rafInfoTag_; } set { this.rafInfoTag_ = value; } } public GameAccountFieldTags() { } public GameAccountFieldTags(GameAccountFieldTags other) : this() { this.gameLevelInfoTag_ = other.gameLevelInfoTag_; this.gameTimeInfoTag_ = other.gameTimeInfoTag_; this.gameStatusTag_ = other.gameStatusTag_; this.rafInfoTag_ = other.rafInfoTag_; } public GameAccountFieldTags Clone() { return new GameAccountFieldTags(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountFieldTags); } public bool Equals(GameAccountFieldTags other) { if (other == null) { goto IL_18; } goto IL_10F; int arg_C1_0; while (true) { IL_BC: switch ((arg_C1_0 ^ -1659054172) % 13) { case 0: arg_C1_0 = ((this.GameStatusTag != other.GameStatusTag) ? -1592459687 : -173664115); continue; case 1: return false; case 2: arg_C1_0 = ((this.GameTimeInfoTag == other.GameTimeInfoTag) ? -894563933 : -1114876485); continue; case 3: return true; case 4: return false; case 5: arg_C1_0 = ((this.RafInfoTag == other.RafInfoTag) ? -2141771685 : -1866164229); continue; case 6: return false; case 7: return false; case 8: arg_C1_0 = ((this.GameLevelInfoTag == other.GameLevelInfoTag) ? -293355725 : -656973293); continue; case 10: goto IL_10F; case 11: return false; case 12: goto IL_18; } break; } return true; IL_18: arg_C1_0 = -1785546666; goto IL_BC; IL_10F: arg_C1_0 = ((other == this) ? -981901790 : -1441160984); goto IL_BC; } public override int GetHashCode() { int num = 1; if (this.GameLevelInfoTag != 0u) { goto IL_1F; } goto IL_131; uint arg_F1_0; while (true) { IL_EC: uint num2; switch ((num2 = (arg_F1_0 ^ 1549596246u)) % 9u) { case 0u: num ^= this.RafInfoTag.GetHashCode(); arg_F1_0 = (num2 * 2715160316u ^ 2759916189u); continue; case 1u: arg_F1_0 = ((this.GameStatusTag != 0u) ? 222083683u : 1106968757u); continue; case 2u: num ^= this.GameTimeInfoTag.GetHashCode(); arg_F1_0 = (num2 * 3631690882u ^ 1580262269u); continue; case 3u: num ^= this.GameStatusTag.GetHashCode(); arg_F1_0 = (num2 * 4160774494u ^ 4157018307u); continue; case 4u: num ^= this.GameLevelInfoTag.GetHashCode(); arg_F1_0 = (num2 * 3520863791u ^ 3807129854u); continue; case 5u: goto IL_131; case 6u: arg_F1_0 = ((this.RafInfoTag == 0u) ? 1467472625u : 67327219u); continue; case 8u: goto IL_1F; } break; } return num; IL_1F: arg_F1_0 = 26984673u; goto IL_EC; IL_131: arg_F1_0 = ((this.GameTimeInfoTag == 0u) ? 452533631u : 1029456535u); goto IL_EC; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.GameLevelInfoTag != 0u) { goto IL_EF; } goto IL_17D; uint arg_131_0; while (true) { IL_12C: uint num; switch ((num = (arg_131_0 ^ 1437303021u)) % 12u) { case 0u: arg_131_0 = ((this.RafInfoTag == 0u) ? 1145893483u : 993783850u); continue; case 1u: output.WriteRawTag(21); arg_131_0 = (num * 3389182696u ^ 3656603964u); continue; case 2u: goto IL_EF; case 3u: goto IL_17D; case 4u: arg_131_0 = ((this.GameStatusTag == 0u) ? 1364078557u : 512524215u); continue; case 5u: output.WriteFixed32(this.GameLevelInfoTag); arg_131_0 = (num * 2238264770u ^ 1930794296u); continue; case 6u: output.WriteRawTag(37); arg_131_0 = (num * 1524273500u ^ 2796356861u); continue; case 7u: output.WriteRawTag(45); arg_131_0 = (num * 2735203437u ^ 2600272385u); continue; case 8u: output.WriteFixed32(this.GameStatusTag); arg_131_0 = (num * 2687327285u ^ 3375030069u); continue; case 9u: output.WriteRawTag(29); output.WriteFixed32(this.GameTimeInfoTag); arg_131_0 = (num * 3539769895u ^ 2628375638u); continue; case 11u: output.WriteFixed32(this.RafInfoTag); arg_131_0 = (num * 394586398u ^ 1386678105u); continue; } break; } return; IL_EF: arg_131_0 = 1914284188u; goto IL_12C; IL_17D: arg_131_0 = ((this.GameTimeInfoTag == 0u) ? 87144937u : 1014744644u); goto IL_12C; } public int CalculateSize() { int num = 0; while (true) { IL_120: uint arg_EB_0 = 2536707653u; while (true) { uint num2; switch ((num2 = (arg_EB_0 ^ 2468535138u)) % 10u) { case 0u: num += 5; arg_EB_0 = (num2 * 2330762149u ^ 2058716963u); continue; case 1u: num += 5; arg_EB_0 = (num2 * 1307852173u ^ 2382413501u); continue; case 2u: goto IL_120; case 3u: arg_EB_0 = ((this.GameTimeInfoTag == 0u) ? 2420593347u : 2221916930u); continue; case 4u: num += 5; arg_EB_0 = (num2 * 4030935689u ^ 2147014335u); continue; case 5u: arg_EB_0 = (((this.GameLevelInfoTag == 0u) ? 4015835300u : 2735590137u) ^ num2 * 999640285u); continue; case 7u: arg_EB_0 = ((this.GameStatusTag == 0u) ? 2794467185u : 2830314930u); continue; case 8u: num += 5; arg_EB_0 = (num2 * 1929550752u ^ 1608129905u); continue; case 9u: arg_EB_0 = ((this.RafInfoTag != 0u) ? 2597396945u : 3921216810u); continue; } return num; } } return num; } public void MergeFrom(GameAccountFieldTags other) { if (other == null) { goto IL_18; } goto IL_142; uint arg_FA_0; while (true) { IL_F5: uint num; switch ((num = (arg_FA_0 ^ 1144426519u)) % 11u) { case 0u: this.GameLevelInfoTag = other.GameLevelInfoTag; arg_FA_0 = (num * 3322491770u ^ 3979229563u); continue; case 2u: this.GameStatusTag = other.GameStatusTag; arg_FA_0 = (num * 3946244778u ^ 497389495u); continue; case 3u: arg_FA_0 = ((other.GameTimeInfoTag != 0u) ? 1306216370u : 233398377u); continue; case 4u: arg_FA_0 = ((other.RafInfoTag == 0u) ? 1053846647u : 1169959178u); continue; case 5u: this.RafInfoTag = other.RafInfoTag; arg_FA_0 = (num * 888933477u ^ 103024646u); continue; case 6u: arg_FA_0 = ((other.GameStatusTag != 0u) ? 1236528718u : 1145884333u); continue; case 7u: this.GameTimeInfoTag = other.GameTimeInfoTag; arg_FA_0 = (num * 1666097724u ^ 1418958021u); continue; case 8u: goto IL_142; case 9u: goto IL_18; case 10u: return; } break; } return; IL_18: arg_FA_0 = 1584673541u; goto IL_F5; IL_142: arg_FA_0 = ((other.GameLevelInfoTag == 0u) ? 894554195u : 237805107u); goto IL_F5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1E4: uint num; uint arg_184_0 = ((num = input.ReadTag()) == 0u) ? 782695326u : 1959731240u; while (true) { uint num2; switch ((num2 = (arg_184_0 ^ 755129099u)) % 17u) { case 1u: arg_184_0 = (((num != 21u) ? 3231069507u : 2486216272u) ^ num2 * 198694902u); continue; case 2u: arg_184_0 = (((num != 45u) ? 1145013317u : 65798710u) ^ num2 * 2282226116u); continue; case 3u: arg_184_0 = (((num == 29u) ? 1410460428u : 1982067224u) ^ num2 * 379231827u); continue; case 4u: this.GameLevelInfoTag = input.ReadFixed32(); arg_184_0 = 1774779530u; continue; case 5u: arg_184_0 = (num2 * 676600224u ^ 2441231428u); continue; case 6u: this.GameStatusTag = input.ReadFixed32(); arg_184_0 = 526486477u; continue; case 7u: this.RafInfoTag = input.ReadFixed32(); arg_184_0 = 1994028516u; continue; case 8u: arg_184_0 = 1959731240u; continue; case 9u: arg_184_0 = ((num != 37u) ? 2055789070u : 2065653822u); continue; case 10u: arg_184_0 = ((num <= 29u) ? 1646463459u : 1071667534u); continue; case 11u: arg_184_0 = (num2 * 3430777339u ^ 442830278u); continue; case 12u: arg_184_0 = (num2 * 2973161939u ^ 182446000u); continue; case 13u: this.GameTimeInfoTag = input.ReadFixed32(); arg_184_0 = 1994028516u; continue; case 14u: goto IL_1E4; case 15u: arg_184_0 = (num2 * 2465912353u ^ 504808074u); continue; case 16u: input.SkipLastField(); arg_184_0 = 226350757u; continue; } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/PrivacyInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class PrivacyInfo : IMessage<PrivacyInfo>, IEquatable<PrivacyInfo>, IDeepCloneable<PrivacyInfo>, IMessage { [DebuggerNonUserCode] public static class Types { public enum GameInfoPrivacy { PRIVACY_ME, PRIVACY_FRIENDS, PRIVACY_EVERYONE } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly PrivacyInfo.__c __9 = new PrivacyInfo.__c(); internal PrivacyInfo cctor>b__40_0() { return new PrivacyInfo(); } } private static readonly MessageParser<PrivacyInfo> _parser = new MessageParser<PrivacyInfo>(new Func<PrivacyInfo>(PrivacyInfo.__c.__9.<.cctor>b__40_0)); public const int IsUsingRidFieldNumber = 3; private bool isUsingRid_; public const int IsRealIdVisibleForViewFriendsFieldNumber = 4; private bool isRealIdVisibleForViewFriends_; public const int IsHiddenFromFriendFinderFieldNumber = 5; private bool isHiddenFromFriendFinder_; public const int GameInfoPrivacyFieldNumber = 6; private PrivacyInfo.Types.GameInfoPrivacy gameInfoPrivacy_; public static MessageParser<PrivacyInfo> Parser { get { return PrivacyInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[19]; } } MessageDescriptor IMessage.Descriptor { get { return PrivacyInfo.Descriptor; } } public bool IsUsingRid { get { return this.isUsingRid_; } set { this.isUsingRid_ = value; } } public bool IsRealIdVisibleForViewFriends { get { return this.isRealIdVisibleForViewFriends_; } set { this.isRealIdVisibleForViewFriends_ = value; } } public bool IsHiddenFromFriendFinder { get { return this.isHiddenFromFriendFinder_; } set { this.isHiddenFromFriendFinder_ = value; } } public PrivacyInfo.Types.GameInfoPrivacy GameInfoPrivacy { get { return this.gameInfoPrivacy_; } set { this.gameInfoPrivacy_ = value; } } public PrivacyInfo() { } public PrivacyInfo(PrivacyInfo other) : this() { this.isUsingRid_ = other.isUsingRid_; this.isRealIdVisibleForViewFriends_ = other.isRealIdVisibleForViewFriends_; this.isHiddenFromFriendFinder_ = other.isHiddenFromFriendFinder_; this.gameInfoPrivacy_ = other.gameInfoPrivacy_; } public PrivacyInfo Clone() { return new PrivacyInfo(this); } public override bool Equals(object other) { return this.Equals(other as PrivacyInfo); } public bool Equals(PrivacyInfo other) { if (other == null) { goto IL_66; } goto IL_10C; int arg_BE_0; while (true) { IL_B9: switch ((arg_BE_0 ^ -1269463170) % 13) { case 0: arg_BE_0 = ((this.IsUsingRid != other.IsUsingRid) ? -997117834 : -374165687); continue; case 1: arg_BE_0 = ((this.IsHiddenFromFriendFinder == other.IsHiddenFromFriendFinder) ? -414200359 : -824542822); continue; case 2: return false; case 3: return false; case 4: goto IL_66; case 5: arg_BE_0 = ((this.IsRealIdVisibleForViewFriends != other.IsRealIdVisibleForViewFriends) ? -1245146739 : -2103264070); continue; case 6: arg_BE_0 = ((this.GameInfoPrivacy == other.GameInfoPrivacy) ? -769389055 : -59112665); continue; case 8: return false; case 9: return true; case 10: return false; case 11: goto IL_10C; case 12: return false; } break; } return true; IL_66: arg_BE_0 = -1705286140; goto IL_B9; IL_10C: arg_BE_0 = ((other == this) ? -642725252 : -1273684878); goto IL_B9; } public override int GetHashCode() { int num = 1; if (this.IsUsingRid) { goto IL_8B; } goto IL_137; uint arg_F7_0; while (true) { IL_F2: uint num2; switch ((num2 = (arg_F7_0 ^ 1090258972u)) % 9u) { case 0u: num ^= this.IsHiddenFromFriendFinder.GetHashCode(); arg_F7_0 = (num2 * 3497955619u ^ 3593607670u); continue; case 1u: goto IL_137; case 2u: arg_F7_0 = ((this.GameInfoPrivacy == PrivacyInfo.Types.GameInfoPrivacy.PRIVACY_ME) ? 2043557185u : 2067625241u); continue; case 3u: arg_F7_0 = (this.IsHiddenFromFriendFinder ? 608862474u : 1465658868u); continue; case 4u: goto IL_8B; case 5u: num ^= this.IsRealIdVisibleForViewFriends.GetHashCode(); arg_F7_0 = (num2 * 57698870u ^ 2869384634u); continue; case 7u: num ^= this.GameInfoPrivacy.GetHashCode(); arg_F7_0 = (num2 * 3818576960u ^ 2719987713u); continue; case 8u: num ^= this.IsUsingRid.GetHashCode(); arg_F7_0 = (num2 * 4235545383u ^ 4122073871u); continue; } break; } return num; IL_8B: arg_F7_0 = 1152156567u; goto IL_F2; IL_137: arg_F7_0 = ((!this.IsRealIdVisibleForViewFriends) ? 1255387964u : 934882533u); goto IL_F2; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.IsUsingRid) { goto IL_DD; } goto IL_167; uint arg_11F_0; while (true) { IL_11A: uint num; switch ((num = (arg_11F_0 ^ 2973996928u)) % 11u) { case 1u: arg_11F_0 = ((!this.IsHiddenFromFriendFinder) ? 3128570003u : 3959208121u); continue; case 2u: output.WriteRawTag(40); arg_11F_0 = (num * 3049827751u ^ 1619161886u); continue; case 3u: goto IL_DD; case 4u: output.WriteRawTag(32); arg_11F_0 = (num * 3690335304u ^ 163877848u); continue; case 5u: output.WriteRawTag(48); output.WriteEnum((int)this.GameInfoPrivacy); arg_11F_0 = (num * 2267063656u ^ 186262202u); continue; case 6u: goto IL_167; case 7u: output.WriteBool(this.IsHiddenFromFriendFinder); arg_11F_0 = (num * 2580774359u ^ 3850142260u); continue; case 8u: output.WriteBool(this.IsRealIdVisibleForViewFriends); arg_11F_0 = (num * 1482339491u ^ 3212624460u); continue; case 9u: output.WriteRawTag(24); output.WriteBool(this.IsUsingRid); arg_11F_0 = (num * 2815178783u ^ 1129286719u); continue; case 10u: arg_11F_0 = ((this.GameInfoPrivacy != PrivacyInfo.Types.GameInfoPrivacy.PRIVACY_ME) ? 2182873702u : 2317877706u); continue; } break; } return; IL_DD: arg_11F_0 = 2317035680u; goto IL_11A; IL_167: arg_11F_0 = ((!this.IsRealIdVisibleForViewFriends) ? 3817771452u : 4150608921u); goto IL_11A; } public int CalculateSize() { int num = 0; while (true) { IL_12F: uint arg_FA_0 = 2991017885u; while (true) { uint num2; switch ((num2 = (arg_FA_0 ^ 2498181733u)) % 10u) { case 0u: goto IL_12F; case 2u: arg_FA_0 = (this.IsRealIdVisibleForViewFriends ? 2592568164u : 3728214941u); continue; case 3u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.GameInfoPrivacy); arg_FA_0 = (num2 * 1113762422u ^ 2074371920u); continue; case 4u: arg_FA_0 = (this.IsHiddenFromFriendFinder ? 2197609821u : 2977478162u); continue; case 5u: arg_FA_0 = ((this.GameInfoPrivacy == PrivacyInfo.Types.GameInfoPrivacy.PRIVACY_ME) ? 2781731458u : 3786862670u); continue; case 6u: num += 2; arg_FA_0 = (num2 * 1641209817u ^ 1098412138u); continue; case 7u: num += 2; arg_FA_0 = (num2 * 605269322u ^ 1324099959u); continue; case 8u: arg_FA_0 = (((!this.IsUsingRid) ? 3707967641u : 2402667698u) ^ num2 * 4028438193u); continue; case 9u: num += 2; arg_FA_0 = (num2 * 1617533324u ^ 1737133585u); continue; } return num; } } return num; } public void MergeFrom(PrivacyInfo other) { if (other == null) { goto IL_B4; } goto IL_142; uint arg_FA_0; while (true) { IL_F5: uint num; switch ((num = (arg_FA_0 ^ 2297862859u)) % 11u) { case 0u: arg_FA_0 = ((!other.IsHiddenFromFriendFinder) ? 4042959675u : 3618057225u); continue; case 1u: return; case 2u: this.GameInfoPrivacy = other.GameInfoPrivacy; arg_FA_0 = (num * 1220726845u ^ 1617795141u); continue; case 3u: goto IL_B4; case 4u: this.IsUsingRid = other.IsUsingRid; arg_FA_0 = (num * 2803599959u ^ 3261893399u); continue; case 6u: arg_FA_0 = ((other.GameInfoPrivacy == PrivacyInfo.Types.GameInfoPrivacy.PRIVACY_ME) ? 3903858856u : 3300107450u); continue; case 7u: goto IL_142; case 8u: this.IsHiddenFromFriendFinder = other.IsHiddenFromFriendFinder; arg_FA_0 = (num * 3590593721u ^ 703127817u); continue; case 9u: arg_FA_0 = (other.IsRealIdVisibleForViewFriends ? 2611081147u : 2150097445u); continue; case 10u: this.IsRealIdVisibleForViewFriends = other.IsRealIdVisibleForViewFriends; arg_FA_0 = (num * 670229420u ^ 534959461u); continue; } break; } return; IL_B4: arg_FA_0 = 3993229036u; goto IL_F5; IL_142: arg_FA_0 = (other.IsUsingRid ? 3192284188u : 3814656518u); goto IL_F5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1AF: uint num; uint arg_157_0 = ((num = input.ReadTag()) == 0u) ? 837942778u : 33121334u; while (true) { uint num2; switch ((num2 = (arg_157_0 ^ 1949101265u)) % 15u) { case 0u: arg_157_0 = 33121334u; continue; case 1u: this.IsRealIdVisibleForViewFriends = input.ReadBool(); arg_157_0 = 1215514799u; continue; case 2u: arg_157_0 = (num2 * 4040789942u ^ 1945481537u); continue; case 3u: arg_157_0 = ((num == 40u) ? 634192043u : 928980586u); continue; case 4u: this.IsHiddenFromFriendFinder = input.ReadBool(); arg_157_0 = 403278461u; continue; case 6u: input.SkipLastField(); arg_157_0 = 403278461u; continue; case 7u: arg_157_0 = ((num <= 32u) ? 1444789018u : 1098016105u); continue; case 8u: arg_157_0 = (((num == 32u) ? 2777771114u : 2613850185u) ^ num2 * 3835202766u); continue; case 9u: this.IsUsingRid = input.ReadBool(); arg_157_0 = 403278461u; continue; case 10u: arg_157_0 = (num2 * 1983429181u ^ 4157879419u); continue; case 11u: arg_157_0 = (((num != 48u) ? 2553138446u : 3619491984u) ^ num2 * 2220045517u); continue; case 12u: this.gameInfoPrivacy_ = (PrivacyInfo.Types.GameInfoPrivacy)input.ReadEnum(); arg_157_0 = 403278461u; continue; case 13u: arg_157_0 = (((num != 24u) ? 2421133213u : 2539890418u) ^ num2 * 3667378828u); continue; case 14u: goto IL_1AF; } return; } } } } } <file_sep>/Bgs.Protocol.Connection.V1/BindResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class BindResponse : IMessage<BindResponse>, IEquatable<BindResponse>, IDeepCloneable<BindResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BindResponse.__c __9 = new BindResponse.__c(); internal BindResponse cctor>b__24_0() { return new BindResponse(); } } private static readonly MessageParser<BindResponse> _parser = new MessageParser<BindResponse>(new Func<BindResponse>(BindResponse.__c.__9.<.cctor>b__24_0)); public const int ImportedServiceIdFieldNumber = 1; private static readonly FieldCodec<uint> _repeated_importedServiceId_codec = FieldCodec.ForUInt32(10u); private readonly RepeatedField<uint> importedServiceId_ = new RepeatedField<uint>(); public static MessageParser<BindResponse> Parser { get { return BindResponse._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return BindResponse.Descriptor; } } [Obsolete] public RepeatedField<uint> ImportedServiceId { get { return this.importedServiceId_; } } public BindResponse() { } public BindResponse(BindResponse other) : this() { while (true) { IL_43: uint arg_2B_0 = 1414751206u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 1877406728u)) % 3u) { case 0u: goto IL_43; case 2u: this.importedServiceId_ = other.importedServiceId_.Clone(); arg_2B_0 = (num * 765050725u ^ 3391727072u); continue; } return; } } } public BindResponse Clone() { return new BindResponse(this); } public override bool Equals(object other) { return this.Equals(other as BindResponse); } public bool Equals(BindResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -248536483) % 7) { case 0: arg_48_0 = (this.importedServiceId_.Equals(other.importedServiceId_) ? -922105921 : -913677395); continue; case 1: return true; case 2: return false; case 3: goto IL_7A; case 4: goto IL_12; case 5: return false; } break; } return true; IL_12: arg_48_0 = -1156645952; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -561771128 : -43741944); goto IL_43; } public override int GetHashCode() { return 1 ^ BindResponse.smethod_0(this.importedServiceId_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.importedServiceId_.WriteTo(output, BindResponse._repeated_importedServiceId_codec); } public int CalculateSize() { return 0 + this.importedServiceId_.CalculateSize(BindResponse._repeated_importedServiceId_codec); } public void MergeFrom(BindResponse other) { if (other == null) { return; } this.importedServiceId_.Add(other.importedServiceId_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_C4: uint num; uint arg_8D_0 = ((num = input.ReadTag()) != 0u) ? 1300552149u : 269162068u; while (true) { uint num2; switch ((num2 = (arg_8D_0 ^ 1546232617u)) % 7u) { case 0u: arg_8D_0 = (((num == 10u) ? 3317978614u : 2267561918u) ^ num2 * 3302392959u); continue; case 1u: this.importedServiceId_.AddEntriesFrom(input, BindResponse._repeated_importedServiceId_codec); arg_8D_0 = 1794276607u; continue; case 2u: goto IL_C4; case 3u: input.SkipLastField(); arg_8D_0 = (num2 * 4029200252u ^ 291996231u); continue; case 4u: arg_8D_0 = ((num == 8u) ? 657175411u : 784638418u); continue; case 5u: arg_8D_0 = 1300552149u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/ClientResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class ClientResponse : IMessage<ClientResponse>, IEquatable<ClientResponse>, IDeepCloneable<ClientResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ClientResponse.__c __9 = new ClientResponse.__c(); internal ClientResponse cctor>b__24_0() { return new ClientResponse(); } } private static readonly MessageParser<ClientResponse> _parser = new MessageParser<ClientResponse>(new Func<ClientResponse>(ClientResponse.__c.__9.<.cctor>b__24_0)); public const int AttributeFieldNumber = 1; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(10u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public static MessageParser<ClientResponse> Parser { get { return ClientResponse._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return ClientResponse.Descriptor; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public ClientResponse() { } public ClientResponse(ClientResponse other) : this() { this.attribute_ = other.attribute_.Clone(); } public ClientResponse Clone() { return new ClientResponse(this); } public override bool Equals(object other) { return this.Equals(other as ClientResponse); } public bool Equals(ClientResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1093743989) % 7) { case 0: goto IL_3E; case 2: return false; case 3: return false; case 4: goto IL_7A; case 5: return true; case 6: arg_48_0 = ((!this.attribute_.Equals(other.attribute_)) ? -113119311 : -761561000); continue; } break; } return true; IL_3E: arg_48_0 = -1938954141; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1143993268 : -436043903); goto IL_43; } public override int GetHashCode() { return 1 ^ ClientResponse.smethod_0(this.attribute_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attribute_.WriteTo(output, ClientResponse._repeated_attribute_codec); } public int CalculateSize() { return 0 + this.attribute_.CalculateSize(ClientResponse._repeated_attribute_codec); } public void MergeFrom(ClientResponse other) { if (other == null) { return; } this.attribute_.Add(other.attribute_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 1189480128u : 690527245u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 1760580142u)) % 7u) { case 0u: arg_77_0 = (num2 * 197953883u ^ 3739829084u); continue; case 1u: input.SkipLastField(); arg_77_0 = (num2 * 1273257394u ^ 3253726107u); continue; case 2u: goto IL_AE; case 3u: this.attribute_.AddEntriesFrom(input, ClientResponse._repeated_attribute_codec); arg_77_0 = 1115982887u; continue; case 4u: arg_77_0 = 1189480128u; continue; case 6u: arg_77_0 = ((num != 10u) ? 900825556u : 1977270860u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/ServiceOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class ServiceOptions : IMessage<ServiceOptions>, IEquatable<ServiceOptions>, IDeepCloneable<ServiceOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServiceOptions.__c __9 = new ServiceOptions.__c(); internal ServiceOptions cctor>b__29_0() { return new ServiceOptions(); } } private static readonly MessageParser<ServiceOptions> _parser = new MessageParser<ServiceOptions>(new Func<ServiceOptions>(ServiceOptions.__c.__9.<.cctor>b__29_0)); public const int DeprecatedFieldNumber = 33; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<ServiceOptions> Parser { get { return ServiceOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[14]; } } MessageDescriptor IMessage.Descriptor { get { return ServiceOptions.Descriptor; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public ServiceOptions() { } public ServiceOptions(ServiceOptions other) : this() { this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public ServiceOptions Clone() { return new ServiceOptions(this); } public override bool Equals(object other) { return this.Equals(other as ServiceOptions); } public bool Equals(ServiceOptions other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1497457986) % 9) { case 0: arg_72_0 = ((this.Deprecated == other.Deprecated) ? 429105679 : 1990780323); continue; case 2: return false; case 3: return false; case 4: arg_72_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? 1730501385 : 65736315); continue; case 5: return false; case 6: goto IL_15; case 7: goto IL_B0; case 8: return true; } break; } return true; IL_15: arg_72_0 = 600873974; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 827867747 : 2142035229); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_88: uint arg_68_0 = 33129707u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 612868284u)) % 5u) { case 0u: num ^= this.Deprecated.GetHashCode(); arg_68_0 = (num2 * 3581037055u ^ 1990417967u); continue; case 1u: arg_68_0 = ((this.Deprecated ? 1217271159u : 184188442u) ^ num2 * 3351934660u); continue; case 3u: num ^= this.uninterpretedOption_.GetHashCode(); arg_68_0 = 1581433151u; continue; case 4u: goto IL_88; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Deprecated) { goto IL_08; } goto IL_68; uint arg_48_0; while (true) { IL_43: uint num; switch ((num = (arg_48_0 ^ 356669802u)) % 5u) { case 0u: output.WriteBool(this.Deprecated); arg_48_0 = (num * 2308284551u ^ 1780445041u); continue; case 1u: output.WriteRawTag(136, 2); arg_48_0 = (num * 2506855745u ^ 2371669128u); continue; case 2u: goto IL_68; case 3u: goto IL_08; } break; } return; IL_08: arg_48_0 = 772406895u; goto IL_43; IL_68: this.uninterpretedOption_.WriteTo(output, ServiceOptions._repeated_uninterpretedOption_codec); arg_48_0 = 70425635u; goto IL_43; } public int CalculateSize() { int num = 0; while (true) { IL_7D: uint arg_5D_0 = 3680371879u; while (true) { uint num2; switch ((num2 = (arg_5D_0 ^ 3897290757u)) % 5u) { case 0u: goto IL_7D; case 1u: num += this.uninterpretedOption_.CalculateSize(ServiceOptions._repeated_uninterpretedOption_codec); arg_5D_0 = 4086081376u; continue; case 2u: num += 3; arg_5D_0 = (num2 * 3804460350u ^ 1732471324u); continue; case 3u: arg_5D_0 = (((!this.Deprecated) ? 3564392216u : 3863840967u) ^ num2 * 2853866260u); continue; } return num; } } return num; } public void MergeFrom(ServiceOptions other) { if (other == null) { goto IL_2A; } goto IL_7F; uint arg_4F_0; while (true) { IL_4A: uint num; switch ((num = (arg_4F_0 ^ 1223674233u)) % 6u) { case 0u: goto IL_7F; case 1u: return; case 3u: this.Deprecated = other.Deprecated; arg_4F_0 = (num * 4134251136u ^ 2100993506u); continue; case 4u: goto IL_2A; case 5u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_4F_0 = 214616627u; continue; } break; } return; IL_2A: arg_4F_0 = 1453366984u; goto IL_4A; IL_7F: arg_4F_0 = ((!other.Deprecated) ? 138041442u : 105151526u); goto IL_4A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_FC: uint num; uint arg_BC_0 = ((num = input.ReadTag()) != 0u) ? 4240342789u : 4182014873u; while (true) { uint num2; switch ((num2 = (arg_BC_0 ^ 3579890717u)) % 9u) { case 0u: arg_BC_0 = 4240342789u; continue; case 1u: this.uninterpretedOption_.AddEntriesFrom(input, ServiceOptions._repeated_uninterpretedOption_codec); arg_BC_0 = 2980647309u; continue; case 2u: input.SkipLastField(); arg_BC_0 = (num2 * 854246258u ^ 929116971u); continue; case 3u: arg_BC_0 = (((num == 7994u) ? 2551787289u : 3587348536u) ^ num2 * 3322622858u); continue; case 4u: arg_BC_0 = ((num == 264u) ? 3701771259u : 4131248299u); continue; case 5u: this.Deprecated = input.ReadBool(); arg_BC_0 = 2980647309u; continue; case 6u: goto IL_FC; case 7u: arg_BC_0 = (num2 * 3922085231u ^ 3246922977u); continue; } return; } } } } } <file_sep>/Bgs.Protocol/ErrorInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class ErrorInfo : IMessage<ErrorInfo>, IEquatable<ErrorInfo>, IDeepCloneable<ErrorInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ErrorInfo.__c __9 = new ErrorInfo.__c(); internal ErrorInfo cctor>b__39_0() { return new ErrorInfo(); } } private static readonly MessageParser<ErrorInfo> _parser = new MessageParser<ErrorInfo>(new Func<ErrorInfo>(ErrorInfo.__c.__9.<.cctor>b__39_0)); public const int ObjectAddressFieldNumber = 1; private ObjectAddress objectAddress_; public const int StatusFieldNumber = 2; private uint status_; public const int ServiceHashFieldNumber = 3; private uint serviceHash_; public const int MethodIdFieldNumber = 4; private uint methodId_; public static MessageParser<ErrorInfo> Parser { get { return ErrorInfo._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return ErrorInfo.Descriptor; } } public ObjectAddress ObjectAddress { get { return this.objectAddress_; } set { this.objectAddress_ = value; } } public uint Status { get { return this.status_; } set { this.status_ = value; } } public uint ServiceHash { get { return this.serviceHash_; } set { this.serviceHash_ = value; } } public uint MethodId { get { return this.methodId_; } set { this.methodId_ = value; } } public ErrorInfo() { } public ErrorInfo(ErrorInfo other) : this() { while (true) { IL_65: uint arg_49_0 = 1522379187u; while (true) { uint num; switch ((num = (arg_49_0 ^ 1009853074u)) % 4u) { case 1u: this.ObjectAddress = ((other.objectAddress_ != null) ? other.ObjectAddress.Clone() : null); arg_49_0 = 858718053u; continue; case 2u: goto IL_65; case 3u: this.status_ = other.status_; arg_49_0 = (num * 3020765513u ^ 1101458657u); continue; } goto Block_2; } } Block_2: this.serviceHash_ = other.serviceHash_; this.methodId_ = other.methodId_; } public ErrorInfo Clone() { return new ErrorInfo(this); } public override bool Equals(object other) { return this.Equals(other as ErrorInfo); } public bool Equals(ErrorInfo other) { if (other == null) { goto IL_18; } goto IL_114; int arg_C6_0; while (true) { IL_C1: switch ((arg_C6_0 ^ 383492524) % 13) { case 0: return false; case 1: return false; case 2: arg_C6_0 = ((!ErrorInfo.smethod_0(this.ObjectAddress, other.ObjectAddress)) ? 63476309 : 874072386); continue; case 3: return true; case 4: arg_C6_0 = ((this.Status == other.Status) ? 465112748 : 1464721473); continue; case 5: return false; case 6: return false; case 7: arg_C6_0 = ((this.MethodId != other.MethodId) ? 1774036157 : 53093456); continue; case 8: goto IL_114; case 10: arg_C6_0 = ((this.ServiceHash != other.ServiceHash) ? 1754311642 : 658411737); continue; case 11: return false; case 12: goto IL_18; } break; } return true; IL_18: arg_C6_0 = 1009580947; goto IL_C1; IL_114: arg_C6_0 = ((other != this) ? 836130000 : 1034370472); goto IL_C1; } public override int GetHashCode() { return 1 ^ ErrorInfo.smethod_1(this.ObjectAddress) ^ this.Status.GetHashCode() ^ this.ServiceHash.GetHashCode() ^ this.MethodId.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_AC: uint arg_88_0 = 1006919464u; while (true) { uint num; switch ((num = (arg_88_0 ^ 506496947u)) % 6u) { case 0u: output.WriteRawTag(24); output.WriteUInt32(this.ServiceHash); arg_88_0 = (num * 2306844826u ^ 813464956u); continue; case 1u: output.WriteMessage(this.ObjectAddress); arg_88_0 = (num * 1638743948u ^ 3821856625u); continue; case 2u: output.WriteRawTag(16); output.WriteUInt32(this.Status); arg_88_0 = (num * 586625811u ^ 2271986285u); continue; case 3u: output.WriteRawTag(32); arg_88_0 = (num * 2975972501u ^ 4125294461u); continue; case 4u: goto IL_AC; } goto Block_1; } } Block_1: output.WriteUInt32(this.MethodId); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.ObjectAddress)) + (1 + CodedOutputStream.ComputeUInt32Size(this.Status)) + (1 + CodedOutputStream.ComputeUInt32Size(this.ServiceHash)) + (1 + CodedOutputStream.ComputeUInt32Size(this.MethodId)); } public void MergeFrom(ErrorInfo other) { if (other == null) { goto IL_136; } goto IL_190; uint arg_140_0; while (true) { IL_13B: uint num; switch ((num = (arg_140_0 ^ 367135147u)) % 13u) { case 0u: goto IL_136; case 1u: arg_140_0 = ((other.ServiceHash != 0u) ? 2083956000u : 1053991539u); continue; case 2u: this.MethodId = other.MethodId; arg_140_0 = (num * 13486757u ^ 4059313196u); continue; case 3u: this.ObjectAddress.MergeFrom(other.ObjectAddress); arg_140_0 = 1280220567u; continue; case 4u: return; case 5u: arg_140_0 = ((other.MethodId == 0u) ? 1128003028u : 693418291u); continue; case 6u: goto IL_190; case 7u: arg_140_0 = (((this.objectAddress_ != null) ? 1232839252u : 2041428242u) ^ num * 2081660195u); continue; case 8u: arg_140_0 = ((other.Status != 0u) ? 825811282u : 176395360u); continue; case 9u: this.objectAddress_ = new ObjectAddress(); arg_140_0 = (num * 2527266627u ^ 2607735865u); continue; case 10u: this.ServiceHash = other.ServiceHash; arg_140_0 = (num * 2336965507u ^ 3899067986u); continue; case 11u: this.Status = other.Status; arg_140_0 = (num * 2184209208u ^ 3525891352u); continue; } break; } return; IL_136: arg_140_0 = 1371118061u; goto IL_13B; IL_190: arg_140_0 = ((other.objectAddress_ == null) ? 1280220567u : 1185098686u); goto IL_13B; } public void MergeFrom(CodedInputStream input) { while (true) { IL_211: uint num; uint arg_1AD_0 = ((num = input.ReadTag()) == 0u) ? 670662643u : 756699698u; while (true) { uint num2; switch ((num2 = (arg_1AD_0 ^ 1425462976u)) % 18u) { case 0u: arg_1AD_0 = (num2 * 1012991751u ^ 826552799u); continue; case 1u: arg_1AD_0 = ((num != 24u) ? 662328647u : 888310942u); continue; case 2u: this.ServiceHash = input.ReadUInt32(); arg_1AD_0 = 1062436109u; continue; case 3u: arg_1AD_0 = (((num == 16u) ? 495577116u : 1337798943u) ^ num2 * 664089892u); continue; case 4u: this.Status = input.ReadUInt32(); arg_1AD_0 = 1865639012u; continue; case 5u: arg_1AD_0 = (num2 * 1582653280u ^ 4202804386u); continue; case 6u: input.SkipLastField(); arg_1AD_0 = 1062436109u; continue; case 7u: arg_1AD_0 = 756699698u; continue; case 8u: this.MethodId = input.ReadUInt32(); arg_1AD_0 = 1062436109u; continue; case 9u: goto IL_211; case 10u: arg_1AD_0 = (num2 * 3460277702u ^ 2855576533u); continue; case 12u: this.objectAddress_ = new ObjectAddress(); arg_1AD_0 = (num2 * 3900995777u ^ 895701103u); continue; case 13u: input.ReadMessage(this.objectAddress_); arg_1AD_0 = 2054021342u; continue; case 14u: arg_1AD_0 = ((num > 16u) ? 121899633u : 2052301734u); continue; case 15u: arg_1AD_0 = ((this.objectAddress_ != null) ? 739671355u : 433445012u); continue; case 16u: arg_1AD_0 = (((num != 10u) ? 2320793211u : 2610709821u) ^ num2 * 3170679056u); continue; case 17u: arg_1AD_0 = (((num != 32u) ? 667369157u : 1539531977u) ^ num2 * 763854657u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/UserManagerServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public static class UserManagerServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return UserManagerServiceReflection.descriptor; } } static UserManagerServiceReflection() { UserManagerServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(UserManagerServiceReflection.smethod_1(UserManagerServiceReflection.smethod_0(new string[] { Module.smethod_35<string>(2957993024u), Module.smethod_37<string>(2221935492u), Module.smethod_37<string>(3770457908u), Module.smethod_37<string>(3419857956u), Module.smethod_34<string>(3162883371u), Module.smethod_36<string>(2042795248u), Module.smethod_35<string>(1642951136u), Module.smethod_36<string>(3593929232u), Module.smethod_35<string>(1992792768u), Module.smethod_34<string>(538258235u), Module.smethod_34<string>(913204683u), Module.smethod_36<string>(1255488720u), Module.smethod_34<string>(163311787u), Module.smethod_36<string>(2424708976u), Module.smethod_33<string>(1366057401u), Module.smethod_33<string>(1696343689u), Module.smethod_34<string>(2682272363u), Module.smethod_37<string>(2453468292u), Module.smethod_34<string>(1932379467u), Module.smethod_37<string>(3651390756u), Module.smethod_34<string>(1182486571u), Module.smethod_37<string>(554345924u), Module.smethod_33<string>(2616592953u), Module.smethod_34<string>(3602721627u), Module.smethod_34<string>(3977668075u), Module.smethod_37<string>(1956745732u), Module.smethod_34<string>(3227775179u), Module.smethod_36<string>(3434309072u), Module.smethod_35<string>(952334080u), Module.smethod_36<string>(308562032u), Module.smethod_34<string>(1727989387u), Module.smethod_35<string>(3274738544u), Module.smethod_35<string>(2617217600u), Module.smethod_36<string>(3028916272u), Module.smethod_37<string>(700468532u), Module.smethod_37<string>(349868580u), Module.smethod_33<string>(3843121241u), Module.smethod_36<string>(690475760u), Module.smethod_34<string>(3023385099u), Module.smethod_36<string>(2241609744u), Module.smethod_36<string>(678736224u), Module.smethod_34<string>(1148652859u), Module.smethod_34<string>(1523599307u), Module.smethod_34<string>(398759963u), Module.smethod_37<string>(1401668436u), Module.smethod_34<string>(3943834363u), Module.smethod_36<string>(3804483264u), Module.smethod_36<string>(3863180944u), Module.smethod_33<string>(3640347417u), Module.smethod_35<string>(1791047376u), Module.smethod_35<string>(1133526432u), Module.smethod_34<string>(4215891867u), Module.smethod_35<string>(1483368064u), Module.smethod_34<string>(3465998971u), Module.smethod_37<string>(115978100u), Module.smethod_35<string>(3805772528u), Module.smethod_33<string>(367722393u), Module.smethod_37<string>(4264822788u), Module.smethod_33<string>(1185878649u), Module.smethod_34<string>(1216320283u), Module.smethod_35<string>(518167808u), Module.smethod_33<string>(2106127913u), Module.smethod_37<string>(3914222836u), Module.smethod_35<string>(2840572272u), Module.smethod_35<string>(2183051328u), Module.smethod_34<string>(3261608891u), Module.smethod_35<string>(3498093216u), Module.smethod_36<string>(2288567888u), Module.smethod_37<string>(4206468052u), Module.smethod_34<string>(1761823099u) })), new FileDescriptor[] { UserManagerTypesReflection.Descriptor, EntityTypesReflection.Descriptor, RoleTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(SubscribeRequest).TypeHandle), SubscribeRequest.Parser, new string[] { Module.smethod_33<string>(2714350708u), Module.smethod_33<string>(3239342614u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(SubscribeResponse).TypeHandle), SubscribeResponse.Parser, new string[] { Module.smethod_36<string>(2091741256u), Module.smethod_37<string>(2891688761u), Module.smethod_36<string>(1553402902u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(UnsubscribeRequest).TypeHandle), UnsubscribeRequest.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_36<string>(3782294397u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(AddRecentPlayersRequest).TypeHandle), AddRecentPlayersRequest.Parser, new string[] { Module.smethod_35<string>(2434891972u), Module.smethod_35<string>(1797074111u), Module.smethod_33<string>(1332460824u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(AddRecentPlayersResponse).TypeHandle), AddRecentPlayersResponse.Parser, new string[] { Module.smethod_36<string>(187356014u), Module.smethod_36<string>(3984386962u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(ClearRecentPlayersRequest).TypeHandle), ClearRecentPlayersRequest.Parser, new string[] { Module.smethod_33<string>(2714350708u), Module.smethod_36<string>(2505595523u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(ClearRecentPlayersResponse).TypeHandle), ClearRecentPlayersResponse.Parser, new string[] { Module.smethod_34<string>(3206282157u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(BlockPlayerRequest).TypeHandle), BlockPlayerRequest.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_36<string>(1978914170u), Module.smethod_37<string>(1839859434u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(UnblockPlayerRequest).TypeHandle), UnblockPlayerRequest.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_33<string>(3091348247u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(BlockedPlayerAddedNotification).TypeHandle), BlockedPlayerAddedNotification.Parser, new string[] { Module.smethod_34<string>(2390316016u), Module.smethod_33<string>(1846560140u), Module.smethod_34<string>(750206468u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(BlockedPlayerRemovedNotification).TypeHandle), BlockedPlayerRemovedNotification.Parser, new string[] { Module.smethod_37<string>(2190429915u), Module.smethod_37<string>(965451995u), Module.smethod_35<string>(915065219u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(RecentPlayersAddedNotification).TypeHandle), RecentPlayersAddedNotification.Parser, new string[] { Module.smethod_37<string>(2190429915u) }, null, null, null), new GeneratedCodeInfo(UserManagerServiceReflection.smethod_2(typeof(RecentPlayersRemovedNotification).TypeHandle), RecentPlayersRemovedNotification.Parser, new string[] { Module.smethod_33<string>(1869155212u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Connection.V1/DisconnectRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class DisconnectRequest : IMessage<DisconnectRequest>, IEquatable<DisconnectRequest>, IDeepCloneable<DisconnectRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DisconnectRequest.__c __9 = new DisconnectRequest.__c(); internal DisconnectRequest cctor>b__24_0() { return new DisconnectRequest(); } } private static readonly MessageParser<DisconnectRequest> _parser = new MessageParser<DisconnectRequest>(new Func<DisconnectRequest>(DisconnectRequest.__c.__9.<.cctor>b__24_0)); public const int ErrorCodeFieldNumber = 1; private uint errorCode_; public static MessageParser<DisconnectRequest> Parser { get { return DisconnectRequest._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return DisconnectRequest.Descriptor; } } public uint ErrorCode { get { return this.errorCode_; } set { this.errorCode_ = value; } } public DisconnectRequest() { } public DisconnectRequest(DisconnectRequest other) : this() { this.errorCode_ = other.errorCode_; } public DisconnectRequest Clone() { return new DisconnectRequest(this); } public override bool Equals(object other) { return this.Equals(other as DisconnectRequest); } public bool Equals(DisconnectRequest other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 846911889) % 7) { case 0: goto IL_39; case 1: return false; case 2: return true; case 3: return false; case 4: goto IL_75; case 6: arg_43_0 = ((this.ErrorCode == other.ErrorCode) ? 1046055578 : 1142339315); continue; } break; } return true; IL_39: arg_43_0 = 552822906; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? 1480612640 : 345484948); goto IL_3E; } public override int GetHashCode() { return 1 ^ this.ErrorCode.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_3F: uint arg_27_0 = 1945642718u; while (true) { uint num; switch ((num = (arg_27_0 ^ 169963591u)) % 3u) { case 0u: goto IL_3F; case 1u: output.WriteUInt32(this.ErrorCode); arg_27_0 = (num * 3921587424u ^ 1129781225u); continue; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.ErrorCode)); } public void MergeFrom(DisconnectRequest other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1562442400u)) % 5u) { case 0u: goto IL_2D; case 1u: goto IL_63; case 2u: return; case 4u: this.ErrorCode = other.ErrorCode; arg_37_0 = (num * 3169906241u ^ 4167406657u); continue; } break; } return; IL_2D: arg_37_0 = 1822491181u; goto IL_32; IL_63: arg_37_0 = ((other.ErrorCode == 0u) ? 1013786257u : 1230726256u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A8: uint num; uint arg_71_0 = ((num = input.ReadTag()) == 0u) ? 2012297740u : 404532366u; while (true) { uint num2; switch ((num2 = (arg_71_0 ^ 1049630140u)) % 7u) { case 0u: arg_71_0 = 404532366u; continue; case 2u: arg_71_0 = ((num != 8u) ? 146743553u : 464673405u); continue; case 3u: goto IL_A8; case 4u: arg_71_0 = (num2 * 3442553522u ^ 3277749837u); continue; case 5u: this.ErrorCode = input.ReadUInt32(); arg_71_0 = 1298900303u; continue; case 6u: input.SkipLastField(); arg_71_0 = (num2 * 2843920508u ^ 2155900505u); continue; } return; } } } } } <file_sep>/AuthServer.Game.WorldEntities/Skill.cs using System; using System.Runtime.Serialization; namespace AuthServer.Game.WorldEntities { [DataContract] [Serializable] public class Skill { [DataMember] public uint Id { get; set; } [DataMember] public uint SkillLevel { get; set; } } } <file_sep>/AuthServer.Configuration/AuthConfig.cs using Framework.Constants.Misc; using Framework.Logging; using System; namespace AuthServer.Configuration { internal class AuthConfig { public static LogType LogLevel; public static string BindIP; public static int BindPort; public static void ReadConfig() { AuthConfig.LogLevel = (LogType.Init | LogType.Normal | LogType.Error | LogType.Debug); AuthConfig.BindIP = Module.smethod_33<string>(3600904718u); while (true) { IL_57: uint arg_3F_0 = 2311101738u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2816298131u)) % 3u) { case 1u: AuthConfig.BindPort = 8000; Log.Initialize(AuthConfig.LogLevel, null); arg_3F_0 = (num * 1545441423u ^ 1051495048u); continue; case 2u: goto IL_57; } return; } } } } } <file_sep>/Bgs.Protocol.Channel.V1/DissolveRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class DissolveRequest : IMessage<DissolveRequest>, IEquatable<DissolveRequest>, IDeepCloneable<DissolveRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DissolveRequest.__c __9 = new DissolveRequest.__c(); internal DissolveRequest cctor>b__29_0() { return new DissolveRequest(); } } private static readonly MessageParser<DissolveRequest> _parser = new MessageParser<DissolveRequest>(new Func<DissolveRequest>(DissolveRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int ReasonFieldNumber = 2; private uint reason_; public static MessageParser<DissolveRequest> Parser { get { return DissolveRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return DissolveRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public DissolveRequest() { } public DissolveRequest(DissolveRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.reason_ = other.reason_; } public DissolveRequest Clone() { return new DissolveRequest(this); } public override bool Equals(object other) { return this.Equals(other as DissolveRequest); } public bool Equals(DissolveRequest other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1579880465) % 9) { case 0: return false; case 1: return true; case 2: return false; case 3: goto IL_B0; case 5: arg_72_0 = ((this.Reason != other.Reason) ? 1525170306 : 1001986550); continue; case 6: goto IL_41; case 7: return false; case 8: arg_72_0 = ((!DissolveRequest.smethod_0(this.AgentId, other.AgentId)) ? 1899239413 : 958508155); continue; } break; } return true; IL_41: arg_72_0 = 385524770; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1901128102 : 2054407110); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_1C; } goto IL_8F; uint arg_63_0; while (true) { IL_5E: uint num2; switch ((num2 = (arg_63_0 ^ 3629984286u)) % 5u) { case 0u: goto IL_8F; case 1u: num ^= DissolveRequest.smethod_1(this.AgentId); arg_63_0 = (num2 * 3822796266u ^ 1906295796u); continue; case 3u: num ^= this.Reason.GetHashCode(); arg_63_0 = (num2 * 3556028173u ^ 3700437593u); continue; case 4u: goto IL_1C; } break; } return num; IL_1C: arg_63_0 = 3916760724u; goto IL_5E; IL_8F: arg_63_0 = ((this.Reason == 0u) ? 2947373103u : 4026166480u); goto IL_5E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_1A; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 3965558708u)) % 6u) { case 1u: output.WriteRawTag(16); arg_79_0 = (num * 592720965u ^ 1913270614u); continue; case 2u: goto IL_AC; case 3u: output.WriteUInt32(this.Reason); arg_79_0 = (num * 471020074u ^ 1334289492u); continue; case 4u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_79_0 = (num * 1443791502u ^ 1422788992u); continue; case 5u: goto IL_1A; } break; } return; IL_1A: arg_79_0 = 3843694592u; goto IL_74; IL_AC: arg_79_0 = ((this.Reason != 0u) ? 3015829841u : 3660815034u); goto IL_74; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_5A; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 2314346165u)) % 5u) { case 0u: goto IL_5A; case 2u: goto IL_90; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_64_0 = (num2 * 2882107459u ^ 583861374u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_64_0 = (num2 * 2568015913u ^ 1875160756u); continue; } break; } return num; IL_5A: arg_64_0 = 4103054135u; goto IL_5F; IL_90: arg_64_0 = ((this.Reason == 0u) ? 2653047815u : 2919702566u); goto IL_5F; } public void MergeFrom(DissolveRequest other) { if (other == null) { goto IL_B5; } goto IL_FF; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 919496186u)) % 9u) { case 0u: goto IL_B5; case 1u: this.agentId_ = new EntityId(); arg_BF_0 = (num * 1933927507u ^ 1506109935u); continue; case 2u: return; case 3u: this.AgentId.MergeFrom(other.AgentId); arg_BF_0 = 939057u; continue; case 4u: arg_BF_0 = (((this.agentId_ != null) ? 863646178u : 162307365u) ^ num * 1728041802u); continue; case 6u: arg_BF_0 = ((other.Reason == 0u) ? 1602789511u : 759616062u); continue; case 7u: goto IL_FF; case 8u: this.Reason = other.Reason; arg_BF_0 = (num * 2409011358u ^ 199060095u); continue; } break; } return; IL_B5: arg_BF_0 = 1703943730u; goto IL_BA; IL_FF: arg_BF_0 = ((other.agentId_ != null) ? 778214258u : 939057u); goto IL_BA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14D: uint num; uint arg_101_0 = ((num = input.ReadTag()) == 0u) ? 4021524952u : 4263727226u; while (true) { uint num2; switch ((num2 = (arg_101_0 ^ 3759811609u)) % 12u) { case 0u: this.Reason = input.ReadUInt32(); arg_101_0 = 2375964417u; continue; case 1u: input.ReadMessage(this.agentId_); arg_101_0 = 3837076934u; continue; case 2u: this.agentId_ = new EntityId(); arg_101_0 = (num2 * 2526133622u ^ 2941761076u); continue; case 3u: arg_101_0 = (num2 * 522638497u ^ 3552949822u); continue; case 4u: goto IL_14D; case 5u: arg_101_0 = 4263727226u; continue; case 6u: arg_101_0 = (num2 * 934752216u ^ 1208109329u); continue; case 7u: arg_101_0 = ((num != 10u) ? 4253044477u : 2539055363u); continue; case 8u: arg_101_0 = (((num == 16u) ? 1329093537u : 65638770u) ^ num2 * 2139693604u); continue; case 10u: arg_101_0 = ((this.agentId_ == null) ? 4266554007u : 2826427712u); continue; case 11u: input.SkipLastField(); arg_101_0 = (num2 * 273105466u ^ 1627280993u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AreaTriggerFields.cs using System; public enum AreaTriggerFields { OverrideScaleCurve = 12, ExtraScaleCurve = 19, Caster = 26, Duration = 30, TimeToTarget, TimeToTargetScale, TimeToTargetExtraScale, SpellID, SpellForVisuals, SpellXSpellVisualID, BoundsRadius2D, DecalPropertiesID, CreatingEffectGUID, End = 43 } <file_sep>/Bgs.Protocol.Config/ServiceAliases.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Config { [DebuggerNonUserCode] public sealed class ServiceAliases : IMessage<ServiceAliases>, IEquatable<ServiceAliases>, IDeepCloneable<ServiceAliases>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServiceAliases.__c __9 = new ServiceAliases.__c(); internal ServiceAliases cctor>b__24_0() { return new ServiceAliases(); } } private static readonly MessageParser<ServiceAliases> _parser = new MessageParser<ServiceAliases>(new Func<ServiceAliases>(ServiceAliases.__c.__9.<.cctor>b__24_0)); public const int ProtocolAliasFieldNumber = 1; private static readonly FieldCodec<ProtocolAlias> _repeated_protocolAlias_codec; private readonly RepeatedField<ProtocolAlias> protocolAlias_ = new RepeatedField<ProtocolAlias>(); public static MessageParser<ServiceAliases> Parser { get { return ServiceAliases._parser; } } public static MessageDescriptor Descriptor { get { return RpcConfigReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return ServiceAliases.Descriptor; } } public RepeatedField<ProtocolAlias> ProtocolAlias { get { return this.protocolAlias_; } } public ServiceAliases() { } public ServiceAliases(ServiceAliases other) : this() { this.protocolAlias_ = other.protocolAlias_.Clone(); } public ServiceAliases Clone() { return new ServiceAliases(this); } public override bool Equals(object other) { return this.Equals(other as ServiceAliases); } public bool Equals(ServiceAliases other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1702468532) % 7) { case 0: return false; case 1: goto IL_7A; case 2: return false; case 3: return true; case 4: arg_48_0 = ((!this.protocolAlias_.Equals(other.protocolAlias_)) ? 4507462 : 737729059); continue; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = 1107723482; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 2096453890 : 1970810046); goto IL_43; } public override int GetHashCode() { return 1 ^ ServiceAliases.smethod_0(this.protocolAlias_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.protocolAlias_.WriteTo(output, ServiceAliases._repeated_protocolAlias_codec); } public int CalculateSize() { return 0 + this.protocolAlias_.CalculateSize(ServiceAliases._repeated_protocolAlias_codec); } public void MergeFrom(ServiceAliases other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -654176352; IL_08: switch ((arg_0D_0 ^ -1874911169) % 4) { case 0: goto IL_03; case 1: IL_27: this.protocolAlias_.Add(other.protocolAlias_); arg_0D_0 = -1663324043; goto IL_08; case 3: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 2502439279u : 4180235726u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 2872219501u)) % 7u) { case 0u: arg_77_0 = 2502439279u; continue; case 1u: input.SkipLastField(); arg_77_0 = (num2 * 402693679u ^ 2120460632u); continue; case 2u: goto IL_AE; case 3u: arg_77_0 = ((num == 10u) ? 2877924794u : 4019724560u); continue; case 5u: this.protocolAlias_.AddEntriesFrom(input, ServiceAliases._repeated_protocolAlias_codec); arg_77_0 = 2850981270u; continue; case 6u: arg_77_0 = (num2 * 3820891117u ^ 2842768600u); continue; } return; } } } static ServiceAliases() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 3269351539u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2930130785u)) % 3u) { case 1u: ServiceAliases._repeated_protocolAlias_codec = FieldCodec.ForMessage<ProtocolAlias>(10u, Bgs.Protocol.Config.ProtocolAlias.Parser); arg_3F_0 = (num * 719774220u ^ 1128839081u); continue; case 2u: goto IL_57; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/EntityId.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class EntityId : IMessage<EntityId>, IEquatable<EntityId>, IDeepCloneable<EntityId>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EntityId.__c __9 = new EntityId.__c(); internal EntityId cctor>b__29_0() { return new EntityId(); } } private static readonly MessageParser<EntityId> _parser = new MessageParser<EntityId>(new Func<EntityId>(EntityId.__c.__9.<.cctor>b__29_0)); public const int HighFieldNumber = 1; private ulong high_; public const int LowFieldNumber = 2; private ulong low_; public static MessageParser<EntityId> Parser { get { return EntityId._parser; } } public static MessageDescriptor Descriptor { get { return EntityTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return EntityId.Descriptor; } } public ulong High { get { return this.high_; } set { this.high_ = value; } } public ulong Low { get { return this.low_; } set { this.low_ = value; } } public EntityId() { } public EntityId(EntityId other) : this() { this.high_ = other.high_; this.low_ = other.low_; } public EntityId Clone() { return new EntityId(this); } public override bool Equals(object other) { return this.Equals(other as EntityId); } public bool Equals(EntityId other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ 239387858) % 9) { case 0: goto IL_AB; case 1: return false; case 2: arg_6D_0 = ((this.Low != other.Low) ? 1586809258 : 334036230); continue; case 3: return true; case 4: arg_6D_0 = ((this.High != other.High) ? 1349451010 : 1956876109); continue; case 5: return false; case 6: goto IL_15; case 7: return false; } break; } return true; IL_15: arg_6D_0 = 2007473208; goto IL_68; IL_AB: arg_6D_0 = ((other == this) ? 1856708497 : 50257523); goto IL_68; } public override int GetHashCode() { int num = 1; while (true) { IL_B8: uint arg_94_0 = 4011092708u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 3318548026u)) % 6u) { case 0u: goto IL_B8; case 1u: num ^= this.Low.GetHashCode(); arg_94_0 = (num2 * 636770190u ^ 3867556209u); continue; case 2u: num ^= this.High.GetHashCode(); arg_94_0 = (num2 * 3401924882u ^ 1837497009u); continue; case 3u: arg_94_0 = ((this.Low == 0uL) ? 3987815871u : 2992812635u); continue; case 4u: arg_94_0 = (((this.High == 0uL) ? 191901727u : 1288224076u) ^ num2 * 2057110545u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.High != 0uL) { goto IL_7E; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 3383780884u)) % 7u) { case 0u: goto IL_7E; case 2u: output.WriteFixed64(this.Low); arg_88_0 = (num * 3479259615u ^ 2220931131u); continue; case 3u: goto IL_BF; case 4u: output.WriteRawTag(9); arg_88_0 = (num * 1458404235u ^ 2058829048u); continue; case 5u: output.WriteRawTag(17); arg_88_0 = (num * 2773289365u ^ 490782989u); continue; case 6u: output.WriteFixed64(this.High); arg_88_0 = (num * 735607873u ^ 3723559260u); continue; } break; } return; IL_7E: arg_88_0 = 3480764451u; goto IL_83; IL_BF: arg_88_0 = ((this.Low != 0uL) ? 2660531343u : 3919595049u); goto IL_83; } public int CalculateSize() { int num = 0; if (this.High != 0uL) { goto IL_41; } goto IL_77; uint arg_4B_0; while (true) { IL_46: uint num2; switch ((num2 = (arg_4B_0 ^ 549960690u)) % 5u) { case 0u: goto IL_41; case 1u: num += 9; arg_4B_0 = (num2 * 4144724228u ^ 417625094u); continue; case 2u: goto IL_77; case 3u: num += 9; arg_4B_0 = (num2 * 2494548650u ^ 1876636027u); continue; } break; } return num; IL_41: arg_4B_0 = 2096385273u; goto IL_46; IL_77: arg_4B_0 = ((this.Low != 0uL) ? 680969211u : 2133655169u); goto IL_46; } public void MergeFrom(EntityId other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 175745408u)) % 7u) { case 0u: goto IL_6C; case 1u: return; case 2u: this.High = other.High; arg_76_0 = (num * 3296995850u ^ 803065134u); continue; case 3u: this.Low = other.Low; arg_76_0 = (num * 1465478082u ^ 404435026u); continue; case 4u: arg_76_0 = ((other.Low != 0uL) ? 1639294413u : 1938927880u); continue; case 6u: goto IL_AD; } break; } return; IL_6C: arg_76_0 = 1523588078u; goto IL_71; IL_AD: arg_76_0 = ((other.High != 0uL) ? 1261806134u : 1197579314u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_EE: uint num; uint arg_AE_0 = ((num = input.ReadTag()) == 0u) ? 2596405310u : 3746403002u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 3687839862u)) % 9u) { case 0u: arg_AE_0 = 3746403002u; continue; case 1u: this.High = input.ReadFixed64(); arg_AE_0 = 2260494908u; continue; case 2u: arg_AE_0 = (num2 * 3694170469u ^ 727805065u); continue; case 3u: arg_AE_0 = ((num != 9u) ? 3858688494u : 2836792519u); continue; case 4u: arg_AE_0 = (((num == 17u) ? 3638900163u : 4035197468u) ^ num2 * 12135852u); continue; case 6u: this.Low = input.ReadFixed64(); arg_AE_0 = 2260494908u; continue; case 7u: input.SkipLastField(); arg_AE_0 = (num2 * 2390404845u ^ 3296572389u); continue; case 8u: goto IL_EE; } return; } } } } } <file_sep>/Google.Protobuf/FileOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class FileOptions : IMessage<FileOptions>, IEquatable<FileOptions>, IDeepCloneable<FileOptions>, IMessage { [DebuggerNonUserCode] public static class Types { internal enum OptimizeMode { SPEED = 1, CODE_SIZE, LITE_RUNTIME } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FileOptions.__c __9 = new FileOptions.__c(); internal FileOptions cctor>b__80_0() { return new FileOptions(); } } private static readonly MessageParser<FileOptions> _parser = new MessageParser<FileOptions>(new Func<FileOptions>(FileOptions.__c.__9.<.cctor>b__80_0)); public const int JavaPackageFieldNumber = 1; private string javaPackage_ = ""; public const int JavaOuterClassnameFieldNumber = 8; private string javaOuterClassname_ = ""; public const int JavaMultipleFilesFieldNumber = 10; private bool javaMultipleFiles_; public const int JavaGenerateEqualsAndHashFieldNumber = 20; private bool javaGenerateEqualsAndHash_; public const int JavaStringCheckUtf8FieldNumber = 27; private bool javaStringCheckUtf8_; public const int OptimizeForFieldNumber = 9; private FileOptions.Types.OptimizeMode optimizeFor_ = FileOptions.Types.OptimizeMode.SPEED; public const int GoPackageFieldNumber = 11; private string goPackage_ = ""; public const int CcGenericServicesFieldNumber = 16; private bool ccGenericServices_; public const int JavaGenericServicesFieldNumber = 17; private bool javaGenericServices_; public const int PyGenericServicesFieldNumber = 18; private bool pyGenericServices_; public const int DeprecatedFieldNumber = 23; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec; private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<FileOptions> Parser { get { return FileOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return FileOptions.Descriptor; } } public string JavaPackage { get { return this.javaPackage_; } set { this.javaPackage_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public string JavaOuterClassname { get { return this.javaOuterClassname_; } set { this.javaOuterClassname_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public bool JavaMultipleFiles { get { return this.javaMultipleFiles_; } set { this.javaMultipleFiles_ = value; } } public bool JavaGenerateEqualsAndHash { get { return this.javaGenerateEqualsAndHash_; } set { this.javaGenerateEqualsAndHash_ = value; } } public bool JavaStringCheckUtf8 { get { return this.javaStringCheckUtf8_; } set { this.javaStringCheckUtf8_ = value; } } public FileOptions.Types.OptimizeMode OptimizeFor { get { return this.optimizeFor_; } set { this.optimizeFor_ = value; } } public string GoPackage { get { return this.goPackage_; } set { this.goPackage_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public bool CcGenericServices { get { return this.ccGenericServices_; } set { this.ccGenericServices_ = value; } } public bool JavaGenericServices { get { return this.javaGenericServices_; } set { this.javaGenericServices_ = value; } } public bool PyGenericServices { get { return this.pyGenericServices_; } set { this.pyGenericServices_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public FileOptions() { } public FileOptions(FileOptions other) : this() { this.javaPackage_ = other.javaPackage_; this.javaOuterClassname_ = other.javaOuterClassname_; this.javaMultipleFiles_ = other.javaMultipleFiles_; this.javaGenerateEqualsAndHash_ = other.javaGenerateEqualsAndHash_; this.javaStringCheckUtf8_ = other.javaStringCheckUtf8_; this.optimizeFor_ = other.optimizeFor_; this.goPackage_ = other.goPackage_; this.ccGenericServices_ = other.ccGenericServices_; this.javaGenericServices_ = other.javaGenericServices_; this.pyGenericServices_ = other.pyGenericServices_; this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public FileOptions Clone() { return new FileOptions(this); } public override bool Equals(object other) { return this.Equals(other as FileOptions); } public bool Equals(FileOptions other) { if (other == null) { goto IL_18; } goto IL_2B3; int arg_225_0; while (true) { IL_220: switch ((arg_225_0 ^ 1485745076) % 29) { case 0: return false; case 1: return false; case 2: return false; case 3: arg_225_0 = ((this.JavaStringCheckUtf8 != other.JavaStringCheckUtf8) ? 1839108915 : 1184970245); continue; case 4: return false; case 5: return false; case 6: return false; case 7: arg_225_0 = ((this.OptimizeFor != other.OptimizeFor) ? 405351963 : 1868213832); continue; case 9: arg_225_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? 1579890951 : 1507574572); continue; case 10: return false; case 11: return false; case 12: return false; case 13: arg_225_0 = ((this.CcGenericServices != other.CcGenericServices) ? 1274446639 : 1629596019); continue; case 14: arg_225_0 = ((this.JavaGenerateEqualsAndHash != other.JavaGenerateEqualsAndHash) ? 1207009032 : 1729225393); continue; case 15: arg_225_0 = (FileOptions.smethod_0(this.GoPackage, other.GoPackage) ? 1647226238 : 213992040); continue; case 16: arg_225_0 = ((this.JavaMultipleFiles == other.JavaMultipleFiles) ? 1186531242 : 563523432); continue; case 17: arg_225_0 = ((this.Deprecated != other.Deprecated) ? 180989460 : 440965460); continue; case 18: return true; case 19: return false; case 20: arg_225_0 = ((this.JavaGenericServices != other.JavaGenericServices) ? 2088386930 : 471416026); continue; case 21: arg_225_0 = (FileOptions.smethod_0(this.JavaPackage, other.JavaPackage) ? 2003644490 : 1674991711); continue; case 22: arg_225_0 = (FileOptions.smethod_0(this.JavaOuterClassname, other.JavaOuterClassname) ? 1522612394 : 583346868); continue; case 23: return false; case 24: arg_225_0 = ((this.PyGenericServices != other.PyGenericServices) ? 410946571 : 1049500272); continue; case 25: return false; case 26: return false; case 27: goto IL_2B3; case 28: goto IL_18; } break; } return true; IL_18: arg_225_0 = 131402220; goto IL_220; IL_2B3: arg_225_0 = ((other != this) ? 674534373 : 423788006); goto IL_220; } public override int GetHashCode() { int num = 1; while (true) { IL_38D: uint arg_320_0 = 663101929u; while (true) { uint num2; switch ((num2 = (arg_320_0 ^ 1809467605u)) % 24u) { case 1u: arg_320_0 = ((!this.PyGenericServices) ? 1911295761u : 256869942u); continue; case 2u: arg_320_0 = (this.JavaGenerateEqualsAndHash ? 450896799u : 1664469786u); continue; case 3u: num ^= this.CcGenericServices.GetHashCode(); arg_320_0 = (num2 * 1372394439u ^ 2336727723u); continue; case 4u: num ^= this.JavaMultipleFiles.GetHashCode(); arg_320_0 = (num2 * 3270017000u ^ 3043712871u); continue; case 5u: arg_320_0 = ((!this.CcGenericServices) ? 1916106262u : 770212750u); continue; case 6u: arg_320_0 = ((FileOptions.smethod_1(this.JavaOuterClassname) == 0) ? 1417646901u : 37859019u); continue; case 7u: goto IL_38D; case 8u: arg_320_0 = ((!this.JavaMultipleFiles) ? 1336307271u : 198677793u); continue; case 9u: num ^= this.JavaStringCheckUtf8.GetHashCode(); arg_320_0 = (num2 * 2491936501u ^ 2545123181u); continue; case 10u: num ^= this.JavaGenerateEqualsAndHash.GetHashCode(); arg_320_0 = (num2 * 4226992357u ^ 2217869864u); continue; case 11u: arg_320_0 = (this.JavaGenericServices ? 2081305093u : 1054298524u); continue; case 12u: arg_320_0 = (((FileOptions.smethod_1(this.JavaPackage) != 0) ? 3367770252u : 4239152783u) ^ num2 * 979792843u); continue; case 13u: num ^= FileOptions.smethod_2(this.JavaPackage); arg_320_0 = (num2 * 1840929975u ^ 2558978192u); continue; case 14u: num ^= this.GoPackage.GetHashCode(); arg_320_0 = (num2 * 2782481432u ^ 849127840u); continue; case 15u: arg_320_0 = ((!this.JavaStringCheckUtf8) ? 748281944u : 1457983380u); continue; case 16u: num ^= this.JavaGenericServices.GetHashCode(); arg_320_0 = (num2 * 1783500264u ^ 3506212124u); continue; case 17u: num ^= this.OptimizeFor.GetHashCode(); arg_320_0 = (num2 * 4019971165u ^ 274145042u); continue; case 18u: arg_320_0 = ((this.GoPackage.Length == 0) ? 1204068336u : 1442442555u); continue; case 19u: num ^= this.PyGenericServices.GetHashCode(); arg_320_0 = (num2 * 480397157u ^ 2328730526u); continue; case 20u: arg_320_0 = ((!this.Deprecated) ? 441050397u : 1372792194u); continue; case 21u: arg_320_0 = ((this.OptimizeFor == FileOptions.Types.OptimizeMode.SPEED) ? 556066215u : 892257004u); continue; case 22u: num ^= FileOptions.smethod_2(this.JavaOuterClassname); arg_320_0 = (num2 * 3397399645u ^ 2535400403u); continue; case 23u: num ^= this.Deprecated.GetHashCode(); arg_320_0 = (num2 * 2313165723u ^ 1192527280u); continue; } goto Block_12; } } Block_12: return num ^ this.uninterpretedOption_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FileOptions.smethod_1(this.JavaPackage) != 0) { goto IL_1F2; } goto IL_423; uint arg_393_0; while (true) { IL_38E: uint num; switch ((num = (arg_393_0 ^ 570702566u)) % 29u) { case 0u: arg_393_0 = (this.Deprecated ? 500571351u : 1992830527u); continue; case 1u: output.WriteBool(this.JavaGenericServices); arg_393_0 = (num * 353747402u ^ 3668218137u); continue; case 2u: output.WriteRawTag(66); arg_393_0 = (num * 866613098u ^ 1963733649u); continue; case 3u: output.WriteRawTag(160, 1); output.WriteBool(this.JavaGenerateEqualsAndHash); arg_393_0 = (num * 3071447459u ^ 3269539545u); continue; case 4u: output.WriteString(this.JavaPackage); arg_393_0 = (num * 4142894039u ^ 4076690698u); continue; case 5u: output.WriteBool(this.CcGenericServices); arg_393_0 = (num * 1720445809u ^ 3433311488u); continue; case 6u: output.WriteRawTag(144, 1); output.WriteBool(this.PyGenericServices); arg_393_0 = (num * 4281892466u ^ 3509885412u); continue; case 7u: arg_393_0 = ((FileOptions.smethod_1(this.GoPackage) == 0) ? 277246880u : 1260726361u); continue; case 8u: output.WriteString(this.JavaOuterClassname); arg_393_0 = (num * 182106993u ^ 291733277u); continue; case 9u: output.WriteRawTag(72); output.WriteEnum((int)this.OptimizeFor); arg_393_0 = (num * 2357675256u ^ 4108565505u); continue; case 10u: output.WriteRawTag(90); output.WriteString(this.GoPackage); arg_393_0 = (num * 2322583823u ^ 1351187345u); continue; case 11u: arg_393_0 = ((!this.CcGenericServices) ? 688927969u : 806970755u); continue; case 13u: goto IL_423; case 14u: goto IL_1F2; case 15u: output.WriteRawTag(128, 1); arg_393_0 = (num * 218227789u ^ 975168246u); continue; case 16u: output.WriteRawTag(136, 1); arg_393_0 = (num * 3670029748u ^ 987867287u); continue; case 17u: output.WriteBool(this.Deprecated); arg_393_0 = (num * 2887058263u ^ 2972615618u); continue; case 18u: output.WriteRawTag(184, 1); arg_393_0 = (num * 4278035380u ^ 315297625u); continue; case 19u: arg_393_0 = ((!this.JavaGenericServices) ? 474710427u : 881570165u); continue; case 20u: arg_393_0 = (this.JavaMultipleFiles ? 856730085u : 677061062u); continue; case 21u: output.WriteRawTag(80); arg_393_0 = (num * 4177951085u ^ 238180474u); continue; case 22u: output.WriteRawTag(10); arg_393_0 = (num * 3324015853u ^ 1718232752u); continue; case 23u: output.WriteRawTag(216, 1); output.WriteBool(this.JavaStringCheckUtf8); arg_393_0 = (num * 2473351331u ^ 2705569410u); continue; case 24u: arg_393_0 = (this.JavaStringCheckUtf8 ? 362690355u : 569880605u); continue; case 25u: output.WriteBool(this.JavaMultipleFiles); arg_393_0 = (num * 3167780863u ^ 3190636515u); continue; case 26u: arg_393_0 = ((!this.JavaGenerateEqualsAndHash) ? 267170122u : 1473629111u); continue; case 27u: arg_393_0 = ((!this.PyGenericServices) ? 1901388844u : 1349740770u); continue; case 28u: arg_393_0 = ((this.OptimizeFor != FileOptions.Types.OptimizeMode.SPEED) ? 483188043u : 210165657u); continue; } break; } this.uninterpretedOption_.WriteTo(output, FileOptions._repeated_uninterpretedOption_codec); return; IL_1F2: arg_393_0 = 121246149u; goto IL_38E; IL_423: arg_393_0 = ((FileOptions.smethod_1(this.JavaOuterClassname) != 0) ? 506695166u : 905451658u); goto IL_38E; } public int CalculateSize() { int num = 0; if (FileOptions.smethod_1(this.JavaPackage) != 0) { goto IL_2A1; } goto IL_327; uint arg_2AB_0; while (true) { IL_2A6: uint num2; switch ((num2 = (arg_2AB_0 ^ 2694537478u)) % 24u) { case 0u: goto IL_2A1; case 1u: arg_2AB_0 = ((this.OptimizeFor != FileOptions.Types.OptimizeMode.SPEED) ? 3696450696u : 3563950619u); continue; case 2u: num += 3; arg_2AB_0 = (num2 * 157684125u ^ 60679546u); continue; case 3u: num += 2; arg_2AB_0 = (num2 * 1576405620u ^ 3061067611u); continue; case 4u: num += 3; arg_2AB_0 = (num2 * 1402994608u ^ 3001192921u); continue; case 5u: arg_2AB_0 = (this.Deprecated ? 3702917300u : 2304196944u); continue; case 6u: num += this.uninterpretedOption_.CalculateSize(FileOptions._repeated_uninterpretedOption_codec); arg_2AB_0 = 3613268849u; continue; case 7u: num += 3; arg_2AB_0 = (num2 * 1401666183u ^ 3139899326u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.JavaPackage); arg_2AB_0 = (num2 * 2070894749u ^ 2577282973u); continue; case 9u: arg_2AB_0 = ((!this.JavaGenerateEqualsAndHash) ? 2149697689u : 2226407802u); continue; case 10u: num += 1 + CodedOutputStream.ComputeStringSize(this.GoPackage); arg_2AB_0 = (num2 * 240316018u ^ 1626478185u); continue; case 11u: goto IL_327; case 12u: num += 3; arg_2AB_0 = (num2 * 1703077986u ^ 4173627059u); continue; case 13u: arg_2AB_0 = ((FileOptions.smethod_1(this.GoPackage) != 0) ? 3789882100u : 2319805357u); continue; case 14u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.OptimizeFor); arg_2AB_0 = (num2 * 2983144822u ^ 2124269423u); continue; case 15u: arg_2AB_0 = ((!this.JavaStringCheckUtf8) ? 2959043935u : 4282790586u); continue; case 16u: arg_2AB_0 = (this.JavaMultipleFiles ? 3069284069u : 3867262855u); continue; case 17u: arg_2AB_0 = ((!this.PyGenericServices) ? 2736306803u : 3462122960u); continue; case 18u: num += 1 + CodedOutputStream.ComputeStringSize(this.JavaOuterClassname); arg_2AB_0 = (num2 * 1954627956u ^ 847378462u); continue; case 19u: arg_2AB_0 = ((!this.CcGenericServices) ? 3811513163u : 3753620154u); continue; case 20u: num += 3; arg_2AB_0 = (num2 * 1932993627u ^ 344481419u); continue; case 21u: arg_2AB_0 = ((!this.JavaGenericServices) ? 2650498367u : 3717017009u); continue; case 22u: num += 3; arg_2AB_0 = (num2 * 2467378091u ^ 440446593u); continue; } break; } return num; IL_2A1: arg_2AB_0 = 2685813646u; goto IL_2A6; IL_327: arg_2AB_0 = ((FileOptions.smethod_1(this.JavaOuterClassname) != 0) ? 3372609924u : 3935143158u); goto IL_2A6; } public void MergeFrom(FileOptions other) { if (other == null) { goto IL_150; } goto IL_378; uint arg_2F4_0; while (true) { IL_2EF: uint num; switch ((num = (arg_2F4_0 ^ 1306314829u)) % 26u) { case 0u: arg_2F4_0 = ((other.OptimizeFor != FileOptions.Types.OptimizeMode.SPEED) ? 1761700176u : 1453384122u); continue; case 1u: arg_2F4_0 = ((FileOptions.smethod_1(other.GoPackage) == 0) ? 821125819u : 158596034u); continue; case 3u: arg_2F4_0 = (other.JavaGenerateEqualsAndHash ? 1077693214u : 2076898711u); continue; case 4u: this.CcGenericServices = other.CcGenericServices; arg_2F4_0 = (num * 3061461600u ^ 125383318u); continue; case 5u: arg_2F4_0 = ((FileOptions.smethod_1(other.JavaOuterClassname) == 0) ? 1936310734u : 12584239u); continue; case 6u: arg_2F4_0 = ((!other.Deprecated) ? 346587617u : 1488164171u); continue; case 7u: this.JavaGenericServices = other.JavaGenericServices; arg_2F4_0 = (num * 3013904442u ^ 4257192610u); continue; case 8u: arg_2F4_0 = (other.CcGenericServices ? 1810921293u : 325882518u); continue; case 9u: this.JavaPackage = other.JavaPackage; arg_2F4_0 = (num * 942289745u ^ 270884665u); continue; case 10u: return; case 11u: arg_2F4_0 = (other.JavaMultipleFiles ? 1787768190u : 1938119644u); continue; case 12u: goto IL_378; case 13u: arg_2F4_0 = (other.JavaGenericServices ? 700289514u : 1410637172u); continue; case 14u: this.Deprecated = other.Deprecated; arg_2F4_0 = (num * 3842631511u ^ 2086110955u); continue; case 15u: goto IL_150; case 16u: arg_2F4_0 = (other.JavaStringCheckUtf8 ? 1175950165u : 1892489271u); continue; case 17u: arg_2F4_0 = (other.PyGenericServices ? 711881575u : 1493636733u); continue; case 18u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_2F4_0 = 847983459u; continue; case 19u: this.OptimizeFor = other.OptimizeFor; arg_2F4_0 = (num * 1830875565u ^ 1571998755u); continue; case 20u: this.JavaStringCheckUtf8 = other.JavaStringCheckUtf8; arg_2F4_0 = (num * 3193660614u ^ 2963852455u); continue; case 21u: this.JavaMultipleFiles = other.JavaMultipleFiles; arg_2F4_0 = (num * 3061238674u ^ 2946462666u); continue; case 22u: this.PyGenericServices = other.PyGenericServices; arg_2F4_0 = (num * 2747858583u ^ 804718523u); continue; case 23u: this.JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash; arg_2F4_0 = (num * 3157914541u ^ 3574693248u); continue; case 24u: this.JavaOuterClassname = other.JavaOuterClassname; arg_2F4_0 = (num * 3364620172u ^ 2778480214u); continue; case 25u: this.GoPackage = other.GoPackage; arg_2F4_0 = (num * 4021159322u ^ 2036968893u); continue; } break; } return; IL_150: arg_2F4_0 = 792409951u; goto IL_2EF; IL_378: arg_2F4_0 = ((FileOptions.smethod_1(other.JavaPackage) != 0) ? 1655194654u : 2035789946u); goto IL_2EF; } public void MergeFrom(CodedInputStream input) { while (true) { IL_4DB: uint num; uint arg_423_0 = ((num = input.ReadTag()) == 0u) ? 4043474749u : 3412207831u; while (true) { uint num2; switch ((num2 = (arg_423_0 ^ 2763291837u)) % 39u) { case 0u: arg_423_0 = (((num == 144u) ? 2241766172u : 3079463944u) ^ num2 * 938291523u); continue; case 1u: this.GoPackage = input.ReadString(); arg_423_0 = 3434536071u; continue; case 2u: this.optimizeFor_ = (FileOptions.Types.OptimizeMode)input.ReadEnum(); arg_423_0 = 3444911032u; continue; case 3u: arg_423_0 = (((num <= 72u) ? 806106712u : 1953307803u) ^ num2 * 2273446466u); continue; case 4u: arg_423_0 = (((num != 7994u) ? 4164234963u : 2282210433u) ^ num2 * 2259624047u); continue; case 5u: arg_423_0 = (((num != 90u) ? 1372268570u : 1958917276u) ^ num2 * 450106348u); continue; case 6u: this.CcGenericServices = input.ReadBool(); arg_423_0 = 4143237926u; continue; case 7u: arg_423_0 = ((num == 184u) ? 2292087258u : 2411371357u); continue; case 8u: arg_423_0 = (num2 * 2695896875u ^ 3378898000u); continue; case 9u: goto IL_4DB; case 10u: this.JavaGenerateEqualsAndHash = input.ReadBool(); arg_423_0 = 4129633089u; continue; case 11u: arg_423_0 = (((num == 128u) ? 2429442293u : 2735098950u) ^ num2 * 1599851914u); continue; case 12u: arg_423_0 = (((num == 72u) ? 3506030535u : 2569305374u) ^ num2 * 3922030571u); continue; case 13u: input.SkipLastField(); arg_423_0 = 3169861217u; continue; case 14u: this.uninterpretedOption_.AddEntriesFrom(input, FileOptions._repeated_uninterpretedOption_codec); arg_423_0 = 3434536071u; continue; case 15u: arg_423_0 = (num2 * 3643451977u ^ 2135159867u); continue; case 16u: arg_423_0 = (((num != 136u) ? 1830092195u : 1362167681u) ^ num2 * 1737402218u); continue; case 17u: arg_423_0 = (num2 * 1127398467u ^ 4172562725u); continue; case 18u: arg_423_0 = (num2 * 1273422301u ^ 926690525u); continue; case 19u: this.PyGenericServices = input.ReadBool(); arg_423_0 = 3434536071u; continue; case 20u: arg_423_0 = ((num == 80u) ? 3908305269u : 2214903548u); continue; case 21u: arg_423_0 = (((num != 10u) ? 206524314u : 1893366698u) ^ num2 * 1088182868u); continue; case 22u: arg_423_0 = (num2 * 2517231981u ^ 4289454968u); continue; case 23u: arg_423_0 = 3412207831u; continue; case 24u: arg_423_0 = (num2 * 3455673022u ^ 1277495695u); continue; case 25u: arg_423_0 = (((num == 66u) ? 2063737596u : 579344230u) ^ num2 * 4240865289u); continue; case 26u: arg_423_0 = ((num <= 160u) ? 3451932250u : 2399423149u); continue; case 27u: this.JavaGenericServices = input.ReadBool(); arg_423_0 = 3434536071u; continue; case 29u: arg_423_0 = ((num <= 128u) ? 3909762411u : 3988271493u); continue; case 30u: arg_423_0 = (num2 * 4114320067u ^ 4074368436u); continue; case 31u: this.JavaPackage = input.ReadString(); arg_423_0 = 3434536071u; continue; case 32u: this.Deprecated = input.ReadBool(); arg_423_0 = 3434536071u; continue; case 33u: this.JavaMultipleFiles = input.ReadBool(); arg_423_0 = 3434536071u; continue; case 34u: arg_423_0 = (num2 * 3307228200u ^ 1652584367u); continue; case 35u: arg_423_0 = (((num == 216u) ? 2496218907u : 3339873724u) ^ num2 * 3148012058u); continue; case 36u: this.JavaStringCheckUtf8 = input.ReadBool(); arg_423_0 = 4088775644u; continue; case 37u: arg_423_0 = (((num == 160u) ? 387237504u : 1407463669u) ^ num2 * 223130896u); continue; case 38u: this.JavaOuterClassname = input.ReadString(); arg_423_0 = 3434536071u; continue; } return; } } } static FileOptions() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_5A: uint arg_42_0 = 3333105537u; while (true) { uint num; switch ((num = (arg_42_0 ^ 3443901100u)) % 3u) { case 0u: goto IL_5A; case 1u: FileOptions._repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); arg_42_0 = (num * 4081440776u ^ 3617123222u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/FieldDescriptorProto.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class FieldDescriptorProto : IMessage<FieldDescriptorProto>, IEquatable<FieldDescriptorProto>, IDeepCloneable<FieldDescriptorProto>, IMessage { [DebuggerNonUserCode] public static class Types { internal enum Type { TYPE_DOUBLE = 1, TYPE_FLOAT, TYPE_INT64, TYPE_UINT64, TYPE_INT32, TYPE_FIXED64, TYPE_FIXED32, TYPE_BOOL, TYPE_STRING, TYPE_GROUP, TYPE_MESSAGE, TYPE_BYTES, TYPE_UINT32, TYPE_ENUM, TYPE_SFIXED32, TYPE_SFIXED64, TYPE_SINT32, TYPE_SINT64 } internal enum Label { LABEL_OPTIONAL = 1, LABEL_REQUIRED, LABEL_REPEATED } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldDescriptorProto.__c __9 = new FieldDescriptorProto.__c(); internal FieldDescriptorProto cctor>b__65_0() { return new FieldDescriptorProto(); } } private static readonly MessageParser<FieldDescriptorProto> _parser = new MessageParser<FieldDescriptorProto>(new Func<FieldDescriptorProto>(FieldDescriptorProto.__c.__9.<.cctor>b__65_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int NumberFieldNumber = 3; private int number_; public const int LabelFieldNumber = 4; private FieldDescriptorProto.Types.Label label_ = FieldDescriptorProto.Types.Label.LABEL_OPTIONAL; public const int TypeFieldNumber = 5; private FieldDescriptorProto.Types.Type type_ = FieldDescriptorProto.Types.Type.TYPE_DOUBLE; public const int TypeNameFieldNumber = 6; private string typeName_ = ""; public const int ExtendeeFieldNumber = 2; private string extendee_ = ""; public const int DefaultValueFieldNumber = 7; private string defaultValue_ = ""; public const int OneofIndexFieldNumber = 9; private int oneofIndex_; public const int OptionsFieldNumber = 8; private FieldOptions options_; public static MessageParser<FieldDescriptorProto> Parser { get { return FieldDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return FieldDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public int Number { get { return this.number_; } set { this.number_ = value; } } public FieldDescriptorProto.Types.Label Label { get { return this.label_; } set { this.label_ = value; } } public FieldDescriptorProto.Types.Type Type { get { return this.type_; } set { this.type_ = value; } } public string TypeName { get { return this.typeName_; } set { this.typeName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string Extendee { get { return this.extendee_; } set { this.extendee_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string DefaultValue { get { return this.defaultValue_; } set { this.defaultValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public int OneofIndex { get { return this.oneofIndex_; } set { this.oneofIndex_ = value; } } public FieldOptions Options { get { return this.options_; } set { this.options_ = value; } } public FieldDescriptorProto() { } public FieldDescriptorProto(FieldDescriptorProto other) : this() { while (true) { IL_CE: uint arg_AA_0 = 3495722090u; while (true) { uint num; switch ((num = (arg_AA_0 ^ 4136359401u)) % 6u) { case 0u: this.defaultValue_ = other.defaultValue_; arg_AA_0 = (num * 727439590u ^ 547493252u); continue; case 1u: this.name_ = other.name_; this.number_ = other.number_; this.label_ = other.label_; this.type_ = other.type_; this.typeName_ = other.typeName_; arg_AA_0 = (num * 2526669789u ^ 2011841231u); continue; case 3u: this.oneofIndex_ = other.oneofIndex_; arg_AA_0 = (num * 701689815u ^ 3736150998u); continue; case 4u: goto IL_CE; case 5u: this.extendee_ = other.extendee_; arg_AA_0 = (num * 2800583940u ^ 2862547733u); continue; } goto Block_1; } } Block_1: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public FieldDescriptorProto Clone() { return new FieldDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as FieldDescriptorProto); } public bool Equals(FieldDescriptorProto other) { if (other == null) { goto IL_F7; } goto IL_225; int arg_1AF_0; while (true) { IL_1AA: switch ((arg_1AF_0 ^ -1622397744) % 23) { case 0: arg_1AF_0 = (FieldDescriptorProto.smethod_0(this.TypeName, other.TypeName) ? -1588278525 : -1669847641); continue; case 1: return false; case 2: arg_1AF_0 = ((!FieldDescriptorProto.smethod_1(this.Options, other.Options)) ? -2130499834 : -1879899377); continue; case 3: arg_1AF_0 = ((this.Number == other.Number) ? -83737870 : -826171158); continue; case 4: return false; case 5: arg_1AF_0 = (FieldDescriptorProto.smethod_0(this.Extendee, other.Extendee) ? -701486193 : -1332776066); continue; case 6: return false; case 7: goto IL_225; case 9: goto IL_F7; case 10: arg_1AF_0 = (FieldDescriptorProto.smethod_0(this.DefaultValue, other.DefaultValue) ? -182826777 : -2064151855); continue; case 11: return false; case 12: return false; case 13: arg_1AF_0 = ((this.OneofIndex == other.OneofIndex) ? -633631952 : -1573973499); continue; case 14: return true; case 15: return false; case 16: return false; case 17: arg_1AF_0 = ((this.Label != other.Label) ? -1475958035 : -1977579195); continue; case 18: arg_1AF_0 = ((!FieldDescriptorProto.smethod_0(this.Name, other.Name)) ? -1377582192 : -718931617); continue; case 19: return false; case 20: return false; case 21: arg_1AF_0 = ((this.Type != other.Type) ? -721293243 : -745577575); continue; case 22: return false; } break; } return true; IL_F7: arg_1AF_0 = -1259080098; goto IL_1AA; IL_225: arg_1AF_0 = ((other != this) ? -1049348044 : -478465409); goto IL_1AA; } public override int GetHashCode() { int num = 1; while (true) { IL_300: uint arg_2A2_0 = 1042007764u; while (true) { uint num2; switch ((num2 = (arg_2A2_0 ^ 1687145303u)) % 20u) { case 0u: num ^= this.Extendee.GetHashCode(); arg_2A2_0 = (num2 * 559711469u ^ 1237746307u); continue; case 1u: arg_2A2_0 = ((this.OneofIndex == 0) ? 470482876u : 678777066u); continue; case 2u: arg_2A2_0 = ((this.Extendee.Length == 0) ? 1541302743u : 77474163u); continue; case 4u: arg_2A2_0 = ((this.DefaultValue.Length == 0) ? 1049242278u : 1869468517u); continue; case 5u: num ^= this.OneofIndex.GetHashCode(); arg_2A2_0 = (num2 * 1743822204u ^ 454862640u); continue; case 6u: num ^= this.DefaultValue.GetHashCode(); arg_2A2_0 = (num2 * 2935737612u ^ 1853163262u); continue; case 7u: arg_2A2_0 = (((FieldDescriptorProto.smethod_2(this.Name) == 0) ? 3141306381u : 3607710378u) ^ num2 * 3323050049u); continue; case 8u: arg_2A2_0 = ((this.Type == FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 139389796u : 762177033u); continue; case 9u: num ^= this.Number.GetHashCode(); arg_2A2_0 = (num2 * 1223856361u ^ 3505663484u); continue; case 10u: num ^= FieldDescriptorProto.smethod_3(this.Name); arg_2A2_0 = (num2 * 4046342376u ^ 3094014590u); continue; case 11u: num ^= this.TypeName.GetHashCode(); arg_2A2_0 = (num2 * 1485197506u ^ 4034822367u); continue; case 12u: goto IL_300; case 13u: arg_2A2_0 = ((this.Number == 0) ? 516548853u : 41301110u); continue; case 14u: arg_2A2_0 = ((this.Label != FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 975109019u : 1815656407u); continue; case 15u: arg_2A2_0 = ((this.options_ == null) ? 1649426560u : 1729853586u); continue; case 16u: num ^= this.Label.GetHashCode(); arg_2A2_0 = (num2 * 3256192452u ^ 2617053159u); continue; case 17u: num ^= this.Options.GetHashCode(); arg_2A2_0 = (num2 * 2526896112u ^ 1438638896u); continue; case 18u: num ^= this.Type.GetHashCode(); arg_2A2_0 = (num2 * 4272640808u ^ 2040036308u); continue; case 19u: arg_2A2_0 = ((this.TypeName.Length != 0) ? 893089060u : 1859175417u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FieldDescriptorProto.smethod_2(this.Name) != 0) { goto IL_2CE; } goto IL_354; uint arg_2D8_0; while (true) { IL_2D3: uint num; switch ((num = (arg_2D8_0 ^ 2654911979u)) % 24u) { case 0u: goto IL_2CE; case 2u: output.WriteString(this.Name); arg_2D8_0 = (num * 1090973606u ^ 2578323898u); continue; case 3u: output.WriteRawTag(10); arg_2D8_0 = (num * 356762882u ^ 840372207u); continue; case 4u: arg_2D8_0 = ((FieldDescriptorProto.smethod_2(this.DefaultValue) != 0) ? 2264023597u : 3538513726u); continue; case 5u: goto IL_354; case 6u: output.WriteRawTag(58); arg_2D8_0 = (num * 3772257912u ^ 4116347004u); continue; case 7u: output.WriteRawTag(18); output.WriteString(this.Extendee); arg_2D8_0 = (num * 1641625848u ^ 3081768349u); continue; case 8u: arg_2D8_0 = ((this.OneofIndex != 0) ? 2534251784u : 2351138802u); continue; case 9u: output.WriteRawTag(40); output.WriteEnum((int)this.Type); arg_2D8_0 = (num * 388707033u ^ 4024155842u); continue; case 10u: arg_2D8_0 = ((this.Label == FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 2561270455u : 3653259040u); continue; case 11u: output.WriteRawTag(32); arg_2D8_0 = (num * 1568356473u ^ 2468499510u); continue; case 12u: output.WriteRawTag(24); output.WriteInt32(this.Number); arg_2D8_0 = (num * 3002378881u ^ 3452892133u); continue; case 13u: output.WriteMessage(this.Options); arg_2D8_0 = (num * 4089909008u ^ 1626944707u); continue; case 14u: output.WriteEnum((int)this.Label); arg_2D8_0 = (num * 544542563u ^ 1939303805u); continue; case 15u: output.WriteString(this.TypeName); arg_2D8_0 = (num * 2320695448u ^ 6533167u); continue; case 16u: arg_2D8_0 = ((FieldDescriptorProto.smethod_2(this.TypeName) != 0) ? 3888320041u : 2977943943u); continue; case 17u: output.WriteRawTag(66); arg_2D8_0 = (num * 2656055471u ^ 2964384009u); continue; case 18u: output.WriteRawTag(50); arg_2D8_0 = (num * 4114172877u ^ 2002243110u); continue; case 19u: output.WriteRawTag(72); output.WriteInt32(this.OneofIndex); arg_2D8_0 = (num * 2007126477u ^ 1406971701u); continue; case 20u: arg_2D8_0 = ((this.Type != FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 4244843834u : 3494391275u); continue; case 21u: arg_2D8_0 = ((this.options_ == null) ? 2370754323u : 3121958954u); continue; case 22u: arg_2D8_0 = ((this.Number == 0) ? 3419538649u : 2279881943u); continue; case 23u: output.WriteString(this.DefaultValue); arg_2D8_0 = (num * 3805742371u ^ 2649947275u); continue; } break; } return; IL_2CE: arg_2D8_0 = 2761876080u; goto IL_2D3; IL_354: arg_2D8_0 = ((FieldDescriptorProto.smethod_2(this.Extendee) != 0) ? 2714903636u : 3607999637u); goto IL_2D3; } public int CalculateSize() { int num = 0; while (true) { IL_2EF: uint arg_292_0 = 1717134165u; while (true) { uint num2; switch ((num2 = (arg_292_0 ^ 1822414387u)) % 20u) { case 0u: arg_292_0 = ((this.Label == FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 1820834766u : 1788049198u); continue; case 1u: arg_292_0 = ((this.Type != FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 2108327095u : 2122989184u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.TypeName); arg_292_0 = (num2 * 3141468137u ^ 1770209572u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.DefaultValue); arg_292_0 = (num2 * 1198267931u ^ 3867602126u); continue; case 4u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Type); arg_292_0 = (num2 * 4221754734u ^ 1848071736u); continue; case 5u: arg_292_0 = ((FieldDescriptorProto.smethod_2(this.Extendee) == 0) ? 2084365091u : 251443633u); continue; case 6u: arg_292_0 = (((FieldDescriptorProto.smethod_2(this.Name) != 0) ? 3004628138u : 2232602096u) ^ num2 * 1399021168u); continue; case 7u: arg_292_0 = ((this.Number != 0) ? 1204374333u : 1804471859u); continue; case 8u: arg_292_0 = ((FieldDescriptorProto.smethod_2(this.DefaultValue) == 0) ? 1625955191u : 769611912u); continue; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_292_0 = (num2 * 720127665u ^ 1127980173u); continue; case 10u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Number); arg_292_0 = (num2 * 3523838351u ^ 3079522017u); continue; case 11u: goto IL_2EF; case 12u: arg_292_0 = ((this.OneofIndex == 0) ? 1059096065u : 601380895u); continue; case 13u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Label); arg_292_0 = (num2 * 3873018697u ^ 4113900427u); continue; case 14u: arg_292_0 = ((this.options_ != null) ? 1437342934u : 274627288u); continue; case 15u: arg_292_0 = ((FieldDescriptorProto.smethod_2(this.TypeName) == 0) ? 1103163722u : 1666682893u); continue; case 16u: num += 1 + CodedOutputStream.ComputeInt32Size(this.OneofIndex); arg_292_0 = (num2 * 3045107280u ^ 1638691777u); continue; case 17u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_292_0 = (num2 * 2525613873u ^ 2223498937u); continue; case 18u: num += 1 + CodedOutputStream.ComputeStringSize(this.Extendee); arg_292_0 = (num2 * 2421323180u ^ 408270459u); continue; } return num; } } return num; } public void MergeFrom(FieldDescriptorProto other) { if (other == null) { goto IL_291; } goto IL_313; uint arg_29B_0; while (true) { IL_296: uint num; switch ((num = (arg_29B_0 ^ 1692232318u)) % 23u) { case 0u: goto IL_291; case 1u: this.options_ = new FieldOptions(); arg_29B_0 = (num * 1676539491u ^ 1248991392u); continue; case 2u: return; case 3u: this.Type = other.Type; arg_29B_0 = (num * 3489454326u ^ 1098551002u); continue; case 5u: goto IL_313; case 6u: this.Extendee = other.Extendee; arg_29B_0 = (num * 219868750u ^ 476057491u); continue; case 7u: arg_29B_0 = ((other.options_ == null) ? 2117490333u : 988271012u); continue; case 8u: this.Name = other.Name; arg_29B_0 = (num * 1099355687u ^ 2182322379u); continue; case 9u: arg_29B_0 = ((FieldDescriptorProto.smethod_2(other.Extendee) == 0) ? 1491146313u : 1855614389u); continue; case 10u: this.Label = other.Label; arg_29B_0 = (num * 1619309152u ^ 389660420u); continue; case 11u: arg_29B_0 = ((FieldDescriptorProto.smethod_2(other.DefaultValue) == 0) ? 1255108530u : 667136825u); continue; case 12u: this.TypeName = other.TypeName; arg_29B_0 = (num * 3873783883u ^ 1289609883u); continue; case 13u: arg_29B_0 = ((other.OneofIndex != 0) ? 1423884120u : 650533986u); continue; case 14u: arg_29B_0 = ((other.Number == 0) ? 29358953u : 736100088u); continue; case 15u: this.Number = other.Number; arg_29B_0 = (num * 2291314465u ^ 3606529071u); continue; case 16u: arg_29B_0 = ((FieldDescriptorProto.smethod_2(other.TypeName) != 0) ? 410816195u : 728998340u); continue; case 17u: arg_29B_0 = ((other.Type != FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 788693067u : 2089371700u); continue; case 18u: this.DefaultValue = other.DefaultValue; arg_29B_0 = (num * 2436322802u ^ 3695286188u); continue; case 19u: arg_29B_0 = ((other.Label != FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 2055096108u : 130399684u); continue; case 20u: this.Options.MergeFrom(other.Options); arg_29B_0 = 2117490333u; continue; case 21u: arg_29B_0 = (((this.options_ == null) ? 2796661310u : 3803316964u) ^ num * 1660307691u); continue; case 22u: this.OneofIndex = other.OneofIndex; arg_29B_0 = (num * 4208245659u ^ 1488620640u); continue; } break; } return; IL_291: arg_29B_0 = 204970326u; goto IL_296; IL_313: arg_29B_0 = ((FieldDescriptorProto.smethod_2(other.Name) == 0) ? 508496318u : 1468707709u); goto IL_296; } public void MergeFrom(CodedInputStream input) { while (true) { IL_45B: uint num; uint arg_3AB_0 = ((num = input.ReadTag()) != 0u) ? 3083637205u : 2297115887u; while (true) { uint num2; switch ((num2 = (arg_3AB_0 ^ 4265884089u)) % 37u) { case 0u: input.SkipLastField(); arg_3AB_0 = 3793434704u; continue; case 1u: arg_3AB_0 = (((num <= 18u) ? 1059971053u : 1250557203u) ^ num2 * 475347613u); continue; case 2u: arg_3AB_0 = (((num == 66u) ? 948839437u : 552905335u) ^ num2 * 3550252832u); continue; case 3u: arg_3AB_0 = (num2 * 4197813960u ^ 3066215096u); continue; case 4u: arg_3AB_0 = ((num <= 32u) ? 3510918080u : 3927341126u); continue; case 5u: arg_3AB_0 = (((num == 50u) ? 607870256u : 137571647u) ^ num2 * 3725399803u); continue; case 6u: arg_3AB_0 = (((num == 10u) ? 1050810155u : 941131383u) ^ num2 * 1395531931u); continue; case 7u: arg_3AB_0 = 3083637205u; continue; case 8u: this.TypeName = input.ReadString(); arg_3AB_0 = 4293611761u; continue; case 9u: arg_3AB_0 = (num2 * 3316312161u ^ 3606598133u); continue; case 10u: arg_3AB_0 = (num2 * 3549595609u ^ 3009285720u); continue; case 11u: this.label_ = (FieldDescriptorProto.Types.Label)input.ReadEnum(); arg_3AB_0 = 3793434704u; continue; case 12u: this.Extendee = input.ReadString(); arg_3AB_0 = 3980376678u; continue; case 13u: this.options_ = new FieldOptions(); arg_3AB_0 = (num2 * 1115240657u ^ 902243122u); continue; case 14u: arg_3AB_0 = (num2 * 2347729671u ^ 382331701u); continue; case 15u: this.DefaultValue = input.ReadString(); arg_3AB_0 = 3180455324u; continue; case 16u: arg_3AB_0 = (num2 * 1507523521u ^ 1020405369u); continue; case 17u: arg_3AB_0 = (num2 * 3123187652u ^ 708329452u); continue; case 18u: input.ReadMessage(this.options_); arg_3AB_0 = 3577480290u; continue; case 19u: arg_3AB_0 = (((num != 18u) ? 2169788284u : 4255585107u) ^ num2 * 3320180281u); continue; case 20u: arg_3AB_0 = (num2 * 1919660750u ^ 819729712u); continue; case 21u: this.Name = input.ReadString(); arg_3AB_0 = 3982157264u; continue; case 22u: this.type_ = (FieldDescriptorProto.Types.Type)input.ReadEnum(); arg_3AB_0 = 2156777084u; continue; case 23u: arg_3AB_0 = (num2 * 469916326u ^ 3828687061u); continue; case 24u: arg_3AB_0 = ((this.options_ != null) ? 4185848358u : 4233704813u); continue; case 25u: this.OneofIndex = input.ReadInt32(); arg_3AB_0 = 3793434704u; continue; case 26u: arg_3AB_0 = ((num == 24u) ? 3976188531u : 2894799950u); continue; case 28u: this.Number = input.ReadInt32(); arg_3AB_0 = 3901926505u; continue; case 29u: arg_3AB_0 = (num2 * 2127264126u ^ 4077440154u); continue; case 30u: arg_3AB_0 = (num2 * 3670086857u ^ 4141354147u); continue; case 31u: arg_3AB_0 = (((num == 32u) ? 3696776724u : 2434516015u) ^ num2 * 4039540325u); continue; case 32u: arg_3AB_0 = (((num != 40u) ? 751317535u : 1767536385u) ^ num2 * 3035032442u); continue; case 33u: goto IL_45B; case 34u: arg_3AB_0 = ((num != 58u) ? 4078304983u : 3781511861u); continue; case 35u: arg_3AB_0 = (((num == 72u) ? 4016869542u : 4003749555u) ^ num2 * 3452124052u); continue; case 36u: arg_3AB_0 = ((num > 50u) ? 2909842990u : 2898209816u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/EnumDescriptorProto.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class EnumDescriptorProto : IMessage, IMessage<EnumDescriptorProto>, IEquatable<EnumDescriptorProto>, IDeepCloneable<EnumDescriptorProto> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumDescriptorProto.__c __9 = new EnumDescriptorProto.__c(); internal EnumDescriptorProto cctor>b__34_0() { return new EnumDescriptorProto(); } } private static readonly MessageParser<EnumDescriptorProto> _parser = new MessageParser<EnumDescriptorProto>(new Func<EnumDescriptorProto>(EnumDescriptorProto.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int ValueFieldNumber = 2; private static readonly FieldCodec<EnumValueDescriptorProto> _repeated_value_codec = FieldCodec.ForMessage<EnumValueDescriptorProto>(18u, EnumValueDescriptorProto.Parser); private readonly RepeatedField<EnumValueDescriptorProto> value_ = new RepeatedField<EnumValueDescriptorProto>(); public const int OptionsFieldNumber = 3; private EnumOptions options_; public static MessageParser<EnumDescriptorProto> Parser { get { return EnumDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return EnumDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<EnumValueDescriptorProto> Value { get { return this.value_; } } public EnumOptions Options { get { return this.options_; } set { this.options_ = value; } } public EnumDescriptorProto() { } public EnumDescriptorProto(EnumDescriptorProto other) : this() { while (true) { IL_4F: uint arg_37_0 = 3583027738u; while (true) { uint num; switch ((num = (arg_37_0 ^ 3207444171u)) % 3u) { case 1u: this.name_ = other.name_; this.value_ = other.value_.Clone(); arg_37_0 = (num * 4051144683u ^ 1466357238u); continue; case 2u: goto IL_4F; } goto Block_1; } } Block_1: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public EnumDescriptorProto Clone() { return new EnumDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as EnumDescriptorProto); } public bool Equals(EnumDescriptorProto other) { if (other == null) { goto IL_70; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -1414053471) % 11) { case 0: return false; case 2: return true; case 3: goto IL_EC; case 4: return false; case 5: return false; case 6: return false; case 7: arg_A6_0 = (this.value_.Equals(other.value_) ? -1821096414 : -143280070); continue; case 8: goto IL_70; case 9: arg_A6_0 = (EnumDescriptorProto.smethod_1(this.Options, other.Options) ? -1728868168 : -1752064520); continue; case 10: arg_A6_0 = (EnumDescriptorProto.smethod_0(this.Name, other.Name) ? -1455985321 : -1426572226); continue; } break; } return true; IL_70: arg_A6_0 = -1968910298; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? -604279226 : -1191623345); goto IL_A1; } public override int GetHashCode() { int num = 1; while (true) { IL_DB: uint arg_B3_0 = 1419085585u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 1782627800u)) % 7u) { case 0u: goto IL_DB; case 1u: num ^= EnumDescriptorProto.smethod_3(this.Name); arg_B3_0 = (num2 * 4083131951u ^ 3280901643u); continue; case 2u: num ^= EnumDescriptorProto.smethod_3(this.value_); arg_B3_0 = 1250246935u; continue; case 3u: arg_B3_0 = (((this.options_ == null) ? 3645083910u : 3575554912u) ^ num2 * 3069653675u); continue; case 4u: arg_B3_0 = (((EnumDescriptorProto.smethod_2(this.Name) != 0) ? 3830717957u : 3890084150u) ^ num2 * 374788069u); continue; case 5u: num ^= EnumDescriptorProto.smethod_3(this.Options); arg_B3_0 = (num2 * 503295642u ^ 2311602033u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (EnumDescriptorProto.smethod_2(this.Name) != 0) { goto IL_10; } goto IL_D6; uint arg_AA_0; while (true) { IL_A5: uint num; switch ((num = (arg_AA_0 ^ 2576308299u)) % 8u) { case 0u: output.WriteMessage(this.Options); arg_AA_0 = (num * 646676745u ^ 2468427693u); continue; case 1u: arg_AA_0 = (((this.options_ == null) ? 3773583719u : 3009899908u) ^ num * 2036100962u); continue; case 2u: output.WriteRawTag(10); arg_AA_0 = (num * 3793222529u ^ 2632587274u); continue; case 3u: output.WriteString(this.Name); arg_AA_0 = (num * 2989553306u ^ 2044931977u); continue; case 4u: goto IL_D6; case 5u: output.WriteRawTag(26); arg_AA_0 = (num * 2601738234u ^ 4084689985u); continue; case 7u: goto IL_10; } break; } return; IL_10: arg_AA_0 = 3646755121u; goto IL_A5; IL_D6: this.value_.WriteTo(output, EnumDescriptorProto._repeated_value_codec); arg_AA_0 = 3022488434u; goto IL_A5; } public int CalculateSize() { int num = 0; while (true) { IL_CE: uint arg_AA_0 = 2040518267u; while (true) { uint num2; switch ((num2 = (arg_AA_0 ^ 770840654u)) % 6u) { case 0u: num += this.value_.CalculateSize(EnumDescriptorProto._repeated_value_codec); arg_AA_0 = ((this.options_ == null) ? 1868083158u : 269235015u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_AA_0 = (num2 * 3328087006u ^ 389403416u); continue; case 2u: goto IL_CE; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_AA_0 = (num2 * 4135452238u ^ 2331068402u); continue; case 5u: arg_AA_0 = (((EnumDescriptorProto.smethod_2(this.Name) != 0) ? 867209106u : 1556891879u) ^ num2 * 123471139u); continue; } return num; } } return num; } public void MergeFrom(EnumDescriptorProto other) { if (other == null) { goto IL_C0; } goto IL_126; uint arg_E2_0; while (true) { IL_DD: uint num; switch ((num = (arg_E2_0 ^ 2527487274u)) % 10u) { case 0u: this.value_.Add(other.value_); arg_E2_0 = 3514047607u; continue; case 1u: return; case 2u: goto IL_C0; case 3u: arg_E2_0 = (((this.options_ == null) ? 4218478974u : 3763324286u) ^ num * 3160968643u); continue; case 4u: this.Name = other.Name; arg_E2_0 = (num * 2325998445u ^ 4222070794u); continue; case 5u: arg_E2_0 = (((other.options_ != null) ? 4059454748u : 3238382039u) ^ num * 1948486255u); continue; case 6u: goto IL_126; case 7u: this.Options.MergeFrom(other.Options); arg_E2_0 = 2489321604u; continue; case 9u: this.options_ = new EnumOptions(); arg_E2_0 = (num * 3234058922u ^ 689252287u); continue; } break; } return; IL_C0: arg_E2_0 = 3440882639u; goto IL_DD; IL_126: arg_E2_0 = ((EnumDescriptorProto.smethod_2(other.Name) != 0) ? 4180653882u : 2585039066u); goto IL_DD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1B2: uint num; uint arg_15A_0 = ((num = input.ReadTag()) != 0u) ? 4196627856u : 2193591558u; while (true) { uint num2; switch ((num2 = (arg_15A_0 ^ 3116675066u)) % 15u) { case 0u: input.SkipLastField(); arg_15A_0 = (num2 * 4250599422u ^ 1951220087u); continue; case 1u: this.Name = input.ReadString(); arg_15A_0 = 2345823838u; continue; case 2u: arg_15A_0 = (num2 * 1825089361u ^ 2225799342u); continue; case 4u: arg_15A_0 = (((num == 18u) ? 1556105368u : 118657317u) ^ num2 * 891016683u); continue; case 5u: arg_15A_0 = 4196627856u; continue; case 6u: arg_15A_0 = ((this.options_ != null) ? 2217100484u : 4064708417u); continue; case 7u: arg_15A_0 = ((num != 10u) ? 2410080337u : 3970536255u); continue; case 8u: this.value_.AddEntriesFrom(input, EnumDescriptorProto._repeated_value_codec); arg_15A_0 = 4154108200u; continue; case 9u: arg_15A_0 = (num2 * 2733460576u ^ 238979075u); continue; case 10u: goto IL_1B2; case 11u: arg_15A_0 = (((num != 26u) ? 1478256780u : 2073274236u) ^ num2 * 3040836509u); continue; case 12u: this.options_ = new EnumOptions(); arg_15A_0 = (num2 * 840218256u ^ 853647348u); continue; case 13u: arg_15A_0 = (num2 * 2638765897u ^ 1786780257u); continue; case 14u: input.ReadMessage(this.options_); arg_15A_0 = 2565326211u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/GameObject.cs using Framework.ObjectDefines; using System; using System.Collections.Generic; namespace AuthServer.WorldServer.Game.Entities { [Serializable] public class GameObject { public int Map; public int Id; public int Type; public int Flags; public int DisplayInfoId; public Vector4 Pos = new Vector4(); public Vector4 Rot = new Vector4(); public string Name; public string IconName; public string CastBarCaption; public string Unk; public List<int> Data = new List<int>(33); public float Size; public List<int> QuestItemId = new List<int>(6); public int ExpansionRequired; } } <file_sep>/Framework.Constants/CharacterFlag.cs using System; namespace Framework.Constants { [Flags] public enum CharacterFlag { None = 0, Decline = 33554432 } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmListUpdates.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmListUpdates { [DataMember(Name = "updates")] public IList<RealmListUpdate> Updates { get; set; } } } <file_sep>/Bgs.Protocol.Authentication.V1/ServerStateChangeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class ServerStateChangeRequest : IMessage<ServerStateChangeRequest>, IEquatable<ServerStateChangeRequest>, IDeepCloneable<ServerStateChangeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServerStateChangeRequest.__c __9 = new ServerStateChangeRequest.__c(); internal ServerStateChangeRequest cctor>b__29_0() { return new ServerStateChangeRequest(); } } private static readonly MessageParser<ServerStateChangeRequest> _parser = new MessageParser<ServerStateChangeRequest>(new Func<ServerStateChangeRequest>(ServerStateChangeRequest.__c.__9.<.cctor>b__29_0)); public const int StateFieldNumber = 1; private uint state_; public const int EventTimeFieldNumber = 2; private ulong eventTime_; public static MessageParser<ServerStateChangeRequest> Parser { get { return ServerStateChangeRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return ServerStateChangeRequest.Descriptor; } } public uint State { get { return this.state_; } set { this.state_ = value; } } public ulong EventTime { get { return this.eventTime_; } set { this.eventTime_ = value; } } public ServerStateChangeRequest() { } public ServerStateChangeRequest(ServerStateChangeRequest other) : this() { this.state_ = other.state_; this.eventTime_ = other.eventTime_; } public ServerStateChangeRequest Clone() { return new ServerStateChangeRequest(this); } public override bool Equals(object other) { return this.Equals(other as ServerStateChangeRequest); } public bool Equals(ServerStateChangeRequest other) { if (other == null) { goto IL_63; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -766521251) % 9) { case 0: goto IL_63; case 1: arg_6D_0 = ((this.EventTime == other.EventTime) ? -976614896 : -537790860); continue; case 2: return false; case 3: return true; case 5: return false; case 6: return false; case 7: goto IL_AB; case 8: arg_6D_0 = ((this.State != other.State) ? -185141077 : -454472011); continue; } break; } return true; IL_63: arg_6D_0 = -913275660; goto IL_68; IL_AB: arg_6D_0 = ((other == this) ? -1314109242 : -1986532506); goto IL_68; } public override int GetHashCode() { int num = 1 ^ this.State.GetHashCode(); while (true) { IL_7D: uint arg_61_0 = 1933829920u; while (true) { uint num2; switch ((num2 = (arg_61_0 ^ 1310892299u)) % 4u) { case 0u: goto IL_7D; case 2u: num ^= this.EventTime.GetHashCode(); arg_61_0 = (num2 * 3849305158u ^ 1705997890u); continue; case 3u: arg_61_0 = (((this.EventTime != 0uL) ? 2506352908u : 2429052387u) ^ num2 * 2011229303u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_80: uint arg_64_0 = 3682491963u; while (true) { uint num; switch ((num = (arg_64_0 ^ 3008260438u)) % 4u) { case 1u: output.WriteUInt32(this.State); arg_64_0 = (((this.EventTime != 0uL) ? 835662229u : 839037182u) ^ num * 4255600372u); continue; case 2u: goto IL_80; case 3u: output.WriteRawTag(16); output.WriteUInt64(this.EventTime); arg_64_0 = (num * 151044193u ^ 1776043741u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_7B: uint arg_5F_0 = 822434406u; while (true) { uint num2; switch ((num2 = (arg_5F_0 ^ 1700782576u)) % 4u) { case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.EventTime); arg_5F_0 = (num2 * 2947593424u ^ 458467596u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.State); arg_5F_0 = (((this.EventTime != 0uL) ? 4164915779u : 3494540670u) ^ num2 * 1791304275u); continue; case 3u: goto IL_7B; } return num; } } return num; } public void MergeFrom(ServerStateChangeRequest other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1463706737u)) % 7u) { case 0u: goto IL_AD; case 2u: this.EventTime = other.EventTime; arg_76_0 = (num * 952900555u ^ 2799166500u); continue; case 3u: arg_76_0 = ((other.EventTime == 0uL) ? 569441771u : 350119420u); continue; case 4u: this.State = other.State; arg_76_0 = (num * 450246728u ^ 1779397740u); continue; case 5u: goto IL_15; case 6u: return; } break; } return; IL_15: arg_76_0 = 796026943u; goto IL_71; IL_AD: arg_76_0 = ((other.State != 0u) ? 602192139u : 804490812u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_ED: uint num; uint arg_AD_0 = ((num = input.ReadTag()) != 0u) ? 3948936863u : 2166709905u; while (true) { uint num2; switch ((num2 = (arg_AD_0 ^ 3886217839u)) % 9u) { case 0u: goto IL_ED; case 1u: input.SkipLastField(); arg_AD_0 = (num2 * 3005060835u ^ 662387702u); continue; case 2u: arg_AD_0 = 3948936863u; continue; case 3u: this.State = input.ReadUInt32(); arg_AD_0 = 3285781335u; continue; case 5u: arg_AD_0 = ((num == 8u) ? 2871882118u : 3355946462u); continue; case 6u: arg_AD_0 = (num2 * 2693540768u ^ 965975511u); continue; case 7u: this.EventTime = input.ReadUInt64(); arg_AD_0 = 3285781335u; continue; case 8u: arg_AD_0 = (((num == 16u) ? 728833844u : 878954145u) ^ num2 * 1101177153u); continue; } return; } } } } } <file_sep>/Framework.Constants/UpdateFieldFlags.cs using System; namespace Framework.Constants { [Flags] public enum UpdateFieldFlags { None = 0, All = 1, Self = 2, Owner = 4, Empath = 16, Party = 32, UnitAll = 64, ViewerDependet = 128, Urgent = 256, UrgentSelfOnly = 512 } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmListTicketIdentity.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmListTicketIdentity { [DataMember(Name = "gameAccountID")] public int GameAccountId { get; set; } [DataMember(Name = "gameAccountRegion")] public int GameAccountRegion { get; set; } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/TutorialHandler.cs using AuthServer.Network; using Framework.Constants.Net; using Framework.Network.Packets; using System; namespace AuthServer.Game.Packets.PacketHandler { public class TutorialHandler { public static void HandleTutorialFlags(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.TutorialFlags, true); int num = 0; while (true) { IL_7D: uint arg_51_0 = (num < 32) ? 1187423804u : 261051288u; while (true) { uint num2; switch ((num2 = (arg_51_0 ^ 625843242u)) % 5u) { case 1u: session.Send(ref packetWriter); arg_51_0 = (num2 * 2264823921u ^ 805874538u); continue; case 2u: goto IL_7D; case 3u: packetWriter.WriteUInt8(0); num++; arg_51_0 = 163168761u; continue; case 4u: arg_51_0 = 1187423804u; continue; } return; } } } } } <file_sep>/Bgs.Protocol.Notification.V1/Notification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Notification.V1 { [DebuggerNonUserCode] public sealed class Notification : IMessage<Notification>, IEquatable<Notification>, IDeepCloneable<Notification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Notification.__c __9 = new Notification.__c(); internal Notification cctor>b__69_0() { return new Notification(); } } private static readonly MessageParser<Notification> _parser = new MessageParser<Notification>(new Func<Notification>(Notification.__c.__9.<.cctor>b__69_0)); public const int SenderIdFieldNumber = 1; private EntityId senderId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int TypeFieldNumber = 3; private string type_ = ""; public const int AttributeFieldNumber = 4; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int SenderAccountIdFieldNumber = 5; private EntityId senderAccountId_; public const int TargetAccountIdFieldNumber = 6; private EntityId targetAccountId_; public const int SenderBattleTagFieldNumber = 7; private string senderBattleTag_ = ""; public const int TargetBattleTagFieldNumber = 8; private string targetBattleTag_ = ""; public const int PeerFieldNumber = 9; private ProcessId peer_; public const int ForwardingIdentityFieldNumber = 10; private Bgs.Protocol.Account.V1.Identity forwardingIdentity_; public static MessageParser<Notification> Parser { get { return Notification._parser; } } public static MessageDescriptor Descriptor { get { return NotificationTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return Notification.Descriptor; } } public EntityId SenderId { get { return this.senderId_; } set { this.senderId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public string Type { get { return this.type_; } set { this.type_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public EntityId SenderAccountId { get { return this.senderAccountId_; } set { this.senderAccountId_ = value; } } public EntityId TargetAccountId { get { return this.targetAccountId_; } set { this.targetAccountId_ = value; } } public string SenderBattleTag { get { return this.senderBattleTag_; } set { this.senderBattleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string TargetBattleTag { get { return this.targetBattleTag_; } set { this.targetBattleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public ProcessId Peer { get { return this.peer_; } set { this.peer_ = value; } } public Bgs.Protocol.Account.V1.Identity ForwardingIdentity { get { return this.forwardingIdentity_; } set { this.forwardingIdentity_ = value; } } public Notification() { } public Notification(Notification other) : this() { this.SenderId = ((other.senderId_ != null) ? other.SenderId.Clone() : null); this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.type_ = other.type_; this.attribute_ = other.attribute_.Clone(); this.SenderAccountId = ((other.senderAccountId_ != null) ? other.SenderAccountId.Clone() : null); this.TargetAccountId = ((other.targetAccountId_ != null) ? other.TargetAccountId.Clone() : null); this.senderBattleTag_ = other.senderBattleTag_; this.targetBattleTag_ = other.targetBattleTag_; this.Peer = ((other.peer_ != null) ? other.Peer.Clone() : null); this.ForwardingIdentity = ((other.forwardingIdentity_ != null) ? other.ForwardingIdentity.Clone() : null); } public Notification Clone() { return new Notification(this); } public override bool Equals(object other) { return this.Equals(other as Notification); } public bool Equals(Notification other) { if (other == null) { goto IL_76; } goto IL_270; int arg_1F2_0; while (true) { IL_1ED: switch ((arg_1F2_0 ^ 1784756256) % 25) { case 0: return false; case 1: arg_1F2_0 = ((!Notification.smethod_0(this.Peer, other.Peer)) ? 1162436705 : 2105881454); continue; case 2: return false; case 3: return true; case 4: goto IL_270; case 5: arg_1F2_0 = (Notification.smethod_0(this.SenderAccountId, other.SenderAccountId) ? 6838232 : 444942307); continue; case 6: arg_1F2_0 = ((!Notification.smethod_1(this.TargetBattleTag, other.TargetBattleTag)) ? 144384746 : 1623271628); continue; case 7: return false; case 8: arg_1F2_0 = ((!Notification.smethod_1(this.SenderBattleTag, other.SenderBattleTag)) ? 2029363921 : 1183655394); continue; case 9: arg_1F2_0 = (Notification.smethod_0(this.TargetAccountId, other.TargetAccountId) ? 2120415628 : 897505657); continue; case 10: return false; case 11: arg_1F2_0 = (Notification.smethod_0(this.TargetId, other.TargetId) ? 1291748462 : 592906611); continue; case 13: arg_1F2_0 = ((!Notification.smethod_1(this.Type, other.Type)) ? 1536733528 : 2062747450); continue; case 14: return false; case 15: arg_1F2_0 = (this.attribute_.Equals(other.attribute_) ? 405781042 : 2094246945); continue; case 16: return false; case 17: goto IL_76; case 18: return false; case 19: return false; case 20: arg_1F2_0 = (Notification.smethod_0(this.ForwardingIdentity, other.ForwardingIdentity) ? 1990746830 : 696356777); continue; case 21: return false; case 22: arg_1F2_0 = ((!Notification.smethod_0(this.SenderId, other.SenderId)) ? 1582382451 : 36324087); continue; case 23: return false; case 24: return false; } break; } return true; IL_76: arg_1F2_0 = 80579414; goto IL_1ED; IL_270: arg_1F2_0 = ((other != this) ? 1453765658 : 1510958310); goto IL_1ED; } public override int GetHashCode() { int num = 1; while (true) { IL_279: uint arg_228_0 = 2474478883u; while (true) { uint num2; switch ((num2 = (arg_228_0 ^ 4237186125u)) % 17u) { case 0u: num ^= Notification.smethod_2(this.ForwardingIdentity); arg_228_0 = (num2 * 4238605090u ^ 3642883923u); continue; case 1u: arg_228_0 = (((this.senderId_ == null) ? 1947330851u : 1112335667u) ^ num2 * 481048234u); continue; case 2u: arg_228_0 = ((Notification.smethod_3(this.TargetBattleTag) == 0) ? 3510811131u : 3879987496u); continue; case 3u: arg_228_0 = ((this.targetAccountId_ == null) ? 3878072499u : 3929804948u); continue; case 4u: num ^= Notification.smethod_2(this.TargetId); num ^= Notification.smethod_2(this.Type); arg_228_0 = 3018897587u; continue; case 5u: arg_228_0 = ((this.peer_ != null) ? 2505210408u : 2976713922u); continue; case 6u: num ^= Notification.smethod_2(this.SenderBattleTag); arg_228_0 = (num2 * 880919594u ^ 113969889u); continue; case 7u: num ^= Notification.smethod_2(this.SenderAccountId); arg_228_0 = (num2 * 1012456652u ^ 4183753348u); continue; case 8u: arg_228_0 = ((this.forwardingIdentity_ == null) ? 2441491007u : 2538564635u); continue; case 9u: num ^= Notification.smethod_2(this.TargetAccountId); arg_228_0 = (num2 * 1258929026u ^ 1515506049u); continue; case 11u: goto IL_279; case 12u: num ^= Notification.smethod_2(this.TargetBattleTag); arg_228_0 = (num2 * 1757585910u ^ 2065186293u); continue; case 13u: num ^= Notification.smethod_2(this.Peer); arg_228_0 = (num2 * 375988144u ^ 2533764274u); continue; case 14u: arg_228_0 = ((Notification.smethod_3(this.SenderBattleTag) != 0) ? 4031945313u : 4176775641u); continue; case 15u: num ^= Notification.smethod_2(this.attribute_); arg_228_0 = (((this.senderAccountId_ != null) ? 3094568807u : 2825799808u) ^ num2 * 1801289562u); continue; case 16u: num ^= Notification.smethod_2(this.SenderId); arg_228_0 = (num2 * 611300509u ^ 3346580933u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.senderId_ != null) { goto IL_50; } goto IL_359; uint arg_2E4_0; while (true) { IL_2DF: uint num; switch ((num = (arg_2E4_0 ^ 1827452364u)) % 26u) { case 0u: arg_2E4_0 = ((Notification.smethod_3(this.TargetBattleTag) == 0) ? 2138178603u : 1488769948u); continue; case 1u: output.WriteString(this.SenderBattleTag); arg_2E4_0 = (num * 3584681413u ^ 1364716643u); continue; case 2u: output.WriteMessage(this.SenderAccountId); arg_2E4_0 = (num * 2204637468u ^ 3374164301u); continue; case 3u: arg_2E4_0 = ((this.peer_ != null) ? 1434517123u : 248763010u); continue; case 4u: output.WriteMessage(this.Peer); arg_2E4_0 = (num * 4125104741u ^ 3120007788u); continue; case 5u: output.WriteString(this.Type); arg_2E4_0 = (num * 265699719u ^ 628414721u); continue; case 6u: this.attribute_.WriteTo(output, Notification._repeated_attribute_codec); arg_2E4_0 = (num * 1069903818u ^ 109675552u); continue; case 7u: output.WriteRawTag(10); arg_2E4_0 = (num * 2384193503u ^ 4129646051u); continue; case 8u: arg_2E4_0 = (((this.senderAccountId_ == null) ? 2645203525u : 3787684641u) ^ num * 2252940091u); continue; case 9u: goto IL_359; case 10u: output.WriteRawTag(50); arg_2E4_0 = (num * 244906138u ^ 1553454170u); continue; case 11u: arg_2E4_0 = ((this.targetAccountId_ != null) ? 89515074u : 10635980u); continue; case 12u: output.WriteMessage(this.SenderId); arg_2E4_0 = (num * 88912048u ^ 3754187873u); continue; case 13u: output.WriteRawTag(26); arg_2E4_0 = (num * 2636014449u ^ 789292018u); continue; case 14u: output.WriteMessage(this.TargetId); arg_2E4_0 = (num * 1282551520u ^ 1053925435u); continue; case 16u: output.WriteRawTag(66); output.WriteString(this.TargetBattleTag); arg_2E4_0 = (num * 4210575103u ^ 721276315u); continue; case 17u: output.WriteRawTag(74); arg_2E4_0 = (num * 4220029203u ^ 2557622087u); continue; case 18u: arg_2E4_0 = ((this.forwardingIdentity_ == null) ? 134795043u : 2145721849u); continue; case 19u: output.WriteRawTag(42); arg_2E4_0 = (num * 4193984379u ^ 4026520275u); continue; case 20u: output.WriteMessage(this.ForwardingIdentity); arg_2E4_0 = (num * 3018416530u ^ 3346292915u); continue; case 21u: output.WriteRawTag(58); arg_2E4_0 = (num * 1043676839u ^ 3476052752u); continue; case 22u: output.WriteMessage(this.TargetAccountId); arg_2E4_0 = (num * 3142785136u ^ 3654727596u); continue; case 23u: goto IL_50; case 24u: arg_2E4_0 = ((Notification.smethod_3(this.SenderBattleTag) == 0) ? 1873246340u : 928847245u); continue; case 25u: output.WriteRawTag(82); arg_2E4_0 = (num * 3741304267u ^ 1335892803u); continue; } break; } return; IL_50: arg_2E4_0 = 323880495u; goto IL_2DF; IL_359: output.WriteRawTag(18); arg_2E4_0 = 2129611676u; goto IL_2DF; } public int CalculateSize() { int num = 0; if (this.senderId_ != null) { goto IL_13D; } goto IL_227; uint arg_1CF_0; while (true) { IL_1CA: uint num2; switch ((num2 = (arg_1CF_0 ^ 1208134331u)) % 15u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetAccountId); arg_1CF_0 = (num2 * 2609389752u ^ 687237204u); continue; case 1u: arg_1CF_0 = ((Notification.smethod_3(this.TargetBattleTag) == 0) ? 782318735u : 1106714070u); continue; case 2u: arg_1CF_0 = ((this.peer_ == null) ? 1673632610u : 1053107761u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SenderAccountId); arg_1CF_0 = (num2 * 2136895600u ^ 2550059886u); continue; case 4u: goto IL_227; case 5u: goto IL_13D; case 6u: num += 1 + CodedOutputStream.ComputeStringSize(this.TargetBattleTag); arg_1CF_0 = (num2 * 3254306180u ^ 969951675u); continue; case 7u: arg_1CF_0 = ((Notification.smethod_3(this.SenderBattleTag) == 0) ? 1156627913u : 1101519369u); continue; case 8u: arg_1CF_0 = ((this.targetAccountId_ == null) ? 235118468u : 1991920045u); continue; case 9u: arg_1CF_0 = ((this.forwardingIdentity_ == null) ? 1013069280u : 2106790336u); continue; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Peer); arg_1CF_0 = (num2 * 989441958u ^ 124840990u); continue; case 11u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SenderId); arg_1CF_0 = (num2 * 594739840u ^ 1902343983u); continue; case 13u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ForwardingIdentity); arg_1CF_0 = (num2 * 2698009293u ^ 1777232543u); continue; case 14u: num += 1 + CodedOutputStream.ComputeStringSize(this.SenderBattleTag); arg_1CF_0 = (num2 * 1259172490u ^ 4204314173u); continue; } break; } return num; IL_13D: arg_1CF_0 = 224557535u; goto IL_1CA; IL_227: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); num += 1 + CodedOutputStream.ComputeStringSize(this.Type); num += this.attribute_.CalculateSize(Notification._repeated_attribute_codec); arg_1CF_0 = ((this.senderAccountId_ == null) ? 1335656382u : 397761584u); goto IL_1CA; } public void MergeFrom(Notification other) { if (other == null) { goto IL_1AC; } goto IL_4C1; uint arg_41D_0; while (true) { IL_418: uint num; switch ((num = (arg_41D_0 ^ 2040750665u)) % 34u) { case 0u: this.TargetId.MergeFrom(other.TargetId); arg_41D_0 = 1227822175u; continue; case 1u: this.targetId_ = new EntityId(); arg_41D_0 = (num * 3154874368u ^ 422476315u); continue; case 2u: arg_41D_0 = ((other.forwardingIdentity_ == null) ? 514931477u : 364200913u); continue; case 3u: arg_41D_0 = (((this.senderAccountId_ != null) ? 3686995115u : 2486093062u) ^ num * 2951098733u); continue; case 4u: this.senderAccountId_ = new EntityId(); arg_41D_0 = (num * 2430664006u ^ 1272945922u); continue; case 5u: arg_41D_0 = (((other.senderAccountId_ != null) ? 3584414342u : 2849410179u) ^ num * 2231283506u); continue; case 6u: this.SenderId.MergeFrom(other.SenderId); arg_41D_0 = 288455740u; continue; case 7u: this.forwardingIdentity_ = new Bgs.Protocol.Account.V1.Identity(); arg_41D_0 = (num * 3094316710u ^ 192069144u); continue; case 8u: arg_41D_0 = ((other.targetAccountId_ != null) ? 521300049u : 1536384514u); continue; case 9u: this.Peer.MergeFrom(other.Peer); arg_41D_0 = 341260439u; continue; case 10u: this.peer_ = new ProcessId(); arg_41D_0 = (num * 3980720896u ^ 3543710460u); continue; case 11u: this.SenderAccountId.MergeFrom(other.SenderAccountId); arg_41D_0 = 596809829u; continue; case 12u: this.TargetAccountId.MergeFrom(other.TargetAccountId); arg_41D_0 = 1536384514u; continue; case 13u: arg_41D_0 = ((Notification.smethod_3(other.SenderBattleTag) == 0) ? 2023554429u : 1924184414u); continue; case 14u: arg_41D_0 = (((this.peer_ != null) ? 455536252u : 324531205u) ^ num * 289977596u); continue; case 15u: this.Type = other.Type; arg_41D_0 = (num * 1567605306u ^ 409098147u); continue; case 16u: arg_41D_0 = (((this.senderId_ == null) ? 3235123162u : 2277178267u) ^ num * 3075029448u); continue; case 17u: this.SenderBattleTag = other.SenderBattleTag; arg_41D_0 = (num * 1892797630u ^ 2172981871u); continue; case 18u: this.attribute_.Add(other.attribute_); arg_41D_0 = 1144073122u; continue; case 19u: goto IL_1AC; case 20u: arg_41D_0 = ((Notification.smethod_3(other.TargetBattleTag) == 0) ? 992183075u : 1715381646u); continue; case 21u: this.ForwardingIdentity.MergeFrom(other.ForwardingIdentity); arg_41D_0 = 514931477u; continue; case 22u: arg_41D_0 = ((Notification.smethod_3(other.Type) == 0) ? 1076083629u : 269691962u); continue; case 23u: arg_41D_0 = ((other.targetId_ == null) ? 1227822175u : 1020281863u); continue; case 24u: arg_41D_0 = (((this.targetAccountId_ != null) ? 4157039151u : 2801001740u) ^ num * 3074786874u); continue; case 25u: this.TargetBattleTag = other.TargetBattleTag; arg_41D_0 = (num * 1064472734u ^ 142393329u); continue; case 26u: arg_41D_0 = (((this.forwardingIdentity_ != null) ? 511382010u : 1732986762u) ^ num * 4268072490u); continue; case 27u: this.senderId_ = new EntityId(); arg_41D_0 = (num * 1117440827u ^ 2856856506u); continue; case 28u: arg_41D_0 = (((this.targetId_ == null) ? 2407424796u : 3517505913u) ^ num * 548673383u); continue; case 29u: goto IL_4C1; case 31u: this.targetAccountId_ = new EntityId(); arg_41D_0 = (num * 1973109438u ^ 2207591945u); continue; case 32u: arg_41D_0 = ((other.peer_ == null) ? 341260439u : 677192105u); continue; case 33u: return; } break; } return; IL_1AC: arg_41D_0 = 985250282u; goto IL_418; IL_4C1: arg_41D_0 = ((other.senderId_ != null) ? 1190038379u : 288455740u); goto IL_418; } public void MergeFrom(CodedInputStream input) { while (true) { IL_627: uint num; uint arg_543_0 = ((num = input.ReadTag()) == 0u) ? 1657673554u : 890823503u; while (true) { uint num2; switch ((num2 = (arg_543_0 ^ 708652070u)) % 50u) { case 0u: input.ReadMessage(this.targetId_); arg_543_0 = 1571908714u; continue; case 1u: this.senderId_ = new EntityId(); arg_543_0 = (num2 * 505513389u ^ 787996545u); continue; case 2u: this.attribute_.AddEntriesFrom(input, Notification._repeated_attribute_codec); arg_543_0 = 67415794u; continue; case 3u: this.targetAccountId_ = new EntityId(); arg_543_0 = (num2 * 4090512337u ^ 3145074826u); continue; case 4u: arg_543_0 = (num2 * 2482549992u ^ 2567388259u); continue; case 5u: arg_543_0 = (((num == 18u) ? 2026873707u : 818030097u) ^ num2 * 118385212u); continue; case 6u: arg_543_0 = (((num <= 18u) ? 4257519347u : 2295573696u) ^ num2 * 1757491449u); continue; case 7u: this.Type = input.ReadString(); arg_543_0 = 1158981173u; continue; case 8u: this.forwardingIdentity_ = new Bgs.Protocol.Account.V1.Identity(); arg_543_0 = (num2 * 3198677771u ^ 1523342755u); continue; case 9u: arg_543_0 = ((num != 66u) ? 824177286u : 764183948u); continue; case 10u: arg_543_0 = (num2 * 3506126399u ^ 774822548u); continue; case 11u: arg_543_0 = (num2 * 4093483556u ^ 2628987503u); continue; case 12u: arg_543_0 = 890823503u; continue; case 13u: arg_543_0 = (((num != 82u) ? 1096216590u : 1431766510u) ^ num2 * 3050280184u); continue; case 14u: this.peer_ = new ProcessId(); arg_543_0 = (num2 * 3823112666u ^ 72120282u); continue; case 15u: arg_543_0 = ((this.senderId_ != null) ? 1711985906u : 2026411449u); continue; case 16u: arg_543_0 = (((num != 34u) ? 4014946445u : 4270213608u) ^ num2 * 2713464043u); continue; case 17u: arg_543_0 = (((num == 58u) ? 2060198571u : 1172278861u) ^ num2 * 905819593u); continue; case 18u: this.TargetBattleTag = input.ReadString(); arg_543_0 = 1967323920u; continue; case 19u: arg_543_0 = ((num <= 58u) ? 109818935u : 435537827u); continue; case 21u: this.senderAccountId_ = new EntityId(); arg_543_0 = (num2 * 3425277307u ^ 1705012460u); continue; case 22u: this.SenderBattleTag = input.ReadString(); arg_543_0 = 363784197u; continue; case 23u: arg_543_0 = (((num != 42u) ? 4231571017u : 2857847369u) ^ num2 * 3807211501u); continue; case 24u: arg_543_0 = ((num != 26u) ? 1696853042u : 644650367u); continue; case 25u: arg_543_0 = ((num <= 42u) ? 1686492340u : 1839309553u); continue; case 26u: input.ReadMessage(this.peer_); arg_543_0 = 2028505219u; continue; case 27u: arg_543_0 = ((this.targetAccountId_ != null) ? 898888169u : 614029013u); continue; case 28u: input.SkipLastField(); arg_543_0 = 1549119987u; continue; case 29u: goto IL_627; case 30u: arg_543_0 = (num2 * 3583334448u ^ 2177756995u); continue; case 31u: input.ReadMessage(this.senderAccountId_); arg_543_0 = 1353913154u; continue; case 32u: arg_543_0 = ((this.forwardingIdentity_ == null) ? 1768405974u : 2053180147u); continue; case 33u: input.ReadMessage(this.forwardingIdentity_); arg_543_0 = 2028505219u; continue; case 34u: this.targetId_ = new EntityId(); arg_543_0 = (num2 * 17965613u ^ 3506704060u); continue; case 35u: arg_543_0 = (((num == 50u) ? 181682437u : 868373573u) ^ num2 * 267150958u); continue; case 36u: arg_543_0 = (num2 * 2978477609u ^ 2401882917u); continue; case 37u: arg_543_0 = (num2 * 1457593840u ^ 1522700339u); continue; case 38u: arg_543_0 = ((this.peer_ != null) ? 174626566u : 853870144u); continue; case 39u: arg_543_0 = (((num == 10u) ? 690787719u : 1625513647u) ^ num2 * 1667969688u); continue; case 40u: arg_543_0 = (num2 * 3487615548u ^ 3294427942u); continue; case 41u: arg_543_0 = (num2 * 1863787374u ^ 3459343468u); continue; case 42u: arg_543_0 = (num2 * 302070319u ^ 2033632223u); continue; case 43u: input.ReadMessage(this.targetAccountId_); arg_543_0 = 1579146391u; continue; case 44u: arg_543_0 = ((this.senderAccountId_ != null) ? 1015917229u : 350342229u); continue; case 45u: arg_543_0 = ((this.targetId_ != null) ? 1694896164u : 1131463646u); continue; case 46u: input.ReadMessage(this.senderId_); arg_543_0 = 2028505219u; continue; case 47u: arg_543_0 = (num2 * 2131700520u ^ 2511003179u); continue; case 48u: arg_543_0 = (((num != 74u) ? 844590403u : 1271565308u) ^ num2 * 4224782225u); continue; case 49u: arg_543_0 = (num2 * 3289255930u ^ 1851357965u); continue; } return; } } } static Notification() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 331329482u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 1656328958u)) % 3u) { case 1u: Notification._repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(34u, Bgs.Protocol.Attribute.Parser); arg_3F_0 = (num * 1732953260u ^ 1382051337u); continue; case 2u: goto IL_57; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.Reflection/DescriptorPool.cs using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; namespace Google.Protobuf.Reflection { internal sealed class DescriptorPool { private struct DescriptorIntPair : IEquatable<DescriptorPool.DescriptorIntPair> { private readonly int number; private readonly IDescriptor descriptor; internal DescriptorIntPair(IDescriptor descriptor, int number) { this.number = number; this.descriptor = descriptor; } public bool Equals(DescriptorPool.DescriptorIntPair other) { return this.descriptor == other.descriptor && this.number == other.number; } public override bool Equals(object obj) { return obj is DescriptorPool.DescriptorIntPair && this.Equals((DescriptorPool.DescriptorIntPair)obj); } public override int GetHashCode() { return DescriptorPool.DescriptorIntPair.smethod_0(this.descriptor) * 65535 + this.number; } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } private readonly IDictionary<string, IDescriptor> descriptorsByName = new Dictionary<string, IDescriptor>(); private readonly IDictionary<DescriptorPool.DescriptorIntPair, FieldDescriptor> fieldsByNumber = new Dictionary<DescriptorPool.DescriptorIntPair, FieldDescriptor>(); private readonly IDictionary<DescriptorPool.DescriptorIntPair, EnumValueDescriptor> enumValuesByNumber = new Dictionary<DescriptorPool.DescriptorIntPair, EnumValueDescriptor>(); private readonly HashSet<FileDescriptor> dependencies; private static readonly Regex ValidationRegex = DescriptorPool.smethod_17(Module.smethod_37<string>(1311100819u), FrameworkPortability.CompiledRegexWhereAvailable); internal DescriptorPool(FileDescriptor[] dependencyFiles) { while (true) { IL_15F: uint arg_125_0 = 2867741474u; while (true) { uint num; switch ((num = (arg_125_0 ^ 3587480274u)) % 11u) { case 0u: { int num2; arg_125_0 = ((num2 < dependencyFiles.Length) ? 4207413293u : 3795583198u); continue; } case 1u: { int num3; arg_125_0 = ((num3 < dependencyFiles.Length) ? 3513816270u : 2166799543u); continue; } case 2u: { this.dependencies = new HashSet<FileDescriptor>(); int num3 = 0; arg_125_0 = (num * 2631113323u ^ 2574616807u); continue; } case 3u: { int num2; FileDescriptor fileDescriptor = dependencyFiles[num2]; this.AddPackage(fileDescriptor.Package, fileDescriptor); num2++; arg_125_0 = 3276048337u; continue; } case 4u: { int num3; this.dependencies.Add(dependencyFiles[num3]); arg_125_0 = 3179756802u; continue; } case 5u: arg_125_0 = (num * 3693977428u ^ 1260750322u); continue; case 6u: { int num2 = 0; arg_125_0 = (num * 1946987356u ^ 281619545u); continue; } case 7u: { int num3; this.ImportPublicDependencies(dependencyFiles[num3]); num3++; arg_125_0 = (num * 4050069737u ^ 2871900550u); continue; } case 8u: arg_125_0 = (num * 2664253148u ^ 3891939312u); continue; case 9u: goto IL_15F; } return; } } } private void ImportPublicDependencies(FileDescriptor file) { IEnumerator<FileDescriptor> enumerator = file.PublicDependencies.GetEnumerator(); try { while (true) { IL_AF: uint arg_7C_0 = DescriptorPool.smethod_0(enumerator) ? 483463677u : 1013596277u; while (true) { uint num; switch ((num = (arg_7C_0 ^ 1510700764u)) % 6u) { case 0u: goto IL_AF; case 1u: { FileDescriptor current = enumerator.Current; arg_7C_0 = 2088187487u; continue; } case 2u: arg_7C_0 = 483463677u; continue; case 3u: { FileDescriptor current; arg_7C_0 = ((this.dependencies.Add(current) ? 3551628460u : 3841956582u) ^ num * 990315274u); continue; } case 4u: { FileDescriptor current; this.ImportPublicDependencies(current); arg_7C_0 = (num * 2977631201u ^ 244456022u); continue; } } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_F3: uint arg_DB_0 = 273087490u; while (true) { uint num; switch ((num = (arg_DB_0 ^ 1510700764u)) % 3u) { case 0u: goto IL_F3; case 1u: DescriptorPool.smethod_1(enumerator); arg_DB_0 = (num * 2366569890u ^ 4210252562u); continue; } goto Block_8; } } Block_8:; } } } internal T FindSymbol<T>(string fullName) where T : class { IDescriptor descriptor; this.descriptorsByName.TryGetValue(fullName, out descriptor); T t = descriptor as T; if (t != null) { return t; } using (HashSet<FileDescriptor>.Enumerator enumerator = this.dependencies.GetEnumerator()) { T result; while (true) { IL_F6: uint arg_BE_0 = (!enumerator.MoveNext()) ? 4019694310u : 2447028926u; while (true) { uint num; switch ((num = (arg_BE_0 ^ 3083068236u)) % 7u) { case 0u: arg_BE_0 = 2447028926u; continue; case 1u: goto IL_F6; case 2u: t = (descriptor as T); arg_BE_0 = (((t != null) ? 3533821376u : 3234978632u) ^ num * 1291394793u); continue; case 3u: enumerator.Current.DescriptorPool.descriptorsByName.TryGetValue(fullName, out descriptor); arg_BE_0 = 3405879150u; continue; case 5u: result = t; arg_BE_0 = (num * 3163499059u ^ 4131604281u); continue; case 6u: goto IL_106; } goto Block_5; } } Block_5: goto IL_116; IL_106: return result; } IL_116: return default(T); } internal void AddPackage(string fullName, FileDescriptor file) { int num = DescriptorPool.smethod_2(fullName, '.'); if (num != -1) { goto IL_2D; } goto IL_DD; uint arg_B1_0; IDescriptor descriptor; string text; while (true) { IL_AC: uint num2; switch ((num2 = (arg_B1_0 ^ 3316964695u)) % 8u) { case 0u: arg_B1_0 = (this.descriptorsByName.TryGetValue(fullName, out descriptor) ? 2404316941u : 3896060576u); continue; case 1u: this.AddPackage(DescriptorPool.smethod_3(fullName, 0, num), file); text = DescriptorPool.smethod_4(fullName, num + 1); arg_B1_0 = (num2 * 1743673299u ^ 1753241596u); continue; case 2u: arg_B1_0 = (((descriptor is PackageDescriptor) ? 932590856u : 1724073788u) ^ num2 * 1699437476u); continue; case 3u: goto IL_E6; case 5u: goto IL_DD; case 6u: goto IL_2D; case 7u: this.descriptorsByName[fullName] = new PackageDescriptor(text, fullName, file); arg_B1_0 = 2781272387u; continue; } break; } return; IL_E6: throw new DescriptorValidationException(file, DescriptorPool.smethod_5(new string[] { Module.smethod_33<string>(3031927268u), text, Module.smethod_35<string>(2921857439u), descriptor.File.Name, Module.smethod_35<string>(2292255829u) })); IL_2D: arg_B1_0 = 4212142822u; goto IL_AC; IL_DD: text = fullName; arg_B1_0 = 3564429855u; goto IL_AC; } internal void AddSymbol(IDescriptor descriptor) { DescriptorPool.ValidateSymbolName(descriptor); string description; while (true) { IL_220: uint arg_1DA_0 = 1985145293u; while (true) { uint num; switch ((num = (arg_1DA_0 ^ 2053731764u)) % 14u) { case 0u: { string fullName; int num2; description = DescriptorPool.smethod_5(new string[] { Module.smethod_36<string>(1708679815u), DescriptorPool.smethod_4(fullName, num2 + 1), Module.smethod_37<string>(2801180086u), DescriptorPool.smethod_3(fullName, 0, num2), Module.smethod_35<string>(2292255829u) }); arg_1DA_0 = 1833202264u; continue; } case 1u: { IDescriptor descriptor2; arg_1DA_0 = (((descriptor.File != descriptor2.File) ? 461553329u : 98503376u) ^ num * 1094856435u); continue; } case 2u: { string fullName; IDescriptor descriptor2; description = DescriptorPool.smethod_5(new string[] { Module.smethod_36<string>(1708679815u), fullName, Module.smethod_35<string>(2935817106u), descriptor2.File.Name, Module.smethod_34<string>(4290967862u) }); arg_1DA_0 = 399949226u; continue; } case 4u: arg_1DA_0 = (num * 512943130u ^ 3276706322u); continue; case 5u: { string fullName; IDescriptor descriptor2; arg_1DA_0 = ((this.descriptorsByName.TryGetValue(fullName, out descriptor2) ? 724224651u : 816491605u) ^ num * 3835365548u); continue; } case 6u: arg_1DA_0 = (num * 587877992u ^ 2721817162u); continue; case 7u: { string fullName = descriptor.FullName; arg_1DA_0 = (num * 3042641918u ^ 2879375567u); continue; } case 8u: { string fullName; description = DescriptorPool.smethod_6(Module.smethod_33<string>(3031927268u), fullName, Module.smethod_36<string>(4135403163u)); arg_1DA_0 = (num * 294609173u ^ 513628476u); continue; } case 9u: { string fullName; this.descriptorsByName[fullName] = descriptor; arg_1DA_0 = 560751961u; continue; } case 10u: goto IL_220; case 11u: { int num2; arg_1DA_0 = (((num2 != -1) ? 3906432723u : 2856908785u) ^ num * 923807959u); continue; } case 12u: goto IL_227; case 13u: { string fullName; int num2 = DescriptorPool.smethod_2(fullName, '.'); arg_1DA_0 = (num * 2071959698u ^ 1993918755u); continue; } } goto Block_4; } } Block_4: return; IL_227: throw new DescriptorValidationException(descriptor, description); } private static void ValidateSymbolName(IDescriptor descriptor) { if (!DescriptorPool.smethod_7(descriptor.Name, "")) { goto IL_55; } IL_21: int arg_2B_0 = 164232957; IL_26: switch ((arg_2B_0 ^ 1498968607) % 5) { case 1: throw new DescriptorValidationException(descriptor, Module.smethod_35<string>(3327537739u)); case 2: IL_55: arg_2B_0 = (DescriptorPool.smethod_8(DescriptorPool.ValidationRegex, descriptor.Name) ? 956386433 : 1225429300); goto IL_26; case 3: throw new DescriptorValidationException(descriptor, DescriptorPool.smethod_6(Module.smethod_33<string>(3031927268u), descriptor.Name, Module.smethod_37<string>(1895443896u))); case 4: goto IL_21; } } internal FieldDescriptor FindFieldByNumber(MessageDescriptor messageDescriptor, int number) { FieldDescriptor result; this.fieldsByNumber.TryGetValue(new DescriptorPool.DescriptorIntPair(messageDescriptor, number), out result); return result; } internal EnumValueDescriptor FindEnumValueByNumber(EnumDescriptor enumDescriptor, int number) { EnumValueDescriptor result; this.enumValuesByNumber.TryGetValue(new DescriptorPool.DescriptorIntPair(enumDescriptor, number), out result); return result; } internal void AddFieldByNumber(FieldDescriptor field) { DescriptorPool.DescriptorIntPair key = new DescriptorPool.DescriptorIntPair(field.ContainingType, field.FieldNumber); FieldDescriptor fieldDescriptor; if (this.fieldsByNumber.TryGetValue(key, out fieldDescriptor)) { throw new DescriptorValidationException(field, DescriptorPool.smethod_9(new object[] { Module.smethod_36<string>(896911572u), field.FieldNumber, Module.smethod_35<string>(1732735873u), field.ContainingType.FullName, Module.smethod_34<string>(3822284802u), fieldDescriptor.Name, Module.smethod_37<string>(3940659401u) })); } this.fieldsByNumber[key] = field; } internal void AddEnumValueByNumber(EnumValueDescriptor enumValue) { DescriptorPool.DescriptorIntPair key = new DescriptorPool.DescriptorIntPair(enumValue.EnumDescriptor, enumValue.Number); while (true) { IL_7F: uint arg_63_0 = 2334012792u; while (true) { uint num; switch ((num = (arg_63_0 ^ 3355675090u)) % 4u) { case 0u: goto IL_7F; case 2u: arg_63_0 = (((!this.enumValuesByNumber.ContainsKey(key)) ? 3139572129u : 3625274707u) ^ num * 2510821840u); continue; case 3u: this.enumValuesByNumber[key] = enumValue; arg_63_0 = (num * 4075470653u ^ 3296798132u); continue; } return; } } } internal IDescriptor LookupSymbol(string name, IDescriptor relativeTo) { if (DescriptorPool.smethod_10(name, Module.smethod_37<string>(3886401134u))) { goto IL_1E0; } goto IL_25F; uint arg_1EA_0; IDescriptor descriptor; int num2; string string_; while (true) { IL_1E5: uint num; switch ((num = (arg_1EA_0 ^ 1120319073u)) % 20u) { case 0u: goto IL_1E0; case 1u: arg_1EA_0 = ((descriptor == null) ? 870869395u : 499394510u); continue; case 2u: goto IL_248; case 3u: arg_1EA_0 = (num * 3182389240u ^ 2661154485u); continue; case 4u: arg_1EA_0 = (((num2 != -1) ? 1585465210u : 655580376u) ^ num * 49592841u); continue; case 5u: descriptor = this.FindSymbol<IDescriptor>(DescriptorPool.smethod_4(name, 1)); arg_1EA_0 = (num * 3672446899u ^ 3969592099u); continue; case 6u: { StringBuilder stringBuilder; descriptor = this.FindSymbol<IDescriptor>(DescriptorPool.smethod_13(stringBuilder)); arg_1EA_0 = (((descriptor != null) ? 64710281u : 267317740u) ^ num * 1678552982u); continue; } case 8u: { StringBuilder stringBuilder; int num3 = DescriptorPool.smethod_14(DescriptorPool.smethod_13(stringBuilder), Module.smethod_37<string>(3886401134u)); arg_1EA_0 = 2002560569u; continue; } case 9u: { StringBuilder stringBuilder = DescriptorPool.smethod_12(relativeTo.FullName); arg_1EA_0 = (num * 3531444233u ^ 3381061816u); continue; } case 10u: { StringBuilder stringBuilder; DescriptorPool.smethod_16(stringBuilder, name); arg_1EA_0 = (num * 817521685u ^ 2631391113u); continue; } case 11u: arg_1EA_0 = (num * 552099699u ^ 2537391261u); continue; case 12u: { StringBuilder stringBuilder; int num3; DescriptorPool.smethod_15(stringBuilder, num3 + 1); DescriptorPool.smethod_16(stringBuilder, string_); arg_1EA_0 = 1012720395u; continue; } case 13u: descriptor = this.FindSymbol<IDescriptor>(name); arg_1EA_0 = (num * 2889115466u ^ 2648762352u); continue; case 14u: goto IL_271; case 15u: goto IL_25F; case 16u: { int num3; arg_1EA_0 = (((num3 == -1) ? 4120049240u : 3230677641u) ^ num * 813323212u); continue; } case 17u: { StringBuilder stringBuilder; int num3; DescriptorPool.smethod_15(stringBuilder, num3); arg_1EA_0 = 782561782u; continue; } case 18u: { StringBuilder stringBuilder; descriptor = this.FindSymbol<IDescriptor>(DescriptorPool.smethod_13(stringBuilder)); arg_1EA_0 = (num * 2911074500u ^ 582846468u); continue; } case 19u: { StringBuilder stringBuilder; int num3; DescriptorPool.smethod_15(stringBuilder, num3 + 1); arg_1EA_0 = (num * 3586444226u ^ 2060538829u); continue; } } break; } return descriptor; IL_248: string arg_250_0 = DescriptorPool.smethod_3(name, 0, num2); goto IL_250; IL_271: throw new DescriptorValidationException(relativeTo, DescriptorPool.smethod_6(Module.smethod_36<string>(1708679815u), name, Module.smethod_35<string>(165853341u))); IL_1E0: arg_1EA_0 = 1226689332u; goto IL_1E5; IL_250: string_ = arg_250_0; arg_1EA_0 = 1911610428u; goto IL_1E5; IL_25F: num2 = DescriptorPool.smethod_11(name, '.'); if (num2 != -1) { arg_1EA_0 = 604030619u; goto IL_1E5; } arg_250_0 = name; goto IL_250; } static bool smethod_0(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_1(IDisposable idisposable_0) { idisposable_0.Dispose(); } static int smethod_2(string string_0, char char_0) { return string_0.LastIndexOf(char_0); } static string smethod_3(string string_0, int int_0, int int_1) { return string_0.Substring(int_0, int_1); } static string smethod_4(string string_0, int int_0) { return string_0.Substring(int_0); } static string smethod_5(string[] string_0) { return string.Concat(string_0); } static string smethod_6(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } static bool smethod_7(string string_0, string string_1) { return string_0 == string_1; } static bool smethod_8(Regex regex_0, string string_0) { return regex_0.IsMatch(string_0); } static string smethod_9(object[] object_0) { return string.Concat(object_0); } static bool smethod_10(string string_0, string string_1) { return string_0.StartsWith(string_1); } static int smethod_11(string string_0, char char_0) { return string_0.IndexOf(char_0); } static StringBuilder smethod_12(string string_0) { return new StringBuilder(string_0); } static string smethod_13(object object_0) { return object_0.ToString(); } static int smethod_14(string string_0, string string_1) { return string_0.LastIndexOf(string_1); } static void smethod_15(StringBuilder stringBuilder_0, int int_0) { stringBuilder_0.Length = int_0; } static StringBuilder smethod_16(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.Append(string_0); } static Regex smethod_17(string string_0, RegexOptions regexOptions_0) { return new Regex(string_0, regexOptions_0); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Api.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Api : IMessage<Api>, IEquatable<Api>, IDeepCloneable<Api>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Api.__c __9 = new Api.__c(); internal Api cctor>b__54_0() { return new Api(); } } private static readonly MessageParser<Api> _parser = new MessageParser<Api>(new Func<Api>(Api.__c.__9.<.cctor>b__54_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int MethodsFieldNumber = 2; private static readonly FieldCodec<Method> _repeated_methods_codec; private readonly RepeatedField<Method> methods_ = new RepeatedField<Method>(); public const int OptionsFieldNumber = 3; private static readonly FieldCodec<Option> _repeated_options_codec; private readonly RepeatedField<Option> options_ = new RepeatedField<Option>(); public const int VersionFieldNumber = 4; private string version_ = ""; public const int SourceContextFieldNumber = 5; private SourceContext sourceContext_; public const int MixinsFieldNumber = 6; private static readonly FieldCodec<Mixin> _repeated_mixins_codec; private readonly RepeatedField<Mixin> mixins_ = new RepeatedField<Mixin>(); public const int SyntaxFieldNumber = 7; private Syntax syntax_; public static MessageParser<Api> Parser { get { return Api._parser; } } public static MessageDescriptor Descriptor { get { return ApiReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Api.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public RepeatedField<Method> Methods { get { return this.methods_; } } public RepeatedField<Option> Options { get { return this.options_; } } public string Version { get { return this.version_; } set { this.version_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public SourceContext SourceContext { get { return this.sourceContext_; } set { this.sourceContext_ = value; } } public RepeatedField<Mixin> Mixins { get { return this.mixins_; } } public Syntax Syntax { get { return this.syntax_; } set { this.syntax_ = value; } } public Api() { } public Api(Api other) : this() { this.name_ = other.name_; this.methods_ = other.methods_.Clone(); this.options_ = other.options_.Clone(); this.version_ = other.version_; this.SourceContext = ((other.sourceContext_ != null) ? other.SourceContext.Clone() : null); this.mixins_ = other.mixins_.Clone(); this.syntax_ = other.syntax_; } public Api Clone() { return new Api(this); } public override bool Equals(object other) { return this.Equals(other as Api); } public bool Equals(Api other) { if (other == null) { goto IL_156; } goto IL_1C6; int arg_160_0; while (true) { IL_15B: switch ((arg_160_0 ^ -346602447) % 19) { case 0: goto IL_156; case 1: arg_160_0 = (Api.smethod_0(this.Name, other.Name) ? -1704325421 : -1642518890); continue; case 3: arg_160_0 = ((this.Syntax == other.Syntax) ? -761228795 : -1475230797); continue; case 4: return false; case 5: return false; case 6: arg_160_0 = ((!this.options_.Equals(other.options_)) ? -764027783 : -750391997); continue; case 7: arg_160_0 = (Api.smethod_1(this.SourceContext, other.SourceContext) ? -2023673789 : -449988170); continue; case 8: arg_160_0 = ((!Api.smethod_0(this.Version, other.Version)) ? -2119453973 : -1222105613); continue; case 9: return false; case 10: return false; case 11: goto IL_1C6; case 12: return false; case 13: return true; case 14: return false; case 15: return false; case 16: arg_160_0 = ((!this.methods_.Equals(other.methods_)) ? -2105640475 : -1818238691); continue; case 17: return false; case 18: arg_160_0 = ((!this.mixins_.Equals(other.mixins_)) ? -1782281356 : -2092789272); continue; } break; } return true; IL_156: arg_160_0 = -1119302020; goto IL_15B; IL_1C6: arg_160_0 = ((other != this) ? -797699822 : -326848124); goto IL_15B; } public override int GetHashCode() { int num = 1; while (true) { IL_1C7: uint arg_186_0 = 483151928u; while (true) { uint num2; switch ((num2 = (arg_186_0 ^ 656733592u)) % 13u) { case 0u: num ^= Api.smethod_3(this.mixins_); arg_186_0 = 360122091u; continue; case 1u: arg_186_0 = (((this.Syntax == Syntax.SYNTAX_PROTO2) ? 1046253635u : 916974952u) ^ num2 * 1799291894u); continue; case 2u: goto IL_1C7; case 3u: num ^= Api.smethod_3(this.options_); arg_186_0 = (num2 * 1423521943u ^ 2778778583u); continue; case 4u: arg_186_0 = ((this.sourceContext_ == null) ? 1961392822u : 1400751998u); continue; case 5u: num ^= Api.smethod_3(this.Version); arg_186_0 = (num2 * 1412768054u ^ 46988048u); continue; case 6u: num ^= this.Syntax.GetHashCode(); arg_186_0 = (num2 * 2448716936u ^ 917845329u); continue; case 8u: arg_186_0 = (((Api.smethod_2(this.Name) == 0) ? 2008319100u : 1347036302u) ^ num2 * 473897034u); continue; case 9u: num ^= Api.smethod_3(this.Name); arg_186_0 = (num2 * 1835972913u ^ 3405706058u); continue; case 10u: num ^= Api.smethod_3(this.SourceContext); arg_186_0 = (num2 * 448925025u ^ 4282748304u); continue; case 11u: arg_186_0 = (((Api.smethod_2(this.Version) == 0) ? 1268914824u : 859267408u) ^ num2 * 2116067912u); continue; case 12u: num ^= Api.smethod_3(this.methods_); arg_186_0 = 1274606072u; continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Api.smethod_2(this.Name) != 0) { goto IL_104; } goto IL_1A7; uint arg_16A_0; while (true) { IL_165: uint num; switch ((num = (arg_16A_0 ^ 3246565033u)) % 12u) { case 0u: arg_16A_0 = ((this.sourceContext_ != null) ? 4061048456u : 3190117843u); continue; case 1u: output.WriteRawTag(42); output.WriteMessage(this.SourceContext); arg_16A_0 = (num * 3422430355u ^ 946740000u); continue; case 2u: this.mixins_.WriteTo(output, Api._repeated_mixins_codec); arg_16A_0 = 3225832178u; continue; case 3u: goto IL_104; case 4u: this.options_.WriteTo(output, Api._repeated_options_codec); arg_16A_0 = (((Api.smethod_2(this.Version) != 0) ? 2998250845u : 2712821109u) ^ num * 1188794185u); continue; case 5u: output.WriteRawTag(56); arg_16A_0 = (num * 1589568392u ^ 2809229027u); continue; case 6u: goto IL_1A7; case 7u: output.WriteRawTag(10); output.WriteString(this.Name); arg_16A_0 = (num * 2589535238u ^ 550271089u); continue; case 8u: output.WriteRawTag(34); output.WriteString(this.Version); arg_16A_0 = (num * 4091013533u ^ 1961919569u); continue; case 10u: output.WriteEnum((int)this.Syntax); arg_16A_0 = (num * 1841660642u ^ 577258040u); continue; case 11u: arg_16A_0 = (((this.Syntax != Syntax.SYNTAX_PROTO2) ? 4177886523u : 3232150471u) ^ num * 1990184609u); continue; } break; } return; IL_104: arg_16A_0 = 4189173370u; goto IL_165; IL_1A7: this.methods_.WriteTo(output, Api._repeated_methods_codec); arg_16A_0 = 2665179017u; goto IL_165; } public int CalculateSize() { int num = 0; while (true) { IL_1C2: uint arg_185_0 = 3515005152u; while (true) { uint num2; switch ((num2 = (arg_185_0 ^ 2448941514u)) % 12u) { case 0u: num += this.mixins_.CalculateSize(Api._repeated_mixins_codec); arg_185_0 = 3515229828u; continue; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_185_0 = (num2 * 4109269571u ^ 1441798833u); continue; case 2u: num += this.options_.CalculateSize(Api._repeated_options_codec); arg_185_0 = (((Api.smethod_2(this.Version) == 0) ? 2718871235u : 2395111544u) ^ num2 * 2371454043u); continue; case 3u: arg_185_0 = ((this.sourceContext_ != null) ? 3535556969u : 3438329066u); continue; case 4u: num += this.methods_.CalculateSize(Api._repeated_methods_codec); arg_185_0 = 2803402680u; continue; case 5u: goto IL_1C2; case 6u: arg_185_0 = (((Api.smethod_2(this.Name) == 0) ? 1585209980u : 1462079573u) ^ num2 * 1224269439u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceContext); arg_185_0 = (num2 * 1830641409u ^ 264212809u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.Version); arg_185_0 = (num2 * 164038361u ^ 967320401u); continue; case 10u: arg_185_0 = (((this.Syntax == Syntax.SYNTAX_PROTO2) ? 2354080687u : 3581472721u) ^ num2 * 2193343646u); continue; case 11u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax); arg_185_0 = (num2 * 4066319558u ^ 3214646577u); continue; } return num; } } return num; } public void MergeFrom(Api other) { if (other == null) { goto IL_36; } goto IL_1F7; uint arg_19F_0; while (true) { IL_19A: uint num; switch ((num = (arg_19F_0 ^ 286525219u)) % 15u) { case 0u: arg_19F_0 = (((this.sourceContext_ != null) ? 552901493u : 1060573310u) ^ num * 3216527277u); continue; case 1u: arg_19F_0 = (((other.Syntax != Syntax.SYNTAX_PROTO2) ? 3104830951u : 4290574759u) ^ num * 1999647994u); continue; case 2u: this.Version = other.Version; arg_19F_0 = (num * 107552016u ^ 3620995360u); continue; case 3u: this.options_.Add(other.options_); arg_19F_0 = (((Api.smethod_2(other.Version) != 0) ? 1260352833u : 1703999142u) ^ num * 2478416687u); continue; case 4u: this.Syntax = other.Syntax; arg_19F_0 = (num * 3261282669u ^ 2566392979u); continue; case 5u: this.sourceContext_ = new SourceContext(); arg_19F_0 = (num * 2690917715u ^ 3232982994u); continue; case 6u: this.methods_.Add(other.methods_); arg_19F_0 = 908889657u; continue; case 7u: this.mixins_.Add(other.mixins_); arg_19F_0 = 435321587u; continue; case 9u: this.SourceContext.MergeFrom(other.SourceContext); arg_19F_0 = 459278409u; continue; case 10u: arg_19F_0 = ((other.sourceContext_ != null) ? 1003208373u : 459278409u); continue; case 11u: goto IL_36; case 12u: goto IL_1F7; case 13u: return; case 14u: this.Name = other.Name; arg_19F_0 = (num * 396399359u ^ 4053630740u); continue; } break; } return; IL_36: arg_19F_0 = 1729446145u; goto IL_19A; IL_1F7: arg_19F_0 = ((Api.smethod_2(other.Name) != 0) ? 2052098666u : 1071719075u); goto IL_19A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_330: uint num; uint arg_2AC_0 = ((num = input.ReadTag()) != 0u) ? 4110862664u : 3824667989u; while (true) { uint num2; switch ((num2 = (arg_2AC_0 ^ 3789259971u)) % 26u) { case 0u: arg_2AC_0 = (num2 * 2197230266u ^ 3843197192u); continue; case 1u: arg_2AC_0 = (((num != 18u) ? 1503916128u : 93172511u) ^ num2 * 605257036u); continue; case 2u: this.mixins_.AddEntriesFrom(input, Api._repeated_mixins_codec); arg_2AC_0 = 4266255286u; continue; case 3u: this.Version = input.ReadString(); arg_2AC_0 = 2663096258u; continue; case 4u: this.methods_.AddEntriesFrom(input, Api._repeated_methods_codec); arg_2AC_0 = 4266255286u; continue; case 5u: goto IL_330; case 6u: this.Name = input.ReadString(); arg_2AC_0 = 4266255286u; continue; case 7u: arg_2AC_0 = ((num <= 26u) ? 2537901777u : 3487289015u); continue; case 8u: this.sourceContext_ = new SourceContext(); arg_2AC_0 = (num2 * 235980164u ^ 2687174996u); continue; case 9u: arg_2AC_0 = (num2 * 985445888u ^ 2678543798u); continue; case 10u: arg_2AC_0 = (((num != 10u) ? 1704819074u : 937673525u) ^ num2 * 2263173275u); continue; case 11u: arg_2AC_0 = (num2 * 491435352u ^ 783550142u); continue; case 12u: arg_2AC_0 = ((num != 50u) ? 3574117690u : 3286446381u); continue; case 13u: arg_2AC_0 = 4110862664u; continue; case 14u: this.syntax_ = (Syntax)input.ReadEnum(); arg_2AC_0 = 4266255286u; continue; case 15u: arg_2AC_0 = (((num != 26u) ? 1173995215u : 604647373u) ^ num2 * 3683636443u); continue; case 16u: arg_2AC_0 = (((num == 34u) ? 2866044238u : 2698686721u) ^ num2 * 1006984977u); continue; case 17u: arg_2AC_0 = (num2 * 2971615873u ^ 2884181469u); continue; case 19u: input.SkipLastField(); arg_2AC_0 = 4266255286u; continue; case 20u: arg_2AC_0 = (((num != 42u) ? 2491170373u : 3861937067u) ^ num2 * 2495504230u); continue; case 21u: this.options_.AddEntriesFrom(input, Api._repeated_options_codec); arg_2AC_0 = 4266255286u; continue; case 22u: arg_2AC_0 = ((num > 42u) ? 2913380767u : 3000465087u); continue; case 23u: arg_2AC_0 = (((num == 56u) ? 3592166683u : 2395544196u) ^ num2 * 2438938008u); continue; case 24u: arg_2AC_0 = ((this.sourceContext_ == null) ? 3847898941u : 4071656876u); continue; case 25u: input.ReadMessage(this.sourceContext_); arg_2AC_0 = 3348639008u; continue; } return; } } } static Api() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_8C: uint arg_70_0 = 1556543896u; while (true) { uint num; switch ((num = (arg_70_0 ^ 1064954005u)) % 4u) { case 1u: Api._repeated_methods_codec = FieldCodec.ForMessage<Method>(18u, Method.Parser); arg_70_0 = (num * 841577041u ^ 3219778555u); continue; case 2u: goto IL_8C; case 3u: Api._repeated_options_codec = FieldCodec.ForMessage<Option>(26u, Option.Parser); Api._repeated_mixins_codec = FieldCodec.ForMessage<Mixin>(50u, Mixin.Parser); arg_70_0 = (num * 2049841296u ^ 1703811221u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Cryptography.WoW/WoWCrypt.cs using System; using System.Runtime.CompilerServices; using System.Security.Cryptography; namespace Framework.Cryptography.WoW { public sealed class WoWCrypt : IDisposable { private static readonly byte[] ServerEncryptionKey; private static readonly byte[] ServerDecryptionKey; private SARC4 SARC4Encrypt; private SARC4 SARC4Decrypt; public bool IsInitialized { get; set; } public WoWCrypt() { this.IsInitialized = false; } public void Initialize(byte[] sessionKey) { this.IsInitialized = false; while (true) { IL_12E: uint arg_101_0 = 2073740479u; while (true) { uint num; switch ((num = (arg_101_0 ^ 2103882194u)) % 8u) { case 0u: { byte[] array = new byte[1024]; byte[] array2 = new byte[1024]; this.SARC4Encrypt.ProcessBuffer(array, array.Length); this.SARC4Decrypt.ProcessBuffer(array2, array2.Length); this.IsInitialized = true; arg_101_0 = (num * 483766584u ^ 1925911129u); continue; } case 1u: { this.SARC4Decrypt = new SARC4(); HMACSHA1 hashAlgorithm_ = WoWCrypt.smethod_1(WoWCrypt.ServerDecryptionKey); HMACSHA1 hashAlgorithm_2 = WoWCrypt.smethod_1(WoWCrypt.ServerEncryptionKey); arg_101_0 = (num * 1947262690u ^ 1312804196u); continue; } case 2u: goto IL_12E; case 4u: { HMACSHA1 hashAlgorithm_2; this.SARC4Encrypt.PrepareKey(WoWCrypt.smethod_2(hashAlgorithm_2, sessionKey)); HMACSHA1 hashAlgorithm_; this.SARC4Decrypt.PrepareKey(WoWCrypt.smethod_2(hashAlgorithm_, sessionKey)); arg_101_0 = (num * 1816278399u ^ 758351854u); continue; } case 5u: arg_101_0 = (((!this.IsInitialized) ? 3269098579u : 2838635962u) ^ num * 4003455326u); continue; case 6u: goto IL_135; case 7u: this.SARC4Encrypt = new SARC4(); arg_101_0 = 946657131u; continue; } goto Block_2; } } Block_2: return; IL_135: throw WoWCrypt.smethod_0(Module.smethod_35<string>(3386492916u)); } public void Initialize(byte[] sessionKey, byte[] clientSeed, byte[] serverSeed) { this.IsInitialized = false; if (this.IsInitialized) { goto IL_E2; } goto IL_11E; uint arg_EC_0; while (true) { IL_E7: uint num; switch ((num = (arg_EC_0 ^ 411909969u)) % 9u) { case 0u: goto IL_E2; case 1u: { byte[] array = new byte[1024]; arg_EC_0 = (num * 4112686248u ^ 3760825414u); continue; } case 2u: { byte[] array2; this.SARC4Encrypt.ProcessBuffer(array2, array2.Length); arg_EC_0 = (num * 3888587318u ^ 4000620574u); continue; } case 3u: { this.SARC4Decrypt = new SARC4(); HMACSHA1 hashAlgorithm_ = WoWCrypt.smethod_1(serverSeed); HMACSHA1 hashAlgorithm_2 = WoWCrypt.smethod_1(clientSeed); arg_EC_0 = (num * 2152563200u ^ 767503809u); continue; } case 5u: { HMACSHA1 hashAlgorithm_2; this.SARC4Encrypt.PrepareKey(WoWCrypt.smethod_2(hashAlgorithm_2, sessionKey)); HMACSHA1 hashAlgorithm_; this.SARC4Decrypt.PrepareKey(WoWCrypt.smethod_2(hashAlgorithm_, sessionKey)); byte[] array2 = new byte[1024]; arg_EC_0 = (num * 2323342343u ^ 3057383575u); continue; } case 6u: { byte[] array; this.SARC4Decrypt.ProcessBuffer(array, array.Length); this.IsInitialized = true; arg_EC_0 = (num * 162284483u ^ 1051040720u); continue; } case 7u: goto IL_11E; case 8u: goto IL_130; } break; } return; IL_130: throw WoWCrypt.smethod_0(Module.smethod_35<string>(3386492916u)); IL_E2: arg_EC_0 = 1557707004u; goto IL_E7; IL_11E: this.SARC4Encrypt = new SARC4(); arg_EC_0 = 564654211u; goto IL_E7; } public void Encrypt(byte[] data, int count) { if (this.IsInitialized) { goto IL_2C; } IL_08: int arg_12_0 = 1459186387; IL_0D: switch ((arg_12_0 ^ 1059757101) % 4) { case 1: IL_2C: this.SARC4Encrypt.ProcessBuffer(data, count); arg_12_0 = 848727185; goto IL_0D; case 2: throw WoWCrypt.smethod_0(Module.smethod_36<string>(1494787757u)); case 3: goto IL_08; } } public void Decrypt(byte[] data, int count) { if (this.IsInitialized) { goto IL_2C; } IL_08: int arg_12_0 = 768022319; IL_0D: switch ((arg_12_0 ^ 2044698726) % 4) { case 0: IL_2C: this.SARC4Decrypt.ProcessBuffer(data, count); arg_12_0 = 558064304; goto IL_0D; case 1: throw WoWCrypt.smethod_0(Module.smethod_37<string>(1106446649u)); case 3: goto IL_08; } } public void Dispose() { this.IsInitialized = false; } static WoWCrypt() { // Note: this type is marked as 'beforefieldinit'. byte[] expr_07 = new byte[16]; WoWCrypt.smethod_3(expr_07, fieldof(Framework.<PrivateImplementationDetails>.A5614CF8A256BD624776F8BBAC105E523496B2BF).FieldHandle); WoWCrypt.ServerEncryptionKey = expr_07; byte[] expr_1E = new byte[16]; WoWCrypt.smethod_3(expr_1E, fieldof(Framework.<PrivateImplementationDetails>.B64704505A6F7DA9DC7BB76B2684DEEF1ADFB915).FieldHandle); WoWCrypt.ServerDecryptionKey = expr_1E; } static InvalidOperationException smethod_0(string string_0) { return new InvalidOperationException(string_0); } static HMACSHA1 smethod_1(byte[] byte_0) { return new HMACSHA1(byte_0); } static byte[] smethod_2(HashAlgorithm hashAlgorithm_0, byte[] byte_0) { return hashAlgorithm_0.ComputeHash(byte_0); } static void smethod_3(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } } } <file_sep>/Framework.Cryptography.BNet/BNetCrypt.cs using System; using System.Runtime.CompilerServices; using System.Security.Cryptography; namespace Framework.Cryptography.BNet { public sealed class BNetCrypt : IDisposable { private static readonly byte[] ServerEncryptionKey; private static readonly byte[] ServerDecryptionKey; private SARC4 SARC4Encrypt; private SARC4 SARC4Decrypt; public bool IsInitialized { get; set; } public BNetCrypt(byte[] sessionKey) { this.IsInitialized = false; if (this.IsInitialized) { throw BNetCrypt.smethod_0(Module.smethod_36<string>(56398324u)); } this.SARC4Encrypt = new SARC4(); this.SARC4Decrypt = new SARC4(); HMACSHA256 hashAlgorithm_ = BNetCrypt.smethod_1(sessionKey); HMACSHA256 hashAlgorithm_2 = BNetCrypt.smethod_1(sessionKey); this.SARC4Encrypt.PrepareKey(BNetCrypt.smethod_2(hashAlgorithm_2, BNetCrypt.ServerEncryptionKey)); this.SARC4Decrypt.PrepareKey(BNetCrypt.smethod_2(hashAlgorithm_, BNetCrypt.ServerDecryptionKey)); this.IsInitialized = true; } public void Encrypt(byte[] data, int count) { if (this.IsInitialized) { goto IL_2C; } IL_08: int arg_12_0 = -407049644; IL_0D: switch ((arg_12_0 ^ -1406051805) % 4) { case 0: IL_2C: this.SARC4Encrypt.ProcessBuffer(data, count); arg_12_0 = -2042246406; goto IL_0D; case 2: goto IL_08; case 3: throw BNetCrypt.smethod_0(Module.smethod_33<string>(2782540870u)); } } public void Decrypt(byte[] data, int count) { if (this.IsInitialized) { goto IL_2C; } IL_08: int arg_12_0 = -669052452; IL_0D: switch ((arg_12_0 ^ -2090713909) % 4) { case 0: goto IL_08; case 2: IL_2C: this.SARC4Decrypt.ProcessBuffer(data, count); arg_12_0 = -110949926; goto IL_0D; case 3: throw BNetCrypt.smethod_0(Module.smethod_33<string>(2782540870u)); } } public void Dispose() { this.IsInitialized = false; } static BNetCrypt() { // Note: this type is marked as 'beforefieldinit'. byte[] expr_07 = new byte[16]; BNetCrypt.smethod_3(expr_07, fieldof(Framework.<PrivateImplementationDetails>.FE5E26F28C22F788D40FAD92147032F58EC76833).FieldHandle); BNetCrypt.ServerEncryptionKey = expr_07; byte[] expr_1E = new byte[16]; BNetCrypt.smethod_3(expr_1E, fieldof(Framework.<PrivateImplementationDetails>.F3FAF914B4E2D945DAF4562B7BE04C79D9C0F6CA).FieldHandle); BNetCrypt.ServerDecryptionKey = expr_1E; } static InvalidOperationException smethod_0(string string_0) { return new InvalidOperationException(string_0); } static HMACSHA256 smethod_1(byte[] byte_0) { return new HMACSHA256(byte_0); } static byte[] smethod_2(HashAlgorithm hashAlgorithm_0, byte[] byte_0) { return hashAlgorithm_0.ComputeHash(byte_0); } static void smethod_3(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } } } <file_sep>/Bgs.Protocol/ObjectAddress.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class ObjectAddress : IMessage<ObjectAddress>, IEquatable<ObjectAddress>, IDeepCloneable<ObjectAddress>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ObjectAddress.__c __9 = new ObjectAddress.__c(); internal ObjectAddress cctor>b__29_0() { return new ObjectAddress(); } } private static readonly MessageParser<ObjectAddress> _parser = new MessageParser<ObjectAddress>(new Func<ObjectAddress>(ObjectAddress.__c.__9.<.cctor>b__29_0)); public const int HostFieldNumber = 1; private ProcessId host_; public const int ObjectIdFieldNumber = 2; private ulong objectId_; public static MessageParser<ObjectAddress> Parser { get { return ObjectAddress._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return ObjectAddress.Descriptor; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public ObjectAddress() { } public ObjectAddress(ObjectAddress other) : this() { this.Host = ((other.host_ != null) ? other.Host.Clone() : null); this.objectId_ = other.objectId_; } public ObjectAddress Clone() { return new ObjectAddress(this); } public override bool Equals(object other) { return this.Equals(other as ObjectAddress); } public bool Equals(ObjectAddress other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 2126518567) % 9) { case 0: arg_72_0 = ((!ObjectAddress.smethod_0(this.Host, other.Host)) ? 506165601 : 347133427); continue; case 1: arg_72_0 = ((this.ObjectId != other.ObjectId) ? 506788898 : 744276925); continue; case 2: goto IL_B0; case 3: goto IL_15; case 5: return true; case 6: return false; case 7: return false; case 8: return false; } break; } return true; IL_15: arg_72_0 = 1254453680; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 2017105065 : 2109675614); goto IL_6D; } public override int GetHashCode() { int num = 1 ^ ObjectAddress.smethod_1(this.Host); while (true) { IL_7A: uint arg_5E_0 = 1388377778u; while (true) { uint num2; switch ((num2 = (arg_5E_0 ^ 436569008u)) % 4u) { case 0u: goto IL_7A; case 1u: num ^= this.ObjectId.GetHashCode(); arg_5E_0 = (num2 * 3114563367u ^ 1372315460u); continue; case 2u: arg_5E_0 = (((this.ObjectId == 0uL) ? 1009854875u : 1804757577u) ^ num2 * 1450141308u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Host); while (true) { IL_81: uint arg_65_0 = 880761159u; while (true) { uint num; switch ((num = (arg_65_0 ^ 1563109521u)) % 4u) { case 0u: goto IL_81; case 1u: output.WriteRawTag(16); output.WriteUInt64(this.ObjectId); arg_65_0 = (num * 2958067841u ^ 2876228831u); continue; case 2u: arg_65_0 = (((this.ObjectId == 0uL) ? 906845704u : 787001542u) ^ num * 145965687u); continue; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Host)); while (true) { IL_7B: uint arg_5F_0 = 3532080024u; while (true) { uint num2; switch ((num2 = (arg_5F_0 ^ 2184967746u)) % 4u) { case 0u: goto IL_7B; case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_5F_0 = (num2 * 3449153423u ^ 743595002u); continue; case 2u: arg_5F_0 = (((this.ObjectId != 0uL) ? 1634319625u : 1127513695u) ^ num2 * 330731901u); continue; } return num; } } return num; } public void MergeFrom(ObjectAddress other) { if (other == null) { goto IL_7C; } goto IL_F9; uint arg_B9_0; while (true) { IL_B4: uint num; switch ((num = (arg_B9_0 ^ 460412436u)) % 9u) { case 0u: this.ObjectId = other.ObjectId; arg_B9_0 = (num * 3739280031u ^ 114632850u); continue; case 2u: this.Host.MergeFrom(other.Host); arg_B9_0 = 1632779411u; continue; case 3u: goto IL_7C; case 4u: this.host_ = new ProcessId(); arg_B9_0 = (num * 2976309156u ^ 2775404304u); continue; case 5u: goto IL_F9; case 6u: return; case 7u: arg_B9_0 = (((this.host_ != null) ? 485046196u : 640651363u) ^ num * 3808556174u); continue; case 8u: arg_B9_0 = ((other.ObjectId != 0uL) ? 214090938u : 2056298112u); continue; } break; } return; IL_7C: arg_B9_0 = 1712836748u; goto IL_B4; IL_F9: arg_B9_0 = ((other.host_ == null) ? 1632779411u : 1332552592u); goto IL_B4; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13D: uint num; uint arg_F5_0 = ((num = input.ReadTag()) == 0u) ? 3235118161u : 2517609179u; while (true) { uint num2; switch ((num2 = (arg_F5_0 ^ 2636316335u)) % 11u) { case 0u: arg_F5_0 = (num2 * 1645222074u ^ 2313580737u); continue; case 2u: goto IL_13D; case 3u: arg_F5_0 = ((num != 10u) ? 2496460079u : 3952867392u); continue; case 4u: arg_F5_0 = ((this.host_ != null) ? 4231451463u : 4037584338u); continue; case 5u: arg_F5_0 = (((num != 16u) ? 1370834955u : 732611108u) ^ num2 * 874238007u); continue; case 6u: this.ObjectId = input.ReadUInt64(); arg_F5_0 = 2842609969u; continue; case 7u: this.host_ = new ProcessId(); arg_F5_0 = (num2 * 3024403130u ^ 2986711445u); continue; case 8u: arg_F5_0 = 2517609179u; continue; case 9u: input.ReadMessage(this.host_); arg_F5_0 = 2842609969u; continue; case 10u: input.SkipLastField(); arg_F5_0 = (num2 * 444464401u ^ 22182803u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/SubscribeNotificationRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class SubscribeNotificationRequest : IMessage<SubscribeNotificationRequest>, IEquatable<SubscribeNotificationRequest>, IDeepCloneable<SubscribeNotificationRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscribeNotificationRequest.__c __9 = new SubscribeNotificationRequest.__c(); internal SubscribeNotificationRequest cctor>b__24_0() { return new SubscribeNotificationRequest(); } } private static readonly MessageParser<SubscribeNotificationRequest> _parser = new MessageParser<SubscribeNotificationRequest>(new Func<SubscribeNotificationRequest>(SubscribeNotificationRequest.__c.__9.<.cctor>b__24_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public static MessageParser<SubscribeNotificationRequest> Parser { get { return SubscribeNotificationRequest._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return SubscribeNotificationRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public SubscribeNotificationRequest() { } public SubscribeNotificationRequest(SubscribeNotificationRequest other) : this() { this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); } public SubscribeNotificationRequest Clone() { return new SubscribeNotificationRequest(this); } public override bool Equals(object other) { return this.Equals(other as SubscribeNotificationRequest); } public bool Equals(SubscribeNotificationRequest other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -921622800) % 7) { case 0: return false; case 1: goto IL_7A; case 2: arg_48_0 = ((!SubscribeNotificationRequest.smethod_0(this.EntityId, other.EntityId)) ? -297707057 : -1661204508); continue; case 3: goto IL_12; case 5: return true; case 6: return false; } break; } return true; IL_12: arg_48_0 = -2004503289; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1999616118 : -1955330984); goto IL_43; } public override int GetHashCode() { return 1 ^ SubscribeNotificationRequest.smethod_1(this.EntityId); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.EntityId); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.EntityId)); } public void MergeFrom(SubscribeNotificationRequest other) { if (other == null) { goto IL_70; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 2853265707u)) % 7u) { case 0u: goto IL_70; case 1u: arg_7A_0 = (((this.entityId_ != null) ? 1602309380u : 997121754u) ^ num * 3752142748u); continue; case 3u: goto IL_B1; case 4u: return; case 5u: this.entityId_ = new EntityId(); arg_7A_0 = (num * 742507599u ^ 936662203u); continue; case 6u: this.EntityId.MergeFrom(other.EntityId); arg_7A_0 = 3264303925u; continue; } break; } return; IL_70: arg_7A_0 = 3725898397u; goto IL_75; IL_B1: arg_7A_0 = ((other.entityId_ == null) ? 3264303925u : 2556748895u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DC: uint num; uint arg_A1_0 = ((num = input.ReadTag()) == 0u) ? 314486705u : 989288645u; while (true) { uint num2; switch ((num2 = (arg_A1_0 ^ 1201311600u)) % 8u) { case 0u: arg_A1_0 = 989288645u; continue; case 2u: goto IL_DC; case 3u: input.ReadMessage(this.entityId_); arg_A1_0 = 1784322090u; continue; case 4u: input.SkipLastField(); arg_A1_0 = (num2 * 592286524u ^ 3623008314u); continue; case 5u: arg_A1_0 = ((num == 10u) ? 43747934u : 1804505036u); continue; case 6u: arg_A1_0 = ((this.entityId_ != null) ? 996608891u : 1351047359u); continue; case 7u: this.entityId_ = new EntityId(); arg_A1_0 = (num2 * 4264746415u ^ 574960378u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/ClientRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class ClientRequest : IMessage<ClientRequest>, IEquatable<ClientRequest>, IDeepCloneable<ClientRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ClientRequest.__c __9 = new ClientRequest.__c(); internal ClientRequest cctor>b__49_0() { return new ClientRequest(); } } private static readonly MessageParser<ClientRequest> _parser = new MessageParser<ClientRequest>(new Func<ClientRequest>(ClientRequest.__c.__9.<.cctor>b__49_0)); public const int AttributeFieldNumber = 1; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(10u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int HostFieldNumber = 2; private ProcessId host_; public const int AccountIdFieldNumber = 3; private EntityId accountId_; public const int GameAccountIdFieldNumber = 4; private EntityId gameAccountId_; public const int ProgramFieldNumber = 5; private uint program_; public const int ClientInfoFieldNumber = 6; private ClientInfo clientInfo_; public static MessageParser<ClientRequest> Parser { get { return ClientRequest._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return ClientRequest.Descriptor; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public ClientInfo ClientInfo { get { return this.clientInfo_; } set { this.clientInfo_ = value; } } public ClientRequest() { } public ClientRequest(ClientRequest other) : this() { this.attribute_ = other.attribute_.Clone(); this.Host = ((other.host_ != null) ? other.Host.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.program_ = other.program_; this.ClientInfo = ((other.clientInfo_ != null) ? other.ClientInfo.Clone() : null); } public ClientRequest Clone() { return new ClientRequest(this); } public override bool Equals(object other) { return this.Equals(other as ClientRequest); } public bool Equals(ClientRequest other) { if (other == null) { goto IL_71; } goto IL_18F; int arg_131_0; while (true) { IL_12C: switch ((arg_131_0 ^ 2065632182) % 17) { case 0: goto IL_18F; case 1: return false; case 2: arg_131_0 = (ClientRequest.smethod_0(this.Host, other.Host) ? 1693669460 : 2056580681); continue; case 3: return false; case 4: arg_131_0 = (ClientRequest.smethod_0(this.ClientInfo, other.ClientInfo) ? 1076623634 : 1816253848); continue; case 5: return true; case 6: arg_131_0 = ((!ClientRequest.smethod_0(this.GameAccountId, other.GameAccountId)) ? 1096434502 : 951808211); continue; case 8: arg_131_0 = (this.attribute_.Equals(other.attribute_) ? 375775418 : 1275826742); continue; case 9: return false; case 10: goto IL_71; case 11: return false; case 12: return false; case 13: arg_131_0 = ((this.Program != other.Program) ? 328843442 : 97430758); continue; case 14: return false; case 15: arg_131_0 = (ClientRequest.smethod_0(this.AccountId, other.AccountId) ? 1425371528 : 894397152); continue; case 16: return false; } break; } return true; IL_71: arg_131_0 = 1303724693; goto IL_12C; IL_18F: arg_131_0 = ((other != this) ? 1872128339 : 827885944); goto IL_12C; } public override int GetHashCode() { int num = 1 ^ ClientRequest.smethod_1(this.attribute_); while (true) { IL_1A8: uint arg_16B_0 = 125185246u; while (true) { uint num2; switch ((num2 = (arg_16B_0 ^ 286268547u)) % 12u) { case 0u: arg_16B_0 = ((this.Program == 0u) ? 1954299074u : 2074503147u); continue; case 1u: arg_16B_0 = (((this.host_ != null) ? 2233798353u : 4264539022u) ^ num2 * 4037523415u); continue; case 2u: arg_16B_0 = ((this.gameAccountId_ == null) ? 1922961771u : 48645464u); continue; case 3u: num ^= ClientRequest.smethod_1(this.GameAccountId); arg_16B_0 = (num2 * 3002012066u ^ 1439659773u); continue; case 4u: goto IL_1A8; case 5u: num ^= ClientRequest.smethod_1(this.Host); arg_16B_0 = (num2 * 2868212681u ^ 1513819588u); continue; case 6u: arg_16B_0 = ((this.accountId_ != null) ? 1306192253u : 1144437309u); continue; case 8u: num ^= this.Program.GetHashCode(); arg_16B_0 = (num2 * 3053217815u ^ 3466291866u); continue; case 9u: arg_16B_0 = ((this.clientInfo_ == null) ? 1155082240u : 660416512u); continue; case 10u: num ^= ClientRequest.smethod_1(this.AccountId); arg_16B_0 = (num2 * 1804306161u ^ 378024483u); continue; case 11u: num ^= this.ClientInfo.GetHashCode(); arg_16B_0 = (num2 * 2596084163u ^ 1031791305u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attribute_.WriteTo(output, ClientRequest._repeated_attribute_codec); while (true) { IL_206: uint arg_1BD_0 = 4026238796u; while (true) { uint num; switch ((num = (arg_1BD_0 ^ 3987017948u)) % 15u) { case 0u: output.WriteMessage(this.GameAccountId); arg_1BD_0 = (num * 1734913269u ^ 1796538986u); continue; case 1u: arg_1BD_0 = (((this.host_ == null) ? 155361125u : 2018662703u) ^ num * 938927656u); continue; case 2u: arg_1BD_0 = ((this.accountId_ == null) ? 4178047655u : 3063690978u); continue; case 3u: output.WriteRawTag(50); output.WriteMessage(this.ClientInfo); arg_1BD_0 = (num * 3233512433u ^ 210935663u); continue; case 5u: goto IL_206; case 6u: arg_1BD_0 = ((this.gameAccountId_ == null) ? 3008754337u : 3684295105u); continue; case 7u: output.WriteRawTag(18); output.WriteMessage(this.Host); arg_1BD_0 = (num * 2205070507u ^ 477299764u); continue; case 8u: output.WriteRawTag(26); arg_1BD_0 = (num * 3316671661u ^ 531994782u); continue; case 9u: output.WriteRawTag(34); arg_1BD_0 = (num * 2513673420u ^ 1134121343u); continue; case 10u: arg_1BD_0 = ((this.Program != 0u) ? 2889723263u : 4123078517u); continue; case 11u: arg_1BD_0 = ((this.clientInfo_ != null) ? 2680037572u : 2443792887u); continue; case 12u: output.WriteFixed32(this.Program); arg_1BD_0 = (num * 3944539892u ^ 2077028669u); continue; case 13u: output.WriteMessage(this.AccountId); arg_1BD_0 = (num * 374548430u ^ 905106271u); continue; case 14u: output.WriteRawTag(45); arg_1BD_0 = (num * 1360247931u ^ 2520316023u); continue; } return; } } } public int CalculateSize() { int num = 0 + this.attribute_.CalculateSize(ClientRequest._repeated_attribute_codec); if (this.host_ != null) { goto IL_DD; } goto IL_182; uint arg_13A_0; while (true) { IL_135: uint num2; switch ((num2 = (arg_13A_0 ^ 4186034230u)) % 11u) { case 0u: arg_13A_0 = ((this.clientInfo_ != null) ? 3937587503u : 4022434633u); continue; case 1u: num += 5; arg_13A_0 = (num2 * 2171812951u ^ 1666412169u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_13A_0 = (num2 * 1539496444u ^ 2906351284u); continue; case 3u: goto IL_DD; case 4u: arg_13A_0 = ((this.gameAccountId_ == null) ? 2445544244u : 4287129291u); continue; case 5u: goto IL_182; case 7u: arg_13A_0 = ((this.Program != 0u) ? 3715256877u : 3442730404u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_13A_0 = (num2 * 3198662407u ^ 3503935711u); continue; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_13A_0 = (num2 * 2383994806u ^ 946218824u); continue; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ClientInfo); arg_13A_0 = (num2 * 14416726u ^ 2321127983u); continue; } break; } return num; IL_DD: arg_13A_0 = 3331221513u; goto IL_135; IL_182: arg_13A_0 = ((this.accountId_ != null) ? 3031600584u : 2692985532u); goto IL_135; } public void MergeFrom(ClientRequest other) { if (other == null) { goto IL_266; } goto IL_2D5; uint arg_270_0; while (true) { IL_26B: uint num; switch ((num = (arg_270_0 ^ 1962833610u)) % 22u) { case 0u: goto IL_2D5; case 1u: return; case 2u: goto IL_266; case 3u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_270_0 = 255607263u; continue; case 4u: this.gameAccountId_ = new EntityId(); arg_270_0 = (num * 3636711999u ^ 3946242157u); continue; case 5u: this.AccountId.MergeFrom(other.AccountId); arg_270_0 = 684000152u; continue; case 6u: arg_270_0 = (((this.clientInfo_ == null) ? 1930223235u : 940540130u) ^ num * 2490024621u); continue; case 7u: arg_270_0 = (((this.accountId_ == null) ? 1549696149u : 1451605105u) ^ num * 1687542274u); continue; case 8u: arg_270_0 = (((other.host_ != null) ? 1542009091u : 1485319839u) ^ num * 2859550627u); continue; case 9u: this.clientInfo_ = new ClientInfo(); arg_270_0 = (num * 3829761585u ^ 956329499u); continue; case 11u: arg_270_0 = (((this.host_ == null) ? 256107058u : 1822069155u) ^ num * 3229157225u); continue; case 12u: this.ClientInfo.MergeFrom(other.ClientInfo); arg_270_0 = 1128577518u; continue; case 13u: this.host_ = new ProcessId(); arg_270_0 = (num * 545056616u ^ 888284740u); continue; case 14u: this.Host.MergeFrom(other.Host); arg_270_0 = 1366800945u; continue; case 15u: arg_270_0 = ((other.accountId_ == null) ? 684000152u : 1866179667u); continue; case 16u: arg_270_0 = ((other.gameAccountId_ != null) ? 408680768u : 255607263u); continue; case 17u: arg_270_0 = ((other.Program == 0u) ? 2006580511u : 1012632056u); continue; case 18u: arg_270_0 = (((this.gameAccountId_ == null) ? 2468072218u : 2686286017u) ^ num * 1468632009u); continue; case 19u: this.accountId_ = new EntityId(); arg_270_0 = (num * 3213930627u ^ 2449540484u); continue; case 20u: this.Program = other.Program; arg_270_0 = (num * 3408259938u ^ 3465636411u); continue; case 21u: arg_270_0 = ((other.clientInfo_ == null) ? 1128577518u : 1625663934u); continue; } break; } return; IL_266: arg_270_0 = 1158198131u; goto IL_26B; IL_2D5: this.attribute_.Add(other.attribute_); arg_270_0 = 905424304u; goto IL_26B; } public void MergeFrom(CodedInputStream input) { while (true) { IL_382: uint num; uint arg_2F6_0 = ((num = input.ReadTag()) != 0u) ? 1018420974u : 1145137856u; while (true) { uint num2; switch ((num2 = (arg_2F6_0 ^ 2131153726u)) % 28u) { case 0u: this.Program = input.ReadFixed32(); arg_2F6_0 = 821959432u; continue; case 1u: arg_2F6_0 = ((this.accountId_ == null) ? 573907615u : 912343481u); continue; case 2u: arg_2F6_0 = ((this.clientInfo_ != null) ? 1548277972u : 357212971u); continue; case 3u: arg_2F6_0 = (((num == 26u) ? 1638662321u : 1809965253u) ^ num2 * 3842325770u); continue; case 4u: this.host_ = new ProcessId(); arg_2F6_0 = (num2 * 3663172404u ^ 2316285285u); continue; case 5u: arg_2F6_0 = ((this.gameAccountId_ == null) ? 22664864u : 1380170550u); continue; case 6u: arg_2F6_0 = 1018420974u; continue; case 7u: arg_2F6_0 = ((this.host_ == null) ? 27583998u : 1940712037u); continue; case 8u: arg_2F6_0 = (((num == 45u) ? 2052486402u : 1285907529u) ^ num2 * 3539309320u); continue; case 9u: arg_2F6_0 = (num2 * 400267071u ^ 935075409u); continue; case 10u: this.attribute_.AddEntriesFrom(input, ClientRequest._repeated_attribute_codec); arg_2F6_0 = 1859252069u; continue; case 11u: input.ReadMessage(this.accountId_); arg_2F6_0 = 322599171u; continue; case 12u: input.ReadMessage(this.gameAccountId_); arg_2F6_0 = 821959432u; continue; case 13u: this.clientInfo_ = new ClientInfo(); arg_2F6_0 = (num2 * 2287470232u ^ 3413365420u); continue; case 14u: input.ReadMessage(this.clientInfo_); arg_2F6_0 = 821959432u; continue; case 15u: arg_2F6_0 = (num2 * 3914159248u ^ 2478887992u); continue; case 16u: arg_2F6_0 = (((num == 10u) ? 2765161772u : 3856990977u) ^ num2 * 3494822973u); continue; case 17u: arg_2F6_0 = (num2 * 3589014832u ^ 454100856u); continue; case 18u: this.gameAccountId_ = new EntityId(); arg_2F6_0 = (num2 * 3056105221u ^ 2321823008u); continue; case 19u: arg_2F6_0 = (((num == 18u) ? 2820674274u : 3107429770u) ^ num2 * 2582593593u); continue; case 20u: input.SkipLastField(); arg_2F6_0 = 821959432u; continue; case 21u: arg_2F6_0 = ((num != 34u) ? 1792741310u : 1206418651u); continue; case 22u: goto IL_382; case 23u: arg_2F6_0 = (((num == 50u) ? 2036535309u : 1470539571u) ^ num2 * 4021369079u); continue; case 24u: arg_2F6_0 = ((num <= 26u) ? 782937010u : 1215771699u); continue; case 25u: this.accountId_ = new EntityId(); arg_2F6_0 = (num2 * 3982763252u ^ 2768351437u); continue; case 27u: input.ReadMessage(this.host_); arg_2F6_0 = 821959432u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.Entities/Character.cs using AuthServer.Game.WorldEntities; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.ObjectDefines; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; namespace AuthServer.Game.Entities { [DataContract] [Serializable] public class Character : WorldObject { [DataMember] public uint AccountId; [DataMember] public string Name; [DataMember] public byte Race; [DataMember] public byte Class; [DataMember] public byte Gender; [DataMember] public byte Skin; [DataMember] public byte Face; [DataMember] public byte HairStyle; [DataMember] public byte HairColor; [DataMember] public byte FacialHair; [DataMember] public byte HornStyle; [DataMember] public byte BlindFolds; [DataMember] public byte Tattoos; [DataMember] public byte Level; [DataMember] public uint Zone; [DataMember] public ulong GuildGuid; [DataMember] public uint PetDisplayInfo; [DataMember] public uint PetLevel; [DataMember] public uint PetFamily; [DataMember] public uint CharacterFlags; [DataMember] public uint CustomizeFlags; [DataMember] public bool LoginCinematic; [DataMember] public byte SpecGroupCount; [DataMember] public byte ActiveSpecGroup; [DataMember] public uint PrimarySpec; [DataMember] public uint SecondarySpec; [DataMember] public List<Skill> Skills = new List<Skill>(); [DataMember] public List<PlayerSpell> SpellList = new List<PlayerSpell>(); [DataMember] public Dictionary<byte, Item> Equipment = new Dictionary<byte, Item>(); [DataMember] public Dictionary<byte, Item> Bag = new Dictionary<byte, Item>(); [DataMember] public List<ActionButton> ActionButtons = new List<ActionButton>(); public Dictionary<ulong, WorldObject> InRangeObjects = new Dictionary<ulong, WorldObject>(); public uint Faction; public Character() { } public Character(ulong guid, int updateLength = 4592) : base(updateLength) { foreach (Character current in Manager.WorldMgr.CharaterList) { if (current.Guid == guid) { this.Guid = current.Guid; this.AccountId = 1u; this.Name = current.Name; this.Race = current.Race; this.Class = current.Class; this.Gender = current.Gender; this.Skin = current.Skin; this.Face = current.Face; this.HairStyle = current.HairStyle; this.HairColor = current.HairColor; this.FacialHair = current.FacialHair; this.HornStyle = current.HornStyle; this.BlindFolds = current.BlindFolds; this.Tattoos = current.Tattoos; this.Level = current.Level; this.Zone = current.Zone; this.GuildGuid = current.GuildGuid; this.PetDisplayInfo = current.PetDisplayInfo; this.PetLevel = current.PetLevel; this.PetFamily = current.PetFamily; this.CharacterFlags = current.CharacterFlags; this.CustomizeFlags = current.CustomizeFlags; this.LoginCinematic = current.LoginCinematic; this.SpecGroupCount = current.SpecGroupCount; this.ActiveSpecGroup = current.ActiveSpecGroup; this.PrimarySpec = current.PrimarySpec; this.SecondarySpec = current.SecondarySpec; this.Position = current.Position; this.Map = current.Map; break; } } this.SpellList.Add(new PlayerSpell { SpellId = 130092u, State = PlayerSpellState.New }); this.SpellList.Add(new PlayerSpell { SpellId = 668u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 69046u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 79738u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 669u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 79743u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 9078u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 197130u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 131347u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 176890u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 61451u, State = PlayerSpellState.Unchanged }); if (this.Race != 26 && this.Race != 25) { if (this.Race != 24) { this.Skills.Add(new Skill { Id = 197u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 98u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 109u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 790u, SkillLevel = 0u }); goto IL_47D; } } this.SpellList.Add(new PlayerSpell { SpellId = 905u, State = PlayerSpellState.Unchanged }); this.Skills.Add(new Skill { Id = 905u, SkillLevel = 300u }); this.SpellList.Add(new PlayerSpell { SpellId = 131701u, State = PlayerSpellState.Unchanged }); IL_47D: this.Skills.Add(new Skill { Id = 44u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 45u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 415u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 226u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 173u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 473u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 414u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 54u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 413u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 293u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 229u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 433u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 136u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 43u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 172u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 160u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 55u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 228u, SkillLevel = 300u }); this.SpellList.Add(new PlayerSpell { SpellId = 202782u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 202783u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 195304u, State = PlayerSpellState.Unchanged }); this.SpellList.Add(new PlayerSpell { SpellId = 196055u, State = PlayerSpellState.Unchanged }); this.Skills.Add(new Skill { Id = 1848u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 118u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 2152u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 777u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 769u, SkillLevel = 300u }); this.Skills.Add(new Skill { Id = 762u, SkillLevel = 300u }); } private bool IsHorde() { if (this.Race != 10) { while (true) { IL_118: uint arg_EC_0 = 2175166716u; while (true) { uint num; switch ((num = (arg_EC_0 ^ 3460805711u)) % 8u) { case 0u: goto IL_11F; case 1u: arg_EC_0 = (((this.Race == 26) ? 191491009u : 1217158808u) ^ num * 851128904u); continue; case 2u: arg_EC_0 = (((this.Race != 2) ? 142178198u : 22481873u) ^ num * 1606771516u); continue; case 3u: arg_EC_0 = (((this.Race == 9) ? 919304526u : 945348610u) ^ num * 531538333u); continue; case 4u: arg_EC_0 = (((this.Race != 8) ? 4081393335u : 2637987929u) ^ num * 4021092292u); continue; case 5u: goto IL_118; case 7u: arg_EC_0 = (((this.Race == 6) ? 3970469791u : 2840723181u) ^ num * 2527741994u); continue; } goto Block_7; } } Block_7: return true; IL_11F: return this.Race == 5; } return true; } public override void SetUpdateFields() { SmartGuid smartGuid = new SmartGuid { Type = GuidType.Player, CreationBits = this.Guid, RealmId = 1 }; while (true) { IL_BA6: uint arg_A8C_0 = 3362022498u; while (true) { uint num; uint value; uint arg_2AE_0; switch ((num = (arg_A8C_0 ^ 4145227827u)) % 67u) { case 0u: base.SetUpdateField<byte>(229, this.HairStyle, 2); arg_A8C_0 = (num * 4191529225u ^ 1166677571u); continue; case 1u: { int num2; base.SetUpdateField<uint>(1857 + num2 + 128, 300u, 0); base.SetUpdateField<uint>(1857 + num2 + 192, 1u, 0); arg_A8C_0 = (num * 341253735u ^ 3119224610u); continue; } case 2u: base.SetUpdateField<float>(109, 1337f, 0); arg_A8C_0 = (num * 2663813069u ^ 2946050710u); continue; case 3u: { int num2; base.SetUpdateField<uint>(1857 + num2 + 256, 490u, 0); base.SetUpdateField<uint>(1857 + num2 + 320, 1u, 0); base.SetUpdateField<uint>(1857 + num2 + 384, 1u, 0); arg_A8C_0 = (num * 2943954661u ^ 83118421u); continue; } case 4u: base.SetUpdateField<byte>(231, 0, 3); arg_A8C_0 = (num * 663694352u ^ 1969678795u); continue; case 5u: base.SetUpdateField<byte>(229, this.Skin, 0); arg_A8C_0 = (num * 4001737194u ^ 2492630477u); continue; case 6u: base.SetUpdateField<float>(2324, 0f, 0); arg_A8C_0 = (num * 985080521u ^ 2557173096u); continue; case 7u: base.SetUpdateField<int>(1083, 50, 0); arg_A8C_0 = (num * 3353072118u ^ 1574167544u); continue; case 8u: base.SetUpdateField<float>(204, 100f, 0); arg_A8C_0 = (num * 3907129026u ^ 79563245u); continue; case 9u: base.SetUpdateField<uint>(89, this.Faction, 0); arg_A8C_0 = (num * 2345251588u ^ 2123893132u); continue; case 10u: base.SetUpdateField<float>(117, 1f, 0); arg_A8C_0 = (num * 3198300392u ^ 322716183u); continue; case 11u: base.SetUpdateField<float>(189, 1f, 0); arg_A8C_0 = (num * 3523774928u ^ 1439404063u); continue; case 12u: base.SetUpdateField<uint>(1076, Manager.WorldMgr.DefaultChrSpec[(uint)this.Class], 0); base.SetUpdateField<float>(1078, 1f, 0); arg_A8C_0 = (num * 2240443312u ^ 235484044u); continue; case 13u: base.SetUpdateField<int>(1856, 400, 0); base.SetUpdateField<uint>(107, 0u, 0); arg_A8C_0 = (num * 2674944503u ^ 3928916786u); continue; case 14u: base.SetUpdateField<float>(104, 1.5f, 0); arg_A8C_0 = (num * 634593754u ^ 654435267u); continue; case 15u: base.SetUpdateField<int>(56, 1, 0); arg_A8C_0 = (num * 346485926u ^ 1433689022u); continue; case 16u: { int num2; base.SetUpdateField<uint>(1857 + num2 + 64, 1u, 0); arg_A8C_0 = (num * 2175926644u ^ 2161399249u); continue; } case 18u: base.SetUpdateField<uint>(105, value, 0); base.SetUpdateField<uint>(106, value, 0); arg_A8C_0 = (num * 2650772320u ^ 2264293372u); continue; case 19u: { int num2; base.SetUpdateField<uint>(1857 + num2, this.Skills[num2].Id, 0); arg_A8C_0 = (num * 1075763337u ^ 4126727761u); continue; } case 20u: base.SetUpdateField<int>(8, 65561, 0); base.SetUpdateField<float>(11, 1f, 0); arg_A8C_0 = (num * 1176461958u ^ 2696221759u); continue; case 21u: base.SetUpdateField<float>(1079, 1f, 0); arg_A8C_0 = (num * 1948465944u ^ 2947274196u); continue; case 22u: { Races races = Manager.WorldMgr.ChrRaces.Single((Races r) => r.Id == (uint)this.Race); if (this.Gender != 0) { arg_A8C_0 = (num * 3206551392u ^ 2285065839u); continue; } arg_2AE_0 = races.MaleDisplayId; goto IL_2AE; } case 23u: base.SetUpdateField<int>(129, 1, 0); arg_A8C_0 = (num * 3174050420u ^ 2021044933u); continue; case 24u: base.SetUpdateField<float>(103, 0.389f, 0); arg_A8C_0 = (num * 3433571387u ^ 3881573744u); continue; case 25u: base.SetUpdateField<float>(110, 42f, 0); base.SetUpdateField<float>(111, 42f, 0); arg_A8C_0 = (num * 4210040317u ^ 4279241858u); continue; case 26u: base.SetUpdateField<int>(2305, 0, 0); arg_A8C_0 = (num * 523204179u ^ 1758224075u); continue; case 27u: base.SetUpdateField<int>(133, 0, 0); arg_A8C_0 = (num * 3609259888u ^ 1437850688u); continue; case 28u: arg_A8C_0 = (num * 1646104443u ^ 106033085u); continue; case 29u: base.SetUpdateField<int>(84, (int)this.Level, 0); base.SetUpdateField<int>(2799, 110, 0); arg_A8C_0 = (num * 3785765493u ^ 1513835986u); continue; case 30u: base.SetUpdateField<int>(58, 5000, 0); base.SetUpdateField<int>(66, 5000, 0); arg_A8C_0 = (num * 4254594651u ^ 4171747618u); continue; case 31u: base.SetUpdateField<uint>(1075, 1u, 0); base.SetUpdateField<int>(2671, 2, 0); base.SetUpdateField<int>(100, 2000, 0); base.SetUpdateField<int>(102, 2000, 0); arg_A8C_0 = (num * 3804769601u ^ 520110499u); continue; case 32u: base.SetUpdateField<float>(1080, 1f, 0); arg_A8C_0 = (num * 4078682135u ^ 2875606574u); continue; case 33u: base.SetUpdateField<byte>(229, this.Face, 1); arg_A8C_0 = (num * 2559775110u ^ 2078298877u); continue; case 34u: base.SetUpdateField<int>(117, 42, 0); arg_A8C_0 = (num * 1260314422u ^ 1565665195u); continue; case 35u: base.SetUpdateField<ulong>(0, smartGuid.Guid, 0); base.SetUpdateField<ulong>(2, smartGuid.HighGuid, 0); arg_A8C_0 = (num * 2433167489u ^ 2816061565u); continue; case 36u: base.SetUpdateField<int>(2306, 21, 0); base.SetUpdateField<int>(99, 4194304, 0); arg_A8C_0 = (num * 100814028u ^ 3072653526u); continue; case 37u: base.SetUpdateField<uint>(112, 65536u, 0); arg_A8C_0 = (num * 62540501u ^ 646882076u); continue; case 38u: base.SetUpdateField<byte>(53, this.Class, 1); base.SetUpdateField<byte>(53, 0, 2); base.SetUpdateField<byte>(53, this.Gender, 3); base.SetUpdateField<uint>(54, Manager.WorldMgr.DefaultPowerTypes[(uint)this.Class], 0); arg_A8C_0 = (num * 964918507u ^ 3151098252u); continue; case 39u: base.SetUpdateField<int>(2653, 2, 0); base.SetUpdateField<int>(232, 0, 0); arg_A8C_0 = (num * 2130652486u ^ 2037663857u); continue; case 40u: base.SetUpdateField<int>(128, 1, 0); arg_A8C_0 = (num * 1328463574u ^ 1183088005u); continue; case 41u: base.SetUpdateField<float>(2325, 7f, 0); arg_A8C_0 = (num * 1986332979u ^ 3633177268u); continue; case 42u: base.SetUpdateField<int>(64, 1, 0); this.Faction = Manager.WorldMgr.ChrRaces.Single((Races r) => r.Id == (uint)this.Race).Faction; arg_A8C_0 = (num * 506256744u ^ 1017043020u); continue; case 43u: base.SetUpdateField<int>(1084, 50, 0); arg_A8C_0 = (num * 2196478767u ^ 4068802405u); continue; case 44u: base.SetUpdateField<int>(207, -1, 0); base.SetUpdateField<int>(230, (int)this.FacialHair << 24 | (int)this.Tattoos << 16 | (int)this.BlindFolds << 8 | (int)this.HornStyle, 0); base.SetUpdateField<uint>(1073, 315u, 0); arg_A8C_0 = (num * 401854400u ^ 421126737u); continue; case 45u: base.SetUpdateField<int>(2531, 2147483647, 0); arg_A8C_0 = (num * 3035220601u ^ 2964939857u); continue; case 46u: base.SetUpdateField<int>(4591, 350, 0); arg_A8C_0 = (num * 4154855600u ^ 571652020u); continue; case 47u: { Races races; arg_2AE_0 = races.FemaleDisplayId; goto IL_2AE; } case 48u: base.SetUpdateField<uint>(96, 8u, 0); arg_A8C_0 = (num * 565745881u ^ 1871953938u); continue; case 49u: { int num2; arg_A8C_0 = ((num2 >= this.Skills.Count) ? 2606039594u : 3681206070u); continue; } case 50u: base.SetUpdateField<byte>(229, this.HairColor, 3); arg_A8C_0 = (num * 3816078619u ^ 932202503u); continue; case 51u: { int num2; arg_A8C_0 = ((num2 >= 64) ? 4266884691u : 2608069202u); continue; } case 52u: base.SetUpdateField<byte>(53, this.Race, 0); arg_A8C_0 = (num * 2478557743u ^ 1006291970u); continue; case 53u: goto IL_BA6; case 54u: base.SetUpdateField<float>(108, 1337f, 0); arg_A8C_0 = (num * 1672153762u ^ 3359117251u); continue; case 55u: base.SetUpdateField<int>(1855, 0, 0); base.SetUpdateField<int>(2694, 8, 0); arg_A8C_0 = (num * 2837554239u ^ 2404694369u); continue; case 56u: base.SetUpdateField<uint>(190, 1u, 0); arg_A8C_0 = (num * 4197942694u ^ 3210995054u); continue; case 57u: base.SetUpdateField<int>(127, 1, 0); arg_A8C_0 = (num * 1736485825u ^ 1356110532u); continue; case 58u: { int num2; num2++; arg_A8C_0 = 3263568798u; continue; } case 59u: base.SetUpdateField<int>(130, 1, 0); base.SetUpdateField<int>(132, 0, 0); arg_A8C_0 = (num * 3127260296u ^ 4244907525u); continue; case 60u: base.SetUpdateField<int>(139, 1, 0); base.SetUpdateField<int>(164, 1, 0); arg_A8C_0 = (num * 1408997502u ^ 3556141945u); continue; case 61u: base.SetUpdateField<byte>(231, this.Gender, 2); arg_A8C_0 = (num * 2417106500u ^ 3665189629u); continue; case 62u: base.SetUpdateField<int>(2724, -1, 0); arg_A8C_0 = (num * 4016402819u ^ 819527604u); continue; case 63u: { base.SetUpdateField<int>(59, 100, 0); base.SetUpdateField<int>(60, 1000, 0); int num2 = 0; arg_A8C_0 = (num * 101977690u ^ 476485388u); continue; } case 64u: base.SetUpdateField<byte>(231, 0, 0); base.SetUpdateField<byte>(231, 0, 1); arg_A8C_0 = (num * 3736737872u ^ 1786945540u); continue; case 65u: base.SetUpdateField<uint>(97, 2048u, 0); arg_A8C_0 = (num * 255146829u ^ 2316109280u); continue; case 66u: base.SetUpdateField<int>(2310, 7, 0); arg_A8C_0 = (num * 3510051898u ^ 2912203465u); continue; } goto Block_4; IL_2AE: value = arg_2AE_0; arg_A8C_0 = 2935423918u; } } Block_4: base.SetUpdateField<float>(1081, 1f, 0); base.SetUpdateField<uint>(2695, 3840u, 0); } public static string NormalizeName(string name) { return Character.smethod_15(name, 0).ToString().ToUpper() + name.Remove(0, 1).ToLower(); } static char smethod_15(string string_0, int int_0) { return string_0[int_0]; } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/MiscHandler.cs using AuthServer.Game.Entities; using AuthServer.Game.PacketHandler; using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Network.Packets; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; namespace AuthServer.Game.Packets.PacketHandler { public class MiscHandler : Manager { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MiscHandler.__c __9 = new MiscHandler.__c(); public static Func<ActionButton, ActionButton> __9__8_1; public static Func<ActionButton, ulong> __9__9_2; internal ActionButton <HandleSetActionButton>b__8_1(ActionButton button) { return button; } internal ulong <HandleUpdateActionButtons>b__9_2(ActionButton action) { return action.Action; } } public static void HandleMessageOfTheDay(ref WorldClass session) { BitPack BitPack; PacketWriter motd; while (true) { IL_11C: uint arg_100_0 = 2532151388u; while (true) { uint num; switch ((num = (arg_100_0 ^ 4222714851u)) % 4u) { case 0u: goto IL_11C; case 1u: { BitPack = new BitPack(motd, 0uL, 0uL, 0uL, 0uL); List<string> expr_68 = new List<string>(); expr_68.Add(Module.smethod_36<string>(267012313u)); expr_68.Add(Module.smethod_36<string>(2985461224u)); expr_68.Add(Module.smethod_35<string>(1897341651u)); expr_68.Add(Module.smethod_36<string>(542737628u)); expr_68.Add(Module.smethod_35<string>(750099086u)); BitPack.Write<uint>(5u, 4); BitPack.Flush(); expr_68.ForEach(delegate(string m) { BitPack.Write<int>(MiscHandler.__c__DisplayClass0_0.smethod_1(MiscHandler.__c__DisplayClass0_0.smethod_0(), m).Length, 7); BitPack.Flush(); motd.WriteString(m, true); }); session.Send(ref motd); arg_100_0 = (num * 4223574615u ^ 1369034726u); continue; } case 3u: motd = new PacketWriter(ServerMessage.MOTD, true); arg_100_0 = (num * 988909312u ^ 3628506202u); continue; } return; } } } [Opcode(ClientMessage.Ping, "17930")] public static void HandlePong(ref PacketReader packet, WorldClass session) { uint data = packet.Read<uint>(); packet.Read<uint>(); while (true) { IL_4D: uint arg_35_0 = 1104434895u; while (true) { uint num; switch ((num = (arg_35_0 ^ 1516962984u)) % 3u) { case 0u: goto IL_4D; case 1u: new PacketWriter(ServerMessage.Pong, true).WriteUInt32(data); arg_35_0 = (num * 1473635169u ^ 3334520623u); continue; } return; } } } [Opcode(ClientMessage.LogDisconnect, "17930")] public static void HandleDisconnectReason(ref PacketReader packet, WorldClass session) { Character character = session.Character; while (true) { IL_DB: uint arg_B7_0 = 154570481u; while (true) { uint num; switch ((num = (arg_B7_0 ^ 1197683504u)) % 6u) { case 0u: { CharacterHandler.chatRunning = false; uint num2; Log.Message(LogType.Debug, Module.smethod_35<string>(484298775u), new object[] { (session.Account != null) ? session.Account.Id : -1, num2 }); arg_B7_0 = 1267271075u; continue; } case 1u: arg_B7_0 = (((character == null) ? 2990011730u : 3260705302u) ^ num * 3241964330u); continue; case 2u: Manager.WorldMgr.DeleteSession(character.Guid); arg_B7_0 = (num * 529485196u ^ 2508084816u); continue; case 4u: goto IL_DB; case 5u: { uint num2 = packet.Read<uint>(); arg_B7_0 = (num * 963827472u ^ 1761491573u); continue; } } return; } } } public static void HandleCacheVersion(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.CacheVersion, true); while (true) { IL_48: uint arg_30_0 = 575565698u; while (true) { uint num; switch ((num = (arg_30_0 ^ 945065969u)) % 3u) { case 0u: goto IL_48; case 1u: packetWriter.WriteUInt32(0u); session.Send(ref packetWriter); arg_30_0 = (num * 2866656945u ^ 272808339u); continue; } return; } } } [Opcode(ClientMessage.LoadingScreenNotify, "17930")] public static void HandleLoadingScreenNotify(ref PacketReader packet, WorldClass session) { } [Opcode(ClientMessage.ViolenceLevel, "17930")] public static void HandleViolenceLevel(ref PacketReader packet, WorldClass session) { byte b = packet.Read<byte>(); Log.Message(LogType.Debug, Module.smethod_34<string>(473366427u), new object[] { session.Account.Name, session.Account.Id, (ViolenceLevel)b }); } [Opcode(ClientMessage.ChatMessageYell, "17930")] public static void HandleActivePlayer(ref PacketReader packet, WorldClass session) { packet.Read<byte>(); Log.Message(LogType.Debug, Module.smethod_35<string>(1351781362u), new object[] { session.Character.Name, session.Character.Guid }); } [Opcode2(ClientMessage.CliSetSelection, "17930")] public static void HandleSetSelection(ref PacketReader packet, WorldClass2 session) { ulong num = packet.ReadSmartGuid(); ulong num2 = num; if (session.Character != null) { while (true) { IL_102: uint arg_D6_0 = 3744153441u; while (true) { uint num3; switch ((num3 = (arg_D6_0 ^ 2889169456u)) % 8u) { case 0u: goto IL_109; case 1u: { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_D6_0 = (num3 * 2616728126u ^ 4099375192u); continue; } case 2u: goto IL_102; case 4u: { WorldClass session2; session2.Character.TargetGuid = num; arg_D6_0 = (num3 * 177931843u ^ 3339308577u); continue; } case 5u: arg_D6_0 = ((num2 == 0uL) ? 2175149112u : 3071540255u); continue; case 6u: { WorldClass session2; arg_D6_0 = (((session2 != null) ? 3933082510u : 3865277495u) ^ num3 * 2745653647u); continue; } case 7u: Log.Message(LogType.Debug, Module.smethod_34<string>(3202474686u), new object[] { session.Character.Guid, num2 }); arg_D6_0 = 3481464427u; continue; } goto Block_4; } } Block_4: return; IL_109: Log.Message(LogType.Debug, Module.smethod_35<string>(3044584216u), new object[] { session.Character.Guid }); return; } } [Opcode(ClientMessage.SetActionButton, "17930")] public static void HandleSetActionButton(ref PacketReader packet, WorldClass session) { byte slotId; Character pChar; while (true) { IL_1F8: uint arg_1C2_0 = 3416576573u; while (true) { uint num; switch ((num = (arg_1C2_0 ^ 2720966948u)) % 10u) { case 0u: { IEnumerable<ActionButton> arg_1AD_0 = from button in pChar.ActionButtons where button.SlotId == slotId && button.SpecGroup == pChar.ActiveSpecGroup select button; Func<ActionButton, ActionButton> arg_1AD_1; if ((arg_1AD_1 = MiscHandler.__c.__9__8_1) == null) { arg_1AD_1 = (MiscHandler.__c.__9__8_1 = new Func<ActionButton, ActionButton>(MiscHandler.__c.__9.<HandleSetActionButton>b__8_1)); } ActionButton actionButton = arg_1AD_0.Select(arg_1AD_1).First<ActionButton>(); arg_1C2_0 = 2264271340u; continue; } case 1u: { pChar = session.Character; ulong num2 = MiscHandler.smethod_0(packet); slotId = packet.Read<byte>(); arg_1C2_0 = (num * 2927243228u ^ 704355889u); continue; } case 2u: { ActionButton actionButton; Manager.ActionMgr.RemoveActionButton(pChar, actionButton, true); arg_1C2_0 = (num * 3148430814u ^ 1163004694u); continue; } case 3u: { ulong num2; arg_1C2_0 = (((num2 == 0uL) ? 3729634153u : 2755760364u) ^ num * 1363198925u); continue; } case 4u: { ulong num2; Log.Message(LogType.Debug, Module.smethod_34<string>(3296211298u), new object[] { pChar.Guid, num2, slotId }); arg_1C2_0 = (num * 674155338u ^ 2319681788u); continue; } case 5u: { ulong num2; ActionButton actionButton2 = new ActionButton { Action = num2, SlotId = slotId, SpecGroup = pChar.ActiveSpecGroup }; arg_1C2_0 = 3937332115u; continue; } case 6u: return; case 8u: goto IL_1F8; case 9u: { ActionButton actionButton2; Manager.ActionMgr.AddActionButton(pChar, actionButton2, true); ulong num2; Log.Message(LogType.Debug, Module.smethod_35<string>(288580118u), new object[] { pChar.Guid, num2, slotId }); arg_1C2_0 = (num * 1057463084u ^ 755692747u); continue; } } goto Block_3; } } Block_3:; } public static void HandleUpdateActionButtons(ref WorldClass session) { Character character = session.Character; while (true) { IL_27B: uint arg_225_0 = 127831531u; while (true) { uint num; switch ((num = (arg_225_0 ^ 338001762u)) % 18u) { case 0u: goto IL_27B; case 1u: { List<ActionButton> actionButtons = Manager.ActionMgr.GetActionButtons(character, character.ActiveSpecGroup); arg_225_0 = (num * 576267386u ^ 3161605306u); continue; } case 2u: { int num2 = 0; arg_225_0 = (num * 3320335652u ^ 2935521973u); continue; } case 3u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.UpdateActionButtons, true); byte[][] array = new byte[132][]; arg_225_0 = (num * 1697180382u ^ 3540906221u); continue; } case 4u: arg_225_0 = (num * 3445858557u ^ 1768122451u); continue; case 5u: { int num2; arg_225_0 = ((num2 < 132) ? 723471770u : 669238764u); continue; } case 6u: { int j; __c__DisplayClass9_.i = j + 1; arg_225_0 = (num * 4243037527u ^ 1089304061u); continue; } case 8u: { int num2; PacketWriter packetWriter; byte[][] array; packetWriter.WriteBytes(array[num2], 0); num2++; arg_225_0 = 538466035u; continue; } case 9u: arg_225_0 = ((__c__DisplayClass9_.i >= 132) ? 962183052u : 1222740348u); continue; case 10u: { PacketWriter packetWriter; packetWriter.WriteInt8(0); arg_225_0 = (num * 3472248785u ^ 461839786u); continue; } case 11u: arg_225_0 = (num * 3217738793u ^ 4077141236u); continue; case 12u: { List<ActionButton> actionButtons; arg_225_0 = (actionButtons.Any((ActionButton action) => (int)action.SlotId == __c__DisplayClass9_.i) ? 83130917u : 1891720325u); continue; } case 13u: { byte[][] array; byte[][] arg_BD_0 = array; int arg_BD_1 = __c__DisplayClass9_.i; List<ActionButton> actionButtons; IEnumerable<ActionButton> arg_AE_0 = from action in actionButtons where (int)action.SlotId == __c__DisplayClass9_.i select action; Func<ActionButton, ulong> arg_AE_1; if ((arg_AE_1 = MiscHandler.__c.__9__9_2) == null) { arg_AE_1 = (MiscHandler.__c.__9__9_2 = new Func<ActionButton, ulong>(MiscHandler.__c.__9.<HandleUpdateActionButtons>b__9_2)); } arg_BD_0[arg_BD_1] = MiscHandler.smethod_1(arg_AE_0.Select(arg_AE_1).First<ulong>()); arg_225_0 = 225251452u; continue; } case 14u: __c__DisplayClass9_.i = 0; arg_225_0 = (num * 487897016u ^ 1426422671u); continue; case 15u: { byte[][] array; array[__c__DisplayClass9_.i] = new byte[8]; arg_225_0 = 700578037u; continue; } case 16u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_225_0 = (num * 4100072258u ^ 2656812529u); continue; } case 17u: { int j = __c__DisplayClass9_.i; arg_225_0 = 549749676u; continue; } } return; } } } static ulong smethod_0(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt64(); } static byte[] smethod_1(ulong ulong_0) { return BitConverter.GetBytes(ulong_0); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/Waypoint.cs using Framework.ObjectDefines; using System; namespace AuthServer.WorldServer.Game.Entities { public class Waypoint { public ulong CreatureGuid { get; set; } public Vector4 Point { get; set; } public int Index { get; set; } public int WaitTime { get; set; } } } <file_sep>/Google.Protobuf/JsonTokenizer.cs using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; namespace Google.Protobuf { internal abstract class JsonTokenizer { private class JsonReplayTokenizer : JsonTokenizer { private readonly IList<JsonToken> tokens; private readonly JsonTokenizer nextTokenizer; private int nextTokenIndex; internal JsonReplayTokenizer(IList<JsonToken> tokens, JsonTokenizer nextTokenizer) { this.tokens = tokens; this.nextTokenizer = nextTokenizer; } protected override JsonToken NextImpl() { if (this.nextTokenIndex >= this.tokens.Count) { return this.nextTokenizer.Next(); } IList<JsonToken> arg_36_0 = this.tokens; int num = this.nextTokenIndex; this.nextTokenIndex = num + 1; return arg_36_0[num]; } } private sealed class JsonTextTokenizer : JsonTokenizer { private enum ContainerType { Document, Object, Array } [Flags] private enum State { StartOfDocument = 1, ExpectedEndOfDocument = 2, ReaderExhausted = 4, ObjectStart = 8, ObjectBeforeColon = 16, ObjectAfterColon = 32, ObjectAfterProperty = 64, ObjectAfterComma = 128, ArrayStart = 256, ArrayAfterValue = 512, ArrayAfterComma = 1024 } private class PushBackReader { private readonly TextReader reader; private char? nextChar; internal PushBackReader(TextReader reader) { this.reader = reader; } internal char? Read() { if (this.nextChar.HasValue) { goto IL_34; } goto IL_62; uint arg_3E_0; int num2; while (true) { IL_39: uint num; switch ((num = (arg_3E_0 ^ 54458132u)) % 6u) { case 0u: goto IL_75; case 2u: goto IL_34; case 3u: arg_3E_0 = (((num2 == -1) ? 3551026886u : 3152099965u) ^ num * 365943735u); continue; case 4u: goto IL_62; case 5u: goto IL_87; } break; } goto IL_7D; IL_75: return new char?((char)num2); IL_7D: return null; IL_87: char? arg_99_0 = this.nextChar; this.nextChar = null; return arg_99_0; IL_34: arg_3E_0 = 659434097u; goto IL_39; IL_62: num2 = JsonTokenizer.JsonTextTokenizer.PushBackReader.smethod_0(this.reader); arg_3E_0 = 412973525u; goto IL_39; } internal char ReadOrFail(string messageOnFailure) { char? c = this.Read(); while (true) { IL_52: uint arg_36_0 = 2901153560u; while (true) { uint num; switch ((num = (arg_36_0 ^ 2903223402u)) % 4u) { case 1u: goto IL_59; case 2u: arg_36_0 = (((!c.HasValue) ? 1849441321u : 154677480u) ^ num * 4107666269u); continue; case 3u: goto IL_52; } goto Block_2; } } Block_2: goto IL_61; IL_59: throw this.CreateException(messageOnFailure); IL_61: return c.Value; } internal void PushBack(char c) { if (this.nextChar.HasValue) { throw JsonTokenizer.JsonTextTokenizer.PushBackReader.smethod_1(Module.smethod_34<string>(1813605522u)); } this.nextChar = new char?(c); } internal InvalidJsonException CreateException(string message) { return new InvalidJsonException(message); } static int smethod_0(TextReader textReader_0) { return textReader_0.Read(); } static InvalidOperationException smethod_1(string string_0) { return new InvalidOperationException(string_0); } } private static readonly JsonTokenizer.JsonTextTokenizer.State ValueStates = JsonTokenizer.JsonTextTokenizer.State.StartOfDocument | JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon | JsonTokenizer.JsonTextTokenizer.State.ArrayStart | JsonTokenizer.JsonTextTokenizer.State.ArrayAfterComma; private readonly Stack<JsonTokenizer.JsonTextTokenizer.ContainerType> containerStack = new Stack<JsonTokenizer.JsonTextTokenizer.ContainerType>(); private readonly JsonTokenizer.JsonTextTokenizer.PushBackReader reader; private JsonTokenizer.JsonTextTokenizer.State state; internal JsonTextTokenizer(TextReader reader) { this.reader = new JsonTokenizer.JsonTextTokenizer.PushBackReader(reader); this.state = JsonTokenizer.JsonTextTokenizer.State.StartOfDocument; this.containerStack.Push(JsonTokenizer.JsonTextTokenizer.ContainerType.Document); } protected override JsonToken NextImpl() { if (this.state == JsonTokenizer.JsonTextTokenizer.State.ReaderExhausted) { goto IL_2D4; } goto IL_58F; uint arg_4BB_0; char? c; char value; string text; while (true) { IL_4B6: uint num; switch ((num = (arg_4BB_0 ^ 4104288529u)) % 49u) { case 0u: arg_4BB_0 = ((((this.state & (JsonTokenizer.JsonTextTokenizer.State.ObjectStart | JsonTokenizer.JsonTextTokenizer.State.ObjectAfterComma)) != (JsonTokenizer.JsonTextTokenizer.State)0) ? 4189633668u : 4074212105u) ^ num * 613776407u); continue; case 1u: arg_4BB_0 = (num * 1780515259u ^ 1079949964u); continue; case 2u: this.ConsumeLiteral(Module.smethod_33<string>(2183097496u)); arg_4BB_0 = 3354073184u; continue; case 3u: goto IL_5A5; case 4u: goto IL_1E1; case 5u: value = c.Value; arg_4BB_0 = ((value <= ']') ? 2713967851u : 4194276540u); continue; case 6u: goto IL_1F2; case 7u: this.containerStack.Push(JsonTokenizer.JsonTextTokenizer.ContainerType.Array); arg_4BB_0 = (num * 3569194665u ^ 4042399453u); continue; case 8u: this.state = ((this.state == JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty) ? JsonTokenizer.JsonTextTokenizer.State.ObjectAfterComma : JsonTokenizer.JsonTextTokenizer.State.ArrayAfterComma); arg_4BB_0 = 3256357922u; continue; case 9u: this.state = JsonTokenizer.JsonTextTokenizer.State.ArrayStart; arg_4BB_0 = (num * 1565805873u ^ 2991989195u); continue; case 10u: arg_4BB_0 = (((value == 'f') ? 16608841u : 1831065471u) ^ num * 3882616260u); continue; case 11u: this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ExpectedEndOfDocument, Module.smethod_37<string>(696784657u)); arg_4BB_0 = (num * 3238566415u ^ 1787036935u); continue; case 12u: goto IL_5FF; case 13u: goto IL_5AB; case 14u: arg_4BB_0 = ((value != '[') ? 2651008389u : 2849759416u); continue; case 15u: goto IL_5B7; case 16u: goto IL_5C9; case 17u: arg_4BB_0 = ((c.HasValue ? 601949170u : 2073706518u) ^ num * 45218448u); continue; case 18u: arg_4BB_0 = (num * 31089536u ^ 1655698913u); continue; case 19u: this.ValidateAndModifyStateForValue(Module.smethod_36<string>(2697853881u)); arg_4BB_0 = 2165679561u; continue; case 20u: arg_4BB_0 = (num * 3218023307u ^ 518270700u); continue; case 21u: arg_4BB_0 = (((value != 'n') ? 4277936919u : 2351134377u) ^ num * 2118258224u); continue; case 22u: goto IL_211; case 23u: goto IL_2D4; case 24u: switch (value) { case '\t': case '\n': case '\r': goto IL_58F; case '\v': case '\f': break; default: arg_4BB_0 = (num * 3323278026u ^ 3691783999u); continue; } break; case 25u: arg_4BB_0 = ((value <= 'n') ? 4128490372u : 2255017729u); continue; case 26u: goto IL_5EF; case 27u: arg_4BB_0 = (((value <= ':') ? 1654060446u : 498475676u) ^ num * 2385843212u); continue; case 28u: this.ValidateState(JsonTokenizer.JsonTextTokenizer.ValueStates, Module.smethod_33<string>(3038277013u)); this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectStart; arg_4BB_0 = 4204753262u; continue; case 29u: switch (value) { case ' ': goto IL_58F; case '!': case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case '.': case '/': break; case '"': goto IL_1E1; case ',': goto IL_1F2; case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': goto IL_5FF; case ':': goto IL_211; default: arg_4BB_0 = (num * 2264991434u ^ 3481491539u); continue; } break; case 31u: arg_4BB_0 = (num * 3672174545u ^ 1262540738u); continue; case 32u: this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ObjectStart | JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty, Module.smethod_35<string>(729339763u)); arg_4BB_0 = 3646157473u; continue; case 33u: this.ValidateAndModifyStateForValue(Module.smethod_35<string>(3051744227u)); arg_4BB_0 = (num * 1242424546u ^ 2253991453u); continue; case 34u: goto IL_646; case 35u: goto IL_65C; case 36u: arg_4BB_0 = (num * 1156292080u ^ 354682250u); continue; case 37u: arg_4BB_0 = (((value == ']') ? 2126881218u : 210840875u) ^ num * 3486021890u); continue; case 38u: this.ValidateState(JsonTokenizer.JsonTextTokenizer.ValueStates, Module.smethod_33<string>(264414547u)); arg_4BB_0 = 3155664105u; continue; case 39u: goto IL_662; case 40u: arg_4BB_0 = ((value == 't') ? 3451957491u : 2391816909u); continue; case 41u: arg_4BB_0 = (((value == '}') ? 2696882427u : 4041481864u) ^ num * 4174514279u); continue; case 42u: goto IL_58F; case 43u: arg_4BB_0 = (num * 1137712071u ^ 1249477728u); continue; case 44u: goto IL_669; case 45u: arg_4BB_0 = (((value != '{') ? 9585384u : 2028305637u) ^ num * 3718391630u); continue; case 46u: goto IL_68A; case 47u: goto IL_697; case 48u: this.ConsumeLiteral(Module.smethod_34<string>(854952751u)); arg_4BB_0 = 4008116300u; continue; } break; IL_1E1: text = this.ReadString(); arg_4BB_0 = 3240433145u; continue; IL_1F2: this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty | JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue, Module.smethod_37<string>(3384786388u)); arg_4BB_0 = 2838028240u; continue; IL_211: this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ObjectBeforeColon, Module.smethod_34<string>(422879019u)); this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon; arg_4BB_0 = 4019477044u; } goto IL_622; IL_5A5: return JsonToken.True; IL_5AB: this.PopContainer(); return JsonToken.EndObject; IL_5B7: this.containerStack.Push(JsonTokenizer.JsonTextTokenizer.ContainerType.Object); return JsonToken.StartObject; IL_5C9: this.ConsumeLiteral(Module.smethod_34<string>(1042425975u)); this.ValidateAndModifyStateForValue(Module.smethod_35<string>(4226906126u)); return JsonToken.False; IL_5EF: throw JsonTokenizer.JsonTextTokenizer.smethod_1(Module.smethod_34<string>(1238845160u)); IL_5FF: double arg_61C_0 = this.ReadNumber(c.Value); this.ValidateAndModifyStateForValue(Module.smethod_33<string>(3249020366u)); return JsonToken.Value(arg_61C_0); IL_622: string arg_63B_0 = Module.smethod_36<string>(78504656u); value = c.Value; throw new InvalidJsonException(arg_63B_0 + value.ToString()); IL_646: this.ValidateAndModifyStateForValue(Module.smethod_36<string>(3099968612u)); return JsonToken.Null; IL_65C: return JsonToken.StartArray; IL_662: return JsonToken.Value(text); IL_669: this.ValidateState(JsonTokenizer.JsonTextTokenizer.State.ArrayStart | JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue, Module.smethod_34<string>(4127763276u)); this.PopContainer(); return JsonToken.EndArray; IL_68A: this.state = JsonTokenizer.JsonTextTokenizer.State.ReaderExhausted; return JsonToken.EndDocument; IL_697: this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectBeforeColon; return JsonToken.Name(text); IL_2D4: arg_4BB_0 = 2572704042u; goto IL_4B6; IL_58F: c = this.reader.Read(); arg_4BB_0 = 2432965824u; goto IL_4B6; } private void ValidateState(JsonTokenizer.JsonTextTokenizer.State validStates, string errorPrefix) { if ((validStates & this.state) == (JsonTokenizer.JsonTextTokenizer.State)0) { throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_2(errorPrefix, this.state)); } } private string ReadString() { StringBuilder stringBuilder = JsonTokenizer.JsonTextTokenizer.smethod_3(); char c; while (true) { IL_15A: uint arg_112_0 = 3620687331u; while (true) { uint num; bool flag; switch ((num = (arg_112_0 ^ 4272740808u)) % 14u) { case 0u: goto IL_161; case 1u: break; case 2u: c = this.ReadEscapedCharacter(); arg_112_0 = (num * 2725289111u ^ 1120742850u); continue; case 3u: goto IL_1BC; case 4u: arg_112_0 = ((flag == char.IsLowSurrogate(c)) ? 3003995817u : 2588340739u); continue; case 5u: goto IL_177; case 6u: goto IL_15A; case 7u: arg_112_0 = ((flag ? 107009173u : 777590446u) ^ num * 2996127681u); continue; case 8u: arg_112_0 = ((c != '"') ? 2558513376u : 3518886843u); continue; case 9u: arg_112_0 = (((c >= ' ') ? 1341174011u : 1546045331u) ^ num * 3828862361u); continue; case 10u: goto IL_18D; case 11u: goto IL_40; case 12u: arg_112_0 = ((c == '\\') ? 2622634104u : 2417193746u); continue; case 13u: flag = false; arg_112_0 = (num * 2648914611u ^ 3534606762u); continue; default: goto IL_40; } IL_4F: c = this.reader.ReadOrFail(Module.smethod_36<string>(2665913342u)); arg_112_0 = 2904473537u; continue; IL_40: flag = char.IsHighSurrogate(c); JsonTokenizer.JsonTextTokenizer.smethod_7(stringBuilder, c); goto IL_4F; } } IL_161: throw this.reader.CreateException(Module.smethod_36<string>(1175382367u)); IL_177: throw this.reader.CreateException(Module.smethod_34<string>(1971821200u)); IL_18D: throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_5(JsonTokenizer.JsonTextTokenizer.smethod_4(), Module.smethod_36<string>(420016378u), new object[] { (int)c })); IL_1BC: return JsonTokenizer.JsonTextTokenizer.smethod_6(stringBuilder); } private char ReadEscapedCharacter() { char c = this.reader.ReadOrFail(Module.smethod_34<string>(3162733789u)); while (true) { IL_211: uint arg_1A8_0 = 3062335140u; while (true) { uint num; switch ((num = (arg_1A8_0 ^ 4079434994u)) % 23u) { case 0u: goto IL_211; case 1u: arg_1A8_0 = ((c > 'f') ? 2722377798u : 2643363571u); continue; case 2u: return '\n'; case 3u: arg_1A8_0 = (((c != '"') ? 2765306433u : 2240310335u) ^ num * 2674925868u); continue; case 4u: return '\t'; case 5u: arg_1A8_0 = ((c != 'n') ? 3467003307u : 3305353407u); continue; case 6u: return '/'; case 7u: arg_1A8_0 = (num * 3982733363u ^ 1979839306u); continue; case 8u: return '\\'; case 9u: arg_1A8_0 = (((c != '\\') ? 3548623818u : 3165263482u) ^ num * 3790190069u); continue; case 10u: arg_1A8_0 = (num * 1462205459u ^ 3808141827u); continue; case 11u: return '\b'; case 12u: return '\r'; case 13u: arg_1A8_0 = (((c != 'b') ? 778816751u : 577794695u) ^ num * 2347313433u); continue; case 14u: arg_1A8_0 = (((c > '\\') ? 3974670883u : 2172466138u) ^ num * 2507694954u); continue; case 15u: arg_1A8_0 = (num * 967588637u ^ 1015961980u); continue; case 16u: return '"'; case 17u: switch (c) { case 'r': return '\r'; case 's': break; case 't': return '\t'; case 'u': goto IL_25E; default: arg_1A8_0 = (num * 1675692336u ^ 3977989151u); continue; } break; case 18u: arg_1A8_0 = (((c != 'f') ? 739719556u : 208991868u) ^ num * 1787573665u); continue; case 19u: return '\f'; case 20u: arg_1A8_0 = (((c != '/') ? 3155057367u : 2833038793u) ^ num * 3475288260u); continue; case 21u: goto IL_25E; } goto Block_10; } } Block_10: throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_5(JsonTokenizer.JsonTextTokenizer.smethod_4(), Module.smethod_36<string>(1720276859u), new object[] { (int)c })); IL_25E: return this.ReadUnicodeEscape(); } private char ReadUnicodeEscape() { int num = 0; int num2 = 0; char c; while (true) { IL_1FE: uint arg_1AC_0 = 2653937280u; while (true) { uint num3; switch ((num3 = (arg_1AC_0 ^ 4233377929u)) % 17u) { case 0u: { int num4 = (int)(c - 'A' + '\n'); arg_1AC_0 = (num3 * 508779129u ^ 2702182616u); continue; } case 1u: arg_1AC_0 = (num3 * 2609668024u ^ 2787699904u); continue; case 2u: goto IL_1FE; case 3u: arg_1AC_0 = ((c < 'A') ? 3942694087u : 2573427630u); continue; case 4u: { int num4; num = (num << 4) + num4; num2++; arg_1AC_0 = 2776515000u; continue; } case 5u: { int num4 = (int)(c - '0'); arg_1AC_0 = (num3 * 2963008298u ^ 2633543671u); continue; } case 6u: arg_1AC_0 = (((c <= 'f') ? 2168919537u : 4260011693u) ^ num3 * 145883296u); continue; case 8u: arg_1AC_0 = (num3 * 361108721u ^ 2287302452u); continue; case 9u: arg_1AC_0 = (((c > '9') ? 3439603900u : 4211219570u) ^ num3 * 2833537411u); continue; case 10u: { int num4 = (int)(c - 'a' + '\n'); arg_1AC_0 = (num3 * 1070551868u ^ 1248349112u); continue; } case 11u: goto IL_205; case 12u: arg_1AC_0 = ((num2 < 4) ? 3092110384u : 2742418676u); continue; case 13u: c = this.reader.ReadOrFail(Module.smethod_33<string>(3103850383u)); arg_1AC_0 = 2564271999u; continue; case 14u: arg_1AC_0 = (((c > 'F') ? 2960974476u : 3337493250u) ^ num3 * 1618405949u); continue; case 15u: arg_1AC_0 = ((c < 'a') ? 3078328205u : 2286537020u); continue; case 16u: arg_1AC_0 = (((c >= '0') ? 1993715127u : 225562518u) ^ num3 * 1948514286u); continue; } goto Block_8; } } Block_8: goto IL_234; IL_205: throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_5(JsonTokenizer.JsonTextTokenizer.smethod_4(), Module.smethod_37<string>(3267752735u), new object[] { (int)c })); IL_234: return (char)num; } private void ConsumeLiteral(string text) { int num = 1; while (true) { IL_E4: uint arg_AF_0 = 2223443095u; while (true) { uint num2; switch ((num2 = (arg_AF_0 ^ 4018287206u)) % 10u) { case 0u: goto IL_E4; case 1u: { char? c; arg_AF_0 = ((c.Value == JsonTokenizer.JsonTextTokenizer.smethod_9(text, num)) ? 2475896341u : 2649898718u); continue; } case 2u: goto IL_EB; case 4u: { char? c; arg_AF_0 = ((c.HasValue ? 413622785u : 845568016u) ^ num2 * 2831655103u); continue; } case 5u: arg_AF_0 = (num2 * 2640271923u ^ 3158801794u); continue; case 6u: { char? c = this.reader.Read(); arg_AF_0 = 2243680368u; continue; } case 7u: arg_AF_0 = ((num < JsonTokenizer.JsonTextTokenizer.smethod_10(text)) ? 3419246786u : 3878512697u); continue; case 8u: goto IL_107; case 9u: num++; arg_AF_0 = 4007410049u; continue; } goto Block_4; } } Block_4: return; IL_EB: throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_8(Module.smethod_34<string>(2084068847u), text)); IL_107: throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_8(Module.smethod_33<string>(2183601119u), text)); } private double ReadNumber(char initialCharacter) { StringBuilder stringBuilder = JsonTokenizer.JsonTextTokenizer.smethod_3(); while (true) { IL_335: uint arg_2BB_0 = 3428734534u; while (true) { uint num; int? arg_280_0; int? arg_10B_0; bool arg_24C_0; int? num3; int num4; int? arg_94_0; bool arg_DE_0; bool arg_6D_0; switch ((num = (arg_2BB_0 ^ 3927575223u)) % 27u) { case 0u: { int? num2; arg_280_0 = num2; goto IL_280; } case 1u: { int? num2 = null; arg_2BB_0 = (num * 1586604714u ^ 3961031747u); continue; } case 2u: { char? c2; char? c = c2; arg_2BB_0 = (num * 3822594773u ^ 852107585u); continue; } case 3u: { char? c; if (!c.HasValue) { arg_2BB_0 = (num * 465742550u ^ 3416447339u); continue; } arg_280_0 = new int?((int)c.GetValueOrDefault()); goto IL_280; } case 4u: { IL_EA: char? c2; char? c = c2; if (!c.HasValue) { arg_2BB_0 = 2724569965u; continue; } arg_10B_0 = new int?((int)c.GetValueOrDefault()); goto IL_10B; } case 5u: goto IL_335; case 6u: arg_24C_0 = false; goto IL_24C; case 7u: if (num3.GetValueOrDefault() != num4) { arg_2BB_0 = (num * 1885808447u ^ 2657365177u); continue; } arg_24C_0 = num3.HasValue; goto IL_24C; case 8u: JsonTokenizer.JsonTextTokenizer.smethod_11(stringBuilder, Module.smethod_35<string>(1735569063u)); arg_2BB_0 = (num * 1242346118u ^ 1050600342u); continue; case 9u: { char? c2 = this.ReadFrac(stringBuilder); arg_2BB_0 = (num * 3770122022u ^ 2562161041u); continue; } case 10u: { IL_79: char? c2 = this.ReadExp(stringBuilder); arg_2BB_0 = 4147365055u; continue; } case 11u: { int? num2 = null; arg_2BB_0 = (num * 2951998524u ^ 2318018128u); continue; } case 12u: { char? c; if (!c.HasValue) { arg_2BB_0 = (num * 3387693675u ^ 1621036160u); continue; } arg_94_0 = new int?((int)c.GetValueOrDefault()); goto IL_94; } case 13u: arg_DE_0 = false; goto IL_DE; case 14u: { int? num2; arg_10B_0 = num2; goto IL_10B; } case 15u: { char? c2; this.reader.PushBack(c2.Value); arg_2BB_0 = (num * 3535000700u ^ 2130462297u); continue; } case 16u: num4 = 69; arg_2BB_0 = (num * 2075355319u ^ 2753586756u); continue; case 17u: this.reader.PushBack(initialCharacter); arg_2BB_0 = 2364013152u; continue; case 18u: if (num3.GetValueOrDefault() != num4) { arg_2BB_0 = (num * 4033526008u ^ 732759247u); continue; } arg_6D_0 = num3.HasValue; goto IL_6D; case 19u: num4 = 46; if (num3.GetValueOrDefault() != 46) { arg_2BB_0 = (num * 2416914792u ^ 3273315036u); continue; } arg_DE_0 = num3.HasValue; goto IL_DE; case 20u: { char? c2; char? c = c2; arg_2BB_0 = (num * 1103274222u ^ 1981349786u); continue; } case 21u: { int? num2 = null; arg_94_0 = num2; goto IL_94; } case 22u: arg_6D_0 = false; goto IL_6D; case 23u: { IL_47: char? c2; arg_2BB_0 = ((!c2.HasValue) ? 3934159273u : 3011508275u); continue; } case 24u: { char? c2 = this.ReadInt(stringBuilder); arg_2BB_0 = 2561948362u; continue; } case 25u: arg_2BB_0 = (((initialCharacter == '-') ? 3554109322u : 2353928084u) ^ num * 65242644u); continue; } goto Block_12; IL_24C: if (arg_24C_0) { arg_2BB_0 = 2323792816u; continue; } goto IL_47; IL_6D: if (!arg_6D_0) { arg_2BB_0 = 2367946797u; continue; } goto IL_79; IL_94: num3 = arg_94_0; arg_2BB_0 = 4251868856u; continue; IL_DE: if (arg_DE_0) { arg_2BB_0 = 3425460158u; continue; } goto IL_EA; IL_10B: num3 = arg_10B_0; num4 = 101; arg_2BB_0 = 3746874534u; continue; IL_280: num3 = arg_280_0; arg_2BB_0 = 3391648321u; } } Block_12: double result; try { result = double.Parse(JsonTokenizer.JsonTextTokenizer.smethod_6(stringBuilder), NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent, JsonTokenizer.JsonTextTokenizer.smethod_4()); } catch (OverflowException) { throw this.reader.CreateException(JsonTokenizer.JsonTextTokenizer.smethod_2(Module.smethod_34<string>(4278420801u), stringBuilder)); } return result; } private char? ReadInt(StringBuilder builder) { char c = this.reader.ReadOrFail(Module.smethod_34<string>(2966108233u)); if (c >= '0') { while (true) { IL_62: uint arg_46_0 = 690750146u; while (true) { uint num; switch ((num = (arg_46_0 ^ 1624767232u)) % 4u) { case 0u: goto IL_62; case 2u: arg_46_0 = (((c <= '9') ? 2667681701u : 3557724311u) ^ num * 3973277460u); continue; case 3u: goto IL_98; } goto Block_3; } } Block_3: JsonTokenizer.JsonTextTokenizer.smethod_7(builder, c); int num2; char? arg_AE_0 = this.ConsumeDigits(builder, out num2); if (c == '0' && num2 != 0) { throw this.reader.CreateException(Module.smethod_33<string>(55083386u)); } return arg_AE_0; } IL_98: throw this.reader.CreateException(Module.smethod_34<string>(2966108233u)); } private char? ReadFrac(StringBuilder builder) { JsonTokenizer.JsonTextTokenizer.smethod_7(builder, '.'); int num; char? arg_2B_0 = this.ConsumeDigits(builder, out num); if (num == 0) { throw this.reader.CreateException(Module.smethod_35<string>(392891160u)); } return arg_2B_0; } private char? ReadExp(StringBuilder builder) { JsonTokenizer.JsonTextTokenizer.smethod_7(builder, 'E'); char? c = this.reader.Read(); if (!c.HasValue) { goto IL_1A4; } goto IL_21C; uint arg_1BE_0; char? c2; while (true) { IL_1B9: uint num; int? arg_A6_0; int? arg_172_0; bool arg_12A_0; int? num4; bool arg_B2_0; switch ((num = (arg_1BE_0 ^ 1452476557u)) % 20u) { case 0u: IL_BE: this.reader.PushBack(c.Value); arg_1BE_0 = 1026790028u; continue; case 1u: goto IL_225; case 2u: { int? num2 = null; arg_A6_0 = num2; goto IL_A6; } case 3u: goto IL_1A4; case 5u: { int num3 = 45; arg_1BE_0 = (num * 513620110u ^ 1041112062u); continue; } case 6u: goto IL_21C; case 7u: { int? num2; arg_172_0 = num2; goto IL_172; } case 8u: arg_12A_0 = false; goto IL_12A; case 9u: arg_1BE_0 = (num * 1271940519u ^ 1122894535u); continue; case 10u: c2 = c; if (!c2.HasValue) { arg_1BE_0 = (num * 2915296724u ^ 772849874u); continue; } arg_172_0 = new int?((int)c2.GetValueOrDefault()); goto IL_172; case 11u: IL_136: JsonTokenizer.JsonTextTokenizer.smethod_7(builder, c.Value); arg_1BE_0 = 1064449072u; continue; case 12u: goto IL_23B; case 13u: { int num3; if (num4.GetValueOrDefault() != num3) { arg_1BE_0 = (num * 4133245891u ^ 3311303066u); continue; } arg_12A_0 = num4.HasValue; goto IL_12A; } case 14u: { int num3 = 43; if (num4.GetValueOrDefault() != 43) { arg_1BE_0 = (num * 2037214372u ^ 2231304710u); continue; } arg_B2_0 = num4.HasValue; goto IL_B2; } case 15u: arg_B2_0 = false; goto IL_B2; case 16u: if (!c2.HasValue) { arg_1BE_0 = (num * 1423660325u ^ 3552384875u); continue; } arg_A6_0 = new int?((int)c2.GetValueOrDefault()); goto IL_A6; case 17u: { int num5; c = this.ConsumeDigits(builder, out num5); arg_1BE_0 = 1148111359u; continue; } case 18u: { int num5; arg_1BE_0 = (((num5 == 0) ? 3507790385u : 4190769701u) ^ num * 1492411848u); continue; } case 19u: { int? num2 = null; arg_1BE_0 = (num * 1089365034u ^ 3166610304u); continue; } } break; IL_A6: num4 = arg_A6_0; arg_1BE_0 = 162673416u; continue; IL_B2: if (arg_B2_0) { arg_1BE_0 = 497826230u; continue; } goto IL_BE; IL_12A: if (!arg_12A_0) { arg_1BE_0 = 1084111467u; continue; } goto IL_136; IL_172: num4 = arg_172_0; arg_1BE_0 = 2023662975u; } return c; IL_225: throw this.reader.CreateException(Module.smethod_35<string>(2365453992u)); IL_23B: throw this.reader.CreateException(Module.smethod_37<string>(2975595932u)); IL_1A4: arg_1BE_0 = 2143502108u; goto IL_1B9; IL_21C: c2 = c; arg_1BE_0 = 1301372849u; goto IL_1B9; } private char? ConsumeDigits(StringBuilder builder, out int count) { count = 0; char? result; while (true) { IL_ED: uint arg_BE_0 = 3951464437u; while (true) { uint num; switch ((num = (arg_BE_0 ^ 2644738753u)) % 8u) { case 0u: arg_BE_0 = (((!result.HasValue) ? 2395340546u : 2736623126u) ^ num * 4031030723u); continue; case 1u: arg_BE_0 = (((result.Value > '9') ? 487804024u : 980450185u) ^ num * 274626106u); continue; case 2u: count++; arg_BE_0 = 3565798471u; continue; case 3u: return result; case 4u: break; case 5u: goto IL_ED; case 6u: goto IL_37; case 7u: arg_BE_0 = (((result.Value >= '0') ? 2236503732u : 3617672102u) ^ num * 961368668u); continue; default: goto IL_37; } IL_45: result = this.reader.Read(); arg_BE_0 = 3677530081u; continue; IL_37: JsonTokenizer.JsonTextTokenizer.smethod_7(builder, result.Value); goto IL_45; } } return result; } private void ValidateAndModifyStateForValue(string errorPrefix) { this.ValidateState(JsonTokenizer.JsonTextTokenizer.ValueStates, errorPrefix); JsonTokenizer.JsonTextTokenizer.State state = this.state; while (true) { IL_14F: uint arg_10E_0 = 3430627113u; while (true) { uint num; switch ((num = (arg_10E_0 ^ 4234330315u)) % 13u) { case 0u: arg_10E_0 = (num * 2103314050u ^ 4217759484u); continue; case 2u: goto IL_14F; case 3u: goto IL_166; case 4u: arg_10E_0 = (((state != JsonTokenizer.JsonTextTokenizer.State.ArrayAfterComma) ? 4203480299u : 2258613579u) ^ num * 3796198173u); continue; case 5u: arg_10E_0 = (((state == JsonTokenizer.JsonTextTokenizer.State.StartOfDocument) ? 1553897359u : 1279355368u) ^ num * 1651647674u); continue; case 6u: arg_10E_0 = (((state == JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon) ? 115129714u : 514500073u) ^ num * 1869021165u); continue; case 7u: this.state = JsonTokenizer.JsonTextTokenizer.State.ExpectedEndOfDocument; arg_10E_0 = 2844930869u; continue; case 8u: arg_10E_0 = ((state == JsonTokenizer.JsonTextTokenizer.State.ArrayStart) ? 3449997873u : 3347045001u); continue; case 9u: return; case 10u: goto IL_173; case 11u: arg_10E_0 = (((state > JsonTokenizer.JsonTextTokenizer.State.ObjectAfterColon) ? 1100180620u : 587742203u) ^ num * 711010174u); continue; case 12u: arg_10E_0 = (num * 2736823529u ^ 2303030765u); continue; } goto Block_6; } } Block_6: throw JsonTokenizer.JsonTextTokenizer.smethod_1(Module.smethod_36<string>(4006575829u)); IL_166: this.state = JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue; return; IL_173: this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty; } private void PopContainer() { this.containerStack.Pop(); JsonTokenizer.JsonTextTokenizer.ContainerType containerType = this.containerStack.Peek(); uint arg_45_0; switch (containerType) { case JsonTokenizer.JsonTextTokenizer.ContainerType.Document: IL_6D: this.state = JsonTokenizer.JsonTextTokenizer.State.ExpectedEndOfDocument; arg_45_0 = 1207811057u; break; case JsonTokenizer.JsonTextTokenizer.ContainerType.Object: IL_97: this.state = JsonTokenizer.JsonTextTokenizer.State.ObjectAfterProperty; return; case JsonTokenizer.JsonTextTokenizer.ContainerType.Array: IL_A0: this.state = JsonTokenizer.JsonTextTokenizer.State.ArrayAfterValue; return; default: goto IL_3B; } while (true) { IL_40: uint num; switch ((num = (arg_45_0 ^ 514295036u)) % 7u) { case 0u: goto IL_3B; case 1u: goto IL_97; case 2u: return; case 4u: goto IL_A0; case 5u: arg_45_0 = (num * 2509268472u ^ 3261285597u); continue; case 6u: goto IL_6D; } break; } throw JsonTokenizer.JsonTextTokenizer.smethod_1(JsonTokenizer.JsonTextTokenizer.smethod_2(Module.smethod_33<string>(157176394u), containerType)); IL_3B: arg_45_0 = 716639050u; goto IL_40; } static InvalidOperationException smethod_1(string string_0) { return new InvalidOperationException(string_0); } static string smethod_2(object object_0, object object_1) { return object_0 + object_1; } static StringBuilder smethod_3() { return new StringBuilder(); } static CultureInfo smethod_4() { return CultureInfo.InvariantCulture; } static string smethod_5(IFormatProvider iformatProvider_0, string string_0, object[] object_0) { return string.Format(iformatProvider_0, string_0, object_0); } static string smethod_6(object object_0) { return object_0.ToString(); } static StringBuilder smethod_7(StringBuilder stringBuilder_0, char char_0) { return stringBuilder_0.Append(char_0); } static string smethod_8(string string_0, string string_1) { return string_0 + string_1; } static char smethod_9(string string_0, int int_0) { return string_0[int_0]; } static int smethod_10(string string_0) { return string_0.Length; } static StringBuilder smethod_11(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.Append(string_0); } } private JsonToken bufferedToken; internal int ObjectDepth { get; private set; } internal static JsonTokenizer FromTextReader(TextReader reader) { return new JsonTokenizer.JsonTextTokenizer(reader); } internal static JsonTokenizer FromReplayedTokens(IList<JsonToken> tokens, JsonTokenizer continuation) { return new JsonTokenizer.JsonReplayTokenizer(tokens, continuation); } internal void PushBack(JsonToken token) { if (this.bufferedToken != null) { goto IL_55; } goto IL_E9; uint arg_A5_0; while (true) { IL_A0: uint num; switch ((num = (arg_A5_0 ^ 1095103441u)) % 10u) { case 0u: { int objectDepth; this.ObjectDepth = objectDepth + 1; arg_A5_0 = (num * 3220692062u ^ 2789066209u); continue; } case 1u: goto IL_FE; case 2u: { int objectDepth = this.ObjectDepth; arg_A5_0 = (num * 3962606672u ^ 722860213u); continue; } case 3u: return; case 4u: { int objectDepth; this.ObjectDepth = objectDepth - 1; arg_A5_0 = (num * 3751611531u ^ 1773678302u); continue; } case 5u: goto IL_55; case 6u: arg_A5_0 = ((token.Type == JsonToken.TokenType.EndObject) ? 620316280u : 129698317u); continue; case 7u: goto IL_E9; case 9u: { int objectDepth = this.ObjectDepth; arg_A5_0 = (num * 529432075u ^ 1218121848u); continue; } } break; } return; IL_FE: throw JsonTokenizer.smethod_0(Module.smethod_37<string>(2099213936u)); IL_55: arg_A5_0 = 1385124762u; goto IL_A0; IL_E9: this.bufferedToken = token; arg_A5_0 = ((token.Type != JsonToken.TokenType.StartObject) ? 443914991u : 1555337421u); goto IL_A0; } internal JsonToken Next() { if (this.bufferedToken != null) { goto IL_E2; } goto IL_125; uint arg_EC_0; JsonToken jsonToken; while (true) { IL_E7: uint num; switch ((num = (arg_EC_0 ^ 3450593029u)) % 11u) { case 0u: goto IL_E2; case 1u: { int objectDepth = this.ObjectDepth; arg_EC_0 = (num * 2880460023u ^ 777687680u); continue; } case 2u: { int objectDepth = this.ObjectDepth; this.ObjectDepth = objectDepth + 1; arg_EC_0 = (num * 987853680u ^ 819751387u); continue; } case 3u: { int objectDepth; this.ObjectDepth = objectDepth - 1; arg_EC_0 = (num * 3554561161u ^ 770806806u); continue; } case 4u: arg_EC_0 = (num * 1647000435u ^ 4198112770u); continue; case 5u: this.bufferedToken = null; arg_EC_0 = (num * 1663122805u ^ 980987310u); continue; case 7u: arg_EC_0 = ((jsonToken.Type != JsonToken.TokenType.StartObject) ? 3594187970u : 2617038862u); continue; case 8u: arg_EC_0 = ((jsonToken.Type != JsonToken.TokenType.EndObject) ? 3157552139u : 2794562581u); continue; case 9u: jsonToken = this.bufferedToken; arg_EC_0 = (num * 1617573968u ^ 3761570439u); continue; case 10u: goto IL_125; } break; } return jsonToken; IL_E2: arg_EC_0 = 3957548835u; goto IL_E7; IL_125: jsonToken = this.NextImpl(); arg_EC_0 = 3187922577u; goto IL_E7; } protected abstract JsonToken NextImpl(); static InvalidOperationException smethod_0(string string_0) { return new InvalidOperationException(string_0); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengePickedRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengePickedRequest : IMessage<ChallengePickedRequest>, IEquatable<ChallengePickedRequest>, IDeepCloneable<ChallengePickedRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengePickedRequest.__c __9 = new ChallengePickedRequest.__c(); internal ChallengePickedRequest cctor>b__34_0() { return new ChallengePickedRequest(); } } private static readonly MessageParser<ChallengePickedRequest> _parser = new MessageParser<ChallengePickedRequest>(new Func<ChallengePickedRequest>(ChallengePickedRequest.__c.__9.<.cctor>b__34_0)); public const int ChallengeFieldNumber = 1; private uint challenge_; public const int IdFieldNumber = 2; private uint id_; public const int NewChallengeProtocolFieldNumber = 3; private bool newChallengeProtocol_; public static MessageParser<ChallengePickedRequest> Parser { get { return ChallengePickedRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengePickedRequest.Descriptor; } } public uint Challenge { get { return this.challenge_; } set { this.challenge_ = value; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public bool NewChallengeProtocol { get { return this.newChallengeProtocol_; } set { this.newChallengeProtocol_ = value; } } public ChallengePickedRequest() { } public ChallengePickedRequest(ChallengePickedRequest other) : this() { while (true) { IL_7C: uint arg_5C_0 = 787340036u; while (true) { uint num; switch ((num = (arg_5C_0 ^ 1617751084u)) % 5u) { case 0u: goto IL_7C; case 1u: this.newChallengeProtocol_ = other.newChallengeProtocol_; arg_5C_0 = (num * 570324640u ^ 497551312u); continue; case 2u: this.challenge_ = other.challenge_; arg_5C_0 = (num * 3750916252u ^ 2566803220u); continue; case 3u: this.id_ = other.id_; arg_5C_0 = (num * 2731123400u ^ 293150685u); continue; } return; } } } public ChallengePickedRequest Clone() { return new ChallengePickedRequest(this); } public override bool Equals(object other) { return this.Equals(other as ChallengePickedRequest); } public bool Equals(ChallengePickedRequest other) { if (other == null) { goto IL_63; } goto IL_DA; int arg_94_0; while (true) { IL_8F: switch ((arg_94_0 ^ -264335838) % 11) { case 1: arg_94_0 = ((this.NewChallengeProtocol == other.NewChallengeProtocol) ? -952741062 : -1106113147); continue; case 2: goto IL_63; case 3: goto IL_DA; case 4: return false; case 5: return true; case 6: return false; case 7: arg_94_0 = ((this.Id == other.Id) ? -1304172160 : -408836485); continue; case 8: return false; case 9: return false; case 10: arg_94_0 = ((this.Challenge != other.Challenge) ? -1203227793 : -1378027675); continue; } break; } return true; IL_63: arg_94_0 = -1530457424; goto IL_8F; IL_DA: arg_94_0 = ((other != this) ? -698525770 : -875042840); goto IL_8F; } public override int GetHashCode() { int num = 1 ^ this.Challenge.GetHashCode(); while (true) { IL_C9: uint arg_A5_0 = 4221044449u; while (true) { uint num2; switch ((num2 = (arg_A5_0 ^ 2293274804u)) % 6u) { case 0u: goto IL_C9; case 1u: arg_A5_0 = (this.NewChallengeProtocol ? 3723508124u : 3538844487u); continue; case 2u: num ^= this.NewChallengeProtocol.GetHashCode(); arg_A5_0 = (num2 * 3158106267u ^ 2188044415u); continue; case 4u: num ^= this.Id.GetHashCode(); arg_A5_0 = (num2 * 3399122676u ^ 2099222533u); continue; case 5u: arg_A5_0 = (((this.Id == 0u) ? 3842145852u : 4185795405u) ^ num2 * 4258868053u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); output.WriteFixed32(this.Challenge); if (this.Id != 0u) { goto IL_92; } goto IL_D3; uint arg_9C_0; while (true) { IL_97: uint num; switch ((num = (arg_9C_0 ^ 805749889u)) % 7u) { case 0u: goto IL_92; case 1u: goto IL_D3; case 2u: output.WriteRawTag(16); arg_9C_0 = (num * 2504931664u ^ 4246127014u); continue; case 4u: output.WriteUInt32(this.Id); arg_9C_0 = (num * 3667973881u ^ 3173587399u); continue; case 5u: output.WriteBool(this.NewChallengeProtocol); arg_9C_0 = (num * 1545494825u ^ 571139115u); continue; case 6u: output.WriteRawTag(24); arg_9C_0 = (num * 4118567838u ^ 133284570u); continue; } break; } return; IL_92: arg_9C_0 = 659310854u; goto IL_97; IL_D3: arg_9C_0 = (this.NewChallengeProtocol ? 282409239u : 1542182412u); goto IL_97; } public int CalculateSize() { int num = 5; while (true) { IL_AC: uint arg_88_0 = 864615046u; while (true) { uint num2; switch ((num2 = (arg_88_0 ^ 871524347u)) % 6u) { case 0u: num += 2; arg_88_0 = (num2 * 3810590843u ^ 978475054u); continue; case 2u: goto IL_AC; case 3u: arg_88_0 = ((!this.NewChallengeProtocol) ? 1261028114u : 1845622031u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_88_0 = (num2 * 2841275697u ^ 1082342688u); continue; case 5u: arg_88_0 = (((this.Id != 0u) ? 1283226664u : 116091347u) ^ num2 * 1093935097u); continue; } return num; } } return num; } public void MergeFrom(ChallengePickedRequest other) { if (other == null) { goto IL_18; } goto IL_F8; uint arg_B8_0; while (true) { IL_B3: uint num; switch ((num = (arg_B8_0 ^ 1071860674u)) % 9u) { case 0u: this.NewChallengeProtocol = other.NewChallengeProtocol; arg_B8_0 = (num * 1534508073u ^ 3482021823u); continue; case 1u: this.Challenge = other.Challenge; arg_B8_0 = (num * 1131901515u ^ 379830316u); continue; case 2u: goto IL_F8; case 3u: this.Id = other.Id; arg_B8_0 = (num * 1205843361u ^ 3234400259u); continue; case 4u: arg_B8_0 = (other.NewChallengeProtocol ? 234056625u : 2111883732u); continue; case 5u: return; case 6u: arg_B8_0 = ((other.Id == 0u) ? 1244229953u : 1986594240u); continue; case 7u: goto IL_18; } break; } return; IL_18: arg_B8_0 = 1666134333u; goto IL_B3; IL_F8: arg_B8_0 = ((other.Challenge != 0u) ? 645368211u : 1432371095u); goto IL_B3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_164: uint num; uint arg_114_0 = ((num = input.ReadTag()) != 0u) ? 2049655477u : 299789529u; while (true) { uint num2; switch ((num2 = (arg_114_0 ^ 1257397966u)) % 13u) { case 0u: input.SkipLastField(); arg_114_0 = (num2 * 1239694717u ^ 3630768661u); continue; case 1u: arg_114_0 = (((num != 16u) ? 2861858533u : 3139863517u) ^ num2 * 1413228444u); continue; case 2u: this.Id = input.ReadUInt32(); arg_114_0 = 1963204645u; continue; case 3u: this.NewChallengeProtocol = input.ReadBool(); arg_114_0 = 1664836023u; continue; case 4u: arg_114_0 = (num2 * 993741627u ^ 2235635807u); continue; case 5u: arg_114_0 = (((num != 24u) ? 2425083457u : 2238254424u) ^ num2 * 1806185584u); continue; case 6u: goto IL_164; case 8u: arg_114_0 = ((num == 13u) ? 1405454947u : 1250998700u); continue; case 9u: this.Challenge = input.ReadFixed32(); arg_114_0 = 174604067u; continue; case 10u: arg_114_0 = 2049655477u; continue; case 11u: arg_114_0 = (num2 * 3840428131u ^ 1497229072u); continue; case 12u: arg_114_0 = (num2 * 264161246u ^ 1760550269u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/ServerRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class ServerRequest : IMessage<ServerRequest>, IEquatable<ServerRequest>, IDeepCloneable<ServerRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServerRequest.__c __9 = new ServerRequest.__c(); internal ServerRequest cctor>b__34_0() { return new ServerRequest(); } } private static readonly MessageParser<ServerRequest> _parser = new MessageParser<ServerRequest>(new Func<ServerRequest>(ServerRequest.__c.__9.<.cctor>b__34_0)); public const int AttributeFieldNumber = 1; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(10u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int ProgramFieldNumber = 2; private uint program_; public const int HostFieldNumber = 3; private ProcessId host_; public static MessageParser<ServerRequest> Parser { get { return ServerRequest._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ServerRequest.Descriptor; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public ServerRequest() { } public ServerRequest(ServerRequest other) : this() { while (true) { IL_76: uint arg_5A_0 = 2040386870u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 3474747u)) % 4u) { case 1u: this.attribute_ = other.attribute_.Clone(); arg_5A_0 = (num * 1765612473u ^ 4218950288u); continue; case 2u: this.program_ = other.program_; this.Host = ((other.host_ != null) ? other.Host.Clone() : null); arg_5A_0 = 1182037311u; continue; case 3u: goto IL_76; } return; } } } public ServerRequest Clone() { return new ServerRequest(this); } public override bool Equals(object other) { return this.Equals(other as ServerRequest); } public bool Equals(ServerRequest other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ 929691685) % 11) { case 0: goto IL_9A; case 1: arg_A4_0 = ((this.Program == other.Program) ? 1480930003 : 1407039856); continue; case 2: return false; case 3: return false; case 4: return true; case 5: arg_A4_0 = (this.attribute_.Equals(other.attribute_) ? 1022370600 : 2116416971); continue; case 6: return false; case 7: return false; case 8: goto IL_EA; case 10: arg_A4_0 = (ServerRequest.smethod_0(this.Host, other.Host) ? 211583313 : 1404064658); continue; } break; } return true; IL_9A: arg_A4_0 = 2140424844; goto IL_9F; IL_EA: arg_A4_0 = ((other != this) ? 444281671 : 351301836); goto IL_9F; } public override int GetHashCode() { int num = 1; while (true) { IL_B1: uint arg_8D_0 = 973180549u; while (true) { uint num2; switch ((num2 = (arg_8D_0 ^ 1186233418u)) % 6u) { case 0u: goto IL_B1; case 1u: num ^= ServerRequest.smethod_1(this.attribute_); arg_8D_0 = (num2 * 2532842395u ^ 1011640732u); continue; case 3u: arg_8D_0 = (((this.host_ == null) ? 3391534744u : 2508938192u) ^ num2 * 3130995702u); continue; case 4u: num ^= this.Host.GetHashCode(); arg_8D_0 = (num2 * 1997216298u ^ 4116880258u); continue; case 5u: num ^= this.Program.GetHashCode(); arg_8D_0 = (num2 * 2648156988u ^ 1011927401u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attribute_.WriteTo(output, ServerRequest._repeated_attribute_codec); while (true) { IL_BB: uint arg_97_0 = 1249036017u; while (true) { uint num; switch ((num = (arg_97_0 ^ 132765987u)) % 6u) { case 0u: output.WriteRawTag(26); arg_97_0 = (num * 3710208701u ^ 1633098242u); continue; case 1u: output.WriteFixed32(this.Program); arg_97_0 = (((this.host_ != null) ? 3930212206u : 2240230596u) ^ num * 2195330277u); continue; case 2u: output.WriteRawTag(21); arg_97_0 = (num * 3241844311u ^ 2670050834u); continue; case 3u: goto IL_BB; case 5u: output.WriteMessage(this.Host); arg_97_0 = (num * 2814829955u ^ 3670406882u); continue; } return; } } } public int CalculateSize() { int num = 0 + this.attribute_.CalculateSize(ServerRequest._repeated_attribute_codec); while (true) { IL_82: uint arg_66_0 = 816438206u; while (true) { uint num2; switch ((num2 = (arg_66_0 ^ 206481579u)) % 4u) { case 1u: num += 5; arg_66_0 = (((this.host_ != null) ? 1254997895u : 1272463133u) ^ num2 * 1386868558u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_66_0 = (num2 * 3750314313u ^ 1656614753u); continue; case 3u: goto IL_82; } return num; } } return num; } public void MergeFrom(ServerRequest other) { if (other == null) { goto IL_9B; } goto IL_FF; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 3919815011u)) % 9u) { case 0u: this.host_ = new ProcessId(); arg_BF_0 = (num * 2095367369u ^ 2174696444u); continue; case 2u: goto IL_FF; case 3u: goto IL_9B; case 4u: arg_BF_0 = ((other.host_ == null) ? 3731713364u : 3299074489u); continue; case 5u: this.Host.MergeFrom(other.Host); arg_BF_0 = 3731713364u; continue; case 6u: arg_BF_0 = (((this.host_ != null) ? 1325735820u : 1283186515u) ^ num * 1247460596u); continue; case 7u: this.Program = other.Program; arg_BF_0 = (num * 1332821086u ^ 1395504469u); continue; case 8u: return; } break; } return; IL_9B: arg_BF_0 = 3518075723u; goto IL_BA; IL_FF: this.attribute_.Add(other.attribute_); arg_BF_0 = ((other.Program == 0u) ? 2457106667u : 3560826674u); goto IL_BA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_19F: uint num; uint arg_14B_0 = ((num = input.ReadTag()) == 0u) ? 1531611307u : 16953550u; while (true) { uint num2; switch ((num2 = (arg_14B_0 ^ 1622673014u)) % 14u) { case 0u: arg_14B_0 = (num2 * 2388410718u ^ 960140366u); continue; case 1u: arg_14B_0 = (((num != 21u) ? 1825100456u : 2033089830u) ^ num2 * 197161075u); continue; case 2u: arg_14B_0 = ((num != 10u) ? 79902305u : 1630817975u); continue; case 3u: arg_14B_0 = ((this.host_ == null) ? 2111428758u : 30829095u); continue; case 4u: goto IL_19F; case 5u: this.Program = input.ReadFixed32(); arg_14B_0 = 1161756426u; continue; case 6u: input.SkipLastField(); arg_14B_0 = (num2 * 13055048u ^ 125023914u); continue; case 7u: arg_14B_0 = (((num == 26u) ? 1279808236u : 154719259u) ^ num2 * 833785077u); continue; case 8u: arg_14B_0 = 16953550u; continue; case 10u: arg_14B_0 = (num2 * 1895685272u ^ 4268126250u); continue; case 11u: input.ReadMessage(this.host_); arg_14B_0 = 1161756426u; continue; case 12u: this.host_ = new ProcessId(); arg_14B_0 = (num2 * 1494734443u ^ 4286647687u); continue; case 13u: this.attribute_.AddEntriesFrom(input, ServerRequest._repeated_attribute_codec); arg_14B_0 = 1173929608u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.-PrivateImplementationDetails-.cs using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [CompilerGenerated] internal sealed class <PrivateImplementationDetails> { [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)] private struct Struct13 { } [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 64)] private struct Struct14 { } [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 128)] private struct Struct15 { } [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 256)] private struct Struct16 { } internal static readonly Framework.<PrivateImplementationDetails>.Struct15 struct15_0; internal static readonly Framework.<PrivateImplementationDetails>.Struct16 struct16_0; internal static readonly Framework.<PrivateImplementationDetails>.Struct14 struct14_0; internal static readonly Framework.<PrivateImplementationDetails>.Struct15 struct15_1; internal static readonly Framework.<PrivateImplementationDetails>.Struct15 struct15_2; internal static readonly Framework.<PrivateImplementationDetails>.Struct15 struct15_3; internal static readonly Framework.<PrivateImplementationDetails>.Struct16 struct16_1; internal static readonly Framework.<PrivateImplementationDetails>.Struct13 A5614CF8A256BD624776F8BBAC105E523496B2BF; internal static readonly Framework.<PrivateImplementationDetails>.Struct13 B64704505A6F7DA9DC7BB76B2684DEEF1ADFB915; internal static readonly Framework.<PrivateImplementationDetails>.Struct15 BFED396B36E39E6B4D9C773432CEE8616631C5A0; internal static readonly Framework.<PrivateImplementationDetails>.Struct13 F3FAF914B4E2D945DAF4562B7BE04C79D9C0F6CA; internal static readonly Framework.<PrivateImplementationDetails>.Struct15 F49E8741F7968D6D836AC31B66B178C67D2CD2D1; internal static readonly Framework.<PrivateImplementationDetails>.Struct13 FE5E26F28C22F788D40FAD92147032F58EC76833; } <file_sep>/Google.Protobuf.Reflection/EnumDescriptor.cs using System; using System.Collections.Generic; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class EnumDescriptor : DescriptorBase { private readonly EnumDescriptorProto proto; private readonly MessageDescriptor containingType; private readonly IList<EnumValueDescriptor> values; private readonly Type clrType; internal EnumDescriptorProto Proto { get { return this.proto; } } public override string Name { get { return this.proto.Name; } } public Type ClrType { get { return this.clrType; } } public MessageDescriptor ContainingType { get { return this.containingType; } } public IList<EnumValueDescriptor> Values { get { return this.values; } } internal EnumDescriptor(EnumDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, Type clrType) : base(file, file.ComputeFullName(parent, proto.Name), index) { EnumDescriptor __4__this; while (true) { IL_E8: uint arg_BC_0 = 4109983820u; while (true) { uint num; switch ((num = (arg_BC_0 ^ 3766774863u)) % 8u) { case 0u: goto IL_E8; case 1u: this.clrType = clrType; arg_BC_0 = (num * 1684544113u ^ 3373526018u); continue; case 3u: __4__this = this; arg_BC_0 = (num * 2337484923u ^ 1148379752u); continue; case 4u: this.containingType = parent; arg_BC_0 = (num * 1220569408u ^ 3140952130u); continue; case 5u: arg_BC_0 = (((proto.Value.Count == 0) ? 1596062239u : 198363322u) ^ num * 3295210363u); continue; case 6u: this.proto = proto; arg_BC_0 = (num * 3344172837u ^ 841144240u); continue; case 7u: goto IL_EF; } goto Block_2; } } Block_2: goto IL_100; IL_EF: throw new DescriptorValidationException(this, Module.smethod_34<string>(1600269481u)); IL_100: this.values = DescriptorUtil.ConvertAndMakeReadOnly<EnumValueDescriptorProto, EnumValueDescriptor>(proto.Value, (EnumValueDescriptorProto value, int i) => new EnumValueDescriptor(value, file, __4__this, i)); base.File.DescriptorPool.AddSymbol(this); } public EnumValueDescriptor FindValueByNumber(int number) { return base.File.DescriptorPool.FindEnumValueByNumber(this, number); } public EnumValueDescriptor FindValueByName(string name) { return base.File.DescriptorPool.FindSymbol<EnumValueDescriptor>(EnumDescriptor.smethod_0(base.FullName, Module.smethod_34<string>(3349943853u), name)); } static string smethod_0(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } } } <file_sep>/Bgs.Protocol.Config/RPCMethodConfig.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Config { [DebuggerNonUserCode] public sealed class RPCMethodConfig : IMessage<RPCMethodConfig>, IEquatable<RPCMethodConfig>, IDeepCloneable<RPCMethodConfig>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RPCMethodConfig.__c __9 = new RPCMethodConfig.__c(); internal RPCMethodConfig cctor>b__94_0() { return new RPCMethodConfig(); } } private static readonly MessageParser<RPCMethodConfig> _parser = new MessageParser<RPCMethodConfig>(new Func<RPCMethodConfig>(RPCMethodConfig.__c.__9.<.cctor>b__94_0)); public const int ServiceNameFieldNumber = 1; private string serviceName_ = ""; public const int MethodNameFieldNumber = 2; private string methodName_ = ""; public const int FixedCallCostFieldNumber = 3; private uint fixedCallCost_; public const int FixedPacketSizeFieldNumber = 4; private uint fixedPacketSize_; public const int VariableMultiplierFieldNumber = 5; private float variableMultiplier_; public const int MultiplierFieldNumber = 6; private float multiplier_; public const int RateLimitCountFieldNumber = 7; private uint rateLimitCount_; public const int RateLimitSecondsFieldNumber = 8; private uint rateLimitSeconds_; public const int MaxPacketSizeFieldNumber = 9; private uint maxPacketSize_; public const int MaxEncodedSizeFieldNumber = 10; private uint maxEncodedSize_; public const int TimeoutFieldNumber = 11; private float timeout_; public const int CapBalanceFieldNumber = 12; private uint capBalance_; public const int IncomePerSecondFieldNumber = 13; private float incomePerSecond_; public const int ServiceHashFieldNumber = 14; private uint serviceHash_; public const int MethodIdFieldNumber = 15; private uint methodId_; public static MessageParser<RPCMethodConfig> Parser { get { return RPCMethodConfig._parser; } } public static MessageDescriptor Descriptor { get { return RpcConfigReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return RPCMethodConfig.Descriptor; } } [Obsolete] public string ServiceName { get { return this.serviceName_; } set { this.serviceName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } [Obsolete] public string MethodName { get { return this.methodName_; } set { this.methodName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public uint FixedCallCost { get { return this.fixedCallCost_; } set { this.fixedCallCost_ = value; } } public uint FixedPacketSize { get { return this.fixedPacketSize_; } set { this.fixedPacketSize_ = value; } } public float VariableMultiplier { get { return this.variableMultiplier_; } set { this.variableMultiplier_ = value; } } public float Multiplier { get { return this.multiplier_; } set { this.multiplier_ = value; } } public uint RateLimitCount { get { return this.rateLimitCount_; } set { this.rateLimitCount_ = value; } } public uint RateLimitSeconds { get { return this.rateLimitSeconds_; } set { this.rateLimitSeconds_ = value; } } public uint MaxPacketSize { get { return this.maxPacketSize_; } set { this.maxPacketSize_ = value; } } public uint MaxEncodedSize { get { return this.maxEncodedSize_; } set { this.maxEncodedSize_ = value; } } public float Timeout { get { return this.timeout_; } set { this.timeout_ = value; } } public uint CapBalance { get { return this.capBalance_; } set { this.capBalance_ = value; } } public float IncomePerSecond { get { return this.incomePerSecond_; } set { this.incomePerSecond_ = value; } } public uint ServiceHash { get { return this.serviceHash_; } set { this.serviceHash_ = value; } } public uint MethodId { get { return this.methodId_; } set { this.methodId_ = value; } } public RPCMethodConfig() { } public RPCMethodConfig(RPCMethodConfig other) : this() { this.serviceName_ = other.serviceName_; this.methodName_ = other.methodName_; this.fixedCallCost_ = other.fixedCallCost_; this.fixedPacketSize_ = other.fixedPacketSize_; this.variableMultiplier_ = other.variableMultiplier_; this.multiplier_ = other.multiplier_; this.rateLimitCount_ = other.rateLimitCount_; this.rateLimitSeconds_ = other.rateLimitSeconds_; this.maxPacketSize_ = other.maxPacketSize_; this.maxEncodedSize_ = other.maxEncodedSize_; this.timeout_ = other.timeout_; this.capBalance_ = other.capBalance_; this.incomePerSecond_ = other.incomePerSecond_; this.serviceHash_ = other.serviceHash_; this.methodId_ = other.methodId_; } public RPCMethodConfig Clone() { return new RPCMethodConfig(this); } public override bool Equals(object other) { return this.Equals(other as RPCMethodConfig); } public bool Equals(RPCMethodConfig other) { if (other == null) { goto IL_21A; } goto IL_33F; int arg_299_0; while (true) { IL_294: switch ((arg_299_0 ^ 184413560) % 35) { case 0: return false; case 1: return false; case 2: arg_299_0 = ((this.MethodId != other.MethodId) ? 1940326008 : 1980684143); continue; case 3: arg_299_0 = ((this.FixedCallCost != other.FixedCallCost) ? 1890326019 : 872704766); continue; case 4: arg_299_0 = ((this.Multiplier != other.Multiplier) ? 422330255 : 1283969997); continue; case 5: return false; case 6: goto IL_21A; case 7: return false; case 8: arg_299_0 = ((this.Timeout == other.Timeout) ? 740158499 : 934139434); continue; case 9: arg_299_0 = ((this.MaxPacketSize != other.MaxPacketSize) ? 1212403822 : 1136512711); continue; case 10: return false; case 11: goto IL_33F; case 12: arg_299_0 = ((this.RateLimitSeconds != other.RateLimitSeconds) ? 1567693638 : 180891234); continue; case 13: return true; case 14: arg_299_0 = ((this.CapBalance == other.CapBalance) ? 503052163 : 1801048094); continue; case 15: arg_299_0 = ((this.RateLimitCount != other.RateLimitCount) ? 624643505 : 1214735702); continue; case 16: return false; case 17: arg_299_0 = ((!RPCMethodConfig.smethod_0(this.ServiceName, other.ServiceName)) ? 1188079298 : 1711522194); continue; case 19: return false; case 20: return false; case 21: return false; case 22: arg_299_0 = ((!RPCMethodConfig.smethod_0(this.MethodName, other.MethodName)) ? 465165515 : 1890224426); continue; case 23: return false; case 24: return false; case 25: return false; case 26: arg_299_0 = ((this.IncomePerSecond != other.IncomePerSecond) ? 1645845321 : 90964425); continue; case 27: return false; case 28: arg_299_0 = ((this.MaxEncodedSize == other.MaxEncodedSize) ? 484054945 : 1853992316); continue; case 29: return false; case 30: arg_299_0 = ((this.FixedPacketSize != other.FixedPacketSize) ? 528026848 : 110516560); continue; case 31: return false; case 32: return false; case 33: arg_299_0 = ((this.ServiceHash == other.ServiceHash) ? 1337427279 : 1650095437); continue; case 34: arg_299_0 = ((this.VariableMultiplier != other.VariableMultiplier) ? 1797974646 : 2132494485); continue; } break; } return true; IL_21A: arg_299_0 = 1219762024; goto IL_294; IL_33F: arg_299_0 = ((other != this) ? 869579258 : 1951734565); goto IL_294; } public override int GetHashCode() { int num = 1; while (true) { IL_4D4: uint arg_447_0 = 3082297313u; while (true) { uint num2; switch ((num2 = (arg_447_0 ^ 3937406578u)) % 32u) { case 0u: arg_447_0 = ((this.CapBalance == 0u) ? 2987233611u : 4187411203u); continue; case 1u: num ^= this.RateLimitCount.GetHashCode(); arg_447_0 = (num2 * 1870000508u ^ 1929156685u); continue; case 2u: arg_447_0 = ((this.Timeout != 0f) ? 2711066873u : 3747434162u); continue; case 3u: arg_447_0 = ((this.RateLimitSeconds != 0u) ? 3832522464u : 4112230557u); continue; case 4u: arg_447_0 = ((this.MethodId == 0u) ? 2198232386u : 4086635932u); continue; case 5u: arg_447_0 = ((RPCMethodConfig.smethod_1(this.MethodName) != 0) ? 4190276964u : 3160176276u); continue; case 6u: arg_447_0 = ((this.FixedCallCost == 0u) ? 2676124201u : 4122338587u); continue; case 7u: goto IL_4D4; case 8u: num ^= RPCMethodConfig.smethod_2(this.ServiceName); arg_447_0 = (num2 * 3294136410u ^ 3715061831u); continue; case 9u: num ^= this.FixedCallCost.GetHashCode(); arg_447_0 = (num2 * 786698523u ^ 2923931450u); continue; case 10u: num ^= this.FixedPacketSize.GetHashCode(); arg_447_0 = (num2 * 192953940u ^ 3936626797u); continue; case 11u: num ^= this.Timeout.GetHashCode(); arg_447_0 = (num2 * 383461813u ^ 3932159477u); continue; case 12u: num ^= this.Multiplier.GetHashCode(); arg_447_0 = (num2 * 3026068847u ^ 3158609982u); continue; case 13u: num ^= this.MaxEncodedSize.GetHashCode(); arg_447_0 = (num2 * 3577601118u ^ 2319864694u); continue; case 14u: num ^= this.MethodId.GetHashCode(); arg_447_0 = (num2 * 1335917678u ^ 693339398u); continue; case 15u: arg_447_0 = ((this.MaxPacketSize == 0u) ? 2465697134u : 2302800488u); continue; case 17u: num ^= this.CapBalance.GetHashCode(); arg_447_0 = (num2 * 4100021989u ^ 2968061278u); continue; case 18u: num ^= this.RateLimitSeconds.GetHashCode(); arg_447_0 = (num2 * 10074389u ^ 1836580199u); continue; case 19u: arg_447_0 = (((RPCMethodConfig.smethod_1(this.ServiceName) != 0) ? 4036672256u : 3024308557u) ^ num2 * 1982033726u); continue; case 20u: arg_447_0 = ((this.ServiceHash == 0u) ? 2207649942u : 3802113999u); continue; case 21u: num ^= this.IncomePerSecond.GetHashCode(); arg_447_0 = (num2 * 938139832u ^ 3283931902u); continue; case 22u: num ^= RPCMethodConfig.smethod_2(this.MethodName); arg_447_0 = (num2 * 1054385334u ^ 2712616752u); continue; case 23u: arg_447_0 = ((this.VariableMultiplier == 0f) ? 2174743469u : 2604929260u); continue; case 24u: arg_447_0 = ((this.RateLimitCount != 0u) ? 4032401875u : 3472390833u); continue; case 25u: arg_447_0 = ((this.IncomePerSecond == 0f) ? 3691402726u : 2183281511u); continue; case 26u: num ^= this.MaxPacketSize.GetHashCode(); arg_447_0 = (num2 * 2353561492u ^ 1639000166u); continue; case 27u: arg_447_0 = ((this.FixedPacketSize == 0u) ? 2173371173u : 4290690424u); continue; case 28u: arg_447_0 = ((this.MaxEncodedSize != 0u) ? 4203177439u : 2757584624u); continue; case 29u: num ^= this.ServiceHash.GetHashCode(); arg_447_0 = (num2 * 46800918u ^ 2447648424u); continue; case 30u: num ^= this.VariableMultiplier.GetHashCode(); arg_447_0 = (num2 * 234267977u ^ 3383976611u); continue; case 31u: arg_447_0 = ((this.Multiplier == 0f) ? 4287632010u : 3474430206u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (RPCMethodConfig.smethod_1(this.ServiceName) != 0) { goto IL_19C; } goto IL_5B9; uint arg_4F9_0; while (true) { IL_4F4: uint num; switch ((num = (arg_4F9_0 ^ 2884151322u)) % 41u) { case 0u: output.WriteRawTag(45); arg_4F9_0 = (num * 3361635207u ^ 1922580364u); continue; case 1u: output.WriteRawTag(18); output.WriteString(this.MethodName); arg_4F9_0 = (num * 2609882363u ^ 642811503u); continue; case 2u: output.WriteUInt32(this.RateLimitSeconds); arg_4F9_0 = (num * 2745150538u ^ 3810756879u); continue; case 3u: output.WriteRawTag(32); output.WriteUInt32(this.FixedPacketSize); arg_4F9_0 = (num * 3774119299u ^ 3207935295u); continue; case 4u: arg_4F9_0 = ((this.RateLimitSeconds == 0u) ? 3528529815u : 3483132615u); continue; case 5u: output.WriteFloat(this.Multiplier); arg_4F9_0 = (num * 466857150u ^ 1506041959u); continue; case 6u: output.WriteRawTag(112); output.WriteUInt32(this.ServiceHash); arg_4F9_0 = (num * 547764102u ^ 1097471791u); continue; case 8u: arg_4F9_0 = ((this.Timeout == 0f) ? 2340770204u : 3025394305u); continue; case 9u: output.WriteRawTag(56); arg_4F9_0 = (num * 3082440026u ^ 2656129602u); continue; case 10u: output.WriteUInt32(this.FixedCallCost); arg_4F9_0 = (num * 2026963474u ^ 1304787663u); continue; case 11u: arg_4F9_0 = ((this.ServiceHash == 0u) ? 2352635853u : 2483320737u); continue; case 12u: output.WriteRawTag(24); arg_4F9_0 = (num * 3125315484u ^ 4010179375u); continue; case 13u: arg_4F9_0 = ((this.RateLimitCount != 0u) ? 2984696233u : 3072844194u); continue; case 14u: arg_4F9_0 = ((this.CapBalance == 0u) ? 2366860448u : 2356540585u); continue; case 15u: arg_4F9_0 = ((this.IncomePerSecond != 0f) ? 3820001485u : 2888522784u); continue; case 16u: output.WriteUInt32(this.MaxEncodedSize); arg_4F9_0 = (num * 3342363908u ^ 1662015828u); continue; case 17u: output.WriteUInt32(this.MethodId); arg_4F9_0 = (num * 3862895317u ^ 4065945582u); continue; case 18u: arg_4F9_0 = ((this.FixedCallCost != 0u) ? 3561345584u : 3053868261u); continue; case 19u: arg_4F9_0 = ((this.MaxPacketSize != 0u) ? 3802397573u : 3333692791u); continue; case 20u: arg_4F9_0 = ((this.FixedPacketSize != 0u) ? 3971580404u : 3924598773u); continue; case 21u: output.WriteRawTag(53); arg_4F9_0 = (num * 2183887650u ^ 2700597397u); continue; case 22u: output.WriteRawTag(72); output.WriteUInt32(this.MaxPacketSize); arg_4F9_0 = (num * 1970891385u ^ 3235201360u); continue; case 23u: arg_4F9_0 = ((this.Multiplier != 0f) ? 3835324213u : 2295479609u); continue; case 24u: output.WriteRawTag(120); arg_4F9_0 = (num * 1221027870u ^ 3425799889u); continue; case 25u: output.WriteRawTag(64); arg_4F9_0 = (num * 2674284349u ^ 96275439u); continue; case 26u: output.WriteUInt32(this.RateLimitCount); arg_4F9_0 = (num * 4155376429u ^ 1595962204u); continue; case 27u: goto IL_19C; case 28u: output.WriteRawTag(109); arg_4F9_0 = (num * 1747518030u ^ 326154487u); continue; case 29u: output.WriteRawTag(80); arg_4F9_0 = (num * 2337199568u ^ 3148242829u); continue; case 30u: arg_4F9_0 = ((this.MaxEncodedSize == 0u) ? 3279767688u : 3217059664u); continue; case 31u: arg_4F9_0 = ((this.VariableMultiplier == 0f) ? 3855555639u : 3282687643u); continue; case 32u: output.WriteRawTag(93); output.WriteFloat(this.Timeout); arg_4F9_0 = (num * 2120380095u ^ 3941222969u); continue; case 33u: output.WriteRawTag(10); arg_4F9_0 = (num * 512795664u ^ 2016891545u); continue; case 34u: goto IL_5B9; case 35u: output.WriteString(this.ServiceName); arg_4F9_0 = (num * 1011690890u ^ 4064232930u); continue; case 36u: output.WriteUInt32(this.CapBalance); arg_4F9_0 = (num * 1034160297u ^ 634651785u); continue; case 37u: arg_4F9_0 = ((this.MethodId != 0u) ? 3169018404u : 2763489813u); continue; case 38u: output.WriteFloat(this.IncomePerSecond); arg_4F9_0 = (num * 1843235934u ^ 660300514u); continue; case 39u: output.WriteRawTag(96); arg_4F9_0 = (num * 2704216688u ^ 375660491u); continue; case 40u: output.WriteFloat(this.VariableMultiplier); arg_4F9_0 = (num * 2213951421u ^ 2576464954u); continue; } break; } return; IL_19C: arg_4F9_0 = 2556489580u; goto IL_4F4; IL_5B9: arg_4F9_0 = ((RPCMethodConfig.smethod_1(this.MethodName) != 0) ? 2680580103u : 3662378496u); goto IL_4F4; } public int CalculateSize() { int num = 0; while (true) { IL_49B: uint arg_40E_0 = 3188715502u; while (true) { uint num2; switch ((num2 = (arg_40E_0 ^ 2210734307u)) % 32u) { case 0u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.FixedPacketSize); arg_40E_0 = (num2 * 3295031233u ^ 888621127u); continue; case 1u: arg_40E_0 = ((this.Multiplier == 0f) ? 2668620721u : 2809944115u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.ServiceName); arg_40E_0 = (num2 * 811112049u ^ 3281296927u); continue; case 4u: arg_40E_0 = ((this.VariableMultiplier == 0f) ? 4242799490u : 2455654329u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.MethodName); arg_40E_0 = (num2 * 3088150001u ^ 1309016033u); continue; case 6u: arg_40E_0 = ((this.MaxPacketSize == 0u) ? 2784870212u : 2229202907u); continue; case 7u: arg_40E_0 = ((this.MaxEncodedSize != 0u) ? 3141281502u : 3033021146u); continue; case 8u: arg_40E_0 = ((this.IncomePerSecond != 0f) ? 2606467670u : 3189239167u); continue; case 9u: arg_40E_0 = ((this.CapBalance != 0u) ? 2357388072u : 2504351531u); continue; case 10u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MethodId); arg_40E_0 = (num2 * 253418307u ^ 2784217982u); continue; case 11u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.CapBalance); arg_40E_0 = (num2 * 2657169262u ^ 2734045457u); continue; case 12u: arg_40E_0 = ((this.FixedPacketSize == 0u) ? 3281321831u : 3622330307u); continue; case 13u: arg_40E_0 = (((RPCMethodConfig.smethod_1(this.ServiceName) != 0) ? 2892459515u : 3376108135u) ^ num2 * 3329316546u); continue; case 14u: num += 5; arg_40E_0 = (num2 * 1449917446u ^ 4188284926u); continue; case 15u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RateLimitSeconds); arg_40E_0 = (num2 * 628935846u ^ 2315996543u); continue; case 16u: num += 5; arg_40E_0 = (num2 * 2135311588u ^ 2905158385u); continue; case 17u: arg_40E_0 = ((this.MethodId != 0u) ? 2978172681u : 3624121152u); continue; case 18u: arg_40E_0 = ((this.RateLimitCount == 0u) ? 4083727216u : 2610563836u); continue; case 19u: arg_40E_0 = ((this.RateLimitSeconds == 0u) ? 3170637829u : 2838710348u); continue; case 20u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ServiceHash); arg_40E_0 = (num2 * 581578713u ^ 374235494u); continue; case 21u: num += 5; arg_40E_0 = (num2 * 4026931011u ^ 3708624160u); continue; case 22u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.FixedCallCost); arg_40E_0 = (num2 * 1625576255u ^ 3062923717u); continue; case 23u: arg_40E_0 = ((this.FixedCallCost == 0u) ? 3670334447u : 3786997173u); continue; case 24u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxPacketSize); arg_40E_0 = (num2 * 3771219273u ^ 787730876u); continue; case 25u: arg_40E_0 = ((this.Timeout == 0f) ? 2998349674u : 3637532045u); continue; case 26u: num += 5; arg_40E_0 = (num2 * 712593049u ^ 3149857608u); continue; case 27u: goto IL_49B; case 28u: arg_40E_0 = ((this.ServiceHash != 0u) ? 2650654487u : 2526283954u); continue; case 29u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxEncodedSize); arg_40E_0 = (num2 * 3343525219u ^ 2317221965u); continue; case 30u: arg_40E_0 = ((RPCMethodConfig.smethod_1(this.MethodName) != 0) ? 4128959750u : 3365251700u); continue; case 31u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RateLimitCount); arg_40E_0 = (num2 * 3261247506u ^ 854392158u); continue; } return num; } } return num; } public void MergeFrom(RPCMethodConfig other) { if (other == null) { goto IL_1F8; } goto IL_48C; uint arg_3EC_0; while (true) { IL_3E7: uint num; switch ((num = (arg_3EC_0 ^ 3865448963u)) % 33u) { case 0u: arg_3EC_0 = ((other.ServiceHash != 0u) ? 2500212125u : 2845083153u); continue; case 1u: this.FixedPacketSize = other.FixedPacketSize; arg_3EC_0 = (num * 3684449863u ^ 1978574976u); continue; case 2u: arg_3EC_0 = ((other.RateLimitCount != 0u) ? 2331194866u : 3130562369u); continue; case 3u: this.FixedCallCost = other.FixedCallCost; arg_3EC_0 = (num * 1064884203u ^ 1507015799u); continue; case 4u: this.VariableMultiplier = other.VariableMultiplier; arg_3EC_0 = (num * 2020249893u ^ 2453453197u); continue; case 5u: arg_3EC_0 = ((other.MaxEncodedSize == 0u) ? 3692652214u : 3936894358u); continue; case 6u: this.RateLimitCount = other.RateLimitCount; arg_3EC_0 = (num * 2843935852u ^ 373754605u); continue; case 7u: this.MethodId = other.MethodId; arg_3EC_0 = (num * 3516021251u ^ 1967479148u); continue; case 8u: return; case 9u: this.ServiceHash = other.ServiceHash; arg_3EC_0 = (num * 1111169119u ^ 408618419u); continue; case 10u: arg_3EC_0 = ((other.MethodId == 0u) ? 2958162873u : 3686372932u); continue; case 11u: goto IL_48C; case 12u: arg_3EC_0 = ((other.CapBalance != 0u) ? 2172770124u : 2238684934u); continue; case 13u: arg_3EC_0 = ((other.VariableMultiplier != 0f) ? 4288393565u : 2988466971u); continue; case 14u: arg_3EC_0 = ((other.IncomePerSecond == 0f) ? 3607050081u : 3988192245u); continue; case 15u: this.MaxEncodedSize = other.MaxEncodedSize; arg_3EC_0 = (num * 3367294105u ^ 2675749563u); continue; case 16u: this.MethodName = other.MethodName; arg_3EC_0 = (num * 2716809932u ^ 1445508710u); continue; case 18u: goto IL_1F8; case 19u: this.CapBalance = other.CapBalance; arg_3EC_0 = (num * 938468046u ^ 3810401428u); continue; case 20u: arg_3EC_0 = ((other.FixedCallCost != 0u) ? 4033319807u : 4103224483u); continue; case 21u: arg_3EC_0 = ((other.FixedPacketSize == 0u) ? 2363335762u : 2420500893u); continue; case 22u: this.MaxPacketSize = other.MaxPacketSize; arg_3EC_0 = (num * 1464198670u ^ 1655503240u); continue; case 23u: this.IncomePerSecond = other.IncomePerSecond; arg_3EC_0 = (num * 2155894550u ^ 680100421u); continue; case 24u: this.Timeout = other.Timeout; arg_3EC_0 = (num * 1274749684u ^ 638464935u); continue; case 25u: this.ServiceName = other.ServiceName; arg_3EC_0 = (num * 2923499561u ^ 3399253135u); continue; case 26u: arg_3EC_0 = ((other.Timeout != 0f) ? 3920554416u : 3497041723u); continue; case 27u: arg_3EC_0 = ((other.Multiplier == 0f) ? 3639429922u : 3714719199u); continue; case 28u: arg_3EC_0 = ((other.MaxPacketSize == 0u) ? 2404259482u : 2810699500u); continue; case 29u: arg_3EC_0 = ((RPCMethodConfig.smethod_1(other.MethodName) != 0) ? 2844757279u : 2507379766u); continue; case 30u: this.Multiplier = other.Multiplier; arg_3EC_0 = (num * 828800172u ^ 698121458u); continue; case 31u: this.RateLimitSeconds = other.RateLimitSeconds; arg_3EC_0 = (num * 14551771u ^ 861447725u); continue; case 32u: arg_3EC_0 = ((other.RateLimitSeconds != 0u) ? 3445270622u : 3417942434u); continue; } break; } return; IL_1F8: arg_3EC_0 = 2910388137u; goto IL_3E7; IL_48C: arg_3EC_0 = ((RPCMethodConfig.smethod_1(other.ServiceName) == 0) ? 3116490053u : 3244512953u); goto IL_3E7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_696: uint num; uint arg_59E_0 = ((num = input.ReadTag()) != 0u) ? 412083484u : 1718839264u; while (true) { uint num2; switch ((num2 = (arg_59E_0 ^ 612323707u)) % 55u) { case 0u: this.MaxPacketSize = input.ReadUInt32(); arg_59E_0 = 1073623282u; continue; case 1u: arg_59E_0 = (((num != 45u) ? 1874332766u : 249776093u) ^ num2 * 2910952289u); continue; case 2u: arg_59E_0 = (num2 * 3188785114u ^ 960787075u); continue; case 3u: goto IL_696; case 4u: this.MaxEncodedSize = input.ReadUInt32(); arg_59E_0 = 1092547775u; continue; case 5u: arg_59E_0 = (((num != 64u) ? 3066122621u : 3742221160u) ^ num2 * 1943991981u); continue; case 6u: arg_59E_0 = (num2 * 4246676405u ^ 2522299346u); continue; case 8u: arg_59E_0 = (num2 * 1726530364u ^ 2403605839u); continue; case 9u: input.SkipLastField(); arg_59E_0 = 1562421727u; continue; case 10u: arg_59E_0 = (((num == 24u) ? 909975940u : 1273616375u) ^ num2 * 3437737042u); continue; case 11u: arg_59E_0 = (num2 * 2839183259u ^ 654220212u); continue; case 12u: this.Multiplier = input.ReadFloat(); arg_59E_0 = 1430019082u; continue; case 13u: this.VariableMultiplier = input.ReadFloat(); arg_59E_0 = 833592230u; continue; case 14u: this.ServiceHash = input.ReadUInt32(); arg_59E_0 = 1562421727u; continue; case 15u: this.IncomePerSecond = input.ReadFloat(); arg_59E_0 = 1562421727u; continue; case 16u: arg_59E_0 = ((num == 112u) ? 232097734u : 660004738u); continue; case 17u: this.RateLimitSeconds = input.ReadUInt32(); arg_59E_0 = 372519143u; continue; case 18u: arg_59E_0 = (((num == 56u) ? 3052081304u : 2682846044u) ^ num2 * 647225749u); continue; case 19u: this.ServiceName = input.ReadString(); arg_59E_0 = 709194717u; continue; case 20u: arg_59E_0 = ((num != 80u) ? 89841618u : 1626988991u); continue; case 21u: arg_59E_0 = (num2 * 354632334u ^ 3824588897u); continue; case 22u: this.FixedPacketSize = input.ReadUInt32(); arg_59E_0 = 254118530u; continue; case 23u: arg_59E_0 = ((num > 56u) ? 630634720u : 580030312u); continue; case 24u: arg_59E_0 = (num2 * 2767127520u ^ 1017893421u); continue; case 25u: arg_59E_0 = (((num == 120u) ? 1970471568u : 579883472u) ^ num2 * 3426012549u); continue; case 26u: arg_59E_0 = (((num != 93u) ? 145640062u : 1067611525u) ^ num2 * 1711195847u); continue; case 27u: this.MethodId = input.ReadUInt32(); arg_59E_0 = 1562421727u; continue; case 28u: arg_59E_0 = (num2 * 4147607477u ^ 2081787704u); continue; case 29u: arg_59E_0 = (num2 * 4043435743u ^ 3574450203u); continue; case 30u: arg_59E_0 = (num2 * 2202082633u ^ 60488910u); continue; case 31u: arg_59E_0 = ((num > 109u) ? 1604695433u : 746026755u); continue; case 32u: arg_59E_0 = (num2 * 3465983904u ^ 3391122687u); continue; case 33u: arg_59E_0 = 412083484u; continue; case 34u: arg_59E_0 = (num2 * 75428561u ^ 3837998299u); continue; case 35u: this.Timeout = input.ReadFloat(); arg_59E_0 = 1562421727u; continue; case 36u: arg_59E_0 = (((num == 32u) ? 4037604629u : 4290623424u) ^ num2 * 1923216338u); continue; case 37u: arg_59E_0 = (num2 * 3058600995u ^ 3573921239u); continue; case 38u: arg_59E_0 = (((num != 18u) ? 1718598033u : 319864765u) ^ num2 * 298092794u); continue; case 39u: arg_59E_0 = (((num == 10u) ? 64198276u : 1947901687u) ^ num2 * 272035960u); continue; case 40u: arg_59E_0 = (num2 * 2918096555u ^ 1994560015u); continue; case 41u: arg_59E_0 = ((num != 53u) ? 517361070u : 2023350433u); continue; case 42u: arg_59E_0 = (num2 * 1106835318u ^ 1313231869u); continue; case 43u: this.RateLimitCount = input.ReadUInt32(); arg_59E_0 = 1562421727u; continue; case 44u: arg_59E_0 = (num2 * 660239291u ^ 3956136121u); continue; case 45u: this.MethodName = input.ReadString(); arg_59E_0 = 1562421727u; continue; case 46u: arg_59E_0 = ((num > 45u) ? 1437660217u : 569785377u); continue; case 47u: arg_59E_0 = (((num == 72u) ? 142576350u : 776214128u) ^ num2 * 3057973929u); continue; case 48u: arg_59E_0 = (((num <= 72u) ? 1968421289u : 1610878108u) ^ num2 * 3207283124u); continue; case 49u: arg_59E_0 = (((num != 96u) ? 4065603819u : 2768297895u) ^ num2 * 1631633579u); continue; case 50u: this.FixedCallCost = input.ReadUInt32(); arg_59E_0 = 75839401u; continue; case 51u: arg_59E_0 = (((num != 109u) ? 2339872997u : 3676273728u) ^ num2 * 3518558709u); continue; case 52u: arg_59E_0 = ((num > 93u) ? 237678934u : 2026461418u); continue; case 53u: this.CapBalance = input.ReadUInt32(); arg_59E_0 = 1044077776u; continue; case 54u: arg_59E_0 = (((num <= 24u) ? 1236006052u : 645109971u) ^ num2 * 875830576u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/RAFInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class RAFInfo : IMessage<RAFInfo>, IEquatable<RAFInfo>, IDeepCloneable<RAFInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RAFInfo.__c __9 = new RAFInfo.__c(); internal RAFInfo cctor>b__24_0() { return new RAFInfo(); } } private static readonly MessageParser<RAFInfo> _parser = new MessageParser<RAFInfo>(new Func<RAFInfo>(RAFInfo.__c.__9.<.cctor>b__24_0)); public const int RafInfoFieldNumber = 1; private ByteString rafInfo_ = ByteString.Empty; public static MessageParser<RAFInfo> Parser { get { return RAFInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[25]; } } MessageDescriptor IMessage.Descriptor { get { return RAFInfo.Descriptor; } } public ByteString RafInfo { get { return this.rafInfo_; } set { this.rafInfo_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public RAFInfo() { } public RAFInfo(RAFInfo other) : this() { while (true) { IL_3E: uint arg_26_0 = 1677394260u; while (true) { uint num; switch ((num = (arg_26_0 ^ 862971313u)) % 3u) { case 1u: this.rafInfo_ = other.rafInfo_; arg_26_0 = (num * 1529210122u ^ 3878197999u); continue; case 2u: goto IL_3E; } return; } } } public RAFInfo Clone() { return new RAFInfo(this); } public override bool Equals(object other) { return this.Equals(other as RAFInfo); } public bool Equals(RAFInfo other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -573111891) % 7) { case 0: goto IL_3E; case 1: return false; case 2: return true; case 3: goto IL_7A; case 4: arg_48_0 = ((this.RafInfo != other.RafInfo) ? -1823597647 : -441223242); continue; case 5: return false; } break; } return true; IL_3E: arg_48_0 = -439630878; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -765409213 : -1857775928); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 1049827981u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 1312806648u)) % 4u) { case 0u: goto IL_6E; case 1u: arg_52_0 = (((this.RafInfo.Length != 0) ? 2163283420u : 3387448601u) ^ num2 * 2581042367u); continue; case 3u: num ^= RAFInfo.smethod_0(this.RafInfo); arg_52_0 = (num2 * 3753509674u ^ 880764260u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.RafInfo.Length != 0) { while (true) { IL_60: uint arg_44_0 = 124295519u; while (true) { uint num; switch ((num = (arg_44_0 ^ 60625605u)) % 4u) { case 0u: goto IL_60; case 1u: output.WriteBytes(this.RafInfo); arg_44_0 = (num * 3538354654u ^ 1530580632u); continue; case 2u: output.WriteRawTag(10); arg_44_0 = (num * 1923166352u ^ 185832140u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.RafInfo.Length != 0) { while (true) { IL_4B: uint arg_33_0 = 4031944765u; while (true) { uint num2; switch ((num2 = (arg_33_0 ^ 2646041817u)) % 3u) { case 0u: goto IL_4B; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.RafInfo); arg_33_0 = (num2 * 1755022136u ^ 4179259230u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(RAFInfo other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 411047518u)) % 5u) { case 0u: goto IL_2D; case 2u: return; case 3u: this.RafInfo = other.RafInfo; arg_37_0 = (num * 1158816308u ^ 3279051318u); continue; case 4u: goto IL_63; } break; } return; IL_2D: arg_37_0 = 1698975626u; goto IL_32; IL_63: arg_37_0 = ((other.RafInfo.Length != 0) ? 949926875u : 1725084466u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) != 0u) ? 1797436250u : 15420157u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 641252932u)) % 7u) { case 0u: arg_72_0 = (num2 * 779833701u ^ 3226662939u); continue; case 1u: arg_72_0 = ((num == 10u) ? 1986592893u : 620662148u); continue; case 2u: this.RafInfo = input.ReadBytes(); arg_72_0 = 1827696307u; continue; case 3u: input.SkipLastField(); arg_72_0 = (num2 * 1616031503u ^ 1834292108u); continue; case 5u: arg_72_0 = 1797436250u; continue; case 6u: goto IL_A9; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/ItemFields.cs using System; public enum ItemFields { Owner = 12, ContainedIn = 16, Creator = 20, GiftCreator = 24, StackCount = 28, Expiration, SpellCharges, DynamicFlags = 35, Enchantment, PropertySeed = 75, RandomPropertiesID, Durability, MaxDurability, CreatePlayedTime, ModifiersMask, Context, ArtifactXP, ItemAppearanceModID = 84, End } <file_sep>/Bgs.Protocol.Presence.V1/RichPresenceLocalizationKey.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class RichPresenceLocalizationKey : IMessage<RichPresenceLocalizationKey>, IEquatable<RichPresenceLocalizationKey>, IDeepCloneable<RichPresenceLocalizationKey>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RichPresenceLocalizationKey.__c __9 = new RichPresenceLocalizationKey.__c(); internal RichPresenceLocalizationKey cctor>b__34_0() { return new RichPresenceLocalizationKey(); } } private static readonly MessageParser<RichPresenceLocalizationKey> _parser = new MessageParser<RichPresenceLocalizationKey>(new Func<RichPresenceLocalizationKey>(RichPresenceLocalizationKey.__c.__9.<.cctor>b__34_0)); public const int ProgramFieldNumber = 1; private uint program_; public const int StreamFieldNumber = 2; private uint stream_; public const int LocalizationIdFieldNumber = 3; private uint localizationId_; public static MessageParser<RichPresenceLocalizationKey> Parser { get { return RichPresenceLocalizationKey._parser; } } public static MessageDescriptor Descriptor { get { return PresenceTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return RichPresenceLocalizationKey.Descriptor; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Stream { get { return this.stream_; } set { this.stream_ = value; } } public uint LocalizationId { get { return this.localizationId_; } set { this.localizationId_ = value; } } public RichPresenceLocalizationKey() { } public RichPresenceLocalizationKey(RichPresenceLocalizationKey other) : this() { while (true) { IL_69: uint arg_4D_0 = 239885877u; while (true) { uint num; switch ((num = (arg_4D_0 ^ 773763000u)) % 4u) { case 0u: goto IL_69; case 1u: this.program_ = other.program_; this.stream_ = other.stream_; arg_4D_0 = (num * 1072491153u ^ 4056259878u); continue; case 3u: this.localizationId_ = other.localizationId_; arg_4D_0 = (num * 959145683u ^ 117072523u); continue; } return; } } } public RichPresenceLocalizationKey Clone() { return new RichPresenceLocalizationKey(this); } public override bool Equals(object other) { return this.Equals(other as RichPresenceLocalizationKey); } public bool Equals(RichPresenceLocalizationKey other) { if (other == null) { goto IL_8D; } goto IL_DD; int arg_97_0; while (true) { IL_92: switch ((arg_97_0 ^ 576687500) % 11) { case 0: goto IL_DD; case 2: goto IL_8D; case 3: arg_97_0 = ((this.Stream != other.Stream) ? 2124313502 : 512397732); continue; case 4: return false; case 5: return false; case 6: return false; case 7: return false; case 8: return true; case 9: arg_97_0 = ((this.LocalizationId == other.LocalizationId) ? 181879571 : 2060700508); continue; case 10: arg_97_0 = ((this.Program == other.Program) ? 1886013209 : 1448009172); continue; } break; } return true; IL_8D: arg_97_0 = 813544752; goto IL_92; IL_DD: arg_97_0 = ((other == this) ? 870519627 : 401727521); goto IL_92; } public override int GetHashCode() { return 1 ^ this.Program.GetHashCode() ^ this.Stream.GetHashCode() ^ this.LocalizationId.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); output.WriteFixed32(this.Program); output.WriteRawTag(21); while (true) { IL_7B: uint arg_5F_0 = 2850599417u; while (true) { uint num; switch ((num = (arg_5F_0 ^ 2995968122u)) % 4u) { case 0u: output.WriteRawTag(24); output.WriteUInt32(this.LocalizationId); arg_5F_0 = (num * 3219801557u ^ 2218691467u); continue; case 2u: goto IL_7B; case 3u: output.WriteFixed32(this.Stream); arg_5F_0 = (num * 1458481434u ^ 758832032u); continue; } return; } } } public int CalculateSize() { return 10 + (1 + CodedOutputStream.ComputeUInt32Size(this.LocalizationId)); } public void MergeFrom(RichPresenceLocalizationKey other) { if (other == null) { goto IL_AE; } goto IL_F8; uint arg_B8_0; while (true) { IL_B3: uint num; switch ((num = (arg_B8_0 ^ 1708817992u)) % 9u) { case 0u: goto IL_AE; case 1u: this.Program = other.Program; arg_B8_0 = (num * 1916846542u ^ 273097496u); continue; case 2u: this.LocalizationId = other.LocalizationId; arg_B8_0 = (num * 276069211u ^ 3382884434u); continue; case 3u: arg_B8_0 = ((other.LocalizationId != 0u) ? 308172124u : 136270926u); continue; case 4u: goto IL_F8; case 5u: arg_B8_0 = ((other.Stream != 0u) ? 1838522673u : 1523068740u); continue; case 7u: return; case 8u: this.Stream = other.Stream; arg_B8_0 = (num * 850757200u ^ 1353974932u); continue; } break; } return; IL_AE: arg_B8_0 = 456140179u; goto IL_B3; IL_F8: arg_B8_0 = ((other.Program != 0u) ? 1416861052u : 373970112u); goto IL_B3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_161: uint num; uint arg_111_0 = ((num = input.ReadTag()) != 0u) ? 3090308640u : 2159441283u; while (true) { uint num2; switch ((num2 = (arg_111_0 ^ 4234662460u)) % 13u) { case 0u: this.Program = input.ReadFixed32(); arg_111_0 = 4260328896u; continue; case 2u: arg_111_0 = 3090308640u; continue; case 3u: goto IL_161; case 4u: this.LocalizationId = input.ReadUInt32(); arg_111_0 = 3030596175u; continue; case 5u: input.SkipLastField(); arg_111_0 = (num2 * 2496723678u ^ 1422802717u); continue; case 6u: arg_111_0 = (num2 * 868087834u ^ 1997149655u); continue; case 7u: arg_111_0 = (num2 * 1145510764u ^ 1832105835u); continue; case 8u: arg_111_0 = (((num != 24u) ? 1076641526u : 457953535u) ^ num2 * 1351267445u); continue; case 9u: arg_111_0 = (num2 * 1988115869u ^ 2613469643u); continue; case 10u: this.Stream = input.ReadFixed32(); arg_111_0 = 4051281512u; continue; case 11u: arg_111_0 = (((num != 21u) ? 1128002247u : 875038072u) ^ num2 * 1109825437u); continue; case 12u: arg_111_0 = ((num == 13u) ? 2430476546u : 2818590370u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Channel.V1/SendMessageRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class SendMessageRequest : IMessage<SendMessageRequest>, IEquatable<SendMessageRequest>, IDeepCloneable<SendMessageRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendMessageRequest.__c __9 = new SendMessageRequest.__c(); internal SendMessageRequest cctor>b__34_0() { return new SendMessageRequest(); } } private static readonly MessageParser<SendMessageRequest> _parser = new MessageParser<SendMessageRequest>(new Func<SendMessageRequest>(SendMessageRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MessageFieldNumber = 2; private Message message_; public const int RequiredPrivilegesFieldNumber = 3; private ulong requiredPrivileges_; public static MessageParser<SendMessageRequest> Parser { get { return SendMessageRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return SendMessageRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public Message Message { get { return this.message_; } set { this.message_ = value; } } public ulong RequiredPrivileges { get { return this.requiredPrivileges_; } set { this.requiredPrivileges_ = value; } } public SendMessageRequest() { } public SendMessageRequest(SendMessageRequest other) : this() { while (true) { IL_44: int arg_2E_0 = 266522114; while (true) { switch ((arg_2E_0 ^ 1005237260) % 3) { case 0: goto IL_44; case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_2E_0 = 990239952; continue; } goto Block_2; } } Block_2: this.Message = ((other.message_ != null) ? other.Message.Clone() : null); this.requiredPrivileges_ = other.requiredPrivileges_; } public SendMessageRequest Clone() { return new SendMessageRequest(this); } public override bool Equals(object other) { return this.Equals(other as SendMessageRequest); } public bool Equals(SendMessageRequest other) { if (other == null) { goto IL_70; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ -1583525091) % 11) { case 0: return false; case 1: return false; case 2: return false; case 3: return false; case 4: return true; case 5: goto IL_E7; case 7: arg_A1_0 = ((this.RequiredPrivileges != other.RequiredPrivileges) ? -1740342186 : -1959881042); continue; case 8: goto IL_70; case 9: arg_A1_0 = ((!SendMessageRequest.smethod_0(this.Message, other.Message)) ? -1863358508 : -1846240042); continue; case 10: arg_A1_0 = ((!SendMessageRequest.smethod_0(this.AgentId, other.AgentId)) ? -801550044 : -102431483); continue; } break; } return true; IL_70: arg_A1_0 = -327996046; goto IL_9C; IL_E7: arg_A1_0 = ((other != this) ? -1204952479 : -1684305012); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_D6: uint arg_AE_0 = 676007855u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 984884557u)) % 7u) { case 0u: num ^= SendMessageRequest.smethod_1(this.AgentId); arg_AE_0 = (num2 * 2126002137u ^ 2716784138u); continue; case 1u: num ^= this.RequiredPrivileges.GetHashCode(); arg_AE_0 = (num2 * 986554025u ^ 3531406050u); continue; case 2u: arg_AE_0 = (((this.RequiredPrivileges == 0uL) ? 334329096u : 669660727u) ^ num2 * 1223590576u); continue; case 3u: goto IL_D6; case 4u: num ^= SendMessageRequest.smethod_1(this.Message); arg_AE_0 = 1878150154u; continue; case 5u: arg_AE_0 = (((this.agentId_ != null) ? 3136385702u : 3337085273u) ^ num2 * 842271026u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_0B; } goto IL_CA; uint arg_A2_0; while (true) { IL_9D: uint num; switch ((num = (arg_A2_0 ^ 1782303621u)) % 7u) { case 0u: arg_A2_0 = (((this.RequiredPrivileges != 0uL) ? 2177429440u : 2593236431u) ^ num * 1235946409u); continue; case 1u: goto IL_CA; case 2u: output.WriteMessage(this.Message); arg_A2_0 = (num * 218227085u ^ 2694536156u); continue; case 3u: output.WriteRawTag(24); output.WriteUInt64(this.RequiredPrivileges); arg_A2_0 = (num * 1400583811u ^ 253602730u); continue; case 5u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_A2_0 = (num * 3963316187u ^ 2582225057u); continue; case 6u: goto IL_0B; } break; } return; IL_0B: arg_A2_0 = 775054889u; goto IL_9D; IL_CA: output.WriteRawTag(18); arg_A2_0 = 1112156865u; goto IL_9D; } public int CalculateSize() { int num = 0; while (true) { IL_C6: uint arg_A2_0 = 893019063u; while (true) { uint num2; switch ((num2 = (arg_A2_0 ^ 1884856701u)) % 6u) { case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.RequiredPrivileges); arg_A2_0 = (num2 * 1117551205u ^ 1085620938u); continue; case 2u: arg_A2_0 = (((this.agentId_ != null) ? 4199071330u : 3005391315u) ^ num2 * 930728166u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_A2_0 = (num2 * 2775389816u ^ 2817798343u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Message); arg_A2_0 = ((this.RequiredPrivileges == 0uL) ? 349027085u : 2056489926u); continue; case 5u: goto IL_C6; } return num; } } return num; } public void MergeFrom(SendMessageRequest other) { if (other == null) { goto IL_18; } goto IL_197; uint arg_147_0; while (true) { IL_142: uint num; switch ((num = (arg_147_0 ^ 1243363372u)) % 13u) { case 0u: this.message_ = new Message(); arg_147_0 = (num * 2705335856u ^ 592598316u); continue; case 1u: this.RequiredPrivileges = other.RequiredPrivileges; arg_147_0 = (num * 1562832033u ^ 896592453u); continue; case 2u: arg_147_0 = (((this.message_ == null) ? 1293515090u : 1712829918u) ^ num * 373304734u); continue; case 3u: return; case 4u: arg_147_0 = (((this.agentId_ == null) ? 3482074292u : 4001597118u) ^ num * 1658911751u); continue; case 6u: arg_147_0 = ((other.RequiredPrivileges == 0uL) ? 572172745u : 1403491360u); continue; case 7u: this.AgentId.MergeFrom(other.AgentId); arg_147_0 = 233231300u; continue; case 8u: goto IL_197; case 9u: arg_147_0 = ((other.message_ == null) ? 1639949992u : 744135035u); continue; case 10u: this.agentId_ = new EntityId(); arg_147_0 = (num * 3270607941u ^ 1407333534u); continue; case 11u: this.Message.MergeFrom(other.Message); arg_147_0 = 1639949992u; continue; case 12u: goto IL_18; } break; } return; IL_18: arg_147_0 = 1660656625u; goto IL_142; IL_197: arg_147_0 = ((other.agentId_ != null) ? 361132878u : 233231300u); goto IL_142; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1E0: uint num; uint arg_184_0 = ((num = input.ReadTag()) != 0u) ? 2246317013u : 3999639208u; while (true) { uint num2; switch ((num2 = (arg_184_0 ^ 3356173597u)) % 16u) { case 0u: input.SkipLastField(); arg_184_0 = (num2 * 1758878166u ^ 4278471827u); continue; case 1u: goto IL_1E0; case 2u: arg_184_0 = (((num == 18u) ? 3290685772u : 3736280544u) ^ num2 * 3187791723u); continue; case 3u: this.RequiredPrivileges = input.ReadUInt64(); arg_184_0 = 3151027820u; continue; case 4u: arg_184_0 = 2246317013u; continue; case 6u: input.ReadMessage(this.agentId_); arg_184_0 = 3151027820u; continue; case 7u: arg_184_0 = ((this.message_ == null) ? 3957426740u : 3022716226u); continue; case 8u: arg_184_0 = ((num == 10u) ? 3319867920u : 4064901343u); continue; case 9u: this.message_ = new Message(); arg_184_0 = (num2 * 3899215463u ^ 1085344317u); continue; case 10u: arg_184_0 = (num2 * 3277961218u ^ 1189039320u); continue; case 11u: arg_184_0 = (((num == 24u) ? 3336785952u : 3412380291u) ^ num2 * 3509728330u); continue; case 12u: this.agentId_ = new EntityId(); arg_184_0 = (num2 * 2910710945u ^ 1679507015u); continue; case 13u: arg_184_0 = ((this.agentId_ != null) ? 3579485115u : 4128583009u); continue; case 14u: arg_184_0 = (num2 * 3384859555u ^ 794813734u); continue; case 15u: input.ReadMessage(this.message_); arg_184_0 = 2234864711u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/UnsubscribeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class UnsubscribeRequest : IMessage<UnsubscribeRequest>, IEquatable<UnsubscribeRequest>, IDeepCloneable<UnsubscribeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UnsubscribeRequest.__c __9 = new UnsubscribeRequest.__c(); internal UnsubscribeRequest cctor>b__29_0() { return new UnsubscribeRequest(); } } private static readonly MessageParser<UnsubscribeRequest> _parser = new MessageParser<UnsubscribeRequest>(new Func<UnsubscribeRequest>(UnsubscribeRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int ObjectIdFieldNumber = 2; private ulong objectId_; public static MessageParser<UnsubscribeRequest> Parser { get { return UnsubscribeRequest._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return UnsubscribeRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public UnsubscribeRequest() { } public UnsubscribeRequest(UnsubscribeRequest other) : this() { while (true) { IL_50: int arg_3A_0 = 53113771; while (true) { switch ((arg_3A_0 ^ 308823771) % 3) { case 0: goto IL_50; case 2: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.objectId_ = other.objectId_; arg_3A_0 = 669613438; continue; } return; } } } public UnsubscribeRequest Clone() { return new UnsubscribeRequest(this); } public override bool Equals(object other) { return this.Equals(other as UnsubscribeRequest); } public bool Equals(UnsubscribeRequest other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 2011978474) % 9) { case 0: goto IL_68; case 1: arg_72_0 = ((!UnsubscribeRequest.smethod_0(this.AgentId, other.AgentId)) ? 899015468 : 1289550483); continue; case 2: return false; case 3: return false; case 4: arg_72_0 = ((this.ObjectId == other.ObjectId) ? 1402616943 : 1968628643); continue; case 5: goto IL_B0; case 6: return false; case 7: return true; } break; } return true; IL_68: arg_72_0 = 812173420; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 122967666 : 819544496); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_B5: uint arg_91_0 = 957382711u; while (true) { uint num2; switch ((num2 = (arg_91_0 ^ 266380538u)) % 6u) { case 0u: goto IL_B5; case 1u: arg_91_0 = (((this.agentId_ != null) ? 2107970885u : 1526292114u) ^ num2 * 1607028076u); continue; case 2u: arg_91_0 = ((this.ObjectId != 0uL) ? 243702259u : 638901678u); continue; case 3u: num ^= UnsubscribeRequest.smethod_1(this.AgentId); arg_91_0 = (num2 * 1112384014u ^ 1419666756u); continue; case 5u: num ^= this.ObjectId.GetHashCode(); arg_91_0 = (num2 * 3849047431u ^ 228178193u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_60; } goto IL_96; uint arg_6A_0; while (true) { IL_65: uint num; switch ((num = (arg_6A_0 ^ 1872623450u)) % 5u) { case 0u: goto IL_60; case 1u: goto IL_96; case 2u: output.WriteRawTag(16); output.WriteUInt64(this.ObjectId); arg_6A_0 = (num * 1750379039u ^ 2900124129u); continue; case 3u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_6A_0 = (num * 120492324u ^ 2334261026u); continue; } break; } return; IL_60: arg_6A_0 = 1926634185u; goto IL_65; IL_96: arg_6A_0 = ((this.ObjectId != 0uL) ? 1230744603u : 1865307966u); goto IL_65; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_1C; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 3248366680u)) % 5u) { case 0u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_64_0 = (num2 * 760999335u ^ 3255579595u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_64_0 = (num2 * 481811305u ^ 2340939108u); continue; case 2u: goto IL_1C; case 4u: goto IL_90; } break; } return num; IL_1C: arg_64_0 = 2693288099u; goto IL_5F; IL_90: arg_64_0 = ((this.ObjectId != 0uL) ? 2879044080u : 3282260819u); goto IL_5F; } public void MergeFrom(UnsubscribeRequest other) { if (other == null) { goto IL_5F; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 658700164u)) % 9u) { case 0u: arg_BC_0 = ((other.ObjectId != 0uL) ? 1704888739u : 1902013505u); continue; case 2u: goto IL_FC; case 3u: this.agentId_ = new EntityId(); arg_BC_0 = (num * 3466514115u ^ 3137619380u); continue; case 4u: this.AgentId.MergeFrom(other.AgentId); arg_BC_0 = 2002688384u; continue; case 5u: goto IL_5F; case 6u: arg_BC_0 = (((this.agentId_ != null) ? 2645841760u : 2969614784u) ^ num * 2389102190u); continue; case 7u: this.ObjectId = other.ObjectId; arg_BC_0 = (num * 861942774u ^ 838636091u); continue; case 8u: return; } break; } return; IL_5F: arg_BC_0 = 113857904u; goto IL_B7; IL_FC: arg_BC_0 = ((other.agentId_ == null) ? 2002688384u : 498547382u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14D: uint num; uint arg_101_0 = ((num = input.ReadTag()) == 0u) ? 1978932372u : 2074778328u; while (true) { uint num2; switch ((num2 = (arg_101_0 ^ 1929955651u)) % 12u) { case 0u: arg_101_0 = ((this.agentId_ == null) ? 1106593338u : 1555752573u); continue; case 1u: input.SkipLastField(); arg_101_0 = (num2 * 428860982u ^ 663949530u); continue; case 2u: arg_101_0 = (num2 * 436605743u ^ 2408102133u); continue; case 3u: arg_101_0 = ((num != 10u) ? 1786854149u : 1339859487u); continue; case 4u: arg_101_0 = 2074778328u; continue; case 5u: this.ObjectId = input.ReadUInt64(); arg_101_0 = 153735471u; continue; case 6u: arg_101_0 = (((num != 16u) ? 1221705688u : 171315788u) ^ num2 * 154348623u); continue; case 7u: arg_101_0 = (num2 * 1295685286u ^ 2537560149u); continue; case 8u: goto IL_14D; case 9u: this.agentId_ = new EntityId(); arg_101_0 = (num2 * 2822686883u ^ 3932947574u); continue; case 10u: input.ReadMessage(this.agentId_); arg_101_0 = 1859324933u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/OwnershipRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class OwnershipRequest : IMessage<OwnershipRequest>, IEquatable<OwnershipRequest>, IDeepCloneable<OwnershipRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly OwnershipRequest.__c __9 = new OwnershipRequest.__c(); internal OwnershipRequest cctor>b__29_0() { return new OwnershipRequest(); } } private static readonly MessageParser<OwnershipRequest> _parser = new MessageParser<OwnershipRequest>(new Func<OwnershipRequest>(OwnershipRequest.__c.__9.<.cctor>b__29_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int ReleaseOwnershipFieldNumber = 2; private bool releaseOwnership_; public static MessageParser<OwnershipRequest> Parser { get { return OwnershipRequest._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return OwnershipRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public bool ReleaseOwnership { get { return this.releaseOwnership_; } set { this.releaseOwnership_ = value; } } public OwnershipRequest() { } public OwnershipRequest(OwnershipRequest other) : this() { while (true) { IL_65: uint arg_49_0 = 1386085487u; while (true) { uint num; switch ((num = (arg_49_0 ^ 24892521u)) % 4u) { case 1u: this.releaseOwnership_ = other.releaseOwnership_; arg_49_0 = (num * 3427454858u ^ 3922417811u); continue; case 2u: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); arg_49_0 = 694930936u; continue; case 3u: goto IL_65; } return; } } } public OwnershipRequest Clone() { return new OwnershipRequest(this); } public override bool Equals(object other) { return this.Equals(other as OwnershipRequest); } public bool Equals(OwnershipRequest other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -628947378) % 9) { case 0: goto IL_68; case 1: arg_72_0 = (OwnershipRequest.smethod_0(this.EntityId, other.EntityId) ? -1048091625 : -259257764); continue; case 2: return false; case 4: return false; case 5: arg_72_0 = ((this.ReleaseOwnership != other.ReleaseOwnership) ? -1703152499 : -1830007610); continue; case 6: return false; case 7: return true; case 8: goto IL_B0; } break; } return true; IL_68: arg_72_0 = -1336479038; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? -80381928 : -507212336); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_90: uint arg_70_0 = 19319895u; while (true) { uint num2; switch ((num2 = (arg_70_0 ^ 1509125674u)) % 5u) { case 0u: goto IL_90; case 1u: num ^= this.ReleaseOwnership.GetHashCode(); arg_70_0 = (num2 * 1759895168u ^ 281423987u); continue; case 2u: arg_70_0 = ((this.ReleaseOwnership ? 1565467478u : 1905985969u) ^ num2 * 3564412098u); continue; case 3u: num ^= OwnershipRequest.smethod_1(this.EntityId); arg_70_0 = (num2 * 3145157657u ^ 3545582366u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.EntityId); while (true) { IL_94: uint arg_74_0 = 108822597u; while (true) { uint num; switch ((num = (arg_74_0 ^ 1427593465u)) % 5u) { case 0u: goto IL_94; case 2u: output.WriteBool(this.ReleaseOwnership); arg_74_0 = (num * 2113839640u ^ 133559216u); continue; case 3u: output.WriteRawTag(16); arg_74_0 = (num * 4214762446u ^ 3258248645u); continue; case 4u: arg_74_0 = (((!this.ReleaseOwnership) ? 4136785612u : 3816575923u) ^ num * 1051227201u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_82: uint arg_62_0 = 499299914u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 2049717449u)) % 5u) { case 0u: num += 2; arg_62_0 = (num2 * 2544396049u ^ 1700872687u); continue; case 1u: arg_62_0 = (((!this.ReleaseOwnership) ? 4048805570u : 2910922164u) ^ num2 * 3446204578u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_62_0 = (num2 * 2344764876u ^ 215116005u); continue; case 4u: goto IL_82; } return num; } } return num; } public void MergeFrom(OwnershipRequest other) { if (other == null) { goto IL_18; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 297499611u)) % 9u) { case 0u: this.entityId_ = new EntityId(); arg_BC_0 = (num * 3955547626u ^ 242513386u); continue; case 1u: goto IL_FC; case 2u: arg_BC_0 = ((!other.ReleaseOwnership) ? 1172965711u : 1164771119u); continue; case 3u: this.ReleaseOwnership = other.ReleaseOwnership; arg_BC_0 = (num * 3660147101u ^ 3307377899u); continue; case 5u: return; case 6u: this.EntityId.MergeFrom(other.EntityId); arg_BC_0 = 1564063050u; continue; case 7u: arg_BC_0 = (((this.entityId_ != null) ? 2600781807u : 2168664346u) ^ num * 3073111857u); continue; case 8u: goto IL_18; } break; } return; IL_18: arg_BC_0 = 633445819u; goto IL_B7; IL_FC: arg_BC_0 = ((other.entityId_ != null) ? 618114678u : 1564063050u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13D: uint num; uint arg_F5_0 = ((num = input.ReadTag()) != 0u) ? 4071765425u : 2148123763u; while (true) { uint num2; switch ((num2 = (arg_F5_0 ^ 3438222453u)) % 11u) { case 0u: this.entityId_ = new EntityId(); arg_F5_0 = (num2 * 124635687u ^ 1325476647u); continue; case 1u: arg_F5_0 = (((num == 16u) ? 2048733064u : 771141040u) ^ num2 * 1600740985u); continue; case 3u: arg_F5_0 = ((num == 10u) ? 2805578170u : 3992346182u); continue; case 4u: arg_F5_0 = (num2 * 3738612383u ^ 3869373126u); continue; case 5u: goto IL_13D; case 6u: arg_F5_0 = ((this.entityId_ == null) ? 2352545510u : 4165183810u); continue; case 7u: arg_F5_0 = 4071765425u; continue; case 8u: input.ReadMessage(this.entityId_); arg_F5_0 = 3098750295u; continue; case 9u: this.ReleaseOwnership = input.ReadBool(); arg_F5_0 = 3098750295u; continue; case 10u: input.SkipLastField(); arg_F5_0 = (num2 * 4255643215u ^ 3438247992u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/MapFieldAccessor.cs using System; using System.Collections; using System.Reflection; namespace Google.Protobuf.Reflection { internal sealed class MapFieldAccessor : FieldAccessorBase { internal MapFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) : base(property, descriptor) { } public override void Clear(IMessage message) { MapFieldAccessor.smethod_0((IDictionary)base.GetValue(message)); } public override void SetValue(IMessage message, object value) { throw MapFieldAccessor.smethod_1(Module.smethod_37<string>(1983005471u)); } static void smethod_0(IDictionary idictionary_0) { idictionary_0.Clear(); } static InvalidOperationException smethod_1(string string_0) { return new InvalidOperationException(string_0); } } } <file_sep>/DynamicObjectFields.cs using System; public enum DynamicObjectFields { Caster = 12, Type = 16, SpellXSpellVisualID, SpellID, Radius, CastTime, End } <file_sep>/AuthServer.WorldServer.Game.Entities/WorldObject.cs using AuthServer.Game.Entities; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.Collections; using System.Reflection; using System.Runtime.Serialization; namespace AuthServer.WorldServer.Game.Entities { [DataContract] [Serializable] public class WorldObject { public SmartGuid SGuid; [DataMember] public ulong Guid; [DataMember] public Vector4 Position; [DataMember] public uint Map; public ulong TargetGuid; public int MaskSize; [DataMember] public int DataLength; public BitArray Mask; public Hashtable UpdateData = WorldObject.smethod_0(); public WorldObject() { } public WorldObject(int dataLength) { this.DataLength = dataLength; this.MaskSize = dataLength / 32; this.Mask = WorldObject.smethod_1(dataLength, false); } public bool CheckDistance(WorldObject obj, float dist = 100000f) { if (this.Map == obj.Map) { float arg_89_0 = (float)WorldObject.smethod_2((double)(this.Position.X - obj.Position.X), 2.0); float num = (float)WorldObject.smethod_2((double)(this.Position.Y - obj.Position.Y), 2.0); float num2 = (float)WorldObject.smethod_2((double)(this.Position.Z - obj.Position.Z), 2.0); return arg_89_0 + num + num2 <= dist; } return false; } public virtual void SetUpdateFields() { } public void SetItemUpdateFields(SmartGuid guid, int itemId = 0, int modId = 0) { this.SetUpdateField<ulong>(0, guid.Guid, 0); while (true) { IL_1C1: uint arg_184_0 = 1063411794u; while (true) { uint num; switch ((num = (arg_184_0 ^ 72283757u)) % 12u) { case 0u: { SmartGuid smartGuid; this.SetUpdateField<ulong>(14, smartGuid.HighGuid, 0); this.SetUpdateField<ulong>(16, smartGuid.Guid, 0); arg_184_0 = (num * 3453894861u ^ 1482513746u); continue; } case 1u: this.SetUpdateField<uint>(28, 1u, 0); this.SetUpdateField<uint>(35, 196609u, 0); arg_184_0 = (num * 3852825095u ^ 3796627504u); continue; case 2u: goto IL_1C1; case 4u: { SmartGuid smartGuid = new SmartGuid { Type = GuidType.Player, CreationBits = this.Guid, RealmId = 1 }; this.SetUpdateField<ulong>(12, smartGuid.Guid, 0); arg_184_0 = (num * 1312344684u ^ 2002962573u); continue; } case 5u: this.SetUpdateField<float>(11, 1f, 0); arg_184_0 = (num * 1291593438u ^ 3694125931u); continue; case 6u: this.SetUpdateField<int>(84, modId, 0); arg_184_0 = (num * 3334826283u ^ 625357320u); continue; case 7u: this.SetUpdateField<ulong>(2, guid.HighGuid, 0); arg_184_0 = (num * 109549280u ^ 4216859312u); continue; case 8u: this.SetUpdateField<uint>(78, 85u, 0); arg_184_0 = (num * 2647184815u ^ 1924686639u); continue; case 9u: this.SetUpdateField<int>(8, 3, 0); this.SetUpdateField<int>(9, itemId, 0); arg_184_0 = (num * 743845792u ^ 4144677760u); continue; case 10u: this.SetUpdateField<uint>(77, 85u, 0); arg_184_0 = (num * 2126794692u ^ 1334550125u); continue; case 11u: { SmartGuid smartGuid; this.SetUpdateField<ulong>(18, smartGuid.HighGuid, 0); arg_184_0 = (num * 701019929u ^ 3960210607u); continue; } } goto Block_1; } } Block_1: this.SetUpdateField<long>(82, 14075510000L, 0); } public void SetUpdateField<T>(int index, T value, byte offset = 0) { if (this.UpdateData == null) { goto IL_3E1; } goto IL_4C1; uint arg_438_0; string string_; ulong num3; while (true) { IL_433: uint num; switch ((num = (arg_438_0 ^ 1078523441u)) % 31u) { case 0u: arg_438_0 = ((WorldObject.smethod_4(string_, Module.smethod_35<string>(471189065u)) ? 2769783969u : 3556855128u) ^ num * 2244124706u); continue; case 1u: this.UpdateData = WorldObject.smethod_0(); arg_438_0 = (num * 1235961168u ^ 1201306209u); continue; case 2u: goto IL_3E1; case 3u: return; case 4u: arg_438_0 = ((WorldObject.smethod_6(this.UpdateData, index) ? 2508933868u : 3083554084u) ^ num * 919501449u); continue; case 5u: return; case 6u: WorldObject.smethod_5(this.Mask, index + 1, true); arg_438_0 = (num * 3174523526u ^ 779944474u); continue; case 7u: WorldObject.smethod_10(this.UpdateData, index, (int)WorldObject.smethod_7(this.UpdateData, index) | (int)WorldObject.smethod_9(value, WorldObject.smethod_8(typeof(int).TypeHandle)) << (int)(offset * (WorldObject.smethod_4(string_, Module.smethod_37<string>(2367085557u)) ? 8 : 16))); arg_438_0 = 1814176547u; continue; case 8u: arg_438_0 = (num * 2027589988u ^ 1662781883u); continue; case 9u: { long num2 = (long)WorldObject.smethod_9(value, WorldObject.smethod_8(typeof(long).TypeHandle)); WorldObject.smethod_10(this.UpdateData, index, (uint)(num2 & 2147483647L)); arg_438_0 = (num * 441206569u ^ 3288547449u); continue; } case 10u: arg_438_0 = (((!WorldObject.smethod_4(string_, Module.smethod_36<string>(4148125342u))) ? 3051065104u : 2722040491u) ^ num * 1311538312u); continue; case 11u: WorldObject.smethod_5(this.Mask, index, true); WorldObject.smethod_5(this.Mask, index + 1, true); arg_438_0 = 2066190807u; continue; case 12u: return; case 13u: arg_438_0 = (((!WorldObject.smethod_4(string_, Module.smethod_33<string>(442578807u))) ? 4226308765u : 2424126876u) ^ num * 3266367109u); continue; case 14u: WorldObject.smethod_5(this.Mask, index, true); arg_438_0 = 390023262u; continue; case 15u: WorldObject.smethod_10(this.UpdateData, index, value); arg_438_0 = (num * 942141689u ^ 47258091u); continue; case 16u: goto IL_4E1; case 17u: { long num2; WorldObject.smethod_10(this.UpdateData, index + 1, (uint)(num2 >> 32 & 2147483647L)); arg_438_0 = (num * 2181430052u ^ 2907402656u); continue; } case 18u: WorldObject.smethod_5(this.Mask, index, true); arg_438_0 = 595910673u; continue; case 19u: num3 = (ulong)WorldObject.smethod_9(value, WorldObject.smethod_8(typeof(ulong).TypeHandle)); arg_438_0 = (num * 2843172724u ^ 682357435u); continue; case 21u: goto IL_530; case 22u: arg_438_0 = (((!WorldObject.smethod_4(string_, Module.smethod_37<string>(3097521771u))) ? 3467220426u : 2229331461u) ^ num * 1271791227u); continue; case 23u: goto IL_4C1; case 24u: WorldObject.smethod_5(this.Mask, index, true); arg_438_0 = 1254435409u; continue; case 25u: WorldObject.smethod_5(this.Mask, index, true); arg_438_0 = 920397743u; continue; case 26u: arg_438_0 = ((WorldObject.smethod_4(string_, Module.smethod_35<string>(3073353507u)) ? 1419483600u : 317806583u) ^ num * 3771367217u); continue; case 27u: goto IL_595; case 28u: WorldObject.smethod_10(this.UpdateData, index, (uint)WorldObject.smethod_9(value, WorldObject.smethod_8(typeof(uint).TypeHandle)) << (int)(offset * (WorldObject.smethod_4(string_, Module.smethod_35<string>(3073353507u)) ? 8 : 16))); arg_438_0 = 1549646685u; continue; case 29u: arg_438_0 = (((!WorldObject.smethod_4(string_, Module.smethod_34<string>(1485958124u))) ? 3130158510u : 3316577943u) ^ num * 3739135092u); continue; case 30u: arg_438_0 = ((WorldObject.smethod_6(this.UpdateData, index) ? 60155166u : 46010574u) ^ num * 1953978871u); continue; } break; } return; IL_4E1: WorldObject.smethod_10(this.UpdateData, index, (int)WorldObject.smethod_9(value, WorldObject.smethod_8(typeof(int).TypeHandle)) << (int)(offset * (WorldObject.smethod_4(string_, Module.smethod_36<string>(3195932721u)) ? 8 : 16))); return; IL_530: WorldObject.smethod_10(this.UpdateData, index, (uint)WorldObject.smethod_7(this.UpdateData, index) | (uint)WorldObject.smethod_9(value, WorldObject.smethod_8(typeof(uint).TypeHandle)) << (int)(offset * (WorldObject.smethod_4(string_, Module.smethod_37<string>(1636649343u)) ? 8 : 16))); return; IL_595: WorldObject.smethod_10(this.UpdateData, index, (uint)(num3 & 4294967295uL)); WorldObject.smethod_10(this.UpdateData, index + 1, (uint)(num3 >> 32 & 4294967295uL)); return; IL_3E1: arg_438_0 = 1035292382u; goto IL_433; IL_4C1: string_ = WorldObject.smethod_3(value.GetType()); arg_438_0 = 44427092u; goto IL_433; } public void WriteUpdateFields(ref PacketWriter packet) { packet.WriteUInt8((byte)this.MaskSize); while (true) { IL_0E: uint arg_18_0 = 3366670953u; while (true) { uint num; int num2; int arg_8E_0; switch ((num = (arg_18_0 ^ 4235975302u)) % 6u) { case 0u: goto IL_0E; case 1u: goto IL_CE; case 2u: IL_76: if (num2 >= WorldObject.smethod_13(this.Mask)) { arg_8E_0 = -1464656900; goto IL_89; } break; case 3u: num2 = 0; arg_18_0 = (num * 2481430274u ^ 527075398u); continue; case 4u: break; case 5u: packet.WriteBitArray(this.Mask, this.MaskSize * 4); arg_18_0 = (num * 1921983537u ^ 3048034970u); continue; default: goto IL_CE; } if (WorldObject.smethod_11(this.Mask, num2)) { arg_18_0 = 3713779421u; continue; } goto IL_226; IL_89: switch ((arg_8E_0 ^ -58991994) % 3) { case 0: IL_A9: arg_8E_0 = -385541468; goto IL_89; case 1: goto IL_76; } goto Block_4; IL_226: num2++; goto IL_A9; IL_CE: if (WorldObject.smethod_6(this.UpdateData, num2)) { try { string string_ = WorldObject.smethod_3(WorldObject.smethod_12(WorldObject.smethod_7(this.UpdateData, num2))); if (!WorldObject.smethod_4(string_, Module.smethod_36<string>(4292810432u))) { goto IL_180; } goto IL_1FD; uint arg_1CC_0; while (true) { IL_1C7: switch ((num = (arg_1CC_0 ^ 4235975302u)) % 9u) { case 0u: arg_1CC_0 = (num * 1956267406u ^ 2145021447u); continue; case 1u: arg_1CC_0 = (((!WorldObject.smethod_4(string_, Module.smethod_35<string>(1254913650u))) ? 3224060110u : 3558025122u) ^ num * 1827654248u); continue; case 2u: goto IL_180; case 3u: arg_1CC_0 = (num * 3871578959u ^ 3344296025u); continue; case 4u: arg_1CC_0 = (num * 1694166464u ^ 3454029761u); continue; case 5u: packet.WriteInt32((int)WorldObject.smethod_7(this.UpdateData, num2)); arg_1CC_0 = 3967916097u; continue; case 7u: goto IL_1FD; case 8u: packet.WriteFloat((float)WorldObject.smethod_7(this.UpdateData, num2)); arg_1CC_0 = 3192550676u; continue; } break; } goto IL_226; IL_180: arg_1CC_0 = 3652733696u; goto IL_1C7; IL_1FD: packet.WriteUInt32((uint)WorldObject.smethod_7(this.UpdateData, num2)); arg_1CC_0 = 3667907139u; goto IL_1C7; } catch { } goto IL_226; } goto IL_226; } } Block_4: WorldObject.smethod_14(this.Mask, false); } public void WriteDynamicUpdateFields(ref PacketWriter packet) { packet.WriteUInt8(0); } public void RemoveFromWorld() { } public Character ToCharacter() { return this as Character; } static Hashtable smethod_0() { return new Hashtable(); } static BitArray smethod_1(int int_0, bool bool_0) { return new BitArray(int_0, bool_0); } static double smethod_2(double double_0, double double_1) { return Math.Pow(double_0, double_1); } static string smethod_3(MemberInfo memberInfo_0) { return memberInfo_0.Name; } static bool smethod_4(string string_0, string string_1) { return string_0 == string_1; } static void smethod_5(BitArray bitArray_0, int int_0, bool bool_0) { bitArray_0.Set(int_0, bool_0); } static bool smethod_6(Hashtable hashtable_0, object object_0) { return hashtable_0.ContainsKey(object_0); } static object smethod_7(Hashtable hashtable_0, object object_0) { return hashtable_0[object_0]; } static Type smethod_8(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static object smethod_9(object object_0, Type type_0) { return Convert.ChangeType(object_0, type_0); } static void smethod_10(Hashtable hashtable_0, object object_0, object object_1) { hashtable_0[object_0] = object_1; } static bool smethod_11(BitArray bitArray_0, int int_0) { return bitArray_0.Get(int_0); } static Type smethod_12(object object_0) { return object_0.GetType(); } static int smethod_13(BitArray bitArray_0) { return bitArray_0.Count; } static void smethod_14(BitArray bitArray_0, bool bool_0) { bitArray_0.SetAll(bool_0); } } } <file_sep>/Google.Protobuf.Reflection/UninterpretedOption.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class UninterpretedOption : IMessage, IMessage<UninterpretedOption>, IEquatable<UninterpretedOption>, IDeepCloneable<UninterpretedOption> { [DebuggerNonUserCode] public static class Types { [DebuggerNonUserCode] internal sealed class NamePart : IMessage, IMessage<UninterpretedOption.Types.NamePart>, IEquatable<UninterpretedOption.Types.NamePart>, IDeepCloneable<UninterpretedOption.Types.NamePart> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UninterpretedOption.Types.NamePart.__c __9 = new UninterpretedOption.Types.NamePart.__c(); internal UninterpretedOption.Types.NamePart cctor>b__29_0() { return new UninterpretedOption.Types.NamePart(); } } private static readonly MessageParser<UninterpretedOption.Types.NamePart> _parser = new MessageParser<UninterpretedOption.Types.NamePart>(new Func<UninterpretedOption.Types.NamePart>(UninterpretedOption.Types.NamePart.__c.__9.<.cctor>b__29_0)); public const int NamePart_FieldNumber = 1; private string namePart_ = ""; public const int IsExtensionFieldNumber = 2; private bool isExtension_; public static MessageParser<UninterpretedOption.Types.NamePart> Parser { get { return UninterpretedOption.Types.NamePart._parser; } } public static MessageDescriptor Descriptor { get { return UninterpretedOption.Descriptor.NestedTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return UninterpretedOption.Types.NamePart.Descriptor; } } public string NamePart_ { get { return this.namePart_; } set { this.namePart_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public bool IsExtension { get { return this.isExtension_; } set { this.isExtension_ = value; } } public NamePart() { } public NamePart(UninterpretedOption.Types.NamePart other) : this() { this.namePart_ = other.namePart_; this.isExtension_ = other.isExtension_; } public UninterpretedOption.Types.NamePart Clone() { return new UninterpretedOption.Types.NamePart(this); } public override bool Equals(object other) { return this.Equals(other as UninterpretedOption.Types.NamePart); } public bool Equals(UninterpretedOption.Types.NamePart other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -387377425) % 9) { case 0: goto IL_68; case 1: arg_72_0 = ((this.IsExtension == other.IsExtension) ? -1924029948 : -558966760); continue; case 2: return false; case 3: return false; case 5: arg_72_0 = (UninterpretedOption.Types.NamePart.smethod_0(this.NamePart_, other.NamePart_) ? -231889770 : -1226820563); continue; case 6: goto IL_B0; case 7: return true; case 8: return false; } break; } return true; IL_68: arg_72_0 = -946491953; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? -926915111 : -695832613); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_BA: uint arg_96_0 = 2757507798u; while (true) { uint num2; switch ((num2 = (arg_96_0 ^ 3604878020u)) % 6u) { case 0u: goto IL_BA; case 2u: arg_96_0 = (((UninterpretedOption.Types.NamePart.smethod_1(this.NamePart_) == 0) ? 2197391559u : 2654516929u) ^ num2 * 428343585u); continue; case 3u: arg_96_0 = (this.IsExtension ? 3140710962u : 2608754689u); continue; case 4u: num ^= this.IsExtension.GetHashCode(); arg_96_0 = (num2 * 1695460233u ^ 608126375u); continue; case 5u: num ^= UninterpretedOption.Types.NamePart.smethod_2(this.NamePart_); arg_96_0 = (num2 * 1320429554u ^ 2484467627u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (UninterpretedOption.Types.NamePart.smethod_1(this.NamePart_) != 0) { goto IL_1F; } goto IL_B1; uint arg_7E_0; while (true) { IL_79: uint num; switch ((num = (arg_7E_0 ^ 2121512560u)) % 6u) { case 1u: output.WriteBool(this.IsExtension); arg_7E_0 = (num * 2312313601u ^ 1848014173u); continue; case 2u: output.WriteRawTag(10); output.WriteString(this.NamePart_); arg_7E_0 = (num * 1441882936u ^ 4187912202u); continue; case 3u: output.WriteRawTag(16); arg_7E_0 = (num * 2353443943u ^ 716406136u); continue; case 4u: goto IL_B1; case 5u: goto IL_1F; } break; } return; IL_1F: arg_7E_0 = 1827467696u; goto IL_79; IL_B1: arg_7E_0 = ((!this.IsExtension) ? 1766977438u : 463120781u); goto IL_79; } public int CalculateSize() { int num = 0; if (UninterpretedOption.Types.NamePart.smethod_1(this.NamePart_) != 0) { goto IL_1E; } goto IL_86; uint arg_5A_0; while (true) { IL_55: uint num2; switch ((num2 = (arg_5A_0 ^ 1538023466u)) % 5u) { case 0u: num += 2; arg_5A_0 = (num2 * 3231778262u ^ 3907978887u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.NamePart_); arg_5A_0 = (num2 * 2779338625u ^ 3645742931u); continue; case 3u: goto IL_1E; case 4u: goto IL_86; } break; } return num; IL_1E: arg_5A_0 = 1319632464u; goto IL_55; IL_86: arg_5A_0 = (this.IsExtension ? 790433979u : 1717102769u); goto IL_55; } public void MergeFrom(UninterpretedOption.Types.NamePart other) { if (other == null) { goto IL_30; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1063401130u)) % 7u) { case 0u: arg_76_0 = (other.IsExtension ? 1947955674u : 1206957398u); continue; case 1u: goto IL_AD; case 2u: this.NamePart_ = other.NamePart_; arg_76_0 = (num * 3632324618u ^ 915883135u); continue; case 3u: return; case 4u: goto IL_30; case 6u: this.IsExtension = other.IsExtension; arg_76_0 = (num * 985427199u ^ 1774312902u); continue; } break; } return; IL_30: arg_76_0 = 1913370298u; goto IL_71; IL_AD: arg_76_0 = ((UninterpretedOption.Types.NamePart.smethod_1(other.NamePart_) == 0) ? 1192051667u : 881970420u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_EE: uint num; uint arg_AE_0 = ((num = input.ReadTag()) == 0u) ? 2315126112u : 2343597663u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 2222133674u)) % 9u) { case 0u: arg_AE_0 = (((num == 16u) ? 2243065476u : 2494122898u) ^ num2 * 2151440464u); continue; case 1u: this.NamePart_ = input.ReadString(); arg_AE_0 = 2991866976u; continue; case 2u: arg_AE_0 = 2343597663u; continue; case 3u: arg_AE_0 = ((num == 10u) ? 3702260229u : 2436237105u); continue; case 5u: arg_AE_0 = (num2 * 2126258113u ^ 2965097581u); continue; case 6u: goto IL_EE; case 7u: this.IsExtension = input.ReadBool(); arg_AE_0 = 3017338663u; continue; case 8u: input.SkipLastField(); arg_AE_0 = (num2 * 1762041467u ^ 2694344639u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UninterpretedOption.__c __9 = new UninterpretedOption.__c(); internal UninterpretedOption cctor>b__55_0() { return new UninterpretedOption(); } } private static readonly MessageParser<UninterpretedOption> _parser = new MessageParser<UninterpretedOption>(new Func<UninterpretedOption>(UninterpretedOption.__c.__9.<.cctor>b__55_0)); public const int NameFieldNumber = 2; private static readonly FieldCodec<UninterpretedOption.Types.NamePart> _repeated_name_codec = FieldCodec.ForMessage<UninterpretedOption.Types.NamePart>(18u, UninterpretedOption.Types.NamePart.Parser); private readonly RepeatedField<UninterpretedOption.Types.NamePart> name_ = new RepeatedField<UninterpretedOption.Types.NamePart>(); public const int IdentifierValueFieldNumber = 3; private string identifierValue_ = ""; public const int PositiveIntValueFieldNumber = 4; private ulong positiveIntValue_; public const int NegativeIntValueFieldNumber = 5; private long negativeIntValue_; public const int DoubleValueFieldNumber = 6; private double doubleValue_; public const int StringValueFieldNumber = 7; private ByteString stringValue_ = ByteString.Empty; public const int AggregateValueFieldNumber = 8; private string aggregateValue_ = ""; public static MessageParser<UninterpretedOption> Parser { get { return UninterpretedOption._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[16]; } } MessageDescriptor IMessage.Descriptor { get { return UninterpretedOption.Descriptor; } } public RepeatedField<UninterpretedOption.Types.NamePart> Name { get { return this.name_; } } public string IdentifierValue { get { return this.identifierValue_; } set { this.identifierValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public ulong PositiveIntValue { get { return this.positiveIntValue_; } set { this.positiveIntValue_ = value; } } public long NegativeIntValue { get { return this.negativeIntValue_; } set { this.negativeIntValue_ = value; } } public double DoubleValue { get { return this.doubleValue_; } set { this.doubleValue_ = value; } } public ByteString StringValue { get { return this.stringValue_; } set { this.stringValue_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_34<string>(2130392831u)); } } public string AggregateValue { get { return this.aggregateValue_; } set { this.aggregateValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public UninterpretedOption() { } public UninterpretedOption(UninterpretedOption other) : this() { this.name_ = other.name_.Clone(); this.identifierValue_ = other.identifierValue_; this.positiveIntValue_ = other.positiveIntValue_; this.negativeIntValue_ = other.negativeIntValue_; this.doubleValue_ = other.doubleValue_; this.stringValue_ = other.stringValue_; this.aggregateValue_ = other.aggregateValue_; } public UninterpretedOption Clone() { return new UninterpretedOption(this); } public override bool Equals(object other) { return this.Equals(other as UninterpretedOption); } public bool Equals(UninterpretedOption other) { if (other == null) { goto IL_18; } goto IL_1B9; int arg_153_0; while (true) { IL_14E: switch ((arg_153_0 ^ -1898478881) % 19) { case 0: return false; case 1: arg_153_0 = ((this.DoubleValue != other.DoubleValue) ? -1114262047 : -1043013492); continue; case 2: arg_153_0 = ((this.NegativeIntValue == other.NegativeIntValue) ? -719700109 : -1250198844); continue; case 3: return false; case 4: arg_153_0 = (this.name_.Equals(other.name_) ? -598763971 : -2075656817); continue; case 5: return false; case 6: arg_153_0 = ((!UninterpretedOption.smethod_0(this.AggregateValue, other.AggregateValue)) ? -319127823 : -646292632); continue; case 7: return false; case 8: return false; case 9: return false; case 10: return true; case 11: arg_153_0 = ((!UninterpretedOption.smethod_0(this.IdentifierValue, other.IdentifierValue)) ? -456383069 : -1168122025); continue; case 12: goto IL_1B9; case 13: arg_153_0 = ((this.StringValue != other.StringValue) ? -367181639 : -760871999); continue; case 15: arg_153_0 = ((this.PositiveIntValue != other.PositiveIntValue) ? -1293120456 : -1745167732); continue; case 16: goto IL_18; case 17: return false; case 18: return false; } break; } return true; IL_18: arg_153_0 = -1964918242; goto IL_14E; IL_1B9: arg_153_0 = ((other != this) ? -1513863999 : -1675879403); goto IL_14E; } public override int GetHashCode() { int num = 1 ^ UninterpretedOption.smethod_1(this.name_); if (UninterpretedOption.smethod_2(this.IdentifierValue) != 0) { goto IL_157; } goto IL_1F6; uint arg_1A5_0; while (true) { IL_1A0: uint num2; switch ((num2 = (arg_1A5_0 ^ 1471386423u)) % 13u) { case 0u: num ^= this.StringValue.GetHashCode(); arg_1A5_0 = (num2 * 2635928400u ^ 1472312191u); continue; case 1u: arg_1A5_0 = ((this.StringValue.Length != 0) ? 263983095u : 2021822335u); continue; case 2u: goto IL_157; case 3u: num ^= UninterpretedOption.smethod_1(this.IdentifierValue); arg_1A5_0 = (num2 * 114123192u ^ 3311244205u); continue; case 5u: num ^= this.DoubleValue.GetHashCode(); arg_1A5_0 = (num2 * 523201385u ^ 4204010881u); continue; case 6u: num ^= this.AggregateValue.GetHashCode(); arg_1A5_0 = (num2 * 768494929u ^ 595913813u); continue; case 7u: arg_1A5_0 = ((this.DoubleValue != 0.0) ? 1644131232u : 380905326u); continue; case 8u: num ^= this.NegativeIntValue.GetHashCode(); arg_1A5_0 = (num2 * 1105725156u ^ 1625615404u); continue; case 9u: goto IL_1F6; case 10u: num ^= this.PositiveIntValue.GetHashCode(); arg_1A5_0 = (num2 * 2911162369u ^ 4156391037u); continue; case 11u: arg_1A5_0 = ((this.AggregateValue.Length == 0) ? 398527082u : 713311672u); continue; case 12u: arg_1A5_0 = ((this.NegativeIntValue == 0L) ? 149113652u : 786219457u); continue; } break; } return num; IL_157: arg_1A5_0 = 2121931240u; goto IL_1A0; IL_1F6: arg_1A5_0 = ((this.PositiveIntValue == 0uL) ? 1770888205u : 868643143u); goto IL_1A0; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.name_.WriteTo(output, UninterpretedOption._repeated_name_codec); if (UninterpretedOption.smethod_2(this.IdentifierValue) != 0) { goto IL_1E4; } goto IL_24A; uint arg_1EE_0; while (true) { IL_1E9: uint num; switch ((num = (arg_1EE_0 ^ 3353602000u)) % 16u) { case 0u: goto IL_1E4; case 1u: output.WriteRawTag(58); output.WriteBytes(this.StringValue); arg_1EE_0 = (num * 1270872983u ^ 1675727205u); continue; case 2u: arg_1EE_0 = ((UninterpretedOption.smethod_2(this.AggregateValue) == 0) ? 3485309582u : 2843637411u); continue; case 3u: output.WriteRawTag(66); arg_1EE_0 = (num * 1409716013u ^ 2003871742u); continue; case 4u: output.WriteRawTag(40); arg_1EE_0 = (num * 3612335603u ^ 1096599427u); continue; case 5u: output.WriteRawTag(26); output.WriteString(this.IdentifierValue); arg_1EE_0 = (num * 783832359u ^ 3303056229u); continue; case 6u: goto IL_24A; case 7u: output.WriteRawTag(49); output.WriteDouble(this.DoubleValue); arg_1EE_0 = (num * 1458798818u ^ 91796836u); continue; case 8u: arg_1EE_0 = ((this.NegativeIntValue != 0L) ? 3747080900u : 3857385805u); continue; case 9u: output.WriteString(this.AggregateValue); arg_1EE_0 = (num * 1717775482u ^ 2458294628u); continue; case 10u: arg_1EE_0 = ((this.StringValue.Length != 0) ? 4228664673u : 3895044098u); continue; case 11u: output.WriteRawTag(32); arg_1EE_0 = (num * 3199078986u ^ 559762818u); continue; case 12u: output.WriteUInt64(this.PositiveIntValue); arg_1EE_0 = (num * 2074717875u ^ 687604236u); continue; case 13u: arg_1EE_0 = ((this.DoubleValue != 0.0) ? 3599415575u : 3661012682u); continue; case 15u: output.WriteInt64(this.NegativeIntValue); arg_1EE_0 = (num * 4090056853u ^ 975056790u); continue; } break; } return; IL_1E4: arg_1EE_0 = 2290998005u; goto IL_1E9; IL_24A: arg_1EE_0 = ((this.PositiveIntValue != 0uL) ? 4100760075u : 3892625560u); goto IL_1E9; } public int CalculateSize() { int num = 0; while (true) { IL_20C: uint arg_1C7_0 = 3573377312u; while (true) { uint num2; switch ((num2 = (arg_1C7_0 ^ 2563561832u)) % 14u) { case 0u: goto IL_20C; case 1u: arg_1C7_0 = ((this.PositiveIntValue == 0uL) ? 2744214612u : 3067328808u); continue; case 2u: num += 9; arg_1C7_0 = (num2 * 1593157841u ^ 1820327932u); continue; case 3u: num += 1 + CodedOutputStream.ComputeInt64Size(this.NegativeIntValue); arg_1C7_0 = (num2 * 3629075329u ^ 197636271u); continue; case 4u: arg_1C7_0 = ((this.NegativeIntValue != 0L) ? 2387966751u : 4219144792u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.AggregateValue); arg_1C7_0 = (num2 * 1518332463u ^ 1005572386u); continue; case 6u: arg_1C7_0 = ((this.DoubleValue != 0.0) ? 3719673736u : 2839116572u); continue; case 8u: arg_1C7_0 = ((this.StringValue.Length == 0) ? 2456539889u : 2520728333u); continue; case 9u: arg_1C7_0 = ((UninterpretedOption.smethod_2(this.AggregateValue) == 0) ? 2875075741u : 3973400601u); continue; case 10u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.PositiveIntValue); arg_1C7_0 = (num2 * 3527929012u ^ 790350164u); continue; case 11u: num += 1 + CodedOutputStream.ComputeStringSize(this.IdentifierValue); arg_1C7_0 = (num2 * 3414525837u ^ 2030403628u); continue; case 12u: num += this.name_.CalculateSize(UninterpretedOption._repeated_name_codec); arg_1C7_0 = (((UninterpretedOption.smethod_2(this.IdentifierValue) != 0) ? 1461327427u : 1198030371u) ^ num2 * 3756354571u); continue; case 13u: num += 1 + CodedOutputStream.ComputeBytesSize(this.StringValue); arg_1C7_0 = (num2 * 301592588u ^ 1728921165u); continue; } return num; } } return num; } public void MergeFrom(UninterpretedOption other) { if (other == null) { goto IL_44; } goto IL_202; uint arg_1B5_0; while (true) { IL_1B0: uint num; switch ((num = (arg_1B5_0 ^ 3217751514u)) % 16u) { case 0u: arg_1B5_0 = ((UninterpretedOption.smethod_2(other.AggregateValue) != 0) ? 2954870371u : 3654617390u); continue; case 1u: arg_1B5_0 = ((other.NegativeIntValue == 0L) ? 2954744721u : 3877526870u); continue; case 2u: this.StringValue = other.StringValue; arg_1B5_0 = (num * 2013966298u ^ 594627950u); continue; case 3u: arg_1B5_0 = ((other.PositiveIntValue != 0uL) ? 3935205296u : 4139002939u); continue; case 5u: goto IL_202; case 6u: arg_1B5_0 = (((UninterpretedOption.smethod_2(other.IdentifierValue) != 0) ? 4027164174u : 3426168483u) ^ num * 3441922295u); continue; case 7u: arg_1B5_0 = ((other.StringValue.Length != 0) ? 3688989080u : 4076708698u); continue; case 8u: return; case 9u: this.AggregateValue = other.AggregateValue; arg_1B5_0 = (num * 856254986u ^ 4046796308u); continue; case 10u: this.PositiveIntValue = other.PositiveIntValue; arg_1B5_0 = (num * 55571900u ^ 3711384547u); continue; case 11u: arg_1B5_0 = ((other.DoubleValue != 0.0) ? 3047943701u : 2473951261u); continue; case 12u: this.NegativeIntValue = other.NegativeIntValue; arg_1B5_0 = (num * 2666092736u ^ 2382977681u); continue; case 13u: goto IL_44; case 14u: this.IdentifierValue = other.IdentifierValue; arg_1B5_0 = (num * 2702451000u ^ 2483031433u); continue; case 15u: this.DoubleValue = other.DoubleValue; arg_1B5_0 = (num * 1670844473u ^ 2407979274u); continue; } break; } return; IL_44: arg_1B5_0 = 3271834082u; goto IL_1B0; IL_202: this.name_.Add(other.name_); arg_1B5_0 = 4102085068u; goto IL_1B0; } public void MergeFrom(CodedInputStream input) { while (true) { IL_319: uint num; uint arg_291_0 = ((num = input.ReadTag()) != 0u) ? 3358286792u : 2798079972u; while (true) { uint num2; switch ((num2 = (arg_291_0 ^ 2230918100u)) % 27u) { case 0u: this.name_.AddEntriesFrom(input, UninterpretedOption._repeated_name_codec); arg_291_0 = 2747637701u; continue; case 1u: arg_291_0 = (num2 * 2106945574u ^ 226609565u); continue; case 2u: arg_291_0 = 3358286792u; continue; case 3u: arg_291_0 = (((num != 66u) ? 1236466050u : 649635830u) ^ num2 * 2490679908u); continue; case 4u: arg_291_0 = (num2 * 968916906u ^ 439408098u); continue; case 5u: goto IL_319; case 6u: arg_291_0 = (num2 * 126475410u ^ 460746281u); continue; case 7u: arg_291_0 = (num2 * 2203256876u ^ 18455810u); continue; case 8u: arg_291_0 = ((num <= 49u) ? 3000852880u : 3727408651u); continue; case 9u: input.SkipLastField(); arg_291_0 = 2283388528u; continue; case 10u: arg_291_0 = (((num == 26u) ? 1104046777u : 1937214778u) ^ num2 * 1053962089u); continue; case 11u: arg_291_0 = ((num <= 32u) ? 2278311856u : 3417877030u); continue; case 12u: this.StringValue = input.ReadBytes(); arg_291_0 = 3253795520u; continue; case 13u: arg_291_0 = ((num == 58u) ? 2572916332u : 4204126310u); continue; case 14u: arg_291_0 = (num2 * 1760079775u ^ 4063884632u); continue; case 15u: this.IdentifierValue = input.ReadString(); arg_291_0 = 2243696535u; continue; case 16u: arg_291_0 = (((num != 40u) ? 648468008u : 917066248u) ^ num2 * 3168981259u); continue; case 17u: arg_291_0 = (((num == 49u) ? 3366740880u : 3423857824u) ^ num2 * 2486916405u); continue; case 18u: this.PositiveIntValue = input.ReadUInt64(); arg_291_0 = 3303494290u; continue; case 19u: this.AggregateValue = input.ReadString(); arg_291_0 = 2747637701u; continue; case 20u: this.NegativeIntValue = input.ReadInt64(); arg_291_0 = 3456677568u; continue; case 21u: this.DoubleValue = input.ReadDouble(); arg_291_0 = 2747637701u; continue; case 22u: arg_291_0 = (((num == 32u) ? 2925049734u : 3463009156u) ^ num2 * 2587174938u); continue; case 23u: arg_291_0 = (((num == 18u) ? 1261413842u : 1224866501u) ^ num2 * 526183744u); continue; case 25u: arg_291_0 = (num2 * 1803301455u ^ 634900201u); continue; case 26u: arg_291_0 = (num2 * 2852073018u ^ 1918830925u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.Reflection/MessageDescriptor.cs using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class MessageDescriptor : DescriptorBase { public sealed class FieldCollection { private readonly MessageDescriptor messageDescriptor; public FieldDescriptor this[int number] { get { FieldDescriptor expr_0C = this.messageDescriptor.FindFieldByNumber(number); if (expr_0C == null) { throw MessageDescriptor.FieldCollection.smethod_0(Module.smethod_35<string>(3970532378u)); } return expr_0C; } } public FieldDescriptor this[string name] { get { FieldDescriptor expr_0C = this.messageDescriptor.FindFieldByName(name); if (expr_0C == null) { throw MessageDescriptor.FieldCollection.smethod_0(Module.smethod_34<string>(2081293231u)); } return expr_0C; } } internal FieldCollection(MessageDescriptor messageDescriptor) { while (true) { IL_39: uint arg_21_0 = 2890426633u; while (true) { uint num; switch ((num = (arg_21_0 ^ 2290670412u)) % 3u) { case 0u: goto IL_39; case 1u: this.messageDescriptor = messageDescriptor; arg_21_0 = (num * 4117989716u ^ 4051887557u); continue; } return; } } } public IList<FieldDescriptor> InDeclarationOrder() { return this.messageDescriptor.fieldsInDeclarationOrder; } public IList<FieldDescriptor> InFieldNumberOrder() { return this.messageDescriptor.fieldsInNumberOrder; } internal IDictionary<string, FieldDescriptor> ByJsonName() { return this.messageDescriptor.jsonFieldMap; } static KeyNotFoundException smethod_0(string string_0) { return new KeyNotFoundException(string_0); } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MessageDescriptor.__c __9 = new MessageDescriptor.__c(); public static Func<FieldDescriptor, int> __9__4_4; public static Func<FieldDescriptor, string> __9__4_5; internal int ctor>b__4_4(FieldDescriptor field) { return field.FieldNumber; } internal string ctor>b__4_5(FieldDescriptor field) { return JsonFormatter.ToCamelCase(field.Name); } } private static readonly HashSet<string> WellKnownTypeNames = new HashSet<string> { Module.smethod_33<string>(1785015754u), Module.smethod_34<string>(2015219986u), Module.smethod_37<string>(989619293u), Module.smethod_34<string>(1292990457u), Module.smethod_33<string>(807162649u), Module.smethod_34<string>(1480463681u), Module.smethod_34<string>(3740888880u), Module.smethod_35<string>(2123889868u), Module.smethod_36<string>(1377924986u), Module.smethod_36<string>(1181098354u) }; private readonly IList<FieldDescriptor> fieldsInDeclarationOrder; private readonly IList<FieldDescriptor> fieldsInNumberOrder; private readonly IDictionary<string, FieldDescriptor> jsonFieldMap; public override string Name { get { return this.Proto.Name; } } internal DescriptorProto Proto { [CompilerGenerated] get { return this.<Proto>k__BackingField; } } public Type ClrType { [CompilerGenerated] get { return this.<ClrType>k__BackingField; } } public MessageParser Parser { [CompilerGenerated] get { return this.<Parser>k__BackingField; } } internal bool IsWellKnownType { get { return MessageDescriptor.smethod_0(base.File.Package, Module.smethod_36<string>(3105684599u)) && MessageDescriptor.WellKnownTypeNames.Contains(base.File.Name); } } internal bool IsWrapperType { get { return MessageDescriptor.smethod_0(base.File.Package, Module.smethod_37<string>(2070655459u)) && MessageDescriptor.smethod_0(base.File.Name, Module.smethod_34<string>(4237235307u)); } } public MessageDescriptor ContainingType { [CompilerGenerated] get { return this.<ContainingType>k__BackingField; } } public MessageDescriptor.FieldCollection Fields { [CompilerGenerated] get { return this.Fieldsk__BackingField; } } public IList<MessageDescriptor> NestedTypes { [CompilerGenerated] get { return this.<NestedTypes>k__BackingField; } } public IList<EnumDescriptor> EnumTypes { [CompilerGenerated] get { return this.<EnumTypes>k__BackingField; } } public IList<OneofDescriptor> Oneofs { [CompilerGenerated] get { return this.<Oneofs>k__BackingField; } } internal MessageDescriptor(DescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int typeIndex, GeneratedCodeInfo generatedCodeInfo) : base(file, file.ComputeFullName(parent, proto.Name), typeIndex) { MessageDescriptor __4__this; while (true) { IL_247: uint arg_20A_0 = 4043199534u; while (true) { uint num; switch ((num = (arg_20A_0 ^ 3788346645u)) % 12u) { case 0u: this.<ContainingType>k__BackingField = parent; arg_20A_0 = (num * 1002898729u ^ 1601684763u); continue; case 1u: { GeneratedCodeInfo expr_1D9 = generatedCodeInfo; this.<Parser>k__BackingField = ((expr_1D9 != null) ? expr_1D9.Parser : null); arg_20A_0 = 2694476678u; continue; } case 2u: file.DescriptorPool.AddSymbol(this); this.Fieldsk__BackingField = new MessageDescriptor.FieldCollection(this); arg_20A_0 = (num * 174268781u ^ 339015310u); continue; case 3u: goto IL_247; case 4u: this.<NestedTypes>k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly<DescriptorProto, MessageDescriptor>(proto.NestedType, (DescriptorProto type, int index) => new MessageDescriptor(type, file, __4__this, index, generatedCodeInfo.NestedTypes[index])); arg_20A_0 = (num * 1204710165u ^ 359963217u); continue; case 5u: { IEnumerable<FieldDescriptor> arg_161_0 = this.fieldsInNumberOrder; Func<FieldDescriptor, string> arg_161_1; if ((arg_161_1 = MessageDescriptor.__c.__9__4_5) == null) { arg_161_1 = (MessageDescriptor.__c.__9__4_5 = new Func<FieldDescriptor, string>(MessageDescriptor.__c.__9.<.ctor>b__4_5)); } this.jsonFieldMap = new ReadOnlyDictionary<string, FieldDescriptor>(arg_161_0.ToDictionary(arg_161_1)); arg_20A_0 = 3491112463u; continue; } case 6u: { this.fieldsInDeclarationOrder = DescriptorUtil.ConvertAndMakeReadOnly<FieldDescriptorProto, FieldDescriptor>(proto.Field, delegate(FieldDescriptorProto field, int index) { FileDescriptor arg_26_1 = file; MessageDescriptor arg_26_2 = __4__this; GeneratedCodeInfo expr_14 = generatedCodeInfo; return new FieldDescriptor(field, arg_26_1, arg_26_2, index, (expr_14 != null) ? expr_14.PropertyNames[index] : null); }); IEnumerable<FieldDescriptor> arg_11D_0 = this.fieldsInDeclarationOrder; Func<FieldDescriptor, int> arg_11D_1; if ((arg_11D_1 = MessageDescriptor.__c.__9__4_4) == null) { arg_11D_1 = (MessageDescriptor.__c.__9__4_4 = new Func<FieldDescriptor, int>(MessageDescriptor.__c.__9.<.ctor>b__4_4)); } this.fieldsInNumberOrder = new ReadOnlyCollection<FieldDescriptor>(arg_11D_0.OrderBy(arg_11D_1).ToArray<FieldDescriptor>()); arg_20A_0 = 2414391428u; continue; } case 7u: { GeneratedCodeInfo expr_BF = generatedCodeInfo; this.<ClrType>k__BackingField = ((expr_BF != null) ? expr_BF.ClrType : null); arg_20A_0 = 3870743541u; continue; } case 8u: this.<EnumTypes>k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly<EnumDescriptorProto, EnumDescriptor>(proto.EnumType, (EnumDescriptorProto type, int index) => new EnumDescriptor(type, file, __4__this, index, generatedCodeInfo.NestedEnums[index])); arg_20A_0 = (num * 3914277205u ^ 2964567391u); continue; case 10u: this.<Oneofs>k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly<OneofDescriptorProto, OneofDescriptor>(proto.OneofDecl, (OneofDescriptorProto oneof, int index) => new OneofDescriptor(oneof, file, __4__this, index, generatedCodeInfo.OneofNames[index])); arg_20A_0 = (num * 3879854900u ^ 3765292269u); continue; case 11u: __4__this = this; this.<Proto>k__BackingField = proto; arg_20A_0 = (num * 1105444768u ^ 1991989292u); continue; } return; } } } public FieldDescriptor FindFieldByName(string name) { return base.File.DescriptorPool.FindSymbol<FieldDescriptor>(MessageDescriptor.smethod_1(base.FullName, Module.smethod_34<string>(3349943853u), name)); } public FieldDescriptor FindFieldByNumber(int number) { return base.File.DescriptorPool.FindFieldByNumber(this, number); } public T FindDescriptor<T>(string name) where T : class, IDescriptor { return base.File.DescriptorPool.FindSymbol<T>(MessageDescriptor.smethod_1(base.FullName, Module.smethod_37<string>(3886401134u), name)); } internal void CrossLink() { IEnumerator<MessageDescriptor> enumerator = this.NestedTypes.GetEnumerator(); try { while (true) { IL_60: int arg_38_0 = MessageDescriptor.smethod_2(enumerator) ? 1134616046 : 1843708573; while (true) { switch ((arg_38_0 ^ 29679423) % 4) { case 0: goto IL_60; case 1: enumerator.Current.CrossLink(); arg_38_0 = 375820175; continue; case 3: arg_38_0 = 1134616046; continue; } goto Block_5; } } Block_5:; } finally { if (enumerator != null) { while (true) { IL_A1: uint arg_89_0 = 868083471u; while (true) { uint num; switch ((num = (arg_89_0 ^ 29679423u)) % 3u) { case 0u: goto IL_A1; case 2u: MessageDescriptor.smethod_3(enumerator); arg_89_0 = (num * 1785932764u ^ 2171121617u); continue; } goto Block_9; } } Block_9:; } } IEnumerator<FieldDescriptor> enumerator2 = this.fieldsInDeclarationOrder.GetEnumerator(); try { while (true) { IL_109: int arg_E1_0 = (!MessageDescriptor.smethod_2(enumerator2)) ? 2106707788 : 1471015578; while (true) { switch ((arg_E1_0 ^ 29679423) % 4) { case 0: arg_E1_0 = 1471015578; continue; case 1: enumerator2.Current.CrossLink(); arg_E1_0 = 2049388989; continue; case 2: goto IL_109; } goto Block_11; } } Block_11:; } finally { if (enumerator2 != null) { while (true) { IL_14A: uint arg_132_0 = 1386396480u; while (true) { uint num; switch ((num = (arg_132_0 ^ 29679423u)) % 3u) { case 0u: goto IL_14A; case 1u: MessageDescriptor.smethod_3(enumerator2); arg_132_0 = (num * 3884617075u ^ 2615629246u); continue; } goto Block_15; } } Block_15:; } } IEnumerator<OneofDescriptor> enumerator3 = this.Oneofs.GetEnumerator(); try { while (true) { IL_1B2: int arg_18A_0 = MessageDescriptor.smethod_2(enumerator3) ? 454722637 : 1116807928; while (true) { switch ((arg_18A_0 ^ 29679423) % 4) { case 0: arg_18A_0 = 454722637; continue; case 1: goto IL_1B2; case 2: enumerator3.Current.CrossLink(); arg_18A_0 = 1470632970; continue; } goto Block_17; } } Block_17:; } finally { if (enumerator3 != null) { while (true) { IL_1F3: uint arg_1DB_0 = 2079469540u; while (true) { uint num; switch ((num = (arg_1DB_0 ^ 29679423u)) % 3u) { case 0u: goto IL_1F3; case 2u: MessageDescriptor.smethod_3(enumerator3); arg_1DB_0 = (num * 2939956246u ^ 1130673756u); continue; } goto Block_21; } } Block_21:; } } } static bool smethod_0(string string_0, string string_1) { return string_0 == string_1; } static string smethod_1(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } static bool smethod_2(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_3(IDisposable idisposable_0) { idisposable_0.Dispose(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/LogonResult.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class LogonResult : IMessage<LogonResult>, IEquatable<LogonResult>, IDeepCloneable<LogonResult>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly LogonResult.__c __9 = new LogonResult.__c(); internal LogonResult cctor>b__69_0() { return new LogonResult(); } } private static readonly MessageParser<LogonResult> _parser = new MessageParser<LogonResult>(new Func<LogonResult>(LogonResult.__c.__9.<.cctor>b__69_0)); public const int ErrorCodeFieldNumber = 1; private uint errorCode_; public const int AccountIdFieldNumber = 2; private EntityId accountId_; public const int GameAccountIdFieldNumber = 3; private static readonly FieldCodec<EntityId> _repeated_gameAccountId_codec; private readonly RepeatedField<EntityId> gameAccountId_ = new RepeatedField<EntityId>(); public const int EmailFieldNumber = 4; private string email_ = ""; public const int AvailableRegionFieldNumber = 5; private static readonly FieldCodec<uint> _repeated_availableRegion_codec; private readonly RepeatedField<uint> availableRegion_ = new RepeatedField<uint>(); public const int ConnectedRegionFieldNumber = 6; private uint connectedRegion_; public const int BattleTagFieldNumber = 7; private string battleTag_ = ""; public const int GeoipCountryFieldNumber = 8; private string geoipCountry_ = ""; public const int SessionKeyFieldNumber = 9; private ByteString sessionKey_ = ByteString.Empty; public const int RestrictedModeFieldNumber = 10; private bool restrictedMode_; public static MessageParser<LogonResult> Parser { get { return LogonResult._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return LogonResult.Descriptor; } } public uint ErrorCode { get { return this.errorCode_; } set { this.errorCode_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public RepeatedField<EntityId> GameAccountId { get { return this.gameAccountId_; } } public string Email { get { return this.email_; } set { this.email_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<uint> AvailableRegion { get { return this.availableRegion_; } } public uint ConnectedRegion { get { return this.connectedRegion_; } set { this.connectedRegion_ = value; } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string GeoipCountry { get { return this.geoipCountry_; } set { this.geoipCountry_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public ByteString SessionKey { get { return this.sessionKey_; } set { this.sessionKey_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public bool RestrictedMode { get { return this.restrictedMode_; } set { this.restrictedMode_ = value; } } public LogonResult() { } public LogonResult(LogonResult other) : this() { while (true) { IL_109: uint arg_DD_0 = 2656345294u; while (true) { uint num; switch ((num = (arg_DD_0 ^ 2937911303u)) % 8u) { case 0u: this.connectedRegion_ = other.connectedRegion_; arg_DD_0 = (num * 1879634561u ^ 2345160893u); continue; case 1u: this.errorCode_ = other.errorCode_; arg_DD_0 = (num * 4071658454u ^ 2921794690u); continue; case 2u: this.battleTag_ = other.battleTag_; this.geoipCountry_ = other.geoipCountry_; arg_DD_0 = (num * 159657533u ^ 1001780849u); continue; case 3u: this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); arg_DD_0 = 3027974273u; continue; case 5u: goto IL_109; case 6u: this.gameAccountId_ = other.gameAccountId_.Clone(); arg_DD_0 = (num * 24133105u ^ 3954953750u); continue; case 7u: this.email_ = other.email_; this.availableRegion_ = other.availableRegion_.Clone(); arg_DD_0 = (num * 242279011u ^ 3728303674u); continue; } goto Block_2; } } Block_2: this.sessionKey_ = other.sessionKey_; this.restrictedMode_ = other.restrictedMode_; } public LogonResult Clone() { return new LogonResult(this); } public override bool Equals(object other) { return this.Equals(other as LogonResult); } public bool Equals(LogonResult other) { if (other == null) { goto IL_D7; } goto IL_261; int arg_1E3_0; while (true) { IL_1DE: switch ((arg_1E3_0 ^ -1712411415) % 25) { case 0: arg_1E3_0 = ((!(this.SessionKey != other.SessionKey)) ? -67584741 : -1908013620); continue; case 1: return false; case 3: return false; case 4: arg_1E3_0 = ((this.RestrictedMode != other.RestrictedMode) ? -824332055 : -61473198); continue; case 5: return false; case 6: arg_1E3_0 = (LogonResult.smethod_1(this.BattleTag, other.BattleTag) ? -57823125 : -942453634); continue; case 7: return false; case 8: arg_1E3_0 = ((this.ErrorCode != other.ErrorCode) ? -25452810 : -1232309767); continue; case 9: arg_1E3_0 = (this.availableRegion_.Equals(other.availableRegion_) ? -304321448 : -543263712); continue; case 10: arg_1E3_0 = ((this.ConnectedRegion != other.ConnectedRegion) ? -860836687 : -1479022463); continue; case 11: return true; case 12: return false; case 13: return false; case 14: return false; case 15: goto IL_D7; case 16: arg_1E3_0 = (this.gameAccountId_.Equals(other.gameAccountId_) ? -1987449712 : -1848520566); continue; case 17: return false; case 18: return false; case 19: arg_1E3_0 = (LogonResult.smethod_1(this.Email, other.Email) ? -200634760 : -1510655246); continue; case 20: arg_1E3_0 = ((!LogonResult.smethod_1(this.GeoipCountry, other.GeoipCountry)) ? -301275178 : -969204290); continue; case 21: return false; case 22: arg_1E3_0 = ((!LogonResult.smethod_0(this.AccountId, other.AccountId)) ? -1455721418 : -898992129); continue; case 23: goto IL_261; case 24: return false; } break; } return true; IL_D7: arg_1E3_0 = -513915358; goto IL_1DE; IL_261: arg_1E3_0 = ((other == this) ? -1817118660 : -1562897735); goto IL_1DE; } public override int GetHashCode() { int num = 1; while (true) { IL_289: uint arg_238_0 = 2611091133u; while (true) { uint num2; switch ((num2 = (arg_238_0 ^ 2455853135u)) % 17u) { case 0u: num ^= this.Email.GetHashCode(); arg_238_0 = (num2 * 1593602672u ^ 530332312u); continue; case 1u: num ^= this.SessionKey.GetHashCode(); arg_238_0 = (num2 * 3946331421u ^ 244254375u); continue; case 2u: goto IL_289; case 3u: num ^= this.RestrictedMode.GetHashCode(); arg_238_0 = (num2 * 1662842416u ^ 1861108663u); continue; case 5u: arg_238_0 = ((this.BattleTag.Length != 0) ? 2870892781u : 2200441046u); continue; case 6u: num ^= this.BattleTag.GetHashCode(); arg_238_0 = (num2 * 3240484606u ^ 3838905450u); continue; case 7u: num ^= this.availableRegion_.GetHashCode(); arg_238_0 = ((this.ConnectedRegion != 0u) ? 3580544234u : 3181989962u); continue; case 8u: num ^= this.gameAccountId_.GetHashCode(); arg_238_0 = ((this.Email.Length == 0) ? 2789202024u : 3576475126u); continue; case 9u: arg_238_0 = ((this.GeoipCountry.Length != 0) ? 2306659965u : 2250782442u); continue; case 10u: num ^= this.GeoipCountry.GetHashCode(); arg_238_0 = (num2 * 3575759507u ^ 1610923100u); continue; case 11u: arg_238_0 = ((this.SessionKey.Length != 0) ? 2171047880u : 3576075244u); continue; case 12u: num ^= this.ConnectedRegion.GetHashCode(); arg_238_0 = (num2 * 65946709u ^ 2171963011u); continue; case 13u: num ^= this.AccountId.GetHashCode(); arg_238_0 = (num2 * 854068324u ^ 1182720352u); continue; case 14u: num ^= this.ErrorCode.GetHashCode(); arg_238_0 = (num2 * 2756751042u ^ 654011663u); continue; case 15u: arg_238_0 = ((!this.RestrictedMode) ? 3152468759u : 3710236449u); continue; case 16u: arg_238_0 = (((this.accountId_ == null) ? 2164354512u : 3213748185u) ^ num2 * 3783344562u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); output.WriteUInt32(this.ErrorCode); if (this.accountId_ != null) { goto IL_148; } goto IL_301; uint arg_28D_0; while (true) { IL_288: uint num; switch ((num = (arg_28D_0 ^ 54218022u)) % 22u) { case 0u: output.WriteRawTag(58); arg_28D_0 = (num * 2236862510u ^ 794672973u); continue; case 1u: output.WriteRawTag(66); arg_28D_0 = (num * 2100745797u ^ 1022260398u); continue; case 2u: arg_28D_0 = (this.RestrictedMode ? 833056810u : 787011216u); continue; case 3u: arg_28D_0 = (((this.ConnectedRegion == 0u) ? 2251395430u : 3315765789u) ^ num * 4033531203u); continue; case 4u: output.WriteRawTag(18); output.WriteMessage(this.AccountId); arg_28D_0 = (num * 570875430u ^ 4257957290u); continue; case 5u: output.WriteString(this.GeoipCountry); arg_28D_0 = (num * 3861040104u ^ 3702905464u); continue; case 6u: output.WriteBytes(this.SessionKey); arg_28D_0 = (num * 774802195u ^ 3824666454u); continue; case 7u: output.WriteBool(this.RestrictedMode); arg_28D_0 = (num * 2332776329u ^ 2092346073u); continue; case 8u: output.WriteRawTag(74); arg_28D_0 = (num * 2532135182u ^ 2476961898u); continue; case 9u: arg_28D_0 = ((LogonResult.smethod_2(this.GeoipCountry) != 0) ? 455493491u : 1715536016u); continue; case 11u: goto IL_148; case 12u: output.WriteRawTag(80); arg_28D_0 = (num * 1579501697u ^ 4199637227u); continue; case 13u: arg_28D_0 = ((LogonResult.smethod_2(this.BattleTag) == 0) ? 1858200609u : 2137559968u); continue; case 14u: arg_28D_0 = ((this.SessionKey.Length == 0) ? 2060820186u : 406866874u); continue; case 15u: output.WriteString(this.Email); arg_28D_0 = (num * 3632893437u ^ 2508902862u); continue; case 16u: output.WriteRawTag(48); arg_28D_0 = (num * 2342332393u ^ 3810939757u); continue; case 17u: output.WriteUInt32(this.ConnectedRegion); arg_28D_0 = (num * 3826780078u ^ 3681592697u); continue; case 18u: output.WriteRawTag(34); arg_28D_0 = (num * 1289884364u ^ 2403577299u); continue; case 19u: this.availableRegion_.WriteTo(output, LogonResult._repeated_availableRegion_codec); arg_28D_0 = 2041936893u; continue; case 20u: goto IL_301; case 21u: output.WriteString(this.BattleTag); arg_28D_0 = (num * 362167266u ^ 1966585151u); continue; } break; } return; IL_148: arg_28D_0 = 990203072u; goto IL_288; IL_301: this.gameAccountId_.WriteTo(output, LogonResult._repeated_gameAccountId_codec); arg_28D_0 = ((LogonResult.smethod_2(this.Email) == 0) ? 950819263u : 1913272658u); goto IL_288; } public int CalculateSize() { int num = 0; while (true) { IL_291: uint arg_240_0 = 3744649728u; while (true) { uint num2; switch ((num2 = (arg_240_0 ^ 3122401839u)) % 17u) { case 1u: arg_240_0 = ((this.SessionKey.Length == 0) ? 4211162998u : 2227651273u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Email); arg_240_0 = (num2 * 1336245311u ^ 3593701166u); continue; case 3u: arg_240_0 = ((LogonResult.smethod_2(this.GeoipCountry) != 0) ? 2331491522u : 2745061080u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ConnectedRegion); arg_240_0 = (num2 * 3309616568u ^ 149511541u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_240_0 = (num2 * 1830583973u ^ 3797181507u); continue; case 6u: arg_240_0 = (((this.ConnectedRegion != 0u) ? 2473230284u : 2950969001u) ^ num2 * 2530498183u); continue; case 7u: arg_240_0 = (this.RestrictedMode ? 4224205726u : 3175073643u); continue; case 8u: num += 2; arg_240_0 = (num2 * 2441964404u ^ 1827223647u); continue; case 9u: num += this.gameAccountId_.CalculateSize(LogonResult._repeated_gameAccountId_codec); arg_240_0 = ((LogonResult.smethod_2(this.Email) != 0) ? 3981870582u : 2767650121u); continue; case 10u: num += this.availableRegion_.CalculateSize(LogonResult._repeated_availableRegion_codec); arg_240_0 = 2742678307u; continue; case 11u: goto IL_291; case 12u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ErrorCode); arg_240_0 = (((this.accountId_ == null) ? 37075551u : 597074860u) ^ num2 * 4071181199u); continue; case 13u: num += 1 + CodedOutputStream.ComputeBytesSize(this.SessionKey); arg_240_0 = (num2 * 2647941721u ^ 548279424u); continue; case 14u: num += 1 + CodedOutputStream.ComputeStringSize(this.GeoipCountry); arg_240_0 = (num2 * 81661870u ^ 3613951694u); continue; case 15u: arg_240_0 = ((LogonResult.smethod_2(this.BattleTag) == 0) ? 3441368875u : 3368733543u); continue; case 16u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_240_0 = (num2 * 3358043513u ^ 4000716460u); continue; } return num; } } return num; } public void MergeFrom(LogonResult other) { if (other == null) { goto IL_29B; } goto IL_31D; uint arg_2A5_0; while (true) { IL_2A0: uint num; switch ((num = (arg_2A5_0 ^ 4157629640u)) % 23u) { case 0u: goto IL_29B; case 1u: return; case 2u: goto IL_31D; case 3u: arg_2A5_0 = ((LogonResult.smethod_2(other.BattleTag) != 0) ? 2249356349u : 3062345094u); continue; case 4u: this.GeoipCountry = other.GeoipCountry; arg_2A5_0 = (num * 1553243588u ^ 1773893837u); continue; case 5u: arg_2A5_0 = (other.RestrictedMode ? 4242257222u : 2465691387u); continue; case 6u: arg_2A5_0 = (((other.ConnectedRegion != 0u) ? 2811432812u : 3775641821u) ^ num * 2114504872u); continue; case 7u: this.BattleTag = other.BattleTag; arg_2A5_0 = (num * 3480789633u ^ 2581215475u); continue; case 8u: this.ConnectedRegion = other.ConnectedRegion; arg_2A5_0 = (num * 3175961466u ^ 2118666381u); continue; case 10u: arg_2A5_0 = (((this.accountId_ == null) ? 4049523727u : 2971727912u) ^ num * 3872610211u); continue; case 11u: arg_2A5_0 = ((other.SessionKey.Length == 0) ? 2881419796u : 3633593735u); continue; case 12u: this.Email = other.Email; arg_2A5_0 = (num * 3317560004u ^ 3097421970u); continue; case 13u: this.AccountId.MergeFrom(other.AccountId); arg_2A5_0 = 2567952570u; continue; case 14u: this.availableRegion_.Add(other.availableRegion_); arg_2A5_0 = 3190260081u; continue; case 15u: this.RestrictedMode = other.RestrictedMode; arg_2A5_0 = (num * 3217903479u ^ 438849017u); continue; case 16u: arg_2A5_0 = (((LogonResult.smethod_2(other.Email) != 0) ? 3626120742u : 3809775335u) ^ num * 1245554397u); continue; case 17u: this.accountId_ = new EntityId(); arg_2A5_0 = (num * 1156807718u ^ 94325072u); continue; case 18u: this.ErrorCode = other.ErrorCode; arg_2A5_0 = (num * 1483441727u ^ 1586331597u); continue; case 19u: this.SessionKey = other.SessionKey; arg_2A5_0 = (num * 4230498276u ^ 1849854280u); continue; case 20u: this.gameAccountId_.Add(other.gameAccountId_); arg_2A5_0 = 2765936501u; continue; case 21u: arg_2A5_0 = ((other.accountId_ == null) ? 2567952570u : 2931516530u); continue; case 22u: arg_2A5_0 = ((LogonResult.smethod_2(other.GeoipCountry) != 0) ? 2619093486u : 3541698517u); continue; } break; } return; IL_29B: arg_2A5_0 = 2784740459u; goto IL_2A0; IL_31D: arg_2A5_0 = ((other.ErrorCode != 0u) ? 2466058392u : 2416705661u); goto IL_2A0; } public void MergeFrom(CodedInputStream input) { while (true) { IL_4D2: uint num; uint arg_416_0 = ((num = input.ReadTag()) == 0u) ? 1100098469u : 348859844u; while (true) { uint num2; switch ((num2 = (arg_416_0 ^ 763073532u)) % 40u) { case 0u: arg_416_0 = (num2 * 2172617672u ^ 1843346550u); continue; case 1u: arg_416_0 = (num2 * 1615349396u ^ 4000277435u); continue; case 2u: arg_416_0 = ((this.accountId_ != null) ? 191091038u : 50140917u); continue; case 3u: this.availableRegion_.AddEntriesFrom(input, LogonResult._repeated_availableRegion_codec); arg_416_0 = 2128203194u; continue; case 4u: arg_416_0 = 348859844u; continue; case 5u: arg_416_0 = (num2 * 3177817960u ^ 1646510142u); continue; case 6u: arg_416_0 = (((num == 40u) ? 62587635u : 1518673041u) ^ num2 * 736965534u); continue; case 7u: arg_416_0 = (((num != 74u) ? 1666167250u : 347964368u) ^ num2 * 1484523772u); continue; case 8u: this.SessionKey = input.ReadBytes(); arg_416_0 = 1889314523u; continue; case 10u: input.ReadMessage(this.accountId_); arg_416_0 = 797892441u; continue; case 11u: arg_416_0 = (((num <= 18u) ? 634959937u : 406427596u) ^ num2 * 2661949978u); continue; case 12u: arg_416_0 = ((num != 66u) ? 1882444987u : 62564513u); continue; case 13u: arg_416_0 = (num2 * 2534992932u ^ 1292624642u); continue; case 14u: arg_416_0 = (num2 * 2294553100u ^ 2220001150u); continue; case 15u: arg_416_0 = ((num > 58u) ? 1345554976u : 1186711664u); continue; case 16u: this.gameAccountId_.AddEntriesFrom(input, LogonResult._repeated_gameAccountId_codec); arg_416_0 = 816570932u; continue; case 17u: arg_416_0 = (num2 * 72923673u ^ 3567812494u); continue; case 18u: goto IL_4D2; case 19u: arg_416_0 = (num2 * 1956827662u ^ 2915586412u); continue; case 20u: arg_416_0 = (((num == 42u) ? 373265915u : 1943485447u) ^ num2 * 2462064977u); continue; case 21u: this.GeoipCountry = input.ReadString(); arg_416_0 = 1117061174u; continue; case 22u: this.ConnectedRegion = input.ReadUInt32(); arg_416_0 = 1117061174u; continue; case 23u: this.BattleTag = input.ReadString(); arg_416_0 = 1398842455u; continue; case 24u: arg_416_0 = ((num <= 40u) ? 1344002911u : 956248963u); continue; case 25u: arg_416_0 = (((num != 58u) ? 1320429733u : 1559597311u) ^ num2 * 538027436u); continue; case 26u: arg_416_0 = (((num != 80u) ? 2055708235u : 745805162u) ^ num2 * 204015802u); continue; case 27u: arg_416_0 = (((num != 8u) ? 1606380354u : 114979748u) ^ num2 * 1928502728u); continue; case 28u: arg_416_0 = (((num == 34u) ? 3023450408u : 3513588770u) ^ num2 * 251142920u); continue; case 29u: arg_416_0 = (num2 * 286512771u ^ 1957359377u); continue; case 30u: arg_416_0 = ((num != 26u) ? 656680768u : 1348806636u); continue; case 31u: arg_416_0 = (num2 * 664201682u ^ 3463518408u); continue; case 32u: this.ErrorCode = input.ReadUInt32(); arg_416_0 = 1202999409u; continue; case 33u: this.accountId_ = new EntityId(); arg_416_0 = (num2 * 1410375303u ^ 1375233249u); continue; case 34u: this.RestrictedMode = input.ReadBool(); arg_416_0 = 1117061174u; continue; case 35u: input.SkipLastField(); arg_416_0 = 151720729u; continue; case 36u: this.Email = input.ReadString(); arg_416_0 = 1117061174u; continue; case 37u: arg_416_0 = (num2 * 765013543u ^ 3054420412u); continue; case 38u: arg_416_0 = (((num == 18u) ? 3281916378u : 3882881113u) ^ num2 * 3267745042u); continue; case 39u: arg_416_0 = (((num == 48u) ? 308857601u : 1824859654u) ^ num2 * 1537564117u); continue; } return; } } } static LogonResult() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_76: uint arg_5A_0 = 832497899u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 1555164529u)) % 4u) { case 0u: goto IL_76; case 1u: LogonResult._repeated_availableRegion_codec = FieldCodec.ForUInt32(42u); arg_5A_0 = (num * 207475120u ^ 270425986u); continue; case 2u: LogonResult._repeated_gameAccountId_codec = FieldCodec.ForMessage<EntityId>(26u, EntityId.Parser); arg_5A_0 = (num * 597253937u ^ 2806366930u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol/InvitationTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class InvitationTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return InvitationTypesReflection.descriptor; } } static InvitationTypesReflection() { InvitationTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(InvitationTypesReflection.smethod_1(InvitationTypesReflection.smethod_0(new string[] { Module.smethod_33<string>(1245704574u), Module.smethod_34<string>(1257299406u), Module.smethod_36<string>(3273991253u), Module.smethod_37<string>(760797825u), Module.smethod_37<string>(410197873u), Module.smethod_36<string>(2880337989u), Module.smethod_33<string>(1861087006u), Module.smethod_34<string>(1529356910u), Module.smethod_35<string>(1026175917u), Module.smethod_33<string>(122681486u), Module.smethod_33<string>(224774494u), Module.smethod_33<string>(1963180014u), Module.smethod_35<string>(2691059437u), Module.smethod_33<string>(2781336270u), Module.smethod_36<string>(1317464469u), Module.smethod_33<string>(326867502u), Module.smethod_33<string>(3701585534u), Module.smethod_35<string>(3698422013u), Module.smethod_37<string>(205720529u), Module.smethod_36<string>(2474945189u), Module.smethod_34<string>(200127486u), Module.smethod_33<string>(3803678542u), Module.smethod_36<string>(1699378197u), Module.smethod_35<string>(1418179869u), Module.smethod_33<string>(428960510u), Module.smethod_37<string>(1053043041u), Module.smethod_34<string>(2245416094u), Module.smethod_35<string>(3083063389u), Module.smethod_34<string>(1495523198u), Module.smethod_34<string>(1870469646u), Module.smethod_36<string>(2081291925u), Module.smethod_34<string>(1120576750u), Module.smethod_35<string>(2425542445u), Module.smethod_37<string>(556320481u), Module.smethod_35<string>(3643716621u) })), new FileDescriptor[] { EntityTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(Invitation).TypeHandle), Invitation.Parser, new string[] { Module.smethod_34<string>(4055669268u), Module.smethod_36<string>(4048185505u), Module.smethod_33<string>(432693463u), Module.smethod_33<string>(2612257700u), Module.smethod_34<string>(2930829924u), Module.smethod_33<string>(3481460460u), Module.smethod_37<string>(3536773725u), Module.smethod_37<string>(2251201273u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(InvitationSuggestion).TypeHandle), InvitationSuggestion.Parser, new string[] { Module.smethod_33<string>(4242012875u), Module.smethod_33<string>(1250849719u), Module.smethod_33<string>(816248339u), Module.smethod_36<string>(612867282u), Module.smethod_36<string>(1565059903u), Module.smethod_35<string>(1531273800u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(InvitationTarget).TypeHandle), InvitationTarget.Parser, new string[] { Module.smethod_36<string>(3432321208u), Module.smethod_33<string>(2222145487u), Module.smethod_37<string>(88922644u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(InvitationParams).TypeHandle), InvitationParams.Parser, new string[] { Module.smethod_33<string>(3481460460u), Module.smethod_33<string>(272996614u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(SendInvitationRequest).TypeHandle), SendInvitationRequest.Parser, new string[] { Module.smethod_35<string>(3084196665u), Module.smethod_35<string>(1657194122u), Module.smethod_36<string>(343698105u), Module.smethod_33<string>(1084595533u), Module.smethod_33<string>(649994153u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(SendInvitationResponse).TypeHandle), SendInvitationResponse.Parser, new string[] { Module.smethod_36<string>(2734280159u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(UpdateInvitationRequest).TypeHandle), UpdateInvitationRequest.Parser, new string[] { Module.smethod_36<string>(1709744993u), Module.smethod_33<string>(1410546568u), Module.smethod_33<string>(2548096522u) }, null, null, null), new GeneratedCodeInfo(InvitationTypesReflection.smethod_2(typeof(GenericInvitationRequest).TypeHandle), GenericInvitationRequest.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_33<string>(3091348247u), Module.smethod_33<string>(1410546568u), Module.smethod_36<string>(2826823707u), Module.smethod_35<string>(789711535u), Module.smethod_36<string>(219214018u), Module.smethod_34<string>(2809429945u), Module.smethod_36<string>(3148134426u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Serialization/Json.cs using System; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; namespace Framework.Serialization { public class Json { public static string CreateString<T>(T dataObject) { return Json.smethod_1(Json.smethod_0(), Json.CreateArray<T>(dataObject)); } public static byte[] CreateArray<T>(T dataObject) { XmlObjectSerializer arg_1C_0 = Json.smethod_3(Json.smethod_2(typeof(T).TypeHandle)); MemoryStream memoryStream = Json.smethod_4(); Json.smethod_5(arg_1C_0, memoryStream, dataObject); return Json.smethod_6(memoryStream); } public static T CreateObject<T>(string jsonData) { return Json.CreateObject<T>(Json.smethod_7(Json.smethod_0(), jsonData)); } public static T CreateObject<T>(byte[] jsonData) { return Json.CreateObject<T>(Json.smethod_8(jsonData)); } public static T CreateObject<T>(Stream jsonData) { DataContractJsonSerializer xmlObjectSerializer_ = Json.smethod_3(Json.smethod_2(typeof(T).TypeHandle)); T result; try { result = (T)((object)Json.smethod_9(xmlObjectSerializer_, jsonData)); } catch (Exception) { T t; while (true) { IL_56: uint arg_27_0 = 186826059u; while (true) { uint num; switch ((num = (arg_27_0 ^ 223170181u)) % 3u) { case 0u: goto IL_56; case 2u: t = default(T); arg_27_0 = (num * 4187417331u ^ 2263809355u); continue; } goto Block_4; } } Block_4: result = t; } return result; } static Encoding smethod_0() { return Encoding.UTF8; } static string smethod_1(Encoding encoding_0, byte[] byte_0) { return encoding_0.GetString(byte_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static DataContractJsonSerializer smethod_3(Type type_0) { return new DataContractJsonSerializer(type_0); } static MemoryStream smethod_4() { return new MemoryStream(); } static void smethod_5(XmlObjectSerializer xmlObjectSerializer_0, Stream stream_0, object object_0) { xmlObjectSerializer_0.WriteObject(stream_0, object_0); } static byte[] smethod_6(MemoryStream memoryStream_0) { return memoryStream_0.ToArray(); } static byte[] smethod_7(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static MemoryStream smethod_8(byte[] byte_0) { return new MemoryStream(byte_0); } static object smethod_9(XmlObjectSerializer xmlObjectSerializer_0, Stream stream_0) { return xmlObjectSerializer_0.ReadObject(stream_0); } } } <file_sep>/Bgs.Protocol.Channel.V1/SendMessageNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class SendMessageNotification : IMessage<SendMessageNotification>, IEquatable<SendMessageNotification>, IDeepCloneable<SendMessageNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendMessageNotification.__c __9 = new SendMessageNotification.__c(); internal SendMessageNotification cctor>b__49_0() { return new SendMessageNotification(); } } private static readonly MessageParser<SendMessageNotification> _parser = new MessageParser<SendMessageNotification>(new Func<SendMessageNotification>(SendMessageNotification.__c.__9.<.cctor>b__49_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MessageFieldNumber = 2; private Message message_; public const int RequiredPrivilegesFieldNumber = 3; private ulong requiredPrivileges_; public const int IdentityFieldNumber = 4; private string identity_ = ""; public const int ChannelIdFieldNumber = 5; private ChannelId channelId_; public const int SubscriberFieldNumber = 6; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<SendMessageNotification> Parser { get { return SendMessageNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return SendMessageNotification.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public Message Message { get { return this.message_; } set { this.message_ = value; } } public ulong RequiredPrivileges { get { return this.requiredPrivileges_; } set { this.requiredPrivileges_ = value; } } public string Identity { get { return this.identity_; } set { this.identity_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public SendMessageNotification() { } public SendMessageNotification(SendMessageNotification other) : this() { while (true) { IL_CA: uint arg_A6_0 = 2949938776u; while (true) { uint num; switch ((num = (arg_A6_0 ^ 2386836935u)) % 6u) { case 0u: this.identity_ = other.identity_; arg_A6_0 = (num * 2360223203u ^ 4213567853u); continue; case 1u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.Message = ((other.message_ != null) ? other.Message.Clone() : null); arg_A6_0 = 2579089506u; continue; case 2u: this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); arg_A6_0 = 2281390182u; continue; case 4u: goto IL_CA; case 5u: this.requiredPrivileges_ = other.requiredPrivileges_; arg_A6_0 = (num * 3314484689u ^ 475774018u); continue; } goto Block_4; } } Block_4: this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); } public SendMessageNotification Clone() { return new SendMessageNotification(this); } public override bool Equals(object other) { return this.Equals(other as SendMessageNotification); } public bool Equals(SendMessageNotification other) { if (other == null) { goto IL_18; } goto IL_18C; int arg_12E_0; while (true) { IL_129: switch ((arg_12E_0 ^ 1405928482) % 17) { case 0: return false; case 1: arg_12E_0 = ((!SendMessageNotification.smethod_0(this.AgentId, other.AgentId)) ? 1402405254 : 382703837); continue; case 2: return false; case 3: return false; case 4: return false; case 6: arg_12E_0 = (SendMessageNotification.smethod_0(this.ChannelId, other.ChannelId) ? 1448964536 : 1595085169); continue; case 7: arg_12E_0 = ((this.RequiredPrivileges != other.RequiredPrivileges) ? 874952389 : 524606008); continue; case 8: goto IL_18C; case 9: arg_12E_0 = (SendMessageNotification.smethod_0(this.Subscriber, other.Subscriber) ? 2038870150 : 601789551); continue; case 10: return false; case 11: arg_12E_0 = (SendMessageNotification.smethod_0(this.Message, other.Message) ? 1169366844 : 870283214); continue; case 12: return true; case 13: arg_12E_0 = (SendMessageNotification.smethod_1(this.Identity, other.Identity) ? 167336296 : 2056344283); continue; case 14: goto IL_18; case 15: return false; case 16: return false; } break; } return true; IL_18: arg_12E_0 = 2081969738; goto IL_129; IL_18C: arg_12E_0 = ((other == this) ? 703557770 : 178250320); goto IL_129; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_86; } goto IL_179; uint arg_131_0; while (true) { IL_12C: uint num2; switch ((num2 = (arg_131_0 ^ 2718267739u)) % 11u) { case 0u: arg_131_0 = ((this.subscriber_ == null) ? 2474490393u : 3462542633u); continue; case 1u: num ^= this.Identity.GetHashCode(); arg_131_0 = (num2 * 1335119942u ^ 1995936952u); continue; case 2u: arg_131_0 = ((this.Identity.Length == 0) ? 3580256658u : 4128086204u); continue; case 3u: goto IL_179; case 4u: num ^= this.ChannelId.GetHashCode(); arg_131_0 = (num2 * 183387728u ^ 1854034263u); continue; case 5u: num ^= this.Subscriber.GetHashCode(); arg_131_0 = (num2 * 4187692082u ^ 821222493u); continue; case 6u: goto IL_86; case 8u: num ^= this.RequiredPrivileges.GetHashCode(); arg_131_0 = (num2 * 2200072523u ^ 3224666874u); continue; case 9u: num ^= SendMessageNotification.smethod_2(this.AgentId); arg_131_0 = (num2 * 2975028775u ^ 1199447075u); continue; case 10u: arg_131_0 = ((this.channelId_ != null) ? 3390663622u : 3411078727u); continue; } break; } return num; IL_86: arg_131_0 = 3161904002u; goto IL_12C; IL_179: num ^= SendMessageNotification.smethod_2(this.Message); arg_131_0 = ((this.RequiredPrivileges != 0uL) ? 2178938013u : 3755175416u); goto IL_12C; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_176; } goto IL_1D4; uint arg_180_0; while (true) { IL_17B: uint num; switch ((num = (arg_180_0 ^ 3148151958u)) % 14u) { case 0u: goto IL_176; case 1u: arg_180_0 = ((this.channelId_ == null) ? 3751534054u : 4159611096u); continue; case 2u: output.WriteMessage(this.Subscriber); arg_180_0 = (num * 1850481393u ^ 2065812190u); continue; case 3u: output.WriteRawTag(24); output.WriteUInt64(this.RequiredPrivileges); arg_180_0 = (num * 3943047113u ^ 3986694914u); continue; case 4u: output.WriteString(this.Identity); arg_180_0 = (num * 573566848u ^ 1309751189u); continue; case 5u: arg_180_0 = ((SendMessageNotification.smethod_3(this.Identity) != 0) ? 2599399877u : 2583665557u); continue; case 6u: output.WriteMessage(this.AgentId); arg_180_0 = (num * 2474477767u ^ 1155690589u); continue; case 7u: output.WriteRawTag(34); arg_180_0 = (num * 3285022423u ^ 1813816203u); continue; case 8u: arg_180_0 = ((this.subscriber_ == null) ? 2605113330u : 4096126875u); continue; case 9u: goto IL_1D4; case 11u: output.WriteRawTag(10); arg_180_0 = (num * 786165733u ^ 2907964995u); continue; case 12u: output.WriteRawTag(42); output.WriteMessage(this.ChannelId); arg_180_0 = (num * 705810672u ^ 41432262u); continue; case 13u: output.WriteRawTag(50); arg_180_0 = (num * 1660004225u ^ 3239954423u); continue; } break; } return; IL_176: arg_180_0 = 3467045247u; goto IL_17B; IL_1D4: output.WriteRawTag(18); output.WriteMessage(this.Message); arg_180_0 = ((this.RequiredPrivileges == 0uL) ? 3841332815u : 3889508339u); goto IL_17B; } public int CalculateSize() { int num = 0; while (true) { IL_1CC: uint arg_18B_0 = 3561305828u; while (true) { uint num2; switch ((num2 = (arg_18B_0 ^ 3849662867u)) % 13u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_18B_0 = (num2 * 4240702393u ^ 2552705408u); continue; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Identity); arg_18B_0 = (num2 * 1901174488u ^ 2701458195u); continue; case 2u: arg_18B_0 = ((SendMessageNotification.smethod_3(this.Identity) != 0) ? 2193364233u : 3825407715u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_18B_0 = (num2 * 1764129045u ^ 3881764205u); continue; case 4u: goto IL_1CC; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.RequiredPrivileges); arg_18B_0 = (num2 * 2257363106u ^ 1309778077u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Message); arg_18B_0 = 3545614010u; continue; case 8u: arg_18B_0 = ((this.subscriber_ == null) ? 3878653283u : 3833073372u); continue; case 9u: arg_18B_0 = (((this.RequiredPrivileges == 0uL) ? 4234144296u : 3989144913u) ^ num2 * 1864201591u); continue; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_18B_0 = (num2 * 1477825527u ^ 2942222170u); continue; case 11u: arg_18B_0 = (((this.agentId_ == null) ? 2104322365u : 2070042158u) ^ num2 * 3434211979u); continue; case 12u: arg_18B_0 = ((this.channelId_ == null) ? 3587227644u : 4165227294u); continue; } return num; } } return num; } public void MergeFrom(SendMessageNotification other) { if (other == null) { goto IL_18; } goto IL_313; uint arg_29B_0; while (true) { IL_296: uint num; switch ((num = (arg_29B_0 ^ 2596052667u)) % 23u) { case 0u: this.agentId_ = new EntityId(); arg_29B_0 = (num * 1680651311u ^ 249637217u); continue; case 1u: this.AgentId.MergeFrom(other.AgentId); arg_29B_0 = 3256724406u; continue; case 2u: arg_29B_0 = ((other.RequiredPrivileges != 0uL) ? 3844002965u : 3410786909u); continue; case 3u: this.RequiredPrivileges = other.RequiredPrivileges; arg_29B_0 = (num * 3916104912u ^ 3614607165u); continue; case 4u: arg_29B_0 = (((this.subscriber_ == null) ? 378452872u : 1201400331u) ^ num * 3261287054u); continue; case 5u: arg_29B_0 = (((this.agentId_ == null) ? 1384185499u : 1462731905u) ^ num * 2549688988u); continue; case 6u: arg_29B_0 = ((other.subscriber_ != null) ? 2596373027u : 3492747679u); continue; case 7u: this.channelId_ = new ChannelId(); arg_29B_0 = (num * 4273866428u ^ 2878315161u); continue; case 8u: return; case 9u: this.Subscriber.MergeFrom(other.Subscriber); arg_29B_0 = 3492747679u; continue; case 10u: this.Message.MergeFrom(other.Message); arg_29B_0 = 3666815063u; continue; case 11u: this.ChannelId.MergeFrom(other.ChannelId); arg_29B_0 = 3194540893u; continue; case 12u: goto IL_313; case 14u: arg_29B_0 = (((this.message_ != null) ? 911985727u : 1298555542u) ^ num * 3033106669u); continue; case 15u: this.Identity = other.Identity; arg_29B_0 = (num * 804802855u ^ 3641261191u); continue; case 16u: arg_29B_0 = (((this.channelId_ == null) ? 2122630548u : 363013861u) ^ num * 1946899084u); continue; case 17u: arg_29B_0 = ((SendMessageNotification.smethod_3(other.Identity) == 0) ? 3887292447u : 3791680275u); continue; case 18u: arg_29B_0 = ((other.message_ == null) ? 3666815063u : 3160971821u); continue; case 19u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_29B_0 = (num * 2078162707u ^ 3753478402u); continue; case 20u: arg_29B_0 = ((other.channelId_ != null) ? 3526892921u : 3194540893u); continue; case 21u: this.message_ = new Message(); arg_29B_0 = (num * 1542510036u ^ 3586769629u); continue; case 22u: goto IL_18; } break; } return; IL_18: arg_29B_0 = 3837003499u; goto IL_296; IL_313: arg_29B_0 = ((other.agentId_ == null) ? 3256724406u : 3851797275u); goto IL_296; } public void MergeFrom(CodedInputStream input) { while (true) { IL_37A: uint num; uint arg_2EE_0 = ((num = input.ReadTag()) != 0u) ? 1360092066u : 458567445u; while (true) { uint num2; switch ((num2 = (arg_2EE_0 ^ 612373155u)) % 28u) { case 0u: arg_2EE_0 = (num2 * 605435755u ^ 1536315760u); continue; case 1u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_2EE_0 = (num2 * 1540154845u ^ 2485216283u); continue; case 2u: this.RequiredPrivileges = input.ReadUInt64(); arg_2EE_0 = 1453806574u; continue; case 3u: arg_2EE_0 = ((num != 34u) ? 266516172u : 1548885400u); continue; case 4u: arg_2EE_0 = (num2 * 3735117353u ^ 178317570u); continue; case 5u: arg_2EE_0 = ((this.message_ != null) ? 2123807428u : 922970677u); continue; case 6u: this.channelId_ = new ChannelId(); arg_2EE_0 = (num2 * 3220389830u ^ 1008845252u); continue; case 7u: arg_2EE_0 = (((num != 18u) ? 4091524686u : 3116080599u) ^ num2 * 2783140243u); continue; case 8u: arg_2EE_0 = (((num == 10u) ? 2886253311u : 4139427116u) ^ num2 * 25661407u); continue; case 9u: arg_2EE_0 = (((num == 50u) ? 1612792393u : 393835700u) ^ num2 * 340784308u); continue; case 10u: arg_2EE_0 = ((this.subscriber_ == null) ? 1924574634u : 1081119710u); continue; case 11u: input.SkipLastField(); arg_2EE_0 = 1453806574u; continue; case 12u: arg_2EE_0 = ((this.agentId_ != null) ? 1125554859u : 1407898661u); continue; case 13u: arg_2EE_0 = (num2 * 613127549u ^ 4151077939u); continue; case 14u: arg_2EE_0 = 1360092066u; continue; case 15u: this.Identity = input.ReadString(); arg_2EE_0 = 1956969391u; continue; case 16u: arg_2EE_0 = (((num == 24u) ? 143177605u : 1797150099u) ^ num2 * 46997548u); continue; case 17u: input.ReadMessage(this.subscriber_); arg_2EE_0 = 1453806574u; continue; case 18u: this.agentId_ = new EntityId(); arg_2EE_0 = (num2 * 3593723837u ^ 4267954245u); continue; case 19u: arg_2EE_0 = (((num == 42u) ? 1090887721u : 2024777232u) ^ num2 * 3559829458u); continue; case 20u: arg_2EE_0 = ((this.channelId_ == null) ? 751960045u : 938245520u); continue; case 21u: arg_2EE_0 = ((num > 24u) ? 737136368u : 166211935u); continue; case 22u: this.message_ = new Message(); arg_2EE_0 = (num2 * 4192734231u ^ 1727031230u); continue; case 23u: input.ReadMessage(this.channelId_); arg_2EE_0 = 1480782658u; continue; case 24u: input.ReadMessage(this.agentId_); arg_2EE_0 = 1453806574u; continue; case 25u: goto IL_37A; case 27u: input.ReadMessage(this.message_); arg_2EE_0 = 1453806574u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Account.V1/SubscriberReference.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class SubscriberReference : IMessage<SubscriberReference>, IEquatable<SubscriberReference>, IDeepCloneable<SubscriberReference>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscriberReference.__c __9 = new SubscriberReference.__c(); internal SubscriberReference cctor>b__54_0() { return new SubscriberReference(); } } private static readonly MessageParser<SubscriberReference> _parser = new MessageParser<SubscriberReference>(new Func<SubscriberReference>(SubscriberReference.__c.__9.<.cctor>b__54_0)); public const int ObjectIdFieldNumber = 1; private ulong objectId_; public const int EntityIdFieldNumber = 2; private EntityId entityId_; public const int AccountOptionsFieldNumber = 3; private AccountFieldOptions accountOptions_; public const int AccountTagsFieldNumber = 4; private AccountFieldTags accountTags_; public const int GameAccountOptionsFieldNumber = 5; private GameAccountFieldOptions gameAccountOptions_; public const int GameAccountTagsFieldNumber = 6; private GameAccountFieldTags gameAccountTags_; public const int SubscriberIdFieldNumber = 7; private ulong subscriberId_; public static MessageParser<SubscriberReference> Parser { get { return SubscriberReference._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[17]; } } MessageDescriptor IMessage.Descriptor { get { return SubscriberReference.Descriptor; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public AccountFieldOptions AccountOptions { get { return this.accountOptions_; } set { this.accountOptions_ = value; } } public AccountFieldTags AccountTags { get { return this.accountTags_; } set { this.accountTags_ = value; } } public GameAccountFieldOptions GameAccountOptions { get { return this.gameAccountOptions_; } set { this.gameAccountOptions_ = value; } } public GameAccountFieldTags GameAccountTags { get { return this.gameAccountTags_; } set { this.gameAccountTags_ = value; } } public ulong SubscriberId { get { return this.subscriberId_; } set { this.subscriberId_ = value; } } public SubscriberReference() { } public SubscriberReference(SubscriberReference other) : this() { while (true) { IL_113: uint arg_EB_0 = 3878078354u; while (true) { uint num; switch ((num = (arg_EB_0 ^ 3470425393u)) % 7u) { case 0u: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); this.AccountOptions = ((other.accountOptions_ != null) ? other.AccountOptions.Clone() : null); arg_EB_0 = 4042412614u; continue; case 1u: this.AccountTags = ((other.accountTags_ != null) ? other.AccountTags.Clone() : null); this.GameAccountOptions = ((other.gameAccountOptions_ != null) ? other.GameAccountOptions.Clone() : null); arg_EB_0 = 3626625434u; continue; case 2u: goto IL_113; case 3u: this.objectId_ = other.objectId_; arg_EB_0 = (num * 938022077u ^ 615892570u); continue; case 4u: this.GameAccountTags = ((other.gameAccountTags_ != null) ? other.GameAccountTags.Clone() : null); arg_EB_0 = 3265104969u; continue; case 6u: this.subscriberId_ = other.subscriberId_; arg_EB_0 = (num * 899562094u ^ 3834362183u); continue; } return; } } } public SubscriberReference Clone() { return new SubscriberReference(this); } public override bool Equals(object other) { return this.Equals(other as SubscriberReference); } public bool Equals(SubscriberReference other) { if (other == null) { goto IL_A8; } goto IL_1C1; int arg_15B_0; while (true) { IL_156: switch ((arg_15B_0 ^ 870814755) % 19) { case 0: return false; case 1: arg_15B_0 = ((this.SubscriberId != other.SubscriberId) ? 1604103459 : 1755470665); continue; case 2: arg_15B_0 = ((!SubscriberReference.smethod_0(this.EntityId, other.EntityId)) ? 436012102 : 969436390); continue; case 3: return false; case 4: goto IL_1C1; case 5: return false; case 7: return false; case 8: return true; case 9: arg_15B_0 = (SubscriberReference.smethod_0(this.GameAccountOptions, other.GameAccountOptions) ? 2095258153 : 1341487181); continue; case 10: arg_15B_0 = ((this.ObjectId != other.ObjectId) ? 1312054081 : 542836266); continue; case 11: return false; case 12: goto IL_A8; case 13: arg_15B_0 = (SubscriberReference.smethod_0(this.AccountTags, other.AccountTags) ? 1370294590 : 195704075); continue; case 14: return false; case 15: return false; case 16: return false; case 17: arg_15B_0 = (SubscriberReference.smethod_0(this.AccountOptions, other.AccountOptions) ? 1643919212 : 1657169448); continue; case 18: arg_15B_0 = ((!SubscriberReference.smethod_0(this.GameAccountTags, other.GameAccountTags)) ? 1327796316 : 969703822); continue; } break; } return true; IL_A8: arg_15B_0 = 1708178656; goto IL_156; IL_1C1: arg_15B_0 = ((other != this) ? 82528247 : 1423204394); goto IL_156; } public override int GetHashCode() { int num = 1; if (this.ObjectId != 0uL) { goto IL_7F; } goto IL_212; uint arg_1BA_0; while (true) { IL_1B5: uint num2; switch ((num2 = (arg_1BA_0 ^ 592738820u)) % 15u) { case 0u: arg_1BA_0 = ((this.gameAccountTags_ == null) ? 2079259792u : 385679097u); continue; case 1u: arg_1BA_0 = ((this.SubscriberId == 0uL) ? 972815222u : 1071404103u); continue; case 2u: arg_1BA_0 = ((this.accountTags_ == null) ? 734258142u : 406506927u); continue; case 3u: num ^= this.ObjectId.GetHashCode(); arg_1BA_0 = (num2 * 3966838733u ^ 2697437654u); continue; case 4u: arg_1BA_0 = ((this.accountOptions_ != null) ? 1818570295u : 1880306154u); continue; case 5u: arg_1BA_0 = ((this.gameAccountOptions_ == null) ? 1460870444u : 717026280u); continue; case 6u: num ^= this.GameAccountTags.GetHashCode(); arg_1BA_0 = (num2 * 113704632u ^ 4113459016u); continue; case 7u: num ^= this.SubscriberId.GetHashCode(); arg_1BA_0 = (num2 * 878328212u ^ 2305708746u); continue; case 8u: num ^= this.AccountOptions.GetHashCode(); arg_1BA_0 = (num2 * 408402000u ^ 3914384922u); continue; case 10u: goto IL_7F; case 11u: goto IL_212; case 12u: num ^= this.EntityId.GetHashCode(); arg_1BA_0 = (num2 * 2490094956u ^ 1587940659u); continue; case 13u: num ^= this.AccountTags.GetHashCode(); arg_1BA_0 = (num2 * 568100481u ^ 3810651381u); continue; case 14u: num ^= this.GameAccountOptions.GetHashCode(); arg_1BA_0 = (num2 * 2954621190u ^ 2789046948u); continue; } break; } return num; IL_7F: arg_1BA_0 = 1542418902u; goto IL_1B5; IL_212: arg_1BA_0 = ((this.entityId_ == null) ? 608945671u : 746312435u); goto IL_1B5; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.ObjectId != 0uL) { goto IL_1C8; } goto IL_2B4; uint arg_244_0; while (true) { IL_23F: uint num; switch ((num = (arg_244_0 ^ 3837819567u)) % 21u) { case 0u: arg_244_0 = ((this.gameAccountTags_ == null) ? 3726325411u : 3343218632u); continue; case 2u: output.WriteMessage(this.EntityId); arg_244_0 = (num * 2848878748u ^ 2535032651u); continue; case 3u: output.WriteMessage(this.AccountOptions); arg_244_0 = (num * 4287549339u ^ 1484796846u); continue; case 4u: output.WriteMessage(this.GameAccountTags); arg_244_0 = (num * 4121922236u ^ 483301287u); continue; case 5u: goto IL_1C8; case 6u: output.WriteUInt64(this.ObjectId); arg_244_0 = (num * 898961383u ^ 4100560217u); continue; case 7u: arg_244_0 = ((this.accountOptions_ == null) ? 3308872219u : 2650864916u); continue; case 8u: output.WriteRawTag(50); arg_244_0 = (num * 823222386u ^ 3754626430u); continue; case 9u: arg_244_0 = ((this.accountTags_ == null) ? 2562729434u : 3160356357u); continue; case 10u: output.WriteRawTag(8); arg_244_0 = (num * 4249088849u ^ 968670116u); continue; case 11u: output.WriteRawTag(42); output.WriteMessage(this.GameAccountOptions); arg_244_0 = (num * 1005051892u ^ 2775988075u); continue; case 12u: arg_244_0 = ((this.gameAccountOptions_ != null) ? 2328243937u : 3366746931u); continue; case 13u: goto IL_2B4; case 14u: arg_244_0 = ((this.SubscriberId != 0uL) ? 2817225217u : 3291656603u); continue; case 15u: output.WriteRawTag(26); arg_244_0 = (num * 3851038369u ^ 2915962075u); continue; case 16u: output.WriteRawTag(56); arg_244_0 = (num * 3274550153u ^ 238216296u); continue; case 17u: output.WriteMessage(this.AccountTags); arg_244_0 = (num * 4123879329u ^ 829169099u); continue; case 18u: output.WriteUInt64(this.SubscriberId); arg_244_0 = (num * 3606109994u ^ 1131832577u); continue; case 19u: output.WriteRawTag(34); arg_244_0 = (num * 1929795798u ^ 2456274626u); continue; case 20u: output.WriteRawTag(18); arg_244_0 = (num * 879265307u ^ 271929368u); continue; } break; } return; IL_1C8: arg_244_0 = 3039430438u; goto IL_23F; IL_2B4: arg_244_0 = ((this.entityId_ == null) ? 3261736603u : 4218128622u); goto IL_23F; } public int CalculateSize() { int num = 0; if (this.ObjectId != 0uL) { goto IL_85; } goto IL_217; uint arg_1BF_0; while (true) { IL_1BA: uint num2; switch ((num2 = (arg_1BF_0 ^ 4192880492u)) % 15u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountOptions); arg_1BF_0 = (num2 * 212289971u ^ 4091149460u); continue; case 2u: arg_1BF_0 = ((this.gameAccountTags_ == null) ? 3678693706u : 4076523319u); continue; case 3u: arg_1BF_0 = ((this.gameAccountOptions_ != null) ? 2255529217u : 3340868515u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountTags); arg_1BF_0 = (num2 * 1103076458u ^ 3595335354u); continue; case 5u: arg_1BF_0 = ((this.accountOptions_ == null) ? 2683183342u : 3282706528u); continue; case 6u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_1BF_0 = (num2 * 3082325268u ^ 3018886381u); continue; case 7u: arg_1BF_0 = ((this.SubscriberId != 0uL) ? 2938186093u : 2542746578u); continue; case 8u: goto IL_217; case 9u: arg_1BF_0 = ((this.accountTags_ != null) ? 2999580672u : 4115358722u); continue; case 10u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SubscriberId); arg_1BF_0 = (num2 * 3902378888u ^ 89733210u); continue; case 11u: goto IL_85; case 12u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountOptions); arg_1BF_0 = (num2 * 179257675u ^ 3419544682u); continue; case 13u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_1BF_0 = (num2 * 1375376437u ^ 1749332975u); continue; case 14u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountTags); arg_1BF_0 = (num2 * 2240860530u ^ 3181079244u); continue; } break; } return num; IL_85: arg_1BF_0 = 3396263625u; goto IL_1BA; IL_217: arg_1BF_0 = ((this.entityId_ == null) ? 3542491260u : 3076830923u); goto IL_1BA; } public void MergeFrom(SubscriberReference other) { if (other == null) { goto IL_209; } goto IL_3A9; uint arg_321_0; while (true) { IL_31C: uint num; switch ((num = (arg_321_0 ^ 3320593627u)) % 27u) { case 0u: this.gameAccountOptions_ = new GameAccountFieldOptions(); arg_321_0 = (num * 1913329696u ^ 2945321162u); continue; case 1u: return; case 2u: goto IL_3A9; case 3u: this.gameAccountTags_ = new GameAccountFieldTags(); arg_321_0 = (num * 1797178590u ^ 1805039602u); continue; case 4u: arg_321_0 = (((this.gameAccountOptions_ != null) ? 250204746u : 1268926348u) ^ num * 2008660328u); continue; case 5u: this.accountTags_ = new AccountFieldTags(); arg_321_0 = (num * 1309407819u ^ 2912128883u); continue; case 6u: this.GameAccountTags.MergeFrom(other.GameAccountTags); arg_321_0 = 3674878443u; continue; case 7u: arg_321_0 = ((other.gameAccountTags_ == null) ? 3674878443u : 3980489486u); continue; case 8u: arg_321_0 = (((this.entityId_ == null) ? 2701348995u : 3013348219u) ^ num * 645978031u); continue; case 9u: arg_321_0 = (((this.accountOptions_ != null) ? 3388698257u : 2341267386u) ^ num * 3615023683u); continue; case 10u: goto IL_209; case 11u: this.SubscriberId = other.SubscriberId; arg_321_0 = (num * 3220385875u ^ 2911180766u); continue; case 12u: arg_321_0 = ((other.accountOptions_ == null) ? 3013309846u : 3271423113u); continue; case 13u: this.AccountTags.MergeFrom(other.AccountTags); arg_321_0 = 3542425967u; continue; case 14u: this.GameAccountOptions.MergeFrom(other.GameAccountOptions); arg_321_0 = 2564978985u; continue; case 15u: arg_321_0 = ((other.accountTags_ != null) ? 2165806342u : 3542425967u); continue; case 16u: arg_321_0 = (((this.gameAccountTags_ != null) ? 1091015560u : 1937602327u) ^ num * 1130034142u); continue; case 18u: this.AccountOptions.MergeFrom(other.AccountOptions); arg_321_0 = 3013309846u; continue; case 19u: this.ObjectId = other.ObjectId; arg_321_0 = (num * 2538767675u ^ 1587528258u); continue; case 20u: this.entityId_ = new EntityId(); arg_321_0 = (num * 1618110388u ^ 1248278375u); continue; case 21u: arg_321_0 = ((other.SubscriberId != 0uL) ? 2583428730u : 2206227949u); continue; case 22u: arg_321_0 = (((this.accountTags_ != null) ? 3989176164u : 2709918700u) ^ num * 404614675u); continue; case 23u: this.accountOptions_ = new AccountFieldOptions(); arg_321_0 = (num * 737848842u ^ 3103570177u); continue; case 24u: arg_321_0 = ((other.gameAccountOptions_ != null) ? 3565125863u : 2564978985u); continue; case 25u: arg_321_0 = ((other.entityId_ != null) ? 3761599599u : 3707722186u); continue; case 26u: this.EntityId.MergeFrom(other.EntityId); arg_321_0 = 3707722186u; continue; } break; } return; IL_209: arg_321_0 = 2922007502u; goto IL_31C; IL_3A9: arg_321_0 = ((other.ObjectId != 0uL) ? 2576940158u : 2689064261u); goto IL_31C; } public void MergeFrom(CodedInputStream input) { while (true) { IL_486: uint num; uint arg_3D6_0 = ((num = input.ReadTag()) == 0u) ? 2820348397u : 2797522979u; while (true) { uint num2; switch ((num2 = (arg_3D6_0 ^ 2884098913u)) % 37u) { case 0u: this.accountTags_ = new AccountFieldTags(); arg_3D6_0 = (num2 * 254400894u ^ 1097125908u); continue; case 1u: input.ReadMessage(this.accountOptions_); arg_3D6_0 = 2382951512u; continue; case 2u: arg_3D6_0 = ((num > 26u) ? 3217443451u : 3683950347u); continue; case 3u: arg_3D6_0 = (num2 * 1379385328u ^ 2780347387u); continue; case 4u: arg_3D6_0 = (((num != 18u) ? 3744474575u : 3267580135u) ^ num2 * 39241765u); continue; case 5u: arg_3D6_0 = ((num != 50u) ? 3533704238u : 2258309840u); continue; case 7u: this.gameAccountTags_ = new GameAccountFieldTags(); arg_3D6_0 = (num2 * 2822986582u ^ 1731809301u); continue; case 8u: arg_3D6_0 = (num2 * 2359930653u ^ 1275683083u); continue; case 9u: arg_3D6_0 = (((num != 26u) ? 2452474370u : 2561095841u) ^ num2 * 1419572983u); continue; case 10u: input.ReadMessage(this.gameAccountOptions_); arg_3D6_0 = 4085691931u; continue; case 11u: input.ReadMessage(this.accountTags_); arg_3D6_0 = 3248037702u; continue; case 12u: this.entityId_ = new EntityId(); arg_3D6_0 = (num2 * 2611487500u ^ 3495333278u); continue; case 13u: this.gameAccountOptions_ = new GameAccountFieldOptions(); arg_3D6_0 = (num2 * 531221204u ^ 3468462154u); continue; case 14u: arg_3D6_0 = ((num <= 42u) ? 3806467273u : 3069250588u); continue; case 15u: arg_3D6_0 = (num2 * 740595601u ^ 330461745u); continue; case 16u: input.ReadMessage(this.entityId_); arg_3D6_0 = 3485358077u; continue; case 17u: arg_3D6_0 = (num2 * 1583982753u ^ 1070572410u); continue; case 18u: arg_3D6_0 = 2797522979u; continue; case 19u: this.ObjectId = input.ReadUInt64(); arg_3D6_0 = 3485358077u; continue; case 20u: goto IL_486; case 21u: this.SubscriberId = input.ReadUInt64(); arg_3D6_0 = 3485358077u; continue; case 22u: arg_3D6_0 = (((num == 8u) ? 1620283286u : 1885571492u) ^ num2 * 1378070929u); continue; case 23u: arg_3D6_0 = ((this.accountOptions_ != null) ? 2232383629u : 2753369266u); continue; case 24u: arg_3D6_0 = ((this.gameAccountOptions_ == null) ? 3226156196u : 3097684334u); continue; case 25u: arg_3D6_0 = (((num != 56u) ? 381296148u : 382255902u) ^ num2 * 1394114657u); continue; case 26u: arg_3D6_0 = (((num != 34u) ? 2798400557u : 3366885643u) ^ num2 * 3885296992u); continue; case 27u: input.ReadMessage(this.gameAccountTags_); arg_3D6_0 = 3054229716u; continue; case 28u: arg_3D6_0 = ((this.accountTags_ == null) ? 3999106284u : 2620021874u); continue; case 29u: this.accountOptions_ = new AccountFieldOptions(); arg_3D6_0 = (num2 * 299184746u ^ 219102163u); continue; case 30u: arg_3D6_0 = ((this.gameAccountTags_ == null) ? 2264522488u : 3559330931u); continue; case 31u: arg_3D6_0 = (num2 * 1466308959u ^ 2882198971u); continue; case 32u: arg_3D6_0 = (num2 * 596152625u ^ 1383138580u); continue; case 33u: arg_3D6_0 = (num2 * 2073714541u ^ 1258416364u); continue; case 34u: input.SkipLastField(); arg_3D6_0 = 3094751631u; continue; case 35u: arg_3D6_0 = (((num != 42u) ? 945908855u : 134834932u) ^ num2 * 1128666773u); continue; case 36u: arg_3D6_0 = ((this.entityId_ != null) ? 2254539982u : 3439624829u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/Emote.cs using System; namespace AuthServer.WorldServer.Game.Entities { public class Emote { public int Id { get; set; } public int EmoteId { get; set; } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/AuthenticationHandler.cs using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants.Net; using Framework.Cryptography.WoW; using Framework.Database.Auth.Entities; using Framework.Misc; using Framework.Network.Packets; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Security.Cryptography; using System.Text; namespace AuthServer.Game.Packets.PacketHandler { public class AuthenticationHandler : Manager { private static byte[] clientSeed; private static byte[] serverSeed; private static byte[] sessionKey = new byte[40]; private static byte[] arr1; private static byte[] arr2; private static byte[] sha2_3_grml; private static byte[] addondataaaa; public static WorldClass2 session2; private static int[] payloadOrder; public static void HandleAuthChallenge(ref PacketReader packet, WorldClass session) { session.initiated = true; while (true) { IL_145: uint arg_10C_0 = 2459053777u; while (true) { uint num; switch ((num = (arg_10C_0 ^ 4291803379u)) % 11u) { case 0u: arg_10C_0 = (num * 3870351961u ^ 1505659660u); continue; case 1u: { int num2; arg_10C_0 = ((num2 < 8) ? 3540268399u : 3313807745u); continue; } case 2u: { PacketWriter packetWriter; packetWriter.WriteBytes(Globals.ServerSalt, 0); packetWriter.WriteUInt8(1); arg_10C_0 = (num * 732999107u ^ 2252234520u); continue; } case 3u: { int num2 = 0; arg_10C_0 = (num * 1996418291u ^ 1021293114u); continue; } case 4u: { Manager.WorldMgr.Sessions2.Clear(); PacketWriter packetWriter = new PacketWriter(ServerMessage.AuthChallenge, false); arg_10C_0 = (num * 1186221898u ^ 2702994982u); continue; } case 5u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_10C_0 = (num * 1648681476u ^ 2372259125u); continue; } case 6u: Globals.ServerSalt = new byte[0].GenerateRandomKey(16); arg_10C_0 = (num * 1231038991u ^ 850751506u); continue; case 7u: Manager.WorldMgr.Sessions.Clear(); arg_10C_0 = (num * 2198824245u ^ 80213818u); continue; case 8u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); int num2; num2++; arg_10C_0 = 3003786868u; continue; } case 9u: goto IL_145; } return; } } } public static void HandleAuthChallenge(ref PacketReader packet, WorldClass2 session) { session.initiated = true; PacketWriter packetWriter; while (true) { IL_B5: uint arg_91_0 = 678710099u; while (true) { uint num; switch ((num = (arg_91_0 ^ 1840759029u)) % 6u) { case 1u: AuthenticationHandler.smethod_0(packetWriter, AuthenticationHandler.clientSeed = new byte[16]); AuthenticationHandler.smethod_0(packetWriter, AuthenticationHandler.serverSeed = new byte[16]); arg_91_0 = (num * 1123221691u ^ 983032136u); continue; case 2u: packetWriter = new PacketWriter(ServerMessage.AuthChallenge, false); arg_91_0 = (num * 2546250082u ^ 4201805034u); continue; case 3u: goto IL_B5; case 4u: AuthenticationHandler.smethod_0(packetWriter, new byte[16]); arg_91_0 = (num * 1487317018u ^ 3313288268u); continue; case 5u: packetWriter.WriteUInt8(1); arg_91_0 = (num * 320817430u ^ 2502966289u); continue; } goto Block_1; } } Block_1: session.Send(ref packetWriter); } [Opcode(ClientMessage.AuthSession, "18125")] public static void HandleAuthResponse(ref PacketReader packet, WorldClass session) { BitUnpack arg_28_0 = new BitUnpack(packet); packet.Skip(23); Globals.ClientSalt = packet.ReadBytes(16u); packet.ReadBytes(24u); arg_28_0.GetBit(); packet.ReadBytes(AuthenticationHandler.smethod_1(packet)); while (true) { IL_921: uint arg_82F_0 = 2017539580u; while (true) { uint num; switch ((num = (arg_82F_0 ^ 973532324u)) % 57u) { case 0u: TimeHandler.HandleSetTimezoneInformation(ref session); arg_82F_0 = (num * 3644867839u ^ 4102176202u); continue; case 1u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 3925958146u ^ 429357566u); continue; } case 2u: { BitPack bitPack; bitPack.Flush(); PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 3843609867u ^ 274333066u); continue; } case 3u: { PacketWriter packetWriter; byte[,] array; int num2; packetWriter.WriteUInt8(array[num2, 1]); arg_82F_0 = (num * 2139226297u ^ 222787957u); continue; } case 4u: { int num3 = 0; arg_82F_0 = (num * 1275993637u ^ 3289780354u); continue; } case 5u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); BitPack bitPack; bool flag; bitPack.Write<bool>(flag); bool bit; bitPack.Write<bool>(bit); bitPack.Flush(); arg_82F_0 = (num * 190331667u ^ 3544293151u); continue; } case 6u: { PacketWriter packetWriter; int num3; byte[,] array2; packetWriter.WriteUInt8(array2[num3, 0]); arg_82F_0 = 979003297u; continue; } case 7u: { SHA256Managed hashAlgorithm_; byte[] array3; AuthenticationHandler.smethod_4(hashAlgorithm_, array3, array3.Length >> 1, array3.Length - (array3.Length >> 1)); SHA256Managed hashAlgorithm_2; SHA256Managed hashAlgorithm_3; AuthenticationHandler.smethod_3(hashAlgorithm_2, AuthenticationHandler.smethod_5(hashAlgorithm_3), 0, 32, AuthenticationHandler.smethod_5(hashAlgorithm_3), 0); arg_82F_0 = (num * 4247721102u ^ 2164875264u); continue; } case 8u: goto IL_921; case 9u: { int num3; byte[,] array2; arg_82F_0 = ((num3 < AuthenticationHandler.smethod_9(array2) / 2) ? 942732371u : 402681424u); continue; } case 10u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 1272726928u ^ 3573012072u); continue; } case 11u: { int num4; arg_82F_0 = ((num4 != 32) ? 1613600137u : 94715230u); continue; } case 12u: { SHA256Managed hashAlgorithm_; SHA256Managed hashAlgorithm_2; AuthenticationHandler.smethod_4(hashAlgorithm_2, AuthenticationHandler.smethod_5(hashAlgorithm_), 0, 32); AuthenticationHandler.sha2_3_grml = AuthenticationHandler.smethod_5(hashAlgorithm_2); int num4 = 0; int num5 = 0; arg_82F_0 = (num * 1594528258u ^ 4035022218u); continue; } case 13u: arg_82F_0 = (num * 3592674904u ^ 3437742173u); continue; case 14u: AuthenticationHandler.HandleConnectTo(session, 3724, 1, null); arg_82F_0 = (num * 4096365546u ^ 2720471261u); continue; case 15u: { bool bit = false; PacketWriter packetWriter = new PacketWriter(ServerMessage.AuthResponse, true); arg_82F_0 = (num * 1668503324u ^ 4008787019u); continue; } case 16u: { int num4; arg_82F_0 = ((num4 < 40) ? 1976385685u : 1159001732u); continue; } case 17u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 3445906520u ^ 4063066220u); continue; } case 18u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); arg_82F_0 = (num * 621848300u ^ 3406194050u); continue; } case 19u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 3867729530u ^ 1908424397u); continue; } case 20u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 1394835192u ^ 145004486u); continue; } case 21u: { PacketWriter packetWriter; byte[,] array2; packetWriter.WriteInt32(AuthenticationHandler.smethod_9(array2) / 2); byte[,] array; packetWriter.WriteInt32(AuthenticationHandler.smethod_9(array) / 2); arg_82F_0 = (num * 3125389306u ^ 6579303u); continue; } case 22u: { byte[,] array; int num2; arg_82F_0 = ((num2 < AuthenticationHandler.smethod_9(array) / 2) ? 248887578u : 276684735u); continue; } case 23u: { int num4; num4++; int num5; num5++; arg_82F_0 = (num * 2780937424u ^ 1515612061u); continue; } case 24u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 192068700u ^ 4062459581u); continue; } case 25u: { byte[,] expr_4C2 = new byte[12, 2]; AuthenticationHandler.smethod_8(expr_4C2, fieldof(<PrivateImplementationDetails>.struct7_0).FieldHandle); byte[,] array = expr_4C2; byte[,] expr_4D7 = new byte[19, 2]; AuthenticationHandler.smethod_8(expr_4D7, fieldof(<PrivateImplementationDetails>.B1151C6C80B16E10C2CAD0E6524E20DB89985020).FieldHandle); byte[,] array2 = expr_4D7; arg_82F_0 = (num * 775829900u ^ 1086551519u); continue; } case 26u: Manager.WorldMgr.SendHotfixes(session); arg_82F_0 = (num * 2297567052u ^ 3529457580u); continue; case 27u: { BitPack bitPack; bitPack.Write<int>(0); arg_82F_0 = (num * 2838081966u ^ 1401284309u); continue; } case 28u: { BitPack bitPack; bitPack.Write<int>(0); arg_82F_0 = (num * 1276988104u ^ 1332711413u); continue; } case 29u: new PacketWriter(ServerMessage.EnableCrypt, false); session.Account = new Account { Id = 1, Email = Module.smethod_35<string>(2737471542u), PasswordVerifier = Module.smethod_36<string>(1789483827u), Salt = Module.smethod_36<string>(2533110280u), IP = "", SessionKey = "", SecurityFlags = 0, OS = Module.smethod_36<string>(2605452825u), Expansion = 5, IsOnline = false }; arg_82F_0 = (num * 3099364030u ^ 778753807u); continue; case 30u: { PacketWriter packetWriter; packetWriter.WriteUInt8(6); arg_82F_0 = (num * 960037049u ^ 4251590658u); continue; } case 31u: { int num3; num3++; arg_82F_0 = (num * 2647826660u ^ 3081572510u); continue; } case 32u: { int num5 = 0; arg_82F_0 = (num * 2855624283u ^ 1934999727u); continue; } case 33u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_82F_0 = 394845639u; continue; } case 34u: { PacketWriter packetWriter; BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_82F_0 = (num * 3839928679u ^ 2674270183u); continue; } case 35u: { BitPack bitPack; bitPack.Write<int>(0); arg_82F_0 = (num * 1275983207u ^ 2624941272u); continue; } case 36u: new PacketWriter(ServerMessage.SuspendComms, true).WriteUInt32(20u); arg_82F_0 = (num * 3412051023u ^ 3748987744u); continue; case 37u: { PacketWriter packetWriter; byte[,] array; int num2; packetWriter.WriteUInt8(array[num2, 0]); arg_82F_0 = 1152594217u; continue; } case 38u: { BitPack bitPack; bitPack.Write<int>(0); arg_82F_0 = (num * 1357121348u ^ 1027085582u); continue; } case 39u: { SHA256Managed hashAlgorithm_2 = AuthenticationHandler.smethod_6(); byte[] array3; SHA256Managed hashAlgorithm_3; AuthenticationHandler.smethod_4(hashAlgorithm_3, array3, 0, array3.Length >> 1); arg_82F_0 = (num * 3349724847u ^ 3826309419u); continue; } case 40u: { bool flag = true; arg_82F_0 = (num * 2469044217u ^ 389509509u); continue; } case 41u: { int num4; int num5; AuthenticationHandler.sessionKey[num4] = AuthenticationHandler.sha2_3_grml[num5]; arg_82F_0 = 121248238u; continue; } case 42u: { SHA256Managed hashAlgorithm_2; AuthenticationHandler.sha2_3_grml = AuthenticationHandler.smethod_5(hashAlgorithm_2); arg_82F_0 = (num * 3186781206u ^ 568291510u); continue; } case 43u: { SHA256Managed hashAlgorithm_2; AuthenticationHandler.smethod_7(hashAlgorithm_2); SHA256Managed hashAlgorithm_3; AuthenticationHandler.smethod_3(hashAlgorithm_2, AuthenticationHandler.smethod_5(hashAlgorithm_3), 0, 32, AuthenticationHandler.smethod_5(hashAlgorithm_3), 0); arg_82F_0 = (num * 273351295u ^ 2423198895u); continue; } case 44u: { PacketWriter packetWriter; int num3; byte[,] array2; packetWriter.WriteUInt8(array2[num3, 1]); arg_82F_0 = (num * 3258273611u ^ 1239887723u); continue; } case 46u: { HMACSHA256 expr_182 = AuthenticationHandler.smethod_2(Globals.SessionKey); AuthenticationHandler.smethod_3(expr_182, Globals.ServerSalt, 0, Globals.ServerSalt.Length, Globals.ServerSalt, 0); AuthenticationHandler.smethod_3(expr_182, Globals.ClientSalt, 0, Globals.ClientSalt.Length, Globals.ClientSalt, 0); AuthenticationHandler.smethod_4(expr_182, AuthenticationHandler.arr1, 0, AuthenticationHandler.arr1.Length); byte[] array3 = AuthenticationHandler.smethod_5(expr_182); SHA256Managed hashAlgorithm_3 = AuthenticationHandler.smethod_6(); SHA256Managed hashAlgorithm_ = AuthenticationHandler.smethod_6(); arg_82F_0 = (num * 1844584669u ^ 1891453460u); continue; } case 47u: { PacketWriter packetWriter; packetWriter.WriteUInt32(0u); arg_82F_0 = (num * 1008232628u ^ 30771472u); continue; } case 48u: { int num2 = 0; arg_82F_0 = (num * 1707978014u ^ 2368748458u); continue; } case 49u: { SHA256Managed hashAlgorithm_2; AuthenticationHandler.smethod_3(hashAlgorithm_2, AuthenticationHandler.sha2_3_grml, 0, 32, AuthenticationHandler.sha2_3_grml, 0); SHA256Managed hashAlgorithm_; AuthenticationHandler.smethod_4(hashAlgorithm_2, AuthenticationHandler.smethod_5(hashAlgorithm_), 0, 32); arg_82F_0 = (num * 1428097193u ^ 1748239185u); continue; } case 50u: { BitPack bitPack; bitPack.Write<int>(0); arg_82F_0 = (num * 2377469058u ^ 4212942142u); continue; } case 51u: { SHA256Managed hashAlgorithm_2; AuthenticationHandler.smethod_3(hashAlgorithm_2, AuthenticationHandler.sha2_3_grml, 0, 32, AuthenticationHandler.sha2_3_grml, 0); arg_82F_0 = (num * 116417243u ^ 3699589835u); continue; } case 52u: { bool flag; arg_82F_0 = (((!flag) ? 1888186652u : 1737280166u) ^ num * 1515350310u); continue; } case 53u: { PacketWriter packetWriter; packetWriter.WriteUInt8(6); arg_82F_0 = (num * 200448416u ^ 3957963237u); continue; } case 54u: { BitPack bitPack; bitPack.Flush(); arg_82F_0 = (num * 2761573231u ^ 325309565u); continue; } case 55u: arg_82F_0 = (num * 1571901877u ^ 4021021157u); continue; case 56u: { int num2; num2++; arg_82F_0 = (num * 3035465689u ^ 1114317311u); continue; } } return; } } } public static void HandleConnectTo(WorldClass session, ushort port = 3724, byte conn = 0, WorldClass2 session2 = null) { PacketWriter packetWriter = new PacketWriter(ServerMessage.ConnectTo, true); while (true) { IL_65: uint arg_48_0 = 1189851645u; while (true) { uint num; switch ((num = (arg_48_0 ^ 117810876u)) % 4u) { case 0u: goto IL_65; case 1u: packetWriter.WriteUInt64(12330219965770517405uL); arg_48_0 = (num * 886289363u ^ 1599573856u); continue; case 3u: packetWriter.WriteUInt32(14u); arg_48_0 = (num * 798883457u ^ 2791294625u); continue; } goto Block_1; } } Block_1: RsaCrypt rsaCrypt = new RsaCrypt(); try { rsaCrypt.InitializeEncryption<byte[]>(RsaStore.D, RsaStore.P, RsaStore.Q, RsaStore.DP, RsaStore.DQ, RsaStore.InverseQ, false); while (true) { IL_53C: uint arg_4A2_0 = 1950399364u; while (true) { uint num; switch ((num = (arg_4A2_0 ^ 117810876u)) % 35u) { case 0u: { byte[] array; int num2; array[num2] = (byte)AuthenticationHandler.payloadOrder[num2]; arg_4A2_0 = 778837338u; continue; } case 1u: { byte[] array2; array2[10] = 0; array2[11] = 0; arg_4A2_0 = (num * 3426925493u ^ 1622493560u); continue; } case 2u: { byte[] array2; array2[18] = 0; arg_4A2_0 = (num * 3672511218u ^ 2614652434u); continue; } case 3u: { byte[] array2; array2[0] = 67; arg_4A2_0 = (num * 70935332u ^ 306833328u); continue; } case 4u: { byte[] array2; byte[] array3; array2[22] = array3[1]; arg_4A2_0 = (num * 3674763274u ^ 3649142947u); continue; } case 5u: { byte[] array2; array2[13] = 0; array2[14] = 0; arg_4A2_0 = (num * 788135060u ^ 2778562157u); continue; } case 6u: goto IL_53C; case 7u: { byte[] array2; array2[1] = 253; array2[2] = 184; arg_4A2_0 = (num * 4034181865u ^ 116591846u); continue; } case 8u: { byte[] array2; array2[15] = 0; array2[16] = 0; arg_4A2_0 = (num * 1808574983u ^ 3232411455u); continue; } case 9u: { byte[] array2 = new byte[255]; arg_4A2_0 = (num * 3052653591u ^ 3793484446u); continue; } case 10u: arg_4A2_0 = (num * 566048763u ^ 581218626u); continue; case 11u: { byte[] array2; array2[233] = 42; arg_4A2_0 = (num * 3199619518u ^ 4104188893u); continue; } case 12u: { byte[] array2; array2[5] = 127; arg_4A2_0 = (num * 534924131u ^ 1301694869u); continue; } case 13u: { byte[] array2; array2[20] = 0; byte[] array3 = AuthenticationHandler.smethod_10(port); array2[21] = array3[0]; arg_4A2_0 = (num * 1558897694u ^ 577623817u); continue; } case 14u: { byte[] array2; array2[6] = 0; arg_4A2_0 = (num * 1594444616u ^ 3121916550u); continue; } case 15u: { byte[] array2; AuthenticationHandler.smethod_13(new byte[0].GenerateRandomKey(20), 0, array2, 234, 20); arg_4A2_0 = (num * 1673846917u ^ 3902196868u); continue; } case 16u: { byte[] expr_2B6 = new byte[32]; AuthenticationHandler.smethod_8(expr_2B6, fieldof(<PrivateImplementationDetails>.struct8_0).FieldHandle); byte[] array2; AuthenticationHandler.smethod_13(expr_2B6, 0, array2, 93, 32); AuthenticationHandler.smethod_13(new byte[108], 0, array2, 125, 108); arg_4A2_0 = (num * 3680003173u ^ 2041052791u); continue; } case 17u: { byte[] array2; Array arg_297_0 = rsaCrypt.Encrypt<byte[]>(array2, false); byte[] array4 = new byte[256]; AuthenticationHandler.smethod_14(arg_297_0, array4, 256); arg_4A2_0 = (num * 2289352343u ^ 161977499u); continue; } case 18u: { int num2; num2++; arg_4A2_0 = 1213188245u; continue; } case 19u: { rsaCrypt.InitializeDecryption<byte[]>(RsaStore.Exponent, RsaStore.Modulus, false); byte[] array = new byte[AuthenticationHandler.payloadOrder.Length]; arg_4A2_0 = (num * 163108824u ^ 2004099280u); continue; } case 20u: { byte[] array2; array2[7] = 0; arg_4A2_0 = (num * 669897089u ^ 3823184314u); continue; } case 21u: { int num2 = 0; arg_4A2_0 = (num * 1178352322u ^ 2056709069u); continue; } case 22u: { string string_ = Module.smethod_35<string>(848950031u); arg_4A2_0 = (num * 560797187u ^ 1592203457u); continue; } case 23u: packetWriter.WriteUInt8(conn); arg_4A2_0 = (num * 264353632u ^ 1806577887u); continue; case 24u: { int num2; arg_4A2_0 = ((AuthenticationHandler.payloadOrder[num2] <= 16) ? 423310451u : 557178527u); continue; } case 25u: { byte[] array2; array2[3] = 34; array2[4] = 1; arg_4A2_0 = (num * 4152105185u ^ 2192753377u); continue; } case 26u: { byte[] array; int num2; array[num2] = (byte)(AuthenticationHandler.payloadOrder[num2] - 3); arg_4A2_0 = (num * 3507665298u ^ 2968893570u); continue; } case 27u: { byte[] array2; array2[12] = 0; arg_4A2_0 = (num * 618037152u ^ 1046649983u); continue; } case 28u: { byte[] array2; array2[19] = 0; arg_4A2_0 = (num * 1680293565u ^ 2487070996u); continue; } case 29u: { int num2; arg_4A2_0 = ((num2 >= AuthenticationHandler.payloadOrder.Length) ? 858439922u : 70439534u); continue; } case 30u: { byte[] array4; AuthenticationHandler.smethod_0(packetWriter, array4); arg_4A2_0 = (num * 216092153u ^ 2688375690u); continue; } case 31u: { byte[] array2; array2[8] = 1; array2[9] = 0; arg_4A2_0 = (num * 3445269463u ^ 748842564u); continue; } case 33u: { byte[] array2; array2[17] = 0; arg_4A2_0 = (num * 40612712u ^ 3030126910u); continue; } case 34u: { byte[] array2; string string_; AuthenticationHandler.smethod_13(AuthenticationHandler.smethod_12(AuthenticationHandler.smethod_11(), string_), 0, array2, 23, 71); arg_4A2_0 = (num * 376848159u ^ 536405427u); continue; } } goto Block_7; } } Block_7:; } finally { if (rsaCrypt != null) { while (true) { IL_57F: uint arg_566_0 = 461746135u; while (true) { uint num; switch ((num = (arg_566_0 ^ 117810876u)) % 3u) { case 0u: goto IL_57F; case 2u: AuthenticationHandler.smethod_15(rsaCrypt); arg_566_0 = (num * 3554924306u ^ 496472224u); continue; } goto Block_10; } } Block_10:; } } if (session2 == null) { goto IL_5B1; } IL_58A: int arg_594_0 = 202372283; IL_58F: switch ((arg_594_0 ^ 117810876) % 4) { case 0: IL_5B1: session.Send(ref packetWriter); arg_594_0 = 910700601; goto IL_58F; case 2: goto IL_58A; case 3: session2.Send(ref packetWriter); return; } } [Opcode2(ClientMessage.AuthContinuedSession, "18125")] public static void HandleAuthContinuedSession(ref PacketReader packet, WorldClass2 session) { AuthenticationHandler.session2 = session; Manager.WorldMgr.Sessions.SingleOrDefault<KeyValuePair<ulong, WorldClass>>(); while (true) { IL_1B7: uint arg_17D_0 = 2389353796u; while (true) { uint num; switch ((num = (arg_17D_0 ^ 2381408322u)) % 11u) { case 0u: goto IL_1B7; case 1u: { SHA1Managed expr_127 = AuthenticationHandler.smethod_18(); byte[] array; AuthenticationHandler.smethod_3(expr_127, array, 0, array.Length, array, 0); byte[] array2; AuthenticationHandler.smethod_3(expr_127, array2, 0, 40, array2, 0); byte[] byte_; AuthenticationHandler.smethod_4(expr_127, byte_, 0, 4); AuthenticationHandler.smethod_5(expr_127); new PacketWriter(ServerMessage.EnableCrypt, false); PacketWriter packetWriter = new PacketWriter(ServerMessage.ResumeComms, true); arg_17D_0 = (num * 3949002163u ^ 3941582883u); continue; } case 2u: { PacketWriter packetWriter; AuthenticationHandler.session2.Send(ref packetWriter); arg_17D_0 = (num * 3904375768u ^ 568160447u); continue; } case 3u: packet.Read<ulong>(); packet.ReadBytes(20u); arg_17D_0 = (((AuthenticationHandler.session2 != null) ? 2852424687u : 3500428177u) ^ num * 109821150u); continue; case 4u: { byte[] array2 = AuthenticationHandler.sessionKey; arg_17D_0 = (num * 2163954332u ^ 1605872583u); continue; } case 5u: return; case 6u: { byte[] byte_ = AuthenticationHandler.smethod_17(2549515048u); arg_17D_0 = (num * 4131246918u ^ 2980239949u); continue; } case 7u: packet.Read<ulong>(); arg_17D_0 = (num * 3561050817u ^ 404291365u); continue; case 8u: arg_17D_0 = ((Manager.WorldMgr.AddSession2(0uL, ref AuthenticationHandler.session2) ? 213636815u : 1576825925u) ^ num * 3435104658u); continue; case 9u: { byte[] array = AuthenticationHandler.smethod_12(AuthenticationHandler.smethod_16(), Module.smethod_34<string>(1006528553u)); arg_17D_0 = 2341857576u; continue; } } goto Block_3; } } Block_3:; } [Opcode(ClientMessage.test, "18125")] public static void Handletest(ref PacketReader packet, WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.ResumeComms, true); while (true) { IL_68: int arg_52_0 = 2086761285; while (true) { switch ((arg_52_0 ^ 716606170) % 3) { case 1: { session.Send(ref packetWriter); WorldClass2 expr_3E = Manager.WorldMgr.GetSession2((session.Character != null) ? session.Character.Guid : 0uL); if (expr_3E != null) { expr_3E.Send(ref packetWriter); arg_52_0 = 92366913; continue; } return; } case 2: goto IL_68; } return; } } } static AuthenticationHandler() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_A2: uint arg_86_0 = 3334137405u; while (true) { uint num; switch ((num = (arg_86_0 ^ 3525105984u)) % 4u) { case 1u: { byte[] expr_64 = new byte[16]; AuthenticationHandler.smethod_8(expr_64, fieldof(<PrivateImplementationDetails>.B89B07A7120C696B7638B957EE29199B2C4A146A).FieldHandle); AuthenticationHandler.arr1 = expr_64; arg_86_0 = (num * 352440107u ^ 4230735368u); continue; } case 2u: goto IL_A2; case 3u: { byte[] expr_18 = new byte[16]; AuthenticationHandler.smethod_8(expr_18, fieldof(<PrivateImplementationDetails>.B61E96F0A5A28CB929D5953E560D8CCDFE79E0B6).FieldHandle); AuthenticationHandler.arr2 = expr_18; AuthenticationHandler.sha2_3_grml = new byte[32]; int[] expr_3E = new int[255]; AuthenticationHandler.smethod_8(expr_3E, fieldof(<PrivateImplementationDetails>.E2BEDB04AA573B9D0F901152C9A76F86FDF602D7).FieldHandle); AuthenticationHandler.payloadOrder = expr_3E; arg_86_0 = (num * 3984794667u ^ 1911801665u); continue; } } return; } } } static void smethod_0(BinaryWriter binaryWriter_0, byte[] byte_0) { binaryWriter_0.Write(byte_0); } static uint smethod_1(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt32(); } static HMACSHA256 smethod_2(byte[] byte_0) { return new HMACSHA256(byte_0); } static int smethod_3(HashAlgorithm hashAlgorithm_0, byte[] byte_0, int int_0, int int_1, byte[] byte_1, int int_2) { return hashAlgorithm_0.TransformBlock(byte_0, int_0, int_1, byte_1, int_2); } static byte[] smethod_4(HashAlgorithm hashAlgorithm_0, byte[] byte_0, int int_0, int int_1) { return hashAlgorithm_0.TransformFinalBlock(byte_0, int_0, int_1); } static byte[] smethod_5(HashAlgorithm hashAlgorithm_0) { return hashAlgorithm_0.Hash; } static SHA256Managed smethod_6() { return new SHA256Managed(); } static void smethod_7(HashAlgorithm hashAlgorithm_0) { hashAlgorithm_0.Initialize(); } static void smethod_8(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } static int smethod_9(Array array_0) { return array_0.Length; } static byte[] smethod_10(ushort ushort_0) { return BitConverter.GetBytes(ushort_0); } static Encoding smethod_11() { return Encoding.ASCII; } static byte[] smethod_12(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static void smethod_13(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Array.Copy(array_0, int_0, array_1, int_1, int_2); } static void smethod_14(Array array_0, Array array_1, int int_0) { Array.Copy(array_0, array_1, int_0); } static void smethod_15(IDisposable idisposable_0) { idisposable_0.Dispose(); } static Encoding smethod_16() { return Encoding.UTF8; } static byte[] smethod_17(uint uint_0) { return BitConverter.GetBytes(uint_0); } static SHA1Managed smethod_18() { return new SHA1Managed(); } } } <file_sep>/Google.Protobuf/FieldOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class FieldOptions : IMessage<FieldOptions>, IEquatable<FieldOptions>, IDeepCloneable<FieldOptions>, IMessage { [DebuggerNonUserCode] public static class Types { internal enum CType { STRING, CORD, STRING_PIECE } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldOptions.__c __9 = new FieldOptions.__c(); internal FieldOptions cctor>b__55_0() { return new FieldOptions(); } } private static readonly MessageParser<FieldOptions> _parser = new MessageParser<FieldOptions>(new Func<FieldOptions>(FieldOptions.__c.__9.<.cctor>b__55_0)); public const int CtypeFieldNumber = 1; private FieldOptions.Types.CType ctype_; public const int PackedFieldNumber = 2; private bool packed_; public const int LazyFieldNumber = 5; private bool lazy_; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int ExperimentalMapKeyFieldNumber = 9; private string experimentalMapKey_ = ""; public const int WeakFieldNumber = 10; private bool weak_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<FieldOptions> Parser { get { return FieldOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return FieldOptions.Descriptor; } } public FieldOptions.Types.CType Ctype { get { return this.ctype_; } set { this.ctype_ = value; } } public bool Packed { get { return this.packed_; } set { this.packed_ = value; } } public bool Lazy { get { return this.lazy_; } set { this.lazy_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public string ExperimentalMapKey { get { return this.experimentalMapKey_; } set { this.experimentalMapKey_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public bool Weak { get { return this.weak_; } set { this.weak_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public FieldOptions() { } public FieldOptions(FieldOptions other) : this() { this.ctype_ = other.ctype_; this.packed_ = other.packed_; this.lazy_ = other.lazy_; this.deprecated_ = other.deprecated_; this.experimentalMapKey_ = other.experimentalMapKey_; this.weak_ = other.weak_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public FieldOptions Clone() { return new FieldOptions(this); } public override bool Equals(object other) { return this.Equals(other as FieldOptions); } public bool Equals(FieldOptions other) { if (other == null) { goto IL_C5; } goto IL_1AF; int arg_149_0; while (true) { IL_144: switch ((arg_149_0 ^ -2081981996) % 19) { case 0: return false; case 1: arg_149_0 = ((this.Weak != other.Weak) ? -1624195903 : -1516080663); continue; case 2: return false; case 3: arg_149_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? -285863892 : -1422631950); continue; case 4: goto IL_1AF; case 5: arg_149_0 = ((this.Ctype == other.Ctype) ? -1076663946 : -1430799109); continue; case 6: return false; case 8: return false; case 9: return false; case 10: return false; case 11: goto IL_C5; case 12: arg_149_0 = ((this.Deprecated != other.Deprecated) ? -1740793617 : -1672757937); continue; case 13: arg_149_0 = ((!FieldOptions.smethod_0(this.ExperimentalMapKey, other.ExperimentalMapKey)) ? -1499774146 : -1991919803); continue; case 14: arg_149_0 = ((this.Lazy == other.Lazy) ? -1550292027 : -1170957898); continue; case 15: return false; case 16: return true; case 17: arg_149_0 = ((this.Packed == other.Packed) ? -58660157 : -420098853); continue; case 18: return false; } break; } return true; IL_C5: arg_149_0 = -677489670; goto IL_144; IL_1AF: arg_149_0 = ((other == this) ? -934889759 : -179741925); goto IL_144; } public override int GetHashCode() { int num = 1; if (this.Ctype != FieldOptions.Types.CType.STRING) { goto IL_42; } goto IL_1F3; uint arg_19F_0; while (true) { IL_19A: uint num2; switch ((num2 = (arg_19F_0 ^ 1635394032u)) % 14u) { case 0u: arg_19F_0 = ((this.ExperimentalMapKey.Length == 0) ? 184298873u : 481575190u); continue; case 1u: num ^= this.Weak.GetHashCode(); arg_19F_0 = (num2 * 625208540u ^ 3973553274u); continue; case 2u: num ^= this.uninterpretedOption_.GetHashCode(); arg_19F_0 = 366976864u; continue; case 3u: num ^= this.Ctype.GetHashCode(); arg_19F_0 = (num2 * 2396430427u ^ 1711029178u); continue; case 4u: arg_19F_0 = ((!this.Deprecated) ? 2069827542u : 1655531018u); continue; case 5u: arg_19F_0 = (this.Lazy ? 1339691257u : 1010292248u); continue; case 7u: arg_19F_0 = (this.Weak ? 496256393u : 117407622u); continue; case 8u: num ^= this.Deprecated.GetHashCode(); arg_19F_0 = (num2 * 2040904305u ^ 3509282444u); continue; case 9u: goto IL_1F3; case 10u: num ^= this.ExperimentalMapKey.GetHashCode(); arg_19F_0 = (num2 * 3588129380u ^ 1572505761u); continue; case 11u: num ^= this.Lazy.GetHashCode(); arg_19F_0 = (num2 * 1822338429u ^ 685691005u); continue; case 12u: goto IL_42; case 13u: num ^= this.Packed.GetHashCode(); arg_19F_0 = (num2 * 3709731284u ^ 97221323u); continue; } break; } return num; IL_42: arg_19F_0 = 1449295193u; goto IL_19A; IL_1F3: arg_19F_0 = ((!this.Packed) ? 659097359u : 544055933u); goto IL_19A; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Ctype != FieldOptions.Types.CType.STRING) { goto IL_187; } goto IL_225; uint arg_1C9_0; while (true) { IL_1C4: uint num; switch ((num = (arg_1C9_0 ^ 863886030u)) % 16u) { case 0u: output.WriteRawTag(16); arg_1C9_0 = (num * 994478485u ^ 3312583665u); continue; case 1u: arg_1C9_0 = (this.Lazy ? 1911454118u : 1895812200u); continue; case 2u: goto IL_187; case 4u: output.WriteRawTag(80); arg_1C9_0 = (num * 1126458327u ^ 418410940u); continue; case 5u: output.WriteString(this.ExperimentalMapKey); arg_1C9_0 = (num * 3286835643u ^ 918681486u); continue; case 6u: arg_1C9_0 = ((FieldOptions.smethod_1(this.ExperimentalMapKey) != 0) ? 1272059399u : 2057655225u); continue; case 7u: arg_1C9_0 = (this.Weak ? 1507435994u : 45885853u); continue; case 8u: output.WriteRawTag(40); output.WriteBool(this.Lazy); arg_1C9_0 = (num * 74977264u ^ 960726504u); continue; case 9u: output.WriteRawTag(74); arg_1C9_0 = (num * 2122960463u ^ 2043026300u); continue; case 10u: goto IL_225; case 11u: output.WriteRawTag(24); output.WriteBool(this.Deprecated); arg_1C9_0 = (num * 2838871883u ^ 1638364166u); continue; case 12u: output.WriteRawTag(8); output.WriteEnum((int)this.Ctype); arg_1C9_0 = (num * 410367379u ^ 494124656u); continue; case 13u: arg_1C9_0 = (this.Deprecated ? 337478581u : 1154779151u); continue; case 14u: output.WriteBool(this.Weak); arg_1C9_0 = (num * 632737079u ^ 73410895u); continue; case 15u: output.WriteBool(this.Packed); arg_1C9_0 = (num * 2611132010u ^ 4038272565u); continue; } break; } this.uninterpretedOption_.WriteTo(output, FieldOptions._repeated_uninterpretedOption_codec); return; IL_187: arg_1C9_0 = 188898482u; goto IL_1C4; IL_225: arg_1C9_0 = ((!this.Packed) ? 332610051u : 1242162366u); goto IL_1C4; } public int CalculateSize() { int num = 0; if (this.Ctype != FieldOptions.Types.CType.STRING) { goto IL_1F; } goto IL_19E; uint arg_14E_0; while (true) { IL_149: uint num2; switch ((num2 = (arg_14E_0 ^ 1482057869u)) % 13u) { case 0u: num += 2; arg_14E_0 = (num2 * 2070661106u ^ 3544074930u); continue; case 1u: arg_14E_0 = (this.Weak ? 361390456u : 303529010u); continue; case 2u: arg_14E_0 = (this.Lazy ? 1524584354u : 2105476475u); continue; case 4u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Ctype); arg_14E_0 = (num2 * 2734677416u ^ 2614767472u); continue; case 5u: num += 2; arg_14E_0 = (num2 * 999873067u ^ 741384094u); continue; case 6u: goto IL_19E; case 7u: num += 2; arg_14E_0 = (num2 * 2064834805u ^ 534487565u); continue; case 8u: arg_14E_0 = ((FieldOptions.smethod_1(this.ExperimentalMapKey) != 0) ? 1145229147u : 1950561738u); continue; case 9u: arg_14E_0 = ((!this.Deprecated) ? 1795057744u : 1463742388u); continue; case 10u: num += 2; arg_14E_0 = (num2 * 1949422672u ^ 1794145442u); continue; case 11u: num += 1 + CodedOutputStream.ComputeStringSize(this.ExperimentalMapKey); arg_14E_0 = (num2 * 3862603115u ^ 587735480u); continue; case 12u: goto IL_1F; } break; } return num + this.uninterpretedOption_.CalculateSize(FieldOptions._repeated_uninterpretedOption_codec); IL_1F: arg_14E_0 = 940748341u; goto IL_149; IL_19E: arg_14E_0 = (this.Packed ? 807218384u : 918056716u); goto IL_149; } public void MergeFrom(FieldOptions other) { if (other == null) { goto IL_DA; } goto IL_1DE; uint arg_186_0; while (true) { IL_181: uint num; switch ((num = (arg_186_0 ^ 265537020u)) % 15u) { case 1u: this.Lazy = other.Lazy; arg_186_0 = (num * 571856102u ^ 463007511u); continue; case 2u: arg_186_0 = ((!other.Weak) ? 261904649u : 1031832185u); continue; case 3u: arg_186_0 = ((!other.Deprecated) ? 1596833648u : 1089431719u); continue; case 4u: arg_186_0 = ((!other.Packed) ? 1185526608u : 1209017526u); continue; case 5u: arg_186_0 = ((!other.Lazy) ? 617866511u : 953180728u); continue; case 6u: goto IL_DA; case 7u: this.Weak = other.Weak; arg_186_0 = (num * 719969276u ^ 3182064869u); continue; case 8u: this.Ctype = other.Ctype; arg_186_0 = (num * 4212773894u ^ 131129401u); continue; case 9u: return; case 10u: this.Packed = other.Packed; arg_186_0 = (num * 4168551260u ^ 3637549000u); continue; case 11u: arg_186_0 = ((FieldOptions.smethod_1(other.ExperimentalMapKey) != 0) ? 1439642696u : 1545933656u); continue; case 12u: goto IL_1DE; case 13u: this.Deprecated = other.Deprecated; arg_186_0 = (num * 1376997245u ^ 852296991u); continue; case 14u: this.ExperimentalMapKey = other.ExperimentalMapKey; arg_186_0 = (num * 1899562375u ^ 120253108u); continue; } break; } this.uninterpretedOption_.Add(other.uninterpretedOption_); return; IL_DA: arg_186_0 = 1279948480u; goto IL_181; IL_1DE: arg_186_0 = ((other.Ctype == FieldOptions.Types.CType.STRING) ? 1899655613u : 1129020522u); goto IL_181; } public void MergeFrom(CodedInputStream input) { while (true) { IL_337: uint num; uint arg_2AB_0 = ((num = input.ReadTag()) != 0u) ? 4072422265u : 4205096718u; while (true) { uint num2; switch ((num2 = (arg_2AB_0 ^ 3967929765u)) % 28u) { case 0u: arg_2AB_0 = ((num <= 74u) ? 2256470969u : 2428349656u); continue; case 1u: arg_2AB_0 = ((num != 80u) ? 3564815358u : 3472362930u); continue; case 2u: this.ctype_ = (FieldOptions.Types.CType)input.ReadEnum(); arg_2AB_0 = 2196347841u; continue; case 3u: this.Weak = input.ReadBool(); arg_2AB_0 = 3944921740u; continue; case 4u: arg_2AB_0 = (num2 * 1210399168u ^ 34791820u); continue; case 5u: this.Lazy = input.ReadBool(); arg_2AB_0 = 2312849466u; continue; case 6u: arg_2AB_0 = 4072422265u; continue; case 7u: this.ExperimentalMapKey = input.ReadString(); arg_2AB_0 = 2181167536u; continue; case 8u: this.Deprecated = input.ReadBool(); arg_2AB_0 = 4186049952u; continue; case 9u: arg_2AB_0 = (num2 * 3418006702u ^ 3239251434u); continue; case 10u: this.uninterpretedOption_.AddEntriesFrom(input, FieldOptions._repeated_uninterpretedOption_codec); arg_2AB_0 = 3944921740u; continue; case 11u: input.SkipLastField(); arg_2AB_0 = 2339846874u; continue; case 12u: arg_2AB_0 = ((num <= 24u) ? 3322358875u : 3848514133u); continue; case 13u: this.Packed = input.ReadBool(); arg_2AB_0 = 2350076945u; continue; case 14u: arg_2AB_0 = (((num == 16u) ? 3926986880u : 3137521652u) ^ num2 * 3951413028u); continue; case 16u: arg_2AB_0 = (((num == 74u) ? 44233326u : 704905275u) ^ num2 * 2711955004u); continue; case 17u: goto IL_337; case 18u: arg_2AB_0 = (num2 * 1424169486u ^ 1736934022u); continue; case 19u: arg_2AB_0 = (((num != 7994u) ? 1885537397u : 1328348536u) ^ num2 * 1439000277u); continue; case 20u: arg_2AB_0 = (num2 * 3984474796u ^ 3333777852u); continue; case 21u: arg_2AB_0 = (num2 * 4111821529u ^ 4124536129u); continue; case 22u: arg_2AB_0 = (((num == 8u) ? 3131066525u : 4067338281u) ^ num2 * 2448977067u); continue; case 23u: arg_2AB_0 = (num2 * 2856092636u ^ 4219737256u); continue; case 24u: arg_2AB_0 = (((num == 40u) ? 3188864196u : 3557209125u) ^ num2 * 2867859933u); continue; case 25u: arg_2AB_0 = (((num == 24u) ? 2056454415u : 301604229u) ^ num2 * 4248544986u); continue; case 26u: arg_2AB_0 = (num2 * 3053427591u ^ 1954947076u); continue; case 27u: arg_2AB_0 = (num2 * 1333235743u ^ 3022660813u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/ConnectTo.cs using Framework.Cryptography.WoW; using Framework.Misc; using Framework.Network.Packets; using System; using System.Net; using System.Net.Sockets; using System.Runtime.CompilerServices; namespace AuthServer.Game.Packets.PacketHandler { internal class ConnectTo { public class ConnectPayload { public IPEndPoint Where; public uint Adler32; public byte XorMagic = 42; public byte[] PanamaKey = new byte[32]; } public ulong Key; public ConnectTo.ConnectPayload Payload; public byte Con; public string Haiku = Module.smethod_35<string>(848950031u); public byte[] PiDigits; private RsaCrypt Crypt; public ConnectTo() { byte[] expr_1B = new byte[130]; ConnectTo.smethod_0(expr_1B, fieldof(<PrivateImplementationDetails>.struct10_0).FieldHandle); this.PiDigits = expr_1B; base..ctor(); while (true) { IL_11C: uint arg_F8_0 = 3993814791u; while (true) { uint num; switch ((num = (arg_F8_0 ^ 2867687330u)) % 6u) { case 0u: goto IL_11C; case 2u: this.Crypt = new RsaCrypt(); arg_F8_0 = (num * 2459550961u ^ 137469758u); continue; case 3u: this.Payload.PanamaKey = Module.smethod_33<string>(3050187087u).ToByteArray(); this.Payload.Adler32 = 2695261200u; arg_F8_0 = (num * 3197803142u ^ 1130187682u); continue; case 4u: this.Crypt.InitializeEncryption<byte[]>(RsaStore.D, RsaStore.P, RsaStore.Q, RsaStore.DP, RsaStore.DQ, RsaStore.InverseQ, false); this.Crypt.InitializeDecryption<byte[]>(RsaStore.Exponent, RsaStore.Modulus, false); arg_F8_0 = (num * 2948528008u ^ 2475682229u); continue; case 5u: this.Payload = new ConnectTo.ConnectPayload(); arg_F8_0 = (num * 4055527431u ^ 2615824410u); continue; } return; } } } public void Write(PacketWriter pw) { byte[] data = ConnectTo.smethod_2((ushort)ConnectTo.smethod_1(this.Payload.Where)); while (true) { IL_378: uint arg_316_0 = 2359871361u; while (true) { uint num; switch ((num = (arg_316_0 ^ 3640945304u)) % 21u) { case 0u: { byte[] array; ConnectTo.smethod_6(ConnectTo.smethod_5(ConnectTo.smethod_4(this.Payload.Where)), 0, array, 0, 4); arg_316_0 = (num * 1857866438u ^ 170169674u); continue; } case 1u: { HmacHash hmacHash; hmacHash.Process(this.Payload.PanamaKey, 32); hmacHash.Process(this.PiDigits, 108); arg_316_0 = (num * 2969400312u ^ 2067020106u); continue; } case 2u: { byte b = 3; arg_316_0 = (num * 3485038105u ^ 1438866377u); continue; } case 3u: pw.WriteUInt32(14u); arg_316_0 = (num * 3418873817u ^ 174626620u); continue; case 4u: goto IL_378; case 5u: { byte[] array = new byte[16]; arg_316_0 = (num * 2999318491u ^ 2160708345u); continue; } case 6u: pw.WriteUInt8(this.Con); arg_316_0 = (num * 1188346892u ^ 2799591750u); continue; case 7u: { ByteBuffer byteBuffer; byteBuffer.WriteBytes(this.Payload.PanamaKey, 32u); byteBuffer.WriteBytes(this.PiDigits, 108u); arg_316_0 = (num * 1445783088u ^ 3500704478u); continue; } case 8u: { byte[] array; ByteBuffer byteBuffer; byteBuffer.WriteBytes(array, 16u); byteBuffer.WriteUInt16<int>(ConnectTo.smethod_1(this.Payload.Where)); byteBuffer.WriteString(this.Haiku); arg_316_0 = (num * 4257467946u ^ 1043571886u); continue; } case 9u: { ByteBuffer byteBuffer = new ByteBuffer(); byteBuffer.WriteUInt32<uint>(this.Payload.Adler32); byte b; byteBuffer.WriteUInt8<byte>(b); arg_316_0 = (num * 288980273u ^ 1507575052u); continue; } case 10u: { ByteBuffer byteBuffer; pw.WriteBytes(this.Crypt.Encrypt<byte[]>(byteBuffer.GetData(), false), 256); arg_316_0 = (num * 627861161u ^ 4032287512u); continue; } case 11u: { HmacHash hmacHash; hmacHash.Finish(ConnectTo.smethod_7((short)this.Payload.XorMagic), 1); arg_316_0 = (num * 2043331364u ^ 2720859288u); continue; } case 12u: { HmacHash hmacHash = new HmacHash(RsaStore.WherePacketHmac); byte[] array; hmacHash.Process(array, 16); byte b; hmacHash.Process(ConnectTo.smethod_7((short)b), 1); hmacHash.Process(data, 2); arg_316_0 = 3742919601u; continue; } case 13u: { ByteBuffer byteBuffer; byteBuffer.WriteUInt8<byte>(this.Payload.XorMagic); HmacHash hmacHash; byteBuffer.WriteBytes(hmacHash.Digest); arg_316_0 = (num * 1057531190u ^ 2240896363u); continue; } case 14u: { byte[] array; ConnectTo.smethod_6(ConnectTo.smethod_5(ConnectTo.smethod_4(this.Payload.Where)), 0, array, 0, 16); arg_316_0 = 3211391060u; continue; } case 15u: { byte b = 1; arg_316_0 = (num * 3213198913u ^ 1313716735u); continue; } case 16u: { HmacHash hmacHash; hmacHash.Process(this.Haiku); arg_316_0 = (num * 3305604985u ^ 3353461720u); continue; } case 18u: pw.WriteUInt64(this.Key); arg_316_0 = (num * 1780680709u ^ 1529831126u); continue; case 19u: arg_316_0 = (((ConnectTo.smethod_3(this.Payload.Where) != AddressFamily.InterNetwork) ? 2333103828u : 3804062715u) ^ num * 2627924325u); continue; case 20u: { byte b = 2; arg_316_0 = (num * 326661819u ^ 2495054369u); continue; } } return; } } } static void smethod_0(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } static int smethod_1(IPEndPoint ipendPoint_0) { return ipendPoint_0.Port; } static byte[] smethod_2(ushort ushort_0) { return BitConverter.GetBytes(ushort_0); } static AddressFamily smethod_3(EndPoint endPoint_0) { return endPoint_0.AddressFamily; } static IPAddress smethod_4(IPEndPoint ipendPoint_0) { return ipendPoint_0.Address; } static byte[] smethod_5(IPAddress ipaddress_0) { return ipaddress_0.GetAddressBytes(); } static void smethod_6(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static byte[] smethod_7(short short_0) { return BitConverter.GetBytes(short_0); } } } <file_sep>/Bgs.Protocol.Account.V1/ForwardCacheExpireRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class ForwardCacheExpireRequest : IMessage<ForwardCacheExpireRequest>, IEquatable<ForwardCacheExpireRequest>, IDeepCloneable<ForwardCacheExpireRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ForwardCacheExpireRequest.__c __9 = new ForwardCacheExpireRequest.__c(); internal ForwardCacheExpireRequest cctor>b__24_0() { return new ForwardCacheExpireRequest(); } } private static readonly MessageParser<ForwardCacheExpireRequest> _parser = new MessageParser<ForwardCacheExpireRequest>(new Func<ForwardCacheExpireRequest>(ForwardCacheExpireRequest.__c.__9.<.cctor>b__24_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public static MessageParser<ForwardCacheExpireRequest> Parser { get { return ForwardCacheExpireRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[25]; } } MessageDescriptor IMessage.Descriptor { get { return ForwardCacheExpireRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public ForwardCacheExpireRequest() { } public ForwardCacheExpireRequest(ForwardCacheExpireRequest other) : this() { this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); } public ForwardCacheExpireRequest Clone() { return new ForwardCacheExpireRequest(this); } public override bool Equals(object other) { return this.Equals(other as ForwardCacheExpireRequest); } public bool Equals(ForwardCacheExpireRequest other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1611346443) % 7) { case 0: return true; case 2: goto IL_7A; case 3: arg_48_0 = ((!ForwardCacheExpireRequest.smethod_0(this.EntityId, other.EntityId)) ? 1534079076 : 1610333304); continue; case 4: return false; case 5: goto IL_12; case 6: return false; } break; } return true; IL_12: arg_48_0 = 771897043; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 863906029 : 557957915); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 4068150082u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 3043727923u)) % 4u) { case 1u: arg_4D_0 = (((this.entityId_ == null) ? 4242375370u : 2943138728u) ^ num2 * 1876932989u); continue; case 2u: num ^= ForwardCacheExpireRequest.smethod_1(this.EntityId); arg_4D_0 = (num2 * 617761903u ^ 3318031629u); continue; case 3u: goto IL_69; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.entityId_ != null) { while (true) { IL_48: uint arg_30_0 = 1386522014u; while (true) { uint num; switch ((num = (arg_30_0 ^ 1997645551u)) % 3u) { case 0u: goto IL_48; case 1u: output.WriteRawTag(10); output.WriteMessage(this.EntityId); arg_30_0 = (num * 1671790901u ^ 2331246893u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.entityId_ != null) { while (true) { IL_46: uint arg_2E_0 = 2412393596u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 2399062368u)) % 3u) { case 0u: goto IL_46; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_2E_0 = (num2 * 733966444u ^ 4254990383u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(ForwardCacheExpireRequest other) { if (other == null) { goto IL_47; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 3647742593u)) % 7u) { case 0u: arg_7A_0 = (((this.entityId_ == null) ? 3053438032u : 2437084696u) ^ num * 2684458512u); continue; case 2u: goto IL_47; case 3u: goto IL_B1; case 4u: return; case 5u: this.EntityId.MergeFrom(other.EntityId); arg_7A_0 = 3228552102u; continue; case 6u: this.entityId_ = new EntityId(); arg_7A_0 = (num * 2641672158u ^ 1155011670u); continue; } break; } return; IL_47: arg_7A_0 = 2600449039u; goto IL_75; IL_B1: arg_7A_0 = ((other.entityId_ == null) ? 3228552102u : 2732718368u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) != 0u) ? 3703930342u : 2431168309u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 3959514386u)) % 9u) { case 0u: input.SkipLastField(); arg_B3_0 = (num2 * 602029382u ^ 468582113u); continue; case 2u: arg_B3_0 = 3703930342u; continue; case 3u: goto IL_F3; case 4u: input.ReadMessage(this.entityId_); arg_B3_0 = 2378764297u; continue; case 5u: arg_B3_0 = ((num == 10u) ? 3393466963u : 2781042052u); continue; case 6u: this.entityId_ = new EntityId(); arg_B3_0 = (num2 * 2250349120u ^ 1700964317u); continue; case 7u: arg_B3_0 = ((this.entityId_ != null) ? 2459112157u : 2768312486u); continue; case 8u: arg_B3_0 = (num2 * 4187959098u ^ 3323394303u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Notification.V1/Target.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Notification.V1 { [DebuggerNonUserCode] public sealed class Target : IMessage<Target>, IEquatable<Target>, IDeepCloneable<Target>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Target.__c __9 = new Target.__c(); internal Target cctor>b__29_0() { return new Target(); } } private static readonly MessageParser<Target> _parser = new MessageParser<Target>(new Func<Target>(Target.__c.__9.<.cctor>b__29_0)); public const int IdentityFieldNumber = 1; private Bgs.Protocol.Account.V1.Identity identity_; public const int TypeFieldNumber = 2; private string type_ = ""; public static MessageParser<Target> Parser { get { return Target._parser; } } public static MessageDescriptor Descriptor { get { return NotificationTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Target.Descriptor; } } public Bgs.Protocol.Account.V1.Identity Identity { get { return this.identity_; } set { this.identity_ = value; } } public string Type { get { return this.type_; } set { this.type_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public Target() { } public Target(Target other) : this() { while (true) { IL_65: uint arg_49_0 = 1777176534u; while (true) { uint num; switch ((num = (arg_49_0 ^ 1967312820u)) % 4u) { case 0u: goto IL_65; case 2u: this.Identity = ((other.identity_ != null) ? other.Identity.Clone() : null); arg_49_0 = 258649327u; continue; case 3u: this.type_ = other.type_; arg_49_0 = (num * 4241704958u ^ 2734360631u); continue; } return; } } } public Target Clone() { return new Target(this); } public override bool Equals(object other) { return this.Equals(other as Target); } public bool Equals(Target other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1053671825) % 9) { case 0: return false; case 2: arg_77_0 = (Target.smethod_0(this.Identity, other.Identity) ? -1044088159 : -778816376); continue; case 3: return false; case 4: arg_77_0 = (Target.smethod_1(this.Type, other.Type) ? -1241782737 : -206869732); continue; case 5: goto IL_15; case 6: return true; case 7: goto IL_B5; case 8: return false; } break; } return true; IL_15: arg_77_0 = -1532578059; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? -268378260 : -1400464729); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_B7: uint arg_93_0 = 2710838543u; while (true) { uint num2; switch ((num2 = (arg_93_0 ^ 3040355140u)) % 6u) { case 0u: goto IL_B7; case 1u: arg_93_0 = ((Target.smethod_3(this.Type) == 0) ? 3638306381u : 3194459768u); continue; case 2u: num ^= Target.smethod_2(this.Type); arg_93_0 = (num2 * 1073620627u ^ 2327830329u); continue; case 4u: num ^= Target.smethod_2(this.Identity); arg_93_0 = (num2 * 3699518002u ^ 4110837783u); continue; case 5u: arg_93_0 = (((this.identity_ == null) ? 3406664015u : 3545468664u) ^ num2 * 1593965920u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.identity_ != null) { goto IL_60; } goto IL_96; uint arg_6A_0; while (true) { IL_65: uint num; switch ((num = (arg_6A_0 ^ 2988344685u)) % 5u) { case 0u: goto IL_60; case 1u: goto IL_96; case 2u: output.WriteRawTag(18); output.WriteString(this.Type); arg_6A_0 = (num * 1707311403u ^ 2659616384u); continue; case 4u: output.WriteRawTag(10); output.WriteMessage(this.Identity); arg_6A_0 = (num * 2687905356u ^ 2869615604u); continue; } break; } return; IL_60: arg_6A_0 = 2670931665u; goto IL_65; IL_96: arg_6A_0 = ((Target.smethod_3(this.Type) != 0) ? 3532665867u : 3767055522u); goto IL_65; } public int CalculateSize() { int num = 0; while (true) { IL_BB: uint arg_97_0 = 4205108779u; while (true) { uint num2; switch ((num2 = (arg_97_0 ^ 2580130552u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Identity); arg_97_0 = (num2 * 1034766070u ^ 3176379096u); continue; case 1u: arg_97_0 = (((this.identity_ == null) ? 3754839564u : 3082807960u) ^ num2 * 157822420u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Type); arg_97_0 = (num2 * 1164276654u ^ 1111587545u); continue; case 3u: goto IL_BB; case 4u: arg_97_0 = ((Target.smethod_3(this.Type) != 0) ? 2191041468u : 3058737889u); continue; } return num; } } return num; } public void MergeFrom(Target other) { if (other == null) { goto IL_5E; } goto IL_101; uint arg_C1_0; while (true) { IL_BC: uint num; switch ((num = (arg_C1_0 ^ 2528184266u)) % 9u) { case 0u: arg_C1_0 = ((Target.smethod_3(other.Type) == 0) ? 3914750300u : 3565150234u); continue; case 1u: this.Identity.MergeFrom(other.Identity); arg_C1_0 = 3622876507u; continue; case 3u: this.Type = other.Type; arg_C1_0 = (num * 2236184200u ^ 3997392860u); continue; case 4u: goto IL_5E; case 5u: return; case 6u: arg_C1_0 = (((this.identity_ != null) ? 1003750692u : 1573537598u) ^ num * 1651758285u); continue; case 7u: goto IL_101; case 8u: this.identity_ = new Bgs.Protocol.Account.V1.Identity(); arg_C1_0 = (num * 1767630233u ^ 4194895728u); continue; } break; } return; IL_5E: arg_C1_0 = 3355666259u; goto IL_BC; IL_101: arg_C1_0 = ((other.identity_ == null) ? 3622876507u : 4005585754u); goto IL_BC; } public void MergeFrom(CodedInputStream input) { while (true) { IL_153: uint num; uint arg_107_0 = ((num = input.ReadTag()) != 0u) ? 3003240675u : 2561579674u; while (true) { uint num2; switch ((num2 = (arg_107_0 ^ 3535258562u)) % 12u) { case 1u: arg_107_0 = ((num == 10u) ? 2894677545u : 3237487434u); continue; case 2u: this.Type = input.ReadString(); arg_107_0 = 3466546820u; continue; case 3u: input.ReadMessage(this.identity_); arg_107_0 = 3784530477u; continue; case 4u: arg_107_0 = (((num == 18u) ? 125828176u : 1877636172u) ^ num2 * 2090296605u); continue; case 5u: this.identity_ = new Bgs.Protocol.Account.V1.Identity(); arg_107_0 = (num2 * 2241793223u ^ 4017869218u); continue; case 6u: goto IL_153; case 7u: arg_107_0 = ((this.identity_ != null) ? 2922594613u : 3650596467u); continue; case 8u: arg_107_0 = 3003240675u; continue; case 9u: arg_107_0 = (num2 * 1702860003u ^ 3246154535u); continue; case 10u: input.SkipLastField(); arg_107_0 = (num2 * 2315806593u ^ 918912613u); continue; case 11u: arg_107_0 = (num2 * 2803539781u ^ 3240206575u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/DBInfo.cs using System; public class DBInfo { public string Name { get; set; } public uint TableHash { get; set; } public bool HasIndex { get; set; } public sbyte[] FieldBytes { get; set; } } <file_sep>/Google.Protobuf.Reflection/OneofAccessor.cs using Google.Protobuf.Compatibility; using System; using System.Reflection; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class OneofAccessor { private readonly Func<IMessage, int> caseDelegate; private readonly Action<IMessage> clearDelegate; private OneofDescriptor descriptor; public OneofDescriptor Descriptor { get { return this.descriptor; } } internal OneofAccessor(PropertyInfo caseProperty, MethodInfo clearMethod, OneofDescriptor descriptor) { if (!OneofAccessor.smethod_0(caseProperty)) { throw OneofAccessor.smethod_1(Module.smethod_33<string>(966859498u)); } this.descriptor = descriptor; this.caseDelegate = ReflectionUtil.CreateFuncIMessageT<int>(caseProperty.GetGetMethod()); this.descriptor = descriptor; this.clearDelegate = ReflectionUtil.CreateActionIMessage(clearMethod); } public void Clear(IMessage message) { this.clearDelegate(message); } public FieldDescriptor GetCaseFieldDescriptor(IMessage message) { int num = this.caseDelegate(message); while (true) { IL_53: uint arg_37_0 = 2025652677u; while (true) { uint num2; switch ((num2 = (arg_37_0 ^ 1631287048u)) % 4u) { case 0u: goto IL_5A; case 1u: arg_37_0 = (((num <= 0) ? 2583119640u : 2655008038u) ^ num2 * 2894021082u); continue; case 3u: goto IL_53; } goto Block_2; } } Block_2: goto IL_6C; IL_5A: return this.descriptor.ContainingType.FindFieldByNumber(num); IL_6C: return null; } static bool smethod_0(PropertyInfo propertyInfo_0) { return propertyInfo_0.CanRead; } static ArgumentException smethod_1(string string_0) { return new ArgumentException(string_0); } } } <file_sep>/Bgs.Protocol.Friends.V1/UpdateFriendStateNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class UpdateFriendStateNotification : IMessage<UpdateFriendStateNotification>, IEquatable<UpdateFriendStateNotification>, IDeepCloneable<UpdateFriendStateNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateFriendStateNotification.__c __9 = new UpdateFriendStateNotification.__c(); internal UpdateFriendStateNotification cctor>b__39_0() { return new UpdateFriendStateNotification(); } } private static readonly MessageParser<UpdateFriendStateNotification> _parser = new MessageParser<UpdateFriendStateNotification>(new Func<UpdateFriendStateNotification>(UpdateFriendStateNotification.__c.__9.<.cctor>b__39_0)); public const int ChangedFriendFieldNumber = 1; private Friend changedFriend_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int PeerFieldNumber = 4; private ProcessId peer_; public const int AccountIdFieldNumber = 5; private EntityId accountId_; public static MessageParser<UpdateFriendStateNotification> Parser { get { return UpdateFriendStateNotification._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateFriendStateNotification.Descriptor; } } public Friend ChangedFriend { get { return this.changedFriend_; } set { this.changedFriend_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public ProcessId Peer { get { return this.peer_; } set { this.peer_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public UpdateFriendStateNotification() { } public UpdateFriendStateNotification(UpdateFriendStateNotification other) : this() { while (true) { IL_6B: int arg_51_0 = -139268008; while (true) { switch ((arg_51_0 ^ -1451164650) % 4) { case 1: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); arg_51_0 = -1399925870; continue; case 2: this.ChangedFriend = ((other.changedFriend_ != null) ? other.ChangedFriend.Clone() : null); arg_51_0 = -753740985; continue; case 3: goto IL_6B; } goto Block_3; } } Block_3: this.Peer = ((other.peer_ != null) ? other.Peer.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); } public UpdateFriendStateNotification Clone() { return new UpdateFriendStateNotification(this); } public override bool Equals(object other) { return this.Equals(other as UpdateFriendStateNotification); } public bool Equals(UpdateFriendStateNotification other) { if (other == null) { goto IL_73; } goto IL_123; int arg_D5_0; while (true) { IL_D0: switch ((arg_D5_0 ^ -1085619997) % 13) { case 0: arg_D5_0 = (UpdateFriendStateNotification.smethod_0(this.GameAccountId, other.GameAccountId) ? -791431416 : -781464941); continue; case 1: arg_D5_0 = ((!UpdateFriendStateNotification.smethod_0(this.ChangedFriend, other.ChangedFriend)) ? -1807932563 : -139535307); continue; case 2: goto IL_73; case 3: arg_D5_0 = ((!UpdateFriendStateNotification.smethod_0(this.AccountId, other.AccountId)) ? -1188941452 : -924918663); continue; case 4: arg_D5_0 = ((!UpdateFriendStateNotification.smethod_0(this.Peer, other.Peer)) ? -1011223301 : -1677160622); continue; case 5: return true; case 6: return false; case 8: return false; case 9: goto IL_123; case 10: return false; case 11: return false; case 12: return false; } break; } return true; IL_73: arg_D5_0 = -237383512; goto IL_D0; IL_123: arg_D5_0 = ((other != this) ? -728256779 : -947963814); goto IL_D0; } public override int GetHashCode() { int num = 1 ^ UpdateFriendStateNotification.smethod_1(this.ChangedFriend); while (true) { IL_109: uint arg_DD_0 = 1284239996u; while (true) { uint num2; switch ((num2 = (arg_DD_0 ^ 298754314u)) % 8u) { case 1u: arg_DD_0 = ((this.peer_ != null) ? 850595361u : 1058281216u); continue; case 2u: arg_DD_0 = ((this.accountId_ != null) ? 868535062u : 1817318986u); continue; case 3u: num ^= UpdateFriendStateNotification.smethod_1(this.Peer); arg_DD_0 = (num2 * 2532963146u ^ 494494830u); continue; case 4u: num ^= UpdateFriendStateNotification.smethod_1(this.AccountId); arg_DD_0 = (num2 * 576312118u ^ 858874786u); continue; case 5u: num ^= UpdateFriendStateNotification.smethod_1(this.GameAccountId); arg_DD_0 = (num2 * 1254327224u ^ 2221699827u); continue; case 6u: arg_DD_0 = (((this.gameAccountId_ != null) ? 3742435513u : 2263311293u) ^ num2 * 1459025425u); continue; case 7u: goto IL_109; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.ChangedFriend); if (this.gameAccountId_ != null) { goto IL_89; } goto IL_112; uint arg_D7_0; while (true) { IL_D2: uint num; switch ((num = (arg_D7_0 ^ 3681995227u)) % 8u) { case 0u: arg_D7_0 = ((this.accountId_ != null) ? 3172986590u : 3598630061u); continue; case 1u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_D7_0 = (num * 1880031972u ^ 3455557299u); continue; case 2u: goto IL_89; case 3u: output.WriteMessage(this.Peer); arg_D7_0 = (num * 3276955200u ^ 2123957611u); continue; case 4u: goto IL_112; case 5u: output.WriteRawTag(42); output.WriteMessage(this.AccountId); arg_D7_0 = (num * 2859461471u ^ 326937974u); continue; case 7u: output.WriteRawTag(34); arg_D7_0 = (num * 1190405781u ^ 2227197019u); continue; } break; } return; IL_89: arg_D7_0 = 3202019682u; goto IL_D2; IL_112: arg_D7_0 = ((this.peer_ != null) ? 2195160172u : 3907657643u); goto IL_D2; } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.ChangedFriend)); if (this.gameAccountId_ != null) { goto IL_4E; } goto IL_EE; uint arg_B7_0; while (true) { IL_B2: uint num2; switch ((num2 = (arg_B7_0 ^ 2256901548u)) % 7u) { case 0u: arg_B7_0 = ((this.accountId_ != null) ? 3264585250u : 2733094275u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_B7_0 = (num2 * 2864088273u ^ 179667070u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Peer); arg_B7_0 = (num2 * 3944377437u ^ 1836170553u); continue; case 4u: goto IL_4E; case 5u: goto IL_EE; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_B7_0 = (num2 * 1387679600u ^ 3480114595u); continue; } break; } return num; IL_4E: arg_B7_0 = 2725573748u; goto IL_B2; IL_EE: arg_B7_0 = ((this.peer_ != null) ? 3006046135u : 4078678774u); goto IL_B2; } public void MergeFrom(UpdateFriendStateNotification other) { if (other == null) { goto IL_85; } goto IL_27A; uint arg_212_0; while (true) { IL_20D: uint num; switch ((num = (arg_212_0 ^ 122305835u)) % 19u) { case 0u: this.ChangedFriend.MergeFrom(other.ChangedFriend); arg_212_0 = 1861919389u; continue; case 1u: goto IL_27A; case 2u: arg_212_0 = ((other.peer_ != null) ? 162877250u : 2058197277u); continue; case 3u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_212_0 = 1764019045u; continue; case 4u: this.accountId_ = new EntityId(); arg_212_0 = (num * 3992233538u ^ 1811096856u); continue; case 5u: this.AccountId.MergeFrom(other.AccountId); arg_212_0 = 43099640u; continue; case 6u: this.Peer.MergeFrom(other.Peer); arg_212_0 = 2058197277u; continue; case 7u: arg_212_0 = ((other.accountId_ == null) ? 43099640u : 1928803790u); continue; case 8u: this.gameAccountId_ = new EntityId(); arg_212_0 = (num * 2304348887u ^ 3488209691u); continue; case 9u: arg_212_0 = (((this.changedFriend_ == null) ? 3448445839u : 2936041071u) ^ num * 3389537938u); continue; case 10u: this.changedFriend_ = new Friend(); arg_212_0 = (num * 1859423297u ^ 462564683u); continue; case 12u: arg_212_0 = (((this.gameAccountId_ == null) ? 351575500u : 1144492362u) ^ num * 3729856524u); continue; case 13u: arg_212_0 = (((this.accountId_ != null) ? 2509514963u : 2515705882u) ^ num * 2767784411u); continue; case 14u: goto IL_85; case 15u: arg_212_0 = (((this.peer_ != null) ? 2590617234u : 3997248349u) ^ num * 1617445597u); continue; case 16u: return; case 17u: arg_212_0 = ((other.gameAccountId_ != null) ? 5372370u : 1764019045u); continue; case 18u: this.peer_ = new ProcessId(); arg_212_0 = (num * 3672190708u ^ 3979987755u); continue; } break; } return; IL_85: arg_212_0 = 652981447u; goto IL_20D; IL_27A: arg_212_0 = ((other.changedFriend_ == null) ? 1861919389u : 560693748u); goto IL_20D; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2EF: uint num; uint arg_273_0 = ((num = input.ReadTag()) != 0u) ? 2246708989u : 3090205800u; while (true) { uint num2; switch ((num2 = (arg_273_0 ^ 3036017196u)) % 24u) { case 0u: this.changedFriend_ = new Friend(); arg_273_0 = (num2 * 133736145u ^ 3179220910u); continue; case 1u: arg_273_0 = ((num <= 18u) ? 3204383655u : 3023450161u); continue; case 2u: input.ReadMessage(this.accountId_); arg_273_0 = 4049538497u; continue; case 3u: this.accountId_ = new EntityId(); arg_273_0 = (num2 * 289716316u ^ 2082549018u); continue; case 4u: arg_273_0 = ((this.gameAccountId_ == null) ? 3390590978u : 3239599208u); continue; case 5u: goto IL_2EF; case 6u: arg_273_0 = (num2 * 1667602742u ^ 4044958933u); continue; case 7u: arg_273_0 = ((this.accountId_ != null) ? 3264421646u : 4148774383u); continue; case 8u: input.ReadMessage(this.peer_); arg_273_0 = 4049538497u; continue; case 9u: arg_273_0 = 2246708989u; continue; case 10u: input.ReadMessage(this.changedFriend_); arg_273_0 = 4049538497u; continue; case 11u: arg_273_0 = ((this.peer_ == null) ? 4007125228u : 2418715188u); continue; case 13u: arg_273_0 = ((num != 34u) ? 2749549717u : 2932767287u); continue; case 14u: input.SkipLastField(); arg_273_0 = 3895511826u; continue; case 15u: arg_273_0 = (num2 * 2075965448u ^ 3781338978u); continue; case 16u: this.peer_ = new ProcessId(); arg_273_0 = (num2 * 414131001u ^ 458016500u); continue; case 17u: arg_273_0 = (((num == 42u) ? 3870327733u : 3971352612u) ^ num2 * 2794030190u); continue; case 18u: arg_273_0 = ((this.changedFriend_ == null) ? 2563365596u : 3847619678u); continue; case 19u: arg_273_0 = (((num == 10u) ? 3641989858u : 3802949567u) ^ num2 * 3123929516u); continue; case 20u: input.ReadMessage(this.gameAccountId_); arg_273_0 = 3799696705u; continue; case 21u: arg_273_0 = (num2 * 3054751840u ^ 2626376993u); continue; case 22u: this.gameAccountId_ = new EntityId(); arg_273_0 = (num2 * 2638596349u ^ 3270208286u); continue; case 23u: arg_273_0 = (((num != 18u) ? 3397272068u : 2549385167u) ^ num2 * 3820783497u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountCredential.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountCredential : IMessage<AccountCredential>, IEquatable<AccountCredential>, IDeepCloneable<AccountCredential>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountCredential.__c __9 = new AccountCredential.__c(); internal AccountCredential cctor>b__29_0() { return new AccountCredential(); } } private static readonly MessageParser<AccountCredential> _parser = new MessageParser<AccountCredential>(new Func<AccountCredential>(AccountCredential.__c.__9.<.cctor>b__29_0)); public const int IdFieldNumber = 1; private uint id_; public const int DataFieldNumber = 2; private ByteString data_ = ByteString.Empty; public static MessageParser<AccountCredential> Parser { get { return AccountCredential._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return AccountCredential.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public ByteString Data { get { return this.data_; } set { this.data_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public AccountCredential() { } public AccountCredential(AccountCredential other) : this() { this.id_ = other.id_; this.data_ = other.data_; } public AccountCredential Clone() { return new AccountCredential(this); } public override bool Equals(object other) { return this.Equals(other as AccountCredential); } public bool Equals(AccountCredential other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1301330652) % 9) { case 1: return true; case 2: return false; case 3: arg_72_0 = ((!(this.Data != other.Data)) ? 463586078 : 578019829); continue; case 4: arg_72_0 = ((this.Id != other.Id) ? 1990367688 : 1201850521); continue; case 5: return false; case 6: goto IL_B0; case 7: goto IL_15; case 8: return false; } break; } return true; IL_15: arg_72_0 = 1505792619; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 138969868 : 487249605); goto IL_6D; } public override int GetHashCode() { int num = 1 ^ this.Id.GetHashCode(); while (true) { IL_7F: uint arg_63_0 = 2762091007u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 2981472420u)) % 4u) { case 0u: num ^= this.Data.GetHashCode(); arg_63_0 = (num2 * 3903132381u ^ 3866303001u); continue; case 2u: goto IL_7F; case 3u: arg_63_0 = (((this.Data.Length != 0) ? 486216914u : 823889471u) ^ num2 * 3369690278u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_AE: uint arg_8A_0 = 4131202870u; while (true) { uint num; switch ((num = (arg_8A_0 ^ 3297975006u)) % 6u) { case 0u: arg_8A_0 = (((this.Data.Length == 0) ? 2067490566u : 848297299u) ^ num * 2805652259u); continue; case 1u: output.WriteBytes(this.Data); arg_8A_0 = (num * 1633866392u ^ 1840690462u); continue; case 3u: output.WriteRawTag(18); arg_8A_0 = (num * 2343186053u ^ 1434077856u); continue; case 4u: output.WriteUInt32(this.Id); arg_8A_0 = (num * 2509878102u ^ 2108892030u); continue; case 5u: goto IL_AE; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.Id)); if (this.Data.Length != 0) { while (true) { IL_5B: uint arg_43_0 = 3366715382u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 3788487584u)) % 3u) { case 0u: goto IL_5B; case 1u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Data); arg_43_0 = (num2 * 315193483u ^ 3763364306u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(AccountCredential other) { if (other == null) { goto IL_30; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 3092555228u)) % 7u) { case 0u: this.Id = other.Id; arg_7B_0 = (num * 2194060406u ^ 838332066u); continue; case 1u: goto IL_B2; case 2u: arg_7B_0 = ((other.Data.Length != 0) ? 3089151992u : 2701767299u); continue; case 3u: goto IL_30; case 4u: this.Data = other.Data; arg_7B_0 = (num * 55436372u ^ 3323703635u); continue; case 5u: return; } break; } return; IL_30: arg_7B_0 = 3231267595u; goto IL_76; IL_B2: arg_7B_0 = ((other.Id == 0u) ? 3202307292u : 2411016465u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_D9: uint num; uint arg_9E_0 = ((num = input.ReadTag()) == 0u) ? 1783579315u : 127002473u; while (true) { uint num2; switch ((num2 = (arg_9E_0 ^ 1166373552u)) % 8u) { case 0u: this.Data = input.ReadBytes(); arg_9E_0 = 1293149237u; continue; case 1u: arg_9E_0 = ((num != 8u) ? 1325952615u : 593959724u); continue; case 2u: arg_9E_0 = 127002473u; continue; case 4u: this.Id = input.ReadUInt32(); arg_9E_0 = 1293149237u; continue; case 5u: goto IL_D9; case 6u: input.SkipLastField(); arg_9E_0 = (num2 * 3366742753u ^ 3990586243u); continue; case 7u: arg_9E_0 = (((num == 18u) ? 3316239684u : 3870816282u) ^ num2 * 1714827396u); continue; } return; } } } } } <file_sep>/Framework.Attributes/AuthMessageAttribute.cs using Framework.Constants.Net; using System; namespace Framework.Attributes { [AttributeUsage(AttributeTargets.Method)] public sealed class AuthMessageAttribute : Attribute { public AuthClientMessage Message { get; set; } public AuthChannel Channel { get; set; } public AuthMessageAttribute(AuthClientMessage message, AuthChannel channel) { this.Message = message; this.Channel = channel; } } } <file_sep>/Bgs.Protocol.Account.V1/AccountTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public static class AccountTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return AccountTypesReflection.descriptor; } } static AccountTypesReflection() { AccountTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(AccountTypesReflection.smethod_1(AccountTypesReflection.smethod_0(new string[] { Module.smethod_36<string>(1887825897u), Module.smethod_34<string>(1015737674u), Module.smethod_34<string>(1884610886u), Module.smethod_35<string>(396084705u), Module.smethod_33<string>(2788999530u), Module.smethod_37<string>(202537661u), Module.smethod_34<string>(3810919178u), Module.smethod_37<string>(1400460125u), Module.smethod_33<string>(1152687018u), Module.smethod_34<string>(1936186938u), Module.smethod_35<string>(1753288913u), Module.smethod_37<string>(3796305053u), Module.smethod_35<string>(3068330801u), Module.smethod_36<string>(695126569u), Module.smethod_35<string>(3418172433u), Module.smethod_36<string>(1864346825u), Module.smethod_34<string>(61454698u), Module.smethod_35<string>(1445609601u), Module.smethod_37<string>(3650182445u), Module.smethod_34<string>(2481689754u), Module.smethod_34<string>(2856636202u), Module.smethod_33<string>(1052006202u), Module.smethod_34<string>(333512202u), Module.smethod_37<string>(2715092061u), Module.smethod_37<string>(4263614477u), Module.smethod_33<string>(3710660986u), Module.smethod_35<string>(3249523153u), Module.smethod_37<string>(815969693u), Module.smethod_34<string>(2378800810u), Module.smethod_37<string>(1020447037u), Module.smethod_36<string>(1135737977u), Module.smethod_34<string>(504068570u), Module.smethod_35<string>(1934481265u), Module.smethod_33<string>(438035962u), Module.smethod_35<string>(2284322897u), Module.smethod_33<string>(1256192218u), Module.smethod_35<string>(3599364785u), Module.smethod_34<string>(2549357178u), Module.smethod_33<string>(540128970u), Module.smethod_34<string>(1799464282u), Module.smethod_37<string>(962092301u), Module.smethod_37<string>(611492349u), Module.smethod_36<string>(3474178489u), Module.smethod_34<string>(299678490u), Module.smethod_36<string>(348431449u), Module.smethod_34<string>(3844752890u), Module.smethod_35<string>(2984006161u), Module.smethod_33<string>(642221978u), Module.smethod_37<string>(465369741u), Module.smethod_37<string>(114769789u), Module.smethod_37<string>(1663292205u), Module.smethod_33<string>(3300876762u), Module.smethod_34<string>(1970020650u), Module.smethod_33<string>(435211578u), Module.smethod_36<string>(1041821689u), Module.smethod_37<string>(85828189u), Module.smethod_33<string>(2991773354u), Module.smethod_37<string>(1283750653u), Module.smethod_34<string>(2242078154u), Module.smethod_37<string>(2481673117u), Module.smethod_36<string>(4167568729u), Module.smethod_37<string>(2686150461u), Module.smethod_36<string>(1423735417u), Module.smethod_34<string>(3912420314u), Module.smethod_37<string>(1137628045u), Module.smethod_36<string>(648168425u), Module.smethod_34<string>(3537473866u), Module.smethod_35<string>(1264417249u), Module.smethod_37<string>(3533472973u), Module.smethod_35<string>(1614258881u), Module.smethod_37<string>(1429873261u), Module.smethod_36<string>(242775625u), Module.smethod_36<string>(2974869401u), Module.smethod_37<string>(2277195773u), Module.smethod_37<string>(3825718189u), Module.smethod_37<string>(3475118237u), Module.smethod_37<string>(728673357u), Module.smethod_37<string>(3679595581u), Module.smethod_35<string>(4286504977u), Module.smethod_37<string>(582550749u), Module.smethod_34<string>(2583190890u), Module.smethod_37<string>(1780473213u), Module.smethod_35<string>(1656421201u), Module.smethod_37<string>(2978395677u), Module.smethod_37<string>(231950797u), Module.smethod_35<string>(3110493121u), Module.smethod_35<string>(2452972177u), Module.smethod_33<string>(1458966042u), Module.smethod_37<string>(3942427661u), Module.smethod_37<string>(3591827709u), Module.smethod_37<string>(845382829u), Module.smethod_35<string>(1795451233u), Module.smethod_33<string>(1561059050u), Module.smethod_36<string>(1458954025u), Module.smethod_34<string>(4150644106u), Module.smethod_37<string>(1897182685u), Module.smethod_33<string>(4219713834u), Module.smethod_34<string>(2275911866u), Module.smethod_36<string>(1852607289u), Module.smethod_33<string>(844995802u), Module.smethod_35<string>(172730033u), Module.smethod_33<string>(2685494330u), Module.smethod_36<string>(277994233u), Module.smethod_35<string>(2495134497u), Module.smethod_34<string>(401179626u), Module.smethod_35<string>(2844976129u), Module.smethod_35<string>(2187455185u), Module.smethod_36<string>(671647497u), Module.smethod_37<string>(3036750413u), Module.smethod_37<string>(1692705341u), Module.smethod_36<string>(659907961u), Module.smethod_33<string>(231025562u), Module.smethod_34<string>(1696575338u), Module.smethod_33<string>(2071524090u), Module.smethod_33<string>(3809929610u), Module.smethod_35<string>(3194817761u), Module.smethod_36<string>(3785655001u), Module.smethod_36<string>(4019688105u), Module.smethod_36<string>(2456814585u), Module.smethod_35<string>(4084759585u), Module.smethod_34<string>(2715750122u), Module.smethod_37<string>(521838333u), Module.smethod_33<string>(765497866u), Module.smethod_33<string>(4140215898u), Module.smethod_36<string>(1287594329u), Module.smethod_37<string>(1924238141u), Module.smethod_36<string>(2838728313u), Module.smethod_34<string>(3636199386u), Module.smethod_37<string>(375715725u), Module.smethod_36<string>(2063161321u), Module.smethod_37<string>(1573638189u), Module.smethod_36<string>(3232381577u), Module.smethod_34<string>(2511360042u), Module.smethod_35<string>(839317185u), Module.smethod_33<string>(151527626u), Module.smethod_37<string>(317360989u), Module.smethod_34<string>(1011574250u), Module.smethod_33<string>(1071776890u), Module.smethod_35<string>(1846679761u), Module.smethod_37<string>(2713205917u), Module.smethod_33<string>(3628338666u), Module.smethod_33<string>(3730431674u), Module.smethod_36<string>(3602555769u), Module.smethod_36<string>(2039682249u), Module.smethod_33<string>(1992026154u), Module.smethod_35<string>(1539000449u) })), new FileDescriptor[] { EntityTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(new Type[] { AccountTypesReflection.smethod_2(typeof(IdentityVerificationStatus).TypeHandle) }, new GeneratedCodeInfo[] { new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountId).TypeHandle), AccountId.Parser, new string[] { Module.smethod_33<string>(3097905584u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountLicense).TypeHandle), AccountLicense.Parser, new string[] { Module.smethod_34<string>(4055669268u), Module.smethod_37<string>(2567083309u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountCredential).TypeHandle), AccountCredential.Parser, new string[] { Module.smethod_34<string>(4055669268u), Module.smethod_36<string>(170740642u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountBlob).TypeHandle), AccountBlob.Parser, new string[] { Module.smethod_33<string>(3097905584u), Module.smethod_35<string>(4244548940u), Module.smethod_34<string>(3653059453u), Module.smethod_36<string>(3044016412u), Module.smethod_35<string>(2979962659u), Module.smethod_36<string>(1677969524u), Module.smethod_34<string>(432237722u), Module.smethod_33<string>(624772051u), Module.smethod_36<string>(2371584791u), Module.smethod_37<string>(930910905u), Module.smethod_33<string>(3781478178u), Module.smethod_34<string>(27976939u), Module.smethod_37<string>(2304133345u), Module.smethod_37<string>(1252304018u), Module.smethod_33<string>(543052031u), Module.smethod_36<string>(1881352294u), Module.smethod_35<string>(4075410058u), Module.smethod_37<string>(3998601543u), Module.smethod_34<string>(1106905041u), Module.smethod_36<string>(2636718283u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountBlobList).TypeHandle), AccountBlobList.Parser, new string[] { Module.smethod_34<string>(3827836034u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountHandle).TypeHandle), GameAccountHandle.Parser, new string[] { Module.smethod_33<string>(3097905584u), Module.smethod_36<string>(2505595523u), Module.smethod_34<string>(326103631u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountLink).TypeHandle), GameAccountLink.Parser, new string[] { Module.smethod_35<string>(60202740u), Module.smethod_34<string>(2643656114u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountBlob).TypeHandle), GameAccountBlob.Parser, new string[] { Module.smethod_36<string>(356892916u), Module.smethod_35<string>(3235769769u), Module.smethod_33<string>(3236715584u), Module.smethod_34<string>(2176360862u), Module.smethod_37<string>(434217816u), Module.smethod_33<string>(3042009966u), Module.smethod_34<string>(919431817u), Module.smethod_35<string>(1678030481u), Module.smethod_35<string>(782628560u), Module.smethod_33<string>(2121760702u), Module.smethod_34<string>(357012145u), Module.smethod_36<string>(2781403373u), Module.smethod_33<string>(4190255156u), Module.smethod_36<string>(1756868207u), Module.smethod_35<string>(1300269515u), Module.smethod_37<string>(667813586u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountBlobList).TypeHandle), GameAccountBlobList.Parser, new string[] { Module.smethod_34<string>(3827836034u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountReference).TypeHandle), AccountReference.Parser, new string[] { Module.smethod_34<string>(4055669268u), Module.smethod_36<string>(3344961058u), Module.smethod_34<string>(2868770521u), Module.smethod_35<string>(1558626496u), Module.smethod_33<string>(3438383485u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(Identity).TypeHandle), Identity.Parser, new string[] { Module.smethod_37<string>(1020594392u), Module.smethod_35<string>(60202740u), Module.smethod_34<string>(2711173956u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(ProgramTag).TypeHandle), ProgramTag.Parser, new string[] { Module.smethod_35<string>(2043171339u), Module.smethod_37<string>(231685558u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(RegionTag).TypeHandle), RegionTag.Parser, new string[] { Module.smethod_36<string>(1013076684u), Module.smethod_35<string>(3417889114u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountFieldTags).TypeHandle), AccountFieldTags.Parser, new string[] { Module.smethod_34<string>(3714613321u), Module.smethod_37<string>(3881744716u), Module.smethod_37<string>(1544342937u), Module.smethod_36<string>(567446948u), Module.smethod_37<string>(1865736050u), Module.smethod_37<string>(786821796u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountFieldTags).TypeHandle), GameAccountFieldTags.Parser, new string[] { Module.smethod_35<string>(1146429859u), Module.smethod_37<string>(3618794752u), Module.smethod_34<string>(4249369626u), Module.smethod_35<string>(2573432402u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountFieldOptions).TypeHandle), AccountFieldOptions.Parser, new string[] { Module.smethod_35<string>(3482793990u), Module.smethod_37<string>(1602786086u), Module.smethod_37<string>(1398220329u), Module.smethod_37<string>(346391002u), Module.smethod_33<string>(1891345338u), Module.smethod_37<string>(3677178959u), Module.smethod_35<string>(3706715300u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountFieldOptions).TypeHandle), GameAccountFieldOptions.Parser, new string[] { Module.smethod_35<string>(3482793990u), Module.smethod_36<string>(2873946921u), Module.smethod_33<string>(3738401203u), Module.smethod_34<string>(1586334612u), Module.smethod_33<string>(1731648489u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(SubscriberReference).TypeHandle), SubscriberReference.Parser, new string[] { Module.smethod_35<string>(4063073269u), Module.smethod_35<string>(1666543649u), Module.smethod_36<string>(1724927668u), Module.smethod_34<string>(2675333323u), Module.smethod_33<string>(2709501594u), Module.smethod_37<string>(786821796u), Module.smethod_34<string>(2769069935u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountLevelInfo).TypeHandle), AccountLevelInfo.Parser, new string[] { Module.smethod_35<string>(2162935679u), Module.smethod_36<string>(1750312069u), Module.smethod_33<string>(651702376u), Module.smethod_35<string>(3636633646u), Module.smethod_35<string>(1466858526u), Module.smethod_36<string>(503400800u), Module.smethod_35<string>(2153792435u), Module.smethod_34<string>(309186775u), Module.smethod_36<string>(1869612758u), Module.smethod_36<string>(2636718283u), Module.smethod_33<string>(2222145487u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(PrivacyInfo).TypeHandle), PrivacyInfo.Parser, new string[] { Module.smethod_33<string>(221238895u), Module.smethod_34<string>(1023914940u), Module.smethod_35<string>(167269936u), Module.smethod_34<string>(4194042892u) }, null, new Type[] { AccountTypesReflection.smethod_2(typeof(PrivacyInfo.Types.GameInfoPrivacy).TypeHandle) }, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(ParentalControlInfo).TypeHandle), ParentalControlInfo.Parser, new string[] { Module.smethod_35<string>(2895354700u), Module.smethod_35<string>(2503634067u), Module.smethod_37<string>(3472672144u), Module.smethod_35<string>(1253574091u), Module.smethod_35<string>(176413180u), Module.smethod_37<string>(3881715245u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameLevelInfo).TypeHandle), GameLevelInfo.Parser, new string[] { Module.smethod_33<string>(638587702u), Module.smethod_35<string>(1482311824u), Module.smethod_36<string>(3681454452u), Module.smethod_36<string>(69510600u), Module.smethod_35<string>(3235769769u), Module.smethod_33<string>(1332460824u), Module.smethod_35<string>(2162935679u), Module.smethod_34<string>(602381348u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameTimeInfo).TypeHandle), GameTimeInfo.Parser, new string[] { Module.smethod_36<string>(1166388311u), Module.smethod_33<string>(1942391842u), Module.smethod_34<string>(621305125u), Module.smethod_33<string>(2261785540u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameTimeRemainingInfo).TypeHandle), GameTimeRemainingInfo.Parser, new string[] { Module.smethod_33<string>(2153135195u), Module.smethod_36<string>(3597372371u), Module.smethod_36<string>(1423817952u), Module.smethod_33<string>(357125834u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameStatus).TypeHandle), GameStatus.Parser, new string[] { Module.smethod_33<string>(2862641106u), Module.smethod_37<string>(1164565617u), Module.smethod_34<string>(847188227u), Module.smethod_37<string>(700380119u), Module.smethod_35<string>(3273115666u), Module.smethod_35<string>(2881395033u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(RAFInfo).TypeHandle), RAFInfo.Parser, new string[] { Module.smethod_33<string>(3208264152u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameSessionInfo).TypeHandle), GameSessionInfo.Parser, new string[] { Module.smethod_37<string>(200386278u), Module.smethod_33<string>(4142240628u), Module.smethod_36<string>(885479598u), Module.smethod_36<string>(2624978747u), Module.smethod_35<string>(3762837287u), Module.smethod_36<string>(3235659646u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameSessionUpdateInfo).TypeHandle), GameSessionUpdateInfo.Parser, new string[] { Module.smethod_35<string>(3622957298u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameSessionLocation).TypeHandle), GameSessionLocation.Parser, new string[] { Module.smethod_36<string>(3380344736u), Module.smethod_33<string>(651702376u), Module.smethod_37<string>(667872528u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(CAIS).TypeHandle), CAIS.Parser, new string[] { Module.smethod_33<string>(3559032343u), Module.smethod_36<string>(3111175559u), Module.smethod_34<string>(3454896507u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountList).TypeHandle), GameAccountList.Parser, new string[] { Module.smethod_35<string>(4244548940u), Module.smethod_35<string>(2121056678u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountState).TypeHandle), AccountState.Parser, new string[] { Module.smethod_37<string>(3560410545u), Module.smethod_34<string>(1448017777u), Module.smethod_35<string>(4075410058u), Module.smethod_36<string>(3525029826u), Module.smethod_36<string>(182255151u), Module.smethod_35<string>(2466648525u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AccountStateTagged).TypeHandle), AccountStateTagged.Parser, new string[] { Module.smethod_37<string>(962121772u), Module.smethod_34<string>(2675333323u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountState).TypeHandle), GameAccountState.Parser, new string[] { Module.smethod_36<string>(3525029826u), Module.smethod_36<string>(865278595u), Module.smethod_35<string>(125390935u), Module.smethod_37<string>(2450079127u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(GameAccountStateTagged).TypeHandle), GameAccountStateTagged.Parser, new string[] { Module.smethod_37<string>(1838651123u), Module.smethod_34<string>(1550493979u) }, null, null, null), new GeneratedCodeInfo(AccountTypesReflection.smethod_2(typeof(AuthorizedData).TypeHandle), AuthorizedData.Parser, new string[] { Module.smethod_35<string>(874396530u), Module.smethod_34<string>(3895916200u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Channel.V1/JoinNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class JoinNotification : IMessage<JoinNotification>, IEquatable<JoinNotification>, IDeepCloneable<JoinNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly JoinNotification.__c __9 = new JoinNotification.__c(); internal JoinNotification cctor>b__44_0() { return new JoinNotification(); } } private static readonly MessageParser<JoinNotification> _parser = new MessageParser<JoinNotification>(new Func<JoinNotification>(JoinNotification.__c.__9.<.cctor>b__44_0)); public const int SelfFieldNumber = 1; private Member self_; public const int MemberFieldNumber = 2; private static readonly FieldCodec<Member> _repeated_member_codec = FieldCodec.ForMessage<Member>(18u, Bgs.Protocol.Channel.V1.Member.Parser); private readonly RepeatedField<Member> member_ = new RepeatedField<Member>(); public const int ChannelStateFieldNumber = 3; private ChannelState channelState_; public const int ChannelIdFieldNumber = 4; private ChannelId channelId_; public const int SubscriberFieldNumber = 5; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<JoinNotification> Parser { get { return JoinNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return JoinNotification.Descriptor; } } public Member Self { get { return this.self_; } set { this.self_ = value; } } public RepeatedField<Member> Member { get { return this.member_; } } public ChannelState ChannelState { get { return this.channelState_; } set { this.channelState_ = value; } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public JoinNotification() { } public JoinNotification(JoinNotification other) : this() { while (true) { IL_A6: int arg_88_0 = 155475711; while (true) { switch ((arg_88_0 ^ 1710848916) % 5) { case 0: this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); arg_88_0 = 1302284228; continue; case 1: this.Self = ((other.self_ != null) ? other.Self.Clone() : null); arg_88_0 = 2052822402; continue; case 3: this.member_ = other.member_.Clone(); this.ChannelState = ((other.channelState_ != null) ? other.ChannelState.Clone() : null); arg_88_0 = 1364736024; continue; case 4: goto IL_A6; } goto Block_4; } } Block_4: this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); } public JoinNotification Clone() { return new JoinNotification(this); } public override bool Equals(object other) { return this.Equals(other as JoinNotification); } public bool Equals(JoinNotification other) { if (other == null) { goto IL_18; } goto IL_15D; int arg_107_0; while (true) { IL_102: switch ((arg_107_0 ^ -1549038174) % 15) { case 0: return true; case 1: return false; case 2: return false; case 3: return false; case 4: arg_107_0 = (JoinNotification.smethod_0(this.ChannelState, other.ChannelState) ? -1060850936 : -77579085); continue; case 5: return false; case 6: goto IL_15D; case 7: arg_107_0 = ((!JoinNotification.smethod_0(this.ChannelId, other.ChannelId)) ? -294433230 : -1805586349); continue; case 8: arg_107_0 = ((!this.member_.Equals(other.member_)) ? -1079020462 : -1048152554); continue; case 9: arg_107_0 = ((!JoinNotification.smethod_0(this.Subscriber, other.Subscriber)) ? -1244135762 : -1708523741); continue; case 11: return false; case 12: return false; case 13: arg_107_0 = ((!JoinNotification.smethod_0(this.Self, other.Self)) ? -1390049533 : -2090584941); continue; case 14: goto IL_18; } break; } return true; IL_18: arg_107_0 = -1103753556; goto IL_102; IL_15D: arg_107_0 = ((other == this) ? -312435435 : -1603333652); goto IL_102; } public override int GetHashCode() { int num = 1; while (true) { IL_147: uint arg_112_0 = 1196014562u; while (true) { uint num2; switch ((num2 = (arg_112_0 ^ 1038841753u)) % 10u) { case 0u: num ^= JoinNotification.smethod_1(this.ChannelState); arg_112_0 = (num2 * 3622824492u ^ 4262099742u); continue; case 1u: arg_112_0 = (((this.self_ == null) ? 986148825u : 459456329u) ^ num2 * 4119938644u); continue; case 2u: num ^= JoinNotification.smethod_1(this.ChannelId); arg_112_0 = (num2 * 500014509u ^ 3456394053u); continue; case 3u: arg_112_0 = (((this.channelId_ != null) ? 75411137u : 1027408669u) ^ num2 * 2498048680u); continue; case 4u: num ^= JoinNotification.smethod_1(this.member_); arg_112_0 = 274195681u; continue; case 5u: goto IL_147; case 6u: arg_112_0 = ((this.subscriber_ == null) ? 733298866u : 1387931954u); continue; case 7u: num ^= JoinNotification.smethod_1(this.Subscriber); arg_112_0 = (num2 * 3438565132u ^ 1984810422u); continue; case 8u: num ^= JoinNotification.smethod_1(this.Self); arg_112_0 = (num2 * 2789855439u ^ 3170667185u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.self_ != null) { goto IL_D3; } goto IL_150; uint arg_117_0; while (true) { IL_112: uint num; switch ((num = (arg_117_0 ^ 3326760883u)) % 11u) { case 1u: output.WriteRawTag(10); arg_117_0 = (num * 1785579266u ^ 1943458597u); continue; case 2u: goto IL_150; case 3u: output.WriteRawTag(34); output.WriteMessage(this.ChannelId); arg_117_0 = (num * 556378969u ^ 164048001u); continue; case 4u: goto IL_D3; case 5u: output.WriteRawTag(26); arg_117_0 = (num * 786608534u ^ 3093557601u); continue; case 6u: output.WriteMessage(this.ChannelState); arg_117_0 = (num * 514541817u ^ 1900625099u); continue; case 7u: output.WriteMessage(this.Self); arg_117_0 = (num * 3090618168u ^ 1425016765u); continue; case 8u: arg_117_0 = (((this.channelId_ == null) ? 1365355162u : 1101737680u) ^ num * 926971881u); continue; case 9u: output.WriteRawTag(42); output.WriteMessage(this.Subscriber); arg_117_0 = (num * 2180017454u ^ 3758445297u); continue; case 10u: arg_117_0 = ((this.subscriber_ != null) ? 2341585662u : 2704526887u); continue; } break; } return; IL_D3: arg_117_0 = 2774418451u; goto IL_112; IL_150: this.member_.WriteTo(output, JoinNotification._repeated_member_codec); arg_117_0 = 2368233418u; goto IL_112; } public int CalculateSize() { int num = 0; while (true) { IL_151: uint arg_11C_0 = 2149499537u; while (true) { uint num2; switch ((num2 = (arg_11C_0 ^ 3215541389u)) % 10u) { case 0u: arg_11C_0 = (((this.channelId_ == null) ? 2104529400u : 632347240u) ^ num2 * 2564724000u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Self); arg_11C_0 = (num2 * 910067266u ^ 1975817172u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_11C_0 = (num2 * 2773256191u ^ 1672997067u); continue; case 3u: num += this.member_.CalculateSize(JoinNotification._repeated_member_codec); arg_11C_0 = 3856655189u; continue; case 5u: arg_11C_0 = ((this.subscriber_ == null) ? 3364953875u : 2695302309u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelState); arg_11C_0 = (num2 * 2958174862u ^ 1279652715u); continue; case 7u: goto IL_151; case 8u: arg_11C_0 = (((this.self_ != null) ? 3129140898u : 2708834742u) ^ num2 * 3682280035u); continue; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_11C_0 = (num2 * 3488961715u ^ 2033041127u); continue; } return num; } } return num; } public void MergeFrom(JoinNotification other) { if (other == null) { goto IL_22B; } goto IL_2A1; uint arg_235_0; while (true) { IL_230: uint num; switch ((num = (arg_235_0 ^ 398983827u)) % 20u) { case 0u: goto IL_22B; case 1u: this.Self.MergeFrom(other.Self); arg_235_0 = 1123012984u; continue; case 2u: arg_235_0 = ((other.channelId_ == null) ? 1112317717u : 2129151048u); continue; case 3u: goto IL_2A1; case 4u: this.ChannelState.MergeFrom(other.ChannelState); arg_235_0 = 41333313u; continue; case 5u: arg_235_0 = (((other.channelState_ != null) ? 3999770446u : 2326952003u) ^ num * 2121122394u); continue; case 6u: this.channelId_ = new ChannelId(); arg_235_0 = (num * 549487511u ^ 2546156302u); continue; case 7u: this.ChannelId.MergeFrom(other.ChannelId); arg_235_0 = 1112317717u; continue; case 8u: arg_235_0 = (((this.self_ == null) ? 2062122142u : 211969334u) ^ num * 826006715u); continue; case 9u: this.self_ = new Member(); arg_235_0 = (num * 2521191379u ^ 4071531553u); continue; case 10u: this.Subscriber.MergeFrom(other.Subscriber); arg_235_0 = 870072067u; continue; case 11u: arg_235_0 = (((this.channelId_ != null) ? 4232517213u : 2253657228u) ^ num * 2564460895u); continue; case 12u: this.channelState_ = new ChannelState(); arg_235_0 = (num * 213089147u ^ 2085688151u); continue; case 13u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_235_0 = (num * 2869136515u ^ 3085997770u); continue; case 14u: arg_235_0 = (((this.subscriber_ != null) ? 3330447129u : 3860977490u) ^ num * 1507544436u); continue; case 15u: this.member_.Add(other.member_); arg_235_0 = 655633718u; continue; case 17u: return; case 18u: arg_235_0 = ((other.subscriber_ != null) ? 1831356537u : 870072067u); continue; case 19u: arg_235_0 = (((this.channelState_ != null) ? 3363802260u : 3985490744u) ^ num * 4060238249u); continue; } break; } return; IL_22B: arg_235_0 = 1550463434u; goto IL_230; IL_2A1: arg_235_0 = ((other.self_ != null) ? 596758539u : 1123012984u); goto IL_230; } public void MergeFrom(CodedInputStream input) { while (true) { IL_33B: uint num; uint arg_2B7_0 = ((num = input.ReadTag()) == 0u) ? 222585841u : 1295462297u; while (true) { uint num2; switch ((num2 = (arg_2B7_0 ^ 1754820894u)) % 26u) { case 0u: arg_2B7_0 = (((num == 18u) ? 586646432u : 1937926713u) ^ num2 * 161043003u); continue; case 1u: arg_2B7_0 = ((this.self_ == null) ? 1890708235u : 143638857u); continue; case 2u: this.channelState_ = new ChannelState(); arg_2B7_0 = (num2 * 586734842u ^ 2628775630u); continue; case 3u: input.ReadMessage(this.self_); arg_2B7_0 = 80370824u; continue; case 4u: goto IL_33B; case 6u: this.member_.AddEntriesFrom(input, JoinNotification._repeated_member_codec); arg_2B7_0 = 112192548u; continue; case 7u: this.self_ = new Member(); arg_2B7_0 = (num2 * 2332232657u ^ 2958783340u); continue; case 8u: arg_2B7_0 = ((this.channelId_ != null) ? 182339691u : 1764827838u); continue; case 9u: arg_2B7_0 = ((num > 18u) ? 1885404627u : 1684843694u); continue; case 10u: arg_2B7_0 = (((num == 10u) ? 4270897551u : 2193510584u) ^ num2 * 371895723u); continue; case 11u: arg_2B7_0 = 1295462297u; continue; case 12u: arg_2B7_0 = (num2 * 1971918224u ^ 2576555588u); continue; case 13u: arg_2B7_0 = (((num != 42u) ? 3397044895u : 3141093216u) ^ num2 * 790413344u); continue; case 14u: input.ReadMessage(this.channelState_); arg_2B7_0 = 1479770589u; continue; case 15u: input.ReadMessage(this.channelId_); arg_2B7_0 = 112192548u; continue; case 16u: arg_2B7_0 = (((num == 34u) ? 502428738u : 1670056433u) ^ num2 * 797805719u); continue; case 17u: arg_2B7_0 = (num2 * 1676468572u ^ 4286973232u); continue; case 18u: arg_2B7_0 = ((this.subscriber_ == null) ? 1611333220u : 56786519u); continue; case 19u: arg_2B7_0 = (num2 * 4053255332u ^ 167083531u); continue; case 20u: arg_2B7_0 = ((this.channelState_ != null) ? 331012414u : 508265542u); continue; case 21u: input.SkipLastField(); arg_2B7_0 = 112192548u; continue; case 22u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_2B7_0 = (num2 * 458088492u ^ 3205437103u); continue; case 23u: arg_2B7_0 = ((num == 26u) ? 392282724u : 1170409270u); continue; case 24u: this.channelId_ = new ChannelId(); arg_2B7_0 = (num2 * 1470752091u ^ 2839581067u); continue; case 25u: input.ReadMessage(this.subscriber_); arg_2B7_0 = 112192548u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Collections/RepeatedField.cs using Google.Protobuf.Compatibility; using System; using System.Collections; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; namespace Google.Protobuf.Collections { [ComVisible(true)] public sealed class RepeatedField<T> : IEnumerable, IList, ICollection, IList<T>, ICollection<T>, IEnumerable<T>, IDeepCloneable<RepeatedField<T>>, IEquatable<RepeatedField<T>> { private static readonly T[] EmptyArray = new T[0]; private const int MinArraySize = 8; private T[] array = RepeatedField<T>.EmptyArray; private int count; public int Count { get { return this.count; } } public bool IsReadOnly { get { return false; } } public T this[int index] { get { if (index >= 0) { while (true) { IL_4F: uint arg_33_0 = 495512970u; while (true) { uint num; switch ((num = (arg_33_0 ^ 1887603351u)) % 4u) { case 0u: goto IL_56; case 1u: arg_33_0 = (((index < this.count) ? 65021127u : 149641209u) ^ num * 2244673006u); continue; case 3u: goto IL_4F; } goto Block_3; } } Block_3: return this.array[index]; } IL_56: throw RepeatedField<T>.smethod_7(Module.smethod_36<string>(1137418279u)); } set { if (index >= 0) { while (true) { IL_96: uint arg_6E_0 = 3630079173u; while (true) { uint num; switch ((num = (arg_6E_0 ^ 4134116640u)) % 7u) { case 0u: goto IL_96; case 2u: arg_6E_0 = ((value == null) ? 2954725098u : 4079346881u); continue; case 3u: goto IL_9D; case 4u: arg_6E_0 = (((index >= this.count) ? 3198776132u : 3883271993u) ^ num * 2698028948u); continue; case 5u: this.array[index] = value; arg_6E_0 = 3540219867u; continue; case 6u: goto IL_AD; } goto Block_4; } } Block_4: return; IL_9D: throw RepeatedField<T>.smethod_4(Module.smethod_37<string>(2719011704u)); } IL_AD: throw RepeatedField<T>.smethod_7(Module.smethod_36<string>(1137418279u)); } } bool IList.IsFixedSize { get { return false; } } bool ICollection.IsSynchronized { get { return false; } } object ICollection.SyncRoot { get { return this; } } object IList.this[int index] { get { return this[index]; } set { this[index] = (T)((object)value); } } public RepeatedField<T> Clone() { RepeatedField<T> repeatedField = new RepeatedField<T>(); if (this.array != RepeatedField<T>.EmptyArray) { goto IL_BE; } goto IL_129; uint arg_F4_0; while (true) { IL_EF: uint num; switch ((num = (arg_F4_0 ^ 3868469865u)) % 10u) { case 0u: { IDeepCloneable<T>[] array = repeatedField.array as IDeepCloneable<T>[]; arg_F4_0 = (num * 328887486u ^ 2569178578u); continue; } case 1u: goto IL_129; case 2u: { int num2 = 0; arg_F4_0 = (num * 3112580505u ^ 1383133642u); continue; } case 3u: goto IL_BE; case 5u: { IDeepCloneable<T>[] array; arg_F4_0 = (((array != null) ? 1247038031u : 341634826u) ^ num * 2959909362u); continue; } case 6u: { int num2; arg_F4_0 = ((num2 >= this.count) ? 2519804532u : 3026334069u); continue; } case 7u: repeatedField.array = (T[])RepeatedField<T>.smethod_0(this.array); arg_F4_0 = (num * 3418464118u ^ 2881654057u); continue; case 8u: { IDeepCloneable<T>[] array; int num2; repeatedField.array[num2] = array[num2].Clone(); num2++; arg_F4_0 = 2395505135u; continue; } case 9u: arg_F4_0 = (num * 1552521539u ^ 2698824094u); continue; } break; } return repeatedField; IL_BE: arg_F4_0 = 2167043006u; goto IL_EF; IL_129: repeatedField.count = this.count; arg_F4_0 = 3085565801u; goto IL_EF; } public void AddEntriesFrom(CodedInputStream input, FieldCodec<T> codec) { uint lastTag = input.LastTag; Func<CodedInputStream, T> valueReader = codec.ValueReader; if (RepeatedField<T>.smethod_1(typeof(T).TypeHandle).IsValueType()) { goto IL_79; } goto IL_189; uint arg_147_0; while (true) { IL_142: uint num; switch ((num = (arg_147_0 ^ 349581016u)) % 13u) { case 0u: arg_147_0 = ((input.MaybeConsumeTag(lastTag) ? 2792542167u : 2493560502u) ^ num * 4283985340u); continue; case 1u: arg_147_0 = (((WireFormat.GetTagWireType(lastTag) == WireFormat.WireType.LengthDelimited) ? 4182580420u : 2445968179u) ^ num * 3573087188u); continue; case 2u: arg_147_0 = (num * 2407926176u ^ 627495612u); continue; case 3u: { int num2; arg_147_0 = (((num2 > 0) ? 704969730u : 1347903514u) ^ num * 2106852334u); continue; } case 4u: { int oldLimit; input.PopLimit(oldLimit); arg_147_0 = (num * 2913868755u ^ 1655185686u); continue; } case 6u: { int num2; int oldLimit = input.PushLimit(num2); arg_147_0 = (num * 3972840873u ^ 320789690u); continue; } case 7u: goto IL_79; case 8u: this.Add(valueReader(input)); arg_147_0 = 1293084732u; continue; case 9u: arg_147_0 = ((!input.ReachedLimit) ? 862879642u : 1176527045u); continue; case 10u: return; case 11u: goto IL_189; case 12u: { int num2 = input.ReadLength(); arg_147_0 = (num * 1888486294u ^ 430467554u); continue; } } break; } return; IL_79: arg_147_0 = 431838837u; goto IL_142; IL_189: this.Add(valueReader(input)); arg_147_0 = 320588544u; goto IL_142; } public int CalculateSize(FieldCodec<T> codec) { if (this.count == 0) { goto IL_7F; } goto IL_14C; uint arg_10E_0; int num2; uint tag; int num3; while (true) { IL_109: uint num; switch ((num = (arg_10E_0 ^ 4001631253u)) % 12u) { case 0u: goto IL_15A; case 1u: num2 = this.CalculatePackedDataSize(codec); arg_10E_0 = (num * 3891558231u ^ 1575501722u); continue; case 2u: goto IL_14C; case 3u: { Func<T, int> valueSizeCalculator = codec.ValueSizeCalculator; num3 = this.count * CodedOutputStream.ComputeRawVarint32Size(tag); arg_10E_0 = 3044489711u; continue; } case 4u: { Func<T, int> valueSizeCalculator; int num4; num3 += valueSizeCalculator(this.array[num4]); num4++; arg_10E_0 = 2737623098u; continue; } case 5u: return 0; case 6u: arg_10E_0 = (((WireFormat.GetTagWireType(tag) == WireFormat.WireType.LengthDelimited) ? 1110063554u : 216719364u) ^ num * 1888421937u); continue; case 7u: goto IL_7F; case 8u: arg_10E_0 = ((RepeatedField<T>.smethod_1(typeof(T).TypeHandle).IsValueType() ? 405727823u : 968969150u) ^ num * 1456731362u); continue; case 10u: { int num4 = 0; arg_10E_0 = (num * 2246578605u ^ 3048063944u); continue; } case 11u: { int num4; arg_10E_0 = ((num4 < this.count) ? 3082958981u : 4069993376u); continue; } } break; } return num3; IL_15A: return CodedOutputStream.ComputeRawVarint32Size(tag) + CodedOutputStream.ComputeLengthSize(num2) + num2; IL_7F: arg_10E_0 = 2713212068u; goto IL_109; IL_14C: tag = codec.Tag; arg_10E_0 = 2759193717u; goto IL_109; } private int CalculatePackedDataSize(FieldCodec<T> codec) { int fixedSize = codec.FixedSize; if (fixedSize == 0) { while (true) { IL_D4: uint arg_A2_0 = 2833686227u; while (true) { uint num; switch ((num = (arg_A2_0 ^ 2175998545u)) % 9u) { case 0u: goto IL_D4; case 1u: { int num2; return num2; } case 2u: { int num2 = 0; int num3 = 0; arg_A2_0 = (num * 2189381860u ^ 2913051558u); continue; } case 3u: { int num3; arg_A2_0 = ((num3 < this.count) ? 2988845271u : 2662832558u); continue; } case 4u: { int num3; num3++; arg_A2_0 = (num * 3732949925u ^ 1868024201u); continue; } case 5u: arg_A2_0 = (num * 1679443217u ^ 2977036967u); continue; case 6u: { int num2; int num3; Func<T, int> valueSizeCalculator; num2 += valueSizeCalculator(this.array[num3]); arg_A2_0 = 2488117428u; continue; } case 7u: { Func<T, int> valueSizeCalculator = codec.ValueSizeCalculator; arg_A2_0 = (num * 4280227348u ^ 3021418933u); continue; } } goto Block_3; } } Block_3:; } return fixedSize * this.Count; } public void WriteTo(CodedOutputStream output, FieldCodec<T> codec) { if (this.count == 0) { goto IL_0B; } goto IL_1E1; uint arg_18F_0; Action<CodedOutputStream, T> valueWriter; while (true) { IL_18A: uint num; switch ((num = (arg_18F_0 ^ 1953686162u)) % 17u) { case 0u: arg_18F_0 = (num * 3203489594u ^ 1031590236u); continue; case 1u: { uint tag; output.WriteTag(tag); uint value; output.WriteRawVarint32(value); int num2 = 0; arg_18F_0 = (num * 515923323u ^ 23271688u); continue; } case 2u: { uint tag = codec.Tag; arg_18F_0 = ((RepeatedField<T>.smethod_1(typeof(T).TypeHandle).IsValueType() ? 1056524744u : 1802064101u) ^ num * 3884348354u); continue; } case 3u: arg_18F_0 = (num * 2769258316u ^ 2862122040u); continue; case 4u: { uint value = (uint)this.CalculatePackedDataSize(codec); arg_18F_0 = (num * 4231138135u ^ 3155140988u); continue; } case 5u: { uint tag; output.WriteTag(tag); int num3; valueWriter(output, this.array[num3]); num3++; arg_18F_0 = 603286320u; continue; } case 6u: { int num2; arg_18F_0 = ((num2 < this.count) ? 1868080555u : 798875600u); continue; } case 8u: { uint tag; arg_18F_0 = (((WireFormat.GetTagWireType(tag) != WireFormat.WireType.LengthDelimited) ? 457279799u : 500871248u) ^ num * 3734816805u); continue; } case 9u: { int num3 = 0; arg_18F_0 = 1317493604u; continue; } case 10u: { int num2; valueWriter(output, this.array[num2]); arg_18F_0 = 1207070914u; continue; } case 11u: { int num3; arg_18F_0 = ((num3 >= this.count) ? 1230221189u : 414117966u); continue; } case 12u: goto IL_1E1; case 13u: return; case 14u: { int num2; num2++; arg_18F_0 = (num * 2746311965u ^ 3912762196u); continue; } case 15u: return; case 16u: goto IL_0B; } break; } return; IL_0B: arg_18F_0 = 793007137u; goto IL_18A; IL_1E1: valueWriter = codec.ValueWriter; arg_18F_0 = 158090120u; goto IL_18A; } private void EnsureSize(int size) { if (this.array.Length < size) { while (true) { IL_89: uint arg_6D_0 = 4002637106u; while (true) { uint num; switch ((num = (arg_6D_0 ^ 3981761093u)) % 4u) { case 0u: goto IL_89; case 1u: { T[] array_; RepeatedField<T>.smethod_3(this.array, 0, array_, 0, this.array.Length); this.array = array_; arg_6D_0 = (num * 452830843u ^ 22932296u); continue; } case 3u: { size = RepeatedField<T>.smethod_2(size, 8); T[] array_ = new T[RepeatedField<T>.smethod_2(this.array.Length * 2, size)]; arg_6D_0 = (num * 3730143719u ^ 1732339117u); continue; } } goto Block_2; } } Block_2:; } } public void Add(T item) { if (item != null) { goto IL_2C; } IL_08: int arg_12_0 = 345573595; IL_0D: switch ((arg_12_0 ^ 1228463330) % 4) { case 0: goto IL_08; case 1: throw RepeatedField<T>.smethod_4(Module.smethod_33<string>(250796250u)); case 2: { IL_2C: this.EnsureSize(this.count + 1); T[] arg_52_0 = this.array; int num = this.count; this.count = num + 1; arg_52_0[num] = item; arg_12_0 = 733793885; goto IL_0D; } } } public void Clear() { this.array = RepeatedField<T>.EmptyArray; while (true) { IL_3E: uint arg_26_0 = 2584893099u; while (true) { uint num; switch ((num = (arg_26_0 ^ 3959011504u)) % 3u) { case 1u: this.count = 0; arg_26_0 = (num * 1317551434u ^ 1405766284u); continue; case 2u: goto IL_3E; } return; } } } public bool Contains(T item) { return this.IndexOf(item) != -1; } public void CopyTo(T[] array, int arrayIndex) { RepeatedField<T>.smethod_3(this.array, 0, array, arrayIndex, this.count); } public bool Remove(T item) { int num = this.IndexOf(item); while (true) { IL_86: uint arg_66_0 = 601507694u; while (true) { uint num2; switch ((num2 = (arg_66_0 ^ 153965440u)) % 5u) { case 0u: RepeatedField<T>.smethod_3(this.array, num + 1, this.array, num, this.count - num - 1); this.count--; arg_66_0 = 967664632u; continue; case 1u: return false; case 2u: arg_66_0 = (((num != -1) ? 386754548u : 1938479000u) ^ num2 * 1521070497u); continue; case 3u: goto IL_86; } goto Block_2; } } Block_2: this.array[this.count] = default(T); return true; } public void Add(RepeatedField<T> values) { if (values == null) { throw RepeatedField<T>.smethod_4(Module.smethod_33<string>(659671905u)); } this.EnsureSize(this.count + values.count); RepeatedField<T>.smethod_3(values.array, 0, this.array, this.count, values.count); this.count += values.count; } public void Add(IEnumerable<T> values) { if (values == null) { throw RepeatedField<T>.smethod_4(Module.smethod_36<string>(633765944u)); } IEnumerator<T> enumerator = values.GetEnumerator(); try { while (true) { IL_77: int arg_4F_0 = RepeatedField<T>.smethod_5(enumerator) ? 1105574788 : 1140450487; while (true) { switch ((arg_4F_0 ^ 667299957) % 4) { case 0: arg_4F_0 = 1105574788; continue; case 1: { T current = enumerator.Current; this.Add(current); arg_4F_0 = 591472010; continue; } case 3: goto IL_77; } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_B8: uint arg_A0_0 = 1260874760u; while (true) { uint num; switch ((num = (arg_A0_0 ^ 667299957u)) % 3u) { case 1u: RepeatedField<T>.smethod_6(enumerator); arg_A0_0 = (num * 2483277025u ^ 3773351686u); continue; case 2u: goto IL_B8; } goto Block_8; } } Block_8:; } } } [IteratorStateMachine(typeof(RepeatedField__.<GetEnumerator>d__21))] public IEnumerator<T> GetEnumerator() { RepeatedField<T>.<GetEnumerator>d__21 expr_06 = new RepeatedField<T>.<GetEnumerator>d__21(0); expr_06.__4__this = this; return expr_06; } public override bool Equals(object obj) { return this.Equals(obj as RepeatedField<T>); } IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public override int GetHashCode() { int num = 0; int num2 = 0; while (true) { IL_9A: uint arg_76_0 = 2586240208u; while (true) { uint num3; switch ((num3 = (arg_76_0 ^ 2901867794u)) % 6u) { case 0u: num = num * 31 + this.array[num2].GetHashCode(); arg_76_0 = 2672207594u; continue; case 1u: arg_76_0 = ((num2 < this.count) ? 2208136224u : 2588468087u); continue; case 2u: num2++; arg_76_0 = (num3 * 513945887u ^ 2184949933u); continue; case 4u: arg_76_0 = (num3 * 3365125655u ^ 2129160139u); continue; case 5u: goto IL_9A; } return num; } } return num; } public bool Equals(RepeatedField<T> other) { if (other == null) { goto IL_DE; } goto IL_13C; uint arg_E8_0; while (true) { IL_E3: uint num; switch ((num = (arg_E8_0 ^ 2026901279u)) % 14u) { case 0u: goto IL_13C; case 1u: return false; case 2u: goto IL_DE; case 3u: { EqualityComparer<T> @default; int num2; arg_E8_0 = (@default.Equals(this.array[num2], other.array[num2]) ? 622073604u : 1212297050u); continue; } case 4u: return false; case 5u: return false; case 6u: { int num2; arg_E8_0 = ((num2 < this.count) ? 1691336322u : 1067068481u); continue; } case 7u: return true; case 8u: arg_E8_0 = (num * 3859565619u ^ 2417882767u); continue; case 9u: { int num2 = 0; arg_E8_0 = (num * 256934839u ^ 1605893188u); continue; } case 10u: { EqualityComparer<T> @default = EqualityComparer<T>.Default; arg_E8_0 = 866845094u; continue; } case 11u: arg_E8_0 = ((other.Count == this.Count) ? 147303997u : 455643969u); continue; case 13u: { int num2; num2++; arg_E8_0 = 949788515u; continue; } } break; } return true; IL_DE: arg_E8_0 = 854787260u; goto IL_E3; IL_13C: arg_E8_0 = ((other == this) ? 1701731294u : 1404128284u); goto IL_E3; } public int IndexOf(T item) { if (item == null) { goto IL_88; } goto IL_C7; uint arg_92_0; EqualityComparer<T> @default; while (true) { IL_8D: uint num; switch ((num = (arg_92_0 ^ 942271747u)) % 10u) { case 0u: goto IL_88; case 1u: goto IL_D4; case 2u: { int num2; arg_92_0 = ((num2 >= this.count) ? 296236707u : 374127910u); continue; } case 3u: goto IL_C7; case 5u: { int num2 = 0; arg_92_0 = (num * 2482567144u ^ 4041701487u); continue; } case 6u: { int num2; num2++; arg_92_0 = 1999304121u; continue; } case 7u: { int num2; return num2; } case 8u: arg_92_0 = (num * 1124084143u ^ 3754158453u); continue; case 9u: { int num2; arg_92_0 = ((!@default.Equals(this.array[num2], item)) ? 223232867u : 1637101498u); continue; } } break; } return -1; IL_D4: throw RepeatedField<T>.smethod_4(Module.smethod_34<string>(1998303130u)); IL_88: arg_92_0 = 1054411828u; goto IL_8D; IL_C7: @default = EqualityComparer<T>.Default; arg_92_0 = 643417132u; goto IL_8D; } public void Insert(int index, T item) { if (item == null) { goto IL_1D; } goto IL_FF; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 2516027339u)) % 9u) { case 0u: goto IL_108; case 1u: goto IL_FF; case 3u: arg_BF_0 = (((index <= this.count) ? 837796657u : 866095185u) ^ num * 3157720697u); continue; case 4u: this.count++; arg_BF_0 = (num * 942514077u ^ 70766067u); continue; case 5u: this.EnsureSize(this.count + 1); RepeatedField<T>.smethod_3(this.array, index, this.array, index + 1, this.count - index); arg_BF_0 = 4267804870u; continue; case 6u: this.array[index] = item; arg_BF_0 = (num * 3413272626u ^ 749495697u); continue; case 7u: goto IL_1D; case 8u: goto IL_118; } break; } return; IL_108: throw RepeatedField<T>.smethod_7(Module.smethod_34<string>(3349025576u)); IL_118: throw RepeatedField<T>.smethod_4(Module.smethod_35<string>(2613611489u)); IL_1D: arg_BF_0 = 3595699030u; goto IL_BA; IL_FF: arg_BF_0 = ((index >= 0) ? 3393884718u : 2516131692u); goto IL_BA; } public void RemoveAt(int index) { if (index >= 0) { while (true) { IL_A0: uint arg_7C_0 = 1856822727u; while (true) { uint num; switch ((num = (arg_7C_0 ^ 177069126u)) % 6u) { case 0u: goto IL_A7; case 2u: this.count--; arg_7C_0 = (num * 3372450543u ^ 1896179937u); continue; case 3u: goto IL_A0; case 4u: RepeatedField<T>.smethod_3(this.array, index + 1, this.array, index, this.count - index - 1); arg_7C_0 = 1791480996u; continue; case 5u: arg_7C_0 = (((index >= this.count) ? 674979184u : 445073436u) ^ num * 4139897492u); continue; } goto Block_3; } } Block_3: this.array[this.count] = default(T); return; } IL_A7: throw RepeatedField<T>.smethod_7(Module.smethod_37<string>(1515578163u)); } public override string ToString() { StringBuilder stringBuilder = RepeatedField<T>.smethod_8(); while (true) { IL_3E: uint arg_26_0 = 3762034287u; while (true) { uint num; switch ((num = (arg_26_0 ^ 3041272673u)) % 3u) { case 0u: goto IL_3E; case 1u: JsonFormatter.Default.WriteList(stringBuilder, this); arg_26_0 = (num * 3822163022u ^ 2426271970u); continue; } goto Block_1; } } Block_1: return RepeatedField<T>.smethod_9(stringBuilder); } void ICollection.CopyTo(Array array, int index) { RepeatedField<T>.smethod_3(this.array, 0, array, index, this.count); } int IList.Add(object value) { this.Add((T)((object)value)); return this.count - 1; } bool IList.Contains(object value) { return value is T && this.Contains((T)((object)value)); } int IList.IndexOf(object value) { if (!(value is T)) { return -1; } return this.IndexOf((T)((object)value)); } void IList.Insert(int index, object value) { this.Insert(index, (T)((object)value)); } void IList.Remove(object value) { if (value is T) { goto IL_2C; } IL_08: int arg_12_0 = -1772889532; IL_0D: switch ((arg_12_0 ^ -1743869255) % 4) { case 0: goto IL_08; case 1: return; case 2: IL_2C: this.Remove((T)((object)value)); arg_12_0 = -1674331314; goto IL_0D; } } static object smethod_0(Array array_0) { return array_0.Clone(); } static Type smethod_1(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static int smethod_2(int int_0, int int_1) { return Math.Max(int_0, int_1); } static void smethod_3(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Array.Copy(array_0, int_0, array_1, int_1, int_2); } static ArgumentNullException smethod_4(string string_0) { return new ArgumentNullException(string_0); } static bool smethod_5(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_6(IDisposable idisposable_0) { idisposable_0.Dispose(); } static ArgumentOutOfRangeException smethod_7(string string_0) { return new ArgumentOutOfRangeException(string_0); } static StringBuilder smethod_8() { return new StringBuilder(); } static string smethod_9(object object_0) { return object_0.ToString(); } } } <file_sep>/AuthServer.Game.Managers/ObjectManager.cs using AuthServer.Game.Entities; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Constants.Misc; using Framework.Logging; using Framework.Misc; using Framework.ObjectDefines; using Framework.Serialization; using System; using System.Collections.Generic; using System.IO; using System.Reflection; namespace AuthServer.Game.Managers { public sealed class ObjectManager : Singleton<ObjectManager> { private Dictionary<ulong, WorldObject> objectList; public Dictionary<int, Creature> Creatures; public Dictionary<int, GameObject> GameObjects; public Dictionary<int, GameObject> GameObjectSpawns; private ObjectManager() { this.objectList = new Dictionary<ulong, WorldObject>(); this.Creatures = new Dictionary<int, Creature>(); this.GameObjects = new Dictionary<int, GameObject>(); this.GameObjectSpawns = new Dictionary<int, GameObject>(); this.LoadCreatureStats(); this.LoadGameobjectStats(); } private void LoadGameobjectStats() { StreamReader streamReader = ObjectManager.smethod_7(ObjectManager.smethod_6(ObjectManager.smethod_5(), Module.smethod_34<string>(3113314240u))); try { while (true) { IL_578: uint arg_4FB_0 = (!ObjectManager.smethod_11(streamReader)) ? 1410011869u : 196725348u; while (true) { uint num; switch ((num = (arg_4FB_0 ^ 898338295u)) % 24u) { case 0u: { GameObject gameObject; string[] array; gameObject.Rot.O = float.Parse(ObjectManager.smethod_10(array[7], Module.smethod_35<string>(764625391u), "")); arg_4FB_0 = (num * 895885331u ^ 1952920246u); continue; } case 1u: { GameObject gameObject; string[] array; gameObject.Rot.X = float.Parse(ObjectManager.smethod_10(array[4], Module.smethod_35<string>(764625391u), "")); gameObject.Rot.Y = float.Parse(ObjectManager.smethod_10(array[5], Module.smethod_36<string>(1708679815u), "")); arg_4FB_0 = (num * 1576813854u ^ 2551339022u); continue; } case 2u: { GameObject gameObject; string[] array; gameObject.Pos.Z = float.Parse(ObjectManager.smethod_10(array[3], Module.smethod_36<string>(1708679815u), "")); arg_4FB_0 = (num * 675112681u ^ 2788424843u); continue; } case 4u: { GameObject gameObject; string[] array; gameObject.Id = int.Parse(ObjectManager.smethod_10(array[0], Module.smethod_37<string>(3974021651u), "")); arg_4FB_0 = (num * 4261590861u ^ 4262697089u); continue; } case 5u: arg_4FB_0 = 1410011869u; continue; case 6u: { GameObject gameObject; gameObject.Size = 1f; gameObject.ExpansionRequired = 0; arg_4FB_0 = (((gameObject.Pos.X != 0f) ? 1568691151u : 766348954u) ^ num * 1725030754u); continue; } case 7u: { GameObject gameObject; string[] array; gameObject.Data[2] = int.Parse(ObjectManager.smethod_10(array[22], Module.smethod_36<string>(1708679815u), "")); arg_4FB_0 = (num * 2424818602u ^ 1740370703u); continue; } case 8u: arg_4FB_0 = (num * 2109999096u ^ 1669666073u); continue; case 9u: { GameObject gameObject; string[] array; gameObject.Type = int.Parse(ObjectManager.smethod_10(array[23], Module.smethod_35<string>(764625391u), "")); gameObject.Flags = 0; arg_4FB_0 = (num * 2072144266u ^ 3328121305u); continue; } case 10u: { GameObject gameObject; string[] array; gameObject.Name = ObjectManager.smethod_10(array[17], Module.smethod_35<string>(764625391u), ""); arg_4FB_0 = (num * 1007957585u ^ 1680924238u); continue; } case 11u: { GameObject gameObject; gameObject.CastBarCaption = ""; arg_4FB_0 = (num * 1393127583u ^ 1847872546u); continue; } case 12u: { GameObject gameObject; this.GameObjectSpawns.Add(gameObject.Id, gameObject); arg_4FB_0 = (num * 324219867u ^ 141241546u); continue; } case 13u: { GameObject gameObject; string[] array; gameObject.Data[0] = int.Parse(ObjectManager.smethod_10(array[20], Module.smethod_35<string>(764625391u), "")); gameObject.Data[1] = int.Parse(ObjectManager.smethod_10(array[21], Module.smethod_35<string>(764625391u), "")); arg_4FB_0 = (num * 1359554154u ^ 2341914706u); continue; } case 14u: { GameObject gameObject; int num2; arg_4FB_0 = ((num2 < gameObject.Data.Capacity) ? 1375737346u : 32195042u); continue; } case 15u: { GameObject gameObject; string[] array; gameObject.Rot.Z = float.Parse(ObjectManager.smethod_10(array[6], Module.smethod_36<string>(1708679815u), "")); arg_4FB_0 = (num * 2261474200u ^ 197803303u); continue; } case 16u: { int num2 = 0; arg_4FB_0 = (num * 2548405617u ^ 3881400663u); continue; } case 17u: goto IL_578; case 18u: { string[] array = ObjectManager.smethod_9(ObjectManager.smethod_8(streamReader), new char[] { ';' }); GameObject gameObject = new GameObject(); arg_4FB_0 = 99861715u; continue; } case 19u: { GameObject gameObject; string[] array; gameObject.Map = int.Parse(ObjectManager.smethod_10(array[18], Module.smethod_33<string>(3031927268u), "")); gameObject.Pos.X = float.Parse(ObjectManager.smethod_10(array[1], Module.smethod_35<string>(764625391u), "")); arg_4FB_0 = (num * 3854447194u ^ 1843160590u); continue; } case 20u: { GameObject gameObject; string[] array; gameObject.DisplayInfoId = int.Parse(ObjectManager.smethod_10(array[19], Module.smethod_37<string>(3974021651u), "")); gameObject.IconName = ""; arg_4FB_0 = (num * 1078527560u ^ 3062867076u); continue; } case 21u: { GameObject gameObject; gameObject.Data.Add(0); int num2; num2++; arg_4FB_0 = 1052732761u; continue; } case 22u: { GameObject gameObject; string[] array; gameObject.Pos.O = float.Parse(ObjectManager.smethod_10(array[8], Module.smethod_37<string>(3974021651u), "")); arg_4FB_0 = (num * 3549561052u ^ 1511440678u); continue; } case 23u: { GameObject gameObject; string[] array; gameObject.Pos.Y = float.Parse(ObjectManager.smethod_10(array[2], Module.smethod_37<string>(3974021651u), "")); arg_4FB_0 = (num * 3929716262u ^ 2241756295u); continue; } } goto Block_6; } } Block_6:; } finally { if (streamReader != null) { while (true) { IL_5BE: uint arg_5A5_0 = 1984994331u; while (true) { uint num; switch ((num = (arg_5A5_0 ^ 898338295u)) % 3u) { case 0u: goto IL_5BE; case 2u: ObjectManager.smethod_12(streamReader); arg_5A5_0 = (num * 2509285686u ^ 1928312965u); continue; } goto Block_10; } } Block_10:; } } Log.Message(LogType.Debug, Module.smethod_35<string>(2457428245u), new object[] { this.GameObjectSpawns.Count }); StreamReader streamReader2 = ObjectManager.smethod_7(ObjectManager.smethod_6(ObjectManager.smethod_5(), Module.smethod_37<string>(1782713009u))); try { while (true) { IL_942: uint arg_8E9_0 = ObjectManager.smethod_11(streamReader2) ? 1932786469u : 1436813079u; while (true) { uint num; switch ((num = (arg_8E9_0 ^ 898338295u)) % 15u) { case 0u: arg_8E9_0 = 1436813079u; continue; case 1u: { GameObject gameObject2; gameObject2.Flags = 0; arg_8E9_0 = (num * 2594108462u ^ 1925334862u); continue; } case 2u: arg_8E9_0 = (num * 3504691912u ^ 329545337u); continue; case 3u: { GameObject gameObject2; string[] array2; gameObject2.ExpansionRequired = int.Parse(ObjectManager.smethod_10(array2[8 + gameObject2.Data.Capacity], Module.smethod_33<string>(3031927268u), "")); arg_8E9_0 = (num * 1459362805u ^ 4010932252u); continue; } case 4u: { GameObject gameObject2; string[] array2; gameObject2.CastBarCaption = ObjectManager.smethod_10(array2[5], Module.smethod_37<string>(3974021651u), ""); arg_8E9_0 = (num * 3840120136u ^ 1217508012u); continue; } case 5u: { GameObject gameObject2; int num3; arg_8E9_0 = ((num3 >= gameObject2.Data.Capacity) ? 37102694u : 11895287u); continue; } case 6u: { int num3; num3++; arg_8E9_0 = (num * 161028676u ^ 4248176169u); continue; } case 7u: { GameObject gameObject2; string[] array2; int num3; gameObject2.Data.Add(int.Parse(ObjectManager.smethod_10(array2[8 + num3], Module.smethod_34<string>(1801001672u), ""))); arg_8E9_0 = 1726923679u; continue; } case 8u: { GameObject gameObject2; string[] array2; gameObject2.DisplayInfoId = int.Parse(ObjectManager.smethod_10(array2[2], Module.smethod_37<string>(3974021651u), "")); gameObject2.Name = ObjectManager.smethod_13(ObjectManager.smethod_10(array2[3], Module.smethod_33<string>(3031927268u), ""), Array.Empty<char>()); gameObject2.IconName = ObjectManager.smethod_10(array2[4], Module.smethod_35<string>(764625391u), ""); arg_8E9_0 = (num * 1458478346u ^ 2751135251u); continue; } case 9u: { int num3 = 0; arg_8E9_0 = (num * 2525264134u ^ 757837691u); continue; } case 10u: { string[] array2 = ObjectManager.smethod_9(ObjectManager.smethod_8(streamReader2), new char[] { ';' }); GameObject gameObject2 = new GameObject(); gameObject2.Id = int.Parse(ObjectManager.smethod_10(array2[0], Module.smethod_35<string>(764625391u), "")); gameObject2.Type = int.Parse(ObjectManager.smethod_10(array2[1], Module.smethod_34<string>(1801001672u), "")); arg_8E9_0 = 2074676599u; continue; } case 11u: goto IL_942; case 13u: { GameObject gameObject2; string[] array2; gameObject2.Unk = ObjectManager.smethod_10(array2[6], Module.smethod_33<string>(3031927268u), ""); gameObject2.Size = float.Parse(ObjectManager.smethod_10(array2[7], Module.smethod_33<string>(3031927268u), "")); arg_8E9_0 = (num * 802583443u ^ 1696953485u); continue; } case 14u: { GameObject gameObject2; this.GameObjects.Add(gameObject2.Id, gameObject2); arg_8E9_0 = (num * 209810929u ^ 601569456u); continue; } } goto Block_13; } } Block_13:; } finally { if (streamReader2 != null) { while (true) { IL_98B: uint arg_972_0 = 635919884u; while (true) { uint num; switch ((num = (arg_972_0 ^ 898338295u)) % 3u) { case 1u: ObjectManager.smethod_12(streamReader2); arg_972_0 = (num * 1668626149u ^ 3201008350u); continue; case 2u: goto IL_98B; } goto Block_17; } } Block_17:; } } Log.Message(LogType.Debug, Module.smethod_34<string>(3179387485u), new object[] { this.GameObjects.Count }); } private void LoadCreatureStats() { StreamReader streamReader = ObjectManager.smethod_7(ObjectManager.smethod_6(ObjectManager.smethod_5(), Module.smethod_33<string>(1670519287u))); try { while (true) { IL_46F: uint arg_3FE_0 = (!ObjectManager.smethod_11(streamReader)) ? 891516526u : 357099618u; while (true) { uint num; switch ((num = (arg_3FE_0 ^ 962500516u)) % 21u) { case 0u: { Creature creature; arg_3FE_0 = ((this.Creatures.ContainsKey(creature.Id) ? 3128584920u : 4227032504u) ^ num * 2908312957u); continue; } case 1u: { int num2; num2++; arg_3FE_0 = (num * 3760297338u ^ 761304653u); continue; } case 2u: { Creature creature; int num2; arg_3FE_0 = ((num2 >= creature.DisplayInfoId.Capacity) ? 1826714675u : 962217110u); continue; } case 3u: { Creature creature; int num3; arg_3FE_0 = ((num3 >= creature.Flag.Capacity) ? 178621674u : 1082107858u); continue; } case 4u: { Creature creature; this.Creatures.Add(creature.Id, creature); arg_3FE_0 = (num * 3320803128u ^ 971468011u); continue; } case 5u: { Creature creature; string[] array; creature.Type = int.Parse(ObjectManager.smethod_10(array[11], Module.smethod_37<string>(3974021651u), "")); arg_3FE_0 = (num * 322104996u ^ 1287243419u); continue; } case 6u: { string[] array = ObjectManager.smethod_9(ObjectManager.smethod_8(streamReader), new char[] { ';' }); Creature creature = new Creature(); creature.Id = int.Parse(ObjectManager.smethod_10(array[0], Module.smethod_33<string>(3031927268u), "")); arg_3FE_0 = 495850200u; continue; } case 7u: { Creature creature; string[] array; creature.PowerModifier = float.Parse(ObjectManager.smethod_10(array[21], Module.smethod_33<string>(3031927268u), "")); creature.RacialLeader = 0; arg_3FE_0 = (num * 3101138571u ^ 1476083757u); continue; } case 8u: { Creature creature; string[] array; creature.ExpansionRequired = int.Parse(ObjectManager.smethod_10(array[24], Module.smethod_35<string>(764625391u), "")); int num3 = 0; arg_3FE_0 = (num * 1465096509u ^ 1517737139u); continue; } case 9u: { Creature creature; string[] array; creature.Name = ObjectManager.smethod_10(array[1], Module.smethod_35<string>(764625391u), ""); arg_3FE_0 = (num * 2108520970u ^ 2443991076u); continue; } case 11u: { int num2 = 0; arg_3FE_0 = (num * 713364425u ^ 63404157u); continue; } case 12u: { Creature creature; string[] array; creature.HealthModifier = float.Parse(ObjectManager.smethod_10(array[20], Module.smethod_36<string>(1708679815u), "")); arg_3FE_0 = (num * 3886034994u ^ 240629416u); continue; } case 13u: { Creature creature; int num2; string[] array; creature.DisplayInfoId.Add(int.Parse(ObjectManager.smethod_10(array[16 + num2], Module.smethod_35<string>(764625391u), ""))); arg_3FE_0 = 781590967u; continue; } case 14u: { Creature creature; int num3; string[] array; creature.Flag.Add(uint.Parse(ObjectManager.smethod_10(array[9 + num3], Module.smethod_37<string>(3974021651u), ""))); num3++; arg_3FE_0 = 339349203u; continue; } case 15u: { Creature creature; string[] array; creature.Family = int.Parse(ObjectManager.smethod_10(array[12], Module.smethod_37<string>(3974021651u), "")); arg_3FE_0 = (num * 3084234110u ^ 2956493402u); continue; } case 16u: goto IL_46F; case 17u: arg_3FE_0 = 891516526u; continue; case 18u: { Creature creature; string[] array; creature.MovementInfoId = int.Parse(ObjectManager.smethod_10(array[23], Module.smethod_33<string>(3031927268u), "")); arg_3FE_0 = (num * 3054748301u ^ 309845739u); continue; } case 19u: { Creature creature; string[] array; creature.SubName = ObjectManager.smethod_10(array[27], Module.smethod_36<string>(1708679815u), ""); creature.IconName = ObjectManager.smethod_10(array[29], Module.smethod_36<string>(1708679815u), ""); arg_3FE_0 = (num * 652892886u ^ 1126547174u); continue; } case 20u: { Creature creature; string[] array; creature.Rank = int.Parse(ObjectManager.smethod_10(array[13], Module.smethod_34<string>(1801001672u), "")); arg_3FE_0 = (num * 3944529478u ^ 4069980401u); continue; } } goto Block_6; } } Block_6:; } finally { if (streamReader != null) { while (true) { IL_4B5: uint arg_49C_0 = 1353314390u; while (true) { uint num; switch ((num = (arg_49C_0 ^ 962500516u)) % 3u) { case 1u: ObjectManager.smethod_12(streamReader); arg_49C_0 = (num * 3941676610u ^ 3949420580u); continue; case 2u: goto IL_4B5; } goto Block_10; } } Block_10:; } } Log.Message(LogType.Debug, Module.smethod_33<string>(142857120u), new object[] { this.Creatures.Count }); } public WorldObject FindObject(ulong guid) { using (Dictionary<ulong, WorldObject>.Enumerator enumerator = this.objectList.GetEnumerator()) { WorldObject value; while (true) { IL_9B: uint arg_6B_0 = (!enumerator.MoveNext()) ? 2960130776u : 3644716465u; while (true) { uint num; switch ((num = (arg_6B_0 ^ 4131174034u)) % 6u) { case 0u: arg_6B_0 = 3644716465u; continue; case 1u: goto IL_A9; case 2u: goto IL_9B; case 3u: { KeyValuePair<ulong, WorldObject> current = enumerator.Current; arg_6B_0 = ((current.Key != guid) ? 3522449388u : 2492948935u); continue; } case 5u: { KeyValuePair<ulong, WorldObject> current; value = current.Value; arg_6B_0 = (num * 240380306u ^ 4243008403u); continue; } } goto Block_4; } } Block_4: goto IL_AB; IL_A9: return value; IL_AB:; } return null; } public void SetPosition(ref Character pChar, Vector4 vector, bool dbUpdate = true) { pChar.Position = vector; while (true) { IL_5B: uint arg_43_0 = 3964324102u; while (true) { uint num; switch ((num = (arg_43_0 ^ 2893124303u)) % 3u) { case 1u: Manager.WorldMgr.Sessions2[0uL].Character = pChar; this.SavePositionToDB(pChar); arg_43_0 = (num * 596668322u ^ 2830923776u); continue; case 2u: goto IL_5B; } return; } } } public void SetMap(ref Character pChar, uint mapId, bool dbUpdate = true) { pChar.Map = mapId; Manager.WorldMgr.Sessions2[0uL].Character = pChar; this.SavePositionToDB(pChar); } public void SetZone(ref Character pChar, uint zoneId, bool dbUpdate = true) { pChar.Zone = zoneId; Manager.WorldMgr.Sessions2[0uL].Character = pChar; this.SaveZoneToDB(pChar); } public void SaveChar(Character pChar) { int num = 0; while (true) { IL_11D: uint arg_EC_0 = 726814213u; while (true) { uint num2; switch ((num2 = (arg_EC_0 ^ 1466069075u)) % 9u) { case 0u: arg_EC_0 = ((num >= Manager.WorldMgr.CharaterList.Count) ? 449547290u : 1272737857u); continue; case 1u: ObjectManager.smethod_15(ObjectManager.smethod_14(Helper.DataDirectory(), Module.smethod_33<string>(1012059880u)), Json.CreateString<List<Character>>(Manager.WorldMgr.CharaterList)); arg_EC_0 = 261035639u; continue; case 2u: arg_EC_0 = (num2 * 2731361459u ^ 4159068288u); continue; case 3u: Manager.WorldMgr.CharaterList[num] = pChar; arg_EC_0 = (num2 * 1479547532u ^ 1044054354u); continue; case 5u: num++; arg_EC_0 = 181286562u; continue; case 6u: goto IL_11D; case 7u: arg_EC_0 = (num2 * 1115401797u ^ 332474851u); continue; case 8u: arg_EC_0 = ((Manager.WorldMgr.CharaterList[num].Guid == pChar.Guid) ? 1009204976u : 202502060u); continue; } return; } } } public void SavePositionToDB(Character pChar) { int num = 0; while (true) { IL_F0: uint arg_C4_0 = 4203615896u; while (true) { uint num2; switch ((num2 = (arg_C4_0 ^ 4171363183u)) % 8u) { case 0u: Manager.WorldMgr.CharaterList[num].Position = pChar.Position; arg_C4_0 = (num2 * 1671861827u ^ 3331856394u); continue; case 1u: arg_C4_0 = ((Manager.WorldMgr.CharaterList[num].Guid != pChar.Guid) ? 4002925572u : 3969543359u); continue; case 3u: num++; arg_C4_0 = 2804824219u; continue; case 4u: arg_C4_0 = ((num >= Manager.WorldMgr.CharaterList.Count) ? 2428345285u : 2871598926u); continue; case 5u: arg_C4_0 = (num2 * 3807632820u ^ 4028535809u); continue; case 6u: goto IL_F0; case 7u: arg_C4_0 = (num2 * 40449732u ^ 2689799047u); continue; } goto Block_3; } } Block_3: ObjectManager.smethod_15(ObjectManager.smethod_14(Helper.DataDirectory(), Module.smethod_36<string>(2576790355u)), Json.CreateString<List<Character>>(Manager.WorldMgr.CharaterList)); } public void SaveZoneToDB(Character pChar) { ObjectManager.smethod_15(ObjectManager.smethod_14(Helper.DataDirectory(), Module.smethod_35<string>(205105435u)), Json.CreateString<List<Character>>(Manager.WorldMgr.CharaterList)); } static Assembly smethod_5() { return Assembly.GetExecutingAssembly(); } static Stream smethod_6(Assembly assembly_0, string string_0) { return assembly_0.GetManifestResourceStream(string_0); } static StreamReader smethod_7(Stream stream_0) { return new StreamReader(stream_0); } static string smethod_8(TextReader textReader_0) { return textReader_0.ReadLine(); } static string[] smethod_9(string string_0, char[] char_0) { return string_0.Split(char_0); } static string smethod_10(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static bool smethod_11(StreamReader streamReader_0) { return streamReader_0.EndOfStream; } static void smethod_12(IDisposable idisposable_0) { idisposable_0.Dispose(); } static string smethod_13(string string_0, char[] char_0) { return string_0.TrimStart(char_0); } static string smethod_14(string string_0, string string_1) { return string_0 + string_1; } static void smethod_15(string string_0, string string_1) { File.WriteAllText(string_0, string_1); } } } <file_sep>/Google.Protobuf.Compatibility/PropertyInfoExtensions.cs using System; using System.Reflection; namespace Google.Protobuf.Compatibility { internal static class PropertyInfoExtensions { internal static MethodInfo GetGetMethod(this PropertyInfo target) { MethodInfo methodInfo = PropertyInfoExtensions.smethod_0(target); if (methodInfo != null) { while (true) { IL_54: uint arg_38_0 = 1494271457u; while (true) { uint num; switch ((num = (arg_38_0 ^ 484998251u)) % 4u) { case 0u: goto IL_54; case 2u: arg_38_0 = (((!PropertyInfoExtensions.smethod_1(methodInfo)) ? 3432170434u : 2262786992u) ^ num * 3783810197u); continue; case 3u: goto IL_5D; } return methodInfo; } } return methodInfo; } IL_5D: return null; } internal static MethodInfo GetSetMethod(this PropertyInfo target) { MethodInfo methodInfo = PropertyInfoExtensions.smethod_2(target); while (true) { IL_79: uint arg_59_0 = 2129891743u; while (true) { uint num; switch ((num = (arg_59_0 ^ 1115668176u)) % 5u) { case 1u: arg_59_0 = (((methodInfo == null) ? 1077691168u : 1214720016u) ^ num * 1832542328u); continue; case 2u: goto IL_79; case 3u: goto IL_82; case 4u: arg_59_0 = ((PropertyInfoExtensions.smethod_1(methodInfo) ? 289477862u : 1433665736u) ^ num * 1747856828u); continue; } return methodInfo; } } return methodInfo; IL_82: return null; } static MethodInfo smethod_0(PropertyInfo propertyInfo_0) { return propertyInfo_0.GetMethod; } static bool smethod_1(MethodBase methodBase_0) { return methodBase_0.IsPublic; } static MethodInfo smethod_2(PropertyInfo propertyInfo_0) { return propertyInfo_0.SetMethod; } } } <file_sep>/AuthServer.AuthServer.Packets.BnetHandlers/GameUtilitiesService.cs using AuthServer.AuthServer.Attributes; using AuthServer.AuthServer.JsonObjects; using AuthServer.Network; using Bgs.Protocol; using Bgs.Protocol.GameUtilities.V1; using Framework.Constants.Net; using Framework.Misc; using Framework.Serialization; using Google.Protobuf; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; using System.Runtime.CompilerServices; using System.Security.Cryptography; using System.Text; namespace AuthServer.AuthServer.Packets.BnetHandlers { [BnetService(BnetServiceHash.GameUtilitiesService)] public class GameUtilitiesService : BnetServiceBase { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameUtilitiesService.__c __9 = new GameUtilitiesService.__c(); public static Func<int, byte> __9__0_0; internal byte HandleClientRequestb__0_0(int x) { return GameUtilitiesService.__c.smethod_0(x); } static byte smethod_0(int int_0) { return Convert.ToByte(int_0); } } [BnetServiceBase.BnetMethodAttribute(1u)] public static void HandleClientRequest(AuthSession session, ClientRequest clientRequest) { string name; ClientResponse clientResponse; if (GameUtilitiesService.smethod_0(clientRequest.Attribute[0].Name, Module.smethod_37<string>(1549087768u))) { IEnumerator<Bgs.Protocol.Attribute> enumerator = clientRequest.Attribute.GetEnumerator(); try { while (true) { IL_156: uint arg_11E_0 = GameUtilitiesService.smethod_2(enumerator) ? 707215618u : 982195081u; while (true) { uint num; switch ((num = (arg_11E_0 ^ 1820510042u)) % 7u) { case 0u: arg_11E_0 = 707215618u; continue; case 1u: goto IL_156; case 2u: { Bgs.Protocol.Attribute current = enumerator.Current; arg_11E_0 = (GameUtilitiesService.smethod_0(current.Name, Module.smethod_35<string>(2108436570u)) ? 1292263614u : 39044470u); continue; } case 3u: { Bgs.Protocol.Attribute current; IEnumerable<int> arg_C7_0 = Json.CreateObject<RealmListTicketClientInformation>(GameUtilitiesService.smethod_1(current.Value.BlobValue.ToStringUtf8(), Module.smethod_34<string>(607107096u), "")).Info.Secret; Func<int, byte> arg_C7_1; if ((arg_C7_1 = GameUtilitiesService.__c.__9__0_0) == null) { arg_C7_1 = (GameUtilitiesService.__c.__9__0_0 = new Func<int, byte>(GameUtilitiesService.__c.__9.HandleClientRequestb__0_0)); } Globals.Secret = arg_C7_0.Select(arg_C7_1).ToArray<byte>(); arg_11E_0 = 1388634718u; continue; } case 4u: arg_11E_0 = (num * 3357184604u ^ 1408942728u); continue; case 6u: { Bgs.Protocol.Attribute current; GameUtilitiesService.smethod_0(current.Name, ""); arg_11E_0 = 390289400u; continue; } } goto Block_10; } } Block_10:; } finally { if (enumerator != null) { while (true) { IL_19C: uint arg_183_0 = 1000108845u; while (true) { uint num; switch ((num = (arg_183_0 ^ 1820510042u)) % 3u) { case 0u: goto IL_19C; case 2u: GameUtilitiesService.smethod_3(enumerator); arg_183_0 = (num * 2856457603u ^ 3035350054u); continue; } goto Block_14; } } Block_14:; } } name = Module.smethod_35<string>(1450915626u); clientResponse = new ClientResponse(); goto IL_205; } goto IL_6F3; uint arg_682_0; while (true) { IL_67D: uint num; switch ((num = (arg_682_0 ^ 1820510042u)) % 21u) { case 0u: { ClientResponse message = new ClientResponse(); arg_682_0 = (num * 1960178030u ^ 3375314732u); continue; } case 1u: clientResponse.Attribute.Add(new Bgs.Protocol.Attribute { Name = name, Value = new Variant { BlobValue = ByteString.CopyFromUtf8(Module.smethod_36<string>(2871343933u)) } }); session.Send(clientResponse); arg_682_0 = (num * 2849486171u ^ 3438062413u); continue; case 2u: { ClientResponse clientResponse2 = new ClientResponse(); arg_682_0 = (num * 1708365464u ^ 846537027u); continue; } case 3u: { ClientResponse clientResponse3; clientResponse3.Attribute.Add(new Bgs.Protocol.Attribute { Name = Module.smethod_35<string>(1814716925u), Value = new Variant { BlobValue = ByteString.CopyFromUtf8(Module.smethod_34<string>(904052351u)) } }); RealmListServerIPAddresses realmListServerIPAddresses = new RealmListServerIPAddresses(); arg_682_0 = (num * 1691718091u ^ 3467647916u); continue; } case 4u: { RealmListServerIPAddresses realmListServerIPAddresses; realmListServerIPAddresses.Families.Add(new Family { Id = 2, Addresses = new List<AuthServer.AuthServer.JsonObjects.Address>() }); arg_682_0 = (num * 78695267u ^ 2554691107u); continue; } case 5u: arg_682_0 = (GameUtilitiesService.smethod_0(clientRequest.Attribute[0].Name, Module.smethod_33<string>(3445444445u)) ? 1552249222u : 2080562207u); continue; case 6u: return; case 7u: { ClientResponse clientResponse3; RealmListServerIPAddresses realmListServerIPAddresses; clientResponse3.Attribute.Add(new Bgs.Protocol.Attribute { Name = Module.smethod_35<string>(2074000899u), Value = new Variant { BlobValue = ByteString.CopyFrom(GameUtilitiesService.GetCompressedData(Module.smethod_35<string>(2339801210u), Json.CreateString<RealmListServerIPAddresses>(realmListServerIPAddresses))) } }); clientResponse3.Attribute.Add(new Bgs.Protocol.Attribute { Name = Module.smethod_33<string>(2686709168u), Value = new Variant { BlobValue = ByteString.CopyFrom(Globals.JoinSecret) } }); session.Send(clientResponse3); arg_682_0 = (num * 1149426949u ^ 1180628059u); continue; } case 8u: { ClientResponse clientResponse2; session.Send(clientResponse2); arg_682_0 = (num * 3033014184u ^ 922385703u); continue; } case 9u: return; case 10u: { RealmListServerIPAddresses realmListServerIPAddresses; realmListServerIPAddresses.Families = new List<Family>(); arg_682_0 = (num * 3674508602u ^ 631681376u); continue; } case 11u: { ClientResponse clientResponse2; RealmListUpdates realmListUpdates; clientResponse2.Attribute.Add(new Bgs.Protocol.Attribute { Name = Module.smethod_33<string>(2409987499u), Value = new Variant { BlobValue = ByteString.CopyFrom(GameUtilitiesService.GetCompressedData(Module.smethod_36<string>(966958691u), Json.CreateString<RealmListUpdates>(realmListUpdates))) } }); RealmCharacterCountList dataObject = new RealmCharacterCountList(); clientResponse2.Attribute.Add(new Bgs.Protocol.Attribute { Name = Module.smethod_36<string>(4040564189u), Value = new Variant { BlobValue = ByteString.CopyFrom(GameUtilitiesService.GetCompressedData(Module.smethod_33<string>(2576241685u), Json.CreateString<RealmCharacterCountList>(dataObject))) } }); arg_682_0 = (num * 716287039u ^ 3546797012u); continue; } case 12u: { RealmListUpdates realmListUpdates = new RealmListUpdates(); realmListUpdates.Updates = new List<RealmListUpdate> { new RealmListUpdate { WowRealmAddress = 1u, Update = new Update { WowRealmAddress = 1, CfgTimezonesID = 2, PopulationState = 1, CfgCategoriesID = 1, Version = new ClientVersion { Major = 7, Minor = 1, Revision = 0, Build = 22996 }, CfgRealmsID = 1, Flags = 4, CfgConfigsID = 1, CfgLanguagesID = 1, Name = Module.smethod_36<string>(4208195762u) } } }; arg_682_0 = (num * 2759149309u ^ 1324415408u); continue; } case 13u: { RealmListServerIPAddresses realmListServerIPAddresses; realmListServerIPAddresses.Families.Add(new Family { Id = 1, Addresses = new List<AuthServer.AuthServer.JsonObjects.Address> { new AuthServer.AuthServer.JsonObjects.Address { Ip = Module.smethod_33<string>(1362828071u), Port = 8085 } } }); arg_682_0 = (num * 2455873529u ^ 3627955475u); continue; } case 14u: { ClientResponse message; session.Send(message); arg_682_0 = (num * 1672891969u ^ 1215791913u); continue; } case 16u: { Globals.JoinSecret = new byte[0].GenerateRandomKey(32); SHA256Managed expr_226 = GameUtilitiesService.smethod_4(); GameUtilitiesService.smethod_5(expr_226, Globals.Secret, 0, Globals.Secret.Length, Globals.Secret, 0); GameUtilitiesService.smethod_6(expr_226, Globals.JoinSecret, 0, Globals.JoinSecret.Length); Globals.SessionKey = GameUtilitiesService.smethod_7(expr_226); ClientResponse clientResponse3 = new ClientResponse(); arg_682_0 = (num * 181368554u ^ 2569788186u); continue; } case 17u: goto IL_205; case 18u: return; case 19u: arg_682_0 = ((!GameUtilitiesService.smethod_0(clientRequest.Attribute[0].Name, Module.smethod_36<string>(2188320489u))) ? 1384141042u : 1913633765u); continue; case 20u: goto IL_6F3; } break; } return; IL_205: arg_682_0 = 513478610u; goto IL_67D; IL_6F3: arg_682_0 = ((!GameUtilitiesService.smethod_0(clientRequest.Attribute[0].Name, Module.smethod_35<string>(2192477891u))) ? 1776235731u : 1794780940u); goto IL_67D; } public static byte[] GetCompressedData(string name, string data) { byte[] expr_25 = GameUtilitiesService.smethod_10(GameUtilitiesService.smethod_8(), GameUtilitiesService.smethod_9(name, Module.smethod_35<string>(2164558557u), data, Module.smethod_37<string>(3157143760u))); byte[] second = GameUtilitiesService.Compress(expr_25, CompressionLevel.Fastest); IEnumerable<byte> second2 = GameUtilitiesService.smethod_11(GameUtilitiesService.Adler32_Default(expr_25)).Reverse<byte>(); return GameUtilitiesService.smethod_12(expr_25.Length).Concat(new byte[] { 120, 156 }).Concat(second).Concat(second2).ToArray<byte>(); } public static uint Adler32_Default(byte[] data) { uint num = 1u; uint num3; while (true) { IL_A3: uint arg_7B_0 = 1102937597u; while (true) { uint num2; switch ((num2 = (arg_7B_0 ^ 500557560u)) % 7u) { case 1u: num3 = 0u; arg_7B_0 = (num2 * 1616695776u ^ 4202125215u); continue; case 2u: { int num4; arg_7B_0 = ((num4 < data.Length) ? 1771880901u : 278308620u); continue; } case 3u: { int num4; num = (num + (uint)data[num4]) % 65521u; arg_7B_0 = 1663332107u; continue; } case 4u: goto IL_A3; case 5u: { int num4 = 0; arg_7B_0 = (num2 * 2756776724u ^ 4207301681u); continue; } case 6u: { num3 = (num3 + num) % 65521u; int num4; num4++; arg_7B_0 = (num2 * 3491861519u ^ 1026351232u); continue; } } goto Block_2; } } Block_2: return (num3 << 16) + num; } [BnetServiceBase.BnetMethodAttribute(10u)] public static void HandleGetAllValuesForAttributeRequest(AuthSession session, GetAllValuesForAttributeRequest getAllValuesForAttributeRequest) { if (GameUtilitiesService.smethod_0(getAllValuesForAttributeRequest.AttributeKey, Module.smethod_34<string>(1676619706u))) { while (true) { IL_99: uint arg_79_0 = 2982734585u; while (true) { uint num; switch ((num = (arg_79_0 ^ 4261002523u)) % 5u) { case 0u: goto IL_99; case 2u: { GetAllValuesForAttributeResponse getAllValuesForAttributeResponse; getAllValuesForAttributeResponse.AttributeValue.Add(new Variant { StringValue = Module.smethod_34<string>(3567087365u) }); arg_79_0 = (num * 326043060u ^ 433382969u); continue; } case 3u: { GetAllValuesForAttributeResponse getAllValuesForAttributeResponse = new GetAllValuesForAttributeResponse(); arg_79_0 = (num * 1354836642u ^ 4091919859u); continue; } case 4u: { GetAllValuesForAttributeResponse getAllValuesForAttributeResponse; session.Send(getAllValuesForAttributeResponse); arg_79_0 = (num * 122349368u ^ 2297805052u); continue; } } goto Block_2; } } Block_2:; } } private static byte[] Compress(byte[] data, CompressionLevel level) { MemoryStream memoryStream = GameUtilitiesService.smethod_13(); byte[] result; try { DeflateStream deflateStream = GameUtilitiesService.smethod_14(memoryStream, level); try { GameUtilitiesService.smethod_15(deflateStream, data, 0, data.Length); GameUtilitiesService.smethod_16(deflateStream); } finally { if (deflateStream != null) { while (true) { IL_56: uint arg_3E_0 = 3412742121u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 3721170959u)) % 3u) { case 0u: goto IL_56; case 2u: GameUtilitiesService.smethod_3(deflateStream); arg_3E_0 = (num * 3870129308u ^ 1831973755u); continue; } goto Block_7; } } Block_7:; } } result = GameUtilitiesService.smethod_17(memoryStream); } finally { if (memoryStream != null) { while (true) { IL_9C: uint arg_84_0 = 3135978255u; while (true) { uint num; switch ((num = (arg_84_0 ^ 3721170959u)) % 3u) { case 1u: GameUtilitiesService.smethod_3(memoryStream); arg_84_0 = (num * 2134525440u ^ 387129097u); continue; case 2u: goto IL_9C; } goto Block_10; } } Block_10:; } } return result; } static bool smethod_0(string string_0, string string_1) { return string_0 == string_1; } static string smethod_1(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static bool smethod_2(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_3(IDisposable idisposable_0) { idisposable_0.Dispose(); } static SHA256Managed smethod_4() { return new SHA256Managed(); } static int smethod_5(HashAlgorithm hashAlgorithm_0, byte[] byte_0, int int_0, int int_1, byte[] byte_1, int int_2) { return hashAlgorithm_0.TransformBlock(byte_0, int_0, int_1, byte_1, int_2); } static byte[] smethod_6(HashAlgorithm hashAlgorithm_0, byte[] byte_0, int int_0, int int_1) { return hashAlgorithm_0.TransformFinalBlock(byte_0, int_0, int_1); } static byte[] smethod_7(HashAlgorithm hashAlgorithm_0) { return hashAlgorithm_0.Hash; } static Encoding smethod_8() { return Encoding.UTF8; } static string smethod_9(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static byte[] smethod_10(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static byte[] smethod_11(uint uint_0) { return BitConverter.GetBytes(uint_0); } static byte[] smethod_12(int int_0) { return BitConverter.GetBytes(int_0); } static MemoryStream smethod_13() { return new MemoryStream(); } static DeflateStream smethod_14(Stream stream_0, CompressionLevel compressionLevel_0) { return new DeflateStream(stream_0, compressionLevel_0); } static void smethod_15(Stream stream_0, byte[] byte_0, int int_0, int int_1) { stream_0.Write(byte_0, int_0, int_1); } static void smethod_16(Stream stream_0) { stream_0.Flush(); } static byte[] smethod_17(MemoryStream memoryStream_0) { return memoryStream_0.ToArray(); } } } <file_sep>/Bgs.Protocol.Profanity.V1/WordFilters.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Profanity.V1 { [DebuggerNonUserCode] public sealed class WordFilters : IMessage<WordFilters>, IEquatable<WordFilters>, IDeepCloneable<WordFilters>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly WordFilters.__c __9 = new WordFilters.__c(); internal WordFilters cctor>b__24_0() { return new WordFilters(); } } private static readonly MessageParser<WordFilters> _parser = new MessageParser<WordFilters>(new Func<WordFilters>(WordFilters.__c.__9.<.cctor>b__24_0)); public const int FiltersFieldNumber = 1; private static readonly FieldCodec<WordFilter> _repeated_filters_codec; private readonly RepeatedField<WordFilter> filters_ = new RepeatedField<WordFilter>(); public static MessageParser<WordFilters> Parser { get { return WordFilters._parser; } } public static MessageDescriptor Descriptor { get { return ProfanityFilterConfigReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return WordFilters.Descriptor; } } public RepeatedField<WordFilter> Filters { get { return this.filters_; } } public WordFilters() { } public WordFilters(WordFilters other) : this() { this.filters_ = other.filters_.Clone(); } public WordFilters Clone() { return new WordFilters(this); } public override bool Equals(object other) { return this.Equals(other as WordFilters); } public bool Equals(WordFilters other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1115541321) % 7) { case 0: goto IL_7A; case 1: return true; case 2: goto IL_3E; case 3: return false; case 5: arg_48_0 = (this.filters_.Equals(other.filters_) ? -1725088462 : -13371710); continue; case 6: return false; } break; } return true; IL_3E: arg_48_0 = -1517274203; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -2123226772 : -800374707); goto IL_43; } public override int GetHashCode() { return 1 ^ WordFilters.smethod_0(this.filters_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.filters_.WriteTo(output, WordFilters._repeated_filters_codec); } public int CalculateSize() { return 0 + this.filters_.CalculateSize(WordFilters._repeated_filters_codec); } public void MergeFrom(WordFilters other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -1569284894; IL_08: switch ((arg_0D_0 ^ -1589129547) % 4) { case 0: IL_27: this.filters_.Add(other.filters_); arg_0D_0 = -628317384; goto IL_08; case 2: goto IL_03; case 3: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) != 0u) ? 4002328322u : 4267310479u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 2467492241u)) % 6u) { case 0u: input.SkipLastField(); arg_68_0 = (num2 * 1325105898u ^ 4051839146u); continue; case 1u: goto IL_9B; case 2u: arg_68_0 = 4002328322u; continue; case 3u: arg_68_0 = ((num == 10u) ? 4087960464u : 3183044381u); continue; case 5u: this.filters_.AddEntriesFrom(input, WordFilters._repeated_filters_codec); arg_68_0 = 4279016274u; continue; } return; } } } static WordFilters() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 436654320u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 1731123610u)) % 3u) { case 1u: WordFilters._repeated_filters_codec = FieldCodec.ForMessage<WordFilter>(10u, WordFilter.Parser); arg_3F_0 = (num * 2721993810u ^ 2719931944u); continue; case 2u: goto IL_57; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants.Misc/LogType.cs using System; namespace Framework.Constants.Misc { [Flags] public enum LogType { None = 0, Init = 1, Normal = 2, Error = 4, Debug = 8, Packet = 16, Database = 32, Info = 64 } } <file_sep>/Google.Protobuf.Reflection/OneofDescriptor.cs using Google.Protobuf.Compatibility; using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Reflection; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class OneofDescriptor : DescriptorBase { private readonly OneofDescriptorProto proto; private MessageDescriptor containingType; private IList<FieldDescriptor> fields; private readonly OneofAccessor accessor; public override string Name { get { return this.proto.Name; } } public MessageDescriptor ContainingType { get { return this.containingType; } } public IList<FieldDescriptor> Fields { get { return this.fields; } } public OneofAccessor Accessor { get { return this.accessor; } } internal OneofDescriptor(OneofDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string clrName) : base(file, file.ComputeFullName(parent, proto.Name), index) { while (true) { IL_63: uint arg_47_0 = 2329051274u; while (true) { uint num; switch ((num = (arg_47_0 ^ 3026981471u)) % 4u) { case 0u: goto IL_63; case 1u: this.proto = proto; arg_47_0 = (num * 378117375u ^ 1534672859u); continue; case 3u: this.containingType = parent; arg_47_0 = (num * 4267417022u ^ 3727843631u); continue; } goto Block_1; } } Block_1: file.DescriptorPool.AddSymbol(this); this.accessor = this.CreateAccessor(clrName); } internal void CrossLink() { List<FieldDescriptor> list = new List<FieldDescriptor>(); IEnumerator<FieldDescriptor> enumerator = this.ContainingType.Fields.InDeclarationOrder().GetEnumerator(); try { while (true) { IL_A4: uint arg_78_0 = OneofDescriptor.smethod_0(enumerator) ? 645945303u : 1779362706u; while (true) { uint num; switch ((num = (arg_78_0 ^ 1929289758u)) % 5u) { case 0u: { FieldDescriptor current; list.Add(current); arg_78_0 = (num * 2160487366u ^ 3013554972u); continue; } case 1u: goto IL_A4; case 2u: arg_78_0 = 645945303u; continue; case 3u: { FieldDescriptor current = enumerator.Current; arg_78_0 = ((current.ContainingOneof != this) ? 607704728u : 324701640u); continue; } } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_E8: uint arg_D0_0 = 327623526u; while (true) { uint num; switch ((num = (arg_D0_0 ^ 1929289758u)) % 3u) { case 1u: OneofDescriptor.smethod_1(enumerator); arg_D0_0 = (num * 1913406752u ^ 3932505543u); continue; case 2u: goto IL_E8; } goto Block_8; } } Block_8:; } } this.fields = new ReadOnlyCollection<FieldDescriptor>(list); } private OneofAccessor CreateAccessor(string clrName) { PropertyInfo property = this.containingType.ClrType.GetProperty(OneofDescriptor.smethod_2(clrName, Module.smethod_33<string>(199749746u))); if (property == null) { goto IL_4A; } goto IL_7B; uint arg_54_0; MethodInfo method; while (true) { IL_4F: uint num; switch ((num = (arg_54_0 ^ 270247863u)) % 6u) { case 0u: goto IL_4A; case 1u: goto IL_7B; case 3u: goto IL_A3; case 4u: arg_54_0 = (((method == null) ? 2794963222u : 2408756909u) ^ num * 4080221847u); continue; case 5u: goto IL_D1; } break; } goto IL_FF; IL_A3: throw new DescriptorValidationException(this, OneofDescriptor.smethod_3(Module.smethod_35<string>(403167680u), new object[] { clrName, this.containingType.ClrType })); IL_D1: throw new DescriptorValidationException(this, OneofDescriptor.smethod_3(Module.smethod_36<string>(3684424959u), new object[] { clrName, this.containingType.ClrType })); IL_FF: return new OneofAccessor(property, method, this); IL_4A: arg_54_0 = 334375866u; goto IL_4F; IL_7B: method = this.containingType.ClrType.GetMethod(OneofDescriptor.smethod_2(Module.smethod_33<string>(2372756646u), clrName)); arg_54_0 = 2031678099u; goto IL_4F; } static bool smethod_0(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_1(IDisposable idisposable_0) { idisposable_0.Dispose(); } static string smethod_2(string string_0, string string_1) { return string_0 + string_1; } static string smethod_3(string string_0, object[] object_0) { return string.Format(string_0, object_0); } } } <file_sep>/Bgs.Protocol.Report.V1/ReportServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Report.V1 { [DebuggerNonUserCode] public static class ReportServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ReportServiceReflection.descriptor; } } static ReportServiceReflection() { ReportServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(ReportServiceReflection.smethod_1(ReportServiceReflection.smethod_0(new string[] { Module.smethod_35<string>(2533459598u), Module.smethod_33<string>(838843411u), Module.smethod_34<string>(435782033u), Module.smethod_36<string>(1309618126u), Module.smethod_33<string>(1759092675u), Module.smethod_34<string>(60835585u), Module.smethod_33<string>(3599591203u), Module.smethod_36<string>(4029972366u), Module.smethod_34<string>(2481070641u), Module.smethod_37<string>(3300849746u), Module.smethod_33<string>(1963278691u), Module.smethod_37<string>(203804914u), Module.smethod_35<string>(3233142862u), Module.smethod_37<string>(1401727378u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ReportServiceReflection.smethod_2(typeof(Report).TypeHandle), Report.Parser, new string[] { Module.smethod_37<string>(2775008760u), Module.smethod_33<string>(4205493237u), Module.smethod_36<string>(3387350928u), Module.smethod_37<string>(4148231200u), Module.smethod_33<string>(218315834u), Module.smethod_34<string>(3710393108u) }, null, null, null), new GeneratedCodeInfo(ReportServiceReflection.smethod_2(typeof(SendReportRequest).TypeHandle), SendReportRequest.Parser, new string[] { Module.smethod_33<string>(2282672389u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/ObjectFields.cs using System; public enum ObjectFields { Guid, Data = 4, Type = 8, EntryID, DynamicFlags, Scale, End } <file_sep>/Google.Protobuf.WellKnownTypes/WrappersReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class WrappersReflection { private static FileDescriptor descriptor; internal const int WrapperValueFieldNumber = 1; public static FileDescriptor Descriptor { get { return WrappersReflection.descriptor; } } static WrappersReflection() { WrappersReflection.descriptor = FileDescriptor.FromGeneratedCode(WrappersReflection.smethod_1(WrappersReflection.smethod_0(new string[] { Module.smethod_33<string>(3498100495u), Module.smethod_36<string>(82315314u), Module.smethod_33<string>(21289455u), Module.smethod_33<string>(123382463u), Module.smethod_36<string>(3601715618u), Module.smethod_34<string>(738335309u), Module.smethod_36<string>(475968578u), Module.smethod_33<string>(3193233663u), Module.smethod_33<string>(636671887u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(DoubleValue).TypeHandle), DoubleValue.Parser, new string[] { Module.smethod_33<string>(3388245550u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(FloatValue).TypeHandle), FloatValue.Parser, new string[] { Module.smethod_35<string>(1515047581u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(Int64Value).TypeHandle), Int64Value.Parser, new string[] { Module.smethod_36<string>(994248421u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(UInt64Value).TypeHandle), UInt64Value.Parser, new string[] { Module.smethod_35<string>(1515047581u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(Int32Value).TypeHandle), Int32Value.Parser, new string[] { Module.smethod_33<string>(3388245550u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(UInt32Value).TypeHandle), UInt32Value.Parser, new string[] { Module.smethod_37<string>(1696359745u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(BoolValue).TypeHandle), BoolValue.Parser, new string[] { Module.smethod_34<string>(1800026606u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(StringValue).TypeHandle), StringValue.Parser, new string[] { Module.smethod_33<string>(3388245550u) }, null, null, null), new GeneratedCodeInfo(WrappersReflection.smethod_2(typeof(BytesValue).TypeHandle), BytesValue.Parser, new string[] { Module.smethod_35<string>(1515047581u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Network.Packets/PacketWriter.cs using Framework.Constants; using Framework.Constants.Net; using Framework.ObjectDefines; using System; using System.Collections; using System.IO; using System.Linq; using System.Text; namespace Framework.Network.Packets { public class PacketWriter : BinaryWriter { public ServerMessage Opcode { get; set; } public uint Size { get; set; } public PacketWriter() : base(PacketWriter.smethod_0()) { } public PacketWriter(ServerMessage message, bool isWorldPacket = true) : base(PacketWriter.smethod_0()) { this.WritePacketHeader(message, isWorldPacket); } protected void WritePacketHeader(ServerMessage opcode, bool isWorldPacket = true) { this.Opcode = opcode; if (!isWorldPacket) { goto IL_0A; } goto IL_4A; uint arg_2A_0; while (true) { IL_25: uint num; switch ((num = (arg_2A_0 ^ 2379351063u)) % 5u) { case 0u: this.WriteUInt16((ushort)opcode); arg_2A_0 = (num * 1189220124u ^ 2296128722u); continue; case 1u: goto IL_58; case 2u: goto IL_4A; case 3u: goto IL_0A; } break; } return; IL_58: this.WriteUInt32(0u); this.WriteUInt16((ushort)opcode); return; IL_0A: arg_2A_0 = 2205124648u; goto IL_25; IL_4A: this.WriteUInt32(0u); arg_2A_0 = 3253440261u; goto IL_25; } public byte[] ReadDataToSend(bool isAuthPacket = false) { byte[] array = new byte[PacketWriter.smethod_2(PacketWriter.smethod_1(this))]; while (true) { IL_157: uint arg_11E_0 = 1778740614u; while (true) { uint num; switch ((num = (arg_11E_0 ^ 1877401841u)) % 11u) { case 0u: { int num2; arg_11E_0 = (((long)num2 >= PacketWriter.smethod_2(PacketWriter.smethod_1(this))) ? 1093790467u : 1743095117u); continue; } case 1u: arg_11E_0 = (num * 2838672913u ^ 2341229985u); continue; case 2u: array[0] = (byte)(255u & this.Size); arg_11E_0 = (num * 1119933883u ^ 3466367558u); continue; case 3u: { PacketWriter.smethod_3(this, 0, SeekOrigin.Begin); int num2 = 0; arg_11E_0 = (num * 3158397280u ^ 3757425747u); continue; } case 4u: goto IL_157; case 5u: arg_11E_0 = (((!isAuthPacket) ? 1910176589u : 1261149097u) ^ num * 3420629264u); continue; case 6u: { int num2; num2++; arg_11E_0 = (num * 406199060u ^ 611498539u); continue; } case 8u: { int num2; array[num2] = (byte)PacketWriter.smethod_4(PacketWriter.smethod_1(this)); arg_11E_0 = 204451283u; continue; } case 9u: this.Size = (uint)(array.Length - 4); arg_11E_0 = (num * 2660983120u ^ 3795151527u); continue; case 10u: array[1] = (byte)(255u & this.Size >> 8); arg_11E_0 = (num * 3804110805u ^ 3371470262u); continue; } return array; } } return array; } public void WriteInt8(sbyte data) { this.method_0(data); } public void WriteInt16(short data) { this.method_1(data); } public void WriteInt32(int data) { this.method_2(data); } public void WriteInt64(long data) { this.method_3(data); } public void WriteUInt8(byte data) { this.method_4(data); } public void WriteUInt16(ushort data) { this.method_5(data); } public void WriteUInt32(uint data) { this.method_6(data); } public void WriteUInt64(ulong data) { this.method_7(data); } public void WriteFloat(float data) { this.method_8(data); } public void WriteDouble(double data) { this.method_9(data); } public void WriteCString(string data) { byte[] data2 = PacketWriter.smethod_6(PacketWriter.smethod_5(), data); this.WriteBytes(data2, 0); this.WriteUInt8(0); } public void WriteString(string data, bool nullIfEmpty = true) { byte[] array = PacketWriter.smethod_6(PacketWriter.smethod_5(), data); if (array.Length == 0 & nullIfEmpty) { goto IL_15; } goto IL_51; uint arg_35_0; while (true) { IL_30: uint num; switch ((num = (arg_35_0 ^ 3811660966u)) % 4u) { case 1u: goto IL_51; case 2u: array = new byte[1]; arg_35_0 = (num * 3327909538u ^ 4252286263u); continue; case 3u: goto IL_15; } break; } return; IL_15: arg_35_0 = 3517538860u; goto IL_30; IL_51: this.WriteBytes(array, 0); arg_35_0 = 2490499242u; goto IL_30; } public void WriteUnixTime() { DateTime d = new DateTime(1970, 1, 1); while (true) { IL_6B: uint arg_4F_0 = 3979516039u; while (true) { uint num; switch ((num = (arg_4F_0 ^ 2935553566u)) % 4u) { case 0u: goto IL_6B; case 1u: { TimeSpan timeSpan = DateTime.Now - d; arg_4F_0 = (num * 2753946769u ^ 212057177u); continue; } case 2u: { TimeSpan timeSpan; this.WriteUInt32(Convert.ToUInt32(timeSpan.TotalSeconds)); arg_4F_0 = (num * 3903076465u ^ 2655937991u); continue; } } return; } } } public void WritePackedTime() { DateTime now = DateTime.Now; this.WriteUInt32(Convert.ToUInt32(now.Year - 2000 << 24 | now.Month - 1 << 20 | now.Day - 1 << 14 | (int)((int)now.DayOfWeek << 11) | now.Hour << 6 | now.Minute)); } public void WriteSmartGuid(SmartGuid guid) { byte data; byte int_; byte[] packedGuid = this.GetPackedGuid(guid.Guid, out data, out int_); byte int_2; byte[] packedGuid2; while (true) { IL_90: uint arg_6F_0 = 3222044819u; while (true) { uint num; switch ((num = (arg_6F_0 ^ 3599493022u)) % 5u) { case 0u: goto IL_90; case 1u: this.WriteUInt8(data); arg_6F_0 = (num * 1460792118u ^ 2740115011u); continue; case 2u: { byte data2; this.WriteUInt8(data2); PacketWriter.smethod_7(this, packedGuid, 0, (int)int_); arg_6F_0 = (num * 3557611683u ^ 3621565152u); continue; } case 3u: { byte data2; packedGuid2 = this.GetPackedGuid(guid.HighGuid, out data2, out int_2); arg_6F_0 = (num * 477547735u ^ 363270741u); continue; } } goto Block_1; } } Block_1: PacketWriter.smethod_7(this, packedGuid2, 0, (int)int_2); } public void WriteSmartGuid(ulong guid, ObjectType type, SmartGuid sGuid = null) { if (guid != 0uL) { goto IL_25; } goto IL_F5; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 1646368848u)) % 10u) { case 0u: { byte data; this.WriteUInt8(data); arg_BF_0 = (num * 860942149u ^ 3453380518u); continue; } case 1u: { byte data; byte count; byte[] smartGuid = this.GetSmartGuid((sGuid == null) ? 580726857419194368uL : sGuid.HighGuid, out data, out count); arg_BF_0 = 1369678913u; continue; } case 2u: { byte data2 = 0; byte data = 0; byte count2; byte[] smartGuid2 = this.GetSmartGuid(guid, out data2, out count2); arg_BF_0 = (num * 2616288901u ^ 1468100039u); continue; } case 3u: { byte data2; this.WriteUInt8(data2); arg_BF_0 = (num * 2677091164u ^ 3202732928u); continue; } case 4u: goto IL_F5; case 5u: return; case 6u: { byte count2; byte[] smartGuid2; this.WriteBytes(smartGuid2, (int)count2); arg_BF_0 = (num * 3836561347u ^ 1058943091u); continue; } case 8u: goto IL_25; case 9u: { byte count; byte[] smartGuid; this.WriteBytes(smartGuid, (int)count); arg_BF_0 = (num * 483692983u ^ 3257050584u); continue; } } break; } return; IL_25: arg_BF_0 = 261752828u; goto IL_BA; IL_F5: this.WriteUInt8(0); this.WriteUInt8(0); arg_BF_0 = 72102509u; goto IL_BA; } public byte[] GetSmartGuid(ulong guid, out byte gLength, out byte written) { byte[] array = new byte[8]; byte b3; while (true) { IL_12D: uint arg_F3_0 = 1518229315u; while (true) { uint num; switch ((num = (arg_F3_0 ^ 290725482u)) % 11u) { case 0u: { byte b; gLength = b; arg_F3_0 = (num * 3180364157u ^ 2047276469u); continue; } case 1u: { byte b = 0; arg_F3_0 = (num * 1208499002u ^ 4258942106u); continue; } case 2u: arg_F3_0 = (((guid & 255uL) != 0uL) ? 937976330u : 1097842365u); continue; case 3u: arg_F3_0 = ((guid == 0uL) ? 568352903u : 1527528247u); continue; case 4u: arg_F3_0 = (num * 2944818540u ^ 2606755564u); continue; case 6u: goto IL_12D; case 7u: { byte b; byte b2; b |= (byte)(1 << (int)b2); array[(int)b3] = (byte)(guid & 255uL); b3 += 1; arg_F3_0 = (num * 1368850540u ^ 1431029309u); continue; } case 8u: { b3 = 0; byte b2 = 0; arg_F3_0 = (num * 3240317237u ^ 2659096902u); continue; } case 9u: guid >>= 8; arg_F3_0 = 373789784u; continue; case 10u: { byte b2; b2 += 1; arg_F3_0 = (num * 2250317194u ^ 1249084784u); continue; } } goto Block_3; } } Block_3: written = b3; return array; } public void WriteSmartGuid(ulong guid, global::GuidType type = global::GuidType.Player) { SmartGuid guid2 = new SmartGuid { Type = type, CreationBits = guid, RealmId = 1 }; if (guid == 0uL) { while (true) { IL_50: uint arg_38_0 = 66514321u; while (true) { uint num; switch ((num = (arg_38_0 ^ 2001468684u)) % 3u) { case 0u: goto IL_50; case 1u: guid2 = new SmartGuid(); arg_38_0 = (num * 2828181269u ^ 2346161042u); continue; } goto Block_2; } } Block_2:; } this.WriteSmartGuid(guid2); } private byte[] GetPackedGuid(ulong guid, out byte gLength, out byte written) { byte[] array = new byte[8]; byte b2; while (true) { IL_116: uint arg_E0_0 = 1742355484u; while (true) { uint num; switch ((num = (arg_E0_0 ^ 1581815732u)) % 10u) { case 1u: arg_E0_0 = ((guid == 0uL) ? 1503605260u : 1448044057u); continue; case 2u: { byte b = 0; b2 = 0; arg_E0_0 = (num * 1493472980u ^ 2528929882u); continue; } case 3u: { byte b; byte b3; b |= (byte)(1 << (int)b3); arg_E0_0 = (num * 1673829066u ^ 3877665201u); continue; } case 4u: goto IL_116; case 5u: { guid >>= 8; byte b3; b3 += 1; arg_E0_0 = 1766530581u; continue; } case 6u: { byte b; gLength = b; arg_E0_0 = (num * 2829906418u ^ 3937713424u); continue; } case 7u: array[(int)b2] = (byte)(guid & 255uL); b2 += 1; arg_E0_0 = (num * 2635804877u ^ 3464196626u); continue; case 8u: { byte b3 = 0; arg_E0_0 = (num * 3711330271u ^ 714552167u); continue; } case 9u: arg_E0_0 = (((guid & 255uL) == 0uL) ? 409227965u : 1744253535u); continue; } goto Block_3; } } Block_3: written = b2; return array; } public void WriteBytes(byte[] data, int count = 0) { if (count != 0) { goto IL_27; } IL_03: int arg_0D_0 = -1897955788; IL_08: switch ((arg_0D_0 ^ -795743177) % 4) { case 0: goto IL_03; case 1: IL_27: PacketWriter.smethod_7(this, data, 0, count); arg_0D_0 = -98510427; goto IL_08; case 3: PacketWriter.smethod_8(this, data); return; } } public void WriteBitArray(BitArray buffer, int len) { byte[] array = new byte[PacketWriter.smethod_10((PacketWriter.smethod_9(buffer) + 8) / 8) + 1]; while (true) { IL_A3: uint arg_83_0 = 2766179428u; while (true) { uint num; switch ((num = (arg_83_0 ^ 3138209411u)) % 5u) { case 0u: PacketWriter.smethod_11(buffer, array, 0); PacketWriter.smethod_7(this, array, 0, len); arg_83_0 = 2437939306u; continue; case 1u: arg_83_0 = (((len > array.Length) ? 627101049u : 1635445140u) ^ num * 3469367682u); continue; case 2u: array = array.Concat(new byte[len - array.Length]).ToArray<byte>(); arg_83_0 = (num * 88440560u ^ 1331077402u); continue; case 4u: goto IL_A3; } return; } } } public void WriteUInt32Pos(uint data, int pos) { PacketWriter.smethod_3(this, pos, SeekOrigin.Begin); this.WriteUInt32(data); PacketWriter.smethod_3(this, (int)PacketWriter.smethod_2(PacketWriter.smethod_1(this)) - 1, SeekOrigin.Begin); } static MemoryStream smethod_0() { return new MemoryStream(); } static Stream smethod_1(BinaryWriter binaryWriter_0) { return binaryWriter_0.BaseStream; } static long smethod_2(Stream stream_0) { return stream_0.Length; } static long smethod_3(BinaryWriter binaryWriter_0, int int_0, SeekOrigin seekOrigin_0) { return binaryWriter_0.Seek(int_0, seekOrigin_0); } static int smethod_4(Stream stream_0) { return stream_0.ReadByte(); } void method_0(sbyte sbyte_0) { base.Write(sbyte_0); } void method_1(short short_0) { base.Write(short_0); } void method_2(int int_0) { base.Write(int_0); } void method_3(long long_0) { base.Write(long_0); } void method_4(byte byte_0) { base.Write(byte_0); } void method_5(ushort ushort_0) { base.Write(ushort_0); } void method_6(uint uint_0) { base.Write(uint_0); } void method_7(ulong ulong_0) { base.Write(ulong_0); } void method_8(float float_0) { base.Write(float_0); } void method_9(double double_0) { base.Write(double_0); } static Encoding smethod_5() { return Encoding.UTF8; } static byte[] smethod_6(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static void smethod_7(BinaryWriter binaryWriter_0, byte[] byte_0, int int_0, int int_1) { binaryWriter_0.Write(byte_0, int_0, int_1); } static void smethod_8(BinaryWriter binaryWriter_0, byte[] byte_0) { binaryWriter_0.Write(byte_0); } static int smethod_9(BitArray bitArray_0) { return bitArray_0.Length; } static int smethod_10(int int_0) { return Convert.ToInt32(int_0); } static void smethod_11(BitArray bitArray_0, Array array_0, int int_0) { bitArray_0.CopyTo(array_0, int_0); } } } <file_sep>/AuthServer.Packets.Handlers/AuthHandler.cs using System; namespace AuthServer.Packets.Handlers { internal class AuthHandler { } } <file_sep>/AuthServer.AuthServer.JsonObjects/FormInput.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class FormInput { [DataMember(Name = "input_id")] public string Id { get; set; } [DataMember(Name = "type")] public string Type { get; set; } [DataMember(Name = "label")] public string Label { get; set; } [DataMember(Name = "max_length")] public int MaxLength { get; set; } } } <file_sep>/AuthServer.Game.PacketHandler/CharacterHandler.cs using AuthServer.Game.Entities; using AuthServer.Game.Packets.PacketHandler; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Game.Packets.PacketHandler; using AuthServer.WorldServer.Managers; using Framework.Constants; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Misc; using Framework.Network.Packets; using Framework.ObjectDefines; using Framework.Serialization; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading; namespace AuthServer.Game.PacketHandler { public class CharacterHandler : Manager { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CharacterHandler.__c __9 = new CharacterHandler.__c(); public static Func<Namegen, string> __9__3_1; internal string HandleGenerateRandomCharacterNameb__3_1(Namegen n) { return n.Name; } } private static ulong lastSession = 0uL; public static bool chatRunning = true; [Opcode(ClientMessage.EnumCharacters, "18125")] public static void HandleEnumCharactersResult(ref PacketReader packet, WorldClass session) { session.Character = null; if (CharacterHandler.smethod_1(CharacterHandler.smethod_0(Helper.DataDirectory(), Module.smethod_33<string>(1012059880u)))) { goto IL_25; } goto IL_6AE; uint arg_57_0; while (true) { IL_52: uint num; PacketWriter packetWriter; int num2; BitPack bitPack; int num3; uint arg_339_0; bool flag; switch ((num = (arg_57_0 ^ 3546639019u)) % 39u) { case 0u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].FacialHair); arg_57_0 = (num * 3871093834u ^ 3049929460u); continue; case 1u: packetWriter.WriteFloat(Manager.WorldMgr.CharaterList[num2].Position.X); arg_57_0 = (num * 2307388802u ^ 1187397841u); continue; case 2u: bitPack.Write<int>(1); bitPack.Write<int>(0); bitPack.Write<int>(0); arg_57_0 = (num * 2127932406u ^ 461565267u); continue; case 3u: goto IL_99A; case 4u: goto IL_811; case 5u: bitPack.Write<int>(0); bitPack.Write<int>(1); bitPack.Write<int>(0); arg_57_0 = (num * 1909605126u ^ 1519434621u); continue; case 6u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].HairColor); arg_57_0 = (num * 2613601680u ^ 188208087u); continue; case 7u: packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].Map); arg_57_0 = (num * 134783787u ^ 585703934u); continue; case 8u: num2 = 0; arg_57_0 = (num * 1874718705u ^ 448644109u); continue; case 9u: bitPack.Flush(); packetWriter.WriteInt32(Manager.WorldMgr.CharaterList.Count); arg_57_0 = (num * 629279092u ^ 801581919u); continue; case 10u: goto IL_398; case 11u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Skin); arg_57_0 = (num * 3814152332u ^ 1947054060u); continue; case 12u: packetWriter.WriteSmartGuid(Manager.WorldMgr.CharaterList[num2].GuildGuid, global::GuidType.Player); packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].CharacterFlags); arg_57_0 = (num * 2310401924u ^ 98665580u); continue; case 13u: bitPack.Write<int>(1); arg_57_0 = (num * 968182909u ^ 87796692u); continue; case 14u: goto IL_6AE; case 15u: CharacterHandler.smethod_3(CharacterHandler.smethod_2(CharacterHandler.smethod_0(Helper.DataDirectory(), Module.smethod_34<string>(1144845388u)))); arg_57_0 = (num * 1138724256u ^ 99620003u); continue; case 16u: packetWriter.WriteUInt32(0u); arg_57_0 = (num * 1007004570u ^ 3344957856u); continue; case 17u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Race); packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Class); arg_57_0 = (num * 3930009718u ^ 2102488844u); continue; case 18u: packetWriter.WriteUInt32(0u); arg_57_0 = (num * 1489152377u ^ 3564692854u); continue; case 19u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Face); arg_57_0 = (num * 149408727u ^ 3820009058u); continue; case 20u: packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].PetDisplayInfo); arg_57_0 = (num * 1110553608u ^ 3564960664u); continue; case 21u: packetWriter.WriteUInt32(0u); arg_57_0 = (num * 917377323u ^ 3999301969u); continue; case 22u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Level); packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].Zone); arg_57_0 = (num * 1508659266u ^ 2200773903u); continue; case 23u: IL_329: if (num3 < 23) { goto IL_398; } arg_339_0 = 3538062956u; break; case 24u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].HairStyle); arg_57_0 = (num * 258059524u ^ 1046586389u); continue; case 25u: packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].CustomizeFlags); arg_57_0 = (num * 2758559348u ^ 3118814838u); continue; case 26u: flag = false; num3 = 0; arg_57_0 = (num * 2666996767u ^ 3953141618u); continue; case 27u: packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].PetFamily); arg_57_0 = (num * 4066988638u ^ 1168559191u); continue; case 28u: packetWriter.WriteUInt8(0); arg_57_0 = (num * 2924172985u ^ 3507841469u); continue; case 29u: packetWriter.WriteFloat(Manager.WorldMgr.CharaterList[num2].Position.Y); arg_57_0 = (num * 2110621870u ^ 2892101880u); continue; case 30u: packetWriter = new PacketWriter(ServerMessage.EnumCharactersResult, true); bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_57_0 = 3979521935u; continue; case 31u: packetWriter.WriteFloat(Manager.WorldMgr.CharaterList[num2].Position.Z); arg_57_0 = (num * 238996209u ^ 4232709328u); continue; case 32u: arg_57_0 = (((Manager.WorldMgr.CharaterList == null) ? 3582413963u : 2685933514u) ^ num * 3262820671u); continue; case 33u: IL_37E: if (num2 < Manager.WorldMgr.CharaterList.Count) { goto IL_126; } arg_339_0 = 2407627896u; break; case 34u: goto IL_25; case 35u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].HornStyle); packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].BlindFolds); packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Tattoos); arg_57_0 = (num * 957095111u ^ 1914876318u); continue; case 36u: packetWriter.WriteUInt8(Manager.WorldMgr.CharaterList[num2].Gender); arg_57_0 = (num * 4224067557u ^ 2068767078u); continue; case 37u: goto IL_126; case 38u: Manager.WorldMgr.CharaterList = new List<Character>(); arg_57_0 = (num * 1258260271u ^ 1965682678u); continue; default: goto IL_811; } string name; while (true) { IL_334: switch ((num = (arg_339_0 ^ 3546639019u)) % 13u) { case 0u: goto IL_329; case 1u: packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(0u); packetWriter.WriteUInt8(0); arg_339_0 = (num * 1122833897u ^ 3614880232u); continue; case 2u: session.Send(ref packetWriter); arg_339_0 = (num * 1900107504u ^ 1966250030u); continue; case 3u: packetWriter.WriteString(name, true); arg_339_0 = (num * 1731080081u ^ 2729717507u); continue; case 4u: goto IL_2CD; case 5u: packetWriter.WriteUInt32(0u); arg_339_0 = (num * 637694094u ^ 448731726u); continue; case 6u: num2++; arg_339_0 = (num * 1173775919u ^ 2404844881u); continue; case 7u: packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(0u); bitPack.Write<int>(CharacterHandler.smethod_6(CharacterHandler.smethod_5(), name).Length, 6); arg_339_0 = (num * 3317182053u ^ 761679791u); continue; case 8u: packetWriter.WriteUInt16(0); arg_339_0 = (num * 1407846318u ^ 2309420174u); continue; case 10u: goto IL_243; case 11u: bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Write<int>(0, 5); bitPack.Flush(); arg_339_0 = (num * 1666249630u ^ 963420602u); continue; case 12u: goto IL_37E; } return; } IL_126: bool arg_13B_0 = Manager.WorldMgr.CharaterList[num2].LoginCinematic; name = Manager.WorldMgr.CharaterList[num2].Name; packetWriter.WriteSmartGuid(Manager.WorldMgr.CharaterList[num2].Guid, global::GuidType.Player); arg_57_0 = 3243624136u; continue; IL_398: flag = false; arg_57_0 = 4016560583u; continue; IL_99A: packetWriter.WriteUInt32(Manager.WorldMgr.CharaterList[num2].PetLevel); arg_57_0 = (num * 2312245282u ^ 1285680378u); continue; IL_811: using (Dictionary<byte, Item>.Enumerator enumerator = Manager.WorldMgr.CharaterList[num2].Equipment.GetEnumerator()) { while (true) { IL_971: uint arg_928_0 = enumerator.MoveNext() ? 4221460984u : 3491304591u; while (true) { switch ((num = (arg_928_0 ^ 3546639019u)) % 11u) { case 0u: { KeyValuePair<byte, Item> current; packetWriter.WriteInt32(current.Value.DisplayInfoId); packetWriter.WriteUInt32(0u); arg_928_0 = (num * 3196428972u ^ 556558901u); continue; } case 1u: { KeyValuePair<byte, Item> current = enumerator.Current; arg_928_0 = 3615480248u; continue; } case 2u: { KeyValuePair<byte, Item> current; arg_928_0 = (((current.Key != 15) ? 717825882u : 101407626u) ^ num * 2290213457u); continue; } case 3u: { byte b; b += 1; arg_928_0 = (num * 3503197238u ^ 2949610752u); continue; } case 4u: goto IL_97F; case 6u: arg_928_0 = 4221460984u; continue; case 7u: { KeyValuePair<byte, Item> current; arg_928_0 = ((((int)current.Key == num3) ? 398889445u : 474685837u) ^ num * 2374242494u); continue; } case 8u: { KeyValuePair<byte, Item> current; byte b = current.Key; arg_928_0 = (num * 1448942928u ^ 209798463u); continue; } case 9u: { byte b; packetWriter.WriteUInt8(b); arg_928_0 = 3998454492u; continue; } case 10u: goto IL_971; } goto Block_11; } } Block_11: goto IL_987; IL_97F: flag = true; IL_987: goto IL_A51; } goto IL_99A; IL_A51: if (!flag) { goto IL_2CD; } IL_243: num3++; arg_339_0 = 2988058974u; goto IL_334; IL_2CD: arg_339_0 = 2995244852u; goto IL_334; } return; IL_25: Manager.WorldMgr.CharaterList = Json.CreateObject<List<Character>>(CharacterHandler.smethod_4(CharacterHandler.smethod_0(Helper.DataDirectory(), Module.smethod_33<string>(1012059880u)))); arg_57_0 = 2343455517u; goto IL_52; IL_6AE: arg_57_0 = 3967426555u; goto IL_52; } [Opcode(ClientMessage.CreateCharacter, "18156")] public static void HandleCreateCharacter(ref PacketReader packet, WorldClass session) { string name; Character pcharacter; PacketWriter packetWriter; while (true) { IL_75B: uint arg_6C1_0 = 985380630u; while (true) { uint num; ulong guid; ulong arg_41D_0; switch ((num = (arg_6C1_0 ^ 1028551618u)) % 35u) { case 0u: arg_6C1_0 = (Manager.WorldMgr.CharaterList.Any((Character c) => CharacterHandler.__c__DisplayClass1_0.smethod_0(c.Name, name)) ? 1046617093u : 271931922u); continue; case 1u: { ActionButton actionButton = new ActionButton { Action = 119212uL, SlotId = 1, SpecGroup = pcharacter.ActiveSpecGroup }; arg_6C1_0 = (num * 2120388645u ^ 2458026040u); continue; } case 2u: { Item item; pcharacter.Equipment.Add(ItemHandler.GetEquipSlot(item.InventoryType), item); arg_6C1_0 = (num * 864281780u ^ 2303982439u); continue; } case 3u: { byte race; byte @class; byte gender; byte skin; int zone; int map; float x; float y; float z; float o; byte face; byte hairStyle; byte facialHair; byte hornStyle; byte blindFolds; byte tattoos; CharacterFlag characterFlags; byte hairColor; pcharacter = new Character(guid, 4592) { Guid = guid, Name = name, AccountId = 1u, Race = race, Class = @class, Gender = gender, Skin = skin, Zone = (uint)zone, Map = (uint)map, Position = new Vector4 { X = x, Y = y, Z = z, O = o }, Face = face, HairStyle = hairStyle, FacialHair = facialHair, HornStyle = hornStyle, BlindFolds = blindFolds, Tattoos = tattoos, CharacterFlags = (uint)characterFlags, HairColor = hairColor, Level = 1 }; arg_6C1_0 = (num * 2763845485u ^ 3228747185u); continue; } case 4u: { int num2 = 0; arg_6C1_0 = (num * 1775812274u ^ 880878285u); continue; } case 5u: { Item item; Item item2; item.InventoryType = item2.InventoryType; item.Guid = (ulong)((long)(pcharacter.Equipment.Count + pcharacter.Bag.Count) + 1L); arg_6C1_0 = ((item.InventoryType == 18) ? 903267311u : 457554016u); continue; } case 6u: { uint[] array; arg_6C1_0 = (((array == null) ? 1731946765u : 1858551295u) ^ num * 2714328298u); continue; } case 7u: { CharacterFlag characterFlags = CharacterFlag.Decline; arg_6C1_0 = (num * 220391134u ^ 2015972157u); continue; } case 8u: packetWriter.WriteUInt8(53); arg_6C1_0 = (num * 181734751u ^ 3388545914u); continue; case 9u: arg_41D_0 = 1uL; goto IL_41D; case 11u: { int num2; num2++; arg_6C1_0 = 114322827u; continue; } case 12u: { int map = 1669; int zone = 0; float x = 4851.645f; arg_6C1_0 = 1136245746u; continue; } case 13u: if (Manager.WorldMgr.CharaterList.Count <= 0) { arg_6C1_0 = (num * 526635500u ^ 3603251270u); continue; } arg_41D_0 = Manager.WorldMgr.CharaterList[Manager.WorldMgr.CharaterList.Count - 1].Guid + 10uL; goto IL_41D; case 14u: arg_6C1_0 = (num * 2026561294u ^ 932960213u); continue; case 15u: { int num2; uint[] array; arg_6C1_0 = ((num2 < array.Length) ? 131065434u : 1825506867u); continue; } case 16u: goto IL_766; case 17u: { int num2; uint[] array; Item item2 = Manager.Equipments.AvailableItems[(int)array[num2]]; Item item; item.Id = item2.Id; item.DisplayInfoIds = item2.DisplayInfoIds; arg_6C1_0 = (num * 1005856648u ^ 1867141104u); continue; } case 18u: CharacterHandler.smethod_8(packet); arg_6C1_0 = (num * 2772800459u ^ 373937858u); continue; case 19u: { Item item; arg_6C1_0 = (((!pcharacter.Equipment.ContainsKey(ItemHandler.GetEquipSlot(item.InventoryType))) ? 2845124146u : 3122201077u) ^ num * 48532093u); continue; } case 20u: session.Send(ref packetWriter); arg_6C1_0 = (num * 2021283018u ^ 2886228345u); continue; case 21u: { Item item; Item item2; item.DisplayInfoId = item2.DisplayInfoIds[Module.smethod_34<string>(1624274959u)].Item1; arg_6C1_0 = (num * 2379711510u ^ 3749418316u); continue; } case 22u: { ActionButton actionButton; Manager.ActionMgr.AddActionButton(pcharacter, actionButton, true); CharStartOutfit expr_287 = Manager.Equipments.CharStartOutfits.SingleOrDefault(delegate(CharStartOutfit cso) { if (cso.RaceId == pcharacter.Race) { while (true) { IL_68: uint arg_4C_0 = 1548136435u; while (true) { uint num3; switch ((num3 = (arg_4C_0 ^ 1028053410u)) % 4u) { case 1u: arg_4C_0 = (((cso.ClassId != pcharacter.Class) ? 3884541746u : 2739672217u) ^ num3 * 3400271744u); continue; case 2u: goto IL_68; case 3u: goto IL_6F; } goto Block_3; } } Block_3: return false; IL_6F: return cso.SexId == pcharacter.Gender; } return false; }); uint[] array = (expr_287 != null) ? expr_287.ItemId : null; arg_6C1_0 = 825491585u; continue; } case 23u: return; case 24u: { int num2; uint[] array; arg_6C1_0 = ((Manager.Equipments.AvailableItems.ContainsKey((int)array[num2]) ? 3748426148u : 3148270045u) ^ num * 3971136190u); continue; } case 25u: packetWriter.WriteUInt8(24); arg_6C1_0 = (num * 3821477349u ^ 1910352278u); continue; case 26u: { float y = 9884.408f; float z = -64.7009f; float o = 0f; arg_6C1_0 = (num * 2678738025u ^ 622810963u); continue; } case 27u: packetWriter.WriteUInt8(50); session.Send(ref packetWriter); arg_6C1_0 = (num * 3721327335u ^ 2890541034u); continue; case 28u: { int num2; uint[] array; arg_6C1_0 = ((array[num2] == 0u) ? 903267311u : 486266913u); continue; } case 29u: goto IL_75B; case 30u: { BitUnpack expr_E3 = new BitUnpack(packet); uint bits = expr_E3.GetBits<uint>(6); bool arg_16C_0 = expr_E3.GetBit(); byte race = CharacterHandler.smethod_7(packet); byte @class = CharacterHandler.smethod_7(packet); byte gender = CharacterHandler.smethod_7(packet); byte skin = CharacterHandler.smethod_7(packet); byte face = CharacterHandler.smethod_7(packet); byte hairStyle = CharacterHandler.smethod_7(packet); byte hairColor = CharacterHandler.smethod_7(packet); byte facialHair = CharacterHandler.smethod_7(packet); CharacterHandler.smethod_7(packet); byte hornStyle = CharacterHandler.smethod_7(packet); byte blindFolds = CharacterHandler.smethod_7(packet); byte tattoos = CharacterHandler.smethod_7(packet); name = Character.NormalizeName(packet.ReadString(bits)); arg_6C1_0 = ((arg_16C_0 ? 2268253766u : 3358961518u) ^ num * 245408120u); continue; } case 31u: { Item item2; arg_6C1_0 = (((item2.DisplayInfoIds.Count <= 0) ? 3612939726u : 3084024304u) ^ num * 134985129u); continue; } case 32u: { Item item = new Item(); arg_6C1_0 = (num * 2707710018u ^ 2794208195u); continue; } case 33u: Manager.WorldMgr.CharaterList.Add(pcharacter); CharacterHandler.smethod_9(CharacterHandler.smethod_0(Helper.DataDirectory(), Module.smethod_37<string>(2717626567u)), Json.CreateString<List<Character>>(Manager.WorldMgr.CharaterList)); arg_6C1_0 = 360563180u; continue; case 34u: packetWriter = new PacketWriter(ServerMessage.CreateChar, true); arg_6C1_0 = ((Manager.WorldMgr.CharaterList.Count < 11) ? 469416310u : 490450368u); continue; } return; IL_41D: guid = arg_41D_0; arg_6C1_0 = 228667689u; } } return; IL_766: session.Send(ref packetWriter); } [Opcode(ClientMessage.CharDelete, "18156")] public static void HandleCharDelete(ref PacketReader packet, WorldClass session) { ulong num = packet.ReadSmartGuid(); int index = 0; int num2 = 0; PacketWriter packetWriter; while (true) { IL_14C: uint arg_116_0 = 3956756290u; while (true) { uint num3; switch ((num3 = (arg_116_0 ^ 3624521121u)) % 10u) { case 0u: arg_116_0 = (num3 * 1221351189u ^ 3039305110u); continue; case 1u: packetWriter.WriteUInt8(51); arg_116_0 = (num3 * 1283754437u ^ 4214349614u); continue; case 2u: num2++; arg_116_0 = 3045691952u; continue; case 3u: arg_116_0 = ((Manager.WorldMgr.CharaterList[num2].Guid != num) ? 3855266751u : 3638570767u); continue; case 5u: arg_116_0 = (num3 * 91464111u ^ 367832605u); continue; case 6u: goto IL_14C; case 7u: arg_116_0 = ((num2 >= Manager.WorldMgr.CharaterList.Count) ? 3093896274u : 4143858192u); continue; case 8u: index = num2; arg_116_0 = (num3 * 891506522u ^ 822658361u); continue; case 9u: Manager.WorldMgr.CharaterList.RemoveAt(index); CharacterHandler.smethod_9(CharacterHandler.smethod_0(Helper.DataDirectory(), Module.smethod_35<string>(205105435u)), Json.CreateString<List<Character>>(Manager.WorldMgr.CharaterList)); packetWriter = new PacketWriter(ServerMessage.DeleteChar, true); arg_116_0 = 3445904986u; continue; } goto Block_3; } } Block_3: session.Send(ref packetWriter); } [Opcode(ClientMessage.GenerateRandomCharacterName, "18156")] public static void HandleGenerateRandomCharacterName(ref PacketReader packet, WorldClass session) { byte race; byte gender; string NewName; while (true) { IL_1C7: uint arg_195_0 = 698975311u; while (true) { uint num; switch ((num = (arg_195_0 ^ 1646302372u)) % 9u) { case 0u: { PacketWriter packetWriter; BitPack expr_14F = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); expr_14F.Write<int>(1); expr_14F.Write<int>(CharacterHandler.smethod_13(NewName), 6); expr_14F.Flush(); packetWriter.WriteString(NewName, true); session.Send(ref packetWriter); arg_195_0 = (num * 3767414363u ^ 2062469097u); continue; } case 1u: race = CharacterHandler.smethod_7(packet); gender = CharacterHandler.smethod_7(packet); arg_195_0 = (num * 1582143918u ^ 3312408962u); continue; case 2u: goto IL_1C7; case 3u: { IEnumerable<Namegen> arg_E6_0 = from n in Manager.Equipments.Namegens where n.Race == race && n.Sex == gender select n; Func<Namegen, string> arg_E6_1; if ((arg_E6_1 = CharacterHandler.__c.__9__3_1) == null) { arg_E6_1 = (CharacterHandler.__c.__9__3_1 = new Func<Namegen, string>(CharacterHandler.__c.__9.HandleGenerateRandomCharacterNameb__3_1)); } List<string> list = arg_E6_0.Select(arg_E6_1).ToList<string>(); arg_195_0 = 1426866854u; continue; } case 4u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.GenerateRandomCharacterNameResult, true); arg_195_0 = (num * 2017727992u ^ 2716674277u); continue; } case 5u: { List<string> list; Random random_; NewName = list[CharacterHandler.smethod_12(random_, list.Count)]; arg_195_0 = 775139803u; continue; } case 6u: { Random random_ = CharacterHandler.smethod_11(CharacterHandler.smethod_10()); arg_195_0 = (num * 1271455048u ^ 1163812784u); continue; } case 7u: arg_195_0 = ((Manager.WorldMgr.CharaterList.Any((Character c) => CharacterHandler.__c__DisplayClass3_0.smethod_0(c.Name, NewName)) ? 2759389124u : 2765169318u) ^ num * 3791994652u); continue; } return; } } } [Opcode(ClientMessage.PlayerLogin, "18125")] public static void HandlePlayerLogin(ref PacketReader packet, WorldClass session) { WorldClass session; while (true) { IL_9EF: uint arg_901_0 = 2109433998u; while (true) { uint num; switch ((num = (arg_901_0 ^ 1223399219u)) % 56u) { case 0u: { ulong num2; Log.Message(LogType.Error, Module.smethod_37<string>(88126927u), new object[] { num2 }); arg_901_0 = (num * 2998728080u ^ 1934339344u); continue; } case 1u: { ulong num2; int num3; arg_901_0 = ((Manager.WorldMgr.CharaterList[num3].Guid != num2) ? 617600691u : 1713614465u); continue; } case 2u: arg_901_0 = (num * 1137494816u ^ 4082842479u); continue; case 3u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 3431606706u ^ 2632230413u); continue; } case 4u: { PacketWriter expr_82C = new PacketWriter(ServerMessage.ObjectUpdate, true); expr_82C.WriteBytes(Module.smethod_34<string>(3884700158u).ToByteArray(), 0); new PacketWriter(ServerMessage.TokenTime, true); expr_82C.WriteBytes(Module.smethod_36<string>(1612858198u).ToByteArray(), 0); arg_901_0 = (num * 1879318810u ^ 716567833u); continue; } case 5u: Manager.WorldMgr.DeleteSession2(0uL); arg_901_0 = (num * 1189156347u ^ 2277702030u); continue; case 6u: goto IL_9EF; case 7u: TimeHandler.HandleLoginSetTimeSpeed(ref session); arg_901_0 = (num * 333596354u ^ 1983047535u); continue; case 8u: { int num3; num3++; arg_901_0 = 355966023u; continue; } case 9u: { PacketWriter expr_700 = new PacketWriter(ServerMessage.FeatureSystemStatusGlueScreen, true); BitPack bitPack = new BitPack(expr_700, 0uL, 0uL, 0uL, 0uL); bitPack.Write<bool>(true); bitPack.Write<bool>(true); bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(true); bitPack.Write<bool>(true); bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(true); bitPack.Flush(); expr_700.WriteUInt32(300u); expr_700.WriteUInt32(0u); expr_700.WriteUInt64(0uL); arg_901_0 = (num * 2175956409u ^ 3780706177u); continue; } case 10u: { PacketWriter expr_69C = new PacketWriter(ServerMessage.TokenBalance, true); expr_69C.WriteUInt32(4u); expr_69C.WriteUInt64(0uL); expr_69C.WriteUInt64(200uL); expr_69C.WriteUInt32(0u); expr_69C.WriteUInt8(128); Manager.WorldMgr.SendHotfixes(session); arg_901_0 = (num * 4019793613u ^ 432098202u); continue; } case 12u: { ulong num2; arg_901_0 = (Manager.WorldMgr.AddSession(num2, ref session) ? 485688646u : 812137123u); continue; } case 13u: session.Character.InRangeObjects = new Dictionary<ulong, WorldObject>(); arg_901_0 = (num * 2621062377u ^ 143411677u); continue; case 14u: { BitPack bitPack; bitPack.Write<bool>(true); arg_901_0 = (num * 3586527354u ^ 4249280723u); continue; } case 15u: { BitPack bitPack; bitPack.Flush(); arg_901_0 = (num * 3100239295u ^ 2263719723u); continue; } case 16u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 1745531438u ^ 4205023082u); continue; } case 17u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 1362508336u ^ 3593666036u); continue; } case 18u: { WorldClass2 session2; Manager.WorldMgr.AddSession2(0uL, ref session2); arg_901_0 = (num * 2049441101u ^ 2006304175u); continue; } case 19u: { WorldClass2 session2; session.Character.MaskSize = session2.Character.DataLength / 32; session.Character.Mask = CharacterHandler.smethod_14(session2.Character.DataLength, false); arg_901_0 = 697404918u; continue; } case 20u: { BitPack bitPack; bitPack.Write<bool>(true); arg_901_0 = (num * 1206507022u ^ 205999934u); continue; } case 21u: { WorldClass2 session2 = Manager.WorldMgr.GetSession2(CharacterHandler.lastSession); arg_901_0 = 1974258356u; continue; } case 22u: arg_901_0 = ((session.Character.InRangeObjects == null) ? 1051004094u : 1266603656u); continue; case 23u: { SpellHandler.HandleSendKnownSpells(ref session); MiscHandler.HandleUpdateActionButtons(ref session); ObjectHandler.HandleUpdateObjectCreate(ref session, false); MiscHandler.HandleMessageOfTheDay(ref session); PacketWriter packetWriter = new PacketWriter(ServerMessage.EnableDJump, true); arg_901_0 = (num * 4074190088u ^ 1394568894u); continue; } case 24u: { WorldClass2 session2; session2.Character = session.Character; arg_901_0 = (num * 1082901483u ^ 597255709u); continue; } case 25u: { ulong num2; WorldClass2 session2 = Manager.WorldMgr.GetSession2(num2); arg_901_0 = (num * 3455854197u ^ 1866927823u); continue; } case 26u: { int num3; session.Character = Manager.WorldMgr.CharaterList[num3]; arg_901_0 = (num * 4148353782u ^ 1902783245u); continue; } case 27u: arg_901_0 = ((session.Character.DataLength == 0) ? 186882811u : 102827312u); continue; case 28u: { int num3; arg_901_0 = ((num3 >= Manager.WorldMgr.CharaterList.Count) ? 1293088559u : 1473609242u); continue; } case 29u: session = session3; arg_901_0 = (num * 2206934813u ^ 4284536329u); continue; case 30u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 1525853337u ^ 3244045523u); continue; } case 31u: { WorldClass2 session2; arg_901_0 = (((session2 == null) ? 3275857864u : 2895121952u) ^ num * 1633499006u); continue; } case 32u: { packet.Skip(1); int num3 = 0; arg_901_0 = (num * 212707490u ^ 2573082407u); continue; } case 33u: { WorldClass2 session2; arg_901_0 = ((session2 == null) ? 2017587829u : 938245131u); continue; } case 34u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 204167864u ^ 2594718021u); continue; } case 35u: { ulong num2 = packet.ReadSmartGuid(); arg_901_0 = (num * 2052128146u ^ 2233755605u); continue; } case 36u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 276547180u ^ 1183076517u); continue; } case 37u: { PacketWriter packetWriter; packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); packetWriter.WriteInt32(596542156); arg_901_0 = (num * 2042259161u ^ 2030303449u); continue; } case 38u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 3908126672u ^ 3761608889u); continue; } case 39u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_901_0 = (num * 3640662639u ^ 2549018999u); continue; } case 40u: session.Character.DataLength = 4592; arg_901_0 = (num * 4042880795u ^ 170420520u); continue; case 41u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 3191967602u ^ 1245434114u); continue; } case 42u: CharacterHandler.HandleUpdateTalentData(ref session); arg_901_0 = (num * 3066887801u ^ 1020889134u); continue; case 43u: return; case 44u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 1135176753u ^ 2877534391u); continue; } case 45u: new PacketWriter(ServerMessage.QueryNPCTextResponse, true).WriteBytes(Module.smethod_35<string>(2765390876u).ToByteArray(), 0); arg_901_0 = (num * 955012231u ^ 3008044948u); continue; case 46u: { TutorialHandler.HandleTutorialFlags(ref session); Manager.WorldMgr.WriteAccountDataTimes(AccountDataMasks.CharacterCacheMask, ref session, false); PacketWriter expr_145 = new PacketWriter(ServerMessage.FeatureSystemStatus, true); BitPack bitPack = new BitPack(expr_145, 0uL, 0uL, 0uL, 0uL); expr_145.WriteUInt8(0); expr_145.WriteUInt32(0u); expr_145.WriteUInt32(0u); expr_145.WriteUInt32(0u); expr_145.WriteUInt32(0u); expr_145.WriteUInt32(0u); expr_145.WriteUInt32(0u); expr_145.WriteUInt32(300u); expr_145.WriteUInt32(0u); expr_145.WriteUInt64(0uL); arg_901_0 = (num * 877440298u ^ 2665220209u); continue; } case 47u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 3361445611u ^ 3248346210u); continue; } case 48u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 1301617949u ^ 734200671u); continue; } case 49u: { BitPack bitPack; bitPack.Write<bool>(true); bitPack.Write<bool>(true); arg_901_0 = (num * 2586834557u ^ 2373236671u); continue; } case 50u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 1285613539u ^ 2128412513u); continue; } case 51u: TimeHandler.HandleSetTimezoneInformation(ref session); arg_901_0 = (num * 1029888462u ^ 22558446u); continue; case 52u: { BitPack bitPack; bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.Write<bool>(false); arg_901_0 = (num * 4006276023u ^ 1933819661u); continue; } case 53u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 118807035u ^ 3108732667u); continue; } case 54u: { BitPack bitPack; bitPack.Write<bool>(false); arg_901_0 = (num * 3081863939u ^ 2509441064u); continue; } case 55u: { BitPack bitPack; bitPack.Write<bool>(true); arg_901_0 = (num * 2401763381u ^ 5334391u); continue; } } goto Block_8; } } Block_8: Thread expr_A0A = CharacterHandler.smethod_15(delegate { CharacterHandler.__c__DisplayClass5_0.smethod_0(60000); while (true) { IL_E6: uint arg_BE_0 = 627908470u; while (true) { uint num4; switch ((num4 = (arg_BE_0 ^ 1241288239u)) % 7u) { case 0u: goto IL_E6; case 1u: { ChatMessageValues chatMessage = new ChatMessageValues(MessageType.ChatMessageSystem, Module.smethod_35<string>(247267755u), false, false, ""); ChatHandler.SendMessage(ref session, chatMessage, null); arg_BE_0 = (num4 * 3600508056u ^ 2115568771u); continue; } case 2u: arg_BE_0 = (CharacterHandler.chatRunning ? 1942895890u : 427430865u); continue; case 3u: arg_BE_0 = (num4 * 2839635370u ^ 794873364u); continue; case 4u: { ChatMessageValues chatMessage = new ChatMessageValues(MessageType.ChatMessageRaidWarning, Module.smethod_34<string>(968118675u), false, false, ""); ChatHandler.SendMessage(ref session, chatMessage, null); arg_BE_0 = 1602299179u; continue; } case 6u: CharacterHandler.__c__DisplayClass5_0.smethod_0(300000); arg_BE_0 = (num4 * 2553612224u ^ 3806675214u); continue; } return; } } }); CharacterHandler.smethod_16(expr_A0A, true); CharacterHandler.smethod_17(expr_A0A); } public static void SendAchievementData(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.AchievementData, true); packetWriter.WriteInt32(0); packetWriter.WriteInt32(0); session.Send(ref packetWriter); } public static void SendAchievementData2(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.AchievementEarned, true); while (true) { IL_D5: uint arg_B9_0 = 1097642250u; while (true) { uint num; switch ((num = (arg_B9_0 ^ 920807091u)) % 4u) { case 0u: goto IL_D5; case 1u: { BitPack arg_9B_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); packetWriter.WriteInt32(347); packetWriter.WritePackedTime(); packetWriter.WriteInt32(1); packetWriter.WriteInt32(1); arg_9B_0.Write<bool>(false); arg_9B_0.Flush(); arg_B9_0 = (num * 1782001013u ^ 2345619637u); continue; } case 3u: session.Send(ref packetWriter); arg_B9_0 = (num * 958584268u ^ 580067537u); continue; } return; } } } public static void SendAchievementData3(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.AchievementData3, true); while (true) { IL_FB: uint arg_E3_0 = 796621983u; while (true) { uint num; switch ((num = (arg_E3_0 ^ 729870235u)) % 3u) { case 1u: { BitPack arg_BC_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteInt32(1); packetWriter.WriteInt32(347); packetWriter.WritePackedTime(); packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); packetWriter.WriteInt32(1); packetWriter.WriteInt32(1); packetWriter.WriteInt32(1); packetWriter.WriteInt32(347); packetWriter.WriteUInt64(1uL); packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); packetWriter.WritePackedTime(); packetWriter.WriteInt32(1); packetWriter.WriteInt32(1); arg_BC_0.Write<bool>(false); arg_BC_0.Flush(); session.Send(ref packetWriter); arg_E3_0 = (num * 2798950401u ^ 2940619756u); continue; } case 2u: goto IL_FB; } return; } } } public static void HandleUpdateTalentData(ref WorldClass session) { Character arg_07_0 = session.Character; while (true) { IL_149: uint arg_114_0 = 2336220948u; while (true) { uint num; switch ((num = (arg_114_0 ^ 2694051853u)) % 10u) { case 1u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.UpdateTalentData, true); new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_114_0 = (num * 4091140174u ^ 1393755383u); continue; } case 2u: { PacketWriter packetWriter; packetWriter.WriteUInt8(0); packetWriter.WriteUInt32(577u); arg_114_0 = (num * 2576662839u ^ 2303702196u); continue; } case 3u: { int num2 = 1; PacketWriter packetWriter; packetWriter.WriteInt32(1); arg_114_0 = (num * 1547270570u ^ 3895761691u); continue; } case 4u: { int num3 = 0; arg_114_0 = (num * 2989932553u ^ 3494113025u); continue; } case 5u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_114_0 = (num * 3157688677u ^ 2864369220u); continue; } case 6u: { int num2; int num3; arg_114_0 = ((num3 >= num2) ? 2865398006u : 3744571924u); continue; } case 7u: { int num3; num3++; arg_114_0 = (num * 1440862752u ^ 4096493061u); continue; } case 8u: goto IL_149; case 9u: { PacketWriter packetWriter; packetWriter.WriteUInt32(577u); packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(0u); arg_114_0 = 3226918498u; continue; } } return; } } } static string smethod_0(string string_0, string string_1) { return string_0 + string_1; } static bool smethod_1(string string_0) { return File.Exists(string_0); } static FileStream smethod_2(string string_0) { return File.Create(string_0); } static void smethod_3(Stream stream_0) { stream_0.Dispose(); } static string smethod_4(string string_0) { return File.ReadAllText(string_0); } static Encoding smethod_5() { return Encoding.UTF8; } static byte[] smethod_6(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static byte smethod_7(BinaryReader binaryReader_0) { return binaryReader_0.ReadByte(); } static uint smethod_8(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt32(); } static void smethod_9(string string_0, string string_1) { File.WriteAllText(string_0, string_1); } static int smethod_10() { return Environment.TickCount; } static Random smethod_11(int int_0) { return new Random(int_0); } static int smethod_12(Random random_0, int int_0) { return random_0.Next(int_0); } static int smethod_13(string string_0) { return string_0.Length; } static BitArray smethod_14(int int_0, bool bool_0) { return new BitArray(int_0, bool_0); } static Thread smethod_15(ThreadStart threadStart_0) { return new Thread(threadStart_0); } static void smethod_16(Thread thread_0, bool bool_0) { thread_0.IsBackground = bool_0; } static void smethod_17(Thread thread_0) { thread_0.Start(); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/Races.cs using System; namespace AuthServer.WorldServer.Game.Entities { public class Races { public uint Id { get; set; } public uint MaleDisplayId { get; set; } public uint FemaleDisplayId { get; set; } public uint CinematicSequence { get; set; } public uint Faction { get; set; } } } <file_sep>/Bgs.Protocol.Channel.V1/RemoveMemberRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class RemoveMemberRequest : IMessage<RemoveMemberRequest>, IEquatable<RemoveMemberRequest>, IDeepCloneable<RemoveMemberRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RemoveMemberRequest.__c __9 = new RemoveMemberRequest.__c(); internal RemoveMemberRequest cctor>b__34_0() { return new RemoveMemberRequest(); } } private static readonly MessageParser<RemoveMemberRequest> _parser = new MessageParser<RemoveMemberRequest>(new Func<RemoveMemberRequest>(RemoveMemberRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MemberIdFieldNumber = 2; private EntityId memberId_; public const int ReasonFieldNumber = 3; private uint reason_; public static MessageParser<RemoveMemberRequest> Parser { get { return RemoveMemberRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return RemoveMemberRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId MemberId { get { return this.memberId_; } set { this.memberId_ = value; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public RemoveMemberRequest() { } public RemoveMemberRequest(RemoveMemberRequest other) : this() { while (true) { IL_77: int arg_5D_0 = -775358406; while (true) { switch ((arg_5D_0 ^ -1128387905) % 4) { case 0: this.MemberId = ((other.memberId_ != null) ? other.MemberId.Clone() : null); this.reason_ = other.reason_; arg_5D_0 = -1133166151; continue; case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_5D_0 = -1253212473; continue; case 3: goto IL_77; } return; } } } public RemoveMemberRequest Clone() { return new RemoveMemberRequest(this); } public override bool Equals(object other) { return this.Equals(other as RemoveMemberRequest); } public bool Equals(RemoveMemberRequest other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ -113129912) % 11) { case 0: goto IL_9A; case 1: arg_A4_0 = (RemoveMemberRequest.smethod_0(this.MemberId, other.MemberId) ? -1447737326 : -1635386962); continue; case 2: return false; case 3: return false; case 4: goto IL_EA; case 5: arg_A4_0 = (RemoveMemberRequest.smethod_0(this.AgentId, other.AgentId) ? -369719527 : -1254492741); continue; case 7: return false; case 8: return false; case 9: return true; case 10: arg_A4_0 = ((this.Reason == other.Reason) ? -761499454 : -306112842); continue; } break; } return true; IL_9A: arg_A4_0 = -488406932; goto IL_9F; IL_EA: arg_A4_0 = ((other == this) ? -1739421207 : -770257573); goto IL_9F; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_39; } goto IL_8F; uint arg_63_0; while (true) { IL_5E: uint num2; switch ((num2 = (arg_63_0 ^ 2854120568u)) % 5u) { case 0u: goto IL_8F; case 1u: num ^= this.Reason.GetHashCode(); arg_63_0 = (num2 * 1376517231u ^ 2573064409u); continue; case 2u: goto IL_39; case 4u: num ^= RemoveMemberRequest.smethod_1(this.AgentId); arg_63_0 = (num2 * 2828979892u ^ 1257322049u); continue; } break; } return num; IL_39: arg_63_0 = 2870722080u; goto IL_5E; IL_8F: num ^= RemoveMemberRequest.smethod_1(this.MemberId); arg_63_0 = ((this.Reason != 0u) ? 3245698775u : 2362619192u); goto IL_5E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_9D; } goto IL_D3; uint arg_A7_0; while (true) { IL_A2: uint num; switch ((num = (arg_A7_0 ^ 3063819976u)) % 8u) { case 0u: goto IL_9D; case 1u: output.WriteUInt32(this.Reason); arg_A7_0 = (num * 172167645u ^ 4086699694u); continue; case 2u: output.WriteRawTag(24); arg_A7_0 = (num * 4055225164u ^ 2773748745u); continue; case 4u: output.WriteMessage(this.AgentId); arg_A7_0 = (num * 1918590036u ^ 1955767750u); continue; case 5u: output.WriteRawTag(10); arg_A7_0 = (num * 285140908u ^ 1114540736u); continue; case 6u: goto IL_D3; case 7u: arg_A7_0 = (((this.Reason == 0u) ? 1584505460u : 2139588253u) ^ num * 3561627953u); continue; } break; } return; IL_9D: arg_A7_0 = 4055245069u; goto IL_A2; IL_D3: output.WriteRawTag(18); output.WriteMessage(this.MemberId); arg_A7_0 = 3513833623u; goto IL_A2; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_0D; } goto IL_A2; uint arg_7E_0; while (true) { IL_79: uint num2; switch ((num2 = (arg_7E_0 ^ 2719086463u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_7E_0 = (num2 * 1752654629u ^ 1639826336u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_7E_0 = (num2 * 843092511u ^ 3055538294u); continue; case 2u: goto IL_A2; case 4u: arg_7E_0 = (((this.Reason == 0u) ? 3156784130u : 2504380037u) ^ num2 * 285206758u); continue; case 5u: goto IL_0D; } break; } return num; IL_0D: arg_7E_0 = 3180048742u; goto IL_79; IL_A2: num += 1 + CodedOutputStream.ComputeMessageSize(this.MemberId); arg_7E_0 = 2923074271u; goto IL_79; } public void MergeFrom(RemoveMemberRequest other) { if (other == null) { goto IL_50; } goto IL_194; uint arg_144_0; while (true) { IL_13F: uint num; switch ((num = (arg_144_0 ^ 4213797422u)) % 13u) { case 0u: goto IL_194; case 1u: arg_144_0 = (((this.memberId_ == null) ? 2346733417u : 3110664986u) ^ num * 1460421713u); continue; case 2u: arg_144_0 = ((other.Reason == 0u) ? 2813796315u : 3825197754u); continue; case 3u: this.agentId_ = new EntityId(); arg_144_0 = (num * 1090942264u ^ 1057377217u); continue; case 4u: this.Reason = other.Reason; arg_144_0 = (num * 1586344112u ^ 937048603u); continue; case 5u: arg_144_0 = ((other.memberId_ != null) ? 4253489080u : 3182075870u); continue; case 6u: this.MemberId.MergeFrom(other.MemberId); arg_144_0 = 3182075870u; continue; case 7u: return; case 8u: arg_144_0 = (((this.agentId_ == null) ? 2985472287u : 2221974812u) ^ num * 4014064727u); continue; case 9u: goto IL_50; case 10u: this.memberId_ = new EntityId(); arg_144_0 = (num * 2628479695u ^ 2005174259u); continue; case 12u: this.AgentId.MergeFrom(other.AgentId); arg_144_0 = 3574650703u; continue; } break; } return; IL_50: arg_144_0 = 2819978919u; goto IL_13F; IL_194: arg_144_0 = ((other.agentId_ == null) ? 3574650703u : 3360100709u); goto IL_13F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1E0: uint num; uint arg_184_0 = ((num = input.ReadTag()) == 0u) ? 3730349553u : 3898346080u; while (true) { uint num2; switch ((num2 = (arg_184_0 ^ 3180849407u)) % 16u) { case 0u: input.ReadMessage(this.memberId_); arg_184_0 = 4002857474u; continue; case 1u: arg_184_0 = (((num != 24u) ? 37202877u : 134123920u) ^ num2 * 2860089739u); continue; case 2u: input.ReadMessage(this.agentId_); arg_184_0 = 4099097045u; continue; case 3u: arg_184_0 = ((this.agentId_ == null) ? 2321990921u : 2653730893u); continue; case 4u: this.Reason = input.ReadUInt32(); arg_184_0 = 4099097045u; continue; case 5u: arg_184_0 = (((num != 18u) ? 560339527u : 1988380266u) ^ num2 * 2625444949u); continue; case 6u: this.agentId_ = new EntityId(); arg_184_0 = (num2 * 3898371771u ^ 1836646143u); continue; case 7u: this.memberId_ = new EntityId(); arg_184_0 = (num2 * 639540716u ^ 1620239163u); continue; case 8u: arg_184_0 = (num2 * 181902592u ^ 4226431445u); continue; case 9u: input.SkipLastField(); arg_184_0 = (num2 * 1172646784u ^ 1357940391u); continue; case 10u: goto IL_1E0; case 11u: arg_184_0 = 3898346080u; continue; case 12u: arg_184_0 = ((this.memberId_ == null) ? 2904916456u : 3910082319u); continue; case 13u: arg_184_0 = (num2 * 7571392u ^ 3663849749u); continue; case 15u: arg_184_0 = ((num != 10u) ? 3385003802u : 3856190748u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GetCAISInfoResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetCAISInfoResponse : IMessage<GetCAISInfoResponse>, IEquatable<GetCAISInfoResponse>, IDeepCloneable<GetCAISInfoResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetCAISInfoResponse.__c __9 = new GetCAISInfoResponse.__c(); internal GetCAISInfoResponse cctor>b__24_0() { return new GetCAISInfoResponse(); } } private static readonly MessageParser<GetCAISInfoResponse> _parser = new MessageParser<GetCAISInfoResponse>(new Func<GetCAISInfoResponse>(GetCAISInfoResponse.__c.__9.<.cctor>b__24_0)); public const int CaisInfoFieldNumber = 1; private CAIS caisInfo_; public static MessageParser<GetCAISInfoResponse> Parser { get { return GetCAISInfoResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[24]; } } MessageDescriptor IMessage.Descriptor { get { return GetCAISInfoResponse.Descriptor; } } public CAIS CaisInfo { get { return this.caisInfo_; } set { this.caisInfo_ = value; } } public GetCAISInfoResponse() { } public GetCAISInfoResponse(GetCAISInfoResponse other) : this() { while (true) { IL_44: int arg_2E_0 = -1645473740; while (true) { switch ((arg_2E_0 ^ -1864088540) % 3) { case 0: goto IL_44; case 1: this.CaisInfo = ((other.caisInfo_ != null) ? other.CaisInfo.Clone() : null); arg_2E_0 = -1534720244; continue; } return; } } } public GetCAISInfoResponse Clone() { return new GetCAISInfoResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetCAISInfoResponse); } public bool Equals(GetCAISInfoResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -20523666) % 7) { case 1: return true; case 2: goto IL_7A; case 3: return false; case 4: goto IL_3E; case 5: return false; case 6: arg_48_0 = (GetCAISInfoResponse.smethod_0(this.CaisInfo, other.CaisInfo) ? -177025624 : -1685401468); continue; } break; } return true; IL_3E: arg_48_0 = -1963159558; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -1547083614 : -1974903665); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 1437996059u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 14740586u)) % 4u) { case 1u: arg_4D_0 = (((this.caisInfo_ == null) ? 3875683289u : 2981558163u) ^ num2 * 2841513959u); continue; case 2u: num ^= GetCAISInfoResponse.smethod_1(this.CaisInfo); arg_4D_0 = (num2 * 4004892824u ^ 2015750014u); continue; case 3u: goto IL_69; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.caisInfo_ != null) { while (true) { IL_5B: uint arg_3F_0 = 1787592141u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 1888031004u)) % 4u) { case 0u: output.WriteMessage(this.CaisInfo); arg_3F_0 = (num * 1939130696u ^ 1485397390u); continue; case 1u: output.WriteRawTag(10); arg_3F_0 = (num * 3841198728u ^ 4262831080u); continue; case 3u: goto IL_5B; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.caisInfo_ != null) { while (true) { IL_46: uint arg_2E_0 = 1945233105u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 1444387294u)) % 3u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.CaisInfo); arg_2E_0 = (num2 * 1148751622u ^ 440114855u); continue; case 2u: goto IL_46; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(GetCAISInfoResponse other) { if (other == null) { goto IL_2F; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 2021516271u)) % 7u) { case 1u: this.CaisInfo.MergeFrom(other.CaisInfo); arg_7A_0 = 156656824u; continue; case 2u: goto IL_B1; case 3u: arg_7A_0 = (((this.caisInfo_ != null) ? 2235050151u : 2834346456u) ^ num * 292529578u); continue; case 4u: goto IL_2F; case 5u: return; case 6u: this.caisInfo_ = new CAIS(); arg_7A_0 = (num * 131055207u ^ 3126584566u); continue; } break; } return; IL_2F: arg_7A_0 = 2062552310u; goto IL_75; IL_B1: arg_7A_0 = ((other.caisInfo_ == null) ? 156656824u : 1552759712u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DC: uint num; uint arg_A1_0 = ((num = input.ReadTag()) == 0u) ? 1820014638u : 1232393844u; while (true) { uint num2; switch ((num2 = (arg_A1_0 ^ 1724917681u)) % 8u) { case 0u: goto IL_DC; case 1u: input.SkipLastField(); arg_A1_0 = (num2 * 3635837598u ^ 901074639u); continue; case 2u: input.ReadMessage(this.caisInfo_); arg_A1_0 = 367298625u; continue; case 3u: arg_A1_0 = ((this.caisInfo_ == null) ? 538335535u : 1600834323u); continue; case 4u: arg_A1_0 = 1232393844u; continue; case 5u: arg_A1_0 = ((num != 10u) ? 273451832u : 1005983786u); continue; case 6u: this.caisInfo_ = new CAIS(); arg_A1_0 = (num2 * 2545523083u ^ 2664163033u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/FieldAccessorBase.cs using Google.Protobuf.Compatibility; using System; using System.Reflection; namespace Google.Protobuf.Reflection { internal abstract class FieldAccessorBase : IFieldAccessor { private readonly Func<IMessage, object> getValueDelegate; private readonly FieldDescriptor descriptor; public FieldDescriptor Descriptor { get { return this.descriptor; } } internal FieldAccessorBase(PropertyInfo property, FieldDescriptor descriptor) { while (true) { IL_4A: uint arg_32_0 = 603488631u; while (true) { uint num; switch ((num = (arg_32_0 ^ 755106210u)) % 3u) { case 0u: goto IL_4A; case 2u: this.descriptor = descriptor; this.getValueDelegate = ReflectionUtil.CreateFuncIMessageObject(property.GetGetMethod()); arg_32_0 = (num * 2587189340u ^ 1876080986u); continue; } return; } } } public object GetValue(IMessage message) { return this.getValueDelegate(message); } public abstract void Clear(IMessage message); public abstract void SetValue(IMessage message, object value); } } <file_sep>/AuthServer.WorldServer.Game.Packets.PacketHandler/StoreHandler.cs using AuthServer.Network; using Framework.Constants.Net; using Framework.Network.Packets; using System; namespace AuthServer.WorldServer.Game.Packets.PacketHandler { public class StoreHandler { public static void HandleEnableStore(ref WorldClass session) { PacketWriter writer = new PacketWriter(ServerMessage.FeatureSystemStatusGlueScreen, true); BitPack expr_36 = new BitPack(writer, 0uL, 0uL, 0uL, 0uL); expr_36.Write<bool>(false); expr_36.Write<bool>(true); expr_36.Write<bool>(true); expr_36.Write<bool>(true); expr_36.Flush(); while (true) { IL_124: uint arg_FF_0 = 2305664110u; while (true) { uint num; switch ((num = (arg_FF_0 ^ 2963858355u)) % 6u) { case 0u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.DistributionList, true); arg_FF_0 = (num * 3917242240u ^ 3814418484u); continue; } case 2u: goto IL_124; case 3u: session.Send(ref writer); arg_FF_0 = (num * 3817472932u ^ 2280512839u); continue; case 4u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_FF_0 = (num * 468649160u ^ 1910400638u); continue; } case 5u: { PacketWriter packetWriter; BitPack expr_87 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); expr_87.Write<int>(0, 19); expr_87.Flush(); packetWriter.WriteUInt32(0u); arg_FF_0 = (num * 2615517037u ^ 2430575216u); continue; } } return; } } } } } <file_sep>/AuthServer/Globals.cs using System; namespace AuthServer { internal class Globals { public static byte[] SessionKey; public static byte[] ServerSalt; public static byte[] ClientSalt; public static byte[] Secret; public static byte[] JoinSecret; public static byte[] CertData = Globals.smethod_0(Module.smethod_35<string>(1140403124u)); static byte[] smethod_0(string string_0) { return Convert.FromBase64String(string_0); } } } <file_sep>/Bgs.Protocol.Channel.V1/ChannelTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public static class ChannelTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ChannelTypesReflection.descriptor; } } static ChannelTypesReflection() { ChannelTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(ChannelTypesReflection.smethod_1(ChannelTypesReflection.smethod_0(new string[] { Module.smethod_34<string>(2670550786u), Module.smethod_37<string>(2568733685u), Module.smethod_35<string>(2883301230u), Module.smethod_33<string>(3092355493u), Module.smethod_36<string>(2472057217u), Module.smethod_36<string>(2530754897u), Module.smethod_36<string>(967881377u), Module.smethod_35<string>(2817623433u), Module.smethod_33<string>(3561758050u), Module.smethod_36<string>(192314385u), Module.smethod_36<string>(2924408161u), Module.smethod_37<string>(85120885u), Module.smethod_34<string>(1442822498u), Module.smethod_37<string>(289598229u), Module.smethod_36<string>(1349795105u), Module.smethod_36<string>(4081888881u), Module.smethod_36<string>(2519015361u), Module.smethod_35<string>(2202264809u), Module.smethod_33<string>(2129631554u), Module.smethod_36<string>(1743448369u), Module.smethod_33<string>(2947787810u), Module.smethod_33<string>(3049880818u), Module.smethod_33<string>(493319042u), Module.smethod_37<string>(2977688373u), Module.smethod_35<string>(229701977u), Module.smethod_35<string>(1237064553u), Module.smethod_36<string>(3688235617u), Module.smethod_35<string>(2552106441u), Module.smethod_37<string>(2627088421u), Module.smethod_34<string>(2908774578u), Module.smethod_33<string>(1515661314u), Module.smethod_37<string>(2480965813u), Module.smethod_36<string>(3282842817u), Module.smethod_35<string>(271864297u), Module.smethod_34<string>(1783935234u), Module.smethod_34<string>(659095890u), Module.smethod_37<string>(2130365861u), Module.smethod_33<string>(388401650u), Module.smethod_34<string>(2805885634u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, InvitationTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(ChannelId).TypeHandle), ChannelId.Parser, new string[] { Module.smethod_33<string>(1649840030u), Module.smethod_34<string>(4183239592u), Module.smethod_35<string>(4021477587u) }, null, null, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(Message).TypeHandle), Message.Parser, new string[] { Module.smethod_37<string>(1754272416u), Module.smethod_35<string>(2560812294u) }, null, null, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(ListChannelsOptions).TypeHandle), ListChannelsOptions.Parser, new string[] { Module.smethod_34<string>(3969134856u), Module.smethod_34<string>(3875398244u), Module.smethod_33<string>(1982348402u), Module.smethod_36<string>(2505595523u), Module.smethod_34<string>(4156608080u), Module.smethod_36<string>(4257141770u), Module.smethod_35<string>(3602481294u), Module.smethod_35<string>(1769798451u) }, null, null, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(ChannelDescription).TypeHandle), ChannelDescription.Parser, new string[] { Module.smethod_37<string>(1199371946u), Module.smethod_37<string>(85415595u), Module.smethod_36<string>(3718803416u) }, null, null, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(ChannelInfo).TypeHandle), ChannelInfo.Parser, new string[] { Module.smethod_33<string>(3264357124u), Module.smethod_35<string>(188389614u) }, null, null, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(ChannelState).TypeHandle), ChannelState.Parser, new string[] { Module.smethod_34<string>(3125505348u), Module.smethod_35<string>(49076263u), Module.smethod_33<string>(4205493237u), Module.smethod_37<string>(3741310011u), Module.smethod_34<string>(3312978572u), Module.smethod_37<string>(3507566886u), Module.smethod_34<string>(2497012431u), Module.smethod_33<string>(1982348402u), Module.smethod_34<string>(2403275819u), Module.smethod_34<string>(4250344692u), Module.smethod_34<string>(3421418748u), Module.smethod_37<string>(3065603600u), Module.smethod_34<string>(396397089u), Module.smethod_37<string>(2802653636u) }, null, new Type[] { ChannelTypesReflection.smethod_2(typeof(ChannelState.Types.PrivacyLevel).TypeHandle) }, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(MemberState).TypeHandle), MemberState.Parser, new string[] { Module.smethod_37<string>(1754272416u), Module.smethod_36<string>(1553402902u), Module.smethod_37<string>(759059036u), Module.smethod_35<string>(2273479739u), Module.smethod_36<string>(283485193u) }, null, null, null), new GeneratedCodeInfo(ChannelTypesReflection.smethod_2(typeof(Member).TypeHandle), Member.Parser, new string[] { Module.smethod_33<string>(3259014625u), Module.smethod_34<string>(3340641939u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Account.V1/GetGameAccountStateResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetGameAccountStateResponse : IMessage<GetGameAccountStateResponse>, IEquatable<GetGameAccountStateResponse>, IDeepCloneable<GetGameAccountStateResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetGameAccountStateResponse.__c __9 = new GetGameAccountStateResponse.__c(); internal GetGameAccountStateResponse cctor>b__29_0() { return new GetGameAccountStateResponse(); } } private static readonly MessageParser<GetGameAccountStateResponse> _parser = new MessageParser<GetGameAccountStateResponse>(new Func<GetGameAccountStateResponse>(GetGameAccountStateResponse.__c.__9.<.cctor>b__29_0)); public const int StateFieldNumber = 1; private GameAccountState state_; public const int TagsFieldNumber = 2; private GameAccountFieldTags tags_; public static MessageParser<GetGameAccountStateResponse> Parser { get { return GetGameAccountStateResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[16]; } } MessageDescriptor IMessage.Descriptor { get { return GetGameAccountStateResponse.Descriptor; } } public GameAccountState State { get { return this.state_; } set { this.state_ = value; } } public GameAccountFieldTags Tags { get { return this.tags_; } set { this.tags_ = value; } } public GetGameAccountStateResponse() { } public GetGameAccountStateResponse(GetGameAccountStateResponse other) : this() { this.State = ((other.state_ != null) ? other.State.Clone() : null); this.Tags = ((other.tags_ != null) ? other.Tags.Clone() : null); } public GetGameAccountStateResponse Clone() { return new GetGameAccountStateResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetGameAccountStateResponse); } public bool Equals(GetGameAccountStateResponse other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1323597197) % 9) { case 0: goto IL_B5; case 2: return true; case 3: arg_77_0 = (GetGameAccountStateResponse.smethod_0(this.State, other.State) ? -908741856 : -2144884953); continue; case 4: return false; case 5: arg_77_0 = (GetGameAccountStateResponse.smethod_0(this.Tags, other.Tags) ? -1271037007 : -252493309); continue; case 6: return false; case 7: goto IL_15; case 8: return false; } break; } return true; IL_15: arg_77_0 = -799288465; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? -1987024882 : -1376178654); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.state_ != null) { goto IL_53; } goto IL_89; uint arg_5D_0; while (true) { IL_58: uint num2; switch ((num2 = (arg_5D_0 ^ 972023698u)) % 5u) { case 0u: goto IL_53; case 1u: goto IL_89; case 3u: num ^= GetGameAccountStateResponse.smethod_1(this.Tags); arg_5D_0 = (num2 * 926950938u ^ 1827043958u); continue; case 4u: num ^= GetGameAccountStateResponse.smethod_1(this.State); arg_5D_0 = (num2 * 2779760331u ^ 4007843714u); continue; } break; } return num; IL_53: arg_5D_0 = 1570266093u; goto IL_58; IL_89: arg_5D_0 = ((this.tags_ == null) ? 921783432u : 1429459497u); goto IL_58; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.state_ != null) { goto IL_6F; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 4046368760u)) % 6u) { case 0u: goto IL_6F; case 1u: output.WriteRawTag(10); output.WriteMessage(this.State); arg_79_0 = (num * 2928314373u ^ 3412639442u); continue; case 2u: output.WriteMessage(this.Tags); arg_79_0 = (num * 2676238138u ^ 1980482285u); continue; case 3u: goto IL_AC; case 4u: output.WriteRawTag(18); arg_79_0 = (num * 3496199146u ^ 569635552u); continue; } break; } return; IL_6F: arg_79_0 = 3124948493u; goto IL_74; IL_AC: arg_79_0 = ((this.tags_ == null) ? 3100068741u : 3237923918u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 1614356893u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 1211476962u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.State); arg_92_0 = (num2 * 1485459267u ^ 1874233305u); continue; case 2u: goto IL_B6; case 3u: arg_92_0 = ((this.tags_ == null) ? 1834386047u : 687683694u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Tags); arg_92_0 = (num2 * 2355269453u ^ 1593907043u); continue; case 5u: arg_92_0 = (((this.state_ == null) ? 1883569757u : 1645634882u) ^ num2 * 121039630u); continue; } return num; } } return num; } public void MergeFrom(GetGameAccountStateResponse other) { if (other == null) { goto IL_33; } goto IL_14A; uint arg_102_0; while (true) { IL_FD: uint num; switch ((num = (arg_102_0 ^ 1892481791u)) % 11u) { case 0u: goto IL_14A; case 1u: arg_102_0 = (((this.tags_ == null) ? 2344125312u : 3916094736u) ^ num * 990128318u); continue; case 3u: return; case 4u: this.State.MergeFrom(other.State); arg_102_0 = 622981360u; continue; case 5u: this.state_ = new GameAccountState(); arg_102_0 = (num * 414687475u ^ 2107910468u); continue; case 6u: this.tags_ = new GameAccountFieldTags(); arg_102_0 = (num * 1821042434u ^ 664099266u); continue; case 7u: arg_102_0 = ((other.tags_ != null) ? 389366833u : 365133917u); continue; case 8u: arg_102_0 = (((this.state_ == null) ? 2308334117u : 2295583830u) ^ num * 1149619373u); continue; case 9u: goto IL_33; case 10u: this.Tags.MergeFrom(other.Tags); arg_102_0 = 365133917u; continue; } break; } return; IL_33: arg_102_0 = 87484127u; goto IL_FD; IL_14A: arg_102_0 = ((other.state_ != null) ? 1120806657u : 622981360u); goto IL_FD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) != 0u) ? 168354529u : 735637615u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 551286024u)) % 14u) { case 0u: arg_145_0 = 168354529u; continue; case 1u: input.ReadMessage(this.state_); arg_145_0 = 1725644458u; continue; case 2u: goto IL_199; case 3u: this.state_ = new GameAccountState(); arg_145_0 = (num2 * 3317172354u ^ 3986807187u); continue; case 4u: this.tags_ = new GameAccountFieldTags(); arg_145_0 = (num2 * 279975593u ^ 133661808u); continue; case 5u: arg_145_0 = ((num == 10u) ? 1859719864u : 525649361u); continue; case 6u: arg_145_0 = ((this.state_ != null) ? 908608733u : 356847087u); continue; case 8u: arg_145_0 = (num2 * 3959509594u ^ 1024563074u); continue; case 9u: arg_145_0 = (((num == 18u) ? 2060387172u : 175771647u) ^ num2 * 857250640u); continue; case 10u: arg_145_0 = ((this.tags_ != null) ? 1094487730u : 1334113018u); continue; case 11u: arg_145_0 = (num2 * 84601455u ^ 4261616591u); continue; case 12u: input.ReadMessage(this.tags_); arg_145_0 = 1009970550u; continue; case 13u: input.SkipLastField(); arg_145_0 = (num2 * 812728783u ^ 2420013782u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/NoData.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class NoData : IMessage<NoData>, IEquatable<NoData>, IDeepCloneable<NoData>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly NoData.__c __9 = new NoData.__c(); internal NoData cctor>b__19_0() { return new NoData(); } } private static readonly MessageParser<NoData> _parser = new MessageParser<NoData>(new Func<NoData>(NoData.__c.__9.<.cctor>b__19_0)); public static MessageParser<NoData> Parser { get { return NoData._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return NoData.Descriptor; } } public NoData() { } public NoData(NoData other) : this() { } public NoData Clone() { return new NoData(this); } public override bool Equals(object other) { return this.Equals(other as NoData); } public bool Equals(NoData other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 118265190; IL_08: switch ((arg_0D_0 ^ 1436244536) % 4) { case 0: goto IL_03; case 2: return false; case 3: IL_27: arg_0D_0 = 8851293; goto IL_08; } return true; } public override int GetHashCode() { return 1; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { } public int CalculateSize() { return 0; } public void MergeFrom(NoData other) { } public void MergeFrom(CodedInputStream input) { while (true) { IL_4D: int arg_27_0 = (input.ReadTag() != 0u) ? -1815302333 : -91638782; while (true) { switch ((arg_27_0 ^ -33769758) % 4) { case 1: input.SkipLastField(); arg_27_0 = -857573356; continue; case 2: goto IL_4D; case 3: arg_27_0 = -1815302333; continue; } return; } } } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GetAchievementsFileRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GetAchievementsFileRequest : IMessage<GetAchievementsFileRequest>, IEquatable<GetAchievementsFileRequest>, IDeepCloneable<GetAchievementsFileRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAchievementsFileRequest.__c __9 = new GetAchievementsFileRequest.__c(); internal GetAchievementsFileRequest cctor>b__24_0() { return new GetAchievementsFileRequest(); } } private static readonly MessageParser<GetAchievementsFileRequest> _parser = new MessageParser<GetAchievementsFileRequest>(new Func<GetAchievementsFileRequest>(GetAchievementsFileRequest.__c.__9.<.cctor>b__24_0)); public const int HostFieldNumber = 1; private ProcessId host_; public static MessageParser<GetAchievementsFileRequest> Parser { get { return GetAchievementsFileRequest._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return GetAchievementsFileRequest.Descriptor; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public GetAchievementsFileRequest() { } public GetAchievementsFileRequest(GetAchievementsFileRequest other) : this() { this.Host = ((other.host_ != null) ? other.Host.Clone() : null); } public GetAchievementsFileRequest Clone() { return new GetAchievementsFileRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetAchievementsFileRequest); } public bool Equals(GetAchievementsFileRequest other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 960803077) % 7) { case 1: return false; case 2: return true; case 3: return false; case 4: arg_48_0 = ((!GetAchievementsFileRequest.smethod_0(this.Host, other.Host)) ? 219268756 : 1237394871); continue; case 5: goto IL_7A; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = 564539200; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 168076699 : 2013752118); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 4081816336u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 3884091701u)) % 4u) { case 1u: arg_4D_0 = (((this.host_ == null) ? 2722238817u : 3439394423u) ^ num2 * 2474616832u); continue; case 2u: num ^= GetAchievementsFileRequest.smethod_1(this.Host); arg_4D_0 = (num2 * 2350571084u ^ 3274660601u); continue; case 3u: goto IL_69; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.host_ != null) { while (true) { IL_5B: uint arg_3F_0 = 1906646536u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 1699423859u)) % 4u) { case 0u: goto IL_5B; case 1u: output.WriteMessage(this.Host); arg_3F_0 = (num * 3578540824u ^ 1718187197u); continue; case 3u: output.WriteRawTag(10); arg_3F_0 = (num * 2377326965u ^ 2994747261u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_6B: uint arg_4F_0 = 3477843463u; while (true) { uint num2; switch ((num2 = (arg_4F_0 ^ 3834349897u)) % 4u) { case 0u: goto IL_6B; case 2u: arg_4F_0 = (((this.host_ == null) ? 994279886u : 1934560824u) ^ num2 * 854923703u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_4F_0 = (num2 * 3069497530u ^ 1038269186u); continue; } return num; } } return num; } public void MergeFrom(GetAchievementsFileRequest other) { if (other == null) { goto IL_58; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 2294053253u)) % 7u) { case 0u: this.Host.MergeFrom(other.Host); arg_7A_0 = 3013838508u; continue; case 1u: goto IL_B1; case 2u: return; case 3u: goto IL_58; case 4u: this.host_ = new ProcessId(); arg_7A_0 = (num * 3243608735u ^ 2450391225u); continue; case 5u: arg_7A_0 = (((this.host_ == null) ? 2834770261u : 2958050217u) ^ num * 3148935056u); continue; } break; } return; IL_58: arg_7A_0 = 2212885438u; goto IL_75; IL_B1: arg_7A_0 = ((other.host_ != null) ? 2298601422u : 3013838508u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F0: uint num; uint arg_B0_0 = ((num = input.ReadTag()) != 0u) ? 1958159267u : 1274177388u; while (true) { uint num2; switch ((num2 = (arg_B0_0 ^ 455931694u)) % 9u) { case 0u: input.SkipLastField(); arg_B0_0 = (num2 * 3362808843u ^ 1790925770u); continue; case 1u: input.ReadMessage(this.host_); arg_B0_0 = 781959145u; continue; case 2u: this.host_ = new ProcessId(); arg_B0_0 = (num2 * 2391214092u ^ 3636397728u); continue; case 3u: goto IL_F0; case 4u: arg_B0_0 = 1958159267u; continue; case 5u: arg_B0_0 = ((this.host_ != null) ? 357026404u : 1542315669u); continue; case 6u: arg_B0_0 = (num2 * 3526348299u ^ 1942813606u); continue; case 7u: arg_B0_0 = ((num == 10u) ? 987677339u : 1280738997u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants/HighGuidMask.cs using System; namespace Framework.Constants { [Flags] public enum HighGuidMask { None = 0, Object = 1, Item = 2, Container = 4, Unit = 8, Player = 16, GameObject = 32, DynamicObject = 64, Corpse = 128, Guild = 256 } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountBlobList.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountBlobList : IMessage<GameAccountBlobList>, IEquatable<GameAccountBlobList>, IDeepCloneable<GameAccountBlobList>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountBlobList.__c __9 = new GameAccountBlobList.__c(); internal GameAccountBlobList cctor>b__24_0() { return new GameAccountBlobList(); } } private static readonly MessageParser<GameAccountBlobList> _parser = new MessageParser<GameAccountBlobList>(new Func<GameAccountBlobList>(GameAccountBlobList.__c.__9.<.cctor>b__24_0)); public const int BlobFieldNumber = 1; private static readonly FieldCodec<GameAccountBlob> _repeated_blob_codec = FieldCodec.ForMessage<GameAccountBlob>(10u, GameAccountBlob.Parser); private readonly RepeatedField<GameAccountBlob> blob_ = new RepeatedField<GameAccountBlob>(); public static MessageParser<GameAccountBlobList> Parser { get { return GameAccountBlobList._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountBlobList.Descriptor; } } public RepeatedField<GameAccountBlob> Blob { get { return this.blob_; } } public GameAccountBlobList() { } public GameAccountBlobList(GameAccountBlobList other) : this() { while (true) { IL_43: uint arg_2B_0 = 1571608958u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 877846825u)) % 3u) { case 1u: this.blob_ = other.blob_.Clone(); arg_2B_0 = (num * 407094707u ^ 3566395288u); continue; case 2u: goto IL_43; } return; } } } public GameAccountBlobList Clone() { return new GameAccountBlobList(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountBlobList); } public bool Equals(GameAccountBlobList other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -763604296) % 7) { case 0: goto IL_3E; case 2: return false; case 3: goto IL_7A; case 4: arg_48_0 = ((!this.blob_.Equals(other.blob_)) ? -1960216800 : -989969602); continue; case 5: return true; case 6: return false; } break; } return true; IL_3E: arg_48_0 = -19865949; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -723113670 : -2033815455); goto IL_43; } public override int GetHashCode() { return 1 ^ GameAccountBlobList.smethod_0(this.blob_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.blob_.WriteTo(output, GameAccountBlobList._repeated_blob_codec); } public int CalculateSize() { return 0 + this.blob_.CalculateSize(GameAccountBlobList._repeated_blob_codec); } public void MergeFrom(GameAccountBlobList other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -823558151; IL_08: switch ((arg_0D_0 ^ -1105889322) % 4) { case 0: goto IL_03; case 1: IL_27: this.blob_.Add(other.blob_); arg_0D_0 = -420283196; goto IL_08; case 3: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) != 0u) ? 1473645122u : 1686812574u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 412984941u)) % 6u) { case 0u: arg_68_0 = 1473645122u; continue; case 1u: arg_68_0 = ((num == 10u) ? 2002609877u : 1055136463u); continue; case 2u: input.SkipLastField(); arg_68_0 = (num2 * 9772577u ^ 1746816190u); continue; case 3u: goto IL_9B; case 4u: this.blob_.AddEntriesFrom(input, GameAccountBlobList._repeated_blob_codec); arg_68_0 = 1812463708u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GetLicensesResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetLicensesResponse : IMessage<GetLicensesResponse>, IEquatable<GetLicensesResponse>, IDeepCloneable<GetLicensesResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetLicensesResponse.__c __9 = new GetLicensesResponse.__c(); internal GetLicensesResponse cctor>b__24_0() { return new GetLicensesResponse(); } } private static readonly MessageParser<GetLicensesResponse> _parser = new MessageParser<GetLicensesResponse>(new Func<GetLicensesResponse>(GetLicensesResponse.__c.__9.<.cctor>b__24_0)); public const int LicensesFieldNumber = 1; private static readonly FieldCodec<AccountLicense> _repeated_licenses_codec; private readonly RepeatedField<AccountLicense> licenses_ = new RepeatedField<AccountLicense>(); public static MessageParser<GetLicensesResponse> Parser { get { return GetLicensesResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[18]; } } MessageDescriptor IMessage.Descriptor { get { return GetLicensesResponse.Descriptor; } } public RepeatedField<AccountLicense> Licenses { get { return this.licenses_; } } public GetLicensesResponse() { } public GetLicensesResponse(GetLicensesResponse other) : this() { while (true) { IL_43: uint arg_2B_0 = 2206327624u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 2851254482u)) % 3u) { case 0u: goto IL_43; case 1u: this.licenses_ = other.licenses_.Clone(); arg_2B_0 = (num * 4130054089u ^ 1660521777u); continue; } return; } } } public GetLicensesResponse Clone() { return new GetLicensesResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetLicensesResponse); } public bool Equals(GetLicensesResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -287515574) % 7) { case 0: goto IL_3E; case 1: return true; case 2: goto IL_7A; case 4: return false; case 5: return false; case 6: arg_48_0 = (this.licenses_.Equals(other.licenses_) ? -101443845 : -796685897); continue; } break; } return true; IL_3E: arg_48_0 = -713448591; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -535255561 : -802819687); goto IL_43; } public override int GetHashCode() { return 1 ^ GetLicensesResponse.smethod_0(this.licenses_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.licenses_.WriteTo(output, GetLicensesResponse._repeated_licenses_codec); } public int CalculateSize() { return 0 + this.licenses_.CalculateSize(GetLicensesResponse._repeated_licenses_codec); } public void MergeFrom(GetLicensesResponse other) { if (other == null) { return; } this.licenses_.Add(other.licenses_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) == 0u) ? 2574315613u : 3852361241u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 4187634862u)) % 6u) { case 0u: goto IL_9B; case 1u: arg_68_0 = ((num == 10u) ? 3139395910u : 2965425019u); continue; case 2u: this.licenses_.AddEntriesFrom(input, GetLicensesResponse._repeated_licenses_codec); arg_68_0 = 2171913076u; continue; case 4u: arg_68_0 = 3852361241u; continue; case 5u: input.SkipLastField(); arg_68_0 = (num2 * 131208628u ^ 2876275120u); continue; } return; } } } static GetLicensesResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 31179470u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 412345023u)) % 3u) { case 0u: goto IL_57; case 2u: GetLicensesResponse._repeated_licenses_codec = FieldCodec.ForMessage<AccountLicense>(10u, AccountLicense.Parser); arg_3F_0 = (num * 2098488761u ^ 574038117u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/ReflectionUtil.cs using System; using System.Linq.Expressions; using System.Reflection; namespace Google.Protobuf.Reflection { internal static class ReflectionUtil { internal static readonly Type[] EmptyTypes = new Type[0]; internal static Func<IMessage, object> CreateFuncIMessageObject(MethodInfo method) { ParameterExpression parameterExpression = ReflectionUtil.smethod_1(ReflectionUtil.smethod_0(typeof(IMessage).TypeHandle), Module.smethod_33<string>(2807358026u)); return Expression.Lambda<Func<IMessage, object>>(ReflectionUtil.smethod_3(ReflectionUtil.smethod_4(ReflectionUtil.smethod_3(parameterExpression, ReflectionUtil.smethod_2(method)), method), ReflectionUtil.smethod_0(typeof(object).TypeHandle)), new ParameterExpression[] { parameterExpression }).Compile(); } internal static Func<IMessage, T> CreateFuncIMessageT<T>(MethodInfo method) { ParameterExpression parameterExpression = ReflectionUtil.smethod_1(ReflectionUtil.smethod_0(typeof(IMessage).TypeHandle), Module.smethod_33<string>(2807358026u)); return Expression.Lambda<Func<IMessage, T>>(ReflectionUtil.smethod_3(ReflectionUtil.smethod_4(ReflectionUtil.smethod_3(parameterExpression, ReflectionUtil.smethod_2(method)), method), ReflectionUtil.smethod_0(typeof(T).TypeHandle)), new ParameterExpression[] { parameterExpression }).Compile(); } internal static Action<IMessage, object> CreateActionIMessageObject(MethodInfo method) { ParameterExpression parameterExpression = ReflectionUtil.smethod_1(ReflectionUtil.smethod_0(typeof(IMessage).TypeHandle), Module.smethod_33<string>(1235206692u)); ParameterExpression parameterExpression2 = ReflectionUtil.smethod_1(ReflectionUtil.smethod_0(typeof(object).TypeHandle), Module.smethod_33<string>(1561157727u)); Expression arg_63_0 = ReflectionUtil.smethod_3(parameterExpression, ReflectionUtil.smethod_2(method)); Expression expression = ReflectionUtil.smethod_3(parameterExpression2, ReflectionUtil.smethod_6(ReflectionUtil.smethod_5(method)[0])); return Expression.Lambda<Action<IMessage, object>>(ReflectionUtil.smethod_7(arg_63_0, method, new Expression[] { expression }), new ParameterExpression[] { parameterExpression, parameterExpression2 }).Compile(); } internal static Action<IMessage> CreateActionIMessage(MethodInfo method) { ParameterExpression parameterExpression = ReflectionUtil.smethod_1(ReflectionUtil.smethod_0(typeof(IMessage).TypeHandle), Module.smethod_34<string>(1303736968u)); return Expression.Lambda<Action<IMessage>>(ReflectionUtil.smethod_4(ReflectionUtil.smethod_3(parameterExpression, ReflectionUtil.smethod_2(method)), method), new ParameterExpression[] { parameterExpression }).Compile(); } static Type smethod_0(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static ParameterExpression smethod_1(Type type_0, string string_0) { return Expression.Parameter(type_0, string_0); } static Type smethod_2(MemberInfo memberInfo_0) { return memberInfo_0.DeclaringType; } static UnaryExpression smethod_3(Expression expression_0, Type type_0) { return Expression.Convert(expression_0, type_0); } static MethodCallExpression smethod_4(Expression expression_0, MethodInfo methodInfo_0) { return Expression.Call(expression_0, methodInfo_0); } static ParameterInfo[] smethod_5(MethodBase methodBase_0) { return methodBase_0.GetParameters(); } static Type smethod_6(ParameterInfo parameterInfo_0) { return parameterInfo_0.ParameterType; } static MethodCallExpression smethod_7(Expression expression_0, MethodInfo methodInfo_0, Expression[] expression_1) { return Expression.Call(expression_0, methodInfo_0, expression_1); } } } <file_sep>/Framework.Database.Auth.Entities/Realm.cs using System; namespace Framework.Database.Auth.Entities { public class Realm { public int Id { get; set; } public string Name { get; set; } public string IP { get; set; } public ushort Port { get; set; } public byte Type { get; set; } public byte Status { get; set; } public byte Flags { get; set; } } } <file_sep>/AuthServer.Packets.Handlers/MiscHandler.cs using System; namespace AuthServer.Packets.Handlers { internal class MiscHandler { } } <file_sep>/Google.Protobuf.Reflection/DescriptorProto.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class DescriptorProto : IMessage, IMessage<DescriptorProto>, IEquatable<DescriptorProto>, IDeepCloneable<DescriptorProto> { [DebuggerNonUserCode] public static class Types { [DebuggerNonUserCode] internal sealed class ExtensionRange : IMessage, IMessage<DescriptorProto.Types.ExtensionRange>, IEquatable<DescriptorProto.Types.ExtensionRange>, IDeepCloneable<DescriptorProto.Types.ExtensionRange> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DescriptorProto.Types.ExtensionRange.__c __9 = new DescriptorProto.Types.ExtensionRange.__c(); internal DescriptorProto.Types.ExtensionRange cctor>b__29_0() { return new DescriptorProto.Types.ExtensionRange(); } } private static readonly MessageParser<DescriptorProto.Types.ExtensionRange> _parser = new MessageParser<DescriptorProto.Types.ExtensionRange>(new Func<DescriptorProto.Types.ExtensionRange>(DescriptorProto.Types.ExtensionRange.__c.__9.<.cctor>b__29_0)); public const int StartFieldNumber = 1; private int start_; public const int EndFieldNumber = 2; private int end_; public static MessageParser<DescriptorProto.Types.ExtensionRange> Parser { get { return DescriptorProto.Types.ExtensionRange._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorProto.Descriptor.NestedTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return DescriptorProto.Types.ExtensionRange.Descriptor; } } public int Start { get { return this.start_; } set { this.start_ = value; } } public int End { get { return this.end_; } set { this.end_ = value; } } public ExtensionRange() { } public ExtensionRange(DescriptorProto.Types.ExtensionRange other) : this() { while (true) { IL_3E: uint arg_26_0 = 1739467784u; while (true) { uint num; switch ((num = (arg_26_0 ^ 1029643218u)) % 3u) { case 1u: this.start_ = other.start_; arg_26_0 = (num * 1597733706u ^ 3794671579u); continue; case 2u: goto IL_3E; } goto Block_1; } } Block_1: this.end_ = other.end_; } public DescriptorProto.Types.ExtensionRange Clone() { return new DescriptorProto.Types.ExtensionRange(this); } public override bool Equals(object other) { return this.Equals(other as DescriptorProto.Types.ExtensionRange); } public bool Equals(DescriptorProto.Types.ExtensionRange other) { if (other == null) { goto IL_63; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -555295860) % 9) { case 0: goto IL_AB; case 1: return false; case 2: goto IL_63; case 3: arg_6D_0 = ((this.End == other.End) ? -88631878 : -1752866596); continue; case 4: return true; case 5: arg_6D_0 = ((this.Start == other.Start) ? -1784332466 : -1254257531); continue; case 7: return false; case 8: return false; } break; } return true; IL_63: arg_6D_0 = -1838970218; goto IL_68; IL_AB: arg_6D_0 = ((other == this) ? -1276844413 : -858093); goto IL_68; } public override int GetHashCode() { int num = 1; if (this.Start != 0) { goto IL_5C; } goto IL_92; uint arg_66_0; while (true) { IL_61: uint num2; switch ((num2 = (arg_66_0 ^ 3891607265u)) % 5u) { case 0u: goto IL_5C; case 1u: goto IL_92; case 2u: num ^= this.Start.GetHashCode(); arg_66_0 = (num2 * 143938963u ^ 2530580921u); continue; case 3u: num ^= this.End.GetHashCode(); arg_66_0 = (num2 * 3047187721u ^ 2585560445u); continue; } break; } return num; IL_5C: arg_66_0 = 3121468707u; goto IL_61; IL_92: arg_66_0 = ((this.End == 0) ? 4239489920u : 3602230708u); goto IL_61; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Start != 0) { goto IL_62; } goto IL_BE; uint arg_87_0; while (true) { IL_82: uint num; switch ((num = (arg_87_0 ^ 1268967390u)) % 7u) { case 0u: output.WriteInt32(this.Start); arg_87_0 = (num * 395492775u ^ 321963370u); continue; case 1u: goto IL_BE; case 2u: goto IL_62; case 3u: output.WriteRawTag(16); arg_87_0 = (num * 1844482449u ^ 3374624320u); continue; case 4u: output.WriteInt32(this.End); arg_87_0 = (num * 638235529u ^ 523656415u); continue; case 5u: output.WriteRawTag(8); arg_87_0 = (num * 2576226262u ^ 2233547870u); continue; } break; } return; IL_62: arg_87_0 = 340378728u; goto IL_82; IL_BE: arg_87_0 = ((this.End == 0) ? 1244121103u : 616134704u); goto IL_82; } public int CalculateSize() { int num = 0; if (this.Start != 0) { goto IL_5A; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 2617099699u)) % 5u) { case 0u: goto IL_5A; case 1u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Start); arg_64_0 = (num2 * 2561356762u ^ 3054201345u); continue; case 2u: goto IL_90; case 4u: num += 1 + CodedOutputStream.ComputeInt32Size(this.End); arg_64_0 = (num2 * 4181058202u ^ 3439186715u); continue; } break; } return num; IL_5A: arg_64_0 = 4142319015u; goto IL_5F; IL_90: arg_64_0 = ((this.End == 0) ? 2429466311u : 4041564693u); goto IL_5F; } public void MergeFrom(DescriptorProto.Types.ExtensionRange other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1494162224u)) % 7u) { case 0u: goto IL_6C; case 1u: this.Start = other.Start; arg_76_0 = (num * 3494911442u ^ 3549775055u); continue; case 3u: return; case 4u: goto IL_AD; case 5u: arg_76_0 = ((other.End != 0) ? 1740853993u : 1644290467u); continue; case 6u: this.End = other.End; arg_76_0 = (num * 283787251u ^ 2423365208u); continue; } break; } return; IL_6C: arg_76_0 = 1990796354u; goto IL_71; IL_AD: arg_76_0 = ((other.Start == 0) ? 1205716805u : 1641804109u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_103: uint num; uint arg_BF_0 = ((num = input.ReadTag()) == 0u) ? 691541922u : 205673736u; while (true) { uint num2; switch ((num2 = (arg_BF_0 ^ 868539954u)) % 10u) { case 0u: arg_BF_0 = 205673736u; continue; case 1u: arg_BF_0 = (((num != 16u) ? 2049909693u : 1102000127u) ^ num2 * 4186359012u); continue; case 2u: goto IL_103; case 3u: arg_BF_0 = (num2 * 872738242u ^ 4202466298u); continue; case 4u: arg_BF_0 = ((num != 8u) ? 176650789u : 317259902u); continue; case 5u: input.SkipLastField(); arg_BF_0 = (num2 * 2072505220u ^ 1643582543u); continue; case 6u: this.Start = input.ReadInt32(); arg_BF_0 = 2094360391u; continue; case 7u: this.End = input.ReadInt32(); arg_BF_0 = 126832720u; continue; case 9u: arg_BF_0 = (num2 * 4035856329u ^ 3349648681u); continue; } return; } } } } [DebuggerNonUserCode] internal sealed class ReservedRange : IMessage, IMessage<DescriptorProto.Types.ReservedRange>, IEquatable<DescriptorProto.Types.ReservedRange>, IDeepCloneable<DescriptorProto.Types.ReservedRange> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DescriptorProto.Types.ReservedRange.__c __9 = new DescriptorProto.Types.ReservedRange.__c(); internal DescriptorProto.Types.ReservedRange cctor>b__29_0() { return new DescriptorProto.Types.ReservedRange(); } } private static readonly MessageParser<DescriptorProto.Types.ReservedRange> _parser = new MessageParser<DescriptorProto.Types.ReservedRange>(new Func<DescriptorProto.Types.ReservedRange>(DescriptorProto.Types.ReservedRange.__c.__9.<.cctor>b__29_0)); public const int StartFieldNumber = 1; private int start_; public const int EndFieldNumber = 2; private int end_; public static MessageParser<DescriptorProto.Types.ReservedRange> Parser { get { return DescriptorProto.Types.ReservedRange._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorProto.Descriptor.NestedTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return DescriptorProto.Types.ReservedRange.Descriptor; } } public int Start { get { return this.start_; } set { this.start_ = value; } } public int End { get { return this.end_; } set { this.end_ = value; } } public ReservedRange() { } public ReservedRange(DescriptorProto.Types.ReservedRange other) : this() { while (true) { IL_3E: uint arg_26_0 = 1504036284u; while (true) { uint num; switch ((num = (arg_26_0 ^ 2074449701u)) % 3u) { case 0u: goto IL_3E; case 2u: this.start_ = other.start_; arg_26_0 = (num * 1859820189u ^ 63783001u); continue; } goto Block_1; } } Block_1: this.end_ = other.end_; } public DescriptorProto.Types.ReservedRange Clone() { return new DescriptorProto.Types.ReservedRange(this); } public override bool Equals(object other) { return this.Equals(other as DescriptorProto.Types.ReservedRange); } public bool Equals(DescriptorProto.Types.ReservedRange other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ 868207482) % 9) { case 0: arg_6D_0 = ((this.Start != other.Start) ? 1446644057 : 1833418626); continue; case 1: goto IL_AB; case 2: return false; case 3: return false; case 4: arg_6D_0 = ((this.End != other.End) ? 2137828727 : 656776948); continue; case 6: return true; case 7: return false; case 8: goto IL_15; } break; } return true; IL_15: arg_6D_0 = 134045798; goto IL_68; IL_AB: arg_6D_0 = ((other == this) ? 1556229286 : 1601241376); goto IL_68; } public override int GetHashCode() { int num = 1; if (this.Start != 0) { goto IL_3C; } goto IL_92; uint arg_66_0; while (true) { IL_61: uint num2; switch ((num2 = (arg_66_0 ^ 1407222453u)) % 5u) { case 0u: num ^= this.End.GetHashCode(); arg_66_0 = (num2 * 2922600868u ^ 1195797937u); continue; case 2u: goto IL_3C; case 3u: goto IL_92; case 4u: num ^= this.Start.GetHashCode(); arg_66_0 = (num2 * 2458470846u ^ 1934501257u); continue; } break; } return num; IL_3C: arg_66_0 = 310522343u; goto IL_61; IL_92: arg_66_0 = ((this.End == 0) ? 2049451777u : 293248377u); goto IL_61; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Start != 0) { goto IL_1A; } goto IL_AB; uint arg_78_0; while (true) { IL_73: uint num; switch ((num = (arg_78_0 ^ 3099900897u)) % 6u) { case 0u: goto IL_AB; case 1u: output.WriteRawTag(16); output.WriteInt32(this.End); arg_78_0 = (num * 4120538908u ^ 2429316942u); continue; case 2u: output.WriteRawTag(8); arg_78_0 = (num * 1659929610u ^ 2609415049u); continue; case 4u: output.WriteInt32(this.Start); arg_78_0 = (num * 3757644112u ^ 4104468977u); continue; case 5u: goto IL_1A; } break; } return; IL_1A: arg_78_0 = 3614876171u; goto IL_73; IL_AB: arg_78_0 = ((this.End == 0) ? 2781806098u : 2439555344u); goto IL_73; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 896737828u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 111735421u)) % 6u) { case 1u: arg_92_0 = ((this.End != 0) ? 1064325326u : 1322373821u); continue; case 2u: goto IL_B6; case 3u: arg_92_0 = (((this.Start != 0) ? 681299985u : 828487736u) ^ num2 * 396265936u); continue; case 4u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Start); arg_92_0 = (num2 * 1971898209u ^ 4099601620u); continue; case 5u: num += 1 + CodedOutputStream.ComputeInt32Size(this.End); arg_92_0 = (num2 * 3399532082u ^ 1277260363u); continue; } return num; } } return num; } public void MergeFrom(DescriptorProto.Types.ReservedRange other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1372738807u)) % 7u) { case 0u: this.Start = other.Start; arg_76_0 = (num * 2076763065u ^ 3639838766u); continue; case 1u: return; case 2u: goto IL_AD; case 4u: this.End = other.End; arg_76_0 = (num * 965331336u ^ 1461406159u); continue; case 5u: arg_76_0 = ((other.End != 0) ? 2137583160u : 683511095u); continue; case 6u: goto IL_15; } break; } return; IL_15: arg_76_0 = 857955314u; goto IL_71; IL_AD: arg_76_0 = ((other.Start != 0) ? 1011948201u : 757298112u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_ED: uint num; uint arg_AD_0 = ((num = input.ReadTag()) == 0u) ? 3320721624u : 3447309381u; while (true) { uint num2; switch ((num2 = (arg_AD_0 ^ 4227868972u)) % 9u) { case 0u: this.Start = input.ReadInt32(); arg_AD_0 = 3494756918u; continue; case 1u: arg_AD_0 = (num2 * 1022882729u ^ 3440160805u); continue; case 2u: input.SkipLastField(); arg_AD_0 = (num2 * 3650429013u ^ 1028085712u); continue; case 3u: goto IL_ED; case 4u: arg_AD_0 = 3447309381u; continue; case 5u: arg_AD_0 = ((num != 8u) ? 2404422357u : 2148825140u); continue; case 7u: arg_AD_0 = (((num != 16u) ? 3420300013u : 2656986637u) ^ num2 * 1548837938u); continue; case 8u: this.End = input.ReadInt32(); arg_AD_0 = 4003680783u; continue; } return; } } } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DescriptorProto.__c __9 = new DescriptorProto.__c(); internal DescriptorProto cctor>b__70_0() { return new DescriptorProto(); } } private static readonly MessageParser<DescriptorProto> _parser = new MessageParser<DescriptorProto>(new Func<DescriptorProto>(DescriptorProto.__c.__9.<.cctor>b__70_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int FieldFieldNumber = 2; private static readonly FieldCodec<FieldDescriptorProto> _repeated_field_codec; private readonly RepeatedField<FieldDescriptorProto> field_ = new RepeatedField<FieldDescriptorProto>(); public const int ExtensionFieldNumber = 6; private static readonly FieldCodec<FieldDescriptorProto> _repeated_extension_codec; private readonly RepeatedField<FieldDescriptorProto> extension_ = new RepeatedField<FieldDescriptorProto>(); public const int NestedTypeFieldNumber = 3; private static readonly FieldCodec<DescriptorProto> _repeated_nestedType_codec; private readonly RepeatedField<DescriptorProto> nestedType_ = new RepeatedField<DescriptorProto>(); public const int EnumTypeFieldNumber = 4; private static readonly FieldCodec<EnumDescriptorProto> _repeated_enumType_codec; private readonly RepeatedField<EnumDescriptorProto> enumType_ = new RepeatedField<EnumDescriptorProto>(); public const int ExtensionRangeFieldNumber = 5; private static readonly FieldCodec<DescriptorProto.Types.ExtensionRange> _repeated_extensionRange_codec; private readonly RepeatedField<DescriptorProto.Types.ExtensionRange> extensionRange_ = new RepeatedField<DescriptorProto.Types.ExtensionRange>(); public const int OneofDeclFieldNumber = 8; private static readonly FieldCodec<OneofDescriptorProto> _repeated_oneofDecl_codec; private readonly RepeatedField<OneofDescriptorProto> oneofDecl_ = new RepeatedField<OneofDescriptorProto>(); public const int OptionsFieldNumber = 7; private MessageOptions options_; public const int ReservedRangeFieldNumber = 9; private static readonly FieldCodec<DescriptorProto.Types.ReservedRange> _repeated_reservedRange_codec; private readonly RepeatedField<DescriptorProto.Types.ReservedRange> reservedRange_ = new RepeatedField<DescriptorProto.Types.ReservedRange>(); public const int ReservedNameFieldNumber = 10; private static readonly FieldCodec<string> _repeated_reservedName_codec; private readonly RepeatedField<string> reservedName_ = new RepeatedField<string>(); public static MessageParser<DescriptorProto> Parser { get { return DescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return DescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public RepeatedField<FieldDescriptorProto> Field { get { return this.field_; } } public RepeatedField<FieldDescriptorProto> Extension { get { return this.extension_; } } public RepeatedField<DescriptorProto> NestedType { get { return this.nestedType_; } } public RepeatedField<EnumDescriptorProto> EnumType { get { return this.enumType_; } } public RepeatedField<DescriptorProto.Types.ExtensionRange> ExtensionRange { get { return this.extensionRange_; } } public RepeatedField<OneofDescriptorProto> OneofDecl { get { return this.oneofDecl_; } } public MessageOptions Options { get { return this.options_; } set { this.options_ = value; } } public RepeatedField<DescriptorProto.Types.ReservedRange> ReservedRange { get { return this.reservedRange_; } } public RepeatedField<string> ReservedName { get { return this.reservedName_; } } public DescriptorProto() { } public DescriptorProto(DescriptorProto other) : this() { while (true) { IL_16F: uint arg_13A_0 = 3737671997u; while (true) { uint num; switch ((num = (arg_13A_0 ^ 2786279119u)) % 10u) { case 0u: this.extensionRange_ = other.extensionRange_.Clone(); this.oneofDecl_ = other.oneofDecl_.Clone(); arg_13A_0 = (num * 1426891333u ^ 713787488u); continue; case 1u: this.enumType_ = other.enumType_.Clone(); arg_13A_0 = (num * 559222720u ^ 1786004353u); continue; case 2u: this.nestedType_ = other.nestedType_.Clone(); arg_13A_0 = (num * 2915151401u ^ 2420237946u); continue; case 3u: this.reservedRange_ = other.reservedRange_.Clone(); arg_13A_0 = (num * 2114701566u ^ 1811555524u); continue; case 4u: this.name_ = other.name_; this.field_ = other.field_.Clone(); arg_13A_0 = (num * 1953943978u ^ 508941505u); continue; case 5u: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_13A_0 = 4148131276u; continue; case 7u: this.reservedName_ = other.reservedName_.Clone(); arg_13A_0 = (num * 648981813u ^ 2260134944u); continue; case 8u: this.extension_ = other.extension_.Clone(); arg_13A_0 = (num * 668153040u ^ 2807106685u); continue; case 9u: goto IL_16F; } return; } } } public DescriptorProto Clone() { return new DescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as DescriptorProto); } public bool Equals(DescriptorProto other) { if (other == null) { goto IL_1E8; } goto IL_270; int arg_1F2_0; while (true) { IL_1ED: switch ((arg_1F2_0 ^ -13444949) % 25) { case 0: goto IL_1E8; case 1: return false; case 3: arg_1F2_0 = (this.nestedType_.Equals(other.nestedType_) ? -353159325 : -1408254852); continue; case 4: goto IL_270; case 5: arg_1F2_0 = ((!DescriptorProto.smethod_0(this.Name, other.Name)) ? -1412534110 : -2056085986); continue; case 6: return false; case 7: return false; case 8: arg_1F2_0 = ((!this.field_.Equals(other.field_)) ? -156160738 : -2022672407); continue; case 9: return true; case 10: return false; case 11: return false; case 12: arg_1F2_0 = ((!this.extension_.Equals(other.extension_)) ? -1587793142 : -265113774); continue; case 13: return false; case 14: return false; case 15: arg_1F2_0 = ((!this.reservedName_.Equals(other.reservedName_)) ? -1849367812 : -1783867394); continue; case 16: arg_1F2_0 = (this.oneofDecl_.Equals(other.oneofDecl_) ? -143251309 : -1414010705); continue; case 17: return false; case 18: arg_1F2_0 = (this.enumType_.Equals(other.enumType_) ? -1465930270 : -800022172); continue; case 19: arg_1F2_0 = ((!this.reservedRange_.Equals(other.reservedRange_)) ? -1088876042 : -1819593568); continue; case 20: arg_1F2_0 = ((!this.extensionRange_.Equals(other.extensionRange_)) ? -1932542572 : -759641179); continue; case 21: return false; case 22: arg_1F2_0 = ((!DescriptorProto.smethod_1(this.Options, other.Options)) ? -1638814308 : -286414215); continue; case 23: return false; case 24: return false; } break; } return true; IL_1E8: arg_1F2_0 = -1759673879; goto IL_1ED; IL_270: arg_1F2_0 = ((other == this) ? -775247756 : -876351615); goto IL_1ED; } public override int GetHashCode() { int num = 1; while (true) { IL_164: uint arg_12F_0 = 2387537914u; while (true) { uint num2; switch ((num2 = (arg_12F_0 ^ 2397943059u)) % 10u) { case 0u: num ^= DescriptorProto.smethod_3(this.field_); arg_12F_0 = 2520580176u; continue; case 1u: arg_12F_0 = (((DescriptorProto.smethod_2(this.Name) != 0) ? 1224643848u : 1074282747u) ^ num2 * 3698746314u); continue; case 2u: arg_12F_0 = (((this.options_ == null) ? 1690788017u : 57501650u) ^ num2 * 4209557736u); continue; case 3u: goto IL_164; case 4u: num ^= DescriptorProto.smethod_3(this.oneofDecl_); arg_12F_0 = (num2 * 3601486886u ^ 2538200169u); continue; case 5u: num ^= DescriptorProto.smethod_3(this.extension_); arg_12F_0 = (num2 * 374613136u ^ 700422539u); continue; case 7u: num ^= DescriptorProto.smethod_3(this.Name); arg_12F_0 = (num2 * 1660191895u ^ 3558513142u); continue; case 8u: num ^= DescriptorProto.smethod_3(this.nestedType_); num ^= DescriptorProto.smethod_3(this.enumType_); num ^= DescriptorProto.smethod_3(this.extensionRange_); arg_12F_0 = (num2 * 677873243u ^ 2855109465u); continue; case 9u: num ^= DescriptorProto.smethod_3(this.Options); arg_12F_0 = (num2 * 3943070392u ^ 3523316345u); continue; } goto Block_3; } } Block_3: num ^= DescriptorProto.smethod_3(this.reservedRange_); return num ^ DescriptorProto.smethod_3(this.reservedName_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (DescriptorProto.smethod_2(this.Name) != 0) { goto IL_DE; } goto IL_17C; uint arg_143_0; while (true) { IL_13E: uint num; switch ((num = (arg_143_0 ^ 2203887120u)) % 11u) { case 0u: arg_143_0 = (((this.options_ != null) ? 1111936241u : 1359058969u) ^ num * 2958987195u); continue; case 1u: output.WriteMessage(this.Options); arg_143_0 = (num * 2076001967u ^ 34687644u); continue; case 2u: output.WriteRawTag(58); arg_143_0 = (num * 1400042682u ^ 1370014920u); continue; case 3u: goto IL_DE; case 4u: this.extension_.WriteTo(output, DescriptorProto._repeated_extension_codec); arg_143_0 = (num * 2552293976u ^ 367891599u); continue; case 5u: this.reservedRange_.WriteTo(output, DescriptorProto._repeated_reservedRange_codec); arg_143_0 = (num * 3363857388u ^ 502170472u); continue; case 6u: this.nestedType_.WriteTo(output, DescriptorProto._repeated_nestedType_codec); this.enumType_.WriteTo(output, DescriptorProto._repeated_enumType_codec); this.extensionRange_.WriteTo(output, DescriptorProto._repeated_extensionRange_codec); arg_143_0 = (num * 2406257607u ^ 4156160412u); continue; case 7u: output.WriteRawTag(10); output.WriteString(this.Name); arg_143_0 = (num * 2196176410u ^ 939245272u); continue; case 8u: this.oneofDecl_.WriteTo(output, DescriptorProto._repeated_oneofDecl_codec); arg_143_0 = 2979185796u; continue; case 10u: goto IL_17C; } break; } this.reservedName_.WriteTo(output, DescriptorProto._repeated_reservedName_codec); return; IL_DE: arg_143_0 = 3837893268u; goto IL_13E; IL_17C: this.field_.WriteTo(output, DescriptorProto._repeated_field_codec); arg_143_0 = 3357667102u; goto IL_13E; } public int CalculateSize() { int num = 0; if (DescriptorProto.smethod_2(this.Name) != 0) { goto IL_AD; } goto IL_159; uint arg_128_0; while (true) { IL_123: uint num2; switch ((num2 = (arg_128_0 ^ 1643899310u)) % 9u) { case 0u: arg_128_0 = (((this.options_ == null) ? 1253809631u : 1887571869u) ^ num2 * 1893566793u); continue; case 2u: num += this.extension_.CalculateSize(DescriptorProto._repeated_extension_codec); num += this.nestedType_.CalculateSize(DescriptorProto._repeated_nestedType_codec); num += this.enumType_.CalculateSize(DescriptorProto._repeated_enumType_codec); arg_128_0 = (num2 * 2211218012u ^ 1952878928u); continue; case 3u: goto IL_AD; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_128_0 = (num2 * 708983735u ^ 726272458u); continue; case 5u: num += this.extensionRange_.CalculateSize(DescriptorProto._repeated_extensionRange_codec); num += this.oneofDecl_.CalculateSize(DescriptorProto._repeated_oneofDecl_codec); arg_128_0 = (num2 * 3112164580u ^ 4135329366u); continue; case 6u: goto IL_159; case 7u: num += this.reservedRange_.CalculateSize(DescriptorProto._repeated_reservedRange_codec); arg_128_0 = 144729181u; continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_128_0 = (num2 * 3680429301u ^ 102458601u); continue; } break; } return num + this.reservedName_.CalculateSize(DescriptorProto._repeated_reservedName_codec); IL_AD: arg_128_0 = 1548641655u; goto IL_123; IL_159: num += this.field_.CalculateSize(DescriptorProto._repeated_field_codec); arg_128_0 = 697977197u; goto IL_123; } public void MergeFrom(DescriptorProto other) { if (other == null) { goto IL_C8; } goto IL_21C; uint arg_1C0_0; while (true) { IL_1BB: uint num; switch ((num = (arg_1C0_0 ^ 3915493789u)) % 16u) { case 0u: this.oneofDecl_.Add(other.oneofDecl_); arg_1C0_0 = (num * 13623282u ^ 1340552521u); continue; case 1u: goto IL_21C; case 2u: arg_1C0_0 = (((this.options_ == null) ? 1258400576u : 1058104754u) ^ num * 4284462880u); continue; case 3u: this.extensionRange_.Add(other.extensionRange_); arg_1C0_0 = (num * 3486938875u ^ 1516595884u); continue; case 4u: arg_1C0_0 = (((other.options_ != null) ? 1266426187u : 1793881135u) ^ num * 43656649u); continue; case 5u: this.field_.Add(other.field_); arg_1C0_0 = 3311910545u; continue; case 6u: this.reservedRange_.Add(other.reservedRange_); arg_1C0_0 = 2682857223u; continue; case 7u: this.enumType_.Add(other.enumType_); arg_1C0_0 = (num * 616861944u ^ 2823835670u); continue; case 8u: goto IL_C8; case 9u: this.Name = other.Name; arg_1C0_0 = (num * 2802454334u ^ 431911590u); continue; case 10u: this.reservedName_.Add(other.reservedName_); arg_1C0_0 = (num * 4081544135u ^ 3249970512u); continue; case 12u: this.extension_.Add(other.extension_); this.nestedType_.Add(other.nestedType_); arg_1C0_0 = (num * 3436774974u ^ 2247095042u); continue; case 13u: this.options_ = new MessageOptions(); arg_1C0_0 = (num * 1116099728u ^ 3506084770u); continue; case 14u: return; case 15u: this.Options.MergeFrom(other.Options); arg_1C0_0 = 2558415451u; continue; } break; } return; IL_C8: arg_1C0_0 = 2443984611u; goto IL_1BB; IL_21C: arg_1C0_0 = ((DescriptorProto.smethod_2(other.Name) == 0) ? 3309215592u : 3420477988u); goto IL_1BB; } public void MergeFrom(CodedInputStream input) { while (true) { IL_4C7: uint num; uint arg_40F_0 = ((num = input.ReadTag()) != 0u) ? 409487760u : 1015295542u; while (true) { uint num2; switch ((num2 = (arg_40F_0 ^ 398292297u)) % 39u) { case 0u: arg_40F_0 = ((num == 66u) ? 1121199748u : 233340508u); continue; case 1u: this.reservedRange_.AddEntriesFrom(input, DescriptorProto._repeated_reservedRange_codec); arg_40F_0 = 1634119795u; continue; case 2u: arg_40F_0 = ((num == 26u) ? 2134431617u : 1463871134u); continue; case 4u: this.options_ = new MessageOptions(); arg_40F_0 = (num2 * 915210700u ^ 3130450510u); continue; case 5u: goto IL_4C7; case 6u: arg_40F_0 = (num2 * 1027170764u ^ 1456887935u); continue; case 7u: arg_40F_0 = ((num > 42u) ? 834867009u : 1903098882u); continue; case 8u: arg_40F_0 = (((num != 10u) ? 2526953912u : 3014714427u) ^ num2 * 836508119u); continue; case 9u: arg_40F_0 = (num2 * 3558257500u ^ 156646595u); continue; case 10u: arg_40F_0 = ((this.options_ != null) ? 2147225322u : 1951846330u); continue; case 11u: arg_40F_0 = (((num == 74u) ? 755341932u : 885041801u) ^ num2 * 3990539562u); continue; case 12u: arg_40F_0 = (num2 * 1736596172u ^ 2039505311u); continue; case 13u: this.oneofDecl_.AddEntriesFrom(input, DescriptorProto._repeated_oneofDecl_codec); arg_40F_0 = 347103625u; continue; case 14u: arg_40F_0 = (((num == 18u) ? 3627191998u : 2641144805u) ^ num2 * 361776240u); continue; case 15u: arg_40F_0 = (((num > 18u) ? 3192232106u : 3517302928u) ^ num2 * 438208700u); continue; case 16u: this.enumType_.AddEntriesFrom(input, DescriptorProto._repeated_enumType_codec); arg_40F_0 = 426014743u; continue; case 17u: arg_40F_0 = (((num != 42u) ? 3565152621u : 2444123715u) ^ num2 * 3807718048u); continue; case 18u: this.field_.AddEntriesFrom(input, DescriptorProto._repeated_field_codec); arg_40F_0 = 1749832799u; continue; case 19u: arg_40F_0 = (num2 * 3467395013u ^ 2730783669u); continue; case 20u: this.Name = input.ReadString(); arg_40F_0 = 130494874u; continue; case 21u: this.extension_.AddEntriesFrom(input, DescriptorProto._repeated_extension_codec); arg_40F_0 = 426014743u; continue; case 22u: arg_40F_0 = (num2 * 1285189599u ^ 1666188596u); continue; case 23u: arg_40F_0 = 409487760u; continue; case 24u: arg_40F_0 = (num2 * 379803861u ^ 2787130327u); continue; case 25u: this.extensionRange_.AddEntriesFrom(input, DescriptorProto._repeated_extensionRange_codec); arg_40F_0 = 438713382u; continue; case 26u: this.reservedName_.AddEntriesFrom(input, DescriptorProto._repeated_reservedName_codec); arg_40F_0 = 426014743u; continue; case 27u: arg_40F_0 = ((num > 58u) ? 956065016u : 1063231596u); continue; case 28u: arg_40F_0 = (num2 * 3814297419u ^ 3395830288u); continue; case 29u: this.nestedType_.AddEntriesFrom(input, DescriptorProto._repeated_nestedType_codec); arg_40F_0 = 1867896759u; continue; case 30u: arg_40F_0 = (num2 * 2371190266u ^ 2585492136u); continue; case 31u: arg_40F_0 = (num2 * 2521033165u ^ 3688501372u); continue; case 32u: input.SkipLastField(); arg_40F_0 = 1845758972u; continue; case 33u: arg_40F_0 = (((num == 50u) ? 2340288310u : 3921155832u) ^ num2 * 2971252505u); continue; case 34u: arg_40F_0 = (((num == 34u) ? 1117987169u : 698760861u) ^ num2 * 3045455260u); continue; case 35u: input.ReadMessage(this.options_); arg_40F_0 = 426014743u; continue; case 36u: arg_40F_0 = (((num == 58u) ? 4105672045u : 3881325873u) ^ num2 * 571056719u); continue; case 37u: arg_40F_0 = (num2 * 2543368684u ^ 3477377347u); continue; case 38u: arg_40F_0 = (((num != 82u) ? 2972497918u : 3890191386u) ^ num2 * 1505327063u); continue; } return; } } } static DescriptorProto() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_12E: uint arg_102_0 = 914933774u; while (true) { uint num; switch ((num = (arg_102_0 ^ 424027527u)) % 8u) { case 0u: DescriptorProto._repeated_reservedName_codec = FieldCodec.ForString(82u); arg_102_0 = (num * 1359367408u ^ 1865633553u); continue; case 1u: DescriptorProto._repeated_field_codec = FieldCodec.ForMessage<FieldDescriptorProto>(18u, FieldDescriptorProto.Parser); arg_102_0 = (num * 2109606014u ^ 2093563732u); continue; case 2u: goto IL_12E; case 3u: DescriptorProto._repeated_reservedRange_codec = FieldCodec.ForMessage<DescriptorProto.Types.ReservedRange>(74u, DescriptorProto.Types.ReservedRange.Parser); arg_102_0 = (num * 2377833491u ^ 1525932254u); continue; case 4u: DescriptorProto._repeated_oneofDecl_codec = FieldCodec.ForMessage<OneofDescriptorProto>(66u, OneofDescriptorProto.Parser); arg_102_0 = (num * 3096480944u ^ 4055953380u); continue; case 5u: DescriptorProto._repeated_extension_codec = FieldCodec.ForMessage<FieldDescriptorProto>(50u, FieldDescriptorProto.Parser); DescriptorProto._repeated_nestedType_codec = FieldCodec.ForMessage<DescriptorProto>(26u, DescriptorProto.Parser); DescriptorProto._repeated_enumType_codec = FieldCodec.ForMessage<EnumDescriptorProto>(34u, EnumDescriptorProto.Parser); arg_102_0 = (num * 1052581341u ^ 287246001u); continue; case 7u: DescriptorProto._repeated_extensionRange_codec = FieldCodec.ForMessage<DescriptorProto.Types.ExtensionRange>(42u, DescriptorProto.Types.ExtensionRange.Parser); arg_102_0 = (num * 610251679u ^ 1004358850u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountBlob.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountBlob : IMessage<AccountBlob>, IEquatable<AccountBlob>, IDeepCloneable<AccountBlob>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountBlob.__c __9 = new AccountBlob.__c(); internal AccountBlob cctor>b__119_0() { return new AccountBlob(); } } private static readonly MessageParser<AccountBlob> _parser = new MessageParser<AccountBlob>(new Func<AccountBlob>(AccountBlob.__c.__9.<.cctor>b__119_0)); public const int IdFieldNumber = 2; private uint id_; public const int RegionFieldNumber = 3; private uint region_; public const int EmailFieldNumber = 4; private static readonly FieldCodec<string> _repeated_email_codec; private readonly RepeatedField<string> email_ = new RepeatedField<string>(); public const int FlagsFieldNumber = 5; private ulong flags_; public const int SecureReleaseFieldNumber = 6; private ulong secureRelease_; public const int WhitelistStartFieldNumber = 7; private ulong whitelistStart_; public const int WhitelistEndFieldNumber = 8; private ulong whitelistEnd_; public const int FullNameFieldNumber = 10; private string fullName_ = ""; public const int LicensesFieldNumber = 20; private static readonly FieldCodec<AccountLicense> _repeated_licenses_codec; private readonly RepeatedField<AccountLicense> licenses_ = new RepeatedField<AccountLicense>(); public const int CredentialsFieldNumber = 21; private static readonly FieldCodec<AccountCredential> _repeated_credentials_codec; private readonly RepeatedField<AccountCredential> credentials_ = new RepeatedField<AccountCredential>(); public const int AccountLinksFieldNumber = 22; private static readonly FieldCodec<GameAccountLink> _repeated_accountLinks_codec; private readonly RepeatedField<GameAccountLink> accountLinks_ = new RepeatedField<GameAccountLink>(); public const int BattleTagFieldNumber = 23; private string battleTag_ = ""; public const int DefaultCurrencyFieldNumber = 25; private uint defaultCurrency_; public const int LegalRegionFieldNumber = 26; private uint legalRegion_; public const int LegalLocaleFieldNumber = 27; private uint legalLocale_; public const int CacheExpirationFieldNumber = 30; private ulong cacheExpiration_; public const int ParentalControlInfoFieldNumber = 31; private ParentalControlInfo parentalControlInfo_; public const int CountryFieldNumber = 32; private string country_ = ""; public const int PreferredRegionFieldNumber = 33; private uint preferredRegion_; public const int IdentityCheckStatusFieldNumber = 34; private IdentityVerificationStatus identityCheckStatus_; public static MessageParser<AccountBlob> Parser { get { return AccountBlob._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return AccountBlob.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public RepeatedField<string> Email { get { return this.email_; } } public ulong Flags { get { return this.flags_; } set { this.flags_ = value; } } public ulong SecureRelease { get { return this.secureRelease_; } set { this.secureRelease_ = value; } } public ulong WhitelistStart { get { return this.whitelistStart_; } set { this.whitelistStart_ = value; } } public ulong WhitelistEnd { get { return this.whitelistEnd_; } set { this.whitelistEnd_ = value; } } public string FullName { get { return this.fullName_; } set { this.fullName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public RepeatedField<AccountLicense> Licenses { get { return this.licenses_; } } public RepeatedField<AccountCredential> Credentials { get { return this.credentials_; } } public RepeatedField<GameAccountLink> AccountLinks { get { return this.accountLinks_; } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public uint DefaultCurrency { get { return this.defaultCurrency_; } set { this.defaultCurrency_ = value; } } public uint LegalRegion { get { return this.legalRegion_; } set { this.legalRegion_ = value; } } public uint LegalLocale { get { return this.legalLocale_; } set { this.legalLocale_ = value; } } public ulong CacheExpiration { get { return this.cacheExpiration_; } set { this.cacheExpiration_ = value; } } public ParentalControlInfo ParentalControlInfo { get { return this.parentalControlInfo_; } set { this.parentalControlInfo_ = value; } } public string Country { get { return this.country_; } set { this.country_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public uint PreferredRegion { get { return this.preferredRegion_; } set { this.preferredRegion_ = value; } } public IdentityVerificationStatus IdentityCheckStatus { get { return this.identityCheckStatus_; } set { this.identityCheckStatus_ = value; } } public AccountBlob() { } public AccountBlob(AccountBlob other) : this() { this.id_ = other.id_; this.region_ = other.region_; this.email_ = other.email_.Clone(); this.flags_ = other.flags_; this.secureRelease_ = other.secureRelease_; this.whitelistStart_ = other.whitelistStart_; this.whitelistEnd_ = other.whitelistEnd_; this.fullName_ = other.fullName_; this.licenses_ = other.licenses_.Clone(); this.credentials_ = other.credentials_.Clone(); this.accountLinks_ = other.accountLinks_.Clone(); this.battleTag_ = other.battleTag_; this.defaultCurrency_ = other.defaultCurrency_; this.legalRegion_ = other.legalRegion_; this.legalLocale_ = other.legalLocale_; this.cacheExpiration_ = other.cacheExpiration_; this.ParentalControlInfo = ((other.parentalControlInfo_ != null) ? other.ParentalControlInfo.Clone() : null); this.country_ = other.country_; this.preferredRegion_ = other.preferredRegion_; this.identityCheckStatus_ = other.identityCheckStatus_; } public AccountBlob Clone() { return new AccountBlob(this); } public override bool Equals(object other) { return this.Equals(other as AccountBlob); } public bool Equals(AccountBlob other) { if (other == null) { goto IL_126; } goto IL_45A; int arg_38C_0; while (true) { IL_387: switch ((arg_38C_0 ^ -1200363076) % 45) { case 0: return false; case 1: return false; case 2: arg_38C_0 = ((this.Id == other.Id) ? -1224329605 : -2135525418); continue; case 3: arg_38C_0 = ((this.CacheExpiration == other.CacheExpiration) ? -1906932394 : -388874448); continue; case 4: arg_38C_0 = (this.licenses_.Equals(other.licenses_) ? -1675547373 : -36645230); continue; case 5: return false; case 6: arg_38C_0 = (this.accountLinks_.Equals(other.accountLinks_) ? -441978422 : -1021279662); continue; case 7: arg_38C_0 = ((this.WhitelistStart != other.WhitelistStart) ? -1048489659 : -178944273); continue; case 8: arg_38C_0 = ((this.Flags == other.Flags) ? -1544877537 : -1288032780); continue; case 9: return false; case 10: arg_38C_0 = ((this.LegalLocale == other.LegalLocale) ? -863119542 : -1101436065); continue; case 11: return false; case 12: return false; case 13: return false; case 14: return false; case 15: return false; case 16: arg_38C_0 = ((this.PreferredRegion == other.PreferredRegion) ? -1254682528 : -1625296951); continue; case 18: arg_38C_0 = ((this.DefaultCurrency != other.DefaultCurrency) ? -1612172993 : -946934837); continue; case 19: goto IL_45A; case 20: return false; case 21: arg_38C_0 = (this.email_.Equals(other.email_) ? -1436423900 : -354559710); continue; case 22: return false; case 23: return false; case 24: arg_38C_0 = ((this.WhitelistEnd == other.WhitelistEnd) ? -1027978882 : -1840272812); continue; case 25: return false; case 26: return false; case 27: arg_38C_0 = ((!AccountBlob.smethod_0(this.BattleTag, other.BattleTag)) ? -2014487546 : -957232459); continue; case 28: return false; case 29: arg_38C_0 = ((this.SecureRelease != other.SecureRelease) ? -935020111 : -949578423); continue; case 30: return false; case 31: return false; case 32: arg_38C_0 = ((!AccountBlob.smethod_0(this.FullName, other.FullName)) ? -2021096718 : -1727984967); continue; case 33: return true; case 34: return false; case 35: goto IL_126; case 36: arg_38C_0 = ((this.LegalRegion == other.LegalRegion) ? -1731393479 : -1016004849); continue; case 37: return false; case 38: arg_38C_0 = ((!AccountBlob.smethod_0(this.Country, other.Country)) ? -24387461 : -1229440748); continue; case 39: arg_38C_0 = (this.credentials_.Equals(other.credentials_) ? -2142429148 : -59460220); continue; case 40: arg_38C_0 = ((this.IdentityCheckStatus == other.IdentityCheckStatus) ? -1815148769 : -1520131431); continue; case 41: return false; case 42: return false; case 43: arg_38C_0 = (AccountBlob.smethod_1(this.ParentalControlInfo, other.ParentalControlInfo) ? -1077205561 : -984855479); continue; case 44: arg_38C_0 = ((this.Region != other.Region) ? -628427914 : -908751700); continue; } break; } return true; IL_126: arg_38C_0 = -1525201819; goto IL_387; IL_45A: arg_38C_0 = ((other != this) ? -1021896462 : -1211617331); goto IL_387; } public override int GetHashCode() { int num = 1 ^ this.Id.GetHashCode(); while (true) { IL_4C7: uint arg_441_0 = 3013042398u; while (true) { uint num2; switch ((num2 = (arg_441_0 ^ 2692387657u)) % 30u) { case 0u: num ^= this.LegalLocale.GetHashCode(); arg_441_0 = (num2 * 4129555494u ^ 2263006275u); continue; case 1u: num ^= this.ParentalControlInfo.GetHashCode(); arg_441_0 = (num2 * 1536706005u ^ 1252606332u); continue; case 2u: num ^= this.LegalRegion.GetHashCode(); arg_441_0 = (num2 * 63119484u ^ 3653923676u); continue; case 3u: arg_441_0 = ((this.DefaultCurrency != 0u) ? 3304593763u : 3642868005u); continue; case 4u: arg_441_0 = ((this.Country.Length == 0) ? 3750640948u : 3488255385u); continue; case 5u: num ^= this.Region.GetHashCode(); arg_441_0 = (num2 * 1399015272u ^ 3031052914u); continue; case 6u: num ^= this.BattleTag.GetHashCode(); arg_441_0 = (num2 * 615033u ^ 3970595212u); continue; case 7u: num ^= this.IdentityCheckStatus.GetHashCode(); arg_441_0 = (num2 * 560866675u ^ 54204086u); continue; case 8u: arg_441_0 = ((this.parentalControlInfo_ != null) ? 2951652006u : 3355686823u); continue; case 9u: num ^= this.email_.GetHashCode(); arg_441_0 = (((this.Flags == 0uL) ? 2528408619u : 4177192849u) ^ num2 * 1480440034u); continue; case 10u: num ^= this.PreferredRegion.GetHashCode(); arg_441_0 = (num2 * 1479898820u ^ 3858666224u); continue; case 11u: arg_441_0 = (((this.BattleTag.Length != 0) ? 2564967559u : 3600297426u) ^ num2 * 2838145952u); continue; case 12u: arg_441_0 = ((this.LegalRegion != 0u) ? 2418711957u : 2549924300u); continue; case 13u: num ^= this.CacheExpiration.GetHashCode(); arg_441_0 = (num2 * 4149524530u ^ 4022336105u); continue; case 15u: goto IL_4C7; case 16u: arg_441_0 = ((this.SecureRelease != 0uL) ? 2201882540u : 3973403390u); continue; case 17u: num ^= this.WhitelistStart.GetHashCode(); arg_441_0 = (num2 * 1007312207u ^ 3612367670u); continue; case 18u: num ^= this.FullName.GetHashCode(); num ^= this.licenses_.GetHashCode(); num ^= this.credentials_.GetHashCode(); num ^= this.accountLinks_.GetHashCode(); arg_441_0 = 2523989514u; continue; case 19u: arg_441_0 = ((this.IdentityCheckStatus == IdentityVerificationStatus.IDENT_NO_DATA) ? 2813061045u : 4289278328u); continue; case 20u: num ^= this.DefaultCurrency.GetHashCode(); arg_441_0 = (num2 * 1236212886u ^ 1097747897u); continue; case 21u: num ^= this.WhitelistEnd.GetHashCode(); arg_441_0 = (num2 * 3187394532u ^ 3087869811u); continue; case 22u: arg_441_0 = ((this.WhitelistEnd == 0uL) ? 2426573527u : 3321438648u); continue; case 23u: num ^= this.SecureRelease.GetHashCode(); arg_441_0 = (num2 * 719687330u ^ 2812156948u); continue; case 24u: num ^= this.Flags.GetHashCode(); arg_441_0 = (num2 * 2088716105u ^ 3390050403u); continue; case 25u: arg_441_0 = ((this.PreferredRegion != 0u) ? 3130627783u : 3577423432u); continue; case 26u: arg_441_0 = ((this.CacheExpiration != 0uL) ? 3328261502u : 4262753495u); continue; case 27u: arg_441_0 = ((this.WhitelistStart != 0uL) ? 2342837154u : 3759375539u); continue; case 28u: num ^= this.Country.GetHashCode(); arg_441_0 = (num2 * 4107922145u ^ 4155181540u); continue; case 29u: arg_441_0 = ((this.LegalLocale == 0u) ? 3451370835u : 4105362705u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(21); output.WriteFixed32(this.Id); output.WriteRawTag(24); output.WriteUInt32(this.Region); this.email_.WriteTo(output, AccountBlob._repeated_email_codec); if (this.Flags != 0uL) { goto IL_2E1; } goto IL_5EC; uint arg_530_0; while (true) { IL_52B: uint num; switch ((num = (arg_530_0 ^ 2108070602u)) % 40u) { case 0u: output.WriteUInt64(this.SecureRelease); arg_530_0 = (num * 4193309314u ^ 2085740271u); continue; case 1u: output.WriteFixed32(this.LegalLocale); arg_530_0 = (num * 165178996u ^ 3730388844u); continue; case 2u: arg_530_0 = ((this.CacheExpiration == 0uL) ? 1852818854u : 1438425611u); continue; case 3u: output.WriteRawTag(144, 2); arg_530_0 = (num * 582318648u ^ 3529828865u); continue; case 4u: output.WriteRawTag(250, 1); arg_530_0 = (num * 4248877239u ^ 4021264781u); continue; case 5u: output.WriteUInt32(this.PreferredRegion); arg_530_0 = (num * 1661660477u ^ 1728764517u); continue; case 6u: this.licenses_.WriteTo(output, AccountBlob._repeated_licenses_codec); arg_530_0 = (num * 1584457161u ^ 532659334u); continue; case 7u: output.WriteUInt32(this.LegalRegion); arg_530_0 = (num * 715448001u ^ 3095664973u); continue; case 8u: arg_530_0 = ((this.LegalLocale == 0u) ? 968414296u : 1227913398u); continue; case 9u: arg_530_0 = ((this.LegalRegion == 0u) ? 1737326786u : 1862340865u); continue; case 10u: this.credentials_.WriteTo(output, AccountBlob._repeated_credentials_codec); this.accountLinks_.WriteTo(output, AccountBlob._repeated_accountLinks_codec); arg_530_0 = (num * 2496588039u ^ 4283565913u); continue; case 11u: arg_530_0 = ((this.PreferredRegion == 0u) ? 1694235428u : 1695999931u); continue; case 12u: output.WriteRawTag(221, 1); arg_530_0 = (num * 3932620193u ^ 1168114631u); continue; case 13u: output.WriteString(this.BattleTag); arg_530_0 = (num * 3229949352u ^ 3705927300u); continue; case 14u: arg_530_0 = ((this.DefaultCurrency == 0u) ? 1977134003u : 453084140u); continue; case 15u: output.WriteRawTag(82); arg_530_0 = 2144564558u; continue; case 16u: output.WriteRawTag(64); output.WriteUInt64(this.WhitelistEnd); arg_530_0 = (num * 1839653871u ^ 1819331381u); continue; case 17u: output.WriteRawTag(186, 1); arg_530_0 = (num * 3971581908u ^ 680090763u); continue; case 18u: goto IL_2E1; case 19u: output.WriteMessage(this.ParentalControlInfo); arg_530_0 = (num * 1197537811u ^ 1779921785u); continue; case 20u: output.WriteString(this.FullName); arg_530_0 = (num * 4144066561u ^ 4022890768u); continue; case 21u: arg_530_0 = (((AccountBlob.smethod_2(this.BattleTag) != 0) ? 879167140u : 406073723u) ^ num * 979258467u); continue; case 22u: output.WriteRawTag(205, 1); arg_530_0 = (num * 3279266959u ^ 2285703695u); continue; case 23u: output.WriteFixed32(this.DefaultCurrency); arg_530_0 = (num * 2756607320u ^ 619925787u); continue; case 24u: arg_530_0 = ((this.WhitelistEnd != 0uL) ? 552194u : 600793229u); continue; case 25u: output.WriteRawTag(240, 1); output.WriteUInt64(this.CacheExpiration); arg_530_0 = (num * 1782097197u ^ 688364363u); continue; case 26u: arg_530_0 = ((AccountBlob.smethod_2(this.Country) == 0) ? 1465850089u : 1380437703u); continue; case 27u: output.WriteRawTag(208, 1); arg_530_0 = (num * 4092575799u ^ 2743143960u); continue; case 28u: arg_530_0 = ((this.parentalControlInfo_ != null) ? 996244942u : 298115832u); continue; case 29u: output.WriteRawTag(130, 2); arg_530_0 = (num * 1471558463u ^ 3285439751u); continue; case 30u: output.WriteString(this.Country); arg_530_0 = (num * 3471803105u ^ 2801654999u); continue; case 31u: output.WriteRawTag(40); output.WriteUInt64(this.Flags); arg_530_0 = (num * 995920683u ^ 1365906559u); continue; case 32u: goto IL_5EC; case 33u: output.WriteRawTag(136, 2); arg_530_0 = (num * 1695184860u ^ 2513191555u); continue; case 35u: output.WriteEnum((int)this.IdentityCheckStatus); arg_530_0 = (num * 888260791u ^ 3238881069u); continue; case 36u: output.WriteRawTag(56); output.WriteUInt64(this.WhitelistStart); arg_530_0 = (num * 676620552u ^ 2708334810u); continue; case 37u: arg_530_0 = ((this.WhitelistStart != 0uL) ? 1791830750u : 1816681594u); continue; case 38u: arg_530_0 = ((this.IdentityCheckStatus == IdentityVerificationStatus.IDENT_NO_DATA) ? 1960504488u : 1582505761u); continue; case 39u: output.WriteRawTag(48); arg_530_0 = (num * 1954710947u ^ 958009839u); continue; } break; } return; IL_2E1: arg_530_0 = 1212849925u; goto IL_52B; IL_5EC: arg_530_0 = ((this.SecureRelease != 0uL) ? 597141645u : 233135311u); goto IL_52B; } public int CalculateSize() { int num = 5 + (1 + CodedOutputStream.ComputeUInt32Size(this.Region)); while (true) { IL_4C6: uint arg_439_0 = 2586985534u; while (true) { uint num2; switch ((num2 = (arg_439_0 ^ 2479996908u)) % 32u) { case 1u: arg_439_0 = ((this.IdentityCheckStatus != IdentityVerificationStatus.IDENT_NO_DATA) ? 2388018248u : 3253577100u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.WhitelistStart); arg_439_0 = (num2 * 1012759862u ^ 1506626390u); continue; case 3u: arg_439_0 = ((this.parentalControlInfo_ != null) ? 2230530134u : 2863318896u); continue; case 4u: num += 2 + CodedOutputStream.ComputeEnumSize((int)this.IdentityCheckStatus); arg_439_0 = (num2 * 1368035566u ^ 3180173300u); continue; case 5u: arg_439_0 = (((this.Flags == 0uL) ? 2833088456u : 3827372976u) ^ num2 * 441562959u); continue; case 6u: arg_439_0 = ((this.PreferredRegion == 0u) ? 2858008717u : 3815465972u); continue; case 7u: arg_439_0 = (((AccountBlob.smethod_2(this.BattleTag) != 0) ? 645578461u : 107531690u) ^ num2 * 351364397u); continue; case 8u: arg_439_0 = ((this.CacheExpiration == 0uL) ? 3278811215u : 3963415047u); continue; case 9u: num += 1 + CodedOutputStream.ComputeStringSize(this.FullName); arg_439_0 = 2283709912u; continue; case 10u: num += 2 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_439_0 = (num2 * 965533798u ^ 2491497197u); continue; case 11u: num += 2 + CodedOutputStream.ComputeUInt64Size(this.CacheExpiration); arg_439_0 = (num2 * 576704445u ^ 2978530096u); continue; case 12u: num += 2 + CodedOutputStream.ComputeUInt32Size(this.LegalRegion); arg_439_0 = (num2 * 776224124u ^ 1210237891u); continue; case 13u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SecureRelease); arg_439_0 = (num2 * 2045493574u ^ 1232801497u); continue; case 14u: num += 6; arg_439_0 = (num2 * 493643189u ^ 1046470394u); continue; case 15u: arg_439_0 = ((this.SecureRelease == 0uL) ? 3251228119u : 3296709153u); continue; case 16u: arg_439_0 = ((this.LegalRegion == 0u) ? 2228933011u : 4091443200u); continue; case 17u: num += 6; arg_439_0 = (num2 * 1798352552u ^ 3258662764u); continue; case 18u: num += this.email_.CalculateSize(AccountBlob._repeated_email_codec); arg_439_0 = (num2 * 1912409789u ^ 3599210403u); continue; case 19u: goto IL_4C6; case 20u: num += this.licenses_.CalculateSize(AccountBlob._repeated_licenses_codec); num += this.credentials_.CalculateSize(AccountBlob._repeated_credentials_codec); arg_439_0 = (num2 * 3383253008u ^ 194502649u); continue; case 21u: num += this.accountLinks_.CalculateSize(AccountBlob._repeated_accountLinks_codec); arg_439_0 = (num2 * 2207609729u ^ 1066901694u); continue; case 22u: arg_439_0 = ((this.WhitelistEnd != 0uL) ? 2502726450u : 3485561317u); continue; case 23u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Flags); arg_439_0 = (num2 * 4055168615u ^ 3078961346u); continue; case 24u: num += 2 + CodedOutputStream.ComputeUInt32Size(this.PreferredRegion); arg_439_0 = (num2 * 979331368u ^ 4097440589u); continue; case 25u: num += 2 + CodedOutputStream.ComputeStringSize(this.Country); arg_439_0 = (num2 * 4214138158u ^ 1365694612u); continue; case 26u: num += 2 + CodedOutputStream.ComputeMessageSize(this.ParentalControlInfo); arg_439_0 = (num2 * 2084528723u ^ 2606041662u); continue; case 27u: arg_439_0 = ((this.WhitelistStart != 0uL) ? 2954447502u : 2432948218u); continue; case 28u: arg_439_0 = ((AccountBlob.smethod_2(this.Country) != 0) ? 2808782005u : 3842010730u); continue; case 29u: arg_439_0 = ((this.DefaultCurrency != 0u) ? 3431390690u : 3892315932u); continue; case 30u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.WhitelistEnd); arg_439_0 = (num2 * 4045630914u ^ 4153538521u); continue; case 31u: arg_439_0 = ((this.LegalLocale == 0u) ? 3276112452u : 3281202557u); continue; } return num; } } return num; } public void MergeFrom(AccountBlob other) { if (other == null) { goto IL_3EC; } goto IL_5A3; uint arg_4E7_0; while (true) { IL_4E2: uint num; switch ((num = (arg_4E7_0 ^ 2257876603u)) % 40u) { case 1u: arg_4E7_0 = ((other.DefaultCurrency == 0u) ? 2917202775u : 2317320035u); continue; case 2u: arg_4E7_0 = ((other.LegalLocale != 0u) ? 3083109604u : 4290611965u); continue; case 3u: this.credentials_.Add(other.credentials_); this.accountLinks_.Add(other.accountLinks_); arg_4E7_0 = (num * 2924246068u ^ 125797649u); continue; case 4u: arg_4E7_0 = ((other.LegalRegion == 0u) ? 4027006329u : 3549087151u); continue; case 5u: this.PreferredRegion = other.PreferredRegion; arg_4E7_0 = (num * 1478443890u ^ 3629155688u); continue; case 6u: this.CacheExpiration = other.CacheExpiration; arg_4E7_0 = (num * 1918971440u ^ 3826515962u); continue; case 7u: this.Region = other.Region; arg_4E7_0 = (num * 782541317u ^ 2857488765u); continue; case 8u: goto IL_3EC; case 9u: arg_4E7_0 = ((other.parentalControlInfo_ == null) ? 3703161361u : 3772514809u); continue; case 10u: this.parentalControlInfo_ = new ParentalControlInfo(); arg_4E7_0 = (num * 1966243218u ^ 3933245077u); continue; case 11u: goto IL_5A3; case 12u: this.WhitelistStart = other.WhitelistStart; arg_4E7_0 = (num * 3316956899u ^ 825204272u); continue; case 13u: this.Id = other.Id; arg_4E7_0 = (num * 2559438516u ^ 3650627793u); continue; case 14u: return; case 15u: this.LegalLocale = other.LegalLocale; arg_4E7_0 = (num * 1167446752u ^ 1624781789u); continue; case 16u: this.SecureRelease = other.SecureRelease; arg_4E7_0 = (num * 2135733403u ^ 2657295966u); continue; case 17u: this.IdentityCheckStatus = other.IdentityCheckStatus; arg_4E7_0 = (num * 2109049666u ^ 1682099513u); continue; case 18u: arg_4E7_0 = (((this.parentalControlInfo_ == null) ? 1244954915u : 447977523u) ^ num * 1796629513u); continue; case 19u: arg_4E7_0 = ((AccountBlob.smethod_2(other.FullName) == 0) ? 3579231578u : 2779584252u); continue; case 20u: this.Country = other.Country; arg_4E7_0 = (num * 1610441641u ^ 909347714u); continue; case 21u: this.email_.Add(other.email_); arg_4E7_0 = 4267867608u; continue; case 22u: arg_4E7_0 = ((other.Region != 0u) ? 2252726572u : 2445857742u); continue; case 23u: this.FullName = other.FullName; arg_4E7_0 = (num * 3046059931u ^ 4018767847u); continue; case 24u: this.DefaultCurrency = other.DefaultCurrency; arg_4E7_0 = (num * 3068565789u ^ 308258031u); continue; case 25u: arg_4E7_0 = ((other.IdentityCheckStatus != IdentityVerificationStatus.IDENT_NO_DATA) ? 3720274266u : 4229704891u); continue; case 26u: arg_4E7_0 = ((AccountBlob.smethod_2(other.Country) == 0) ? 3389605758u : 2750985447u); continue; case 27u: this.Flags = other.Flags; arg_4E7_0 = (num * 2795973611u ^ 4149065661u); continue; case 28u: this.WhitelistEnd = other.WhitelistEnd; arg_4E7_0 = (num * 3048899101u ^ 12348484u); continue; case 29u: arg_4E7_0 = ((other.WhitelistStart == 0uL) ? 3596566444u : 3860494543u); continue; case 30u: arg_4E7_0 = (((AccountBlob.smethod_2(other.BattleTag) == 0) ? 1287040860u : 21497725u) ^ num * 1087480325u); continue; case 31u: arg_4E7_0 = ((other.WhitelistEnd != 0uL) ? 2923954087u : 3245095336u); continue; case 32u: this.BattleTag = other.BattleTag; arg_4E7_0 = (num * 688436156u ^ 3975583346u); continue; case 33u: this.licenses_.Add(other.licenses_); arg_4E7_0 = 3303751288u; continue; case 34u: this.ParentalControlInfo.MergeFrom(other.ParentalControlInfo); arg_4E7_0 = 3703161361u; continue; case 35u: arg_4E7_0 = (((other.Flags == 0uL) ? 850578877u : 1833324825u) ^ num * 2092312091u); continue; case 36u: this.LegalRegion = other.LegalRegion; arg_4E7_0 = (num * 4108815753u ^ 985742605u); continue; case 37u: arg_4E7_0 = ((other.PreferredRegion != 0u) ? 2476936726u : 3694895842u); continue; case 38u: arg_4E7_0 = ((other.CacheExpiration == 0uL) ? 3787547738u : 2190834693u); continue; case 39u: arg_4E7_0 = ((other.SecureRelease == 0uL) ? 2511933694u : 2835051419u); continue; } break; } return; IL_3EC: arg_4E7_0 = 2508800765u; goto IL_4E2; IL_5A3: arg_4E7_0 = ((other.Id == 0u) ? 2681835445u : 4277770790u); goto IL_4E2; } public void MergeFrom(CodedInputStream input) { while (true) { IL_8ED: uint num; uint arg_7B5_0 = ((num = input.ReadTag()) != 0u) ? 677988587u : 1283028288u; while (true) { uint num2; switch ((num2 = (arg_7B5_0 ^ 653189166u)) % 71u) { case 0u: arg_7B5_0 = (num2 * 4005665647u ^ 292372736u); continue; case 1u: arg_7B5_0 = (num2 * 4125696264u ^ 1956577003u); continue; case 2u: arg_7B5_0 = ((num != 258u) ? 432192018u : 2109937584u); continue; case 3u: arg_7B5_0 = (((num != 240u) ? 1920431645u : 1027086478u) ^ num2 * 604119955u); continue; case 4u: this.Country = input.ReadString(); arg_7B5_0 = 266938499u; continue; case 5u: arg_7B5_0 = (num2 * 3536275336u ^ 797030683u); continue; case 6u: arg_7B5_0 = (((num != 178u) ? 1363539740u : 1323402117u) ^ num2 * 3937015283u); continue; case 7u: this.LegalLocale = input.ReadFixed32(); arg_7B5_0 = 1447686481u; continue; case 8u: arg_7B5_0 = (((num == 21u) ? 3746931269u : 2751926442u) ^ num2 * 3270842631u); continue; case 9u: arg_7B5_0 = (((num == 64u) ? 2601607421u : 2436258632u) ^ num2 * 4166373361u); continue; case 10u: arg_7B5_0 = (((num == 48u) ? 2730433142u : 3995067469u) ^ num2 * 2861382568u); continue; case 11u: arg_7B5_0 = (((num == 56u) ? 3160804643u : 2394630891u) ^ num2 * 1334567021u); continue; case 12u: arg_7B5_0 = ((num == 34u) ? 1817839762u : 1574209600u); continue; case 13u: arg_7B5_0 = (num2 * 3421839786u ^ 2179388154u); continue; case 14u: arg_7B5_0 = (num2 * 2524073229u ^ 3975862695u); continue; case 15u: this.email_.AddEntriesFrom(input, AccountBlob._repeated_email_codec); arg_7B5_0 = 1444184159u; continue; case 16u: this.Flags = input.ReadUInt64(); arg_7B5_0 = 885991983u; continue; case 17u: arg_7B5_0 = ((num <= 221u) ? 377404523u : 959358014u); continue; case 18u: this.parentalControlInfo_ = new ParentalControlInfo(); arg_7B5_0 = (num2 * 2831009679u ^ 803742785u); continue; case 19u: input.SkipLastField(); arg_7B5_0 = 1034668596u; continue; case 20u: arg_7B5_0 = (((num <= 48u) ? 404694740u : 1166440698u) ^ num2 * 1151404941u); continue; case 21u: this.credentials_.AddEntriesFrom(input, AccountBlob._repeated_credentials_codec); arg_7B5_0 = 266938499u; continue; case 22u: arg_7B5_0 = (num2 * 951978210u ^ 1366331967u); continue; case 23u: arg_7B5_0 = (num2 * 2011186747u ^ 4005801961u); continue; case 24u: this.SecureRelease = input.ReadUInt64(); arg_7B5_0 = 19312291u; continue; case 25u: goto IL_8ED; case 26u: this.LegalRegion = input.ReadUInt32(); arg_7B5_0 = 1662702887u; continue; case 27u: arg_7B5_0 = (((num == 186u) ? 466023720u : 1332519938u) ^ num2 * 926216021u); continue; case 28u: arg_7B5_0 = ((num != 82u) ? 943538802u : 1794738774u); continue; case 29u: arg_7B5_0 = (((num == 272u) ? 3226554247u : 3384188482u) ^ num2 * 816051610u); continue; case 30u: this.CacheExpiration = input.ReadUInt64(); arg_7B5_0 = 266938499u; continue; case 31u: arg_7B5_0 = (((num != 250u) ? 3113159555u : 2599039583u) ^ num2 * 794490137u); continue; case 32u: arg_7B5_0 = (num2 * 3847837040u ^ 1239064051u); continue; case 33u: arg_7B5_0 = (((num != 40u) ? 1089033372u : 359144922u) ^ num2 * 3817832883u); continue; case 34u: this.BattleTag = input.ReadString(); arg_7B5_0 = 198019600u; continue; case 35u: arg_7B5_0 = (num2 * 2690306397u ^ 3616398386u); continue; case 36u: this.WhitelistStart = input.ReadUInt64(); arg_7B5_0 = 266938499u; continue; case 37u: arg_7B5_0 = (((num != 170u) ? 3365945056u : 2926894261u) ^ num2 * 1800269956u); continue; case 38u: arg_7B5_0 = (num2 * 1974482376u ^ 4049184683u); continue; case 39u: arg_7B5_0 = (((num == 221u) ? 839068795u : 995291215u) ^ num2 * 1245397509u); continue; case 40u: this.Id = input.ReadFixed32(); arg_7B5_0 = 266938499u; continue; case 41u: arg_7B5_0 = (num2 * 3145374836u ^ 2519890960u); continue; case 42u: this.licenses_.AddEntriesFrom(input, AccountBlob._repeated_licenses_codec); arg_7B5_0 = 266938499u; continue; case 43u: this.DefaultCurrency = input.ReadFixed32(); arg_7B5_0 = 647706883u; continue; case 44u: arg_7B5_0 = 677988587u; continue; case 45u: arg_7B5_0 = (num2 * 808934399u ^ 604158466u); continue; case 46u: this.PreferredRegion = input.ReadUInt32(); arg_7B5_0 = 266938499u; continue; case 47u: arg_7B5_0 = ((num <= 170u) ? 940452801u : 1338507524u); continue; case 48u: arg_7B5_0 = (((num != 264u) ? 3351247855u : 2765290755u) ^ num2 * 1790980987u); continue; case 49u: this.identityCheckStatus_ = (IdentityVerificationStatus)input.ReadEnum(); arg_7B5_0 = 266938499u; continue; case 50u: arg_7B5_0 = ((num == 205u) ? 605493805u : 316414775u); continue; case 51u: arg_7B5_0 = ((this.parentalControlInfo_ == null) ? 1832162028u : 412929055u); continue; case 52u: this.Region = input.ReadUInt32(); arg_7B5_0 = 1907615988u; continue; case 53u: this.WhitelistEnd = input.ReadUInt64(); arg_7B5_0 = 266938499u; continue; case 55u: arg_7B5_0 = (num2 * 3809673221u ^ 3115252225u); continue; case 56u: arg_7B5_0 = (num2 * 4065449095u ^ 1313752852u); continue; case 57u: input.ReadMessage(this.parentalControlInfo_); arg_7B5_0 = 1705782605u; continue; case 58u: arg_7B5_0 = (((num > 24u) ? 2629029466u : 2196036255u) ^ num2 * 1769018342u); continue; case 59u: arg_7B5_0 = (((num != 162u) ? 232133427u : 903525731u) ^ num2 * 820660308u); continue; case 60u: arg_7B5_0 = ((num > 250u) ? 1314438145u : 903193417u); continue; case 61u: arg_7B5_0 = ((num > 64u) ? 758145650u : 109493358u); continue; case 62u: arg_7B5_0 = (num2 * 4004749684u ^ 3377073556u); continue; case 63u: this.accountLinks_.AddEntriesFrom(input, AccountBlob._repeated_accountLinks_codec); arg_7B5_0 = 266938499u; continue; case 64u: arg_7B5_0 = (num2 * 1870454922u ^ 4102119001u); continue; case 65u: arg_7B5_0 = (num2 * 757364291u ^ 1610409357u); continue; case 66u: arg_7B5_0 = (num2 * 1490404867u ^ 855602457u); continue; case 67u: this.FullName = input.ReadString(); arg_7B5_0 = 2138398979u; continue; case 68u: arg_7B5_0 = (((num != 208u) ? 2439470716u : 4061821416u) ^ num2 * 1112780186u); continue; case 69u: arg_7B5_0 = (((num != 24u) ? 606888309u : 177229193u) ^ num2 * 3363091259u); continue; case 70u: arg_7B5_0 = (((num <= 186u) ? 28031554u : 28735085u) ^ num2 * 2110572577u); continue; } return; } } } static AccountBlob() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_A4: uint arg_88_0 = 2744619014u; while (true) { uint num; switch ((num = (arg_88_0 ^ 3484196077u)) % 4u) { case 0u: goto IL_A4; case 2u: AccountBlob._repeated_licenses_codec = FieldCodec.ForMessage<AccountLicense>(162u, AccountLicense.Parser); AccountBlob._repeated_credentials_codec = FieldCodec.ForMessage<AccountCredential>(170u, AccountCredential.Parser); AccountBlob._repeated_accountLinks_codec = FieldCodec.ForMessage<GameAccountLink>(178u, GameAccountLink.Parser); arg_88_0 = (num * 2806614836u ^ 2582780192u); continue; case 3u: AccountBlob._repeated_email_codec = FieldCodec.ForString(34u); arg_88_0 = (num * 3336864263u ^ 3924187742u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol/InvitationParams.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class InvitationParams : IMessage<InvitationParams>, IEquatable<InvitationParams>, IDeepCloneable<InvitationParams>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly InvitationParams.__c __9 = new InvitationParams.__c(); internal InvitationParams cctor>b__29_0() { return new InvitationParams(); } } private static readonly MessageParser<InvitationParams> _parser = new MessageParser<InvitationParams>(new Func<InvitationParams>(InvitationParams.__c.__9.<.cctor>b__29_0)); public const int InvitationMessageFieldNumber = 1; private string invitationMessage_ = ""; public const int ExpirationTimeFieldNumber = 2; private ulong expirationTime_; public static MessageParser<InvitationParams> Parser { get { return InvitationParams._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return InvitationParams.Descriptor; } } public string InvitationMessage { get { return this.invitationMessage_; } set { this.invitationMessage_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public ulong ExpirationTime { get { return this.expirationTime_; } set { this.expirationTime_ = value; } } public InvitationParams() { } public InvitationParams(InvitationParams other) : this() { this.invitationMessage_ = other.invitationMessage_; this.expirationTime_ = other.expirationTime_; } public InvitationParams Clone() { return new InvitationParams(this); } public override bool Equals(object other) { return this.Equals(other as InvitationParams); } public bool Equals(InvitationParams other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -107313734) % 9) { case 0: arg_72_0 = ((this.ExpirationTime != other.ExpirationTime) ? -2002573600 : -1674311352); continue; case 1: return false; case 2: return false; case 3: return false; case 4: goto IL_B0; case 5: arg_72_0 = (InvitationParams.smethod_0(this.InvitationMessage, other.InvitationMessage) ? -902451664 : -1743884255); continue; case 7: return true; case 8: goto IL_15; } break; } return true; IL_15: arg_72_0 = -27987925; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? -1109324125 : -842911115); goto IL_6D; } public override int GetHashCode() { int num = 1; if (InvitationParams.smethod_1(this.InvitationMessage) != 0) { goto IL_21; } goto IL_94; uint arg_68_0; while (true) { IL_63: uint num2; switch ((num2 = (arg_68_0 ^ 1631379956u)) % 5u) { case 0u: num ^= this.ExpirationTime.GetHashCode(); arg_68_0 = (num2 * 2889417313u ^ 3932574999u); continue; case 2u: num ^= InvitationParams.smethod_2(this.InvitationMessage); arg_68_0 = (num2 * 3685224022u ^ 3269138852u); continue; case 3u: goto IL_21; case 4u: goto IL_94; } break; } return num; IL_21: arg_68_0 = 257392083u; goto IL_63; IL_94: arg_68_0 = ((this.ExpirationTime == 0uL) ? 1106693482u : 827318889u); goto IL_63; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (InvitationParams.smethod_1(this.InvitationMessage) != 0) { goto IL_83; } goto IL_C4; uint arg_8D_0; while (true) { IL_88: uint num; switch ((num = (arg_8D_0 ^ 1155849619u)) % 7u) { case 0u: goto IL_83; case 1u: output.WriteRawTag(10); arg_8D_0 = (num * 3537722672u ^ 2382564016u); continue; case 2u: output.WriteString(this.InvitationMessage); arg_8D_0 = (num * 3599473146u ^ 986192409u); continue; case 3u: output.WriteRawTag(16); arg_8D_0 = (num * 3670887463u ^ 1931730184u); continue; case 4u: goto IL_C4; case 6u: output.WriteUInt64(this.ExpirationTime); arg_8D_0 = (num * 963990612u ^ 434398963u); continue; } break; } return; IL_83: arg_8D_0 = 1817358936u; goto IL_88; IL_C4: arg_8D_0 = ((this.ExpirationTime == 0uL) ? 1332430635u : 2106880224u); goto IL_88; } public int CalculateSize() { int num = 0; while (true) { IL_BB: uint arg_97_0 = 1160657995u; while (true) { uint num2; switch ((num2 = (arg_97_0 ^ 992238010u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.InvitationMessage); arg_97_0 = (num2 * 2045348977u ^ 2510845339u); continue; case 1u: arg_97_0 = (((InvitationParams.smethod_1(this.InvitationMessage) != 0) ? 3864931929u : 3680179032u) ^ num2 * 1995252049u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ExpirationTime); arg_97_0 = (num2 * 1255176711u ^ 3421865119u); continue; case 4u: goto IL_BB; case 5u: arg_97_0 = ((this.ExpirationTime == 0uL) ? 1749807923u : 1848251982u); continue; } return num; } } return num; } public void MergeFrom(InvitationParams other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1216588428u)) % 7u) { case 0u: goto IL_6C; case 1u: goto IL_AD; case 2u: arg_76_0 = ((other.ExpirationTime == 0uL) ? 1330759525u : 2032971207u); continue; case 3u: this.InvitationMessage = other.InvitationMessage; arg_76_0 = (num * 1413834978u ^ 2685557099u); continue; case 5u: this.ExpirationTime = other.ExpirationTime; arg_76_0 = (num * 969803350u ^ 319025751u); continue; case 6u: return; } break; } return; IL_6C: arg_76_0 = 2134808782u; goto IL_71; IL_AD: arg_76_0 = ((InvitationParams.smethod_1(other.InvitationMessage) == 0) ? 965257921u : 957863721u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_104: uint num; uint arg_C0_0 = ((num = input.ReadTag()) != 0u) ? 1241687099u : 1820168618u; while (true) { uint num2; switch ((num2 = (arg_C0_0 ^ 891652911u)) % 10u) { case 0u: this.InvitationMessage = input.ReadString(); arg_C0_0 = 1901855847u; continue; case 2u: arg_C0_0 = (((num == 16u) ? 2620015022u : 3483785403u) ^ num2 * 4205640007u); continue; case 3u: arg_C0_0 = 1241687099u; continue; case 4u: arg_C0_0 = (num2 * 3344264864u ^ 2162965900u); continue; case 5u: arg_C0_0 = (num2 * 3484173251u ^ 3506630805u); continue; case 6u: input.SkipLastField(); arg_C0_0 = (num2 * 3644733421u ^ 938578886u); continue; case 7u: goto IL_104; case 8u: arg_C0_0 = ((num == 10u) ? 1392693279u : 216610901u); continue; case 9u: this.ExpirationTime = input.ReadUInt64(); arg_C0_0 = 312361100u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.ClientDB/FileOptions.cs using System; namespace Arctium_WoW_ClientDB_Viewer.ClientDB { [Flags] internal enum FileOptions { None = 0, DataOffset = 1, Unknown = 2, Index = 4 } } <file_sep>/Google.Protobuf.WellKnownTypes/FieldMask.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class FieldMask : IMessage<FieldMask>, IEquatable<FieldMask>, IDeepCloneable<FieldMask>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldMask.__c __9 = new FieldMask.__c(); internal FieldMask cctor>b__24_0() { return new FieldMask(); } } private static readonly MessageParser<FieldMask> _parser = new MessageParser<FieldMask>(new Func<FieldMask>(FieldMask.__c.__9.<.cctor>b__24_0)); public const int PathsFieldNumber = 1; private static readonly FieldCodec<string> _repeated_paths_codec; private readonly RepeatedField<string> paths_ = new RepeatedField<string>(); public static MessageParser<FieldMask> Parser { get { return FieldMask._parser; } } public static MessageDescriptor Descriptor { get { return FieldMaskReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return FieldMask.Descriptor; } } public RepeatedField<string> Paths { get { return this.paths_; } } public FieldMask() { } public FieldMask(FieldMask other) : this() { while (true) { IL_43: uint arg_2B_0 = 3624769307u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 2963693231u)) % 3u) { case 0u: goto IL_43; case 2u: this.paths_ = other.paths_.Clone(); arg_2B_0 = (num * 3630993511u ^ 1445836109u); continue; } return; } } } public FieldMask Clone() { return new FieldMask(this); } public override bool Equals(object other) { return this.Equals(other as FieldMask); } public bool Equals(FieldMask other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -355241706) % 7) { case 1: arg_48_0 = (this.paths_.Equals(other.paths_) ? -781780053 : -42101117); continue; case 2: return false; case 3: goto IL_12; case 4: return false; case 5: goto IL_7A; case 6: return true; } break; } return true; IL_12: arg_48_0 = -1539772282; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -103837231 : -608284565); goto IL_43; } public override int GetHashCode() { return 1 ^ FieldMask.smethod_0(this.paths_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.paths_.WriteTo(output, FieldMask._repeated_paths_codec); } public int CalculateSize() { return 0 + this.paths_.CalculateSize(FieldMask._repeated_paths_codec); } public void MergeFrom(FieldMask other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 518233939; IL_08: switch ((arg_0D_0 ^ 1199302996) % 4) { case 0: goto IL_03; case 2: IL_27: this.paths_.Add(other.paths_); arg_0D_0 = 273004453; goto IL_08; case 3: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) != 0u) ? 95386564u : 939242783u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 1534798109u)) % 6u) { case 0u: arg_68_0 = 95386564u; continue; case 1u: this.paths_.AddEntriesFrom(input, FieldMask._repeated_paths_codec); arg_68_0 = 469237416u; continue; case 2u: input.SkipLastField(); arg_68_0 = (num2 * 3530706062u ^ 2880211464u); continue; case 3u: goto IL_9B; case 5u: arg_68_0 = ((num == 10u) ? 1857937980u : 110731821u); continue; } return; } } } static FieldMask() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_52: uint arg_3A_0 = 2175406454u; while (true) { uint num; switch ((num = (arg_3A_0 ^ 3807717273u)) % 3u) { case 0u: goto IL_52; case 1u: FieldMask._repeated_paths_codec = FieldCodec.ForString(10u); arg_3A_0 = (num * 902393939u ^ 2492974704u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.Managers/SpellManager.cs using Framework.Misc; using System; namespace AuthServer.Game.Managers { public sealed class SpellManager : Singleton<SpellManager> { private SpellManager() { } } } <file_sep>/Google.Protobuf.Reflection/FileOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class FileOptions : IMessage, IMessage<FileOptions>, IEquatable<FileOptions>, IDeepCloneable<FileOptions> { [DebuggerNonUserCode] public static class Types { internal enum OptimizeMode { SPEED = 1, CODE_SIZE, LITE_RUNTIME } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FileOptions.__c __9 = new FileOptions.__c(); internal FileOptions cctor>b__100_0() { return new FileOptions(); } } private static readonly MessageParser<FileOptions> _parser = new MessageParser<FileOptions>(new Func<FileOptions>(FileOptions.__c.__9.<.cctor>b__100_0)); public const int JavaPackageFieldNumber = 1; private string javaPackage_ = ""; public const int JavaOuterClassnameFieldNumber = 8; private string javaOuterClassname_ = ""; public const int JavaMultipleFilesFieldNumber = 10; private bool javaMultipleFiles_; public const int JavaGenerateEqualsAndHashFieldNumber = 20; private bool javaGenerateEqualsAndHash_; public const int JavaStringCheckUtf8FieldNumber = 27; private bool javaStringCheckUtf8_; public const int OptimizeForFieldNumber = 9; private FileOptions.Types.OptimizeMode optimizeFor_ = FileOptions.Types.OptimizeMode.SPEED; public const int GoPackageFieldNumber = 11; private string goPackage_ = ""; public const int CcGenericServicesFieldNumber = 16; private bool ccGenericServices_; public const int JavaGenericServicesFieldNumber = 17; private bool javaGenericServices_; public const int PyGenericServicesFieldNumber = 18; private bool pyGenericServices_; public const int DeprecatedFieldNumber = 23; private bool deprecated_; public const int CcEnableArenasFieldNumber = 31; private bool ccEnableArenas_; public const int ObjcClassPrefixFieldNumber = 36; private string objcClassPrefix_ = ""; public const int CsharpNamespaceFieldNumber = 37; private string csharpNamespace_ = ""; public const int JavananoUseDeprecatedPackageFieldNumber = 38; private bool javananoUseDeprecatedPackage_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<FileOptions> Parser { get { return FileOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return FileOptions.Descriptor; } } public string JavaPackage { get { return this.javaPackage_; } set { this.javaPackage_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string JavaOuterClassname { get { return this.javaOuterClassname_; } set { this.javaOuterClassname_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool JavaMultipleFiles { get { return this.javaMultipleFiles_; } set { this.javaMultipleFiles_ = value; } } public bool JavaGenerateEqualsAndHash { get { return this.javaGenerateEqualsAndHash_; } set { this.javaGenerateEqualsAndHash_ = value; } } public bool JavaStringCheckUtf8 { get { return this.javaStringCheckUtf8_; } set { this.javaStringCheckUtf8_ = value; } } public FileOptions.Types.OptimizeMode OptimizeFor { get { return this.optimizeFor_; } set { this.optimizeFor_ = value; } } public string GoPackage { get { return this.goPackage_; } set { this.goPackage_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool CcGenericServices { get { return this.ccGenericServices_; } set { this.ccGenericServices_ = value; } } public bool JavaGenericServices { get { return this.javaGenericServices_; } set { this.javaGenericServices_ = value; } } public bool PyGenericServices { get { return this.pyGenericServices_; } set { this.pyGenericServices_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public bool CcEnableArenas { get { return this.ccEnableArenas_; } set { this.ccEnableArenas_ = value; } } public string ObjcClassPrefix { get { return this.objcClassPrefix_; } set { this.objcClassPrefix_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string CsharpNamespace { get { return this.csharpNamespace_; } set { this.csharpNamespace_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool JavananoUseDeprecatedPackage { get { return this.javananoUseDeprecatedPackage_; } set { this.javananoUseDeprecatedPackage_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public FileOptions() { } public FileOptions(FileOptions other) : this() { while (true) { IL_172: uint arg_13D_0 = 3699456920u; while (true) { uint num; switch ((num = (arg_13D_0 ^ 4011696056u)) % 10u) { case 0u: this.pyGenericServices_ = other.pyGenericServices_; this.deprecated_ = other.deprecated_; arg_13D_0 = (num * 2794081399u ^ 650885576u); continue; case 1u: this.objcClassPrefix_ = other.objcClassPrefix_; this.csharpNamespace_ = other.csharpNamespace_; arg_13D_0 = (num * 3269346598u ^ 2584151079u); continue; case 2u: this.javaStringCheckUtf8_ = other.javaStringCheckUtf8_; this.optimizeFor_ = other.optimizeFor_; this.goPackage_ = other.goPackage_; this.ccGenericServices_ = other.ccGenericServices_; this.javaGenericServices_ = other.javaGenericServices_; arg_13D_0 = (num * 3177611318u ^ 2395420344u); continue; case 4u: goto IL_172; case 5u: this.javaGenerateEqualsAndHash_ = other.javaGenerateEqualsAndHash_; arg_13D_0 = (num * 1490697446u ^ 3224510020u); continue; case 6u: this.ccEnableArenas_ = other.ccEnableArenas_; arg_13D_0 = (num * 2437929387u ^ 3889107739u); continue; case 7u: this.javaOuterClassname_ = other.javaOuterClassname_; arg_13D_0 = (num * 3969864483u ^ 2403448726u); continue; case 8u: this.javaPackage_ = other.javaPackage_; arg_13D_0 = (num * 4058541379u ^ 2307087451u); continue; case 9u: this.javaMultipleFiles_ = other.javaMultipleFiles_; arg_13D_0 = (num * 2310486444u ^ 26268829u); continue; } goto Block_1; } } Block_1: this.javananoUseDeprecatedPackage_ = other.javananoUseDeprecatedPackage_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public FileOptions Clone() { return new FileOptions(this); } public override bool Equals(object other) { return this.Equals(other as FileOptions); } public bool Equals(FileOptions other) { if (other == null) { goto IL_71; } goto IL_385; int arg_2D7_0; while (true) { IL_2D2: switch ((arg_2D7_0 ^ -14358945) % 37) { case 0: arg_2D7_0 = ((this.JavaGenericServices == other.JavaGenericServices) ? -1864428598 : -2105066054); continue; case 1: arg_2D7_0 = ((this.Deprecated == other.Deprecated) ? -1632895157 : -323340606); continue; case 2: arg_2D7_0 = (FileOptions.smethod_0(this.GoPackage, other.GoPackage) ? -2034242803 : -1069666560); continue; case 3: return false; case 5: return false; case 6: arg_2D7_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? -1491137352 : -7972449); continue; case 7: arg_2D7_0 = ((this.JavaMultipleFiles == other.JavaMultipleFiles) ? -1669724294 : -798085604); continue; case 8: arg_2D7_0 = ((this.PyGenericServices == other.PyGenericServices) ? -1103831699 : -1629784047); continue; case 9: arg_2D7_0 = ((this.JavaStringCheckUtf8 == other.JavaStringCheckUtf8) ? -1540564709 : -950726753); continue; case 10: arg_2D7_0 = ((this.OptimizeFor != other.OptimizeFor) ? -887641052 : -2103995888); continue; case 11: return false; case 12: return false; case 13: return false; case 14: arg_2D7_0 = ((this.JavaGenerateEqualsAndHash == other.JavaGenerateEqualsAndHash) ? -510593811 : -2131416989); continue; case 15: return false; case 16: return false; case 17: return false; case 18: arg_2D7_0 = ((!FileOptions.smethod_0(this.CsharpNamespace, other.CsharpNamespace)) ? -1742490141 : -1026194228); continue; case 19: arg_2D7_0 = ((this.CcEnableArenas != other.CcEnableArenas) ? -706770821 : -2076340971); continue; case 20: return false; case 21: return false; case 22: arg_2D7_0 = (FileOptions.smethod_0(this.JavaOuterClassname, other.JavaOuterClassname) ? -1334332757 : -1706121219); continue; case 23: arg_2D7_0 = ((this.CcGenericServices == other.CcGenericServices) ? -1219661411 : -1631780937); continue; case 24: arg_2D7_0 = (FileOptions.smethod_0(this.ObjcClassPrefix, other.ObjcClassPrefix) ? -688349786 : -1325123485); continue; case 25: return false; case 26: goto IL_71; case 27: arg_2D7_0 = ((!FileOptions.smethod_0(this.JavaPackage, other.JavaPackage)) ? -1854018957 : -344043150); continue; case 28: return false; case 29: return false; case 30: return true; case 31: return false; case 32: return false; case 33: arg_2D7_0 = ((this.JavananoUseDeprecatedPackage != other.JavananoUseDeprecatedPackage) ? -31574012 : -1024496936); continue; case 34: return false; case 35: return false; case 36: goto IL_385; } break; } return true; IL_71: arg_2D7_0 = -1253410400; goto IL_2D2; IL_385: arg_2D7_0 = ((other != this) ? -1584527349 : -247390548); goto IL_2D2; } public override int GetHashCode() { int num = 1; while (true) { IL_4CD: uint arg_440_0 = 3054931591u; while (true) { uint num2; switch ((num2 = (arg_440_0 ^ 3727032411u)) % 32u) { case 0u: arg_440_0 = (this.Deprecated ? 3566793495u : 2868469955u); continue; case 1u: arg_440_0 = ((FileOptions.smethod_1(this.JavaOuterClassname) == 0) ? 3424890789u : 3054161553u); continue; case 2u: num ^= this.JavaMultipleFiles.GetHashCode(); arg_440_0 = (num2 * 4118580042u ^ 1381998818u); continue; case 3u: arg_440_0 = ((this.ObjcClassPrefix.Length != 0) ? 3758972436u : 3749471590u); continue; case 4u: arg_440_0 = ((!this.JavaStringCheckUtf8) ? 2335695592u : 4084422397u); continue; case 5u: num ^= this.OptimizeFor.GetHashCode(); arg_440_0 = (num2 * 168927034u ^ 1142916749u); continue; case 6u: num ^= this.JavaStringCheckUtf8.GetHashCode(); arg_440_0 = (num2 * 1832672235u ^ 2067558026u); continue; case 7u: num ^= this.CsharpNamespace.GetHashCode(); arg_440_0 = (num2 * 1345151362u ^ 1352282378u); continue; case 8u: num ^= FileOptions.smethod_2(this.JavaPackage); arg_440_0 = (num2 * 1769616302u ^ 774175850u); continue; case 9u: num ^= this.PyGenericServices.GetHashCode(); arg_440_0 = (num2 * 87160363u ^ 1426080472u); continue; case 10u: num ^= FileOptions.smethod_2(this.JavaOuterClassname); arg_440_0 = (num2 * 1335565481u ^ 4204999935u); continue; case 11u: num ^= this.JavaGenericServices.GetHashCode(); arg_440_0 = (num2 * 2691774918u ^ 3874858184u); continue; case 12u: num ^= this.Deprecated.GetHashCode(); arg_440_0 = (num2 * 3499264190u ^ 1185518251u); continue; case 13u: arg_440_0 = ((!this.JavaGenerateEqualsAndHash) ? 3596614527u : 3287787874u); continue; case 14u: num ^= this.CcGenericServices.GetHashCode(); arg_440_0 = (num2 * 2011528017u ^ 1592066510u); continue; case 15u: num ^= this.ObjcClassPrefix.GetHashCode(); arg_440_0 = (num2 * 789489759u ^ 3996234295u); continue; case 16u: num ^= this.CcEnableArenas.GetHashCode(); arg_440_0 = (num2 * 1708378246u ^ 1774077592u); continue; case 17u: arg_440_0 = ((!this.PyGenericServices) ? 3831788699u : 2943814674u); continue; case 18u: goto IL_4CD; case 19u: arg_440_0 = ((this.OptimizeFor == FileOptions.Types.OptimizeMode.SPEED) ? 4202198127u : 2686626494u); continue; case 20u: arg_440_0 = ((this.GoPackage.Length == 0) ? 2233822222u : 3900945953u); continue; case 21u: arg_440_0 = ((!this.CcGenericServices) ? 3643487712u : 3438487957u); continue; case 23u: num ^= this.JavananoUseDeprecatedPackage.GetHashCode(); arg_440_0 = (num2 * 1922535752u ^ 3895202677u); continue; case 24u: arg_440_0 = ((!this.CcEnableArenas) ? 2447150072u : 3488967627u); continue; case 25u: num ^= this.JavaGenerateEqualsAndHash.GetHashCode(); arg_440_0 = (num2 * 3151279314u ^ 1903370173u); continue; case 26u: num ^= this.GoPackage.GetHashCode(); arg_440_0 = (num2 * 638072727u ^ 552057848u); continue; case 27u: arg_440_0 = (this.JavaGenericServices ? 2652333456u : 2458667722u); continue; case 28u: arg_440_0 = (((FileOptions.smethod_1(this.JavaPackage) == 0) ? 125268490u : 584386051u) ^ num2 * 996227132u); continue; case 29u: arg_440_0 = ((this.CsharpNamespace.Length != 0) ? 3719187452u : 3164700868u); continue; case 30u: arg_440_0 = ((!this.JavaMultipleFiles) ? 3116815158u : 4128404089u); continue; case 31u: arg_440_0 = (this.JavananoUseDeprecatedPackage ? 2653627276u : 3202598925u); continue; } goto Block_16; } } Block_16: return num ^ this.uninterpretedOption_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FileOptions.smethod_1(this.JavaPackage) != 0) { goto IL_449; } goto IL_5D3; uint arg_517_0; while (true) { IL_512: uint num; switch ((num = (arg_517_0 ^ 4107030139u)) % 40u) { case 0u: output.WriteRawTag(176, 2); output.WriteBool(this.JavananoUseDeprecatedPackage); arg_517_0 = (num * 3161429805u ^ 769857917u); continue; case 1u: output.WriteRawTag(72); arg_517_0 = (num * 3199340475u ^ 3358855179u); continue; case 2u: arg_517_0 = ((!this.JavaGenerateEqualsAndHash) ? 3981438951u : 2715206325u); continue; case 3u: goto IL_5D3; case 4u: output.WriteRawTag(66); output.WriteString(this.JavaOuterClassname); arg_517_0 = (num * 2016470747u ^ 156063458u); continue; case 5u: arg_517_0 = ((!this.JavaGenericServices) ? 2228571641u : 2895497377u); continue; case 6u: this.uninterpretedOption_.WriteTo(output, FileOptions._repeated_uninterpretedOption_codec); arg_517_0 = 3352685310u; continue; case 7u: goto IL_449; case 8u: arg_517_0 = ((FileOptions.smethod_1(this.CsharpNamespace) != 0) ? 2984480886u : 2958414994u); continue; case 9u: arg_517_0 = ((FileOptions.smethod_1(this.GoPackage) != 0) ? 2581130411u : 3318016216u); continue; case 10u: arg_517_0 = ((!this.PyGenericServices) ? 3776279609u : 3313781672u); continue; case 11u: arg_517_0 = (this.CcGenericServices ? 2736085129u : 2523978446u); continue; case 12u: output.WriteRawTag(10); output.WriteString(this.JavaPackage); arg_517_0 = (num * 2861689898u ^ 3175365696u); continue; case 14u: output.WriteString(this.ObjcClassPrefix); arg_517_0 = (num * 2401669990u ^ 2370131063u); continue; case 15u: arg_517_0 = ((!this.CcEnableArenas) ? 3881840821u : 3298108052u); continue; case 16u: output.WriteRawTag(184, 1); output.WriteBool(this.Deprecated); arg_517_0 = (num * 2888545465u ^ 3413407347u); continue; case 17u: output.WriteBool(this.JavaGenerateEqualsAndHash); arg_517_0 = (num * 4044386215u ^ 2653888368u); continue; case 18u: output.WriteRawTag(128, 1); output.WriteBool(this.CcGenericServices); arg_517_0 = (num * 1519610219u ^ 2506818536u); continue; case 19u: output.WriteEnum((int)this.OptimizeFor); arg_517_0 = (num * 1855625696u ^ 3446184612u); continue; case 20u: output.WriteBool(this.JavaGenericServices); arg_517_0 = (num * 4158766783u ^ 2662040365u); continue; case 21u: output.WriteRawTag(170, 2); arg_517_0 = (num * 4022688936u ^ 1557287844u); continue; case 22u: output.WriteRawTag(160, 1); arg_517_0 = (num * 4004576273u ^ 2614983236u); continue; case 23u: output.WriteString(this.CsharpNamespace); arg_517_0 = (num * 1982792960u ^ 2147641234u); continue; case 24u: output.WriteRawTag(90); arg_517_0 = (num * 3713449671u ^ 2766564274u); continue; case 25u: output.WriteString(this.GoPackage); arg_517_0 = (num * 206340982u ^ 2449856030u); continue; case 26u: output.WriteRawTag(216, 1); arg_517_0 = (num * 784962148u ^ 3190100920u); continue; case 27u: output.WriteRawTag(144, 1); output.WriteBool(this.PyGenericServices); arg_517_0 = (num * 1599128722u ^ 3211635311u); continue; case 28u: arg_517_0 = (this.Deprecated ? 3047388771u : 3282837291u); continue; case 29u: arg_517_0 = ((this.OptimizeFor != FileOptions.Types.OptimizeMode.SPEED) ? 3391902466u : 2829709572u); continue; case 30u: output.WriteBool(this.CcEnableArenas); arg_517_0 = (num * 3243846320u ^ 639611413u); continue; case 31u: arg_517_0 = (this.JavaMultipleFiles ? 2502895726u : 4192440202u); continue; case 32u: arg_517_0 = (this.JavaStringCheckUtf8 ? 3645898217u : 3613255868u); continue; case 33u: arg_517_0 = (this.JavananoUseDeprecatedPackage ? 4062101595u : 2840904413u); continue; case 34u: output.WriteRawTag(136, 1); arg_517_0 = (num * 3257727279u ^ 2015950929u); continue; case 35u: output.WriteBool(this.JavaStringCheckUtf8); arg_517_0 = (num * 479560116u ^ 3886776576u); continue; case 36u: output.WriteRawTag(162, 2); arg_517_0 = (num * 4068579550u ^ 2729370829u); continue; case 37u: output.WriteRawTag(80); output.WriteBool(this.JavaMultipleFiles); arg_517_0 = (num * 2005676695u ^ 1148116969u); continue; case 38u: arg_517_0 = ((FileOptions.smethod_1(this.ObjcClassPrefix) != 0) ? 2545001863u : 2347881155u); continue; case 39u: output.WriteRawTag(248, 1); arg_517_0 = (num * 475851229u ^ 4208822102u); continue; } break; } return; IL_449: arg_517_0 = 4196606559u; goto IL_512; IL_5D3: arg_517_0 = ((FileOptions.smethod_1(this.JavaOuterClassname) == 0) ? 3681032342u : 3528293863u); goto IL_512; } public int CalculateSize() { int num = 0; if (FileOptions.smethod_1(this.JavaPackage) != 0) { goto IL_12C; } goto IL_436; uint arg_39E_0; while (true) { IL_399: uint num2; switch ((num2 = (arg_39E_0 ^ 472093227u)) % 31u) { case 0u: arg_39E_0 = (this.JavaGenerateEqualsAndHash ? 615646398u : 396854703u); continue; case 1u: arg_39E_0 = ((!this.CcGenericServices) ? 726072051u : 1783260077u); continue; case 2u: arg_39E_0 = ((FileOptions.smethod_1(this.ObjcClassPrefix) != 0) ? 325121962u : 1349641303u); continue; case 3u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.OptimizeFor); arg_39E_0 = (num2 * 2706436363u ^ 3350373602u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.JavaOuterClassname); arg_39E_0 = (num2 * 1128461876u ^ 372865063u); continue; case 5u: arg_39E_0 = ((!this.Deprecated) ? 1372630663u : 1616277965u); continue; case 6u: num += 3; arg_39E_0 = (num2 * 1438036822u ^ 637349879u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.GoPackage); arg_39E_0 = (num2 * 165847461u ^ 3970159389u); continue; case 8u: num += 2; arg_39E_0 = (num2 * 2511576928u ^ 4260411188u); continue; case 9u: num += 2 + CodedOutputStream.ComputeStringSize(this.ObjcClassPrefix); arg_39E_0 = (num2 * 1653485560u ^ 2282416047u); continue; case 10u: arg_39E_0 = ((this.OptimizeFor != FileOptions.Types.OptimizeMode.SPEED) ? 1778577342u : 1233849989u); continue; case 11u: num += 3; arg_39E_0 = (num2 * 3019892277u ^ 3519001336u); continue; case 12u: arg_39E_0 = (this.JavaStringCheckUtf8 ? 1623827364u : 1321995875u); continue; case 13u: num += 3; arg_39E_0 = (num2 * 1447378001u ^ 2794094613u); continue; case 14u: arg_39E_0 = (this.CcEnableArenas ? 815255659u : 423982677u); continue; case 15u: num += 3; arg_39E_0 = (num2 * 311884859u ^ 4102959733u); continue; case 16u: num += 3; arg_39E_0 = (num2 * 3060332220u ^ 56645636u); continue; case 17u: num += 3; arg_39E_0 = (num2 * 2157314535u ^ 483927053u); continue; case 18u: arg_39E_0 = ((FileOptions.smethod_1(this.GoPackage) == 0) ? 338888092u : 1967095942u); continue; case 19u: arg_39E_0 = ((!this.JavaMultipleFiles) ? 474280980u : 944978640u); continue; case 20u: goto IL_12C; case 21u: num += 2 + CodedOutputStream.ComputeStringSize(this.CsharpNamespace); arg_39E_0 = (num2 * 2171900663u ^ 323579783u); continue; case 22u: arg_39E_0 = ((!this.JavaGenericServices) ? 315259017u : 825024105u); continue; case 24u: num += 3; arg_39E_0 = (num2 * 3526288216u ^ 3304089495u); continue; case 25u: arg_39E_0 = (this.JavananoUseDeprecatedPackage ? 867899814u : 615171850u); continue; case 26u: goto IL_436; case 27u: arg_39E_0 = (this.PyGenericServices ? 1238186814u : 321257832u); continue; case 28u: num += 1 + CodedOutputStream.ComputeStringSize(this.JavaPackage); arg_39E_0 = (num2 * 2903031154u ^ 3938549496u); continue; case 29u: num += 3; arg_39E_0 = (num2 * 2765718040u ^ 4174435001u); continue; case 30u: arg_39E_0 = ((FileOptions.smethod_1(this.CsharpNamespace) == 0) ? 1528983486u : 147822692u); continue; } break; } return num + this.uninterpretedOption_.CalculateSize(FileOptions._repeated_uninterpretedOption_codec); IL_12C: arg_39E_0 = 655880409u; goto IL_399; IL_436: arg_39E_0 = ((FileOptions.smethod_1(this.JavaOuterClassname) == 0) ? 317340731u : 1513382856u); goto IL_399; } public void MergeFrom(FileOptions other) { if (other == null) { goto IL_2D6; } goto IL_4A7; uint arg_403_0; while (true) { IL_3FE: uint num; switch ((num = (arg_403_0 ^ 1487676515u)) % 34u) { case 0u: this.JavaGenericServices = other.JavaGenericServices; arg_403_0 = (num * 2123924742u ^ 1878923867u); continue; case 1u: arg_403_0 = ((FileOptions.smethod_1(other.ObjcClassPrefix) != 0) ? 2143321658u : 1224742496u); continue; case 2u: arg_403_0 = (other.CcGenericServices ? 1371818819u : 1562162610u); continue; case 3u: this.ObjcClassPrefix = other.ObjcClassPrefix; arg_403_0 = (num * 3839346914u ^ 3522977010u); continue; case 4u: this.CcEnableArenas = other.CcEnableArenas; arg_403_0 = (num * 3486379121u ^ 4240685430u); continue; case 5u: arg_403_0 = ((other.OptimizeFor != FileOptions.Types.OptimizeMode.SPEED) ? 2087821255u : 626856196u); continue; case 6u: arg_403_0 = ((!other.JavaGenerateEqualsAndHash) ? 318508805u : 209052651u); continue; case 7u: arg_403_0 = ((!other.JavaMultipleFiles) ? 1647476571u : 1170434223u); continue; case 8u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_403_0 = 133977349u; continue; case 9u: goto IL_2D6; case 10u: arg_403_0 = ((!other.JavaStringCheckUtf8) ? 905040586u : 1812757396u); continue; case 11u: this.JavananoUseDeprecatedPackage = other.JavananoUseDeprecatedPackage; arg_403_0 = (num * 1056757099u ^ 2045719862u); continue; case 12u: this.JavaMultipleFiles = other.JavaMultipleFiles; arg_403_0 = (num * 3483423202u ^ 2940610371u); continue; case 13u: goto IL_4A7; case 14u: return; case 15u: this.PyGenericServices = other.PyGenericServices; arg_403_0 = (num * 2991953393u ^ 972932842u); continue; case 17u: this.CsharpNamespace = other.CsharpNamespace; arg_403_0 = (num * 3892787552u ^ 2435128310u); continue; case 18u: this.CcGenericServices = other.CcGenericServices; arg_403_0 = (num * 104936879u ^ 1503208274u); continue; case 19u: this.Deprecated = other.Deprecated; arg_403_0 = (num * 1861593658u ^ 2904542668u); continue; case 20u: arg_403_0 = ((!other.Deprecated) ? 1159621286u : 1543506202u); continue; case 21u: arg_403_0 = ((FileOptions.smethod_1(other.CsharpNamespace) == 0) ? 1228692246u : 1759264086u); continue; case 22u: this.JavaPackage = other.JavaPackage; arg_403_0 = (num * 4071121228u ^ 950516163u); continue; case 23u: arg_403_0 = (other.CcEnableArenas ? 280095937u : 219635444u); continue; case 24u: this.JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash; arg_403_0 = (num * 1492082922u ^ 1395092821u); continue; case 25u: arg_403_0 = ((!other.JavaGenericServices) ? 1386330799u : 1466726429u); continue; case 26u: arg_403_0 = ((FileOptions.smethod_1(other.JavaOuterClassname) == 0) ? 1888652704u : 1559358443u); continue; case 27u: this.JavaStringCheckUtf8 = other.JavaStringCheckUtf8; arg_403_0 = (num * 3162683494u ^ 1773934240u); continue; case 28u: arg_403_0 = ((!other.PyGenericServices) ? 1040571133u : 522751716u); continue; case 29u: arg_403_0 = ((FileOptions.smethod_1(other.GoPackage) == 0) ? 436899511u : 1861513774u); continue; case 30u: this.OptimizeFor = other.OptimizeFor; arg_403_0 = (num * 3031516219u ^ 1409867720u); continue; case 31u: arg_403_0 = (other.JavananoUseDeprecatedPackage ? 2089620204u : 1793457651u); continue; case 32u: this.JavaOuterClassname = other.JavaOuterClassname; arg_403_0 = (num * 584165398u ^ 517707792u); continue; case 33u: this.GoPackage = other.GoPackage; arg_403_0 = (num * 3976170818u ^ 2265654893u); continue; } break; } return; IL_2D6: arg_403_0 = 1777097739u; goto IL_3FE; IL_4A7: arg_403_0 = ((FileOptions.smethod_1(other.JavaPackage) == 0) ? 1520336035u : 901945899u); goto IL_3FE; } public void MergeFrom(CodedInputStream input) { while (true) { IL_73D: uint num; uint arg_639_0 = ((num = input.ReadTag()) != 0u) ? 1481035171u : 814191124u; while (true) { uint num2; switch ((num2 = (arg_639_0 ^ 1784681925u)) % 58u) { case 0u: arg_639_0 = (((num > 66u) ? 3383803868u : 3477052452u) ^ num2 * 1216562890u); continue; case 1u: arg_639_0 = ((num == 304u) ? 1007330992u : 1326497753u); continue; case 2u: this.JavaMultipleFiles = input.ReadBool(); arg_639_0 = 1123045193u; continue; case 3u: arg_639_0 = (((num != 298u) ? 1495462905u : 1780156726u) ^ num2 * 2833675155u); continue; case 4u: this.PyGenericServices = input.ReadBool(); arg_639_0 = 1067740429u; continue; case 5u: arg_639_0 = ((num == 72u) ? 1237628232u : 910516531u); continue; case 6u: this.JavaGenericServices = input.ReadBool(); arg_639_0 = 552631142u; continue; case 7u: arg_639_0 = ((num != 136u) ? 623150843u : 1751698619u); continue; case 8u: this.JavaStringCheckUtf8 = input.ReadBool(); arg_639_0 = 210145347u; continue; case 9u: arg_639_0 = (((num != 128u) ? 627892756u : 1063095069u) ^ num2 * 3054281725u); continue; case 10u: arg_639_0 = (((num == 66u) ? 3985808095u : 3333823721u) ^ num2 * 180666057u); continue; case 11u: this.uninterpretedOption_.AddEntriesFrom(input, FileOptions._repeated_uninterpretedOption_codec); arg_639_0 = 1123045193u; continue; case 12u: this.JavaPackage = input.ReadString(); arg_639_0 = 1123045193u; continue; case 13u: arg_639_0 = 1481035171u; continue; case 14u: this.CcEnableArenas = input.ReadBool(); arg_639_0 = 1123045193u; continue; case 15u: arg_639_0 = (num2 * 1812005063u ^ 2541931868u); continue; case 16u: this.Deprecated = input.ReadBool(); arg_639_0 = 158782370u; continue; case 17u: arg_639_0 = (((num > 184u) ? 3443356420u : 3572745443u) ^ num2 * 4156099023u); continue; case 18u: arg_639_0 = (num2 * 3584752328u ^ 2290073100u); continue; case 19u: arg_639_0 = (num2 * 2518802504u ^ 4223181745u); continue; case 20u: arg_639_0 = ((num == 216u) ? 909938089u : 41988212u); continue; case 21u: arg_639_0 = ((num > 128u) ? 1080971906u : 1782486778u); continue; case 22u: arg_639_0 = (num2 * 553956444u ^ 1530898017u); continue; case 23u: this.optimizeFor_ = (FileOptions.Types.OptimizeMode)input.ReadEnum(); arg_639_0 = 1598314374u; continue; case 24u: arg_639_0 = (((num != 80u) ? 4243281478u : 3097529415u) ^ num2 * 931298296u); continue; case 25u: this.JavananoUseDeprecatedPackage = input.ReadBool(); arg_639_0 = 581918595u; continue; case 26u: arg_639_0 = (((num == 144u) ? 326403559u : 1063262617u) ^ num2 * 295100008u); continue; case 27u: arg_639_0 = (((num <= 80u) ? 788999598u : 1097371917u) ^ num2 * 2699762051u); continue; case 28u: arg_639_0 = (num2 * 614472465u ^ 161241864u); continue; case 29u: this.JavaGenerateEqualsAndHash = input.ReadBool(); arg_639_0 = 1123045193u; continue; case 30u: goto IL_73D; case 31u: arg_639_0 = ((num <= 298u) ? 1531424296u : 1812757836u); continue; case 32u: arg_639_0 = ((num > 248u) ? 1412788794u : 744087158u); continue; case 34u: arg_639_0 = (num2 * 100212448u ^ 2149191100u); continue; case 35u: this.CcGenericServices = input.ReadBool(); arg_639_0 = 898357315u; continue; case 36u: this.GoPackage = input.ReadString(); arg_639_0 = 1798296425u; continue; case 37u: this.ObjcClassPrefix = input.ReadString(); arg_639_0 = 1123045193u; continue; case 38u: arg_639_0 = (num2 * 3839640981u ^ 1604361143u); continue; case 39u: arg_639_0 = (((num == 290u) ? 965117616u : 582760072u) ^ num2 * 3394748258u); continue; case 40u: arg_639_0 = (num2 * 173670205u ^ 781073831u); continue; case 41u: arg_639_0 = (((num == 10u) ? 3369651389u : 3433400795u) ^ num2 * 2027187718u); continue; case 42u: this.JavaOuterClassname = input.ReadString(); arg_639_0 = 1123045193u; continue; case 43u: arg_639_0 = (((num != 248u) ? 1370132130u : 1830808706u) ^ num2 * 4028253001u); continue; case 44u: arg_639_0 = ((num > 144u) ? 991719635u : 528198876u); continue; case 45u: arg_639_0 = (num2 * 244241819u ^ 1910339285u); continue; case 46u: arg_639_0 = (num2 * 750997511u ^ 2662883837u); continue; case 47u: arg_639_0 = (((num != 90u) ? 2447938451u : 3195576088u) ^ num2 * 1455388163u); continue; case 48u: arg_639_0 = (num2 * 1461000624u ^ 2857137596u); continue; case 49u: input.SkipLastField(); arg_639_0 = 1123045193u; continue; case 50u: arg_639_0 = (((num == 7994u) ? 3552440826u : 2596849548u) ^ num2 * 1466361092u); continue; case 51u: arg_639_0 = (num2 * 2244766705u ^ 3157373349u); continue; case 52u: arg_639_0 = (num2 * 506482359u ^ 55511473u); continue; case 53u: arg_639_0 = (num2 * 3442224298u ^ 2734764919u); continue; case 54u: arg_639_0 = (((num != 184u) ? 769849608u : 464966367u) ^ num2 * 885462187u); continue; case 55u: arg_639_0 = (num2 * 697800785u ^ 1283018303u); continue; case 56u: this.CsharpNamespace = input.ReadString(); arg_639_0 = 1123045193u; continue; case 57u: arg_639_0 = (((num == 160u) ? 3679819308u : 4196142373u) ^ num2 * 1342102198u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/ConversationFields.cs using System; public enum ConversationFields { LastLineEndTime = 12, End } <file_sep>/Bgs.Protocol/AttributeFilter.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class AttributeFilter : IMessage<AttributeFilter>, IEquatable<AttributeFilter>, IDeepCloneable<AttributeFilter>, IMessage { [DebuggerNonUserCode] public static class Types { public enum Operation { MATCH_NONE, MATCH_ANY, MATCH_ALL, MATCH_ALL_MOST_SPECIFIC } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AttributeFilter.__c __9 = new AttributeFilter.__c(); internal AttributeFilter cctor>b__30_0() { return new AttributeFilter(); } } private static readonly MessageParser<AttributeFilter> _parser = new MessageParser<AttributeFilter>(new Func<AttributeFilter>(AttributeFilter.__c.__9.<.cctor>b__30_0)); public const int OpFieldNumber = 1; private AttributeFilter.Types.Operation op_; public const int AttributeFieldNumber = 2; private static readonly FieldCodec<Attribute> _repeated_attribute_codec; private readonly RepeatedField<Attribute> attribute_ = new RepeatedField<Attribute>(); public static MessageParser<AttributeFilter> Parser { get { return AttributeFilter._parser; } } public static MessageDescriptor Descriptor { get { return AttributeTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return AttributeFilter.Descriptor; } } public AttributeFilter.Types.Operation Op { get { return this.op_; } set { this.op_ = value; } } public RepeatedField<Attribute> Attribute { get { return this.attribute_; } } public AttributeFilter() { } public AttributeFilter(AttributeFilter other) : this() { this.op_ = other.op_; this.attribute_ = other.attribute_.Clone(); } public AttributeFilter Clone() { return new AttributeFilter(this); } public override bool Equals(object other) { return this.Equals(other as AttributeFilter); } public bool Equals(AttributeFilter other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1946807198) % 9) { case 0: return false; case 2: arg_72_0 = ((this.Op != other.Op) ? 1068643491 : 1853057737); continue; case 3: return true; case 4: goto IL_41; case 5: goto IL_B0; case 6: return false; case 7: arg_72_0 = (this.attribute_.Equals(other.attribute_) ? 390032858 : 1988620071); continue; case 8: return false; } break; } return true; IL_41: arg_72_0 = 797789712; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 1349497312 : 2084391724); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_8E: uint arg_6E_0 = 1996022142u; while (true) { uint num2; switch ((num2 = (arg_6E_0 ^ 1788315031u)) % 5u) { case 0u: num ^= AttributeFilter.smethod_0(this.attribute_); arg_6E_0 = 428627075u; continue; case 2u: arg_6E_0 = (((this.Op == AttributeFilter.Types.Operation.MATCH_NONE) ? 3244598914u : 3887803613u) ^ num2 * 1720588797u); continue; case 3u: goto IL_8E; case 4u: num ^= this.Op.GetHashCode(); arg_6E_0 = (num2 * 2888450848u ^ 1638003495u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Op != AttributeFilter.Types.Operation.MATCH_NONE) { goto IL_3B; } goto IL_65; uint arg_45_0; while (true) { IL_40: uint num; switch ((num = (arg_45_0 ^ 4259520043u)) % 5u) { case 0u: goto IL_3B; case 2u: goto IL_65; case 3u: output.WriteEnum((int)this.Op); arg_45_0 = (num * 45100453u ^ 1494289585u); continue; case 4u: output.WriteRawTag(8); arg_45_0 = (num * 2721099529u ^ 2484777325u); continue; } break; } return; IL_3B: arg_45_0 = 2165774735u; goto IL_40; IL_65: this.attribute_.WriteTo(output, AttributeFilter._repeated_attribute_codec); arg_45_0 = 2436265336u; goto IL_40; } public int CalculateSize() { int num = 0; while (true) { IL_8C: uint arg_6C_0 = 370105057u; while (true) { uint num2; switch ((num2 = (arg_6C_0 ^ 1995481097u)) % 5u) { case 0u: goto IL_8C; case 1u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Op); arg_6C_0 = (num2 * 1668818304u ^ 3706835839u); continue; case 3u: arg_6C_0 = (((this.Op != AttributeFilter.Types.Operation.MATCH_NONE) ? 325120572u : 996688639u) ^ num2 * 1209306944u); continue; case 4u: num += this.attribute_.CalculateSize(AttributeFilter._repeated_attribute_codec); arg_6C_0 = 413137883u; continue; } return num; } } return num; } public void MergeFrom(AttributeFilter other) { if (other == null) { goto IL_45; } goto IL_7F; uint arg_4F_0; while (true) { IL_4A: uint num; switch ((num = (arg_4F_0 ^ 2730507951u)) % 6u) { case 0u: goto IL_45; case 2u: this.attribute_.Add(other.attribute_); arg_4F_0 = 3840456902u; continue; case 3u: this.Op = other.Op; arg_4F_0 = (num * 3526410773u ^ 2832359064u); continue; case 4u: goto IL_7F; case 5u: return; } break; } return; IL_45: arg_4F_0 = 2560921410u; goto IL_4A; IL_7F: arg_4F_0 = ((other.Op != AttributeFilter.Types.Operation.MATCH_NONE) ? 2916209036u : 3365109063u); goto IL_4A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F5: uint num; uint arg_B5_0 = ((num = input.ReadTag()) != 0u) ? 594147930u : 1872496343u; while (true) { uint num2; switch ((num2 = (arg_B5_0 ^ 1386747605u)) % 9u) { case 0u: this.attribute_.AddEntriesFrom(input, AttributeFilter._repeated_attribute_codec); arg_B5_0 = 481901600u; continue; case 1u: arg_B5_0 = (num2 * 3437492267u ^ 887274129u); continue; case 2u: arg_B5_0 = 594147930u; continue; case 3u: arg_B5_0 = (((num != 18u) ? 1957521271u : 176141500u) ^ num2 * 3581537769u); continue; case 4u: arg_B5_0 = ((num != 8u) ? 802975884u : 1081338731u); continue; case 6u: input.SkipLastField(); arg_B5_0 = (num2 * 384369197u ^ 2153177057u); continue; case 7u: goto IL_F5; case 8u: this.op_ = (AttributeFilter.Types.Operation)input.ReadEnum(); arg_B5_0 = 481901600u; continue; } return; } } } static AttributeFilter() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 4244788924u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2369492972u)) % 3u) { case 1u: AttributeFilter._repeated_attribute_codec = FieldCodec.ForMessage<Attribute>(18u, Bgs.Protocol.Attribute.Parser); arg_3F_0 = (num * 3543738473u ^ 3282758969u); continue; case 2u: goto IL_57; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/HotfixEntry.cs using System; using System.Collections.Generic; public class HotfixEntry { public int Index { get; set; } public int Id { get; set; } public List<byte[]> Data { get; set; } public HotfixEntry() { this.<Data>k__BackingField = new List<byte[]>(); base..ctor(); } } <file_sep>/AuthServer.AuthServer.Attributes/BnetServiceAttribute.cs using Framework.Constants.Net; using System; namespace AuthServer.AuthServer.Attributes { [AttributeUsage(AttributeTargets.Class)] public class BnetServiceAttribute : Attribute { public BnetServiceHash Hash { get; set; } public BnetServiceAttribute(BnetServiceHash hash) { this.Hash = hash; } } } <file_sep>/Bgs.Protocol.Account.V1/AccountServiceConfig.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountServiceConfig : IMessage<AccountServiceConfig>, IEquatable<AccountServiceConfig>, IDeepCloneable<AccountServiceConfig>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountServiceConfig.__c __9 = new AccountServiceConfig.__c(); internal AccountServiceConfig cctor>b__24_0() { return new AccountServiceConfig(); } } private static readonly MessageParser<AccountServiceConfig> _parser = new MessageParser<AccountServiceConfig>(new Func<AccountServiceConfig>(AccountServiceConfig.__c.__9.<.cctor>b__24_0)); public const int RegionFieldNumber = 1; private static readonly FieldCodec<AccountServiceRegion> _repeated_region_codec = FieldCodec.ForMessage<AccountServiceRegion>(10u, AccountServiceRegion.Parser); private readonly RepeatedField<AccountServiceRegion> region_ = new RepeatedField<AccountServiceRegion>(); public static MessageParser<AccountServiceConfig> Parser { get { return AccountServiceConfig._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return AccountServiceConfig.Descriptor; } } public RepeatedField<AccountServiceRegion> Region { get { return this.region_; } } public AccountServiceConfig() { } public AccountServiceConfig(AccountServiceConfig other) : this() { while (true) { IL_43: uint arg_2B_0 = 2477417075u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 3562155325u)) % 3u) { case 0u: goto IL_43; case 2u: this.region_ = other.region_.Clone(); arg_2B_0 = (num * 1391465202u ^ 1294393050u); continue; } return; } } } public AccountServiceConfig Clone() { return new AccountServiceConfig(this); } public override bool Equals(object other) { return this.Equals(other as AccountServiceConfig); } public bool Equals(AccountServiceConfig other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 458845330) % 7) { case 0: return true; case 1: return false; case 2: goto IL_7A; case 3: arg_48_0 = (this.region_.Equals(other.region_) ? 231946564 : 534426896); continue; case 4: return false; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = 272688443; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 341716713 : 1852000686); goto IL_43; } public override int GetHashCode() { return 1 ^ AccountServiceConfig.smethod_0(this.region_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.region_.WriteTo(output, AccountServiceConfig._repeated_region_codec); } public int CalculateSize() { return 0 + this.region_.CalculateSize(AccountServiceConfig._repeated_region_codec); } public void MergeFrom(AccountServiceConfig other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 1721761647; IL_08: switch ((arg_0D_0 ^ 1144188344) % 4) { case 0: goto IL_03; case 2: IL_27: this.region_.Add(other.region_); arg_0D_0 = 118179777; goto IL_08; case 3: return; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) == 0u) ? 3753807522u : 3187151134u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 4273110258u)) % 7u) { case 0u: arg_77_0 = (num2 * 2701175227u ^ 1840857u); continue; case 1u: goto IL_AE; case 2u: this.region_.AddEntriesFrom(input, AccountServiceConfig._repeated_region_codec); arg_77_0 = 3161121141u; continue; case 3u: input.SkipLastField(); arg_77_0 = (num2 * 3359973636u ^ 3415457950u); continue; case 4u: arg_77_0 = 3187151134u; continue; case 5u: arg_77_0 = ((num == 10u) ? 2874743884u : 2483781880u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public static class ChallengeServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ChallengeServiceReflection.descriptor; } } static ChallengeServiceReflection() { ChallengeServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(ChallengeServiceReflection.smethod_1(ChallengeServiceReflection.smethod_0(new string[] { Module.smethod_34<string>(3847734877u), Module.smethod_33<string>(1953995647u), Module.smethod_35<string>(1574079794u), Module.smethod_36<string>(1710135090u), Module.smethod_34<string>(2347949085u), Module.smethod_34<string>(1223109741u), Module.smethod_36<string>(934568098u), Module.smethod_36<string>(3666661874u), Module.smethod_37<string>(3124017278u), Module.smethod_33<string>(2976337919u), Module.smethod_35<string>(608879538u), Module.smethod_34<string>(3268398349u), Module.smethod_37<string>(2218340030u), Module.smethod_33<string>(1340025407u), Module.smethod_35<string>(2273763058u), Module.smethod_33<string>(2158181663u), Module.smethod_34<string>(2143559005u), Module.smethod_34<string>(1018719661u), Module.smethod_34<string>(1393666109u), Module.smethod_36<string>(2473962546u), Module.smethod_33<string>(2260274671u), Module.smethod_37<string>(1371017518u), Module.smethod_35<string>(1308562802u), Module.smethod_33<string>(3180523935u), Module.smethod_33<string>(623962159u), Module.smethod_37<string>(786527086u), Module.smethod_33<string>(2875657103u), Module.smethod_37<string>(1984449550u), Module.smethod_35<string>(3420155666u), Module.smethod_37<string>(3182372014u), Module.smethod_36<string>(3319966754u), Module.smethod_35<string>(1447592834u), Module.smethod_35<string>(790071890u), Module.smethod_36<string>(3308227218u), Module.smethod_37<string>(1838326942u), Module.smethod_37<string>(1487726990u), Module.smethod_34<string>(1461333533u), Module.smethod_37<string>(2685649454u), Module.smethod_35<string>(2804797042u), Module.smethod_33<string>(1341437599u), Module.smethod_33<string>(3079843119u), Module.smethod_33<string>(3181936127u), Module.smethod_34<string>(3506622141u), Module.smethod_35<string>(2147276098u), Module.smethod_35<string>(1489755154u), Module.smethod_34<string>(1631889901u), Module.smethod_35<string>(1839596786u), Module.smethod_36<string>(2520920690u), Module.smethod_33<string>(4102185391u), Module.smethod_37<string>(1283249646u), Module.smethod_37<string>(2831772062u), Module.smethod_36<string>(946307634u), Module.smethod_33<string>(2465872879u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(Challenge).TypeHandle), Challenge.Parser, new string[] { Module.smethod_37<string>(147837329u), Module.smethod_35<string>(2273479739u), Module.smethod_33<string>(2567965887u), Module.smethod_33<string>(2024714162u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengePickedRequest).TypeHandle), ChallengePickedRequest.Parser, new string[] { Module.smethod_35<string>(2315358740u), Module.smethod_37<string>(1783715023u), Module.smethod_35<string>(3224720328u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengePickedResponse).TypeHandle), ChallengePickedResponse.Parser, new string[] { Module.smethod_34<string>(3302232061u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeAnsweredRequest).TypeHandle), ChallengeAnsweredRequest.Parser, new string[] { Module.smethod_33<string>(2567965887u), Module.smethod_37<string>(932649694u), Module.smethod_35<string>(4021477587u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeAnsweredResponse).TypeHandle), ChallengeAnsweredResponse.Parser, new string[] { Module.smethod_37<string>(932649694u), Module.smethod_33<string>(3654469337u), Module.smethod_37<string>(4088137675u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeCancelledRequest).TypeHandle), ChallengeCancelledRequest.Parser, new string[] { Module.smethod_35<string>(4021477587u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(SendChallengeToUserRequest).TypeHandle), SendChallengeToUserRequest.Parser, new string[] { Module.smethod_33<string>(228704801u), Module.smethod_35<string>(2481947751u), Module.smethod_37<string>(2364315283u), Module.smethod_34<string>(1080216740u), Module.smethod_35<string>(3685312303u), Module.smethod_35<string>(2827745881u), Module.smethod_35<string>(2370270415u), Module.smethod_36<string>(4043002107u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(SendChallengeToUserResponse).TypeHandle), SendChallengeToUserResponse.Parser, new string[] { Module.smethod_33<string>(3097905584u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeUserRequest).TypeHandle), ChallengeUserRequest.Parser, new string[] { Module.smethod_36<string>(926106631u), Module.smethod_33<string>(2625569728u), Module.smethod_37<string>(1783715023u), Module.smethod_37<string>(2042922170u), Module.smethod_37<string>(2628974565u), Module.smethod_37<string>(965451995u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeResultRequest).TypeHandle), ChallengeResultRequest.Parser, new string[] { Module.smethod_33<string>(3097905584u), Module.smethod_36<string>(2557121941u), Module.smethod_34<string>(3462041918u), Module.smethod_37<string>(3679094574u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeExternalRequest).TypeHandle), ChallengeExternalRequest.Parser, new string[] { Module.smethod_33<string>(3603422833u), Module.smethod_37<string>(1400135944u), Module.smethod_33<string>(1161970062u) }, null, null, null), new GeneratedCodeInfo(ChallengeServiceReflection.smethod_2(typeof(ChallengeExternalResult).TypeHandle), ChallengeExternalResult.Parser, new string[] { Module.smethod_33<string>(3603422833u), Module.smethod_36<string>(2364496064u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/PresenceChannelCreatedRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class PresenceChannelCreatedRequest : IMessage<PresenceChannelCreatedRequest>, IEquatable<PresenceChannelCreatedRequest>, IDeepCloneable<PresenceChannelCreatedRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly PresenceChannelCreatedRequest.__c __9 = new PresenceChannelCreatedRequest.__c(); internal PresenceChannelCreatedRequest cctor>b__39_0() { return new PresenceChannelCreatedRequest(); } } private static readonly MessageParser<PresenceChannelCreatedRequest> _parser = new MessageParser<PresenceChannelCreatedRequest>(new Func<PresenceChannelCreatedRequest>(PresenceChannelCreatedRequest.__c.__9.<.cctor>b__39_0)); public const int IdFieldNumber = 1; private EntityId id_; public const int GameAccountIdFieldNumber = 3; private EntityId gameAccountId_; public const int AccountIdFieldNumber = 4; private EntityId accountId_; public const int HostFieldNumber = 5; private ProcessId host_; public static MessageParser<PresenceChannelCreatedRequest> Parser { get { return PresenceChannelCreatedRequest._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return PresenceChannelCreatedRequest.Descriptor; } } public EntityId Id { get { return this.id_; } set { this.id_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public PresenceChannelCreatedRequest() { } public PresenceChannelCreatedRequest(PresenceChannelCreatedRequest other) : this() { while (true) { IL_87: int arg_6D_0 = 1723882276; while (true) { switch ((arg_6D_0 ^ 1081353690) % 4) { case 0: goto IL_87; case 1: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); arg_6D_0 = 564671969; continue; case 2: this.Id = ((other.id_ != null) ? other.Id.Clone() : null); arg_6D_0 = 166790615; continue; } goto Block_4; } } Block_4: this.Host = ((other.host_ != null) ? other.Host.Clone() : null); } public PresenceChannelCreatedRequest Clone() { return new PresenceChannelCreatedRequest(this); } public override bool Equals(object other) { return this.Equals(other as PresenceChannelCreatedRequest); } public bool Equals(PresenceChannelCreatedRequest other) { if (other == null) { goto IL_A2; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ -1742615320) % 13) { case 0: return false; case 1: return false; case 2: return false; case 3: arg_D8_0 = ((!PresenceChannelCreatedRequest.smethod_0(this.AccountId, other.AccountId)) ? -1798812259 : -1184253844); continue; case 4: return false; case 5: return false; case 6: goto IL_126; case 7: goto IL_A2; case 8: arg_D8_0 = (PresenceChannelCreatedRequest.smethod_0(this.Host, other.Host) ? -52304356 : -1130213654); continue; case 9: arg_D8_0 = (PresenceChannelCreatedRequest.smethod_0(this.GameAccountId, other.GameAccountId) ? -1021153772 : -1776389165); continue; case 10: return true; case 12: arg_D8_0 = (PresenceChannelCreatedRequest.smethod_0(this.Id, other.Id) ? -93281259 : -7963197); continue; } break; } return true; IL_A2: arg_D8_0 = -1052162524; goto IL_D3; IL_126: arg_D8_0 = ((other == this) ? -1228581207 : -479778745); goto IL_D3; } public override int GetHashCode() { int num = 1; while (true) { IL_123: uint arg_F2_0 = 2557997559u; while (true) { uint num2; switch ((num2 = (arg_F2_0 ^ 2649250334u)) % 9u) { case 0u: num ^= PresenceChannelCreatedRequest.smethod_1(this.GameAccountId); arg_F2_0 = (num2 * 3270511122u ^ 502747650u); continue; case 1u: num ^= PresenceChannelCreatedRequest.smethod_1(this.Id); arg_F2_0 = (num2 * 445812814u ^ 3664574582u); continue; case 2u: arg_F2_0 = (((this.gameAccountId_ == null) ? 3795488262u : 3860110175u) ^ num2 * 2770508379u); continue; case 3u: goto IL_123; case 4u: arg_F2_0 = ((this.host_ == null) ? 2671459297u : 3988013515u); continue; case 5u: num ^= PresenceChannelCreatedRequest.smethod_1(this.AccountId); arg_F2_0 = (num2 * 1089867835u ^ 3012362229u); continue; case 6u: num ^= PresenceChannelCreatedRequest.smethod_1(this.Host); arg_F2_0 = (num2 * 615299163u ^ 1424082774u); continue; case 8u: arg_F2_0 = ((this.accountId_ != null) ? 3651663819u : 2959384546u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Id); if (this.gameAccountId_ != null) { goto IL_4B; } goto IL_115; uint arg_DA_0; while (true) { IL_D5: uint num; switch ((num = (arg_DA_0 ^ 3525295497u)) % 8u) { case 1u: goto IL_115; case 2u: output.WriteRawTag(34); output.WriteMessage(this.AccountId); arg_DA_0 = (num * 1132864022u ^ 3390397622u); continue; case 3u: arg_DA_0 = ((this.host_ == null) ? 2351877841u : 2750606302u); continue; case 4u: output.WriteRawTag(26); output.WriteMessage(this.GameAccountId); arg_DA_0 = (num * 2140615824u ^ 873431936u); continue; case 5u: output.WriteMessage(this.Host); arg_DA_0 = (num * 3399465123u ^ 3463045750u); continue; case 6u: goto IL_4B; case 7u: output.WriteRawTag(42); arg_DA_0 = (num * 1719053753u ^ 2320071291u); continue; } break; } return; IL_4B: arg_DA_0 = 4284864749u; goto IL_D5; IL_115: arg_DA_0 = ((this.accountId_ != null) ? 2238440419u : 3893587370u); goto IL_D5; } public int CalculateSize() { int num = 0; while (true) { IL_12B: uint arg_FA_0 = 2510911161u; while (true) { uint num2; switch ((num2 = (arg_FA_0 ^ 3872126243u)) % 9u) { case 1u: arg_FA_0 = (((this.gameAccountId_ != null) ? 3060939973u : 2978272734u) ^ num2 * 1000265853u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_FA_0 = (num2 * 3645685764u ^ 1540327923u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Id); arg_FA_0 = (num2 * 1526802588u ^ 2075798782u); continue; case 4u: arg_FA_0 = ((this.accountId_ == null) ? 3083290480u : 3052972207u); continue; case 5u: goto IL_12B; case 6u: arg_FA_0 = ((this.host_ == null) ? 3394170010u : 2558954680u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_FA_0 = (num2 * 3545917586u ^ 792952488u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_FA_0 = (num2 * 921002204u ^ 3684388270u); continue; } return num; } } return num; } public void MergeFrom(PresenceChannelCreatedRequest other) { if (other == null) { goto IL_7D; } goto IL_27A; uint arg_212_0; while (true) { IL_20D: uint num; switch ((num = (arg_212_0 ^ 3014507787u)) % 19u) { case 0u: this.Id.MergeFrom(other.Id); arg_212_0 = 3612707020u; continue; case 1u: this.accountId_ = new EntityId(); arg_212_0 = (num * 1232018632u ^ 1922882743u); continue; case 2u: this.Host.MergeFrom(other.Host); arg_212_0 = 4144961176u; continue; case 3u: this.AccountId.MergeFrom(other.AccountId); arg_212_0 = 2251447432u; continue; case 4u: arg_212_0 = (((this.accountId_ != null) ? 2770628951u : 2426403559u) ^ num * 2628410556u); continue; case 5u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_212_0 = 3726061319u; continue; case 6u: arg_212_0 = (((this.host_ != null) ? 1983394942u : 1302573932u) ^ num * 3467087804u); continue; case 7u: return; case 9u: this.host_ = new ProcessId(); arg_212_0 = (num * 3312370650u ^ 146849248u); continue; case 10u: this.gameAccountId_ = new EntityId(); arg_212_0 = (num * 3354767364u ^ 2851281192u); continue; case 11u: arg_212_0 = (((this.gameAccountId_ != null) ? 2209079546u : 2753206936u) ^ num * 1314478306u); continue; case 12u: arg_212_0 = (((this.id_ == null) ? 1725663877u : 579340920u) ^ num * 2955077289u); continue; case 13u: arg_212_0 = ((other.gameAccountId_ != null) ? 2466578296u : 3726061319u); continue; case 14u: goto IL_7D; case 15u: goto IL_27A; case 16u: arg_212_0 = ((other.host_ == null) ? 4144961176u : 3508013801u); continue; case 17u: arg_212_0 = ((other.accountId_ != null) ? 2742223531u : 2251447432u); continue; case 18u: this.id_ = new EntityId(); arg_212_0 = (num * 1190907243u ^ 2818225020u); continue; } break; } return; IL_7D: arg_212_0 = 4126255496u; goto IL_20D; IL_27A: arg_212_0 = ((other.id_ != null) ? 4193847428u : 3612707020u); goto IL_20D; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2D9: uint num; uint arg_261_0 = ((num = input.ReadTag()) == 0u) ? 2064680850u : 1254662997u; while (true) { uint num2; switch ((num2 = (arg_261_0 ^ 49846219u)) % 23u) { case 0u: this.gameAccountId_ = new EntityId(); arg_261_0 = (num2 * 2859010130u ^ 349037434u); continue; case 1u: input.ReadMessage(this.id_); arg_261_0 = 1374975441u; continue; case 2u: arg_261_0 = (((num == 26u) ? 3461260169u : 2412224920u) ^ num2 * 3222096354u); continue; case 3u: arg_261_0 = ((this.host_ == null) ? 1713754928u : 304610389u); continue; case 4u: input.ReadMessage(this.accountId_); arg_261_0 = 1374975441u; continue; case 5u: arg_261_0 = ((this.id_ != null) ? 952301539u : 1119369028u); continue; case 6u: this.id_ = new EntityId(); arg_261_0 = (num2 * 1824720713u ^ 2407286308u); continue; case 7u: arg_261_0 = ((this.gameAccountId_ != null) ? 702705326u : 1737771793u); continue; case 8u: arg_261_0 = (((num != 10u) ? 2970473006u : 3681044282u) ^ num2 * 3201731268u); continue; case 9u: arg_261_0 = ((num == 34u) ? 341456123u : 1225963646u); continue; case 10u: arg_261_0 = (num2 * 810160077u ^ 3205966340u); continue; case 11u: input.SkipLastField(); arg_261_0 = 1992059903u; continue; case 12u: input.ReadMessage(this.gameAccountId_); arg_261_0 = 1374975441u; continue; case 13u: arg_261_0 = ((this.accountId_ == null) ? 1375252648u : 884902299u); continue; case 14u: arg_261_0 = (((num == 42u) ? 2374239991u : 3442676957u) ^ num2 * 2805290284u); continue; case 15u: this.host_ = new ProcessId(); arg_261_0 = (num2 * 1294527744u ^ 221487957u); continue; case 16u: arg_261_0 = 1254662997u; continue; case 17u: goto IL_2D9; case 19u: this.accountId_ = new EntityId(); arg_261_0 = (num2 * 2170635981u ^ 1708725724u); continue; case 20u: input.ReadMessage(this.host_); arg_261_0 = 1374975441u; continue; case 21u: arg_261_0 = (num2 * 2849248576u ^ 3104515281u); continue; case 22u: arg_261_0 = ((num > 26u) ? 2040316503u : 744694743u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Friends.V1/GenericFriendRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class GenericFriendRequest : IMessage<GenericFriendRequest>, IEquatable<GenericFriendRequest>, IDeepCloneable<GenericFriendRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenericFriendRequest.__c __9 = new GenericFriendRequest.__c(); internal GenericFriendRequest cctor>b__29_0() { return new GenericFriendRequest(); } } private static readonly MessageParser<GenericFriendRequest> _parser = new MessageParser<GenericFriendRequest>(new Func<GenericFriendRequest>(GenericFriendRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public static MessageParser<GenericFriendRequest> Parser { get { return GenericFriendRequest._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return GenericFriendRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public GenericFriendRequest() { } public GenericFriendRequest(GenericFriendRequest other) : this() { while (true) { IL_6B: int arg_51_0 = -1769167465; while (true) { switch ((arg_51_0 ^ -1061202310) % 4) { case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_51_0 = -1525466811; continue; case 2: goto IL_6B; case 3: this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); arg_51_0 = -545987710; continue; } return; } } } public GenericFriendRequest Clone() { return new GenericFriendRequest(this); } public override bool Equals(object other) { return this.Equals(other as GenericFriendRequest); } public bool Equals(GenericFriendRequest other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1860283739) % 9) { case 0: arg_77_0 = (GenericFriendRequest.smethod_0(this.TargetId, other.TargetId) ? -98439076 : -346671962); continue; case 1: arg_77_0 = (GenericFriendRequest.smethod_0(this.AgentId, other.AgentId) ? -1907050549 : -62759731); continue; case 2: return false; case 3: goto IL_15; case 4: return false; case 6: goto IL_B5; case 7: return true; case 8: return false; } break; } return true; IL_15: arg_77_0 = -801990966; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -1403838190 : -954584787); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_82: uint arg_62_0 = 3158628982u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 2731630826u)) % 5u) { case 1u: arg_62_0 = (((this.agentId_ != null) ? 3265966908u : 3041553322u) ^ num2 * 15132194u); continue; case 2u: num ^= GenericFriendRequest.smethod_1(this.TargetId); arg_62_0 = 2288898611u; continue; case 3u: goto IL_82; case 4u: num ^= GenericFriendRequest.smethod_1(this.AgentId); arg_62_0 = (num2 * 941641243u ^ 574282632u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { while (true) { IL_48: uint arg_30_0 = 277281187u; while (true) { uint num; switch ((num = (arg_30_0 ^ 1485119358u)) % 3u) { case 0u: goto IL_48; case 1u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_30_0 = (num * 873180222u ^ 3904595473u); continue; } goto Block_2; } } Block_2:; } output.WriteRawTag(18); output.WriteMessage(this.TargetId); } public int CalculateSize() { int num = 0; while (true) { IL_89: uint arg_69_0 = 4274343253u; while (true) { uint num2; switch ((num2 = (arg_69_0 ^ 3099769084u)) % 5u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_69_0 = 3033845632u; continue; case 1u: arg_69_0 = (((this.agentId_ == null) ? 3400025064u : 3863435819u) ^ num2 * 320257852u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_69_0 = (num2 * 1147961950u ^ 2558937342u); continue; case 4u: goto IL_89; } return num; } } return num; } public void MergeFrom(GenericFriendRequest other) { if (other == null) { goto IL_B8; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 1770346009u)) % 11u) { case 0u: arg_105_0 = (((this.targetId_ == null) ? 2803641358u : 3123181053u) ^ num * 3041475787u); continue; case 1u: this.targetId_ = new EntityId(); arg_105_0 = (num * 439228546u ^ 3024869890u); continue; case 2u: goto IL_B8; case 4u: arg_105_0 = ((other.targetId_ != null) ? 74644244u : 1544751990u); continue; case 5u: arg_105_0 = (((this.agentId_ == null) ? 1567005567u : 349602231u) ^ num * 3524414844u); continue; case 6u: this.AgentId.MergeFrom(other.AgentId); arg_105_0 = 244454445u; continue; case 7u: this.TargetId.MergeFrom(other.TargetId); arg_105_0 = 1544751990u; continue; case 8u: return; case 9u: this.agentId_ = new EntityId(); arg_105_0 = (num * 4184888894u ^ 307986255u); continue; case 10u: goto IL_14D; } break; } return; IL_B8: arg_105_0 = 1434804335u; goto IL_100; IL_14D: arg_105_0 = ((other.agentId_ != null) ? 997766454u : 244454445u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) != 0u) ? 2929253875u : 3003513306u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 3314063892u)) % 14u) { case 0u: arg_145_0 = (num2 * 1545253477u ^ 2982706438u); continue; case 1u: input.SkipLastField(); arg_145_0 = (num2 * 4253323229u ^ 820297330u); continue; case 2u: goto IL_199; case 3u: arg_145_0 = ((num != 10u) ? 2218615678u : 3065377141u); continue; case 4u: this.targetId_ = new EntityId(); arg_145_0 = (num2 * 208808799u ^ 1272487332u); continue; case 5u: arg_145_0 = 2929253875u; continue; case 6u: arg_145_0 = ((this.targetId_ != null) ? 3817645340u : 2850234460u); continue; case 7u: this.agentId_ = new EntityId(); arg_145_0 = (num2 * 4030176011u ^ 2883531536u); continue; case 9u: arg_145_0 = (num2 * 3439069674u ^ 1475273204u); continue; case 10u: arg_145_0 = (((num != 18u) ? 2200407999u : 3502114538u) ^ num2 * 2582940554u); continue; case 11u: input.ReadMessage(this.agentId_); arg_145_0 = 3069001684u; continue; case 12u: input.ReadMessage(this.targetId_); arg_145_0 = 3088161222u; continue; case 13u: arg_145_0 = ((this.agentId_ == null) ? 2269593761u : 3471036375u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants/MessageType.cs using System; namespace Framework.Constants { public enum MessageType : byte { ChatMessageSystem, ChatMessageSay, ChatMessageParty, ChatMessageRaid, ChatMessageGuild, ChatMessageOfficer, ChatMessageYell, ChatMessageWhisper, ChatMessageWhisperForeign, ChatMessageWhisperInform, ChatMessageEmote, ChatMessageTextEmote, ChatMessageMonsterSay, ChatMessageMonsterParty, ChatMessageMonsterYell, ChatMessageMonsterWhisper, ChatMessageMonsteeEmote, ChatMessageChannel, ChatMessageChannelJoin, ChatMessageChannelLeave, ChatMessageChannelList, ChatMessageChannelNotice, ChatMessageChannelNoticeUser, ChatMessageAfk, ChatMessageDnd, ChatMessageIgnored, ChatMessageSkill, ChatMessageLoot, ChatMessageMoney, ChatMessageOpening, ChatMessageTradeskills, ChatMessagePetInfo, ChatMessageCombatMiscInfo, ChatMessageCombatXpGain, ChatMessageCombatHonorGain, ChatMessageCombatFactionChange, ChatMessageBgSystemNeutral, ChatMessageBgSystemAlliance, ChatMessageBgSystemHorde, ChatMessageRaidLeader, ChatMessageRaidWarning, ChatMessageRaidBossEmote, ChatMessageRaidBossWhisper, ChatMessageFiltred, ChatMessageBattleground, ChatMessageBattlegroundLeader, ChatMessageRestricted, ChatMessageBattlenet, ChatMessageAchievment, ChatMessageGuildAchievment, ChatMessageArenaPoints, ChatMessagePartyLeader } } <file_sep>/Bgs.Protocol/Identity.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Identity : IMessage<Identity>, IEquatable<Identity>, IDeepCloneable<Identity>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Identity.__c __9 = new Identity.__c(); internal Identity cctor>b__29_0() { return new Identity(); } } private static readonly MessageParser<Identity> _parser = new MessageParser<Identity>(new Func<Identity>(Identity.__c.__9.<.cctor>b__29_0)); public const int AccountIdFieldNumber = 1; private EntityId accountId_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public static MessageParser<Identity> Parser { get { return Identity._parser; } } public static MessageDescriptor Descriptor { get { return EntityTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Identity.Descriptor; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public Identity() { } public Identity(Identity other) : this() { this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); } public Identity Clone() { return new Identity(this); } public override bool Equals(object other) { return this.Equals(other as Identity); } public bool Equals(Identity other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 269520785) % 9) { case 0: goto IL_6D; case 2: arg_77_0 = (Identity.smethod_0(this.AccountId, other.AccountId) ? 389037525 : 60594397); continue; case 3: arg_77_0 = (Identity.smethod_0(this.GameAccountId, other.GameAccountId) ? 10560356 : 207537660); continue; case 4: return false; case 5: return true; case 6: return false; case 7: return false; case 8: goto IL_B5; } break; } return true; IL_6D: arg_77_0 = 696708447; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? 1154428515 : 1890138783); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.accountId_ != null) { goto IL_19; } goto IL_89; uint arg_5D_0; while (true) { IL_58: uint num2; switch ((num2 = (arg_5D_0 ^ 3218238170u)) % 5u) { case 1u: goto IL_89; case 2u: num ^= Identity.smethod_1(this.GameAccountId); arg_5D_0 = (num2 * 1379649596u ^ 701942609u); continue; case 3u: num ^= Identity.smethod_1(this.AccountId); arg_5D_0 = (num2 * 202057850u ^ 2074045418u); continue; case 4u: goto IL_19; } break; } return num; IL_19: arg_5D_0 = 3235348546u; goto IL_58; IL_89: arg_5D_0 = ((this.gameAccountId_ == null) ? 3806221625u : 2753329692u); goto IL_58; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountId_ != null) { goto IL_1A; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 1591955892u)) % 6u) { case 1u: goto IL_AC; case 2u: output.WriteRawTag(10); arg_79_0 = (num * 1847538841u ^ 1932940881u); continue; case 3u: output.WriteMessage(this.AccountId); arg_79_0 = (num * 3719853203u ^ 2389162404u); continue; case 4u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_79_0 = (num * 100035962u ^ 3200487422u); continue; case 5u: goto IL_1A; } break; } return; IL_1A: arg_79_0 = 1036533156u; goto IL_74; IL_AC: arg_79_0 = ((this.gameAccountId_ == null) ? 1292746558u : 1845493332u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 3879531046u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 3430296331u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_92_0 = (num2 * 151639631u ^ 2602516489u); continue; case 1u: arg_92_0 = (((this.accountId_ != null) ? 293858020u : 245428262u) ^ num2 * 2976675243u); continue; case 2u: arg_92_0 = ((this.gameAccountId_ != null) ? 2378278337u : 2604615320u); continue; case 3u: goto IL_B6; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_92_0 = (num2 * 2248501601u ^ 758166034u); continue; } return num; } } return num; } public void MergeFrom(Identity other) { if (other == null) { goto IL_B1; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 2380003157u)) % 11u) { case 0u: goto IL_14D; case 1u: arg_105_0 = (((this.gameAccountId_ != null) ? 4033714828u : 2894125394u) ^ num * 202000690u); continue; case 2u: arg_105_0 = ((other.gameAccountId_ != null) ? 3062634498u : 3640859176u); continue; case 3u: goto IL_B1; case 4u: return; case 5u: arg_105_0 = (((this.accountId_ == null) ? 2145333947u : 1357529679u) ^ num * 3778806502u); continue; case 6u: this.AccountId.MergeFrom(other.AccountId); arg_105_0 = 3351687909u; continue; case 7u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_105_0 = 3640859176u; continue; case 8u: this.gameAccountId_ = new EntityId(); arg_105_0 = (num * 378919060u ^ 2556884102u); continue; case 9u: this.accountId_ = new EntityId(); arg_105_0 = (num * 2363246884u ^ 60416877u); continue; } break; } return; IL_B1: arg_105_0 = 2699530943u; goto IL_100; IL_14D: arg_105_0 = ((other.accountId_ == null) ? 3351687909u : 2899784742u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_183: uint num; uint arg_133_0 = ((num = input.ReadTag()) == 0u) ? 3155774031u : 2610837290u; while (true) { uint num2; switch ((num2 = (arg_133_0 ^ 3476315206u)) % 13u) { case 0u: input.SkipLastField(); arg_133_0 = (num2 * 4254272820u ^ 3219857411u); continue; case 1u: arg_133_0 = ((num != 10u) ? 2300061426u : 3343742959u); continue; case 3u: goto IL_183; case 4u: arg_133_0 = ((this.accountId_ == null) ? 3672397951u : 3725837506u); continue; case 5u: this.gameAccountId_ = new EntityId(); arg_133_0 = (num2 * 4160297823u ^ 1636658631u); continue; case 6u: arg_133_0 = 2610837290u; continue; case 7u: input.ReadMessage(this.gameAccountId_); arg_133_0 = 3010809783u; continue; case 8u: arg_133_0 = (num2 * 3451624158u ^ 2831387511u); continue; case 9u: input.ReadMessage(this.accountId_); arg_133_0 = 4283699174u; continue; case 10u: this.accountId_ = new EntityId(); arg_133_0 = (num2 * 1781709933u ^ 2816371847u); continue; case 11u: arg_133_0 = (((num != 18u) ? 1224171915u : 1056366657u) ^ num2 * 1403562759u); continue; case 12u: arg_133_0 = ((this.gameAccountId_ == null) ? 3058522864u : 2569650765u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/SourceContext.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class SourceContext : IMessage<SourceContext>, IEquatable<SourceContext>, IDeepCloneable<SourceContext>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SourceContext.__c __9 = new SourceContext.__c(); internal SourceContext cctor>b__24_0() { return new SourceContext(); } } private static readonly MessageParser<SourceContext> _parser = new MessageParser<SourceContext>(new Func<SourceContext>(SourceContext.__c.__9.<.cctor>b__24_0)); public const int FileNameFieldNumber = 1; private string fileName_ = ""; public static MessageParser<SourceContext> Parser { get { return SourceContext._parser; } } public static MessageDescriptor Descriptor { get { return SourceContextReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return SourceContext.Descriptor; } } public string FileName { get { return this.fileName_; } set { this.fileName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public SourceContext() { } public SourceContext(SourceContext other) : this() { while (true) { IL_3E: uint arg_26_0 = 1299396674u; while (true) { uint num; switch ((num = (arg_26_0 ^ 367262834u)) % 3u) { case 0u: goto IL_3E; case 2u: this.fileName_ = other.fileName_; arg_26_0 = (num * 2075090329u ^ 3107215238u); continue; } return; } } } public SourceContext Clone() { return new SourceContext(this); } public override bool Equals(object other) { return this.Equals(other as SourceContext); } public bool Equals(SourceContext other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -848514144) % 7) { case 1: return false; case 2: return false; case 3: arg_48_0 = ((!SourceContext.smethod_0(this.FileName, other.FileName)) ? -293538425 : -1065215165); continue; case 4: return true; case 5: goto IL_12; case 6: goto IL_7A; } break; } return true; IL_12: arg_48_0 = -1768662209; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -107216803 : -945466951); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 1016427086u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 1150699827u)) % 4u) { case 0u: num ^= SourceContext.smethod_2(this.FileName); arg_52_0 = (num2 * 2731910619u ^ 3810306340u); continue; case 1u: arg_52_0 = (((SourceContext.smethod_1(this.FileName) != 0) ? 2989820395u : 2830572180u) ^ num2 * 224591180u); continue; case 2u: goto IL_6E; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (SourceContext.smethod_1(this.FileName) != 0) { while (true) { IL_4D: uint arg_35_0 = 1923217443u; while (true) { uint num; switch ((num = (arg_35_0 ^ 1930876169u)) % 3u) { case 0u: goto IL_4D; case 1u: output.WriteRawTag(10); output.WriteString(this.FileName); arg_35_0 = (num * 2588046334u ^ 3849043600u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (SourceContext.smethod_1(this.FileName) != 0) { while (true) { IL_4B: uint arg_33_0 = 1784989464u; while (true) { uint num2; switch ((num2 = (arg_33_0 ^ 1266556161u)) % 3u) { case 0u: goto IL_4B; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.FileName); arg_33_0 = (num2 * 1743729836u ^ 1235133431u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(SourceContext other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1138024573u)) % 5u) { case 0u: goto IL_2D; case 1u: return; case 2u: this.FileName = other.FileName; arg_37_0 = (num * 4103704563u ^ 1542311052u); continue; case 4u: goto IL_63; } break; } return; IL_2D: arg_37_0 = 1260396369u; goto IL_32; IL_63: arg_37_0 = ((SourceContext.smethod_1(other.FileName) == 0) ? 1240945136u : 1198106601u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) != 0u) ? 139025062u : 276816383u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 841605153u)) % 7u) { case 0u: arg_72_0 = (num2 * 65442860u ^ 4061785469u); continue; case 1u: this.FileName = input.ReadString(); arg_72_0 = 1486940085u; continue; case 2u: arg_72_0 = ((num == 10u) ? 1132349571u : 1142120174u); continue; case 3u: goto IL_A9; case 4u: input.SkipLastField(); arg_72_0 = (num2 * 502177937u ^ 4035149896u); continue; case 6u: arg_72_0 = 139025062u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Report.V1/Report.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Report.V1 { [DebuggerNonUserCode] public sealed class Report : IMessage<Report>, IEquatable<Report>, IDeepCloneable<Report>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Report.__c __9 = new Report.__c(); internal Report cctor>b__49_0() { return new Report(); } } private static readonly MessageParser<Report> _parser = new MessageParser<Report>(new Func<Report>(Report.__c.__9.<.cctor>b__49_0)); public const int ReportTypeFieldNumber = 1; private string reportType_ = ""; public const int AttributeFieldNumber = 2; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int ReportQosFieldNumber = 3; private int reportQos_; public const int ReportingAccountFieldNumber = 4; private EntityId reportingAccount_; public const int ReportingGameAccountFieldNumber = 5; private EntityId reportingGameAccount_; public const int ReportTimestampFieldNumber = 6; private ulong reportTimestamp_; public static MessageParser<Report> Parser { get { return Report._parser; } } public static MessageDescriptor Descriptor { get { return ReportServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Report.Descriptor; } } public string ReportType { get { return this.reportType_; } set { this.reportType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public int ReportQos { get { return this.reportQos_; } set { this.reportQos_ = value; } } public EntityId ReportingAccount { get { return this.reportingAccount_; } set { this.reportingAccount_ = value; } } public EntityId ReportingGameAccount { get { return this.reportingGameAccount_; } set { this.reportingGameAccount_ = value; } } public ulong ReportTimestamp { get { return this.reportTimestamp_; } set { this.reportTimestamp_ = value; } } public Report() { } public Report(Report other) : this() { while (true) { IL_D2: uint arg_AA_0 = 2884127066u; while (true) { uint num; switch ((num = (arg_AA_0 ^ 4017192551u)) % 7u) { case 0u: this.reportQos_ = other.reportQos_; arg_AA_0 = (num * 372270476u ^ 565279991u); continue; case 1u: this.ReportingAccount = ((other.reportingAccount_ != null) ? other.ReportingAccount.Clone() : null); arg_AA_0 = 3926804672u; continue; case 3u: goto IL_D2; case 4u: this.reportType_ = other.reportType_; arg_AA_0 = (num * 1712965841u ^ 4123766709u); continue; case 5u: this.ReportingGameAccount = ((other.reportingGameAccount_ != null) ? other.ReportingGameAccount.Clone() : null); arg_AA_0 = 3071690161u; continue; case 6u: this.attribute_ = other.attribute_.Clone(); arg_AA_0 = (num * 3189991420u ^ 454437110u); continue; } goto Block_3; } } Block_3: this.reportTimestamp_ = other.reportTimestamp_; } public Report Clone() { return new Report(this); } public override bool Equals(object other) { return this.Equals(other as Report); } public bool Equals(Report other) { if (other == null) { goto IL_18; } goto IL_187; int arg_129_0; while (true) { IL_124: switch ((arg_129_0 ^ 1586279599) % 17) { case 0: return false; case 1: return false; case 2: arg_129_0 = ((this.ReportTimestamp != other.ReportTimestamp) ? 2066627078 : 1404626470); continue; case 3: arg_129_0 = (Report.smethod_1(this.ReportingGameAccount, other.ReportingGameAccount) ? 1170414672 : 1927926586); continue; case 4: return false; case 5: return false; case 6: return false; case 7: arg_129_0 = ((!Report.smethod_1(this.ReportingAccount, other.ReportingAccount)) ? 206219572 : 1787112519); continue; case 8: arg_129_0 = (this.attribute_.Equals(other.attribute_) ? 1449181731 : 880422618); continue; case 9: arg_129_0 = ((this.ReportQos != other.ReportQos) ? 1997131049 : 2037650469); continue; case 10: return true; case 11: return false; case 13: goto IL_187; case 14: return false; case 15: arg_129_0 = (Report.smethod_0(this.ReportType, other.ReportType) ? 1910215212 : 619424062); continue; case 16: goto IL_18; } break; } return true; IL_18: arg_129_0 = 1013011120; goto IL_124; IL_187: arg_129_0 = ((other == this) ? 1436263048 : 1092755243); goto IL_124; } public override int GetHashCode() { int num = 1; while (true) { IL_180: uint arg_147_0 = 2725777644u; while (true) { uint num2; switch ((num2 = (arg_147_0 ^ 3992640369u)) % 11u) { case 0u: num ^= this.ReportingGameAccount.GetHashCode(); arg_147_0 = (num2 * 4180927499u ^ 4126234949u); continue; case 1u: arg_147_0 = ((this.reportingGameAccount_ == null) ? 4145480388u : 4168323410u); continue; case 2u: arg_147_0 = ((this.reportingAccount_ == null) ? 2528778989u : 2992374565u); continue; case 4u: arg_147_0 = ((this.ReportTimestamp != 0uL) ? 3046394720u : 4124302964u); continue; case 5u: num ^= this.ReportQos.GetHashCode(); arg_147_0 = (num2 * 2202502833u ^ 1926342104u); continue; case 6u: num ^= this.ReportingAccount.GetHashCode(); arg_147_0 = (num2 * 3189505204u ^ 832885245u); continue; case 7u: goto IL_180; case 8u: num ^= Report.smethod_2(this.attribute_); arg_147_0 = (((this.ReportQos == 0) ? 2869673969u : 3170117720u) ^ num2 * 2876868997u); continue; case 9u: num ^= this.ReportTimestamp.GetHashCode(); arg_147_0 = (num2 * 591375281u ^ 805841077u); continue; case 10u: num ^= Report.smethod_2(this.ReportType); arg_147_0 = (num2 * 4066708685u ^ 1463271597u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_1DE: uint arg_199_0 = 2123621616u; while (true) { uint num; switch ((num = (arg_199_0 ^ 1212145759u)) % 14u) { case 0u: arg_199_0 = ((this.reportingAccount_ != null) ? 1985982313u : 372082353u); continue; case 1u: output.WriteString(this.ReportType); this.attribute_.WriteTo(output, Report._repeated_attribute_codec); arg_199_0 = (num * 2471916897u ^ 1370405386u); continue; case 2u: output.WriteMessage(this.ReportingGameAccount); arg_199_0 = (num * 3087899038u ^ 633098964u); continue; case 3u: arg_199_0 = ((this.ReportTimestamp != 0uL) ? 66282650u : 103326526u); continue; case 4u: output.WriteRawTag(42); arg_199_0 = (num * 3857038700u ^ 1346154861u); continue; case 5u: output.WriteInt32(this.ReportQos); arg_199_0 = (num * 62691689u ^ 2027207436u); continue; case 6u: arg_199_0 = ((this.reportingGameAccount_ == null) ? 867832616u : 1223520691u); continue; case 7u: goto IL_1DE; case 8u: output.WriteRawTag(34); output.WriteMessage(this.ReportingAccount); arg_199_0 = (num * 1103997818u ^ 622941965u); continue; case 9u: output.WriteRawTag(24); arg_199_0 = (num * 1363739134u ^ 228022268u); continue; case 10u: arg_199_0 = (((this.ReportQos != 0) ? 3022792582u : 2196283463u) ^ num * 156289641u); continue; case 11u: output.WriteRawTag(49); arg_199_0 = (num * 1616477336u ^ 1967122035u); continue; case 12u: output.WriteFixed64(this.ReportTimestamp); arg_199_0 = (num * 1150393268u ^ 3784084014u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_168: uint arg_133_0 = 235284450u; while (true) { uint num2; switch ((num2 = (arg_133_0 ^ 813398057u)) % 10u) { case 0u: num += 9; arg_133_0 = (num2 * 2365320437u ^ 3795305492u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ReportingGameAccount); arg_133_0 = (num2 * 3477848489u ^ 2581940384u); continue; case 2u: arg_133_0 = ((this.reportingGameAccount_ != null) ? 1234499662u : 1878205023u); continue; case 4u: arg_133_0 = ((this.ReportTimestamp != 0uL) ? 1848311063u : 345270338u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.ReportType); num += this.attribute_.CalculateSize(Report._repeated_attribute_codec); arg_133_0 = (((this.ReportQos != 0) ? 550951949u : 848104838u) ^ num2 * 2032105517u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ReportingAccount); arg_133_0 = (num2 * 1993512787u ^ 897151977u); continue; case 7u: num += 1 + CodedOutputStream.ComputeInt32Size(this.ReportQos); arg_133_0 = (num2 * 796681666u ^ 2611578751u); continue; case 8u: arg_133_0 = ((this.reportingAccount_ == null) ? 1919449757u : 476093973u); continue; case 9u: goto IL_168; } return num; } } return num; } public void MergeFrom(Report other) { if (other == null) { goto IL_1E1; } goto IL_24F; uint arg_1EB_0; while (true) { IL_1E6: uint num; switch ((num = (arg_1EB_0 ^ 3233792412u)) % 18u) { case 0u: goto IL_1E1; case 1u: this.ReportingGameAccount.MergeFrom(other.ReportingGameAccount); arg_1EB_0 = 2914559519u; continue; case 2u: this.attribute_.Add(other.attribute_); arg_1EB_0 = 2901701511u; continue; case 3u: arg_1EB_0 = ((other.reportingGameAccount_ == null) ? 2914559519u : 3218721711u); continue; case 4u: arg_1EB_0 = ((other.reportingAccount_ != null) ? 3619290954u : 3828981013u); continue; case 5u: arg_1EB_0 = (((this.reportingGameAccount_ != null) ? 794792566u : 573119972u) ^ num * 1825637469u); continue; case 6u: return; case 7u: this.ReportTimestamp = other.ReportTimestamp; arg_1EB_0 = (num * 2013422388u ^ 4085231762u); continue; case 8u: goto IL_24F; case 9u: this.reportingGameAccount_ = new EntityId(); arg_1EB_0 = (num * 1769653787u ^ 2850298388u); continue; case 11u: this.ReportQos = other.ReportQos; arg_1EB_0 = (num * 683352361u ^ 4180714413u); continue; case 12u: this.ReportingAccount.MergeFrom(other.ReportingAccount); arg_1EB_0 = 3828981013u; continue; case 13u: arg_1EB_0 = (((other.ReportQos == 0) ? 4058684351u : 2319787590u) ^ num * 829470317u); continue; case 14u: arg_1EB_0 = (((this.reportingAccount_ == null) ? 657121329u : 1913703480u) ^ num * 1837213196u); continue; case 15u: this.reportingAccount_ = new EntityId(); arg_1EB_0 = (num * 490886339u ^ 1943198879u); continue; case 16u: this.ReportType = other.ReportType; arg_1EB_0 = (num * 544348301u ^ 2137122564u); continue; case 17u: arg_1EB_0 = ((other.ReportTimestamp == 0uL) ? 2553359678u : 4024328331u); continue; } break; } return; IL_1E1: arg_1EB_0 = 3776788708u; goto IL_1E6; IL_24F: arg_1EB_0 = ((Report.smethod_3(other.ReportType) == 0) ? 3509463102u : 4028964670u); goto IL_1E6; } public void MergeFrom(CodedInputStream input) { while (true) { IL_306: uint num; uint arg_286_0 = ((num = input.ReadTag()) != 0u) ? 3084961494u : 4176633363u; while (true) { uint num2; switch ((num2 = (arg_286_0 ^ 2717540428u)) % 25u) { case 0u: arg_286_0 = (((num == 10u) ? 128336849u : 854970612u) ^ num2 * 537534596u); continue; case 1u: arg_286_0 = (((num == 24u) ? 882264683u : 2049863096u) ^ num2 * 3749405071u); continue; case 2u: arg_286_0 = 3084961494u; continue; case 3u: arg_286_0 = (num2 * 3441031575u ^ 1590676399u); continue; case 5u: arg_286_0 = ((this.reportingAccount_ == null) ? 2757710192u : 3992815443u); continue; case 6u: this.ReportQos = input.ReadInt32(); arg_286_0 = 3673206653u; continue; case 7u: arg_286_0 = (num2 * 2561498265u ^ 1429658614u); continue; case 8u: arg_286_0 = (((num == 49u) ? 447005027u : 666273143u) ^ num2 * 838991127u); continue; case 9u: this.attribute_.AddEntriesFrom(input, Report._repeated_attribute_codec); arg_286_0 = 3973580722u; continue; case 10u: input.ReadMessage(this.reportingAccount_); arg_286_0 = 4163057742u; continue; case 11u: arg_286_0 = ((this.reportingGameAccount_ == null) ? 2281572103u : 2964235497u); continue; case 12u: input.ReadMessage(this.reportingGameAccount_); arg_286_0 = 3607815914u; continue; case 13u: arg_286_0 = ((num <= 24u) ? 2350903161u : 4277886781u); continue; case 14u: this.ReportTimestamp = input.ReadFixed64(); arg_286_0 = 3673206653u; continue; case 15u: this.ReportType = input.ReadString(); arg_286_0 = 3673206653u; continue; case 16u: arg_286_0 = (num2 * 2819059275u ^ 3027962859u); continue; case 17u: input.SkipLastField(); arg_286_0 = 3673206653u; continue; case 18u: arg_286_0 = (((num == 42u) ? 316968336u : 1895516420u) ^ num2 * 3478163015u); continue; case 19u: goto IL_306; case 20u: this.reportingGameAccount_ = new EntityId(); arg_286_0 = (num2 * 4094353424u ^ 255373401u); continue; case 21u: arg_286_0 = (((num != 18u) ? 641026581u : 423511223u) ^ num2 * 4231916658u); continue; case 22u: arg_286_0 = ((num == 34u) ? 3341257861u : 4286741190u); continue; case 23u: arg_286_0 = (num2 * 3895559210u ^ 1683554369u); continue; case 24u: this.reportingAccount_ = new EntityId(); arg_286_0 = (num2 * 121994974u ^ 4048928091u); continue; } return; } } } static Report() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 3175067485u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 3756938318u)) % 3u) { case 1u: Report._repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(18u, Bgs.Protocol.Attribute.Parser); arg_3F_0 = (num * 1497132829u ^ 2073047797u); continue; case 2u: goto IL_57; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.UserManager.V1/UnblockPlayerRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class UnblockPlayerRequest : IMessage<UnblockPlayerRequest>, IEquatable<UnblockPlayerRequest>, IDeepCloneable<UnblockPlayerRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UnblockPlayerRequest.__c __9 = new UnblockPlayerRequest.__c(); internal UnblockPlayerRequest cctor>b__29_0() { return new UnblockPlayerRequest(); } } private static readonly MessageParser<UnblockPlayerRequest> _parser = new MessageParser<UnblockPlayerRequest>(new Func<UnblockPlayerRequest>(UnblockPlayerRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public static MessageParser<UnblockPlayerRequest> Parser { get { return UnblockPlayerRequest._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return UnblockPlayerRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public UnblockPlayerRequest() { } public UnblockPlayerRequest(UnblockPlayerRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); } public UnblockPlayerRequest Clone() { return new UnblockPlayerRequest(this); } public override bool Equals(object other) { return this.Equals(other as UnblockPlayerRequest); } public bool Equals(UnblockPlayerRequest other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1080615615) % 9) { case 0: return true; case 1: return false; case 3: goto IL_B5; case 4: return false; case 5: return false; case 6: arg_77_0 = ((!UnblockPlayerRequest.smethod_0(this.AgentId, other.AgentId)) ? -312585794 : -826697765); continue; case 7: arg_77_0 = (UnblockPlayerRequest.smethod_0(this.TargetId, other.TargetId) ? -2032231917 : -1181181148); continue; case 8: goto IL_15; } break; } return true; IL_15: arg_77_0 = -1650485538; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -12730107 : -19833636); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_29; } goto IL_4F; uint arg_33_0; while (true) { IL_2E: uint num2; switch ((num2 = (arg_33_0 ^ 1620014433u)) % 4u) { case 0u: goto IL_29; case 2u: num ^= UnblockPlayerRequest.smethod_1(this.AgentId); arg_33_0 = (num2 * 2251536248u ^ 1420371394u); continue; case 3u: goto IL_4F; } break; } return num; IL_29: arg_33_0 = 1616755947u; goto IL_2E; IL_4F: num ^= UnblockPlayerRequest.smethod_1(this.TargetId); arg_33_0 = 1191853104u; goto IL_2E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_08; } goto IL_64; uint arg_44_0; while (true) { IL_3F: uint num; switch ((num = (arg_44_0 ^ 3818996573u)) % 5u) { case 0u: goto IL_64; case 1u: output.WriteMessage(this.AgentId); arg_44_0 = (num * 1685288199u ^ 205657285u); continue; case 2u: output.WriteRawTag(10); arg_44_0 = (num * 3268352852u ^ 1790908187u); continue; case 4u: goto IL_08; } break; } return; IL_08: arg_44_0 = 3741533015u; goto IL_3F; IL_64: output.WriteRawTag(18); output.WriteMessage(this.TargetId); arg_44_0 = 3836568719u; goto IL_3F; } public int CalculateSize() { int num = 0; while (true) { IL_89: uint arg_69_0 = 4054574935u; while (true) { uint num2; switch ((num2 = (arg_69_0 ^ 4113039442u)) % 5u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_69_0 = 3998998006u; continue; case 1u: arg_69_0 = (((this.agentId_ != null) ? 2305943896u : 3445942961u) ^ num2 * 527398160u); continue; case 3u: goto IL_89; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_69_0 = (num2 * 3211236060u ^ 373830329u); continue; } return num; } } return num; } public void MergeFrom(UnblockPlayerRequest other) { if (other == null) { goto IL_91; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 4073878292u)) % 11u) { case 1u: return; case 2u: goto IL_14D; case 3u: arg_105_0 = (((this.agentId_ != null) ? 2727454233u : 3818587217u) ^ num * 789661808u); continue; case 4u: arg_105_0 = (((this.targetId_ != null) ? 147897639u : 625241341u) ^ num * 3599588614u); continue; case 5u: this.TargetId.MergeFrom(other.TargetId); arg_105_0 = 2594769802u; continue; case 6u: goto IL_91; case 7u: this.agentId_ = new EntityId(); arg_105_0 = (num * 612123116u ^ 1907294005u); continue; case 8u: this.targetId_ = new EntityId(); arg_105_0 = (num * 1527872263u ^ 4151860904u); continue; case 9u: arg_105_0 = ((other.targetId_ == null) ? 2594769802u : 2354487072u); continue; case 10u: this.AgentId.MergeFrom(other.AgentId); arg_105_0 = 4042079019u; continue; } break; } return; IL_91: arg_105_0 = 2498169340u; goto IL_100; IL_14D: arg_105_0 = ((other.agentId_ == null) ? 4042079019u : 3263671373u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) == 0u) ? 972304537u : 161256247u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 1821294324u)) % 14u) { case 0u: arg_145_0 = (num2 * 3794158447u ^ 2338210060u); continue; case 1u: arg_145_0 = ((num == 10u) ? 1071710385u : 1244105189u); continue; case 2u: input.ReadMessage(this.targetId_); arg_145_0 = 2082989480u; continue; case 3u: this.agentId_ = new EntityId(); arg_145_0 = (num2 * 2369666255u ^ 1487535753u); continue; case 4u: arg_145_0 = ((this.targetId_ != null) ? 811884166u : 2019190460u); continue; case 6u: input.ReadMessage(this.agentId_); arg_145_0 = 1961590120u; continue; case 7u: arg_145_0 = ((this.agentId_ != null) ? 546579686u : 881888917u); continue; case 8u: this.targetId_ = new EntityId(); arg_145_0 = (num2 * 1636628465u ^ 3087617358u); continue; case 9u: input.SkipLastField(); arg_145_0 = (num2 * 2570660886u ^ 803232924u); continue; case 10u: arg_145_0 = (num2 * 518106187u ^ 1924697322u); continue; case 11u: arg_145_0 = (((num == 18u) ? 717810490u : 844991121u) ^ num2 * 2726541984u); continue; case 12u: goto IL_199; case 13u: arg_145_0 = 161256247u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants/MovementSpeed.cs using System; namespace Framework.Constants { public class MovementSpeed { public static float WalkSpeed = 2.5f; public static float RunSpeed; public static float SwimSpeed; public static float SwimBackSpeed; public static float RunBackSpeed; public static float TurnSpeed; public static float FlySpeed; public static float FlyBackSpeed; public static float PitchSpeed; static MovementSpeed() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_A5: uint arg_85_0 = 1377445228u; while (true) { uint num; switch ((num = (arg_85_0 ^ 666437950u)) % 5u) { case 0u: MovementSpeed.FlySpeed = 14f; MovementSpeed.FlyBackSpeed = 7.5f; arg_85_0 = (num * 1434968285u ^ 3018105970u); continue; case 1u: MovementSpeed.RunSpeed = 7f; MovementSpeed.SwimSpeed = 4.72222f; MovementSpeed.SwimBackSpeed = 4.5f; arg_85_0 = (num * 2967240446u ^ 395457572u); continue; case 2u: MovementSpeed.RunBackSpeed = 2.5f; MovementSpeed.TurnSpeed = 3.14159274f; arg_85_0 = (num * 3144033859u ^ 2199932753u); continue; case 4u: goto IL_A5; } goto Block_1; } } Block_1: MovementSpeed.PitchSpeed = 3.14159274f; } } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmListTicketClientInformation.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmListTicketClientInformation { [DataMember(Name = "info")] public RealmListTicketInformation Info { get; set; } } } <file_sep>/Framework.Constants.Net/AuthClientMessage.cs using System; namespace Framework.Constants.Net { public enum AuthClientMessage : ushort { Ping, ProofResponse = 2, InformationRequest = 9, RealmUpdate = 0, JoinRequest = 8 } } <file_sep>/Bgs.Protocol.Account.V1/GameSessionLocation.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameSessionLocation : IMessage<GameSessionLocation>, IEquatable<GameSessionLocation>, IDeepCloneable<GameSessionLocation>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameSessionLocation.__c __9 = new GameSessionLocation.__c(); internal GameSessionLocation cctor>b__34_0() { return new GameSessionLocation(); } } private static readonly MessageParser<GameSessionLocation> _parser = new MessageParser<GameSessionLocation>(new Func<GameSessionLocation>(GameSessionLocation.__c.__9.<.cctor>b__34_0)); public const int IpAddressFieldNumber = 1; private string ipAddress_ = ""; public const int CountryFieldNumber = 2; private uint country_; public const int CityFieldNumber = 3; private string city_ = ""; public static MessageParser<GameSessionLocation> Parser { get { return GameSessionLocation._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[28]; } } MessageDescriptor IMessage.Descriptor { get { return GameSessionLocation.Descriptor; } } public string IpAddress { get { return this.ipAddress_; } set { this.ipAddress_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public uint Country { get { return this.country_; } set { this.country_ = value; } } public string City { get { return this.city_; } set { this.city_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public GameSessionLocation() { } public GameSessionLocation(GameSessionLocation other) : this() { while (true) { IL_69: uint arg_4D_0 = 2627719441u; while (true) { uint num; switch ((num = (arg_4D_0 ^ 2256945194u)) % 4u) { case 0u: goto IL_69; case 1u: this.country_ = other.country_; this.city_ = other.city_; arg_4D_0 = (num * 2080819039u ^ 2159448063u); continue; case 3u: this.ipAddress_ = other.ipAddress_; arg_4D_0 = (num * 3985547152u ^ 166188003u); continue; } return; } } } public GameSessionLocation Clone() { return new GameSessionLocation(this); } public override bool Equals(object other) { return this.Equals(other as GameSessionLocation); } public bool Equals(GameSessionLocation other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ -883987193) % 11) { case 1: goto IL_EA; case 2: return false; case 3: return true; case 4: goto IL_9A; case 5: arg_A4_0 = ((this.Country == other.Country) ? -1998424733 : -1660916150); continue; case 6: return false; case 7: arg_A4_0 = ((!GameSessionLocation.smethod_0(this.City, other.City)) ? -1812832927 : -345119887); continue; case 8: arg_A4_0 = (GameSessionLocation.smethod_0(this.IpAddress, other.IpAddress) ? -2094011245 : -106225924); continue; case 9: return false; case 10: return false; } break; } return true; IL_9A: arg_A4_0 = -996386253; goto IL_9F; IL_EA: arg_A4_0 = ((other != this) ? -99235764 : -1945505920); goto IL_9F; } public override int GetHashCode() { int num = 1; if (GameSessionLocation.smethod_1(this.IpAddress) != 0) { goto IL_A7; } goto IL_E8; uint arg_B1_0; while (true) { IL_AC: uint num2; switch ((num2 = (arg_B1_0 ^ 4175474980u)) % 7u) { case 0u: goto IL_A7; case 1u: num ^= this.City.GetHashCode(); arg_B1_0 = (num2 * 2863239649u ^ 3330612938u); continue; case 3u: num ^= this.Country.GetHashCode(); arg_B1_0 = (num2 * 3283148973u ^ 1306564960u); continue; case 4u: num ^= GameSessionLocation.smethod_2(this.IpAddress); arg_B1_0 = (num2 * 380530127u ^ 4124282294u); continue; case 5u: arg_B1_0 = ((this.City.Length == 0) ? 2518525146u : 3112938804u); continue; case 6u: goto IL_E8; } break; } return num; IL_A7: arg_B1_0 = 3470728969u; goto IL_AC; IL_E8: arg_B1_0 = ((this.Country == 0u) ? 4213944501u : 3251944429u); goto IL_AC; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (GameSessionLocation.smethod_1(this.IpAddress) != 0) { goto IL_8C; } goto IL_132; uint arg_EE_0; while (true) { IL_E9: uint num; switch ((num = (arg_EE_0 ^ 2923732050u)) % 10u) { case 0u: output.WriteUInt32(this.Country); arg_EE_0 = (num * 923975355u ^ 1671771180u); continue; case 1u: output.WriteRawTag(10); arg_EE_0 = (num * 110509949u ^ 3568711749u); continue; case 2u: arg_EE_0 = ((GameSessionLocation.smethod_1(this.City) == 0) ? 3038997875u : 3702285902u); continue; case 3u: goto IL_8C; case 4u: output.WriteRawTag(26); arg_EE_0 = (num * 4006602485u ^ 1603037323u); continue; case 5u: output.WriteRawTag(16); arg_EE_0 = (num * 1691021510u ^ 3986071942u); continue; case 6u: goto IL_132; case 7u: output.WriteString(this.City); arg_EE_0 = (num * 1205483989u ^ 3934814986u); continue; case 8u: output.WriteString(this.IpAddress); arg_EE_0 = (num * 2352814711u ^ 1700843776u); continue; } break; } return; IL_8C: arg_EE_0 = 3103841649u; goto IL_E9; IL_132: arg_EE_0 = ((this.Country == 0u) ? 2779841314u : 4072127863u); goto IL_E9; } public int CalculateSize() { int num = 0; if (GameSessionLocation.smethod_1(this.IpAddress) != 0) { goto IL_88; } goto IL_E8; uint arg_B1_0; while (true) { IL_AC: uint num2; switch ((num2 = (arg_B1_0 ^ 3585185841u)) % 7u) { case 0u: goto IL_E8; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Country); arg_B1_0 = (num2 * 3933200779u ^ 2694466086u); continue; case 2u: goto IL_88; case 3u: arg_B1_0 = ((GameSessionLocation.smethod_1(this.City) != 0) ? 2501511253u : 2671645565u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.City); arg_B1_0 = (num2 * 1579838592u ^ 2149871997u); continue; case 6u: num += 1 + CodedOutputStream.ComputeStringSize(this.IpAddress); arg_B1_0 = (num2 * 3348727260u ^ 1741041041u); continue; } break; } return num; IL_88: arg_B1_0 = 2200853773u; goto IL_AC; IL_E8: arg_B1_0 = ((this.Country != 0u) ? 4074987525u : 3424924186u); goto IL_AC; } public void MergeFrom(GameSessionLocation other) { if (other == null) { goto IL_18; } goto IL_FD; uint arg_BD_0; while (true) { IL_B8: uint num; switch ((num = (arg_BD_0 ^ 153081207u)) % 9u) { case 0u: arg_BD_0 = ((GameSessionLocation.smethod_1(other.City) == 0) ? 1239628279u : 588397723u); continue; case 1u: return; case 3u: this.IpAddress = other.IpAddress; arg_BD_0 = (num * 748737534u ^ 842614929u); continue; case 4u: this.Country = other.Country; arg_BD_0 = (num * 2695251650u ^ 1585880760u); continue; case 5u: this.City = other.City; arg_BD_0 = (num * 1985214118u ^ 179392255u); continue; case 6u: goto IL_FD; case 7u: arg_BD_0 = ((other.Country != 0u) ? 1940172943u : 3377992u); continue; case 8u: goto IL_18; } break; } return; IL_18: arg_BD_0 = 1076397211u; goto IL_B8; IL_FD: arg_BD_0 = ((GameSessionLocation.smethod_1(other.IpAddress) == 0) ? 714893487u : 782978198u); goto IL_B8; } public void MergeFrom(CodedInputStream input) { while (true) { IL_138: uint num; uint arg_F0_0 = ((num = input.ReadTag()) != 0u) ? 1288392418u : 583349700u; while (true) { uint num2; switch ((num2 = (arg_F0_0 ^ 210039683u)) % 11u) { case 0u: this.Country = input.ReadUInt32(); arg_F0_0 = 1724612509u; continue; case 1u: arg_F0_0 = ((num == 10u) ? 291755936u : 1738198365u); continue; case 2u: this.IpAddress = input.ReadString(); arg_F0_0 = 309534634u; continue; case 3u: arg_F0_0 = (((num == 16u) ? 4216091980u : 2330661770u) ^ num2 * 2918490343u); continue; case 4u: this.City = input.ReadString(); arg_F0_0 = 1724612509u; continue; case 5u: arg_F0_0 = (((num == 26u) ? 2539723943u : 3990048715u) ^ num2 * 3952958267u); continue; case 7u: input.SkipLastField(); arg_F0_0 = (num2 * 1094751975u ^ 1305258282u); continue; case 8u: goto IL_138; case 9u: arg_F0_0 = (num2 * 769386005u ^ 3797764800u); continue; case 10u: arg_F0_0 = 1288392418u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/GenerateSSOTokenRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class GenerateSSOTokenRequest : IMessage<GenerateSSOTokenRequest>, IEquatable<GenerateSSOTokenRequest>, IDeepCloneable<GenerateSSOTokenRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenerateSSOTokenRequest.__c __9 = new GenerateSSOTokenRequest.__c(); internal GenerateSSOTokenRequest cctor>b__24_0() { return new GenerateSSOTokenRequest(); } } private static readonly MessageParser<GenerateSSOTokenRequest> _parser = new MessageParser<GenerateSSOTokenRequest>(new Func<GenerateSSOTokenRequest>(GenerateSSOTokenRequest.__c.__9.<.cctor>b__24_0)); public const int ProgramFieldNumber = 1; private uint program_; public static MessageParser<GenerateSSOTokenRequest> Parser { get { return GenerateSSOTokenRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return GenerateSSOTokenRequest.Descriptor; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public GenerateSSOTokenRequest() { } public GenerateSSOTokenRequest(GenerateSSOTokenRequest other) : this() { this.program_ = other.program_; } public GenerateSSOTokenRequest Clone() { return new GenerateSSOTokenRequest(this); } public override bool Equals(object other) { return this.Equals(other as GenerateSSOTokenRequest); } public bool Equals(GenerateSSOTokenRequest other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -1275165716) % 7) { case 0: return true; case 1: arg_43_0 = ((this.Program != other.Program) ? -1987812633 : -200213621); continue; case 2: return false; case 4: return false; case 5: goto IL_12; case 6: goto IL_75; } break; } return true; IL_12: arg_43_0 = -1040701084; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? -1521840506 : -136605471); goto IL_3E; } public override int GetHashCode() { int num = 1; if (this.Program != 0u) { while (true) { IL_47: uint arg_2F_0 = 1860917957u; while (true) { uint num2; switch ((num2 = (arg_2F_0 ^ 538091679u)) % 3u) { case 1u: num ^= this.Program.GetHashCode(); arg_2F_0 = (num2 * 3786351374u ^ 2741696901u); continue; case 2u: goto IL_47; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Program != 0u) { while (true) { IL_5B: uint arg_3F_0 = 2213573352u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 4294128651u)) % 4u) { case 0u: goto IL_5B; case 2u: output.WriteFixed32(this.Program); arg_3F_0 = (num * 56726962u ^ 2051532810u); continue; case 3u: output.WriteRawTag(13); arg_3F_0 = (num * 2053929231u ^ 346099904u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_5F: uint arg_43_0 = 798303787u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 1612425020u)) % 4u) { case 0u: goto IL_5F; case 1u: num += 5; arg_43_0 = (num2 * 1145366114u ^ 412865576u); continue; case 3u: arg_43_0 = (((this.Program != 0u) ? 117372836u : 417435263u) ^ num2 * 3060199691u); continue; } return num; } } return num; } public void MergeFrom(GenerateSSOTokenRequest other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1827500747u)) % 5u) { case 0u: goto IL_2D; case 1u: this.Program = other.Program; arg_37_0 = (num * 4283363807u ^ 3093159457u); continue; case 2u: goto IL_63; case 3u: return; } break; } return; IL_2D: arg_37_0 = 170877745u; goto IL_32; IL_63: arg_37_0 = ((other.Program != 0u) ? 1766887932u : 2135715272u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_96: uint num; uint arg_63_0 = ((num = input.ReadTag()) == 0u) ? 1141907951u : 292980050u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 2040627655u)) % 6u) { case 1u: arg_63_0 = ((num == 13u) ? 1768904221u : 1869738644u); continue; case 2u: arg_63_0 = 292980050u; continue; case 3u: goto IL_96; case 4u: this.Program = input.ReadFixed32(); arg_63_0 = 1320017830u; continue; case 5u: input.SkipLastField(); arg_63_0 = (num2 * 3010013274u ^ 2750766216u); continue; } return; } } } } } <file_sep>/Google.Protobuf/EnumDescriptorProto.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class EnumDescriptorProto : IMessage<EnumDescriptorProto>, IEquatable<EnumDescriptorProto>, IDeepCloneable<EnumDescriptorProto>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumDescriptorProto.__c __9 = new EnumDescriptorProto.__c(); internal EnumDescriptorProto cctor>b__34_0() { return new EnumDescriptorProto(); } } private static readonly MessageParser<EnumDescriptorProto> _parser = new MessageParser<EnumDescriptorProto>(new Func<EnumDescriptorProto>(EnumDescriptorProto.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int ValueFieldNumber = 2; private static readonly FieldCodec<EnumValueDescriptorProto> _repeated_value_codec; private readonly RepeatedField<EnumValueDescriptorProto> value_ = new RepeatedField<EnumValueDescriptorProto>(); public const int OptionsFieldNumber = 3; private EnumOptions options_; public static MessageParser<EnumDescriptorProto> Parser { get { return EnumDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return EnumDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public RepeatedField<EnumValueDescriptorProto> Value { get { return this.value_; } } public EnumOptions Options { get { return this.options_; } set { this.options_ = value; } } public EnumDescriptorProto() { } public EnumDescriptorProto(EnumDescriptorProto other) : this() { while (true) { IL_8C: uint arg_6C_0 = 3067605231u; while (true) { uint num; switch ((num = (arg_6C_0 ^ 3282534308u)) % 5u) { case 0u: goto IL_8C; case 1u: this.value_ = other.value_.Clone(); arg_6C_0 = (num * 4020333034u ^ 3808781049u); continue; case 2u: this.name_ = other.name_; arg_6C_0 = (num * 3155442507u ^ 783862520u); continue; case 4u: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_6C_0 = 3882021670u; continue; } return; } } } public EnumDescriptorProto Clone() { return new EnumDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as EnumDescriptorProto); } public bool Equals(EnumDescriptorProto other) { if (other == null) { goto IL_9F; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ 1886624976) % 11) { case 0: goto IL_9F; case 2: arg_A9_0 = ((!this.value_.Equals(other.value_)) ? 123054197 : 398040926); continue; case 3: return false; case 4: return false; case 5: return false; case 6: arg_A9_0 = ((!EnumDescriptorProto.smethod_0(this.Name, other.Name)) ? 1661493125 : 1576630076); continue; case 7: goto IL_EF; case 8: return true; case 9: arg_A9_0 = (EnumDescriptorProto.smethod_1(this.Options, other.Options) ? 1667196972 : 595352238); continue; case 10: return false; } break; } return true; IL_9F: arg_A9_0 = 1276648407; goto IL_A4; IL_EF: arg_A9_0 = ((other == this) ? 1413260294 : 1450805434); goto IL_A4; } public override int GetHashCode() { int num = 1; while (true) { IL_DB: uint arg_B3_0 = 1291876002u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 631270391u)) % 7u) { case 0u: goto IL_DB; case 1u: arg_B3_0 = (((this.options_ != null) ? 2445503640u : 2730280353u) ^ num2 * 2003872939u); continue; case 2u: arg_B3_0 = (((EnumDescriptorProto.smethod_2(this.Name) == 0) ? 3742497983u : 3570716895u) ^ num2 * 1639481441u); continue; case 3u: num ^= EnumDescriptorProto.smethod_3(this.value_); arg_B3_0 = 1084448746u; continue; case 4u: num ^= EnumDescriptorProto.smethod_3(this.Options); arg_B3_0 = (num2 * 1295839756u ^ 3805510846u); continue; case 5u: num ^= EnumDescriptorProto.smethod_3(this.Name); arg_B3_0 = (num2 * 1220301256u ^ 2893845026u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (EnumDescriptorProto.smethod_2(this.Name) != 0) { goto IL_52; } goto IL_D5; uint arg_A9_0; while (true) { IL_A4: uint num; switch ((num = (arg_A9_0 ^ 1094489007u)) % 8u) { case 0u: output.WriteString(this.Name); arg_A9_0 = (num * 185630707u ^ 3676664600u); continue; case 1u: output.WriteRawTag(10); arg_A9_0 = (num * 3520509985u ^ 4130787174u); continue; case 2u: output.WriteMessage(this.Options); arg_A9_0 = (num * 758589693u ^ 3585137105u); continue; case 3u: goto IL_52; case 5u: arg_A9_0 = (((this.options_ != null) ? 1217486249u : 1208438835u) ^ num * 874151248u); continue; case 6u: output.WriteRawTag(26); arg_A9_0 = (num * 4175793252u ^ 639736301u); continue; case 7u: goto IL_D5; } break; } return; IL_52: arg_A9_0 = 1526070814u; goto IL_A4; IL_D5: this.value_.WriteTo(output, EnumDescriptorProto._repeated_value_codec); arg_A9_0 = 298632682u; goto IL_A4; } public int CalculateSize() { int num = 0; while (true) { IL_E1: uint arg_B9_0 = 848173752u; while (true) { uint num2; switch ((num2 = (arg_B9_0 ^ 965139766u)) % 7u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_B9_0 = (num2 * 2279762427u ^ 646511382u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_B9_0 = (num2 * 604019361u ^ 2157500547u); continue; case 2u: arg_B9_0 = (((this.options_ != null) ? 2501528436u : 4277347457u) ^ num2 * 1937312347u); continue; case 3u: num += this.value_.CalculateSize(EnumDescriptorProto._repeated_value_codec); arg_B9_0 = 675934574u; continue; case 4u: goto IL_E1; case 6u: arg_B9_0 = (((EnumDescriptorProto.smethod_2(this.Name) != 0) ? 1272159604u : 1949999840u) ^ num2 * 631556696u); continue; } return num; } } return num; } public void MergeFrom(EnumDescriptorProto other) { if (other == null) { goto IL_C6; } goto IL_110; uint arg_D0_0; while (true) { IL_CB: uint num; switch ((num = (arg_D0_0 ^ 2870200360u)) % 9u) { case 0u: goto IL_C6; case 1u: this.Options.MergeFrom(other.Options); arg_D0_0 = 2435730751u; continue; case 2u: return; case 3u: this.options_ = new EnumOptions(); arg_D0_0 = (num * 2159272460u ^ 66619932u); continue; case 4u: goto IL_110; case 6u: this.value_.Add(other.value_); arg_D0_0 = ((other.options_ != null) ? 2150721879u : 2435730751u); continue; case 7u: this.Name = other.Name; arg_D0_0 = (num * 3622892625u ^ 722892405u); continue; case 8u: arg_D0_0 = (((this.options_ == null) ? 1513550212u : 1899512138u) ^ num * 3681705778u); continue; } break; } return; IL_C6: arg_D0_0 = 3135374739u; goto IL_CB; IL_110: arg_D0_0 = ((EnumDescriptorProto.smethod_2(other.Name) == 0) ? 2592067091u : 3260497582u); goto IL_CB; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1B5: uint num; uint arg_15D_0 = ((num = input.ReadTag()) == 0u) ? 2340856282u : 3540237648u; while (true) { uint num2; switch ((num2 = (arg_15D_0 ^ 2824732041u)) % 15u) { case 0u: this.value_.AddEntriesFrom(input, EnumDescriptorProto._repeated_value_codec); arg_15D_0 = 3187293215u; continue; case 1u: this.Name = input.ReadString(); arg_15D_0 = 2907445324u; continue; case 2u: arg_15D_0 = (((num != 18u) ? 3766780562u : 3579093109u) ^ num2 * 1719556996u); continue; case 3u: arg_15D_0 = ((num == 10u) ? 4018720891u : 3833540747u); continue; case 4u: this.options_ = new EnumOptions(); arg_15D_0 = (num2 * 3981716522u ^ 3672651730u); continue; case 5u: input.SkipLastField(); arg_15D_0 = (num2 * 350980336u ^ 1654171464u); continue; case 6u: arg_15D_0 = (num2 * 301917660u ^ 1220371295u); continue; case 7u: input.ReadMessage(this.options_); arg_15D_0 = 4254394807u; continue; case 8u: goto IL_1B5; case 10u: arg_15D_0 = (num2 * 3768159186u ^ 1191753797u); continue; case 11u: arg_15D_0 = (((num == 26u) ? 963581901u : 455873438u) ^ num2 * 266044788u); continue; case 12u: arg_15D_0 = 3540237648u; continue; case 13u: arg_15D_0 = (num2 * 2083008882u ^ 4230999821u); continue; case 14u: arg_15D_0 = ((this.options_ != null) ? 3655641898u : 3846631941u); continue; } return; } } } static EnumDescriptorProto() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 1662712070u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2031148813u)) % 3u) { case 0u: goto IL_57; case 1u: EnumDescriptorProto._repeated_value_codec = FieldCodec.ForMessage<EnumValueDescriptorProto>(18u, EnumValueDescriptorProto.Parser); arg_3F_0 = (num * 2639494279u ^ 3772469875u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/IDeepCloneable.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public interface IDeepCloneable<T> { T Clone(); } } <file_sep>/AuthServer.AuthServer.JsonObjects/ClientVersion.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class ClientVersion { [DataMember(Name = "versionMajor")] public int Major { get; set; } [DataMember(Name = "versionBuild")] public int Build { get; set; } [DataMember(Name = "versionMinor")] public int Minor { get; set; } [DataMember(Name = "versionRevision")] public int Revision { get; set; } } } <file_sep>/Google.Protobuf.WellKnownTypes/UInt64Value.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class UInt64Value : IMessage<UInt64Value>, IEquatable<UInt64Value>, IDeepCloneable<UInt64Value>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UInt64Value.__c __9 = new UInt64Value.__c(); internal UInt64Value cctor>b__24_0() { return new UInt64Value(); } } private static readonly MessageParser<UInt64Value> _parser = new MessageParser<UInt64Value>(new Func<UInt64Value>(UInt64Value.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private ulong value_; public static MessageParser<UInt64Value> Parser { get { return UInt64Value._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return UInt64Value.Descriptor; } } public ulong Value { get { return this.value_; } set { this.value_ = value; } } public UInt64Value() { } public UInt64Value(UInt64Value other) : this() { while (true) { IL_3E: uint arg_26_0 = 2692623055u; while (true) { uint num; switch ((num = (arg_26_0 ^ 2647586696u)) % 3u) { case 1u: this.value_ = other.value_; arg_26_0 = (num * 480328232u ^ 1226890301u); continue; case 2u: goto IL_3E; } return; } } } public UInt64Value Clone() { return new UInt64Value(this); } public override bool Equals(object other) { return this.Equals(other as UInt64Value); } public bool Equals(UInt64Value other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 1501754317) % 7) { case 0: goto IL_39; case 1: return false; case 2: goto IL_75; case 3: return true; case 5: return false; case 6: arg_43_0 = ((this.Value == other.Value) ? 2110735878 : 887388975); continue; } break; } return true; IL_39: arg_43_0 = 496968355; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? 1098447721 : 1396165205); goto IL_3E; } public override int GetHashCode() { int num = 1; if (this.Value != 0uL) { while (true) { IL_47: uint arg_2F_0 = 1478230784u; while (true) { uint num2; switch ((num2 = (arg_2F_0 ^ 1606704892u)) % 3u) { case 0u: goto IL_47; case 1u: num ^= this.Value.GetHashCode(); arg_2F_0 = (num2 * 3602546017u ^ 2671420245u); continue; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value != 0uL) { while (true) { IL_47: uint arg_2F_0 = 4031822136u; while (true) { uint num; switch ((num = (arg_2F_0 ^ 2432157601u)) % 3u) { case 0u: goto IL_47; case 2u: output.WriteRawTag(8); output.WriteUInt64(this.Value); arg_2F_0 = (num * 4072525251u ^ 925261882u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_6B: uint arg_4F_0 = 3030850040u; while (true) { uint num2; switch ((num2 = (arg_4F_0 ^ 3198133029u)) % 4u) { case 0u: goto IL_6B; case 1u: arg_4F_0 = (((this.Value != 0uL) ? 739238963u : 431717382u) ^ num2 * 3773124041u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Value); arg_4F_0 = (num2 * 1275667473u ^ 3291009088u); continue; } return num; } } return num; } public void MergeFrom(UInt64Value other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2683627219u)) % 5u) { case 0u: this.Value = other.Value; arg_37_0 = (num * 3950873742u ^ 3944701421u); continue; case 1u: return; case 3u: goto IL_12; case 4u: goto IL_63; } break; } return; IL_12: arg_37_0 = 2234959634u; goto IL_32; IL_63: arg_37_0 = ((other.Value != 0uL) ? 3344006917u : 2690974041u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_95: uint num; uint arg_62_0 = ((num = input.ReadTag()) != 0u) ? 2640323563u : 2621535426u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 4293315933u)) % 6u) { case 0u: arg_62_0 = 2640323563u; continue; case 2u: goto IL_95; case 3u: this.Value = input.ReadUInt64(); arg_62_0 = 2725199347u; continue; case 4u: arg_62_0 = ((num != 8u) ? 3207784056u : 2548953166u); continue; case 5u: input.SkipLastField(); arg_62_0 = (num2 * 158718183u ^ 715922320u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Notification.V1/Subscription.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Notification.V1 { [DebuggerNonUserCode] public sealed class Subscription : IMessage<Subscription>, IEquatable<Subscription>, IDeepCloneable<Subscription>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Subscription.__c __9 = new Subscription.__c(); internal Subscription cctor>b__34_0() { return new Subscription(); } } private static readonly MessageParser<Subscription> _parser = new MessageParser<Subscription>(new Func<Subscription>(Subscription.__c.__9.<.cctor>b__34_0)); public const int TargetFieldNumber = 1; private static readonly FieldCodec<Target> _repeated_target_codec = FieldCodec.ForMessage<Target>(10u, Bgs.Protocol.Notification.V1.Target.Parser); private readonly RepeatedField<Target> target_ = new RepeatedField<Target>(); public const int SubscriberFieldNumber = 2; private Bgs.Protocol.Account.V1.Identity subscriber_; public const int DeliveryRequiredFieldNumber = 3; private bool deliveryRequired_; public static MessageParser<Subscription> Parser { get { return Subscription._parser; } } public static MessageDescriptor Descriptor { get { return NotificationTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Subscription.Descriptor; } } public RepeatedField<Target> Target { get { return this.target_; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public bool DeliveryRequired { get { return this.deliveryRequired_; } set { this.deliveryRequired_ = value; } } public Subscription() { } public Subscription(Subscription other) : this() { this.target_ = other.target_.Clone(); this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); this.deliveryRequired_ = other.deliveryRequired_; } public Subscription Clone() { return new Subscription(this); } public override bool Equals(object other) { return this.Equals(other as Subscription); } public bool Equals(Subscription other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ 7964622) % 11) { case 0: goto IL_9A; case 1: return false; case 2: arg_A4_0 = (this.target_.Equals(other.target_) ? 1363278412 : 1886253932); continue; case 3: return true; case 4: return false; case 5: arg_A4_0 = ((this.DeliveryRequired == other.DeliveryRequired) ? 1856649697 : 1541726576); continue; case 6: arg_A4_0 = (Subscription.smethod_0(this.Subscriber, other.Subscriber) ? 806515713 : 1935744554); continue; case 7: return false; case 9: goto IL_EA; case 10: return false; } break; } return true; IL_9A: arg_A4_0 = 2066859763; goto IL_9F; IL_EA: arg_A4_0 = ((other == this) ? 409975692 : 663058465); goto IL_9F; } public override int GetHashCode() { int num = 1; while (true) { IL_D9: uint arg_B1_0 = 471177095u; while (true) { uint num2; switch ((num2 = (arg_B1_0 ^ 448265304u)) % 7u) { case 0u: num ^= this.DeliveryRequired.GetHashCode(); arg_B1_0 = (num2 * 1833223068u ^ 2894518662u); continue; case 1u: num ^= Subscription.smethod_1(this.target_); arg_B1_0 = (num2 * 1878798975u ^ 2930189770u); continue; case 2u: arg_B1_0 = (((this.subscriber_ != null) ? 2015836977u : 1081124052u) ^ num2 * 197443270u); continue; case 3u: num ^= Subscription.smethod_1(this.Subscriber); arg_B1_0 = (num2 * 1910783425u ^ 4025052413u); continue; case 4u: goto IL_D9; case 5u: arg_B1_0 = ((!this.DeliveryRequired) ? 393721114u : 1035667353u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.target_.WriteTo(output, Subscription._repeated_target_codec); while (true) { IL_E0: uint arg_B8_0 = 2548894793u; while (true) { uint num; switch ((num = (arg_B8_0 ^ 2490947613u)) % 7u) { case 0u: output.WriteBool(this.DeliveryRequired); arg_B8_0 = (num * 1031393544u ^ 3836759039u); continue; case 1u: arg_B8_0 = (((this.subscriber_ != null) ? 4150777326u : 2282326086u) ^ num * 1076301495u); continue; case 2u: output.WriteRawTag(24); arg_B8_0 = (num * 3334719059u ^ 1731835778u); continue; case 3u: goto IL_E0; case 4u: output.WriteRawTag(18); output.WriteMessage(this.Subscriber); arg_B8_0 = (num * 301732386u ^ 3456917908u); continue; case 6u: arg_B8_0 = (this.DeliveryRequired ? 3187940163u : 4082587607u); continue; } return; } } } public int CalculateSize() { int num = 0 + this.target_.CalculateSize(Subscription._repeated_target_codec); while (true) { IL_BD: uint arg_99_0 = 2970534090u; while (true) { uint num2; switch ((num2 = (arg_99_0 ^ 2998110316u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_99_0 = (num2 * 2610837631u ^ 3092066339u); continue; case 2u: goto IL_BD; case 3u: num += 2; arg_99_0 = (num2 * 2875878761u ^ 3171378656u); continue; case 4u: arg_99_0 = (((this.subscriber_ != null) ? 457784412u : 1513998063u) ^ num2 * 166657767u); continue; case 5u: arg_99_0 = ((!this.DeliveryRequired) ? 2914900815u : 3563231291u); continue; } return num; } } return num; } public void MergeFrom(Subscription other) { if (other == null) { goto IL_96; } goto IL_110; uint arg_DB_0; while (true) { IL_D6: uint num; switch ((num = (arg_DB_0 ^ 1759671886u)) % 10u) { case 0u: arg_DB_0 = ((!other.DeliveryRequired) ? 1251438218u : 1940621507u); continue; case 1u: return; case 2u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_DB_0 = (num * 677360541u ^ 558253952u); continue; case 3u: goto IL_96; case 4u: arg_DB_0 = (((this.subscriber_ == null) ? 1201748648u : 2017813374u) ^ num * 663022425u); continue; case 5u: this.DeliveryRequired = other.DeliveryRequired; arg_DB_0 = (num * 2331707757u ^ 2216966531u); continue; case 7u: goto IL_110; case 8u: this.Subscriber.MergeFrom(other.Subscriber); arg_DB_0 = 1586841262u; continue; case 9u: arg_DB_0 = (((other.subscriber_ == null) ? 3811662548u : 3833615036u) ^ num * 467610122u); continue; } break; } return; IL_96: arg_DB_0 = 972119607u; goto IL_D6; IL_110: this.target_.Add(other.target_); arg_DB_0 = 2138320791u; goto IL_D6; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1AF: uint num; uint arg_157_0 = ((num = input.ReadTag()) != 0u) ? 1249814007u : 2145295015u; while (true) { uint num2; switch ((num2 = (arg_157_0 ^ 999655017u)) % 15u) { case 0u: goto IL_1AF; case 1u: arg_157_0 = ((num != 10u) ? 157867089u : 1304758693u); continue; case 3u: arg_157_0 = (num2 * 1226072962u ^ 1553621811u); continue; case 4u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_157_0 = (num2 * 2564590638u ^ 1511124511u); continue; case 5u: this.target_.AddEntriesFrom(input, Subscription._repeated_target_codec); arg_157_0 = 128768147u; continue; case 6u: input.SkipLastField(); arg_157_0 = (num2 * 643586391u ^ 1296060603u); continue; case 7u: arg_157_0 = 1249814007u; continue; case 8u: input.ReadMessage(this.subscriber_); arg_157_0 = 593690679u; continue; case 9u: arg_157_0 = ((this.subscriber_ == null) ? 170264808u : 1965017393u); continue; case 10u: this.DeliveryRequired = input.ReadBool(); arg_157_0 = 216331919u; continue; case 11u: arg_157_0 = (num2 * 1606619566u ^ 3495940451u); continue; case 12u: arg_157_0 = (((num == 24u) ? 1962035627u : 1425551195u) ^ num2 * 3787884850u); continue; case 13u: arg_157_0 = (num2 * 1218652786u ^ 3810732707u); continue; case 14u: arg_157_0 = (((num == 18u) ? 3846170097u : 2832951822u) ^ num2 * 3664064350u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/SubscribeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class SubscribeRequest : IMessage<SubscribeRequest>, IEquatable<SubscribeRequest>, IDeepCloneable<SubscribeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscribeRequest.__c __9 = new SubscribeRequest.__c(); internal SubscribeRequest cctor>b__29_0() { return new SubscribeRequest(); } } private static readonly MessageParser<SubscribeRequest> _parser = new MessageParser<SubscribeRequest>(new Func<SubscribeRequest>(SubscribeRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int ObjectIdFieldNumber = 2; private ulong objectId_; public static MessageParser<SubscribeRequest> Parser { get { return SubscribeRequest._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return SubscribeRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public SubscribeRequest() { } public SubscribeRequest(SubscribeRequest other) : this() { while (true) { IL_50: int arg_3A_0 = 1325818509; while (true) { switch ((arg_3A_0 ^ 1722233783) % 3) { case 0: goto IL_50; case 2: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.objectId_ = other.objectId_; arg_3A_0 = 2059141532; continue; } return; } } } public SubscribeRequest Clone() { return new SubscribeRequest(this); } public override bool Equals(object other) { return this.Equals(other as SubscribeRequest); } public bool Equals(SubscribeRequest other) { if (other == null) { goto IL_3C; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 2019778344) % 9) { case 0: arg_72_0 = ((!SubscribeRequest.smethod_0(this.AgentId, other.AgentId)) ? 1675316897 : 1906118553); continue; case 1: return false; case 2: goto IL_3C; case 3: return false; case 4: return true; case 6: goto IL_B0; case 7: arg_72_0 = ((this.ObjectId != other.ObjectId) ? 1750934126 : 533689540); continue; case 8: return false; } break; } return true; IL_3C: arg_72_0 = 417158981; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1060011869 : 1149474132); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_1C; } goto IL_8F; uint arg_63_0; while (true) { IL_5E: uint num2; switch ((num2 = (arg_63_0 ^ 22176443u)) % 5u) { case 0u: num ^= this.ObjectId.GetHashCode(); arg_63_0 = (num2 * 1502067326u ^ 627368492u); continue; case 1u: goto IL_8F; case 2u: num ^= SubscribeRequest.smethod_1(this.AgentId); arg_63_0 = (num2 * 2355863833u ^ 1455070418u); continue; case 3u: goto IL_1C; } break; } return num; IL_1C: arg_63_0 = 115642044u; goto IL_5E; IL_8F: arg_63_0 = ((this.ObjectId != 0uL) ? 303948121u : 1078460176u); goto IL_5E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_31; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 1610250301u)) % 7u) { case 0u: output.WriteMessage(this.AgentId); arg_88_0 = (num * 3067201397u ^ 177649650u); continue; case 1u: output.WriteRawTag(10); arg_88_0 = (num * 1828263635u ^ 2266489483u); continue; case 2u: output.WriteUInt64(this.ObjectId); arg_88_0 = (num * 2675546485u ^ 680815964u); continue; case 4u: goto IL_31; case 5u: output.WriteRawTag(16); arg_88_0 = (num * 956693876u ^ 2647628511u); continue; case 6u: goto IL_BF; } break; } return; IL_31: arg_88_0 = 325527202u; goto IL_83; IL_BF: arg_88_0 = ((this.ObjectId == 0uL) ? 1786984054u : 574807733u); goto IL_83; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_5A; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 1725752255u)) % 5u) { case 0u: goto IL_5A; case 2u: goto IL_90; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_64_0 = (num2 * 216804516u ^ 2754658768u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_64_0 = (num2 * 2961482916u ^ 3377906006u); continue; } break; } return num; IL_5A: arg_64_0 = 1535131317u; goto IL_5F; IL_90: arg_64_0 = ((this.ObjectId == 0uL) ? 1166866632u : 1962658153u); goto IL_5F; } public void MergeFrom(SubscribeRequest other) { if (other == null) { goto IL_50; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 1613038748u)) % 9u) { case 0u: arg_BC_0 = (((this.agentId_ == null) ? 2696871119u : 3863776363u) ^ num * 730437386u); continue; case 1u: goto IL_FC; case 2u: arg_BC_0 = ((other.ObjectId != 0uL) ? 1820283195u : 1328700931u); continue; case 3u: this.AgentId.MergeFrom(other.AgentId); arg_BC_0 = 1037800758u; continue; case 4u: goto IL_50; case 5u: this.agentId_ = new EntityId(); arg_BC_0 = (num * 185032861u ^ 2202331692u); continue; case 6u: this.ObjectId = other.ObjectId; arg_BC_0 = (num * 2202523278u ^ 3677635233u); continue; case 8u: return; } break; } return; IL_50: arg_BC_0 = 257167904u; goto IL_B7; IL_FC: arg_BC_0 = ((other.agentId_ == null) ? 1037800758u : 1339467640u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_150: uint num; uint arg_104_0 = ((num = input.ReadTag()) == 0u) ? 3564687619u : 3343265375u; while (true) { uint num2; switch ((num2 = (arg_104_0 ^ 3835491450u)) % 12u) { case 0u: arg_104_0 = ((this.agentId_ == null) ? 3061718889u : 3253921165u); continue; case 1u: arg_104_0 = ((num != 10u) ? 2787350185u : 2963529898u); continue; case 2u: arg_104_0 = 3343265375u; continue; case 3u: input.ReadMessage(this.agentId_); arg_104_0 = 2519614212u; continue; case 4u: goto IL_150; case 6u: arg_104_0 = (num2 * 3156006502u ^ 3986710830u); continue; case 7u: this.agentId_ = new EntityId(); arg_104_0 = (num2 * 2660217962u ^ 690574419u); continue; case 8u: this.ObjectId = input.ReadUInt64(); arg_104_0 = 3344877026u; continue; case 9u: input.SkipLastField(); arg_104_0 = (num2 * 4208392855u ^ 2299771867u); continue; case 10u: arg_104_0 = (num2 * 1428999783u ^ 2456416848u); continue; case 11u: arg_104_0 = (((num == 16u) ? 3538324494u : 2607476127u) ^ num2 * 2482393104u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/FieldOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class FieldOptions : IMessage, IMessage<FieldOptions>, IEquatable<FieldOptions>, IDeepCloneable<FieldOptions> { [DebuggerNonUserCode] public static class Types { internal enum CType { STRING, CORD, STRING_PIECE } internal enum JSType { JS_NORMAL, JS_STRING, JS_NUMBER } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldOptions.__c __9 = new FieldOptions.__c(); internal FieldOptions cctor>b__55_0() { return new FieldOptions(); } } private static readonly MessageParser<FieldOptions> _parser = new MessageParser<FieldOptions>(new Func<FieldOptions>(FieldOptions.__c.__9.<.cctor>b__55_0)); public const int CtypeFieldNumber = 1; private FieldOptions.Types.CType ctype_; public const int PackedFieldNumber = 2; private bool packed_; public const int JstypeFieldNumber = 6; private FieldOptions.Types.JSType jstype_; public const int LazyFieldNumber = 5; private bool lazy_; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int WeakFieldNumber = 10; private bool weak_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec; private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<FieldOptions> Parser { get { return FieldOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return FieldOptions.Descriptor; } } public FieldOptions.Types.CType Ctype { get { return this.ctype_; } set { this.ctype_ = value; } } public bool Packed { get { return this.packed_; } set { this.packed_ = value; } } public FieldOptions.Types.JSType Jstype { get { return this.jstype_; } set { this.jstype_ = value; } } public bool Lazy { get { return this.lazy_; } set { this.lazy_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public bool Weak { get { return this.weak_; } set { this.weak_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public FieldOptions() { this.OnConstruction(); } private void OnConstruction() { this.Packed = true; } public FieldOptions(FieldOptions other) : this() { while (true) { IL_DA: uint arg_B2_0 = 808513109u; while (true) { uint num; switch ((num = (arg_B2_0 ^ 1673929259u)) % 7u) { case 0u: this.lazy_ = other.lazy_; this.deprecated_ = other.deprecated_; arg_B2_0 = (num * 1133508417u ^ 1906076001u); continue; case 1u: this.packed_ = other.packed_; arg_B2_0 = (num * 1815268208u ^ 3651080080u); continue; case 3u: this.jstype_ = other.jstype_; arg_B2_0 = (num * 3730434426u ^ 754207911u); continue; case 4u: goto IL_DA; case 5u: this.ctype_ = other.ctype_; arg_B2_0 = (num * 4141407866u ^ 3946025637u); continue; case 6u: this.weak_ = other.weak_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); arg_B2_0 = (num * 114519735u ^ 3987153241u); continue; } return; } } } public FieldOptions Clone() { return new FieldOptions(this); } public override bool Equals(object other) { return this.Equals(other as FieldOptions); } public bool Equals(FieldOptions other) { if (other == null) { goto IL_6C; } goto IL_1AA; int arg_144_0; while (true) { IL_13F: switch ((arg_144_0 ^ 1677661686) % 19) { case 0: arg_144_0 = ((this.Lazy == other.Lazy) ? 723003155 : 474187183); continue; case 1: arg_144_0 = ((this.Deprecated == other.Deprecated) ? 540824740 : 1452804520); continue; case 2: arg_144_0 = ((this.Weak == other.Weak) ? 1148384309 : 2106197812); continue; case 3: return false; case 4: return false; case 5: return true; case 6: arg_144_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? 2145323254 : 1839087411); continue; case 7: arg_144_0 = ((this.Jstype != other.Jstype) ? 1269046770 : 994806066); continue; case 8: return false; case 9: return false; case 10: goto IL_6C; case 11: return false; case 12: return false; case 13: return false; case 14: arg_144_0 = ((this.Ctype == other.Ctype) ? 50995162 : 1332910505); continue; case 15: goto IL_1AA; case 16: return false; case 17: arg_144_0 = ((this.Packed != other.Packed) ? 1087975950 : 2136696893); continue; } break; } return true; IL_6C: arg_144_0 = 403586235; goto IL_13F; IL_1AA: arg_144_0 = ((other != this) ? 775640992 : 1930160596); goto IL_13F; } public override int GetHashCode() { int num = 1; while (true) { IL_225: uint arg_1DB_0 = 4046111446u; while (true) { uint num2; switch ((num2 = (arg_1DB_0 ^ 3220408252u)) % 15u) { case 0u: goto IL_225; case 2u: arg_1DB_0 = (this.Weak ? 2799619124u : 3851482077u); continue; case 3u: arg_1DB_0 = ((this.Jstype != FieldOptions.Types.JSType.JS_NORMAL) ? 2500702552u : 3530990958u); continue; case 4u: num ^= this.Ctype.GetHashCode(); arg_1DB_0 = (num2 * 2444289584u ^ 238364999u); continue; case 5u: arg_1DB_0 = (((this.Ctype == FieldOptions.Types.CType.STRING) ? 2753426405u : 2905759143u) ^ num2 * 228232453u); continue; case 6u: arg_1DB_0 = (this.Lazy ? 2864276380u : 2386267677u); continue; case 7u: num ^= this.Deprecated.GetHashCode(); arg_1DB_0 = (num2 * 4171427001u ^ 350107936u); continue; case 8u: num ^= this.Jstype.GetHashCode(); arg_1DB_0 = (num2 * 55930598u ^ 333049270u); continue; case 9u: num ^= this.Packed.GetHashCode(); arg_1DB_0 = (num2 * 3779669471u ^ 729510438u); continue; case 10u: num ^= this.Lazy.GetHashCode(); arg_1DB_0 = (num2 * 2598487431u ^ 303129341u); continue; case 11u: num ^= this.Weak.GetHashCode(); arg_1DB_0 = (num2 * 162405353u ^ 707912981u); continue; case 12u: num ^= this.uninterpretedOption_.GetHashCode(); arg_1DB_0 = 2263293982u; continue; case 13u: arg_1DB_0 = ((!this.Packed) ? 2532064640u : 4139630246u); continue; case 14u: arg_1DB_0 = ((!this.Deprecated) ? 2966496898u : 3252598798u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Ctype != FieldOptions.Types.CType.STRING) { goto IL_38; } goto IL_255; uint arg_1F1_0; while (true) { IL_1EC: uint num; switch ((num = (arg_1F1_0 ^ 112622770u)) % 18u) { case 0u: output.WriteBool(this.Deprecated); arg_1F1_0 = (num * 1735206152u ^ 3607075555u); continue; case 1u: arg_1F1_0 = ((!this.Lazy) ? 986132828u : 133581530u); continue; case 2u: arg_1F1_0 = ((this.Jstype == FieldOptions.Types.JSType.JS_NORMAL) ? 1508206835u : 750506624u); continue; case 3u: goto IL_255; case 4u: output.WriteRawTag(40); arg_1F1_0 = (num * 417846806u ^ 2667861130u); continue; case 5u: output.WriteEnum((int)this.Jstype); arg_1F1_0 = (num * 1959736267u ^ 2906137754u); continue; case 6u: output.WriteRawTag(48); arg_1F1_0 = (num * 43651066u ^ 620409981u); continue; case 7u: output.WriteRawTag(16); arg_1F1_0 = (num * 843428670u ^ 746818609u); continue; case 8u: output.WriteRawTag(8); output.WriteEnum((int)this.Ctype); arg_1F1_0 = (num * 3679862888u ^ 1990182193u); continue; case 9u: output.WriteBool(this.Packed); arg_1F1_0 = (num * 2613794982u ^ 3213554680u); continue; case 10u: output.WriteBool(this.Lazy); arg_1F1_0 = (num * 3928531342u ^ 3868934060u); continue; case 11u: arg_1F1_0 = ((!this.Weak) ? 1173751509u : 1598910769u); continue; case 12u: arg_1F1_0 = (this.Deprecated ? 669054027u : 717399811u); continue; case 13u: output.WriteRawTag(80); output.WriteBool(this.Weak); arg_1F1_0 = (num * 3246052724u ^ 2660767881u); continue; case 15u: output.WriteRawTag(24); arg_1F1_0 = (num * 2569592853u ^ 3829707491u); continue; case 16u: goto IL_38; case 17u: this.uninterpretedOption_.WriteTo(output, FieldOptions._repeated_uninterpretedOption_codec); arg_1F1_0 = 417261098u; continue; } break; } return; IL_38: arg_1F1_0 = 1048730324u; goto IL_1EC; IL_255: arg_1F1_0 = ((!this.Packed) ? 1399092230u : 720838271u); goto IL_1EC; } public int CalculateSize() { int num = 0; if (this.Ctype != FieldOptions.Types.CType.STRING) { goto IL_8C; } goto IL_1BA; uint arg_166_0; while (true) { IL_161: uint num2; switch ((num2 = (arg_166_0 ^ 2216341055u)) % 14u) { case 0u: num += 2; arg_166_0 = (num2 * 2210841885u ^ 1303415503u); continue; case 1u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Jstype); arg_166_0 = (num2 * 3021538482u ^ 2799871695u); continue; case 2u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Ctype); arg_166_0 = (num2 * 145702162u ^ 966589614u); continue; case 3u: num += 2; arg_166_0 = (num2 * 1654030685u ^ 647672885u); continue; case 4u: arg_166_0 = ((this.Jstype != FieldOptions.Types.JSType.JS_NORMAL) ? 3922037432u : 4161414929u); continue; case 5u: goto IL_1BA; case 7u: arg_166_0 = (this.Deprecated ? 3316210611u : 3731788443u); continue; case 8u: arg_166_0 = ((!this.Lazy) ? 2667153800u : 3886066142u); continue; case 9u: goto IL_8C; case 10u: num += 2; arg_166_0 = (num2 * 2873872320u ^ 3773222811u); continue; case 11u: num += this.uninterpretedOption_.CalculateSize(FieldOptions._repeated_uninterpretedOption_codec); arg_166_0 = 2595162795u; continue; case 12u: arg_166_0 = (this.Weak ? 2639522660u : 2799949384u); continue; case 13u: num += 2; arg_166_0 = (num2 * 2543969490u ^ 3992528622u); continue; } break; } return num; IL_8C: arg_166_0 = 4244226189u; goto IL_161; IL_1BA: arg_166_0 = ((!this.Packed) ? 3433666033u : 3599090665u); goto IL_161; } public void MergeFrom(FieldOptions other) { if (other == null) { goto IL_18F; } goto IL_1F5; uint arg_199_0; while (true) { IL_194: uint num; switch ((num = (arg_199_0 ^ 3668595373u)) % 16u) { case 0u: goto IL_18F; case 2u: this.Packed = other.Packed; arg_199_0 = (num * 3363954266u ^ 1141912438u); continue; case 3u: return; case 4u: this.Ctype = other.Ctype; arg_199_0 = (num * 3099798110u ^ 3572956235u); continue; case 5u: this.Weak = other.Weak; arg_199_0 = (num * 1074779969u ^ 666552031u); continue; case 6u: arg_199_0 = (other.Lazy ? 4032626144u : 3960941857u); continue; case 7u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_199_0 = 2619398844u; continue; case 8u: arg_199_0 = (other.Weak ? 2345773608u : 3125152282u); continue; case 9u: goto IL_1F5; case 10u: this.Deprecated = other.Deprecated; arg_199_0 = (num * 65348797u ^ 3966278039u); continue; case 11u: this.Jstype = other.Jstype; arg_199_0 = (num * 2395785374u ^ 2363568961u); continue; case 12u: arg_199_0 = (other.Deprecated ? 4009625927u : 2582534741u); continue; case 13u: this.Lazy = other.Lazy; arg_199_0 = (num * 3911880552u ^ 4224849769u); continue; case 14u: arg_199_0 = ((!other.Packed) ? 3924386402u : 2998174303u); continue; case 15u: arg_199_0 = ((other.Jstype != FieldOptions.Types.JSType.JS_NORMAL) ? 3436809366u : 3200545579u); continue; } break; } return; IL_18F: arg_199_0 = 2257808430u; goto IL_194; IL_1F5: arg_199_0 = ((other.Ctype != FieldOptions.Types.CType.STRING) ? 3459379481u : 4176173139u); goto IL_194; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2C6: uint num; uint arg_24E_0 = ((num = input.ReadTag()) == 0u) ? 3577994024u : 2900136090u; while (true) { uint num2; switch ((num2 = (arg_24E_0 ^ 3940398529u)) % 23u) { case 0u: this.Deprecated = input.ReadBool(); arg_24E_0 = 3598919458u; continue; case 1u: input.SkipLastField(); arg_24E_0 = 4066581966u; continue; case 2u: goto IL_2C6; case 3u: arg_24E_0 = (num2 * 4119144919u ^ 2508302955u); continue; case 4u: this.Packed = input.ReadBool(); arg_24E_0 = 4066581966u; continue; case 5u: arg_24E_0 = (((num == 48u) ? 512079659u : 1892605707u) ^ num2 * 2804962785u); continue; case 7u: arg_24E_0 = (num2 * 423148375u ^ 3853171181u); continue; case 8u: arg_24E_0 = ((num > 24u) ? 3950198473u : 2516790018u); continue; case 9u: arg_24E_0 = (((num != 40u) ? 1557120368u : 418334193u) ^ num2 * 1501125555u); continue; case 10u: arg_24E_0 = ((num != 80u) ? 3549521329u : 4042494146u); continue; case 11u: this.Weak = input.ReadBool(); arg_24E_0 = 4066581966u; continue; case 12u: arg_24E_0 = (((num != 8u) ? 4235403621u : 3955850366u) ^ num2 * 390384741u); continue; case 13u: arg_24E_0 = (((num == 24u) ? 3742356801u : 3570614176u) ^ num2 * 2459507463u); continue; case 14u: this.jstype_ = (FieldOptions.Types.JSType)input.ReadEnum(); arg_24E_0 = 4066581966u; continue; case 15u: arg_24E_0 = (((num != 7994u) ? 2850221438u : 3858242592u) ^ num2 * 434354732u); continue; case 16u: arg_24E_0 = (((num != 16u) ? 694792793u : 2054021774u) ^ num2 * 3402682316u); continue; case 17u: arg_24E_0 = ((num <= 48u) ? 3670737637u : 3443182464u); continue; case 18u: arg_24E_0 = (num2 * 1380117418u ^ 2547356600u); continue; case 19u: arg_24E_0 = 2900136090u; continue; case 20u: this.uninterpretedOption_.AddEntriesFrom(input, FieldOptions._repeated_uninterpretedOption_codec); arg_24E_0 = 4066581966u; continue; case 21u: this.ctype_ = (FieldOptions.Types.CType)input.ReadEnum(); arg_24E_0 = 4066581966u; continue; case 22u: this.Lazy = input.ReadBool(); arg_24E_0 = 4066581966u; continue; } return; } } } static FieldOptions() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_5A: uint arg_42_0 = 537177894u; while (true) { uint num; switch ((num = (arg_42_0 ^ 974030318u)) % 3u) { case 0u: goto IL_5A; case 2u: FieldOptions._repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); arg_42_0 = (num * 3539671116u ^ 3074555809u); continue; } return; } } } } } <file_sep>/Framework.Constants/ObjectType.cs using System; namespace Framework.Constants { public enum ObjectType { Object, Item, Container, Unit, Player, GameObject, DynamicObject, Corpse } } <file_sep>/Google.Protobuf/MessageParser.cs using System; using System.IO; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public class MessageParser { private Func<IMessage> factory; internal MessageParser(Func<IMessage> factory) { this.factory = factory; } internal IMessage CreateTemplate() { return this.factory(); } public IMessage ParseFrom(byte[] data) { Preconditions.CheckNotNull<byte[]>(data, Module.smethod_35<string>(3890457523u)); IMessage expr_1C = this.factory(); expr_1C.MergeFrom(data); return expr_1C; } public IMessage ParseFrom(ByteString data) { Preconditions.CheckNotNull<ByteString>(data, Module.smethod_37<string>(1222507759u)); IMessage expr_1C = this.factory(); expr_1C.MergeFrom(data); return expr_1C; } public IMessage ParseFrom(Stream input) { IMessage expr_0B = this.factory(); expr_0B.MergeFrom(input); return expr_0B; } public IMessage ParseDelimitedFrom(Stream input) { IMessage expr_0B = this.factory(); expr_0B.MergeDelimitedFrom(input); return expr_0B; } public IMessage ParseFrom(CodedInputStream input) { IMessage expr_0B = this.factory(); expr_0B.MergeFrom(input); return expr_0B; } public IMessage ParseJson(string json) { IMessage message = this.factory(); JsonParser.Default.Merge(message, json); return message; } } [ComVisible(true)] public sealed class MessageParser<T> : MessageParser where T : object, IMessage<T> { private readonly Func<T> factory; public MessageParser(Func<T> factory) : base(() => factory()) { this.factory = factory; } internal new T CreateTemplate() { return this.factory(); } public new T ParseFrom(byte[] data) { Preconditions.CheckNotNull<byte[]>(data, Module.smethod_37<string>(1222507759u)); T expr_1C = this.factory(); expr_1C.MergeFrom(data); return expr_1C; } public new T ParseFrom(ByteString data) { Preconditions.CheckNotNull<ByteString>(data, Module.smethod_34<string>(87936628u)); T expr_1C = this.factory(); expr_1C.MergeFrom(data); return expr_1C; } public new T ParseFrom(Stream input) { T expr_0B = this.factory(); expr_0B.MergeFrom(input); return expr_0B; } public new T ParseDelimitedFrom(Stream input) { T expr_0B = this.factory(); expr_0B.MergeDelimitedFrom(input); return expr_0B; } public new T ParseFrom(CodedInputStream input) { T result = this.factory(); result.MergeFrom(input); return result; } public new T ParseJson(string json) { T t = this.factory(); JsonParser.Default.Merge(t, json); return t; } } } <file_sep>/Bgs.Protocol.Connection.V1/EncryptRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class EncryptRequest : IMessage<EncryptRequest>, IEquatable<EncryptRequest>, IDeepCloneable<EncryptRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EncryptRequest.__c __9 = new EncryptRequest.__c(); internal EncryptRequest cctor>b__19_0() { return new EncryptRequest(); } } private static readonly MessageParser<EncryptRequest> _parser = new MessageParser<EncryptRequest>(new Func<EncryptRequest>(EncryptRequest.__c.__9.<.cctor>b__19_0)); public static MessageParser<EncryptRequest> Parser { get { return EncryptRequest._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return EncryptRequest.Descriptor; } } public EncryptRequest() { } public EncryptRequest(EncryptRequest other) : this() { } public EncryptRequest Clone() { return new EncryptRequest(this); } public override bool Equals(object other) { return this.Equals(other as EncryptRequest); } public bool Equals(EncryptRequest other) { return other != null; } public override int GetHashCode() { return 1; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { } public int CalculateSize() { return 0; } public void MergeFrom(EncryptRequest other) { } public void MergeFrom(CodedInputStream input) { while (true) { IL_4D: int arg_27_0 = (input.ReadTag() == 0u) ? 1729650050 : 542676124; while (true) { switch ((arg_27_0 ^ 586479465) % 4) { case 0: goto IL_4D; case 1: input.SkipLastField(); arg_27_0 = 1348997813; continue; case 2: arg_27_0 = 542676124; continue; } return; } } } } } <file_sep>/Framework.Misc/Helper.cs using Framework.Constants.Misc; using Framework.Logging; using System; using System.Globalization; using System.Reflection; using System.Text; namespace Framework.Misc { public class Helper { private static IFormatProvider enUSNumber = Helper.smethod_14(Helper.smethod_13(Module.smethod_37<string>(760620999u))); private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); public static void PrintHeader(string serverName) { Log.Message(LogType.Init, Module.smethod_34<string>(4028062690u), Array.Empty<object>()); StringBuilder stringBuilder; int num2; while (true) { IL_1A5: uint arg_179_0 = 3834617095u; while (true) { uint num; switch ((num = (arg_179_0 ^ 2922890101u)) % 8u) { case 0u: Helper.smethod_3(stringBuilder, num2, serverName); arg_179_0 = (num * 1067961754u ^ 3795369450u); continue; case 1u: Log.Message(LogType.Init, Module.smethod_36<string>(2386377369u), Array.Empty<object>()); arg_179_0 = (num * 3483953559u ^ 3788356934u); continue; case 2u: Log.Message(LogType.Init, Module.smethod_37<string>(3560646313u), Array.Empty<object>()); Log.Message(LogType.Init, Module.smethod_33<string>(252208442u), Array.Empty<object>()); Log.Message(LogType.Init, Module.smethod_33<string>(2425215342u), Array.Empty<object>()); Log.Message(LogType.Init, Module.smethod_36<string>(1020330481u), Array.Empty<object>()); Log.Message(LogType.Init, Module.smethod_33<string>(2374168838u), Array.Empty<object>()); arg_179_0 = (num * 2920292180u ^ 3670365708u); continue; case 3u: goto IL_1A5; case 4u: Log.Message(LogType.Init, Module.smethod_35<string>(98604877u), Array.Empty<object>()); Log.Message(LogType.Init, Module.smethod_36<string>(244763489u), Array.Empty<object>()); Log.Message(LogType.Init, Module.smethod_33<string>(3294418102u), Array.Empty<object>()); Log.Message(LogType.Init, "", Array.Empty<object>()); stringBuilder = Helper.smethod_0(); arg_179_0 = (num * 2030026200u ^ 1834791672u); continue; case 5u: Helper.smethod_1(stringBuilder, Module.smethod_34<string>(3362754074u)); arg_179_0 = (num * 2752327162u ^ 1617791001u); continue; case 6u: num2 = (42 - Helper.smethod_2(serverName)) / 2; arg_179_0 = (num * 3682183340u ^ 1631012693u); continue; } goto Block_1; } } Block_1: Helper.smethod_4(stringBuilder, num2 + Helper.smethod_2(serverName), Helper.smethod_2(serverName)); Log.Message(LogType.Init, Helper.smethod_5(stringBuilder), Array.Empty<object>()); Log.Message(LogType.Init, Helper.smethod_6(Module.smethod_34<string>(3831437134u), Module.smethod_34<string>(539909203u)), Array.Empty<object>()); Log.Message(); Log.Message(LogType.Normal, Helper.smethod_6(Module.smethod_37<string>(3063923753u), serverName), Array.Empty<object>()); Log.Message(); } public static float ParseFloat(string data) { return float.Parse(data, Helper.enUSNumber); } public static long GetCurrentUnixTimestampMillis() { return (long)(DateTime.UtcNow - Helper.UnixEpoch).TotalMilliseconds; } public static uint GetUnixTime() { DateTime d = new DateTime(1970, 1, 1); return (uint)(DateTime.Now - d).TotalSeconds; } public static uint GetUnixTime2() { DateTime d = new DateTime(1970, 1, 1); return (uint)(DateTime.Now - d).Milliseconds; } public static string DataDirectory() { string string_ = Helper.smethod_9(Helper.smethod_8(Helper.smethod_7())); return Helper.smethod_12(Helper.smethod_12(Helper.smethod_10(Helper.smethod_7()), Helper.smethod_11(string_, Module.smethod_35<string>(980047131u)), ""), Helper.smethod_11(string_, Module.smethod_37<string>(1603051325u)), ""); } static StringBuilder smethod_0() { return new StringBuilder(); } static StringBuilder smethod_1(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.Append(string_0); } static int smethod_2(string string_0) { return string_0.Length; } static StringBuilder smethod_3(StringBuilder stringBuilder_0, int int_0, string string_0) { return stringBuilder_0.Insert(int_0, string_0); } static StringBuilder smethod_4(StringBuilder stringBuilder_0, int int_0, int int_1) { return stringBuilder_0.Remove(int_0, int_1); } static string smethod_5(object object_0) { return object_0.ToString(); } static string smethod_6(string string_0, object object_0) { return string.Format(string_0, object_0); } static Assembly smethod_7() { return Assembly.GetExecutingAssembly(); } static AssemblyName smethod_8(Assembly assembly_0) { return assembly_0.GetName(); } static string smethod_9(AssemblyName assemblyName_0) { return assemblyName_0.Name; } static string smethod_10(Assembly assembly_0) { return assembly_0.Location; } static string smethod_11(string string_0, string string_1) { return string_0 + string_1; } static string smethod_12(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static CultureInfo smethod_13(string string_0) { return new CultureInfo(string_0); } static NumberFormatInfo smethod_14(CultureInfo cultureInfo_0) { return cultureInfo_0.NumberFormat; } } } <file_sep>/Bgs.Protocol.Authentication.V1/LogonUpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class LogonUpdateRequest : IMessage<LogonUpdateRequest>, IEquatable<LogonUpdateRequest>, IDeepCloneable<LogonUpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly LogonUpdateRequest.__c __9 = new LogonUpdateRequest.__c(); internal LogonUpdateRequest cctor>b__24_0() { return new LogonUpdateRequest(); } } private static readonly MessageParser<LogonUpdateRequest> _parser = new MessageParser<LogonUpdateRequest>(new Func<LogonUpdateRequest>(LogonUpdateRequest.__c.__9.<.cctor>b__24_0)); public const int ErrorCodeFieldNumber = 1; private uint errorCode_; public static MessageParser<LogonUpdateRequest> Parser { get { return LogonUpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return LogonUpdateRequest.Descriptor; } } public uint ErrorCode { get { return this.errorCode_; } set { this.errorCode_ = value; } } public LogonUpdateRequest() { } public LogonUpdateRequest(LogonUpdateRequest other) : this() { while (true) { IL_3E: uint arg_26_0 = 4233209226u; while (true) { uint num; switch ((num = (arg_26_0 ^ 2416552629u)) % 3u) { case 0u: goto IL_3E; case 1u: this.errorCode_ = other.errorCode_; arg_26_0 = (num * 2786371169u ^ 2210251445u); continue; } return; } } } public LogonUpdateRequest Clone() { return new LogonUpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as LogonUpdateRequest); } public bool Equals(LogonUpdateRequest other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 753742142) % 7) { case 0: goto IL_75; case 1: arg_43_0 = ((this.ErrorCode != other.ErrorCode) ? 86275331 : 862464303); continue; case 2: goto IL_12; case 3: return true; case 5: return false; case 6: return false; } break; } return true; IL_12: arg_43_0 = 148031786; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? 1674377952 : 88515785); goto IL_3E; } public override int GetHashCode() { return 1 ^ this.ErrorCode.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_3F: uint arg_27_0 = 1136781083u; while (true) { uint num; switch ((num = (arg_27_0 ^ 322525344u)) % 3u) { case 1u: output.WriteUInt32(this.ErrorCode); arg_27_0 = (num * 534097979u ^ 3638565549u); continue; case 2u: goto IL_3F; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.ErrorCode)); } public void MergeFrom(LogonUpdateRequest other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 4075795228u)) % 5u) { case 0u: goto IL_2D; case 1u: this.ErrorCode = other.ErrorCode; arg_37_0 = (num * 1021223748u ^ 2410260469u); continue; case 2u: goto IL_63; case 3u: return; } break; } return; IL_2D: arg_37_0 = 2165230882u; goto IL_32; IL_63: arg_37_0 = ((other.ErrorCode != 0u) ? 3996121206u : 3735888349u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_95: uint num; uint arg_62_0 = ((num = input.ReadTag()) == 0u) ? 1399580622u : 989310458u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 377934633u)) % 6u) { case 0u: arg_62_0 = 989310458u; continue; case 2u: input.SkipLastField(); arg_62_0 = (num2 * 2999342772u ^ 1970452062u); continue; case 3u: goto IL_95; case 4u: this.ErrorCode = input.ReadUInt32(); arg_62_0 = 296288718u; continue; case 5u: arg_62_0 = ((num == 8u) ? 483797821u : 641542877u); continue; } return; } } } } } <file_sep>/Google.Protobuf.Reflection/FieldType.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public enum FieldType { Double, Float, Int64, UInt64, Int32, Fixed64, Fixed32, Bool, String, Group, Message, Bytes, UInt32, SFixed32, SFixed64, SInt32, SInt64, Enum } } <file_sep>/Bgs.Protocol.Account.V1/GetLicensesRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetLicensesRequest : IMessage<GetLicensesRequest>, IEquatable<GetLicensesRequest>, IDeepCloneable<GetLicensesRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetLicensesRequest.__c __9 = new GetLicensesRequest.__c(); internal GetLicensesRequest cctor>b__49_0() { return new GetLicensesRequest(); } } private static readonly MessageParser<GetLicensesRequest> _parser = new MessageParser<GetLicensesRequest>(new Func<GetLicensesRequest>(GetLicensesRequest.__c.__9.<.cctor>b__49_0)); public const int TargetIdFieldNumber = 1; private EntityId targetId_; public const int FetchAccountLicensesFieldNumber = 2; private bool fetchAccountLicenses_; public const int FetchGameAccountLicensesFieldNumber = 3; private bool fetchGameAccountLicenses_; public const int FetchDynamicAccountLicensesFieldNumber = 4; private bool fetchDynamicAccountLicenses_; public const int ProgramFieldNumber = 5; private uint program_; public const int ExcludeUnknownProgramFieldNumber = 6; private bool excludeUnknownProgram_; public static MessageParser<GetLicensesRequest> Parser { get { return GetLicensesRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[17]; } } MessageDescriptor IMessage.Descriptor { get { return GetLicensesRequest.Descriptor; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public bool FetchAccountLicenses { get { return this.fetchAccountLicenses_; } set { this.fetchAccountLicenses_ = value; } } public bool FetchGameAccountLicenses { get { return this.fetchGameAccountLicenses_; } set { this.fetchGameAccountLicenses_ = value; } } public bool FetchDynamicAccountLicenses { get { return this.fetchDynamicAccountLicenses_; } set { this.fetchDynamicAccountLicenses_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public bool ExcludeUnknownProgram { get { return this.excludeUnknownProgram_; } set { this.excludeUnknownProgram_ = value; } } public GetLicensesRequest() { } public GetLicensesRequest(GetLicensesRequest other) : this() { this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.fetchAccountLicenses_ = other.fetchAccountLicenses_; this.fetchGameAccountLicenses_ = other.fetchGameAccountLicenses_; this.fetchDynamicAccountLicenses_ = other.fetchDynamicAccountLicenses_; this.program_ = other.program_; this.excludeUnknownProgram_ = other.excludeUnknownProgram_; } public GetLicensesRequest Clone() { return new GetLicensesRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetLicensesRequest); } public bool Equals(GetLicensesRequest other) { if (other == null) { goto IL_18; } goto IL_178; int arg_11A_0; while (true) { IL_115: switch ((arg_11A_0 ^ 1634938800) % 17) { case 0: goto IL_178; case 1: return false; case 2: return false; case 3: arg_11A_0 = ((this.ExcludeUnknownProgram != other.ExcludeUnknownProgram) ? 1988959255 : 645541320); continue; case 4: arg_11A_0 = ((this.FetchAccountLicenses == other.FetchAccountLicenses) ? 1909608254 : 614951453); continue; case 5: return false; case 6: arg_11A_0 = ((this.FetchDynamicAccountLicenses == other.FetchDynamicAccountLicenses) ? 1817957003 : 2018019609); continue; case 7: arg_11A_0 = ((this.FetchGameAccountLicenses == other.FetchGameAccountLicenses) ? 1634409685 : 721753335); continue; case 8: arg_11A_0 = ((this.Program != other.Program) ? 1412998296 : 184555650); continue; case 9: arg_11A_0 = ((!GetLicensesRequest.smethod_0(this.TargetId, other.TargetId)) ? 90119017 : 395409961); continue; case 10: goto IL_18; case 11: return false; case 12: return true; case 13: return false; case 14: return false; case 16: return false; } break; } return true; IL_18: arg_11A_0 = 66315895; goto IL_115; IL_178: arg_11A_0 = ((other != this) ? 636483416 : 741646273); goto IL_115; } public override int GetHashCode() { int num = 1; while (true) { IL_1F2: uint arg_1AD_0 = 3812404799u; while (true) { uint num2; switch ((num2 = (arg_1AD_0 ^ 2457905015u)) % 14u) { case 0u: num ^= this.Program.GetHashCode(); arg_1AD_0 = (num2 * 1328469349u ^ 883571346u); continue; case 1u: num ^= this.FetchDynamicAccountLicenses.GetHashCode(); arg_1AD_0 = (num2 * 2730256200u ^ 741429309u); continue; case 2u: arg_1AD_0 = (((this.targetId_ != null) ? 3161885406u : 3877843329u) ^ num2 * 1356340007u); continue; case 3u: num ^= GetLicensesRequest.smethod_1(this.TargetId); arg_1AD_0 = (num2 * 2615055118u ^ 3701858071u); continue; case 4u: num ^= this.ExcludeUnknownProgram.GetHashCode(); arg_1AD_0 = (num2 * 2386606221u ^ 1223795827u); continue; case 5u: num ^= this.FetchAccountLicenses.GetHashCode(); arg_1AD_0 = (num2 * 122463881u ^ 750198965u); continue; case 7u: num ^= this.FetchGameAccountLicenses.GetHashCode(); arg_1AD_0 = (num2 * 2390326107u ^ 2505749968u); continue; case 8u: arg_1AD_0 = (this.FetchAccountLicenses ? 3130127592u : 4110809762u); continue; case 9u: arg_1AD_0 = ((!this.FetchGameAccountLicenses) ? 3729574285u : 3953716176u); continue; case 10u: arg_1AD_0 = ((this.Program != 0u) ? 2413107357u : 2837730240u); continue; case 11u: goto IL_1F2; case 12u: arg_1AD_0 = ((!this.FetchDynamicAccountLicenses) ? 3202820901u : 4065459484u); continue; case 13u: arg_1AD_0 = (this.ExcludeUnknownProgram ? 2428025037u : 3804663041u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.targetId_ != null) { goto IL_DE; } goto IL_224; uint arg_1C8_0; while (true) { IL_1C3: uint num; switch ((num = (arg_1C8_0 ^ 459029054u)) % 16u) { case 0u: output.WriteRawTag(48); arg_1C8_0 = (num * 1496251010u ^ 1865155090u); continue; case 1u: output.WriteRawTag(10); arg_1C8_0 = (num * 3042465422u ^ 440095643u); continue; case 3u: arg_1C8_0 = ((!this.FetchGameAccountLicenses) ? 1802285738u : 1288596355u); continue; case 4u: arg_1C8_0 = (this.FetchDynamicAccountLicenses ? 844097032u : 295302201u); continue; case 5u: goto IL_224; case 6u: output.WriteRawTag(32); output.WriteBool(this.FetchDynamicAccountLicenses); arg_1C8_0 = (num * 353757068u ^ 4050047921u); continue; case 7u: arg_1C8_0 = ((this.Program != 0u) ? 100206422u : 218930401u); continue; case 8u: output.WriteRawTag(45); output.WriteFixed32(this.Program); arg_1C8_0 = (num * 615577166u ^ 4225120593u); continue; case 9u: goto IL_DE; case 10u: output.WriteRawTag(16); arg_1C8_0 = (num * 1525529708u ^ 1345113080u); continue; case 11u: output.WriteMessage(this.TargetId); arg_1C8_0 = (num * 1097024544u ^ 2781391803u); continue; case 12u: output.WriteBool(this.ExcludeUnknownProgram); arg_1C8_0 = (num * 2690889106u ^ 1082359972u); continue; case 13u: output.WriteRawTag(24); output.WriteBool(this.FetchGameAccountLicenses); arg_1C8_0 = (num * 866856587u ^ 2081285429u); continue; case 14u: output.WriteBool(this.FetchAccountLicenses); arg_1C8_0 = (num * 2439745219u ^ 3123695591u); continue; case 15u: arg_1C8_0 = (this.ExcludeUnknownProgram ? 1669995774u : 1344501948u); continue; } break; } return; IL_DE: arg_1C8_0 = 2028054015u; goto IL_1C3; IL_224: arg_1C8_0 = (this.FetchAccountLicenses ? 829587972u : 1833785437u); goto IL_1C3; } public int CalculateSize() { int num = 0; while (true) { IL_1AD: uint arg_168_0 = 1044554235u; while (true) { uint num2; switch ((num2 = (arg_168_0 ^ 1984616261u)) % 14u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_168_0 = (num2 * 3337958475u ^ 2770400893u); continue; case 1u: num += 5; arg_168_0 = (num2 * 2066090613u ^ 559105124u); continue; case 2u: arg_168_0 = (this.ExcludeUnknownProgram ? 1228168912u : 1612166766u); continue; case 3u: num += 2; arg_168_0 = (num2 * 2376897924u ^ 3653144054u); continue; case 4u: goto IL_1AD; case 5u: num += 2; arg_168_0 = (num2 * 4253883115u ^ 3052735705u); continue; case 6u: num += 2; arg_168_0 = (num2 * 2550035644u ^ 3990374415u); continue; case 7u: arg_168_0 = (this.FetchGameAccountLicenses ? 1756291628u : 223067578u); continue; case 8u: arg_168_0 = (((this.targetId_ == null) ? 459119181u : 1957359793u) ^ num2 * 3936674969u); continue; case 10u: arg_168_0 = ((this.Program != 0u) ? 1348909604u : 615154481u); continue; case 11u: num += 2; arg_168_0 = (num2 * 782539393u ^ 1726824571u); continue; case 12u: arg_168_0 = (this.FetchAccountLicenses ? 1922098680u : 1773709186u); continue; case 13u: arg_168_0 = ((!this.FetchDynamicAccountLicenses) ? 218157783u : 2074141807u); continue; } return num; } } return num; } public void MergeFrom(GetLicensesRequest other) { if (other == null) { goto IL_184; } goto IL_224; uint arg_1C4_0; while (true) { IL_1BF: uint num; switch ((num = (arg_1C4_0 ^ 3432304045u)) % 17u) { case 0u: this.FetchAccountLicenses = other.FetchAccountLicenses; arg_1C4_0 = (num * 2888740375u ^ 491835904u); continue; case 1u: this.Program = other.Program; arg_1C4_0 = (num * 3651235179u ^ 1762253361u); continue; case 2u: goto IL_184; case 3u: arg_1C4_0 = ((!other.FetchDynamicAccountLicenses) ? 3947526731u : 3997248950u); continue; case 4u: this.FetchGameAccountLicenses = other.FetchGameAccountLicenses; arg_1C4_0 = (num * 4059091531u ^ 2459262670u); continue; case 5u: this.FetchDynamicAccountLicenses = other.FetchDynamicAccountLicenses; arg_1C4_0 = (num * 1934285537u ^ 1288998896u); continue; case 6u: goto IL_224; case 7u: arg_1C4_0 = (other.ExcludeUnknownProgram ? 2799962412u : 4200578116u); continue; case 9u: return; case 10u: this.targetId_ = new EntityId(); arg_1C4_0 = (num * 1588993469u ^ 1345271249u); continue; case 11u: arg_1C4_0 = ((other.Program == 0u) ? 2910871700u : 3146523010u); continue; case 12u: arg_1C4_0 = (((this.targetId_ == null) ? 1547184944u : 1838636888u) ^ num * 1627482345u); continue; case 13u: this.TargetId.MergeFrom(other.TargetId); arg_1C4_0 = 2716812973u; continue; case 14u: arg_1C4_0 = (other.FetchAccountLicenses ? 4270335551u : 2309141534u); continue; case 15u: arg_1C4_0 = (other.FetchGameAccountLicenses ? 2220822498u : 2427708907u); continue; case 16u: this.ExcludeUnknownProgram = other.ExcludeUnknownProgram; arg_1C4_0 = (num * 3807555738u ^ 3367983582u); continue; } break; } return; IL_184: arg_1C4_0 = 3683549381u; goto IL_1BF; IL_224: arg_1C4_0 = ((other.targetId_ != null) ? 3479717451u : 2716812973u); goto IL_1BF; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2E1: uint num; uint arg_261_0 = ((num = input.ReadTag()) == 0u) ? 2074549775u : 1748539018u; while (true) { uint num2; switch ((num2 = (arg_261_0 ^ 1787905598u)) % 25u) { case 0u: arg_261_0 = (((num == 45u) ? 3444103044u : 4171305269u) ^ num2 * 2153779732u); continue; case 1u: arg_261_0 = (num2 * 1181505676u ^ 1112510807u); continue; case 2u: arg_261_0 = (num2 * 37888102u ^ 3341244039u); continue; case 3u: arg_261_0 = (((num == 10u) ? 4253111375u : 2885227160u) ^ num2 * 1168468816u); continue; case 4u: arg_261_0 = (num2 * 1135134428u ^ 387240919u); continue; case 5u: arg_261_0 = (num2 * 1529240705u ^ 322606858u); continue; case 6u: this.Program = input.ReadFixed32(); arg_261_0 = 1402020928u; continue; case 7u: this.FetchAccountLicenses = input.ReadBool(); arg_261_0 = 225885631u; continue; case 8u: arg_261_0 = (((num != 16u) ? 976059913u : 1343233416u) ^ num2 * 310534278u); continue; case 9u: arg_261_0 = 1748539018u; continue; case 10u: this.targetId_ = new EntityId(); arg_261_0 = (num2 * 201434159u ^ 86127576u); continue; case 11u: this.FetchDynamicAccountLicenses = input.ReadBool(); arg_261_0 = 905158408u; continue; case 12u: arg_261_0 = ((this.targetId_ != null) ? 856543824u : 1898588870u); continue; case 13u: input.ReadMessage(this.targetId_); arg_261_0 = 888701203u; continue; case 14u: this.ExcludeUnknownProgram = input.ReadBool(); arg_261_0 = 225885631u; continue; case 15u: arg_261_0 = (num2 * 1980238207u ^ 3188560082u); continue; case 16u: this.FetchGameAccountLicenses = input.ReadBool(); arg_261_0 = 1556750794u; continue; case 17u: arg_261_0 = ((num == 32u) ? 2092421456u : 668075455u); continue; case 19u: arg_261_0 = ((num <= 24u) ? 734382658u : 341695910u); continue; case 20u: input.SkipLastField(); arg_261_0 = 1610105355u; continue; case 21u: arg_261_0 = (((num != 24u) ? 1431043742u : 1050345064u) ^ num2 * 1904115291u); continue; case 22u: arg_261_0 = (((num == 48u) ? 1666471845u : 776804383u) ^ num2 * 2153898030u); continue; case 23u: arg_261_0 = (num2 * 4037724462u ^ 1966121641u); continue; case 24u: goto IL_2E1; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountLicense.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountLicense : IMessage<AccountLicense>, IEquatable<AccountLicense>, IDeepCloneable<AccountLicense>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountLicense.__c __9 = new AccountLicense.__c(); internal AccountLicense cctor>b__29_0() { return new AccountLicense(); } } private static readonly MessageParser<AccountLicense> _parser = new MessageParser<AccountLicense>(new Func<AccountLicense>(AccountLicense.__c.__9.<.cctor>b__29_0)); public const int IdFieldNumber = 1; private uint id_; public const int ExpiresFieldNumber = 2; private ulong expires_; public static MessageParser<AccountLicense> Parser { get { return AccountLicense._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return AccountLicense.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public ulong Expires { get { return this.expires_; } set { this.expires_ = value; } } public AccountLicense() { } public AccountLicense(AccountLicense other) : this() { this.id_ = other.id_; this.expires_ = other.expires_; } public AccountLicense Clone() { return new AccountLicense(this); } public override bool Equals(object other) { return this.Equals(other as AccountLicense); } public bool Equals(AccountLicense other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -1180756443) % 9) { case 0: return false; case 1: arg_6D_0 = ((this.Id != other.Id) ? -1864786606 : -484805815); continue; case 2: return false; case 3: arg_6D_0 = ((this.Expires == other.Expires) ? -753025849 : -1975680182); continue; case 4: goto IL_AB; case 6: goto IL_15; case 7: return false; case 8: return true; } break; } return true; IL_15: arg_6D_0 = -290181201; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? -500829014 : -726770842); goto IL_68; } public override int GetHashCode() { int num = 1; while (true) { IL_7D: uint arg_61_0 = 2558093402u; while (true) { uint num2; switch ((num2 = (arg_61_0 ^ 2776248913u)) % 4u) { case 0u: goto IL_7D; case 2u: num ^= this.Expires.GetHashCode(); arg_61_0 = (num2 * 1600149917u ^ 1133180214u); continue; case 3u: num ^= this.Id.GetHashCode(); arg_61_0 = (((this.Expires != 0uL) ? 239484435u : 1415933660u) ^ num2 * 3937902156u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); output.WriteUInt32(this.Id); if (this.Expires != 0uL) { while (true) { IL_6E: uint arg_52_0 = 3372202503u; while (true) { uint num; switch ((num = (arg_52_0 ^ 3740367770u)) % 4u) { case 1u: output.WriteRawTag(16); arg_52_0 = (num * 1821424267u ^ 1607142198u); continue; case 2u: goto IL_6E; case 3u: output.WriteUInt64(this.Expires); arg_52_0 = (num * 2070367988u ^ 3841396834u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.Id)); while (true) { IL_7B: uint arg_5F_0 = 2920853647u; while (true) { uint num2; switch ((num2 = (arg_5F_0 ^ 2501156964u)) % 4u) { case 0u: goto IL_7B; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Expires); arg_5F_0 = (num2 * 982290601u ^ 2847063387u); continue; case 3u: arg_5F_0 = (((this.Expires != 0uL) ? 1949247706u : 1371498421u) ^ num2 * 3515010004u); continue; } return num; } } return num; } public void MergeFrom(AccountLicense other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 2219899486u)) % 7u) { case 0u: goto IL_6C; case 1u: this.Expires = other.Expires; arg_76_0 = (num * 670358187u ^ 3938767684u); continue; case 2u: goto IL_AD; case 3u: return; case 5u: arg_76_0 = ((other.Expires != 0uL) ? 2342656272u : 4024603230u); continue; case 6u: this.Id = other.Id; arg_76_0 = (num * 786352966u ^ 1053542874u); continue; } break; } return; IL_6C: arg_76_0 = 2299733868u; goto IL_71; IL_AD: arg_76_0 = ((other.Id != 0u) ? 3373464260u : 2530836934u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_D9: uint num; uint arg_9E_0 = ((num = input.ReadTag()) == 0u) ? 1860555628u : 1161473552u; while (true) { uint num2; switch ((num2 = (arg_9E_0 ^ 1270590758u)) % 8u) { case 0u: arg_9E_0 = (((num == 16u) ? 3297148547u : 2943091829u) ^ num2 * 2411161889u); continue; case 1u: goto IL_D9; case 3u: input.SkipLastField(); arg_9E_0 = (num2 * 1274975282u ^ 2772229321u); continue; case 4u: this.Id = input.ReadUInt32(); arg_9E_0 = 295517727u; continue; case 5u: this.Expires = input.ReadUInt64(); arg_9E_0 = 295517727u; continue; case 6u: arg_9E_0 = ((num != 8u) ? 519714390u : 1934378770u); continue; case 7u: arg_9E_0 = 1161473552u; continue; } return; } } } } } <file_sep>/Bgs.Protocol.Friends.V1/Friend.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class Friend : IMessage<Friend>, IEquatable<Friend>, IDeepCloneable<Friend>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Friend.__c __9 = new Friend.__c(); internal Friend cctor>b__54_0() { return new Friend(); } } private static readonly MessageParser<Friend> _parser = new MessageParser<Friend>(new Func<Friend>(Friend.__c.__9.<.cctor>b__54_0)); public const int AccountIdFieldNumber = 1; private EntityId accountId_; public const int AttributeFieldNumber = 2; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int RoleFieldNumber = 3; private static readonly FieldCodec<uint> _repeated_role_codec; private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public const int PrivilegesFieldNumber = 4; private ulong privileges_; public const int AttributesEpochFieldNumber = 5; private ulong attributesEpoch_; public const int FullNameFieldNumber = 6; private string fullName_ = ""; public const int BattleTagFieldNumber = 7; private string battleTag_ = ""; public static MessageParser<Friend> Parser { get { return Friend._parser; } } public static MessageDescriptor Descriptor { get { return FriendsTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Friend.Descriptor; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public RepeatedField<uint> Role { get { return this.role_; } } public ulong Privileges { get { return this.privileges_; } set { this.privileges_ = value; } } public ulong AttributesEpoch { get { return this.attributesEpoch_; } set { this.attributesEpoch_ = value; } } public string FullName { get { return this.fullName_; } set { this.fullName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public Friend() { } public Friend(Friend other) : this() { while (true) { IL_C8: uint arg_A4_0 = 2432262734u; while (true) { uint num; switch ((num = (arg_A4_0 ^ 2235398958u)) % 6u) { case 0u: goto IL_C8; case 2u: this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); this.attribute_ = other.attribute_.Clone(); arg_A4_0 = 3309738956u; continue; case 3u: this.attributesEpoch_ = other.attributesEpoch_; arg_A4_0 = (num * 4154278684u ^ 3447661709u); continue; case 4u: this.role_ = other.role_.Clone(); this.privileges_ = other.privileges_; arg_A4_0 = (num * 1427615383u ^ 3775941955u); continue; case 5u: this.fullName_ = other.fullName_; arg_A4_0 = (num * 380829200u ^ 3477693313u); continue; } goto Block_2; } } Block_2: this.battleTag_ = other.battleTag_; } public Friend Clone() { return new Friend(this); } public override bool Equals(object other) { return this.Equals(other as Friend); } public bool Equals(Friend other) { if (other == null) { goto IL_151; } goto IL_1C1; int arg_15B_0; while (true) { IL_156: switch ((arg_15B_0 ^ 1549770097) % 19) { case 0: goto IL_151; case 1: arg_15B_0 = ((!Friend.smethod_0(this.AccountId, other.AccountId)) ? 725939771 : 220292978); continue; case 2: arg_15B_0 = ((!Friend.smethod_1(this.BattleTag, other.BattleTag)) ? 1378127231 : 1780819106); continue; case 3: arg_15B_0 = ((this.AttributesEpoch == other.AttributesEpoch) ? 539301933 : 324136302); continue; case 4: return true; case 5: return false; case 6: arg_15B_0 = ((this.Privileges != other.Privileges) ? 448880595 : 2026573051); continue; case 7: goto IL_1C1; case 8: return false; case 9: return false; case 10: return false; case 11: arg_15B_0 = (this.attribute_.Equals(other.attribute_) ? 59107559 : 1930528043); continue; case 12: arg_15B_0 = ((!Friend.smethod_1(this.FullName, other.FullName)) ? 1372783714 : 1622320884); continue; case 13: arg_15B_0 = (this.role_.Equals(other.role_) ? 1502449765 : 753099803); continue; case 14: return false; case 15: return false; case 17: return false; case 18: return false; } break; } return true; IL_151: arg_15B_0 = 274764584; goto IL_156; IL_1C1: arg_15B_0 = ((other == this) ? 601252364 : 1862048144); goto IL_156; } public override int GetHashCode() { int num = 1; while (true) { IL_1D6: uint arg_195_0 = 2210699668u; while (true) { uint num2; switch ((num2 = (arg_195_0 ^ 3728171441u)) % 13u) { case 0u: num ^= Friend.smethod_2(this.AccountId); arg_195_0 = (num2 * 2214133160u ^ 3869003380u); continue; case 1u: num ^= this.BattleTag.GetHashCode(); arg_195_0 = (num2 * 1740375450u ^ 1642533829u); continue; case 2u: goto IL_1D6; case 3u: arg_195_0 = ((this.FullName.Length == 0) ? 4081570299u : 3438191549u); continue; case 4u: num ^= Friend.smethod_2(this.attribute_); arg_195_0 = 3215736576u; continue; case 5u: num ^= this.Privileges.GetHashCode(); arg_195_0 = (num2 * 829384397u ^ 256114110u); continue; case 7u: num ^= this.AttributesEpoch.GetHashCode(); arg_195_0 = (num2 * 447210149u ^ 605136229u); continue; case 8u: arg_195_0 = ((this.AttributesEpoch == 0uL) ? 3142695914u : 2187107218u); continue; case 9u: num ^= this.FullName.GetHashCode(); arg_195_0 = (num2 * 1644790112u ^ 3315270011u); continue; case 10u: arg_195_0 = (((this.accountId_ != null) ? 3334017200u : 4049205731u) ^ num2 * 167888283u); continue; case 11u: arg_195_0 = ((this.BattleTag.Length == 0) ? 4174337565u : 2924955437u); continue; case 12u: num ^= Friend.smethod_2(this.role_); arg_195_0 = (((this.Privileges != 0uL) ? 294360960u : 1028300959u) ^ num2 * 1598529525u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountId_ != null) { goto IL_45; } goto IL_1C1; uint arg_180_0; while (true) { IL_17B: uint num; switch ((num = (arg_180_0 ^ 3138894497u)) % 13u) { case 0u: arg_180_0 = ((this.AttributesEpoch == 0uL) ? 2368424702u : 2196702652u); continue; case 1u: output.WriteRawTag(40); output.WriteUInt64(this.AttributesEpoch); arg_180_0 = (num * 324375418u ^ 2630021164u); continue; case 2u: output.WriteRawTag(58); output.WriteString(this.BattleTag); arg_180_0 = (num * 833634132u ^ 1223623800u); continue; case 3u: arg_180_0 = ((Friend.smethod_3(this.BattleTag) == 0) ? 4017108660u : 2271939782u); continue; case 4u: output.WriteRawTag(50); output.WriteString(this.FullName); arg_180_0 = (num * 4111655209u ^ 4099741047u); continue; case 5u: arg_180_0 = (((this.Privileges == 0uL) ? 3260057427u : 4060699509u) ^ num * 3721177741u); continue; case 6u: arg_180_0 = ((Friend.smethod_3(this.FullName) == 0) ? 2520775567u : 2205435033u); continue; case 7u: goto IL_1C1; case 8u: output.WriteRawTag(32); output.WriteUInt64(this.Privileges); arg_180_0 = (num * 2704745202u ^ 2701962581u); continue; case 9u: goto IL_45; case 11u: output.WriteRawTag(10); arg_180_0 = (num * 3659479586u ^ 313327519u); continue; case 12u: output.WriteMessage(this.AccountId); arg_180_0 = (num * 2494476165u ^ 451315935u); continue; } break; } return; IL_45: arg_180_0 = 3864575671u; goto IL_17B; IL_1C1: this.attribute_.WriteTo(output, Friend._repeated_attribute_codec); this.role_.WriteTo(output, Friend._repeated_role_codec); arg_180_0 = 4116808259u; goto IL_17B; } public int CalculateSize() { int num = 0; if (this.accountId_ != null) { goto IL_A3; } goto IL_1AF; uint arg_172_0; while (true) { IL_16D: uint num2; switch ((num2 = (arg_172_0 ^ 57745913u)) % 12u) { case 0u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.AttributesEpoch); arg_172_0 = (num2 * 1411810589u ^ 2076976575u); continue; case 1u: num += this.role_.CalculateSize(Friend._repeated_role_codec); arg_172_0 = (((this.Privileges == 0uL) ? 3007110649u : 2606868834u) ^ num2 * 3991515977u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Privileges); arg_172_0 = (num2 * 3403702149u ^ 4258985194u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.FullName); arg_172_0 = (num2 * 1426253885u ^ 1815357931u); continue; case 5u: arg_172_0 = ((Friend.smethod_3(this.BattleTag) == 0) ? 1321343393u : 160083657u); continue; case 6u: goto IL_A3; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_172_0 = (num2 * 2458239196u ^ 904290378u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_172_0 = (num2 * 1472970601u ^ 1120965393u); continue; case 9u: arg_172_0 = ((this.AttributesEpoch == 0uL) ? 825230655u : 930356089u); continue; case 10u: arg_172_0 = ((Friend.smethod_3(this.FullName) == 0) ? 1414455108u : 1075362978u); continue; case 11u: goto IL_1AF; } break; } return num; IL_A3: arg_172_0 = 1239185470u; goto IL_16D; IL_1AF: num += this.attribute_.CalculateSize(Friend._repeated_attribute_codec); arg_172_0 = 1704934052u; goto IL_16D; } public void MergeFrom(Friend other) { if (other == null) { goto IL_18; } goto IL_21F; uint arg_1C3_0; while (true) { IL_1BE: uint num; switch ((num = (arg_1C3_0 ^ 3763732900u)) % 16u) { case 0u: this.role_.Add(other.role_); arg_1C3_0 = (((other.Privileges == 0uL) ? 172192495u : 728676158u) ^ num * 1904068569u); continue; case 1u: this.AccountId.MergeFrom(other.AccountId); arg_1C3_0 = 4144190001u; continue; case 2u: arg_1C3_0 = ((Friend.smethod_3(other.FullName) == 0) ? 3103044649u : 4121392610u); continue; case 3u: this.accountId_ = new EntityId(); arg_1C3_0 = (num * 454764248u ^ 2517073613u); continue; case 4u: this.AttributesEpoch = other.AttributesEpoch; arg_1C3_0 = (num * 4223374412u ^ 2950116182u); continue; case 5u: this.attribute_.Add(other.attribute_); arg_1C3_0 = 2250884228u; continue; case 6u: this.FullName = other.FullName; arg_1C3_0 = (num * 2466159304u ^ 385631897u); continue; case 7u: goto IL_21F; case 8u: this.BattleTag = other.BattleTag; arg_1C3_0 = (num * 1386754993u ^ 1341995360u); continue; case 9u: arg_1C3_0 = (((this.accountId_ != null) ? 652236322u : 329186608u) ^ num * 3218983727u); continue; case 10u: this.Privileges = other.Privileges; arg_1C3_0 = (num * 2635814404u ^ 926891047u); continue; case 11u: arg_1C3_0 = ((other.AttributesEpoch != 0uL) ? 4057481008u : 3948089510u); continue; case 13u: arg_1C3_0 = ((Friend.smethod_3(other.BattleTag) != 0) ? 3002938300u : 2632274936u); continue; case 14u: goto IL_18; case 15u: return; } break; } return; IL_18: arg_1C3_0 = 3783446267u; goto IL_1BE; IL_21F: arg_1C3_0 = ((other.accountId_ == null) ? 4144190001u : 4089320813u); goto IL_1BE; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3EB: uint num; uint arg_34B_0 = ((num = input.ReadTag()) == 0u) ? 1845246190u : 682939485u; while (true) { uint num2; switch ((num2 = (arg_34B_0 ^ 208401894u)) % 33u) { case 0u: arg_34B_0 = ((this.accountId_ != null) ? 1132576893u : 801463679u); continue; case 1u: this.role_.AddEntriesFrom(input, Friend._repeated_role_codec); arg_34B_0 = 227447178u; continue; case 2u: this.BattleTag = input.ReadString(); arg_34B_0 = 1751879905u; continue; case 3u: arg_34B_0 = (num2 * 1455380807u ^ 761789557u); continue; case 4u: arg_34B_0 = (((num == 18u) ? 1604747343u : 682555123u) ^ num2 * 3779944117u); continue; case 5u: arg_34B_0 = (((num <= 18u) ? 3563978001u : 2927426049u) ^ num2 * 424251529u); continue; case 6u: arg_34B_0 = (num2 * 1159334148u ^ 2840773360u); continue; case 7u: goto IL_3EB; case 8u: arg_34B_0 = ((num != 50u) ? 17081445u : 1295604132u); continue; case 9u: arg_34B_0 = 682939485u; continue; case 10u: this.AttributesEpoch = input.ReadUInt64(); arg_34B_0 = 1608748330u; continue; case 11u: this.accountId_ = new EntityId(); arg_34B_0 = (num2 * 821861122u ^ 3985388623u); continue; case 12u: arg_34B_0 = (num2 * 47159646u ^ 1880675663u); continue; case 13u: arg_34B_0 = (num2 * 4251598270u ^ 1589574159u); continue; case 15u: arg_34B_0 = (((num == 26u) ? 137193694u : 81672562u) ^ num2 * 2543774026u); continue; case 16u: arg_34B_0 = (num2 * 1389254603u ^ 243524046u); continue; case 17u: arg_34B_0 = (num2 * 1595350214u ^ 3119257658u); continue; case 18u: arg_34B_0 = ((num != 24u) ? 982741321u : 968280392u); continue; case 19u: arg_34B_0 = (((num != 40u) ? 3347985305u : 3713837398u) ^ num2 * 2226417492u); continue; case 20u: arg_34B_0 = ((num <= 26u) ? 936555487u : 826476304u); continue; case 21u: arg_34B_0 = (num2 * 315728963u ^ 1877076133u); continue; case 22u: this.Privileges = input.ReadUInt64(); arg_34B_0 = 601325724u; continue; case 23u: arg_34B_0 = (num2 * 51103805u ^ 360926443u); continue; case 24u: arg_34B_0 = (num2 * 3454118937u ^ 1390731275u); continue; case 25u: arg_34B_0 = (((num != 32u) ? 4153661665u : 3511396056u) ^ num2 * 4060141446u); continue; case 26u: input.SkipLastField(); arg_34B_0 = 148722623u; continue; case 27u: arg_34B_0 = (((num == 10u) ? 454047650u : 798804493u) ^ num2 * 1621405964u); continue; case 28u: this.FullName = input.ReadString(); arg_34B_0 = 1751879905u; continue; case 29u: this.attribute_.AddEntriesFrom(input, Friend._repeated_attribute_codec); arg_34B_0 = 725057935u; continue; case 30u: arg_34B_0 = (((num == 58u) ? 3651830611u : 3086656321u) ^ num2 * 1878799667u); continue; case 31u: arg_34B_0 = ((num > 40u) ? 1587532822u : 1656800813u); continue; case 32u: input.ReadMessage(this.accountId_); arg_34B_0 = 1279481652u; continue; } return; } } } static Friend() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_76: uint arg_5A_0 = 3763193023u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 2882862508u)) % 4u) { case 0u: goto IL_76; case 2u: Friend._repeated_role_codec = FieldCodec.ForUInt32(26u); arg_5A_0 = (num * 3603598278u ^ 3726229073u); continue; case 3u: Friend._repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(18u, Bgs.Protocol.Attribute.Parser); arg_5A_0 = (num * 906386255u ^ 2717449295u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Friends.V1/FriendNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class FriendNotification : IMessage<FriendNotification>, IEquatable<FriendNotification>, IDeepCloneable<FriendNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FriendNotification.__c __9 = new FriendNotification.__c(); internal FriendNotification cctor>b__39_0() { return new FriendNotification(); } } private static readonly MessageParser<FriendNotification> _parser = new MessageParser<FriendNotification>(new Func<FriendNotification>(FriendNotification.__c.__9.<.cctor>b__39_0)); public const int TargetFieldNumber = 1; private Friend target_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int PeerFieldNumber = 4; private ProcessId peer_; public const int AccountIdFieldNumber = 5; private EntityId accountId_; public static MessageParser<FriendNotification> Parser { get { return FriendNotification._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return FriendNotification.Descriptor; } } public Friend Target { get { return this.target_; } set { this.target_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public ProcessId Peer { get { return this.peer_; } set { this.peer_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public FriendNotification() { } public FriendNotification(FriendNotification other) : this() { while (true) { IL_87: int arg_6D_0 = -1189893890; while (true) { switch ((arg_6D_0 ^ -1450849592) % 4) { case 1: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.Peer = ((other.peer_ != null) ? other.Peer.Clone() : null); arg_6D_0 = -1270553572; continue; case 2: this.Target = ((other.target_ != null) ? other.Target.Clone() : null); arg_6D_0 = -275890399; continue; case 3: goto IL_87; } goto Block_4; } } Block_4: this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); } public FriendNotification Clone() { return new FriendNotification(this); } public override bool Equals(object other) { return this.Equals(other as FriendNotification); } public bool Equals(FriendNotification other) { if (other == null) { goto IL_47; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ 204720826) % 13) { case 0: arg_D8_0 = ((!FriendNotification.smethod_0(this.Target, other.Target)) ? 1612218500 : 1408068689); continue; case 1: arg_D8_0 = (FriendNotification.smethod_0(this.AccountId, other.AccountId) ? 538682760 : 1264114879); continue; case 2: goto IL_126; case 3: return false; case 5: return false; case 6: return true; case 7: arg_D8_0 = (FriendNotification.smethod_0(this.GameAccountId, other.GameAccountId) ? 1211580391 : 1389786251); continue; case 8: goto IL_47; case 9: return false; case 10: return false; case 11: return false; case 12: arg_D8_0 = ((!FriendNotification.smethod_0(this.Peer, other.Peer)) ? 50740884 : 371185108); continue; } break; } return true; IL_47: arg_D8_0 = 114617611; goto IL_D3; IL_126: arg_D8_0 = ((other == this) ? 1998739350 : 1068160860); goto IL_D3; } public override int GetHashCode() { int num = 1; while (true) { IL_10C: uint arg_E0_0 = 2210318860u; while (true) { uint num2; switch ((num2 = (arg_E0_0 ^ 4120494901u)) % 8u) { case 0u: goto IL_10C; case 1u: num ^= FriendNotification.smethod_1(this.Target); arg_E0_0 = (((this.gameAccountId_ == null) ? 192820963u : 391600503u) ^ num2 * 3495619437u); continue; case 2u: num ^= FriendNotification.smethod_1(this.AccountId); arg_E0_0 = (num2 * 1076127531u ^ 1986842142u); continue; case 3u: arg_E0_0 = ((this.peer_ == null) ? 3405830961u : 2492742955u); continue; case 4u: arg_E0_0 = ((this.accountId_ == null) ? 3133689704u : 2674149975u); continue; case 6u: num ^= FriendNotification.smethod_1(this.Peer); arg_E0_0 = (num2 * 3168177456u ^ 2544562321u); continue; case 7u: num ^= FriendNotification.smethod_1(this.GameAccountId); arg_E0_0 = (num2 * 1216118163u ^ 341765027u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Target); while (true) { IL_136: uint arg_105_0 = 1100977615u; while (true) { uint num; switch ((num = (arg_105_0 ^ 1803390469u)) % 9u) { case 0u: arg_105_0 = ((this.accountId_ != null) ? 384239093u : 1353665125u); continue; case 1u: output.WriteRawTag(42); arg_105_0 = (num * 2782614605u ^ 2281173428u); continue; case 2u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_105_0 = (num * 1227322916u ^ 635336395u); continue; case 3u: output.WriteMessage(this.AccountId); arg_105_0 = (num * 2381807740u ^ 129389593u); continue; case 4u: goto IL_136; case 5u: output.WriteRawTag(34); output.WriteMessage(this.Peer); arg_105_0 = (num * 3960662804u ^ 799930978u); continue; case 7u: arg_105_0 = ((this.peer_ == null) ? 912104290u : 707245381u); continue; case 8u: arg_105_0 = (((this.gameAccountId_ == null) ? 1428442305u : 380087574u) ^ num * 962436547u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_128: uint arg_F7_0 = 1846293657u; while (true) { uint num2; switch ((num2 = (arg_F7_0 ^ 429275080u)) % 9u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Peer); arg_F7_0 = (num2 * 2500305463u ^ 1171814668u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_F7_0 = (num2 * 2798440434u ^ 2295742804u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Target); arg_F7_0 = (num2 * 3703043190u ^ 4287279535u); continue; case 4u: arg_F7_0 = ((this.accountId_ == null) ? 2037364691u : 176341165u); continue; case 5u: arg_F7_0 = ((this.peer_ != null) ? 1439407965u : 1144584975u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_F7_0 = (num2 * 3727442426u ^ 1774815857u); continue; case 7u: goto IL_128; case 8u: arg_F7_0 = (((this.gameAccountId_ != null) ? 1777235383u : 510915369u) ^ num2 * 3848273265u); continue; } return num; } } return num; } public void MergeFrom(FriendNotification other) { if (other == null) { goto IL_CF; } goto IL_27D; uint arg_215_0; while (true) { IL_210: uint num; switch ((num = (arg_215_0 ^ 39854597u)) % 19u) { case 0u: this.Peer.MergeFrom(other.Peer); arg_215_0 = 1926237731u; continue; case 1u: this.peer_ = new ProcessId(); arg_215_0 = (num * 566698422u ^ 1091469466u); continue; case 2u: goto IL_27D; case 3u: this.accountId_ = new EntityId(); arg_215_0 = (num * 52561197u ^ 3538500004u); continue; case 4u: this.gameAccountId_ = new EntityId(); arg_215_0 = (num * 2550592252u ^ 1643501359u); continue; case 5u: return; case 6u: arg_215_0 = ((other.gameAccountId_ != null) ? 1662794178u : 1373946436u); continue; case 7u: this.AccountId.MergeFrom(other.AccountId); arg_215_0 = 1083214556u; continue; case 8u: arg_215_0 = ((other.accountId_ == null) ? 1083214556u : 2002928149u); continue; case 10u: arg_215_0 = (((this.target_ != null) ? 1506996376u : 1980417826u) ^ num * 3842904461u); continue; case 11u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_215_0 = 1373946436u; continue; case 12u: arg_215_0 = (((this.gameAccountId_ != null) ? 2693600057u : 2373255114u) ^ num * 3770391286u); continue; case 13u: goto IL_CF; case 14u: arg_215_0 = (((this.peer_ != null) ? 1116783111u : 1920937857u) ^ num * 1630107839u); continue; case 15u: this.Target.MergeFrom(other.Target); arg_215_0 = 755464344u; continue; case 16u: arg_215_0 = ((other.peer_ == null) ? 1926237731u : 24495604u); continue; case 17u: this.target_ = new Friend(); arg_215_0 = (num * 2030359942u ^ 3789269156u); continue; case 18u: arg_215_0 = (((this.accountId_ == null) ? 1372701024u : 1775102053u) ^ num * 3968829036u); continue; } break; } return; IL_CF: arg_215_0 = 1376270715u; goto IL_210; IL_27D: arg_215_0 = ((other.target_ != null) ? 34450351u : 755464344u); goto IL_210; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2EC: uint num; uint arg_270_0 = ((num = input.ReadTag()) != 0u) ? 3924786099u : 4285519856u; while (true) { uint num2; switch ((num2 = (arg_270_0 ^ 3678019464u)) % 24u) { case 1u: goto IL_2EC; case 2u: arg_270_0 = 3924786099u; continue; case 3u: arg_270_0 = (((num != 42u) ? 2804384076u : 2661828391u) ^ num2 * 2297221441u); continue; case 4u: arg_270_0 = (num2 * 343969902u ^ 467206441u); continue; case 5u: this.target_ = new Friend(); arg_270_0 = (num2 * 3613358298u ^ 2565377846u); continue; case 6u: input.ReadMessage(this.accountId_); arg_270_0 = 2778287729u; continue; case 7u: arg_270_0 = ((this.gameAccountId_ != null) ? 4017300059u : 3764778654u); continue; case 8u: this.accountId_ = new EntityId(); arg_270_0 = (num2 * 1244163945u ^ 682681886u); continue; case 9u: input.ReadMessage(this.peer_); arg_270_0 = 2199072712u; continue; case 10u: arg_270_0 = (((num != 10u) ? 3631512103u : 2683872603u) ^ num2 * 896531403u); continue; case 11u: arg_270_0 = ((num <= 18u) ? 2845092714u : 3521839742u); continue; case 12u: arg_270_0 = ((this.accountId_ == null) ? 3638422976u : 4292833686u); continue; case 13u: arg_270_0 = ((this.peer_ == null) ? 3789906730u : 3226155649u); continue; case 14u: arg_270_0 = ((num == 34u) ? 2386014885u : 4222234419u); continue; case 15u: arg_270_0 = (num2 * 4264815057u ^ 2673366720u); continue; case 16u: arg_270_0 = (num2 * 3220574060u ^ 489510257u); continue; case 17u: arg_270_0 = (((num == 18u) ? 3343821244u : 3920118524u) ^ num2 * 2700964523u); continue; case 18u: this.peer_ = new ProcessId(); arg_270_0 = (num2 * 3227243586u ^ 3458298693u); continue; case 19u: input.ReadMessage(this.gameAccountId_); arg_270_0 = 2778287729u; continue; case 20u: input.ReadMessage(this.target_); arg_270_0 = 2778287729u; continue; case 21u: arg_270_0 = ((this.target_ != null) ? 3745745332u : 4202867245u); continue; case 22u: this.gameAccountId_ = new EntityId(); arg_270_0 = (num2 * 4254069233u ^ 3463512557u); continue; case 23u: input.SkipLastField(); arg_270_0 = 2898343996u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/EnumValueDescriptorProto.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class EnumValueDescriptorProto : IMessage<EnumValueDescriptorProto>, IEquatable<EnumValueDescriptorProto>, IDeepCloneable<EnumValueDescriptorProto>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumValueDescriptorProto.__c __9 = new EnumValueDescriptorProto.__c(); internal EnumValueDescriptorProto cctor>b__34_0() { return new EnumValueDescriptorProto(); } } private static readonly MessageParser<EnumValueDescriptorProto> _parser = new MessageParser<EnumValueDescriptorProto>(new Func<EnumValueDescriptorProto>(EnumValueDescriptorProto.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int NumberFieldNumber = 2; private int number_; public const int OptionsFieldNumber = 3; private EnumValueOptions options_; public static MessageParser<EnumValueDescriptorProto> Parser { get { return EnumValueDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return EnumValueDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public int Number { get { return this.number_; } set { this.number_ = value; } } public EnumValueOptions Options { get { return this.options_; } set { this.options_ = value; } } public EnumValueDescriptorProto() { } public EnumValueDescriptorProto(EnumValueDescriptorProto other) : this() { this.name_ = other.name_; this.number_ = other.number_; this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public EnumValueDescriptorProto Clone() { return new EnumValueDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as EnumValueDescriptorProto); } public bool Equals(EnumValueDescriptorProto other) { if (other == null) { goto IL_18; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ -974525765) % 11) { case 0: arg_A1_0 = ((this.Number != other.Number) ? -445776076 : -1596871667); continue; case 1: return false; case 2: arg_A1_0 = ((!EnumValueDescriptorProto.smethod_0(this.Name, other.Name)) ? -1856803592 : -1758011869); continue; case 3: return false; case 4: arg_A1_0 = ((!EnumValueDescriptorProto.smethod_1(this.Options, other.Options)) ? -492737550 : -1168211758); continue; case 5: return false; case 6: goto IL_18; case 7: return true; case 8: return false; case 9: goto IL_E7; } break; } return true; IL_18: arg_A1_0 = -832184285; goto IL_9C; IL_E7: arg_A1_0 = ((other != this) ? -1116558190 : -728169520); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_103: uint arg_D7_0 = 2830402884u; while (true) { uint num2; switch ((num2 = (arg_D7_0 ^ 3217573507u)) % 8u) { case 0u: goto IL_103; case 1u: arg_D7_0 = ((this.options_ != null) ? 3073859423u : 3854423472u); continue; case 2u: arg_D7_0 = ((this.Number == 0) ? 2903904874u : 3239804846u); continue; case 4u: num ^= this.Options.GetHashCode(); arg_D7_0 = (num2 * 815969309u ^ 3857795164u); continue; case 5u: num ^= this.Number.GetHashCode(); arg_D7_0 = (num2 * 934409641u ^ 3209944543u); continue; case 6u: num ^= EnumValueDescriptorProto.smethod_3(this.Name); arg_D7_0 = (num2 * 1269832678u ^ 2666716997u); continue; case 7u: arg_D7_0 = (((EnumValueDescriptorProto.smethod_2(this.Name) != 0) ? 81922766u : 886259282u) ^ num2 * 103638757u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (EnumValueDescriptorProto.smethod_2(this.Name) != 0) { goto IL_22; } goto IL_103; uint arg_C8_0; while (true) { IL_C3: uint num; switch ((num = (arg_C8_0 ^ 3408774618u)) % 8u) { case 0u: output.WriteString(this.Name); arg_C8_0 = (num * 2544968684u ^ 3792851198u); continue; case 1u: output.WriteRawTag(10); arg_C8_0 = (num * 1622631856u ^ 408701578u); continue; case 2u: output.WriteRawTag(26); output.WriteMessage(this.Options); arg_C8_0 = (num * 512366873u ^ 2037853797u); continue; case 3u: output.WriteRawTag(16); output.WriteInt32(this.Number); arg_C8_0 = (num * 3049131168u ^ 3485748756u); continue; case 4u: goto IL_103; case 6u: arg_C8_0 = ((this.options_ == null) ? 4218786535u : 4165980936u); continue; case 7u: goto IL_22; } break; } return; IL_22: arg_C8_0 = 2236482371u; goto IL_C3; IL_103: arg_C8_0 = ((this.Number != 0) ? 3565627433u : 4170339828u); goto IL_C3; } public int CalculateSize() { int num = 0; if (EnumValueDescriptorProto.smethod_2(this.Name) != 0) { goto IL_A5; } goto IL_E6; uint arg_AF_0; while (true) { IL_AA: uint num2; switch ((num2 = (arg_AF_0 ^ 2491881297u)) % 7u) { case 0u: goto IL_A5; case 1u: goto IL_E6; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_AF_0 = (num2 * 3220220512u ^ 477537695u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_AF_0 = (num2 * 216335182u ^ 1492184887u); continue; case 4u: arg_AF_0 = ((this.options_ != null) ? 2675879372u : 2236046817u); continue; case 6u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Number); arg_AF_0 = (num2 * 4268235639u ^ 1156061718u); continue; } break; } return num; IL_A5: arg_AF_0 = 3462549981u; goto IL_AA; IL_E6: arg_AF_0 = ((this.Number == 0) ? 3157124139u : 3742658490u); goto IL_AA; } public void MergeFrom(EnumValueDescriptorProto other) { if (other == null) { goto IL_93; } goto IL_149; uint arg_101_0; while (true) { IL_FC: uint num; switch ((num = (arg_101_0 ^ 2633770813u)) % 11u) { case 0u: arg_101_0 = ((other.options_ != null) ? 3896849746u : 3012072221u); continue; case 1u: arg_101_0 = (((this.options_ == null) ? 743721187u : 1296402089u) ^ num * 1318817500u); continue; case 2u: goto IL_149; case 4u: this.options_ = new EnumValueOptions(); arg_101_0 = (num * 3634077756u ^ 1328823381u); continue; case 5u: return; case 6u: goto IL_93; case 7u: this.Name = other.Name; arg_101_0 = (num * 2133214942u ^ 3989571577u); continue; case 8u: arg_101_0 = ((other.Number == 0) ? 3174923586u : 3404604301u); continue; case 9u: this.Options.MergeFrom(other.Options); arg_101_0 = 3012072221u; continue; case 10u: this.Number = other.Number; arg_101_0 = (num * 2419453955u ^ 1647735634u); continue; } break; } return; IL_93: arg_101_0 = 2996794672u; goto IL_FC; IL_149: arg_101_0 = ((EnumValueDescriptorProto.smethod_2(other.Name) != 0) ? 2250272196u : 3266518551u); goto IL_FC; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1B0: uint num; uint arg_158_0 = ((num = input.ReadTag()) != 0u) ? 615741344u : 1703771866u; while (true) { uint num2; switch ((num2 = (arg_158_0 ^ 1132563844u)) % 15u) { case 0u: arg_158_0 = (((num == 16u) ? 1325730666u : 550460469u) ^ num2 * 2800188339u); continue; case 1u: this.Name = input.ReadString(); arg_158_0 = 366465277u; continue; case 2u: goto IL_1B0; case 3u: this.options_ = new EnumValueOptions(); arg_158_0 = (num2 * 4242714385u ^ 632395035u); continue; case 4u: arg_158_0 = ((num == 10u) ? 847778074u : 953651454u); continue; case 5u: input.ReadMessage(this.options_); arg_158_0 = 1511996550u; continue; case 6u: input.SkipLastField(); arg_158_0 = (num2 * 3154744951u ^ 188463784u); continue; case 7u: arg_158_0 = (num2 * 3148781543u ^ 1237399292u); continue; case 8u: arg_158_0 = 615741344u; continue; case 9u: this.Number = input.ReadInt32(); arg_158_0 = 383292542u; continue; case 10u: arg_158_0 = (((num == 26u) ? 2843326379u : 3097839590u) ^ num2 * 2197681260u); continue; case 11u: arg_158_0 = (num2 * 591246558u ^ 862723688u); continue; case 13u: arg_158_0 = ((this.options_ != null) ? 1614155276u : 627014179u); continue; case 14u: arg_158_0 = (num2 * 1080206112u ^ 2189316550u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants.Net/AuthChannel.cs using System; namespace Framework.Constants.Net { public enum AuthChannel : byte { None, Creep, WoW } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GameAccountOnlineNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GameAccountOnlineNotification : IMessage<GameAccountOnlineNotification>, IEquatable<GameAccountOnlineNotification>, IDeepCloneable<GameAccountOnlineNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountOnlineNotification.__c __9 = new GameAccountOnlineNotification.__c(); internal GameAccountOnlineNotification cctor>b__34_0() { return new GameAccountOnlineNotification(); } } private static readonly MessageParser<GameAccountOnlineNotification> _parser = new MessageParser<GameAccountOnlineNotification>(new Func<GameAccountOnlineNotification>(GameAccountOnlineNotification.__c.__9.<.cctor>b__34_0)); public const int GameAccountIdFieldNumber = 1; private EntityId gameAccountId_; public const int HostFieldNumber = 2; private ProcessId host_; public const int SessionIdFieldNumber = 3; private string sessionId_ = ""; public static MessageParser<GameAccountOnlineNotification> Parser { get { return GameAccountOnlineNotification._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountOnlineNotification.Descriptor; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public string SessionId { get { return this.sessionId_; } set { this.sessionId_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public GameAccountOnlineNotification() { } public GameAccountOnlineNotification(GameAccountOnlineNotification other) : this() { while (true) { IL_8F: uint arg_6F_0 = 2181103460u; while (true) { uint num; switch ((num = (arg_6F_0 ^ 3606721597u)) % 5u) { case 0u: this.Host = ((other.host_ != null) ? other.Host.Clone() : null); arg_6F_0 = 2254060220u; continue; case 1u: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); arg_6F_0 = 2423723677u; continue; case 2u: goto IL_8F; case 3u: this.sessionId_ = other.sessionId_; arg_6F_0 = (num * 245163163u ^ 4167981865u); continue; } return; } } } public GameAccountOnlineNotification Clone() { return new GameAccountOnlineNotification(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountOnlineNotification); } public bool Equals(GameAccountOnlineNotification other) { if (other == null) { goto IL_44; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -1140795187) % 11) { case 0: return false; case 1: arg_A6_0 = (GameAccountOnlineNotification.smethod_1(this.SessionId, other.SessionId) ? -685077654 : -244479080); continue; case 2: return true; case 3: arg_A6_0 = (GameAccountOnlineNotification.smethod_0(this.Host, other.Host) ? -438966594 : -1341386545); continue; case 4: goto IL_44; case 5: arg_A6_0 = (GameAccountOnlineNotification.smethod_0(this.GameAccountId, other.GameAccountId) ? -1216753654 : -2108516640); continue; case 7: return false; case 8: goto IL_EC; case 9: return false; case 10: return false; } break; } return true; IL_44: arg_A6_0 = -1769735828; goto IL_A1; IL_EC: arg_A6_0 = ((other == this) ? -1761864851 : -89511260); goto IL_A1; } public override int GetHashCode() { int num = 1; while (true) { IL_DB: uint arg_B3_0 = 3117190176u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 4200534063u)) % 7u) { case 0u: goto IL_DB; case 1u: num ^= GameAccountOnlineNotification.smethod_2(this.SessionId); arg_B3_0 = (num2 * 1240375468u ^ 2425239031u); continue; case 3u: arg_B3_0 = ((GameAccountOnlineNotification.smethod_3(this.SessionId) != 0) ? 2715551514u : 2320794219u); continue; case 4u: arg_B3_0 = (((this.host_ == null) ? 842179562u : 287845678u) ^ num2 * 3415564301u); continue; case 5u: num ^= GameAccountOnlineNotification.smethod_2(this.Host); arg_B3_0 = (num2 * 1034710224u ^ 2402633738u); continue; case 6u: num ^= GameAccountOnlineNotification.smethod_2(this.GameAccountId); arg_B3_0 = (num2 * 3527756395u ^ 2432986266u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_115: uint arg_E4_0 = 2878169159u; while (true) { uint num; switch ((num = (arg_E4_0 ^ 3548354004u)) % 9u) { case 0u: goto IL_115; case 2u: output.WriteMessage(this.Host); arg_E4_0 = (num * 2491960399u ^ 2632451216u); continue; case 3u: output.WriteRawTag(26); arg_E4_0 = (num * 1098232804u ^ 853567348u); continue; case 4u: output.WriteString(this.SessionId); arg_E4_0 = (num * 1849759184u ^ 4027462358u); continue; case 5u: output.WriteRawTag(18); arg_E4_0 = (num * 799481874u ^ 1190786467u); continue; case 6u: arg_E4_0 = ((GameAccountOnlineNotification.smethod_3(this.SessionId) != 0) ? 2252593516u : 2805462742u); continue; case 7u: output.WriteMessage(this.GameAccountId); arg_E4_0 = (num * 1877231962u ^ 4272325538u); continue; case 8u: arg_E4_0 = (((this.host_ == null) ? 4152997791u : 3367779547u) ^ num * 3029455947u); continue; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId)); if (this.host_ != null) { goto IL_6A; } goto IL_A0; uint arg_74_0; while (true) { IL_6F: uint num2; switch ((num2 = (arg_74_0 ^ 250995980u)) % 5u) { case 0u: goto IL_6A; case 1u: goto IL_A0; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_74_0 = (num2 * 1350301649u ^ 4067618507u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.SessionId); arg_74_0 = (num2 * 4033124571u ^ 1788275794u); continue; } break; } return num; IL_6A: arg_74_0 = 2073133012u; goto IL_6F; IL_A0: arg_74_0 = ((GameAccountOnlineNotification.smethod_3(this.SessionId) == 0) ? 1321023427u : 1422353935u); goto IL_6F; } public void MergeFrom(GameAccountOnlineNotification other) { if (other == null) { goto IL_C5; } goto IL_19C; uint arg_14C_0; while (true) { IL_147: uint num; switch ((num = (arg_14C_0 ^ 2848462060u)) % 13u) { case 0u: arg_14C_0 = ((other.host_ != null) ? 3244325283u : 3076700315u); continue; case 1u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_14C_0 = 3630378138u; continue; case 2u: goto IL_19C; case 4u: arg_14C_0 = (((this.host_ != null) ? 453417992u : 1523577806u) ^ num * 3897295760u); continue; case 5u: this.SessionId = other.SessionId; arg_14C_0 = (num * 3352858386u ^ 2317194647u); continue; case 6u: goto IL_C5; case 7u: arg_14C_0 = (((this.gameAccountId_ != null) ? 1171229978u : 1974949541u) ^ num * 2557998396u); continue; case 8u: this.Host.MergeFrom(other.Host); arg_14C_0 = 3076700315u; continue; case 9u: this.gameAccountId_ = new EntityId(); arg_14C_0 = (num * 4120630976u ^ 3783410278u); continue; case 10u: arg_14C_0 = ((GameAccountOnlineNotification.smethod_3(other.SessionId) == 0) ? 2470448547u : 3620937254u); continue; case 11u: return; case 12u: this.host_ = new ProcessId(); arg_14C_0 = (num * 2927117784u ^ 2179717704u); continue; } break; } return; IL_C5: arg_14C_0 = 2610779247u; goto IL_147; IL_19C: arg_14C_0 = ((other.gameAccountId_ != null) ? 2834114637u : 3630378138u); goto IL_147; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1B7: uint num; uint arg_163_0 = ((num = input.ReadTag()) == 0u) ? 1880803266u : 550715047u; while (true) { uint num2; switch ((num2 = (arg_163_0 ^ 886319838u)) % 14u) { case 1u: arg_163_0 = (((num != 18u) ? 1773405986u : 1053133351u) ^ num2 * 600285158u); continue; case 2u: input.ReadMessage(this.gameAccountId_); arg_163_0 = 1220839439u; continue; case 3u: this.SessionId = input.ReadString(); arg_163_0 = 1220839439u; continue; case 4u: arg_163_0 = ((this.gameAccountId_ == null) ? 1845000534u : 209399680u); continue; case 5u: goto IL_1B7; case 6u: input.SkipLastField(); arg_163_0 = (num2 * 3830312012u ^ 469195311u); continue; case 7u: input.ReadMessage(this.host_); arg_163_0 = 1220839439u; continue; case 8u: this.gameAccountId_ = new EntityId(); arg_163_0 = (num2 * 1115962574u ^ 1260665072u); continue; case 9u: arg_163_0 = ((this.host_ == null) ? 877981660u : 451850571u); continue; case 10u: this.host_ = new ProcessId(); arg_163_0 = (num2 * 135494179u ^ 72176141u); continue; case 11u: arg_163_0 = ((num == 10u) ? 2087376606u : 192338603u); continue; case 12u: arg_163_0 = (((num != 26u) ? 1186058564u : 1392834495u) ^ num2 * 2009280241u); continue; case 13u: arg_163_0 = 550715047u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.Managers/Manager.cs using Framework.Misc; using System; namespace AuthServer.Managers { internal class Manager { public static ComponentManager Components; public static ModuleManager Modules; public static RealmManager Realms; public static void Initialize() { Manager.Components = Singleton<ComponentManager>.GetInstance(); while (true) { IL_40: uint arg_28_0 = 911271730u; while (true) { uint num; switch ((num = (arg_28_0 ^ 678096377u)) % 3u) { case 0u: goto IL_40; case 1u: Manager.Modules = Singleton<ModuleManager>.GetInstance(); arg_28_0 = (num * 943526612u ^ 1299894418u); continue; } goto Block_1; } } Block_1: Manager.Realms = Singleton<RealmManager>.GetInstance(); } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountState.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountState : IMessage<GameAccountState>, IEquatable<GameAccountState>, IDeepCloneable<GameAccountState>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountState.__c __9 = new GameAccountState.__c(); internal GameAccountState cctor>b__39_0() { return new GameAccountState(); } } private static readonly MessageParser<GameAccountState> _parser = new MessageParser<GameAccountState>(new Func<GameAccountState>(GameAccountState.__c.__9.<.cctor>b__39_0)); public const int GameLevelInfoFieldNumber = 1; private GameLevelInfo gameLevelInfo_; public const int GameTimeInfoFieldNumber = 2; private GameTimeInfo gameTimeInfo_; public const int GameStatusFieldNumber = 3; private GameStatus gameStatus_; public const int RafInfoFieldNumber = 4; private RAFInfo rafInfo_; public static MessageParser<GameAccountState> Parser { get { return GameAccountState._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[33]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountState.Descriptor; } } public GameLevelInfo GameLevelInfo { get { return this.gameLevelInfo_; } set { this.gameLevelInfo_ = value; } } public GameTimeInfo GameTimeInfo { get { return this.gameTimeInfo_; } set { this.gameTimeInfo_ = value; } } public GameStatus GameStatus { get { return this.gameStatus_; } set { this.gameStatus_ = value; } } public RAFInfo RafInfo { get { return this.rafInfo_; } set { this.rafInfo_ = value; } } public GameAccountState() { } public GameAccountState(GameAccountState other) : this() { this.GameLevelInfo = ((other.gameLevelInfo_ != null) ? other.GameLevelInfo.Clone() : null); this.GameTimeInfo = ((other.gameTimeInfo_ != null) ? other.GameTimeInfo.Clone() : null); this.GameStatus = ((other.gameStatus_ != null) ? other.GameStatus.Clone() : null); this.RafInfo = ((other.rafInfo_ != null) ? other.RafInfo.Clone() : null); } public GameAccountState Clone() { return new GameAccountState(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountState); } public bool Equals(GameAccountState other) { if (other == null) { goto IL_A2; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ -1572710099) % 13) { case 0: return false; case 1: arg_D8_0 = (GameAccountState.smethod_0(this.GameLevelInfo, other.GameLevelInfo) ? -1519123125 : -683220339); continue; case 2: goto IL_A2; case 4: return false; case 5: goto IL_126; case 6: return true; case 7: arg_D8_0 = ((!GameAccountState.smethod_0(this.GameTimeInfo, other.GameTimeInfo)) ? -2144244611 : -609570970); continue; case 8: arg_D8_0 = (GameAccountState.smethod_0(this.RafInfo, other.RafInfo) ? -1932932102 : -1151931931); continue; case 9: return false; case 10: return false; case 11: return false; case 12: arg_D8_0 = (GameAccountState.smethod_0(this.GameStatus, other.GameStatus) ? -1272933169 : -1718792234); continue; } break; } return true; IL_A2: arg_D8_0 = -747280812; goto IL_D3; IL_126: arg_D8_0 = ((other == this) ? -1283042865 : -914504868); goto IL_D3; } public override int GetHashCode() { int num = 1; while (true) { IL_148: uint arg_113_0 = 3841263962u; while (true) { uint num2; switch ((num2 = (arg_113_0 ^ 3105275610u)) % 10u) { case 0u: goto IL_148; case 1u: num ^= GameAccountState.smethod_1(this.GameStatus); arg_113_0 = (num2 * 4041437204u ^ 2181290110u); continue; case 2u: num ^= GameAccountState.smethod_1(this.GameTimeInfo); arg_113_0 = (num2 * 3717433519u ^ 3693984748u); continue; case 3u: num ^= GameAccountState.smethod_1(this.GameLevelInfo); arg_113_0 = (num2 * 3754971442u ^ 1718227095u); continue; case 4u: arg_113_0 = ((this.rafInfo_ != null) ? 4015163497u : 3511020153u); continue; case 5u: arg_113_0 = ((this.gameTimeInfo_ == null) ? 3272164300u : 2642734906u); continue; case 6u: arg_113_0 = (((this.gameLevelInfo_ != null) ? 4101182195u : 2173295893u) ^ num2 * 3115759549u); continue; case 7u: num ^= GameAccountState.smethod_1(this.RafInfo); arg_113_0 = (num2 * 4198133322u ^ 2692961223u); continue; case 8u: arg_113_0 = ((this.gameStatus_ == null) ? 2695562730u : 2258277691u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameLevelInfo_ != null) { goto IL_83; } goto IL_151; uint arg_10D_0; while (true) { IL_108: uint num; switch ((num = (arg_10D_0 ^ 1337407862u)) % 10u) { case 1u: output.WriteRawTag(34); arg_10D_0 = (num * 1036537657u ^ 1920939593u); continue; case 2u: output.WriteRawTag(26); output.WriteMessage(this.GameStatus); arg_10D_0 = (num * 1535388388u ^ 3142120888u); continue; case 3u: output.WriteRawTag(10); output.WriteMessage(this.GameLevelInfo); arg_10D_0 = (num * 1366617722u ^ 244646531u); continue; case 4u: output.WriteRawTag(18); output.WriteMessage(this.GameTimeInfo); arg_10D_0 = (num * 3324831639u ^ 2292164009u); continue; case 5u: goto IL_83; case 6u: output.WriteMessage(this.RafInfo); arg_10D_0 = (num * 1238778651u ^ 1629696968u); continue; case 7u: arg_10D_0 = ((this.gameStatus_ != null) ? 767215498u : 359957960u); continue; case 8u: arg_10D_0 = ((this.rafInfo_ == null) ? 195253500u : 1827077773u); continue; case 9u: goto IL_151; } break; } return; IL_83: arg_10D_0 = 278033923u; goto IL_108; IL_151: arg_10D_0 = ((this.gameTimeInfo_ == null) ? 810549049u : 1952805510u); goto IL_108; } public int CalculateSize() { int num = 0; if (this.gameLevelInfo_ != null) { goto IL_84; } goto IL_12D; uint arg_ED_0; while (true) { IL_E8: uint num2; switch ((num2 = (arg_ED_0 ^ 1470342961u)) % 9u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameTimeInfo); arg_ED_0 = (num2 * 1615698883u ^ 3763096981u); continue; case 1u: arg_ED_0 = ((this.gameStatus_ == null) ? 2047099440u : 1392139316u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.RafInfo); arg_ED_0 = (num2 * 4121633079u ^ 3928964509u); continue; case 3u: goto IL_84; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameLevelInfo); arg_ED_0 = (num2 * 212920181u ^ 761746893u); continue; case 6u: goto IL_12D; case 7u: arg_ED_0 = ((this.rafInfo_ != null) ? 1887399561u : 913781525u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameStatus); arg_ED_0 = (num2 * 2813915396u ^ 55304996u); continue; } break; } return num; IL_84: arg_ED_0 = 1687557280u; goto IL_E8; IL_12D: arg_ED_0 = ((this.gameTimeInfo_ == null) ? 355880001u : 1208859309u); goto IL_E8; } public void MergeFrom(GameAccountState other) { if (other == null) { goto IL_3C; } goto IL_27D; uint arg_215_0; while (true) { IL_210: uint num; switch ((num = (arg_215_0 ^ 1410441633u)) % 19u) { case 0u: this.GameTimeInfo.MergeFrom(other.GameTimeInfo); arg_215_0 = 1719932446u; continue; case 2u: this.rafInfo_ = new RAFInfo(); arg_215_0 = (num * 3082895277u ^ 4001234750u); continue; case 3u: arg_215_0 = (((this.gameTimeInfo_ != null) ? 1283980800u : 349369814u) ^ num * 2379025011u); continue; case 4u: goto IL_27D; case 5u: arg_215_0 = (((this.gameLevelInfo_ == null) ? 858568771u : 390153290u) ^ num * 3380535023u); continue; case 6u: this.GameStatus.MergeFrom(other.GameStatus); arg_215_0 = 759953097u; continue; case 7u: arg_215_0 = ((other.gameStatus_ != null) ? 1014352919u : 759953097u); continue; case 8u: arg_215_0 = ((other.gameTimeInfo_ == null) ? 1719932446u : 310969027u); continue; case 9u: this.gameTimeInfo_ = new GameTimeInfo(); arg_215_0 = (num * 1229843329u ^ 3870435319u); continue; case 10u: return; case 11u: this.gameStatus_ = new GameStatus(); arg_215_0 = (num * 225392269u ^ 3115035081u); continue; case 12u: this.gameLevelInfo_ = new GameLevelInfo(); arg_215_0 = (num * 3437848998u ^ 1034672316u); continue; case 13u: this.RafInfo.MergeFrom(other.RafInfo); arg_215_0 = 883033520u; continue; case 14u: arg_215_0 = (((this.rafInfo_ == null) ? 914815286u : 1882333473u) ^ num * 1921154549u); continue; case 15u: this.GameLevelInfo.MergeFrom(other.GameLevelInfo); arg_215_0 = 1440048730u; continue; case 16u: arg_215_0 = (((this.gameStatus_ != null) ? 498710658u : 1730314470u) ^ num * 561039881u); continue; case 17u: goto IL_3C; case 18u: arg_215_0 = ((other.rafInfo_ != null) ? 528892012u : 883033520u); continue; } break; } return; IL_3C: arg_215_0 = 1263541986u; goto IL_210; IL_27D: arg_215_0 = ((other.gameLevelInfo_ == null) ? 1440048730u : 149231331u); goto IL_210; } public void MergeFrom(CodedInputStream input) { while (true) { IL_302: uint num; uint arg_282_0 = ((num = input.ReadTag()) != 0u) ? 162024442u : 1831846966u; while (true) { uint num2; switch ((num2 = (arg_282_0 ^ 115187127u)) % 25u) { case 0u: arg_282_0 = ((this.rafInfo_ == null) ? 1746331160u : 1308600964u); continue; case 1u: goto IL_302; case 2u: input.ReadMessage(this.gameTimeInfo_); arg_282_0 = 1015753924u; continue; case 3u: input.ReadMessage(this.gameLevelInfo_); arg_282_0 = 735716337u; continue; case 4u: arg_282_0 = (((num == 18u) ? 1986941156u : 647854795u) ^ num2 * 3132988003u); continue; case 5u: input.ReadMessage(this.rafInfo_); arg_282_0 = 1015753924u; continue; case 6u: this.rafInfo_ = new RAFInfo(); arg_282_0 = (num2 * 2370719136u ^ 3360512740u); continue; case 7u: arg_282_0 = (num2 * 782825252u ^ 51865372u); continue; case 8u: arg_282_0 = (num2 * 495414139u ^ 1231038969u); continue; case 9u: this.gameLevelInfo_ = new GameLevelInfo(); arg_282_0 = (num2 * 3262397901u ^ 1466798597u); continue; case 10u: arg_282_0 = ((this.gameStatus_ != null) ? 1168144911u : 966354682u); continue; case 11u: arg_282_0 = ((this.gameLevelInfo_ != null) ? 1042134050u : 655606388u); continue; case 13u: arg_282_0 = ((num > 18u) ? 142262224u : 248912880u); continue; case 14u: this.gameStatus_ = new GameStatus(); arg_282_0 = (num2 * 2655550263u ^ 3046606468u); continue; case 15u: arg_282_0 = (num2 * 3165359609u ^ 400503111u); continue; case 16u: arg_282_0 = (((num != 34u) ? 2020940649u : 997273575u) ^ num2 * 1276395109u); continue; case 17u: input.ReadMessage(this.gameStatus_); arg_282_0 = 960406800u; continue; case 18u: arg_282_0 = ((num == 26u) ? 616674803u : 834650863u); continue; case 19u: input.SkipLastField(); arg_282_0 = 1698876396u; continue; case 20u: arg_282_0 = 162024442u; continue; case 21u: this.gameTimeInfo_ = new GameTimeInfo(); arg_282_0 = (num2 * 2225402936u ^ 2560901117u); continue; case 22u: arg_282_0 = ((this.gameTimeInfo_ == null) ? 953636837u : 656299533u); continue; case 23u: arg_282_0 = (num2 * 483989980u ^ 473458389u); continue; case 24u: arg_282_0 = (((num == 10u) ? 1695455580u : 1934704507u) ^ num2 * 1596750035u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Method.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Method : IMessage<Method>, IEquatable<Method>, IDeepCloneable<Method>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Method.__c __9 = new Method.__c(); internal Method cctor>b__54_0() { return new Method(); } } private static readonly MessageParser<Method> _parser = new MessageParser<Method>(new Func<Method>(Method.__c.__9.<.cctor>b__54_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int RequestTypeUrlFieldNumber = 2; private string requestTypeUrl_ = ""; public const int RequestStreamingFieldNumber = 3; private bool requestStreaming_; public const int ResponseTypeUrlFieldNumber = 4; private string responseTypeUrl_ = ""; public const int ResponseStreamingFieldNumber = 5; private bool responseStreaming_; public const int OptionsFieldNumber = 6; private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(50u, Option.Parser); private readonly RepeatedField<Option> options_ = new RepeatedField<Option>(); public const int SyntaxFieldNumber = 7; private Syntax syntax_; public static MessageParser<Method> Parser { get { return Method._parser; } } public static MessageDescriptor Descriptor { get { return ApiReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Method.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string RequestTypeUrl { get { return this.requestTypeUrl_; } set { this.requestTypeUrl_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public bool RequestStreaming { get { return this.requestStreaming_; } set { this.requestStreaming_ = value; } } public string ResponseTypeUrl { get { return this.responseTypeUrl_; } set { this.responseTypeUrl_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public bool ResponseStreaming { get { return this.responseStreaming_; } set { this.responseStreaming_ = value; } } public RepeatedField<Option> Options { get { return this.options_; } } public Syntax Syntax { get { return this.syntax_; } set { this.syntax_ = value; } } public Method() { } public Method(Method other) : this() { while (true) { IL_DD: uint arg_B5_0 = 1655388041u; while (true) { uint num; switch ((num = (arg_B5_0 ^ 1075633238u)) % 7u) { case 0u: this.responseStreaming_ = other.responseStreaming_; arg_B5_0 = (num * 2376748881u ^ 4100632361u); continue; case 2u: this.name_ = other.name_; this.requestTypeUrl_ = other.requestTypeUrl_; arg_B5_0 = (num * 1990173059u ^ 2489388168u); continue; case 3u: goto IL_DD; case 4u: this.requestStreaming_ = other.requestStreaming_; this.responseTypeUrl_ = other.responseTypeUrl_; arg_B5_0 = (num * 3024833448u ^ 500031394u); continue; case 5u: this.options_ = other.options_.Clone(); arg_B5_0 = (num * 306354749u ^ 2902355063u); continue; case 6u: this.syntax_ = other.syntax_; arg_B5_0 = (num * 4031773114u ^ 846729464u); continue; } return; } } } public Method Clone() { return new Method(this); } public override bool Equals(object other) { return this.Equals(other as Method); } public bool Equals(Method other) { if (other == null) { goto IL_14C; } goto IL_1BC; int arg_156_0; while (true) { IL_151: switch ((arg_156_0 ^ -608667169) % 19) { case 0: return false; case 2: return false; case 3: return true; case 4: return false; case 5: return false; case 6: goto IL_14C; case 7: return false; case 8: arg_156_0 = (Method.smethod_0(this.ResponseTypeUrl, other.ResponseTypeUrl) ? -152054560 : -951428384); continue; case 9: arg_156_0 = ((this.RequestStreaming != other.RequestStreaming) ? -1193073493 : -1358078271); continue; case 10: arg_156_0 = ((!this.options_.Equals(other.options_)) ? -1392463818 : -666135256); continue; case 11: return false; case 12: arg_156_0 = ((!Method.smethod_0(this.Name, other.Name)) ? -996725682 : -1276945510); continue; case 13: arg_156_0 = ((!Method.smethod_0(this.RequestTypeUrl, other.RequestTypeUrl)) ? -1127445121 : -2128742441); continue; case 14: return false; case 15: goto IL_1BC; case 16: arg_156_0 = ((this.Syntax != other.Syntax) ? -1827599559 : -1443585483); continue; case 17: arg_156_0 = ((this.ResponseStreaming != other.ResponseStreaming) ? -1545041939 : -502444962); continue; case 18: return false; } break; } return true; IL_14C: arg_156_0 = -919405345; goto IL_151; IL_1BC: arg_156_0 = ((other == this) ? -1791899688 : -373825385); goto IL_151; } public override int GetHashCode() { int num = 1; if (Method.smethod_1(this.Name) != 0) { goto IL_133; } goto IL_1FD; uint arg_1A9_0; while (true) { IL_1A4: uint num2; switch ((num2 = (arg_1A9_0 ^ 915022964u)) % 14u) { case 0u: num ^= this.Syntax.GetHashCode(); arg_1A9_0 = (num2 * 2186398745u ^ 3373051380u); continue; case 1u: num ^= Method.smethod_2(this.Name); arg_1A9_0 = (num2 * 2741219337u ^ 4035071899u); continue; case 2u: arg_1A9_0 = (((this.Syntax != Syntax.SYNTAX_PROTO2) ? 89957018u : 769992650u) ^ num2 * 418096207u); continue; case 3u: goto IL_133; case 4u: goto IL_1FD; case 5u: arg_1A9_0 = ((!this.ResponseStreaming) ? 1616709793u : 1547815166u); continue; case 6u: num ^= Method.smethod_2(this.RequestTypeUrl); arg_1A9_0 = (num2 * 3295999191u ^ 3553419961u); continue; case 7u: arg_1A9_0 = (this.RequestStreaming ? 120569591u : 338615288u); continue; case 9u: num ^= this.options_.GetHashCode(); arg_1A9_0 = 2086856976u; continue; case 10u: arg_1A9_0 = ((this.ResponseTypeUrl.Length == 0) ? 1923350725u : 121618717u); continue; case 11u: num ^= this.ResponseTypeUrl.GetHashCode(); arg_1A9_0 = (num2 * 2490490282u ^ 1938488447u); continue; case 12u: num ^= this.ResponseStreaming.GetHashCode(); arg_1A9_0 = (num2 * 3200364136u ^ 3724209329u); continue; case 13u: num ^= this.RequestStreaming.GetHashCode(); arg_1A9_0 = (num2 * 2782881776u ^ 665211944u); continue; } break; } return num; IL_133: arg_1A9_0 = 445887955u; goto IL_1A4; IL_1FD: arg_1A9_0 = ((Method.smethod_1(this.RequestTypeUrl) == 0) ? 1124144643u : 142932898u); goto IL_1A4; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Method.smethod_1(this.Name) != 0) { goto IL_14A; } goto IL_255; uint arg_1F5_0; while (true) { IL_1F0: uint num; switch ((num = (arg_1F5_0 ^ 3596599515u)) % 17u) { case 0u: output.WriteRawTag(24); arg_1F5_0 = (num * 163138056u ^ 1964607829u); continue; case 1u: arg_1F5_0 = (((this.Syntax != Syntax.SYNTAX_PROTO2) ? 631936343u : 689480009u) ^ num * 2443122934u); continue; case 2u: arg_1F5_0 = ((Method.smethod_1(this.ResponseTypeUrl) != 0) ? 2715950721u : 3237243522u); continue; case 3u: output.WriteRawTag(56); arg_1F5_0 = (num * 1535244687u ^ 771323186u); continue; case 4u: arg_1F5_0 = ((!this.RequestStreaming) ? 4090535490u : 2281479782u); continue; case 5u: goto IL_14A; case 6u: output.WriteString(this.RequestTypeUrl); arg_1F5_0 = (num * 1098084192u ^ 3804475138u); continue; case 7u: goto IL_255; case 8u: output.WriteRawTag(34); output.WriteString(this.ResponseTypeUrl); arg_1F5_0 = (num * 2431347220u ^ 1970325898u); continue; case 9u: output.WriteRawTag(10); output.WriteString(this.Name); arg_1F5_0 = (num * 889759870u ^ 4097619786u); continue; case 10u: arg_1F5_0 = ((!this.ResponseStreaming) ? 2965941011u : 4201475576u); continue; case 11u: output.WriteRawTag(18); arg_1F5_0 = (num * 2395790886u ^ 3072862975u); continue; case 13u: output.WriteRawTag(40); output.WriteBool(this.ResponseStreaming); arg_1F5_0 = (num * 1630289624u ^ 628892827u); continue; case 14u: output.WriteBool(this.RequestStreaming); arg_1F5_0 = (num * 92481181u ^ 2240878284u); continue; case 15u: output.WriteEnum((int)this.Syntax); arg_1F5_0 = (num * 1856796438u ^ 4220384161u); continue; case 16u: this.options_.WriteTo(output, Method._repeated_options_codec); arg_1F5_0 = 4046556900u; continue; } break; } return; IL_14A: arg_1F5_0 = 2613719900u; goto IL_1F0; IL_255: arg_1F5_0 = ((Method.smethod_1(this.RequestTypeUrl) == 0) ? 3096110658u : 2698480196u); goto IL_1F0; } public int CalculateSize() { int num = 0; while (true) { IL_20C: uint arg_1C3_0 = 3342661884u; while (true) { uint num2; switch ((num2 = (arg_1C3_0 ^ 3953078059u)) % 15u) { case 0u: arg_1C3_0 = ((!this.ResponseStreaming) ? 4064871149u : 3520295340u); continue; case 1u: num += 2; arg_1C3_0 = (num2 * 4152035984u ^ 430011954u); continue; case 2u: num += this.options_.CalculateSize(Method._repeated_options_codec); arg_1C3_0 = 4048585387u; continue; case 3u: num += 2; arg_1C3_0 = (num2 * 3192645165u ^ 1303373142u); continue; case 4u: arg_1C3_0 = ((Method.smethod_1(this.RequestTypeUrl) == 0) ? 3250470349u : 3767479568u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_1C3_0 = (num2 * 3384104670u ^ 564867084u); continue; case 6u: arg_1C3_0 = ((Method.smethod_1(this.ResponseTypeUrl) != 0) ? 2397109187u : 3935696130u); continue; case 7u: arg_1C3_0 = (((Method.smethod_1(this.Name) == 0) ? 3564187157u : 3498453501u) ^ num2 * 1694168817u); continue; case 8u: arg_1C3_0 = (this.RequestStreaming ? 3247751115u : 3429582898u); continue; case 9u: arg_1C3_0 = (((this.Syntax != Syntax.SYNTAX_PROTO2) ? 3681966347u : 3280955495u) ^ num2 * 1606614923u); continue; case 10u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax); arg_1C3_0 = (num2 * 1955989442u ^ 2609316263u); continue; case 11u: goto IL_20C; case 12u: num += 1 + CodedOutputStream.ComputeStringSize(this.ResponseTypeUrl); arg_1C3_0 = (num2 * 4131553279u ^ 2991709722u); continue; case 13u: num += 1 + CodedOutputStream.ComputeStringSize(this.RequestTypeUrl); arg_1C3_0 = (num2 * 2582579048u ^ 2266741045u); continue; } return num; } } return num; } public void MergeFrom(Method other) { if (other == null) { goto IL_102; } goto IL_1F4; uint arg_19C_0; while (true) { IL_197: uint num; switch ((num = (arg_19C_0 ^ 2572470603u)) % 15u) { case 0u: this.RequestStreaming = other.RequestStreaming; arg_19C_0 = (num * 1098902433u ^ 3138832656u); continue; case 1u: this.ResponseStreaming = other.ResponseStreaming; arg_19C_0 = (num * 3396863956u ^ 872888258u); continue; case 2u: this.Syntax = other.Syntax; arg_19C_0 = (num * 1865237126u ^ 41633534u); continue; case 3u: this.Name = other.Name; arg_19C_0 = (num * 339038038u ^ 1404856477u); continue; case 4u: arg_19C_0 = (other.RequestStreaming ? 2811903944u : 2976284787u); continue; case 5u: return; case 6u: goto IL_102; case 7u: arg_19C_0 = (other.ResponseStreaming ? 2756674206u : 3280119974u); continue; case 8u: this.options_.Add(other.options_); arg_19C_0 = ((other.Syntax == Syntax.SYNTAX_PROTO2) ? 3680720780u : 3932391704u); continue; case 9u: arg_19C_0 = ((Method.smethod_1(other.ResponseTypeUrl) != 0) ? 3542908381u : 2306327693u); continue; case 10u: arg_19C_0 = ((Method.smethod_1(other.RequestTypeUrl) == 0) ? 3366401907u : 4282839734u); continue; case 11u: goto IL_1F4; case 12u: this.RequestTypeUrl = other.RequestTypeUrl; arg_19C_0 = (num * 856103932u ^ 3113651071u); continue; case 14u: this.ResponseTypeUrl = other.ResponseTypeUrl; arg_19C_0 = (num * 1013803510u ^ 2493172393u); continue; } break; } return; IL_102: arg_19C_0 = 3750802675u; goto IL_197; IL_1F4: arg_19C_0 = ((Method.smethod_1(other.Name) != 0) ? 3029288332u : 2329533255u); goto IL_197; } public void MergeFrom(CodedInputStream input) { while (true) { IL_31F: uint num; uint arg_297_0 = ((num = input.ReadTag()) != 0u) ? 3622966202u : 2583586026u; while (true) { uint num2; switch ((num2 = (arg_297_0 ^ 3508315744u)) % 27u) { case 0u: this.Name = input.ReadString(); arg_297_0 = 4128261398u; continue; case 1u: this.ResponseTypeUrl = input.ReadString(); arg_297_0 = 3391611700u; continue; case 2u: arg_297_0 = (((num != 56u) ? 3578190483u : 3784706331u) ^ num2 * 4244431325u); continue; case 3u: arg_297_0 = (num2 * 1222239527u ^ 1974604126u); continue; case 4u: arg_297_0 = ((num > 24u) ? 3728767070u : 3070759091u); continue; case 5u: arg_297_0 = (((num == 40u) ? 2303632670u : 3900245222u) ^ num2 * 162681107u); continue; case 6u: goto IL_31F; case 7u: arg_297_0 = (num2 * 931255559u ^ 302906894u); continue; case 8u: arg_297_0 = ((num == 50u) ? 3045185506u : 2426001241u); continue; case 9u: arg_297_0 = (num2 * 1354684559u ^ 2262731017u); continue; case 10u: arg_297_0 = (num2 * 1792967101u ^ 2094375174u); continue; case 11u: arg_297_0 = (((num != 10u) ? 170233906u : 1724843715u) ^ num2 * 301496205u); continue; case 12u: arg_297_0 = (((num != 34u) ? 2291999500u : 3536390895u) ^ num2 * 3773012398u); continue; case 13u: arg_297_0 = 3622966202u; continue; case 14u: this.RequestStreaming = input.ReadBool(); arg_297_0 = 3949944081u; continue; case 15u: arg_297_0 = (((num != 24u) ? 1697246885u : 439355649u) ^ num2 * 1896849825u); continue; case 16u: arg_297_0 = ((num > 40u) ? 2729776973u : 2734481911u); continue; case 17u: arg_297_0 = (num2 * 3507865927u ^ 2899536730u); continue; case 18u: this.ResponseStreaming = input.ReadBool(); arg_297_0 = 3933329480u; continue; case 19u: input.SkipLastField(); arg_297_0 = 4128261398u; continue; case 20u: this.RequestTypeUrl = input.ReadString(); arg_297_0 = 2449252376u; continue; case 22u: arg_297_0 = (num2 * 848859750u ^ 2053161710u); continue; case 23u: this.syntax_ = (Syntax)input.ReadEnum(); arg_297_0 = 4128261398u; continue; case 24u: arg_297_0 = (((num != 18u) ? 3439072729u : 3203818168u) ^ num2 * 98105178u); continue; case 25u: arg_297_0 = (num2 * 3565717536u ^ 2156947046u); continue; case 26u: this.options_.AddEntriesFrom(input, Method._repeated_options_codec); arg_297_0 = 3738266416u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/UInt32Value.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class UInt32Value : IMessage<UInt32Value>, IEquatable<UInt32Value>, IDeepCloneable<UInt32Value>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UInt32Value.__c __9 = new UInt32Value.__c(); internal UInt32Value cctor>b__24_0() { return new UInt32Value(); } } private static readonly MessageParser<UInt32Value> _parser = new MessageParser<UInt32Value>(new Func<UInt32Value>(UInt32Value.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private uint value_; public static MessageParser<UInt32Value> Parser { get { return UInt32Value._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return UInt32Value.Descriptor; } } public uint Value { get { return this.value_; } set { this.value_ = value; } } public UInt32Value() { } public UInt32Value(UInt32Value other) : this() { this.value_ = other.value_; } public UInt32Value Clone() { return new UInt32Value(this); } public override bool Equals(object other) { return this.Equals(other as UInt32Value); } public bool Equals(UInt32Value other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -846397802) % 7) { case 0: goto IL_75; case 2: arg_43_0 = ((this.Value != other.Value) ? -553472577 : -527185368); continue; case 3: return false; case 4: goto IL_12; case 5: return false; case 6: return true; } break; } return true; IL_12: arg_43_0 = -461179523; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? -270039607 : -75345906); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 2802529349u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 3911544564u)) % 4u) { case 1u: arg_50_0 = (((this.Value == 0u) ? 286650167u : 1765746968u) ^ num2 * 1062172667u); continue; case 2u: goto IL_6C; case 3u: num ^= this.Value.GetHashCode(); arg_50_0 = (num2 * 1132322786u ^ 3877142610u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value != 0u) { while (true) { IL_5A: uint arg_3E_0 = 4237777190u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 2570988535u)) % 4u) { case 0u: goto IL_5A; case 1u: output.WriteRawTag(8); arg_3E_0 = (num * 2165976347u ^ 4023923294u); continue; case 2u: output.WriteUInt32(this.Value); arg_3E_0 = (num * 2730801902u ^ 3284726508u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.Value != 0u) { while (true) { IL_46: uint arg_2E_0 = 3442078902u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 3390321382u)) % 3u) { case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Value); arg_2E_0 = (num2 * 1094621579u ^ 2899980218u); continue; case 2u: goto IL_46; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(UInt32Value other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 537287064u)) % 5u) { case 1u: return; case 2u: goto IL_63; case 3u: this.Value = other.Value; arg_37_0 = (num * 1409705140u ^ 443985280u); continue; case 4u: goto IL_12; } break; } return; IL_12: arg_37_0 = 1785552604u; goto IL_32; IL_63: arg_37_0 = ((other.Value == 0u) ? 942233208u : 1382106158u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A8: uint num; uint arg_71_0 = ((num = input.ReadTag()) != 0u) ? 4173524862u : 2532160509u; while (true) { uint num2; switch ((num2 = (arg_71_0 ^ 2373521243u)) % 7u) { case 0u: input.SkipLastField(); arg_71_0 = (num2 * 3734822602u ^ 2776843024u); continue; case 1u: goto IL_A8; case 3u: arg_71_0 = ((num == 8u) ? 3582202604u : 2793884427u); continue; case 4u: this.Value = input.ReadUInt32(); arg_71_0 = 3470518169u; continue; case 5u: arg_71_0 = (num2 * 1105812581u ^ 327226030u); continue; case 6u: arg_71_0 = 4173524862u; continue; } return; } } } } } <file_sep>/Framework.Constants/AccountDataTypes.cs using System; namespace Framework.Constants { public enum AccountDataTypes { GlobalConfigCache = 1, CharacterConfigCache, GlobalBindingsCache = 4, CharacterBindingsCache = 8, GlobalMacrosCache = 16, CharacterMacrosCache = 32, CharacterLayoutCache = 64, CharacterChatCache = 128 } } <file_sep>/Bgs.Protocol.Connection.V1/BindRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class BindRequest : IMessage<BindRequest>, IEquatable<BindRequest>, IDeepCloneable<BindRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BindRequest.__c __9 = new BindRequest.__c(); internal BindRequest cctor>b__39_0() { return new BindRequest(); } } private static readonly MessageParser<BindRequest> _parser = new MessageParser<BindRequest>(new Func<BindRequest>(BindRequest.__c.__9.<.cctor>b__39_0)); public const int DeprecatedImportedServiceHashFieldNumber = 1; private static readonly FieldCodec<uint> _repeated_deprecatedImportedServiceHash_codec = FieldCodec.ForFixed32(10u); private readonly RepeatedField<uint> deprecatedImportedServiceHash_ = new RepeatedField<uint>(); public const int DeprecatedExportedServiceFieldNumber = 2; private static readonly FieldCodec<BoundService> _repeated_deprecatedExportedService_codec; private readonly RepeatedField<BoundService> deprecatedExportedService_ = new RepeatedField<BoundService>(); public const int ExportedServiceFieldNumber = 3; private static readonly FieldCodec<BoundService> _repeated_exportedService_codec; private readonly RepeatedField<BoundService> exportedService_ = new RepeatedField<BoundService>(); public const int ImportedServiceFieldNumber = 4; private static readonly FieldCodec<BoundService> _repeated_importedService_codec; private readonly RepeatedField<BoundService> importedService_ = new RepeatedField<BoundService>(); public static MessageParser<BindRequest> Parser { get { return BindRequest._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return BindRequest.Descriptor; } } [Obsolete] public RepeatedField<uint> DeprecatedImportedServiceHash { get { return this.deprecatedImportedServiceHash_; } } [Obsolete] public RepeatedField<BoundService> DeprecatedExportedService { get { return this.deprecatedExportedService_; } } public RepeatedField<BoundService> ExportedService { get { return this.exportedService_; } } public RepeatedField<BoundService> ImportedService { get { return this.importedService_; } } public BindRequest() { } public BindRequest(BindRequest other) : this() { this.deprecatedImportedServiceHash_ = other.deprecatedImportedServiceHash_.Clone(); this.deprecatedExportedService_ = other.deprecatedExportedService_.Clone(); this.exportedService_ = other.exportedService_.Clone(); this.importedService_ = other.importedService_.Clone(); } public BindRequest Clone() { return new BindRequest(this); } public override bool Equals(object other) { return this.Equals(other as BindRequest); } public bool Equals(BindRequest other) { if (other == null) { goto IL_18; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ 267045019) % 13) { case 0: arg_D8_0 = ((!this.importedService_.Equals(other.importedService_)) ? 817030216 : 1079493738); continue; case 1: arg_D8_0 = ((!this.exportedService_.Equals(other.exportedService_)) ? 641441435 : 1302630778); continue; case 2: return false; case 3: arg_D8_0 = ((!this.deprecatedImportedServiceHash_.Equals(other.deprecatedImportedServiceHash_)) ? 1884608061 : 595126786); continue; case 4: return false; case 5: arg_D8_0 = (this.deprecatedExportedService_.Equals(other.deprecatedExportedService_) ? 1869459183 : 1829085159); continue; case 6: return false; case 8: return true; case 9: goto IL_126; case 10: goto IL_18; case 11: return false; case 12: return false; } break; } return true; IL_18: arg_D8_0 = 172860479; goto IL_D3; IL_126: arg_D8_0 = ((other != this) ? 1262809085 : 1437870563); goto IL_D3; } public override int GetHashCode() { return 1 ^ BindRequest.smethod_0(this.deprecatedImportedServiceHash_) ^ BindRequest.smethod_0(this.deprecatedExportedService_) ^ BindRequest.smethod_0(this.exportedService_) ^ BindRequest.smethod_0(this.importedService_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.deprecatedImportedServiceHash_.WriteTo(output, BindRequest._repeated_deprecatedImportedServiceHash_codec); while (true) { IL_4E: uint arg_36_0 = 3679344897u; while (true) { uint num; switch ((num = (arg_36_0 ^ 2449860434u)) % 3u) { case 0u: goto IL_4E; case 1u: this.deprecatedExportedService_.WriteTo(output, BindRequest._repeated_deprecatedExportedService_codec); arg_36_0 = (num * 3634225007u ^ 1394965225u); continue; } goto Block_1; } } Block_1: this.exportedService_.WriteTo(output, BindRequest._repeated_exportedService_codec); this.importedService_.WriteTo(output, BindRequest._repeated_importedService_codec); } public int CalculateSize() { return 0 + this.deprecatedImportedServiceHash_.CalculateSize(BindRequest._repeated_deprecatedImportedServiceHash_codec) + this.deprecatedExportedService_.CalculateSize(BindRequest._repeated_deprecatedExportedService_codec) + this.exportedService_.CalculateSize(BindRequest._repeated_exportedService_codec) + this.importedService_.CalculateSize(BindRequest._repeated_importedService_codec); } public void MergeFrom(BindRequest other) { if (other == null) { goto IL_25; } goto IL_4F; uint arg_2F_0; while (true) { IL_2A: uint num; switch ((num = (arg_2F_0 ^ 1593013776u)) % 5u) { case 0u: goto IL_25; case 1u: this.exportedService_.Add(other.exportedService_); arg_2F_0 = (num * 2224279942u ^ 3796273912u); continue; case 3u: return; case 4u: goto IL_4F; } break; } this.importedService_.Add(other.importedService_); return; IL_25: arg_2F_0 = 247950512u; goto IL_2A; IL_4F: this.deprecatedImportedServiceHash_.Add(other.deprecatedImportedServiceHash_); this.deprecatedExportedService_.Add(other.deprecatedExportedService_); arg_2F_0 = 742424168u; goto IL_2A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1F0: uint num; uint arg_194_0 = ((num = input.ReadTag()) != 0u) ? 2763667383u : 2848052272u; while (true) { uint num2; switch ((num2 = (arg_194_0 ^ 3700393637u)) % 16u) { case 0u: arg_194_0 = 2763667383u; continue; case 1u: arg_194_0 = (num2 * 1081411796u ^ 1847202805u); continue; case 2u: arg_194_0 = ((num > 13u) ? 3734901133u : 4222415939u); continue; case 3u: this.deprecatedExportedService_.AddEntriesFrom(input, BindRequest._repeated_deprecatedExportedService_codec); arg_194_0 = 2664551912u; continue; case 4u: input.SkipLastField(); arg_194_0 = 3093484809u; continue; case 6u: arg_194_0 = (((num == 10u) ? 4254587559u : 2680916638u) ^ num2 * 2506131538u); continue; case 7u: arg_194_0 = (((num != 13u) ? 689202702u : 855388465u) ^ num2 * 2516856534u); continue; case 8u: arg_194_0 = ((num != 18u) ? 4013010862u : 4131554662u); continue; case 9u: arg_194_0 = (((num != 34u) ? 1978409344u : 208161406u) ^ num2 * 752059977u); continue; case 10u: this.importedService_.AddEntriesFrom(input, BindRequest._repeated_importedService_codec); arg_194_0 = 3093484809u; continue; case 11u: arg_194_0 = (((num != 26u) ? 1166719018u : 370169084u) ^ num2 * 1165925186u); continue; case 12u: goto IL_1F0; case 13u: arg_194_0 = (num2 * 1554438292u ^ 484308365u); continue; case 14u: this.deprecatedImportedServiceHash_.AddEntriesFrom(input, BindRequest._repeated_deprecatedImportedServiceHash_codec); arg_194_0 = 3093484809u; continue; case 15u: this.exportedService_.AddEntriesFrom(input, BindRequest._repeated_exportedService_codec); arg_194_0 = 3093484809u; continue; } return; } } } static BindRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_AE: uint arg_8E_0 = 1210991938u; while (true) { uint num; switch ((num = (arg_8E_0 ^ 451917867u)) % 5u) { case 0u: goto IL_AE; case 2u: BindRequest._repeated_exportedService_codec = FieldCodec.ForMessage<BoundService>(26u, BoundService.Parser); arg_8E_0 = (num * 720775964u ^ 1392065070u); continue; case 3u: BindRequest._repeated_deprecatedExportedService_codec = FieldCodec.ForMessage<BoundService>(18u, BoundService.Parser); arg_8E_0 = (num * 1135561611u ^ 1425679247u); continue; case 4u: BindRequest._repeated_importedService_codec = FieldCodec.ForMessage<BoundService>(34u, BoundService.Parser); arg_8E_0 = (num * 1895954380u ^ 3028148241u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/MethodOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class MethodOptions : IMessage<MethodOptions>, IEquatable<MethodOptions>, IDeepCloneable<MethodOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MethodOptions.__c __9 = new MethodOptions.__c(); internal MethodOptions cctor>b__29_0() { return new MethodOptions(); } } private static readonly MessageParser<MethodOptions> _parser = new MessageParser<MethodOptions>(new Func<MethodOptions>(MethodOptions.__c.__9.<.cctor>b__29_0)); public const int DeprecatedFieldNumber = 33; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<MethodOptions> Parser { get { return MethodOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[15]; } } MessageDescriptor IMessage.Descriptor { get { return MethodOptions.Descriptor; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public MethodOptions() { } public MethodOptions(MethodOptions other) : this() { this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public MethodOptions Clone() { return new MethodOptions(this); } public override bool Equals(object other) { return this.Equals(other as MethodOptions); } public bool Equals(MethodOptions other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 49821427) % 9) { case 0: return true; case 1: goto IL_B0; case 2: arg_72_0 = ((this.Deprecated != other.Deprecated) ? 623402464 : 894237102); continue; case 3: goto IL_41; case 4: arg_72_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? 1204409076 : 747244298); continue; case 5: return false; case 6: return false; case 7: return false; } break; } return true; IL_41: arg_72_0 = 331012446; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1231575750 : 1890664014); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_88: uint arg_68_0 = 1766356456u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 2019415767u)) % 5u) { case 0u: num ^= this.uninterpretedOption_.GetHashCode(); arg_68_0 = 1707643977u; continue; case 1u: num ^= this.Deprecated.GetHashCode(); arg_68_0 = (num2 * 2040794719u ^ 155732523u); continue; case 3u: goto IL_88; case 4u: arg_68_0 = ((this.Deprecated ? 975214686u : 2034139678u) ^ num2 * 211047573u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Deprecated) { goto IL_31; } goto IL_57; uint arg_3B_0; while (true) { IL_36: uint num; switch ((num = (arg_3B_0 ^ 30129478u)) % 4u) { case 0u: goto IL_57; case 2u: goto IL_31; case 3u: output.WriteRawTag(136, 2); output.WriteBool(this.Deprecated); arg_3B_0 = (num * 1594343042u ^ 4254010524u); continue; } break; } return; IL_31: arg_3B_0 = 1231131929u; goto IL_36; IL_57: this.uninterpretedOption_.WriteTo(output, MethodOptions._repeated_uninterpretedOption_codec); arg_3B_0 = 1198374859u; goto IL_36; } public int CalculateSize() { int num = 0; while (true) { IL_5F: uint arg_43_0 = 1334836919u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 1967115853u)) % 4u) { case 0u: goto IL_5F; case 1u: num += 3; arg_43_0 = (num2 * 605396567u ^ 3014393125u); continue; case 2u: arg_43_0 = (((!this.Deprecated) ? 3684171696u : 3921957486u) ^ num2 * 2567224919u); continue; } goto Block_2; } } Block_2: return num + this.uninterpretedOption_.CalculateSize(MethodOptions._repeated_uninterpretedOption_codec); } public void MergeFrom(MethodOptions other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 3740351164u)) % 5u) { case 0u: goto IL_2D; case 1u: goto IL_63; case 3u: return; case 4u: this.Deprecated = other.Deprecated; arg_37_0 = (num * 525740416u ^ 839497249u); continue; } break; } this.uninterpretedOption_.Add(other.uninterpretedOption_); return; IL_2D: arg_37_0 = 3794264087u; goto IL_32; IL_63: arg_37_0 = (other.Deprecated ? 3811210586u : 2361294625u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_FC: uint num; uint arg_BC_0 = ((num = input.ReadTag()) == 0u) ? 979778583u : 676086833u; while (true) { uint num2; switch ((num2 = (arg_BC_0 ^ 1238858147u)) % 9u) { case 0u: arg_BC_0 = 676086833u; continue; case 2u: arg_BC_0 = (num2 * 2406314712u ^ 1735247836u); continue; case 3u: goto IL_FC; case 4u: arg_BC_0 = (((num != 7994u) ? 3123669827u : 2466361192u) ^ num2 * 604729040u); continue; case 5u: input.SkipLastField(); arg_BC_0 = (num2 * 1207948990u ^ 4249071532u); continue; case 6u: arg_BC_0 = ((num != 264u) ? 625027734u : 64371090u); continue; case 7u: this.uninterpretedOption_.AddEntriesFrom(input, MethodOptions._repeated_uninterpretedOption_codec); arg_BC_0 = 1789461388u; continue; case 8u: this.Deprecated = input.ReadBool(); arg_BC_0 = 1580931613u; continue; } return; } } } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.IO/LalFile.cs using Arctium_WoW_ClientDB_Viewer.ClientDB; using System; using System.Collections.Generic; namespace Arctium_WoW_ClientDB_Viewer.IO { internal class LalFile { public string TypeName { get; set; } public FileOptions FileOptions { get; set; } public Dictionary<string, LalField> Fields { get; set; } public LalFile() { this.Fieldsk__BackingField = new Dictionary<string, LalField>(); base..ctor(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Field.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Field : IMessage<Field>, IEquatable<Field>, IDeepCloneable<Field>, IMessage { [DebuggerNonUserCode] public static class Types { public enum Kind { TYPE_UNKNOWN, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT64, TYPE_UINT64, TYPE_INT32, TYPE_FIXED64, TYPE_FIXED32, TYPE_BOOL, TYPE_STRING, TYPE_GROUP, TYPE_MESSAGE, TYPE_BYTES, TYPE_UINT32, TYPE_ENUM, TYPE_SFIXED32, TYPE_SFIXED64, TYPE_SINT32, TYPE_SINT64 } public enum Cardinality { CARDINALITY_UNKNOWN, CARDINALITY_OPTIONAL, CARDINALITY_REQUIRED, CARDINALITY_REPEATED } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Field.__c __9 = new Field.__c(); internal Field cctor>b__65_0() { return new Field(); } } private static readonly MessageParser<Field> _parser = new MessageParser<Field>(new Func<Field>(Field.__c.__9.<.cctor>b__65_0)); public const int KindFieldNumber = 1; private Field.Types.Kind kind_; public const int CardinalityFieldNumber = 2; private Field.Types.Cardinality cardinality_; public const int NumberFieldNumber = 3; private int number_; public const int NameFieldNumber = 4; private string name_ = ""; public const int TypeUrlFieldNumber = 6; private string typeUrl_ = ""; public const int OneofIndexFieldNumber = 7; private int oneofIndex_; public const int PackedFieldNumber = 8; private bool packed_; public const int OptionsFieldNumber = 9; private static readonly FieldCodec<Option> _repeated_options_codec = FieldCodec.ForMessage<Option>(74u, Option.Parser); private readonly RepeatedField<Option> options_ = new RepeatedField<Option>(); public const int JsonNameFieldNumber = 10; private string jsonName_ = ""; public static MessageParser<Field> Parser { get { return Field._parser; } } public static MessageDescriptor Descriptor { get { return TypeReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Field.Descriptor; } } public Field.Types.Kind Kind { get { return this.kind_; } set { this.kind_ = value; } } public Field.Types.Cardinality Cardinality { get { return this.cardinality_; } set { this.cardinality_ = value; } } public int Number { get { return this.number_; } set { this.number_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string TypeUrl { get { return this.typeUrl_; } set { this.typeUrl_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public int OneofIndex { get { return this.oneofIndex_; } set { this.oneofIndex_ = value; } } public bool Packed { get { return this.packed_; } set { this.packed_ = value; } } public RepeatedField<Option> Options { get { return this.options_; } } public string JsonName { get { return this.jsonName_; } set { this.jsonName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public Field() { } public Field(Field other) : this() { while (true) { IL_F2: uint arg_CA_0 = 1517558561u; while (true) { uint num; switch ((num = (arg_CA_0 ^ 1362300322u)) % 7u) { case 0u: this.cardinality_ = other.cardinality_; arg_CA_0 = (num * 2353230547u ^ 2988512173u); continue; case 1u: this.kind_ = other.kind_; arg_CA_0 = (num * 3775475076u ^ 1856897534u); continue; case 3u: this.number_ = other.number_; this.name_ = other.name_; arg_CA_0 = (num * 863769094u ^ 3888169305u); continue; case 4u: this.jsonName_ = other.jsonName_; arg_CA_0 = (num * 1280363357u ^ 602833274u); continue; case 5u: this.typeUrl_ = other.typeUrl_; this.oneofIndex_ = other.oneofIndex_; this.packed_ = other.packed_; this.options_ = other.options_.Clone(); arg_CA_0 = (num * 2669345575u ^ 4130885210u); continue; case 6u: goto IL_F2; } return; } } } public Field Clone() { return new Field(this); } public override bool Equals(object other) { return this.Equals(other as Field); } public bool Equals(Field other) { if (other == null) { goto IL_47; } goto IL_21D; int arg_1A7_0; while (true) { IL_1A2: switch ((arg_1A7_0 ^ 862320423) % 23) { case 0: return true; case 1: return false; case 2: return false; case 3: return false; case 4: arg_1A7_0 = ((!this.options_.Equals(other.options_)) ? 1565439857 : 1824735849); continue; case 5: return false; case 7: arg_1A7_0 = ((this.Cardinality != other.Cardinality) ? 152634157 : 2016510882); continue; case 8: return false; case 9: return false; case 10: return false; case 11: arg_1A7_0 = (Field.smethod_0(this.JsonName, other.JsonName) ? 149449404 : 305840536); continue; case 12: arg_1A7_0 = (Field.smethod_0(this.Name, other.Name) ? 1638810999 : 1795277875); continue; case 13: arg_1A7_0 = ((this.Kind == other.Kind) ? 880033106 : 851271649); continue; case 14: return false; case 15: return false; case 16: goto IL_21D; case 17: arg_1A7_0 = ((this.OneofIndex != other.OneofIndex) ? 447273274 : 482087163); continue; case 18: arg_1A7_0 = ((this.Packed == other.Packed) ? 2099215414 : 251167455); continue; case 19: arg_1A7_0 = ((this.Number != other.Number) ? 1192303964 : 1562102392); continue; case 20: return false; case 21: goto IL_47; case 22: arg_1A7_0 = ((!Field.smethod_0(this.TypeUrl, other.TypeUrl)) ? 597904361 : 1713629756); continue; } break; } return true; IL_47: arg_1A7_0 = 934293685; goto IL_1A2; IL_21D: arg_1A7_0 = ((other != this) ? 390601170 : 788578966); goto IL_1A2; } public override int GetHashCode() { int num = 1; if (this.Kind != Field.Types.Kind.TYPE_UNKNOWN) { goto IL_120; } goto IL_2B4; uint arg_24F_0; while (true) { IL_24A: uint num2; switch ((num2 = (arg_24F_0 ^ 772844474u)) % 18u) { case 0u: num ^= this.Number.GetHashCode(); arg_24F_0 = (num2 * 1074728398u ^ 569637469u); continue; case 1u: arg_24F_0 = ((this.TypeUrl.Length == 0) ? 154006979u : 1177300085u); continue; case 2u: num ^= this.Name.GetHashCode(); arg_24F_0 = (num2 * 823755890u ^ 1638479049u); continue; case 3u: num ^= this.Cardinality.GetHashCode(); arg_24F_0 = (num2 * 2733477387u ^ 3066376356u); continue; case 5u: arg_24F_0 = ((this.Name.Length == 0) ? 584286629u : 2090275804u); continue; case 6u: num ^= this.OneofIndex.GetHashCode(); arg_24F_0 = (num2 * 4105522207u ^ 310759563u); continue; case 7u: num ^= this.Packed.GetHashCode(); arg_24F_0 = (num2 * 2742135704u ^ 2700444768u); continue; case 8u: goto IL_2B4; case 9u: arg_24F_0 = ((this.OneofIndex != 0) ? 69930116u : 993032201u); continue; case 10u: goto IL_120; case 11u: num ^= this.TypeUrl.GetHashCode(); arg_24F_0 = (num2 * 2058176383u ^ 3854122354u); continue; case 12u: num ^= this.JsonName.GetHashCode(); arg_24F_0 = (num2 * 18230168u ^ 1937529680u); continue; case 13u: arg_24F_0 = (((this.JsonName.Length == 0) ? 199708453u : 1263806287u) ^ num2 * 4185828209u); continue; case 14u: num ^= this.options_.GetHashCode(); arg_24F_0 = 1302894847u; continue; case 15u: arg_24F_0 = ((this.Number != 0) ? 1212283814u : 164632789u); continue; case 16u: num ^= this.Kind.GetHashCode(); arg_24F_0 = (num2 * 1768140344u ^ 604897786u); continue; case 17u: arg_24F_0 = (this.Packed ? 2077800805u : 1142992136u); continue; } break; } return num; IL_120: arg_24F_0 = 1179483330u; goto IL_24A; IL_2B4: arg_24F_0 = ((this.Cardinality == Field.Types.Cardinality.CARDINALITY_UNKNOWN) ? 979495705u : 105392621u); goto IL_24A; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Kind != Field.Types.Kind.TYPE_UNKNOWN) { goto IL_268; } goto IL_326; uint arg_2AE_0; while (true) { IL_2A9: uint num; switch ((num = (arg_2AE_0 ^ 4187353583u)) % 23u) { case 0u: arg_2AE_0 = ((this.Number == 0) ? 4023086830u : 3131276218u); continue; case 2u: output.WriteBool(this.Packed); arg_2AE_0 = (num * 1194861656u ^ 3578232760u); continue; case 3u: goto IL_268; case 4u: output.WriteRawTag(16); output.WriteEnum((int)this.Cardinality); arg_2AE_0 = (num * 1716742199u ^ 2702642270u); continue; case 5u: output.WriteInt32(this.Number); arg_2AE_0 = (num * 3822271554u ^ 3709543298u); continue; case 6u: output.WriteEnum((int)this.Kind); arg_2AE_0 = (num * 3389276479u ^ 1374602406u); continue; case 7u: output.WriteRawTag(64); arg_2AE_0 = (num * 3838947111u ^ 2348024253u); continue; case 8u: arg_2AE_0 = ((Field.smethod_1(this.TypeUrl) != 0) ? 2405903651u : 3134151895u); continue; case 9u: arg_2AE_0 = ((Field.smethod_1(this.Name) == 0) ? 2567204871u : 4079982196u); continue; case 10u: output.WriteRawTag(56); arg_2AE_0 = (num * 1354493129u ^ 2688935955u); continue; case 11u: output.WriteRawTag(24); arg_2AE_0 = (num * 2010446471u ^ 2136856266u); continue; case 12u: output.WriteString(this.TypeUrl); arg_2AE_0 = (num * 1642532057u ^ 3616961750u); continue; case 13u: output.WriteInt32(this.OneofIndex); arg_2AE_0 = (num * 3469563204u ^ 4221243004u); continue; case 14u: this.options_.WriteTo(output, Field._repeated_options_codec); arg_2AE_0 = 3289620358u; continue; case 15u: arg_2AE_0 = (this.Packed ? 3338660871u : 4161635528u); continue; case 16u: output.WriteRawTag(34); output.WriteString(this.Name); arg_2AE_0 = (num * 3019613346u ^ 3007949841u); continue; case 17u: goto IL_326; case 18u: output.WriteRawTag(50); arg_2AE_0 = (num * 485489413u ^ 2129770874u); continue; case 19u: output.WriteRawTag(82); output.WriteString(this.JsonName); arg_2AE_0 = (num * 939752162u ^ 339011202u); continue; case 20u: arg_2AE_0 = ((this.OneofIndex != 0) ? 3526964381u : 3203915012u); continue; case 21u: output.WriteRawTag(8); arg_2AE_0 = (num * 2373930637u ^ 3526912694u); continue; case 22u: arg_2AE_0 = (((Field.smethod_1(this.JsonName) != 0) ? 2070607807u : 926285105u) ^ num * 1128940713u); continue; } break; } return; IL_268: arg_2AE_0 = 2421072390u; goto IL_2A9; IL_326: arg_2AE_0 = ((this.Cardinality == Field.Types.Cardinality.CARDINALITY_UNKNOWN) ? 3609598086u : 4119266311u); goto IL_2A9; } public int CalculateSize() { int num = 0; while (true) { IL_29E: uint arg_249_0 = 2302187739u; while (true) { uint num2; switch ((num2 = (arg_249_0 ^ 4100832533u)) % 18u) { case 0u: num += 2; arg_249_0 = (num2 * 3872970157u ^ 1371870066u); continue; case 1u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Kind); arg_249_0 = (num2 * 215081968u ^ 1092779395u); continue; case 2u: arg_249_0 = ((this.Number == 0) ? 3034099478u : 3436145234u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.TypeUrl); arg_249_0 = (num2 * 2482652596u ^ 361138523u); continue; case 4u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Cardinality); arg_249_0 = (num2 * 2403885844u ^ 3683138043u); continue; case 5u: num += 1 + CodedOutputStream.ComputeInt32Size(this.OneofIndex); arg_249_0 = (num2 * 1757803174u ^ 2149060355u); continue; case 6u: goto IL_29E; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_249_0 = (num2 * 4027933145u ^ 3298080281u); continue; case 8u: arg_249_0 = ((this.Cardinality == Field.Types.Cardinality.CARDINALITY_UNKNOWN) ? 3184820723u : 2917736207u); continue; case 9u: num += this.options_.CalculateSize(Field._repeated_options_codec); arg_249_0 = ((Field.smethod_1(this.JsonName) != 0) ? 3894847655u : 4068816472u); continue; case 10u: arg_249_0 = ((this.OneofIndex != 0) ? 3053182544u : 2641139645u); continue; case 11u: arg_249_0 = ((Field.smethod_1(this.Name) != 0) ? 2988178818u : 2710323430u); continue; case 12u: arg_249_0 = (((this.Kind == Field.Types.Kind.TYPE_UNKNOWN) ? 1959722953u : 200632092u) ^ num2 * 4291149995u); continue; case 14u: num += 1 + CodedOutputStream.ComputeStringSize(this.JsonName); arg_249_0 = (num2 * 2105409930u ^ 3517863340u); continue; case 15u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Number); arg_249_0 = (num2 * 1032054319u ^ 1937571615u); continue; case 16u: arg_249_0 = (this.Packed ? 3436958529u : 4197540278u); continue; case 17u: arg_249_0 = ((Field.smethod_1(this.TypeUrl) == 0) ? 2749171783u : 2564153622u); continue; } return num; } } return num; } public void MergeFrom(Field other) { if (other == null) { goto IL_17A; } goto IL_28D; uint arg_225_0; while (true) { IL_220: uint num; switch ((num = (arg_225_0 ^ 159975507u)) % 19u) { case 0u: arg_225_0 = ((!other.Packed) ? 1638566156u : 529462232u); continue; case 1u: arg_225_0 = ((Field.smethod_1(other.Name) != 0) ? 328082206u : 1034110526u); continue; case 2u: this.TypeUrl = other.TypeUrl; arg_225_0 = (num * 4013860908u ^ 1807190071u); continue; case 3u: this.Packed = other.Packed; arg_225_0 = (num * 311970328u ^ 509037060u); continue; case 4u: arg_225_0 = ((other.Cardinality == Field.Types.Cardinality.CARDINALITY_UNKNOWN) ? 1903277438u : 2119664568u); continue; case 5u: goto IL_17A; case 6u: this.Number = other.Number; arg_225_0 = (num * 422897170u ^ 938495572u); continue; case 7u: arg_225_0 = ((other.Number != 0) ? 951297082u : 1152006966u); continue; case 8u: return; case 9u: this.Cardinality = other.Cardinality; arg_225_0 = (num * 2205349523u ^ 1335205007u); continue; case 10u: this.Kind = other.Kind; arg_225_0 = (num * 1141709406u ^ 420197198u); continue; case 11u: goto IL_28D; case 12u: this.options_.Add(other.options_); arg_225_0 = ((Field.smethod_1(other.JsonName) == 0) ? 1996859116u : 609560575u); continue; case 13u: this.OneofIndex = other.OneofIndex; arg_225_0 = (num * 575899570u ^ 1396746159u); continue; case 15u: this.JsonName = other.JsonName; arg_225_0 = (num * 4265680425u ^ 2675993696u); continue; case 16u: this.Name = other.Name; arg_225_0 = (num * 1763396361u ^ 397169291u); continue; case 17u: arg_225_0 = ((Field.smethod_1(other.TypeUrl) != 0) ? 34404098u : 881099227u); continue; case 18u: arg_225_0 = ((other.OneofIndex != 0) ? 1140974654u : 1819834725u); continue; } break; } return; IL_17A: arg_225_0 = 1776423470u; goto IL_220; IL_28D: arg_225_0 = ((other.Kind != Field.Types.Kind.TYPE_UNKNOWN) ? 1729531258u : 1613085760u); goto IL_220; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3E4: uint num; uint arg_344_0 = ((num = input.ReadTag()) == 0u) ? 128222936u : 2125880398u; while (true) { uint num2; switch ((num2 = (arg_344_0 ^ 397321064u)) % 33u) { case 0u: arg_344_0 = (num2 * 2652405769u ^ 2862387554u); continue; case 1u: arg_344_0 = (((num != 50u) ? 32590834u : 1677943041u) ^ num2 * 361693664u); continue; case 2u: arg_344_0 = (num2 * 1316915927u ^ 734233727u); continue; case 3u: this.JsonName = input.ReadString(); arg_344_0 = 298561703u; continue; case 4u: this.Number = input.ReadInt32(); arg_344_0 = 1177603456u; continue; case 5u: this.Name = input.ReadString(); arg_344_0 = 298561703u; continue; case 6u: arg_344_0 = (((num != 74u) ? 1049430111u : 2054091466u) ^ num2 * 2433146805u); continue; case 7u: this.OneofIndex = input.ReadInt32(); arg_344_0 = 2046666121u; continue; case 8u: arg_344_0 = (((num == 56u) ? 433162777u : 1717569462u) ^ num2 * 2884532970u); continue; case 9u: arg_344_0 = (((num == 16u) ? 3453497819u : 3587331032u) ^ num2 * 2533654899u); continue; case 10u: arg_344_0 = ((num != 24u) ? 620755320u : 541884249u); continue; case 11u: arg_344_0 = (num2 * 3196836177u ^ 3672424205u); continue; case 12u: arg_344_0 = (((num == 82u) ? 1214926017u : 747827853u) ^ num2 * 3724334124u); continue; case 13u: arg_344_0 = 2125880398u; continue; case 14u: this.TypeUrl = input.ReadString(); arg_344_0 = 298561703u; continue; case 15u: goto IL_3E4; case 16u: arg_344_0 = (((num == 34u) ? 2564435485u : 4013905880u) ^ num2 * 4062172201u); continue; case 18u: arg_344_0 = (num2 * 738989470u ^ 294653761u); continue; case 19u: arg_344_0 = (((num == 8u) ? 935237436u : 1089981979u) ^ num2 * 2830034659u); continue; case 20u: this.Packed = input.ReadBool(); arg_344_0 = 808100060u; continue; case 21u: arg_344_0 = (num2 * 831037159u ^ 2680414155u); continue; case 22u: arg_344_0 = (num2 * 855941679u ^ 2882999784u); continue; case 23u: arg_344_0 = (num2 * 2138289014u ^ 2542180949u); continue; case 24u: arg_344_0 = (((num <= 16u) ? 3483065239u : 3646119396u) ^ num2 * 3202748624u); continue; case 25u: this.cardinality_ = (Field.Types.Cardinality)input.ReadEnum(); arg_344_0 = 915466677u; continue; case 26u: arg_344_0 = ((num <= 34u) ? 854408875u : 1175565923u); continue; case 27u: this.options_.AddEntriesFrom(input, Field._repeated_options_codec); arg_344_0 = 298561703u; continue; case 28u: this.kind_ = (Field.Types.Kind)input.ReadEnum(); arg_344_0 = 1462317875u; continue; case 29u: arg_344_0 = ((num != 64u) ? 1985609691u : 708811358u); continue; case 30u: input.SkipLastField(); arg_344_0 = 298561703u; continue; case 31u: arg_344_0 = ((num <= 56u) ? 1641989530u : 650805136u); continue; case 32u: arg_344_0 = (num2 * 4238148767u ^ 2860152459u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/CinematicHandler.cs using AuthServer.Game.Entities; using AuthServer.Network; using Framework.Constants.Net; using Framework.Network.Packets; using System; namespace AuthServer.Game.Packets.PacketHandler { public class CinematicHandler { public static void HandleStartCinematic(ref WorldClass session) { Character arg_24_0 = session.Character; PacketWriter packetWriter = new PacketWriter(ServerMessage.StartCinematic, true); packetWriter.WriteUInt32(0u); session.Send(ref packetWriter); arg_24_0.LoginCinematic = false; } } } <file_sep>/Framework.ObjectDefines/ChatMessageValues.cs using Framework.Constants; using System; using System.Collections.Generic; namespace Framework.ObjectDefines { public class ChatMessageValues { public bool HasLanguage; public bool HasRealmId; public List<SmartGuid> Guids = new List<SmartGuid>(4); public MessageType ChatType = MessageType.ChatMessageSay; public byte Language; public uint RealmId = 1u; public string Message = ""; public string From = ""; public ChatMessageValues() { } public ChatMessageValues(MessageType type, string message, bool hasLanguage = false, bool hasRealmId = false, string source = "") { while (true) { IL_8A: uint arg_6E_0 = 3592418195u; while (true) { uint num; switch ((num = (arg_6E_0 ^ 2680368712u)) % 4u) { case 0u: this.HasLanguage = hasLanguage; arg_6E_0 = (num * 3103694155u ^ 1829086745u); continue; case 2u: goto IL_8A; case 3u: this.ChatType = type; this.Message = message; arg_6E_0 = (num * 2571410878u ^ 3103252370u); continue; } goto Block_1; } } Block_1: this.HasRealmId = hasRealmId; this.From = source; } } } <file_sep>/Google.Protobuf.Reflection/MethodOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class MethodOptions : IMessage, IMessage<MethodOptions>, IEquatable<MethodOptions>, IDeepCloneable<MethodOptions> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MethodOptions.__c __9 = new MethodOptions.__c(); internal MethodOptions cctor>b__29_0() { return new MethodOptions(); } } private static readonly MessageParser<MethodOptions> _parser = new MessageParser<MethodOptions>(new Func<MethodOptions>(MethodOptions.__c.__9.<.cctor>b__29_0)); public const int DeprecatedFieldNumber = 33; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<MethodOptions> Parser { get { return MethodOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[15]; } } MessageDescriptor IMessage.Descriptor { get { return MethodOptions.Descriptor; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public MethodOptions() { } public MethodOptions(MethodOptions other) : this() { this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public MethodOptions Clone() { return new MethodOptions(this); } public override bool Equals(object other) { return this.Equals(other as MethodOptions); } public bool Equals(MethodOptions other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -570054175) % 9) { case 0: return true; case 1: return false; case 2: arg_72_0 = ((this.Deprecated == other.Deprecated) ? -323969140 : -908482657); continue; case 3: return false; case 4: arg_72_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? -1109812132 : -1976419814); continue; case 5: goto IL_15; case 7: goto IL_B0; case 8: return false; } break; } return true; IL_15: arg_72_0 = -252551865; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? -161066970 : -18211626); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.Deprecated) { goto IL_0A; } goto IL_50; uint arg_34_0; while (true) { IL_2F: uint num2; switch ((num2 = (arg_34_0 ^ 287211555u)) % 4u) { case 0u: goto IL_50; case 1u: num ^= this.Deprecated.GetHashCode(); arg_34_0 = (num2 * 1458944778u ^ 922708749u); continue; case 3u: goto IL_0A; } break; } return num; IL_0A: arg_34_0 = 371510130u; goto IL_2F; IL_50: num ^= this.uninterpretedOption_.GetHashCode(); arg_34_0 = 2140440589u; goto IL_2F; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Deprecated) { goto IL_08; } goto IL_55; uint arg_39_0; while (true) { IL_34: uint num; switch ((num = (arg_39_0 ^ 2685828587u)) % 4u) { case 1u: output.WriteRawTag(136, 2); output.WriteBool(this.Deprecated); arg_39_0 = (num * 4246634228u ^ 2215050024u); continue; case 2u: goto IL_08; case 3u: goto IL_55; } break; } return; IL_08: arg_39_0 = 2466340734u; goto IL_34; IL_55: this.uninterpretedOption_.WriteTo(output, MethodOptions._repeated_uninterpretedOption_codec); arg_39_0 = 4176444511u; goto IL_34; } public int CalculateSize() { int num = 0; while (true) { IL_7D: uint arg_5D_0 = 4230789937u; while (true) { uint num2; switch ((num2 = (arg_5D_0 ^ 3465929929u)) % 5u) { case 0u: goto IL_7D; case 2u: num += 3; arg_5D_0 = (num2 * 1130018381u ^ 3984022599u); continue; case 3u: arg_5D_0 = (((!this.Deprecated) ? 4224658914u : 3273157264u) ^ num2 * 1668928858u); continue; case 4u: num += this.uninterpretedOption_.CalculateSize(MethodOptions._repeated_uninterpretedOption_codec); arg_5D_0 = 2656716330u; continue; } return num; } } return num; } public void MergeFrom(MethodOptions other) { if (other == null) { goto IL_45; } goto IL_7F; uint arg_4F_0; while (true) { IL_4A: uint num; switch ((num = (arg_4F_0 ^ 860807662u)) % 6u) { case 0u: goto IL_45; case 1u: return; case 3u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_4F_0 = 1023993496u; continue; case 4u: this.Deprecated = other.Deprecated; arg_4F_0 = (num * 3468148291u ^ 2799119977u); continue; case 5u: goto IL_7F; } break; } return; IL_45: arg_4F_0 = 83809757u; goto IL_4A; IL_7F: arg_4F_0 = (other.Deprecated ? 1116846244u : 1464362039u); goto IL_4A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_FC: uint num; uint arg_BC_0 = ((num = input.ReadTag()) == 0u) ? 244869978u : 269940415u; while (true) { uint num2; switch ((num2 = (arg_BC_0 ^ 1852255009u)) % 9u) { case 0u: arg_BC_0 = 269940415u; continue; case 2u: arg_BC_0 = (((num != 7994u) ? 3045351795u : 4156237468u) ^ num2 * 190727184u); continue; case 3u: input.SkipLastField(); arg_BC_0 = (num2 * 2174032624u ^ 4241183634u); continue; case 4u: this.uninterpretedOption_.AddEntriesFrom(input, MethodOptions._repeated_uninterpretedOption_codec); arg_BC_0 = 1762160498u; continue; case 5u: goto IL_FC; case 6u: arg_BC_0 = ((num != 264u) ? 186343085u : 136635237u); continue; case 7u: arg_BC_0 = (num2 * 2569615730u ^ 3870281566u); continue; case 8u: this.Deprecated = input.ReadBool(); arg_BC_0 = 1344522983u; continue; } return; } } } } } <file_sep>/AuthServer.Managers/ModuleManager.cs using Framework.Constants.Misc; using Framework.Database.Auth.Entities; using Framework.Logging; using Framework.Misc; using System; using System.Collections.Generic; namespace AuthServer.Managers { internal class ModuleManager : Singleton<ModuleManager> { public readonly ListModule ModuleList; public readonly ListModule Module64List; public readonly ListModule ModuleMacList; private ModuleManager() { while (true) { IL_66: uint arg_4A_0 = 1511803485u; while (true) { uint num; switch ((num = (arg_4A_0 ^ 770676634u)) % 4u) { case 0u: goto IL_66; case 1u: this.ModuleMacList = new ListModule(); arg_4A_0 = (num * 4094155014u ^ 2835633086u); continue; case 3u: this.ModuleList = new ListModule(); this.Module64List = new ListModule(); arg_4A_0 = (num * 29915891u ^ 1375251382u); continue; } goto Block_1; } } Block_1: this.UpdateModules(); } public void UpdateModules() { Log.Message(LogType.Debug, Module.smethod_36<string>(1493557509u), Array.Empty<object>()); while (true) { IL_3E5: uint arg_3A3_0 = 3898085660u; while (true) { uint num; switch ((num = (arg_3A3_0 ^ 3322766058u)) % 13u) { case 0u: { Module item; this.ModuleMacList.Add(item); arg_3A3_0 = (num * 584349903u ^ 1706511698u); continue; } case 1u: Log.Message(LogType.Debug, Module.smethod_35<string>(2248033240u), new object[] { this.ModuleList.Count }); arg_3A3_0 = (num * 2365859414u ^ 101854083u); continue; case 2u: { Module item2; this.ModuleList.Add(item2); Module item3 = new Module { Hash = Module.smethod_36<string>(4294715761u), Type = Module.smethod_36<string>(115771085u), Size = 0, Data = "" }; this.ModuleList.Add(item3); arg_3A3_0 = (num * 1254024579u ^ 2984690686u); continue; } case 3u: { Module item4 = new Module { Hash = Module.smethod_35<string>(3549965418u), Type = Module.smethod_35<string>(3018081477u), Size = 321, Data = "" }; this.ModuleMacList.Add(item4); Module item5 = new Module { Hash = Module.smethod_36<string>(3722531539u), Type = Module.smethod_34<string>(1753439462u), Size = 0, Data = "" }; arg_3A3_0 = (num * 4123436389u ^ 3489384571u); continue; } case 4u: { Module item5; this.ModuleMacList.Add(item5); arg_3A3_0 = (num * 1500929652u ^ 1039204789u); continue; } case 5u: goto IL_3E5; case 6u: { Module item6 = new Module { Hash = Module.smethod_33<string>(363890763u), Type = Module.smethod_33<string>(2121968294u), Size = 512, Data = Module.smethod_36<string>(1140306251u) }; this.Module64List.Add(item6); arg_3A3_0 = (num * 2646558481u ^ 2055126984u); continue; } case 7u: { Module item7 = new Module { Hash = Module.smethod_34<string>(556356528u), Type = Module.smethod_34<string>(1753439462u), Size = 321, Data = "" }; this.Module64List.Add(item7); arg_3A3_0 = (num * 1010931423u ^ 936505321u); continue; } case 9u: { Module item8 = new Module { Hash = Module.smethod_37<string>(1344610424u), Type = Module.smethod_35<string>(3018081477u), Size = 512, Data = Module.smethod_33<string>(1470066224u) }; this.ModuleList.Add(item8); Module item2 = new Module { Hash = Module.smethod_34<string>(1052702955u), Type = Module.smethod_33<string>(2121968294u), Size = 321, Data = "" }; arg_3A3_0 = (num * 512836407u ^ 1160546673u); continue; } case 10u: { Module item = new Module { Hash = Module.smethod_37<string>(1958248753u), Type = Module.smethod_37<string>(1841303513u), Size = 512, Data = Module.smethod_33<string>(1470066224u) }; arg_3A3_0 = (num * 2115783901u ^ 226394251u); continue; } case 11u: { Module item9; this.Module64List.Add(item9); arg_3A3_0 = (num * 3434466226u ^ 2447004371u); continue; } case 12u: { Module item9 = new Module { Hash = Module.smethod_36<string>(4129829668u), Type = Module.smethod_33<string>(2121968294u), Size = 0, Data = "" }; arg_3A3_0 = (num * 3224331562u ^ 3809534528u); continue; } } return; } } } } } <file_sep>/Google.Protobuf.WellKnownTypes/Type.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Type : IMessage<Type>, IEquatable<Type>, IDeepCloneable<Type>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Type.__c __9 = new Type.__c(); internal Type cctor>b__49_0() { return new Type(); } } private static readonly MessageParser<Type> _parser = new MessageParser<Type>(new Func<Type>(Type.__c.__9.<.cctor>b__49_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int FieldsFieldNumber = 2; private static readonly FieldCodec<Field> _repeated_fields_codec; private readonly RepeatedField<Field> fields_ = new RepeatedField<Field>(); public const int OneofsFieldNumber = 3; private static readonly FieldCodec<string> _repeated_oneofs_codec; private readonly RepeatedField<string> oneofs_ = new RepeatedField<string>(); public const int OptionsFieldNumber = 4; private static readonly FieldCodec<Option> _repeated_options_codec; private readonly RepeatedField<Option> options_ = new RepeatedField<Option>(); public const int SourceContextFieldNumber = 5; private SourceContext sourceContext_; public const int SyntaxFieldNumber = 6; private Syntax syntax_; public static MessageParser<Type> Parser { get { return Type._parser; } } public static MessageDescriptor Descriptor { get { return TypeReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Type.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public RepeatedField<Field> Fields { get { return this.fields_; } } public RepeatedField<string> Oneofs { get { return this.oneofs_; } } public RepeatedField<Option> Options { get { return this.options_; } } public SourceContext SourceContext { get { return this.sourceContext_; } set { this.sourceContext_ = value; } } public Syntax Syntax { get { return this.syntax_; } set { this.syntax_ = value; } } public Type() { } public Type(Type other) : this() { while (true) { IL_A7: uint arg_8B_0 = 1594218872u; while (true) { uint num; switch ((num = (arg_8B_0 ^ 1784191605u)) % 4u) { case 0u: this.options_ = other.options_.Clone(); this.SourceContext = ((other.sourceContext_ != null) ? other.SourceContext.Clone() : null); this.syntax_ = other.syntax_; arg_8B_0 = 30791374u; continue; case 1u: this.name_ = other.name_; this.fields_ = other.fields_.Clone(); this.oneofs_ = other.oneofs_.Clone(); arg_8B_0 = (num * 1149469267u ^ 1325660066u); continue; case 2u: goto IL_A7; } return; } } } public Type Clone() { return new Type(this); } public override bool Equals(object other) { return this.Equals(other as Type); } public bool Equals(Type other) { if (other == null) { goto IL_CF; } goto IL_18F; int arg_131_0; while (true) { IL_12C: switch ((arg_131_0 ^ 2114162229) % 17) { case 0: return false; case 1: return false; case 2: arg_131_0 = ((!this.options_.Equals(other.options_)) ? 208225108 : 1123407628); continue; case 3: return false; case 4: return false; case 5: return true; case 6: arg_131_0 = (Type.smethod_0(this.Name, other.Name) ? 315116262 : 1121047835); continue; case 7: goto IL_CF; case 9: arg_131_0 = ((this.Syntax == other.Syntax) ? 1686557502 : 474422881); continue; case 10: arg_131_0 = (Type.smethod_1(this.SourceContext, other.SourceContext) ? 1257128765 : 1117512738); continue; case 11: goto IL_18F; case 12: return false; case 13: return false; case 14: return false; case 15: arg_131_0 = ((!this.oneofs_.Equals(other.oneofs_)) ? 1826603795 : 1068833382); continue; case 16: arg_131_0 = ((!this.fields_.Equals(other.fields_)) ? 1932502070 : 459823872); continue; } break; } return true; IL_CF: arg_131_0 = 648993521; goto IL_12C; IL_18F: arg_131_0 = ((other != this) ? 698317207 : 17421203); goto IL_12C; } public override int GetHashCode() { int num = 1; while (true) { IL_176: uint arg_13D_0 = 3551578512u; while (true) { uint num2; switch ((num2 = (arg_13D_0 ^ 2684541398u)) % 11u) { case 0u: num ^= Type.smethod_3(this.Name); arg_13D_0 = (num2 * 598040055u ^ 2934889532u); continue; case 2u: num ^= Type.smethod_3(this.fields_); arg_13D_0 = 2465774428u; continue; case 3u: goto IL_176; case 4u: num ^= this.Syntax.GetHashCode(); arg_13D_0 = (num2 * 2500589407u ^ 2680514981u); continue; case 5u: arg_13D_0 = (((this.sourceContext_ != null) ? 839243781u : 399095481u) ^ num2 * 118666725u); continue; case 6u: num ^= Type.smethod_3(this.oneofs_); arg_13D_0 = (num2 * 3094813739u ^ 194445020u); continue; case 7u: arg_13D_0 = (((Type.smethod_2(this.Name) == 0) ? 1063613245u : 2141242785u) ^ num2 * 3869679140u); continue; case 8u: arg_13D_0 = ((this.Syntax == Syntax.SYNTAX_PROTO2) ? 3810278041u : 4157471634u); continue; case 9u: num ^= Type.smethod_3(this.SourceContext); arg_13D_0 = (num2 * 2841999123u ^ 3780500600u); continue; case 10u: num ^= Type.smethod_3(this.options_); arg_13D_0 = (num2 * 3491902742u ^ 4053679412u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Type.smethod_2(this.Name) != 0) { goto IL_111; } goto IL_150; uint arg_11B_0; while (true) { IL_116: uint num; switch ((num = (arg_11B_0 ^ 3396584263u)) % 10u) { case 0u: goto IL_111; case 1u: this.options_.WriteTo(output, Type._repeated_options_codec); arg_11B_0 = (((this.sourceContext_ != null) ? 3099866348u : 2457687287u) ^ num * 2008561098u); continue; case 2u: arg_11B_0 = ((this.Syntax != Syntax.SYNTAX_PROTO2) ? 3868271045u : 4037443208u); continue; case 3u: output.WriteMessage(this.SourceContext); arg_11B_0 = (num * 535794424u ^ 778472253u); continue; case 4u: output.WriteRawTag(10); output.WriteString(this.Name); arg_11B_0 = (num * 3939516736u ^ 3141754223u); continue; case 5u: output.WriteRawTag(42); arg_11B_0 = (num * 106097591u ^ 1649219793u); continue; case 6u: output.WriteRawTag(48); output.WriteEnum((int)this.Syntax); arg_11B_0 = (num * 648277266u ^ 1221212588u); continue; case 8u: goto IL_150; case 9u: this.oneofs_.WriteTo(output, Type._repeated_oneofs_codec); arg_11B_0 = (num * 2715144859u ^ 2096967227u); continue; } break; } return; IL_111: arg_11B_0 = 3446956009u; goto IL_116; IL_150: this.fields_.WriteTo(output, Type._repeated_fields_codec); arg_11B_0 = 3474051324u; goto IL_116; } public int CalculateSize() { int num = 0; while (true) { IL_16F: uint arg_13A_0 = 2173434570u; while (true) { uint num2; switch ((num2 = (arg_13A_0 ^ 3983612156u)) % 10u) { case 0u: goto IL_16F; case 1u: num += this.options_.CalculateSize(Type._repeated_options_codec); arg_13A_0 = (num2 * 386158043u ^ 2530997346u); continue; case 3u: arg_13A_0 = (((this.sourceContext_ == null) ? 3515602950u : 2807441700u) ^ num2 * 2101828367u); continue; case 4u: num += this.fields_.CalculateSize(Type._repeated_fields_codec); num += this.oneofs_.CalculateSize(Type._repeated_oneofs_codec); arg_13A_0 = 2846669633u; continue; case 5u: arg_13A_0 = ((this.Syntax == Syntax.SYNTAX_PROTO2) ? 2360905952u : 3627108046u); continue; case 6u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax); arg_13A_0 = (num2 * 4199339026u ^ 1540921188u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_13A_0 = (num2 * 2710985862u ^ 3305458544u); continue; case 8u: arg_13A_0 = (((Type.smethod_2(this.Name) == 0) ? 3228541812u : 2273499305u) ^ num2 * 3757963089u); continue; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceContext); arg_13A_0 = (num2 * 3802474499u ^ 295355340u); continue; } return num; } } return num; } public void MergeFrom(Type other) { if (other == null) { goto IL_125; } goto IL_1A8; uint arg_158_0; while (true) { IL_153: uint num; switch ((num = (arg_158_0 ^ 1530256243u)) % 13u) { case 0u: this.fields_.Add(other.fields_); this.oneofs_.Add(other.oneofs_); arg_158_0 = 1118211876u; continue; case 1u: return; case 2u: goto IL_125; case 3u: arg_158_0 = (((this.sourceContext_ != null) ? 635270549u : 1497180455u) ^ num * 810807132u); continue; case 4u: this.Name = other.Name; arg_158_0 = (num * 674857504u ^ 642612187u); continue; case 5u: this.sourceContext_ = new SourceContext(); arg_158_0 = (num * 3704994604u ^ 183082057u); continue; case 6u: arg_158_0 = ((other.Syntax == Syntax.SYNTAX_PROTO2) ? 315676387u : 1518235027u); continue; case 8u: this.Syntax = other.Syntax; arg_158_0 = (num * 1280848897u ^ 2913067011u); continue; case 9u: this.options_.Add(other.options_); arg_158_0 = (num * 114902021u ^ 147302606u); continue; case 10u: goto IL_1A8; case 11u: this.SourceContext.MergeFrom(other.SourceContext); arg_158_0 = 1252830302u; continue; case 12u: arg_158_0 = (((other.sourceContext_ != null) ? 4268735796u : 2591164048u) ^ num * 2524571809u); continue; } break; } return; IL_125: arg_158_0 = 331129230u; goto IL_153; IL_1A8: arg_158_0 = ((Type.smethod_2(other.Name) == 0) ? 983867771u : 248541686u); goto IL_153; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2C4: uint num; uint arg_24C_0 = ((num = input.ReadTag()) != 0u) ? 3303222548u : 2466391961u; while (true) { uint num2; switch ((num2 = (arg_24C_0 ^ 3932053189u)) % 23u) { case 0u: this.options_.AddEntriesFrom(input, Type._repeated_options_codec); arg_24C_0 = 4239985109u; continue; case 1u: arg_24C_0 = ((num > 26u) ? 3057928683u : 2765646242u); continue; case 2u: arg_24C_0 = (num2 * 3090298617u ^ 583141695u); continue; case 3u: this.syntax_ = (Syntax)input.ReadEnum(); arg_24C_0 = 3755402035u; continue; case 4u: arg_24C_0 = ((num != 34u) ? 2625866792u : 2827263868u); continue; case 5u: arg_24C_0 = ((this.sourceContext_ == null) ? 2444856007u : 4107853847u); continue; case 6u: arg_24C_0 = (num2 * 1731559032u ^ 3494661299u); continue; case 7u: arg_24C_0 = 3303222548u; continue; case 8u: arg_24C_0 = (((num == 26u) ? 4071630309u : 3256478085u) ^ num2 * 1489682256u); continue; case 9u: arg_24C_0 = (((num == 18u) ? 1684128132u : 2065955360u) ^ num2 * 2521500490u); continue; case 10u: arg_24C_0 = (num2 * 3823040250u ^ 1283205715u); continue; case 11u: arg_24C_0 = (num2 * 1141052967u ^ 3212520913u); continue; case 12u: this.sourceContext_ = new SourceContext(); arg_24C_0 = (num2 * 3317172375u ^ 3407281465u); continue; case 13u: input.ReadMessage(this.sourceContext_); arg_24C_0 = 3755402035u; continue; case 14u: this.fields_.AddEntriesFrom(input, Type._repeated_fields_codec); arg_24C_0 = 3427043211u; continue; case 15u: arg_24C_0 = (((num == 10u) ? 875231425u : 1133002015u) ^ num2 * 3277510381u); continue; case 16u: arg_24C_0 = (((num != 42u) ? 2870773346u : 3054552501u) ^ num2 * 1559962450u); continue; case 17u: this.Name = input.ReadString(); arg_24C_0 = 2552326325u; continue; case 18u: goto IL_2C4; case 20u: this.oneofs_.AddEntriesFrom(input, Type._repeated_oneofs_codec); arg_24C_0 = 3755402035u; continue; case 21u: arg_24C_0 = (((num != 48u) ? 229460365u : 1571170583u) ^ num2 * 3536442826u); continue; case 22u: input.SkipLastField(); arg_24C_0 = 3755402035u; continue; } return; } } } static Type() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_76: uint arg_5A_0 = 1610957627u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 878504226u)) % 4u) { case 0u: Type._repeated_oneofs_codec = FieldCodec.ForString(26u); arg_5A_0 = (num * 2245590197u ^ 2186357532u); continue; case 1u: Type._repeated_fields_codec = FieldCodec.ForMessage<Field>(18u, Field.Parser); arg_5A_0 = (num * 1955988881u ^ 3088312643u); continue; case 3u: goto IL_76; } goto Block_1; } } Block_1: Type._repeated_options_codec = FieldCodec.ForMessage<Option>(34u, Option.Parser); } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/QueryRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class QueryRequest : IMessage<QueryRequest>, IEquatable<QueryRequest>, IDeepCloneable<QueryRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly QueryRequest.__c __9 = new QueryRequest.__c(); internal QueryRequest cctor>b__34_0() { return new QueryRequest(); } } private static readonly MessageParser<QueryRequest> _parser = new MessageParser<QueryRequest>(new Func<QueryRequest>(QueryRequest.__c.__9.<.cctor>b__34_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int KeyFieldNumber = 2; private static readonly FieldCodec<FieldKey> _repeated_key_codec = FieldCodec.ForMessage<FieldKey>(18u, FieldKey.Parser); private readonly RepeatedField<FieldKey> key_ = new RepeatedField<FieldKey>(); public const int AgentIdFieldNumber = 3; private EntityId agentId_; public static MessageParser<QueryRequest> Parser { get { return QueryRequest._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return QueryRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public RepeatedField<FieldKey> Key { get { return this.key_; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public QueryRequest() { } public QueryRequest(QueryRequest other) : this() { while (true) { IL_55: int arg_3F_0 = 926773904; while (true) { switch ((arg_3F_0 ^ 413003863) % 3) { case 0: goto IL_55; case 2: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); this.key_ = other.key_.Clone(); arg_3F_0 = 142106793; continue; } goto Block_2; } } Block_2: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); } public QueryRequest Clone() { return new QueryRequest(this); } public override bool Equals(object other) { return this.Equals(other as QueryRequest); } public bool Equals(QueryRequest other) { if (other == null) { goto IL_44; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -667700461) % 11) { case 1: return true; case 2: goto IL_EC; case 3: arg_A6_0 = (this.key_.Equals(other.key_) ? -1515566658 : -2142241530); continue; case 4: arg_A6_0 = (QueryRequest.smethod_0(this.EntityId, other.EntityId) ? -540162475 : -1365038569); continue; case 5: return false; case 6: return false; case 7: return false; case 8: return false; case 9: goto IL_44; case 10: arg_A6_0 = ((!QueryRequest.smethod_0(this.AgentId, other.AgentId)) ? -1739426010 : -1043527728); continue; } break; } return true; IL_44: arg_A6_0 = -1238690822; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? -246531064 : -1466261895); goto IL_A1; } public override int GetHashCode() { int num = 1 ^ QueryRequest.smethod_1(this.EntityId); num ^= QueryRequest.smethod_1(this.key_); if (this.agentId_ != null) { while (true) { IL_60: uint arg_48_0 = 2535793420u; while (true) { uint num2; switch ((num2 = (arg_48_0 ^ 2623518650u)) % 3u) { case 1u: num ^= QueryRequest.smethod_1(this.AgentId); arg_48_0 = (num2 * 1950425143u ^ 3658049383u); continue; case 2u: goto IL_60; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_BB: uint arg_97_0 = 1746305688u; while (true) { uint num; switch ((num = (arg_97_0 ^ 985165624u)) % 6u) { case 1u: output.WriteRawTag(26); arg_97_0 = (num * 2314329460u ^ 3914495627u); continue; case 2u: output.WriteMessage(this.EntityId); this.key_.WriteTo(output, QueryRequest._repeated_key_codec); arg_97_0 = (num * 3801791104u ^ 3092223524u); continue; case 3u: output.WriteMessage(this.AgentId); arg_97_0 = (num * 1586987993u ^ 279251139u); continue; case 4u: arg_97_0 = (((this.agentId_ != null) ? 205850139u : 1541994660u) ^ num * 1526292084u); continue; case 5u: goto IL_BB; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.EntityId)); num += this.key_.CalculateSize(QueryRequest._repeated_key_codec); while (true) { IL_8E: uint arg_72_0 = 3238002587u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 4018910518u)) % 4u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_72_0 = (num2 * 3139827774u ^ 636509164u); continue; case 1u: arg_72_0 = (((this.agentId_ != null) ? 3261090519u : 2805836861u) ^ num2 * 2974957717u); continue; case 3u: goto IL_8E; } return num; } } return num; } public void MergeFrom(QueryRequest other) { if (other == null) { goto IL_C0; } goto IL_171; uint arg_125_0; while (true) { IL_120: uint num; switch ((num = (arg_125_0 ^ 3203301847u)) % 12u) { case 0u: goto IL_171; case 1u: arg_125_0 = (((this.entityId_ == null) ? 733043829u : 1179250735u) ^ num * 1857080742u); continue; case 2u: this.key_.Add(other.key_); arg_125_0 = 3716649840u; continue; case 4u: this.entityId_ = new EntityId(); arg_125_0 = (num * 831432120u ^ 2934225273u); continue; case 5u: goto IL_C0; case 6u: this.EntityId.MergeFrom(other.EntityId); arg_125_0 = 2857550985u; continue; case 7u: return; case 8u: this.AgentId.MergeFrom(other.AgentId); arg_125_0 = 2425374856u; continue; case 9u: arg_125_0 = (((this.agentId_ == null) ? 150536318u : 784118968u) ^ num * 3873053395u); continue; case 10u: this.agentId_ = new EntityId(); arg_125_0 = (num * 3670180736u ^ 3291234283u); continue; case 11u: arg_125_0 = (((other.agentId_ != null) ? 354615305u : 1316158935u) ^ num * 2048112265u); continue; } break; } return; IL_C0: arg_125_0 = 2827912808u; goto IL_120; IL_171: arg_125_0 = ((other.entityId_ != null) ? 3186707150u : 2857550985u); goto IL_120; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1CF: uint num; uint arg_177_0 = ((num = input.ReadTag()) == 0u) ? 4250250072u : 3152056973u; while (true) { uint num2; switch ((num2 = (arg_177_0 ^ 4137094450u)) % 15u) { case 0u: arg_177_0 = (((num != 18u) ? 2486854431u : 3946449310u) ^ num2 * 2718764205u); continue; case 1u: goto IL_1CF; case 2u: arg_177_0 = (num2 * 1894434957u ^ 2410940356u); continue; case 3u: input.SkipLastField(); arg_177_0 = (num2 * 703533940u ^ 86569248u); continue; case 4u: arg_177_0 = 3152056973u; continue; case 5u: this.agentId_ = new EntityId(); arg_177_0 = (num2 * 1627376009u ^ 2087393944u); continue; case 6u: arg_177_0 = ((num == 10u) ? 3242714739u : 2888387052u); continue; case 7u: this.key_.AddEntriesFrom(input, QueryRequest._repeated_key_codec); arg_177_0 = 3717511764u; continue; case 8u: arg_177_0 = ((this.entityId_ == null) ? 3788598182u : 4211174114u); continue; case 9u: input.ReadMessage(this.entityId_); arg_177_0 = 2261957346u; continue; case 10u: arg_177_0 = (((num == 26u) ? 477253500u : 2034836626u) ^ num2 * 2218590563u); continue; case 11u: arg_177_0 = ((this.agentId_ != null) ? 3944633473u : 3173351715u); continue; case 13u: this.entityId_ = new EntityId(); arg_177_0 = (num2 * 4142578163u ^ 138229918u); continue; case 14u: input.ReadMessage(this.agentId_); arg_177_0 = 3717511764u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/FieldKey.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class FieldKey : IMessage<FieldKey>, IEquatable<FieldKey>, IDeepCloneable<FieldKey>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldKey.__c __9 = new FieldKey.__c(); internal FieldKey cctor>b__39_0() { return new FieldKey(); } } private static readonly MessageParser<FieldKey> _parser = new MessageParser<FieldKey>(new Func<FieldKey>(FieldKey.__c.__9.<.cctor>b__39_0)); public const int ProgramFieldNumber = 1; private uint program_; public const int GroupFieldNumber = 2; private uint group_; public const int FieldFieldNumber = 3; private uint field_; public const int UniqueIdFieldNumber = 4; private ulong uniqueId_; public static MessageParser<FieldKey> Parser { get { return FieldKey._parser; } } public static MessageDescriptor Descriptor { get { return PresenceTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return FieldKey.Descriptor; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Group { get { return this.group_; } set { this.group_ = value; } } public uint Field { get { return this.field_; } set { this.field_ = value; } } public ulong UniqueId { get { return this.uniqueId_; } set { this.uniqueId_ = value; } } public FieldKey() { } public FieldKey(FieldKey other) : this() { this.program_ = other.program_; this.group_ = other.group_; this.field_ = other.field_; this.uniqueId_ = other.uniqueId_; } public FieldKey Clone() { return new FieldKey(this); } public override bool Equals(object other) { return this.Equals(other as FieldKey); } public bool Equals(FieldKey other) { if (other == null) { goto IL_66; } goto IL_10C; int arg_BE_0; while (true) { IL_B9: switch ((arg_BE_0 ^ -1945981397) % 13) { case 0: return false; case 1: arg_BE_0 = ((this.Field != other.Field) ? -296246589 : -1724363297); continue; case 3: return false; case 4: return false; case 5: arg_BE_0 = ((this.Program == other.Program) ? -1035847895 : -235361727); continue; case 6: goto IL_10C; case 7: return false; case 8: return false; case 9: goto IL_66; case 10: return true; case 11: arg_BE_0 = ((this.Group != other.Group) ? -183271994 : -731353487); continue; case 12: arg_BE_0 = ((this.UniqueId == other.UniqueId) ? -1712269828 : -1292657692); continue; } break; } return true; IL_66: arg_BE_0 = -1124533097; goto IL_B9; IL_10C: arg_BE_0 = ((other != this) ? -1237338681 : -1800938118); goto IL_B9; } public override int GetHashCode() { int num = 1; while (true) { IL_DE: uint arg_B6_0 = 4017449496u; while (true) { uint num2; switch ((num2 = (arg_B6_0 ^ 2360746480u)) % 7u) { case 0u: num ^= this.Field.GetHashCode(); arg_B6_0 = (num2 * 2285650989u ^ 3461434915u); continue; case 2u: num ^= this.Group.GetHashCode(); arg_B6_0 = (num2 * 1077905925u ^ 3267391487u); continue; case 3u: goto IL_DE; case 4u: arg_B6_0 = (((this.UniqueId == 0uL) ? 1503050965u : 992345363u) ^ num2 * 2177141497u); continue; case 5u: num ^= this.UniqueId.GetHashCode(); arg_B6_0 = (num2 * 4133319517u ^ 277118358u); continue; case 6u: num ^= this.Program.GetHashCode(); arg_B6_0 = (num2 * 3329726482u ^ 1849153555u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_111: uint arg_E0_0 = 1157904819u; while (true) { uint num; switch ((num = (arg_E0_0 ^ 467479888u)) % 9u) { case 0u: goto IL_111; case 1u: output.WriteRawTag(32); output.WriteUInt64(this.UniqueId); arg_E0_0 = (num * 663807890u ^ 141047044u); continue; case 2u: output.WriteRawTag(24); arg_E0_0 = (num * 1152349119u ^ 2449291716u); continue; case 3u: output.WriteUInt32(this.Program); arg_E0_0 = (num * 2346277929u ^ 561594654u); continue; case 4u: arg_E0_0 = (((this.UniqueId != 0uL) ? 1793733222u : 1711878664u) ^ num * 4260744256u); continue; case 5u: output.WriteUInt32(this.Field); arg_E0_0 = (num * 1551564995u ^ 811026937u); continue; case 6u: output.WriteUInt32(this.Group); arg_E0_0 = (num * 669904672u ^ 3851692484u); continue; case 8u: output.WriteRawTag(16); arg_E0_0 = (num * 753962784u ^ 2820837299u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_B1: uint arg_91_0 = 3532926061u; while (true) { uint num2; switch ((num2 = (arg_91_0 ^ 2708501774u)) % 5u) { case 0u: goto IL_B1; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Program); arg_91_0 = (num2 * 3190269928u ^ 3184607141u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Group); num += 1 + CodedOutputStream.ComputeUInt32Size(this.Field); arg_91_0 = (((this.UniqueId != 0uL) ? 46055387u : 1444317967u) ^ num2 * 3093268280u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.UniqueId); arg_91_0 = (num2 * 368700993u ^ 3998530330u); continue; } return num; } } return num; } public void MergeFrom(FieldKey other) { if (other == null) { goto IL_F3; } goto IL_145; uint arg_FD_0; while (true) { IL_F8: uint num; switch ((num = (arg_FD_0 ^ 1684565293u)) % 11u) { case 0u: goto IL_F3; case 2u: this.UniqueId = other.UniqueId; arg_FD_0 = (num * 1375906450u ^ 1466106239u); continue; case 3u: arg_FD_0 = ((other.Field == 0u) ? 2114476295u : 994710479u); continue; case 4u: arg_FD_0 = ((other.UniqueId != 0uL) ? 1884026171u : 202660339u); continue; case 5u: arg_FD_0 = ((other.Group != 0u) ? 732699988u : 1593377318u); continue; case 6u: this.Program = other.Program; arg_FD_0 = (num * 3584599342u ^ 519440853u); continue; case 7u: goto IL_145; case 8u: return; case 9u: this.Group = other.Group; arg_FD_0 = (num * 3885761744u ^ 3303031926u); continue; case 10u: this.Field = other.Field; arg_FD_0 = (num * 2616293697u ^ 3228913765u); continue; } break; } return; IL_F3: arg_FD_0 = 1468032242u; goto IL_F8; IL_145: arg_FD_0 = ((other.Program != 0u) ? 717847544u : 931621523u); goto IL_F8; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1C4: uint num; uint arg_168_0 = ((num = input.ReadTag()) == 0u) ? 29722375u : 1951478127u; while (true) { uint num2; switch ((num2 = (arg_168_0 ^ 1173279654u)) % 16u) { case 0u: this.Group = input.ReadUInt32(); arg_168_0 = 1497022467u; continue; case 2u: arg_168_0 = (num2 * 787707759u ^ 313354610u); continue; case 3u: arg_168_0 = ((num != 24u) ? 953055726u : 135232701u); continue; case 4u: arg_168_0 = (num2 * 1993115784u ^ 299730211u); continue; case 5u: goto IL_1C4; case 6u: this.Program = input.ReadUInt32(); arg_168_0 = 1497022467u; continue; case 7u: arg_168_0 = 1951478127u; continue; case 8u: arg_168_0 = (((num != 32u) ? 878382252u : 1841749595u) ^ num2 * 1142073620u); continue; case 9u: arg_168_0 = ((num <= 16u) ? 2106295161u : 1471446229u); continue; case 10u: input.SkipLastField(); arg_168_0 = 1303249304u; continue; case 11u: this.Field = input.ReadUInt32(); arg_168_0 = 787647938u; continue; case 12u: arg_168_0 = (((num == 16u) ? 1507770278u : 930319028u) ^ num2 * 1665075364u); continue; case 13u: this.UniqueId = input.ReadUInt64(); arg_168_0 = 1497022467u; continue; case 14u: arg_168_0 = (num2 * 4191496827u ^ 2349068233u); continue; case 15u: arg_168_0 = (((num == 8u) ? 3728999284u : 2849422334u) ^ num2 * 3077587932u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Notification.V1/NotificationTypesReflection.cs using Bgs.Protocol.Account.V1; using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Notification.V1 { [DebuggerNonUserCode] public static class NotificationTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return NotificationTypesReflection.descriptor; } } static NotificationTypesReflection() { NotificationTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(NotificationTypesReflection.smethod_1(NotificationTypesReflection.smethod_0(new string[] { Module.smethod_33<string>(915210694u), Module.smethod_35<string>(4059596405u), Module.smethod_34<string>(2634503782u), Module.smethod_33<string>(1835459958u), Module.smethod_37<string>(1138217465u), Module.smethod_34<string>(759771542u), Module.smethod_33<string>(1119396710u), Module.smethod_33<string>(199147446u), Module.smethod_33<string>(1937552966u), Module.smethod_34<string>(3554953046u), Module.smethod_33<string>(3778051494u), Module.smethod_34<string>(2805060150u), Module.smethod_35<string>(3751917093u), Module.smethod_36<string>(1143359293u), Module.smethod_35<string>(4101758725u), Module.smethod_35<string>(1779354261u), Module.smethod_33<string>(2959895238u), Module.smethod_37<string>(3358998185u), Module.smethod_34<string>(3452064102u), Module.smethod_37<string>(261953353u) })), new FileDescriptor[] { AccountTypesReflection.Descriptor, AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(NotificationTypesReflection.smethod_2(typeof(Target).TypeHandle), Target.Parser, new string[] { Module.smethod_33<string>(3259014625u), Module.smethod_37<string>(147837329u) }, null, null, null), new GeneratedCodeInfo(NotificationTypesReflection.smethod_2(typeof(Subscription).TypeHandle), Subscription.Parser, new string[] { Module.smethod_36<string>(2806622704u), Module.smethod_37<string>(583346466u), Module.smethod_33<string>(1021036655u) }, null, null, null), new GeneratedCodeInfo(NotificationTypesReflection.smethod_2(typeof(Notification).TypeHandle), Notification.Parser, new string[] { Module.smethod_37<string>(2453261995u), Module.smethod_34<string>(3840532677u), Module.smethod_35<string>(2172568525u), Module.smethod_35<string>(1418463188u), Module.smethod_33<string>(1890239415u), Module.smethod_33<string>(797178628u), Module.smethod_34<string>(2580771227u), Module.smethod_33<string>(1883682078u), Module.smethod_37<string>(1781268930u), Module.smethod_35<string>(3613170380u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Misc/HttpHeader.cs using System; namespace Framework.Misc { public class HttpHeader { public string Method { get; set; } public string Path { get; set; } public string Type { get; set; } public string Host { get; set; } public string ContentType { get; set; } public int ContentLength { get; set; } public string AcceptLanguage { get; set; } public string Accept { get; set; } public string UserAgent { get; set; } public string Content { get; set; } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/TimeHandler.cs using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Network.Packets; using System; namespace AuthServer.Game.Packets.PacketHandler { public class TimeHandler : Manager { public static void HandleReadyForAccountDataTimes(ref PacketReader packet, WorldClass session) { Log.Message(LogType.Error, Module.smethod_34<string>(1602781937u), Array.Empty<object>()); } public static void HandleReadyForAccountDataTimes(ref PacketReader packet, WorldClass2 session) { Log.Message(LogType.Error, Module.smethod_37<string>(3535683298u), Array.Empty<object>()); } [Opcode(ClientMessage.UITimeRequest, "18156")] public static void HandleUITimeRequest(ref PacketReader packet, WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.UITime, true); while (true) { IL_3E: uint arg_26_0 = 3377425253u; while (true) { uint num; switch ((num = (arg_26_0 ^ 2768198855u)) % 3u) { case 1u: packetWriter.WriteUnixTime(); arg_26_0 = (num * 827853117u ^ 2877711444u); continue; case 2u: goto IL_3E; } goto Block_1; } } Block_1: session.Send(ref packetWriter); } public static void HandleLoginSetTimeSpeed(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.LoginSetTimeSpeed, true); packetWriter.WritePackedTime(); while (true) { IL_66: uint arg_4E_0 = 1798748320u; while (true) { uint num; switch ((num = (arg_4E_0 ^ 458044892u)) % 3u) { case 0u: goto IL_66; case 2u: packetWriter.WritePackedTime(); packetWriter.WriteFloat(0.01666667f); packetWriter.WriteInt32(0); packetWriter.WriteInt32(0); session.Send(ref packetWriter); arg_4E_0 = (num * 3161907175u ^ 1843293902u); continue; } return; } } } public static void HandleSetTimezoneInformation(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.SetTimeZoneInformation, true); while (true) { IL_CE: uint arg_AE_0 = 935220141u; while (true) { uint num; switch ((num = (arg_AE_0 ^ 259876853u)) % 5u) { case 0u: { string text; packetWriter.WriteString(text, true); arg_AE_0 = (num * 2656952854u ^ 2225828889u); continue; } case 1u: { BitPack arg_66_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); string text = Module.smethod_34<string>(1790255161u); arg_66_0.Write<int>(TimeHandler.smethod_0(text), 7); arg_66_0.Write<int>(TimeHandler.smethod_0(text), 7); arg_66_0.Flush(); arg_AE_0 = (num * 1324747197u ^ 2173534419u); continue; } case 3u: goto IL_CE; case 4u: { string text; packetWriter.WriteString(text, true); session.Send(ref packetWriter); arg_AE_0 = (num * 3452712060u ^ 2771268710u); continue; } } return; } } } static int smethod_0(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Channel.V1/Message.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class Message : IMessage<Message>, IEquatable<Message>, IDeepCloneable<Message>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Message.__c __9 = new Message.__c(); internal Message cctor>b__29_0() { return new Message(); } } private static readonly MessageParser<Message> _parser = new MessageParser<Message>(new Func<Message>(Message.__c.__9.<.cctor>b__29_0)); public const int AttributeFieldNumber = 1; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(10u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int RoleFieldNumber = 2; private uint role_; public static MessageParser<Message> Parser { get { return Message._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Message.Descriptor; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public uint Role { get { return this.role_; } set { this.role_ = value; } } public Message() { } public Message(Message other) : this() { this.attribute_ = other.attribute_.Clone(); this.role_ = other.role_; } public Message Clone() { return new Message(this); } public override bool Equals(object other) { return this.Equals(other as Message); } public bool Equals(Message other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 917011753) % 9) { case 0: goto IL_B0; case 1: return false; case 3: arg_72_0 = (this.attribute_.Equals(other.attribute_) ? 142559893 : 880211137); continue; case 4: arg_72_0 = ((this.Role != other.Role) ? 1760297628 : 977368931); continue; case 5: return false; case 6: return true; case 7: goto IL_15; case 8: return false; } break; } return true; IL_15: arg_72_0 = 1583712050; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1824785408 : 655392523); goto IL_6D; } public override int GetHashCode() { int num = 1 ^ Message.smethod_0(this.attribute_); if (this.Role != 0u) { while (true) { IL_55: uint arg_3D_0 = 1628807470u; while (true) { uint num2; switch ((num2 = (arg_3D_0 ^ 968989574u)) % 3u) { case 1u: num ^= this.Role.GetHashCode(); arg_3D_0 = (num2 * 1374681289u ^ 792880783u); continue; case 2u: goto IL_55; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attribute_.WriteTo(output, Message._repeated_attribute_codec); while (true) { IL_91: uint arg_71_0 = 4072673482u; while (true) { uint num; switch ((num = (arg_71_0 ^ 2467167577u)) % 5u) { case 0u: output.WriteUInt32(this.Role); arg_71_0 = (num * 1880385083u ^ 2315297312u); continue; case 1u: arg_71_0 = (((this.Role == 0u) ? 1382626764u : 325588656u) ^ num * 3937749765u); continue; case 3u: goto IL_91; case 4u: output.WriteRawTag(16); arg_71_0 = (num * 1569248049u ^ 2719746406u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_94: uint arg_74_0 = 1125617646u; while (true) { uint num2; switch ((num2 = (arg_74_0 ^ 1345921330u)) % 5u) { case 0u: goto IL_94; case 1u: arg_74_0 = (((this.Role == 0u) ? 1382871014u : 355662388u) ^ num2 * 414887864u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Role); arg_74_0 = (num2 * 4130484164u ^ 3942499270u); continue; case 4u: num += this.attribute_.CalculateSize(Message._repeated_attribute_codec); arg_74_0 = (num2 * 2376997406u ^ 1763857127u); continue; } return num; } } return num; } public void MergeFrom(Message other) { if (other == null) { goto IL_03; } goto IL_75; uint arg_51_0; while (true) { IL_4C: uint num; switch ((num = (arg_51_0 ^ 660388135u)) % 6u) { case 0u: this.Role = other.Role; arg_51_0 = (num * 444549921u ^ 1667334955u); continue; case 1u: arg_51_0 = (((other.Role != 0u) ? 1395285971u : 2109604639u) ^ num * 19252138u); continue; case 2u: return; case 3u: goto IL_75; case 5u: goto IL_03; } break; } return; IL_03: arg_51_0 = 744721893u; goto IL_4C; IL_75: this.attribute_.Add(other.attribute_); arg_51_0 = 1764741318u; goto IL_4C; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F6: uint num; uint arg_B6_0 = ((num = input.ReadTag()) == 0u) ? 97398078u : 1971738860u; while (true) { uint num2; switch ((num2 = (arg_B6_0 ^ 1083856943u)) % 9u) { case 0u: this.attribute_.AddEntriesFrom(input, Message._repeated_attribute_codec); arg_B6_0 = 623170901u; continue; case 1u: input.SkipLastField(); arg_B6_0 = (num2 * 3927630755u ^ 1898451081u); continue; case 2u: arg_B6_0 = (num2 * 1922622400u ^ 3214214022u); continue; case 3u: arg_B6_0 = ((num == 10u) ? 238611348u : 547080935u); continue; case 4u: arg_B6_0 = 1971738860u; continue; case 5u: arg_B6_0 = (((num != 16u) ? 927062066u : 395756235u) ^ num2 * 1280070879u); continue; case 6u: goto IL_F6; case 7u: this.Role = input.ReadUInt32(); arg_B6_0 = 626543110u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmCharacterCountList.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmCharacterCountList { [DataMember(Name = "counts")] public IList<object> Counts { get; set; } } } <file_sep>/Google.Protobuf/FileDescriptorProto.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class FileDescriptorProto : IMessage<FileDescriptorProto>, IEquatable<FileDescriptorProto>, IDeepCloneable<FileDescriptorProto>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FileDescriptorProto.__c __9 = new FileDescriptorProto.__c(); internal FileDescriptorProto cctor>b__74_0() { return new FileDescriptorProto(); } } private static readonly MessageParser<FileDescriptorProto> _parser = new MessageParser<FileDescriptorProto>(new Func<FileDescriptorProto>(FileDescriptorProto.__c.__9.<.cctor>b__74_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int PackageFieldNumber = 2; private string package_ = ""; public const int DependencyFieldNumber = 3; private static readonly FieldCodec<string> _repeated_dependency_codec; private readonly RepeatedField<string> dependency_ = new RepeatedField<string>(); public const int PublicDependencyFieldNumber = 10; private static readonly FieldCodec<int> _repeated_publicDependency_codec; private readonly RepeatedField<int> publicDependency_ = new RepeatedField<int>(); public const int WeakDependencyFieldNumber = 11; private static readonly FieldCodec<int> _repeated_weakDependency_codec; private readonly RepeatedField<int> weakDependency_ = new RepeatedField<int>(); public const int MessageTypeFieldNumber = 4; private static readonly FieldCodec<DescriptorProto> _repeated_messageType_codec; private readonly RepeatedField<DescriptorProto> messageType_ = new RepeatedField<DescriptorProto>(); public const int EnumTypeFieldNumber = 5; private static readonly FieldCodec<EnumDescriptorProto> _repeated_enumType_codec; private readonly RepeatedField<EnumDescriptorProto> enumType_ = new RepeatedField<EnumDescriptorProto>(); public const int ServiceFieldNumber = 6; private static readonly FieldCodec<ServiceDescriptorProto> _repeated_service_codec; private readonly RepeatedField<ServiceDescriptorProto> service_ = new RepeatedField<ServiceDescriptorProto>(); public const int ExtensionFieldNumber = 7; private static readonly FieldCodec<FieldDescriptorProto> _repeated_extension_codec; private readonly RepeatedField<FieldDescriptorProto> extension_ = new RepeatedField<FieldDescriptorProto>(); public const int OptionsFieldNumber = 8; private FileOptions options_; public const int SourceCodeInfoFieldNumber = 9; private SourceCodeInfo sourceCodeInfo_; public static MessageParser<FileDescriptorProto> Parser { get { return FileDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return FileDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string Package { get { return this.package_; } set { this.package_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public RepeatedField<string> Dependency { get { return this.dependency_; } } public RepeatedField<int> PublicDependency { get { return this.publicDependency_; } } public RepeatedField<int> WeakDependency { get { return this.weakDependency_; } } public RepeatedField<DescriptorProto> MessageType { get { return this.messageType_; } } public RepeatedField<EnumDescriptorProto> EnumType { get { return this.enumType_; } } public RepeatedField<ServiceDescriptorProto> Service { get { return this.service_; } } public RepeatedField<FieldDescriptorProto> Extension { get { return this.extension_; } } public FileOptions Options { get { return this.options_; } set { this.options_ = value; } } public SourceCodeInfo SourceCodeInfo { get { return this.sourceCodeInfo_; } set { this.sourceCodeInfo_ = value; } } public FileDescriptorProto() { } public FileDescriptorProto(FileDescriptorProto other) : this() { while (true) { IL_12A: uint arg_102_0 = 1159649500u; while (true) { uint num; switch ((num = (arg_102_0 ^ 861622790u)) % 7u) { case 1u: this.dependency_ = other.dependency_.Clone(); this.publicDependency_ = other.publicDependency_.Clone(); this.weakDependency_ = other.weakDependency_.Clone(); arg_102_0 = (num * 3679537218u ^ 239356936u); continue; case 2u: this.service_ = other.service_.Clone(); this.extension_ = other.extension_.Clone(); arg_102_0 = (num * 1943923596u ^ 2687447603u); continue; case 3u: goto IL_12A; case 4u: this.name_ = other.name_; this.package_ = other.package_; arg_102_0 = (num * 3796356432u ^ 3389554338u); continue; case 5u: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_102_0 = 337033237u; continue; case 6u: this.messageType_ = other.messageType_.Clone(); this.enumType_ = other.enumType_.Clone(); arg_102_0 = (num * 4174476796u ^ 3847723413u); continue; } goto Block_2; } } Block_2: this.SourceCodeInfo = ((other.sourceCodeInfo_ != null) ? other.SourceCodeInfo.Clone() : null); } public FileDescriptorProto Clone() { return new FileDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as FileDescriptorProto); } public bool Equals(FileDescriptorProto other) { if (other == null) { goto IL_1BF; } goto IL_2A7; int arg_221_0; while (true) { IL_21C: switch ((arg_221_0 ^ 587137197) % 27) { case 0: goto IL_2A7; case 1: return false; case 2: return false; case 3: return false; case 4: arg_221_0 = (FileDescriptorProto.smethod_0(this.Package, other.Package) ? 2130303461 : 530621622); continue; case 5: arg_221_0 = (this.dependency_.Equals(other.dependency_) ? 1777619640 : 108117857); continue; case 6: goto IL_1BF; case 7: arg_221_0 = ((!this.service_.Equals(other.service_)) ? 1203896993 : 117124938); continue; case 8: arg_221_0 = ((!FileDescriptorProto.smethod_1(this.SourceCodeInfo, other.SourceCodeInfo)) ? 202826021 : 107487525); continue; case 9: return false; case 10: arg_221_0 = (this.messageType_.Equals(other.messageType_) ? 1439197775 : 711155173); continue; case 12: return false; case 13: arg_221_0 = ((!FileDescriptorProto.smethod_0(this.Name, other.Name)) ? 1191823997 : 1834821549); continue; case 14: return true; case 15: arg_221_0 = (this.extension_.Equals(other.extension_) ? 1687769176 : 1170445460); continue; case 16: return false; case 17: return false; case 18: return false; case 19: return false; case 20: arg_221_0 = ((!this.enumType_.Equals(other.enumType_)) ? 1051128832 : 756901707); continue; case 21: return false; case 22: return false; case 23: return false; case 24: arg_221_0 = (this.publicDependency_.Equals(other.publicDependency_) ? 2115353941 : 1026157369); continue; case 25: arg_221_0 = (this.weakDependency_.Equals(other.weakDependency_) ? 495712014 : 1997472659); continue; case 26: arg_221_0 = ((!FileDescriptorProto.smethod_1(this.Options, other.Options)) ? 1228220173 : 1233367884); continue; } break; } return true; IL_1BF: arg_221_0 = 2085234017; goto IL_21C; IL_2A7: arg_221_0 = ((other != this) ? 698064523 : 1728653465); goto IL_21C; } public override int GetHashCode() { int num = 1; while (true) { IL_20C: uint arg_1C7_0 = 2530293563u; while (true) { uint num2; switch ((num2 = (arg_1C7_0 ^ 2237650805u)) % 14u) { case 0u: arg_1C7_0 = ((FileDescriptorProto.smethod_2(this.Package) != 0) ? 3327628879u : 3633790251u); continue; case 1u: num ^= FileDescriptorProto.smethod_3(this.Options); arg_1C7_0 = (num2 * 973864773u ^ 3788561491u); continue; case 2u: num ^= FileDescriptorProto.smethod_3(this.Package); arg_1C7_0 = (num2 * 3398495056u ^ 595827979u); continue; case 3u: num ^= FileDescriptorProto.smethod_3(this.messageType_); arg_1C7_0 = (num2 * 649671753u ^ 3891382125u); continue; case 4u: num ^= FileDescriptorProto.smethod_3(this.dependency_); arg_1C7_0 = 3425330200u; continue; case 5u: num ^= FileDescriptorProto.smethod_3(this.publicDependency_); num ^= FileDescriptorProto.smethod_3(this.weakDependency_); arg_1C7_0 = (num2 * 1758952827u ^ 92495843u); continue; case 6u: num ^= FileDescriptorProto.smethod_3(this.Name); arg_1C7_0 = (num2 * 2174069675u ^ 2451220345u); continue; case 7u: num ^= FileDescriptorProto.smethod_3(this.SourceCodeInfo); arg_1C7_0 = (num2 * 4070363204u ^ 80556398u); continue; case 8u: goto IL_20C; case 10u: arg_1C7_0 = (((FileDescriptorProto.smethod_2(this.Name) != 0) ? 2378788775u : 2814928643u) ^ num2 * 2714580801u); continue; case 11u: num ^= FileDescriptorProto.smethod_3(this.enumType_); num ^= FileDescriptorProto.smethod_3(this.service_); arg_1C7_0 = (num2 * 1610927152u ^ 2287970395u); continue; case 12u: num ^= FileDescriptorProto.smethod_3(this.extension_); arg_1C7_0 = (((this.options_ == null) ? 821033220u : 1666774366u) ^ num2 * 169519440u); continue; case 13u: arg_1C7_0 = ((this.sourceCodeInfo_ != null) ? 3626666466u : 2529616242u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FileDescriptorProto.smethod_2(this.Name) != 0) { goto IL_183; } goto IL_249; uint arg_1ED_0; while (true) { IL_1E8: uint num; switch ((num = (arg_1ED_0 ^ 2187894432u)) % 16u) { case 0u: goto IL_249; case 1u: output.WriteRawTag(18); arg_1ED_0 = (num * 1769270230u ^ 128386545u); continue; case 2u: this.dependency_.WriteTo(output, FileDescriptorProto._repeated_dependency_codec); arg_1ED_0 = 2543550051u; continue; case 3u: this.messageType_.WriteTo(output, FileDescriptorProto._repeated_messageType_codec); this.enumType_.WriteTo(output, FileDescriptorProto._repeated_enumType_codec); arg_1ED_0 = (num * 3324310854u ^ 1654701194u); continue; case 5u: goto IL_183; case 6u: output.WriteRawTag(66); arg_1ED_0 = (num * 3513006574u ^ 2481030285u); continue; case 7u: output.WriteString(this.Package); arg_1ED_0 = (num * 1572967512u ^ 2415323866u); continue; case 8u: this.service_.WriteTo(output, FileDescriptorProto._repeated_service_codec); this.extension_.WriteTo(output, FileDescriptorProto._repeated_extension_codec); arg_1ED_0 = (num * 605398820u ^ 1968448511u); continue; case 9u: output.WriteMessage(this.Options); arg_1ED_0 = (num * 3238075679u ^ 2785820684u); continue; case 10u: output.WriteMessage(this.SourceCodeInfo); arg_1ED_0 = (num * 766729216u ^ 4082854302u); continue; case 11u: arg_1ED_0 = ((this.sourceCodeInfo_ != null) ? 3415545613u : 3216617886u); continue; case 12u: output.WriteRawTag(10); output.WriteString(this.Name); arg_1ED_0 = (num * 1739272872u ^ 1534330816u); continue; case 13u: output.WriteRawTag(74); arg_1ED_0 = (num * 1458571590u ^ 2339886292u); continue; case 14u: this.publicDependency_.WriteTo(output, FileDescriptorProto._repeated_publicDependency_codec); this.weakDependency_.WriteTo(output, FileDescriptorProto._repeated_weakDependency_codec); arg_1ED_0 = 2668660532u; continue; case 15u: arg_1ED_0 = (((this.options_ == null) ? 209065358u : 1095862083u) ^ num * 894343003u); continue; } break; } return; IL_183: arg_1ED_0 = 2872958188u; goto IL_1E8; IL_249: arg_1ED_0 = ((FileDescriptorProto.smethod_2(this.Package) == 0) ? 3021169842u : 2166362593u); goto IL_1E8; } public int CalculateSize() { int num = 0; while (true) { IL_266: uint arg_219_0 = 3757758151u; while (true) { uint num2; switch ((num2 = (arg_219_0 ^ 2437134478u)) % 16u) { case 0u: num += this.weakDependency_.CalculateSize(FileDescriptorProto._repeated_weakDependency_codec); arg_219_0 = (num2 * 1737609828u ^ 761167382u); continue; case 1u: arg_219_0 = ((FileDescriptorProto.smethod_2(this.Package) != 0) ? 2471128969u : 3396719587u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_219_0 = (num2 * 805893682u ^ 4086295762u); continue; case 4u: goto IL_266; case 5u: num += this.extension_.CalculateSize(FileDescriptorProto._repeated_extension_codec); arg_219_0 = (num2 * 1756933642u ^ 1663463744u); continue; case 6u: num += this.enumType_.CalculateSize(FileDescriptorProto._repeated_enumType_codec); num += this.service_.CalculateSize(FileDescriptorProto._repeated_service_codec); arg_219_0 = (num2 * 3464633545u ^ 1186641149u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.Package); arg_219_0 = (num2 * 869296033u ^ 2450644868u); continue; case 8u: num += this.messageType_.CalculateSize(FileDescriptorProto._repeated_messageType_codec); arg_219_0 = (num2 * 264751948u ^ 1242418552u); continue; case 9u: arg_219_0 = (((FileDescriptorProto.smethod_2(this.Name) == 0) ? 2748170766u : 2387357088u) ^ num2 * 84187497u); continue; case 10u: arg_219_0 = ((this.sourceCodeInfo_ == null) ? 3356183580u : 2265685264u); continue; case 11u: num += this.publicDependency_.CalculateSize(FileDescriptorProto._repeated_publicDependency_codec); arg_219_0 = (num2 * 364415987u ^ 2788687919u); continue; case 12u: arg_219_0 = (((this.options_ != null) ? 2430690257u : 2280397496u) ^ num2 * 1334933833u); continue; case 13u: num += this.dependency_.CalculateSize(FileDescriptorProto._repeated_dependency_codec); arg_219_0 = 2259280645u; continue; case 14u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceCodeInfo); arg_219_0 = (num2 * 1609848454u ^ 2868218024u); continue; case 15u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_219_0 = (num2 * 2625995735u ^ 459553206u); continue; } return num; } } return num; } public void MergeFrom(FileDescriptorProto other) { if (other == null) { goto IL_214; } goto IL_29C; uint arg_238_0; while (true) { IL_233: uint num; switch ((num = (arg_238_0 ^ 764909073u)) % 18u) { case 0u: this.options_ = new FileOptions(); arg_238_0 = (num * 3220841844u ^ 2181669831u); continue; case 2u: goto IL_214; case 3u: this.sourceCodeInfo_ = new SourceCodeInfo(); arg_238_0 = (num * 1860850083u ^ 1218319837u); continue; case 4u: arg_238_0 = (((this.options_ == null) ? 2698478509u : 4292187703u) ^ num * 692266544u); continue; case 5u: this.dependency_.Add(other.dependency_); arg_238_0 = 694200155u; continue; case 6u: this.Options.MergeFrom(other.Options); arg_238_0 = 1816496994u; continue; case 7u: arg_238_0 = ((FileDescriptorProto.smethod_2(other.Package) == 0) ? 995894450u : 1146394111u); continue; case 8u: return; case 9u: goto IL_29C; case 10u: this.Package = other.Package; arg_238_0 = (num * 4171115928u ^ 721620962u); continue; case 11u: arg_238_0 = ((other.sourceCodeInfo_ == null) ? 652165012u : 1712211908u); continue; case 12u: this.Name = other.Name; arg_238_0 = (num * 3464727324u ^ 3965781134u); continue; case 13u: this.SourceCodeInfo.MergeFrom(other.SourceCodeInfo); arg_238_0 = 652165012u; continue; case 14u: this.publicDependency_.Add(other.publicDependency_); this.weakDependency_.Add(other.weakDependency_); arg_238_0 = (num * 2209115872u ^ 2409077920u); continue; case 15u: this.messageType_.Add(other.messageType_); this.enumType_.Add(other.enumType_); arg_238_0 = (num * 1670917312u ^ 3018588943u); continue; case 16u: this.service_.Add(other.service_); this.extension_.Add(other.extension_); arg_238_0 = (((other.options_ == null) ? 3773798696u : 3585226863u) ^ num * 1572248875u); continue; case 17u: arg_238_0 = (((this.sourceCodeInfo_ != null) ? 679567055u : 804216353u) ^ num * 3179753165u); continue; } break; } return; IL_214: arg_238_0 = 962617511u; goto IL_233; IL_29C: arg_238_0 = ((FileDescriptorProto.smethod_2(other.Name) == 0) ? 1295480606u : 916586989u); goto IL_233; } public void MergeFrom(CodedInputStream input) { while (true) { IL_5EA: uint num; uint arg_512_0 = ((num = input.ReadTag()) != 0u) ? 1069499499u : 312510853u; while (true) { uint num2; switch ((num2 = (arg_512_0 ^ 1478275423u)) % 47u) { case 0u: arg_512_0 = (((num == 58u) ? 3210956217u : 3845661273u) ^ num2 * 3383179500u); continue; case 1u: arg_512_0 = ((num == 88u) ? 409465715u : 428599862u); continue; case 2u: this.extension_.AddEntriesFrom(input, FileDescriptorProto._repeated_extension_codec); arg_512_0 = 1368449963u; continue; case 3u: this.sourceCodeInfo_ = new SourceCodeInfo(); arg_512_0 = (num2 * 606652195u ^ 1300013120u); continue; case 4u: arg_512_0 = (((num == 50u) ? 1342808885u : 2145403300u) ^ num2 * 2197478583u); continue; case 5u: this.Name = input.ReadString(); arg_512_0 = 539371738u; continue; case 6u: input.ReadMessage(this.options_); arg_512_0 = 466862560u; continue; case 7u: arg_512_0 = 1069499499u; continue; case 8u: arg_512_0 = (((num != 10u) ? 2079042903u : 332659387u) ^ num2 * 1563502215u); continue; case 9u: arg_512_0 = (num2 * 3913726958u ^ 2729906196u); continue; case 10u: input.SkipLastField(); arg_512_0 = 491792708u; continue; case 11u: arg_512_0 = (num2 * 2128194187u ^ 105784687u); continue; case 12u: this.weakDependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_weakDependency_codec); arg_512_0 = 539371738u; continue; case 13u: this.publicDependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_publicDependency_codec); arg_512_0 = 704954453u; continue; case 14u: this.service_.AddEntriesFrom(input, FileDescriptorProto._repeated_service_codec); arg_512_0 = 258891895u; continue; case 15u: arg_512_0 = ((num <= 82u) ? 1048204831u : 2134457618u); continue; case 16u: this.enumType_.AddEntriesFrom(input, FileDescriptorProto._repeated_enumType_codec); arg_512_0 = 539371738u; continue; case 17u: arg_512_0 = (((num == 42u) ? 2328656472u : 4119551682u) ^ num2 * 1537228965u); continue; case 18u: arg_512_0 = ((num > 50u) ? 1531413913u : 1148483821u); continue; case 19u: input.ReadMessage(this.sourceCodeInfo_); arg_512_0 = 539371738u; continue; case 20u: arg_512_0 = ((num > 74u) ? 943112168u : 779630111u); continue; case 21u: arg_512_0 = (num2 * 1509983542u ^ 1288472364u); continue; case 22u: this.messageType_.AddEntriesFrom(input, FileDescriptorProto._repeated_messageType_codec); arg_512_0 = 2320462u; continue; case 23u: arg_512_0 = (((num == 90u) ? 607603030u : 1704921963u) ^ num2 * 1478016349u); continue; case 24u: goto IL_5EA; case 25u: arg_512_0 = (num2 * 3051847227u ^ 583495907u); continue; case 26u: arg_512_0 = ((this.options_ != null) ? 1401457218u : 2029100803u); continue; case 27u: arg_512_0 = ((this.sourceCodeInfo_ == null) ? 379028396u : 1592163449u); continue; case 28u: arg_512_0 = (num2 * 981101358u ^ 1362847210u); continue; case 29u: arg_512_0 = (((num <= 26u) ? 3747324621u : 3044593695u) ^ num2 * 2905017001u); continue; case 30u: this.options_ = new FileOptions(); arg_512_0 = (num2 * 1079761321u ^ 270212350u); continue; case 31u: arg_512_0 = (num2 * 3682835335u ^ 128561711u); continue; case 32u: arg_512_0 = (((num == 74u) ? 1054013984u : 2089078168u) ^ num2 * 1296281720u); continue; case 33u: arg_512_0 = ((num == 34u) ? 1930286380u : 60179543u); continue; case 34u: arg_512_0 = (num2 * 3248666282u ^ 1568719716u); continue; case 35u: arg_512_0 = (num2 * 4283468544u ^ 2930132698u); continue; case 36u: arg_512_0 = (num2 * 837569406u ^ 632842868u); continue; case 37u: arg_512_0 = (((num != 18u) ? 3543572441u : 3770395692u) ^ num2 * 2557400466u); continue; case 39u: arg_512_0 = (num2 * 1383629141u ^ 3420608478u); continue; case 40u: arg_512_0 = (((num != 66u) ? 1697492263u : 1883239607u) ^ num2 * 1032412225u); continue; case 41u: arg_512_0 = (((num != 26u) ? 2429039872u : 3501304900u) ^ num2 * 2377458010u); continue; case 42u: arg_512_0 = (((num == 82u) ? 2329328990u : 4267129133u) ^ num2 * 2610317229u); continue; case 43u: arg_512_0 = (num2 * 279686107u ^ 1978742598u); continue; case 44u: this.Package = input.ReadString(); arg_512_0 = 539371738u; continue; case 45u: this.dependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_dependency_codec); arg_512_0 = 1301769014u; continue; case 46u: arg_512_0 = (((num == 80u) ? 3643569453u : 3413953600u) ^ num2 * 4178554775u); continue; } return; } } } static FileDescriptorProto() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_ED: uint arg_C9_0 = 1528781333u; while (true) { uint num; switch ((num = (arg_C9_0 ^ 2037266516u)) % 6u) { case 0u: FileDescriptorProto._repeated_messageType_codec = FieldCodec.ForMessage<DescriptorProto>(34u, DescriptorProto.Parser); arg_C9_0 = (num * 2968748525u ^ 361389642u); continue; case 1u: FileDescriptorProto._repeated_dependency_codec = FieldCodec.ForString(26u); FileDescriptorProto._repeated_publicDependency_codec = FieldCodec.ForInt32(80u); FileDescriptorProto._repeated_weakDependency_codec = FieldCodec.ForInt32(88u); arg_C9_0 = (num * 1417093308u ^ 2065169176u); continue; case 2u: FileDescriptorProto._repeated_enumType_codec = FieldCodec.ForMessage<EnumDescriptorProto>(42u, EnumDescriptorProto.Parser); FileDescriptorProto._repeated_service_codec = FieldCodec.ForMessage<ServiceDescriptorProto>(50u, ServiceDescriptorProto.Parser); arg_C9_0 = (num * 1155017405u ^ 3014883625u); continue; case 3u: goto IL_ED; case 5u: FileDescriptorProto._repeated_extension_codec = FieldCodec.ForMessage<FieldDescriptorProto>(58u, FieldDescriptorProto.Parser); arg_C9_0 = (num * 833583586u ^ 1864289640u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Managers/RealmManager.cs using Framework.Constants.Misc; using Framework.Database.Auth.Entities; using Framework.Logging; using Framework.Misc; using System; using System.Collections.Concurrent; namespace AuthServer.Managers { internal class RealmManager : Singleton<RealmManager> { public readonly ConcurrentDictionary<int, Realm> RealmList; public bool IsInitialized { get; private set; } private RealmManager() { while (true) { IL_111: uint arg_F1_0 = 2027188306u; while (true) { uint num; switch ((num = (arg_F1_0 ^ 1042556165u)) % 5u) { case 0u: { Realm realm; Log.Message(LogType.Debug, Module.smethod_34<string>(1738116785u), new object[] { realm.Id, realm.Name }); arg_F1_0 = (num * 1330193156u ^ 1395142242u); continue; } case 2u: this.IsInitialized = false; arg_F1_0 = (num * 350750606u ^ 838730833u); continue; case 3u: goto IL_111; case 4u: { this.RealmList = new ConcurrentDictionary<int, Realm>(); Realm realm = new Realm { Id = 970, Name = Module.smethod_36<string>(3939559174u), IP = Module.smethod_34<string>(1831853397u), Port = 8100, Type = 0, Status = 1, Flags = 0 }; arg_F1_0 = ((this.RealmList.TryAdd(realm.Id, realm) ? 2709194853u : 2858204314u) ^ num * 92996644u); continue; } } return; } } } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GetAllValuesForAttributeResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GetAllValuesForAttributeResponse : IMessage<GetAllValuesForAttributeResponse>, IEquatable<GetAllValuesForAttributeResponse>, IDeepCloneable<GetAllValuesForAttributeResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAllValuesForAttributeResponse.__c __9 = new GetAllValuesForAttributeResponse.__c(); internal GetAllValuesForAttributeResponse cctor>b__24_0() { return new GetAllValuesForAttributeResponse(); } } private static readonly MessageParser<GetAllValuesForAttributeResponse> _parser = new MessageParser<GetAllValuesForAttributeResponse>(new Func<GetAllValuesForAttributeResponse>(GetAllValuesForAttributeResponse.__c.__9.<.cctor>b__24_0)); public const int AttributeValueFieldNumber = 1; private static readonly FieldCodec<Variant> _repeated_attributeValue_codec; private readonly RepeatedField<Variant> attributeValue_ = new RepeatedField<Variant>(); public static MessageParser<GetAllValuesForAttributeResponse> Parser { get { return GetAllValuesForAttributeResponse._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return GetAllValuesForAttributeResponse.Descriptor; } } public RepeatedField<Variant> AttributeValue { get { return this.attributeValue_; } } public GetAllValuesForAttributeResponse() { } public GetAllValuesForAttributeResponse(GetAllValuesForAttributeResponse other) : this() { this.attributeValue_ = other.attributeValue_.Clone(); } public GetAllValuesForAttributeResponse Clone() { return new GetAllValuesForAttributeResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetAllValuesForAttributeResponse); } public bool Equals(GetAllValuesForAttributeResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1781560238) % 7) { case 0: return false; case 1: return false; case 3: goto IL_7A; case 4: goto IL_3E; case 5: arg_48_0 = ((!this.attributeValue_.Equals(other.attributeValue_)) ? -230659895 : -864873909); continue; case 6: return true; } break; } return true; IL_3E: arg_48_0 = -1586288690; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -744310394 : -193638282); goto IL_43; } public override int GetHashCode() { return 1 ^ GetAllValuesForAttributeResponse.smethod_0(this.attributeValue_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attributeValue_.WriteTo(output, GetAllValuesForAttributeResponse._repeated_attributeValue_codec); } public int CalculateSize() { return 0 + this.attributeValue_.CalculateSize(GetAllValuesForAttributeResponse._repeated_attributeValue_codec); } public void MergeFrom(GetAllValuesForAttributeResponse other) { if (other == null) { return; } this.attributeValue_.Add(other.attributeValue_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 2364831808u : 4184018896u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 3887700445u)) % 7u) { case 0u: goto IL_AE; case 2u: arg_77_0 = ((num != 10u) ? 3776427834u : 2453585304u); continue; case 3u: arg_77_0 = (num2 * 983609124u ^ 3919239383u); continue; case 4u: arg_77_0 = 2364831808u; continue; case 5u: this.attributeValue_.AddEntriesFrom(input, GetAllValuesForAttributeResponse._repeated_attributeValue_codec); arg_77_0 = 3960184987u; continue; case 6u: input.SkipLastField(); arg_77_0 = (num2 * 174882595u ^ 2608688051u); continue; } return; } } } static GetAllValuesForAttributeResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 288551660u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 759868097u)) % 3u) { case 1u: GetAllValuesForAttributeResponse._repeated_attributeValue_codec = FieldCodec.ForMessage<Variant>(10u, Variant.Parser); arg_3F_0 = (num * 1093562222u ^ 556218345u); continue; case 2u: goto IL_57; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/LeaveNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class LeaveNotification : IMessage<LeaveNotification>, IEquatable<LeaveNotification>, IDeepCloneable<LeaveNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly LeaveNotification.__c __9 = new LeaveNotification.__c(); internal LeaveNotification cctor>b__44_0() { return new LeaveNotification(); } } private static readonly MessageParser<LeaveNotification> _parser = new MessageParser<LeaveNotification>(new Func<LeaveNotification>(LeaveNotification.__c.__9.<.cctor>b__44_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MemberIdFieldNumber = 2; private EntityId memberId_; public const int ReasonFieldNumber = 3; private uint reason_; public const int ChannelIdFieldNumber = 4; private ChannelId channelId_; public const int SubscriberFieldNumber = 5; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<LeaveNotification> Parser { get { return LeaveNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return LeaveNotification.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId MemberId { get { return this.memberId_; } set { this.memberId_ = value; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public LeaveNotification() { } public LeaveNotification(LeaveNotification other) : this() { while (true) { IL_C8: int arg_A6_0 = -2131597562; while (true) { switch ((arg_A6_0 ^ -2038069895) % 6) { case 0: this.MemberId = ((other.memberId_ != null) ? other.MemberId.Clone() : null); arg_A6_0 = -1314028671; continue; case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_A6_0 = -1925753351; continue; case 2: this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); arg_A6_0 = -462345586; continue; case 3: goto IL_C8; case 4: this.reason_ = other.reason_; this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); arg_A6_0 = -2092851805; continue; } return; } } } public LeaveNotification Clone() { return new LeaveNotification(this); } public override bool Equals(object other) { return this.Equals(other as LeaveNotification); } public bool Equals(LeaveNotification other) { if (other == null) { goto IL_47; } goto IL_155; int arg_FF_0; while (true) { IL_FA: switch ((arg_FF_0 ^ -1024718954) % 15) { case 0: arg_FF_0 = ((!LeaveNotification.smethod_0(this.AgentId, other.AgentId)) ? -696247086 : -833977564); continue; case 1: return true; case 2: arg_FF_0 = ((!LeaveNotification.smethod_0(this.Subscriber, other.Subscriber)) ? -1458925010 : -908884005); continue; case 3: return false; case 4: arg_FF_0 = ((this.Reason != other.Reason) ? -430775041 : -1808059196); continue; case 5: return false; case 6: return false; case 7: goto IL_155; case 8: arg_FF_0 = (LeaveNotification.smethod_0(this.MemberId, other.MemberId) ? -859468552 : -1462851410); continue; case 10: return false; case 11: return false; case 12: goto IL_47; case 13: return false; case 14: arg_FF_0 = ((!LeaveNotification.smethod_0(this.ChannelId, other.ChannelId)) ? -92571736 : -1020751325); continue; } break; } return true; IL_47: arg_FF_0 = -199228688; goto IL_FA; IL_155: arg_FF_0 = ((other != this) ? -1287680191 : -1879529422); goto IL_FA; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_3F; } goto IL_128; uint arg_E8_0; while (true) { IL_E3: uint num2; switch ((num2 = (arg_E8_0 ^ 4018721227u)) % 9u) { case 0u: goto IL_128; case 2u: num ^= this.Reason.GetHashCode(); arg_E8_0 = (num2 * 3682628921u ^ 2656269481u); continue; case 3u: num ^= this.ChannelId.GetHashCode(); arg_E8_0 = (num2 * 1531567378u ^ 3473647565u); continue; case 4u: num ^= this.Subscriber.GetHashCode(); arg_E8_0 = (num2 * 1290088291u ^ 2831419735u); continue; case 5u: arg_E8_0 = ((this.channelId_ != null) ? 3629259890u : 4072115151u); continue; case 6u: arg_E8_0 = ((this.subscriber_ != null) ? 3145085484u : 3033039362u); continue; case 7u: goto IL_3F; case 8u: num ^= LeaveNotification.smethod_1(this.AgentId); arg_E8_0 = (num2 * 2349912966u ^ 3887902432u); continue; } break; } return num; IL_3F: arg_E8_0 = 2945992420u; goto IL_E3; IL_128: num ^= LeaveNotification.smethod_1(this.MemberId); arg_E8_0 = ((this.Reason != 0u) ? 3718366458u : 3943065664u); goto IL_E3; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_33; } goto IL_17B; uint arg_13E_0; while (true) { IL_139: uint num; switch ((num = (arg_13E_0 ^ 3969855229u)) % 12u) { case 0u: arg_13E_0 = ((this.subscriber_ != null) ? 3838989181u : 2688047768u); continue; case 2u: goto IL_17B; case 3u: arg_13E_0 = (((this.Reason == 0u) ? 3525690767u : 3026373953u) ^ num * 1149726133u); continue; case 4u: output.WriteRawTag(34); arg_13E_0 = (num * 4124936485u ^ 3898367966u); continue; case 5u: arg_13E_0 = ((this.channelId_ != null) ? 3230470921u : 3508754449u); continue; case 6u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_13E_0 = (num * 398525475u ^ 3948070165u); continue; case 7u: output.WriteMessage(this.ChannelId); arg_13E_0 = (num * 431474684u ^ 2061683317u); continue; case 8u: output.WriteRawTag(42); arg_13E_0 = (num * 1476241964u ^ 2974082784u); continue; case 9u: output.WriteMessage(this.Subscriber); arg_13E_0 = (num * 2670310468u ^ 3382511916u); continue; case 10u: goto IL_33; case 11u: output.WriteRawTag(24); output.WriteUInt32(this.Reason); arg_13E_0 = (num * 1435839448u ^ 1393891400u); continue; } break; } return; IL_33: arg_13E_0 = 3320257167u; goto IL_139; IL_17B: output.WriteRawTag(18); output.WriteMessage(this.MemberId); arg_13E_0 = 2548266766u; goto IL_139; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_43; } goto IL_12D; uint arg_ED_0; while (true) { IL_E8: uint num2; switch ((num2 = (arg_ED_0 ^ 1529832422u)) % 9u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_ED_0 = (num2 * 3518886635u ^ 1748270291u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_ED_0 = (num2 * 1016684426u ^ 3568457091u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_ED_0 = (num2 * 1184871865u ^ 2679190430u); continue; case 3u: arg_ED_0 = ((this.channelId_ != null) ? 1107795710u : 581794267u); continue; case 5u: goto IL_12D; case 6u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_ED_0 = (num2 * 1067292615u ^ 2659865491u); continue; case 7u: goto IL_43; case 8u: arg_ED_0 = ((this.subscriber_ != null) ? 203857351u : 1289079111u); continue; } break; } return num; IL_43: arg_ED_0 = 1532905109u; goto IL_E8; IL_12D: num += 1 + CodedOutputStream.ComputeMessageSize(this.MemberId); arg_ED_0 = ((this.Reason != 0u) ? 1281607953u : 1768014994u); goto IL_E8; } public void MergeFrom(LeaveNotification other) { if (other == null) { goto IL_14E; } goto IL_2C7; uint arg_257_0; while (true) { IL_252: uint num; switch ((num = (arg_257_0 ^ 2044909962u)) % 21u) { case 0u: goto IL_2C7; case 1u: return; case 2u: arg_257_0 = ((other.subscriber_ != null) ? 914083538u : 896192819u); continue; case 3u: this.AgentId.MergeFrom(other.AgentId); arg_257_0 = 560952459u; continue; case 4u: this.memberId_ = new EntityId(); arg_257_0 = (num * 1888509296u ^ 2651473166u); continue; case 5u: this.agentId_ = new EntityId(); arg_257_0 = (num * 3789539619u ^ 200498880u); continue; case 6u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_257_0 = (num * 1523070835u ^ 3018189818u); continue; case 7u: arg_257_0 = ((other.channelId_ != null) ? 190717884u : 1064345419u); continue; case 8u: this.Subscriber.MergeFrom(other.Subscriber); arg_257_0 = 896192819u; continue; case 9u: this.ChannelId.MergeFrom(other.ChannelId); arg_257_0 = 1064345419u; continue; case 10u: this.MemberId.MergeFrom(other.MemberId); arg_257_0 = 591904459u; continue; case 11u: goto IL_14E; case 13u: arg_257_0 = ((other.memberId_ != null) ? 1356957918u : 591904459u); continue; case 14u: arg_257_0 = (((this.memberId_ != null) ? 294339198u : 39771948u) ^ num * 156959460u); continue; case 15u: arg_257_0 = ((other.Reason == 0u) ? 1007533402u : 645832459u); continue; case 16u: this.channelId_ = new ChannelId(); arg_257_0 = (num * 2913453878u ^ 2506771283u); continue; case 17u: arg_257_0 = (((this.agentId_ == null) ? 2964207752u : 4258668930u) ^ num * 973744462u); continue; case 18u: this.Reason = other.Reason; arg_257_0 = (num * 3343134552u ^ 3017823746u); continue; case 19u: arg_257_0 = (((this.subscriber_ == null) ? 1536319397u : 558783207u) ^ num * 1211454320u); continue; case 20u: arg_257_0 = (((this.channelId_ != null) ? 591259761u : 242575982u) ^ num * 2265017309u); continue; } break; } return; IL_14E: arg_257_0 = 986824397u; goto IL_252; IL_2C7: arg_257_0 = ((other.agentId_ != null) ? 774873101u : 560952459u); goto IL_252; } public void MergeFrom(CodedInputStream input) { while (true) { IL_343: uint num; uint arg_2BB_0 = ((num = input.ReadTag()) != 0u) ? 1807555473u : 798058883u; while (true) { uint num2; switch ((num2 = (arg_2BB_0 ^ 1488104382u)) % 27u) { case 0u: input.ReadMessage(this.channelId_); arg_2BB_0 = 1375448379u; continue; case 1u: arg_2BB_0 = (num2 * 3856869677u ^ 1881284333u); continue; case 2u: arg_2BB_0 = (num2 * 532654443u ^ 1549406783u); continue; case 3u: this.agentId_ = new EntityId(); arg_2BB_0 = (num2 * 1228480900u ^ 375809091u); continue; case 4u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_2BB_0 = (num2 * 955540676u ^ 1652095451u); continue; case 5u: arg_2BB_0 = (num2 * 3341591257u ^ 3319727346u); continue; case 6u: arg_2BB_0 = 1807555473u; continue; case 7u: arg_2BB_0 = ((num <= 18u) ? 109282762u : 480730486u); continue; case 8u: arg_2BB_0 = (num2 * 895980490u ^ 2706414962u); continue; case 9u: this.Reason = input.ReadUInt32(); arg_2BB_0 = 1398052008u; continue; case 10u: this.channelId_ = new ChannelId(); arg_2BB_0 = (num2 * 1757271917u ^ 116830088u); continue; case 11u: arg_2BB_0 = (((num == 18u) ? 2691115399u : 3125519638u) ^ num2 * 708472605u); continue; case 12u: input.ReadMessage(this.memberId_); arg_2BB_0 = 1397052887u; continue; case 13u: arg_2BB_0 = ((num != 24u) ? 765964240u : 1530056921u); continue; case 14u: arg_2BB_0 = ((this.channelId_ == null) ? 56530322u : 1421853492u); continue; case 15u: input.SkipLastField(); arg_2BB_0 = 1398052008u; continue; case 16u: this.memberId_ = new EntityId(); arg_2BB_0 = (num2 * 3833922686u ^ 3542089768u); continue; case 17u: input.ReadMessage(this.agentId_); arg_2BB_0 = 1731088327u; continue; case 18u: arg_2BB_0 = ((this.agentId_ == null) ? 1300684709u : 694172847u); continue; case 19u: input.ReadMessage(this.subscriber_); arg_2BB_0 = 1398052008u; continue; case 20u: arg_2BB_0 = ((this.subscriber_ != null) ? 2138765083u : 1511487758u); continue; case 21u: arg_2BB_0 = (((num != 34u) ? 497109154u : 222848379u) ^ num2 * 3579212646u); continue; case 23u: goto IL_343; case 24u: arg_2BB_0 = (((num == 42u) ? 2395803501u : 2599741162u) ^ num2 * 2838873756u); continue; case 25u: arg_2BB_0 = ((this.memberId_ == null) ? 1443726870u : 1144461464u); continue; case 26u: arg_2BB_0 = (((num == 10u) ? 3832926357u : 2458999754u) ^ num2 * 3378984349u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Connection.V1/BoundService.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class BoundService : IMessage<BoundService>, IEquatable<BoundService>, IDeepCloneable<BoundService>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BoundService.__c __9 = new BoundService.__c(); internal BoundService cctor>b__29_0() { return new BoundService(); } } private static readonly MessageParser<BoundService> _parser = new MessageParser<BoundService>(new Func<BoundService>(BoundService.__c.__9.<.cctor>b__29_0)); public const int HashFieldNumber = 1; private uint hash_; public const int IdFieldNumber = 2; private uint id_; public static MessageParser<BoundService> Parser { get { return BoundService._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return BoundService.Descriptor; } } public uint Hash { get { return this.hash_; } set { this.hash_ = value; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public BoundService() { } public BoundService(BoundService other) : this() { this.hash_ = other.hash_; this.id_ = other.id_; } public BoundService Clone() { return new BoundService(this); } public override bool Equals(object other) { return this.Equals(other as BoundService); } public bool Equals(BoundService other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -685027930) % 9) { case 0: arg_6D_0 = ((this.Id != other.Id) ? -2077502264 : -1452285885); continue; case 1: return false; case 3: arg_6D_0 = ((this.Hash != other.Hash) ? -490203966 : -12120435); continue; case 4: return false; case 5: return false; case 6: goto IL_15; case 7: return true; case 8: goto IL_AB; } break; } return true; IL_15: arg_6D_0 = -1254148950; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? -1563571498 : -709629016); goto IL_68; } public override int GetHashCode() { return 1 ^ this.Hash.GetHashCode() ^ this.Id.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); while (true) { IL_7A: uint arg_5A_0 = 2856121441u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 3332188710u)) % 5u) { case 0u: goto IL_7A; case 1u: output.WriteRawTag(16); arg_5A_0 = (num * 2958493769u ^ 548844073u); continue; case 2u: output.WriteFixed32(this.Hash); arg_5A_0 = (num * 847207614u ^ 1578644832u); continue; case 3u: output.WriteUInt32(this.Id); arg_5A_0 = (num * 1166415623u ^ 3886748304u); continue; } return; } } } public int CalculateSize() { return 5 + (1 + CodedOutputStream.ComputeUInt32Size(this.Id)); } public void MergeFrom(BoundService other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 544624223u)) % 7u) { case 0u: goto IL_6C; case 1u: this.Id = other.Id; arg_76_0 = (num * 509238429u ^ 979555725u); continue; case 3u: this.Hash = other.Hash; arg_76_0 = (num * 1480263588u ^ 1664441488u); continue; case 4u: return; case 5u: arg_76_0 = ((other.Id != 0u) ? 304426085u : 313966623u); continue; case 6u: goto IL_AD; } break; } return; IL_6C: arg_76_0 = 397989840u; goto IL_71; IL_AD: arg_76_0 = ((other.Hash == 0u) ? 205754316u : 354649824u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_EE: uint num; uint arg_AE_0 = ((num = input.ReadTag()) != 0u) ? 1520448950u : 592013579u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 1147502709u)) % 9u) { case 0u: arg_AE_0 = (num2 * 2524167239u ^ 2661722260u); continue; case 1u: arg_AE_0 = (((num != 16u) ? 2851969788u : 3199013322u) ^ num2 * 1308703155u); continue; case 3u: goto IL_EE; case 4u: arg_AE_0 = 1520448950u; continue; case 5u: this.Id = input.ReadUInt32(); arg_AE_0 = 477278463u; continue; case 6u: arg_AE_0 = ((num == 13u) ? 1654802669u : 173280932u); continue; case 7u: this.Hash = input.ReadFixed32(); arg_AE_0 = 477278463u; continue; case 8u: input.SkipLastField(); arg_AE_0 = (num2 * 1391919479u ^ 900836046u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.UserManager.V1/BlockedPlayerAddedNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class BlockedPlayerAddedNotification : IMessage<BlockedPlayerAddedNotification>, IEquatable<BlockedPlayerAddedNotification>, IDeepCloneable<BlockedPlayerAddedNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BlockedPlayerAddedNotification.__c __9 = new BlockedPlayerAddedNotification.__c(); internal BlockedPlayerAddedNotification cctor>b__34_0() { return new BlockedPlayerAddedNotification(); } } private static readonly MessageParser<BlockedPlayerAddedNotification> _parser = new MessageParser<BlockedPlayerAddedNotification>(new Func<BlockedPlayerAddedNotification>(BlockedPlayerAddedNotification.__c.__9.<.cctor>b__34_0)); public const int PlayerFieldNumber = 1; private BlockedPlayer player_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int AccountIdFieldNumber = 3; private EntityId accountId_; public static MessageParser<BlockedPlayerAddedNotification> Parser { get { return BlockedPlayerAddedNotification._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return BlockedPlayerAddedNotification.Descriptor; } } public BlockedPlayer Player { get { return this.player_; } set { this.player_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public BlockedPlayerAddedNotification() { } public BlockedPlayerAddedNotification(BlockedPlayerAddedNotification other) : this() { this.Player = ((other.player_ != null) ? other.Player.Clone() : null); this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); } public BlockedPlayerAddedNotification Clone() { return new BlockedPlayerAddedNotification(this); } public override bool Equals(object other) { return this.Equals(other as BlockedPlayerAddedNotification); } public bool Equals(BlockedPlayerAddedNotification other) { if (other == null) { goto IL_70; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -1829719428) % 11) { case 0: return false; case 1: goto IL_EC; case 2: return true; case 3: return false; case 4: return false; case 5: arg_A6_0 = ((!BlockedPlayerAddedNotification.smethod_0(this.GameAccountId, other.GameAccountId)) ? -282750759 : -1947654323); continue; case 7: goto IL_70; case 8: arg_A6_0 = ((!BlockedPlayerAddedNotification.smethod_0(this.Player, other.Player)) ? -1614210817 : -1997356152); continue; case 9: return false; case 10: arg_A6_0 = (BlockedPlayerAddedNotification.smethod_0(this.AccountId, other.AccountId) ? -1860034592 : -2141513606); continue; } break; } return true; IL_70: arg_A6_0 = -413568622; goto IL_A1; IL_EC: arg_A6_0 = ((other == this) ? -438897008 : -674022903); goto IL_A1; } public override int GetHashCode() { int num = 1 ^ BlockedPlayerAddedNotification.smethod_1(this.Player); while (true) { IL_C0: uint arg_9C_0 = 2264420631u; while (true) { uint num2; switch ((num2 = (arg_9C_0 ^ 4271407101u)) % 6u) { case 1u: num ^= BlockedPlayerAddedNotification.smethod_1(this.GameAccountId); arg_9C_0 = (num2 * 150948445u ^ 747780425u); continue; case 2u: num ^= BlockedPlayerAddedNotification.smethod_1(this.AccountId); arg_9C_0 = (num2 * 1425721867u ^ 2338393931u); continue; case 3u: arg_9C_0 = ((this.accountId_ != null) ? 3725870133u : 2246274771u); continue; case 4u: arg_9C_0 = (((this.gameAccountId_ != null) ? 3008333910u : 2427071478u) ^ num2 * 3695629764u); continue; case 5u: goto IL_C0; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Player); if (this.gameAccountId_ != null) { goto IL_83; } goto IL_C0; uint arg_8D_0; while (true) { IL_88: uint num; switch ((num = (arg_8D_0 ^ 2594301750u)) % 6u) { case 0u: goto IL_83; case 1u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_8D_0 = (num * 3710385886u ^ 501674843u); continue; case 2u: output.WriteRawTag(26); arg_8D_0 = (num * 3152042166u ^ 2496973622u); continue; case 3u: goto IL_C0; case 4u: output.WriteMessage(this.AccountId); arg_8D_0 = (num * 2767186268u ^ 2142069279u); continue; } break; } return; IL_83: arg_8D_0 = 3240107729u; goto IL_88; IL_C0: arg_8D_0 = ((this.accountId_ != null) ? 2250697026u : 4234385727u); goto IL_88; } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Player)); while (true) { IL_C6: uint arg_A2_0 = 3355409258u; while (true) { uint num2; switch ((num2 = (arg_A2_0 ^ 3745935717u)) % 6u) { case 0u: goto IL_C6; case 1u: arg_A2_0 = ((this.accountId_ != null) ? 3133882463u : 2480493132u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_A2_0 = (num2 * 162274558u ^ 1913860950u); continue; case 3u: arg_A2_0 = (((this.gameAccountId_ == null) ? 2855812298u : 3777356337u) ^ num2 * 2181811444u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_A2_0 = (num2 * 4232093242u ^ 520593768u); continue; } return num; } } return num; } public void MergeFrom(BlockedPlayerAddedNotification other) { if (other == null) { goto IL_18; } goto IL_1E2; uint arg_18A_0; while (true) { IL_185: uint num; switch ((num = (arg_18A_0 ^ 3311281883u)) % 15u) { case 0u: arg_18A_0 = ((other.gameAccountId_ == null) ? 2488145157u : 2594352238u); continue; case 1u: this.Player.MergeFrom(other.Player); arg_18A_0 = 2157857340u; continue; case 2u: this.AccountId.MergeFrom(other.AccountId); arg_18A_0 = 2882580192u; continue; case 3u: this.accountId_ = new EntityId(); arg_18A_0 = (num * 428321640u ^ 2716146264u); continue; case 4u: arg_18A_0 = (((this.accountId_ != null) ? 1684062053u : 194734833u) ^ num * 875409371u); continue; case 5u: this.player_ = new BlockedPlayer(); arg_18A_0 = (num * 2049656497u ^ 2558978052u); continue; case 6u: arg_18A_0 = (((this.gameAccountId_ == null) ? 1558454510u : 1564469125u) ^ num * 1265072092u); continue; case 7u: arg_18A_0 = (((this.player_ == null) ? 1511026328u : 1961958983u) ^ num * 2241657763u); continue; case 8u: return; case 9u: this.gameAccountId_ = new EntityId(); arg_18A_0 = (num * 2176033812u ^ 3938739069u); continue; case 10u: arg_18A_0 = ((other.accountId_ == null) ? 2882580192u : 3594538788u); continue; case 11u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_18A_0 = 2488145157u; continue; case 13u: goto IL_1E2; case 14u: goto IL_18; } break; } return; IL_18: arg_18A_0 = 4099404715u; goto IL_185; IL_1E2: arg_18A_0 = ((other.player_ == null) ? 2157857340u : 2286259866u); goto IL_185; } public void MergeFrom(CodedInputStream input) { while (true) { IL_23F: uint num; uint arg_1D7_0 = ((num = input.ReadTag()) != 0u) ? 1696312352u : 1568484582u; while (true) { uint num2; switch ((num2 = (arg_1D7_0 ^ 1939437971u)) % 19u) { case 0u: arg_1D7_0 = ((this.player_ != null) ? 445460461u : 1515840615u); continue; case 1u: arg_1D7_0 = (num2 * 258772027u ^ 2400400646u); continue; case 2u: this.accountId_ = new EntityId(); arg_1D7_0 = (num2 * 949890502u ^ 2986560127u); continue; case 3u: input.ReadMessage(this.accountId_); arg_1D7_0 = 36935511u; continue; case 4u: arg_1D7_0 = 1696312352u; continue; case 5u: arg_1D7_0 = ((this.gameAccountId_ == null) ? 197518309u : 1497438882u); continue; case 6u: input.ReadMessage(this.player_); arg_1D7_0 = 1741876658u; continue; case 8u: goto IL_23F; case 9u: input.SkipLastField(); arg_1D7_0 = (num2 * 3271302739u ^ 3331490805u); continue; case 10u: arg_1D7_0 = ((this.accountId_ != null) ? 1113149409u : 617203126u); continue; case 11u: this.gameAccountId_ = new EntityId(); arg_1D7_0 = (num2 * 2628251530u ^ 1482192702u); continue; case 12u: arg_1D7_0 = ((num != 10u) ? 1561242606u : 1806123807u); continue; case 13u: arg_1D7_0 = (num2 * 3938570514u ^ 4063683769u); continue; case 14u: arg_1D7_0 = (((num != 18u) ? 293985523u : 409350101u) ^ num2 * 4111916209u); continue; case 15u: input.ReadMessage(this.gameAccountId_); arg_1D7_0 = 1029281772u; continue; case 16u: this.player_ = new BlockedPlayer(); arg_1D7_0 = (num2 * 655952582u ^ 1937022293u); continue; case 17u: arg_1D7_0 = (((num != 26u) ? 652693782u : 118706141u) ^ num2 * 1666474698u); continue; case 18u: arg_1D7_0 = (num2 * 2166034866u ^ 1676523685u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeResultRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeResultRequest : IMessage<ChallengeResultRequest>, IEquatable<ChallengeResultRequest>, IDeepCloneable<ChallengeResultRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeResultRequest.__c __9 = new ChallengeResultRequest.__c(); internal ChallengeResultRequest cctor>b__39_0() { return new ChallengeResultRequest(); } } private static readonly MessageParser<ChallengeResultRequest> _parser = new MessageParser<ChallengeResultRequest>(new Func<ChallengeResultRequest>(ChallengeResultRequest.__c.__9.<.cctor>b__39_0)); public const int IdFieldNumber = 1; private uint id_; public const int TypeFieldNumber = 2; private uint type_; public const int ErrorIdFieldNumber = 3; private uint errorId_; public const int AnswerFieldNumber = 4; private ByteString answer_ = ByteString.Empty; public static MessageParser<ChallengeResultRequest> Parser { get { return ChallengeResultRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeResultRequest.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public uint Type { get { return this.type_; } set { this.type_ = value; } } public uint ErrorId { get { return this.errorId_; } set { this.errorId_ = value; } } public ByteString Answer { get { return this.answer_; } set { this.answer_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_36<string>(1095253436u)); } } public ChallengeResultRequest() { } public ChallengeResultRequest(ChallengeResultRequest other) : this() { this.id_ = other.id_; this.type_ = other.type_; this.errorId_ = other.errorId_; this.answer_ = other.answer_; } public ChallengeResultRequest Clone() { return new ChallengeResultRequest(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeResultRequest); } public bool Equals(ChallengeResultRequest other) { if (other == null) { goto IL_BC; } goto IL_114; int arg_C6_0; while (true) { IL_C1: switch ((arg_C6_0 ^ -74341912) % 13) { case 0: goto IL_BC; case 1: arg_C6_0 = ((this.Type != other.Type) ? -945178309 : -1599524225); continue; case 2: return false; case 3: return true; case 4: arg_C6_0 = ((this.ErrorId == other.ErrorId) ? -1371320658 : -1208873822); continue; case 5: return false; case 6: return false; case 7: arg_C6_0 = ((this.Id == other.Id) ? -2054423641 : -1474850972); continue; case 8: return false; case 10: goto IL_114; case 11: arg_C6_0 = ((!(this.Answer != other.Answer)) ? -1239051734 : -1622042382); continue; case 12: return false; } break; } return true; IL_BC: arg_C6_0 = -2011518234; goto IL_C1; IL_114: arg_C6_0 = ((other == this) ? -1088499930 : -943423464); goto IL_C1; } public override int GetHashCode() { int num = 1; while (true) { IL_159: uint arg_124_0 = 2263963628u; while (true) { uint num2; switch ((num2 = (arg_124_0 ^ 4214752878u)) % 10u) { case 0u: arg_124_0 = ((this.ErrorId == 0u) ? 2282106472u : 2308100730u); continue; case 1u: num ^= this.Answer.GetHashCode(); arg_124_0 = (num2 * 3640089748u ^ 1948888856u); continue; case 2u: arg_124_0 = (((this.Id == 0u) ? 2581344769u : 3408945223u) ^ num2 * 208780468u); continue; case 3u: arg_124_0 = ((this.Type == 0u) ? 3066077084u : 2291256939u); continue; case 5u: goto IL_159; case 6u: num ^= this.ErrorId.GetHashCode(); arg_124_0 = (num2 * 1849991879u ^ 2722737636u); continue; case 7u: num ^= this.Id.GetHashCode(); arg_124_0 = (num2 * 3593806716u ^ 1154485013u); continue; case 8u: arg_124_0 = ((this.Answer.Length != 0) ? 2355791911u : 4083339564u); continue; case 9u: num ^= this.Type.GetHashCode(); arg_124_0 = (num2 * 3558625177u ^ 1065257569u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Id != 0u) { goto IL_37; } goto IL_158; uint arg_114_0; while (true) { IL_10F: uint num; switch ((num = (arg_114_0 ^ 170396988u)) % 10u) { case 0u: arg_114_0 = ((this.Answer.Length == 0) ? 123908568u : 934255645u); continue; case 1u: output.WriteRawTag(21); output.WriteFixed32(this.Type); arg_114_0 = (num * 2090538074u ^ 137232722u); continue; case 2u: arg_114_0 = ((this.ErrorId != 0u) ? 1889987553u : 75126502u); continue; case 3u: output.WriteRawTag(8); output.WriteUInt32(this.Id); arg_114_0 = (num * 3721799915u ^ 594379369u); continue; case 4u: output.WriteBytes(this.Answer); arg_114_0 = (num * 1666243921u ^ 1450664066u); continue; case 5u: output.WriteRawTag(24); output.WriteUInt32(this.ErrorId); arg_114_0 = (num * 1148742426u ^ 484673428u); continue; case 6u: goto IL_158; case 7u: goto IL_37; case 9u: output.WriteRawTag(34); arg_114_0 = (num * 2513857255u ^ 1980763841u); continue; } break; } return; IL_37: arg_114_0 = 1971277189u; goto IL_10F; IL_158: arg_114_0 = ((this.Type != 0u) ? 1006726797u : 1454367080u); goto IL_10F; } public int CalculateSize() { int num = 0; if (this.Id != 0u) { goto IL_DF; } goto IL_129; uint arg_E9_0; while (true) { IL_E4: uint num2; switch ((num2 = (arg_E9_0 ^ 260387667u)) % 9u) { case 0u: goto IL_DF; case 1u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Answer); arg_E9_0 = (num2 * 1481708893u ^ 1462142542u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_E9_0 = (num2 * 3490669960u ^ 1967721265u); continue; case 4u: arg_E9_0 = ((this.Answer.Length == 0) ? 817397070u : 1814889555u); continue; case 5u: arg_E9_0 = ((this.ErrorId == 0u) ? 1050453992u : 2143227429u); continue; case 6u: num += 5; arg_E9_0 = (num2 * 2236882882u ^ 2751968047u); continue; case 7u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ErrorId); arg_E9_0 = (num2 * 1660794401u ^ 4132272094u); continue; case 8u: goto IL_129; } break; } return num; IL_DF: arg_E9_0 = 476080422u; goto IL_E4; IL_129: arg_E9_0 = ((this.Type == 0u) ? 210328841u : 2033567264u); goto IL_E4; } public void MergeFrom(ChallengeResultRequest other) { if (other == null) { goto IL_3C; } goto IL_147; uint arg_FF_0; while (true) { IL_FA: uint num; switch ((num = (arg_FF_0 ^ 2051489699u)) % 11u) { case 0u: arg_FF_0 = ((other.ErrorId == 0u) ? 1167687955u : 416304537u); continue; case 1u: arg_FF_0 = ((other.Answer.Length != 0) ? 972184533u : 1625739093u); continue; case 2u: this.Type = other.Type; arg_FF_0 = (num * 598319970u ^ 1877601520u); continue; case 3u: this.Id = other.Id; arg_FF_0 = (num * 265056435u ^ 2932706774u); continue; case 5u: this.ErrorId = other.ErrorId; arg_FF_0 = (num * 478346064u ^ 3764326707u); continue; case 6u: this.Answer = other.Answer; arg_FF_0 = (num * 2380539388u ^ 902643069u); continue; case 7u: goto IL_3C; case 8u: return; case 9u: arg_FF_0 = ((other.Type == 0u) ? 940288952u : 1492401479u); continue; case 10u: goto IL_147; } break; } return; IL_3C: arg_FF_0 = 1481351491u; goto IL_FA; IL_147: arg_FF_0 = ((other.Id != 0u) ? 2029384052u : 655703427u); goto IL_FA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1CA: uint num; uint arg_16E_0 = ((num = input.ReadTag()) == 0u) ? 1644130248u : 194600046u; while (true) { uint num2; switch ((num2 = (arg_16E_0 ^ 895291309u)) % 16u) { case 0u: arg_16E_0 = 194600046u; continue; case 1u: arg_16E_0 = (((num == 8u) ? 4041703137u : 3993972910u) ^ num2 * 2615583169u); continue; case 2u: arg_16E_0 = (((num != 21u) ? 29471139u : 2145722662u) ^ num2 * 4190716785u); continue; case 3u: arg_16E_0 = ((num > 21u) ? 308841157u : 1423818620u); continue; case 4u: goto IL_1CA; case 6u: arg_16E_0 = (((num != 34u) ? 1320683156u : 263894545u) ^ num2 * 2652968675u); continue; case 7u: arg_16E_0 = (num2 * 1055757233u ^ 2007543502u); continue; case 8u: arg_16E_0 = ((num == 24u) ? 1814248226u : 820225083u); continue; case 9u: this.Type = input.ReadFixed32(); arg_16E_0 = 1207175081u; continue; case 10u: arg_16E_0 = (num2 * 2947941792u ^ 4210894825u); continue; case 11u: input.SkipLastField(); arg_16E_0 = 1717519162u; continue; case 12u: arg_16E_0 = (num2 * 1943727450u ^ 556485902u); continue; case 13u: this.Id = input.ReadUInt32(); arg_16E_0 = 1207175081u; continue; case 14u: this.Answer = input.ReadBytes(); arg_16E_0 = 1207175081u; continue; case 15u: this.ErrorId = input.ReadUInt32(); arg_16E_0 = 792937447u; continue; } return; } } } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/PlayerVariables.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class PlayerVariables : IMessage<PlayerVariables>, IEquatable<PlayerVariables>, IDeepCloneable<PlayerVariables>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly PlayerVariables.__c __9 = new PlayerVariables.__c(); internal PlayerVariables cctor>b__34_0() { return new PlayerVariables(); } } private static readonly MessageParser<PlayerVariables> _parser = new MessageParser<PlayerVariables>(new Func<PlayerVariables>(PlayerVariables.__c.__9.<.cctor>b__34_0)); public const int IdentityFieldNumber = 1; private Identity identity_; public const int RatingFieldNumber = 2; private double rating_; public const int AttributeFieldNumber = 3; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(26u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public static MessageParser<PlayerVariables> Parser { get { return PlayerVariables._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return PlayerVariables.Descriptor; } } public Identity Identity { get { return this.identity_; } set { this.identity_ = value; } } public double Rating { get { return this.rating_; } set { this.rating_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public PlayerVariables() { } public PlayerVariables(PlayerVariables other) : this() { while (true) { IL_8C: uint arg_6C_0 = 2383557536u; while (true) { uint num; switch ((num = (arg_6C_0 ^ 3616924459u)) % 5u) { case 0u: goto IL_8C; case 1u: this.Identity = ((other.identity_ != null) ? other.Identity.Clone() : null); arg_6C_0 = 3798668037u; continue; case 2u: this.attribute_ = other.attribute_.Clone(); arg_6C_0 = (num * 1969194812u ^ 472524545u); continue; case 3u: this.rating_ = other.rating_; arg_6C_0 = (num * 4245354942u ^ 1274849377u); continue; } return; } } } public PlayerVariables Clone() { return new PlayerVariables(this); } public override bool Equals(object other) { return this.Equals(other as PlayerVariables); } public bool Equals(PlayerVariables other) { if (other == null) { goto IL_18; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ 1765315137) % 11) { case 1: return false; case 2: return false; case 3: return false; case 4: arg_A1_0 = ((!this.attribute_.Equals(other.attribute_)) ? 947067185 : 1202162883); continue; case 5: arg_A1_0 = ((this.Rating == other.Rating) ? 1622429503 : 1605838316); continue; case 6: goto IL_E7; case 7: arg_A1_0 = (PlayerVariables.smethod_0(this.Identity, other.Identity) ? 1361574536 : 214109466); continue; case 8: goto IL_18; case 9: return true; case 10: return false; } break; } return true; IL_18: arg_A1_0 = 2057527762; goto IL_9C; IL_E7: arg_A1_0 = ((other != this) ? 1345838806 : 217204812); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_9F: uint arg_7F_0 = 2965734066u; while (true) { uint num2; switch ((num2 = (arg_7F_0 ^ 3407694500u)) % 5u) { case 0u: goto IL_9F; case 1u: num ^= PlayerVariables.smethod_1(this.Identity); arg_7F_0 = (((this.Rating != 0.0) ? 2622733283u : 4227625490u) ^ num2 * 798244398u); continue; case 2u: num ^= this.attribute_.GetHashCode(); arg_7F_0 = 2808057542u; continue; case 4u: num ^= this.Rating.GetHashCode(); arg_7F_0 = (num2 * 407181340u ^ 743110258u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Identity); while (true) { IL_A9: uint arg_89_0 = 2196407766u; while (true) { uint num; switch ((num = (arg_89_0 ^ 2478727347u)) % 5u) { case 0u: output.WriteRawTag(17); output.WriteDouble(this.Rating); arg_89_0 = (num * 2175325036u ^ 3466846445u); continue; case 1u: arg_89_0 = (((this.Rating != 0.0) ? 403211167u : 1007623444u) ^ num * 755390161u); continue; case 3u: this.attribute_.WriteTo(output, PlayerVariables._repeated_attribute_codec); arg_89_0 = 3466860008u; continue; case 4u: goto IL_A9; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_79: uint arg_5D_0 = 2376747840u; while (true) { uint num2; switch ((num2 = (arg_5D_0 ^ 2317507702u)) % 4u) { case 1u: num += 9; arg_5D_0 = (num2 * 3209455621u ^ 3268170103u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Identity); arg_5D_0 = (((this.Rating == 0.0) ? 791270254u : 1527267875u) ^ num2 * 2835051204u); continue; case 3u: goto IL_79; } goto Block_2; } } Block_2: return num + this.attribute_.CalculateSize(PlayerVariables._repeated_attribute_codec); } public void MergeFrom(PlayerVariables other) { if (other == null) { goto IL_D9; } goto IL_127; uint arg_E3_0; while (true) { IL_DE: uint num; switch ((num = (arg_E3_0 ^ 3788398140u)) % 10u) { case 0u: goto IL_D9; case 2u: return; case 3u: arg_E3_0 = (((this.identity_ == null) ? 2733008484u : 3909706057u) ^ num * 2442557110u); continue; case 4u: this.Rating = other.Rating; arg_E3_0 = (num * 40007797u ^ 1772240286u); continue; case 5u: goto IL_127; case 6u: this.identity_ = new Identity(); arg_E3_0 = (num * 2821318932u ^ 168671323u); continue; case 7u: arg_E3_0 = ((other.Rating != 0.0) ? 3681889280u : 2173528306u); continue; case 8u: this.attribute_.Add(other.attribute_); arg_E3_0 = 4158894415u; continue; case 9u: this.Identity.MergeFrom(other.Identity); arg_E3_0 = 2689790399u; continue; } break; } return; IL_D9: arg_E3_0 = 2238235374u; goto IL_DE; IL_127: arg_E3_0 = ((other.identity_ != null) ? 2937306523u : 2689790399u); goto IL_DE; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) != 0u) ? 1685106083u : 2039359105u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 1937081726u)) % 14u) { case 0u: goto IL_199; case 1u: arg_145_0 = ((num != 10u) ? 1824176012u : 443367891u); continue; case 2u: arg_145_0 = (num2 * 2449798022u ^ 807637158u); continue; case 3u: input.ReadMessage(this.identity_); arg_145_0 = 1447388458u; continue; case 4u: arg_145_0 = (((num != 26u) ? 3730370298u : 4166605457u) ^ num2 * 3393588191u); continue; case 6u: arg_145_0 = 1685106083u; continue; case 7u: this.Rating = input.ReadDouble(); arg_145_0 = 1766095772u; continue; case 8u: arg_145_0 = (num2 * 2269217752u ^ 3267088794u); continue; case 9u: this.attribute_.AddEntriesFrom(input, PlayerVariables._repeated_attribute_codec); arg_145_0 = 1447388458u; continue; case 10u: input.SkipLastField(); arg_145_0 = (num2 * 2578504984u ^ 3507678908u); continue; case 11u: arg_145_0 = ((this.identity_ != null) ? 1163804235u : 1857595203u); continue; case 12u: arg_145_0 = (((num == 17u) ? 3954779237u : 3965153058u) ^ num2 * 4005391376u); continue; case 13u: this.identity_ = new Identity(); arg_145_0 = (num2 * 1233416380u ^ 3947752071u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/BlockedPlayer.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class BlockedPlayer : IMessage<BlockedPlayer>, IEquatable<BlockedPlayer>, IDeepCloneable<BlockedPlayer>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BlockedPlayer.__c __9 = new BlockedPlayer.__c(); internal BlockedPlayer cctor>b__39_0() { return new BlockedPlayer(); } } private static readonly MessageParser<BlockedPlayer> _parser = new MessageParser<BlockedPlayer>(new Func<BlockedPlayer>(BlockedPlayer.__c.__9.<.cctor>b__39_0)); public const int AccountIdFieldNumber = 1; private EntityId accountId_; public const int NameFieldNumber = 2; private string name_ = ""; public const int RoleFieldNumber = 3; private static readonly FieldCodec<uint> _repeated_role_codec = FieldCodec.ForUInt32(26u); private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public const int PrivilegesFieldNumber = 4; private ulong privileges_; public static MessageParser<BlockedPlayer> Parser { get { return BlockedPlayer._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return BlockedPlayer.Descriptor; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<uint> Role { get { return this.role_; } } public ulong Privileges { get { return this.privileges_; } set { this.privileges_ = value; } } public BlockedPlayer() { } public BlockedPlayer(BlockedPlayer other) : this() { this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); this.name_ = other.name_; this.role_ = other.role_.Clone(); this.privileges_ = other.privileges_; } public BlockedPlayer Clone() { return new BlockedPlayer(this); } public override bool Equals(object other) { return this.Equals(other as BlockedPlayer); } public bool Equals(BlockedPlayer other) { if (other == null) { goto IL_42; } goto IL_121; int arg_D3_0; while (true) { IL_CE: switch ((arg_D3_0 ^ -1078661309) % 13) { case 0: return false; case 1: goto IL_121; case 2: return false; case 4: return false; case 5: arg_D3_0 = ((!this.role_.Equals(other.role_)) ? -1481469245 : -753737616); continue; case 6: arg_D3_0 = ((!BlockedPlayer.smethod_0(this.AccountId, other.AccountId)) ? -1902098511 : -776355673); continue; case 7: arg_D3_0 = ((!BlockedPlayer.smethod_1(this.Name, other.Name)) ? -1991359489 : -1525429261); continue; case 8: return false; case 9: goto IL_42; case 10: return false; case 11: return true; case 12: arg_D3_0 = ((this.Privileges == other.Privileges) ? -1853478510 : -1652919627); continue; } break; } return true; IL_42: arg_D3_0 = -1958768719; goto IL_CE; IL_121: arg_D3_0 = ((other != this) ? -1012304817 : -423079104); goto IL_CE; } public override int GetHashCode() { int num = 1; while (true) { IL_128: uint arg_F7_0 = 3319762844u; while (true) { uint num2; switch ((num2 = (arg_F7_0 ^ 2426251676u)) % 9u) { case 0u: num ^= this.Privileges.GetHashCode(); arg_F7_0 = (num2 * 2864286044u ^ 3290563877u); continue; case 1u: num ^= BlockedPlayer.smethod_2(this.role_); arg_F7_0 = 4203931261u; continue; case 2u: arg_F7_0 = ((BlockedPlayer.smethod_3(this.Name) != 0) ? 3318404011u : 3199914680u); continue; case 4u: num ^= BlockedPlayer.smethod_2(this.Name); arg_F7_0 = (num2 * 1248675842u ^ 2328084182u); continue; case 5u: arg_F7_0 = (((this.Privileges == 0uL) ? 1261548989u : 350226813u) ^ num2 * 35458580u); continue; case 6u: arg_F7_0 = (((this.accountId_ != null) ? 2929698373u : 3011058366u) ^ num2 * 3394385180u); continue; case 7u: num ^= BlockedPlayer.smethod_2(this.AccountId); arg_F7_0 = (num2 * 4037650652u ^ 323654850u); continue; case 8u: goto IL_128; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountId_ != null) { goto IL_8A; } goto IL_13C; uint arg_F8_0; while (true) { IL_F3: uint num; switch ((num = (arg_F8_0 ^ 2302662536u)) % 10u) { case 1u: output.WriteRawTag(10); arg_F8_0 = (num * 1355044995u ^ 1019533478u); continue; case 2u: this.role_.WriteTo(output, BlockedPlayer._repeated_role_codec); arg_F8_0 = ((this.Privileges == 0uL) ? 3264258472u : 3705879998u); continue; case 3u: output.WriteUInt64(this.Privileges); arg_F8_0 = (num * 607017837u ^ 3001692191u); continue; case 4u: goto IL_8A; case 5u: output.WriteMessage(this.AccountId); arg_F8_0 = (num * 2969667800u ^ 898114965u); continue; case 6u: output.WriteString(this.Name); arg_F8_0 = (num * 997679811u ^ 1400150140u); continue; case 7u: goto IL_13C; case 8u: output.WriteRawTag(32); arg_F8_0 = (num * 1617536824u ^ 2670085483u); continue; case 9u: output.WriteRawTag(18); arg_F8_0 = (num * 574638090u ^ 2769511200u); continue; } break; } return; IL_8A: arg_F8_0 = 2262117019u; goto IL_F3; IL_13C: arg_F8_0 = ((BlockedPlayer.smethod_3(this.Name) != 0) ? 3686600121u : 2842540346u); goto IL_F3; } public int CalculateSize() { int num = 0; while (true) { IL_133: uint arg_102_0 = 3495099032u; while (true) { uint num2; switch ((num2 = (arg_102_0 ^ 2519829747u)) % 9u) { case 0u: arg_102_0 = (((this.Privileges != 0uL) ? 1073431962u : 1219905381u) ^ num2 * 334755298u); continue; case 1u: arg_102_0 = (((this.accountId_ != null) ? 2868053833u : 2780194460u) ^ num2 * 2278733959u); continue; case 3u: goto IL_133; case 4u: arg_102_0 = ((BlockedPlayer.smethod_3(this.Name) == 0) ? 2682869793u : 2634170580u); continue; case 5u: num += this.role_.CalculateSize(BlockedPlayer._repeated_role_codec); arg_102_0 = 2891170539u; continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_102_0 = (num2 * 17532728u ^ 2140370169u); continue; case 7u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Privileges); arg_102_0 = (num2 * 3224729489u ^ 4278460220u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_102_0 = (num2 * 2466941925u ^ 475894722u); continue; } return num; } } return num; } public void MergeFrom(BlockedPlayer other) { if (other == null) { goto IL_C9; } goto IL_15C; uint arg_114_0; while (true) { IL_10F: uint num; switch ((num = (arg_114_0 ^ 3633073387u)) % 11u) { case 1u: this.Name = other.Name; arg_114_0 = (num * 2686799198u ^ 3645525674u); continue; case 2u: arg_114_0 = ((BlockedPlayer.smethod_3(other.Name) == 0) ? 3431186452u : 3528022714u); continue; case 3u: goto IL_15C; case 4u: goto IL_C9; case 5u: this.accountId_ = new EntityId(); arg_114_0 = (num * 3495464189u ^ 4102720120u); continue; case 6u: this.AccountId.MergeFrom(other.AccountId); arg_114_0 = 2568481129u; continue; case 7u: this.Privileges = other.Privileges; arg_114_0 = (num * 537714060u ^ 1058620960u); continue; case 8u: this.role_.Add(other.role_); arg_114_0 = ((other.Privileges != 0uL) ? 4084748703u : 2537847120u); continue; case 9u: return; case 10u: arg_114_0 = (((this.accountId_ == null) ? 1360126517u : 448991246u) ^ num * 2910243082u); continue; } break; } return; IL_C9: arg_114_0 = 2297694365u; goto IL_10F; IL_15C: arg_114_0 = ((other.accountId_ == null) ? 2568481129u : 3124463263u); goto IL_10F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_259: uint num; uint arg_1ED_0 = ((num = input.ReadTag()) != 0u) ? 3724992296u : 3669460808u; while (true) { uint num2; switch ((num2 = (arg_1ED_0 ^ 4126607913u)) % 20u) { case 0u: arg_1ED_0 = (num2 * 1415317846u ^ 49771698u); continue; case 1u: arg_1ED_0 = (num2 * 1333339048u ^ 1338437474u); continue; case 2u: arg_1ED_0 = (((num == 10u) ? 2772845016u : 3492789934u) ^ num2 * 3468762756u); continue; case 3u: this.Name = input.ReadString(); arg_1ED_0 = 3693980938u; continue; case 4u: arg_1ED_0 = ((num == 24u) ? 2909859459u : 3519812658u); continue; case 5u: input.ReadMessage(this.accountId_); arg_1ED_0 = 2257105830u; continue; case 6u: this.role_.AddEntriesFrom(input, BlockedPlayer._repeated_role_codec); arg_1ED_0 = 2204226384u; continue; case 7u: arg_1ED_0 = (((num == 26u) ? 1865512977u : 1855948309u) ^ num2 * 3539600598u); continue; case 8u: input.SkipLastField(); arg_1ED_0 = 2315461821u; continue; case 10u: arg_1ED_0 = (((num != 32u) ? 3504513667u : 2388138679u) ^ num2 * 3670020557u); continue; case 11u: goto IL_259; case 12u: arg_1ED_0 = (num2 * 627121355u ^ 1985131637u); continue; case 13u: arg_1ED_0 = ((num <= 18u) ? 3906587783u : 3116866901u); continue; case 14u: arg_1ED_0 = 3724992296u; continue; case 15u: arg_1ED_0 = (num2 * 3474604631u ^ 2078883987u); continue; case 16u: this.Privileges = input.ReadUInt64(); arg_1ED_0 = 3693980938u; continue; case 17u: arg_1ED_0 = ((this.accountId_ != null) ? 3417821488u : 2221401571u); continue; case 18u: this.accountId_ = new EntityId(); arg_1ED_0 = (num2 * 3701692838u ^ 2269210572u); continue; case 19u: arg_1ED_0 = (((num == 18u) ? 3219019011u : 2284052784u) ^ num2 * 2142734535u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.WellKnownTypes/EmptyReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class EmptyReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return EmptyReflection.descriptor; } } static EmptyReflection() { EmptyReflection.descriptor = FileDescriptor.FromGeneratedCode(EmptyReflection.smethod_1(EmptyReflection.smethod_0(Module.smethod_37<string>(2070213394u), Module.smethod_35<string>(3780196782u), Module.smethod_35<string>(3122675838u), Module.smethod_33<string>(255339095u))), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(EmptyReflection.smethod_2(typeof(Empty).TypeHandle), Empty.Parser, null, null, null, null) })); } static string smethod_0(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/LogoutHandler.cs using AuthServer.Game.Entities; using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants.Net; using Framework.Network.Packets; using System; using System.Collections.Generic; using System.Linq; namespace AuthServer.Game.Packets.PacketHandler { public class LogoutHandler : Manager { [Opcode2(ClientMessage.CliLogoutRequest, "17658")] public static void HandleLogoutRequest(ref PacketReader packet, WorldClass2 session) { Character character = session.Character; PacketWriter packetWriter; while (true) { IL_DA: uint arg_B6_0 = 2356821893u; while (true) { uint num; switch ((num = (arg_B6_0 ^ 3488573736u)) % 6u) { case 1u: Manager.ObjectMgr.SavePositionToDB(character); arg_B6_0 = (num * 2991657712u ^ 1093469771u); continue; case 2u: Manager.WorldMgr.WriteOutOfRangeObjects(Manager.SpawnMgr.GetOutOfRangeCreatures(character), Manager.WorldMgr.Sessions.ToList<KeyValuePair<ulong, WorldClass>>()[0].Value); arg_B6_0 = (num * 3357637708u ^ 3124184774u); continue; case 3u: goto IL_DA; case 4u: Manager.WorldMgr.DeleteSession(character.Guid); arg_B6_0 = (num * 1832138036u ^ 1888841376u); continue; case 5u: packetWriter = new PacketWriter(ServerMessage.LogoutComplete, true); Manager.WorldMgr.GetSession(character.Guid); arg_B6_0 = (num * 1880255037u ^ 1323852181u); continue; } goto Block_1; } } Block_1: session.Send(ref packetWriter); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Syntax.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [ComVisible(true)] public enum Syntax { SYNTAX_PROTO2, SYNTAX_PROTO3 } } <file_sep>/AuthServer/ItemDisplayInfo.cs using System; namespace AuthServer { public class ItemDisplayInfo { public int DisplayId { get; set; } public int ModelId1 { get; set; } public int ModelId2 { get; set; } public int TextureId1 { get; set; } public int TextureId2 { get; set; } public int Geoset1 { get; set; } public int Geoset2 { get; set; } public int Geoset3 { get; set; } public int Unknown { get; set; } public int Unknown2 { get; set; } public int Unknown3 { get; set; } public int Flags { get; set; } public int Unknown4 { get; set; } public int HelmGeoset1 { get; set; } public int HelmGeoset2 { get; set; } public int ItemVisual { get; set; } public int Unknown5 { get; set; } public int Unknown6 { get; set; } public int Unknown7 { get; set; } public int Unknown8 { get; set; } public int Unknown9 { get; set; } public int Unknown10 { get; set; } public int Unknown11 { get; set; } } } <file_sep>/Bgs.Protocol.Challenge.V1/Challenge.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class Challenge : IMessage<Challenge>, IEquatable<Challenge>, IDeepCloneable<Challenge>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Challenge.__c __9 = new Challenge.__c(); internal Challenge cctor>b__39_0() { return new Challenge(); } } private static readonly MessageParser<Challenge> _parser = new MessageParser<Challenge>(new Func<Challenge>(Challenge.__c.__9.<.cctor>b__39_0)); public const int TypeFieldNumber = 1; private uint type_; public const int InfoFieldNumber = 2; private string info_ = ""; public const int AnswerFieldNumber = 3; private string answer_ = ""; public const int RetriesFieldNumber = 4; private uint retries_; public static MessageParser<Challenge> Parser { get { return Challenge._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Challenge.Descriptor; } } public uint Type { get { return this.type_; } set { this.type_ = value; } } public string Info { get { return this.info_; } set { this.info_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string Answer { get { return this.answer_; } set { this.answer_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public uint Retries { get { return this.retries_; } set { this.retries_ = value; } } public Challenge() { } public Challenge(Challenge other) : this() { while (true) { IL_9E: uint arg_7A_0 = 905175719u; while (true) { uint num; switch ((num = (arg_7A_0 ^ 1563902102u)) % 6u) { case 0u: this.retries_ = other.retries_; arg_7A_0 = (num * 472093204u ^ 3939865869u); continue; case 1u: this.type_ = other.type_; arg_7A_0 = (num * 801638375u ^ 3662830945u); continue; case 2u: this.info_ = other.info_; arg_7A_0 = (num * 3843288302u ^ 4156245234u); continue; case 4u: this.answer_ = other.answer_; arg_7A_0 = (num * 687102239u ^ 3076275314u); continue; case 5u: goto IL_9E; } return; } } } public Challenge Clone() { return new Challenge(this); } public override bool Equals(object other) { return this.Equals(other as Challenge); } public bool Equals(Challenge other) { if (other == null) { goto IL_42; } goto IL_119; int arg_CB_0; while (true) { IL_C6: switch ((arg_CB_0 ^ -1675455976) % 13) { case 0: arg_CB_0 = ((this.Retries == other.Retries) ? -1690733428 : -866040315); continue; case 1: return false; case 2: goto IL_119; case 3: return false; case 4: arg_CB_0 = ((!Challenge.smethod_0(this.Answer, other.Answer)) ? -1146425575 : -1820917743); continue; case 6: return true; case 7: return false; case 8: return false; case 9: arg_CB_0 = (Challenge.smethod_0(this.Info, other.Info) ? -1630173037 : -1309947702); continue; case 10: goto IL_42; case 11: return false; case 12: arg_CB_0 = ((this.Type != other.Type) ? -1440909631 : -1380756587); continue; } break; } return true; IL_42: arg_CB_0 = -98337878; goto IL_C6; IL_119: arg_CB_0 = ((other == this) ? -567449474 : -1376668207); goto IL_C6; } public override int GetHashCode() { int num = 1; while (true) { IL_119: uint arg_ED_0 = 450068637u; while (true) { uint num2; switch ((num2 = (arg_ED_0 ^ 547790272u)) % 8u) { case 0u: num ^= this.Answer.GetHashCode(); arg_ED_0 = (num2 * 2276955974u ^ 4048944654u); continue; case 1u: arg_ED_0 = ((this.Answer.Length != 0) ? 1455013200u : 787622254u); continue; case 2u: num ^= this.Info.GetHashCode(); arg_ED_0 = (num2 * 554577516u ^ 3698992849u); continue; case 3u: num ^= this.Retries.GetHashCode(); arg_ED_0 = (num2 * 3286601492u ^ 4183716576u); continue; case 5u: num ^= this.Type.GetHashCode(); arg_ED_0 = (((this.Info.Length == 0) ? 2437328491u : 3990832112u) ^ num2 * 45289354u); continue; case 6u: arg_ED_0 = ((this.Retries == 0u) ? 864683548u : 420381939u); continue; case 7u: goto IL_119; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); output.WriteFixed32(this.Type); if (Challenge.smethod_1(this.Info) != 0) { goto IL_36; } goto IL_12E; uint arg_EE_0; while (true) { IL_E9: uint num; switch ((num = (arg_EE_0 ^ 4111191043u)) % 9u) { case 0u: arg_EE_0 = ((this.Retries == 0u) ? 2735922105u : 3844168837u); continue; case 1u: output.WriteString(this.Info); arg_EE_0 = (num * 805652000u ^ 2130626979u); continue; case 2u: output.WriteRawTag(18); arg_EE_0 = (num * 2046745914u ^ 1140229615u); continue; case 3u: output.WriteRawTag(32); arg_EE_0 = (num * 2541211503u ^ 1953492169u); continue; case 4u: output.WriteUInt32(this.Retries); arg_EE_0 = (num * 2733493127u ^ 710902281u); continue; case 5u: output.WriteRawTag(26); output.WriteString(this.Answer); arg_EE_0 = (num * 4153763114u ^ 451432512u); continue; case 6u: goto IL_36; case 7u: goto IL_12E; } break; } return; IL_36: arg_EE_0 = 3276487357u; goto IL_E9; IL_12E: arg_EE_0 = ((Challenge.smethod_1(this.Answer) == 0) ? 2819679088u : 2537892155u); goto IL_E9; } public int CalculateSize() { int num = 5; if (Challenge.smethod_1(this.Info) != 0) { goto IL_A7; } goto IL_E8; uint arg_B1_0; while (true) { IL_AC: uint num2; switch ((num2 = (arg_B1_0 ^ 1650604115u)) % 7u) { case 0u: goto IL_A7; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Info); arg_B1_0 = (num2 * 3535685119u ^ 609103902u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Retries); arg_B1_0 = (num2 * 533561051u ^ 2929029727u); continue; case 3u: arg_B1_0 = ((this.Retries == 0u) ? 2085153039u : 947016355u); continue; case 4u: goto IL_E8; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.Answer); arg_B1_0 = (num2 * 4093125172u ^ 1408280092u); continue; } break; } return num; IL_A7: arg_B1_0 = 248825369u; goto IL_AC; IL_E8: arg_B1_0 = ((Challenge.smethod_1(this.Answer) != 0) ? 1613690056u : 1377731424u); goto IL_AC; } public void MergeFrom(Challenge other) { if (other == null) { goto IL_C7; } goto IL_14F; uint arg_107_0; while (true) { IL_102: uint num; switch ((num = (arg_107_0 ^ 1027814355u)) % 11u) { case 0u: this.Type = other.Type; arg_107_0 = (num * 4283474406u ^ 1771106757u); continue; case 1u: this.Info = other.Info; arg_107_0 = (num * 3061905897u ^ 3479315219u); continue; case 2u: goto IL_C7; case 3u: arg_107_0 = ((Challenge.smethod_1(other.Answer) == 0) ? 917901759u : 1602427094u); continue; case 5u: return; case 6u: arg_107_0 = ((other.Retries != 0u) ? 941151980u : 275480317u); continue; case 7u: goto IL_14F; case 8u: arg_107_0 = ((Challenge.smethod_1(other.Info) != 0) ? 1289079827u : 1850910419u); continue; case 9u: this.Answer = other.Answer; arg_107_0 = (num * 1990012044u ^ 2386260739u); continue; case 10u: this.Retries = other.Retries; arg_107_0 = (num * 3662567364u ^ 3290338241u); continue; } break; } return; IL_C7: arg_107_0 = 1856299412u; goto IL_102; IL_14F: arg_107_0 = ((other.Type != 0u) ? 521836576u : 1664401047u); goto IL_102; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1DE: uint num; uint arg_17E_0 = ((num = input.ReadTag()) != 0u) ? 2501644425u : 2147969630u; while (true) { uint num2; switch ((num2 = (arg_17E_0 ^ 3373022479u)) % 17u) { case 0u: this.Answer = input.ReadString(); arg_17E_0 = 3696594752u; continue; case 1u: arg_17E_0 = (((num == 32u) ? 4140407217u : 2978665872u) ^ num2 * 2061232237u); continue; case 2u: this.Type = input.ReadFixed32(); arg_17E_0 = 3868917373u; continue; case 3u: input.SkipLastField(); arg_17E_0 = 3342081546u; continue; case 4u: arg_17E_0 = ((num != 26u) ? 2179447816u : 2680330212u); continue; case 5u: arg_17E_0 = (num2 * 2288126843u ^ 1171177126u); continue; case 6u: this.Info = input.ReadString(); arg_17E_0 = 3502139827u; continue; case 7u: arg_17E_0 = (((num != 13u) ? 145375986u : 2122975277u) ^ num2 * 1486374912u); continue; case 8u: arg_17E_0 = (num2 * 3483566139u ^ 2022042714u); continue; case 9u: arg_17E_0 = (((num == 18u) ? 3485832636u : 3673566772u) ^ num2 * 1038292188u); continue; case 10u: arg_17E_0 = (num2 * 1746813491u ^ 3095535040u); continue; case 11u: this.Retries = input.ReadUInt32(); arg_17E_0 = 3868917373u; continue; case 12u: arg_17E_0 = 2501644425u; continue; case 13u: goto IL_1DE; case 15u: arg_17E_0 = ((num <= 18u) ? 4018200022u : 3725557977u); continue; case 16u: arg_17E_0 = (num2 * 569868523u ^ 1492072169u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Channel.V1/ChannelDescription.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class ChannelDescription : IMessage<ChannelDescription>, IEquatable<ChannelDescription>, IDeepCloneable<ChannelDescription>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChannelDescription.__c __9 = new ChannelDescription.__c(); internal ChannelDescription cctor>b__34_0() { return new ChannelDescription(); } } private static readonly MessageParser<ChannelDescription> _parser = new MessageParser<ChannelDescription>(new Func<ChannelDescription>(ChannelDescription.__c.__9.<.cctor>b__34_0)); public const int ChannelIdFieldNumber = 1; private EntityId channelId_; public const int CurrentMembersFieldNumber = 2; private uint currentMembers_; public const int StateFieldNumber = 3; private ChannelState state_; public static MessageParser<ChannelDescription> Parser { get { return ChannelDescription._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return ChannelDescription.Descriptor; } } public EntityId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public uint CurrentMembers { get { return this.currentMembers_; } set { this.currentMembers_ = value; } } public ChannelState State { get { return this.state_; } set { this.state_ = value; } } public ChannelDescription() { } public ChannelDescription(ChannelDescription other) : this() { this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); this.currentMembers_ = other.currentMembers_; this.State = ((other.state_ != null) ? other.State.Clone() : null); } public ChannelDescription Clone() { return new ChannelDescription(this); } public override bool Equals(object other) { return this.Equals(other as ChannelDescription); } public bool Equals(ChannelDescription other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ 2046504799) % 11) { case 0: goto IL_9A; case 1: arg_A4_0 = ((this.CurrentMembers == other.CurrentMembers) ? 846915370 : 1006972619); continue; case 2: arg_A4_0 = ((!ChannelDescription.smethod_0(this.ChannelId, other.ChannelId)) ? 1345199882 : 456232746); continue; case 3: goto IL_EA; case 4: return true; case 6: return false; case 7: return false; case 8: return false; case 9: arg_A4_0 = ((!ChannelDescription.smethod_0(this.State, other.State)) ? 601204519 : 184215589); continue; case 10: return false; } break; } return true; IL_9A: arg_A4_0 = 1978584458; goto IL_9F; IL_EA: arg_A4_0 = ((other != this) ? 1321912239 : 93397407); goto IL_9F; } public override int GetHashCode() { int num = 1; while (true) { IL_C3: uint arg_9F_0 = 1416415433u; while (true) { uint num2; switch ((num2 = (arg_9F_0 ^ 450619501u)) % 6u) { case 0u: num ^= this.CurrentMembers.GetHashCode(); arg_9F_0 = (num2 * 1187102004u ^ 4093682778u); continue; case 1u: arg_9F_0 = ((this.state_ != null) ? 1707230778u : 600245386u); continue; case 2u: goto IL_C3; case 4u: num ^= ChannelDescription.smethod_1(this.ChannelId); arg_9F_0 = (((this.CurrentMembers == 0u) ? 2263424654u : 2927953491u) ^ num2 * 3243061271u); continue; case 5u: num ^= this.State.GetHashCode(); arg_9F_0 = (num2 * 3005897316u ^ 1063234422u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.ChannelId); while (true) { IL_E3: uint arg_BB_0 = 3821350917u; while (true) { uint num; switch ((num = (arg_BB_0 ^ 3568933640u)) % 7u) { case 0u: goto IL_E3; case 1u: arg_BB_0 = ((this.state_ == null) ? 3739044711u : 4109591429u); continue; case 2u: output.WriteUInt32(this.CurrentMembers); arg_BB_0 = (num * 2402720761u ^ 3911584534u); continue; case 3u: output.WriteRawTag(16); arg_BB_0 = (num * 3892087012u ^ 985658767u); continue; case 4u: output.WriteRawTag(26); output.WriteMessage(this.State); arg_BB_0 = (num * 3324236952u ^ 2504137951u); continue; case 6u: arg_BB_0 = (((this.CurrentMembers == 0u) ? 1480447892u : 1748754294u) ^ num * 2054891013u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_C6: uint arg_A2_0 = 3076204234u; while (true) { uint num2; switch ((num2 = (arg_A2_0 ^ 4057165412u)) % 6u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.State); arg_A2_0 = (num2 * 728019647u ^ 2076669273u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_A2_0 = (((this.CurrentMembers != 0u) ? 2174749568u : 4236279133u) ^ num2 * 2674566030u); continue; case 3u: arg_A2_0 = ((this.state_ == null) ? 3440703544u : 2732329403u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.CurrentMembers); arg_A2_0 = (num2 * 1497773107u ^ 1793820665u); continue; case 5u: goto IL_C6; } return num; } } return num; } public void MergeFrom(ChannelDescription other) { if (other == null) { goto IL_F9; } goto IL_194; uint arg_144_0; while (true) { IL_13F: uint num; switch ((num = (arg_144_0 ^ 1474351934u)) % 13u) { case 0u: arg_144_0 = (((this.channelId_ != null) ? 2551212750u : 3062630265u) ^ num * 1834309727u); continue; case 1u: this.ChannelId.MergeFrom(other.ChannelId); arg_144_0 = 1187251169u; continue; case 2u: goto IL_F9; case 3u: this.State.MergeFrom(other.State); arg_144_0 = 1714037548u; continue; case 4u: this.state_ = new ChannelState(); arg_144_0 = (num * 4195487943u ^ 1139411475u); continue; case 5u: arg_144_0 = ((other.state_ == null) ? 1714037548u : 846180196u); continue; case 6u: this.channelId_ = new EntityId(); arg_144_0 = (num * 1451572234u ^ 287452827u); continue; case 7u: arg_144_0 = (((this.state_ == null) ? 3035630396u : 2180371233u) ^ num * 3381352313u); continue; case 8u: return; case 9u: this.CurrentMembers = other.CurrentMembers; arg_144_0 = (num * 86838970u ^ 1765423418u); continue; case 10u: arg_144_0 = ((other.CurrentMembers == 0u) ? 155982310u : 1687855736u); continue; case 11u: goto IL_194; } break; } return; IL_F9: arg_144_0 = 2135228096u; goto IL_13F; IL_194: arg_144_0 = ((other.channelId_ != null) ? 1976941017u : 1187251169u); goto IL_13F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1E0: uint num; uint arg_184_0 = ((num = input.ReadTag()) != 0u) ? 4195482220u : 3491581390u; while (true) { uint num2; switch ((num2 = (arg_184_0 ^ 3536010821u)) % 16u) { case 0u: input.ReadMessage(this.channelId_); arg_184_0 = 3901412996u; continue; case 1u: arg_184_0 = (num2 * 1782905110u ^ 1378722686u); continue; case 2u: input.ReadMessage(this.state_); arg_184_0 = 4046199528u; continue; case 3u: input.SkipLastField(); arg_184_0 = (num2 * 1391204162u ^ 61793038u); continue; case 4u: arg_184_0 = (((num == 16u) ? 3904248211u : 3289105210u) ^ num2 * 2021271080u); continue; case 5u: arg_184_0 = ((this.channelId_ == null) ? 4093055321u : 3909445221u); continue; case 6u: this.CurrentMembers = input.ReadUInt32(); arg_184_0 = 3461028031u; continue; case 7u: arg_184_0 = ((this.state_ == null) ? 3995700621u : 2960989895u); continue; case 8u: this.state_ = new ChannelState(); arg_184_0 = (num2 * 3920718553u ^ 2530617935u); continue; case 9u: arg_184_0 = ((num == 10u) ? 3549746576u : 2392855777u); continue; case 10u: arg_184_0 = (num2 * 71520354u ^ 1654067548u); continue; case 12u: this.channelId_ = new EntityId(); arg_184_0 = (num2 * 1104743643u ^ 227605137u); continue; case 13u: goto IL_1E0; case 14u: arg_184_0 = 4195482220u; continue; case 15u: arg_184_0 = (((num == 26u) ? 620678519u : 99632627u) ^ num2 * 1814017019u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/QueryResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class QueryResponse : IMessage<QueryResponse>, IEquatable<QueryResponse>, IDeepCloneable<QueryResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly QueryResponse.__c __9 = new QueryResponse.__c(); internal QueryResponse cctor>b__24_0() { return new QueryResponse(); } } private static readonly MessageParser<QueryResponse> _parser = new MessageParser<QueryResponse>(new Func<QueryResponse>(QueryResponse.__c.__9.<.cctor>b__24_0)); public const int FieldFieldNumber = 2; private static readonly FieldCodec<Field> _repeated_field_codec = FieldCodec.ForMessage<Field>(18u, Bgs.Protocol.Presence.V1.Field.Parser); private readonly RepeatedField<Field> field_ = new RepeatedField<Field>(); public static MessageParser<QueryResponse> Parser { get { return QueryResponse._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return QueryResponse.Descriptor; } } public RepeatedField<Field> Field { get { return this.field_; } } public QueryResponse() { } public QueryResponse(QueryResponse other) : this() { this.field_ = other.field_.Clone(); } public QueryResponse Clone() { return new QueryResponse(this); } public override bool Equals(object other) { return this.Equals(other as QueryResponse); } public bool Equals(QueryResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1699628692) % 7) { case 0: goto IL_3E; case 1: return false; case 2: return true; case 4: return false; case 5: goto IL_7A; case 6: arg_48_0 = ((!this.field_.Equals(other.field_)) ? 1018905243 : 620130648); continue; } break; } return true; IL_3E: arg_48_0 = 540813264; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 1080980239 : 1905494726); goto IL_43; } public override int GetHashCode() { return 1 ^ QueryResponse.smethod_0(this.field_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.field_.WriteTo(output, QueryResponse._repeated_field_codec); } public int CalculateSize() { return 0 + this.field_.CalculateSize(QueryResponse._repeated_field_codec); } public void MergeFrom(QueryResponse other) { if (other == null) { return; } this.field_.Add(other.field_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) == 0u) ? 1425174024u : 2096751585u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 792860615u)) % 7u) { case 0u: arg_77_0 = (num2 * 1995141066u ^ 2616893159u); continue; case 1u: arg_77_0 = ((num != 18u) ? 1821064951u : 7951922u); continue; case 2u: input.SkipLastField(); arg_77_0 = (num2 * 228245034u ^ 3230224358u); continue; case 3u: arg_77_0 = 2096751585u; continue; case 5u: this.field_.AddEntriesFrom(input, QueryResponse._repeated_field_codec); arg_77_0 = 94887853u; continue; case 6u: goto IL_AE; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/ServiceOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class ServiceOptions : IMessage, IMessage<ServiceOptions>, IEquatable<ServiceOptions>, IDeepCloneable<ServiceOptions> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServiceOptions.__c __9 = new ServiceOptions.__c(); internal ServiceOptions cctor>b__29_0() { return new ServiceOptions(); } } private static readonly MessageParser<ServiceOptions> _parser = new MessageParser<ServiceOptions>(new Func<ServiceOptions>(ServiceOptions.__c.__9.<.cctor>b__29_0)); public const int DeprecatedFieldNumber = 33; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<ServiceOptions> Parser { get { return ServiceOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[14]; } } MessageDescriptor IMessage.Descriptor { get { return ServiceOptions.Descriptor; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public ServiceOptions() { } public ServiceOptions(ServiceOptions other) : this() { this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public ServiceOptions Clone() { return new ServiceOptions(this); } public override bool Equals(object other) { return this.Equals(other as ServiceOptions); } public bool Equals(ServiceOptions other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -1758739096) % 9) { case 0: arg_72_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? -1888253396 : -1517905336); continue; case 1: arg_72_0 = ((this.Deprecated == other.Deprecated) ? -483985860 : -210393587); continue; case 2: goto IL_B0; case 3: return false; case 4: return false; case 5: return true; case 6: goto IL_15; case 8: return false; } break; } return true; IL_15: arg_72_0 = -506187043; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? -1321179362 : -2037169859); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 374073514u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 1481268609u)) % 4u) { case 0u: goto IL_6C; case 2u: num ^= this.Deprecated.GetHashCode(); arg_50_0 = (num2 * 2650918994u ^ 3180135376u); continue; case 3u: arg_50_0 = (((!this.Deprecated) ? 956478894u : 1775457557u) ^ num2 * 2802779062u); continue; } goto Block_2; } } Block_2: return num ^ this.uninterpretedOption_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Deprecated) { goto IL_08; } goto IL_55; uint arg_39_0; while (true) { IL_34: uint num; switch ((num = (arg_39_0 ^ 1852093021u)) % 4u) { case 0u: goto IL_55; case 1u: output.WriteRawTag(136, 2); output.WriteBool(this.Deprecated); arg_39_0 = (num * 1858635082u ^ 4052972275u); continue; case 2u: goto IL_08; } break; } return; IL_08: arg_39_0 = 2114046012u; goto IL_34; IL_55: this.uninterpretedOption_.WriteTo(output, ServiceOptions._repeated_uninterpretedOption_codec); arg_39_0 = 1737683498u; goto IL_34; } public int CalculateSize() { int num = 0; while (true) { IL_5F: uint arg_43_0 = 245102029u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 1888696715u)) % 4u) { case 0u: goto IL_5F; case 1u: num += 3; arg_43_0 = (num2 * 1287389257u ^ 4274777725u); continue; case 2u: arg_43_0 = (((!this.Deprecated) ? 2213906878u : 4208026512u) ^ num2 * 4278710321u); continue; } goto Block_2; } } Block_2: return num + this.uninterpretedOption_.CalculateSize(ServiceOptions._repeated_uninterpretedOption_codec); } public void MergeFrom(ServiceOptions other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 509251058u)) % 5u) { case 0u: goto IL_63; case 1u: return; case 2u: this.Deprecated = other.Deprecated; arg_37_0 = (num * 2644538263u ^ 2645658054u); continue; case 4u: goto IL_12; } break; } this.uninterpretedOption_.Add(other.uninterpretedOption_); return; IL_12: arg_37_0 = 2129946465u; goto IL_32; IL_63: arg_37_0 = ((!other.Deprecated) ? 1676937751u : 1278713125u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_E8: uint num; uint arg_AD_0 = ((num = input.ReadTag()) == 0u) ? 1153850315u : 1212421989u; while (true) { uint num2; switch ((num2 = (arg_AD_0 ^ 1336647724u)) % 8u) { case 0u: input.SkipLastField(); arg_AD_0 = (num2 * 3674273195u ^ 3201607362u); continue; case 1u: arg_AD_0 = ((num == 264u) ? 1886731503u : 124793680u); continue; case 2u: this.uninterpretedOption_.AddEntriesFrom(input, ServiceOptions._repeated_uninterpretedOption_codec); arg_AD_0 = 935786242u; continue; case 3u: this.Deprecated = input.ReadBool(); arg_AD_0 = 935786242u; continue; case 4u: arg_AD_0 = (((num != 7994u) ? 1425744544u : 464008146u) ^ num2 * 861504877u); continue; case 5u: arg_AD_0 = 1212421989u; continue; case 6u: goto IL_E8; } return; } } } } } <file_sep>/Bgs.Protocol.Presence.V1/Field.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class Field : IMessage<Field>, IEquatable<Field>, IDeepCloneable<Field>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Field.__c __9 = new Field.__c(); internal Field cctor>b__29_0() { return new Field(); } } private static readonly MessageParser<Field> _parser = new MessageParser<Field>(new Func<Field>(Field.__c.__9.<.cctor>b__29_0)); public const int KeyFieldNumber = 1; private FieldKey key_; public const int ValueFieldNumber = 2; private Variant value_; public static MessageParser<Field> Parser { get { return Field._parser; } } public static MessageDescriptor Descriptor { get { return PresenceTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return Field.Descriptor; } } public FieldKey Key { get { return this.key_; } set { this.key_ = value; } } public Variant Value { get { return this.value_; } set { this.value_ = value; } } public Field() { } public Field(Field other) : this() { while (true) { IL_6B: int arg_51_0 = -655235716; while (true) { switch ((arg_51_0 ^ -1463197333) % 4) { case 0: goto IL_6B; case 2: this.Value = ((other.value_ != null) ? other.Value.Clone() : null); arg_51_0 = -1382608502; continue; case 3: this.Key = ((other.key_ != null) ? other.Key.Clone() : null); arg_51_0 = -1428572403; continue; } return; } } } public Field Clone() { return new Field(this); } public override bool Equals(object other) { return this.Equals(other as Field); } public bool Equals(Field other) { if (other == null) { goto IL_41; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1785209479) % 9) { case 0: return true; case 1: goto IL_B5; case 3: return false; case 4: arg_77_0 = ((!Field.smethod_0(this.Key, other.Key)) ? -247270079 : -1114730203); continue; case 5: goto IL_41; case 6: return false; case 7: return false; case 8: arg_77_0 = ((!Field.smethod_0(this.Value, other.Value)) ? -8977420 : -354520573); continue; } break; } return true; IL_41: arg_77_0 = -314474265; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -2092759061 : -45625214); goto IL_72; } public override int GetHashCode() { return 1 ^ Field.smethod_1(this.Key) ^ Field.smethod_1(this.Value); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_54: uint arg_3C_0 = 3080384962u; while (true) { uint num; switch ((num = (arg_3C_0 ^ 2667596624u)) % 3u) { case 1u: output.WriteMessage(this.Key); output.WriteRawTag(18); output.WriteMessage(this.Value); arg_3C_0 = (num * 486055783u ^ 2402509282u); continue; case 2u: goto IL_54; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Key)) + (1 + CodedOutputStream.ComputeMessageSize(this.Value)); } public void MergeFrom(Field other) { if (other == null) { goto IL_91; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 1168484668u)) % 11u) { case 0u: this.Key.MergeFrom(other.Key); arg_105_0 = 1357949136u; continue; case 1u: arg_105_0 = (((this.value_ != null) ? 1894472449u : 2054688808u) ^ num * 2331677748u); continue; case 3u: arg_105_0 = (((this.key_ == null) ? 1786776794u : 1069343464u) ^ num * 3643861115u); continue; case 4u: goto IL_91; case 5u: this.Value.MergeFrom(other.Value); arg_105_0 = 362283141u; continue; case 6u: this.value_ = new Variant(); arg_105_0 = (num * 3662084530u ^ 615643029u); continue; case 7u: return; case 8u: goto IL_14D; case 9u: arg_105_0 = ((other.value_ != null) ? 1220239493u : 362283141u); continue; case 10u: this.key_ = new FieldKey(); arg_105_0 = (num * 687029405u ^ 2073845966u); continue; } break; } return; IL_91: arg_105_0 = 1012410645u; goto IL_100; IL_14D: arg_105_0 = ((other.key_ == null) ? 1357949136u : 2056015198u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_183: uint num; uint arg_133_0 = ((num = input.ReadTag()) != 0u) ? 3697655801u : 2863410337u; while (true) { uint num2; switch ((num2 = (arg_133_0 ^ 3402333857u)) % 13u) { case 0u: input.ReadMessage(this.value_); arg_133_0 = 3766663436u; continue; case 1u: arg_133_0 = ((this.value_ != null) ? 3843323186u : 3116820485u); continue; case 2u: goto IL_183; case 3u: arg_133_0 = ((num == 10u) ? 2378105952u : 2949465862u); continue; case 4u: this.value_ = new Variant(); arg_133_0 = (num2 * 269274921u ^ 1556072822u); continue; case 5u: arg_133_0 = (num2 * 3470981307u ^ 1138991992u); continue; case 6u: arg_133_0 = (((num == 18u) ? 3764012119u : 2673503176u) ^ num2 * 2896441053u); continue; case 7u: arg_133_0 = ((this.key_ == null) ? 3695020784u : 2525018058u); continue; case 8u: this.key_ = new FieldKey(); arg_133_0 = (num2 * 3166300714u ^ 484419712u); continue; case 9u: arg_133_0 = 3697655801u; continue; case 10u: input.ReadMessage(this.key_); arg_133_0 = 3766663436u; continue; case 11u: input.SkipLastField(); arg_133_0 = (num2 * 455015917u ^ 1480248743u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/AddRecentPlayersRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class AddRecentPlayersRequest : IMessage<AddRecentPlayersRequest>, IEquatable<AddRecentPlayersRequest>, IDeepCloneable<AddRecentPlayersRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AddRecentPlayersRequest.__c __9 = new AddRecentPlayersRequest.__c(); internal AddRecentPlayersRequest cctor>b__34_0() { return new AddRecentPlayersRequest(); } } private static readonly MessageParser<AddRecentPlayersRequest> _parser = new MessageParser<AddRecentPlayersRequest>(new Func<AddRecentPlayersRequest>(AddRecentPlayersRequest.__c.__9.<.cctor>b__34_0)); public const int PlayersFieldNumber = 1; private static readonly FieldCodec<RecentPlayer> _repeated_players_codec = FieldCodec.ForMessage<RecentPlayer>(10u, RecentPlayer.Parser); private readonly RepeatedField<RecentPlayer> players_ = new RepeatedField<RecentPlayer>(); public const int AgentIdFieldNumber = 2; private EntityId agentId_; public const int ProgramFieldNumber = 3; private uint program_; public static MessageParser<AddRecentPlayersRequest> Parser { get { return AddRecentPlayersRequest._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return AddRecentPlayersRequest.Descriptor; } } public RepeatedField<RecentPlayer> Players { get { return this.players_; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public AddRecentPlayersRequest() { } public AddRecentPlayersRequest(AddRecentPlayersRequest other) : this() { while (true) { IL_61: int arg_4B_0 = -1862826100; while (true) { switch ((arg_4B_0 ^ -229538509) % 3) { case 0: goto IL_61; case 1: this.players_ = other.players_.Clone(); this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.program_ = other.program_; arg_4B_0 = -81493516; continue; } return; } } } public AddRecentPlayersRequest Clone() { return new AddRecentPlayersRequest(this); } public override bool Equals(object other) { return this.Equals(other as AddRecentPlayersRequest); } public bool Equals(AddRecentPlayersRequest other) { if (other == null) { goto IL_18; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ 1244565634) % 11) { case 0: return true; case 1: arg_A1_0 = (AddRecentPlayersRequest.smethod_0(this.AgentId, other.AgentId) ? 374918447 : 625258820); continue; case 2: return false; case 3: arg_A1_0 = (this.players_.Equals(other.players_) ? 659806800 : 1840469600); continue; case 5: arg_A1_0 = ((this.Program == other.Program) ? 410645956 : 694031068); continue; case 6: return false; case 7: return false; case 8: return false; case 9: goto IL_18; case 10: goto IL_E7; } break; } return true; IL_18: arg_A1_0 = 1988394152; goto IL_9C; IL_E7: arg_A1_0 = ((other == this) ? 1386220773 : 1412891252); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_D9: uint arg_B1_0 = 3511023526u; while (true) { uint num2; switch ((num2 = (arg_B1_0 ^ 4234212759u)) % 7u) { case 1u: num ^= AddRecentPlayersRequest.smethod_1(this.players_); arg_B1_0 = (num2 * 2212542789u ^ 1563033295u); continue; case 2u: arg_B1_0 = ((this.Program != 0u) ? 3417493917u : 4055450430u); continue; case 3u: num ^= AddRecentPlayersRequest.smethod_1(this.AgentId); arg_B1_0 = (num2 * 1389711091u ^ 294259279u); continue; case 4u: goto IL_D9; case 5u: arg_B1_0 = (((this.agentId_ != null) ? 3381990442u : 2363631296u) ^ num2 * 337412794u); continue; case 6u: num ^= this.Program.GetHashCode(); arg_B1_0 = (num2 * 679071610u ^ 4021944826u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.players_.WriteTo(output, AddRecentPlayersRequest._repeated_players_codec); if (this.agentId_ != null) { goto IL_80; } goto IL_BD; uint arg_8A_0; while (true) { IL_85: uint num; switch ((num = (arg_8A_0 ^ 164052016u)) % 6u) { case 0u: goto IL_80; case 1u: output.WriteRawTag(24); output.WriteUInt32(this.Program); arg_8A_0 = (num * 804416669u ^ 3271784244u); continue; case 2u: output.WriteRawTag(18); arg_8A_0 = (num * 2944478650u ^ 3214826165u); continue; case 4u: goto IL_BD; case 5u: output.WriteMessage(this.AgentId); arg_8A_0 = (num * 3771279480u ^ 853936338u); continue; } break; } return; IL_80: arg_8A_0 = 687153604u; goto IL_85; IL_BD: arg_8A_0 = ((this.Program == 0u) ? 377516573u : 579680973u); goto IL_85; } public int CalculateSize() { int num = 0 + this.players_.CalculateSize(AddRecentPlayersRequest._repeated_players_codec); if (this.agentId_ != null) { goto IL_6D; } goto IL_A3; uint arg_77_0; while (true) { IL_72: uint num2; switch ((num2 = (arg_77_0 ^ 2913737550u)) % 5u) { case 0u: goto IL_6D; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_77_0 = (num2 * 3849734585u ^ 520322527u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Program); arg_77_0 = (num2 * 863564624u ^ 438691995u); continue; case 3u: goto IL_A3; } break; } return num; IL_6D: arg_77_0 = 2332034558u; goto IL_72; IL_A3: arg_77_0 = ((this.Program == 0u) ? 2249067067u : 3151643532u); goto IL_72; } public void MergeFrom(AddRecentPlayersRequest other) { if (other == null) { goto IL_50; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 4109838186u)) % 9u) { case 0u: goto IL_FC; case 1u: this.AgentId.MergeFrom(other.AgentId); arg_BC_0 = 2389118531u; continue; case 2u: arg_BC_0 = (((this.agentId_ == null) ? 72122479u : 845959918u) ^ num * 1775497148u); continue; case 3u: arg_BC_0 = ((other.Program == 0u) ? 4002151957u : 3033511504u); continue; case 4u: goto IL_50; case 5u: this.Program = other.Program; arg_BC_0 = (num * 2338915298u ^ 2229673249u); continue; case 6u: this.agentId_ = new EntityId(); arg_BC_0 = (num * 2439848796u ^ 2220157882u); continue; case 7u: return; } break; } return; IL_50: arg_BC_0 = 3479396433u; goto IL_B7; IL_FC: this.players_.Add(other.players_); arg_BC_0 = ((other.agentId_ != null) ? 3122257048u : 2389118531u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_186: uint num; uint arg_136_0 = ((num = input.ReadTag()) == 0u) ? 127054563u : 1898119716u; while (true) { uint num2; switch ((num2 = (arg_136_0 ^ 939287956u)) % 13u) { case 0u: arg_136_0 = (((num != 24u) ? 343018566u : 1407810462u) ^ num2 * 487081726u); continue; case 2u: input.ReadMessage(this.agentId_); arg_136_0 = 2012828571u; continue; case 3u: this.agentId_ = new EntityId(); arg_136_0 = (num2 * 1994550817u ^ 1289225992u); continue; case 4u: arg_136_0 = (num2 * 2307993506u ^ 4134890529u); continue; case 5u: this.Program = input.ReadUInt32(); arg_136_0 = 2012828571u; continue; case 6u: arg_136_0 = (((num != 18u) ? 3778690768u : 4197641877u) ^ num2 * 2780636166u); continue; case 7u: arg_136_0 = 1898119716u; continue; case 8u: goto IL_186; case 9u: arg_136_0 = ((num == 10u) ? 1602142100u : 869435362u); continue; case 10u: input.SkipLastField(); arg_136_0 = (num2 * 2047820262u ^ 3341804917u); continue; case 11u: arg_136_0 = ((this.agentId_ == null) ? 836450040u : 1385836516u); continue; case 12u: this.players_.AddEntriesFrom(input, AddRecentPlayersRequest._repeated_players_codec); arg_136_0 = 2012828571u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/GeneratedCodeInfo.cs using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class GeneratedCodeInfo { private static readonly string[] EmptyNames = new string[0]; private static readonly GeneratedCodeInfo[] EmptyCodeInfo; public Type ClrType { get; private set; } public MessageParser Parser { [CompilerGenerated] get { return this.<Parser>k__BackingField; } } public string[] PropertyNames { [CompilerGenerated] get { return this.<PropertyNames>k__BackingField; } } public string[] OneofNames { [CompilerGenerated] get { return this.<OneofNames>k__BackingField; } } public GeneratedCodeInfo[] NestedTypes { [CompilerGenerated] get { return this.<NestedTypes>k__BackingField; } } public Type[] NestedEnums { [CompilerGenerated] get { return this.<NestedEnums>k__BackingField; } } public GeneratedCodeInfo(Type clrType, MessageParser parser, string[] propertyNames, string[] oneofNames, Type[] nestedEnums, GeneratedCodeInfo[] nestedTypes) { this.<NestedTypes>k__BackingField = (nestedTypes ?? GeneratedCodeInfo.EmptyCodeInfo); this.<NestedEnums>k__BackingField = (nestedEnums ?? ReflectionUtil.EmptyTypes); this.ClrType = clrType; this.<Parser>k__BackingField = parser; this.<PropertyNames>k__BackingField = (propertyNames ?? GeneratedCodeInfo.EmptyNames); this.<OneofNames>k__BackingField = (oneofNames ?? GeneratedCodeInfo.EmptyNames); } public GeneratedCodeInfo(Type[] nestedEnums, GeneratedCodeInfo[] nestedTypes) : this(null, null, null, null, nestedEnums, nestedTypes) { } static GeneratedCodeInfo() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_42: uint arg_2A_0 = 2571341516u; while (true) { uint num; switch ((num = (arg_2A_0 ^ 2460218854u)) % 3u) { case 0u: goto IL_42; case 1u: GeneratedCodeInfo.EmptyCodeInfo = new GeneratedCodeInfo[0]; arg_2A_0 = (num * 3084454570u ^ 3938460172u); continue; } return; } } } } } <file_sep>/Google.Protobuf/CodedOutputStream.cs using System; using System.IO; using System.Runtime.InteropServices; using System.Text; namespace Google.Protobuf { [ComVisible(true)] public sealed class CodedOutputStream { public sealed class OutOfSpaceException : IOException { internal OutOfSpaceException() : base(Module.smethod_33<string>(1305925207u)) { } } private const int LittleEndian64Size = 8; private const int LittleEndian32Size = 4; internal static readonly Encoding Utf8Encoding = CodedOutputStream.smethod_10(); public static readonly int DefaultBufferSize = 4096; private readonly byte[] buffer; private readonly int limit; private int position; private readonly Stream output; public long Position { get { if (this.output != null) { return CodedOutputStream.smethod_1(this.output) + (long)this.position; } return (long)this.position; } } public int SpaceLeft { get { if (this.output != null) { throw CodedOutputStream.smethod_9(Module.smethod_37<string>(2275103332u)); } return this.limit - this.position; } } public static int ComputeDoubleSize(double value) { return 8; } public static int ComputeFloatSize(float value) { return 4; } public static int ComputeUInt64Size(ulong value) { return CodedOutputStream.ComputeRawVarint64Size(value); } public static int ComputeInt64Size(long value) { return CodedOutputStream.ComputeRawVarint64Size((ulong)value); } public static int ComputeInt32Size(int value) { if (value >= 0) { return CodedOutputStream.ComputeRawVarint32Size((uint)value); } return 10; } public static int ComputeFixed64Size(ulong value) { return 8; } public static int ComputeFixed32Size(uint value) { return 4; } public static int ComputeBoolSize(bool value) { return 1; } public static int ComputeStringSize(string value) { int num = CodedOutputStream.smethod_0(CodedOutputStream.Utf8Encoding, value); return CodedOutputStream.ComputeLengthSize(num) + num; } public static int ComputeGroupSize(IMessage value) { return value.CalculateSize(); } public static int ComputeMessageSize(IMessage value) { int num = value.CalculateSize(); return CodedOutputStream.ComputeLengthSize(num) + num; } public static int ComputeBytesSize(ByteString value) { return CodedOutputStream.ComputeLengthSize(value.Length) + value.Length; } public static int ComputeUInt32Size(uint value) { return CodedOutputStream.ComputeRawVarint32Size(value); } public static int ComputeEnumSize(int value) { return CodedOutputStream.ComputeInt32Size(value); } public static int ComputeSFixed32Size(int value) { return 4; } public static int ComputeSFixed64Size(long value) { return 8; } public static int ComputeSInt32Size(int value) { return CodedOutputStream.ComputeRawVarint32Size(CodedOutputStream.EncodeZigZag32(value)); } public static int ComputeSInt64Size(long value) { return CodedOutputStream.ComputeRawVarint64Size(CodedOutputStream.EncodeZigZag64(value)); } public static int ComputeLengthSize(int length) { return CodedOutputStream.ComputeRawVarint32Size((uint)length); } public static int ComputeRawVarint32Size(uint value) { if ((value & 4294967168u) == 0u) { goto IL_18; } goto IL_A4; int arg_66_0; while (true) { IL_61: switch ((arg_66_0 ^ 1573471831) % 9) { case 0: arg_66_0 = (((value & 4292870144u) != 0u) ? 1713122773 : 1878921012); continue; case 1: return 1; case 2: arg_66_0 = (((value & 4026531840u) != 0u) ? 1853067201 : 1009689343); continue; case 4: return 4; case 5: return 2; case 6: goto IL_18; case 7: return 3; case 8: goto IL_A4; } break; } return 5; IL_18: arg_66_0 = 676432518; goto IL_61; IL_A4: arg_66_0 = (((value & 4294950912u) == 0u) ? 1943007673 : 146156149); goto IL_61; } public static int ComputeRawVarint64Size(ulong value) { if ((value & 18446744073709551488uL) == 0uL) { goto IL_138; } goto IL_1A8; int arg_142_0; while (true) { IL_13D: switch ((arg_142_0 ^ 759298391) % 19) { case 0: goto IL_138; case 1: return 3; case 2: return 8; case 3: arg_142_0 = (((value & 18446181123756130304uL) != 0uL) ? 1333461163 : 816031495); continue; case 4: arg_142_0 = (((value & 9223372036854775808uL) != 0uL) ? 1784209585 : 474750715); continue; case 5: return 4; case 6: goto IL_1A8; case 7: return 2; case 8: arg_142_0 = (((value & 18446744039349813248uL) != 0uL) ? 144004607 : 2007319370); continue; case 9: arg_142_0 = (((value & 18446744073707454464uL) == 0uL) ? 620627235 : 714197152); continue; case 10: arg_142_0 = (((value & 18446744073441116160uL) != 0uL) ? 371709271 : 954489211); continue; case 11: arg_142_0 = (((value & 18374686479671623680uL) == 0uL) ? 137999893 : 917453704); continue; case 12: return 6; case 14: arg_142_0 = (((value & 18446739675663040512uL) == 0uL) ? 1644037955 : 1638655890); continue; case 15: return 5; case 16: return 1; case 17: return 7; case 18: return 9; } break; } return 10; IL_138: arg_142_0 = 909890047; goto IL_13D; IL_1A8: arg_142_0 = (((value & 18446744073709535232uL) != 0uL) ? 1845091927 : 133593842); goto IL_13D; } public static int ComputeTagSize(int fieldNumber) { return CodedOutputStream.ComputeRawVarint32Size(WireFormat.MakeTag(fieldNumber, WireFormat.WireType.Varint)); } public CodedOutputStream(byte[] flatArray) : this(flatArray, 0, flatArray.Length) { } private CodedOutputStream(byte[] buffer, int offset, int length) { while (true) { IL_76: uint arg_56_0 = 1292876091u; while (true) { uint num; switch ((num = (arg_56_0 ^ 2146276990u)) % 5u) { case 1u: this.buffer = buffer; arg_56_0 = (num * 2755810275u ^ 3915623592u); continue; case 2u: this.output = null; arg_56_0 = (num * 8465455u ^ 1857988948u); continue; case 3u: goto IL_76; case 4u: this.position = offset; this.limit = offset + length; arg_56_0 = (num * 262523589u ^ 45561008u); continue; } return; } } } private CodedOutputStream(Stream output, byte[] buffer) { while (true) { IL_53: uint arg_37_0 = 2361766492u; while (true) { uint num; switch ((num = (arg_37_0 ^ 3286681291u)) % 4u) { case 0u: goto IL_53; case 1u: this.buffer = buffer; arg_37_0 = (num * 1669105703u ^ 3548401254u); continue; case 3u: this.output = output; arg_37_0 = (num * 721343128u ^ 375713146u); continue; } goto Block_1; } } Block_1: this.position = 0; this.limit = buffer.Length; } public CodedOutputStream(Stream output) : this(output, CodedOutputStream.DefaultBufferSize) { } public CodedOutputStream(Stream output, int bufferSize) : this(output, new byte[bufferSize]) { } public void WriteDouble(double value) { this.WriteRawLittleEndian64((ulong)CodedOutputStream.smethod_2(value)); } public void WriteFloat(float value) { byte[] array = CodedOutputStream.smethod_3(value); while (true) { IL_14C: uint arg_11B_0 = 1042150926u; while (true) { uint num; switch ((num = (arg_11B_0 ^ 1022855066u)) % 9u) { case 0u: { byte[] arg_ED_0 = this.buffer; int num2 = this.position; this.position = num2 + 1; arg_ED_0[num2] = array[0]; byte[] arg_108_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_108_0[num2] = array[1]; arg_11B_0 = (num * 458216763u ^ 884498142u); continue; } case 1u: return; case 2u: goto IL_14C; case 4u: { byte[] arg_A8_0 = this.buffer; int num2 = this.position; this.position = num2 + 1; arg_A8_0[num2] = array[2]; byte[] arg_C3_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_C3_0[num2] = array[3]; arg_11B_0 = (num * 2383484455u ^ 688700656u); continue; } case 5u: this.WriteRawBytes(array, 0, 4); arg_11B_0 = 1532374059u; continue; case 6u: arg_11B_0 = ((this.limit - this.position < 4) ? 842348969u : 206970980u); continue; case 7u: ByteArray.Reverse(array); arg_11B_0 = (num * 1074657787u ^ 895898004u); continue; case 8u: arg_11B_0 = ((BitConverter.IsLittleEndian ? 4106246718u : 3865512180u) ^ num * 3960773342u); continue; } goto Block_3; } } Block_3:; } public void WriteUInt64(ulong value) { this.WriteRawVarint64(value); } public void WriteInt64(long value) { this.WriteRawVarint64((ulong)value); } public void WriteInt32(int value) { if (value < 0) { goto IL_28; } IL_04: int arg_0E_0 = 946990302; IL_09: switch ((arg_0E_0 ^ 1643762941) % 4) { case 0: IL_28: this.WriteRawVarint64((ulong)((long)value)); arg_0E_0 = 1202023556; goto IL_09; case 2: goto IL_04; case 3: this.WriteRawVarint32((uint)value); return; } } public void WriteFixed64(ulong value) { this.WriteRawLittleEndian64(value); } public void WriteFixed32(uint value) { this.WriteRawLittleEndian32(value); } public void WriteBool(bool value) { this.WriteRawByte(value ? 1 : 0); } public void WriteString(string value) { int num = CodedOutputStream.smethod_0(CodedOutputStream.Utf8Encoding, value); while (true) { IL_19C: uint arg_157_0 = 887200780u; while (true) { uint num2; switch ((num2 = (arg_157_0 ^ 428672786u)) % 14u) { case 0u: this.position += num; arg_157_0 = 576530064u; continue; case 1u: { byte[] value2 = CodedOutputStream.smethod_7(CodedOutputStream.Utf8Encoding, value); arg_157_0 = 743111088u; continue; } case 2u: return; case 3u: arg_157_0 = (num2 * 3739319746u ^ 4238686882u); continue; case 4u: { int num3; this.buffer[this.position + num3] = (byte)CodedOutputStream.smethod_5(value, num3); num3++; arg_157_0 = 1717125292u; continue; } case 5u: goto IL_19C; case 6u: CodedOutputStream.smethod_6(CodedOutputStream.Utf8Encoding, value, 0, CodedOutputStream.smethod_4(value), this.buffer, this.position); arg_157_0 = 515054194u; continue; case 7u: arg_157_0 = (((num == CodedOutputStream.smethod_4(value)) ? 1803967215u : 493454172u) ^ num2 * 2638214450u); continue; case 8u: this.WriteLength(num); arg_157_0 = (((this.limit - this.position < num) ? 125227529u : 1907771947u) ^ num2 * 1824877807u); continue; case 10u: { int num3; arg_157_0 = ((num3 < num) ? 47776578u : 2121854163u); continue; } case 11u: arg_157_0 = (num2 * 1129511727u ^ 632133917u); continue; case 12u: { byte[] value2; this.WriteRawBytes(value2); arg_157_0 = (num2 * 286972294u ^ 188635011u); continue; } case 13u: { int num3 = 0; arg_157_0 = (num2 * 4058509186u ^ 2320074371u); continue; } } goto Block_4; } } Block_4:; } public void WriteMessage(IMessage value) { this.WriteLength(value.CalculateSize()); value.WriteTo(this); } public void WriteBytes(ByteString value) { this.WriteLength(value.Length); value.WriteRawBytesTo(this); } public void WriteUInt32(uint value) { this.WriteRawVarint32(value); } public void WriteEnum(int value) { this.WriteInt32(value); } public void WriteSFixed32(int value) { this.WriteRawLittleEndian32((uint)value); } public void WriteSFixed64(long value) { this.WriteRawLittleEndian64((ulong)value); } public void WriteSInt32(int value) { this.WriteRawVarint32(CodedOutputStream.EncodeZigZag32(value)); } public void WriteSInt64(long value) { this.WriteRawVarint64(CodedOutputStream.EncodeZigZag64(value)); } public void WriteLength(int length) { this.WriteRawVarint32((uint)length); } public void WriteTag(int fieldNumber, WireFormat.WireType type) { this.WriteRawVarint32(WireFormat.MakeTag(fieldNumber, type)); } public void WriteTag(uint tag) { this.WriteRawVarint32(tag); } public void WriteRawTag(byte b1) { this.WriteRawByte(b1); } public void WriteRawTag(byte b1, byte b2) { this.WriteRawByte(b1); while (true) { IL_3A: uint arg_22_0 = 801727837u; while (true) { uint num; switch ((num = (arg_22_0 ^ 910562582u)) % 3u) { case 1u: this.WriteRawByte(b2); arg_22_0 = (num * 3137870478u ^ 718158186u); continue; case 2u: goto IL_3A; } return; } } } public void WriteRawTag(byte b1, byte b2, byte b3) { this.WriteRawByte(b1); while (true) { IL_41: uint arg_29_0 = 4267844637u; while (true) { uint num; switch ((num = (arg_29_0 ^ 4171961337u)) % 3u) { case 1u: this.WriteRawByte(b2); this.WriteRawByte(b3); arg_29_0 = (num * 496222158u ^ 1064134182u); continue; case 2u: goto IL_41; } return; } } } public void WriteRawTag(byte b1, byte b2, byte b3, byte b4) { this.WriteRawByte(b1); while (true) { IL_54: uint arg_38_0 = 3921160418u; while (true) { uint num; switch ((num = (arg_38_0 ^ 3995530740u)) % 4u) { case 1u: this.WriteRawByte(b3); arg_38_0 = (num * 3473341805u ^ 850525577u); continue; case 2u: this.WriteRawByte(b2); arg_38_0 = (num * 427958664u ^ 122728189u); continue; case 3u: goto IL_54; } goto Block_1; } } Block_1: this.WriteRawByte(b4); } public void WriteRawTag(byte b1, byte b2, byte b3, byte b4, byte b5) { this.WriteRawByte(b1); while (true) { IL_64: uint arg_48_0 = 396676301u; while (true) { uint num; switch ((num = (arg_48_0 ^ 1446444852u)) % 4u) { case 0u: this.WriteRawByte(b4); this.WriteRawByte(b5); arg_48_0 = (num * 3652908779u ^ 3652224395u); continue; case 1u: this.WriteRawByte(b2); this.WriteRawByte(b3); arg_48_0 = (num * 2940860973u ^ 546556693u); continue; case 2u: goto IL_64; } return; } } } internal void WriteRawVarint32(uint value) { if (value < 128u) { goto IL_D5; } goto IL_1B1; uint arg_15D_0; int num2; while (true) { IL_158: uint num; switch ((num = (arg_15D_0 ^ 3758189263u)) % 14u) { case 0u: goto IL_1B1; case 1u: arg_15D_0 = (((this.position < this.limit) ? 1529207393u : 655765694u) ^ num * 2758940381u); continue; case 2u: arg_15D_0 = ((value > 127u) ? 3021644999u : 2533210046u); continue; case 3u: value >>= 7; arg_15D_0 = (num * 549875529u ^ 832368376u); continue; case 4u: this.WriteRawByte((byte)((value & 127u) | 128u)); value >>= 7; arg_15D_0 = 3193497729u; continue; case 5u: goto IL_D5; case 6u: this.WriteRawByte((byte)value); arg_15D_0 = 4232400083u; continue; case 7u: { byte[] arg_B8_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_B8_0[num2] = (byte)((value & 127u) | 128u); arg_15D_0 = 3075319816u; continue; } case 9u: arg_15D_0 = (((this.position >= this.limit) ? 4128630608u : 3227788096u) ^ num * 2597326761u); continue; case 10u: goto IL_1BC; case 11u: arg_15D_0 = (((this.position < this.limit) ? 1026808663u : 1633161372u) ^ num * 681430159u); continue; case 12u: arg_15D_0 = (num * 4234743981u ^ 2707262609u); continue; case 13u: goto IL_1D7; } break; } return; IL_1BC: byte[] arg_1D5_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_1D5_0[num2] = (byte)value; return; IL_1D7: byte[] arg_1F0_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_1F0_0[num2] = (byte)value; return; IL_D5: arg_15D_0 = 3670994234u; goto IL_158; IL_1B1: arg_15D_0 = ((value <= 127u) ? 3193497729u : 3417679578u); goto IL_158; } internal void WriteRawVarint64(ulong value) { while (true) { IL_1D6: uint arg_182_0 = (value <= 127uL) ? 2955684844u : 3442650946u; while (true) { uint num; switch ((num = (arg_182_0 ^ 2421182365u)) % 14u) { case 0u: arg_182_0 = (((this.position >= this.limit) ? 227603287u : 339070753u) ^ num * 303688050u); continue; case 1u: arg_182_0 = (((this.position >= this.limit) ? 589570940u : 1370223613u) ^ num * 1335478900u); continue; case 2u: return; case 4u: { byte[] arg_119_0 = this.buffer; int num2 = this.position; this.position = num2 + 1; arg_119_0[num2] = (byte)((value & 127uL) | 128uL); arg_182_0 = 2239906620u; continue; } case 5u: goto IL_1D6; case 6u: { byte[] arg_D9_0 = this.buffer; int num2 = this.position; this.position = num2 + 1; arg_D9_0[num2] = (byte)value; arg_182_0 = (num * 1704619481u ^ 1659987415u); continue; } case 7u: arg_182_0 = (num * 1193630043u ^ 183496147u); continue; case 8u: this.WriteRawByte((byte)value); arg_182_0 = 4055938490u; continue; case 9u: arg_182_0 = ((value <= 127uL) ? 3690142923u : 2242271539u); continue; case 10u: arg_182_0 = 3710855409u; continue; case 11u: value >>= 7; arg_182_0 = (num * 2371417993u ^ 3237883841u); continue; case 12u: this.WriteRawByte((byte)((value & 127uL) | 128uL)); arg_182_0 = 4189705496u; continue; case 13u: value >>= 7; arg_182_0 = (num * 1964285014u ^ 1446079730u); continue; } goto Block_4; } } Block_4:; } internal void WriteRawLittleEndian32(uint value) { if (this.position + 4 > this.limit) { goto IL_13; } goto IL_133; uint arg_FE_0; int num2; while (true) { IL_F9: uint num; switch ((num = (arg_FE_0 ^ 505585958u)) % 10u) { case 0u: { byte[] arg_EB_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_EB_0[num2] = (byte)(value >> 24); arg_FE_0 = (num * 3819713909u ^ 3335361938u); continue; } case 1u: goto IL_133; case 2u: return; case 3u: this.WriteRawByte((byte)(value >> 8)); arg_FE_0 = (num * 834062949u ^ 1528328333u); continue; case 4u: this.WriteRawByte((byte)value); arg_FE_0 = (num * 2901390167u ^ 3840055441u); continue; case 5u: { byte[] arg_8F_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_8F_0[num2] = (byte)(value >> 16); arg_FE_0 = (num * 3472842618u ^ 937490388u); continue; } case 6u: this.WriteRawByte((byte)(value >> 16)); this.WriteRawByte((byte)(value >> 24)); arg_FE_0 = (num * 1122042672u ^ 2200244190u); continue; case 7u: { byte[] arg_38_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_38_0[num2] = (byte)(value >> 8); arg_FE_0 = (num * 1797718407u ^ 979136014u); continue; } case 9u: goto IL_13; } break; } return; IL_13: arg_FE_0 = 210623056u; goto IL_F9; IL_133: byte[] arg_14C_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_14C_0[num2] = (byte)value; arg_FE_0 = 1606671431u; goto IL_F9; } internal void WriteRawLittleEndian64(ulong value) { if (this.position + 8 > this.limit) { goto IL_1F7; } goto IL_24E; uint arg_201_0; int num2; while (true) { IL_1FC: uint num; switch ((num = (arg_201_0 ^ 2894223195u)) % 16u) { case 0u: goto IL_1F7; case 1u: { byte[] arg_1E7_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_1E7_0[num2] = (byte)(value >> 56); arg_201_0 = (num * 1043767649u ^ 1545169823u); continue; } case 2u: this.WriteRawByte((byte)(value >> 16)); arg_201_0 = (num * 2129396568u ^ 4027700374u); continue; case 3u: this.WriteRawByte((byte)(value >> 40)); this.WriteRawByte((byte)(value >> 48)); arg_201_0 = (num * 3606319593u ^ 3874645802u); continue; case 4u: { byte[] arg_17C_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_17C_0[num2] = (byte)(value >> 32); arg_201_0 = (num * 189052906u ^ 1984689724u); continue; } case 6u: { byte[] arg_130_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_130_0[num2] = (byte)(value >> 8); byte[] arg_14D_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_14D_0[num2] = (byte)(value >> 16); arg_201_0 = (num * 2841978762u ^ 1138285259u); continue; } case 7u: goto IL_24E; case 8u: { byte[] arg_102_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_102_0[num2] = (byte)(value >> 48); arg_201_0 = (num * 3922323780u ^ 3715749946u); continue; } case 9u: this.WriteRawByte((byte)(value >> 8)); arg_201_0 = (num * 3719195370u ^ 646700931u); continue; case 10u: goto IL_270; case 11u: this.WriteRawByte((byte)(value >> 32)); arg_201_0 = (num * 221975894u ^ 2148201754u); continue; case 12u: { byte[] arg_9A_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_9A_0[num2] = (byte)(value >> 24); arg_201_0 = (num * 1277761646u ^ 2785170791u); continue; } case 13u: this.WriteRawByte((byte)(value >> 24)); arg_201_0 = (num * 813672558u ^ 974633542u); continue; case 14u: this.WriteRawByte((byte)value); arg_201_0 = (num * 3099359224u ^ 852963970u); continue; case 15u: { byte[] arg_34_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_34_0[num2] = (byte)(value >> 40); arg_201_0 = (num * 82202716u ^ 1551013527u); continue; } } break; } return; IL_270: this.WriteRawByte((byte)(value >> 56)); return; IL_1F7: arg_201_0 = 3580523637u; goto IL_1FC; IL_24E: byte[] arg_267_0 = this.buffer; num2 = this.position; this.position = num2 + 1; arg_267_0[num2] = (byte)value; arg_201_0 = 3038687917u; goto IL_1FC; } internal void WriteRawByte(byte value) { if (this.position == this.limit) { goto IL_0E; } goto IL_49; uint arg_2D_0; while (true) { IL_28: uint num; switch ((num = (arg_2D_0 ^ 243737460u)) % 4u) { case 0u: goto IL_49; case 1u: this.RefreshBuffer(); arg_2D_0 = (num * 503519557u ^ 3641032301u); continue; case 2u: goto IL_0E; } break; } return; IL_0E: arg_2D_0 = 1106378397u; goto IL_28; IL_49: byte[] arg_61_0 = this.buffer; int num2 = this.position; this.position = num2 + 1; arg_61_0[num2] = value; arg_2D_0 = 1190717895u; goto IL_28; } internal void WriteRawByte(uint value) { this.WriteRawByte((byte)value); } internal void WriteRawBytes(byte[] value) { this.WriteRawBytes(value, 0, value.Length); } internal void WriteRawBytes(byte[] value, int offset, int length) { if (this.limit - this.position >= length) { goto IL_13; } goto IL_120; uint arg_E7_0; int num2; while (true) { IL_E2: uint num; switch ((num = (arg_E7_0 ^ 635300094u)) % 11u) { case 0u: ByteArray.Copy(value, offset, this.buffer, this.position, num2); offset += num2; arg_E7_0 = (num * 1450560323u ^ 1365034423u); continue; case 1u: length -= num2; this.position = this.limit; this.RefreshBuffer(); arg_E7_0 = (num * 14859642u ^ 1833565904u); continue; case 2u: goto IL_135; case 3u: arg_E7_0 = (((length > this.limit) ? 4040596147u : 3763799736u) ^ num * 223417365u); continue; case 4u: ByteArray.Copy(value, offset, this.buffer, 0, length); arg_E7_0 = (num * 4202779720u ^ 1524812571u); continue; case 5u: return; case 6u: this.position = length; arg_E7_0 = (num * 132727666u ^ 2929647260u); continue; case 7u: goto IL_120; case 9u: CodedOutputStream.smethod_8(this.output, value, offset, length); arg_E7_0 = 1406239620u; continue; case 10u: goto IL_13; } break; } return; IL_135: ByteArray.Copy(value, offset, this.buffer, this.position, length); this.position += length; return; IL_13: arg_E7_0 = 540594780u; goto IL_E2; IL_120: num2 = this.limit - this.position; arg_E7_0 = 1444932334u; goto IL_E2; } internal static uint EncodeZigZag32(int n) { return (uint)(n << 1 ^ n >> 31); } internal static ulong EncodeZigZag64(long n) { return (ulong)(n << 1 ^ n >> 63); } private void RefreshBuffer() { if (this.output != null) { goto IL_2C; } IL_08: int arg_12_0 = 47764688; IL_0D: switch ((arg_12_0 ^ 661826201) % 4) { case 0: goto IL_08; case 1: throw new CodedOutputStream.OutOfSpaceException(); case 3: IL_2C: CodedOutputStream.smethod_8(this.output, this.buffer, 0, this.position); arg_12_0 = 579313915; goto IL_0D; } this.position = 0; } public void Flush() { if (this.output != null) { while (true) { IL_3A: uint arg_22_0 = 3639014859u; while (true) { uint num; switch ((num = (arg_22_0 ^ 2550759192u)) % 3u) { case 1u: this.RefreshBuffer(); arg_22_0 = (num * 1092280125u ^ 16035329u); continue; case 2u: goto IL_3A; } goto Block_2; } } Block_2:; } } public void CheckNoSpaceLeft() { if (this.SpaceLeft != 0) { throw CodedOutputStream.smethod_9(Module.smethod_33<string>(3651743630u)); } } static int smethod_0(Encoding encoding_0, string string_0) { return encoding_0.GetByteCount(string_0); } static long smethod_1(Stream stream_0) { return stream_0.Position; } static long smethod_2(double double_0) { return BitConverter.DoubleToInt64Bits(double_0); } static byte[] smethod_3(float float_0) { return BitConverter.GetBytes(float_0); } static int smethod_4(string string_0) { return string_0.Length; } static char smethod_5(string string_0, int int_0) { return string_0[int_0]; } static int smethod_6(Encoding encoding_0, string string_0, int int_0, int int_1, byte[] byte_0, int int_2) { return encoding_0.GetBytes(string_0, int_0, int_1, byte_0, int_2); } static byte[] smethod_7(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static void smethod_8(Stream stream_0, byte[] byte_0, int int_0, int int_1) { stream_0.Write(byte_0, int_0, int_1); } static InvalidOperationException smethod_9(string string_0) { return new InvalidOperationException(string_0); } static Encoding smethod_10() { return Encoding.UTF8; } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountNotification.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountNotification : IMessage<GameAccountNotification>, IEquatable<GameAccountNotification>, IDeepCloneable<GameAccountNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountNotification.__c __9 = new GameAccountNotification.__c(); internal GameAccountNotification cctor>b__34_0() { return new GameAccountNotification(); } } private static readonly MessageParser<GameAccountNotification> _parser = new MessageParser<GameAccountNotification>(new Func<GameAccountNotification>(GameAccountNotification.__c.__9.<.cctor>b__34_0)); public const int GameAccountsFieldNumber = 1; private static readonly FieldCodec<GameAccountList> _repeated_gameAccounts_codec = FieldCodec.ForMessage<GameAccountList>(10u, GameAccountList.Parser); private readonly RepeatedField<GameAccountList> gameAccounts_ = new RepeatedField<GameAccountList>(); public const int SubscriberIdFieldNumber = 2; private ulong subscriberId_; public const int AccountTagsFieldNumber = 3; private AccountFieldTags accountTags_; public static MessageParser<GameAccountNotification> Parser { get { return GameAccountNotification._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[30]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountNotification.Descriptor; } } public RepeatedField<GameAccountList> GameAccounts { get { return this.gameAccounts_; } } public ulong SubscriberId { get { return this.subscriberId_; } set { this.subscriberId_ = value; } } public AccountFieldTags AccountTags { get { return this.accountTags_; } set { this.accountTags_ = value; } } public GameAccountNotification() { } public GameAccountNotification(GameAccountNotification other) : this() { while (true) { IL_8C: uint arg_6C_0 = 3156026932u; while (true) { uint num; switch ((num = (arg_6C_0 ^ 3355392972u)) % 5u) { case 0u: this.AccountTags = ((other.accountTags_ != null) ? other.AccountTags.Clone() : null); arg_6C_0 = 2567910298u; continue; case 1u: this.gameAccounts_ = other.gameAccounts_.Clone(); arg_6C_0 = (num * 2786717402u ^ 4256522247u); continue; case 2u: goto IL_8C; case 4u: this.subscriberId_ = other.subscriberId_; arg_6C_0 = (num * 2741200037u ^ 276837260u); continue; } return; } } } public GameAccountNotification Clone() { return new GameAccountNotification(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountNotification); } public bool Equals(GameAccountNotification other) { if (other == null) { goto IL_44; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ 1441644622) % 11) { case 0: goto IL_E7; case 1: arg_A1_0 = ((this.SubscriberId != other.SubscriberId) ? 1345436352 : 1341206777); continue; case 2: return false; case 3: return false; case 4: return true; case 5: return false; case 6: arg_A1_0 = ((!this.gameAccounts_.Equals(other.gameAccounts_)) ? 2028828355 : 535982198); continue; case 7: goto IL_44; case 9: arg_A1_0 = ((!GameAccountNotification.smethod_0(this.AccountTags, other.AccountTags)) ? 530250395 : 1021263032); continue; case 10: return false; } break; } return true; IL_44: arg_A1_0 = 1622529318; goto IL_9C; IL_E7: arg_A1_0 = ((other == this) ? 998950542 : 1302423683); goto IL_9C; } public override int GetHashCode() { int num = 1 ^ GameAccountNotification.smethod_1(this.gameAccounts_); while (true) { IL_C3: uint arg_9F_0 = 195535321u; while (true) { uint num2; switch ((num2 = (arg_9F_0 ^ 1696632677u)) % 6u) { case 0u: goto IL_C3; case 1u: num ^= this.SubscriberId.GetHashCode(); arg_9F_0 = (num2 * 2538937218u ^ 3117959356u); continue; case 2u: arg_9F_0 = (((this.SubscriberId == 0uL) ? 441672430u : 911834778u) ^ num2 * 2473003287u); continue; case 3u: num ^= this.AccountTags.GetHashCode(); arg_9F_0 = (num2 * 3446521120u ^ 2415370261u); continue; case 5u: arg_9F_0 = ((this.accountTags_ != null) ? 256186630u : 337068917u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.gameAccounts_.WriteTo(output, GameAccountNotification._repeated_gameAccounts_codec); while (true) { IL_F6: uint arg_CA_0 = 2427893373u; while (true) { uint num; switch ((num = (arg_CA_0 ^ 2548232563u)) % 8u) { case 0u: output.WriteRawTag(16); arg_CA_0 = (num * 822328998u ^ 3288494458u); continue; case 1u: output.WriteUInt64(this.SubscriberId); arg_CA_0 = (num * 4210450285u ^ 3573259050u); continue; case 2u: goto IL_F6; case 4u: arg_CA_0 = ((this.accountTags_ != null) ? 3073229388u : 3185945304u); continue; case 5u: output.WriteMessage(this.AccountTags); arg_CA_0 = (num * 2438641065u ^ 4242631901u); continue; case 6u: arg_CA_0 = (((this.SubscriberId == 0uL) ? 1291212133u : 275388577u) ^ num * 2651095043u); continue; case 7u: output.WriteRawTag(26); arg_CA_0 = (num * 4115463995u ^ 2224189195u); continue; } return; } } } public int CalculateSize() { int num = 0 + this.gameAccounts_.CalculateSize(GameAccountNotification._repeated_gameAccounts_codec); while (true) { IL_C9: uint arg_A5_0 = 3619736014u; while (true) { uint num2; switch ((num2 = (arg_A5_0 ^ 3646794951u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountTags); arg_A5_0 = (num2 * 2285208111u ^ 137759434u); continue; case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SubscriberId); arg_A5_0 = (num2 * 2830483450u ^ 1397184197u); continue; case 2u: arg_A5_0 = ((this.accountTags_ != null) ? 3104892331u : 2296600606u); continue; case 4u: goto IL_C9; case 5u: arg_A5_0 = (((this.SubscriberId == 0uL) ? 4153716145u : 3421973330u) ^ num2 * 4157751666u); continue; } return num; } } return num; } public void MergeFrom(GameAccountNotification other) { if (other == null) { goto IL_B2; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 2067291274u)) % 9u) { case 0u: goto IL_B2; case 1u: this.accountTags_ = new AccountFieldTags(); arg_BC_0 = (num * 4028128559u ^ 4198986258u); continue; case 2u: goto IL_FC; case 3u: this.AccountTags.MergeFrom(other.AccountTags); arg_BC_0 = 26662401u; continue; case 4u: arg_BC_0 = ((other.accountTags_ == null) ? 26662401u : 1354610101u); continue; case 5u: this.SubscriberId = other.SubscriberId; arg_BC_0 = (num * 2553063922u ^ 3597816647u); continue; case 7u: arg_BC_0 = (((this.accountTags_ == null) ? 3678852372u : 2634547152u) ^ num * 3753448436u); continue; case 8u: return; } break; } return; IL_B2: arg_BC_0 = 1542320813u; goto IL_B7; IL_FC: this.gameAccounts_.Add(other.gameAccounts_); arg_BC_0 = ((other.SubscriberId == 0uL) ? 1393249771u : 1327145228u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_19F: uint num; uint arg_14B_0 = ((num = input.ReadTag()) != 0u) ? 3448790845u : 3544170873u; while (true) { uint num2; switch ((num2 = (arg_14B_0 ^ 2937366410u)) % 14u) { case 0u: input.SkipLastField(); arg_14B_0 = (num2 * 1544542036u ^ 1790475515u); continue; case 1u: arg_14B_0 = (((num != 16u) ? 3561439285u : 2223309890u) ^ num2 * 2426810141u); continue; case 2u: this.accountTags_ = new AccountFieldTags(); arg_14B_0 = (num2 * 346672283u ^ 4072811624u); continue; case 3u: this.SubscriberId = input.ReadUInt64(); arg_14B_0 = 3951520604u; continue; case 4u: arg_14B_0 = ((this.accountTags_ == null) ? 4278473958u : 3964362252u); continue; case 5u: this.gameAccounts_.AddEntriesFrom(input, GameAccountNotification._repeated_gameAccounts_codec); arg_14B_0 = 2294389510u; continue; case 6u: arg_14B_0 = (num2 * 2098680788u ^ 1390741339u); continue; case 8u: input.ReadMessage(this.accountTags_); arg_14B_0 = 3387688035u; continue; case 9u: arg_14B_0 = 3448790845u; continue; case 10u: arg_14B_0 = (((num == 26u) ? 3507585906u : 3978436600u) ^ num2 * 4126197735u); continue; case 11u: arg_14B_0 = ((num != 10u) ? 3852267293u : 3533255191u); continue; case 12u: arg_14B_0 = (num2 * 1354973241u ^ 3316481871u); continue; case 13u: goto IL_19F; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GetAccountStateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetAccountStateRequest : IMessage<GetAccountStateRequest>, IEquatable<GetAccountStateRequest>, IDeepCloneable<GetAccountStateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAccountStateRequest.__c __9 = new GetAccountStateRequest.__c(); internal GetAccountStateRequest cctor>b__44_0() { return new GetAccountStateRequest(); } } private static readonly MessageParser<GetAccountStateRequest> _parser = new MessageParser<GetAccountStateRequest>(new Func<GetAccountStateRequest>(GetAccountStateRequest.__c.__9.<.cctor>b__44_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int ProgramFieldNumber = 2; private uint program_; public const int RegionFieldNumber = 3; private uint region_; public const int OptionsFieldNumber = 10; private AccountFieldOptions options_; public const int TagsFieldNumber = 11; private AccountFieldTags tags_; public static MessageParser<GetAccountStateRequest> Parser { get { return GetAccountStateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[13]; } } MessageDescriptor IMessage.Descriptor { get { return GetAccountStateRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public AccountFieldOptions Options { get { return this.options_; } set { this.options_ = value; } } public AccountFieldTags Tags { get { return this.tags_; } set { this.tags_ = value; } } public GetAccountStateRequest() { } public GetAccountStateRequest(GetAccountStateRequest other) : this() { while (true) { IL_9B: uint arg_7B_0 = 3185153777u; while (true) { uint num; switch ((num = (arg_7B_0 ^ 2189968757u)) % 5u) { case 1u: this.program_ = other.program_; this.region_ = other.region_; arg_7B_0 = (num * 937141220u ^ 3104874349u); continue; case 2u: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); arg_7B_0 = 4238903149u; continue; case 3u: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_7B_0 = 4127048671u; continue; case 4u: goto IL_9B; } goto Block_3; } } Block_3: this.Tags = ((other.tags_ != null) ? other.Tags.Clone() : null); } public GetAccountStateRequest Clone() { return new GetAccountStateRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetAccountStateRequest); } public bool Equals(GetAccountStateRequest other) { if (other == null) { goto IL_18; } goto IL_150; int arg_FA_0; while (true) { IL_F5: switch ((arg_FA_0 ^ 509820043) % 15) { case 0: return true; case 1: return false; case 2: arg_FA_0 = ((this.Region != other.Region) ? 338551696 : 1840814264); continue; case 3: arg_FA_0 = (GetAccountStateRequest.smethod_0(this.Tags, other.Tags) ? 620917283 : 855196445); continue; case 4: return false; case 5: return false; case 6: arg_FA_0 = ((this.Program == other.Program) ? 2064180615 : 1388599069); continue; case 7: arg_FA_0 = ((!GetAccountStateRequest.smethod_0(this.EntityId, other.EntityId)) ? 1124891671 : 284328869); continue; case 8: return false; case 9: arg_FA_0 = (GetAccountStateRequest.smethod_0(this.Options, other.Options) ? 373789921 : 1128884145); continue; case 10: return false; case 11: goto IL_18; case 13: goto IL_150; case 14: return false; } break; } return true; IL_18: arg_FA_0 = 1955657675; goto IL_F5; IL_150: arg_FA_0 = ((other != this) ? 495632611 : 1679811994); goto IL_F5; } public override int GetHashCode() { int num = 1; while (true) { IL_19A: uint arg_15D_0 = 3156102275u; while (true) { uint num2; switch ((num2 = (arg_15D_0 ^ 2642968452u)) % 12u) { case 0u: num ^= this.Tags.GetHashCode(); arg_15D_0 = (num2 * 666505655u ^ 2209365810u); continue; case 1u: arg_15D_0 = ((this.tags_ != null) ? 2574844852u : 2668546402u); continue; case 3u: arg_15D_0 = ((this.options_ == null) ? 3054113437u : 3045327617u); continue; case 4u: arg_15D_0 = ((this.Program == 0u) ? 3222252234u : 4217849309u); continue; case 5u: num ^= this.Program.GetHashCode(); arg_15D_0 = (num2 * 3866741232u ^ 522731194u); continue; case 6u: arg_15D_0 = ((this.Region != 0u) ? 4217823615u : 3268537563u); continue; case 7u: arg_15D_0 = (((this.entityId_ != null) ? 3447208383u : 3726963707u) ^ num2 * 2095739845u); continue; case 8u: num ^= GetAccountStateRequest.smethod_1(this.EntityId); arg_15D_0 = (num2 * 1856627800u ^ 1358511320u); continue; case 9u: num ^= this.Options.GetHashCode(); arg_15D_0 = (num2 * 1827153836u ^ 1978269377u); continue; case 10u: goto IL_19A; case 11u: num ^= this.Region.GetHashCode(); arg_15D_0 = (num2 * 1703066511u ^ 1295240174u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.entityId_ != null) { goto IL_6F; } goto IL_1FB; uint arg_19F_0; while (true) { IL_19A: uint num; switch ((num = (arg_19F_0 ^ 4281627737u)) % 16u) { case 0u: output.WriteUInt32(this.Region); arg_19F_0 = (num * 2642522764u ^ 1824023711u); continue; case 2u: output.WriteRawTag(10); arg_19F_0 = (num * 3383883043u ^ 1324876290u); continue; case 3u: arg_19F_0 = ((this.Region == 0u) ? 2694011743u : 3817244224u); continue; case 4u: output.WriteMessage(this.Options); arg_19F_0 = (num * 2615825850u ^ 2470807723u); continue; case 5u: output.WriteRawTag(16); arg_19F_0 = (num * 1675054498u ^ 2026090747u); continue; case 6u: arg_19F_0 = ((this.options_ != null) ? 2489185733u : 3890524355u); continue; case 7u: output.WriteMessage(this.Tags); arg_19F_0 = (num * 3144402047u ^ 2068152497u); continue; case 8u: output.WriteUInt32(this.Program); arg_19F_0 = (num * 382373836u ^ 1801887098u); continue; case 9u: output.WriteRawTag(24); arg_19F_0 = (num * 4132293460u ^ 2519615549u); continue; case 10u: arg_19F_0 = ((this.tags_ == null) ? 2215732760u : 2518987622u); continue; case 11u: goto IL_6F; case 12u: output.WriteRawTag(82); arg_19F_0 = (num * 2095396764u ^ 1363790989u); continue; case 13u: output.WriteMessage(this.EntityId); arg_19F_0 = (num * 3416933930u ^ 3039597733u); continue; case 14u: goto IL_1FB; case 15u: output.WriteRawTag(90); arg_19F_0 = (num * 139255573u ^ 2527948197u); continue; } break; } return; IL_6F: arg_19F_0 = 2909104987u; goto IL_19A; IL_1FB: arg_19F_0 = ((this.Program == 0u) ? 4094485146u : 3244467308u); goto IL_19A; } public int CalculateSize() { int num = 0; while (true) { IL_19E: uint arg_161_0 = 4004087904u; while (true) { uint num2; switch ((num2 = (arg_161_0 ^ 2190765423u)) % 12u) { case 0u: goto IL_19E; case 1u: arg_161_0 = ((this.Region == 0u) ? 2171147921u : 3343002059u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_161_0 = (num2 * 3547404523u ^ 2724681216u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Program); arg_161_0 = (num2 * 212537703u ^ 2929565063u); continue; case 4u: arg_161_0 = ((this.tags_ == null) ? 3680740329u : 3952501584u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_161_0 = (num2 * 2477076513u ^ 1125856406u); continue; case 6u: arg_161_0 = ((this.options_ != null) ? 3626952018u : 3271347019u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Tags); arg_161_0 = (num2 * 1896001279u ^ 828023080u); continue; case 8u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_161_0 = (num2 * 3166629417u ^ 1169187029u); continue; case 9u: arg_161_0 = ((this.Program != 0u) ? 2857320452u : 4130471050u); continue; case 11u: arg_161_0 = (((this.entityId_ != null) ? 3824111820u : 3888144503u) ^ num2 * 2179830355u); continue; } return num; } } return num; } public void MergeFrom(GetAccountStateRequest other) { if (other == null) { goto IL_145; } goto IL_27C; uint arg_214_0; while (true) { IL_20F: uint num; switch ((num = (arg_214_0 ^ 2698280669u)) % 19u) { case 0u: arg_214_0 = ((other.Region != 0u) ? 3307744925u : 2356790581u); continue; case 1u: arg_214_0 = ((other.Program == 0u) ? 2408408692u : 4190895294u); continue; case 2u: this.EntityId.MergeFrom(other.EntityId); arg_214_0 = 2643370001u; continue; case 3u: arg_214_0 = (((this.entityId_ != null) ? 3301849894u : 4093426917u) ^ num * 738730037u); continue; case 4u: return; case 6u: this.Options.MergeFrom(other.Options); arg_214_0 = 3971993964u; continue; case 7u: arg_214_0 = ((other.tags_ == null) ? 3826406247u : 2454155488u); continue; case 8u: goto IL_145; case 9u: goto IL_27C; case 10u: arg_214_0 = ((other.options_ == null) ? 3971993964u : 2929902590u); continue; case 11u: arg_214_0 = (((this.options_ == null) ? 3131770217u : 2214929556u) ^ num * 2004984220u); continue; case 12u: this.Tags.MergeFrom(other.Tags); arg_214_0 = 3826406247u; continue; case 13u: this.options_ = new AccountFieldOptions(); arg_214_0 = (num * 1833850559u ^ 3944909024u); continue; case 14u: this.Program = other.Program; arg_214_0 = (num * 3188246397u ^ 5830947u); continue; case 15u: this.Region = other.Region; arg_214_0 = (num * 3230130036u ^ 3716536373u); continue; case 16u: this.tags_ = new AccountFieldTags(); arg_214_0 = (num * 1116005221u ^ 3567059782u); continue; case 17u: this.entityId_ = new EntityId(); arg_214_0 = (num * 1720205715u ^ 2901513884u); continue; case 18u: arg_214_0 = (((this.tags_ == null) ? 3884663403u : 2396983544u) ^ num * 1761791092u); continue; } break; } return; IL_145: arg_214_0 = 2469690419u; goto IL_20F; IL_27C: arg_214_0 = ((other.entityId_ == null) ? 2643370001u : 2246807742u); goto IL_20F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_32C: uint num; uint arg_2A4_0 = ((num = input.ReadTag()) != 0u) ? 4145127098u : 3888646798u; while (true) { uint num2; switch ((num2 = (arg_2A4_0 ^ 4235279557u)) % 27u) { case 0u: this.Region = input.ReadUInt32(); arg_2A4_0 = 2713486460u; continue; case 1u: arg_2A4_0 = (num2 * 605509692u ^ 3769149016u); continue; case 2u: input.SkipLastField(); arg_2A4_0 = 2443815128u; continue; case 3u: arg_2A4_0 = (((num == 10u) ? 2224262639u : 2285948494u) ^ num2 * 3323258547u); continue; case 4u: this.tags_ = new AccountFieldTags(); arg_2A4_0 = (num2 * 1839842093u ^ 3744167011u); continue; case 5u: arg_2A4_0 = (((num != 90u) ? 3884637873u : 4063013200u) ^ num2 * 1075468009u); continue; case 6u: input.ReadMessage(this.options_); arg_2A4_0 = 3292667974u; continue; case 7u: arg_2A4_0 = (num2 * 1438973025u ^ 3607771924u); continue; case 8u: arg_2A4_0 = (num2 * 50659220u ^ 3506683320u); continue; case 9u: arg_2A4_0 = (num2 * 2185841933u ^ 368108187u); continue; case 10u: input.ReadMessage(this.entityId_); arg_2A4_0 = 2448655573u; continue; case 11u: arg_2A4_0 = 4145127098u; continue; case 12u: this.Program = input.ReadUInt32(); arg_2A4_0 = 2728552606u; continue; case 13u: arg_2A4_0 = (num2 * 4007243895u ^ 2968671647u); continue; case 14u: arg_2A4_0 = (((num == 16u) ? 3487963938u : 3880613474u) ^ num2 * 1942093258u); continue; case 15u: this.options_ = new AccountFieldOptions(); arg_2A4_0 = (num2 * 132619674u ^ 1870271167u); continue; case 16u: this.entityId_ = new EntityId(); arg_2A4_0 = (num2 * 129761754u ^ 222396513u); continue; case 17u: arg_2A4_0 = (((num != 82u) ? 3961585146u : 2257448568u) ^ num2 * 3852570557u); continue; case 18u: arg_2A4_0 = ((num <= 16u) ? 3352071322u : 3290024174u); continue; case 19u: arg_2A4_0 = (num2 * 1384166295u ^ 573759775u); continue; case 21u: arg_2A4_0 = ((num == 24u) ? 3658587913u : 3458827425u); continue; case 22u: arg_2A4_0 = ((this.entityId_ != null) ? 3109715407u : 4142335638u); continue; case 23u: goto IL_32C; case 24u: input.ReadMessage(this.tags_); arg_2A4_0 = 2969388292u; continue; case 25u: arg_2A4_0 = ((this.options_ == null) ? 3472492955u : 3996176947u); continue; case 26u: arg_2A4_0 = ((this.tags_ != null) ? 3887824200u : 3137284210u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountBlob.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountBlob : IMessage<GameAccountBlob>, IEquatable<GameAccountBlob>, IDeepCloneable<GameAccountBlob>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountBlob.__c __9 = new GameAccountBlob.__c(); internal GameAccountBlob cctor>b__99_0() { return new GameAccountBlob(); } } private static readonly MessageParser<GameAccountBlob> _parser = new MessageParser<GameAccountBlob>(new Func<GameAccountBlob>(GameAccountBlob.__c.__9.<.cctor>b__99_0)); public const int GameAccountFieldNumber = 1; private GameAccountHandle gameAccount_; public const int NameFieldNumber = 2; private string name_ = ""; public const int RealmPermissionsFieldNumber = 3; private uint realmPermissions_; public const int StatusFieldNumber = 4; private uint status_; public const int FlagsFieldNumber = 5; private ulong flags_; public const int BillingFlagsFieldNumber = 6; private uint billingFlags_; public const int CacheExpirationFieldNumber = 7; private ulong cacheExpiration_; public const int SubscriptionExpirationFieldNumber = 10; private ulong subscriptionExpiration_; public const int UnitsRemainingFieldNumber = 11; private uint unitsRemaining_; public const int StatusExpirationFieldNumber = 12; private ulong statusExpiration_; public const int BoxLevelFieldNumber = 13; private uint boxLevel_; public const int BoxLevelExpirationFieldNumber = 14; private ulong boxLevelExpiration_; public const int LicensesFieldNumber = 20; private static readonly FieldCodec<AccountLicense> _repeated_licenses_codec = FieldCodec.ForMessage<AccountLicense>(162u, AccountLicense.Parser); private readonly RepeatedField<AccountLicense> licenses_ = new RepeatedField<AccountLicense>(); public const int RafAccountFieldNumber = 21; private uint rafAccount_; public const int RafInfoFieldNumber = 22; private ByteString rafInfo_ = ByteString.Empty; public const int RafExpirationFieldNumber = 23; private ulong rafExpiration_; public static MessageParser<GameAccountBlob> Parser { get { return GameAccountBlob._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountBlob.Descriptor; } } public GameAccountHandle GameAccount { get { return this.gameAccount_; } set { this.gameAccount_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public uint RealmPermissions { get { return this.realmPermissions_; } set { this.realmPermissions_ = value; } } public uint Status { get { return this.status_; } set { this.status_ = value; } } public ulong Flags { get { return this.flags_; } set { this.flags_ = value; } } public uint BillingFlags { get { return this.billingFlags_; } set { this.billingFlags_ = value; } } public ulong CacheExpiration { get { return this.cacheExpiration_; } set { this.cacheExpiration_ = value; } } public ulong SubscriptionExpiration { get { return this.subscriptionExpiration_; } set { this.subscriptionExpiration_ = value; } } public uint UnitsRemaining { get { return this.unitsRemaining_; } set { this.unitsRemaining_ = value; } } public ulong StatusExpiration { get { return this.statusExpiration_; } set { this.statusExpiration_ = value; } } public uint BoxLevel { get { return this.boxLevel_; } set { this.boxLevel_ = value; } } public ulong BoxLevelExpiration { get { return this.boxLevelExpiration_; } set { this.boxLevelExpiration_ = value; } } public RepeatedField<AccountLicense> Licenses { get { return this.licenses_; } } public uint RafAccount { get { return this.rafAccount_; } set { this.rafAccount_ = value; } } public ByteString RafInfo { get { return this.rafInfo_; } set { this.rafInfo_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_36<string>(1095253436u)); } } public ulong RafExpiration { get { return this.rafExpiration_; } set { this.rafExpiration_ = value; } } public GameAccountBlob() { } public GameAccountBlob(GameAccountBlob other) : this() { while (true) { IL_19E: uint arg_165_0 = 1336216402u; while (true) { uint num; switch ((num = (arg_165_0 ^ 645277058u)) % 11u) { case 0u: goto IL_19E; case 1u: this.realmPermissions_ = other.realmPermissions_; arg_165_0 = (num * 2749708486u ^ 227771262u); continue; case 2u: this.subscriptionExpiration_ = other.subscriptionExpiration_; arg_165_0 = (num * 2672525124u ^ 1580580244u); continue; case 3u: this.billingFlags_ = other.billingFlags_; arg_165_0 = (num * 3466906230u ^ 1231228552u); continue; case 4u: this.boxLevelExpiration_ = other.boxLevelExpiration_; this.licenses_ = other.licenses_.Clone(); this.rafAccount_ = other.rafAccount_; this.rafInfo_ = other.rafInfo_; arg_165_0 = (num * 205321318u ^ 1406069299u); continue; case 5u: this.cacheExpiration_ = other.cacheExpiration_; arg_165_0 = (num * 982654866u ^ 4132017447u); continue; case 7u: this.unitsRemaining_ = other.unitsRemaining_; this.statusExpiration_ = other.statusExpiration_; this.boxLevel_ = other.boxLevel_; arg_165_0 = (num * 1067425065u ^ 672848744u); continue; case 8u: this.name_ = other.name_; arg_165_0 = (num * 2479277835u ^ 3293396377u); continue; case 9u: this.GameAccount = ((other.gameAccount_ != null) ? other.GameAccount.Clone() : null); arg_165_0 = 351213835u; continue; case 10u: this.status_ = other.status_; this.flags_ = other.flags_; arg_165_0 = (num * 2588551917u ^ 487794529u); continue; } goto Block_2; } } Block_2: this.rafExpiration_ = other.rafExpiration_; } public GameAccountBlob Clone() { return new GameAccountBlob(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountBlob); } public bool Equals(GameAccountBlob other) { if (other == null) { goto IL_42; } goto IL_37B; int arg_2CD_0; while (true) { IL_2C8: switch ((arg_2CD_0 ^ -1918275844) % 37) { case 0: return false; case 1: arg_2CD_0 = ((this.SubscriptionExpiration == other.SubscriptionExpiration) ? -424681678 : -1623422209); continue; case 2: goto IL_37B; case 3: return false; case 4: return false; case 5: return false; case 6: return false; case 7: arg_2CD_0 = ((this.CacheExpiration != other.CacheExpiration) ? -1635539345 : -929651137); continue; case 8: return false; case 9: return false; case 10: arg_2CD_0 = ((!this.licenses_.Equals(other.licenses_)) ? -238772918 : -56464671); continue; case 11: arg_2CD_0 = ((this.RafExpiration != other.RafExpiration) ? -580528846 : -1161430988); continue; case 12: return false; case 13: return true; case 15: return false; case 16: arg_2CD_0 = ((this.BillingFlags == other.BillingFlags) ? -1929411403 : -300965944); continue; case 17: arg_2CD_0 = ((this.RealmPermissions != other.RealmPermissions) ? -1336731371 : -159675423); continue; case 18: arg_2CD_0 = ((this.RafInfo != other.RafInfo) ? -1213636515 : -1186255421); continue; case 19: arg_2CD_0 = ((this.StatusExpiration == other.StatusExpiration) ? -1059530699 : -257374088); continue; case 20: arg_2CD_0 = ((this.Status == other.Status) ? -1232203465 : -931005074); continue; case 21: return false; case 22: arg_2CD_0 = ((this.UnitsRemaining != other.UnitsRemaining) ? -408772685 : -1598527564); continue; case 23: arg_2CD_0 = ((this.Flags != other.Flags) ? -1898708551 : -1621961050); continue; case 24: return false; case 25: arg_2CD_0 = ((this.RafAccount == other.RafAccount) ? -980849534 : -97897371); continue; case 26: return false; case 27: arg_2CD_0 = ((this.BoxLevelExpiration != other.BoxLevelExpiration) ? -533247872 : -1660302540); continue; case 28: arg_2CD_0 = (GameAccountBlob.smethod_1(this.Name, other.Name) ? -1707839636 : -1314261898); continue; case 29: arg_2CD_0 = ((!GameAccountBlob.smethod_0(this.GameAccount, other.GameAccount)) ? -2119250339 : -538175281); continue; case 30: goto IL_42; case 31: return false; case 32: return false; case 33: return false; case 34: return false; case 35: return false; case 36: arg_2CD_0 = ((this.BoxLevel == other.BoxLevel) ? -653288169 : -1992478822); continue; } break; } return true; IL_42: arg_2CD_0 = -177903405; goto IL_2C8; IL_37B: arg_2CD_0 = ((other == this) ? -462832734 : -588185470); goto IL_2C8; } public override int GetHashCode() { int num = 1; while (true) { IL_465: uint arg_3E4_0 = 2437191017u; while (true) { uint num2; switch ((num2 = (arg_3E4_0 ^ 3252419345u)) % 29u) { case 0u: arg_3E4_0 = (((GameAccountBlob.smethod_3(this.Name) != 0) ? 325511349u : 182045834u) ^ num2 * 44859760u); continue; case 1u: num ^= this.StatusExpiration.GetHashCode(); arg_3E4_0 = (num2 * 2025727745u ^ 2774070269u); continue; case 2u: num ^= this.BoxLevel.GetHashCode(); arg_3E4_0 = (num2 * 1644375468u ^ 2638184037u); continue; case 3u: num ^= this.Status.GetHashCode(); arg_3E4_0 = ((this.Flags == 0uL) ? 4119584964u : 2930658810u); continue; case 4u: num ^= this.Flags.GetHashCode(); arg_3E4_0 = (num2 * 1550264650u ^ 3948175914u); continue; case 5u: num ^= this.BillingFlags.GetHashCode(); arg_3E4_0 = (num2 * 3314773307u ^ 2715024032u); continue; case 6u: num ^= this.licenses_.GetHashCode(); arg_3E4_0 = ((this.RafAccount == 0u) ? 3890266423u : 2815556668u); continue; case 7u: num ^= this.RafInfo.GetHashCode(); arg_3E4_0 = (num2 * 3679877075u ^ 592227712u); continue; case 8u: num ^= this.RealmPermissions.GetHashCode(); arg_3E4_0 = (num2 * 599919581u ^ 1515877077u); continue; case 9u: num ^= this.RafAccount.GetHashCode(); arg_3E4_0 = (num2 * 2661073037u ^ 968061694u); continue; case 10u: arg_3E4_0 = ((this.StatusExpiration != 0uL) ? 2703034632u : 3010343652u); continue; case 11u: arg_3E4_0 = ((this.RafInfo.Length == 0) ? 3716114519u : 3234422908u); continue; case 12u: num ^= GameAccountBlob.smethod_2(this.GameAccount); arg_3E4_0 = (num2 * 424765219u ^ 159607351u); continue; case 13u: arg_3E4_0 = ((this.BoxLevel == 0u) ? 2601386293u : 2370859885u); continue; case 14u: num ^= this.CacheExpiration.GetHashCode(); arg_3E4_0 = (num2 * 4247757499u ^ 618821226u); continue; case 15u: arg_3E4_0 = ((this.BillingFlags != 0u) ? 3328762200u : 3971012979u); continue; case 16u: arg_3E4_0 = ((this.UnitsRemaining != 0u) ? 3934358660u : 3420303938u); continue; case 17u: arg_3E4_0 = ((this.SubscriptionExpiration == 0uL) ? 3699345079u : 4289973681u); continue; case 18u: num ^= this.SubscriptionExpiration.GetHashCode(); arg_3E4_0 = (num2 * 3554373445u ^ 1088003991u); continue; case 19u: arg_3E4_0 = ((this.RealmPermissions != 0u) ? 3160004623u : 4258064435u); continue; case 20u: num ^= this.BoxLevelExpiration.GetHashCode(); arg_3E4_0 = (num2 * 437726541u ^ 4181319644u); continue; case 22u: arg_3E4_0 = ((this.RafExpiration != 0uL) ? 4071018947u : 3220587002u); continue; case 23u: arg_3E4_0 = ((this.CacheExpiration == 0uL) ? 3130378437u : 4016786828u); continue; case 24u: arg_3E4_0 = ((this.BoxLevelExpiration == 0uL) ? 3955694572u : 3267659745u); continue; case 25u: num ^= this.UnitsRemaining.GetHashCode(); arg_3E4_0 = (num2 * 1343373274u ^ 3979136416u); continue; case 26u: goto IL_465; case 27u: num ^= this.RafExpiration.GetHashCode(); arg_3E4_0 = (num2 * 3595066560u ^ 2410009722u); continue; case 28u: num ^= GameAccountBlob.smethod_2(this.Name); arg_3E4_0 = (num2 * 4061903283u ^ 1875396070u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.GameAccount); while (true) { IL_597: uint arg_4EA_0 = 2210339422u; while (true) { uint num; switch ((num = (arg_4EA_0 ^ 2379822450u)) % 40u) { case 0u: output.WriteRawTag(88); output.WriteUInt32(this.UnitsRemaining); arg_4EA_0 = (num * 684102464u ^ 133467507u); continue; case 1u: output.WriteRawTag(18); arg_4EA_0 = (num * 882183597u ^ 1063240237u); continue; case 2u: output.WriteUInt32(this.BoxLevel); arg_4EA_0 = (num * 3015840235u ^ 1944971517u); continue; case 3u: output.WriteUInt64(this.RafExpiration); arg_4EA_0 = (num * 1348832057u ^ 4075274302u); continue; case 4u: output.WriteUInt32(this.RealmPermissions); arg_4EA_0 = (num * 3886942913u ^ 758991632u); continue; case 5u: output.WriteRawTag(178, 1); arg_4EA_0 = (num * 722859652u ^ 770360329u); continue; case 6u: arg_4EA_0 = ((this.BoxLevel == 0u) ? 3237171795u : 2523653810u); continue; case 7u: arg_4EA_0 = ((this.UnitsRemaining != 0u) ? 3147401434u : 2868014963u); continue; case 8u: output.WriteRawTag(104); arg_4EA_0 = (num * 768596512u ^ 1031699448u); continue; case 9u: output.WriteUInt32(this.Status); arg_4EA_0 = (num * 2568467289u ^ 2252714603u); continue; case 10u: arg_4EA_0 = ((this.SubscriptionExpiration != 0uL) ? 2807257124u : 3292825349u); continue; case 11u: output.WriteRawTag(112); output.WriteUInt64(this.BoxLevelExpiration); arg_4EA_0 = (num * 2288463022u ^ 1284189407u); continue; case 12u: arg_4EA_0 = (((GameAccountBlob.smethod_3(this.Name) == 0) ? 503914086u : 1527623711u) ^ num * 2008824259u); continue; case 13u: output.WriteUInt64(this.CacheExpiration); arg_4EA_0 = (num * 969581757u ^ 1309673601u); continue; case 14u: arg_4EA_0 = ((this.BillingFlags != 0u) ? 2922976031u : 3389997169u); continue; case 15u: output.WriteBytes(this.RafInfo); arg_4EA_0 = (num * 4095237611u ^ 2129061211u); continue; case 16u: arg_4EA_0 = (((this.Flags != 0uL) ? 2790203764u : 3414667508u) ^ num * 1707723964u); continue; case 17u: output.WriteUInt64(this.Flags); arg_4EA_0 = (num * 21872318u ^ 2197504602u); continue; case 18u: output.WriteRawTag(173, 1); output.WriteFixed32(this.RafAccount); arg_4EA_0 = (num * 4114091125u ^ 136467435u); continue; case 19u: arg_4EA_0 = ((this.RafInfo.Length != 0) ? 2687608119u : 2153417534u); continue; case 20u: arg_4EA_0 = ((this.RafExpiration == 0uL) ? 3063690717u : 3361254479u); continue; case 21u: output.WriteRawTag(48); arg_4EA_0 = (num * 4127250272u ^ 2975735738u); continue; case 22u: output.WriteRawTag(32); arg_4EA_0 = 3929465075u; continue; case 24u: arg_4EA_0 = ((this.RealmPermissions == 0u) ? 2930979004u : 4030734129u); continue; case 25u: arg_4EA_0 = ((this.BoxLevelExpiration != 0uL) ? 2239197705u : 3115423045u); continue; case 26u: output.WriteRawTag(96); arg_4EA_0 = (num * 2022982987u ^ 1247644464u); continue; case 27u: output.WriteRawTag(24); arg_4EA_0 = (num * 3680344976u ^ 4067795310u); continue; case 28u: output.WriteUInt64(this.StatusExpiration); arg_4EA_0 = (num * 3886186136u ^ 1780253036u); continue; case 29u: output.WriteRawTag(56); arg_4EA_0 = (num * 2454296346u ^ 4118970901u); continue; case 30u: output.WriteRawTag(80); arg_4EA_0 = (num * 334525057u ^ 1096212443u); continue; case 31u: this.licenses_.WriteTo(output, GameAccountBlob._repeated_licenses_codec); arg_4EA_0 = ((this.RafAccount != 0u) ? 2520726856u : 3742771561u); continue; case 32u: output.WriteUInt32(this.BillingFlags); arg_4EA_0 = (num * 3493003920u ^ 241907441u); continue; case 33u: arg_4EA_0 = ((this.StatusExpiration == 0uL) ? 2602586252u : 4271710960u); continue; case 34u: output.WriteString(this.Name); arg_4EA_0 = (num * 1605308227u ^ 134574620u); continue; case 35u: arg_4EA_0 = ((this.CacheExpiration != 0uL) ? 3150449191u : 2492193776u); continue; case 36u: goto IL_597; case 37u: output.WriteRawTag(184, 1); arg_4EA_0 = (num * 314500045u ^ 1667818576u); continue; case 38u: output.WriteRawTag(40); arg_4EA_0 = (num * 1877340736u ^ 379058299u); continue; case 39u: output.WriteUInt64(this.SubscriptionExpiration); arg_4EA_0 = (num * 2414618800u ^ 3274350677u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_484: uint arg_3FB_0 = 2495452090u; while (true) { uint num2; switch ((num2 = (arg_3FB_0 ^ 2827821370u)) % 31u) { case 0u: arg_3FB_0 = ((this.RafInfo.Length != 0) ? 3154598666u : 2466644756u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.BoxLevelExpiration); arg_3FB_0 = (num2 * 791571663u ^ 1430304471u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.BillingFlags); arg_3FB_0 = (num2 * 1150680087u ^ 2882673965u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccount); arg_3FB_0 = (num2 * 1464299156u ^ 528871253u); continue; case 5u: goto IL_484; case 6u: arg_3FB_0 = ((this.SubscriptionExpiration != 0uL) ? 2343304485u : 3927162517u); continue; case 7u: num += this.licenses_.CalculateSize(GameAccountBlob._repeated_licenses_codec); arg_3FB_0 = 2969877113u; continue; case 8u: num += 2 + CodedOutputStream.ComputeBytesSize(this.RafInfo); arg_3FB_0 = (num2 * 1807601107u ^ 2221745796u); continue; case 9u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SubscriptionExpiration); arg_3FB_0 = (num2 * 408138489u ^ 2448758450u); continue; case 10u: arg_3FB_0 = ((this.BillingFlags != 0u) ? 3250775633u : 3496813488u); continue; case 11u: arg_3FB_0 = ((this.CacheExpiration == 0uL) ? 3456695274u : 3881937257u); continue; case 12u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Status); arg_3FB_0 = 2798173104u; continue; case 13u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RealmPermissions); arg_3FB_0 = (num2 * 2029966231u ^ 910951654u); continue; case 14u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Flags); arg_3FB_0 = (num2 * 1068650149u ^ 3075226383u); continue; case 15u: arg_3FB_0 = ((this.BoxLevel == 0u) ? 4257698740u : 2540040783u); continue; case 16u: num += 6; arg_3FB_0 = (num2 * 40375326u ^ 29300001u); continue; case 17u: arg_3FB_0 = ((this.StatusExpiration != 0uL) ? 2406778288u : 3702619495u); continue; case 18u: arg_3FB_0 = ((this.RealmPermissions == 0u) ? 2360747770u : 3964035966u); continue; case 19u: arg_3FB_0 = (((GameAccountBlob.smethod_3(this.Name) != 0) ? 1671181816u : 717483573u) ^ num2 * 611858445u); continue; case 20u: arg_3FB_0 = ((this.BoxLevelExpiration == 0uL) ? 4163419215u : 2256027858u); continue; case 21u: arg_3FB_0 = ((this.RafExpiration != 0uL) ? 4197527746u : 2327522379u); continue; case 22u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.BoxLevel); arg_3FB_0 = (num2 * 2362270080u ^ 2164087860u); continue; case 23u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.UnitsRemaining); arg_3FB_0 = (num2 * 607649u ^ 131146598u); continue; case 24u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.CacheExpiration); arg_3FB_0 = (num2 * 3854042521u ^ 1403511665u); continue; case 25u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_3FB_0 = (num2 * 1742848887u ^ 1129770113u); continue; case 26u: num += 2 + CodedOutputStream.ComputeUInt64Size(this.RafExpiration); arg_3FB_0 = (num2 * 2918544444u ^ 3962288747u); continue; case 27u: arg_3FB_0 = (((this.Flags != 0uL) ? 3313035333u : 2508583828u) ^ num2 * 350483083u); continue; case 28u: arg_3FB_0 = (((this.RafAccount != 0u) ? 3311561777u : 2302890308u) ^ num2 * 1889352787u); continue; case 29u: arg_3FB_0 = ((this.UnitsRemaining == 0u) ? 3493142614u : 3434476554u); continue; case 30u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.StatusExpiration); arg_3FB_0 = (num2 * 2199410282u ^ 2837774403u); continue; } return num; } } return num; } public void MergeFrom(GameAccountBlob other) { if (other == null) { goto IL_C3; } goto IL_4DC; uint arg_434_0; while (true) { IL_42F: uint num; switch ((num = (arg_434_0 ^ 3632683323u)) % 35u) { case 0u: this.BillingFlags = other.BillingFlags; arg_434_0 = (num * 1238845432u ^ 3753752346u); continue; case 1u: this.BoxLevel = other.BoxLevel; arg_434_0 = (num * 103175883u ^ 2722329810u); continue; case 2u: arg_434_0 = (((this.gameAccount_ == null) ? 1679898828u : 340616743u) ^ num * 2517224619u); continue; case 3u: arg_434_0 = ((other.BoxLevelExpiration == 0uL) ? 3389888440u : 2761258531u); continue; case 4u: this.gameAccount_ = new GameAccountHandle(); arg_434_0 = (num * 1258069951u ^ 2374562088u); continue; case 5u: arg_434_0 = ((other.BillingFlags == 0u) ? 4148711282u : 2628334280u); continue; case 7u: arg_434_0 = ((other.RafExpiration == 0uL) ? 3739297513u : 2604182130u); continue; case 8u: this.RafExpiration = other.RafExpiration; arg_434_0 = (num * 1742414386u ^ 3371110571u); continue; case 9u: arg_434_0 = ((GameAccountBlob.smethod_3(other.Name) == 0) ? 2347136367u : 4198721837u); continue; case 10u: this.RafInfo = other.RafInfo; arg_434_0 = (num * 984558254u ^ 2524413886u); continue; case 11u: this.RealmPermissions = other.RealmPermissions; arg_434_0 = (num * 2742856505u ^ 3172710212u); continue; case 12u: arg_434_0 = ((other.RafInfo.Length != 0) ? 4215748323u : 4161538926u); continue; case 13u: this.Status = other.Status; arg_434_0 = (num * 3574943469u ^ 2544193581u); continue; case 14u: arg_434_0 = ((other.SubscriptionExpiration == 0uL) ? 2266270403u : 4011751681u); continue; case 15u: this.RafAccount = other.RafAccount; arg_434_0 = (num * 4198608799u ^ 1180229668u); continue; case 16u: this.StatusExpiration = other.StatusExpiration; arg_434_0 = (num * 250526570u ^ 2139164341u); continue; case 17u: arg_434_0 = ((other.RealmPermissions == 0u) ? 3654958848u : 4157837151u); continue; case 18u: arg_434_0 = ((other.CacheExpiration == 0uL) ? 3834405032u : 3158492355u); continue; case 19u: this.licenses_.Add(other.licenses_); arg_434_0 = ((other.RafAccount == 0u) ? 2465516651u : 4162641002u); continue; case 20u: this.GameAccount.MergeFrom(other.GameAccount); arg_434_0 = 3161549066u; continue; case 21u: arg_434_0 = ((other.StatusExpiration != 0uL) ? 2353155520u : 4032759387u); continue; case 22u: this.Flags = other.Flags; arg_434_0 = (num * 648912064u ^ 1686587408u); continue; case 23u: arg_434_0 = ((other.Flags == 0uL) ? 3719792912u : 2186654423u); continue; case 24u: this.BoxLevelExpiration = other.BoxLevelExpiration; arg_434_0 = (num * 2134308492u ^ 3938666136u); continue; case 25u: goto IL_4DC; case 26u: this.Name = other.Name; arg_434_0 = (num * 2484721987u ^ 576868013u); continue; case 27u: this.SubscriptionExpiration = other.SubscriptionExpiration; arg_434_0 = (num * 544199856u ^ 3950552355u); continue; case 28u: goto IL_C3; case 29u: arg_434_0 = ((other.Status == 0u) ? 3227647378u : 3590517984u); continue; case 30u: arg_434_0 = ((other.UnitsRemaining == 0u) ? 2931179381u : 3130939927u); continue; case 31u: this.CacheExpiration = other.CacheExpiration; arg_434_0 = (num * 1375076013u ^ 931049520u); continue; case 32u: return; case 33u: arg_434_0 = ((other.BoxLevel != 0u) ? 3113026895u : 2483696430u); continue; case 34u: this.UnitsRemaining = other.UnitsRemaining; arg_434_0 = (num * 3751879794u ^ 3480856301u); continue; } break; } return; IL_C3: arg_434_0 = 3205917378u; goto IL_42F; IL_4DC: arg_434_0 = ((other.gameAccount_ == null) ? 3161549066u : 3128081338u); goto IL_42F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_79E: uint num; uint arg_686_0 = ((num = input.ReadTag()) != 0u) ? 2109354807u : 482667087u; while (true) { uint num2; switch ((num2 = (arg_686_0 ^ 1289224437u)) % 63u) { case 0u: arg_686_0 = (num2 * 3776465087u ^ 3375880516u); continue; case 1u: arg_686_0 = (((num != 96u) ? 1666949991u : 1328574504u) ^ num2 * 2714365222u); continue; case 2u: this.CacheExpiration = input.ReadUInt64(); arg_686_0 = 1341866711u; continue; case 3u: this.UnitsRemaining = input.ReadUInt32(); arg_686_0 = 1128125696u; continue; case 4u: arg_686_0 = (num2 * 2765366486u ^ 3447631356u); continue; case 5u: arg_686_0 = 2109354807u; continue; case 6u: arg_686_0 = (((num > 32u) ? 1427663151u : 593383971u) ^ num2 * 2567056816u); continue; case 7u: arg_686_0 = (num2 * 1336001305u ^ 3484783839u); continue; case 8u: input.SkipLastField(); arg_686_0 = 2136444943u; continue; case 9u: arg_686_0 = (num2 * 2111144418u ^ 1218200762u); continue; case 10u: this.licenses_.AddEntriesFrom(input, GameAccountBlob._repeated_licenses_codec); arg_686_0 = 1771206944u; continue; case 11u: this.RealmPermissions = input.ReadUInt32(); arg_686_0 = 524845890u; continue; case 13u: arg_686_0 = (((num == 88u) ? 3231787841u : 2281576647u) ^ num2 * 2688643392u); continue; case 14u: this.BillingFlags = input.ReadUInt32(); arg_686_0 = 1128125696u; continue; case 15u: arg_686_0 = (num2 * 3678928028u ^ 2461377880u); continue; case 16u: arg_686_0 = (((num == 18u) ? 3315941580u : 2178494316u) ^ num2 * 452183380u); continue; case 17u: arg_686_0 = (((num != 40u) ? 1683298214u : 768414246u) ^ num2 * 2280884613u); continue; case 18u: arg_686_0 = (num2 * 12844439u ^ 1075894078u); continue; case 19u: arg_686_0 = (((num == 80u) ? 3792013018u : 2607158156u) ^ num2 * 359272223u); continue; case 20u: arg_686_0 = ((num > 112u) ? 18714632u : 1149878301u); continue; case 21u: arg_686_0 = ((num != 56u) ? 1227177392u : 568979796u); continue; case 22u: arg_686_0 = (num2 * 3237446236u ^ 829858804u); continue; case 23u: arg_686_0 = (((num == 173u) ? 3817384847u : 3749722677u) ^ num2 * 228581333u); continue; case 24u: arg_686_0 = ((this.gameAccount_ == null) ? 691365746u : 799866396u); continue; case 25u: arg_686_0 = (((num == 184u) ? 1820689179u : 382293978u) ^ num2 * 3248810799u); continue; case 26u: arg_686_0 = ((num <= 173u) ? 705054882u : 1879396690u); continue; case 27u: arg_686_0 = (num2 * 2516910685u ^ 2851860247u); continue; case 28u: arg_686_0 = (num2 * 1455059326u ^ 235744982u); continue; case 29u: arg_686_0 = ((num > 48u) ? 1292402981u : 97534027u); continue; case 30u: this.gameAccount_ = new GameAccountHandle(); arg_686_0 = (num2 * 4174451407u ^ 1188678197u); continue; case 31u: arg_686_0 = (num2 * 2116443828u ^ 1971535212u); continue; case 32u: arg_686_0 = (num2 * 3771572052u ^ 1441874020u); continue; case 33u: this.Status = input.ReadUInt32(); arg_686_0 = 1128125696u; continue; case 34u: this.SubscriptionExpiration = input.ReadUInt64(); arg_686_0 = 1002784499u; continue; case 35u: arg_686_0 = (((num == 32u) ? 2366972157u : 3965320142u) ^ num2 * 1807635236u); continue; case 36u: arg_686_0 = (((num > 96u) ? 1338250888u : 92204501u) ^ num2 * 3958592619u); continue; case 37u: arg_686_0 = (((num != 48u) ? 2262081387u : 2878339644u) ^ num2 * 3824457187u); continue; case 38u: arg_686_0 = (num2 * 3521313274u ^ 1712635922u); continue; case 39u: arg_686_0 = (((num != 112u) ? 3122710927u : 2655631231u) ^ num2 * 717171424u); continue; case 40u: this.BoxLevel = input.ReadUInt32(); arg_686_0 = 2039177289u; continue; case 41u: arg_686_0 = (num2 * 1331128309u ^ 4274547234u); continue; case 42u: arg_686_0 = (num2 * 1038296856u ^ 733656112u); continue; case 43u: this.BoxLevelExpiration = input.ReadUInt64(); arg_686_0 = 1669661344u; continue; case 44u: arg_686_0 = (((num > 18u) ? 3956289647u : 2371803989u) ^ num2 * 2249355222u); continue; case 45u: arg_686_0 = ((num != 104u) ? 2021349070u : 1987664969u); continue; case 46u: this.Flags = input.ReadUInt64(); arg_686_0 = 341650574u; continue; case 47u: this.RafAccount = input.ReadFixed32(); arg_686_0 = 1885809214u; continue; case 48u: arg_686_0 = ((num == 24u) ? 651139975u : 1136886138u); continue; case 49u: this.StatusExpiration = input.ReadUInt64(); arg_686_0 = 1128125696u; continue; case 50u: arg_686_0 = (num2 * 835479378u ^ 2724791020u); continue; case 51u: goto IL_79E; case 52u: arg_686_0 = (num2 * 3136783791u ^ 3223019447u); continue; case 53u: arg_686_0 = (num2 * 1739244696u ^ 1464443768u); continue; case 54u: input.ReadMessage(this.gameAccount_); arg_686_0 = 1128125696u; continue; case 55u: arg_686_0 = ((num != 178u) ? 761755867u : 1333905492u); continue; case 56u: this.Name = input.ReadString(); arg_686_0 = 1873735954u; continue; case 57u: this.RafInfo = input.ReadBytes(); arg_686_0 = 63620696u; continue; case 58u: arg_686_0 = (num2 * 935423220u ^ 3226508348u); continue; case 59u: this.RafExpiration = input.ReadUInt64(); arg_686_0 = 1128125696u; continue; case 60u: arg_686_0 = (((num == 162u) ? 2400692396u : 3447205955u) ^ num2 * 4257308607u); continue; case 61u: arg_686_0 = (((num == 10u) ? 3608275003u : 2488328687u) ^ num2 * 389305975u); continue; case 62u: arg_686_0 = ((num > 80u) ? 1347866646u : 1379103831u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf/SourceCodeInfo.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class SourceCodeInfo : IMessage<SourceCodeInfo>, IEquatable<SourceCodeInfo>, IDeepCloneable<SourceCodeInfo>, IMessage { [DebuggerNonUserCode] public static class Types { [DebuggerNonUserCode] internal sealed class Location : IMessage<SourceCodeInfo.Types.Location>, IEquatable<SourceCodeInfo.Types.Location>, IDeepCloneable<SourceCodeInfo.Types.Location>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SourceCodeInfo.Types.Location.__c __9 = new SourceCodeInfo.Types.Location.__c(); internal SourceCodeInfo.Types.Location cctor>b__39_0() { return new SourceCodeInfo.Types.Location(); } } private static readonly MessageParser<SourceCodeInfo.Types.Location> _parser = new MessageParser<SourceCodeInfo.Types.Location>(new Func<SourceCodeInfo.Types.Location>(SourceCodeInfo.Types.Location.__c.__9.<.cctor>b__39_0)); public const int PathFieldNumber = 1; private static readonly FieldCodec<int> _repeated_path_codec = FieldCodec.ForInt32(10u); private readonly RepeatedField<int> path_ = new RepeatedField<int>(); public const int SpanFieldNumber = 2; private static readonly FieldCodec<int> _repeated_span_codec = FieldCodec.ForInt32(18u); private readonly RepeatedField<int> span_ = new RepeatedField<int>(); public const int LeadingCommentsFieldNumber = 3; private string leadingComments_ = ""; public const int TrailingCommentsFieldNumber = 4; private string trailingComments_ = ""; public static MessageParser<SourceCodeInfo.Types.Location> Parser { get { return SourceCodeInfo.Types.Location._parser; } } public static MessageDescriptor Descriptor { get { return SourceCodeInfo.Descriptor.NestedTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return SourceCodeInfo.Types.Location.Descriptor; } } public RepeatedField<int> Path { get { return this.path_; } } public RepeatedField<int> Span { get { return this.span_; } } public string LeadingComments { get { return this.leadingComments_; } set { this.leadingComments_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string TrailingComments { get { return this.trailingComments_; } set { this.trailingComments_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public Location() { } public Location(SourceCodeInfo.Types.Location other) : this() { this.path_ = other.path_.Clone(); this.span_ = other.span_.Clone(); this.leadingComments_ = other.leadingComments_; this.trailingComments_ = other.trailingComments_; } public SourceCodeInfo.Types.Location Clone() { return new SourceCodeInfo.Types.Location(this); } public override bool Equals(object other) { return this.Equals(other as SourceCodeInfo.Types.Location); } public bool Equals(SourceCodeInfo.Types.Location other) { if (other == null) { goto IL_73; } goto IL_123; int arg_D5_0; while (true) { IL_D0: switch ((arg_D5_0 ^ -412922413) % 13) { case 1: return false; case 2: return false; case 3: arg_D5_0 = (SourceCodeInfo.Types.Location.smethod_0(this.LeadingComments, other.LeadingComments) ? -1823415606 : -2096372320); continue; case 4: goto IL_123; case 5: return false; case 6: arg_D5_0 = (this.path_.Equals(other.path_) ? -1963338242 : -309609019); continue; case 7: goto IL_73; case 8: arg_D5_0 = (this.span_.Equals(other.span_) ? -1253329141 : -1506828496); continue; case 9: return false; case 10: return false; case 11: arg_D5_0 = ((!SourceCodeInfo.Types.Location.smethod_0(this.TrailingComments, other.TrailingComments)) ? -1984696017 : -1866059674); continue; case 12: return true; } break; } return true; IL_73: arg_D5_0 = -2017480143; goto IL_D0; IL_123: arg_D5_0 = ((other != this) ? -235532001 : -1635374671); goto IL_D0; } public override int GetHashCode() { int num = 1 ^ SourceCodeInfo.Types.Location.smethod_1(this.path_); num ^= SourceCodeInfo.Types.Location.smethod_1(this.span_); while (true) { IL_D8: uint arg_B4_0 = 3225757323u; while (true) { uint num2; switch ((num2 = (arg_B4_0 ^ 2232217509u)) % 6u) { case 1u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.LeadingComments); arg_B4_0 = (num2 * 331770645u ^ 1953872266u); continue; case 2u: arg_B4_0 = (((SourceCodeInfo.Types.Location.smethod_2(this.LeadingComments) == 0) ? 3895934629u : 2226522654u) ^ num2 * 1665030939u); continue; case 3u: num ^= SourceCodeInfo.Types.Location.smethod_1(this.TrailingComments); arg_B4_0 = (num2 * 3589001151u ^ 1210425136u); continue; case 4u: arg_B4_0 = ((SourceCodeInfo.Types.Location.smethod_2(this.TrailingComments) != 0) ? 4053307708u : 3636376599u); continue; case 5u: goto IL_D8; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.path_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_path_codec); while (true) { IL_128: uint arg_F7_0 = 4016646306u; while (true) { uint num; switch ((num = (arg_F7_0 ^ 2834536074u)) % 9u) { case 0u: output.WriteString(this.LeadingComments); arg_F7_0 = (num * 2728556441u ^ 4094913141u); continue; case 2u: arg_F7_0 = (((SourceCodeInfo.Types.Location.smethod_2(this.LeadingComments) != 0) ? 3435165636u : 4179773490u) ^ num * 435143793u); continue; case 3u: output.WriteString(this.TrailingComments); arg_F7_0 = (num * 3459587754u ^ 780050995u); continue; case 4u: output.WriteRawTag(26); arg_F7_0 = (num * 851861346u ^ 1153944790u); continue; case 5u: this.span_.WriteTo(output, SourceCodeInfo.Types.Location._repeated_span_codec); arg_F7_0 = (num * 2092002766u ^ 2793290631u); continue; case 6u: goto IL_128; case 7u: output.WriteRawTag(34); arg_F7_0 = (num * 1109870101u ^ 632310986u); continue; case 8u: arg_F7_0 = ((SourceCodeInfo.Types.Location.smethod_2(this.TrailingComments) != 0) ? 4208085521u : 3982652469u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_112: uint arg_E6_0 = 2855421691u; while (true) { uint num2; switch ((num2 = (arg_E6_0 ^ 3011765341u)) % 8u) { case 0u: arg_E6_0 = ((SourceCodeInfo.Types.Location.smethod_2(this.TrailingComments) != 0) ? 3837652857u : 2296864130u); continue; case 1u: num += this.span_.CalculateSize(SourceCodeInfo.Types.Location._repeated_span_codec); arg_E6_0 = (num2 * 3238230227u ^ 3199817187u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.LeadingComments); arg_E6_0 = (num2 * 2100283546u ^ 2284655521u); continue; case 3u: goto IL_112; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.TrailingComments); arg_E6_0 = (num2 * 3108093966u ^ 2902771322u); continue; case 5u: arg_E6_0 = (((SourceCodeInfo.Types.Location.smethod_2(this.LeadingComments) != 0) ? 794356788u : 484304294u) ^ num2 * 3629793151u); continue; case 6u: num += this.path_.CalculateSize(SourceCodeInfo.Types.Location._repeated_path_codec); arg_E6_0 = (num2 * 797016928u ^ 1136514700u); continue; } return num; } } return num; } public void MergeFrom(SourceCodeInfo.Types.Location other) { if (other == null) { goto IL_71; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 2655529239u)) % 7u) { case 0u: goto IL_71; case 1u: goto IL_B2; case 2u: this.LeadingComments = other.LeadingComments; arg_7B_0 = (num * 909486776u ^ 1094130646u); continue; case 3u: this.TrailingComments = other.TrailingComments; arg_7B_0 = (num * 2445252415u ^ 1636155262u); continue; case 4u: return; case 5u: arg_7B_0 = ((SourceCodeInfo.Types.Location.smethod_2(other.TrailingComments) == 0) ? 3822791731u : 4057200484u); continue; } break; } return; IL_71: arg_7B_0 = 2646651881u; goto IL_76; IL_B2: this.path_.Add(other.path_); this.span_.Add(other.span_); arg_7B_0 = ((SourceCodeInfo.Types.Location.smethod_2(other.LeadingComments) != 0) ? 4049535965u : 4090887910u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_22B: uint num; uint arg_1C7_0 = ((num = input.ReadTag()) != 0u) ? 3338900507u : 3490427704u; while (true) { uint num2; switch ((num2 = (arg_1C7_0 ^ 3575757851u)) % 18u) { case 0u: arg_1C7_0 = (num2 * 4161478824u ^ 2103420624u); continue; case 1u: this.path_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_path_codec); arg_1C7_0 = 2227857680u; continue; case 2u: arg_1C7_0 = ((num <= 16u) ? 2859386605u : 4283208004u); continue; case 3u: arg_1C7_0 = (((num != 34u) ? 1520889365u : 1267782305u) ^ num2 * 2173165572u); continue; case 4u: this.TrailingComments = input.ReadString(); arg_1C7_0 = 2227857680u; continue; case 5u: arg_1C7_0 = 3338900507u; continue; case 6u: arg_1C7_0 = (num2 * 2358789655u ^ 2159803823u); continue; case 8u: input.SkipLastField(); arg_1C7_0 = 2183611349u; continue; case 9u: arg_1C7_0 = ((num == 18u) ? 2447739934u : 2669850999u); continue; case 10u: arg_1C7_0 = (((num != 8u) ? 3280687541u : 3841024010u) ^ num2 * 3329312757u); continue; case 11u: this.LeadingComments = input.ReadString(); arg_1C7_0 = 2227857680u; continue; case 12u: arg_1C7_0 = (((num != 26u) ? 3138895318u : 3479952318u) ^ num2 * 1481422129u); continue; case 13u: arg_1C7_0 = (((num != 16u) ? 278902393u : 1407783438u) ^ num2 * 615822576u); continue; case 14u: arg_1C7_0 = (num2 * 255842685u ^ 4130925702u); continue; case 15u: goto IL_22B; case 16u: arg_1C7_0 = (((num != 10u) ? 1246054996u : 1063320292u) ^ num2 * 84701410u); continue; case 17u: this.span_.AddEntriesFrom(input, SourceCodeInfo.Types.Location._repeated_span_codec); arg_1C7_0 = 3200795651u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SourceCodeInfo.__c __9 = new SourceCodeInfo.__c(); internal SourceCodeInfo cctor>b__25_0() { return new SourceCodeInfo(); } } private static readonly MessageParser<SourceCodeInfo> _parser = new MessageParser<SourceCodeInfo>(new Func<SourceCodeInfo>(SourceCodeInfo.__c.__9.<.cctor>b__25_0)); public const int LocationFieldNumber = 1; private static readonly FieldCodec<SourceCodeInfo.Types.Location> _repeated_location_codec = FieldCodec.ForMessage<SourceCodeInfo.Types.Location>(10u, SourceCodeInfo.Types.Location.Parser); private readonly RepeatedField<SourceCodeInfo.Types.Location> location_ = new RepeatedField<SourceCodeInfo.Types.Location>(); public static MessageParser<SourceCodeInfo> Parser { get { return SourceCodeInfo._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[17]; } } MessageDescriptor IMessage.Descriptor { get { return SourceCodeInfo.Descriptor; } } public RepeatedField<SourceCodeInfo.Types.Location> Location { get { return this.location_; } } public SourceCodeInfo() { } public SourceCodeInfo(SourceCodeInfo other) : this() { while (true) { IL_43: uint arg_2B_0 = 4077766922u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 4205492862u)) % 3u) { case 0u: goto IL_43; case 2u: this.location_ = other.location_.Clone(); arg_2B_0 = (num * 2197352714u ^ 2080953939u); continue; } return; } } } public SourceCodeInfo Clone() { return new SourceCodeInfo(this); } public override bool Equals(object other) { return this.Equals(other as SourceCodeInfo); } public bool Equals(SourceCodeInfo other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1480823065) % 7) { case 0: goto IL_3E; case 1: arg_48_0 = ((!this.location_.Equals(other.location_)) ? 959853688 : 67165120); continue; case 2: return true; case 3: return false; case 5: goto IL_7A; case 6: return false; } break; } return true; IL_3E: arg_48_0 = 1924418814; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 758850387 : 872156750); goto IL_43; } public override int GetHashCode() { return 1 ^ SourceCodeInfo.smethod_0(this.location_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.location_.WriteTo(output, SourceCodeInfo._repeated_location_codec); } public int CalculateSize() { return 0 + this.location_.CalculateSize(SourceCodeInfo._repeated_location_codec); } public void MergeFrom(SourceCodeInfo other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 460009694; IL_08: switch ((arg_0D_0 ^ 216567484) % 4) { case 0: goto IL_03; case 2: return; case 3: IL_27: this.location_.Add(other.location_); arg_0D_0 = 61140661; goto IL_08; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) == 0u) ? 462393682u : 1313306455u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 2120489703u)) % 6u) { case 0u: goto IL_9B; case 1u: this.location_.AddEntriesFrom(input, SourceCodeInfo._repeated_location_codec); arg_68_0 = 685738763u; continue; case 2u: arg_68_0 = ((num != 10u) ? 1848805924u : 1014496126u); continue; case 3u: input.SkipLastField(); arg_68_0 = (num2 * 1599018398u ^ 279305297u); continue; case 4u: arg_68_0 = 1313306455u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/IsIgrAddressRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class IsIgrAddressRequest : IMessage<IsIgrAddressRequest>, IEquatable<IsIgrAddressRequest>, IDeepCloneable<IsIgrAddressRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly IsIgrAddressRequest.__c __9 = new IsIgrAddressRequest.__c(); internal IsIgrAddressRequest cctor>b__29_0() { return new IsIgrAddressRequest(); } } private static readonly MessageParser<IsIgrAddressRequest> _parser = new MessageParser<IsIgrAddressRequest>(new Func<IsIgrAddressRequest>(IsIgrAddressRequest.__c.__9.<.cctor>b__29_0)); public const int ClientAddressFieldNumber = 1; private string clientAddress_ = ""; public const int RegionFieldNumber = 2; private uint region_; public static MessageParser<IsIgrAddressRequest> Parser { get { return IsIgrAddressRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return IsIgrAddressRequest.Descriptor; } } public string ClientAddress { get { return this.clientAddress_; } set { this.clientAddress_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public IsIgrAddressRequest() { } public IsIgrAddressRequest(IsIgrAddressRequest other) : this() { this.clientAddress_ = other.clientAddress_; this.region_ = other.region_; } public IsIgrAddressRequest Clone() { return new IsIgrAddressRequest(this); } public override bool Equals(object other) { return this.Equals(other as IsIgrAddressRequest); } public bool Equals(IsIgrAddressRequest other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 816326458) % 9) { case 0: return false; case 1: return false; case 2: arg_72_0 = ((this.Region == other.Region) ? 1049984152 : 1004632356); continue; case 3: goto IL_41; case 5: return true; case 6: goto IL_B0; case 7: return false; case 8: arg_72_0 = ((!IsIgrAddressRequest.smethod_0(this.ClientAddress, other.ClientAddress)) ? 421543149 : 1722143118); continue; } break; } return true; IL_41: arg_72_0 = 1367242488; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 908261161 : 486270685); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_BA: uint arg_96_0 = 614106848u; while (true) { uint num2; switch ((num2 = (arg_96_0 ^ 70404347u)) % 6u) { case 0u: num ^= this.Region.GetHashCode(); arg_96_0 = (num2 * 3676315284u ^ 1549058859u); continue; case 1u: arg_96_0 = (((IsIgrAddressRequest.smethod_1(this.ClientAddress) == 0) ? 578998288u : 1303510630u) ^ num2 * 3801880702u); continue; case 2u: goto IL_BA; case 3u: num ^= IsIgrAddressRequest.smethod_2(this.ClientAddress); arg_96_0 = (num2 * 2971036550u ^ 3209400016u); continue; case 5u: arg_96_0 = ((this.Region == 0u) ? 194225411u : 491832761u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (IsIgrAddressRequest.smethod_1(this.ClientAddress) != 0) { goto IL_1F; } goto IL_C4; uint arg_8D_0; while (true) { IL_88: uint num; switch ((num = (arg_8D_0 ^ 2171559202u)) % 7u) { case 0u: output.WriteString(this.ClientAddress); arg_8D_0 = (num * 3368510034u ^ 1672123184u); continue; case 2u: output.WriteUInt32(this.Region); arg_8D_0 = (num * 3650834977u ^ 76326339u); continue; case 3u: output.WriteRawTag(10); arg_8D_0 = (num * 707914348u ^ 1750200029u); continue; case 4u: output.WriteRawTag(16); arg_8D_0 = (num * 3960858283u ^ 409347412u); continue; case 5u: goto IL_1F; case 6u: goto IL_C4; } break; } return; IL_1F: arg_8D_0 = 3373646032u; goto IL_88; IL_C4: arg_8D_0 = ((this.Region == 0u) ? 3198256497u : 2812014382u); goto IL_88; } public int CalculateSize() { int num = 0; if (IsIgrAddressRequest.smethod_1(this.ClientAddress) != 0) { goto IL_21; } goto IL_95; uint arg_69_0; while (true) { IL_64: uint num2; switch ((num2 = (arg_69_0 ^ 553539060u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.ClientAddress); arg_69_0 = (num2 * 8881765u ^ 3201558081u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_69_0 = (num2 * 3234794535u ^ 618206016u); continue; case 3u: goto IL_21; case 4u: goto IL_95; } break; } return num; IL_21: arg_69_0 = 1688216468u; goto IL_64; IL_95: arg_69_0 = ((this.Region != 0u) ? 951508745u : 419240907u); goto IL_64; } public void MergeFrom(IsIgrAddressRequest other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 1613970865u)) % 7u) { case 0u: arg_76_0 = ((other.Region != 0u) ? 736813057u : 1104544137u); continue; case 1u: this.Region = other.Region; arg_76_0 = (num * 2846843874u ^ 3015099625u); continue; case 2u: this.ClientAddress = other.ClientAddress; arg_76_0 = (num * 88933861u ^ 2391957712u); continue; case 4u: goto IL_AD; case 5u: return; case 6u: goto IL_15; } break; } return; IL_15: arg_76_0 = 2056009587u; goto IL_71; IL_AD: arg_76_0 = ((IsIgrAddressRequest.smethod_1(other.ClientAddress) != 0) ? 607036875u : 1337436146u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F1: uint num; uint arg_B1_0 = ((num = input.ReadTag()) != 0u) ? 4107077161u : 2828485679u; while (true) { uint num2; switch ((num2 = (arg_B1_0 ^ 3886977065u)) % 9u) { case 1u: this.ClientAddress = input.ReadString(); arg_B1_0 = 2749357191u; continue; case 2u: arg_B1_0 = (((num == 16u) ? 1726669423u : 795115297u) ^ num2 * 273259550u); continue; case 3u: this.Region = input.ReadUInt32(); arg_B1_0 = 2749357191u; continue; case 4u: input.SkipLastField(); arg_B1_0 = (num2 * 1292808870u ^ 1863896776u); continue; case 5u: goto IL_F1; case 6u: arg_B1_0 = (num2 * 1706036928u ^ 2082963527u); continue; case 7u: arg_B1_0 = ((num != 10u) ? 3095941431u : 4057931859u); continue; case 8u: arg_B1_0 = 4107077161u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.WorldServer.Game.Packets/PacketManager.cs using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Network.Packets; using System; using System.Collections; using System.Collections.Generic; using System.Reflection; namespace AuthServer.WorldServer.Game.Packets { public class PacketManager : Manager { private delegate void HandlePacket(ref PacketReader packet, WorldClass session); private delegate void HandlePacket2(ref PacketReader packet, WorldClass2 session); private static Dictionary<ClientMessage, PacketManager.HandlePacket> OpcodeHandlers = new Dictionary<ClientMessage, PacketManager.HandlePacket>(); private static Dictionary<ClientMessage, PacketManager.HandlePacket2> OpcodeHandlers2 = new Dictionary<ClientMessage, PacketManager.HandlePacket2>(); public static void DefineOpcodeHandler() { Type[] array = PacketManager.smethod_1(PacketManager.smethod_0()); while (true) { IL_1DB: uint arg_1B6_0 = 1781133873u; while (true) { uint num; int num2; uint arg_142_0; int num3; switch ((num = (arg_1B6_0 ^ 315123486u)) % 6u) { case 0u: goto IL_1DB; case 1u: num2 = 0; arg_1B6_0 = (num * 2433928120u ^ 2770631119u); continue; case 2u: goto IL_186; case 3u: IL_11E: if (num2 < array.Length) { goto IL_186; } arg_142_0 = 792245191u; break; case 4u: num3 = 0; goto IL_111; case 5u: goto IL_16A; default: goto IL_16A; } while (true) { IL_13D: switch ((num = (arg_142_0 ^ 315123486u)) % 5u) { case 1u: num2++; arg_142_0 = (num * 2650436441u ^ 3815917589u); continue; case 2u: goto IL_11E; case 3u: goto IL_111; case 4u: goto IL_163; } return; } IL_186: MethodInfo[] array2 = PacketManager.smethod_2(array[num2]); arg_1B6_0 = 2007019048u; continue; IL_111: if (num3 >= array2.Length) { arg_142_0 = 235062078u; goto IL_13D; } goto IL_16A; IL_163: arg_142_0 = 1841975739u; goto IL_13D; IL_16A: MethodInfo methodInfo = array2[num3]; IEnumerator<OpcodeAttribute> enumerator = methodInfo.GetCustomAttributes<OpcodeAttribute>().GetEnumerator(); try { while (true) { IL_BA: uint arg_8A_0 = PacketManager.smethod_5(enumerator) ? 2138237464u : 70193693u; while (true) { switch ((num = (arg_8A_0 ^ 315123486u)) % 5u) { case 0u: arg_8A_0 = 2138237464u; continue; case 1u: goto IL_BA; case 2u: { OpcodeAttribute current = enumerator.Current; arg_8A_0 = ((current == null) ? 314398218u : 1728240380u); continue; } case 4u: { OpcodeAttribute current; PacketManager.OpcodeHandlers[current.Opcode] = (PacketManager.HandlePacket)PacketManager.smethod_4(PacketManager.smethod_3(typeof(PacketManager.HandlePacket).TypeHandle), methodInfo); arg_8A_0 = (num * 3181307333u ^ 518397664u); continue; } } goto Block_7; } } Block_7:; } finally { if (enumerator != null) { while (true) { IL_103: uint arg_EA_0 = 921856005u; while (true) { switch ((num = (arg_EA_0 ^ 315123486u)) % 3u) { case 0u: goto IL_103; case 1u: PacketManager.smethod_6(enumerator); arg_EA_0 = (num * 374831327u ^ 897885318u); continue; } goto Block_11; } } Block_11:; } } num3++; goto IL_163; } } } public static void DefineOpcodeHandler2() { Type[] array = PacketManager.smethod_1(PacketManager.smethod_0()); int num = 0; while (true) { IL_1E0: int arg_1B8_0 = 720968842; while (true) { int num2; MethodInfo[] array2; MethodInfo methodInfo; uint arg_44_0; switch ((arg_1B8_0 ^ 187693299) % 6) { case 0: goto IL_83; case 1: num2 = 0; goto IL_34; case 2: goto IL_1E0; case 3: IL_70: methodInfo = array2[num2]; arg_1B8_0 = 2134993717; continue; case 4: goto IL_9A; case 5: IL_68: if (num < array.Length) { goto IL_83; } arg_44_0 = 1169583308u; break; default: goto IL_9A; } while (true) { IL_3F: uint num3; switch ((num3 = (arg_44_0 ^ 187693299u)) % 5u) { case 0u: goto IL_68; case 1u: goto IL_34; case 3u: num++; arg_44_0 = (num3 * 2911205606u ^ 2944092559u); continue; case 4u: goto IL_19; } return; } IL_34: if (num2 >= array2.Length) { arg_44_0 = 953874035u; goto IL_3F; } goto IL_70; IL_19: arg_44_0 = 193044341u; goto IL_3F; IL_83: array2 = PacketManager.smethod_2(array[num]); arg_1B8_0 = 296719328; continue; IL_9A: IEnumerator<Opcode2Attribute> enumerator = methodInfo.GetCustomAttributes<Opcode2Attribute>().GetEnumerator(); try { while (true) { IL_152: uint arg_122_0 = (!PacketManager.smethod_5(enumerator)) ? 862574067u : 741055446u; while (true) { uint num3; switch ((num3 = (arg_122_0 ^ 187693299u)) % 5u) { case 0u: arg_122_0 = 741055446u; continue; case 2u: { Opcode2Attribute current; PacketManager.OpcodeHandlers2[current.Opcode] = (PacketManager.HandlePacket2)PacketManager.smethod_4(PacketManager.smethod_3(typeof(PacketManager.HandlePacket2).TypeHandle), methodInfo); arg_122_0 = (num3 * 2220846814u ^ 4198299646u); continue; } case 3u: goto IL_152; case 4u: { Opcode2Attribute current = enumerator.Current; arg_122_0 = ((current != null) ? 1372132325u : 1481746154u); continue; } } goto Block_8; } } Block_8:; } finally { if (enumerator != null) { while (true) { IL_19B: uint arg_182_0 = 1737012298u; while (true) { uint num3; switch ((num3 = (arg_182_0 ^ 187693299u)) % 3u) { case 0u: goto IL_19B; case 2u: PacketManager.smethod_6(enumerator); arg_182_0 = (num3 * 2286764410u ^ 2847179084u); continue; } goto Block_12; } } Block_12:; } } num2++; goto IL_19; } } } public static void InvokeHandler(ref PacketReader reader, WorldClass session) { if (session.Character != null) { goto IL_FC; } goto IL_141; uint arg_106_0; while (true) { IL_101: uint num; switch ((num = (arg_106_0 ^ 1262397601u)) % 8u) { case 0u: return; case 1u: goto IL_141; case 2u: goto IL_FC; case 3u: Log.Message(LogType.Packet, Module.smethod_36<string>(2220261028u), new object[] { reader.Opcode, reader.Opcode, reader.Size }); arg_106_0 = (num * 2647540295u ^ 630824896u); continue; case 4u: PacketManager.OpcodeHandlers[reader.Opcode](ref reader, session); arg_106_0 = (num * 1262893278u ^ 2437559409u); continue; case 5u: { ulong guid = session.Character.Guid; arg_106_0 = (((!Manager.WorldMgr.Sessions.ContainsKey(guid)) ? 498647924u : 326667058u) ^ num * 2040140420u); continue; } case 7u: { ulong guid; Manager.WorldMgr.Sessions[guid] = session; arg_106_0 = (num * 3313987136u ^ 2713835520u); continue; } } break; } Log.Message(LogType.Packet, Module.smethod_33<string>(901997343u), new object[] { reader.Opcode, reader.Opcode, reader.Size }); return; IL_FC: arg_106_0 = 2147221676u; goto IL_101; IL_141: arg_106_0 = ((!PacketManager.OpcodeHandlers.ContainsKey(reader.Opcode)) ? 415428095u : 1277703962u); goto IL_101; } public static void InvokeHandler(ref PacketReader reader, WorldClass2 session) { if (session.Character != null) { goto IL_1D; } goto IL_10D; uint arg_D2_0; while (true) { IL_CD: uint num; switch ((num = (arg_D2_0 ^ 4276270309u)) % 8u) { case 0u: goto IL_10D; case 1u: goto IL_125; case 2u: arg_D2_0 = (((!Manager.WorldMgr.Sessions2.ContainsKey(0uL)) ? 2237578483u : 3357433262u) ^ num * 65758199u); continue; case 4u: PacketManager.OpcodeHandlers2[reader.Opcode](ref reader, session); arg_D2_0 = (num * 2035814786u ^ 254308324u); continue; case 5u: Manager.WorldMgr.Sessions2[0uL] = session; arg_D2_0 = (num * 424709425u ^ 2091957032u); continue; case 6u: { ulong arg_32_0 = session.Character.Guid; arg_D2_0 = (num * 3958291579u ^ 1546637405u); continue; } case 7u: goto IL_1D; } break; } goto IL_16A; IL_125: Log.Message(LogType.Packet, Module.smethod_35<string>(1352914638u), new object[] { reader.Opcode, reader.Opcode, reader.Size }); return; IL_16A: Log.Message(LogType.Packet, Module.smethod_36<string>(729730053u), new object[] { reader.Opcode, reader.Opcode, reader.Size }); return; IL_1D: arg_D2_0 = 4043372643u; goto IL_CD; IL_10D: arg_D2_0 = ((!PacketManager.OpcodeHandlers2.ContainsKey(reader.Opcode)) ? 2674153982u : 3059807657u); goto IL_CD; } static Assembly smethod_0() { return Assembly.GetExecutingAssembly(); } static Type[] smethod_1(Assembly assembly_0) { return assembly_0.GetTypes(); } static MethodInfo[] smethod_2(Type type_0) { return type_0.GetMethods(); } static Type smethod_3(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static Delegate smethod_4(Type type_0, MethodInfo methodInfo_0) { return Delegate.CreateDelegate(type_0, methodInfo_0); } static bool smethod_5(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_6(IDisposable idisposable_0) { idisposable_0.Dispose(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountState.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountState : IMessage<AccountState>, IEquatable<AccountState>, IDeepCloneable<AccountState>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountState.__c __9 = new AccountState.__c(); internal AccountState cctor>b__49_0() { return new AccountState(); } } private static readonly MessageParser<AccountState> _parser = new MessageParser<AccountState>(new Func<AccountState>(AccountState.__c.__9.<.cctor>b__49_0)); public const int AccountLevelInfoFieldNumber = 1; private AccountLevelInfo accountLevelInfo_; public const int PrivacyInfoFieldNumber = 2; private PrivacyInfo privacyInfo_; public const int ParentalControlInfoFieldNumber = 3; private ParentalControlInfo parentalControlInfo_; public const int GameLevelInfoFieldNumber = 5; private static readonly FieldCodec<GameLevelInfo> _repeated_gameLevelInfo_codec; private readonly RepeatedField<GameLevelInfo> gameLevelInfo_ = new RepeatedField<GameLevelInfo>(); public const int GameStatusFieldNumber = 6; private static readonly FieldCodec<GameStatus> _repeated_gameStatus_codec; private readonly RepeatedField<GameStatus> gameStatus_ = new RepeatedField<GameStatus>(); public const int GameAccountsFieldNumber = 7; private static readonly FieldCodec<GameAccountList> _repeated_gameAccounts_codec; private readonly RepeatedField<GameAccountList> gameAccounts_ = new RepeatedField<GameAccountList>(); public static MessageParser<AccountState> Parser { get { return AccountState._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[31]; } } MessageDescriptor IMessage.Descriptor { get { return AccountState.Descriptor; } } public AccountLevelInfo AccountLevelInfo { get { return this.accountLevelInfo_; } set { this.accountLevelInfo_ = value; } } public PrivacyInfo PrivacyInfo { get { return this.privacyInfo_; } set { this.privacyInfo_ = value; } } public ParentalControlInfo ParentalControlInfo { get { return this.parentalControlInfo_; } set { this.parentalControlInfo_ = value; } } public RepeatedField<GameLevelInfo> GameLevelInfo { get { return this.gameLevelInfo_; } } public RepeatedField<GameStatus> GameStatus { get { return this.gameStatus_; } } public RepeatedField<GameAccountList> GameAccounts { get { return this.gameAccounts_; } } public AccountState() { } public AccountState(AccountState other) : this() { while (true) { IL_E8: uint arg_C4_0 = 4095098660u; while (true) { uint num; switch ((num = (arg_C4_0 ^ 4159821463u)) % 6u) { case 1u: this.AccountLevelInfo = ((other.accountLevelInfo_ != null) ? other.AccountLevelInfo.Clone() : null); arg_C4_0 = 4169425263u; continue; case 2u: this.PrivacyInfo = ((other.privacyInfo_ != null) ? other.PrivacyInfo.Clone() : null); this.ParentalControlInfo = ((other.parentalControlInfo_ != null) ? other.ParentalControlInfo.Clone() : null); arg_C4_0 = 2690478482u; continue; case 3u: this.gameAccounts_ = other.gameAccounts_.Clone(); arg_C4_0 = (num * 3433705317u ^ 498004968u); continue; case 4u: goto IL_E8; case 5u: this.gameLevelInfo_ = other.gameLevelInfo_.Clone(); this.gameStatus_ = other.gameStatus_.Clone(); arg_C4_0 = (num * 435919684u ^ 2661650398u); continue; } return; } } } public AccountState Clone() { return new AccountState(this); } public override bool Equals(object other) { return this.Equals(other as AccountState); } public bool Equals(AccountState other) { if (other == null) { goto IL_12C; } goto IL_194; int arg_136_0; while (true) { IL_131: switch ((arg_136_0 ^ 2060701848) % 17) { case 0: goto IL_12C; case 1: arg_136_0 = (this.gameLevelInfo_.Equals(other.gameLevelInfo_) ? 489614141 : 1456679652); continue; case 2: arg_136_0 = (this.gameStatus_.Equals(other.gameStatus_) ? 48586301 : 1369175565); continue; case 3: goto IL_194; case 4: arg_136_0 = (AccountState.smethod_0(this.PrivacyInfo, other.PrivacyInfo) ? 496124364 : 293523278); continue; case 5: arg_136_0 = (this.gameAccounts_.Equals(other.gameAccounts_) ? 704366730 : 2104000184); continue; case 6: arg_136_0 = (AccountState.smethod_0(this.ParentalControlInfo, other.ParentalControlInfo) ? 628970351 : 1381704038); continue; case 7: return false; case 8: return false; case 9: return false; case 10: return false; case 11: return false; case 13: return false; case 14: return true; case 15: return false; case 16: arg_136_0 = ((!AccountState.smethod_0(this.AccountLevelInfo, other.AccountLevelInfo)) ? 363456967 : 1843060692); continue; } break; } return true; IL_12C: arg_136_0 = 772330075; goto IL_131; IL_194: arg_136_0 = ((other != this) ? 1686527314 : 889907864); goto IL_131; } public override int GetHashCode() { int num = 1; if (this.accountLevelInfo_ != null) { goto IL_1F; } goto IL_13D; uint arg_F9_0; while (true) { IL_F4: uint num2; switch ((num2 = (arg_F9_0 ^ 858300733u)) % 10u) { case 0u: num ^= AccountState.smethod_1(this.gameLevelInfo_); arg_F9_0 = 1343093066u; continue; case 1u: num ^= AccountState.smethod_1(this.AccountLevelInfo); arg_F9_0 = (num2 * 133391469u ^ 1491579659u); continue; case 2u: num ^= AccountState.smethod_1(this.gameAccounts_); arg_F9_0 = (num2 * 2543171533u ^ 1795449150u); continue; case 3u: num ^= AccountState.smethod_1(this.gameStatus_); arg_F9_0 = (num2 * 2537353669u ^ 1856999276u); continue; case 4u: arg_F9_0 = ((this.parentalControlInfo_ != null) ? 1588277138u : 571001273u); continue; case 6u: num ^= AccountState.smethod_1(this.PrivacyInfo); arg_F9_0 = (num2 * 928517509u ^ 2494542291u); continue; case 7u: num ^= AccountState.smethod_1(this.ParentalControlInfo); arg_F9_0 = (num2 * 3944224817u ^ 1929281222u); continue; case 8u: goto IL_1F; case 9u: goto IL_13D; } break; } return num; IL_1F: arg_F9_0 = 1772175260u; goto IL_F4; IL_13D: arg_F9_0 = ((this.privacyInfo_ == null) ? 381349801u : 1983461775u); goto IL_F4; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountLevelInfo_ != null) { goto IL_13E; } goto IL_198; uint arg_148_0; while (true) { IL_143: uint num; switch ((num = (arg_148_0 ^ 1019179035u)) % 13u) { case 0u: goto IL_13E; case 1u: output.WriteRawTag(10); arg_148_0 = (num * 3474309694u ^ 108147650u); continue; case 3u: this.gameStatus_.WriteTo(output, AccountState._repeated_gameStatus_codec); arg_148_0 = (num * 4182054683u ^ 3847171073u); continue; case 4u: output.WriteMessage(this.ParentalControlInfo); arg_148_0 = (num * 3644494079u ^ 818843887u); continue; case 5u: arg_148_0 = ((this.parentalControlInfo_ != null) ? 374672398u : 409284353u); continue; case 6u: goto IL_198; case 7u: output.WriteMessage(this.PrivacyInfo); arg_148_0 = (num * 1978443294u ^ 3712316602u); continue; case 8u: output.WriteMessage(this.AccountLevelInfo); arg_148_0 = (num * 1081399314u ^ 4221118931u); continue; case 9u: output.WriteRawTag(26); arg_148_0 = (num * 3562696388u ^ 3934323741u); continue; case 10u: output.WriteRawTag(18); arg_148_0 = (num * 468144005u ^ 3688701138u); continue; case 11u: this.gameLevelInfo_.WriteTo(output, AccountState._repeated_gameLevelInfo_codec); arg_148_0 = 603307683u; continue; case 12u: this.gameAccounts_.WriteTo(output, AccountState._repeated_gameAccounts_codec); arg_148_0 = (num * 2067362358u ^ 3602184260u); continue; } break; } return; IL_13E: arg_148_0 = 767897673u; goto IL_143; IL_198: arg_148_0 = ((this.privacyInfo_ == null) ? 1217343074u : 496861346u); goto IL_143; } public int CalculateSize() { int num = 0; while (true) { IL_178: uint arg_13F_0 = 3948166717u; while (true) { uint num2; switch ((num2 = (arg_13F_0 ^ 2851058918u)) % 11u) { case 0u: num += this.gameAccounts_.CalculateSize(AccountState._repeated_gameAccounts_codec); arg_13F_0 = (num2 * 4005963251u ^ 1043624097u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountLevelInfo); arg_13F_0 = (num2 * 1148545510u ^ 3011934177u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ParentalControlInfo); arg_13F_0 = (num2 * 3946096677u ^ 3080580877u); continue; case 4u: num += this.gameStatus_.CalculateSize(AccountState._repeated_gameStatus_codec); arg_13F_0 = (num2 * 3905641022u ^ 2491584407u); continue; case 5u: arg_13F_0 = ((this.parentalControlInfo_ != null) ? 2621622236u : 2364168303u); continue; case 6u: arg_13F_0 = (((this.accountLevelInfo_ != null) ? 4042825362u : 3972615586u) ^ num2 * 2746292831u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.PrivacyInfo); arg_13F_0 = (num2 * 2179950553u ^ 830731462u); continue; case 8u: num += this.gameLevelInfo_.CalculateSize(AccountState._repeated_gameLevelInfo_codec); arg_13F_0 = 3672012604u; continue; case 9u: goto IL_178; case 10u: arg_13F_0 = ((this.privacyInfo_ == null) ? 3440404892u : 3232836876u); continue; } return num; } } return num; } public void MergeFrom(AccountState other) { if (other == null) { goto IL_194; } goto IL_239; uint arg_1D9_0; while (true) { IL_1D4: uint num; switch ((num = (arg_1D9_0 ^ 1155377202u)) % 17u) { case 0u: this.privacyInfo_ = new PrivacyInfo(); arg_1D9_0 = (num * 923275810u ^ 3351838457u); continue; case 1u: arg_1D9_0 = ((other.privacyInfo_ == null) ? 613495036u : 961247606u); continue; case 2u: goto IL_194; case 3u: arg_1D9_0 = ((other.parentalControlInfo_ == null) ? 1158445590u : 855401552u); continue; case 4u: this.accountLevelInfo_ = new AccountLevelInfo(); arg_1D9_0 = (num * 2759583294u ^ 2410301205u); continue; case 6u: this.gameStatus_.Add(other.gameStatus_); this.gameAccounts_.Add(other.gameAccounts_); arg_1D9_0 = (num * 1894520436u ^ 2876902055u); continue; case 7u: goto IL_239; case 8u: arg_1D9_0 = (((this.privacyInfo_ != null) ? 1179354353u : 1082142622u) ^ num * 3430276012u); continue; case 9u: this.PrivacyInfo.MergeFrom(other.PrivacyInfo); arg_1D9_0 = 613495036u; continue; case 10u: arg_1D9_0 = (((this.accountLevelInfo_ != null) ? 3937761095u : 2876663576u) ^ num * 1648162826u); continue; case 11u: arg_1D9_0 = (((this.parentalControlInfo_ == null) ? 3091897255u : 2705505050u) ^ num * 3657814059u); continue; case 12u: return; case 13u: this.ParentalControlInfo.MergeFrom(other.ParentalControlInfo); arg_1D9_0 = 1158445590u; continue; case 14u: this.gameLevelInfo_.Add(other.gameLevelInfo_); arg_1D9_0 = 98381713u; continue; case 15u: this.parentalControlInfo_ = new ParentalControlInfo(); arg_1D9_0 = (num * 367187660u ^ 550323592u); continue; case 16u: this.AccountLevelInfo.MergeFrom(other.AccountLevelInfo); arg_1D9_0 = 1899855211u; continue; } break; } return; IL_194: arg_1D9_0 = 599605446u; goto IL_1D4; IL_239: arg_1D9_0 = ((other.accountLevelInfo_ == null) ? 1899855211u : 2102098927u); goto IL_1D4; } public void MergeFrom(CodedInputStream input) { while (true) { IL_343: uint num; uint arg_2BF_0 = ((num = input.ReadTag()) == 0u) ? 85920499u : 1118167655u; while (true) { uint num2; switch ((num2 = (arg_2BF_0 ^ 1619666317u)) % 26u) { case 0u: this.privacyInfo_ = new PrivacyInfo(); arg_2BF_0 = (num2 * 493338640u ^ 4187704633u); continue; case 1u: arg_2BF_0 = (((num == 18u) ? 352501504u : 1352202853u) ^ num2 * 2987258808u); continue; case 2u: goto IL_343; case 3u: this.accountLevelInfo_ = new AccountLevelInfo(); arg_2BF_0 = (num2 * 1573213724u ^ 1325384074u); continue; case 4u: arg_2BF_0 = (((num == 10u) ? 1691212778u : 1060895560u) ^ num2 * 1789704072u); continue; case 5u: arg_2BF_0 = ((this.accountLevelInfo_ != null) ? 1150686030u : 7821194u); continue; case 6u: arg_2BF_0 = (((num == 50u) ? 3904078924u : 2216681928u) ^ num2 * 2304428609u); continue; case 7u: this.parentalControlInfo_ = new ParentalControlInfo(); arg_2BF_0 = (num2 * 1819338085u ^ 3538897381u); continue; case 8u: arg_2BF_0 = 1118167655u; continue; case 9u: input.SkipLastField(); arg_2BF_0 = 1370929021u; continue; case 10u: arg_2BF_0 = (num2 * 3475401536u ^ 210612096u); continue; case 11u: arg_2BF_0 = ((this.privacyInfo_ != null) ? 229752825u : 1525381793u); continue; case 12u: arg_2BF_0 = ((num != 42u) ? 1190092665u : 2116225456u); continue; case 13u: arg_2BF_0 = ((this.parentalControlInfo_ == null) ? 2073960718u : 114409290u); continue; case 14u: this.gameAccounts_.AddEntriesFrom(input, AccountState._repeated_gameAccounts_codec); arg_2BF_0 = 1370929021u; continue; case 15u: arg_2BF_0 = (((num != 58u) ? 2053296849u : 1868243464u) ^ num2 * 2030782625u); continue; case 16u: arg_2BF_0 = ((num > 26u) ? 502229495u : 609128027u); continue; case 17u: arg_2BF_0 = (num2 * 3199965241u ^ 2108701834u); continue; case 19u: this.gameLevelInfo_.AddEntriesFrom(input, AccountState._repeated_gameLevelInfo_codec); arg_2BF_0 = 1370929021u; continue; case 20u: input.ReadMessage(this.privacyInfo_); arg_2BF_0 = 773406754u; continue; case 21u: input.ReadMessage(this.accountLevelInfo_); arg_2BF_0 = 1370929021u; continue; case 22u: arg_2BF_0 = (((num != 26u) ? 3908113249u : 3429724500u) ^ num2 * 3201137396u); continue; case 23u: input.ReadMessage(this.parentalControlInfo_); arg_2BF_0 = 1538787105u; continue; case 24u: arg_2BF_0 = (num2 * 1756578868u ^ 605949325u); continue; case 25u: this.gameStatus_.AddEntriesFrom(input, AccountState._repeated_gameStatus_codec); arg_2BF_0 = 1370929021u; continue; } return; } } } static AccountState() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_8C: uint arg_70_0 = 2762582830u; while (true) { uint num; switch ((num = (arg_70_0 ^ 3434660607u)) % 4u) { case 0u: goto IL_8C; case 1u: AccountState._repeated_gameLevelInfo_codec = FieldCodec.ForMessage<GameLevelInfo>(42u, Bgs.Protocol.Account.V1.GameLevelInfo.Parser); AccountState._repeated_gameStatus_codec = FieldCodec.ForMessage<GameStatus>(50u, Bgs.Protocol.Account.V1.GameStatus.Parser); arg_70_0 = (num * 2588780232u ^ 3050507101u); continue; case 2u: AccountState._repeated_gameAccounts_codec = FieldCodec.ForMessage<GameAccountList>(58u, GameAccountList.Parser); arg_70_0 = (num * 1726540113u ^ 1814928050u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/GuidType.cs using System; public enum GuidType : byte { Null, Uniq, Player, Item, WorldTransaction, StaticDoor, Transport, Conversation, Creature, Vehicle, Pet, GameObject, DynamicObject = 11, AreaTrigger, Corpse, LootObject, SceneObject, Scenario, AIGroup, DynamicDoor, ClientActor, Vignette, CallForHelp, AIResource, AILock, AILockTicket, ChatChannel, Party, Guild, WowAccount, BNetAccount, GMTask, MobileSession, RaidGroup, Spell, Mail, WebObj, LFGObject, LFGList, UserRouter, PVPQueueGroup, UserClient, PetBattle, UniqueUserClient, BattlePet, CommerceObj, ClientSession, Cast } <file_sep>/Framework.Constants.Net/ServerMessage.cs using System; namespace Framework.Constants.Net { public enum ServerMessage : ushort { EnableCrypt = 12361, UnkMove = 11742, ConnectTo = 12365, SuspendComms = 12362, ResumeComms, ObjectUpdate = 10256, TutorialFlags = 10241, StartCinematic = 3625, LevelUpInfo = 10017, AuthChallenge = 12360, Pong = 36941, BattlenetStart = 3080, UnknownMount = 11320, MoveUpdate = 11694, MoveSetCanFly = 11731, MoveUnsetCanFly, MoveSetWalkSpeed = 11716, MoveSetRunSpeed = 11710, MoveSetSwimSpeed = 11712, MoveSetFlightSpeed = 11714, MoveTeleport = 11730, MonsterMove = 11682, SetCollision = 11743, GossipMessage = 3666, SendKnownSpells = 11306, QueryCreatureResponse = 9979, EnumCharactersResult = 9602, LogoutComplete = 9902, TransferPending = 9701, NewWorld = 9643, UnlearnedSpells = 11341, QueryGameObjectResponse = 9980, GenerateRandomCharacterNameResult = 9603, UITime = 10068, UpdateTalentData = 9707, LearnedSpells = 11339, PhaseChange = 9591, SpellStart = 11322, AuraUpdate = 11298, SpellGo = 11321, KnockBack = 11729, GrmlTest = 11767, MOTD = 11183, Chat = 11181, ResetCompressionContext = 12366, Compression = 12369, AccountDataTimes = 10058, AchievementData = 9584, EnableDJump = 11722, AchievementEarned = 9820, AchievementData3 = 9583, LoginSetTimeSpeed = 10061, SetTimeZoneInformation = 9888, QueryNPCTextResponse = 65535, AddonInfo = 9581, CreateChar = 10047, DeleteChar, AuthResponse = 9580, RealmQueryResponse = 9958, UpdateActionButtons = 9717, DestroyObject = 7436, CacheVersion = 10046, QueryPlayerNameResponse = 9984, DBReply = 9634, TokenDist = 65535, TokenDistGlue = 10256, TokenTime = 10265, TokenBalance = 10316, Emote = 10254, FeatureSystemStatus = 9682, FeatureSystemStatusGlueScreen, DistributionList = 1909, ItemPushResult = 3141, TransferInitiate = 20311, GarrisonAddMissionResult = 10533, GarrisonArchitectShow = 2581, GarrisonUpgradeResult = 3595, GetGarrisonInfoResult = 2086, GarrisonOpenMissionNPC = 1662, OpenShipmentNPCFromGossip = 3446, GetShipmentInfoResponse = 2061, OpenShipmentNPCResult = 3093 } } <file_sep>/Google.Protobuf.Reflection/PackageDescriptor.cs using System; namespace Google.Protobuf.Reflection { internal sealed class PackageDescriptor : IDescriptor { private readonly string name; private readonly string fullName; private readonly FileDescriptor file; public string Name { get { return this.name; } } public string FullName { get { return this.fullName; } } public FileDescriptor File { get { return this.file; } } internal PackageDescriptor(string name, string fullName, FileDescriptor file) { while (true) { IL_5A: uint arg_3E_0 = 3937908074u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 4070265288u)) % 4u) { case 1u: this.name = name; arg_3E_0 = (num * 2943632721u ^ 491079365u); continue; case 2u: this.file = file; this.fullName = fullName; arg_3E_0 = (num * 2262279830u ^ 2710158405u); continue; case 3u: goto IL_5A; } return; } } } } } <file_sep>/Google.Protobuf.Reflection/MethodDescriptorProto.cs using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class MethodDescriptorProto : IMessage, IMessage<MethodDescriptorProto>, IEquatable<MethodDescriptorProto>, IDeepCloneable<MethodDescriptorProto> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MethodDescriptorProto.__c __9 = new MethodDescriptorProto.__c(); internal MethodDescriptorProto cctor>b__49_0() { return new MethodDescriptorProto(); } } private static readonly MessageParser<MethodDescriptorProto> _parser = new MessageParser<MethodDescriptorProto>(new Func<MethodDescriptorProto>(MethodDescriptorProto.__c.__9.<.cctor>b__49_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int InputTypeFieldNumber = 2; private string inputType_ = ""; public const int OutputTypeFieldNumber = 3; private string outputType_ = ""; public const int OptionsFieldNumber = 4; private MethodOptions options_; public const int ClientStreamingFieldNumber = 5; private bool clientStreaming_; public const int ServerStreamingFieldNumber = 6; private bool serverStreaming_; public static MessageParser<MethodDescriptorProto> Parser { get { return MethodDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return MethodDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string InputType { get { return this.inputType_; } set { this.inputType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string OutputType { get { return this.outputType_; } set { this.outputType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public MethodOptions Options { get { return this.options_; } set { this.options_ = value; } } public bool ClientStreaming { get { return this.clientStreaming_; } set { this.clientStreaming_ = value; } } public bool ServerStreaming { get { return this.serverStreaming_; } set { this.serverStreaming_ = value; } } public MethodDescriptorProto() { } public MethodDescriptorProto(MethodDescriptorProto other) : this() { while (true) { IL_98: uint arg_7C_0 = 2405109006u; while (true) { uint num; switch ((num = (arg_7C_0 ^ 2652514747u)) % 4u) { case 1u: this.name_ = other.name_; this.inputType_ = other.inputType_; this.outputType_ = other.outputType_; this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_7C_0 = 3773839196u; continue; case 2u: goto IL_98; case 3u: this.clientStreaming_ = other.clientStreaming_; this.serverStreaming_ = other.serverStreaming_; arg_7C_0 = (num * 3617631254u ^ 384818245u); continue; } return; } } } public MethodDescriptorProto Clone() { return new MethodDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as MethodDescriptorProto); } public bool Equals(MethodDescriptorProto other) { if (other == null) { goto IL_18; } goto IL_187; int arg_129_0; while (true) { IL_124: switch ((arg_129_0 ^ 1856387667) % 17) { case 0: goto IL_187; case 1: arg_129_0 = (MethodDescriptorProto.smethod_0(this.Name, other.Name) ? 588876622 : 1143197039); continue; case 3: arg_129_0 = (MethodDescriptorProto.smethod_0(this.OutputType, other.OutputType) ? 682031678 : 1527964475); continue; case 4: arg_129_0 = ((this.ServerStreaming != other.ServerStreaming) ? 1590855159 : 1295325756); continue; case 5: return false; case 6: arg_129_0 = ((!MethodDescriptorProto.smethod_0(this.InputType, other.InputType)) ? 1358664354 : 823722263); continue; case 7: return false; case 8: return true; case 9: return false; case 10: arg_129_0 = (MethodDescriptorProto.smethod_1(this.Options, other.Options) ? 1108395920 : 48363898); continue; case 11: arg_129_0 = ((this.ClientStreaming == other.ClientStreaming) ? 1013513883 : 122824866); continue; case 12: return false; case 13: return false; case 14: return false; case 15: return false; case 16: goto IL_18; } break; } return true; IL_18: arg_129_0 = 1381821593; goto IL_124; IL_187: arg_129_0 = ((other == this) ? 2063157060 : 77360636); goto IL_124; } public override int GetHashCode() { int num = 1; if (MethodDescriptorProto.smethod_2(this.Name) != 0) { goto IL_8B; } goto IL_1CD; uint arg_17D_0; while (true) { IL_178: uint num2; switch ((num2 = (arg_17D_0 ^ 1400779731u)) % 13u) { case 0u: num ^= MethodDescriptorProto.smethod_3(this.InputType); arg_17D_0 = (num2 * 2980424820u ^ 3434606287u); continue; case 1u: arg_17D_0 = ((MethodDescriptorProto.smethod_2(this.OutputType) != 0) ? 449912605u : 2058606906u); continue; case 2u: num ^= this.ClientStreaming.GetHashCode(); arg_17D_0 = (num2 * 2115050868u ^ 3141444548u); continue; case 4u: num ^= MethodDescriptorProto.smethod_3(this.OutputType); arg_17D_0 = (num2 * 443114385u ^ 3183072148u); continue; case 5u: arg_17D_0 = ((this.options_ != null) ? 431416480u : 1942010819u); continue; case 6u: arg_17D_0 = ((!this.ServerStreaming) ? 37677417u : 1104892995u); continue; case 7u: num ^= MethodDescriptorProto.smethod_3(this.Options); arg_17D_0 = (num2 * 2789599042u ^ 1441786725u); continue; case 8u: goto IL_8B; case 9u: arg_17D_0 = ((!this.ClientStreaming) ? 1735363604u : 1922806615u); continue; case 10u: num ^= MethodDescriptorProto.smethod_3(this.Name); arg_17D_0 = (num2 * 186518702u ^ 1899873518u); continue; case 11u: num ^= this.ServerStreaming.GetHashCode(); arg_17D_0 = (num2 * 3488732708u ^ 3495565609u); continue; case 12u: goto IL_1CD; } break; } return num; IL_8B: arg_17D_0 = 784007402u; goto IL_178; IL_1CD: arg_17D_0 = ((MethodDescriptorProto.smethod_2(this.InputType) != 0) ? 1389342487u : 1687508511u); goto IL_178; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (MethodDescriptorProto.smethod_2(this.Name) != 0) { goto IL_108; } goto IL_22E; uint arg_1D2_0; while (true) { IL_1CD: uint num; switch ((num = (arg_1D2_0 ^ 1400091364u)) % 16u) { case 0u: arg_1D2_0 = ((!this.ServerStreaming) ? 1419176703u : 896251276u); continue; case 1u: output.WriteRawTag(18); arg_1D2_0 = (num * 3684955755u ^ 276784805u); continue; case 2u: arg_1D2_0 = ((this.options_ != null) ? 1062504061u : 456273560u); continue; case 3u: output.WriteBool(this.ServerStreaming); arg_1D2_0 = (num * 3862439567u ^ 4088377826u); continue; case 4u: output.WriteRawTag(10); output.WriteString(this.Name); arg_1D2_0 = (num * 1523445639u ^ 3760260998u); continue; case 5u: output.WriteRawTag(26); output.WriteString(this.OutputType); arg_1D2_0 = (num * 1005331873u ^ 2213208019u); continue; case 6u: goto IL_108; case 7u: output.WriteRawTag(40); arg_1D2_0 = (num * 1933754087u ^ 3274314904u); continue; case 8u: output.WriteRawTag(48); arg_1D2_0 = (num * 3405675876u ^ 1907869655u); continue; case 9u: output.WriteRawTag(34); output.WriteMessage(this.Options); arg_1D2_0 = (num * 3909346343u ^ 1487825367u); continue; case 10u: output.WriteString(this.InputType); arg_1D2_0 = (num * 298920303u ^ 2077003037u); continue; case 12u: arg_1D2_0 = ((!this.ClientStreaming) ? 1978082244u : 829652019u); continue; case 13u: output.WriteBool(this.ClientStreaming); arg_1D2_0 = (num * 2578016986u ^ 596832182u); continue; case 14u: goto IL_22E; case 15u: arg_1D2_0 = ((MethodDescriptorProto.smethod_2(this.OutputType) == 0) ? 137949094u : 534495409u); continue; } break; } return; IL_108: arg_1D2_0 = 1125238752u; goto IL_1CD; IL_22E: arg_1D2_0 = ((MethodDescriptorProto.smethod_2(this.InputType) != 0) ? 1634715285u : 1473762555u); goto IL_1CD; } public int CalculateSize() { int num = 0; while (true) { IL_1E3: uint arg_19E_0 = 1472167968u; while (true) { uint num2; switch ((num2 = (arg_19E_0 ^ 1126774170u)) % 14u) { case 0u: arg_19E_0 = (this.ServerStreaming ? 1923166495u : 640313440u); continue; case 1u: num += 2; arg_19E_0 = (num2 * 1911489878u ^ 517567950u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_19E_0 = (num2 * 2229215965u ^ 2924603801u); continue; case 3u: arg_19E_0 = (this.ClientStreaming ? 2125258454u : 13823414u); continue; case 4u: goto IL_1E3; case 5u: arg_19E_0 = ((this.options_ != null) ? 1888906259u : 1888779497u); continue; case 6u: num += 2; arg_19E_0 = (num2 * 3588294109u ^ 3302125866u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.OutputType); arg_19E_0 = (num2 * 3859621990u ^ 3477334815u); continue; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_19E_0 = (num2 * 465978042u ^ 3515229027u); continue; case 10u: arg_19E_0 = ((MethodDescriptorProto.smethod_2(this.OutputType) == 0) ? 2019469257u : 1118443891u); continue; case 11u: num += 1 + CodedOutputStream.ComputeStringSize(this.InputType); arg_19E_0 = (num2 * 2978703866u ^ 2436368176u); continue; case 12u: arg_19E_0 = (((MethodDescriptorProto.smethod_2(this.Name) == 0) ? 935525887u : 1808235100u) ^ num2 * 2523572771u); continue; case 13u: arg_19E_0 = ((MethodDescriptorProto.smethod_2(this.InputType) == 0) ? 81721818u : 178703427u); continue; } return num; } } return num; } public void MergeFrom(MethodDescriptorProto other) { if (other == null) { goto IL_130; } goto IL_231; uint arg_1D1_0; while (true) { IL_1CC: uint num; switch ((num = (arg_1D1_0 ^ 1246299698u)) % 17u) { case 0u: this.InputType = other.InputType; arg_1D1_0 = (num * 42889674u ^ 1120208700u); continue; case 1u: this.Options.MergeFrom(other.Options); arg_1D1_0 = 1707383733u; continue; case 2u: arg_1D1_0 = ((MethodDescriptorProto.smethod_2(other.OutputType) == 0) ? 783350378u : 1277288044u); continue; case 3u: this.options_ = new MethodOptions(); arg_1D1_0 = (num * 57500992u ^ 240924492u); continue; case 4u: arg_1D1_0 = (other.ClientStreaming ? 216928543u : 1687863831u); continue; case 5u: goto IL_130; case 6u: this.ServerStreaming = other.ServerStreaming; arg_1D1_0 = (num * 2442118348u ^ 907215516u); continue; case 7u: goto IL_231; case 8u: arg_1D1_0 = (((this.options_ != null) ? 2846688826u : 2216292137u) ^ num * 4116975065u); continue; case 9u: arg_1D1_0 = ((other.options_ != null) ? 496042260u : 1707383733u); continue; case 10u: return; case 12u: this.OutputType = other.OutputType; arg_1D1_0 = (num * 2713238071u ^ 33174104u); continue; case 13u: this.Name = other.Name; arg_1D1_0 = (num * 155083413u ^ 4217037799u); continue; case 14u: arg_1D1_0 = ((!other.ServerStreaming) ? 1506299108u : 305217496u); continue; case 15u: arg_1D1_0 = ((MethodDescriptorProto.smethod_2(other.InputType) == 0) ? 797611916u : 375840586u); continue; case 16u: this.ClientStreaming = other.ClientStreaming; arg_1D1_0 = (num * 607066731u ^ 1911456728u); continue; } break; } return; IL_130: arg_1D1_0 = 718626964u; goto IL_1CC; IL_231: arg_1D1_0 = ((MethodDescriptorProto.smethod_2(other.Name) == 0) ? 1942688741u : 983820104u); goto IL_1CC; } public void MergeFrom(CodedInputStream input) { while (true) { IL_29C: uint num; uint arg_228_0 = ((num = input.ReadTag()) != 0u) ? 2766033911u : 2392756996u; while (true) { uint num2; switch ((num2 = (arg_228_0 ^ 3416232073u)) % 22u) { case 0u: arg_228_0 = 2766033911u; continue; case 1u: arg_228_0 = (((num == 40u) ? 112364945u : 214908489u) ^ num2 * 2322183902u); continue; case 2u: this.Name = input.ReadString(); arg_228_0 = 2493853118u; continue; case 3u: this.options_ = new MethodOptions(); arg_228_0 = (num2 * 2666197392u ^ 1227688579u); continue; case 4u: input.SkipLastField(); arg_228_0 = 2570009770u; continue; case 5u: this.OutputType = input.ReadString(); arg_228_0 = 3918139171u; continue; case 6u: this.ClientStreaming = input.ReadBool(); arg_228_0 = 3918139171u; continue; case 7u: arg_228_0 = ((num != 34u) ? 4261503472u : 3650679066u); continue; case 8u: arg_228_0 = (((num != 48u) ? 628936211u : 1152494331u) ^ num2 * 821030988u); continue; case 10u: input.ReadMessage(this.options_); arg_228_0 = 3918139171u; continue; case 11u: arg_228_0 = (((num != 10u) ? 2240741410u : 4170148655u) ^ num2 * 4203449008u); continue; case 12u: this.ServerStreaming = input.ReadBool(); arg_228_0 = 3918139171u; continue; case 13u: arg_228_0 = (num2 * 2618060391u ^ 420072450u); continue; case 14u: arg_228_0 = ((num <= 26u) ? 3473358024u : 2470560010u); continue; case 15u: arg_228_0 = (num2 * 4256915429u ^ 905049964u); continue; case 16u: goto IL_29C; case 17u: arg_228_0 = (num2 * 744213813u ^ 1946117616u); continue; case 18u: arg_228_0 = (((num != 26u) ? 1183463220u : 1899143432u) ^ num2 * 810057445u); continue; case 19u: arg_228_0 = ((this.options_ == null) ? 2945224276u : 2952553427u); continue; case 20u: this.InputType = input.ReadString(); arg_228_0 = 3918139171u; continue; case 21u: arg_228_0 = (((num != 18u) ? 1984269892u : 360848630u) ^ num2 * 3509702517u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/Item.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.WorldServer.Game.Entities { [DataContract] [Serializable] public class Item { [DataMember] public ulong Guid { get; set; } [DataMember] public int Id { get; set; } [DataMember] public Dictionary<string, Tuple<int, int>> DisplayInfoIds { get; set; } [DataMember] public int DisplayInfoId { get; set; } [DataMember] public byte InventoryType { get; set; } [DataMember] public int ModId { get; set; } public Item() { this.<DisplayInfoIds>k__BackingField = new Dictionary<string, Tuple<int, int>>(); base..ctor(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/VersionInfoNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class VersionInfoNotification : IMessage<VersionInfoNotification>, IEquatable<VersionInfoNotification>, IDeepCloneable<VersionInfoNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly VersionInfoNotification.__c __9 = new VersionInfoNotification.__c(); internal VersionInfoNotification cctor>b__24_0() { return new VersionInfoNotification(); } } private static readonly MessageParser<VersionInfoNotification> _parser = new MessageParser<VersionInfoNotification>(new Func<VersionInfoNotification>(VersionInfoNotification.__c.__9.<.cctor>b__24_0)); public const int VersionInfoFieldNumber = 1; private VersionInfo versionInfo_; public static MessageParser<VersionInfoNotification> Parser { get { return VersionInfoNotification._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return VersionInfoNotification.Descriptor; } } public VersionInfo VersionInfo { get { return this.versionInfo_; } set { this.versionInfo_ = value; } } public VersionInfoNotification() { } public VersionInfoNotification(VersionInfoNotification other) : this() { this.VersionInfo = ((other.versionInfo_ != null) ? other.VersionInfo.Clone() : null); } public VersionInfoNotification Clone() { return new VersionInfoNotification(this); } public override bool Equals(object other) { return this.Equals(other as VersionInfoNotification); } public bool Equals(VersionInfoNotification other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1167469064) % 7) { case 0: return false; case 1: return false; case 2: goto IL_3E; case 3: return true; case 5: arg_48_0 = ((!VersionInfoNotification.smethod_0(this.VersionInfo, other.VersionInfo)) ? 862210667 : 1845831180); continue; case 6: goto IL_7A; } break; } return true; IL_3E: arg_48_0 = 1230994752; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 1494400148 : 1613179843); goto IL_43; } public override int GetHashCode() { int num = 1; if (this.versionInfo_ != null) { while (true) { IL_44: uint arg_2C_0 = 2426948142u; while (true) { uint num2; switch ((num2 = (arg_2C_0 ^ 3076081472u)) % 3u) { case 0u: goto IL_44; case 1u: num ^= VersionInfoNotification.smethod_1(this.VersionInfo); arg_2C_0 = (num2 * 3158987785u ^ 2581517291u); continue; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.versionInfo_ != null) { while (true) { IL_48: uint arg_30_0 = 847013015u; while (true) { uint num; switch ((num = (arg_30_0 ^ 174985753u)) % 3u) { case 1u: output.WriteRawTag(10); output.WriteMessage(this.VersionInfo); arg_30_0 = (num * 1080055673u ^ 2803612956u); continue; case 2u: goto IL_48; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.versionInfo_ != null) { while (true) { IL_46: uint arg_2E_0 = 495642289u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 523487673u)) % 3u) { case 0u: goto IL_46; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.VersionInfo); arg_2E_0 = (num2 * 3922857005u ^ 738927983u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(VersionInfoNotification other) { if (other == null) { goto IL_2D; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 78880585u)) % 7u) { case 0u: this.versionInfo_ = new VersionInfo(); arg_7A_0 = (num * 857377u ^ 2710529709u); continue; case 1u: goto IL_B1; case 2u: return; case 4u: arg_7A_0 = (((this.versionInfo_ != null) ? 3405876083u : 2530409623u) ^ num * 4098217210u); continue; case 5u: goto IL_2D; case 6u: this.VersionInfo.MergeFrom(other.VersionInfo); arg_7A_0 = 1106239674u; continue; } break; } return; IL_2D: arg_7A_0 = 108275686u; goto IL_75; IL_B1: arg_7A_0 = ((other.versionInfo_ != null) ? 694335642u : 1106239674u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F0: uint num; uint arg_B0_0 = ((num = input.ReadTag()) != 0u) ? 554392149u : 1389365956u; while (true) { uint num2; switch ((num2 = (arg_B0_0 ^ 1440684131u)) % 9u) { case 1u: arg_B0_0 = ((num != 10u) ? 1362983959u : 2136585592u); continue; case 2u: arg_B0_0 = (num2 * 2224310108u ^ 235328371u); continue; case 3u: input.ReadMessage(this.versionInfo_); arg_B0_0 = 468882695u; continue; case 4u: goto IL_F0; case 5u: input.SkipLastField(); arg_B0_0 = (num2 * 1747288976u ^ 1600976008u); continue; case 6u: arg_B0_0 = 554392149u; continue; case 7u: arg_B0_0 = ((this.versionInfo_ != null) ? 2083508682u : 1184143780u); continue; case 8u: this.versionInfo_ = new VersionInfo(); arg_B0_0 = (num2 * 1905675317u ^ 921510905u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/EnumOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class EnumOptions : IMessage, IMessage<EnumOptions>, IEquatable<EnumOptions>, IDeepCloneable<EnumOptions> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumOptions.__c __9 = new EnumOptions.__c(); internal EnumOptions cctor>b__34_0() { return new EnumOptions(); } } private static readonly MessageParser<EnumOptions> _parser = new MessageParser<EnumOptions>(new Func<EnumOptions>(EnumOptions.__c.__9.<.cctor>b__34_0)); public const int AllowAliasFieldNumber = 2; private bool allowAlias_; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<EnumOptions> Parser { get { return EnumOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return EnumOptions.Descriptor; } } public bool AllowAlias { get { return this.allowAlias_; } set { this.allowAlias_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public EnumOptions() { } public EnumOptions(EnumOptions other) : this() { this.allowAlias_ = other.allowAlias_; this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public EnumOptions Clone() { return new EnumOptions(this); } public override bool Equals(object other) { return this.Equals(other as EnumOptions); } public bool Equals(EnumOptions other) { if (other == null) { goto IL_15; } goto IL_DF; int arg_99_0; while (true) { IL_94: switch ((arg_99_0 ^ 1414317744) % 11) { case 1: return false; case 2: arg_99_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? 1612475757 : 578211947); continue; case 3: arg_99_0 = ((this.AllowAlias == other.AllowAlias) ? 2003681736 : 2051634553); continue; case 4: return true; case 5: return false; case 6: goto IL_DF; case 7: return false; case 8: arg_99_0 = ((this.Deprecated != other.Deprecated) ? 2014709146 : 397984013); continue; case 9: return false; case 10: goto IL_15; } break; } return true; IL_15: arg_99_0 = 1949715283; goto IL_94; IL_DF: arg_99_0 = ((other == this) ? 1847355445 : 416865994); goto IL_94; } public override int GetHashCode() { int num = 1; while (true) { IL_B8: uint arg_94_0 = 2628788503u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 2664330038u)) % 6u) { case 0u: goto IL_B8; case 1u: num ^= this.Deprecated.GetHashCode(); arg_94_0 = (num2 * 3088612844u ^ 2060228928u); continue; case 3u: arg_94_0 = (((!this.AllowAlias) ? 1670496378u : 2023273699u) ^ num2 * 3873264503u); continue; case 4u: num ^= this.AllowAlias.GetHashCode(); arg_94_0 = (num2 * 1896466925u ^ 2521204087u); continue; case 5u: arg_94_0 = (this.Deprecated ? 3375161341u : 3029529444u); continue; } goto Block_3; } } Block_3: return num ^ this.uninterpretedOption_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.AllowAlias) { goto IL_1D; } goto IL_DE; uint arg_A3_0; while (true) { IL_9E: uint num; switch ((num = (arg_A3_0 ^ 3680659154u)) % 8u) { case 0u: this.uninterpretedOption_.WriteTo(output, EnumOptions._repeated_uninterpretedOption_codec); arg_A3_0 = 3052864879u; continue; case 1u: output.WriteRawTag(24); arg_A3_0 = (num * 1264655558u ^ 3238696398u); continue; case 2u: output.WriteBool(this.Deprecated); arg_A3_0 = (num * 670627874u ^ 4144168030u); continue; case 3u: output.WriteRawTag(16); arg_A3_0 = (num * 4058179504u ^ 213761734u); continue; case 4u: output.WriteBool(this.AllowAlias); arg_A3_0 = (num * 3611491046u ^ 3592061821u); continue; case 6u: goto IL_1D; case 7u: goto IL_DE; } break; } return; IL_1D: arg_A3_0 = 3852386825u; goto IL_9E; IL_DE: arg_A3_0 = (this.Deprecated ? 4258244883u : 3943454634u); goto IL_9E; } public int CalculateSize() { int num = 0; while (true) { IL_BC: uint arg_94_0 = 855554177u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 347450655u)) % 7u) { case 1u: num += 2; arg_94_0 = (num2 * 61151757u ^ 1661866742u); continue; case 2u: goto IL_BC; case 3u: arg_94_0 = ((this.AllowAlias ? 967036353u : 953032434u) ^ num2 * 3228514913u); continue; case 4u: num += this.uninterpretedOption_.CalculateSize(EnumOptions._repeated_uninterpretedOption_codec); arg_94_0 = 1925614806u; continue; case 5u: arg_94_0 = ((!this.Deprecated) ? 208280348u : 1477534733u); continue; case 6u: num += 2; arg_94_0 = (num2 * 3824206164u ^ 3836465708u); continue; } return num; } } return num; } public void MergeFrom(EnumOptions other) { if (other == null) { goto IL_48; } goto IL_C9; uint arg_8E_0; while (true) { IL_89: uint num; switch ((num = (arg_8E_0 ^ 3270574837u)) % 8u) { case 0u: this.Deprecated = other.Deprecated; arg_8E_0 = (num * 1856735907u ^ 4088491635u); continue; case 1u: arg_8E_0 = (other.Deprecated ? 3318043037u : 3255715147u); continue; case 2u: return; case 4u: goto IL_C9; case 5u: goto IL_48; case 6u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_8E_0 = 3242721382u; continue; case 7u: this.AllowAlias = other.AllowAlias; arg_8E_0 = (num * 1897175501u ^ 459337615u); continue; } break; } return; IL_48: arg_8E_0 = 2820239599u; goto IL_89; IL_C9: arg_8E_0 = ((!other.AllowAlias) ? 2640845500u : 2671364106u); goto IL_89; } public void MergeFrom(CodedInputStream input) { while (true) { IL_156: uint num; uint arg_10A_0 = ((num = input.ReadTag()) == 0u) ? 289303029u : 1338614645u; while (true) { uint num2; switch ((num2 = (arg_10A_0 ^ 798772916u)) % 12u) { case 0u: arg_10A_0 = 1338614645u; continue; case 2u: arg_10A_0 = (((num != 24u) ? 2232048119u : 2393422935u) ^ num2 * 2223201864u); continue; case 3u: this.Deprecated = input.ReadBool(); arg_10A_0 = 440804778u; continue; case 4u: this.uninterpretedOption_.AddEntriesFrom(input, EnumOptions._repeated_uninterpretedOption_codec); arg_10A_0 = 1215983801u; continue; case 5u: arg_10A_0 = ((num == 16u) ? 1340613640u : 1844476166u); continue; case 6u: arg_10A_0 = (num2 * 667841547u ^ 1164591859u); continue; case 7u: arg_10A_0 = (((num != 7994u) ? 1832245718u : 634264041u) ^ num2 * 534899699u); continue; case 8u: this.AllowAlias = input.ReadBool(); arg_10A_0 = 956916622u; continue; case 9u: goto IL_156; case 10u: arg_10A_0 = (num2 * 3154993538u ^ 2846851533u); continue; case 11u: input.SkipLastField(); arg_10A_0 = (num2 * 1085168814u ^ 554802819u); continue; } return; } } } } } <file_sep>/Framework.ObjectDefines/SmartGuid.cs using System; namespace Framework.ObjectDefines { [Serializable] public class SmartGuid { public ulong Guid { get; set; } public ulong HighGuid { get; set; } public ushort RealmId { get { return (ushort)(this.HighGuid >> 42 & 8191uL); } set { this.HighGuid |= (ulong)value << 42; } } public ulong CreationBits { get { return this.Guid & 18446744073709551615uL; } set { this.Guid |= value; } } public GuidType Type { get { return (GuidType)(this.HighGuid >> 58); } set { this.HighGuid |= (ulong)value << 58; } } public SmartGuid() { } public SmartGuid(ulong guid, int id, GuidType highType, ulong mapId = 0uL) { if (highType == GuidType.Creature) { this.Guid |= guid; this.HighGuid |= 4398046511104uL; this.HighGuid |= mapId << 29; } else { this.Guid = guid; } this.HighGuid = ((ulong)highType << 58 | (ulong)((ulong)((long)id) << 6)); } public static GuidType GetGuidType(ulong guid) { return (GuidType)(guid >> 58); } public static int GetId(ulong guid) { return (int)(guid >> 6 & 4294967295uL); } } } <file_sep>/Bgs.Protocol.Friends.V1/InvitationNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class InvitationNotification : IMessage<InvitationNotification>, IEquatable<InvitationNotification>, IDeepCloneable<InvitationNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly InvitationNotification.__c __9 = new InvitationNotification.__c(); internal InvitationNotification cctor>b__44_0() { return new InvitationNotification(); } } private static readonly MessageParser<InvitationNotification> _parser = new MessageParser<InvitationNotification>(new Func<InvitationNotification>(InvitationNotification.__c.__9.<.cctor>b__44_0)); public const int InvitationFieldNumber = 1; private Invitation invitation_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int ReasonFieldNumber = 3; private uint reason_; public const int PeerFieldNumber = 4; private ProcessId peer_; public const int AccountIdFieldNumber = 5; private EntityId accountId_; public static MessageParser<InvitationNotification> Parser { get { return InvitationNotification._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return InvitationNotification.Descriptor; } } public Invitation Invitation { get { return this.invitation_; } set { this.invitation_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public ProcessId Peer { get { return this.peer_; } set { this.peer_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public InvitationNotification() { } public InvitationNotification(InvitationNotification other) : this() { while (true) { IL_BD: int arg_9F_0 = -2022783255; while (true) { switch ((arg_9F_0 ^ -1008826508) % 5) { case 0: goto IL_BD; case 1: this.Invitation = ((other.invitation_ != null) ? other.Invitation.Clone() : null); arg_9F_0 = -954655531; continue; case 3: this.Peer = ((other.peer_ != null) ? other.Peer.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); arg_9F_0 = -196738719; continue; case 4: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.reason_ = other.reason_; arg_9F_0 = -1177393705; continue; } return; } } } public InvitationNotification Clone() { return new InvitationNotification(this); } public override bool Equals(object other) { return this.Equals(other as InvitationNotification); } public bool Equals(InvitationNotification other) { if (other == null) { goto IL_47; } goto IL_155; int arg_FF_0; while (true) { IL_FA: switch ((arg_FF_0 ^ 2138789292) % 15) { case 0: return false; case 1: return false; case 2: arg_FF_0 = (InvitationNotification.smethod_0(this.AccountId, other.AccountId) ? 669262489 : 319369256); continue; case 3: return false; case 4: return true; case 5: return false; case 6: return false; case 7: arg_FF_0 = ((this.Reason == other.Reason) ? 1472161515 : 1902891812); continue; case 8: return false; case 9: arg_FF_0 = (InvitationNotification.smethod_0(this.GameAccountId, other.GameAccountId) ? 1001282734 : 1301010114); continue; case 10: arg_FF_0 = ((!InvitationNotification.smethod_0(this.Invitation, other.Invitation)) ? 371369642 : 911220909); continue; case 11: goto IL_47; case 12: goto IL_155; case 13: arg_FF_0 = (InvitationNotification.smethod_0(this.Peer, other.Peer) ? 2087937386 : 402830111); continue; } break; } return true; IL_47: arg_FF_0 = 560583704; goto IL_FA; IL_155: arg_FF_0 = ((other == this) ? 798626530 : 1611631638); goto IL_FA; } public override int GetHashCode() { int num = 1; while (true) { IL_15C: uint arg_127_0 = 3494544792u; while (true) { uint num2; switch ((num2 = (arg_127_0 ^ 2923051544u)) % 10u) { case 0u: num ^= this.Reason.GetHashCode(); arg_127_0 = (num2 * 985085103u ^ 3249862959u); continue; case 1u: num ^= InvitationNotification.smethod_1(this.GameAccountId); arg_127_0 = (num2 * 2103293858u ^ 2670807273u); continue; case 2u: num ^= InvitationNotification.smethod_1(this.Invitation); arg_127_0 = (((this.gameAccountId_ == null) ? 569066915u : 548516237u) ^ num2 * 1166781972u); continue; case 3u: goto IL_15C; case 5u: num ^= this.AccountId.GetHashCode(); arg_127_0 = (num2 * 4038985833u ^ 2670794431u); continue; case 6u: num ^= this.Peer.GetHashCode(); arg_127_0 = (num2 * 2168461839u ^ 1957097046u); continue; case 7u: arg_127_0 = ((this.peer_ != null) ? 2252729160u : 2316930534u); continue; case 8u: arg_127_0 = ((this.accountId_ != null) ? 4020072725u : 2494375658u); continue; case 9u: arg_127_0 = ((this.Reason == 0u) ? 2706342715u : 2153868852u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_19E: uint arg_161_0 = 1321467718u; while (true) { uint num; switch ((num = (arg_161_0 ^ 1675359281u)) % 12u) { case 0u: goto IL_19E; case 2u: output.WriteRawTag(34); arg_161_0 = (num * 1439255143u ^ 3996432378u); continue; case 3u: output.WriteRawTag(18); output.WriteMessage(this.GameAccountId); arg_161_0 = (num * 714336052u ^ 733678295u); continue; case 4u: output.WriteMessage(this.AccountId); arg_161_0 = (num * 1263873261u ^ 1690114792u); continue; case 5u: output.WriteMessage(this.Peer); arg_161_0 = (num * 4075807369u ^ 2465694557u); continue; case 6u: arg_161_0 = ((this.Reason == 0u) ? 1294874319u : 892821394u); continue; case 7u: output.WriteMessage(this.Invitation); arg_161_0 = (((this.gameAccountId_ != null) ? 2965011375u : 3000674182u) ^ num * 1638823963u); continue; case 8u: output.WriteRawTag(42); arg_161_0 = (num * 876240156u ^ 2108752345u); continue; case 9u: arg_161_0 = ((this.accountId_ == null) ? 2095501536u : 1045258081u); continue; case 10u: arg_161_0 = ((this.peer_ == null) ? 881164740u : 283735207u); continue; case 11u: output.WriteRawTag(24); output.WriteUInt32(this.Reason); arg_161_0 = (num * 579481820u ^ 1918772955u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_179: uint arg_140_0 = 3154992189u; while (true) { uint num2; switch ((num2 = (arg_140_0 ^ 4080235380u)) % 11u) { case 0u: arg_140_0 = ((this.Reason == 0u) ? 2905523037u : 4242491719u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Invitation); arg_140_0 = (num2 * 4115079402u ^ 3210076364u); continue; case 2u: arg_140_0 = ((this.peer_ != null) ? 2421763726u : 2809565559u); continue; case 3u: arg_140_0 = (((this.gameAccountId_ != null) ? 1398622781u : 984565836u) ^ num2 * 458163355u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_140_0 = (num2 * 1047311089u ^ 2289075038u); continue; case 6u: arg_140_0 = ((this.accountId_ == null) ? 2527575516u : 2223002872u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_140_0 = (num2 * 451949552u ^ 2659298922u); continue; case 8u: goto IL_179; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Peer); arg_140_0 = (num2 * 3287137147u ^ 1111774313u); continue; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_140_0 = (num2 * 3955190714u ^ 1233224292u); continue; } return num; } } return num; } public void MergeFrom(InvitationNotification other) { if (other == null) { goto IL_12B; } goto IL_2C7; uint arg_257_0; while (true) { IL_252: uint num; switch ((num = (arg_257_0 ^ 1696361140u)) % 21u) { case 0u: arg_257_0 = ((other.accountId_ != null) ? 1361144732u : 584462334u); continue; case 1u: arg_257_0 = (((this.accountId_ != null) ? 2378879741u : 4044540468u) ^ num * 2266102389u); continue; case 2u: this.AccountId.MergeFrom(other.AccountId); arg_257_0 = 584462334u; continue; case 3u: this.invitation_ = new Invitation(); arg_257_0 = (num * 3083430569u ^ 3626138167u); continue; case 4u: arg_257_0 = (((this.gameAccountId_ == null) ? 661652882u : 1120257346u) ^ num * 77518816u); continue; case 5u: arg_257_0 = ((other.peer_ != null) ? 340228627u : 1789908532u); continue; case 6u: goto IL_2C7; case 7u: this.Reason = other.Reason; arg_257_0 = (num * 1487654053u ^ 3243294394u); continue; case 8u: this.Invitation.MergeFrom(other.Invitation); arg_257_0 = 1290369090u; continue; case 9u: this.accountId_ = new EntityId(); arg_257_0 = (num * 3604548419u ^ 1552446701u); continue; case 10u: goto IL_12B; case 11u: arg_257_0 = (((this.invitation_ == null) ? 3343503236u : 3729438927u) ^ num * 655709429u); continue; case 12u: this.Peer.MergeFrom(other.Peer); arg_257_0 = 1789908532u; continue; case 13u: this.gameAccountId_ = new EntityId(); arg_257_0 = (num * 2889384813u ^ 3038332268u); continue; case 14u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_257_0 = 1506026240u; continue; case 15u: arg_257_0 = (((this.peer_ != null) ? 837547153u : 1719964256u) ^ num * 2627266138u); continue; case 16u: arg_257_0 = ((other.gameAccountId_ != null) ? 1761274406u : 1506026240u); continue; case 17u: this.peer_ = new ProcessId(); arg_257_0 = (num * 2065862305u ^ 2380735877u); continue; case 18u: return; case 19u: arg_257_0 = ((other.Reason == 0u) ? 1831023527u : 1692145581u); continue; } break; } return; IL_12B: arg_257_0 = 592151719u; goto IL_252; IL_2C7: arg_257_0 = ((other.invitation_ != null) ? 1355132981u : 1290369090u); goto IL_252; } public void MergeFrom(CodedInputStream input) { while (true) { IL_35F: uint num; uint arg_2D3_0 = ((num = input.ReadTag()) != 0u) ? 2442028089u : 3092248823u; while (true) { uint num2; switch ((num2 = (arg_2D3_0 ^ 2775562176u)) % 28u) { case 0u: input.ReadMessage(this.gameAccountId_); arg_2D3_0 = 3706483926u; continue; case 1u: input.ReadMessage(this.peer_); arg_2D3_0 = 2571184176u; continue; case 2u: arg_2D3_0 = (num2 * 2931787538u ^ 1716418604u); continue; case 3u: arg_2D3_0 = (((num == 10u) ? 2572187635u : 3617332450u) ^ num2 * 1732622618u); continue; case 4u: this.Reason = input.ReadUInt32(); arg_2D3_0 = 4005570976u; continue; case 5u: arg_2D3_0 = ((num != 24u) ? 3798624106u : 4144860056u); continue; case 6u: arg_2D3_0 = (num2 * 1640656770u ^ 1177032484u); continue; case 7u: arg_2D3_0 = ((this.gameAccountId_ == null) ? 3723090730u : 2240825188u); continue; case 8u: arg_2D3_0 = (((num != 18u) ? 4199111288u : 2191236659u) ^ num2 * 1634786543u); continue; case 9u: arg_2D3_0 = ((this.accountId_ == null) ? 4220320221u : 3635362530u); continue; case 10u: this.peer_ = new ProcessId(); arg_2D3_0 = (num2 * 1756695434u ^ 3603196721u); continue; case 11u: arg_2D3_0 = ((this.peer_ == null) ? 4244662330u : 2960396789u); continue; case 12u: goto IL_35F; case 13u: arg_2D3_0 = ((num > 18u) ? 3031156745u : 4017112487u); continue; case 14u: arg_2D3_0 = (num2 * 3522167074u ^ 3835193924u); continue; case 15u: this.invitation_ = new Invitation(); arg_2D3_0 = (num2 * 165037243u ^ 3215227446u); continue; case 16u: arg_2D3_0 = (num2 * 4236077472u ^ 973732149u); continue; case 17u: arg_2D3_0 = ((this.invitation_ != null) ? 3566325351u : 3731281827u); continue; case 18u: this.gameAccountId_ = new EntityId(); arg_2D3_0 = (num2 * 1463070194u ^ 3919925328u); continue; case 19u: input.ReadMessage(this.invitation_); arg_2D3_0 = 3229207570u; continue; case 20u: arg_2D3_0 = (num2 * 2392044101u ^ 1951781392u); continue; case 21u: this.accountId_ = new EntityId(); arg_2D3_0 = (num2 * 197224881u ^ 564190703u); continue; case 22u: input.ReadMessage(this.accountId_); arg_2D3_0 = 4005570976u; continue; case 24u: arg_2D3_0 = (((num != 42u) ? 1158460549u : 937552609u) ^ num2 * 1650451228u); continue; case 25u: input.SkipLastField(); arg_2D3_0 = 4256180226u; continue; case 26u: arg_2D3_0 = (((num == 34u) ? 712327123u : 472679456u) ^ num2 * 3546440306u); continue; case 27u: arg_2D3_0 = 2442028089u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/ActionButton.cs using System; using System.Runtime.Serialization; [DataContract] [Serializable] public class ActionButton { [DataMember] public ulong Action; [DataMember] public byte SlotId; [DataMember] public byte SpecGroup; } <file_sep>/Google.Protobuf.Reflection/IDescriptor.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public interface IDescriptor { string Name { get; } string FullName { get; } FileDescriptor File { get; } } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmListTicketInformation.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmListTicketInformation { [DataMember(Name = "platform")] public int Platform { get; set; } [DataMember(Name = "currentTime")] public int CurrentTime { get; set; } [DataMember(Name = "buildVariant")] public string BuildVariant { get; set; } [DataMember(Name = "timeZone")] public string Timezone { get; set; } [DataMember(Name = "versionDataBuild")] public int VersionDataBuild { get; set; } [DataMember(Name = "audioLocale")] public int AudioLocale { get; set; } [DataMember(Name = "version")] public ClientVersion ClientVersion { get; set; } [DataMember(Name = "secret")] public List<int> Secret { get; set; } [DataMember(Name = "type")] public int Type { get; set; } [DataMember(Name = "textLocale")] public int TextLocale { get; set; } } } <file_sep>/Bgs.Protocol.Connection.V1/EchoResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class EchoResponse : IMessage<EchoResponse>, IEquatable<EchoResponse>, IDeepCloneable<EchoResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EchoResponse.__c __9 = new EchoResponse.__c(); internal EchoResponse cctor>b__29_0() { return new EchoResponse(); } } private static readonly MessageParser<EchoResponse> _parser = new MessageParser<EchoResponse>(new Func<EchoResponse>(EchoResponse.__c.__9.<.cctor>b__29_0)); public const int TimeFieldNumber = 1; private ulong time_; public const int PayloadFieldNumber = 2; private ByteString payload_ = ByteString.Empty; public static MessageParser<EchoResponse> Parser { get { return EchoResponse._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return EchoResponse.Descriptor; } } public ulong Time { get { return this.time_; } set { this.time_ = value; } } public ByteString Payload { get { return this.payload_; } set { this.payload_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public EchoResponse() { } public EchoResponse(EchoResponse other) : this() { while (true) { IL_5D: uint arg_41_0 = 2129217044u; while (true) { uint num; switch ((num = (arg_41_0 ^ 1170019837u)) % 4u) { case 1u: this.time_ = other.time_; arg_41_0 = (num * 1735054449u ^ 3661618562u); continue; case 2u: this.payload_ = other.payload_; arg_41_0 = (num * 3619675198u ^ 1720885857u); continue; case 3u: goto IL_5D; } return; } } } public EchoResponse Clone() { return new EchoResponse(this); } public override bool Equals(object other) { return this.Equals(other as EchoResponse); } public bool Equals(EchoResponse other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 118378076) % 9) { case 0: return false; case 1: return true; case 2: return false; case 3: arg_72_0 = ((this.Time == other.Time) ? 341599353 : 1486273892); continue; case 5: goto IL_41; case 6: arg_72_0 = ((!(this.Payload != other.Payload)) ? 1315546260 : 1854012773); continue; case 7: return false; case 8: goto IL_B0; } break; } return true; IL_41: arg_72_0 = 809211462; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 40519268 : 1034180901); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.Time != 0uL) { goto IL_1C; } goto IL_8F; uint arg_63_0; while (true) { IL_5E: uint num2; switch ((num2 = (arg_63_0 ^ 986755501u)) % 5u) { case 0u: num ^= this.Payload.GetHashCode(); arg_63_0 = (num2 * 3132198145u ^ 2878240988u); continue; case 1u: num ^= this.Time.GetHashCode(); arg_63_0 = (num2 * 2177532905u ^ 2013997508u); continue; case 2u: goto IL_1C; case 4u: goto IL_8F; } break; } return num; IL_1C: arg_63_0 = 1150298440u; goto IL_5E; IL_8F: arg_63_0 = ((this.Payload.Length == 0) ? 1492373497u : 1856432008u); goto IL_5E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Time != 0uL) { goto IL_35; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 671938111u)) % 7u) { case 0u: output.WriteRawTag(18); arg_88_0 = (num * 1908935735u ^ 136287585u); continue; case 1u: goto IL_BF; case 2u: output.WriteRawTag(9); arg_88_0 = (num * 2896459660u ^ 4263582130u); continue; case 4u: output.WriteBytes(this.Payload); arg_88_0 = (num * 1179028644u ^ 1235951364u); continue; case 5u: goto IL_35; case 6u: output.WriteFixed64(this.Time); arg_88_0 = (num * 2171986711u ^ 3006320400u); continue; } break; } return; IL_35: arg_88_0 = 2114550505u; goto IL_83; IL_BF: arg_88_0 = ((this.Payload.Length != 0) ? 1381710732u : 499918984u); goto IL_83; } public int CalculateSize() { int num = 0; if (this.Time != 0uL) { goto IL_2D; } goto IL_82; uint arg_56_0; while (true) { IL_51: uint num2; switch ((num2 = (arg_56_0 ^ 186291250u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Payload); arg_56_0 = (num2 * 178156544u ^ 1345509848u); continue; case 2u: goto IL_2D; case 3u: num += 9; arg_56_0 = (num2 * 2921953415u ^ 524117699u); continue; case 4u: goto IL_82; } break; } return num; IL_2D: arg_56_0 = 1598375308u; goto IL_51; IL_82: arg_56_0 = ((this.Payload.Length == 0) ? 1196824024u : 181299005u); goto IL_51; } public void MergeFrom(EchoResponse other) { if (other == null) { goto IL_30; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 1790018939u)) % 7u) { case 1u: return; case 2u: arg_7B_0 = ((other.Payload.Length == 0) ? 415345458u : 1050200812u); continue; case 3u: this.Payload = other.Payload; arg_7B_0 = (num * 1970653424u ^ 2536128162u); continue; case 4u: goto IL_B2; case 5u: goto IL_30; case 6u: this.Time = other.Time; arg_7B_0 = (num * 2151963121u ^ 3042708259u); continue; } break; } return; IL_30: arg_7B_0 = 386447915u; goto IL_76; IL_B2: arg_7B_0 = ((other.Time != 0uL) ? 973491258u : 1646003218u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_104: uint num; uint arg_C0_0 = ((num = input.ReadTag()) != 0u) ? 1011520207u : 322394009u; while (true) { uint num2; switch ((num2 = (arg_C0_0 ^ 899064999u)) % 10u) { case 0u: arg_C0_0 = 1011520207u; continue; case 1u: this.Payload = input.ReadBytes(); arg_C0_0 = 961886132u; continue; case 2u: arg_C0_0 = ((num != 9u) ? 1357122537u : 1420313652u); continue; case 3u: goto IL_104; case 5u: this.Time = input.ReadFixed64(); arg_C0_0 = 873703662u; continue; case 6u: arg_C0_0 = (num2 * 2533005694u ^ 3352397528u); continue; case 7u: input.SkipLastField(); arg_C0_0 = (num2 * 1209805796u ^ 1221861361u); continue; case 8u: arg_C0_0 = (((num != 18u) ? 4236935970u : 2676765500u) ^ num2 * 1153778379u); continue; case 9u: arg_C0_0 = (num2 * 349921068u ^ 3786736696u); continue; } return; } } } } } <file_sep>/Framework.Constants/UpdateType.cs using System; namespace Framework.Constants { public enum UpdateType { Values, CreateObject, CreateObject2, OutOfRange } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountLink.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountLink : IMessage<GameAccountLink>, IEquatable<GameAccountLink>, IDeepCloneable<GameAccountLink>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountLink.__c __9 = new GameAccountLink.__c(); internal GameAccountLink cctor>b__29_0() { return new GameAccountLink(); } } private static readonly MessageParser<GameAccountLink> _parser = new MessageParser<GameAccountLink>(new Func<GameAccountLink>(GameAccountLink.__c.__9.<.cctor>b__29_0)); public const int GameAccountFieldNumber = 1; private GameAccountHandle gameAccount_; public const int NameFieldNumber = 2; private string name_ = ""; public static MessageParser<GameAccountLink> Parser { get { return GameAccountLink._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountLink.Descriptor; } } public GameAccountHandle GameAccount { get { return this.gameAccount_; } set { this.gameAccount_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public GameAccountLink() { } public GameAccountLink(GameAccountLink other) : this() { while (true) { IL_50: int arg_3A_0 = 1057617480; while (true) { switch ((arg_3A_0 ^ 1981008821) % 3) { case 0: goto IL_50; case 2: this.GameAccount = ((other.gameAccount_ != null) ? other.GameAccount.Clone() : null); this.name_ = other.name_; arg_3A_0 = 299742382; continue; } return; } } } public GameAccountLink Clone() { return new GameAccountLink(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountLink); } public bool Equals(GameAccountLink other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -306153) % 9) { case 1: return false; case 2: return false; case 3: return false; case 4: arg_77_0 = ((!GameAccountLink.smethod_0(this.GameAccount, other.GameAccount)) ? -134471677 : -330961647); continue; case 5: return true; case 6: goto IL_B5; case 7: arg_77_0 = ((!GameAccountLink.smethod_1(this.Name, other.Name)) ? -2116292834 : -1013655447); continue; case 8: goto IL_15; } break; } return true; IL_15: arg_77_0 = -1091742355; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -1513340893 : -944615950); goto IL_72; } public override int GetHashCode() { return 1 ^ GameAccountLink.smethod_2(this.GameAccount) ^ GameAccountLink.smethod_2(this.Name); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.GameAccount); output.WriteRawTag(18); output.WriteString(this.Name); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.GameAccount)) + (1 + CodedOutputStream.ComputeStringSize(this.Name)); } public void MergeFrom(GameAccountLink other) { if (other == null) { goto IL_33; } goto IL_104; uint arg_C4_0; while (true) { IL_BF: uint num; switch ((num = (arg_C4_0 ^ 2447213208u)) % 9u) { case 1u: arg_C4_0 = (((this.gameAccount_ == null) ? 3809899326u : 2580556978u) ^ num * 1884504251u); continue; case 2u: goto IL_104; case 3u: this.Name = other.Name; arg_C4_0 = (num * 2231240636u ^ 3726397127u); continue; case 4u: arg_C4_0 = ((GameAccountLink.smethod_3(other.Name) == 0) ? 3256506507u : 3974170629u); continue; case 5u: this.gameAccount_ = new GameAccountHandle(); arg_C4_0 = (num * 320988585u ^ 1613382628u); continue; case 6u: goto IL_33; case 7u: return; case 8u: this.GameAccount.MergeFrom(other.GameAccount); arg_C4_0 = 2828807110u; continue; } break; } return; IL_33: arg_C4_0 = 2343129335u; goto IL_BF; IL_104: arg_C4_0 = ((other.gameAccount_ == null) ? 2828807110u : 3473509060u); goto IL_BF; } public void MergeFrom(CodedInputStream input) { while (true) { IL_150: uint num; uint arg_104_0 = ((num = input.ReadTag()) != 0u) ? 1263759345u : 1026721800u; while (true) { uint num2; switch ((num2 = (arg_104_0 ^ 299233212u)) % 12u) { case 1u: this.Name = input.ReadString(); arg_104_0 = 312939332u; continue; case 2u: arg_104_0 = (((num == 18u) ? 3456330147u : 3319321697u) ^ num2 * 1098055265u); continue; case 3u: input.ReadMessage(this.gameAccount_); arg_104_0 = 663850117u; continue; case 4u: arg_104_0 = 1263759345u; continue; case 5u: arg_104_0 = (num2 * 662480298u ^ 3378426782u); continue; case 6u: arg_104_0 = ((this.gameAccount_ != null) ? 1407832311u : 586964199u); continue; case 7u: input.SkipLastField(); arg_104_0 = (num2 * 2548030558u ^ 178052300u); continue; case 8u: goto IL_150; case 9u: arg_104_0 = ((num != 10u) ? 1569440210u : 116850166u); continue; case 10u: arg_104_0 = (num2 * 1867220121u ^ 2965949054u); continue; case 11u: this.gameAccount_ = new GameAccountHandle(); arg_104_0 = (num2 * 1928057513u ^ 1977146852u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.Reflection/FieldDescriptor.cs using Google.Protobuf.Compatibility; using System; using System.Reflection; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class FieldDescriptor : DescriptorBase, IComparable<FieldDescriptor> { private readonly FieldDescriptorProto proto; private EnumDescriptor enumType; private MessageDescriptor messageType; private readonly MessageDescriptor containingType; private readonly OneofDescriptor containingOneof; private FieldType fieldType; private readonly string propertyName; private IFieldAccessor accessor; public override string Name { get { return this.proto.Name; } } internal FieldDescriptorProto Proto { get { return this.proto; } } public IFieldAccessor Accessor { get { return this.accessor; } } public bool IsRepeated { get { return this.Proto.Label == FieldDescriptorProto.Types.Label.LABEL_REPEATED; } } public bool IsMap { get { if (this.fieldType == FieldType.Message) { while (true) { IL_5E: uint arg_42_0 = 4136303111u; while (true) { uint num; switch ((num = (arg_42_0 ^ 3689864530u)) % 4u) { case 1u: arg_42_0 = (((this.messageType.Proto.Options == null) ? 3153850573u : 2500854299u) ^ num * 2571622187u); continue; case 2u: goto IL_65; case 3u: goto IL_5E; } goto Block_3; } } Block_3: return false; IL_65: return this.messageType.Proto.Options.MapEntry; } return false; } } public bool IsPacked { get { return this.Proto.Options == null || this.Proto.Options.Packed; } } public MessageDescriptor ContainingType { get { return this.containingType; } } public OneofDescriptor ContainingOneof { get { return this.containingOneof; } } public FieldType FieldType { get { return this.fieldType; } } public int FieldNumber { get { return this.Proto.Number; } } public EnumDescriptor EnumType { get { if (this.fieldType != FieldType.Enum) { throw FieldDescriptor.smethod_2(Module.smethod_33<string>(2812503171u)); } return this.enumType; } } public MessageDescriptor MessageType { get { if (this.fieldType != FieldType.Message) { throw FieldDescriptor.smethod_2(Module.smethod_36<string>(563861317u)); } return this.messageType; } } internal FieldDescriptor(FieldDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string propertyName) : base(file, file.ComputeFullName(parent, proto.Name), index) { while (true) { IL_192: uint arg_155_0 = 668326049u; while (true) { uint num; switch ((num = (arg_155_0 ^ 1907900556u)) % 12u) { case 0u: this.containingOneof = parent.Oneofs[proto.OneofIndex]; arg_155_0 = 951252349u; continue; case 2u: goto IL_192; case 3u: arg_155_0 = (((proto.OneofIndex != -1) ? 3178787542u : 4269045895u) ^ num * 287148678u); continue; case 4u: arg_155_0 = (((proto.OneofIndex < 0) ? 830153714u : 1120517676u) ^ num * 2667568972u); continue; case 5u: this.proto = proto; arg_155_0 = (((proto.Type == (FieldDescriptorProto.Types.Type)0) ? 1249293554u : 878441721u) ^ num * 64997452u); continue; case 6u: arg_155_0 = ((this.FieldNumber > 0) ? 416220771u : 1243880467u); continue; case 7u: goto IL_199; case 8u: arg_155_0 = (((proto.OneofIndex < parent.Proto.OneofDecl.Count) ? 3890232560u : 2326943442u) ^ num * 1872585197u); continue; case 9u: this.fieldType = FieldDescriptor.GetFieldTypeFromProtoType(proto.Type); arg_155_0 = (num * 2182631442u ^ 3138733388u); continue; case 10u: goto IL_1AA; case 11u: this.containingType = parent; arg_155_0 = 1386389043u; continue; } goto Block_6; } } Block_6: goto IL_1CF; IL_199: throw new DescriptorValidationException(this, Module.smethod_33<string>(1349002182u)); IL_1AA: throw new DescriptorValidationException(this, FieldDescriptor.smethod_0(Module.smethod_37<string>(3181016348u), new object[] { parent.Name })); IL_1CF: file.DescriptorPool.AddSymbol(this); this.propertyName = propertyName; } private static FieldType GetFieldTypeFromProtoType(FieldDescriptorProto.Types.Type type) { switch (type) { case FieldDescriptorProto.Types.Type.TYPE_DOUBLE: break; case FieldDescriptorProto.Types.Type.TYPE_FLOAT: return FieldType.Float; case FieldDescriptorProto.Types.Type.TYPE_INT64: return FieldType.Int64; case FieldDescriptorProto.Types.Type.TYPE_UINT64: return FieldType.UInt64; case FieldDescriptorProto.Types.Type.TYPE_INT32: return FieldType.Int32; case FieldDescriptorProto.Types.Type.TYPE_FIXED64: return FieldType.Fixed64; case FieldDescriptorProto.Types.Type.TYPE_FIXED32: return FieldType.Fixed32; case FieldDescriptorProto.Types.Type.TYPE_BOOL: return FieldType.Bool; case FieldDescriptorProto.Types.Type.TYPE_STRING: return FieldType.String; case FieldDescriptorProto.Types.Type.TYPE_GROUP: return FieldType.Group; case FieldDescriptorProto.Types.Type.TYPE_MESSAGE: return FieldType.Message; case FieldDescriptorProto.Types.Type.TYPE_BYTES: return FieldType.Bytes; case FieldDescriptorProto.Types.Type.TYPE_UINT32: return FieldType.UInt32; case FieldDescriptorProto.Types.Type.TYPE_ENUM: return FieldType.Enum; case FieldDescriptorProto.Types.Type.TYPE_SFIXED32: return FieldType.SFixed32; case FieldDescriptorProto.Types.Type.TYPE_SFIXED64: return FieldType.SFixed64; case FieldDescriptorProto.Types.Type.TYPE_SINT32: return FieldType.SInt32; case FieldDescriptorProto.Types.Type.TYPE_SINT64: return FieldType.SInt64; default: while (true) { IL_C5: uint arg_64_0 = 119551694u; while (true) { uint num; switch ((num = (arg_64_0 ^ 754523646u)) % 21u) { case 0u: return FieldType.Double; case 1u: return FieldType.SFixed64; case 2u: return FieldType.UInt64; case 3u: return FieldType.Enum; case 4u: return FieldType.Int64; case 5u: return FieldType.Int32; case 6u: goto IL_C5; case 7u: return FieldType.String; case 8u: return FieldType.Float; case 9u: return FieldType.Fixed64; case 10u: return FieldType.Message; case 11u: return FieldType.UInt32; case 12u: return FieldType.Bool; case 13u: return FieldType.Fixed32; case 15u: return FieldType.SInt64; case 16u: return FieldType.Bytes; case 17u: return FieldType.SInt32; case 18u: arg_64_0 = (num * 926929353u ^ 3080129912u); continue; case 19u: return FieldType.SFixed32; case 20u: return FieldType.Group; } goto Block_2; } } Block_2: throw FieldDescriptor.smethod_1(Module.smethod_37<string>(2772032189u)); } return FieldType.Double; } public int CompareTo(FieldDescriptor other) { if (other.containingType != this.containingType) { throw FieldDescriptor.smethod_1(Module.smethod_35<string>(4167100992u)); } return this.FieldNumber - other.FieldNumber; } internal void CrossLink() { if (FieldDescriptor.smethod_3(this.Proto.TypeName, "")) { goto IL_191; } goto IL_3CA; uint arg_333_0; while (true) { IL_32E: uint num; switch ((num = (arg_333_0 ^ 3013306013u)) % 30u) { case 0u: { IDescriptor descriptor; arg_333_0 = ((descriptor is EnumDescriptor) ? 2821381071u : 2537082698u); continue; } case 1u: arg_333_0 = (((!FieldDescriptor.smethod_3(this.Proto.DefaultValue, "")) ? 3504232881u : 4081425330u) ^ num * 3450336043u); continue; case 2u: { IDescriptor descriptor; this.messageType = (MessageDescriptor)descriptor; arg_333_0 = 4036915674u; continue; } case 3u: { IDescriptor descriptor = base.File.DescriptorPool.LookupSymbol(this.Proto.TypeName, this); arg_333_0 = (num * 1137267228u ^ 1800642603u); continue; } case 4u: arg_333_0 = (((this.Proto.Type != (FieldDescriptorProto.Types.Type)0) ? 3944142871u : 3881033019u) ^ num * 2947199265u); continue; case 5u: arg_333_0 = (num * 3768717094u ^ 4265278771u); continue; case 6u: goto IL_3D9; case 7u: this.fieldType = FieldType.Message; arg_333_0 = (num * 2040762779u ^ 2945237881u); continue; case 8u: arg_333_0 = (((this.fieldType != FieldType.Enum) ? 4206089270u : 4050017104u) ^ num * 2028914515u); continue; case 9u: { IDescriptor descriptor; arg_333_0 = (((!(descriptor is EnumDescriptor)) ? 2973306776u : 2993182602u) ^ num * 1211533732u); continue; } case 10u: this.fieldType = FieldType.Enum; arg_333_0 = (num * 335191304u ^ 978261121u); continue; case 11u: goto IL_3EA; case 12u: { IDescriptor descriptor; arg_333_0 = (((descriptor is MessageDescriptor) ? 1340053915u : 1990891018u) ^ num * 3272437084u); continue; } case 13u: goto IL_3FB; case 14u: goto IL_425; case 15u: goto IL_436; case 16u: goto IL_191; case 17u: { IDescriptor descriptor; this.enumType = (EnumDescriptor)descriptor; arg_333_0 = 4053406812u; continue; } case 18u: this.accessor = this.CreateAccessor(this.propertyName); arg_333_0 = 3795529724u; continue; case 19u: goto IL_447; case 20u: arg_333_0 = ((this.fieldType != FieldType.Message) ? 2460784210u : 3995577395u); continue; case 22u: arg_333_0 = (((this.containingType.Proto.Options == null) ? 419873589u : 668635125u) ^ num * 1090866907u); continue; case 23u: arg_333_0 = (((this.containingType != null) ? 572724748u : 1874315500u) ^ num * 1436619519u); continue; case 24u: { IDescriptor descriptor; arg_333_0 = (((!(descriptor is MessageDescriptor)) ? 471649775u : 1414817504u) ^ num * 4283271988u); continue; } case 25u: arg_333_0 = ((this.fieldType != FieldType.Enum) ? 2708078287u : 4205631964u); continue; case 26u: goto IL_3CA; case 27u: goto IL_471; case 28u: arg_333_0 = ((this.containingType.Proto.Options.MessageSetWireFormat ? 288763958u : 1623010749u) ^ num * 3306098553u); continue; case 29u: base.File.DescriptorPool.AddFieldByNumber(this); arg_333_0 = 2913542014u; continue; } break; } return; IL_3D9: throw new DescriptorValidationException(this, Module.smethod_33<string>(1009936473u)); IL_3EA: throw new DescriptorValidationException(this, Module.smethod_37<string>(3005745843u)); IL_3FB: throw new DescriptorValidationException(this, FieldDescriptor.smethod_0(Module.smethod_33<string>(3783798939u), new object[] { this.Proto.TypeName })); IL_425: throw new DescriptorValidationException(this, Module.smethod_33<string>(306987899u)); IL_436: throw new DescriptorValidationException(this, Module.smethod_37<string>(785259833u)); IL_447: throw new DescriptorValidationException(this, FieldDescriptor.smethod_0(Module.smethod_33<string>(2096439923u), new object[] { this.Proto.TypeName })); IL_471: throw new DescriptorValidationException(this, FieldDescriptor.smethod_0(Module.smethod_37<string>(1924739148u), new object[] { this.Proto.TypeName })); IL_191: arg_333_0 = 2419306412u; goto IL_32E; IL_3CA: arg_333_0 = ((this.fieldType == FieldType.Message) ? 4199521082u : 2785444915u); goto IL_32E; } private IFieldAccessor CreateAccessor(string propertyName) { if (propertyName == null) { goto IL_06; } goto IL_E4; uint arg_A7_0; PropertyInfo property; IFieldAccessor result; while (true) { IL_A2: uint num; switch ((num = (arg_A7_0 ^ 2720568274u)) % 12u) { case 0u: arg_A7_0 = ((!this.IsMap) ? 2387454740u : 3727411354u); continue; case 1u: goto IL_FD; case 2u: result = new RepeatedFieldAccessor(property, this); arg_A7_0 = 3190240481u; continue; case 3u: return result; case 4u: goto IL_101; case 5u: result = new SingleFieldAccessor(property, this); arg_A7_0 = (num * 2866179060u ^ 1427270409u); continue; case 6u: arg_A7_0 = ((this.IsRepeated ? 2767871872u : 3251485679u) ^ num * 2633443800u); continue; case 7u: goto IL_E4; case 9u: arg_A7_0 = (((property != null) ? 3418836970u : 3324558718u) ^ num * 1433534820u); continue; case 10u: goto IL_06; case 11u: return result; } break; } goto IL_12F; IL_FD: return null; IL_101: throw new DescriptorValidationException(this, FieldDescriptor.smethod_0(Module.smethod_37<string>(814437201u), new object[] { propertyName, this.containingType.ClrType })); IL_12F: result = new MapFieldAccessor(property, this); return result; IL_06: arg_A7_0 = 2372915079u; goto IL_A2; IL_E4: property = this.containingType.ClrType.GetProperty(propertyName); arg_A7_0 = 4205391919u; goto IL_A2; } static string smethod_0(string string_0, object[] object_0) { return string.Format(string_0, object_0); } static ArgumentException smethod_1(string string_0) { return new ArgumentException(string_0); } static InvalidOperationException smethod_2(string string_0) { return new InvalidOperationException(string_0); } static bool smethod_3(string string_0, string string_1) { return string_0 != string_1; } } } <file_sep>/Bgs.Protocol.Presence.V1/ChannelState.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class ChannelState : IMessage<ChannelState>, IEquatable<ChannelState>, IDeepCloneable<ChannelState>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChannelState.__c __9 = new ChannelState.__c(); internal ChannelState cctor>b__39_0() { return new ChannelState(); } } private static readonly MessageParser<ChannelState> _parser = new MessageParser<ChannelState>(new Func<ChannelState>(ChannelState.__c.__9.<.cctor>b__39_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int FieldOperationFieldNumber = 2; private static readonly FieldCodec<FieldOperation> _repeated_fieldOperation_codec = FieldCodec.ForMessage<FieldOperation>(18u, Bgs.Protocol.Presence.V1.FieldOperation.Parser); private readonly RepeatedField<FieldOperation> fieldOperation_ = new RepeatedField<FieldOperation>(); public const int HealingFieldNumber = 3; private bool healing_; public const int PresenceFieldNumber = 101; private ChannelState presence_; public static MessageParser<ChannelState> Parser { get { return ChannelState._parser; } } public static MessageDescriptor Descriptor { get { return PresenceTypesReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return ChannelState.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public RepeatedField<FieldOperation> FieldOperation { get { return this.fieldOperation_; } } public bool Healing { get { return this.healing_; } set { this.healing_ = value; } } public ChannelState Presence { get { return this.presence_; } set { this.presence_ = value; } } public ChannelState() { } public ChannelState(ChannelState other) : this() { this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); this.fieldOperation_ = other.fieldOperation_.Clone(); this.healing_ = other.healing_; this.Presence = ((other.presence_ != null) ? other.Presence.Clone() : null); } public ChannelState Clone() { return new ChannelState(this); } public override bool Equals(object other) { return this.Equals(other as ChannelState); } public bool Equals(ChannelState other) { if (other == null) { goto IL_C9; } goto IL_121; int arg_D3_0; while (true) { IL_CE: switch ((arg_D3_0 ^ -2084877239) % 13) { case 0: goto IL_C9; case 1: return true; case 2: return false; case 3: arg_D3_0 = ((!ChannelState.smethod_0(this.EntityId, other.EntityId)) ? -855689458 : -1699646460); continue; case 4: arg_D3_0 = ((!ChannelState.smethod_0(this.Presence, other.Presence)) ? -232790343 : -1607780119); continue; case 5: return false; case 6: arg_D3_0 = ((this.Healing != other.Healing) ? -1813452776 : -2001199808); continue; case 8: return false; case 9: return false; case 10: goto IL_121; case 11: return false; case 12: arg_D3_0 = ((!this.fieldOperation_.Equals(other.fieldOperation_)) ? -21362078 : -1628946934); continue; } break; } return true; IL_C9: arg_D3_0 = -1491084293; goto IL_CE; IL_121: arg_D3_0 = ((other != this) ? -1688524256 : -348717546); goto IL_CE; } public override int GetHashCode() { int num = 1; if (this.entityId_ != null) { goto IL_9D; } goto IL_DE; uint arg_A7_0; while (true) { IL_A2: uint num2; switch ((num2 = (arg_A7_0 ^ 3985266697u)) % 7u) { case 0u: goto IL_9D; case 1u: num ^= ChannelState.smethod_1(this.EntityId); arg_A7_0 = (num2 * 4293521626u ^ 3485633161u); continue; case 2u: goto IL_DE; case 3u: arg_A7_0 = ((this.presence_ == null) ? 3585828315u : 3933103611u); continue; case 4u: num ^= this.Presence.GetHashCode(); arg_A7_0 = (num2 * 1473446294u ^ 97212439u); continue; case 5u: num ^= this.Healing.GetHashCode(); arg_A7_0 = (num2 * 2983638794u ^ 2270531651u); continue; } break; } return num; IL_9D: arg_A7_0 = 3272757139u; goto IL_A2; IL_DE: num ^= ChannelState.smethod_1(this.fieldOperation_); arg_A7_0 = (this.Healing ? 4239717518u : 2398400005u); goto IL_A2; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.entityId_ != null) { goto IL_7B; } goto IL_13D; uint arg_104_0; while (true) { IL_FF: uint num; switch ((num = (arg_104_0 ^ 2010384173u)) % 11u) { case 1u: output.WriteRawTag(10); arg_104_0 = (num * 2998346218u ^ 3993676106u); continue; case 2u: output.WriteRawTag(24); arg_104_0 = (num * 477752501u ^ 1383609522u); continue; case 3u: output.WriteMessage(this.Presence); arg_104_0 = (num * 105834348u ^ 2431089940u); continue; case 4u: output.WriteRawTag(170, 6); arg_104_0 = (num * 1611077589u ^ 1365647344u); continue; case 5u: output.WriteMessage(this.EntityId); arg_104_0 = (num * 3896355006u ^ 233811782u); continue; case 6u: goto IL_13D; case 7u: goto IL_7B; case 8u: output.WriteBool(this.Healing); arg_104_0 = (num * 109296419u ^ 1675379775u); continue; case 9u: arg_104_0 = ((this.presence_ != null) ? 2036981913u : 419124376u); continue; case 10u: arg_104_0 = ((this.Healing ? 1646253164u : 14702073u) ^ num * 2864302143u); continue; } break; } return; IL_7B: arg_104_0 = 1401415222u; goto IL_FF; IL_13D: this.fieldOperation_.WriteTo(output, ChannelState._repeated_fieldOperation_codec); arg_104_0 = 1286856321u; goto IL_FF; } public int CalculateSize() { int num = 0; if (this.entityId_ != null) { goto IL_78; } goto IL_E0; uint arg_B4_0; while (true) { IL_AF: uint num2; switch ((num2 = (arg_B4_0 ^ 2090569575u)) % 8u) { case 0u: num += 2 + CodedOutputStream.ComputeMessageSize(this.Presence); arg_B4_0 = (num2 * 3125563379u ^ 167737832u); continue; case 1u: num += 2; arg_B4_0 = (num2 * 3497260532u ^ 1063349382u); continue; case 2u: goto IL_E0; case 3u: goto IL_78; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_B4_0 = (num2 * 2723034152u ^ 2335702461u); continue; case 5u: arg_B4_0 = ((this.presence_ == null) ? 749193112u : 1803541687u); continue; case 6u: arg_B4_0 = (((!this.Healing) ? 3530570634u : 2245910990u) ^ num2 * 3145333988u); continue; } break; } return num; IL_78: arg_B4_0 = 1141682755u; goto IL_AF; IL_E0: num += this.fieldOperation_.CalculateSize(ChannelState._repeated_fieldOperation_codec); arg_B4_0 = 1020981529u; goto IL_AF; } public void MergeFrom(ChannelState other) { if (other == null) { goto IL_FF; } goto IL_1BB; uint arg_167_0; while (true) { IL_162: uint num; switch ((num = (arg_167_0 ^ 2082528366u)) % 14u) { case 0u: arg_167_0 = (((this.entityId_ != null) ? 222534624u : 905277163u) ^ num * 2511669426u); continue; case 2u: this.Healing = other.Healing; arg_167_0 = (num * 1764046171u ^ 2518683396u); continue; case 3u: this.entityId_ = new EntityId(); arg_167_0 = (num * 2787973850u ^ 3859507634u); continue; case 4u: goto IL_FF; case 5u: this.fieldOperation_.Add(other.fieldOperation_); arg_167_0 = 822977840u; continue; case 6u: this.presence_ = new ChannelState(); arg_167_0 = (num * 161848235u ^ 118436515u); continue; case 7u: this.Presence.MergeFrom(other.Presence); arg_167_0 = 597716615u; continue; case 8u: arg_167_0 = ((other.presence_ != null) ? 1479211045u : 597716615u); continue; case 9u: arg_167_0 = (((this.presence_ != null) ? 2637654772u : 3060848749u) ^ num * 488705395u); continue; case 10u: arg_167_0 = (((!other.Healing) ? 3552290902u : 3358796956u) ^ num * 3013785615u); continue; case 11u: return; case 12u: this.EntityId.MergeFrom(other.EntityId); arg_167_0 = 2020350961u; continue; case 13u: goto IL_1BB; } break; } return; IL_FF: arg_167_0 = 1077197505u; goto IL_162; IL_1BB: arg_167_0 = ((other.entityId_ != null) ? 1778218454u : 2020350961u); goto IL_162; } public void MergeFrom(CodedInputStream input) { while (true) { IL_262: uint num; uint arg_1F6_0 = ((num = input.ReadTag()) == 0u) ? 4009014016u : 4100333146u; while (true) { uint num2; switch ((num2 = (arg_1F6_0 ^ 3620854301u)) % 20u) { case 0u: arg_1F6_0 = 4100333146u; continue; case 1u: arg_1F6_0 = (((num != 810u) ? 2466332448u : 2825767655u) ^ num2 * 3401501954u); continue; case 2u: arg_1F6_0 = (num2 * 1827953477u ^ 4133203479u); continue; case 3u: arg_1F6_0 = (((num == 18u) ? 3660508541u : 3450826377u) ^ num2 * 3951641555u); continue; case 4u: this.Healing = input.ReadBool(); arg_1F6_0 = 2190275987u; continue; case 5u: arg_1F6_0 = (num2 * 1140447973u ^ 3138392451u); continue; case 6u: this.entityId_ = new EntityId(); arg_1F6_0 = (num2 * 2375827887u ^ 1445062814u); continue; case 7u: this.presence_ = new ChannelState(); arg_1F6_0 = (num2 * 608104194u ^ 521115093u); continue; case 8u: goto IL_262; case 9u: this.fieldOperation_.AddEntriesFrom(input, ChannelState._repeated_fieldOperation_codec); arg_1F6_0 = 2869355857u; continue; case 10u: arg_1F6_0 = (num2 * 747759675u ^ 2455317247u); continue; case 11u: arg_1F6_0 = (((num != 10u) ? 3357823420u : 2780891301u) ^ num2 * 2747142798u); continue; case 12u: arg_1F6_0 = ((num == 24u) ? 2234766445u : 2900444100u); continue; case 14u: input.ReadMessage(this.presence_); arg_1F6_0 = 2869355857u; continue; case 15u: arg_1F6_0 = ((num > 18u) ? 2939885913u : 3678375298u); continue; case 16u: arg_1F6_0 = ((this.presence_ != null) ? 3717402459u : 3751654106u); continue; case 17u: input.ReadMessage(this.entityId_); arg_1F6_0 = 3321370679u; continue; case 18u: arg_1F6_0 = ((this.entityId_ != null) ? 2385032892u : 2627062883u); continue; case 19u: input.SkipLastField(); arg_1F6_0 = 2869355857u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/AuthenticationServiceReflection.cs using Bgs.Protocol.Account.V1; using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public static class AuthenticationServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return AuthenticationServiceReflection.descriptor; } } static AuthenticationServiceReflection() { AuthenticationServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(AuthenticationServiceReflection.smethod_1(AuthenticationServiceReflection.smethod_0(new string[] { Module.smethod_35<string>(1671797463u), Module.smethod_37<string>(2597498459u), Module.smethod_36<string>(2603630031u), Module.smethod_37<string>(3795420923u), Module.smethod_37<string>(1048976043u), Module.smethod_33<string>(1072181836u), Module.smethod_36<string>(265189519u), Module.smethod_37<string>(1896298555u), Module.smethod_34<string>(4056494752u), Module.smethod_37<string>(2100775899u), Module.smethod_36<string>(2985543759u), Module.smethod_33<string>(254025580u), Module.smethod_35<string>(3239813271u), Module.smethod_36<string>(2209976767u), Module.smethod_36<string>(647103247u), Module.smethod_35<string>(1267250439u), Module.smethod_34<string>(1056923168u), Module.smethod_34<string>(4227051120u), Module.smethod_36<string>(3367457487u), Module.smethod_35<string>(2932133959u), Module.smethod_35<string>(2274613015u), Module.smethod_33<string>(3116866380u), Module.smethod_34<string>(3102211776u), Module.smethod_35<string>(302050183u), Module.smethod_33<string>(1378460860u), Module.smethod_35<string>(651891815u), Module.smethod_34<string>(1602425984u), Module.smethod_37<string>(4292143483u), Module.smethod_37<string>(1545698603u), Module.smethod_36<string>(2973804223u), Module.smethod_36<string>(1410930703u), Module.smethod_34<string>(3272768144u), Module.smethod_34<string>(3647714592u), Module.smethod_36<string>(2638848639u), Module.smethod_36<string>(1075975119u), Module.smethod_37<string>(1808530683u), Module.smethod_36<string>(2245195375u), Module.smethod_35<string>(483242535u), Module.smethod_35<string>(4120688887u), Module.smethod_37<string>(4204375611u), Module.smethod_33<string>(3834341820u), Module.smethod_35<string>(2148126055u), Module.smethod_36<string>(1457888847u), Module.smethod_35<string>(3463167943u), Module.smethod_33<string>(2198029308u), Module.smethod_36<string>(682321855u), Module.smethod_37<string>(4058253003u), Module.smethod_35<string>(833084167u), Module.smethod_37<string>(961208171u), Module.smethod_35<string>(1182925799u), Module.smethod_34<string>(3715382016u), Module.smethod_36<string>(276929055u), Module.smethod_37<string>(55530923u), Module.smethod_36<string>(1064235583u), Module.smethod_33<string>(765902812u), Module.smethod_35<string>(4162851207u), Module.smethod_33<string>(1584059068u), Module.smethod_33<string>(1686152076u), Module.smethod_34<string>(715810432u), Module.smethod_35<string>(1532767431u), Module.smethod_36<string>(3390936559u), Module.smethod_37<string>(3503175707u), Module.smethod_36<string>(4178243087u), Module.smethod_36<string>(2615369567u), Module.smethod_37<string>(1954653291u), Module.smethod_36<string>(2926846079u), Module.smethod_37<string>(3824834059u), Module.smethod_34<string>(3408102992u), Module.smethod_33<string>(558892412u), Module.smethod_35<string>(1785741351u), Module.smethod_33<string>(2399390940u), Module.smethod_33<string>(1479141676u), Module.smethod_33<string>(3217547196u), Module.smethod_36<string>(3308759807u), Module.smethod_37<string>(3328111499u), Module.smethod_37<string>(2977511547u), Module.smethod_36<string>(2915106543u), Module.smethod_34<string>(3953605808u), Module.smethod_33<string>(3421733212u), Module.smethod_37<string>(1078389179u), Module.smethod_35<string>(1478062039u), Module.smethod_37<string>(3269756763u), Module.smethod_33<string>(1785420700u), Module.smethod_37<string>(172711931u), Module.smethod_33<string>(2603576956u), Module.smethod_34<string>(954034224u), Module.smethod_35<string>(3492787191u), Module.smethod_34<string>(204141328u), Module.smethod_35<string>(512861783u), Module.smethod_34<string>(3749215728u), Module.smethod_33<string>(2807762972u), Module.smethod_35<string>(2835266247u), Module.smethod_36<string>(3678933999u), Module.smethod_33<string>(224873171u) })), new FileDescriptor[] { AccountTypesReflection.Descriptor, ContentHandleTypesReflection.Descriptor, EntityTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(ModuleLoadRequest).TypeHandle), ModuleLoadRequest.Parser, new string[] { Module.smethod_34<string>(2249429936u), Module.smethod_37<string>(2364197399u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(ModuleNotification).TypeHandle), ModuleNotification.Parser, new string[] { Module.smethod_37<string>(2334784263u), Module.smethod_37<string>(552518722u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(ModuleMessageRequest).TypeHandle), ModuleMessageRequest.Parser, new string[] { Module.smethod_34<string>(2155693324u), Module.smethod_34<string>(1507301564u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(LogonRequest).TypeHandle), LogonRequest.Parser, new string[] { Module.smethod_37<string>(700380119u), Module.smethod_33<string>(519548390u), Module.smethod_37<string>(2831860475u), Module.smethod_37<string>(936421982u), Module.smethod_33<string>(3069454152u), Module.smethod_35<string>(2261786624u), Module.smethod_34<string>(3627815749u), Module.smethod_36<string>(4269413895u), Module.smethod_34<string>(2315503181u), Module.smethod_36<string>(2561855285u), Module.smethod_33<string>(1337704646u), Module.smethod_33<string>(2098257061u), Module.smethod_34<string>(2784186241u), Module.smethod_36<string>(446998546u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(LogonResult).TypeHandle), LogonResult.Parser, new string[] { Module.smethod_36<string>(1680857496u), Module.smethod_34<string>(750206468u), Module.smethod_33<string>(1846560140u), Module.smethod_34<string>(3653059453u), Module.smethod_34<string>(3993609865u), Module.smethod_33<string>(2068294760u), Module.smethod_35<string>(1558626496u), Module.smethod_34<string>(2361677583u), Module.smethod_34<string>(2267940971u), Module.smethod_35<string>(330252836u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(GenerateSSOTokenRequest).TypeHandle), GenerateSSOTokenRequest.Parser, new string[] { Module.smethod_34<string>(3421418748u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(GenerateSSOTokenResponse).TypeHandle), GenerateSSOTokenResponse.Parser, new string[] { Module.smethod_35<string>(2023905647u), Module.smethod_35<string>(1631335057u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(LogonUpdateRequest).TypeHandle), LogonUpdateRequest.Parser, new string[] { Module.smethod_35<string>(1607588472u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(LogonQueueUpdateRequest).TypeHandle), LogonQueueUpdateRequest.Parser, new string[] { Module.smethod_37<string>(844557641u), Module.smethod_33<string>(2125898601u), Module.smethod_34<string>(327135486u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(AccountSettingsNotification).TypeHandle), AccountSettingsNotification.Parser, new string[] { Module.smethod_34<string>(2708960664u), Module.smethod_35<string>(861853458u), Module.smethod_37<string>(1341250730u), Module.smethod_33<string>(329889240u), Module.smethod_37<string>(3094309432u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(ServerStateChangeRequest).TypeHandle), ServerStateChangeRequest.Parser, new string[] { Module.smethod_36<string>(3718803416u), Module.smethod_36<string>(3428060496u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(VersionInfo).TypeHandle), VersionInfo.Parser, new string[] { Module.smethod_34<string>(3338222276u), Module.smethod_37<string>(172564576u), Module.smethod_37<string>(4146138759u), Module.smethod_34<string>(1959067768u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(VersionInfoNotification).TypeHandle), VersionInfoNotification.Parser, new string[] { Module.smethod_36<string>(840651810u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(MemModuleLoadRequest).TypeHandle), MemModuleLoadRequest.Parser, new string[] { Module.smethod_35<string>(2121056678u), Module.smethod_36<string>(2835900298u), Module.smethod_37<string>(669257665u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(MemModuleLoadResponse).TypeHandle), MemModuleLoadResponse.Parser, new string[] { Module.smethod_35<string>(874396530u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(SelectGameAccountRequest).TypeHandle), SelectGameAccountRequest.Parser, new string[] { Module.smethod_36<string>(1993931775u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(GameAccountSelectedRequest).TypeHandle), GameAccountSelectedRequest.Parser, new string[] { Module.smethod_37<string>(552518722u), Module.smethod_33<string>(1846560140u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(GenerateWebCredentialsRequest).TypeHandle), GenerateWebCredentialsRequest.Parser, new string[] { Module.smethod_34<string>(3421418748u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(GenerateWebCredentialsResponse).TypeHandle), GenerateWebCredentialsResponse.Parser, new string[] { Module.smethod_33<string>(2279038113u) }, null, null, null), new GeneratedCodeInfo(AuthenticationServiceReflection.smethod_2(typeof(VerifyWebCredentialsRequest).TypeHandle), VerifyWebCredentialsRequest.Parser, new string[] { Module.smethod_36<string>(499140088u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Network.Packets/OpcodeAttribute.cs using Framework.Constants.Net; using System; namespace Framework.Network.Packets { [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class OpcodeAttribute : Attribute { public ClientMessage Opcode { get; set; } public string WoWBuild { get; set; } public OpcodeAttribute(ClientMessage opcode, string wowBuild) { while (true) { IL_53: uint arg_37_0 = 863362973u; while (true) { uint num; switch ((num = (arg_37_0 ^ 107037266u)) % 4u) { case 0u: this.WoWBuild = wowBuild; arg_37_0 = (num * 2679755926u ^ 3411717595u); continue; case 2u: goto IL_53; case 3u: this.Opcode = opcode; arg_37_0 = (num * 1265873067u ^ 1408933031u); continue; } return; } } } } } <file_sep>/Google.Protobuf.WellKnownTypes/NullValue.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [ComVisible(true)] public enum NullValue { NULL_VALUE } } <file_sep>/Framework.Cryptography.WoW/RsaStore.cs using System; using System.Runtime.CompilerServices; namespace Framework.Cryptography.WoW { public class RsaStore { public static byte[] D; public static byte[] DP; public static byte[] DQ; public static byte[] Exponent; public static byte[] InverseQ; public static byte[] Modulus; public static byte[] P; public static byte[] Q; public static byte[] WherePacketHmac; static RsaStore() { // Note: this type is marked as 'beforefieldinit'. byte[] expr_0A = new byte[256]; RsaStore.smethod_0(expr_0A, fieldof(Framework.<PrivateImplementationDetails>.struct16_0).FieldHandle); RsaStore.D = expr_0A; byte[] expr_24 = new byte[128]; RsaStore.smethod_0(expr_24, fieldof(Framework.<PrivateImplementationDetails>.F49E8741F7968D6D836AC31B66B178C67D2CD2D1).FieldHandle); RsaStore.DP = expr_24; while (true) { IL_14B: uint arg_127_0 = 3123678134u; while (true) { uint num; switch ((num = (arg_127_0 ^ 3909798529u)) % 6u) { case 0u: { byte[] expr_EE = new byte[128]; RsaStore.smethod_0(expr_EE, fieldof(Framework.<PrivateImplementationDetails>.struct15_0).FieldHandle); RsaStore.Q = expr_EE; byte[] expr_105 = new byte[64]; RsaStore.smethod_0(expr_105, fieldof(Framework.<PrivateImplementationDetails>.struct14_0).FieldHandle); RsaStore.WherePacketHmac = expr_105; arg_127_0 = (num * 2822589078u ^ 89342793u); continue; } case 1u: { byte[] expr_C5 = new byte[128]; RsaStore.smethod_0(expr_C5, fieldof(Framework.<PrivateImplementationDetails>.BFED396B36E39E6B4D9C773432CEE8616631C5A0).FieldHandle); RsaStore.P = expr_C5; arg_127_0 = (num * 749206368u ^ 2764065413u); continue; } case 3u: { byte[] expr_89 = new byte[128]; RsaStore.smethod_0(expr_89, fieldof(Framework.<PrivateImplementationDetails>.struct15_1).FieldHandle); RsaStore.DQ = expr_89; RsaStore.Exponent = new byte[] { 1, 0, 1 }; arg_127_0 = (num * 2260426298u ^ 2014626594u); continue; } case 4u: goto IL_14B; case 5u: { byte[] expr_43 = new byte[128]; RsaStore.smethod_0(expr_43, fieldof(Framework.<PrivateImplementationDetails>.struct15_2).FieldHandle); RsaStore.InverseQ = expr_43; byte[] expr_5D = new byte[256]; RsaStore.smethod_0(expr_5D, fieldof(Framework.<PrivateImplementationDetails>.struct16_1).FieldHandle); RsaStore.Modulus = expr_5D; arg_127_0 = (num * 4028678003u ^ 3241436557u); continue; } } return; } } } static void smethod_0(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } } } <file_sep>/Google.Protobuf.Reflection/EnumValueOptions.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class EnumValueOptions : IMessage, IMessage<EnumValueOptions>, IEquatable<EnumValueOptions>, IDeepCloneable<EnumValueOptions> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly EnumValueOptions.__c __9 = new EnumValueOptions.__c(); internal EnumValueOptions cctor>b__29_0() { return new EnumValueOptions(); } } private static readonly MessageParser<EnumValueOptions> _parser = new MessageParser<EnumValueOptions>(new Func<EnumValueOptions>(EnumValueOptions.__c.__9.<.cctor>b__29_0)); public const int DeprecatedFieldNumber = 1; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.Reflection.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<EnumValueOptions> Parser { get { return EnumValueOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[13]; } } MessageDescriptor IMessage.Descriptor { get { return EnumValueOptions.Descriptor; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public EnumValueOptions() { } public EnumValueOptions(EnumValueOptions other) : this() { this.deprecated_ = other.deprecated_; this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); } public EnumValueOptions Clone() { return new EnumValueOptions(this); } public override bool Equals(object other) { return this.Equals(other as EnumValueOptions); } public bool Equals(EnumValueOptions other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 112232859) % 9) { case 0: arg_72_0 = ((this.Deprecated == other.Deprecated) ? 1914373914 : 516822198); continue; case 1: goto IL_B0; case 2: return true; case 3: arg_72_0 = (this.uninterpretedOption_.Equals(other.uninterpretedOption_) ? 1143907871 : 378601625); continue; case 4: return false; case 5: return false; case 6: return false; case 8: goto IL_15; } break; } return true; IL_15: arg_72_0 = 2118201144; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1000512455 : 1842659762); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.Deprecated) { goto IL_2C; } goto IL_52; uint arg_36_0; while (true) { IL_31: uint num2; switch ((num2 = (arg_36_0 ^ 1125966526u)) % 4u) { case 0u: goto IL_2C; case 1u: goto IL_52; case 2u: num ^= this.Deprecated.GetHashCode(); arg_36_0 = (num2 * 1753158237u ^ 2182088965u); continue; } break; } return num; IL_2C: arg_36_0 = 1951907892u; goto IL_31; IL_52: num ^= this.uninterpretedOption_.GetHashCode(); arg_36_0 = 582789725u; goto IL_31; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Deprecated) { while (true) { IL_5A: uint arg_3E_0 = 2604806158u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 2607449397u)) % 4u) { case 0u: goto IL_5A; case 1u: output.WriteBool(this.Deprecated); arg_3E_0 = (num * 3148371814u ^ 2433607889u); continue; case 3u: output.WriteRawTag(8); arg_3E_0 = (num * 1786734334u ^ 736276914u); continue; } goto Block_2; } } Block_2:; } this.uninterpretedOption_.WriteTo(output, EnumValueOptions._repeated_uninterpretedOption_codec); } public int CalculateSize() { int num = 0; while (true) { IL_5F: uint arg_43_0 = 850947573u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 130303860u)) % 4u) { case 0u: num += 2; arg_43_0 = (num2 * 4245717394u ^ 3482298782u); continue; case 1u: arg_43_0 = (((!this.Deprecated) ? 2600590822u : 2637173428u) ^ num2 * 134263336u); continue; case 3u: goto IL_5F; } goto Block_2; } } Block_2: return num + this.uninterpretedOption_.CalculateSize(EnumValueOptions._repeated_uninterpretedOption_codec); } public void MergeFrom(EnumValueOptions other) { if (other == null) { goto IL_45; } goto IL_7F; uint arg_4F_0; while (true) { IL_4A: uint num; switch ((num = (arg_4F_0 ^ 551838217u)) % 6u) { case 0u: goto IL_7F; case 1u: return; case 2u: goto IL_45; case 4u: this.Deprecated = other.Deprecated; arg_4F_0 = (num * 2571772505u ^ 819088540u); continue; case 5u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_4F_0 = 1329798078u; continue; } break; } return; IL_45: arg_4F_0 = 783641012u; goto IL_4A; IL_7F: arg_4F_0 = (other.Deprecated ? 666919087u : 218676010u); goto IL_4A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_10B: uint num; uint arg_C7_0 = ((num = input.ReadTag()) != 0u) ? 603123006u : 1419274826u; while (true) { uint num2; switch ((num2 = (arg_C7_0 ^ 514801088u)) % 10u) { case 0u: input.SkipLastField(); arg_C7_0 = (num2 * 1304296175u ^ 503759671u); continue; case 1u: this.Deprecated = input.ReadBool(); arg_C7_0 = 1994466746u; continue; case 2u: goto IL_10B; case 3u: arg_C7_0 = 603123006u; continue; case 5u: this.uninterpretedOption_.AddEntriesFrom(input, EnumValueOptions._repeated_uninterpretedOption_codec); arg_C7_0 = 381322450u; continue; case 6u: arg_C7_0 = ((num != 8u) ? 981856979u : 1014376005u); continue; case 7u: arg_C7_0 = (num2 * 2635247053u ^ 542743533u); continue; case 8u: arg_C7_0 = (num2 * 364549348u ^ 3236089978u); continue; case 9u: arg_C7_0 = (((num == 7994u) ? 1613855263u : 1415847954u) ^ num2 * 194241794u); continue; } return; } } } } } <file_sep>/Framework.Database.Auth.Entities/Module.cs using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Framework.Database.Auth.Entities { public class Module { [Key, Column(Order = 0)] public string Hash { get; set; } public string Type { get; set; } public int Size { get; set; } public string Data { get; set; } } } <file_sep>/Google.Protobuf.Reflection/DescriptorUtil.cs using System; using System.Collections.Generic; using System.Collections.ObjectModel; namespace Google.Protobuf.Reflection { internal static class DescriptorUtil { internal delegate TOutput IndexedConverter<TInput, TOutput>(TInput element, int index); internal static IList<TOutput> ConvertAndMakeReadOnly<TInput, TOutput>(IList<TInput> input, DescriptorUtil.IndexedConverter<TInput, TOutput> converter) { TOutput[] array = new TOutput[input.Count]; while (true) { IL_97: uint arg_73_0 = 3331546075u; while (true) { uint num; switch ((num = (arg_73_0 ^ 2467315675u)) % 6u) { case 0u: goto IL_97; case 2u: { int num2; arg_73_0 = ((num2 < array.Length) ? 3643342010u : 2445283146u); continue; } case 3u: arg_73_0 = (num * 2761093046u ^ 1075757647u); continue; case 4u: { int num2 = 0; arg_73_0 = (num * 2613492090u ^ 3110948942u); continue; } case 5u: { int num2; array[num2] = converter(input[num2], num2); num2++; arg_73_0 = 3403496609u; continue; } } goto Block_2; } } Block_2: return new ReadOnlyCollection<TOutput>(array); } } } <file_sep>/Google.Protobuf.Reflection/ServiceDescriptorProto.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class ServiceDescriptorProto : IMessage, IMessage<ServiceDescriptorProto>, IEquatable<ServiceDescriptorProto>, IDeepCloneable<ServiceDescriptorProto> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServiceDescriptorProto.__c __9 = new ServiceDescriptorProto.__c(); internal ServiceDescriptorProto cctor>b__34_0() { return new ServiceDescriptorProto(); } } private static readonly MessageParser<ServiceDescriptorProto> _parser = new MessageParser<ServiceDescriptorProto>(new Func<ServiceDescriptorProto>(ServiceDescriptorProto.__c.__9.<.cctor>b__34_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int MethodFieldNumber = 2; private static readonly FieldCodec<MethodDescriptorProto> _repeated_method_codec = FieldCodec.ForMessage<MethodDescriptorProto>(18u, MethodDescriptorProto.Parser); private readonly RepeatedField<MethodDescriptorProto> method_ = new RepeatedField<MethodDescriptorProto>(); public const int OptionsFieldNumber = 3; private ServiceOptions options_; public static MessageParser<ServiceDescriptorProto> Parser { get { return ServiceDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return ServiceDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public RepeatedField<MethodDescriptorProto> Method { get { return this.method_; } } public ServiceOptions Options { get { return this.options_; } set { this.options_ = value; } } public ServiceDescriptorProto() { } public ServiceDescriptorProto(ServiceDescriptorProto other) : this() { while (true) { IL_76: uint arg_5A_0 = 2586985462u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 2388799341u)) % 4u) { case 0u: goto IL_76; case 1u: this.method_ = other.method_.Clone(); this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_5A_0 = 3774063975u; continue; case 3u: this.name_ = other.name_; arg_5A_0 = (num * 2319117189u ^ 1741594619u); continue; } return; } } } public ServiceDescriptorProto Clone() { return new ServiceDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as ServiceDescriptorProto); } public bool Equals(ServiceDescriptorProto other) { if (other == null) { goto IL_9F; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ -970905173) % 11) { case 0: goto IL_9F; case 1: arg_A9_0 = ((!ServiceDescriptorProto.smethod_1(this.Options, other.Options)) ? -2045948823 : -312514582); continue; case 2: arg_A9_0 = (this.method_.Equals(other.method_) ? -463065643 : -230025904); continue; case 3: return false; case 4: return false; case 5: return false; case 6: arg_A9_0 = (ServiceDescriptorProto.smethod_0(this.Name, other.Name) ? -729311781 : -601466993); continue; case 7: goto IL_EF; case 8: return false; case 10: return true; } break; } return true; IL_9F: arg_A9_0 = -731713897; goto IL_A4; IL_EF: arg_A9_0 = ((other != this) ? -1060075145 : -229055960); goto IL_A4; } public override int GetHashCode() { int num = 1; while (true) { IL_D8: uint arg_B0_0 = 1230941280u; while (true) { uint num2; switch ((num2 = (arg_B0_0 ^ 1412037554u)) % 7u) { case 0u: num ^= ServiceDescriptorProto.smethod_3(this.Options); arg_B0_0 = (num2 * 80171073u ^ 1257325832u); continue; case 1u: num ^= ServiceDescriptorProto.smethod_3(this.Name); arg_B0_0 = (num2 * 4024418969u ^ 1797240542u); continue; case 2u: num ^= ServiceDescriptorProto.smethod_3(this.method_); arg_B0_0 = 1132526429u; continue; case 4u: goto IL_D8; case 5u: arg_B0_0 = (((this.options_ == null) ? 3605031520u : 3182659546u) ^ num2 * 743664156u); continue; case 6u: arg_B0_0 = (((ServiceDescriptorProto.smethod_2(this.Name) != 0) ? 4082454613u : 3334646929u) ^ num2 * 4093383311u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (ServiceDescriptorProto.smethod_2(this.Name) != 0) { goto IL_10; } goto IL_C0; uint arg_98_0; while (true) { IL_93: uint num; switch ((num = (arg_98_0 ^ 2829698966u)) % 7u) { case 0u: arg_98_0 = (((this.options_ != null) ? 766220131u : 1819722215u) ^ num * 2372394189u); continue; case 1u: output.WriteString(this.Name); arg_98_0 = (num * 4052645365u ^ 1853187415u); continue; case 2u: goto IL_C0; case 3u: output.WriteRawTag(10); arg_98_0 = (num * 1549800187u ^ 2430512550u); continue; case 5u: output.WriteRawTag(26); output.WriteMessage(this.Options); arg_98_0 = (num * 733255398u ^ 1310857037u); continue; case 6u: goto IL_10; } break; } return; IL_10: arg_98_0 = 3672656648u; goto IL_93; IL_C0: this.method_.WriteTo(output, ServiceDescriptorProto._repeated_method_codec); arg_98_0 = 2875683514u; goto IL_93; } public int CalculateSize() { int num = 0; while (true) { IL_E4: uint arg_BC_0 = 3299074281u; while (true) { uint num2; switch ((num2 = (arg_BC_0 ^ 3111380719u)) % 7u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_BC_0 = (num2 * 2083372716u ^ 1838700643u); continue; case 2u: num += this.method_.CalculateSize(ServiceDescriptorProto._repeated_method_codec); arg_BC_0 = 2514848954u; continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_BC_0 = (num2 * 534223073u ^ 1634311468u); continue; case 4u: arg_BC_0 = (((ServiceDescriptorProto.smethod_2(this.Name) != 0) ? 3661480746u : 3659165769u) ^ num2 * 884705413u); continue; case 5u: goto IL_E4; case 6u: arg_BC_0 = (((this.options_ == null) ? 798452100u : 776353969u) ^ num2 * 2513813583u); continue; } return num; } } return num; } public void MergeFrom(ServiceDescriptorProto other) { if (other == null) { goto IL_18; } goto IL_110; uint arg_D0_0; while (true) { IL_CB: uint num; switch ((num = (arg_D0_0 ^ 76899549u)) % 9u) { case 0u: this.Name = other.Name; arg_D0_0 = (num * 1661702705u ^ 4277102814u); continue; case 1u: arg_D0_0 = (((this.options_ != null) ? 3719548682u : 4132882642u) ^ num * 1396069832u); continue; case 2u: goto IL_110; case 3u: this.Options.MergeFrom(other.Options); arg_D0_0 = 39188689u; continue; case 4u: this.method_.Add(other.method_); arg_D0_0 = ((other.options_ == null) ? 39188689u : 707141619u); continue; case 5u: return; case 7u: this.options_ = new ServiceOptions(); arg_D0_0 = (num * 1171976742u ^ 3964448544u); continue; case 8u: goto IL_18; } break; } return; IL_18: arg_D0_0 = 2051598818u; goto IL_CB; IL_110: arg_D0_0 = ((ServiceDescriptorProto.smethod_2(other.Name) != 0) ? 186618578u : 1736297985u); goto IL_CB; } public void MergeFrom(CodedInputStream input) { while (true) { IL_189: uint num; uint arg_139_0 = ((num = input.ReadTag()) == 0u) ? 1496254667u : 1894080383u; while (true) { uint num2; switch ((num2 = (arg_139_0 ^ 1516660814u)) % 13u) { case 0u: this.options_ = new ServiceOptions(); arg_139_0 = (num2 * 1684874330u ^ 3315057721u); continue; case 1u: arg_139_0 = (((num == 26u) ? 327529535u : 1625890257u) ^ num2 * 2593732578u); continue; case 2u: goto IL_189; case 3u: arg_139_0 = (num2 * 3568166799u ^ 1393424897u); continue; case 4u: arg_139_0 = ((num == 10u) ? 585934801u : 977609382u); continue; case 5u: input.SkipLastField(); arg_139_0 = (num2 * 2144696599u ^ 3682943242u); continue; case 6u: input.ReadMessage(this.options_); arg_139_0 = 1289630422u; continue; case 7u: arg_139_0 = (((num == 18u) ? 590631455u : 2047599332u) ^ num2 * 1743976368u); continue; case 8u: this.Name = input.ReadString(); arg_139_0 = 1289630422u; continue; case 9u: this.method_.AddEntriesFrom(input, ServiceDescriptorProto._repeated_method_codec); arg_139_0 = 1289630422u; continue; case 11u: arg_139_0 = ((this.options_ == null) ? 344019157u : 581531207u); continue; case 12u: arg_139_0 = 1894080383u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants.Net/AuthServerMessage.cs using System; namespace Framework.Constants.Net { public enum AuthServerMessage : ushort { Pong, Complete = 0, ProofRequest = 2, RealmUpdate = 2, JoinResponse = 8 } } <file_sep>/Bgs.Protocol.Friends.V1/SubscribeResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class SubscribeResponse : IMessage<SubscribeResponse>, IEquatable<SubscribeResponse>, IDeepCloneable<SubscribeResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscribeResponse.__c __9 = new SubscribeResponse.__c(); internal SubscribeResponse cctor>b__54_0() { return new SubscribeResponse(); } } private static readonly MessageParser<SubscribeResponse> _parser = new MessageParser<SubscribeResponse>(new Func<SubscribeResponse>(SubscribeResponse.__c.__9.<.cctor>b__54_0)); public const int MaxFriendsFieldNumber = 1; private uint maxFriends_; public const int MaxReceivedInvitationsFieldNumber = 2; private uint maxReceivedInvitations_; public const int MaxSentInvitationsFieldNumber = 3; private uint maxSentInvitations_; public const int RoleFieldNumber = 4; private static readonly FieldCodec<Role> _repeated_role_codec; private readonly RepeatedField<Role> role_ = new RepeatedField<Role>(); public const int FriendsFieldNumber = 5; private static readonly FieldCodec<Friend> _repeated_friends_codec; private readonly RepeatedField<Friend> friends_ = new RepeatedField<Friend>(); public const int SentInvitationsFieldNumber = 6; private static readonly FieldCodec<Invitation> _repeated_sentInvitations_codec; private readonly RepeatedField<Invitation> sentInvitations_ = new RepeatedField<Invitation>(); public const int ReceivedInvitationsFieldNumber = 7; private static readonly FieldCodec<Invitation> _repeated_receivedInvitations_codec; private readonly RepeatedField<Invitation> receivedInvitations_ = new RepeatedField<Invitation>(); public static MessageParser<SubscribeResponse> Parser { get { return SubscribeResponse._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return SubscribeResponse.Descriptor; } } public uint MaxFriends { get { return this.maxFriends_; } set { this.maxFriends_ = value; } } public uint MaxReceivedInvitations { get { return this.maxReceivedInvitations_; } set { this.maxReceivedInvitations_ = value; } } public uint MaxSentInvitations { get { return this.maxSentInvitations_; } set { this.maxSentInvitations_ = value; } } public RepeatedField<Role> Role { get { return this.role_; } } public RepeatedField<Friend> Friends { get { return this.friends_; } } public RepeatedField<Invitation> SentInvitations { get { return this.sentInvitations_; } } public RepeatedField<Invitation> ReceivedInvitations { get { return this.receivedInvitations_; } } public SubscribeResponse() { } public SubscribeResponse(SubscribeResponse other) : this() { while (true) { IL_FF: uint arg_D3_0 = 3584512415u; while (true) { uint num; switch ((num = (arg_D3_0 ^ 2282524930u)) % 8u) { case 1u: this.role_ = other.role_.Clone(); arg_D3_0 = (num * 132247182u ^ 1245157122u); continue; case 2u: this.receivedInvitations_ = other.receivedInvitations_.Clone(); arg_D3_0 = (num * 2056307136u ^ 2641458386u); continue; case 3u: this.sentInvitations_ = other.sentInvitations_.Clone(); arg_D3_0 = (num * 3260475558u ^ 444535890u); continue; case 4u: goto IL_FF; case 5u: this.maxFriends_ = other.maxFriends_; arg_D3_0 = (num * 758522041u ^ 2360585560u); continue; case 6u: this.friends_ = other.friends_.Clone(); arg_D3_0 = (num * 613721820u ^ 3293575905u); continue; case 7u: this.maxReceivedInvitations_ = other.maxReceivedInvitations_; this.maxSentInvitations_ = other.maxSentInvitations_; arg_D3_0 = (num * 2830848764u ^ 536033423u); continue; } return; } } } public SubscribeResponse Clone() { return new SubscribeResponse(this); } public override bool Equals(object other) { return this.Equals(other as SubscribeResponse); } public bool Equals(SubscribeResponse other) { if (other == null) { goto IL_6C; } goto IL_1BC; int arg_156_0; while (true) { IL_151: switch ((arg_156_0 ^ -1240186688) % 19) { case 0: arg_156_0 = ((!this.sentInvitations_.Equals(other.sentInvitations_)) ? -661707746 : -1085958667); continue; case 1: return false; case 2: return false; case 3: arg_156_0 = ((!this.friends_.Equals(other.friends_)) ? -102362351 : -1837563698); continue; case 4: return false; case 5: arg_156_0 = (this.role_.Equals(other.role_) ? -163297781 : -112412912); continue; case 6: arg_156_0 = (this.receivedInvitations_.Equals(other.receivedInvitations_) ? -2068305712 : -1257212931); continue; case 7: return false; case 8: return false; case 9: return false; case 10: return false; case 11: return true; case 12: arg_156_0 = ((this.MaxReceivedInvitations == other.MaxReceivedInvitations) ? -1513696353 : -2137119602); continue; case 13: return false; case 14: goto IL_6C; case 16: goto IL_1BC; case 17: arg_156_0 = ((this.MaxSentInvitations == other.MaxSentInvitations) ? -1469556255 : -354072313); continue; case 18: arg_156_0 = ((this.MaxFriends == other.MaxFriends) ? -1771171313 : -1466906389); continue; } break; } return true; IL_6C: arg_156_0 = -1128236096; goto IL_151; IL_1BC: arg_156_0 = ((other == this) ? -765337666 : -1422271461); goto IL_151; } public override int GetHashCode() { int num = 1; while (true) { IL_145: uint arg_110_0 = 770297391u; while (true) { uint num2; switch ((num2 = (arg_110_0 ^ 681567681u)) % 10u) { case 0u: goto IL_145; case 1u: num ^= this.role_.GetHashCode(); arg_110_0 = 1967323968u; continue; case 2u: arg_110_0 = ((this.MaxSentInvitations == 0u) ? 1479099886u : 1638730612u); continue; case 3u: num ^= this.friends_.GetHashCode(); arg_110_0 = (num2 * 2491802148u ^ 2752874861u); continue; case 4u: arg_110_0 = (((this.MaxFriends == 0u) ? 4226170423u : 3486281312u) ^ num2 * 3677288335u); continue; case 5u: num ^= this.MaxReceivedInvitations.GetHashCode(); arg_110_0 = (num2 * 2731327931u ^ 1482270952u); continue; case 6u: arg_110_0 = ((this.MaxReceivedInvitations == 0u) ? 1729546025u : 697871218u); continue; case 7u: num ^= this.MaxSentInvitations.GetHashCode(); arg_110_0 = (num2 * 2106976479u ^ 1680060997u); continue; case 9u: num ^= this.MaxFriends.GetHashCode(); arg_110_0 = (num2 * 3381588695u ^ 928648816u); continue; } goto Block_4; } } Block_4: num ^= this.sentInvitations_.GetHashCode(); return num ^ this.receivedInvitations_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.MaxFriends != 0u) { goto IL_D3; } goto IL_16E; uint arg_126_0; while (true) { IL_121: uint num; switch ((num = (arg_126_0 ^ 2371016073u)) % 11u) { case 0u: goto IL_16E; case 1u: this.friends_.WriteTo(output, SubscribeResponse._repeated_friends_codec); this.sentInvitations_.WriteTo(output, SubscribeResponse._repeated_sentInvitations_codec); arg_126_0 = (num * 3309869807u ^ 3477276356u); continue; case 2u: this.role_.WriteTo(output, SubscribeResponse._repeated_role_codec); arg_126_0 = 3729266820u; continue; case 3u: goto IL_D3; case 5u: output.WriteRawTag(8); arg_126_0 = (num * 633348929u ^ 521134062u); continue; case 6u: output.WriteRawTag(24); output.WriteUInt32(this.MaxSentInvitations); arg_126_0 = (num * 869942304u ^ 356946308u); continue; case 7u: arg_126_0 = ((this.MaxSentInvitations != 0u) ? 3968607542u : 2519745124u); continue; case 8u: output.WriteUInt32(this.MaxReceivedInvitations); arg_126_0 = (num * 4082082970u ^ 1864406721u); continue; case 9u: output.WriteRawTag(16); arg_126_0 = (num * 2172380600u ^ 1994033571u); continue; case 10u: output.WriteUInt32(this.MaxFriends); arg_126_0 = (num * 2535414251u ^ 2559435476u); continue; } break; } this.receivedInvitations_.WriteTo(output, SubscribeResponse._repeated_receivedInvitations_codec); return; IL_D3: arg_126_0 = 4181202368u; goto IL_121; IL_16E: arg_126_0 = ((this.MaxReceivedInvitations == 0u) ? 4151180997u : 2313563893u); goto IL_121; } public int CalculateSize() { int num = 0; if (this.MaxFriends != 0u) { goto IL_5E; } goto IL_155; uint arg_111_0; while (true) { IL_10C: uint num2; switch ((num2 = (arg_111_0 ^ 2153784225u)) % 10u) { case 0u: arg_111_0 = ((this.MaxSentInvitations == 0u) ? 3903773293u : 3804954760u); continue; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxFriends); arg_111_0 = (num2 * 1273035955u ^ 1427474376u); continue; case 2u: num += this.sentInvitations_.CalculateSize(SubscribeResponse._repeated_sentInvitations_codec); arg_111_0 = (num2 * 488677549u ^ 1011124788u); continue; case 3u: num += this.friends_.CalculateSize(SubscribeResponse._repeated_friends_codec); arg_111_0 = (num2 * 2919195349u ^ 1751619118u); continue; case 4u: goto IL_155; case 5u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxSentInvitations); arg_111_0 = (num2 * 3920001858u ^ 792140287u); continue; case 6u: goto IL_5E; case 7u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxReceivedInvitations); arg_111_0 = (num2 * 1902258947u ^ 1125207528u); continue; case 8u: num += this.role_.CalculateSize(SubscribeResponse._repeated_role_codec); arg_111_0 = 3683524076u; continue; } break; } return num + this.receivedInvitations_.CalculateSize(SubscribeResponse._repeated_receivedInvitations_codec); IL_5E: arg_111_0 = 2989020200u; goto IL_10C; IL_155: arg_111_0 = ((this.MaxReceivedInvitations != 0u) ? 3686759066u : 2283911513u); goto IL_10C; } public void MergeFrom(SubscribeResponse other) { if (other == null) { goto IL_3C; } goto IL_152; uint arg_10A_0; while (true) { IL_105: uint num; switch ((num = (arg_10A_0 ^ 1599954736u)) % 11u) { case 1u: arg_10A_0 = ((other.MaxReceivedInvitations == 0u) ? 1235285163u : 1686288112u); continue; case 2u: this.MaxSentInvitations = other.MaxSentInvitations; arg_10A_0 = (num * 674973541u ^ 1358917585u); continue; case 3u: this.MaxReceivedInvitations = other.MaxReceivedInvitations; arg_10A_0 = (num * 3791680912u ^ 3395864747u); continue; case 4u: this.friends_.Add(other.friends_); this.sentInvitations_.Add(other.sentInvitations_); arg_10A_0 = (num * 263194770u ^ 2004665933u); continue; case 5u: this.role_.Add(other.role_); arg_10A_0 = 462658864u; continue; case 6u: this.MaxFriends = other.MaxFriends; arg_10A_0 = (num * 3568081422u ^ 3505254487u); continue; case 7u: goto IL_3C; case 8u: arg_10A_0 = ((other.MaxSentInvitations != 0u) ? 1302248492u : 575025629u); continue; case 9u: return; case 10u: goto IL_152; } break; } this.receivedInvitations_.Add(other.receivedInvitations_); return; IL_3C: arg_10A_0 = 174480859u; goto IL_105; IL_152: arg_10A_0 = ((other.MaxFriends != 0u) ? 1020068084u : 601674991u); goto IL_105; } public void MergeFrom(CodedInputStream input) { while (true) { IL_32A: uint num; uint arg_2A2_0 = ((num = input.ReadTag()) == 0u) ? 3933796239u : 3662104285u; while (true) { uint num2; switch ((num2 = (arg_2A2_0 ^ 2690910311u)) % 27u) { case 0u: this.MaxSentInvitations = input.ReadUInt32(); arg_2A2_0 = 3665186450u; continue; case 2u: this.friends_.AddEntriesFrom(input, SubscribeResponse._repeated_friends_codec); arg_2A2_0 = 4198914313u; continue; case 3u: this.MaxFriends = input.ReadUInt32(); arg_2A2_0 = 3418466325u; continue; case 4u: arg_2A2_0 = (num2 * 3358338042u ^ 3462516585u); continue; case 5u: arg_2A2_0 = ((num <= 42u) ? 2289982910u : 3035844902u); continue; case 6u: goto IL_32A; case 7u: arg_2A2_0 = (num2 * 4204469743u ^ 2950527125u); continue; case 8u: this.receivedInvitations_.AddEntriesFrom(input, SubscribeResponse._repeated_receivedInvitations_codec); arg_2A2_0 = 4198914313u; continue; case 9u: this.role_.AddEntriesFrom(input, SubscribeResponse._repeated_role_codec); arg_2A2_0 = 2657868867u; continue; case 10u: arg_2A2_0 = (num2 * 605748011u ^ 3038570180u); continue; case 11u: arg_2A2_0 = (((num == 24u) ? 2577919741u : 4231834133u) ^ num2 * 1809929950u); continue; case 12u: arg_2A2_0 = (((num == 16u) ? 2153381980u : 4092976481u) ^ num2 * 2631475800u); continue; case 13u: this.MaxReceivedInvitations = input.ReadUInt32(); arg_2A2_0 = 4198914313u; continue; case 14u: arg_2A2_0 = (((num == 34u) ? 3481065387u : 2541484252u) ^ num2 * 2430137821u); continue; case 15u: arg_2A2_0 = (num2 * 152635439u ^ 2185305270u); continue; case 16u: input.SkipLastField(); arg_2A2_0 = 3992497942u; continue; case 17u: arg_2A2_0 = (num2 * 3471503868u ^ 2600085285u); continue; case 18u: arg_2A2_0 = (num2 * 1957232401u ^ 3924257947u); continue; case 19u: arg_2A2_0 = ((num > 24u) ? 3275295433u : 4084618772u); continue; case 20u: arg_2A2_0 = (((num == 58u) ? 863162346u : 1290016214u) ^ num2 * 2720830260u); continue; case 21u: arg_2A2_0 = (num2 * 2004459726u ^ 1574197880u); continue; case 22u: arg_2A2_0 = ((num == 50u) ? 3852916711u : 3923369215u); continue; case 23u: arg_2A2_0 = 3662104285u; continue; case 24u: arg_2A2_0 = (((num == 42u) ? 2289987071u : 2173855296u) ^ num2 * 653794789u); continue; case 25u: arg_2A2_0 = (((num == 8u) ? 2866374861u : 3613268148u) ^ num2 * 3651973384u); continue; case 26u: this.sentInvitations_.AddEntriesFrom(input, SubscribeResponse._repeated_sentInvitations_codec); arg_2A2_0 = 3119009431u; continue; } return; } } } static SubscribeResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_8C: uint arg_70_0 = 1444800572u; while (true) { uint num; switch ((num = (arg_70_0 ^ 318744889u)) % 4u) { case 0u: goto IL_8C; case 1u: SubscribeResponse._repeated_role_codec = FieldCodec.ForMessage<Role>(34u, Bgs.Protocol.Role.Parser); SubscribeResponse._repeated_friends_codec = FieldCodec.ForMessage<Friend>(42u, Friend.Parser); arg_70_0 = (num * 541726256u ^ 3247950670u); continue; case 3u: SubscribeResponse._repeated_sentInvitations_codec = FieldCodec.ForMessage<Invitation>(50u, Invitation.Parser); arg_70_0 = (num * 3868157226u ^ 1373032533u); continue; } goto Block_1; } } Block_1: SubscribeResponse._repeated_receivedInvitations_codec = FieldCodec.ForMessage<Invitation>(58u, Invitation.Parser); } } } <file_sep>/Bgs.Protocol/AccountInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class AccountInfo : IMessage<AccountInfo>, IEquatable<AccountInfo>, IDeepCloneable<AccountInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountInfo.__c __9 = new AccountInfo.__c(); internal AccountInfo cctor>b__49_0() { return new AccountInfo(); } } private static readonly MessageParser<AccountInfo> _parser = new MessageParser<AccountInfo>(new Func<AccountInfo>(AccountInfo.__c.__9.<.cctor>b__49_0)); public const int AccountPaidFieldNumber = 1; private bool accountPaid_; public const int CountryIdFieldNumber = 2; private uint countryId_; public const int BattleTagFieldNumber = 3; private string battleTag_ = ""; public const int ManualReviewFieldNumber = 4; private bool manualReview_; public const int IdentityFieldNumber = 5; private Identity identity_; public const int AccountMutedFieldNumber = 6; private bool accountMuted_; public static MessageParser<AccountInfo> Parser { get { return AccountInfo._parser; } } public static MessageDescriptor Descriptor { get { return EntityTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return AccountInfo.Descriptor; } } public bool AccountPaid { get { return this.accountPaid_; } set { this.accountPaid_ = value; } } public uint CountryId { get { return this.countryId_; } set { this.countryId_ = value; } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool ManualReview { get { return this.manualReview_; } set { this.manualReview_ = value; } } public Identity Identity { get { return this.identity_; } set { this.identity_ = value; } } public bool AccountMuted { get { return this.accountMuted_; } set { this.accountMuted_ = value; } } public AccountInfo() { } public AccountInfo(AccountInfo other) : this() { while (true) { IL_8B: uint arg_6B_0 = 1226152285u; while (true) { uint num; switch ((num = (arg_6B_0 ^ 383966984u)) % 5u) { case 0u: goto IL_8B; case 1u: this.countryId_ = other.countryId_; this.battleTag_ = other.battleTag_; arg_6B_0 = (num * 1303063284u ^ 1495185889u); continue; case 2u: this.accountPaid_ = other.accountPaid_; arg_6B_0 = (num * 2906765502u ^ 1568155813u); continue; case 3u: this.manualReview_ = other.manualReview_; arg_6B_0 = (num * 56701258u ^ 3827539971u); continue; } goto Block_1; } } Block_1: this.Identity = ((other.identity_ != null) ? other.Identity.Clone() : null); this.accountMuted_ = other.accountMuted_; } public AccountInfo Clone() { return new AccountInfo(this); } public override bool Equals(object other) { return this.Equals(other as AccountInfo); } public bool Equals(AccountInfo other) { if (other == null) { goto IL_A0; } goto IL_17D; int arg_11F_0; while (true) { IL_11A: switch ((arg_11F_0 ^ -1446213176) % 17) { case 0: return true; case 1: return false; case 2: return false; case 3: arg_11F_0 = ((this.ManualReview == other.ManualReview) ? -1032075495 : -1486551266); continue; case 4: return false; case 5: arg_11F_0 = ((this.AccountPaid == other.AccountPaid) ? -2030893801 : -1222297370); continue; case 6: goto IL_17D; case 7: arg_11F_0 = ((this.AccountMuted == other.AccountMuted) ? -204118446 : -2267457); continue; case 8: return false; case 9: goto IL_A0; case 10: return false; case 11: arg_11F_0 = (AccountInfo.smethod_0(this.BattleTag, other.BattleTag) ? -47535640 : -978693882); continue; case 12: return false; case 13: return false; case 14: arg_11F_0 = ((this.CountryId != other.CountryId) ? -776955049 : -1561107326); continue; case 16: arg_11F_0 = (AccountInfo.smethod_1(this.Identity, other.Identity) ? -1041831010 : -1814257051); continue; } break; } return true; IL_A0: arg_11F_0 = -667318091; goto IL_11A; IL_17D: arg_11F_0 = ((other != this) ? -1434840396 : -1869876481); goto IL_11A; } public override int GetHashCode() { int num = 1; if (this.AccountPaid) { goto IL_F4; } goto IL_1D4; uint arg_184_0; while (true) { IL_17F: uint num2; switch ((num2 = (arg_184_0 ^ 3109503115u)) % 13u) { case 0u: goto IL_1D4; case 1u: arg_184_0 = ((!this.ManualReview) ? 2237091721u : 4039113313u); continue; case 2u: arg_184_0 = ((this.identity_ == null) ? 2200419523u : 3375047175u); continue; case 3u: num ^= this.AccountMuted.GetHashCode(); arg_184_0 = (num2 * 3253824608u ^ 3053126659u); continue; case 4u: arg_184_0 = (this.AccountMuted ? 2918086254u : 2395551203u); continue; case 5u: goto IL_F4; case 6u: num ^= this.AccountPaid.GetHashCode(); arg_184_0 = (num2 * 4128534398u ^ 984653995u); continue; case 7u: num ^= this.CountryId.GetHashCode(); arg_184_0 = (num2 * 788223343u ^ 2822702838u); continue; case 8u: num ^= this.BattleTag.GetHashCode(); arg_184_0 = (num2 * 3769597176u ^ 1571805169u); continue; case 10u: arg_184_0 = ((this.BattleTag.Length != 0) ? 2147988335u : 2831508241u); continue; case 11u: num ^= this.Identity.GetHashCode(); arg_184_0 = (num2 * 316371058u ^ 727883419u); continue; case 12u: num ^= this.ManualReview.GetHashCode(); arg_184_0 = (num2 * 2057658846u ^ 3324088165u); continue; } break; } return num; IL_F4: arg_184_0 = 2512670171u; goto IL_17F; IL_1D4: arg_184_0 = ((this.CountryId == 0u) ? 4156619256u : 3180263001u); goto IL_17F; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.AccountPaid) { goto IL_41; } goto IL_225; uint arg_1C9_0; while (true) { IL_1C4: uint num; switch ((num = (arg_1C9_0 ^ 1970039153u)) % 16u) { case 0u: output.WriteBool(this.ManualReview); arg_1C9_0 = (num * 490233699u ^ 4251193978u); continue; case 1u: output.WriteRawTag(42); arg_1C9_0 = (num * 3759737133u ^ 49692360u); continue; case 2u: output.WriteBool(this.AccountMuted); arg_1C9_0 = (num * 1893858779u ^ 1142958765u); continue; case 3u: output.WriteRawTag(26); output.WriteString(this.BattleTag); arg_1C9_0 = (num * 3860963783u ^ 2654747227u); continue; case 4u: output.WriteMessage(this.Identity); arg_1C9_0 = (num * 1981656809u ^ 998057170u); continue; case 5u: output.WriteRawTag(21); output.WriteFixed32(this.CountryId); arg_1C9_0 = (num * 742392008u ^ 2944345039u); continue; case 6u: arg_1C9_0 = ((AccountInfo.smethod_2(this.BattleTag) == 0) ? 300947550u : 1045542050u); continue; case 7u: arg_1C9_0 = (this.AccountMuted ? 237442825u : 1315476795u); continue; case 8u: output.WriteRawTag(48); arg_1C9_0 = (num * 3896638193u ^ 4069234219u); continue; case 9u: output.WriteRawTag(32); arg_1C9_0 = (num * 62325700u ^ 3990507877u); continue; case 11u: arg_1C9_0 = ((this.identity_ != null) ? 780728384u : 152046870u); continue; case 12u: output.WriteRawTag(8); output.WriteBool(this.AccountPaid); arg_1C9_0 = (num * 3896038350u ^ 1686855828u); continue; case 13u: goto IL_225; case 14u: goto IL_41; case 15u: arg_1C9_0 = ((!this.ManualReview) ? 584715562u : 709179352u); continue; } break; } return; IL_41: arg_1C9_0 = 1099948525u; goto IL_1C4; IL_225: arg_1C9_0 = ((this.CountryId != 0u) ? 1500258980u : 1577328039u); goto IL_1C4; } public int CalculateSize() { int num = 0; while (true) { IL_1C1: uint arg_17C_0 = 2674401755u; while (true) { uint num2; switch ((num2 = (arg_17C_0 ^ 3177189115u)) % 14u) { case 0u: arg_17C_0 = (this.ManualReview ? 3904407418u : 3999617471u); continue; case 1u: arg_17C_0 = ((!this.AccountMuted) ? 4071364565u : 2575299501u); continue; case 2u: arg_17C_0 = ((this.identity_ == null) ? 2234446268u : 4268384194u); continue; case 3u: num += 2; arg_17C_0 = (num2 * 4034742325u ^ 1357873988u); continue; case 4u: arg_17C_0 = (((!this.AccountPaid) ? 478260637u : 904326254u) ^ num2 * 1489856263u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_17C_0 = (num2 * 1208316776u ^ 4221205431u); continue; case 6u: num += 2; arg_17C_0 = (num2 * 3922223841u ^ 3269755715u); continue; case 7u: goto IL_1C1; case 8u: arg_17C_0 = ((this.CountryId != 0u) ? 3857878676u : 2574134131u); continue; case 9u: num += 5; arg_17C_0 = (num2 * 3027506607u ^ 1469369746u); continue; case 11u: num += 2; arg_17C_0 = (num2 * 4141901996u ^ 39688979u); continue; case 12u: arg_17C_0 = ((AccountInfo.smethod_2(this.BattleTag) != 0) ? 3420989704u : 2325420047u); continue; case 13u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Identity); arg_17C_0 = (num2 * 153808425u ^ 766177693u); continue; } return num; } } return num; } public void MergeFrom(AccountInfo other) { if (other == null) { goto IL_11F; } goto IL_22C; uint arg_1CC_0; while (true) { IL_1C7: uint num; switch ((num = (arg_1CC_0 ^ 3822585588u)) % 17u) { case 0u: arg_1CC_0 = (((this.identity_ != null) ? 4124676349u : 3606050910u) ^ num * 3498863663u); continue; case 1u: return; case 2u: arg_1CC_0 = ((other.CountryId == 0u) ? 2427754532u : 2498065771u); continue; case 3u: this.identity_ = new Identity(); arg_1CC_0 = (num * 1410965643u ^ 3314300115u); continue; case 4u: this.AccountMuted = other.AccountMuted; arg_1CC_0 = (num * 1786843617u ^ 3140260210u); continue; case 5u: arg_1CC_0 = (other.ManualReview ? 2646903915u : 3578569216u); continue; case 6u: goto IL_11F; case 7u: arg_1CC_0 = (other.AccountMuted ? 2148253618u : 2676354548u); continue; case 8u: goto IL_22C; case 9u: this.ManualReview = other.ManualReview; arg_1CC_0 = (num * 2735205992u ^ 513638552u); continue; case 11u: arg_1CC_0 = ((AccountInfo.smethod_2(other.BattleTag) != 0) ? 4233996820u : 4129660866u); continue; case 12u: this.CountryId = other.CountryId; arg_1CC_0 = (num * 108763866u ^ 1509131074u); continue; case 13u: this.AccountPaid = other.AccountPaid; arg_1CC_0 = (num * 130733476u ^ 4165354620u); continue; case 14u: this.Identity.MergeFrom(other.Identity); arg_1CC_0 = 3231454485u; continue; case 15u: arg_1CC_0 = ((other.identity_ != null) ? 4079779648u : 3231454485u); continue; case 16u: this.BattleTag = other.BattleTag; arg_1CC_0 = (num * 2207235965u ^ 2806322850u); continue; } break; } return; IL_11F: arg_1CC_0 = 2349844885u; goto IL_1C7; IL_22C: arg_1CC_0 = ((!other.AccountPaid) ? 2842356308u : 3289287950u); goto IL_1C7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2DD: uint num; uint arg_25D_0 = ((num = input.ReadTag()) == 0u) ? 1557493971u : 38314372u; while (true) { uint num2; switch ((num2 = (arg_25D_0 ^ 761689756u)) % 25u) { case 0u: arg_25D_0 = (num2 * 2554196330u ^ 1602145266u); continue; case 1u: this.AccountMuted = input.ReadBool(); arg_25D_0 = 494594660u; continue; case 2u: arg_25D_0 = (((num != 21u) ? 2517148524u : 2448600058u) ^ num2 * 3135029169u); continue; case 3u: this.CountryId = input.ReadFixed32(); arg_25D_0 = 785443201u; continue; case 4u: input.SkipLastField(); arg_25D_0 = 1479375679u; continue; case 5u: input.ReadMessage(this.identity_); arg_25D_0 = 494594660u; continue; case 6u: arg_25D_0 = (((num == 26u) ? 2723767362u : 2588386741u) ^ num2 * 2934454527u); continue; case 7u: arg_25D_0 = (((num == 48u) ? 1984401358u : 441946300u) ^ num2 * 2524852756u); continue; case 8u: arg_25D_0 = (num2 * 3423325031u ^ 1570761167u); continue; case 9u: arg_25D_0 = (num2 * 3018743075u ^ 10497790u); continue; case 10u: goto IL_2DD; case 11u: arg_25D_0 = (num2 * 4268840847u ^ 2891730950u); continue; case 12u: this.identity_ = new Identity(); arg_25D_0 = (num2 * 1924416502u ^ 3917220849u); continue; case 13u: arg_25D_0 = (num2 * 2060601623u ^ 3542965953u); continue; case 14u: arg_25D_0 = 38314372u; continue; case 16u: arg_25D_0 = (((num != 42u) ? 1875924937u : 1272864019u) ^ num2 * 2945580799u); continue; case 17u: arg_25D_0 = (((num == 8u) ? 187350121u : 1471764366u) ^ num2 * 1257540567u); continue; case 18u: arg_25D_0 = ((num == 32u) ? 1569418069u : 1941395528u); continue; case 19u: arg_25D_0 = ((this.identity_ == null) ? 566839550u : 1742574557u); continue; case 20u: this.AccountPaid = input.ReadBool(); arg_25D_0 = 2025248002u; continue; case 21u: arg_25D_0 = (num2 * 2124245324u ^ 3911063608u); continue; case 22u: arg_25D_0 = ((num > 26u) ? 589814287u : 1533458525u); continue; case 23u: this.BattleTag = input.ReadString(); arg_25D_0 = 566411953u; continue; case 24u: this.ManualReview = input.ReadBool(); arg_25D_0 = 2136745443u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.UserManager.V1/BlockedPlayerRemovedNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class BlockedPlayerRemovedNotification : IMessage<BlockedPlayerRemovedNotification>, IEquatable<BlockedPlayerRemovedNotification>, IDeepCloneable<BlockedPlayerRemovedNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BlockedPlayerRemovedNotification.__c __9 = new BlockedPlayerRemovedNotification.__c(); internal BlockedPlayerRemovedNotification cctor>b__34_0() { return new BlockedPlayerRemovedNotification(); } } private static readonly MessageParser<BlockedPlayerRemovedNotification> _parser = new MessageParser<BlockedPlayerRemovedNotification>(new Func<BlockedPlayerRemovedNotification>(BlockedPlayerRemovedNotification.__c.__9.<.cctor>b__34_0)); public const int PlayerFieldNumber = 1; private BlockedPlayer player_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int AccountIdFieldNumber = 3; private EntityId accountId_; public static MessageParser<BlockedPlayerRemovedNotification> Parser { get { return BlockedPlayerRemovedNotification._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return BlockedPlayerRemovedNotification.Descriptor; } } public BlockedPlayer Player { get { return this.player_; } set { this.player_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public BlockedPlayerRemovedNotification() { } public BlockedPlayerRemovedNotification(BlockedPlayerRemovedNotification other) : this() { while (true) { IL_44: int arg_2E_0 = -6442439; while (true) { switch ((arg_2E_0 ^ -1476596059) % 3) { case 1: this.Player = ((other.player_ != null) ? other.Player.Clone() : null); arg_2E_0 = -1650730472; continue; case 2: goto IL_44; } goto Block_2; } } Block_2: this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); } public BlockedPlayerRemovedNotification Clone() { return new BlockedPlayerRemovedNotification(this); } public override bool Equals(object other) { return this.Equals(other as BlockedPlayerRemovedNotification); } public bool Equals(BlockedPlayerRemovedNotification other) { if (other == null) { goto IL_44; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ 290756307) % 11) { case 0: return false; case 1: return false; case 3: arg_A6_0 = ((!BlockedPlayerRemovedNotification.smethod_0(this.AccountId, other.AccountId)) ? 2066736026 : 356196399); continue; case 4: return false; case 5: goto IL_EC; case 6: arg_A6_0 = (BlockedPlayerRemovedNotification.smethod_0(this.GameAccountId, other.GameAccountId) ? 898538429 : 613555783); continue; case 7: return false; case 8: goto IL_44; case 9: return true; case 10: arg_A6_0 = ((!BlockedPlayerRemovedNotification.smethod_0(this.Player, other.Player)) ? 925570421 : 1517273943); continue; } break; } return true; IL_44: arg_A6_0 = 1502132542; goto IL_A1; IL_EC: arg_A6_0 = ((other == this) ? 216454718 : 69699196); goto IL_A1; } public override int GetHashCode() { int num = 1; while (true) { IL_D6: uint arg_AE_0 = 1113288499u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 1443939704u)) % 7u) { case 0u: arg_AE_0 = (((this.gameAccountId_ != null) ? 2808328779u : 3381956253u) ^ num2 * 226137995u); continue; case 1u: num ^= BlockedPlayerRemovedNotification.smethod_1(this.Player); arg_AE_0 = (num2 * 2564533346u ^ 2532381099u); continue; case 2u: arg_AE_0 = ((this.accountId_ != null) ? 1350938264u : 1263271889u); continue; case 4u: num ^= BlockedPlayerRemovedNotification.smethod_1(this.AccountId); arg_AE_0 = (num2 * 1444076739u ^ 151934065u); continue; case 5u: goto IL_D6; case 6u: num ^= BlockedPlayerRemovedNotification.smethod_1(this.GameAccountId); arg_AE_0 = (num2 * 1572740395u ^ 1335730950u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_FC: uint arg_D0_0 = 2862579353u; while (true) { uint num; switch ((num = (arg_D0_0 ^ 2793558059u)) % 8u) { case 0u: arg_D0_0 = ((this.accountId_ == null) ? 4250239706u : 3172256221u); continue; case 2u: output.WriteMessage(this.Player); arg_D0_0 = (((this.gameAccountId_ == null) ? 1004631031u : 1626200u) ^ num * 2542243474u); continue; case 3u: goto IL_FC; case 4u: output.WriteMessage(this.AccountId); arg_D0_0 = (num * 3794167475u ^ 3835643342u); continue; case 5u: output.WriteMessage(this.GameAccountId); arg_D0_0 = (num * 3528244768u ^ 3920144851u); continue; case 6u: output.WriteRawTag(26); arg_D0_0 = (num * 1599518671u ^ 1978597725u); continue; case 7u: output.WriteRawTag(18); arg_D0_0 = (num * 3167873085u ^ 1430564093u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_DC: uint arg_B4_0 = 3209644916u; while (true) { uint num2; switch ((num2 = (arg_B4_0 ^ 4064919801u)) % 7u) { case 0u: arg_B4_0 = ((this.accountId_ != null) ? 3103729290u : 3289230137u); continue; case 1u: arg_B4_0 = (((this.gameAccountId_ != null) ? 1552014286u : 1697314184u) ^ num2 * 2363505428u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Player); arg_B4_0 = (num2 * 3770790101u ^ 2699352353u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_B4_0 = (num2 * 133976725u ^ 3564461526u); continue; case 4u: goto IL_DC; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_B4_0 = (num2 * 3998528909u ^ 3737570587u); continue; } return num; } } return num; } public void MergeFrom(BlockedPlayerRemovedNotification other) { if (other == null) { goto IL_140; } goto IL_1E5; uint arg_18D_0; while (true) { IL_188: uint num; switch ((num = (arg_18D_0 ^ 3394629446u)) % 15u) { case 0u: arg_18D_0 = (((this.player_ != null) ? 679812720u : 1432355595u) ^ num * 3069612295u); continue; case 1u: this.gameAccountId_ = new EntityId(); arg_18D_0 = (num * 2601573597u ^ 1551165891u); continue; case 2u: goto IL_140; case 3u: arg_18D_0 = ((other.accountId_ != null) ? 3027780819u : 2669408531u); continue; case 4u: arg_18D_0 = ((other.gameAccountId_ != null) ? 2674450773u : 3934163274u); continue; case 5u: this.player_ = new BlockedPlayer(); arg_18D_0 = (num * 2378722047u ^ 3535847107u); continue; case 6u: return; case 7u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_18D_0 = 3934163274u; continue; case 9u: this.AccountId.MergeFrom(other.AccountId); arg_18D_0 = 2669408531u; continue; case 10u: goto IL_1E5; case 11u: arg_18D_0 = (((this.accountId_ != null) ? 2865736665u : 2365401049u) ^ num * 1917479494u); continue; case 12u: this.Player.MergeFrom(other.Player); arg_18D_0 = 3927820830u; continue; case 13u: this.accountId_ = new EntityId(); arg_18D_0 = (num * 3007757985u ^ 508055974u); continue; case 14u: arg_18D_0 = (((this.gameAccountId_ == null) ? 3077647249u : 2863482468u) ^ num * 3763258889u); continue; } break; } return; IL_140: arg_18D_0 = 4215168376u; goto IL_188; IL_1E5: arg_18D_0 = ((other.player_ != null) ? 2254606324u : 3927820830u); goto IL_188; } public void MergeFrom(CodedInputStream input) { while (true) { IL_213: uint num; uint arg_1B3_0 = ((num = input.ReadTag()) != 0u) ? 2154834528u : 2686598537u; while (true) { uint num2; switch ((num2 = (arg_1B3_0 ^ 2398330567u)) % 17u) { case 0u: input.ReadMessage(this.gameAccountId_); arg_1B3_0 = 2681830552u; continue; case 1u: input.ReadMessage(this.player_); arg_1B3_0 = 2610752549u; continue; case 2u: arg_1B3_0 = 2154834528u; continue; case 4u: input.SkipLastField(); arg_1B3_0 = (num2 * 4153155727u ^ 3688042513u); continue; case 5u: arg_1B3_0 = ((this.accountId_ != null) ? 4206119667u : 2683215864u); continue; case 6u: goto IL_213; case 7u: arg_1B3_0 = (((num == 26u) ? 2344330355u : 3893667979u) ^ num2 * 195417261u); continue; case 8u: this.accountId_ = new EntityId(); arg_1B3_0 = (num2 * 1385392728u ^ 857590107u); continue; case 9u: input.ReadMessage(this.accountId_); arg_1B3_0 = 2681830552u; continue; case 10u: arg_1B3_0 = (((num == 18u) ? 471054748u : 1992869692u) ^ num2 * 2727074516u); continue; case 11u: arg_1B3_0 = ((this.gameAccountId_ == null) ? 3395605551u : 2769987294u); continue; case 12u: arg_1B3_0 = ((this.player_ == null) ? 3381107773u : 2319717403u); continue; case 13u: arg_1B3_0 = (num2 * 3952882533u ^ 3209307570u); continue; case 14u: this.player_ = new BlockedPlayer(); arg_1B3_0 = (num2 * 3457080517u ^ 2395289209u); continue; case 15u: this.gameAccountId_ = new EntityId(); arg_1B3_0 = (num2 * 4026545485u ^ 3508087062u); continue; case 16u: arg_1B3_0 = ((num != 10u) ? 2334070464u : 2424822141u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountId.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountId : IMessage<AccountId>, IEquatable<AccountId>, IDeepCloneable<AccountId>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountId.__c __9 = new AccountId.__c(); internal AccountId cctor>b__24_0() { return new AccountId(); } } private static readonly MessageParser<AccountId> _parser = new MessageParser<AccountId>(new Func<AccountId>(AccountId.__c.__9.<.cctor>b__24_0)); public const int IdFieldNumber = 1; private uint id_; public static MessageParser<AccountId> Parser { get { return AccountId._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return AccountId.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public AccountId() { } public AccountId(AccountId other) : this() { while (true) { IL_3E: uint arg_26_0 = 1420377901u; while (true) { uint num; switch ((num = (arg_26_0 ^ 806724433u)) % 3u) { case 0u: goto IL_3E; case 1u: this.id_ = other.id_; arg_26_0 = (num * 722425864u ^ 3941151986u); continue; } return; } } } public AccountId Clone() { return new AccountId(this); } public override bool Equals(object other) { return this.Equals(other as AccountId); } public bool Equals(AccountId other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -588218370) % 7) { case 0: return true; case 1: return false; case 2: goto IL_75; case 3: goto IL_39; case 4: return false; case 6: arg_43_0 = ((this.Id != other.Id) ? -883189917 : -604283066); continue; } break; } return true; IL_39: arg_43_0 = -584177146; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? -1973207545 : -596683304); goto IL_3E; } public override int GetHashCode() { return 1 ^ this.Id.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); output.WriteFixed32(this.Id); } public int CalculateSize() { return 5; } public void MergeFrom(AccountId other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 3888823554u)) % 5u) { case 0u: this.Id = other.Id; arg_37_0 = (num * 3896966108u ^ 3781907488u); continue; case 2u: return; case 3u: goto IL_12; case 4u: goto IL_63; } break; } return; IL_12: arg_37_0 = 3725062200u; goto IL_32; IL_63: arg_37_0 = ((other.Id == 0u) ? 4103062768u : 3895832942u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_96: uint num; uint arg_63_0 = ((num = input.ReadTag()) == 0u) ? 3009266232u : 2890103984u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 3985682078u)) % 6u) { case 1u: goto IL_96; case 2u: input.SkipLastField(); arg_63_0 = (num2 * 4123913881u ^ 2375664723u); continue; case 3u: this.Id = input.ReadFixed32(); arg_63_0 = 3522139301u; continue; case 4u: arg_63_0 = ((num != 13u) ? 3526094584u : 3677347835u); continue; case 5u: arg_63_0 = 2890103984u; continue; } return; } } } } } <file_sep>/AuthServer.AuthServer.JsonObjects/Family.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class Family { [DataMember(Name = "family")] public int Id { get; set; } [DataMember(Name = "addresses")] public IList<Address> Addresses { get; set; } } } <file_sep>/Bgs.Protocol.Presence.V1/PresenceTypesReflection.cs using Bgs.Protocol.Channel.V1; using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public static class PresenceTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return PresenceTypesReflection.descriptor; } } static PresenceTypesReflection() { PresenceTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(PresenceTypesReflection.smethod_1(PresenceTypesReflection.smethod_0(new string[] { Module.smethod_35<string>(4186083365u), Module.smethod_33<string>(197735254u), Module.smethod_34<string>(3316729254u), Module.smethod_35<string>(2213520533u), Module.smethod_35<string>(1555999589u), Module.smethod_33<string>(3267586454u), Module.smethod_35<string>(1037508677u), Module.smethod_36<string>(3505278877u), Module.smethod_37<string>(144772345u), Module.smethod_37<string>(4089139689u), Module.smethod_34<string>(2838893862u), Module.smethod_34<string>(1714054518u), Module.smethod_33<string>(4187835718u), Module.smethod_34<string>(964161622u), Module.smethod_34<string>(1339108070u), Module.smethod_35<string>(2044871253u), Module.smethod_36<string>(2324319085u), Module.smethod_34<string>(3759343126u), Module.smethod_34<string>(4134289574u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, ChannelTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(PresenceTypesReflection.smethod_2(typeof(RichPresenceLocalizationKey).TypeHandle), RichPresenceLocalizationKey.Parser, new string[] { Module.smethod_36<string>(2505595523u), Module.smethod_36<string>(1743673396u), Module.smethod_36<string>(793386104u) }, null, null, null), new GeneratedCodeInfo(PresenceTypesReflection.smethod_2(typeof(FieldKey).TypeHandle), FieldKey.Parser, new string[] { Module.smethod_35<string>(2043171339u), Module.smethod_36<string>(1548752093u), Module.smethod_37<string>(2193052834u), Module.smethod_33<string>(2928520745u) }, null, null, null), new GeneratedCodeInfo(PresenceTypesReflection.smethod_2(typeof(Field).TypeHandle), Field.Parser, new string[] { Module.smethod_35<string>(30996058u), Module.smethod_37<string>(1696359745u) }, null, null, null), new GeneratedCodeInfo(PresenceTypesReflection.smethod_2(typeof(FieldOperation).TypeHandle), FieldOperation.Parser, new string[] { Module.smethod_34<string>(984060465u), Module.smethod_34<string>(1096308112u) }, null, new Type[] { PresenceTypesReflection.smethod_2(typeof(FieldOperation.Types.OperationType).TypeHandle) }, null), new GeneratedCodeInfo(PresenceTypesReflection.smethod_2(typeof(ChannelState).TypeHandle), ChannelState.Parser, new string[] { Module.smethod_36<string>(1294600521u), Module.smethod_35<string>(1849719234u), Module.smethod_33<string>(3689073160u), Module.smethod_34<string>(2006010865u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.UserManager.V1/SubscribeResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class SubscribeResponse : IMessage<SubscribeResponse>, IEquatable<SubscribeResponse>, IDeepCloneable<SubscribeResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscribeResponse.__c __9 = new SubscribeResponse.__c(); internal SubscribeResponse cctor>b__34_0() { return new SubscribeResponse(); } } private static readonly MessageParser<SubscribeResponse> _parser = new MessageParser<SubscribeResponse>(new Func<SubscribeResponse>(SubscribeResponse.__c.__9.<.cctor>b__34_0)); public const int BlockedPlayersFieldNumber = 1; private static readonly FieldCodec<BlockedPlayer> _repeated_blockedPlayers_codec = FieldCodec.ForMessage<BlockedPlayer>(10u, BlockedPlayer.Parser); private readonly RepeatedField<BlockedPlayer> blockedPlayers_ = new RepeatedField<BlockedPlayer>(); public const int RecentPlayersFieldNumber = 2; private static readonly FieldCodec<RecentPlayer> _repeated_recentPlayers_codec; private readonly RepeatedField<RecentPlayer> recentPlayers_ = new RepeatedField<RecentPlayer>(); public const int RoleFieldNumber = 3; private static readonly FieldCodec<Role> _repeated_role_codec; private readonly RepeatedField<Role> role_ = new RepeatedField<Role>(); public static MessageParser<SubscribeResponse> Parser { get { return SubscribeResponse._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return SubscribeResponse.Descriptor; } } public RepeatedField<BlockedPlayer> BlockedPlayers { get { return this.blockedPlayers_; } } public RepeatedField<RecentPlayer> RecentPlayers { get { return this.recentPlayers_; } } public RepeatedField<Role> Role { get { return this.role_; } } public SubscribeResponse() { } public SubscribeResponse(SubscribeResponse other) : this() { this.blockedPlayers_ = other.blockedPlayers_.Clone(); this.recentPlayers_ = other.recentPlayers_.Clone(); this.role_ = other.role_.Clone(); } public SubscribeResponse Clone() { return new SubscribeResponse(this); } public override bool Equals(object other) { return this.Equals(other as SubscribeResponse); } public bool Equals(SubscribeResponse other) { if (other == null) { goto IL_9F; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ -1643437934) % 11) { case 0: goto IL_9F; case 1: return false; case 2: arg_A9_0 = ((!this.recentPlayers_.Equals(other.recentPlayers_)) ? -66871126 : -1082490760); continue; case 3: return false; case 4: arg_A9_0 = (this.role_.Equals(other.role_) ? -774995713 : -1718351696); continue; case 5: arg_A9_0 = ((!this.blockedPlayers_.Equals(other.blockedPlayers_)) ? -1233563154 : -1598978711); continue; case 6: return false; case 8: return false; case 9: goto IL_EF; case 10: return true; } break; } return true; IL_9F: arg_A9_0 = -1368990422; goto IL_A4; IL_EF: arg_A9_0 = ((other == this) ? -1591529965 : -343425537); goto IL_A4; } public override int GetHashCode() { return 1 ^ SubscribeResponse.smethod_0(this.blockedPlayers_) ^ SubscribeResponse.smethod_0(this.recentPlayers_) ^ SubscribeResponse.smethod_0(this.role_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.blockedPlayers_.WriteTo(output, SubscribeResponse._repeated_blockedPlayers_codec); while (true) { IL_5F: uint arg_47_0 = 2504005688u; while (true) { uint num; switch ((num = (arg_47_0 ^ 3592398713u)) % 3u) { case 1u: this.recentPlayers_.WriteTo(output, SubscribeResponse._repeated_recentPlayers_codec); this.role_.WriteTo(output, SubscribeResponse._repeated_role_codec); arg_47_0 = (num * 1409422884u ^ 733465862u); continue; case 2u: goto IL_5F; } return; } } } public int CalculateSize() { return 0 + this.blockedPlayers_.CalculateSize(SubscribeResponse._repeated_blockedPlayers_codec) + this.recentPlayers_.CalculateSize(SubscribeResponse._repeated_recentPlayers_codec) + this.role_.CalculateSize(SubscribeResponse._repeated_role_codec); } public void MergeFrom(SubscribeResponse other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 704622137; IL_08: switch ((arg_0D_0 ^ 1631873067) % 4) { case 1: IL_27: this.blockedPlayers_.Add(other.blockedPlayers_); this.recentPlayers_.Add(other.recentPlayers_); this.role_.Add(other.role_); arg_0D_0 = 1343234911; goto IL_08; case 2: return; case 3: goto IL_03; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_131: uint num; uint arg_ED_0 = ((num = input.ReadTag()) == 0u) ? 1127506188u : 2030087239u; while (true) { uint num2; switch ((num2 = (arg_ED_0 ^ 2138132074u)) % 10u) { case 0u: arg_ED_0 = 2030087239u; continue; case 1u: this.recentPlayers_.AddEntriesFrom(input, SubscribeResponse._repeated_recentPlayers_codec); arg_ED_0 = 1431335323u; continue; case 2u: arg_ED_0 = (((num != 18u) ? 2948985567u : 2663062287u) ^ num2 * 1561344161u); continue; case 3u: this.role_.AddEntriesFrom(input, SubscribeResponse._repeated_role_codec); arg_ED_0 = 1431335323u; continue; case 4u: input.SkipLastField(); arg_ED_0 = (num2 * 3220669149u ^ 1788806673u); continue; case 5u: arg_ED_0 = ((num == 10u) ? 1174096352u : 224295372u); continue; case 6u: this.blockedPlayers_.AddEntriesFrom(input, SubscribeResponse._repeated_blockedPlayers_codec); arg_ED_0 = 1431335323u; continue; case 7u: arg_ED_0 = (((num != 26u) ? 2108639587u : 1963587096u) ^ num2 * 3604676249u); continue; case 9u: goto IL_131; } return; } } } static SubscribeResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_68: uint arg_50_0 = 411105064u; while (true) { uint num; switch ((num = (arg_50_0 ^ 886660111u)) % 3u) { case 0u: goto IL_68; case 1u: SubscribeResponse._repeated_recentPlayers_codec = FieldCodec.ForMessage<RecentPlayer>(18u, RecentPlayer.Parser); arg_50_0 = (num * 714837179u ^ 1917105064u); continue; } goto Block_1; } } Block_1: SubscribeResponse._repeated_role_codec = FieldCodec.ForMessage<Role>(26u, Bgs.Protocol.Role.Parser); } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.AuthServer.Attributes/BnetServiceBase.cs using System; namespace AuthServer.AuthServer.Attributes { public abstract class BnetServiceBase { [AttributeUsage(AttributeTargets.Method)] public sealed class BnetMethodAttribute : Attribute { public uint MethodId { get; set; } public BnetMethodAttribute(uint methodId) { while (true) { IL_39: uint arg_21_0 = 1108325121u; while (true) { uint num; switch ((num = (arg_21_0 ^ 219534909u)) % 3u) { case 0u: goto IL_39; case 2u: this.MethodId = methodId; arg_21_0 = (num * 2797406976u ^ 3517954148u); continue; } return; } } } } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeCancelledRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeCancelledRequest : IMessage<ChallengeCancelledRequest>, IEquatable<ChallengeCancelledRequest>, IDeepCloneable<ChallengeCancelledRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeCancelledRequest.__c __9 = new ChallengeCancelledRequest.__c(); internal ChallengeCancelledRequest cctor>b__24_0() { return new ChallengeCancelledRequest(); } } private static readonly MessageParser<ChallengeCancelledRequest> _parser = new MessageParser<ChallengeCancelledRequest>(new Func<ChallengeCancelledRequest>(ChallengeCancelledRequest.__c.__9.<.cctor>b__24_0)); public const int IdFieldNumber = 1; private uint id_; public static MessageParser<ChallengeCancelledRequest> Parser { get { return ChallengeCancelledRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeCancelledRequest.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public ChallengeCancelledRequest() { } public ChallengeCancelledRequest(ChallengeCancelledRequest other) : this() { this.id_ = other.id_; } public ChallengeCancelledRequest Clone() { return new ChallengeCancelledRequest(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeCancelledRequest); } public bool Equals(ChallengeCancelledRequest other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 241104865) % 7) { case 0: return true; case 1: return false; case 2: goto IL_75; case 3: goto IL_39; case 5: return false; case 6: arg_43_0 = ((this.Id == other.Id) ? 1131993302 : 3147858); continue; } break; } return true; IL_39: arg_43_0 = 951234237; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? 889757262 : 204800317); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 2184797656u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 3486659821u)) % 4u) { case 1u: arg_50_0 = (((this.Id == 0u) ? 1849769246u : 1909448913u) ^ num2 * 85240847u); continue; case 2u: goto IL_6C; case 3u: num ^= this.Id.GetHashCode(); arg_50_0 = (num2 * 210169236u ^ 2367775369u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Id != 0u) { while (true) { IL_5A: uint arg_3E_0 = 1262283169u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 1036645472u)) % 4u) { case 1u: output.WriteRawTag(8); arg_3E_0 = (num * 2689758659u ^ 3637868316u); continue; case 2u: goto IL_5A; case 3u: output.WriteUInt32(this.Id); arg_3E_0 = (num * 3942174684u ^ 119684624u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_6B: uint arg_4F_0 = 3875990598u; while (true) { uint num2; switch ((num2 = (arg_4F_0 ^ 4222720057u)) % 4u) { case 0u: goto IL_6B; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_4F_0 = (num2 * 2721795132u ^ 840464028u); continue; case 3u: arg_4F_0 = (((this.Id != 0u) ? 2631674348u : 2454307411u) ^ num2 * 2941815881u); continue; } return num; } } return num; } public void MergeFrom(ChallengeCancelledRequest other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 4203355425u)) % 5u) { case 0u: goto IL_63; case 1u: return; case 2u: this.Id = other.Id; arg_37_0 = (num * 3365294501u ^ 1889284660u); continue; case 4u: goto IL_12; } break; } return; IL_12: arg_37_0 = 3116661530u; goto IL_32; IL_63: arg_37_0 = ((other.Id != 0u) ? 3501745758u : 2962945519u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A8: uint num; uint arg_71_0 = ((num = input.ReadTag()) == 0u) ? 2934517032u : 3293995319u; while (true) { uint num2; switch ((num2 = (arg_71_0 ^ 2403111718u)) % 7u) { case 0u: input.SkipLastField(); arg_71_0 = (num2 * 615449007u ^ 4002120210u); continue; case 2u: this.Id = input.ReadUInt32(); arg_71_0 = 2915165911u; continue; case 3u: goto IL_A8; case 4u: arg_71_0 = 3293995319u; continue; case 5u: arg_71_0 = ((num != 8u) ? 3389504443u : 2323852305u); continue; case 6u: arg_71_0 = (num2 * 2543446426u ^ 3439726625u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/AccountBlobList.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountBlobList : IMessage<AccountBlobList>, IEquatable<AccountBlobList>, IDeepCloneable<AccountBlobList>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountBlobList.__c __9 = new AccountBlobList.__c(); internal AccountBlobList cctor>b__24_0() { return new AccountBlobList(); } } private static readonly MessageParser<AccountBlobList> _parser = new MessageParser<AccountBlobList>(new Func<AccountBlobList>(AccountBlobList.__c.__9.<.cctor>b__24_0)); public const int BlobFieldNumber = 1; private static readonly FieldCodec<AccountBlob> _repeated_blob_codec; private readonly RepeatedField<AccountBlob> blob_ = new RepeatedField<AccountBlob>(); public static MessageParser<AccountBlobList> Parser { get { return AccountBlobList._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return AccountBlobList.Descriptor; } } public RepeatedField<AccountBlob> Blob { get { return this.blob_; } } public AccountBlobList() { } public AccountBlobList(AccountBlobList other) : this() { while (true) { IL_43: uint arg_2B_0 = 2385764343u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 4181721037u)) % 3u) { case 0u: goto IL_43; case 2u: this.blob_ = other.blob_.Clone(); arg_2B_0 = (num * 2868982528u ^ 2844640007u); continue; } return; } } } public AccountBlobList Clone() { return new AccountBlobList(this); } public override bool Equals(object other) { return this.Equals(other as AccountBlobList); } public bool Equals(AccountBlobList other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 58012458) % 7) { case 1: return false; case 2: arg_48_0 = ((!this.blob_.Equals(other.blob_)) ? 1058023751 : 105884064); continue; case 3: goto IL_7A; case 4: goto IL_12; case 5: return true; case 6: return false; } break; } return true; IL_12: arg_48_0 = 268651382; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 199223765 : 1010067029); goto IL_43; } public override int GetHashCode() { return 1 ^ AccountBlobList.smethod_0(this.blob_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.blob_.WriteTo(output, AccountBlobList._repeated_blob_codec); } public int CalculateSize() { return 0 + this.blob_.CalculateSize(AccountBlobList._repeated_blob_codec); } public void MergeFrom(AccountBlobList other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -1623131470; IL_08: switch ((arg_0D_0 ^ -517914749) % 4) { case 1: return; case 2: goto IL_03; case 3: IL_27: this.blob_.Add(other.blob_); arg_0D_0 = -1093195945; goto IL_08; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 1239801988u : 342473591u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 251472072u)) % 7u) { case 0u: this.blob_.AddEntriesFrom(input, AccountBlobList._repeated_blob_codec); arg_77_0 = 172750721u; continue; case 1u: arg_77_0 = ((num != 10u) ? 803060006u : 877210794u); continue; case 3u: goto IL_AE; case 4u: arg_77_0 = 1239801988u; continue; case 5u: input.SkipLastField(); arg_77_0 = (num2 * 2219790825u ^ 1860858599u); continue; case 6u: arg_77_0 = (num2 * 467369281u ^ 328460656u); continue; } return; } } } static AccountBlobList() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 242133910u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 528168004u)) % 3u) { case 0u: goto IL_57; case 2u: AccountBlobList._repeated_blob_codec = FieldCodec.ForMessage<AccountBlob>(10u, AccountBlob.Parser); arg_3F_0 = (num * 35462412u ^ 3436232208u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GameSessionUpdateInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameSessionUpdateInfo : IMessage<GameSessionUpdateInfo>, IEquatable<GameSessionUpdateInfo>, IDeepCloneable<GameSessionUpdateInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameSessionUpdateInfo.__c __9 = new GameSessionUpdateInfo.__c(); internal GameSessionUpdateInfo cctor>b__24_0() { return new GameSessionUpdateInfo(); } } private static readonly MessageParser<GameSessionUpdateInfo> _parser = new MessageParser<GameSessionUpdateInfo>(new Func<GameSessionUpdateInfo>(GameSessionUpdateInfo.__c.__9.<.cctor>b__24_0)); public const int CaisFieldNumber = 8; private CAIS cais_; public static MessageParser<GameSessionUpdateInfo> Parser { get { return GameSessionUpdateInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[27]; } } MessageDescriptor IMessage.Descriptor { get { return GameSessionUpdateInfo.Descriptor; } } public CAIS Cais { get { return this.cais_; } set { this.cais_ = value; } } public GameSessionUpdateInfo() { } public GameSessionUpdateInfo(GameSessionUpdateInfo other) : this() { while (true) { IL_44: int arg_2E_0 = -1630806590; while (true) { switch ((arg_2E_0 ^ -1219859766) % 3) { case 1: this.Cais = ((other.cais_ != null) ? other.Cais.Clone() : null); arg_2E_0 = -158380136; continue; case 2: goto IL_44; } return; } } } public GameSessionUpdateInfo Clone() { return new GameSessionUpdateInfo(this); } public override bool Equals(object other) { return this.Equals(other as GameSessionUpdateInfo); } public bool Equals(GameSessionUpdateInfo other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 2019512763) % 7) { case 0: return true; case 2: arg_48_0 = ((!GameSessionUpdateInfo.smethod_0(this.Cais, other.Cais)) ? 2075581725 : 1165444136); continue; case 3: goto IL_12; case 4: goto IL_7A; case 5: return false; case 6: return false; } break; } return true; IL_12: arg_48_0 = 911101106; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 372717275 : 304076382); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 4176058140u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 3405929275u)) % 4u) { case 0u: num ^= GameSessionUpdateInfo.smethod_1(this.Cais); arg_4D_0 = (num2 * 3310688824u ^ 2899639426u); continue; case 2u: goto IL_69; case 3u: arg_4D_0 = (((this.cais_ == null) ? 341321557u : 1540403528u) ^ num2 * 2345859185u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.cais_ != null) { while (true) { IL_5B: uint arg_3F_0 = 1471643796u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 767586307u)) % 4u) { case 0u: output.WriteMessage(this.Cais); arg_3F_0 = (num * 3812830688u ^ 389632090u); continue; case 2u: goto IL_5B; case 3u: output.WriteRawTag(66); arg_3F_0 = (num * 4094122921u ^ 2940605852u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_6B: uint arg_4F_0 = 4177243250u; while (true) { uint num2; switch ((num2 = (arg_4F_0 ^ 4003092795u)) % 4u) { case 1u: arg_4F_0 = (((this.cais_ == null) ? 520059175u : 153851721u) ^ num2 * 247686424u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Cais); arg_4F_0 = (num2 * 2679892068u ^ 3690656919u); continue; case 3u: goto IL_6B; } return num; } } return num; } public void MergeFrom(GameSessionUpdateInfo other) { if (other == null) { goto IL_70; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 48893701u)) % 7u) { case 0u: goto IL_70; case 2u: arg_7A_0 = (((this.cais_ != null) ? 1214211580u : 1338897355u) ^ num * 3291827525u); continue; case 3u: this.cais_ = new CAIS(); arg_7A_0 = (num * 1459301925u ^ 3878896846u); continue; case 4u: return; case 5u: this.Cais.MergeFrom(other.Cais); arg_7A_0 = 1570403875u; continue; case 6u: goto IL_B1; } break; } return; IL_70: arg_7A_0 = 1998875878u; goto IL_75; IL_B1: arg_7A_0 = ((other.cais_ != null) ? 1305816404u : 1570403875u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DC: uint num; uint arg_A1_0 = ((num = input.ReadTag()) != 0u) ? 1676731135u : 677801988u; while (true) { uint num2; switch ((num2 = (arg_A1_0 ^ 1415980294u)) % 8u) { case 0u: arg_A1_0 = 1676731135u; continue; case 1u: arg_A1_0 = ((num == 66u) ? 1843831505u : 25418451u); continue; case 3u: this.cais_ = new CAIS(); arg_A1_0 = (num2 * 3279870948u ^ 1239428046u); continue; case 4u: input.ReadMessage(this.cais_); arg_A1_0 = 588664160u; continue; case 5u: input.SkipLastField(); arg_A1_0 = (num2 * 3902404665u ^ 4249813773u); continue; case 6u: goto IL_DC; case 7u: arg_A1_0 = ((this.cais_ == null) ? 1677105925u : 1410326626u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/AddRecentPlayersResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class AddRecentPlayersResponse : IMessage<AddRecentPlayersResponse>, IEquatable<AddRecentPlayersResponse>, IDeepCloneable<AddRecentPlayersResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AddRecentPlayersResponse.__c __9 = new AddRecentPlayersResponse.__c(); internal AddRecentPlayersResponse cctor>b__29_0() { return new AddRecentPlayersResponse(); } } private static readonly MessageParser<AddRecentPlayersResponse> _parser = new MessageParser<AddRecentPlayersResponse>(new Func<AddRecentPlayersResponse>(AddRecentPlayersResponse.__c.__9.<.cctor>b__29_0)); public const int PlayersAddedFieldNumber = 1; private static readonly FieldCodec<RecentPlayer> _repeated_playersAdded_codec = FieldCodec.ForMessage<RecentPlayer>(10u, RecentPlayer.Parser); private readonly RepeatedField<RecentPlayer> playersAdded_ = new RepeatedField<RecentPlayer>(); public const int PlayersRemovedFieldNumber = 3; private static readonly FieldCodec<uint> _repeated_playersRemoved_codec; private readonly RepeatedField<uint> playersRemoved_ = new RepeatedField<uint>(); public static MessageParser<AddRecentPlayersResponse> Parser { get { return AddRecentPlayersResponse._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return AddRecentPlayersResponse.Descriptor; } } public RepeatedField<RecentPlayer> PlayersAdded { get { return this.playersAdded_; } } public RepeatedField<uint> PlayersRemoved { get { return this.playersRemoved_; } } public AddRecentPlayersResponse() { } public AddRecentPlayersResponse(AddRecentPlayersResponse other) : this() { this.playersAdded_ = other.playersAdded_.Clone(); this.playersRemoved_ = other.playersRemoved_.Clone(); } public AddRecentPlayersResponse Clone() { return new AddRecentPlayersResponse(this); } public override bool Equals(object other) { return this.Equals(other as AddRecentPlayersResponse); } public bool Equals(AddRecentPlayersResponse other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 176477216) % 9) { case 0: return false; case 1: return false; case 2: goto IL_B5; case 4: goto IL_6D; case 5: arg_77_0 = ((!this.playersRemoved_.Equals(other.playersRemoved_)) ? 283808551 : 727294093); continue; case 6: return true; case 7: return false; case 8: arg_77_0 = ((!this.playersAdded_.Equals(other.playersAdded_)) ? 352458039 : 1812936545); continue; } break; } return true; IL_6D: arg_77_0 = 813506732; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? 2111360791 : 652091163); goto IL_72; } public override int GetHashCode() { return 1 ^ AddRecentPlayersResponse.smethod_0(this.playersAdded_) ^ AddRecentPlayersResponse.smethod_0(this.playersRemoved_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.playersAdded_.WriteTo(output, AddRecentPlayersResponse._repeated_playersAdded_codec); this.playersRemoved_.WriteTo(output, AddRecentPlayersResponse._repeated_playersRemoved_codec); } public int CalculateSize() { return 0 + this.playersAdded_.CalculateSize(AddRecentPlayersResponse._repeated_playersAdded_codec) + this.playersRemoved_.CalculateSize(AddRecentPlayersResponse._repeated_playersRemoved_codec); } public void MergeFrom(AddRecentPlayersResponse other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = -295458344; IL_08: switch ((arg_0D_0 ^ -1509438206) % 4) { case 0: goto IL_03; case 1: IL_27: this.playersAdded_.Add(other.playersAdded_); arg_0D_0 = -1321928895; goto IL_08; case 2: return; } this.playersRemoved_.Add(other.playersRemoved_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_13E: uint num; uint arg_F6_0 = ((num = input.ReadTag()) == 0u) ? 2665144016u : 3521722399u; while (true) { uint num2; switch ((num2 = (arg_F6_0 ^ 3035604224u)) % 11u) { case 0u: goto IL_13E; case 1u: arg_F6_0 = (num2 * 778324689u ^ 460498844u); continue; case 2u: this.playersRemoved_.AddEntriesFrom(input, AddRecentPlayersResponse._repeated_playersRemoved_codec); arg_F6_0 = 3759339120u; continue; case 3u: arg_F6_0 = (((num == 29u) ? 857220344u : 2018685946u) ^ num2 * 862001913u); continue; case 4u: input.SkipLastField(); arg_F6_0 = (num2 * 3504640420u ^ 425083717u); continue; case 5u: arg_F6_0 = ((num != 10u) ? 3787717911u : 4168165639u); continue; case 6u: arg_F6_0 = (num2 * 4280721839u ^ 2686153459u); continue; case 7u: this.playersAdded_.AddEntriesFrom(input, AddRecentPlayersResponse._repeated_playersAdded_codec); arg_F6_0 = 3595711276u; continue; case 8u: arg_F6_0 = (((num == 26u) ? 947460114u : 1364883434u) ^ num2 * 3668151782u); continue; case 9u: arg_F6_0 = 3521722399u; continue; } return; } } } static AddRecentPlayersResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_63: uint arg_4B_0 = 2372128739u; while (true) { uint num; switch ((num = (arg_4B_0 ^ 2265327875u)) % 3u) { case 0u: goto IL_63; case 1u: AddRecentPlayersResponse._repeated_playersRemoved_codec = FieldCodec.ForFixed32(26u); arg_4B_0 = (num * 4098535366u ^ 1304468820u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/Variant.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Variant : IMessage<Variant>, IEquatable<Variant>, IDeepCloneable<Variant>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Variant.__c __9 = new Variant.__c(); internal Variant cctor>b__64_0() { return new Variant(); } } private static readonly MessageParser<Variant> _parser = new MessageParser<Variant>(new Func<Variant>(Variant.__c.__9.<.cctor>b__64_0)); public const int BoolValueFieldNumber = 2; private bool boolValue_; public const int IntValueFieldNumber = 3; private long intValue_; public const int FloatValueFieldNumber = 4; private double floatValue_; public const int StringValueFieldNumber = 5; private string stringValue_ = ""; public const int BlobValueFieldNumber = 6; private ByteString blobValue_ = ByteString.Empty; public const int MessageValueFieldNumber = 7; private ByteString messageValue_ = ByteString.Empty; public const int FourccValueFieldNumber = 8; private string fourccValue_ = ""; public const int UintValueFieldNumber = 9; private ulong uintValue_; public const int EntityIdValueFieldNumber = 10; private EntityId entityIdValue_; public static MessageParser<Variant> Parser { get { return Variant._parser; } } public static MessageDescriptor Descriptor { get { return AttributeTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Variant.Descriptor; } } public bool BoolValue { get { return this.boolValue_; } set { this.boolValue_ = value; } } public long IntValue { get { return this.intValue_; } set { this.intValue_ = value; } } public double FloatValue { get { return this.floatValue_; } set { this.floatValue_ = value; } } public string StringValue { get { return this.stringValue_; } set { this.stringValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public ByteString BlobValue { get { return this.blobValue_; } set { this.blobValue_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public ByteString MessageValue { get { return this.messageValue_; } set { this.messageValue_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_34<string>(2130392831u)); } } public string FourccValue { get { return this.fourccValue_; } set { this.fourccValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public ulong UintValue { get { return this.uintValue_; } set { this.uintValue_ = value; } } public EntityId EntityIdValue { get { return this.entityIdValue_; } set { this.entityIdValue_ = value; } } public Variant() { } public Variant(Variant other) : this() { while (true) { IL_FB: uint arg_D3_0 = 3227849183u; while (true) { uint num; switch ((num = (arg_D3_0 ^ 3962983158u)) % 7u) { case 0u: this.fourccValue_ = other.fourccValue_; this.uintValue_ = other.uintValue_; this.EntityIdValue = ((other.entityIdValue_ != null) ? other.EntityIdValue.Clone() : null); arg_D3_0 = 3023060101u; continue; case 1u: this.boolValue_ = other.boolValue_; arg_D3_0 = (num * 2646842623u ^ 3843969777u); continue; case 2u: this.intValue_ = other.intValue_; this.floatValue_ = other.floatValue_; this.stringValue_ = other.stringValue_; arg_D3_0 = (num * 943808406u ^ 253914440u); continue; case 3u: goto IL_FB; case 5u: this.blobValue_ = other.blobValue_; arg_D3_0 = (num * 1862349328u ^ 3970802121u); continue; case 6u: this.messageValue_ = other.messageValue_; arg_D3_0 = (num * 1661979544u ^ 762448033u); continue; } return; } } } public Variant Clone() { return new Variant(this); } public override bool Equals(object other) { return this.Equals(other as Variant); } public bool Equals(Variant other) { if (other == null) { goto IL_42; } goto IL_222; int arg_1AC_0; while (true) { IL_1A7: switch ((arg_1AC_0 ^ -54105850) % 23) { case 0: arg_1AC_0 = ((!Variant.smethod_1(this.EntityIdValue, other.EntityIdValue)) ? -2108927586 : -1242989308); continue; case 1: arg_1AC_0 = ((this.FloatValue != other.FloatValue) ? -342473545 : -235243041); continue; case 2: return false; case 3: return false; case 4: arg_1AC_0 = ((!(this.BlobValue != other.BlobValue)) ? -240746287 : -151669868); continue; case 5: return false; case 6: arg_1AC_0 = (Variant.smethod_0(this.StringValue, other.StringValue) ? -1619171625 : -627620797); continue; case 7: return false; case 8: return false; case 9: arg_1AC_0 = ((!Variant.smethod_0(this.FourccValue, other.FourccValue)) ? -1775614774 : -769541536); continue; case 10: return false; case 11: return false; case 12: arg_1AC_0 = ((this.UintValue != other.UintValue) ? -744800500 : -2025069504); continue; case 13: arg_1AC_0 = ((this.MessageValue != other.MessageValue) ? -1939683886 : -431997904); continue; case 14: arg_1AC_0 = ((this.IntValue != other.IntValue) ? -1175567608 : -1228880735); continue; case 15: goto IL_222; case 16: goto IL_42; case 17: return false; case 19: return false; case 20: return false; case 21: arg_1AC_0 = ((this.BoolValue == other.BoolValue) ? -1755885413 : -376013397); continue; case 22: return true; } break; } return true; IL_42: arg_1AC_0 = -1020310148; goto IL_1A7; IL_222: arg_1AC_0 = ((other == this) ? -842461942 : -1398813259); goto IL_1A7; } public override int GetHashCode() { int num = 1; while (true) { IL_2FC: uint arg_29E_0 = 3830850681u; while (true) { uint num2; switch ((num2 = (arg_29E_0 ^ 2843628116u)) % 20u) { case 0u: num ^= this.FourccValue.GetHashCode(); arg_29E_0 = (num2 * 3509291386u ^ 1190225146u); continue; case 1u: num ^= this.EntityIdValue.GetHashCode(); arg_29E_0 = (num2 * 3874677155u ^ 4027017292u); continue; case 2u: num ^= this.UintValue.GetHashCode(); arg_29E_0 = (num2 * 3794677293u ^ 3696394442u); continue; case 3u: arg_29E_0 = ((this.FloatValue == 0.0) ? 3313619750u : 3047535191u); continue; case 4u: arg_29E_0 = ((this.BlobValue.Length == 0) ? 4257470714u : 3785344600u); continue; case 5u: arg_29E_0 = ((this.BoolValue ? 2021413208u : 1300337610u) ^ num2 * 4235765709u); continue; case 6u: arg_29E_0 = ((this.StringValue.Length != 0) ? 2177898065u : 4070020044u); continue; case 8u: arg_29E_0 = ((this.entityIdValue_ == null) ? 3086193943u : 2841883325u); continue; case 9u: num ^= this.BoolValue.GetHashCode(); arg_29E_0 = (num2 * 247983131u ^ 4127393860u); continue; case 10u: arg_29E_0 = ((this.MessageValue.Length != 0) ? 3740787728u : 2781542737u); continue; case 11u: arg_29E_0 = ((this.IntValue != 0L) ? 2661949127u : 3923706111u); continue; case 12u: num ^= this.BlobValue.GetHashCode(); arg_29E_0 = (num2 * 3434930952u ^ 1809882266u); continue; case 13u: arg_29E_0 = ((this.FourccValue.Length != 0) ? 3908764248u : 2308175170u); continue; case 14u: goto IL_2FC; case 15u: num ^= this.IntValue.GetHashCode(); arg_29E_0 = (num2 * 1851247311u ^ 819324962u); continue; case 16u: num ^= this.MessageValue.GetHashCode(); arg_29E_0 = (num2 * 1679181158u ^ 1562118729u); continue; case 17u: num ^= this.StringValue.GetHashCode(); arg_29E_0 = (num2 * 1097834624u ^ 4131893580u); continue; case 18u: arg_29E_0 = ((this.UintValue == 0uL) ? 2580545964u : 2981166826u); continue; case 19u: num ^= this.FloatValue.GetHashCode(); arg_29E_0 = (num2 * 3924349100u ^ 49619234u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.BoolValue) { goto IL_B2; } goto IL_33A; uint arg_2C6_0; while (true) { IL_2C1: uint num; switch ((num = (arg_2C6_0 ^ 1263290485u)) % 22u) { case 0u: output.WriteRawTag(82); output.WriteMessage(this.EntityIdValue); arg_2C6_0 = (num * 4135731666u ^ 669519993u); continue; case 1u: output.WriteRawTag(72); output.WriteUInt64(this.UintValue); arg_2C6_0 = (num * 3349898673u ^ 1016667616u); continue; case 2u: goto IL_33A; case 3u: arg_2C6_0 = ((this.MessageValue.Length == 0) ? 1422403104u : 631689657u); continue; case 4u: output.WriteRawTag(50); output.WriteBytes(this.BlobValue); arg_2C6_0 = (num * 3727053964u ^ 1967605776u); continue; case 5u: output.WriteInt64(this.IntValue); arg_2C6_0 = (num * 2511567238u ^ 3907557089u); continue; case 7u: output.WriteRawTag(24); arg_2C6_0 = (num * 33209801u ^ 50529819u); continue; case 8u: output.WriteRawTag(58); output.WriteBytes(this.MessageValue); arg_2C6_0 = (num * 609988493u ^ 2232749948u); continue; case 9u: arg_2C6_0 = ((Variant.smethod_2(this.FourccValue) != 0) ? 682229857u : 1441095832u); continue; case 10u: arg_2C6_0 = ((this.FloatValue != 0.0) ? 239783823u : 70114482u); continue; case 11u: output.WriteRawTag(42); arg_2C6_0 = (num * 323275730u ^ 3287013917u); continue; case 12u: arg_2C6_0 = ((this.entityIdValue_ == null) ? 974269981u : 1603984919u); continue; case 13u: output.WriteRawTag(16); output.WriteBool(this.BoolValue); arg_2C6_0 = (num * 2115509340u ^ 772468775u); continue; case 14u: output.WriteString(this.StringValue); arg_2C6_0 = (num * 3228202067u ^ 2785110500u); continue; case 15u: arg_2C6_0 = ((this.UintValue == 0uL) ? 1978653815u : 1396575666u); continue; case 16u: output.WriteDouble(this.FloatValue); arg_2C6_0 = (num * 287558033u ^ 993837710u); continue; case 17u: goto IL_B2; case 18u: output.WriteRawTag(66); output.WriteString(this.FourccValue); arg_2C6_0 = (num * 3555944853u ^ 712066876u); continue; case 19u: arg_2C6_0 = ((Variant.smethod_2(this.StringValue) == 0) ? 722227322u : 1956424716u); continue; case 20u: output.WriteRawTag(33); arg_2C6_0 = (num * 4252776055u ^ 90572095u); continue; case 21u: arg_2C6_0 = ((this.BlobValue.Length != 0) ? 1074231769u : 364171776u); continue; } break; } return; IL_B2: arg_2C6_0 = 691226022u; goto IL_2C1; IL_33A: arg_2C6_0 = ((this.IntValue != 0L) ? 944367248u : 336723635u); goto IL_2C1; } public int CalculateSize() { int num = 0; if (this.BoolValue) { goto IL_1FE; } goto IL_2BC; uint arg_254_0; while (true) { IL_24F: uint num2; switch ((num2 = (arg_254_0 ^ 499240077u)) % 19u) { case 0u: arg_254_0 = ((this.MessageValue.Length != 0) ? 558317677u : 171852120u); continue; case 1u: arg_254_0 = ((this.BlobValue.Length != 0) ? 1498624447u : 1015593644u); continue; case 2u: goto IL_1FE; case 3u: goto IL_2BC; case 4u: arg_254_0 = ((Variant.smethod_2(this.StringValue) == 0) ? 1666377095u : 51526280u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityIdValue); arg_254_0 = (num2 * 3592979854u ^ 1987358397u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.StringValue); arg_254_0 = (num2 * 687251466u ^ 3179960757u); continue; case 8u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.UintValue); arg_254_0 = (num2 * 503497281u ^ 2012557513u); continue; case 9u: num += 1 + CodedOutputStream.ComputeBytesSize(this.MessageValue); arg_254_0 = (num2 * 916158088u ^ 2989774424u); continue; case 10u: num += 1 + CodedOutputStream.ComputeStringSize(this.FourccValue); arg_254_0 = (num2 * 2333635345u ^ 2011783446u); continue; case 11u: arg_254_0 = ((Variant.smethod_2(this.FourccValue) != 0) ? 2135165772u : 1599903687u); continue; case 12u: arg_254_0 = ((this.UintValue == 0uL) ? 351686069u : 1789274865u); continue; case 13u: num += 1 + CodedOutputStream.ComputeInt64Size(this.IntValue); arg_254_0 = (num2 * 1534765100u ^ 2437165929u); continue; case 14u: arg_254_0 = ((this.FloatValue != 0.0) ? 1017578876u : 466996950u); continue; case 15u: num += 2; arg_254_0 = (num2 * 666141736u ^ 3512591731u); continue; case 16u: arg_254_0 = ((this.entityIdValue_ != null) ? 1656465662u : 1451219063u); continue; case 17u: num += 9; arg_254_0 = (num2 * 4245224248u ^ 2295773550u); continue; case 18u: num += 1 + CodedOutputStream.ComputeBytesSize(this.BlobValue); arg_254_0 = (num2 * 4291063247u ^ 2356789186u); continue; } break; } return num; IL_1FE: arg_254_0 = 1780184973u; goto IL_24F; IL_2BC: arg_254_0 = ((this.IntValue == 0L) ? 464873849u : 622597761u); goto IL_24F; } public void MergeFrom(Variant other) { if (other == null) { goto IL_143; } goto IL_322; uint arg_2AA_0; while (true) { IL_2A5: uint num; switch ((num = (arg_2AA_0 ^ 3200371198u)) % 23u) { case 1u: this.entityIdValue_ = new EntityId(); arg_2AA_0 = (num * 3596421724u ^ 1938521091u); continue; case 2u: arg_2AA_0 = ((other.MessageValue.Length == 0) ? 3240235866u : 3500866752u); continue; case 3u: this.EntityIdValue.MergeFrom(other.EntityIdValue); arg_2AA_0 = 4225250175u; continue; case 4u: arg_2AA_0 = ((other.BlobValue.Length != 0) ? 3921792170u : 2568708558u); continue; case 5u: arg_2AA_0 = ((other.entityIdValue_ == null) ? 4225250175u : 3373408773u); continue; case 6u: arg_2AA_0 = ((Variant.smethod_2(other.StringValue) != 0) ? 3467534335u : 2486172930u); continue; case 7u: arg_2AA_0 = ((other.FloatValue == 0.0) ? 2858090446u : 3083716025u); continue; case 8u: return; case 9u: goto IL_322; case 10u: this.BlobValue = other.BlobValue; arg_2AA_0 = (num * 1232605776u ^ 987427726u); continue; case 11u: arg_2AA_0 = ((Variant.smethod_2(other.FourccValue) == 0) ? 2989264056u : 3509943830u); continue; case 12u: this.StringValue = other.StringValue; arg_2AA_0 = (num * 3241709812u ^ 3957093878u); continue; case 13u: goto IL_143; case 14u: this.MessageValue = other.MessageValue; arg_2AA_0 = (num * 46558936u ^ 611025674u); continue; case 15u: this.IntValue = other.IntValue; arg_2AA_0 = (num * 4175570544u ^ 3914742059u); continue; case 16u: this.UintValue = other.UintValue; arg_2AA_0 = (num * 4193601475u ^ 2445588420u); continue; case 17u: this.FourccValue = other.FourccValue; arg_2AA_0 = (num * 3321359258u ^ 1154225448u); continue; case 18u: this.BoolValue = other.BoolValue; arg_2AA_0 = (num * 1259002889u ^ 3804047429u); continue; case 19u: arg_2AA_0 = (((this.entityIdValue_ == null) ? 2222443836u : 2243468298u) ^ num * 1673249847u); continue; case 20u: arg_2AA_0 = ((other.UintValue == 0uL) ? 2396879741u : 4250895405u); continue; case 21u: this.FloatValue = other.FloatValue; arg_2AA_0 = (num * 334984610u ^ 4075276320u); continue; case 22u: arg_2AA_0 = ((other.IntValue != 0L) ? 2842458438u : 2415827371u); continue; } break; } return; IL_143: arg_2AA_0 = 2571502662u; goto IL_2A5; IL_322: arg_2AA_0 = (other.BoolValue ? 2718268990u : 2632867205u); goto IL_2A5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_42F: uint num; uint arg_387_0 = ((num = input.ReadTag()) == 0u) ? 1328010304u : 1132277169u; while (true) { uint num2; switch ((num2 = (arg_387_0 ^ 825030641u)) % 35u) { case 0u: arg_387_0 = (((num == 42u) ? 3622140776u : 2759317602u) ^ num2 * 3058642106u); continue; case 1u: arg_387_0 = ((num != 66u) ? 1051971966u : 2089244539u); continue; case 2u: this.MessageValue = input.ReadBytes(); arg_387_0 = 893606639u; continue; case 3u: goto IL_42F; case 4u: this.entityIdValue_ = new EntityId(); arg_387_0 = (num2 * 533263456u ^ 3913683740u); continue; case 5u: arg_387_0 = (((num == 72u) ? 3826460554u : 2998181416u) ^ num2 * 3706159964u); continue; case 6u: arg_387_0 = (num2 * 2154465028u ^ 3232089191u); continue; case 7u: this.BoolValue = input.ReadBool(); arg_387_0 = 644214632u; continue; case 8u: this.StringValue = input.ReadString(); arg_387_0 = 1133389740u; continue; case 9u: input.ReadMessage(this.entityIdValue_); arg_387_0 = 893606639u; continue; case 10u: arg_387_0 = (num2 * 3812909665u ^ 1331131081u); continue; case 11u: arg_387_0 = (((num != 16u) ? 2204255846u : 4248753160u) ^ num2 * 2605765193u); continue; case 12u: arg_387_0 = (num2 * 1716587701u ^ 2668492590u); continue; case 13u: arg_387_0 = ((num != 33u) ? 1619681234u : 30266775u); continue; case 14u: arg_387_0 = (((num > 24u) ? 2275365090u : 2334203010u) ^ num2 * 2480296389u); continue; case 15u: arg_387_0 = (((num == 24u) ? 2505743752u : 3722621680u) ^ num2 * 3537180693u); continue; case 16u: this.IntValue = input.ReadInt64(); arg_387_0 = 893606639u; continue; case 17u: arg_387_0 = (num2 * 3766965473u ^ 3491091133u); continue; case 18u: this.BlobValue = input.ReadBytes(); arg_387_0 = 952654636u; continue; case 19u: input.SkipLastField(); arg_387_0 = 893606639u; continue; case 20u: arg_387_0 = ((num > 58u) ? 600373153u : 1990573756u); continue; case 21u: this.FourccValue = input.ReadString(); arg_387_0 = 893606639u; continue; case 22u: arg_387_0 = ((num <= 42u) ? 1676412055u : 603619269u); continue; case 23u: this.UintValue = input.ReadUInt64(); arg_387_0 = 164617171u; continue; case 25u: arg_387_0 = 1132277169u; continue; case 26u: arg_387_0 = ((this.entityIdValue_ != null) ? 913976028u : 2001820715u); continue; case 27u: arg_387_0 = (num2 * 2836613746u ^ 3146019208u); continue; case 28u: arg_387_0 = (((num != 50u) ? 723316174u : 469037180u) ^ num2 * 3570063527u); continue; case 29u: this.FloatValue = input.ReadDouble(); arg_387_0 = 306030461u; continue; case 30u: arg_387_0 = (num2 * 1732386205u ^ 1099847270u); continue; case 31u: arg_387_0 = (((num == 58u) ? 389540576u : 1411377102u) ^ num2 * 3567013520u); continue; case 32u: arg_387_0 = (num2 * 3446135516u ^ 1351559871u); continue; case 33u: arg_387_0 = (num2 * 2661509097u ^ 2224335022u); continue; case 34u: arg_387_0 = (((num != 82u) ? 632282126u : 1525438124u) ^ num2 * 4070784156u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.AuthServer.Packets.BnetHandlers/ConnectionService.cs using AuthServer.AuthServer.Attributes; using AuthServer.Network; using Bgs.Protocol; using Bgs.Protocol.Connection.V1; using Framework.Constants.Net; using Framework.Misc; using System; namespace AuthServer.AuthServer.Packets.BnetHandlers { [BnetService(BnetServiceHash.ConnectionService)] public class ConnectionService : BnetServiceBase { [BnetServiceBase.BnetMethodAttribute(1u)] public static void HandleConnectRequest(AuthSession session, ConnectRequest connectRequest) { ConnectResponse connectResponse = new ConnectResponse(); connectResponse.ClientId = connectRequest.ClientId; while (true) { IL_A7: uint arg_87_0 = 1290205775u; while (true) { uint num; switch ((num = (arg_87_0 ^ 1312768759u)) % 5u) { case 0u: goto IL_A7; case 1u: session.Send(connectResponse); arg_87_0 = (num * 574413053u ^ 864330634u); continue; case 2u: connectResponse.UseBindlessRpc = connectRequest.UseBindlessRpc; connectResponse.ServerTime = (ulong)Helper.GetUnixTime(); arg_87_0 = (num * 4270193364u ^ 2934099669u); continue; case 4u: connectResponse.ServerId = new ProcessId { Epoch = Helper.GetUnixTime(), Label = 1337u }; arg_87_0 = (num * 2896876827u ^ 2777880345u); continue; } return; } } } [BnetServiceBase.BnetMethodAttribute(7u)] public static void HandleDisconnectRequest(AuthSession session, DisconnectRequest disconnectRequest) { session.Send(new DisconnectNotification { ErrorCode = disconnectRequest.ErrorCode }, 1698982289u, 4u); } } } <file_sep>/Bgs.Protocol.Authentication.V1/GenerateWebCredentialsResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class GenerateWebCredentialsResponse : IMessage<GenerateWebCredentialsResponse>, IEquatable<GenerateWebCredentialsResponse>, IDeepCloneable<GenerateWebCredentialsResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenerateWebCredentialsResponse.__c __9 = new GenerateWebCredentialsResponse.__c(); internal GenerateWebCredentialsResponse cctor>b__24_0() { return new GenerateWebCredentialsResponse(); } } private static readonly MessageParser<GenerateWebCredentialsResponse> _parser = new MessageParser<GenerateWebCredentialsResponse>(new Func<GenerateWebCredentialsResponse>(GenerateWebCredentialsResponse.__c.__9.<.cctor>b__24_0)); public const int WebCredentialsFieldNumber = 1; private ByteString webCredentials_ = ByteString.Empty; public static MessageParser<GenerateWebCredentialsResponse> Parser { get { return GenerateWebCredentialsResponse._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[18]; } } MessageDescriptor IMessage.Descriptor { get { return GenerateWebCredentialsResponse.Descriptor; } } public ByteString WebCredentials { get { return this.webCredentials_; } set { this.webCredentials_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public GenerateWebCredentialsResponse() { } public GenerateWebCredentialsResponse(GenerateWebCredentialsResponse other) : this() { this.webCredentials_ = other.webCredentials_; } public GenerateWebCredentialsResponse Clone() { return new GenerateWebCredentialsResponse(this); } public override bool Equals(object other) { return this.Equals(other as GenerateWebCredentialsResponse); } public bool Equals(GenerateWebCredentialsResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 390038090) % 7) { case 0: return false; case 1: return false; case 2: goto IL_3E; case 4: goto IL_7A; case 5: return true; case 6: arg_48_0 = ((this.WebCredentials != other.WebCredentials) ? 1871395720 : 1946837890); continue; } break; } return true; IL_3E: arg_48_0 = 951587411; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 769288373 : 1564236285); goto IL_43; } public override int GetHashCode() { int num = 1; if (this.WebCredentials.Length != 0) { while (true) { IL_49: uint arg_31_0 = 4184708911u; while (true) { uint num2; switch ((num2 = (arg_31_0 ^ 3278268101u)) % 3u) { case 1u: num ^= GenerateWebCredentialsResponse.smethod_0(this.WebCredentials); arg_31_0 = (num2 * 552303463u ^ 2592292392u); continue; case 2u: goto IL_49; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.WebCredentials.Length != 0) { while (true) { IL_60: uint arg_44_0 = 1934204955u; while (true) { uint num; switch ((num = (arg_44_0 ^ 1166289056u)) % 4u) { case 0u: goto IL_60; case 2u: output.WriteBytes(this.WebCredentials); arg_44_0 = (num * 2856215288u ^ 1297170657u); continue; case 3u: output.WriteRawTag(10); arg_44_0 = (num * 2110255802u ^ 4164109012u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_70: uint arg_54_0 = 2460405954u; while (true) { uint num2; switch ((num2 = (arg_54_0 ^ 3479425860u)) % 4u) { case 1u: num += 1 + CodedOutputStream.ComputeBytesSize(this.WebCredentials); arg_54_0 = (num2 * 890090339u ^ 2293980595u); continue; case 2u: arg_54_0 = (((this.WebCredentials.Length != 0) ? 1836870445u : 884845336u) ^ num2 * 225803012u); continue; case 3u: goto IL_70; } return num; } } return num; } public void MergeFrom(GenerateWebCredentialsResponse other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1236201053u)) % 5u) { case 1u: this.WebCredentials = other.WebCredentials; arg_37_0 = (num * 1400486173u ^ 2516299209u); continue; case 2u: return; case 3u: goto IL_63; case 4u: goto IL_12; } break; } return; IL_12: arg_37_0 = 1314660307u; goto IL_32; IL_63: arg_37_0 = ((other.WebCredentials.Length == 0) ? 33053142u : 430716726u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_96: uint num; uint arg_63_0 = ((num = input.ReadTag()) == 0u) ? 2722622081u : 2152692116u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 4156911478u)) % 6u) { case 0u: input.SkipLastField(); arg_63_0 = (num2 * 3451447486u ^ 2645441947u); continue; case 2u: arg_63_0 = 2152692116u; continue; case 3u: this.WebCredentials = input.ReadBytes(); arg_63_0 = 2169360419u; continue; case 4u: arg_63_0 = ((num != 10u) ? 3520444882u : 2863973763u); continue; case 5u: goto IL_96; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/UnsubscribeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class UnsubscribeRequest : IMessage<UnsubscribeRequest>, IEquatable<UnsubscribeRequest>, IDeepCloneable<UnsubscribeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UnsubscribeRequest.__c __9 = new UnsubscribeRequest.__c(); internal UnsubscribeRequest cctor>b__34_0() { return new UnsubscribeRequest(); } } private static readonly MessageParser<UnsubscribeRequest> _parser = new MessageParser<UnsubscribeRequest>(new Func<UnsubscribeRequest>(UnsubscribeRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int EntityIdFieldNumber = 2; private EntityId entityId_; public const int ObjectIdFieldNumber = 3; private ulong objectId_; public static MessageParser<UnsubscribeRequest> Parser { get { return UnsubscribeRequest._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return UnsubscribeRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public UnsubscribeRequest() { } public UnsubscribeRequest(UnsubscribeRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); this.objectId_ = other.objectId_; } public UnsubscribeRequest Clone() { return new UnsubscribeRequest(this); } public override bool Equals(object other) { return this.Equals(other as UnsubscribeRequest); } public bool Equals(UnsubscribeRequest other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ -297057741) % 11) { case 1: return false; case 2: return true; case 3: goto IL_EA; case 4: goto IL_9A; case 5: return false; case 6: arg_A4_0 = (UnsubscribeRequest.smethod_0(this.EntityId, other.EntityId) ? -487100874 : -1789862922); continue; case 7: return false; case 8: arg_A4_0 = ((this.ObjectId == other.ObjectId) ? -1514592352 : -1494697440); continue; case 9: arg_A4_0 = (UnsubscribeRequest.smethod_0(this.AgentId, other.AgentId) ? -759167526 : -1047879876); continue; case 10: return false; } break; } return true; IL_9A: arg_A4_0 = -1665299537; goto IL_9F; IL_EA: arg_A4_0 = ((other != this) ? -576449685 : -385584058); goto IL_9F; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_75; } goto IL_A3; uint arg_7F_0; while (true) { IL_7A: uint num2; switch ((num2 = (arg_7F_0 ^ 2976876417u)) % 6u) { case 0u: goto IL_75; case 2u: arg_7F_0 = (((this.ObjectId == 0uL) ? 2572990090u : 2750617208u) ^ num2 * 1178705154u); continue; case 3u: num ^= UnsubscribeRequest.smethod_1(this.AgentId); arg_7F_0 = (num2 * 3658001210u ^ 3381246495u); continue; case 4u: goto IL_A3; case 5u: num ^= this.ObjectId.GetHashCode(); arg_7F_0 = (num2 * 1223653792u ^ 4248109930u); continue; } break; } return num; IL_75: arg_7F_0 = 2728367280u; goto IL_7A; IL_A3: num ^= UnsubscribeRequest.smethod_1(this.EntityId); arg_7F_0 = 3571785505u; goto IL_7A; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_30; } goto IL_BD; uint arg_95_0; while (true) { IL_90: uint num; switch ((num = (arg_95_0 ^ 1482561503u)) % 7u) { case 1u: arg_95_0 = (((this.ObjectId == 0uL) ? 403078570u : 1773658099u) ^ num * 1524540018u); continue; case 2u: output.WriteRawTag(10); arg_95_0 = (num * 958240040u ^ 1563050001u); continue; case 3u: goto IL_BD; case 4u: output.WriteMessage(this.AgentId); arg_95_0 = (num * 1955104700u ^ 81817494u); continue; case 5u: goto IL_30; case 6u: output.WriteRawTag(24); output.WriteUInt64(this.ObjectId); arg_95_0 = (num * 957455784u ^ 2880611894u); continue; } break; } return; IL_30: arg_95_0 = 2068963741u; goto IL_90; IL_BD: output.WriteRawTag(18); output.WriteMessage(this.EntityId); arg_95_0 = 1708013473u; goto IL_90; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_76; } goto IL_A4; uint arg_80_0; while (true) { IL_7B: uint num2; switch ((num2 = (arg_80_0 ^ 3255451378u)) % 6u) { case 0u: goto IL_76; case 1u: goto IL_A4; case 2u: arg_80_0 = (((this.ObjectId != 0uL) ? 756752044u : 1939989423u) ^ num2 * 4075344888u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_80_0 = (num2 * 655693283u ^ 2436674101u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_80_0 = (num2 * 3572975165u ^ 3200171510u); continue; } break; } return num; IL_76: arg_80_0 = 2537679229u; goto IL_7B; IL_A4: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_80_0 = 3581548974u; goto IL_7B; } public void MergeFrom(UnsubscribeRequest other) { if (other == null) { goto IL_68; } goto IL_194; uint arg_144_0; while (true) { IL_13F: uint num; switch ((num = (arg_144_0 ^ 2890068574u)) % 13u) { case 0u: goto IL_194; case 1u: this.EntityId.MergeFrom(other.EntityId); arg_144_0 = 3748473497u; continue; case 2u: this.entityId_ = new EntityId(); arg_144_0 = (num * 4048034410u ^ 3246903411u); continue; case 3u: this.agentId_ = new EntityId(); arg_144_0 = (num * 3490675414u ^ 2343557021u); continue; case 4u: this.AgentId.MergeFrom(other.AgentId); arg_144_0 = 3527683179u; continue; case 5u: arg_144_0 = (((this.agentId_ == null) ? 1685407384u : 1682110737u) ^ num * 2863813958u); continue; case 6u: this.ObjectId = other.ObjectId; arg_144_0 = (num * 3690316712u ^ 2875805661u); continue; case 7u: arg_144_0 = ((other.ObjectId != 0uL) ? 3046405916u : 4045141645u); continue; case 8u: goto IL_68; case 10u: return; case 11u: arg_144_0 = ((other.entityId_ != null) ? 3138606722u : 3748473497u); continue; case 12u: arg_144_0 = (((this.entityId_ != null) ? 4258360795u : 2680948216u) ^ num * 142237381u); continue; } break; } return; IL_68: arg_144_0 = 3193628816u; goto IL_13F; IL_194: arg_144_0 = ((other.agentId_ != null) ? 3835658842u : 3527683179u); goto IL_13F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1F6: uint num; uint arg_196_0 = ((num = input.ReadTag()) != 0u) ? 918844442u : 310153809u; while (true) { uint num2; switch ((num2 = (arg_196_0 ^ 441713470u)) % 17u) { case 0u: goto IL_1F6; case 1u: this.ObjectId = input.ReadUInt64(); arg_196_0 = 902375583u; continue; case 2u: input.ReadMessage(this.entityId_); arg_196_0 = 1028971051u; continue; case 3u: arg_196_0 = ((num == 10u) ? 1518337455u : 1741172028u); continue; case 4u: arg_196_0 = (((num == 24u) ? 1570321692u : 178521966u) ^ num2 * 3894695520u); continue; case 5u: arg_196_0 = (num2 * 3182350335u ^ 2741968500u); continue; case 6u: arg_196_0 = (((num != 18u) ? 1628571238u : 2089963446u) ^ num2 * 1868477333u); continue; case 7u: input.SkipLastField(); arg_196_0 = (num2 * 3438963096u ^ 909923539u); continue; case 8u: this.agentId_ = new EntityId(); arg_196_0 = (num2 * 3490677710u ^ 522488564u); continue; case 9u: arg_196_0 = ((this.entityId_ == null) ? 1187142288u : 597136043u); continue; case 10u: input.ReadMessage(this.agentId_); arg_196_0 = 634351413u; continue; case 11u: arg_196_0 = 918844442u; continue; case 12u: this.entityId_ = new EntityId(); arg_196_0 = (num2 * 3982581629u ^ 839436637u); continue; case 13u: arg_196_0 = ((this.agentId_ == null) ? 375546306u : 705302588u); continue; case 14u: arg_196_0 = (num2 * 4131857568u ^ 279657087u); continue; case 16u: arg_196_0 = (num2 * 3220105192u ^ 2552472919u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/TypeReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class TypeReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return TypeReflection.descriptor; } } static TypeReflection() { TypeReflection.descriptor = FileDescriptor.FromGeneratedCode(TypeReflection.smethod_1(TypeReflection.smethod_0(new string[] { Module.smethod_34<string>(3033775657u), Module.smethod_36<string>(489080854u), Module.smethod_37<string>(1661022938u), Module.smethod_33<string>(1030112107u), Module.smethod_34<string>(1533989865u), Module.smethod_35<string>(1527307334u), Module.smethod_37<string>(4056867866u), Module.smethod_35<string>(1877148966u), Module.smethod_37<string>(959823034u), Module.smethod_35<string>(3192190854u), Module.smethod_36<string>(2745344614u), Module.smethod_35<string>(1758671974u), Module.smethod_36<string>(3914564870u), Module.smethod_33<string>(814628555u), Module.smethod_35<string>(4081076438u), Module.smethod_34<string>(2178218201u), Module.smethod_34<string>(1053378857u), Module.smethod_34<string>(1428325305u), Module.smethod_37<string>(1048533978u), Module.smethod_34<string>(678432409u), Module.smethod_34<string>(3848560361u), Module.smethod_35<string>(2108513606u), Module.smethod_35<string>(3115876182u), Module.smethod_36<string>(3520911606u), Module.smethod_33<string>(2757220091u), Module.smethod_34<string>(2723721017u), Module.smethod_33<string>(302751323u), Module.smethod_36<string>(1946298550u), Module.smethod_37<string>(3736624122u), Module.smethod_35<string>(1143313350u), Module.smethod_34<string>(99095881u), Module.smethod_37<string>(2188101706u), Module.smethod_37<string>(1837501754u), Module.smethod_34<string>(4019116729u) })), new FileDescriptor[] { AnyReflection.Descriptor, SourceContextReflection.Descriptor }, new GeneratedCodeInfo(new System.Type[] { TypeReflection.smethod_2(typeof(Syntax).TypeHandle) }, new GeneratedCodeInfo[] { new GeneratedCodeInfo(TypeReflection.smethod_2(typeof(Type).TypeHandle), Type.Parser, new string[] { Module.smethod_34<string>(2643656114u), Module.smethod_36<string>(3562686352u), Module.smethod_34<string>(793662043u), Module.smethod_34<string>(796587241u), Module.smethod_36<string>(2844444300u), Module.smethod_35<string>(1485711652u) }, null, null, null), new GeneratedCodeInfo(TypeReflection.smethod_2(typeof(Field).TypeHandle), Field.Parser, new string[] { Module.smethod_34<string>(641203968u), Module.smethod_36<string>(4160254975u), Module.smethod_35<string>(3207850435u), Module.smethod_37<string>(2134609685u), Module.smethod_34<string>(3560767438u), Module.smethod_35<string>(4243132345u), Module.smethod_35<string>(1501087914u), Module.smethod_37<string>(819830394u), Module.smethod_34<string>(2078311244u) }, null, new System.Type[] { TypeReflection.smethod_2(typeof(Field.Types.Kind).TypeHandle), TypeReflection.smethod_2(typeof(Field.Types.Cardinality).TypeHandle) }, null), new GeneratedCodeInfo(TypeReflection.smethod_2(typeof(Enum).TypeHandle), Enum.Parser, new string[] { Module.smethod_33<string>(1982348402u), Module.smethod_33<string>(2194296355u), Module.smethod_34<string>(796587241u), Module.smethod_36<string>(2844444300u), Module.smethod_34<string>(430643543u) }, null, null, null), new GeneratedCodeInfo(TypeReflection.smethod_2(typeof(EnumValue).TypeHandle), EnumValue.Parser, new string[] { Module.smethod_36<string>(2649665489u), Module.smethod_34<string>(3338222276u), Module.smethod_34<string>(796587241u) }, null, null, null), new GeneratedCodeInfo(TypeReflection.smethod_2(typeof(Option).TypeHandle), Option.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_34<string>(1800026606u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Account.V1/GameLevelInfo.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameLevelInfo : IMessage<GameLevelInfo>, IEquatable<GameLevelInfo>, IDeepCloneable<GameLevelInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameLevelInfo.__c __9 = new GameLevelInfo.__c(); internal GameLevelInfo cctor>b__59_0() { return new GameLevelInfo(); } } private static readonly MessageParser<GameLevelInfo> _parser = new MessageParser<GameLevelInfo>(new Func<GameLevelInfo>(GameLevelInfo.__c.__9.<.cctor>b__59_0)); public const int IsTrialFieldNumber = 4; private bool isTrial_; public const int IsLifetimeFieldNumber = 5; private bool isLifetime_; public const int IsRestrictedFieldNumber = 6; private bool isRestricted_; public const int IsBetaFieldNumber = 7; private bool isBeta_; public const int NameFieldNumber = 8; private string name_ = ""; public const int ProgramFieldNumber = 9; private uint program_; public const int LicensesFieldNumber = 10; private static readonly FieldCodec<AccountLicense> _repeated_licenses_codec = FieldCodec.ForMessage<AccountLicense>(82u, AccountLicense.Parser); private readonly RepeatedField<AccountLicense> licenses_ = new RepeatedField<AccountLicense>(); public const int RealmPermissionsFieldNumber = 11; private uint realmPermissions_; public static MessageParser<GameLevelInfo> Parser { get { return GameLevelInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[21]; } } MessageDescriptor IMessage.Descriptor { get { return GameLevelInfo.Descriptor; } } public bool IsTrial { get { return this.isTrial_; } set { this.isTrial_ = value; } } public bool IsLifetime { get { return this.isLifetime_; } set { this.isLifetime_ = value; } } public bool IsRestricted { get { return this.isRestricted_; } set { this.isRestricted_ = value; } } public bool IsBeta { get { return this.isBeta_; } set { this.isBeta_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public RepeatedField<AccountLicense> Licenses { get { return this.licenses_; } } public uint RealmPermissions { get { return this.realmPermissions_; } set { this.realmPermissions_ = value; } } public GameLevelInfo() { } public GameLevelInfo(GameLevelInfo other) : this() { while (true) { IL_FC: uint arg_D0_0 = 3831877765u; while (true) { uint num; switch ((num = (arg_D0_0 ^ 4040861540u)) % 8u) { case 0u: this.name_ = other.name_; arg_D0_0 = (num * 629451537u ^ 2582145168u); continue; case 1u: this.isTrial_ = other.isTrial_; arg_D0_0 = (num * 3482620950u ^ 165051613u); continue; case 2u: this.realmPermissions_ = other.realmPermissions_; arg_D0_0 = (num * 3136489934u ^ 4184198203u); continue; case 4u: this.program_ = other.program_; this.licenses_ = other.licenses_.Clone(); arg_D0_0 = (num * 336958238u ^ 629760782u); continue; case 5u: goto IL_FC; case 6u: this.isBeta_ = other.isBeta_; arg_D0_0 = (num * 2462275809u ^ 3140594930u); continue; case 7u: this.isLifetime_ = other.isLifetime_; this.isRestricted_ = other.isRestricted_; arg_D0_0 = (num * 3553319540u ^ 3439735814u); continue; } return; } } } public GameLevelInfo Clone() { return new GameLevelInfo(this); } public override bool Equals(object other) { return this.Equals(other as GameLevelInfo); } public bool Equals(GameLevelInfo other) { if (other == null) { goto IL_71; } goto IL_1E1; int arg_173_0; while (true) { IL_16E: switch ((arg_173_0 ^ 1885273414) % 21) { case 0: return false; case 1: arg_173_0 = ((this.IsTrial != other.IsTrial) ? 1929535328 : 1436553055); continue; case 2: arg_173_0 = ((this.Program == other.Program) ? 586656442 : 1236646568); continue; case 3: return false; case 4: goto IL_1E1; case 5: arg_173_0 = ((!this.licenses_.Equals(other.licenses_)) ? 320192463 : 1570765094); continue; case 6: return false; case 7: return false; case 8: return false; case 10: arg_173_0 = ((this.IsRestricted == other.IsRestricted) ? 363057693 : 486955750); continue; case 11: arg_173_0 = ((this.RealmPermissions != other.RealmPermissions) ? 801146190 : 1435694157); continue; case 12: arg_173_0 = ((this.IsLifetime == other.IsLifetime) ? 7781599 : 1361527440); continue; case 13: return false; case 14: return false; case 15: goto IL_71; case 16: arg_173_0 = (GameLevelInfo.smethod_0(this.Name, other.Name) ? 1840480526 : 1428925604); continue; case 17: return true; case 18: arg_173_0 = ((this.IsBeta != other.IsBeta) ? 1640520411 : 1842856770); continue; case 19: return false; case 20: return false; } break; } return true; IL_71: arg_173_0 = 1423133991; goto IL_16E; IL_1E1: arg_173_0 = ((other != this) ? 895815161 : 772916769); goto IL_16E; } public override int GetHashCode() { int num = 1; while (true) { IL_251: uint arg_204_0 = 1514311322u; while (true) { uint num2; switch ((num2 = (arg_204_0 ^ 1192711919u)) % 16u) { case 1u: arg_204_0 = ((this.Program == 0u) ? 975294224u : 2109345699u); continue; case 2u: num ^= this.IsBeta.GetHashCode(); arg_204_0 = (num2 * 1796321651u ^ 2497012432u); continue; case 3u: num ^= this.IsLifetime.GetHashCode(); arg_204_0 = (num2 * 3195525221u ^ 76565194u); continue; case 4u: num ^= this.IsTrial.GetHashCode(); arg_204_0 = (num2 * 2372427828u ^ 750647593u); continue; case 5u: arg_204_0 = ((this.IsTrial ? 433821864u : 2000797626u) ^ num2 * 527510743u); continue; case 6u: arg_204_0 = ((!this.IsLifetime) ? 576702597u : 1643013196u); continue; case 7u: num ^= this.IsRestricted.GetHashCode(); arg_204_0 = (num2 * 822307818u ^ 3029801332u); continue; case 8u: num ^= this.RealmPermissions.GetHashCode(); arg_204_0 = (num2 * 1159865544u ^ 840838671u); continue; case 9u: arg_204_0 = ((this.Name.Length != 0) ? 836413588u : 299392030u); continue; case 10u: arg_204_0 = (this.IsRestricted ? 1231649288u : 223969618u); continue; case 11u: num ^= this.Name.GetHashCode(); arg_204_0 = (num2 * 47910941u ^ 4021215217u); continue; case 12u: num ^= this.Program.GetHashCode(); arg_204_0 = (num2 * 4022285138u ^ 3525669192u); continue; case 13u: arg_204_0 = (this.IsBeta ? 445969037u : 1939470550u); continue; case 14u: goto IL_251; case 15u: num ^= this.licenses_.GetHashCode(); arg_204_0 = ((this.RealmPermissions == 0u) ? 1346653903u : 1605629239u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.IsTrial) { goto IL_140; } goto IL_2CE; uint arg_25E_0; while (true) { IL_259: uint num; switch ((num = (arg_25E_0 ^ 3440882718u)) % 21u) { case 0u: arg_25E_0 = ((this.Program == 0u) ? 2804488601u : 3148684920u); continue; case 1u: arg_25E_0 = (this.IsBeta ? 3394815495u : 3510433595u); continue; case 2u: output.WriteBool(this.IsLifetime); arg_25E_0 = (num * 3050977698u ^ 3555153569u); continue; case 4u: output.WriteRawTag(88); arg_25E_0 = (num * 2607830190u ^ 2208922337u); continue; case 5u: output.WriteRawTag(48); output.WriteBool(this.IsRestricted); arg_25E_0 = (num * 1026163644u ^ 1132447768u); continue; case 6u: output.WriteString(this.Name); arg_25E_0 = (num * 2937931835u ^ 4059396027u); continue; case 7u: arg_25E_0 = (this.IsRestricted ? 2857334382u : 3333018200u); continue; case 8u: output.WriteUInt32(this.RealmPermissions); arg_25E_0 = (num * 1391018436u ^ 1460608401u); continue; case 9u: output.WriteRawTag(56); arg_25E_0 = (num * 3784511816u ^ 175143161u); continue; case 10u: goto IL_140; case 11u: arg_25E_0 = (((this.RealmPermissions == 0u) ? 660484212u : 1170352680u) ^ num * 230675669u); continue; case 12u: output.WriteRawTag(77); arg_25E_0 = (num * 1339186921u ^ 1836624007u); continue; case 13u: arg_25E_0 = ((GameLevelInfo.smethod_1(this.Name) == 0) ? 2568343022u : 4216682362u); continue; case 14u: this.licenses_.WriteTo(output, GameLevelInfo._repeated_licenses_codec); arg_25E_0 = 3677392531u; continue; case 15u: output.WriteRawTag(32); output.WriteBool(this.IsTrial); arg_25E_0 = (num * 2025186370u ^ 1030100403u); continue; case 16u: output.WriteRawTag(66); arg_25E_0 = (num * 451297976u ^ 359329105u); continue; case 17u: output.WriteBool(this.IsBeta); arg_25E_0 = (num * 1236928264u ^ 3425961795u); continue; case 18u: output.WriteRawTag(40); arg_25E_0 = (num * 1996593269u ^ 3781118624u); continue; case 19u: output.WriteFixed32(this.Program); arg_25E_0 = (num * 2838270209u ^ 3425520854u); continue; case 20u: goto IL_2CE; } break; } return; IL_140: arg_25E_0 = 2897302583u; goto IL_259; IL_2CE: arg_25E_0 = ((!this.IsLifetime) ? 3967527765u : 2670695754u); goto IL_259; } public int CalculateSize() { int num = 0; while (true) { IL_22C: uint arg_1DB_0 = 2915159696u; while (true) { uint num2; switch ((num2 = (arg_1DB_0 ^ 3658811585u)) % 17u) { case 0u: goto IL_22C; case 1u: num += 5; arg_1DB_0 = (num2 * 1860022777u ^ 2061989508u); continue; case 2u: arg_1DB_0 = ((this.Program == 0u) ? 2800268383u : 2925942962u); continue; case 3u: num += 2; arg_1DB_0 = (num2 * 770439470u ^ 2696629813u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_1DB_0 = (num2 * 2419362954u ^ 2769857831u); continue; case 5u: arg_1DB_0 = (this.IsBeta ? 3249126575u : 3931878117u); continue; case 6u: arg_1DB_0 = (((this.RealmPermissions != 0u) ? 3275249579u : 3150859119u) ^ num2 * 3509259514u); continue; case 7u: num += 2; arg_1DB_0 = (num2 * 1648846009u ^ 1669041820u); continue; case 8u: arg_1DB_0 = ((GameLevelInfo.smethod_1(this.Name) == 0) ? 4059558661u : 4133945500u); continue; case 9u: num += this.licenses_.CalculateSize(GameLevelInfo._repeated_licenses_codec); arg_1DB_0 = 2921510807u; continue; case 10u: num += 2; arg_1DB_0 = (num2 * 3077631954u ^ 2621598605u); continue; case 12u: num += 2; arg_1DB_0 = (num2 * 1390390217u ^ 3520763579u); continue; case 13u: arg_1DB_0 = (this.IsLifetime ? 2939682914u : 3927124283u); continue; case 14u: arg_1DB_0 = ((!this.IsRestricted) ? 2502908725u : 3289518401u); continue; case 15u: arg_1DB_0 = (((!this.IsTrial) ? 8696296u : 658784229u) ^ num2 * 1026913538u); continue; case 16u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RealmPermissions); arg_1DB_0 = (num2 * 2625588845u ^ 2380493645u); continue; } return num; } } return num; } public void MergeFrom(GameLevelInfo other) { if (other == null) { goto IL_134; } goto IL_239; uint arg_1D9_0; while (true) { IL_1D4: uint num; switch ((num = (arg_1D9_0 ^ 1462976142u)) % 17u) { case 0u: this.IsBeta = other.IsBeta; arg_1D9_0 = (num * 4154856037u ^ 4048222044u); continue; case 1u: arg_1D9_0 = ((GameLevelInfo.smethod_1(other.Name) == 0) ? 1599393483u : 1088842023u); continue; case 2u: this.Program = other.Program; arg_1D9_0 = (num * 1015017599u ^ 1349614454u); continue; case 3u: return; case 4u: this.RealmPermissions = other.RealmPermissions; arg_1D9_0 = (num * 163652205u ^ 1666757550u); continue; case 5u: arg_1D9_0 = ((!other.IsBeta) ? 1897512264u : 695568394u); continue; case 6u: goto IL_134; case 7u: this.licenses_.Add(other.licenses_); arg_1D9_0 = ((other.RealmPermissions == 0u) ? 1514046289u : 266543893u); continue; case 8u: this.IsLifetime = other.IsLifetime; arg_1D9_0 = (num * 3718689920u ^ 3927979769u); continue; case 9u: arg_1D9_0 = (other.IsRestricted ? 497849999u : 975880541u); continue; case 10u: arg_1D9_0 = (other.IsLifetime ? 583594299u : 376514681u); continue; case 11u: this.IsRestricted = other.IsRestricted; arg_1D9_0 = (num * 1934369830u ^ 3770013051u); continue; case 12u: arg_1D9_0 = ((other.Program != 0u) ? 2047221714u : 154449874u); continue; case 14u: this.IsTrial = other.IsTrial; arg_1D9_0 = (num * 3189358853u ^ 2936748929u); continue; case 15u: goto IL_239; case 16u: this.Name = other.Name; arg_1D9_0 = (num * 2628343277u ^ 2658831038u); continue; } break; } return; IL_134: arg_1D9_0 = 162682407u; goto IL_1D4; IL_239: arg_1D9_0 = (other.IsTrial ? 669076817u : 523590106u); goto IL_1D4; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3A4: uint num; uint arg_30C_0 = ((num = input.ReadTag()) != 0u) ? 3888080640u : 2939104691u; while (true) { uint num2; switch ((num2 = (arg_30C_0 ^ 3578606165u)) % 31u) { case 0u: arg_30C_0 = (((num == 56u) ? 1563531086u : 1702289719u) ^ num2 * 3491373918u); continue; case 1u: this.Name = input.ReadString(); arg_30C_0 = 2981099641u; continue; case 2u: arg_30C_0 = (num2 * 763200544u ^ 1019065860u); continue; case 3u: arg_30C_0 = ((num > 56u) ? 2193133336u : 2670541086u); continue; case 4u: arg_30C_0 = (((num != 40u) ? 1109181010u : 1693130014u) ^ num2 * 2491283931u); continue; case 5u: arg_30C_0 = (((num != 88u) ? 4122467846u : 3179901995u) ^ num2 * 1198545295u); continue; case 6u: input.SkipLastField(); arg_30C_0 = 2869794797u; continue; case 7u: arg_30C_0 = (num2 * 107773621u ^ 2347211285u); continue; case 8u: this.IsRestricted = input.ReadBool(); arg_30C_0 = 2255245523u; continue; case 9u: arg_30C_0 = ((num != 82u) ? 4270703819u : 2404501259u); continue; case 10u: this.IsLifetime = input.ReadBool(); arg_30C_0 = 3910746666u; continue; case 11u: arg_30C_0 = (num2 * 2983940867u ^ 2829260512u); continue; case 12u: arg_30C_0 = (num2 * 3221824298u ^ 337455535u); continue; case 13u: arg_30C_0 = (((num == 77u) ? 1135781216u : 1140749143u) ^ num2 * 3835847040u); continue; case 14u: this.IsTrial = input.ReadBool(); arg_30C_0 = 3860906601u; continue; case 15u: arg_30C_0 = 3888080640u; continue; case 16u: this.licenses_.AddEntriesFrom(input, GameLevelInfo._repeated_licenses_codec); arg_30C_0 = 2981099641u; continue; case 17u: arg_30C_0 = ((num == 48u) ? 3883475998u : 3847481698u); continue; case 18u: arg_30C_0 = (num2 * 1520717367u ^ 4087809715u); continue; case 19u: this.RealmPermissions = input.ReadUInt32(); arg_30C_0 = 2981099641u; continue; case 20u: arg_30C_0 = (((num > 40u) ? 2633313427u : 4032593125u) ^ num2 * 2927928898u); continue; case 21u: arg_30C_0 = (num2 * 3590906839u ^ 3914509809u); continue; case 23u: goto IL_3A4; case 24u: arg_30C_0 = (num2 * 747292950u ^ 3357728771u); continue; case 25u: arg_30C_0 = (((num == 32u) ? 2618108464u : 4089132162u) ^ num2 * 1226681553u); continue; case 26u: arg_30C_0 = (num2 * 3886128596u ^ 2643262468u); continue; case 27u: arg_30C_0 = (((num == 66u) ? 1820319622u : 1796425916u) ^ num2 * 508609638u); continue; case 28u: this.Program = input.ReadFixed32(); arg_30C_0 = 2442031362u; continue; case 29u: this.IsBeta = input.ReadBool(); arg_30C_0 = 2981099641u; continue; case 30u: arg_30C_0 = ((num <= 77u) ? 2598026719u : 3843962785u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountList.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountList : IMessage<GameAccountList>, IEquatable<GameAccountList>, IDeepCloneable<GameAccountList>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountList.__c __9 = new GameAccountList.__c(); internal GameAccountList cctor>b__29_0() { return new GameAccountList(); } } private static readonly MessageParser<GameAccountList> _parser = new MessageParser<GameAccountList>(new Func<GameAccountList>(GameAccountList.__c.__9.<.cctor>b__29_0)); public const int RegionFieldNumber = 3; private uint region_; public const int HandleFieldNumber = 4; private static readonly FieldCodec<GameAccountHandle> _repeated_handle_codec = FieldCodec.ForMessage<GameAccountHandle>(34u, GameAccountHandle.Parser); private readonly RepeatedField<GameAccountHandle> handle_ = new RepeatedField<GameAccountHandle>(); public static MessageParser<GameAccountList> Parser { get { return GameAccountList._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[30]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountList.Descriptor; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public RepeatedField<GameAccountHandle> Handle { get { return this.handle_; } } public GameAccountList() { } public GameAccountList(GameAccountList other) : this() { this.region_ = other.region_; this.handle_ = other.handle_.Clone(); } public GameAccountList Clone() { return new GameAccountList(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountList); } public bool Equals(GameAccountList other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -522220772) % 9) { case 1: return true; case 2: arg_72_0 = (this.handle_.Equals(other.handle_) ? -129434358 : -1981631962); continue; case 3: arg_72_0 = ((this.Region != other.Region) ? -59806053 : -1499219566); continue; case 4: return false; case 5: goto IL_B0; case 6: goto IL_15; case 7: return false; case 8: return false; } break; } return true; IL_15: arg_72_0 = -254910296; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? -1491032248 : -2145001292); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.Region != 0u) { while (true) { IL_47: uint arg_2F_0 = 2190453388u; while (true) { uint num2; switch ((num2 = (arg_2F_0 ^ 2256295204u)) % 3u) { case 0u: goto IL_47; case 1u: num ^= this.Region.GetHashCode(); arg_2F_0 = (num2 * 3802467911u ^ 620032336u); continue; } goto Block_2; } } Block_2:; } return num ^ this.handle_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Region != 0u) { goto IL_2D; } goto IL_53; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 4059160018u)) % 4u) { case 0u: goto IL_2D; case 1u: goto IL_53; case 2u: output.WriteRawTag(24); output.WriteUInt32(this.Region); arg_37_0 = (num * 739412060u ^ 855865399u); continue; } break; } return; IL_2D: arg_37_0 = 2404234064u; goto IL_32; IL_53: this.handle_.WriteTo(output, GameAccountList._repeated_handle_codec); arg_37_0 = 3341864853u; goto IL_32; } public int CalculateSize() { int num = 0; while (true) { IL_8C: uint arg_6C_0 = 2198202643u; while (true) { uint num2; switch ((num2 = (arg_6C_0 ^ 3555375618u)) % 5u) { case 0u: goto IL_8C; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_6C_0 = (num2 * 547832345u ^ 3807745854u); continue; case 2u: num += this.handle_.CalculateSize(GameAccountList._repeated_handle_codec); arg_6C_0 = 3480659261u; continue; case 4u: arg_6C_0 = (((this.Region == 0u) ? 1052384729u : 1120422605u) ^ num2 * 3000415128u); continue; } return num; } } return num; } public void MergeFrom(GameAccountList other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2954756466u)) % 5u) { case 0u: goto IL_2D; case 1u: goto IL_63; case 2u: this.Region = other.Region; arg_37_0 = (num * 3150064969u ^ 430821387u); continue; case 4u: return; } break; } this.handle_.Add(other.handle_); return; IL_2D: arg_37_0 = 2531668989u; goto IL_32; IL_63: arg_37_0 = ((other.Region != 0u) ? 3794845878u : 2957075695u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_E2: uint num; uint arg_A7_0 = ((num = input.ReadTag()) == 0u) ? 2774671074u : 3629401495u; while (true) { uint num2; switch ((num2 = (arg_A7_0 ^ 2836771334u)) % 8u) { case 0u: this.handle_.AddEntriesFrom(input, GameAccountList._repeated_handle_codec); arg_A7_0 = 3914515093u; continue; case 1u: arg_A7_0 = ((num != 24u) ? 3989558872u : 3295525467u); continue; case 2u: input.SkipLastField(); arg_A7_0 = (num2 * 1924731349u ^ 4038939879u); continue; case 3u: goto IL_E2; case 5u: this.Region = input.ReadUInt32(); arg_A7_0 = 3914515093u; continue; case 6u: arg_A7_0 = (((num != 34u) ? 1197756382u : 951955388u) ^ num2 * 1260106519u); continue; case 7u: arg_A7_0 = 3629401495u; continue; } return; } } } } } <file_sep>/Framework.Network.Packets/PacketReader.cs using Framework.Constants.Net; using Framework.Misc; using Framework.ObjectDefines; using System; using System.Globalization; using System.IO; using System.Text; namespace Framework.Network.Packets { public class PacketReader : BinaryReader { public ClientMessage Opcode { get; set; } public uint Size { get; set; } public byte[] Storage { get; set; } public PacketReader(byte[] data, bool worldPacket = true, bool initiated = true) : base(PacketReader.smethod_0(data)) { while (true) { IL_1D2: uint arg_189_0 = 3156641816u; while (true) { uint num; switch ((num = (arg_189_0 ^ 3864136495u)) % 15u) { case 0u: goto IL_1D2; case 1u: this.Size = this.Read<uint>(); arg_189_0 = 2743092977u; continue; case 2u: arg_189_0 = (((!initiated) ? 3590482912u : 2412903487u) ^ num * 2994934353u); continue; case 3u: this.Storage = new byte[this.Size - 2u]; arg_189_0 = (num * 1087116174u ^ 2139534886u); continue; case 4u: goto IL_1D9; case 5u: arg_189_0 = (((this.Size <= 2u) ? 4116359952u : 3109502271u) ^ num * 334575575u); continue; case 6u: this.Opcode = (ClientMessage)PacketReader.smethod_1(this); arg_189_0 = (num * 1057443353u ^ 93166561u); continue; case 7u: this.Size = this.Read<uint>(); arg_189_0 = (num * 3494330189u ^ 4069919854u); continue; case 8u: this.Opcode = (ClientMessage)PacketReader.smethod_1(this); this.Storage = new byte[this.Size - 2u]; arg_189_0 = (num * 1597543789u ^ 4404019u); continue; case 9u: arg_189_0 = (worldPacket ? 2554908325u : 2897364664u); continue; case 10u: goto IL_1F0; case 11u: this.Opcode = (ClientMessage)PacketReader.smethod_1(this); arg_189_0 = (num * 4166718346u ^ 391895848u); continue; case 12u: PacketReader.smethod_2(data, 6, this.Storage, 0, (int)(this.Size - 2u)); arg_189_0 = (num * 1810940774u ^ 357029026u); continue; case 14u: this.Storage = new byte[data.Length]; arg_189_0 = (num * 247058560u ^ 451953824u); continue; } goto Block_4; } } Block_4: return; IL_1D9: PacketReader.smethod_2(data, 6, this.Storage, 0, (int)(this.Size - 2u)); return; IL_1F0: PacketReader.smethod_2(data, 0, this.Storage, 0, data.Length); } public T Read<T>() { return this.Read<T>(); } public SmartGuid ReadGuid() { SmartGuid smartGuid = new SmartGuid(); while (true) { IL_AC: uint arg_88_0 = 987742680u; while (true) { uint num; switch ((num = (arg_88_0 ^ 1441787658u)) % 6u) { case 0u: goto IL_AC; case 1u: { byte b; smartGuid.HighGuid = this.GetSmartGuid(b); arg_88_0 = (num * 355414513u ^ 3371240138u); continue; } case 2u: { byte b = this.Read<byte>(); arg_88_0 = (num * 1336090768u ^ 1604431491u); continue; } case 4u: { byte gLength = this.Read<byte>(); arg_88_0 = (num * 1082293947u ^ 737268760u); continue; } case 5u: { byte gLength; smartGuid.Guid = this.GetSmartGuid(gLength); byte b; arg_88_0 = (((b > 0) ? 2277857867u : 3763154427u) ^ num * 1623469582u); continue; } } return smartGuid; } } return smartGuid; } public ulong ReadSmartGuid() { byte gLength = this.Read<byte>(); byte b = this.Read<byte>(); ulong arg_21_0 = this.GetSmartGuid(gLength); if (b > 0) { this.GetSmartGuid(b); } return arg_21_0; } public ulong GetSmartGuid(byte gLength) { ulong num = 0uL; while (true) { IL_CA: uint arg_9E_0 = 1438227047u; while (true) { uint num2; switch ((num2 = (arg_9E_0 ^ 1866872718u)) % 8u) { case 0u: goto IL_CA; case 1u: { byte b = 0; arg_9E_0 = (num2 * 682674093u ^ 3834076868u); continue; } case 2u: { byte b; arg_9E_0 = ((b >= 8) ? 1021561707u : 43423272u); continue; } case 3u: { byte b; b += 1; arg_9E_0 = 1000440716u; continue; } case 4u: { byte b; num |= (ulong)this.Read<byte>() << (int)(b * 8); arg_9E_0 = (num2 * 3146625632u ^ 574776333u); continue; } case 6u: { byte b; arg_9E_0 = (((1 << (int)b & (int)gLength) == 0) ? 1721453453u : 850078106u); continue; } case 7u: arg_9E_0 = (num2 * 2277653255u ^ 2526320949u); continue; } return num; } } return num; } public string ReadCString() { StringBuilder stringBuilder = PacketReader.smethod_3(); while (true) { IL_A5: uint arg_81_0 = 3848595604u; while (true) { uint num; switch ((num = (arg_81_0 ^ 2744129681u)) % 6u) { case 0u: { char c = PacketReader.smethod_7(PacketReader.smethod_5(PacketReader.smethod_4(), new byte[1]), PacketReader.smethod_6()); arg_81_0 = (num * 2827065615u ^ 2813486781u); continue; } case 1u: { char c2 = this.method_0(); arg_81_0 = (num * 1477345143u ^ 2513410648u); continue; } case 2u: { char c; char c2; arg_81_0 = ((c2 != c) ? 3896477412u : 3424037926u); continue; } case 3u: { char c2; PacketReader.smethod_8(stringBuilder, c2); c2 = this.method_0(); arg_81_0 = 3439858363u; continue; } case 4u: goto IL_A5; } goto Block_2; } } Block_2: return PacketReader.smethod_9(stringBuilder); } public string ReadString(uint count) { byte[] byte_ = this.ReadBytes(count); return PacketReader.smethod_5(PacketReader.smethod_4(), byte_); } public byte[] ReadBytes(uint count) { return this.method_1((int)count); } public string ReadStringFromBytes(uint count) { byte[] array = this.ReadBytes(count); while (true) { IL_3A: uint arg_22_0 = 1290115285u; while (true) { uint num; switch ((num = (arg_22_0 ^ 1657894067u)) % 3u) { case 0u: goto IL_3A; case 1u: PacketReader.smethod_10(array); arg_22_0 = (num * 3698391708u ^ 2220090647u); continue; } goto Block_1; } } Block_1: return PacketReader.smethod_5(PacketReader.smethod_4(), array); } public string ReadIPAddress() { byte[] array = new byte[4]; int num = 0; while (true) { IL_81: uint arg_5D_0 = 1700376117u; while (true) { uint num2; switch ((num2 = (arg_5D_0 ^ 2016936146u)) % 6u) { case 0u: array[num] = this.Read<byte>(); arg_5D_0 = 1376118107u; continue; case 1u: num++; arg_5D_0 = (num2 * 1101403398u ^ 2667150997u); continue; case 2u: goto IL_81; case 3u: arg_5D_0 = (num2 * 2503189178u ^ 1531486581u); continue; case 5u: arg_5D_0 = ((num >= 4) ? 371515074u : 1324051690u); continue; } goto Block_2; } } Block_2: return PacketReader.smethod_11(new object[] { array[0], Module.smethod_37<string>(3886401134u), array[1], Module.smethod_35<string>(3143151842u), array[2], Module.smethod_34<string>(3349943853u), array[3] }); } public string ReadAccountName() { StringBuilder stringBuilder = PacketReader.smethod_3(); byte b = this.Read<byte>(); while (true) { IL_B2: uint arg_89_0 = 402315765u; while (true) { uint num; switch ((num = (arg_89_0 ^ 1923119469u)) % 7u) { case 1u: { int num2 = 0; arg_89_0 = (num * 1362164820u ^ 1780972646u); continue; } case 2u: { char[] array = new char[(int)b]; arg_89_0 = (num * 2588860411u ^ 4044429464u); continue; } case 3u: arg_89_0 = (num * 1704855395u ^ 3221030392u); continue; case 4u: { int num2; char[] array; array[num2] = this.method_0(); PacketReader.smethod_8(stringBuilder, array[num2]); num2++; arg_89_0 = 1876511029u; continue; } case 5u: { int num2; arg_89_0 = ((num2 >= (int)b) ? 1063834256u : 791108076u); continue; } case 6u: goto IL_B2; } goto Block_2; } } Block_2: return PacketReader.smethod_12(PacketReader.smethod_9(stringBuilder), PacketReader.smethod_6()); } public void Skip(int count) { Stream expr_06 = this.method_2(); PacketReader.smethod_14(expr_06, PacketReader.smethod_13(expr_06) + (long)count); } static MemoryStream smethod_0(byte[] byte_0) { return new MemoryStream(byte_0); } static ushort smethod_1(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt16(); } static void smethod_2(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static StringBuilder smethod_3() { return new StringBuilder(); } char method_0() { return base.ReadChar(); } static Encoding smethod_4() { return Encoding.UTF8; } static string smethod_5(Encoding encoding_0, byte[] byte_0) { return encoding_0.GetString(byte_0); } static CultureInfo smethod_6() { return CultureInfo.InvariantCulture; } static char smethod_7(string string_0, IFormatProvider iformatProvider_0) { return Convert.ToChar(string_0, iformatProvider_0); } static StringBuilder smethod_8(StringBuilder stringBuilder_0, char char_0) { return stringBuilder_0.Append(char_0); } static string smethod_9(object object_0) { return object_0.ToString(); } byte[] method_1(int int_0) { return base.ReadBytes(int_0); } static void smethod_10(Array array_0) { Array.Reverse(array_0); } static string smethod_11(object[] object_0) { return string.Concat(object_0); } static string smethod_12(string string_0, CultureInfo cultureInfo_0) { return string_0.ToUpper(cultureInfo_0); } Stream method_2() { return base.BaseStream; } static long smethod_13(Stream stream_0) { return stream_0.Position; } static void smethod_14(Stream stream_0, long long_0) { stream_0.Position = long_0; } } } <file_sep>/AuthServer.WorldServer.Managers/SpawnManager.cs using AuthServer.WorldServer.Game.Entities; using Framework.Constants.Misc; using Framework.Logging; using Framework.Misc; using Framework.ObjectDefines; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Text; namespace AuthServer.WorldServer.Managers { public sealed class SpawnManager : Singleton<SpawnManager> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SpawnManager.__c __9 = new SpawnManager.__c(); public static Func<Waypoint, int> __9__12_0; internal int <GetLastWPIndex>b__12_0(Waypoint wp) { return wp.Index; } } public Dictionary<ulong, CreatureSpawn> CreatureSpawns; public Dictionary<ulong, CreatureSpawn> CreatureSpawnsFile; public Dictionary<ulong, GameObjectSpawn> GameObjectSpawns; public Dictionary<ulong, CreatureSpawn> preMadeSpawns; public Dictionary<ulong, GameObjectSpawn> preMadeSpawns2; private Dictionary<ulong, List<Waypoint>> waypoints; public void ClearSpawns() { } private SpawnManager() { while (true) { IL_14F: uint arg_11E_0 = 3419753491u; while (true) { uint num; switch ((num = (arg_11E_0 ^ 4166347725u)) % 9u) { case 0u: arg_11E_0 = ((!SpawnManager.smethod_5(Module.smethod_34<string>(3998541984u))) ? 3080705907u : 3847066629u); continue; case 1u: this.Initialize(); arg_11E_0 = 3251319907u; continue; case 2u: this.waypoints = new Dictionary<ulong, List<Waypoint>>(); arg_11E_0 = ((SpawnManager.smethod_5(Module.smethod_37<string>(3944903225u)) ? 2575663796u : 2790913321u) ^ num * 2659903749u); continue; case 3u: goto IL_14F; case 4u: arg_11E_0 = ((!SpawnManager.smethod_5(Module.smethod_33<string>(921669354u))) ? 3145729640u : 3026661308u); continue; case 5u: SpawnManager.smethod_7(SpawnManager.smethod_6(Module.smethod_33<string>(1138970044u))); arg_11E_0 = (num * 1677415986u ^ 3691455769u); continue; case 6u: SpawnManager.smethod_7(SpawnManager.smethod_6(Module.smethod_35<string>(2234073573u))); arg_11E_0 = (num * 480825781u ^ 2964226360u); continue; case 8u: SpawnManager.smethod_7(SpawnManager.smethod_6(Module.smethod_37<string>(2484030797u))); arg_11E_0 = (num * 3921531482u ^ 3098397118u); continue; } return; } } } public void Initialize() { this.LoadCreatureWaypoints(); while (true) { IL_38: uint arg_20_0 = 1917998263u; while (true) { uint num; switch ((num = (arg_20_0 ^ 986731147u)) % 3u) { case 1u: this.LoadCreatureSpawns(); arg_20_0 = (num * 316896139u ^ 2267655666u); continue; case 2u: goto IL_38; } goto Block_1; } } Block_1: this.LoadGameobjectSpawns(); } public void UpdateSpawnEmote(ulong guid, int emote) { this.CreatureSpawns[guid].Emote = emote; StringBuilder stringBuilder; while (true) { IL_69: uint arg_4D_0 = 1512577389u; while (true) { uint num; switch ((num = (arg_4D_0 ^ 18032223u)) % 4u) { case 0u: goto IL_69; case 2u: this.CreatureSpawnsFile[guid].Emote = emote; arg_4D_0 = (num * 64973333u ^ 2431847214u); continue; case 3u: stringBuilder = SpawnManager.smethod_8(); arg_4D_0 = (num * 3620092624u ^ 847020610u); continue; } goto Block_1; } } Block_1: using (Dictionary<ulong, CreatureSpawn>.Enumerator enumerator = this.CreatureSpawnsFile.GetEnumerator()) { while (true) { IL_1AB: uint arg_17C_0 = enumerator.MoveNext() ? 1933591873u : 470851310u; while (true) { uint num; switch ((num = (arg_17C_0 ^ 18032223u)) % 5u) { case 0u: { KeyValuePair<ulong, CreatureSpawn> current; SpawnManager.smethod_10(stringBuilder, SpawnManager.smethod_9(Module.smethod_33<string>(45909257u), new object[] { current.Value.Id, current.Value.Map, current.Value.Position.X, current.Value.Position.Y, current.Value.Position.Z, current.Value.Position.O, current.Value.Emote })); arg_17C_0 = (num * 800012124u ^ 2150310667u); continue; } case 1u: { KeyValuePair<ulong, CreatureSpawn> current = enumerator.Current; arg_17C_0 = 2078491004u; continue; } case 2u: arg_17C_0 = 1933591873u; continue; case 4u: goto IL_1AB; } goto Block_4; } } Block_4:; } SpawnManager.smethod_12(Module.smethod_34<string>(3998541984u), SpawnManager.smethod_11(stringBuilder)); } public void AddSpawn(CreatureSpawn spawn) { this.CreatureSpawns.Add(spawn.Guid, spawn); this.CreatureSpawnsFile.Add(spawn.Guid, spawn); while (true) { IL_ED: uint arg_D5_0 = 3922490915u; while (true) { uint num; switch ((num = (arg_D5_0 ^ 3761259110u)) % 3u) { case 1u: SpawnManager.smethod_13(Module.smethod_36<string>(307414319u), SpawnManager.smethod_9(Module.smethod_37<string>(2922251266u), new object[] { spawn.Id, spawn.Map, spawn.Position.X, spawn.Position.Y, spawn.Position.Z, spawn.Position.O, spawn.Emote })); arg_D5_0 = (num * 1825042784u ^ 1305675415u); continue; case 2u: goto IL_ED; } return; } } } public void AddWayPoint(Waypoint waypoint) { if (!this.waypoints.ContainsKey(waypoint.CreatureGuid)) { goto IL_DB; } goto IL_12A; uint arg_10A_0; while (true) { IL_105: uint num; switch ((num = (arg_10A_0 ^ 2809646139u)) % 5u) { case 1u: goto IL_12A; case 2u: this.waypoints.Add(waypoint.CreatureGuid, new List<Waypoint>()); arg_10A_0 = (num * 408980959u ^ 1259594681u); continue; case 3u: goto IL_DB; case 4u: this.waypoints[waypoint.CreatureGuid].Add(waypoint); SpawnManager.smethod_13(Module.smethod_33<string>(487067974u), SpawnManager.smethod_9(Module.smethod_34<string>(3783405393u), new object[] { waypoint.CreatureGuid, waypoint.Point.X, waypoint.Point.Y, waypoint.Point.Z, waypoint.Point.O, waypoint.Index, waypoint.WaitTime })); arg_10A_0 = (num * 914029717u ^ 2473375718u); continue; } break; } return; IL_DB: arg_10A_0 = 3680989355u; goto IL_105; IL_12A: waypoint.Index = this.GetLastWPIndex(waypoint.CreatureGuid); arg_10A_0 = 3213433008u; goto IL_105; } public int GetLastWPIndex(ulong guid) { IEnumerable<Waypoint> arg_2B_0 = this.waypoints[guid]; Func<Waypoint, int> arg_2B_1; if ((arg_2B_1 = SpawnManager.__c.__9__12_0) == null) { arg_2B_1 = (SpawnManager.__c.__9__12_0 = new Func<Waypoint, int>(SpawnManager.__c.__9.<GetLastWPIndex>b__12_0)); } return arg_2B_0.OrderBy(arg_2B_1).ToArray<Waypoint>()[this.waypoints[guid].Count - 1].Index; } public void AddSpawn(GameObjectSpawn spawn) { this.GameObjectSpawns.Add(spawn.Guid, spawn); SpawnManager.smethod_13(Module.smethod_36<string>(648926041u), SpawnManager.smethod_14(SpawnManager.smethod_9(Module.smethod_33<string>(3088118917u), new object[] { spawn.Id, spawn.Map, spawn.Position.X, spawn.Position.Y, spawn.Position.Z, spawn.Position.O }), SpawnManager.smethod_9(Module.smethod_34<string>(4036951862u), new object[] { spawn.GameObject.Rot.X, spawn.GameObject.Rot.Y, spawn.GameObject.Rot.Z, spawn.GameObject.Rot.O, spawn.AnimProgress, spawn.State }))); } public void RemoveWaypoint(Waypoint wayPoint) { Waypoint wayPoint; StringBuilder stringBuilder; while (true) { IL_16F: uint arg_13D_0 = 1252686121u; while (true) { uint num; switch ((num = (arg_13D_0 ^ 10291043u)) % 9u) { case 0u: goto IL_16F; case 1u: { int num2; num2++; arg_13D_0 = 1333700840u; continue; } case 2u: wayPoint = wayPoint2; arg_13D_0 = (num * 1469421495u ^ 1154545119u); continue; case 3u: { int num2 = 0; arg_13D_0 = (num * 4202381741u ^ 1823053787u); continue; } case 4u: { int num2; this.waypoints[wayPoint.CreatureGuid][num2].Index--; arg_13D_0 = (num * 957938104u ^ 1119971496u); continue; } case 5u: { int num2; arg_13D_0 = ((num2 >= this.waypoints[wayPoint.CreatureGuid].Count) ? 1977392277u : 158463845u); continue; } case 6u: stringBuilder = SpawnManager.smethod_8(); this.waypoints[wayPoint.CreatureGuid].RemoveAll((Waypoint r) => r.Index == wayPoint.Index); arg_13D_0 = (num * 894924530u ^ 1305365032u); continue; case 8u: { int num2; arg_13D_0 = ((this.waypoints[wayPoint.CreatureGuid][num2].Index > wayPoint.Index) ? 1981754272u : 715177856u); continue; } } goto Block_3; } } Block_3: foreach (KeyValuePair<ulong, List<Waypoint>> current in this.waypoints) { using (List<Waypoint>.Enumerator enumerator2 = current.Value.GetEnumerator()) { while (true) { IL_297: int arg_26B_0 = (!enumerator2.MoveNext()) ? 1596937901 : 26561718; while (true) { switch ((arg_26B_0 ^ 10291043) % 4) { case 0: goto IL_297; case 1: { Waypoint current2 = enumerator2.Current; SpawnManager.smethod_10(stringBuilder, SpawnManager.smethod_9(Module.smethod_35<string>(3759077104u), new object[] { current2.CreatureGuid, current2.Point.X, current2.Point.Y, current2.Point.Z, current2.Point.O, current2.Index, current2.WaitTime })); arg_26B_0 = 241486627; continue; } case 3: arg_26B_0 = 26561718; continue; } goto Block_9; } } Block_9:; } } SpawnManager.smethod_12(Module.smethod_36<string>(1331949485u), SpawnManager.smethod_11(stringBuilder)); } public void RemoveSpawn(CreatureSpawn spawn, bool delete) { if (delete) { StringBuilder stringBuilder; while (true) { IL_5C: uint arg_44_0 = 102419110u; while (true) { uint num; switch ((num = (arg_44_0 ^ 1668610261u)) % 3u) { case 0u: goto IL_5C; case 1u: this.CreatureSpawnsFile.Remove(spawn.Guid); this.CreatureSpawns.Remove(spawn.Guid); stringBuilder = SpawnManager.smethod_8(); arg_44_0 = (num * 2432127833u ^ 1076985941u); continue; } goto Block_2; } } Block_2: using (Dictionary<ulong, CreatureSpawn>.Enumerator enumerator = this.CreatureSpawnsFile.GetEnumerator()) { while (true) { IL_185: int arg_15A_0 = enumerator.MoveNext() ? 1991770314 : 1945756631; while (true) { switch ((arg_15A_0 ^ 1668610261) % 4) { case 0: arg_15A_0 = 1991770314; continue; case 1: goto IL_185; case 3: { KeyValuePair<ulong, CreatureSpawn> current = enumerator.Current; SpawnManager.smethod_10(stringBuilder, SpawnManager.smethod_9(Module.smethod_34<string>(1495316827u), new object[] { current.Value.Id, current.Value.Map, current.Value.Position.X, current.Value.Position.Y, current.Value.Position.Z, current.Value.Position.O, current.Value.Emote })); arg_15A_0 = 835919088; continue; } } goto Block_5; } } Block_5:; } SpawnManager.smethod_12(Module.smethod_33<string>(1138970044u), SpawnManager.smethod_11(stringBuilder)); } } public void RemoveSpawn(GameObjectSpawn spawn) { this.GameObjectSpawns.Remove(spawn.Guid); StringBuilder stringBuilder; while (true) { IL_44: uint arg_2C_0 = 4012003314u; while (true) { uint num; switch ((num = (arg_2C_0 ^ 2695777957u)) % 3u) { case 0u: goto IL_44; case 1u: stringBuilder = SpawnManager.smethod_8(); arg_2C_0 = (num * 2867795827u ^ 3662844227u); continue; } goto Block_1; } } Block_1: using (Dictionary<ulong, GameObjectSpawn>.Enumerator enumerator = this.GameObjectSpawns.GetEnumerator()) { while (true) { IL_1E1: uint arg_1B2_0 = (!enumerator.MoveNext()) ? 3679854817u : 2267341827u; while (true) { uint num; switch ((num = (arg_1B2_0 ^ 2695777957u)) % 5u) { case 0u: arg_1B2_0 = 2267341827u; continue; case 1u: goto IL_1E1; case 2u: SpawnManager.smethod_10(stringBuilder, SpawnManager.smethod_14(SpawnManager.smethod_9(Module.smethod_33<string>(3088118917u), new object[] { spawn.Id, spawn.Map, spawn.Position.X, spawn.Position.Y, spawn.Position.Z, spawn.Position.O }), SpawnManager.smethod_9(Module.smethod_35<string>(261510741u), new object[] { spawn.GameObject.Rot.X, spawn.GameObject.Rot.Y, spawn.GameObject.Rot.Z, spawn.GameObject.Rot.O, spawn.AnimProgress, spawn.State }))); arg_1B2_0 = (num * 3846870361u ^ 1228420013u); continue; case 3u: { KeyValuePair<ulong, GameObjectSpawn> arg_74_0 = enumerator.Current; arg_1B2_0 = 2841696158u; continue; } } goto Block_4; } } Block_4:; } SpawnManager.smethod_12(Module.smethod_35<string>(1324711985u), SpawnManager.smethod_11(stringBuilder)); } public CreatureSpawn FindSpawn(ulong guid) { CreatureSpawn result; this.CreatureSpawns.TryGetValue(guid, out result); return result; } public GameObjectSpawn FindSpawn(long guid) { GameObjectSpawn result; this.GameObjectSpawns.TryGetValue((ulong)guid, out result); return result; } [IteratorStateMachine(typeof(SpawnManager.<GetInRangeCreatures>d__19))] public IEnumerable<CreatureSpawn> GetInRangeCreatures(WorldObject obj) { SpawnManager.<GetInRangeCreatures>d__19 expr_07 = new SpawnManager.<GetInRangeCreatures>d__19(-2); expr_07.__4__this = this; expr_07.__3__obj = obj; return expr_07; } [IteratorStateMachine(typeof(SpawnManager.<GetInRangeObjects>d__20))] public IEnumerable<GameObjectSpawn> GetInRangeObjects(WorldObject obj) { SpawnManager.<GetInRangeObjects>d__20 expr_07 = new SpawnManager.<GetInRangeObjects>d__20(-2); expr_07.__4__this = this; expr_07.__3__obj = obj; return expr_07; } public IEnumerable<CreatureSpawn> GetInRangeCreatures2(WorldObject obj, bool meh) { List<CreatureSpawn> list = new List<CreatureSpawn>(); using (Dictionary<ulong, CreatureSpawn>.Enumerator enumerator = new Dictionary<ulong, CreatureSpawn>(this.CreatureSpawns).GetEnumerator()) { while (true) { IL_108: uint arg_D1_0 = (!enumerator.MoveNext()) ? 1029218472u : 226583693u; while (true) { uint num; switch ((num = (arg_D1_0 ^ 217325220u)) % 7u) { case 0u: { KeyValuePair<ulong, CreatureSpawn> current; arg_D1_0 = (((!obj.CheckDistance(current.Value, 100000f)) ? 585138839u : 50482668u) ^ num * 1366446683u); continue; } case 1u: { KeyValuePair<ulong, CreatureSpawn> current = enumerator.Current; arg_D1_0 = 1081756557u; continue; } case 2u: goto IL_108; case 4u: arg_D1_0 = 226583693u; continue; case 5u: { KeyValuePair<ulong, CreatureSpawn> current; list.Add(current.Value); arg_D1_0 = (num * 3102075345u ^ 982577887u); continue; } case 6u: { KeyValuePair<ulong, CreatureSpawn> current; arg_D1_0 = (((!obj.ToCharacter().InRangeObjects.ContainsKey(current.Key)) ? 3815954578u : 3784905265u) ^ num * 4188323886u); continue; } } goto Block_5; } } Block_5:; } return list; } [IteratorStateMachine(typeof(SpawnManager.<GetOutOfRangeCreatures>d__22))] public IEnumerable<CreatureSpawn> GetOutOfRangeCreatures(WorldObject obj) { SpawnManager.<GetOutOfRangeCreatures>d__22 expr_07 = new SpawnManager.<GetOutOfRangeCreatures>d__22(-2); expr_07.__4__this = this; expr_07.__3__obj = obj; return expr_07; } public void LoadCreatureSpawns() { if (this.CreatureSpawns == null) { goto IL_1A; } goto IL_96; uint arg_65_0; bool flag; bool flag2; while (true) { IL_60: uint num; switch ((num = (arg_65_0 ^ 1524569722u)) % 6u) { case 1u: this.CreatureSpawnsFile = new Dictionary<ulong, CreatureSpawn>(); arg_65_0 = (num * 358794246u ^ 1309962346u); continue; case 2u: flag = false; flag2 = false; arg_65_0 = 123143254u; continue; case 3u: goto IL_96; case 4u: this.CreatureSpawns = new Dictionary<ulong, CreatureSpawn>(); arg_65_0 = (num * 19215032u ^ 3342281501u); continue; case 5u: goto IL_1A; } break; } StreamReader streamReader = SpawnManager.smethod_15(Module.smethod_36<string>(307414319u)); try { int num2 = 10000; while (true) { IL_6F6: uint arg_650_0 = 981451751u; while (true) { uint num; Creature arg_1A6_0; Creature creature; switch ((num = (arg_650_0 ^ 1524569722u)) % 38u) { case 0u: { ulong num3 = 0uL; arg_650_0 = 958144028u; continue; } case 1u: { string[] array; ulong num3 = ulong.Parse(array[0]); int num4 = int.Parse(array[1]); int num5 = int.Parse(array[2]); arg_650_0 = (num * 2119059u ^ 3327670421u); continue; } case 2u: arg_650_0 = (SpawnManager.smethod_18(streamReader) ? 747850818u : 1461667358u); continue; case 3u: { string[] array; float o = float.Parse(array[5]); arg_650_0 = (num * 2611195834u ^ 2430692469u); continue; } case 4u: flag2 = true; arg_650_0 = (num * 3002735187u ^ 2663054816u); continue; case 5u: arg_1A6_0 = null; goto IL_1A6; case 6u: { string[] array; float o = float.Parse(array[6]); int emote = int.Parse(array[7]); arg_650_0 = (num * 3904469367u ^ 2227231295u); continue; } case 7u: { string[] array; arg_650_0 = ((array.Length != 7) ? 224207891u : 518462223u); continue; } case 8u: { string[] array; float z = float.Parse(array[4]); arg_650_0 = (num * 4232840693u ^ 3786714935u); continue; } case 9u: { string[] array; arg_650_0 = ((array.Length == 8) ? 1330120259u : 2048322271u); continue; } case 10u: { ulong num3; CreatureSpawn value; this.CreatureSpawnsFile.Add(num3, value); arg_650_0 = (num * 1233841498u ^ 1180760474u); continue; } case 11u: goto IL_6F6; case 12u: { ulong num3; CreatureSpawn value; this.CreatureSpawns.Add(num3, value); arg_650_0 = (num * 4197746823u ^ 522438082u); continue; } case 13u: Log.Message(LogType.Debug, Module.smethod_34<string>(3127249109u), Array.Empty<object>()); flag = true; arg_650_0 = (num * 2116225594u ^ 3173140791u); continue; case 14u: { string[] array; int num4 = int.Parse(array[0]); int num5 = int.Parse(array[1]); arg_650_0 = 1277984794u; continue; } case 15u: { float x = 0f; float y = 0f; arg_650_0 = (num * 2688627230u ^ 99094095u); continue; } case 16u: { string[] array; float x = float.Parse(array[4]); float y = float.Parse(array[5]); arg_650_0 = (num * 2941514440u ^ 2694688977u); continue; } case 17u: Log.Message(LogType.Debug, Module.smethod_37<string>(2659301302u), Array.Empty<object>()); arg_650_0 = (num * 3710228926u ^ 4010143204u); continue; case 18u: { int num4 = 0; arg_650_0 = (num * 2421001289u ^ 1886888772u); continue; } case 19u: { string[] array; float z = float.Parse(array[5]); arg_650_0 = (num * 483235344u ^ 1035959018u); continue; } case 21u: { string[] array; int emote = int.Parse(array[6]); arg_650_0 = (num * 2265660278u ^ 2930380541u); continue; } case 22u: { string[] array; float x = float.Parse(array[2]); arg_650_0 = (num * 1182226807u ^ 2854965704u); continue; } case 23u: { float z = 0f; float o = 0f; arg_650_0 = (num * 2243190588u ^ 4130535944u); continue; } case 24u: { ulong num3; int num4; int num5; float o; int emote; float z; float x; float y; CreatureSpawn value = new CreatureSpawn(212) { SGuid = new SmartGuid(num3, num4, GuidType.Creature, (ulong)num5), Guid = num3, Id = num4, Creature = creature, Position = new Vector4 { X = x, Y = y, Z = z, O = o }, Map = (uint)num5, Emote = emote }; arg_650_0 = (num * 3325252821u ^ 1081726913u); continue; } case 25u: arg_650_0 = ((!flag2) ? 265209513u : 866334176u); continue; case 26u: { string[] array; float y = float.Parse(array[3]); arg_650_0 = (num * 3618369892u ^ 2259650920u); continue; } case 27u: { string[] array; arg_650_0 = (((array.Length != 7) ? 202482177u : 1237354634u) ^ num * 2631541755u); continue; } case 28u: { num2++; string[] array = SpawnManager.smethod_17(SpawnManager.smethod_16(streamReader), new char[] { ',' }); arg_650_0 = (flag ? 900633349u : 600465647u); continue; } case 29u: { string[] array; arg_650_0 = (((array.Length != 7) ? 4192149553u : 2900835666u) ^ num * 3431770562u); continue; } case 30u: arg_650_0 = (((creature != null) ? 1717833002u : 656419342u) ^ num * 1298903974u); continue; case 31u: arg_650_0 = (num * 4128277434u ^ 2697294288u); continue; case 32u: { int num5 = 0; arg_650_0 = (num * 2048102388u ^ 4077460585u); continue; } case 33u: { int num4; if (!Manager.ObjectMgr.Creatures.ContainsKey(num4)) { arg_650_0 = 1735060541u; continue; } arg_1A6_0 = Manager.ObjectMgr.Creatures[num4]; goto IL_1A6; } case 34u: { int emote = 0; string[] array; arg_650_0 = (((array.Length != 6) ? 3598428491u : 3633428560u) ^ num * 3974302224u); continue; } case 35u: { string[] array; arg_650_0 = (((array.Length == 6) ? 4019163477u : 2933942023u) ^ num * 578514298u); continue; } case 36u: { ulong num3; arg_650_0 = (this.CreatureSpawnsFile.ContainsKey(num3) ? 423623362u : 1294610342u); continue; } case 37u: { ulong num3; arg_650_0 = (((!this.CreatureSpawns.ContainsKey(num3)) ? 1174138681u : 762860525u) ^ num * 1034182491u); continue; } } goto Block_26; IL_1A6: creature = arg_1A6_0; arg_650_0 = 740054584u; } } Block_26:; } finally { if (streamReader != null) { while (true) { IL_739: uint arg_720_0 = 1653238839u; while (true) { uint num; switch ((num = (arg_720_0 ^ 1524569722u)) % 3u) { case 1u: SpawnManager.smethod_19(streamReader); arg_720_0 = (num * 2485317961u ^ 1939970520u); continue; case 2u: goto IL_739; } goto Block_29; } } Block_29:; } } if (flag) { StringBuilder stringBuilder; while (true) { IL_77C: uint arg_763_0 = 1869693337u; while (true) { uint num; switch ((num = (arg_763_0 ^ 1524569722u)) % 3u) { case 1u: stringBuilder = SpawnManager.smethod_8(); arg_763_0 = (num * 3100820718u ^ 2209814309u); continue; case 2u: goto IL_77C; } goto Block_6; } } Block_6: using (Dictionary<ulong, CreatureSpawn>.Enumerator enumerator = this.CreatureSpawnsFile.GetEnumerator()) { while (true) { IL_8BD: uint arg_88D_0 = enumerator.MoveNext() ? 1577597638u : 2144502716u; while (true) { uint num; switch ((num = (arg_88D_0 ^ 1524569722u)) % 5u) { case 0u: arg_88D_0 = 1577597638u; continue; case 1u: { KeyValuePair<ulong, CreatureSpawn> current = enumerator.Current; arg_88D_0 = 1342272355u; continue; } case 3u: { KeyValuePair<ulong, CreatureSpawn> current; SpawnManager.smethod_10(stringBuilder, SpawnManager.smethod_9(Module.smethod_35<string>(3759077104u), new object[] { current.Value.Id, current.Value.Map, current.Value.Position.X, current.Value.Position.Y, current.Value.Position.Z, current.Value.Position.O, current.Value.Emote })); arg_88D_0 = (num * 2137885228u ^ 1501199090u); continue; } case 4u: goto IL_8BD; } goto Block_31; } } Block_31:; } SpawnManager.smethod_12(Module.smethod_34<string>(3998541984u), SpawnManager.smethod_11(stringBuilder)); goto IL_936; } goto IL_961; uint arg_940_0; while (true) { IL_93B: uint num; switch ((num = (arg_940_0 ^ 1524569722u)) % 5u) { case 0u: goto IL_936; case 1u: this.LoadCreatureSpawns(); arg_940_0 = (num * 1535762664u ^ 999084619u); continue; case 2u: this.CreatureSpawns = new Dictionary<ulong, CreatureSpawn>(); this.CreatureSpawnsFile = new Dictionary<ulong, CreatureSpawn>(); arg_940_0 = (num * 1285116544u ^ 794420355u); continue; case 3u: goto IL_961; } break; } StringBuilder stringBuilder2 = SpawnManager.smethod_8(); using (Dictionary<ulong, CreatureSpawn>.Enumerator enumerator = this.CreatureSpawnsFile.GetEnumerator()) { while (true) { IL_AA5: int arg_A79_0 = enumerator.MoveNext() ? 112548055 : 1862462057; while (true) { switch ((arg_A79_0 ^ 1524569722) % 4) { case 0: arg_A79_0 = 112548055; continue; case 1: { KeyValuePair<ulong, CreatureSpawn> current2 = enumerator.Current; SpawnManager.smethod_10(stringBuilder2, SpawnManager.smethod_9(Module.smethod_35<string>(1814433606u), new object[] { current2.Key, current2.Value.Id, current2.Value.Map, current2.Value.Position.X, current2.Value.Position.Y, current2.Value.Position.Z, current2.Value.Position.O, current2.Value.Emote })); arg_A79_0 = 1547431680; continue; } case 2: goto IL_AA5; } goto Block_35; } } Block_35:; } SpawnManager.smethod_12(Module.smethod_37<string>(292722155u), SpawnManager.smethod_11(stringBuilder2)); while (true) { IL_B4B: uint arg_B2A_0 = 323566519u; while (true) { uint num; switch ((num = (arg_B2A_0 ^ 1524569722u)) % 5u) { case 1u: this.LoadCreatureSpawns(); arg_B2A_0 = (num * 1871577909u ^ 1461636678u); continue; case 2u: this.CreatureSpawnsFile = new Dictionary<ulong, CreatureSpawn>(); arg_B2A_0 = (num * 3158367289u ^ 1455055445u); continue; case 3u: this.CreatureSpawns = new Dictionary<ulong, CreatureSpawn>(); arg_B2A_0 = (num * 1500603824u ^ 1579227831u); continue; case 4u: goto IL_B4B; } goto Block_11; } } Block_11: goto IL_B52; IL_936: arg_940_0 = 409409393u; goto IL_93B; IL_961: if (flag2) { arg_940_0 = 998176945u; goto IL_93B; } IL_B52: Log.Message(LogType.Debug, Module.smethod_35<string>(611352373u), new object[] { this.CreatureSpawns.Count }); return; IL_1A: arg_65_0 = 919221850u; goto IL_60; IL_96: arg_65_0 = ((this.CreatureSpawnsFile == null) ? 2128908445u : 1242068224u); goto IL_60; } public void LoadCreatureWaypoints() { StreamReader streamReader = SpawnManager.smethod_15(Module.smethod_35<string>(2234073573u)); try { while (true) { IL_182: uint arg_14A_0 = (!SpawnManager.smethod_18(streamReader)) ? 1285668127u : 1841545135u; while (true) { uint num; switch ((num = (arg_14A_0 ^ 1669394394u)) % 7u) { case 0u: { ulong num2; this.waypoints.Add(num2, new List<Waypoint>()); arg_14A_0 = (num * 1920135413u ^ 4134762485u); continue; } case 1u: { string[] expr_96 = SpawnManager.smethod_17(SpawnManager.smethod_16(streamReader), new char[] { ',' }); ulong num2 = ulong.Parse(expr_96[0]); float x = float.Parse(expr_96[1]); float y = float.Parse(expr_96[2]); float z = float.Parse(expr_96[3]); float o = float.Parse(expr_96[4]); int index = int.Parse(expr_96[5]); int waitTime = int.Parse(expr_96[6]); Waypoint item = new Waypoint { CreatureGuid = num2, Point = new Vector4 { X = x, Y = y, Z = z, O = o }, Index = index, WaitTime = waitTime }; arg_14A_0 = 1977668938u; continue; } case 2u: { ulong num2; arg_14A_0 = ((this.waypoints.ContainsKey(num2) ? 4125832734u : 2945254981u) ^ num * 62416986u); continue; } case 3u: arg_14A_0 = 1285668127u; continue; case 5u: goto IL_182; case 6u: { ulong num2; Waypoint item; this.waypoints[num2].Add(item); arg_14A_0 = 220001912u; continue; } } goto Block_4; } } Block_4:; } finally { if (streamReader != null) { while (true) { IL_1C8: uint arg_1AF_0 = 747701470u; while (true) { uint num; switch ((num = (arg_1AF_0 ^ 1669394394u)) % 3u) { case 0u: goto IL_1C8; case 2u: SpawnManager.smethod_19(streamReader); arg_1AF_0 = (num * 2198306379u ^ 1790037380u); continue; } goto Block_8; } } Block_8:; } } } public void LoadGameobjectSpawns() { if (this.GameObjectSpawns == null) { while (true) { IL_41: uint arg_28_0 = 3530881873u; while (true) { uint num; switch ((num = (arg_28_0 ^ 3883006564u)) % 3u) { case 1u: this.GameObjectSpawns = new Dictionary<ulong, GameObjectSpawn>(); arg_28_0 = (num * 2629725413u ^ 141764694u); continue; case 2u: goto IL_41; } goto Block_2; } } Block_2:; } int num2 = 50000; using (Dictionary<int, GameObject>.Enumerator enumerator = Manager.ObjectMgr.GameObjectSpawns.GetEnumerator()) { while (true) { IL_1FE: uint arg_1C6_0 = enumerator.MoveNext() ? 3162762357u : 2214645096u; while (true) { uint num; switch ((num = (arg_1C6_0 ^ 3883006564u)) % 7u) { case 0u: { GameObjectSpawn gameObjectSpawn; this.GameObjectSpawns.Add((ulong)((long)num2), gameObjectSpawn); arg_1C6_0 = (num * 292576894u ^ 189371222u); continue; } case 1u: { KeyValuePair<int, GameObject> current = enumerator.Current; arg_1C6_0 = 3027911185u; continue; } case 2u: goto IL_1FE; case 3u: arg_1C6_0 = 3162762357u; continue; case 5u: { KeyValuePair<int, GameObject> current; GameObjectSpawn gameObjectSpawn = new GameObjectSpawn(33) { SGuid = new SmartGuid((ulong)((long)num2), current.Value.Id, GuidType.GameObject, (ulong)current.Value.Map), Guid = (ulong)((long)num2), Id = current.Value.Id, GameObject = current.Value, Position = new Vector4 { X = current.Value.Pos.X, Y = current.Value.Pos.Y, Z = current.Value.Pos.Z, O = current.Value.Pos.O }, Map = (uint)current.Value.Map }; arg_1C6_0 = (((gameObjectSpawn.Position.X == 0f) ? 1641797584u : 826141433u) ^ num * 1132252456u); continue; } case 6u: num2++; arg_1C6_0 = (num * 431808991u ^ 638424871u); continue; } goto Block_7; } } Block_7:; } StreamReader streamReader = SpawnManager.smethod_15(Module.smethod_35<string>(1324711985u)); try { int num3 = 70000; while (true) { IL_4E0: uint arg_497_0 = (!SpawnManager.smethod_18(streamReader)) ? 4007557740u : 3943314680u; while (true) { uint num; GameObject arg_25A_0; GameObject gameObject; switch ((num = (arg_497_0 ^ 3883006564u)) % 11u) { case 0u: { int num4; if (!Manager.ObjectMgr.GameObjects.ContainsKey(num4)) { arg_497_0 = (num * 2066109709u ^ 4114345367u); continue; } arg_25A_0 = Manager.ObjectMgr.GameObjects[num4]; goto IL_25A; } case 1u: arg_497_0 = (((gameObject == null) ? 956813484u : 212872656u) ^ num * 2937783407u); continue; case 2u: { float x; float y; float z; float o; gameObject.Pos = new Vector4 { X = x, Y = y, Z = z, O = o }; int num4; int num5; int num6; int num7; GameObjectSpawn value = new GameObjectSpawn(33) { SGuid = new SmartGuid((ulong)((long)num3), gameObject.Id, GuidType.GameObject, (ulong)num5), Guid = (ulong)((long)num3), Id = num4, GameObject = gameObject, Position = new Vector4 { X = x, Y = y, Z = z, O = o }, AnimProgress = (byte)num6, State = (byte)num7, Map = (uint)num5 }; arg_497_0 = (num * 3318439521u ^ 4094514482u); continue; } case 3u: goto IL_4E0; case 4u: arg_497_0 = 4007557740u; continue; case 6u: { float x2; float y2; float z2; float o2; gameObject.Rot = new Vector4 { X = x2, Y = y2, Z = z2, O = o2 }; arg_497_0 = (num * 2906587653u ^ 4204273687u); continue; } case 7u: { GameObjectSpawn value; this.GameObjectSpawns.Add((ulong)((long)num3), value); arg_497_0 = (num * 3581299932u ^ 1939841136u); continue; } case 8u: { string[] expr_27D = SpawnManager.smethod_17(SpawnManager.smethod_16(streamReader), new char[] { ',' }); int num4 = int.Parse(expr_27D[0]); int num5 = int.Parse(expr_27D[1]); float x = float.Parse(expr_27D[2]); float y = float.Parse(expr_27D[3]); float z = float.Parse(expr_27D[4]); float o = float.Parse(expr_27D[5]); float x2 = float.Parse(expr_27D[6]); float y2 = float.Parse(expr_27D[7]); float z2 = float.Parse(expr_27D[8]); float o2 = float.Parse(expr_27D[9]); int num6 = int.Parse(expr_27D[10]); int num7 = int.Parse(expr_27D[11]); arg_497_0 = (num * 512904553u ^ 2901577556u); continue; } case 9u: arg_25A_0 = null; goto IL_25A; case 10u: num3++; arg_497_0 = 3509578595u; continue; } goto Block_13; IL_25A: gameObject = arg_25A_0; arg_497_0 = 3053898084u; } } Block_13:; } finally { if (streamReader != null) { while (true) { IL_529: uint arg_510_0 = 2540624100u; while (true) { uint num; switch ((num = (arg_510_0 ^ 3883006564u)) % 3u) { case 0u: goto IL_529; case 2u: SpawnManager.smethod_19(streamReader); arg_510_0 = (num * 3441258001u ^ 2287197116u); continue; } goto Block_17; } } Block_17:; } } Log.Message(LogType.Debug, Module.smethod_36<string>(741469589u), new object[] { this.GameObjectSpawns.Count }); } static bool smethod_5(string string_0) { return File.Exists(string_0); } static FileStream smethod_6(string string_0) { return File.Create(string_0); } static void smethod_7(Stream stream_0) { stream_0.Dispose(); } static StringBuilder smethod_8() { return new StringBuilder(); } static string smethod_9(string string_0, object[] object_0) { return string.Format(string_0, object_0); } static StringBuilder smethod_10(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.AppendLine(string_0); } static string smethod_11(object object_0) { return object_0.ToString(); } static void smethod_12(string string_0, string string_1) { File.WriteAllText(string_0, string_1); } static void smethod_13(string string_0, string string_1) { File.AppendAllText(string_0, string_1); } static string smethod_14(string string_0, string string_1) { return string_0 + string_1; } static StreamReader smethod_15(string string_0) { return new StreamReader(string_0); } static string smethod_16(TextReader textReader_0) { return textReader_0.ReadLine(); } static string[] smethod_17(string string_0, char[] char_0) { return string_0.Split(char_0); } static bool smethod_18(StreamReader streamReader_0) { return streamReader_0.EndOfStream; } static void smethod_19(IDisposable idisposable_0) { idisposable_0.Dispose(); } } } <file_sep>/Bgs.Protocol.Friends.V1/UnsubscribeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class UnsubscribeRequest : IMessage<UnsubscribeRequest>, IEquatable<UnsubscribeRequest>, IDeepCloneable<UnsubscribeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UnsubscribeRequest.__c __9 = new UnsubscribeRequest.__c(); internal UnsubscribeRequest cctor>b__29_0() { return new UnsubscribeRequest(); } } private static readonly MessageParser<UnsubscribeRequest> _parser = new MessageParser<UnsubscribeRequest>(new Func<UnsubscribeRequest>(UnsubscribeRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int ObjectIdFieldNumber = 2; private ulong objectId_; public static MessageParser<UnsubscribeRequest> Parser { get { return UnsubscribeRequest._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return UnsubscribeRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public UnsubscribeRequest() { } public UnsubscribeRequest(UnsubscribeRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.objectId_ = other.objectId_; } public UnsubscribeRequest Clone() { return new UnsubscribeRequest(this); } public override bool Equals(object other) { return this.Equals(other as UnsubscribeRequest); } public bool Equals(UnsubscribeRequest other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -304877262) % 9) { case 0: goto IL_68; case 1: return false; case 3: return false; case 4: return false; case 5: arg_72_0 = (UnsubscribeRequest.smethod_0(this.AgentId, other.AgentId) ? -1573996996 : -33617732); continue; case 6: arg_72_0 = ((this.ObjectId != other.ObjectId) ? -1497858698 : -1968092609); continue; case 7: goto IL_B0; case 8: return true; } break; } return true; IL_68: arg_72_0 = -1232442463; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? -33235590 : -1892949402); goto IL_6D; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_59; } goto IL_8F; uint arg_63_0; while (true) { IL_5E: uint num2; switch ((num2 = (arg_63_0 ^ 2124936921u)) % 5u) { case 0u: goto IL_59; case 2u: num ^= this.ObjectId.GetHashCode(); arg_63_0 = (num2 * 2810306144u ^ 2864027254u); continue; case 3u: num ^= UnsubscribeRequest.smethod_1(this.AgentId); arg_63_0 = (num2 * 438756323u ^ 553925360u); continue; case 4u: goto IL_8F; } break; } return num; IL_59: arg_63_0 = 430220685u; goto IL_5E; IL_8F: arg_63_0 = ((this.ObjectId != 0uL) ? 1724913187u : 1018347446u); goto IL_5E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_54; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 797955594u)) % 6u) { case 0u: output.WriteUInt64(this.ObjectId); arg_79_0 = (num * 4220964830u ^ 3976816034u); continue; case 1u: goto IL_AC; case 3u: goto IL_54; case 4u: output.WriteRawTag(16); arg_79_0 = (num * 1770370025u ^ 2717452892u); continue; case 5u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_79_0 = (num * 3968430777u ^ 2683497116u); continue; } break; } return; IL_54: arg_79_0 = 1058741007u; goto IL_74; IL_AC: arg_79_0 = ((this.ObjectId == 0uL) ? 42350722u : 47242556u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 2320889073u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 3657885092u)) % 6u) { case 0u: arg_92_0 = ((this.ObjectId != 0uL) ? 3040273037u : 2498949952u); continue; case 1u: arg_92_0 = (((this.agentId_ != null) ? 2849537220u : 2424113324u) ^ num2 * 3546509296u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_92_0 = (num2 * 501309544u ^ 2328476648u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_92_0 = (num2 * 2187746761u ^ 1783700556u); continue; case 5u: goto IL_B6; } return num; } } return num; } public void MergeFrom(UnsubscribeRequest other) { if (other == null) { goto IL_36; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 2929278214u)) % 9u) { case 1u: this.agentId_ = new EntityId(); arg_BC_0 = (num * 82848877u ^ 2149784941u); continue; case 2u: return; case 3u: arg_BC_0 = ((other.ObjectId != 0uL) ? 2757303966u : 3557770087u); continue; case 4u: this.AgentId.MergeFrom(other.AgentId); arg_BC_0 = 2400598654u; continue; case 5u: arg_BC_0 = (((this.agentId_ != null) ? 3780531261u : 3991805982u) ^ num * 204345534u); continue; case 6u: goto IL_FC; case 7u: goto IL_36; case 8u: this.ObjectId = other.ObjectId; arg_BC_0 = (num * 3742347177u ^ 991634495u); continue; } break; } return; IL_36: arg_BC_0 = 3407347836u; goto IL_B7; IL_FC: arg_BC_0 = ((other.agentId_ != null) ? 4133289711u : 2400598654u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13D: uint num; uint arg_F5_0 = ((num = input.ReadTag()) == 0u) ? 2686190629u : 2656074695u; while (true) { uint num2; switch ((num2 = (arg_F5_0 ^ 3152596353u)) % 11u) { case 0u: input.SkipLastField(); arg_F5_0 = (num2 * 889023639u ^ 3962272604u); continue; case 1u: arg_F5_0 = (((num == 16u) ? 1396525188u : 2104148930u) ^ num2 * 1474336065u); continue; case 2u: goto IL_13D; case 3u: input.ReadMessage(this.agentId_); arg_F5_0 = 3961758934u; continue; case 4u: arg_F5_0 = ((num == 10u) ? 2604372474u : 3108732788u); continue; case 5u: arg_F5_0 = ((this.agentId_ == null) ? 3620003948u : 3814360187u); continue; case 6u: arg_F5_0 = 2656074695u; continue; case 8u: arg_F5_0 = (num2 * 4023428208u ^ 2483273670u); continue; case 9u: this.ObjectId = input.ReadUInt64(); arg_F5_0 = 3961758934u; continue; case 10u: this.agentId_ = new EntityId(); arg_F5_0 = (num2 * 572067144u ^ 1136424915u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.WorldServer.Game.Packets.PacketHandler/EmoteHandler.cs using AuthServer.Game.Packets.PacketHandler; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Constants.Net; using Framework.Network.Packets; using System; using System.IO; using System.Linq; namespace AuthServer.WorldServer.Game.Packets.PacketHandler { public class EmoteHandler { private static uint currEmote; [Opcode2(ClientMessage.Emote, "18125")] public static void HandleEmote(ref PacketReader packet, WorldClass2 session) { uint emote; Emote emote2; while (true) { IL_AD: uint arg_89_0 = 1752535003u; while (true) { uint num; switch ((num = (arg_89_0 ^ 716655401u)) % 6u) { case 0u: return; case 2u: packet.ReadSmartGuid(); emote = EmoteHandler.smethod_0(packet); EmoteHandler.smethod_0(packet); arg_89_0 = (num * 3806359023u ^ 581283706u); continue; case 3u: emote2 = Manager.WorldMgr.EmoteList.SingleOrDefault((Emote e) => (long)e.Id == (long)((ulong)emote)); arg_89_0 = (num * 608702844u ^ 55036292u); continue; case 4u: goto IL_AD; case 5u: arg_89_0 = (((emote2 != null) ? 797466682u : 1979322787u) ^ num * 1562950612u); continue; } goto Block_2; } } Block_2: EmoteHandler.SendEmote((uint)emote2.EmoteId, Manager.WorldMgr.GetSession(session.Character.Guid), null); } public static void SendEmote(uint emoteId, WorldClass session, WorldObject obj) { if (EmoteHandler.currEmote == emoteId) { goto IL_E5; } goto IL_128; uint arg_EF_0; while (true) { IL_EA: uint num; switch ((num = (arg_EF_0 ^ 1873394811u)) % 11u) { case 0u: goto IL_E5; case 1u: session.Character.SetUpdateField<uint>(126, EmoteHandler.currEmote, 0); arg_EF_0 = (num * 4147380447u ^ 138217182u); continue; case 2u: EmoteHandler.currEmote = 0u; arg_EF_0 = (num * 3833008646u ^ 365122923u); continue; case 3u: { PacketWriter packetWriter; packetWriter.WriteSmartGuid(obj.SGuid); arg_EF_0 = 1585922093u; continue; } case 4u: return; case 5u: { PacketWriter packetWriter; packetWriter.WriteUInt32(EmoteHandler.currEmote); arg_EF_0 = (num * 253797390u ^ 407574363u); continue; } case 6u: ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_EF_0 = (num * 1970048225u ^ 635778716u); continue; case 7u: goto IL_128; case 8u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.Emote, true); arg_EF_0 = ((obj != null) ? 1431597716u : 968750983u); continue; } case 9u: { PacketWriter packetWriter; packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter.WriteUInt32(EmoteHandler.currEmote); arg_EF_0 = (num * 3022621322u ^ 2711098370u); continue; } } break; } obj.SetUpdateField<uint>(126, EmoteHandler.currEmote, 0); ObjectHandler.HandleUpdateObjectValues(ref session, obj, false); return; IL_E5: arg_EF_0 = 471120040u; goto IL_EA; IL_128: EmoteHandler.currEmote = emoteId; arg_EF_0 = 1058711449u; goto IL_EA; } static uint smethod_0(BinaryReader binaryReader_0) { return binaryReader_0.ReadUInt32(); } } } <file_sep>/AuthServer.AuthServer.Packets.BnetHandlers/BnetErrorCode.cs using System; namespace AuthServer.AuthServer.Packets.BnetHandlers { internal enum BnetErrorCode : uint { ErrorOk, ErrorInternal, ErrorTimedOut, ErrorDenied, ErrorNotExists, ErrorNotStarted, ErrorInProgress, ErrorInvalidArgs, ErrorInvalidSubscriber, ErrorWaitingForDependency, ErrorNoAuth, ErrorParentalControlRestriction, ErrorNoGameAccount, ErrorNotImplemented, ErrorObjectRemoved, ErrorInvalidEntityId, ErrorInvalidEntityAccountId, ErrorInvalidEntityGameAccountId, ErrorInvalidAgentId = 19u, ErrorInvalidTargetId, ErrorModuleNotLoaded, ErrorModuleNoEntryPoint, ErrorModuleSignatureIncorrect, ErrorModuleCreateFailed, ErrorNoProgram, ErrorApiNotReady = 27u, ErrorBadVersion, ErrorAttributeTooManyAttributesSet, ErrorAttributeMaxSizeExceeded, ErrorAttributeQuotaExceeded, ErrorServerPoolServerDisappeared, ErrorServerIsPrivate, ErrorDisabled, ErrorModuleNotFound = 36u, ErrorServerBusy, ErrorNoBattletag, ErrorIncompleteProfanityFilters, ErrorInvalidRegion, ErrorExistsAlready, ErrorInvalidServerThumbprint, ErrorPhoneLock, ErrorSquelched, ErrorTargetOffline, ErrorBadServer, ErrorNoCookie, ErrorExpiredCookie, ErrorTokenNotFound, ErrorGameAccountNoTime, ErrorGameAccountNoPlan, ErrorGameAccountBanned, ErrorGameAccountSuspended, ErrorGameAccountAlreadySelected, ErrorGameAccountCancelled, ErrorGameAccountCreationDisabled, ErrorGameAccountLocked, ErrorSessionDuplicate = 60u, ErrorSessionDisconnected, ErrorSessionDataChanged, ErrorSessionUpdateFailed, ErrorSessionNotFound, ErrorAdminKick = 70u, ErrorUnplannedMaintenance, ErrorPlannedMaintenance, ErrorServiceFailureAccount, ErrorServiceFailureSession, ErrorServiceFailureAuth, ErrorServiceFailureRisk, ErrorBadProgram, ErrorBadLocale, ErrorBadPlatform, ErrorLocaleRestrictedLa = 81u, ErrorLocaleRestrictedRu, ErrorLocaleRestrictedKo, ErrorLocaleRestrictedTw, ErrorLocaleRestricted, ErrorAccountNeedsMaintenance, ErrorModuleApiError, ErrorModuleBadCacheHandle, ErrorModuleAlreadyLoaded, ErrorNetworkBlacklisted, ErrorEventProcessorSlow, ErrorServerShuttingDown, ErrorNetworkNotPrivileged, ErrorTooManyOutstandingRequests, ErrorNoAccountRegistered, ErrorBattlenetAccountBanned, ErrorOkDeprecated = 100u, ErrorServerInModeZombie, ErrorLogonModuleRequired = 500u, ErrorLogonModuleNotConfigured, ErrorLogonModuleTimeout, ErrorLogonAgreementRequired = 510u, ErrorLogonAgreementNotConfigured, ErrorLogonInvalidServerProof = 520u, ErrorLogonWebVerifyTimeout, ErrorLogonInvalidAuthToken, ErrorChallengeSmsTooSoon = 600u, ErrorChallengeSmsThrottled, ErrorChallengeSmsTempOutage, ErrorChallengeNoChallenge, ErrorChallengeNotPicked, ErrorChallengeAlreadyPicked, ErrorChallengeInProgress, ErrorConfigFormatInvalid = 700u, ErrorConfigNotFound, ErrorConfigRetrieveFailed, ErrorNetworkModuleBusy = 1000u, ErrorNetworkModuleCantResolveAddress, ErrorNetworkModuleConnectionRefused, ErrorNetworkModuleInterrupted, ErrorNetworkModuleConnectionAborted, ErrorNetworkModuleConnectionReset, ErrorNetworkModuleBadAddress, ErrorNetworkModuleNotReady, ErrorNetworkModuleAlreadyConnected, ErrorNetworkModuleCantCreateSocket, ErrorNetworkModuleNetworkUnreachable, ErrorNetworkModuleSocketPermissionDenied, ErrorNetworkModuleNotInitialized, ErrorNetworkModuleNoSslCertificateForPeer, ErrorNetworkModuleNoSslCommonNameForCertificate, ErrorNetworkModuleSslCommonNameDoesNotMatchRemoteEndpoint, ErrorNetworkModuleSocketClosed, ErrorNetworkModuleSslPeerIsNotRegisteredInCertbundle, ErrorNetworkModuleSslInitializeLowFirst, ErrorNetworkModuleSslCertBundleReadError, ErrorNetworkModuleNoCertBundle, ErrorNetworkModuleFailedToDownloadCertBundle, ErrorNetworkModuleNotReadyToRead, ErrorNetworkModuleOpensslX509Ok = 1200u, ErrorNetworkModuleOpensslX509UnableToGetIssuerCert, ErrorNetworkModuleOpensslX509UnableToGetCrl, ErrorNetworkModuleOpensslX509UnableToDecryptCertSignature, ErrorNetworkModuleOpensslX509UnableToDecryptCrlSignature, ErrorNetworkModuleOpensslX509UnableToDecodeIssuerPublicKey, ErrorNetworkModuleOpensslX509CertSignatureFailure, ErrorNetworkModuleOpensslX509CrlSignatureFailure, ErrorNetworkModuleOpensslX509CertNotYetValid, ErrorNetworkModuleOpensslX509CertHasExpired, ErrorNetworkModuleOpensslX509CrlNotYetValid, ErrorNetworkModuleOpensslX509CrlHasExpired, ErrorNetworkModuleOpensslX509ErrorInCertNotBeforeField, ErrorNetworkModuleOpensslX509ErrorInCertNotAfterField, ErrorNetworkModuleOpensslX509ErrorInCrlLastUpdateField, ErrorNetworkModuleOpensslX509ErrorInCrlNextUpdateField, ErrorNetworkModuleOpensslX509OutOfMem, ErrorNetworkModuleOpensslX509DepthZeroSelfSignedCert, ErrorNetworkModuleOpensslX509SelfSignedCertInChain, ErrorNetworkModuleOpensslX509UnableToGetIssuerCertLocally, ErrorNetworkModuleOpensslX509UnableToVerifyLeafSignature, ErrorNetworkModuleOpensslX509CertChainTooLong, ErrorNetworkModuleOpensslX509CertRevoked, ErrorNetworkModuleOpensslX509InvalidCa, ErrorNetworkModuleOpensslX509PathLengthExceeded, ErrorNetworkModuleOpensslX509InvalidPurpose, ErrorNetworkModuleOpensslX509CertUntrusted, ErrorNetworkModuleOpensslX509CertRejected, ErrorNetworkModuleOpensslX509SubjectIssuerMismatch, ErrorNetworkModuleOpensslX509AkidSkidMismatch, ErrorNetworkModuleOpensslX509AkidIssuerSerialMismatch, ErrorNetworkModuleOpensslX509KeyusageNoCertsign, ErrorNetworkModuleOpensslX509ApplicationVerification, ErrorNetworkModuleSchannelCannotFindOsVersion = 1300u, ErrorNetworkModuleSchannelOsNotSupported, ErrorNetworkModuleSchannelLoadlibraryFail, ErrorNetworkModuleSchannelCannotFindInterface, ErrorNetworkModuleSchannelInitFail, ErrorNetworkModuleSchannelFunctionCallFail, ErrorNetworkModuleSchannelX509UnableToGetIssuerCert = 1350u, ErrorNetworkModuleSchannelX509TimeInvalid, ErrorNetworkModuleSchannelX509SignatureInvalid, ErrorNetworkModuleSchannelX509UnableToVerifyLeafSignature, ErrorNetworkModuleSchannelX509SelfSignedLeafCertificate, ErrorNetworkModuleSchannelX509UnhandledError, ErrorNetworkModuleSchannelX509SelfSignedCertInChain, ErrorWebsocketHandshake = 1400u, ErrorNetworkModuleDurangoUnknown = 1500u, ErrorNetworkModuleDurangoMalformedHostName, ErrorNetworkModuleDurangoInvalidConnectionResponse, ErrorNetworkModuleDurangoInvalidCaCert, ErrorRpcWriteFailed = 3000u, ErrorRpcServiceNotBound, ErrorRpcTooManyRequests, ErrorRpcPeerUnknown, ErrorRpcPeerUnavailable, ErrorRpcPeerDisconnected, ErrorRpcRequestTimedOut, ErrorRpcConnectionTimedOut, ErrorRpcMalformedResponse, ErrorRpcAccessDenied, ErrorRpcInvalidService, ErrorRpcInvalidMethod, ErrorRpcInvalidObject, ErrorRpcMalformedRequest, ErrorRpcQuotaExceeded, ErrorRpcNotImplemented, ErrorRpcServerError, ErrorRpcShutdown, ErrorRpcDisconnect, ErrorRpcDisconnectIdle, ErrorRpcProtocolError, ErrorRpcNotReady, ErrorRpcForwardFailed, ErrorRpcEncryptionFailed, ErrorRpcInvalidAddress, ErrorRpcMethodDisabled, ErrorRpcShardNotFound, ErrorRpcInvalidConnectionId, ErrorRpcNotConnected, ErrorRpcInvalidConnectionState, ErrorRpcServiceAlreadyRegistered, ErrorPresenceInvalidFieldId = 4000u, ErrorPresenceNoValidSubscribers, ErrorPresenceAlreadySubscribed, ErrorPresenceConsumerNotFound, ErrorPresenceConsumerIsNull, ErrorPresenceTemporaryOutage, ErrorPresenceTooManySubscriptions, ErrorPresenceSubscriptionCancelled, ErrorPresenceRichPresenceParseError, ErrorPresenceRichPresenceXmlError, ErrorPresenceRichPresenceLoadError, ErrorFriendsTooManySentInvitations = 5001u, ErrorFriendsTooManyReceivedInvitations, ErrorFriendsFriendshipAlreadyExists, ErrorFriendsFriendshipDoesNotExist, ErrorFriendsInvitationAlreadyExists, ErrorFriendsInvalidInvitation, ErrorFriendsAlreadySubscribed, ErrorFriendsAccountBlocked = 5009u, ErrorFriendsNotSubscribed, ErrorFriendsInvalidRoleId, ErrorFriendsDisabledRoleId, ErrorFriendsNoteMaxSizeExceeded, ErrorFriendsUpdateFriendStateFailed, ErrorFriendsInviteeAtMaxFriends, ErrorFriendsInviterAtMaxFriends, ErrorPlatformStorageFileWriteDenied = 6000u, ErrorWhisperUndeliverable = 7000u, ErrorWhisperMaxSizeExceeded, ErrorUserManagerAlreadyBlocked = 8000u, ErrorUserManagerNotBlocked, ErrorUserManagerCannotBlockSelf, ErrorUserManagerAlreadyRegistered, ErrorUserManagerNotRegistered, ErrorUserManagerTooManyBlockedEntities, ErrorUserManagerTooManyIds = 8007u, ErrorUserManagerBlockRecordUnavailable = 8015u, ErrorUserManagerBlockEntityFailed, ErrorUserManagerUnblockEntityFailed, ErrorUserManagerCannotBlockFriend = 8019u, ErrorSocialNetworkDbException = 9000u, ErrorSocialNetworkDenialFromProvider, ErrorSocialNetworkInvalidSnsId, ErrorSocialNetworkCantSendToProvider, ErrorSocialNetworkExCommFailed, ErrorSocialNetworkDisabled, ErrorSocialNetworkMissingRequestParam, ErrorSocialNetworkUnsupportedOauthVersion, ErrorChannelFull = 10000u, ErrorChannelNoChannel, ErrorChannelNotMember, ErrorChannelAlreadyMember, ErrorChannelNoSuchMember, ErrorChannelInvalidChannelId = 10006u, ErrorChannelNoSuchInvitation = 10008u, ErrorChannelTooManyInvitations, ErrorChannelInvitationAlreadyExists, ErrorChannelInvalidChannelSize, ErrorChannelInvalidRoleId, ErrorChannelRoleNotAssignable, ErrorChannelInsufficientPrivileges, ErrorChannelInsufficientPrivacyLevel, ErrorChannelInvalidPrivacyLevel, ErrorChannelTooManyChannelsJoined, ErrorChannelInvitationAlreadySubscribed, ErrorChannelInvalidChannelDelegate, ErrorChannelSlotAlreadyReserved, ErrorChannelSlotNotReserved, ErrorChannelNoReservedSlotsAvailable, ErrorChannelInvalidRoleSet, ErrorChannelRequireFriendValidation, ErrorChannelMemberOffline, ErrorChannelReceivedTooManyInvitations, ErrorChannelInvitationInvalidGameAccountSelected, ErrorChannelUnreachable, ErrorChannelInvitationNotSubscribed, ErrorChannelInvalidMessageSize, ErrorChannelMaxMessageSizeExceeded, ErrorChannelConfigNotFound, ErrorChannelInvalidChannelType, ErrorLocalStorageFileOpenError = 11000u, ErrorLocalStorageFileCreateError, ErrorLocalStorageFileReadError, ErrorLocalStorageFileWriteError, ErrorLocalStorageFileDeleteError, ErrorLocalStorageFileCopyError, ErrorLocalStorageFileDecompressError, ErrorLocalStorageFileHashMismatch, ErrorLocalStorageFileUsageMismatch, ErrorLocalStorageDatabaseInitError, ErrorLocalStorageDatabaseNeedsRebuild, ErrorLocalStorageDatabaseInsertError, ErrorLocalStorageDatabaseLookupError, ErrorLocalStorageDatabaseUpdateError, ErrorLocalStorageDatabaseDeleteError, ErrorLocalStorageDatabaseShrinkError, ErrorLocalStorageCacheCrawlError, ErrorLocalStorageDatabaseIndexTriggerError, ErrorLocalStorageDatabaseRebuildInProgress, ErrorLocalStorageOkButNotInCache, ErrorLocalStorageDatabaseRebuildInterrupted = 11021u, ErrorLocalStorageDatabaseNotInitialized, ErrorLocalStorageDirectoryCreateError, ErrorLocalStorageFilekeyNotFound, ErrorLocalStorageNotAvailableOnServer, ErrorRegistryCreateKeyError = 12000u, ErrorRegistryOpenKeyError, ErrorRegistryReadError, ErrorRegistryWriteError, ErrorRegistryTypeError, ErrorRegistryDeleteError, ErrorRegistryEncryptError, ErrorRegistryDecryptError, ErrorRegistryKeySizeError, ErrorRegistryValueSizeError, ErrorRegistryNotFound = 12011u, ErrorRegistryMalformedString, ErrorInterfaceAlreadyConnected = 13000u, ErrorInterfaceNotReady, ErrorInterfaceOptionKeyTooLarge, ErrorInterfaceOptionValueTooLarge, ErrorInterfaceOptionKeyInvalidUtf8String, ErrorInterfaceOptionValueInvalidUtf8String, ErrorHttpCouldntResolve = 14000u, ErrorHttpCouldntConnect, ErrorHttpTimeout, ErrorHttpFailed, ErrorHttpMalformedUrl, ErrorHttpDownloadAborted, ErrorHttpCouldntWriteFile, ErrorHttpTooManyRedirects, ErrorHttpCouldntOpenFile, ErrorHttpCouldntCreateFile, ErrorHttpCouldntReadFile, ErrorHttpCouldntRenameFile, ErrorHttpCouldntCreateDirectory, ErrorHttpCurlIsNotReady, ErrorHttpCancelled, ErrorHttpFileNotFound = 14404u, ErrorAccountMissingConfig = 18000u, ErrorAccountDataNotFound, ErrorAccountAlreadySubscribed, ErrorAccountNotSubscribed, ErrorAccountFailedToParseTimezoneData, ErrorAccountLoadFailed, ErrorAccountLoadCancelled, ErrorAccountDatabaseInvalidateFailed, ErrorAccountCacheInvalidateFailed, ErrorAccountSubscriptionPending, ErrorAccountUnknownRegion, ErrorAccountDataFailedToParse, ErrorAccountUnderage, ErrorAccountIdentityCheckPending, ErrorAccountIdentityUnverified, ErrorDatabaseBindingCountMismatch = 19000u, ErrorDatabaseBindingParseFail, ErrorDatabaseResultsetColumnsMismatch, ErrorDatabaseDeadlock, ErrorDatabaseDuplicateKey, ErrorDatabaseCannotConnect, ErrorDatabaseStatementFailed, ErrorDatabaseTransactionNotStarted, ErrorDatabaseTransactionNotEnded, ErrorDatabaseTransactionLeak, ErrorDatabaseTransactionStateBad, ErrorDatabaseServerGone, ErrorDatabaseQueryTimeout, ErrorDatabaseBindingNotNullable = 19100u, ErrorDatabaseBindingInvalidInteger, ErrorDatabaseBindingInvalidFloat, ErrorDatabaseBindingInvalidTemporal, ErrorDatabaseBindingInvalidProtobuf, ErrorPartyInvalidPartyId = 20000u, ErrorPartyAlreadyInParty, ErrorPartyNotInParty, ErrorPartyInvitationUndeliverable, ErrorPartyInvitationAlreadyExists, ErrorPartyTooManyPartyInvitations, ErrorPartyTooManyReceivedInvitations, ErrorPartyNoSuchType, ErrorGamesNoSuchFactory = 22000u, ErrorGamesNoSuchGame, ErrorGamesNoSuchRequest, ErrorGamesNoSuchPartyMember, ErrorResourcesOffline = 23000u, ErrorGameServerCreateGameRefused = 24000u, ErrorGameServerAddPlayersRefused, ErrorGameServerRemovePlayersRefused, ErrorGameServerFinishGameRefused, ErrorGameServerNoSuchGame, ErrorGameServerNoSuchPlayer, ErrorGameServerCreateGameRefusedTransient = 24050u, ErrorGameServerAddPlayersRefusedTransient, ErrorGameServerRemovePlayersRefusedTransient, ErrorGameServerFinishGameRefusedTransient, ErrorGameServerCreateGameRefusedBusy = 24100u, ErrorGameServerAddPlayersRefusedBusy, ErrorGameServerRemovePlayersRefusedBusy, ErrorGameServerFinishGameRefusedBusy, ErrorGameMasterInvalidFactory = 25000u, ErrorGameMasterInvalidGame, ErrorGameMasterGameFull, ErrorGameMasterRegisterFailed, ErrorGameMasterNoGameServer, ErrorGameMasterNoUtilityServer, ErrorGameMasterNoGameVersion, ErrorGameMasterGameJoinFailed, ErrorGameMasterAlreadyRegistered, ErrorGameMasterNoFactory, ErrorGameMasterMultipleGameVersions, ErrorGameMasterInvalidPlayer, ErrorGameMasterInvalidGameRequest, ErrorGameMasterInsufficientPrivileges, ErrorGameMasterAlreadyInGame, ErrorGameMasterInvalidGameServerResponse, ErrorGameMasterGameAccountLookupFailed, ErrorGameMasterGameEntryCancelled, ErrorGameMasterGameEntryAbortedClientDropped, ErrorGameMasterGameEntryAbortedByService, ErrorGameMasterNoAvailableCapacity, ErrorGameMasterInvalidTeamId, ErrorGameMasterCreationInProgress, ErrorNotificationInvalidClientId = 26000u, ErrorNotificationDuplicateName, ErrorNotificationNameNotFound, ErrorNotificationInvalidServer, ErrorNotificationQuotaExceeded, ErrorNotificationInvalidNotificationType, ErrorNotificationUndeliverable, ErrorNotificationUndeliverableTemporary, ErrorAchievementsNothingToUpdate = 28000u, ErrorAchievementsInvalidParams, ErrorAchievementsNotRegistered, ErrorAchievementsNotReady, ErrorAchievementsFailedToParseStaticData, ErrorAchievementsUnknownId, ErrorAchievementsMissingSnapshot, ErrorAchievementsAlreadyRegistered, ErrorAchievementsTooManyRegistrations, ErrorAchievementsAlreadyInProgress, ErrorAchievementsTemporaryOutage, ErrorAchievementsInvalidProgramid, ErrorAchievementsMissingRecord, ErrorAchievementsRegistrationPending, ErrorAchievementsEntityIdNotFound, ErrorAchievementsAchievementIdNotFound, ErrorAchievementsCriteriaIdNotFound, ErrorAchievementsStaticDataMismatch, ErrorAchievementsWrongThread, ErrorAchievementsCallbackIsNull, ErrorAchievementsAutoRegisterPending, ErrorAchievementsNotInitialized, ErrorAchievementsAchievementIdAlreadyExists, ErrorAchievementsFailedToDownloadStaticData, ErrorAchievementsStaticDataNotFound, ErrorGameUtilityServerVariableRequestRefused = 34001u, ErrorGameUtilityServerWrongNumberOfVariablesReturned, ErrorGameUtilityServerClientRequestRefused, ErrorGameUtilityServerPresenceChannelCreatedRefused, ErrorGameUtilityServerVariableRequestRefusedTransient = 34050u, ErrorGameUtilityServerClientRequestRefusedTransient, ErrorGameUtilityServerPresenceChannelCreatedRefusedTransient, ErrorGameUtilityServerServerRequestRefusedTransient, ErrorGameUtilityServerVariableRequestRefusedBusy = 34100u, ErrorGameUtilityServerClientRequestRefusedBusy, ErrorGameUtilityServerPresenceChannelCreatedRefusedBusy, ErrorGameUtilityServerServerRequestRefusedBusy, ErrorGameUtilityServerNoServer = 34200u, ErrorIdentityInsufficientData = 41000u, ErrorIdentityTooManyResults, ErrorIdentityBadId, ErrorIdentityNoAccountBlob, ErrorRiskChallengeAction = 42000u, ErrorRiskDelayAction, ErrorRiskThrottleAction, ErrorRiskAccountLocked, ErrorRiskCsDenied, ErrorRiskDisconnectAccount, ErrorRiskCheckSkipped, ErrorReportUnavailable = 45000u, ErrorReportTooLarge, ErrorReportUnknownType, ErrorReportAttributeInvalid, ErrorReportAttributeQuotaExceeded, ErrorReportUnconfirmed, ErrorReportNotConnected, ErrorReportRejected, ErrorReportTooManyRequests, ErrorAccountAlreadyRegisterd = 48000u, ErrorAccountNotRegistered, ErrorAccountRegistrationPending, ErrorMemcachedClientNoError = 65536u, ErrorMemcachedClientKeyNotFound, ErrorMemcachedKeyExists, ErrorMemcachedValueToLarge, ErrorMemcachedInvalidArgs, ErrorMemcachedItemNotStored, ErrorMemcachedNonNumericValue, ErrorMemcachedWrongServer, ErrorMemcachedAuthenticationError, ErrorMemcachedAuthenticationContinue, ErrorMemcachedUnknownCommand, ErrorMemcachedOutOfMemory, ErrorMemcachedNotSupported, ErrorMemcachedInternalError, ErrorMemcachedTemporaryFailure, ErrorMemcachedClientAlreadyConnected = 100000u, ErrorMemcachedClientBadConfig, ErrorMemcachedClientNotConnected, ErrorMemcachedClientTimeout, ErrorMemcachedClientAborted } } <file_sep>/Google.Protobuf/JsonParser.cs using Google.Protobuf.Reflection; using Google.Protobuf.WellKnownTypes; using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Text.RegularExpressions; namespace Google.Protobuf { [ComVisible(true)] public sealed class JsonParser { public sealed class Settings { public static JsonParser.Settings Default { [CompilerGenerated] get { return JsonParser.Settings.<Default>k__BackingField; } } public int RecursionLimit { [CompilerGenerated] get { return this.<RecursionLimit>k__BackingField; } } public TypeRegistry TypeRegistry { [CompilerGenerated] get { return this.<TypeRegistry>k__BackingField; } } static Settings() { JsonParser.Settings.<Default>k__BackingField = new JsonParser.Settings(64); } public Settings(int recursionLimit) : this(recursionLimit, TypeRegistry.Empty) { } public Settings(int recursionLimit, TypeRegistry typeRegistry) { while (true) { IL_4F: uint arg_37_0 = 4016672047u; while (true) { uint num; switch ((num = (arg_37_0 ^ 2853316843u)) % 3u) { case 1u: this.<RecursionLimit>k__BackingField = recursionLimit; this.<TypeRegistry>k__BackingField = Preconditions.CheckNotNull<TypeRegistry>(typeRegistry, Module.smethod_34<string>(3473407542u)); arg_37_0 = (num * 1137548354u ^ 3688102375u); continue; case 2u: goto IL_4F; } return; } } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly JsonParser.__c __9 = new JsonParser.__c(); internal void cctor>b__36_0(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { JsonParser.MergeTimestamp(message, tokenizer.Next()); } internal void cctor>b__36_1(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { JsonParser.MergeDuration(message, tokenizer.Next()); } internal void cctor>b__36_2(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeStructValue(message, tokenizer); } internal void cctor>b__36_3(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeRepeatedField(message, message.Descriptor.Fields[1], tokenizer); } internal void cctor>b__36_4(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeStruct(message, tokenizer); } internal void cctor>b__36_5(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeAny(message, tokenizer); } internal void cctor>b__36_6(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { JsonParser.MergeFieldMask(message, tokenizer.Next()); } } private static readonly Regex TimestampRegex = JsonParser.smethod_28(Module.smethod_37<string>(2537404934u), FrameworkPortability.CompiledRegexWhereAvailable); private static readonly Regex DurationRegex; private static readonly int[] SubsecondScalingFactors; private static readonly char[] FieldMaskPathSeparators; private static readonly JsonParser defaultInstance; private static readonly Dictionary<string, Action<JsonParser, IMessage, JsonTokenizer>> WellKnownTypeHandlers; private readonly JsonParser.Settings settings; public static JsonParser Default { get { return JsonParser.defaultInstance; } } private static void MergeWrapperField(JsonParser parser, IMessage message, JsonTokenizer tokenizer) { parser.MergeField(message, message.Descriptor.Fields[1], tokenizer); } public JsonParser(JsonParser.Settings settings) { while (true) { IL_39: uint arg_21_0 = 4152800057u; while (true) { uint num; switch ((num = (arg_21_0 ^ 2701149360u)) % 3u) { case 0u: goto IL_39; case 1u: this.settings = settings; arg_21_0 = (num * 316918118u ^ 263345839u); continue; } return; } } } internal void Merge(IMessage message, string json) { this.Merge(message, JsonParser.smethod_0(json)); } internal void Merge(IMessage message, TextReader jsonReader) { JsonTokenizer jsonTokenizer = JsonTokenizer.FromTextReader(jsonReader); this.Merge(message, jsonTokenizer); while (true) { IL_5E: uint arg_42_0 = 3270485863u; while (true) { uint num; switch ((num = (arg_42_0 ^ 3779853905u)) % 4u) { case 0u: goto IL_5E; case 2u: arg_42_0 = (((jsonTokenizer.Next() == JsonToken.EndDocument) ? 3559760258u : 4167807268u) ^ num * 449741833u); continue; case 3u: goto IL_65; } goto Block_2; } } Block_2: return; IL_65: throw new InvalidProtocolBufferException(Module.smethod_34<string>(3379670930u)); } private void Merge(IMessage message, JsonTokenizer tokenizer) { if (tokenizer.ObjectDepth > this.settings.RecursionLimit) { goto IL_166; } goto IL_1D1; uint arg_170_0; JsonToken jsonToken; string stringValue; Action<JsonParser, IMessage, JsonTokenizer> action; while (true) { IL_16B: uint num; switch ((num = (arg_170_0 ^ 1078358184u)) % 17u) { case 0u: goto IL_166; case 1u: goto IL_1D1; case 2u: return; case 3u: jsonToken = tokenizer.Next(); arg_170_0 = 585431802u; continue; case 4u: arg_170_0 = (((jsonToken.Type != JsonToken.TokenType.EndObject) ? 1936488639u : 1104038645u) ^ num * 1880809857u); continue; case 5u: { stringValue = jsonToken.StringValue; IDictionary<string, FieldDescriptor> dictionary; FieldDescriptor field; arg_170_0 = (dictionary.TryGetValue(stringValue, out field) ? 1712244973u : 410120627u); continue; } case 6u: { FieldDescriptor field; this.MergeField(message, field, tokenizer); arg_170_0 = (num * 3702916737u ^ 1750960619u); continue; } case 7u: goto IL_1E4; case 8u: arg_170_0 = (((!JsonParser.WellKnownTypeHandlers.TryGetValue(message.Descriptor.FullName, out action)) ? 454152534u : 1326785874u) ^ num * 2935428474u); continue; case 9u: jsonToken = tokenizer.Next(); arg_170_0 = 1405425133u; continue; case 11u: goto IL_230; case 12u: { IDictionary<string, FieldDescriptor> dictionary = message.Descriptor.Fields.ByJsonName(); arg_170_0 = 609874222u; continue; } case 13u: goto IL_200; case 14u: arg_170_0 = (((jsonToken.Type == JsonToken.TokenType.StartObject) ? 398803499u : 28852835u) ^ num * 1284069959u); continue; case 15u: goto IL_210; case 16u: arg_170_0 = ((jsonToken.Type == JsonToken.TokenType.Name) ? 1798285210u : 878968841u); continue; } break; } goto IL_1EA; IL_1E4: throw InvalidProtocolBufferException.JsonRecursionLimitExceeded(); IL_1EA: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_36<string>(369247576u), stringValue)); IL_200: throw new InvalidProtocolBufferException(Module.smethod_35<string>(182362879u)); IL_210: throw JsonParser.smethod_2(JsonParser.smethod_1(Module.smethod_34<string>(3754617378u), jsonToken.Type)); IL_230: action(this, message, tokenizer); return; IL_166: arg_170_0 = 2061109089u; goto IL_16B; IL_1D1: arg_170_0 = ((!message.Descriptor.IsWellKnownType) ? 1578145520u : 33384807u); goto IL_16B; } private void MergeField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); while (true) { IL_FF: uint arg_C6_0 = 2728460861u; while (true) { uint num; switch ((num = (arg_C6_0 ^ 4088202538u)) % 11u) { case 0u: tokenizer.PushBack(jsonToken); arg_C6_0 = 3391872723u; continue; case 1u: field.Accessor.Clear(message); arg_C6_0 = (num * 3094303059u ^ 3964149977u); continue; case 2u: arg_C6_0 = (field.IsRepeated ? 4127807774u : 2761628867u); continue; case 3u: goto IL_106; case 4u: goto IL_FF; case 5u: this.MergeMapField(message, field, tokenizer); arg_C6_0 = (num * 2740112576u ^ 1415568343u); continue; case 6u: return; case 7u: arg_C6_0 = (((jsonToken.Type == JsonToken.TokenType.Null) ? 133441576u : 1327102556u) ^ num * 525105402u); continue; case 9u: return; case 10u: arg_C6_0 = (((!field.IsMap) ? 1515221911u : 88506733u) ^ num * 2127989669u); continue; } goto Block_4; } } Block_4: goto IL_111; IL_106: this.MergeRepeatedField(message, field, tokenizer); return; IL_111: object value = this.ParseSingleValue(field, tokenizer); field.Accessor.SetValue(message, value); } private void MergeRepeatedField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); if (jsonToken.Type != JsonToken.TokenType.StartArray) { goto IL_59; } goto IL_89; int arg_63_0; IList ilist_; while (true) { IL_5E: switch ((arg_63_0 ^ -96800083) % 7) { case 0: break; case 1: goto IL_89; case 2: return; case 3: goto IL_59; case 4: goto IL_A2; case 5: goto IL_20; case 6: tokenizer.PushBack(jsonToken); arg_63_0 = -38945780; continue; default: goto IL_20; } IL_2F: jsonToken = tokenizer.Next(); arg_63_0 = ((jsonToken.Type != JsonToken.TokenType.EndArray) ? -165915210 : -92736225); continue; IL_20: JsonParser.smethod_4(ilist_, this.ParseSingleValue(field, tokenizer)); goto IL_2F; } IL_A2: throw new InvalidProtocolBufferException(JsonParser.smethod_1(Module.smethod_34<string>(2723514646u), jsonToken.Type)); IL_59: arg_63_0 = -1374708303; goto IL_5E; IL_89: ilist_ = (IList)field.Accessor.GetValue(message); arg_63_0 = -1453703693; goto IL_5E; } private void MergeMapField(IMessage message, FieldDescriptor field, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); while (true) { IL_185: uint arg_13C_0 = 1602437427u; while (true) { uint num; object object_; object object_2; IDictionary idictionary_; switch ((num = (arg_13C_0 ^ 1027221640u)) % 14u) { case 0u: return; case 1u: arg_13C_0 = (((jsonToken.Type != JsonToken.TokenType.EndObject) ? 3031360279u : 3293094157u) ^ num * 99189417u); continue; case 2u: goto IL_185; case 3u: { MessageDescriptor expr_F8 = field.MessageType; FieldDescriptor fieldDescriptor = expr_F8.FindFieldByNumber(1); FieldDescriptor fieldDescriptor2 = expr_F8.FindFieldByNumber(2); arg_13C_0 = 894103472u; continue; } case 4u: { FieldDescriptor fieldDescriptor2; arg_13C_0 = (((fieldDescriptor2 != null) ? 4064381129u : 2567681974u) ^ num * 2234778990u); continue; } case 5u: goto IL_18C; case 6u: { FieldDescriptor fieldDescriptor; arg_13C_0 = (((fieldDescriptor == null) ? 315775450u : 105751566u) ^ num * 513407619u); continue; } case 7u: { FieldDescriptor fieldDescriptor2; object_ = this.ParseSingleValue(fieldDescriptor2, tokenizer); arg_13C_0 = (num * 1341013222u ^ 143618253u); continue; } case 8u: { FieldDescriptor fieldDescriptor; object_2 = JsonParser.ParseMapKey(fieldDescriptor, jsonToken.StringValue); arg_13C_0 = 1112118343u; continue; } case 9u: goto IL_67; case 10u: goto IL_19C; case 11u: arg_13C_0 = (((jsonToken.Type != JsonToken.TokenType.StartObject) ? 805488328u : 1688901164u) ^ num * 3409497837u); continue; case 12u: break; case 13u: idictionary_ = (IDictionary)field.Accessor.GetValue(message); arg_13C_0 = 89503584u; continue; default: goto IL_67; } IL_28: jsonToken = tokenizer.Next(); arg_13C_0 = 1923606965u; continue; IL_67: JsonParser.smethod_5(idictionary_, object_2, object_); goto IL_28; } } IL_18C: throw new InvalidProtocolBufferException(Module.smethod_33<string>(2975024404u)); IL_19C: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_34<string>(3285934318u), field.FullName)); } private object ParseSingleValue(FieldDescriptor field, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); FieldType fieldType; while (true) { IL_241: uint arg_1DB_0 = 2895183132u; while (true) { uint num; switch ((num = (arg_1DB_0 ^ 4227999491u)) % 22u) { case 0u: fieldType = field.FieldType; arg_1DB_0 = (num * 3631647553u ^ 1627424644u); continue; case 1u: arg_1DB_0 = (((jsonToken.Type == JsonToken.TokenType.Null) ? 2562487117u : 3264765317u) ^ num * 2320226437u); continue; case 2u: arg_1DB_0 = ((field.MessageType.IsWrapperType ? 2451041983u : 3106705937u) ^ num * 2937492452u); continue; case 3u: goto IL_10E; case 4u: goto IL_241; case 5u: goto IL_248; case 6u: goto IL_257; case 7u: goto IL_2A8; case 8u: goto IL_2C5; case 9u: fieldType = field.FieldType; arg_1DB_0 = 3868419237u; continue; case 10u: goto IL_2B8; case 11u: arg_1DB_0 = (((field.FieldType != FieldType.Message) ? 3251097083u : 2733609498u) ^ num * 862346660u); continue; case 13u: goto IL_29B; case 14u: { JsonToken.TokenType type; switch (type) { case JsonToken.TokenType.Null: goto IL_2A8; case JsonToken.TokenType.False: case JsonToken.TokenType.True: goto IL_10E; case JsonToken.TokenType.StringValue: goto IL_2B8; case JsonToken.TokenType.Number: goto IL_2C5; default: arg_1DB_0 = (num * 3820120435u ^ 3713021620u); continue; } break; } case 15u: arg_1DB_0 = (((!JsonParser.smethod_6(field.MessageType.FullName, Value.Descriptor.FullName)) ? 3539103804u : 3514659843u) ^ num * 2554588575u); continue; case 16u: field = field.MessageType.Fields[1]; arg_1DB_0 = (num * 2112469621u ^ 1822803999u); continue; case 17u: { IMessage message; return message; } case 18u: { tokenizer.PushBack(jsonToken); IMessage message = JsonParser.NewMessageForField(field); this.Merge(message, tokenizer); arg_1DB_0 = 3973606158u; continue; } case 19u: { JsonToken.TokenType type = jsonToken.Type; arg_1DB_0 = 3591463145u; continue; } case 20u: arg_1DB_0 = (((fieldType != FieldType.Message) ? 2518168550u : 2364668323u) ^ num * 353123967u); continue; case 21u: arg_1DB_0 = (num * 2401492949u ^ 959663284u); continue; } goto Block_8; IL_10E: arg_1DB_0 = ((fieldType != FieldType.Bool) ? 3264650281u : 2606235060u); } } Block_8: goto IL_259; IL_248: return jsonToken.Type == JsonToken.TokenType.True; IL_257: return null; IL_259: throw new InvalidProtocolBufferException(JsonParser.smethod_8(new object[] { Module.smethod_35<string>(1595405755u), jsonToken.Type, Module.smethod_33<string>(3358579280u), fieldType })); IL_29B: return new Value { NullValue = NullValue.NULL_VALUE }; IL_2A8: throw JsonParser.smethod_7(Module.smethod_36<string>(2253431815u)); IL_2B8: return JsonParser.ParseSingleStringValue(field, jsonToken.StringValue); IL_2C5: return JsonParser.ParseSingleNumberValue(field, jsonToken); } public T Parse<T>(string json) where T : IMessage, new() { Preconditions.CheckNotNull<string>(json, Module.smethod_37<string>(1047885616u)); return this.Parse<T>(JsonParser.smethod_0(json)); } public T Parse<T>(TextReader jsonReader) where T : IMessage, new() { Preconditions.CheckNotNull<TextReader>(jsonReader, Module.smethod_34<string>(1438865445u)); T t; while (true) { IL_63: uint arg_47_0 = 909048356u; while (true) { uint num; switch ((num = (arg_47_0 ^ 38086297u)) % 4u) { case 0u: goto IL_63; case 1u: t = Activator.CreateInstance<T>(); arg_47_0 = (num * 2254866517u ^ 4036767062u); continue; case 2u: this.Merge(t, jsonReader); arg_47_0 = (num * 3930331853u ^ 2440088268u); continue; } return t; } } return t; } public IMessage Parse(string json, MessageDescriptor descriptor) { Preconditions.CheckNotNull<string>(json, Module.smethod_36<string>(1642750916u)); Preconditions.CheckNotNull<MessageDescriptor>(descriptor, Module.smethod_37<string>(3239194258u)); return this.Parse(JsonParser.smethod_0(json), descriptor); } public IMessage Parse(TextReader jsonReader, MessageDescriptor descriptor) { Preconditions.CheckNotNull<TextReader>(jsonReader, Module.smethod_36<string>(1301239194u)); Preconditions.CheckNotNull<MessageDescriptor>(descriptor, Module.smethod_35<string>(3931769886u)); IMessage message = descriptor.Parser.CreateTemplate(); this.Merge(message, jsonReader); return message; } private void MergeStructValue(IMessage message, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); MessageDescriptor.FieldCollection fields; while (true) { IL_D9: uint arg_9B_0 = 1098154793u; while (true) { uint num; switch ((num = (arg_9B_0 ^ 1051869849u)) % 12u) { case 0u: goto IL_D9; case 1u: goto IL_E1; case 2u: goto IL_140; case 4u: fields = message.Descriptor.Fields; arg_9B_0 = (num * 4176649528u ^ 1545379649u); continue; case 5u: goto IL_102; case 6u: arg_9B_0 = (num * 2566969128u ^ 102451614u); continue; case 7u: return; case 8u: switch (jsonToken.Type) { case JsonToken.TokenType.Null: goto IL_16D; case JsonToken.TokenType.False: case JsonToken.TokenType.True: goto IL_E1; case JsonToken.TokenType.StringValue: goto IL_0C; case JsonToken.TokenType.Number: goto IL_102; case JsonToken.TokenType.Name: case JsonToken.TokenType.EndObject: break; case JsonToken.TokenType.StartObject: goto IL_186; case JsonToken.TokenType.StartArray: goto IL_140; default: arg_9B_0 = (num * 673296015u ^ 1606414163u); continue; } break; case 9u: goto IL_16D; case 10u: goto IL_0C; case 11u: goto IL_186; } goto Block_2; IL_0C: fields[3].Accessor.SetValue(message, jsonToken.StringValue); arg_9B_0 = 587775730u; } } Block_2: goto IL_120; IL_E1: fields[4].Accessor.SetValue(message, jsonToken.Type == JsonToken.TokenType.True); return; IL_102: fields[2].Accessor.SetValue(message, jsonToken.NumberValue); return; IL_120: throw JsonParser.smethod_2(JsonParser.smethod_1(Module.smethod_36<string>(246668818u), jsonToken.Type)); IL_140: FieldDescriptor expr_147 = fields[6]; IMessage message2 = JsonParser.NewMessageForField(expr_147); tokenizer.PushBack(jsonToken); this.Merge(message2, tokenizer); expr_147.Accessor.SetValue(message, message2); return; IL_16D: fields[1].Accessor.SetValue(message, 0); return; IL_186: FieldDescriptor expr_18D = fields[5]; IMessage message3 = JsonParser.NewMessageForField(expr_18D); tokenizer.PushBack(jsonToken); this.Merge(message3, tokenizer); expr_18D.Accessor.SetValue(message, message3); } private void MergeStruct(IMessage message, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); if (jsonToken.Type != JsonToken.TokenType.StartObject) { goto IL_4B; } goto IL_79; uint arg_55_0; while (true) { IL_50: uint num; switch ((num = (arg_55_0 ^ 1653967734u)) % 6u) { case 0u: goto IL_4B; case 1u: goto IL_79; case 2u: { FieldDescriptor field = message.Descriptor.Fields[1]; arg_55_0 = (num * 3438667733u ^ 1101684043u); continue; } case 3u: { FieldDescriptor field; this.MergeMapField(message, field, tokenizer); arg_55_0 = (num * 2991607230u ^ 1358340007u); continue; } case 4u: goto IL_87; } break; } return; IL_87: throw new InvalidProtocolBufferException(Module.smethod_34<string>(2435928094u)); IL_4B: arg_55_0 = 1454851390u; goto IL_50; IL_79: tokenizer.PushBack(jsonToken); arg_55_0 = 1487544692u; goto IL_50; } private void MergeAny(IMessage message, JsonTokenizer tokenizer) { List<JsonToken> list = new List<JsonToken>(); string typeName; while (true) { IL_32C: uint arg_2BA_0 = 1448548076u; while (true) { uint num; switch ((num = (arg_2BA_0 ^ 1478598455u)) % 25u) { case 0u: { JsonToken jsonToken; arg_2BA_0 = (((jsonToken.Type != JsonToken.TokenType.StartObject) ? 169911250u : 542751207u) ^ num * 3565547574u); continue; } case 1u: { MessageDescriptor messageDescriptor; IMessage message2 = messageDescriptor.Parser.CreateTemplate(); arg_2BA_0 = ((messageDescriptor.IsWellKnownType ? 905236089u : 1797763964u) ^ num * 4225873014u); continue; } case 2u: goto IL_333; case 3u: { IMessage message2; ByteString value = message2.ToByteString(); arg_2BA_0 = 1007236507u; continue; } case 4u: { JsonTokenizer tokenizer2 = JsonTokenizer.FromReplayedTokens(list, tokenizer); arg_2BA_0 = 1740447578u; continue; } case 5u: { MessageDescriptor messageDescriptor; arg_2BA_0 = (((messageDescriptor == null) ? 1978605643u : 474750921u) ^ num * 3448549742u); continue; } case 6u: { JsonToken jsonToken; list.Add(jsonToken); jsonToken = tokenizer.Next(); arg_2BA_0 = 486044040u; continue; } case 7u: { string stringValue; message.Descriptor.Fields[1].Accessor.SetValue(message, stringValue); ByteString value; message.Descriptor.Fields[2].Accessor.SetValue(message, value); arg_2BA_0 = (num * 2479283979u ^ 2103243500u); continue; } case 8u: { JsonToken jsonToken = tokenizer.Next(); arg_2BA_0 = (num * 3946219542u ^ 3697851440u); continue; } case 9u: goto IL_343; case 10u: { JsonToken jsonToken; string stringValue = jsonToken.StringValue; arg_2BA_0 = 49789875u; continue; } case 11u: goto IL_353; case 12u: { int objectDepth; arg_2BA_0 = (((tokenizer.ObjectDepth == objectDepth) ? 4018706426u : 2723087548u) ^ num * 489652238u); continue; } case 13u: { JsonToken jsonToken = tokenizer.Next(); arg_2BA_0 = (num * 2684042365u ^ 1351852711u); continue; } case 14u: { JsonToken jsonToken; arg_2BA_0 = (((jsonToken.Type != JsonToken.TokenType.StringValue) ? 3656972936u : 2253876696u) ^ num * 1993675286u); continue; } case 15u: { MessageDescriptor messageDescriptor = this.settings.TypeRegistry.Find(typeName); arg_2BA_0 = (num * 166593685u ^ 1985437103u); continue; } case 16u: { JsonToken jsonToken; arg_2BA_0 = ((JsonParser.smethod_9(jsonToken.StringValue, Module.smethod_36<string>(2843911711u)) ? 2869146979u : 3771489917u) ^ num * 1931197875u); continue; } case 17u: { string stringValue; typeName = JsonFormatter.GetTypeName(stringValue); arg_2BA_0 = (num * 4240734580u ^ 1519801139u); continue; } case 19u: { JsonToken jsonToken; arg_2BA_0 = ((jsonToken.Type == JsonToken.TokenType.Name) ? 656477912u : 1364969598u); continue; } case 20u: { IMessage message2; JsonTokenizer tokenizer2; this.Merge(message2, tokenizer2); arg_2BA_0 = 1399484075u; continue; } case 21u: arg_2BA_0 = (num * 3779688449u ^ 2144537681u); continue; case 22u: goto IL_32C; case 23u: { IMessage message2; JsonTokenizer tokenizer2; this.MergeWellKnownTypeAnyBody(message2, tokenizer2); arg_2BA_0 = (num * 2237969446u ^ 2282714989u); continue; } case 24u: { int objectDepth = tokenizer.ObjectDepth; arg_2BA_0 = 486044040u; continue; } } goto Block_8; } } Block_8: return; IL_333: throw new InvalidProtocolBufferException(Module.smethod_36<string>(2978762594u)); IL_343: throw new InvalidProtocolBufferException(Module.smethod_37<string>(3881420535u)); IL_353: throw JsonParser.smethod_2(JsonParser.smethod_10(Module.smethod_37<string>(1193978753u), new object[] { typeName })); } private void MergeWellKnownTypeAnyBody(IMessage body, JsonTokenizer tokenizer) { JsonToken jsonToken = tokenizer.Next(); while (true) { IL_FB: uint arg_CA_0 = 1243585352u; while (true) { uint num; switch ((num = (arg_CA_0 ^ 30401385u)) % 9u) { case 1u: jsonToken = tokenizer.Next(); arg_CA_0 = (((jsonToken.Type == JsonToken.TokenType.Name) ? 597710735u : 1911170991u) ^ num * 2497769275u); continue; case 2u: goto IL_102; case 3u: this.Merge(body, tokenizer); arg_CA_0 = 1416378815u; continue; case 4u: arg_CA_0 = ((JsonParser.smethod_9(jsonToken.StringValue, Module.smethod_35<string>(4287036u)) ? 3490082770u : 4036978239u) ^ num * 1544479070u); continue; case 5u: goto IL_FB; case 6u: arg_CA_0 = (((jsonToken.Type == JsonToken.TokenType.EndObject) ? 3805322814u : 3204445242u) ^ num * 4181565098u); continue; case 7u: goto IL_12A; case 8u: jsonToken = tokenizer.Next(); arg_CA_0 = (num * 1292893797u ^ 4007342446u); continue; } goto Block_4; } } Block_4: return; IL_102: throw new InvalidProtocolBufferException(JsonParser.smethod_10(Module.smethod_36<string>(4075640305u), new object[] { Module.smethod_33<string>(58016685u) })); IL_12A: throw new InvalidProtocolBufferException(Module.smethod_33<string>(2955856016u)); } private static object ParseMapKey(FieldDescriptor field, string keyText) { FieldType fieldType = field.FieldType; while (true) { IL_10F: uint arg_CA_0 = 2807994242u; while (true) { uint num; switch ((num = (arg_CA_0 ^ 2360211423u)) % 14u) { case 0u: goto IL_156; case 1u: goto IL_13D; case 2u: goto IL_116; case 3u: goto IL_124; case 4u: goto IL_11D; case 5u: switch (fieldType) { case FieldType.Int64: case FieldType.SFixed64: case FieldType.SInt64: goto IL_156; case FieldType.UInt64: case FieldType.Fixed64: goto IL_124; case FieldType.Int32: case FieldType.SFixed32: case FieldType.SInt32: goto IL_13D; case FieldType.Fixed32: case FieldType.UInt32: goto IL_16F; case FieldType.Bool: goto IL_0C; case FieldType.String: return keyText; case FieldType.Group: case FieldType.Message: case FieldType.Bytes: break; default: arg_CA_0 = (num * 1011171654u ^ 884623786u); continue; } break; case 6u: arg_CA_0 = ((!JsonParser.smethod_6(keyText, Module.smethod_37<string>(54440496u))) ? 4231775696u : 2941729777u); continue; case 7u: goto IL_16F; case 8u: return keyText; case 9u: arg_CA_0 = (num * 1214129262u ^ 510516631u); continue; case 11u: goto IL_1A8; case 12u: goto IL_0C; case 13u: goto IL_10F; } goto Block_4; IL_0C: arg_CA_0 = ((!JsonParser.smethod_6(keyText, Module.smethod_33<string>(2183097496u))) ? 2402669603u : 3430961391u); } } Block_4: goto IL_188; IL_116: return true; IL_11D: return false; IL_124: return JsonParser.ParseNumericString<ulong>(keyText, new Func<string, NumberStyles, IFormatProvider, ulong>(ulong.Parse), false); IL_13D: return JsonParser.ParseNumericString<int>(keyText, new Func<string, NumberStyles, IFormatProvider, int>(int.Parse), false); IL_156: return JsonParser.ParseNumericString<long>(keyText, new Func<string, NumberStyles, IFormatProvider, long>(long.Parse), false); IL_16F: return JsonParser.ParseNumericString<uint>(keyText, new Func<string, NumberStyles, IFormatProvider, uint>(uint.Parse), false); IL_188: throw new InvalidProtocolBufferException(JsonParser.smethod_1(Module.smethod_34<string>(4040197009u), field.FieldType)); IL_1A8: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_36<string>(3227730768u), keyText)); } private static object ParseSingleNumberValue(FieldDescriptor field, JsonToken token) { double numberValue = token.NumberValue; object result; try { FieldType fieldType = field.FieldType; while (true) { IL_236: uint arg_1C5_0 = 2714162256u; while (true) { uint num; switch ((num = (arg_1C5_0 ^ 3081497452u)) % 25u) { case 0u: goto IL_236; case 1u: arg_1C5_0 = (((numberValue >= -3.4028234663852886E+38) ? 108139018u : 1580937062u) ^ num * 1792843395u); continue; case 2u: goto IL_23D; case 3u: result = (float)numberValue; arg_1C5_0 = 3841389836u; continue; case 4u: arg_1C5_0 = (num * 4155140879u ^ 3914873338u); continue; case 5u: goto IL_23F; case 6u: arg_1C5_0 = ((!double.IsNegativeInfinity(numberValue)) ? 2860638638u : 3287639585u); continue; case 7u: goto IL_286; case 8u: goto IL_27C; case 9u: goto IL_10E; case 10u: result = float.NaN; arg_1C5_0 = (num * 519730457u ^ 2192162278u); continue; case 12u: goto IL_25A; case 13u: result = float.NegativeInfinity; arg_1C5_0 = (num * 2072606338u ^ 2537405877u); continue; case 14u: switch (fieldType) { case FieldType.Double: goto IL_10E; case FieldType.Float: goto IL_66; case FieldType.Int64: case FieldType.SFixed64: case FieldType.SInt64: goto IL_286; case FieldType.UInt64: case FieldType.Fixed64: goto IL_292; case FieldType.Int32: case FieldType.SFixed32: case FieldType.SInt32: goto IL_27C; case FieldType.Fixed32: case FieldType.UInt32: goto IL_13; case FieldType.Bool: case FieldType.String: case FieldType.Group: case FieldType.Message: case FieldType.Bytes: break; default: arg_1C5_0 = (num * 6725480u ^ 3431166399u); continue; } break; case 15u: goto IL_290; case 16u: arg_1C5_0 = ((numberValue > 3.4028234663852886E+38) ? 2615766076u : 4080106354u); continue; case 17u: goto IL_66; case 18u: result = float.PositiveInfinity; arg_1C5_0 = (num * 2932461535u ^ 2132088557u); continue; case 19u: goto IL_292; case 20u: arg_1C5_0 = (double.IsPositiveInfinity(numberValue) ? 2962263815u : 2997685618u); continue; case 21u: goto IL_29C; case 22u: goto IL_29E; case 23u: goto IL_2A0; case 24u: goto IL_13; } goto Block_9; IL_13: result = checked((uint)numberValue); arg_1C5_0 = 3298924930u; continue; IL_66: arg_1C5_0 = ((!double.IsNaN(numberValue)) ? 2700260390u : 2475679739u); continue; IL_10E: result = numberValue; arg_1C5_0 = 4188884243u; } } Block_9: goto IL_25C; IL_23D: return result; IL_23F: throw new InvalidProtocolBufferException(JsonParser.smethod_1(Module.smethod_33<string>(827338283u), numberValue)); IL_25A: return result; IL_25C: throw new InvalidProtocolBufferException(JsonParser.smethod_1(Module.smethod_37<string>(3764563708u), field.FieldType)); IL_27C: checked { result = (int)numberValue; return result; IL_286: result = (long)numberValue; IL_290: return result; IL_292: result = (ulong)numberValue; IL_29C: IL_29E: IL_2A0:; } } catch (OverflowException) { throw new InvalidProtocolBufferException(JsonParser.smethod_1(Module.smethod_33<string>(827338283u), numberValue)); } return result; } private static object ParseSingleStringValue(FieldDescriptor field, string text) { FieldType fieldType = field.FieldType; while (true) { IL_BF: uint arg_7B_0 = 2669369356u; while (true) { uint num; switch ((num = (arg_7B_0 ^ 3757300285u)) % 13u) { case 0u: goto IL_C6; case 1u: goto IL_10F; case 2u: goto IL_116; case 3u: switch (fieldType) { case FieldType.Double: goto IL_C6; case FieldType.Float: goto IL_1E1; case FieldType.Int64: case FieldType.SFixed64: case FieldType.SInt64: goto IL_1AF; case FieldType.UInt64: case FieldType.Fixed64: goto IL_131; case FieldType.Int32: case FieldType.SFixed32: case FieldType.SInt32: goto IL_116; case FieldType.Fixed32: case FieldType.UInt32: goto IL_1C8; case FieldType.Bool: case FieldType.Group: case FieldType.Message: break; case FieldType.String: return text; case FieldType.Bytes: goto IL_10F; case FieldType.Enum: goto IL_14A; default: arg_7B_0 = (num * 1146191775u ^ 1244459093u); continue; } break; case 4u: return text; case 5u: goto IL_131; case 6u: goto IL_14A; case 8u: goto IL_1AF; case 9u: goto IL_1C8; case 10u: goto IL_1E1; case 11u: goto IL_BF; case 12u: arg_7B_0 = (num * 2436245771u ^ 1680811102u); continue; } goto Block_2; } } Block_2: goto IL_18F; IL_C6: double expr_D9 = JsonParser.ParseNumericString<double>(text, new Func<string, NumberStyles, IFormatProvider, double>(double.Parse), true); if (double.IsInfinity(expr_D9) && !JsonParser.smethod_11(text, Module.smethod_35<string>(2182845045u))) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_37<string>(1631698215u), text)); } return expr_D9; IL_10F: return ByteString.FromBase64(text); IL_116: return JsonParser.ParseNumericString<int>(text, new Func<string, NumberStyles, IFormatProvider, int>(int.Parse), false); IL_131: return JsonParser.ParseNumericString<ulong>(text, new Func<string, NumberStyles, IFormatProvider, ulong>(ulong.Parse), false); IL_14A: EnumValueDescriptor expr_156 = field.EnumType.FindValueByName(text); if (expr_156 == null) { throw new InvalidProtocolBufferException(JsonParser.smethod_12(Module.smethod_35<string>(449296466u), text, Module.smethod_33<string>(2731997989u), field.EnumType.FullName)); } return expr_156.Number; IL_18F: throw new InvalidProtocolBufferException(JsonParser.smethod_1(Module.smethod_35<string>(2533819953u), field.FieldType)); IL_1AF: return JsonParser.ParseNumericString<long>(text, new Func<string, NumberStyles, IFormatProvider, long>(long.Parse), false); IL_1C8: return JsonParser.ParseNumericString<uint>(text, new Func<string, NumberStyles, IFormatProvider, uint>(uint.Parse), false); IL_1E1: float expr_1F4 = JsonParser.ParseNumericString<float>(text, new Func<string, NumberStyles, IFormatProvider, float>(float.Parse), true); if (float.IsInfinity(expr_1F4) && !JsonParser.smethod_11(text, Module.smethod_35<string>(2182845045u))) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_36<string>(712664627u), text)); } return expr_1F4; } private static IMessage NewMessageForField(FieldDescriptor field) { return field.MessageType.Parser.CreateTemplate(); } private static T ParseNumericString<T>(string text, Func<string, NumberStyles, IFormatProvider, T> parser, bool floatingPoint) { if (JsonParser.smethod_13(text, Module.smethod_37<string>(3618441100u))) { goto IL_55; } goto IL_1BC; uint arg_16C_0; while (true) { IL_167: uint num; switch ((num = (arg_16C_0 ^ 4177359718u)) % 13u) { case 0u: arg_16C_0 = (((JsonParser.smethod_14(text) > 1) ? 2463668687u : 3598180064u) ^ num * 2568927712u); continue; case 1u: goto IL_1D3; case 2u: arg_16C_0 = (((JsonParser.smethod_14(text) > 2) ? 3907063306u : 3060195777u) ^ num * 2050404848u); continue; case 3u: arg_16C_0 = (((JsonParser.smethod_15(text, 2) > '9') ? 3640000129u : 2883664693u) ^ num * 3792810758u); continue; case 4u: arg_16C_0 = (((JsonParser.smethod_15(text, 1) > '9') ? 2116282117u : 1825164171u) ^ num * 1872945357u); continue; case 5u: goto IL_1E9; case 6u: arg_16C_0 = (((JsonParser.smethod_15(text, 1) >= '0') ? 2146772721u : 1482794594u) ^ num * 540114235u); continue; case 7u: goto IL_1BC; case 8u: arg_16C_0 = (((JsonParser.smethod_15(text, 2) < '0') ? 2547763313u : 3381176574u) ^ num * 1355254552u); continue; case 9u: goto IL_1FF; case 10u: goto IL_55; case 12u: arg_16C_0 = (JsonParser.smethod_13(text, Module.smethod_35<string>(547297454u)) ? 2931114137u : 4211666897u); continue; } break; } goto IL_215; IL_1D3: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_35<string>(1498538043u), text)); IL_1E9: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_37<string>(1631698215u), text)); IL_1FF: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_36<string>(712664627u), text)); IL_215: T result; try { NumberStyles arg_243_0; if (floatingPoint) { arg_243_0 = (NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent); goto IL_243; } IL_220: int arg_22A_0 = -14019326; IL_225: switch ((arg_22A_0 ^ -117607578) % 3) { case 1: arg_243_0 = NumberStyles.AllowLeadingSign; goto IL_243; case 2: goto IL_220; } NumberStyles arg; result = parser(text, arg, JsonParser.smethod_16()); return result; IL_243: arg = arg_243_0; arg_22A_0 = -1612766286; goto IL_225; } catch (FormatException) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_37<string>(2332868648u), text)); } catch (OverflowException) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_33<string>(827338283u), text)); } return result; IL_55: arg_16C_0 = 3791357276u; goto IL_167; IL_1BC: arg_16C_0 = ((!JsonParser.smethod_13(text, Module.smethod_33<string>(2258260179u))) ? 4151560608u : 3475140416u); goto IL_167; } private static void MergeTimestamp(IMessage message, JsonToken token) { if (token.Type != JsonToken.TokenType.StringValue) { throw new InvalidProtocolBufferException(Module.smethod_34<string>(4106270254u)); } Match expr_30 = JsonParser.smethod_17(JsonParser.TimestampRegex, token.StringValue); if (!JsonParser.smethod_18(expr_30)) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_35<string>(687177443u), token.StringValue)); } string s = JsonParser.smethod_21(JsonParser.smethod_20(JsonParser.smethod_19(expr_30), Module.smethod_37<string>(3034098023u))); string string_ = JsonParser.smethod_21(JsonParser.smethod_20(JsonParser.smethod_19(expr_30), Module.smethod_33<string>(3434946563u))); string string_2 = JsonParser.smethod_21(JsonParser.smethod_20(JsonParser.smethod_19(expr_30), Module.smethod_33<string>(1037578013u))); try { Timestamp timestamp = Timestamp.FromDateTime(DateTime.ParseExact(s, Module.smethod_34<string>(2071728157u), JsonParser.smethod_16(), DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal)); while (true) { IL_3E0: uint arg_37A_0 = 3482553023u; while (true) { uint num; int arg_2B6_0; int num3; int num4; switch ((num = (arg_37A_0 ^ 2253564775u)) % 22u) { case 0u: goto IL_3E7; case 1u: { int num2; num2++; arg_37A_0 = (num * 2420059356u ^ 3584083717u); continue; } case 2u: if (JsonParser.smethod_15(string_2, 0) != '-') { arg_37A_0 = (num * 1484961684u ^ 1375498980u); continue; } arg_2B6_0 = 1; goto IL_2B6; case 3u: { int num2 = num3 * num4 * 60; arg_37A_0 = 3213147769u; continue; } case 5u: { int num5; arg_37A_0 = (((num5 <= 0) ? 2488158781u : 3845899968u) ^ num * 1776378968u); continue; } case 6u: { int num2; arg_37A_0 = ((num2 != 0) ? 2353943368u : 3121454488u); continue; } case 7u: arg_2B6_0 = -1; goto IL_2B6; case 8u: { int num5 = 0; arg_37A_0 = ((JsonParser.smethod_9(string_, "") ? 4119342013u : 2537885837u) ^ num * 1509081769u); continue; } case 9u: goto IL_3E0; case 10u: goto IL_402; case 11u: arg_37A_0 = (((num4 <= 1080) ? 162770018u : 1694212733u) ^ num * 3621179598u); continue; case 12u: arg_37A_0 = (((num3 != 1) ? 3768917040u : 2670467745u) ^ num * 3434461367u); continue; case 13u: goto IL_41D; case 14u: { int num5; num5 -= 1000000000; arg_37A_0 = (num * 752942754u ^ 330657225u); continue; } case 15u: { int num2; int num5; timestamp += new Duration { Nanos = num5, Seconds = (long)num2 }; arg_37A_0 = ((timestamp.Seconds < Timestamp.UnixSecondsAtBclMinValue) ? 2941647600u : 3675294830u); continue; } case 16u: { int num2; arg_37A_0 = ((num2 < 0) ? 4042516610u : 3413606533u); continue; } case 17u: arg_37A_0 = ((num4 != 0) ? 4238917532u : 4277665491u); continue; case 18u: { int num5 = int.Parse(JsonParser.smethod_22(string_, 1), JsonParser.smethod_16()) * JsonParser.SubsecondScalingFactors[JsonParser.smethod_14(string_)]; arg_37A_0 = (num * 580118435u ^ 1430632979u); continue; } case 19u: arg_37A_0 = (((timestamp.Seconds > Timestamp.UnixSecondsAtBclMaxValue) ? 3343645217u : 3869490034u) ^ num * 1021343113u); continue; case 20u: { int num2 = 0; arg_37A_0 = (JsonParser.smethod_9(string_2, Module.smethod_36<string>(845610181u)) ? 3528904889u : 3213147769u); continue; } case 21u: { int num5; arg_37A_0 = (((num5 != 0) ? 1527006506u : 1509404097u) ^ num * 2844187550u); continue; } } goto Block_17; IL_2B6: num3 = arg_2B6_0; int arg_2DB_0 = int.Parse(JsonParser.smethod_23(string_2, 1, 2), JsonParser.smethod_16()); int num6 = int.Parse(JsonParser.smethod_23(string_2, 4, 2)); num4 = arg_2DB_0 * 60 + num6; arg_37A_0 = 2749352340u; } } Block_17: goto IL_438; IL_3E7: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_33<string>(2239792768u), token.StringValue)); IL_402: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_34<string>(599605732u), token.StringValue)); IL_41D: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_37<string>(1660875583u), token.StringValue)); IL_438: message.Descriptor.Fields[1].Accessor.SetValue(message, timestamp.Seconds); message.Descriptor.Fields[2].Accessor.SetValue(message, timestamp.Nanos); } catch (FormatException) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_37<string>(1660875583u), token.StringValue)); } } private static void MergeDuration(IMessage message, JsonToken token) { if (token.Type != JsonToken.TokenType.StringValue) { goto IL_B9; } goto IL_0E; uint arg_C3_0; string string_; while (true) { IL_BE: uint num; switch ((num = (arg_C3_0 ^ 3743477647u)) % 5u) { case 0u: goto IL_B9; case 1u: if (!JsonParser.smethod_6(string_, Module.smethod_33<string>(4150506188u))) { arg_C3_0 = (num * 2043214906u ^ 3207108872u); continue; } goto IL_11A; case 2u: goto IL_11D; case 3u: goto IL_0E; } break; } goto IL_12D; IL_11A: int arg_12E_0 = -1; goto IL_12E; IL_11D: throw new InvalidProtocolBufferException(Module.smethod_34<string>(1162025404u)); IL_12D: arg_12E_0 = 1; IL_12E: int num2 = arg_12E_0; string text; try { long num3 = long.Parse(text, JsonParser.smethod_16()); int num4 = 0; string string_2; if (JsonParser.smethod_9(string_2, "")) { goto IL_161; } goto IL_280; uint arg_244_0; while (true) { IL_23F: uint num; switch ((num = (arg_244_0 ^ 3743477647u)) % 8u) { case 1u: goto IL_280; case 2u: arg_244_0 = (((num3 <= 315576000000L) ? 3059631780u : 3189406498u) ^ num * 3359534107u); continue; case 3u: goto IL_292; case 4u: message.Descriptor.Fields[1].Accessor.SetValue(message, num3 * (long)num2); message.Descriptor.Fields[2].Accessor.SetValue(message, num4 * num2); arg_244_0 = 2780097103u; continue; case 5u: arg_244_0 = (((num4 <= 0) ? 3727840889u : 3118434438u) ^ num * 35559058u); continue; case 6u: num4 = int.Parse(JsonParser.smethod_22(string_2, 1)) * JsonParser.SubsecondScalingFactors[JsonParser.smethod_14(string_2)]; arg_244_0 = (num * 475716902u ^ 3859568690u); continue; case 7u: goto IL_161; } break; } goto IL_2AD; IL_292: throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_34<string>(1950328178u), token.StringValue)); IL_2AD: return; IL_161: arg_244_0 = 3912563481u; goto IL_23F; IL_280: arg_244_0 = ((num3 >= 315576000000L) ? 3748588597u : 4046420291u); goto IL_23F; } catch (FormatException) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_34<string>(1950328178u), token.StringValue)); } return; IL_0E: Match expr_1E = JsonParser.smethod_17(JsonParser.DurationRegex, token.StringValue); if (!JsonParser.smethod_18(expr_1E)) { throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_36<string>(949893265u), token.StringValue)); } string_ = JsonParser.smethod_21(JsonParser.smethod_20(JsonParser.smethod_19(expr_1E), Module.smethod_35<string>(519378120u))); text = JsonParser.smethod_21(JsonParser.smethod_20(JsonParser.smethod_19(expr_1E), Module.smethod_37<string>(2449754946u))); if (JsonParser.smethod_15(text, 0) != '0' || JsonParser.smethod_14(text) <= 1) { string string_2 = JsonParser.smethod_21(JsonParser.smethod_20(JsonParser.smethod_19(expr_1E), Module.smethod_36<string>(1114779358u))); arg_C3_0 = 3507747885u; goto IL_BE; } throw new InvalidProtocolBufferException(JsonParser.smethod_3(Module.smethod_37<string>(3589234261u), token.StringValue)); IL_B9: arg_C3_0 = 4269426338u; goto IL_BE; } private static void MergeFieldMask(IMessage message, JsonToken token) { if (token.Type != JsonToken.TokenType.StringValue) { goto IL_3F; } goto IL_A6; uint arg_79_0; string[] array; IList ilist_; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 84484847u)) % 8u) { case 0u: arg_79_0 = (num * 1923833620u ^ 3952286986u); continue; case 2u: goto IL_A6; case 3u: { int num2; string text = array[num2]; JsonParser.smethod_4(ilist_, JsonParser.ToSnakeCase(text)); num2++; arg_79_0 = 1706344746u; continue; } case 4u: goto IL_3F; case 5u: { int num2; arg_79_0 = ((num2 >= array.Length) ? 1071206574u : 1605914468u); continue; } case 6u: { int num2 = 0; arg_79_0 = (num * 3900225482u ^ 2965957787u); continue; } case 7u: goto IL_E1; } break; } return; IL_E1: throw new InvalidProtocolBufferException(Module.smethod_34<string>(3516187215u)); IL_3F: arg_79_0 = 1522600896u; goto IL_74; IL_A6: string[] arg_D9_0 = JsonParser.smethod_24(token.StringValue, JsonParser.FieldMaskPathSeparators, StringSplitOptions.RemoveEmptyEntries); ilist_ = (IList)message.Descriptor.Fields[1].Accessor.GetValue(message); array = arg_D9_0; arg_79_0 = 890178969u; goto IL_74; } private static string ToSnakeCase(string text) { StringBuilder stringBuilder = JsonParser.smethod_25(JsonParser.smethod_14(text) * 2); bool flag = false; while (true) { IL_29A: uint arg_23C_0 = 4087458186u; while (true) { uint num; switch ((num = (arg_23C_0 ^ 3615967362u)) % 20u) { case 0u: arg_23C_0 = (num * 430891444u ^ 987544121u); continue; case 1u: { int num2; arg_23C_0 = (((JsonParser.smethod_15(text, num2 + 1) >= 'a') ? 2716490890u : 3914129437u) ^ num * 2866782617u); continue; } case 2u: { int num2 = 0; arg_23C_0 = (num * 4185695377u ^ 564518536u); continue; } case 3u: { int num2; arg_23C_0 = ((num2 < JsonParser.smethod_14(text)) ? 4028625926u : 2879589281u); continue; } case 4u: { flag = true; bool flag2 = false; arg_23C_0 = (num * 2799082275u ^ 546262518u); continue; } case 5u: { int num2; arg_23C_0 = (((num2 + 1 >= JsonParser.smethod_14(text)) ? 243075670u : 1690560673u) ^ num * 3537512010u); continue; } case 6u: JsonParser.smethod_26(stringBuilder, '_'); arg_23C_0 = 2742354300u; continue; case 8u: arg_23C_0 = (num * 1195174495u ^ 1809923487u); continue; case 9u: { int num2; arg_23C_0 = (((JsonParser.smethod_15(text, num2 + 1) > 'z') ? 1132507784u : 25457392u) ^ num * 1502253524u); continue; } case 10u: { char c; JsonParser.smethod_26(stringBuilder, c + 'a' - 'A'); arg_23C_0 = 3175761382u; continue; } case 11u: { char c; arg_23C_0 = (((c <= 'Z') ? 3083540943u : 2197215848u) ^ num * 2979711453u); continue; } case 12u: { bool flag2 = false; arg_23C_0 = (num * 2112741697u ^ 2017133496u); continue; } case 13u: { int num2; num2++; arg_23C_0 = 2810480601u; continue; } case 14u: { char c; arg_23C_0 = (((c < 'A') ? 3593171199u : 3129699993u) ^ num * 3794484278u); continue; } case 15u: { bool flag2; arg_23C_0 = (((!flag2) ? 2703065160u : 3981958271u) ^ num * 390337625u); continue; } case 16u: { int num2; char c = JsonParser.smethod_15(text, num2); arg_23C_0 = 3594289208u; continue; } case 17u: { char c; JsonParser.smethod_26(stringBuilder, c); flag = (c != '_'); bool flag2 = true; arg_23C_0 = 4199024311u; continue; } case 18u: arg_23C_0 = (((!flag) ? 1209794314u : 1051599623u) ^ num * 1872829977u); continue; case 19u: goto IL_29A; } goto Block_9; } } Block_9: return JsonParser.smethod_27(stringBuilder); } static JsonParser() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_29A: uint arg_276_0 = 2952191229u; while (true) { uint num; switch ((num = (arg_276_0 ^ 3083703703u)) % 6u) { case 0u: JsonParser.defaultInstance = new JsonParser(JsonParser.Settings.Default); arg_276_0 = (num * 422700756u ^ 1523261254u); continue; case 2u: goto IL_29A; case 3u: { int[] expr_226 = new int[11]; JsonParser.smethod_29(expr_226, fieldof(Google.Protobuf.<PrivateImplementationDetails>.CA6D43393CCBD523D8BC1CAC86DE8DC9F018B896).FieldHandle); JsonParser.SubsecondScalingFactors = expr_226; JsonParser.FieldMaskPathSeparators = new char[] { ',' }; arg_276_0 = (num * 457754209u ^ 825326268u); continue; } case 4u: JsonParser.DurationRegex = JsonParser.smethod_28(Module.smethod_37<string>(2274513912u), FrameworkPortability.CompiledRegexWhereAvailable); arg_276_0 = (num * 3847093214u ^ 3671499966u); continue; case 5u: JsonParser.WellKnownTypeHandlers = new Dictionary<string, Action<JsonParser, IMessage, JsonTokenizer>> { { Timestamp.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_0) }, { Duration.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_1) }, { Value.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_2) }, { ListValue.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_3) }, { Struct.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_4) }, { Any.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_5) }, { FieldMask.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.__c.__9.<.cctor>b__36_6) }, { Int32Value.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { Int64Value.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { UInt32Value.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { UInt64Value.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { FloatValue.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { DoubleValue.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { BytesValue.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) }, { StringValue.Descriptor.FullName, new Action<JsonParser, IMessage, JsonTokenizer>(JsonParser.MergeWrapperField) } }; arg_276_0 = (num * 1561989255u ^ 793254927u); continue; } return; } } } static StringReader smethod_0(string string_0) { return new StringReader(string_0); } static string smethod_1(object object_0, object object_1) { return object_0 + object_1; } static InvalidOperationException smethod_2(string string_0) { return new InvalidOperationException(string_0); } static string smethod_3(string string_0, string string_1) { return string_0 + string_1; } static int smethod_4(IList ilist_0, object object_0) { return ilist_0.Add(object_0); } static void smethod_5(IDictionary idictionary_0, object object_0, object object_1) { idictionary_0[object_0] = object_1; } static bool smethod_6(string string_0, string string_1) { return string_0 == string_1; } static NotImplementedException smethod_7(string string_0) { return new NotImplementedException(string_0); } static string smethod_8(object[] object_0) { return string.Concat(object_0); } static bool smethod_9(string string_0, string string_1) { return string_0 != string_1; } static string smethod_10(string string_0, object[] object_0) { return string.Format(string_0, object_0); } static bool smethod_11(string string_0, string string_1) { return string_0.Contains(string_1); } static string smethod_12(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static bool smethod_13(string string_0, string string_1) { return string_0.StartsWith(string_1); } static int smethod_14(string string_0) { return string_0.Length; } static char smethod_15(string string_0, int int_0) { return string_0[int_0]; } static CultureInfo smethod_16() { return CultureInfo.InvariantCulture; } static Match smethod_17(Regex regex_0, string string_0) { return regex_0.Match(string_0); } static bool smethod_18(Group group_0) { return group_0.Success; } static GroupCollection smethod_19(Match match_0) { return match_0.Groups; } static Group smethod_20(GroupCollection groupCollection_0, string string_0) { return groupCollection_0[string_0]; } static string smethod_21(Capture capture_0) { return capture_0.Value; } static string smethod_22(string string_0, int int_0) { return string_0.Substring(int_0); } static string smethod_23(string string_0, int int_0, int int_1) { return string_0.Substring(int_0, int_1); } static string[] smethod_24(string string_0, char[] char_0, StringSplitOptions stringSplitOptions_0) { return string_0.Split(char_0, stringSplitOptions_0); } static StringBuilder smethod_25(int int_0) { return new StringBuilder(int_0); } static StringBuilder smethod_26(StringBuilder stringBuilder_0, char char_0) { return stringBuilder_0.Append(char_0); } static string smethod_27(object object_0) { return object_0.ToString(); } static Regex smethod_28(string string_0, RegexOptions regexOptions_0) { return new Regex(string_0, regexOptions_0); } static void smethod_29(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } } } <file_sep>/Bgs.Protocol/EntityTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class EntityTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return EntityTypesReflection.descriptor; } } static EntityTypesReflection() { EntityTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(EntityTypesReflection.smethod_1(EntityTypesReflection.smethod_0(new string[] { Module.smethod_35<string>(2034105131u), Module.smethod_36<string>(743907507u), Module.smethod_35<string>(3349147019u), Module.smethod_33<string>(389616488u), Module.smethod_36<string>(732167971u), Module.smethod_33<string>(1207772744u), Module.smethod_36<string>(1901388227u), Module.smethod_34<string>(2437465484u), Module.smethod_33<string>(491709496u), Module.smethod_37<string>(2221847079u), Module.smethod_35<string>(2383946763u) })), new FileDescriptor[] { FieldOptionsReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(EntityTypesReflection.smethod_2(typeof(EntityId).TypeHandle), EntityId.Parser, new string[] { Module.smethod_35<string>(5703631u), Module.smethod_35<string>(1698506485u) }, null, null, null), new GeneratedCodeInfo(EntityTypesReflection.smethod_2(typeof(Identity).TypeHandle), Identity.Parser, new string[] { Module.smethod_36<string>(4043002107u), Module.smethod_33<string>(1846560140u) }, null, null, null), new GeneratedCodeInfo(EntityTypesReflection.smethod_2(typeof(AccountInfo).TypeHandle), AccountInfo.Parser, new string[] { Module.smethod_33<string>(1520609105u), Module.smethod_37<string>(2923017512u), Module.smethod_36<string>(503400800u), Module.smethod_37<string>(1272656u), Module.smethod_34<string>(215450163u), Module.smethod_34<string>(94050184u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/AuthServer.Network/Server.cs using Framework.Constants.Misc; using Framework.Logging; using System; using System.Net; using System.Net.Sockets; using System.Runtime.CompilerServices; using System.Threading.Tasks; namespace AuthServer.Network { internal class Server : IDisposable { private TcpListener listener; private bool isRunning; public Server(string ip, int port, bool alt = false) { IPAddress none; while (true) { IL_91: uint arg_75_0 = 371310205u; while (true) { uint num; switch ((num = (arg_75_0 ^ 1623540390u)) % 4u) { case 0u: goto IL_91; case 2u: Log.Message(LogType.Normal, Module.smethod_35<string>(2570238857u), new object[] { ip }); Server.smethod_1(true); Server.smethod_2(0); arg_75_0 = (num * 1716082200u ^ 2169048995u); continue; case 3u: none = IPAddress.None; arg_75_0 = ((Server.smethod_0(ip, ref none) ? 4282623832u : 2167438799u) ^ num * 2015551441u); continue; } goto Block_2; } } Block_2: try { this.listener = Server.smethod_3(none, port); Server.smethod_4(this.listener); if (this.isRunning = Server.smethod_6(Server.smethod_5(this.listener))) { if (!alt) { Server.smethod_8(Server.smethod_7(), new Action(this.AcceptConnection)); } else { Server.smethod_8(Server.smethod_7(), new Action(this.AcceptRestConnection)); } } } catch (Exception exception_) { Log.Message(LogType.Error, Module.smethod_37<string>(2717862335u), new object[] { Server.smethod_9(exception_) }); } } [AsyncStateMachine(typeof(Server.<AcceptConnection>d__3))] private void AcceptConnection() { Server.<AcceptConnection>d__3 <AcceptConnection>d__; <AcceptConnection>d__.__4__this = this; <AcceptConnection>d__.__t__builder = AsyncVoidMethodBuilder.Create(); <AcceptConnection>d__.__1__state = -1; while (true) { IL_58: uint arg_40_0 = 198740057u; while (true) { uint num; switch ((num = (arg_40_0 ^ 1066125044u)) % 3u) { case 0u: goto IL_58; case 2u: { AsyncVoidMethodBuilder __t__builder = <AcceptConnection>d__.__t__builder; __t__builder.Start<Server.<AcceptConnection>d__3>(ref <AcceptConnection>d__); arg_40_0 = (num * 2693948230u ^ 4271151357u); continue; } } return; } } } [AsyncStateMachine(typeof(Server.<AcceptRestConnection>d__4))] private void AcceptRestConnection() { Server.<AcceptRestConnection>d__4 <AcceptRestConnection>d__; <AcceptRestConnection>d__.__4__this = this; <AcceptRestConnection>d__.__t__builder = AsyncVoidMethodBuilder.Create(); while (true) { IL_6B: uint arg_4F_0 = 1608828269u; while (true) { uint num; switch ((num = (arg_4F_0 ^ 1570516976u)) % 4u) { case 0u: goto IL_6B; case 1u: { <AcceptRestConnection>d__.__1__state = -1; AsyncVoidMethodBuilder __t__builder = <AcceptRestConnection>d__.__t__builder; arg_4F_0 = (num * 1556040183u ^ 1668645385u); continue; } case 2u: { AsyncVoidMethodBuilder __t__builder; __t__builder.Start<Server.<AcceptRestConnection>d__4>(ref <AcceptRestConnection>d__); arg_4F_0 = (num * 1876418357u ^ 882570693u); continue; } } return; } } } public void Dispose() { this.listener = null; this.isRunning = false; } static bool smethod_0(string string_0, ref IPAddress ipaddress_0) { return IPAddress.TryParse(string_0, out ipaddress_0); } static ConsoleKeyInfo smethod_1(bool bool_0) { return Console.ReadKey(bool_0); } static void smethod_2(int int_0) { Environment.Exit(int_0); } static TcpListener smethod_3(IPAddress ipaddress_0, int int_0) { return new TcpListener(ipaddress_0, int_0); } static void smethod_4(TcpListener tcpListener_0) { tcpListener_0.Start(); } static Socket smethod_5(TcpListener tcpListener_0) { return tcpListener_0.Server; } static bool smethod_6(Socket socket_0) { return socket_0.IsBound; } static TaskFactory smethod_7() { return Task.Factory; } static Task smethod_8(TaskFactory taskFactory_0, Action action_0) { return taskFactory_0.StartNew(action_0); } static string smethod_9(Exception exception_0) { return exception_0.Message; } } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmListUpdate.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmListUpdate { [DataMember(Name = "wowRealmAddress")] public uint WowRealmAddress { get; set; } [DataMember(Name = "update")] public Update Update { get; set; } [DataMember(Name = "deleting")] public bool Deleting { get; set; } } } <file_sep>/Google.Protobuf.WellKnownTypes/DurationReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class DurationReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return DurationReflection.descriptor; } } static DurationReflection() { DurationReflection.descriptor = FileDescriptor.FromGeneratedCode(DurationReflection.smethod_1(DurationReflection.smethod_0(new string[] { Module.smethod_37<string>(1135240894u), Module.smethod_35<string>(3024674850u), Module.smethod_34<string>(843999869u), Module.smethod_33<string>(1975178527u), Module.smethod_33<string>(3713584047u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DurationReflection.smethod_2(typeof(Duration).TypeHandle), Duration.Parser, new string[] { Module.smethod_37<string>(4261522036u), Module.smethod_36<string>(2285904943u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf.Reflection/RepeatedFieldAccessor.cs using System; using System.Collections; using System.Reflection; namespace Google.Protobuf.Reflection { internal sealed class RepeatedFieldAccessor : FieldAccessorBase { internal RepeatedFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) : base(property, descriptor) { } public override void Clear(IMessage message) { RepeatedFieldAccessor.smethod_0((IList)base.GetValue(message)); } public override void SetValue(IMessage message, object value) { throw RepeatedFieldAccessor.smethod_1(Module.smethod_37<string>(171503620u)); } static void smethod_0(IList ilist_0) { ilist_0.Clear(); } static InvalidOperationException smethod_1(string string_0) { return new InvalidOperationException(string_0); } } } <file_sep>/AuthServer.AuthServer.JsonObjects/LogonForm.cs using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class LogonForm { public string this[string inputId] { get { string inputId; while (true) { IL_39: uint arg_21_0 = 2210185784u; while (true) { uint num; switch ((num = (arg_21_0 ^ 4171098743u)) % 3u) { case 0u: goto IL_39; case 2u: inputId = inputId2; arg_21_0 = (num * 973501494u ^ 1608863995u); continue; } goto Block_1; } } Block_1: FormInputValue expr_57 = this.Inputs.SingleOrDefault((FormInputValue i) => LogonForm.__c__DisplayClass1_0.smethod_0(i.Id, inputId)); if (expr_57 == null) { return null; } return expr_57.Value; } } [DataMember(Name = "version")] public string Version { get; set; } [DataMember(Name = "program_id")] public string Program { get; set; } [DataMember(Name = "platform_id")] public string Platform { get; set; } [DataMember(Name = "inputs")] public List<FormInputValue> Inputs { get; set; } } } <file_sep>/Google.Protobuf.Reflection/DescriptorReflection.cs using System; using System.Diagnostics; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal static class DescriptorReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return DescriptorReflection.descriptor; } } static DescriptorReflection() { DescriptorReflection.descriptor = FileDescriptor.FromGeneratedCode(DescriptorReflection.smethod_1(DescriptorReflection.smethod_0(new string[] { Module.smethod_36<string>(1133750113u), Module.smethod_36<string>(3865843889u), Module.smethod_33<string>(4011389919u), Module.smethod_37<string>(147719445u), Module.smethod_35<string>(2144082553u), Module.smethod_37<string>(1345641909u), Module.smethod_35<string>(3459124441u), Module.smethod_33<string>(551634098u), Module.smethod_36<string>(1515663841u), Module.smethod_34<string>(3053824082u), Module.smethod_33<string>(3108195874u), Module.smethod_34<string>(2303931186u), Module.smethod_36<string>(4236018081u), Module.smethod_34<string>(2135232157u), Module.smethod_33<string>(1556921151u), Module.smethod_36<string>(928319522u), Module.smethod_35<string>(4052590466u), Module.smethod_35<string>(3395069522u), Module.smethod_36<string>(916579986u), Module.smethod_33<string>(1659014159u), Module.smethod_33<string>(738764895u), Module.smethod_37<string>(347216190u), Module.smethod_36<string>(2873106770u), Module.smethod_33<string>(22701647u), Module.smethod_34<string>(1555895629u), Module.smethod_37<string>(2743061118u), Module.smethod_36<string>(1298493714u), Module.smethod_33<string>(2681356431u), Module.smethod_33<string>(1761107167u), Module.smethod_34<string>(431056285u), Module.smethod_37<string>(1486783918u), Module.smethod_33<string>(1045043919u), Module.smethod_35<string>(2122189954u), Module.smethod_36<string>(2861367234u), Module.smethod_33<string>(1965293183u), Module.smethod_36<string>(117533922u), Module.smethod_37<string>(4087106190u), Module.smethod_36<string>(1286754178u), Module.smethod_36<string>(3636934226u), Module.smethod_36<string>(2074060706u), Module.smethod_36<string>(511187186u), Module.smethod_35<string>(499468754u), Module.smethod_37<string>(4058164590u), Module.smethod_36<string>(3554757474u), Module.smethod_35<string>(3690205762u), Module.smethod_33<string>(838033519u), Module.smethod_33<string>(940126527u), Module.smethod_33<string>(2678532047u), Module.smethod_35<string>(1060121986u), Module.smethod_35<string>(402601042u), Module.smethod_35<string>(1409963618u), Module.smethod_33<string>(1042219535u), Module.smethod_35<string>(2725005506u), Module.smethod_35<string>(2067484562u), Module.smethod_37<string>(1662319662u), Module.smethod_33<string>(3700874319u), Module.smethod_37<string>(2860242126u), Module.smethod_37<string>(113797246u), Module.smethod_33<string>(326156287u), Module.smethod_34<string>(294333629u), Module.smethod_36<string>(2755711410u), Module.smethod_33<string>(2882718063u), Module.smethod_35<string>(2109646882u), Module.smethod_37<string>(406042462u), Module.smethod_36<string>(417270898u), Module.smethod_34<string>(2339622237u), Module.smethod_35<string>(3774530402u), Module.smethod_33<string>(3086904079u), Module.smethod_37<string>(1457842318u), Module.smethod_37<string>(3006364734u), Module.smethod_35<string>(1144446626u), Module.smethod_35<string>(486925682u), Module.smethod_33<string>(530342303u), Module.smethod_36<string>(3531278402u), Module.smethod_37<string>(2071274350u), Module.smethod_37<string>(3619796766u), Module.smethod_36<string>(464229042u), Module.smethod_35<string>(2598518546u), Module.smethod_34<string>(3532129005u), Module.smethod_34<string>(3907075453u), Module.smethod_36<string>(2420755826u), Module.smethod_35<string>(4263402066u), Module.smethod_37<string>(1574551790u), Module.smethod_34<string>(2407289661u), Module.smethod_36<string>(846142770u), Module.smethod_36<string>(3578236546u), Module.smethod_34<string>(532557421u), Module.smethod_34<string>(907503869u), Module.smethod_36<string>(2802669554u), Module.smethod_37<string>(2421874302u), Module.smethod_36<string>(58836242u), Module.smethod_36<string>(2790930018u), Module.smethod_34<string>(2577846029u), Module.smethod_37<string>(1516197054u), Module.smethod_35<string>(1675480610u), Module.smethod_37<string>(2714119518u), Module.smethod_37<string>(2363519566u), Module.smethod_35<string>(2333001554u), Module.smethod_35<string>(3340364130u), Module.smethod_37<string>(4116519326u), Module.smethod_34<string>(3873241741u), Module.smethod_36<string>(47096706u), Module.smethod_34<string>(3123348845u), Module.smethod_35<string>(52759410u), Module.smethod_37<string>(1866797006u), Module.smethod_33<string>(2474346031u), Module.smethod_37<string>(726757742u), Module.smethod_34<string>(3023235517u), Module.smethod_35<string>(263571010u), Module.smethod_33<string>(2071622767u), Module.smethod_35<string>(613412642u), Module.smethod_33<string>(3912121295u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FileDescriptorSet).TypeHandle), FileDescriptorSet.Parser, new string[] { Module.smethod_35<string>(1542966915u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FileDescriptorProto).TypeHandle), FileDescriptorProto.Parser, new string[] { Module.smethod_36<string>(2649665489u), Module.smethod_33<string>(3068851852u), Module.smethod_37<string>(3829225238u), Module.smethod_33<string>(2960201507u), Module.smethod_37<string>(2952695887u), Module.smethod_36<string>(1697472868u), Module.smethod_36<string>(2380496312u), Module.smethod_34<string>(4181851784u), Module.smethod_35<string>(647564994u), Module.smethod_34<string>(796587241u), Module.smethod_35<string>(1822726893u), Module.smethod_35<string>(1485711652u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(DescriptorProto).TypeHandle), DescriptorProto.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_33<string>(3778357763u), Module.smethod_37<string>(3653925262u), Module.smethod_37<string>(3420182137u), Module.smethod_36<string>(2380496312u), Module.smethod_34<string>(2268709666u), Module.smethod_34<string>(1452743525u), Module.smethod_35<string>(1556926582u), Module.smethod_34<string>(3905274903u), Module.smethod_37<string>(1427987117u) }, null, null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(DescriptorProto.Types.ExtensionRange).TypeHandle), DescriptorProto.Types.ExtensionRange.Parser, new string[] { Module.smethod_37<string>(3741575250u), Module.smethod_35<string>(3991291701u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(DescriptorProto.Types.ReservedRange).TypeHandle), DescriptorProto.Types.ReservedRange.Parser, new string[] { Module.smethod_37<string>(3741575250u), Module.smethod_34<string>(1237606934u) }, null, null, null) }), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FieldDescriptorProto).TypeHandle), FieldDescriptorProto.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_36<string>(652736699u), Module.smethod_37<string>(2017752858u), Module.smethod_34<string>(1425080158u), Module.smethod_36<string>(3581657107u), Module.smethod_35<string>(88045038u), Module.smethod_37<string>(323137305u), Module.smethod_34<string>(1518816770u), Module.smethod_34<string>(2078311244u), Module.smethod_37<string>(819830394u) }, null, new Type[] { DescriptorReflection.smethod_2(typeof(FieldDescriptorProto.Types.Type).TypeHandle), DescriptorReflection.smethod_2(typeof(FieldDescriptorProto.Types.Label).TypeHandle) }, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(OneofDescriptorProto).TypeHandle), OneofDescriptorProto.Parser, new string[] { Module.smethod_34<string>(2643656114u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumDescriptorProto).TypeHandle), EnumDescriptorProto.Parser, new string[] { Module.smethod_35<string>(3235769769u), Module.smethod_33<string>(3388245550u), Module.smethod_35<string>(1556926582u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumValueDescriptorProto).TypeHandle), EnumValueDescriptorProto.Parser, new string[] { Module.smethod_33<string>(1982348402u), Module.smethod_34<string>(3338222276u), Module.smethod_34<string>(796587241u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(ServiceDescriptorProto).TypeHandle), ServiceDescriptorProto.Parser, new string[] { Module.smethod_35<string>(3235769769u), Module.smethod_35<string>(2032688536u), Module.smethod_33<string>(2909155003u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(MethodDescriptorProto).TypeHandle), MethodDescriptorProto.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_37<string>(3537068435u), Module.smethod_36<string>(1821956955u), Module.smethod_36<string>(1842157958u), Module.smethod_33<string>(2883221686u), Module.smethod_34<string>(304873769u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FileOptions).TypeHandle), FileOptions.Parser, new string[] { Module.smethod_34<string>(2869539216u), Module.smethod_33<string>(1816094216u), Module.smethod_35<string>(353845349u), Module.smethod_37<string>(2163845995u), Module.smethod_36<string>(2690067495u), Module.smethod_37<string>(3624777365u), Module.smethod_35<string>(3837452045u), Module.smethod_35<string>(451846337u), Module.smethod_36<string>(1810217419u), Module.smethod_36<string>(3714602661u), Module.smethod_35<string>(983446959u), Module.smethod_33<string>(3100522376u), Module.smethod_36<string>(1487391468u), Module.smethod_33<string>(4187025826u), Module.smethod_33<string>(1304513015u), Module.smethod_37<string>(4092263615u) }, null, new Type[] { DescriptorReflection.smethod_2(typeof(FileOptions.Types.OptimizeMode).TypeHandle) }, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(MessageOptions).TypeHandle), MessageOptions.Parser, new string[] { Module.smethod_37<string>(440082545u), Module.smethod_36<string>(2296414231u), Module.smethod_36<string>(3859287751u), Module.smethod_33<string>(537403263u), Module.smethod_35<string>(1892808547u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FieldOptions).TypeHandle), FieldOptions.Parser, new string[] { Module.smethod_37<string>(1258168747u), Module.smethod_33<string>(2678739639u), Module.smethod_35<string>(1886575529u), Module.smethod_37<string>(3449477389u), Module.smethod_37<string>(2631391187u), Module.smethod_36<string>(693138705u), Module.smethod_35<string>(1892808547u) }, null, new Type[] { DescriptorReflection.smethod_2(typeof(FieldOptions.Types.CType).TypeHandle), DescriptorReflection.smethod_2(typeof(FieldOptions.Types.JSType).TypeHandle) }, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumOptions).TypeHandle), EnumOptions.Parser, new string[] { Module.smethod_33<string>(2454881612u), Module.smethod_33<string>(4040147620u), Module.smethod_35<string>(1892808547u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumValueOptions).TypeHandle), EnumValueOptions.Parser, new string[] { Module.smethod_34<string>(1182280200u), Module.smethod_33<string>(3605546240u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(ServiceOptions).TypeHandle), ServiceOptions.Parser, new string[] { Module.smethod_36<string>(3859287751u), Module.smethod_37<string>(4092263615u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(MethodOptions).TypeHandle), MethodOptions.Parser, new string[] { Module.smethod_33<string>(4040147620u), Module.smethod_37<string>(4092263615u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(UninterpretedOption).TypeHandle), UninterpretedOption.Parser, new string[] { Module.smethod_36<string>(2649665489u), Module.smethod_33<string>(2020280232u), Module.smethod_33<string>(3432734717u), Module.smethod_33<string>(3106783682u), Module.smethod_37<string>(673825670u), Module.smethod_34<string>(1904509729u), Module.smethod_36<string>(3497575026u) }, null, null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(UninterpretedOption.Types.NamePart).TypeHandle), UninterpretedOption.Types.NamePart.Parser, new string[] { Module.smethod_36<string>(154800351u), Module.smethod_33<string>(2838436488u) }, null, null, null) }), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(SourceCodeInfo).TypeHandle), SourceCodeInfo.Parser, new string[] { Module.smethod_37<string>(2280791235u) }, null, null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(SourceCodeInfo.Types.Location).TypeHandle), SourceCodeInfo.Types.Location.Parser, new string[] { Module.smethod_36<string>(1934701506u), Module.smethod_35<string>(4201253344u), Module.smethod_34<string>(967143609u), Module.smethod_33<string>(281874712u), Module.smethod_35<string>(3061737428u) }, null, null, null) }) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Channel.V1/MemberAddedNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class MemberAddedNotification : IMessage<MemberAddedNotification>, IEquatable<MemberAddedNotification>, IDeepCloneable<MemberAddedNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MemberAddedNotification.__c __9 = new MemberAddedNotification.__c(); internal MemberAddedNotification cctor>b__34_0() { return new MemberAddedNotification(); } } private static readonly MessageParser<MemberAddedNotification> _parser = new MessageParser<MemberAddedNotification>(new Func<MemberAddedNotification>(MemberAddedNotification.__c.__9.<.cctor>b__34_0)); public const int MemberFieldNumber = 1; private Member member_; public const int ChannelIdFieldNumber = 2; private ChannelId channelId_; public const int SubscriberFieldNumber = 3; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<MemberAddedNotification> Parser { get { return MemberAddedNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return MemberAddedNotification.Descriptor; } } public Member Member { get { return this.member_; } set { this.member_ = value; } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public MemberAddedNotification() { } public MemberAddedNotification(MemberAddedNotification other) : this() { this.Member = ((other.member_ != null) ? other.Member.Clone() : null); this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); } public MemberAddedNotification Clone() { return new MemberAddedNotification(this); } public override bool Equals(object other) { return this.Equals(other as MemberAddedNotification); } public bool Equals(MemberAddedNotification other) { if (other == null) { goto IL_18; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ 1533611482) % 11) { case 0: arg_A9_0 = (MemberAddedNotification.smethod_0(this.Subscriber, other.Subscriber) ? 46133594 : 707468399); continue; case 1: arg_A9_0 = ((!MemberAddedNotification.smethod_0(this.ChannelId, other.ChannelId)) ? 557997668 : 1425387198); continue; case 2: arg_A9_0 = ((!MemberAddedNotification.smethod_0(this.Member, other.Member)) ? 618990945 : 1765819806); continue; case 3: return false; case 4: goto IL_EF; case 5: return false; case 6: return false; case 7: return true; case 8: goto IL_18; case 9: return false; } break; } return true; IL_18: arg_A9_0 = 1775740181; goto IL_A4; IL_EF: arg_A9_0 = ((other != this) ? 252285046 : 1769004587); goto IL_A4; } public override int GetHashCode() { int num = 1; while (true) { IL_D3: uint arg_AB_0 = 2077789464u; while (true) { uint num2; switch ((num2 = (arg_AB_0 ^ 1174281642u)) % 7u) { case 0u: num ^= MemberAddedNotification.smethod_1(this.Subscriber); arg_AB_0 = (num2 * 718853340u ^ 3692257163u); continue; case 2u: num ^= MemberAddedNotification.smethod_1(this.ChannelId); arg_AB_0 = (num2 * 1757864615u ^ 58965338u); continue; case 3u: num ^= MemberAddedNotification.smethod_1(this.Member); arg_AB_0 = (num2 * 2868112783u ^ 3331570128u); continue; case 4u: arg_AB_0 = ((this.subscriber_ != null) ? 1858209540u : 547117571u); continue; case 5u: goto IL_D3; case 6u: arg_AB_0 = (((this.channelId_ != null) ? 4069526385u : 2607438247u) ^ num2 * 3202859645u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Member); while (true) { IL_D0: uint arg_AC_0 = 3513504741u; while (true) { uint num; switch ((num = (arg_AC_0 ^ 2895812550u)) % 6u) { case 0u: output.WriteRawTag(26); output.WriteMessage(this.Subscriber); arg_AC_0 = (num * 921948124u ^ 1290254u); continue; case 1u: arg_AC_0 = (((this.channelId_ == null) ? 608910251u : 1868802766u) ^ num * 4229159804u); continue; case 2u: output.WriteRawTag(18); output.WriteMessage(this.ChannelId); arg_AC_0 = (num * 1848568900u ^ 771360943u); continue; case 3u: goto IL_D0; case 5u: arg_AC_0 = ((this.subscriber_ == null) ? 3541223782u : 4055719472u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_DC: uint arg_B4_0 = 3640397830u; while (true) { uint num2; switch ((num2 = (arg_B4_0 ^ 3945076312u)) % 7u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Member); arg_B4_0 = (num2 * 1712964770u ^ 3089516395u); continue; case 2u: goto IL_DC; case 3u: arg_B4_0 = ((this.subscriber_ != null) ? 4037542319u : 4045404783u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_B4_0 = (num2 * 166281661u ^ 1477481012u); continue; case 5u: arg_B4_0 = (((this.channelId_ != null) ? 3232400555u : 2788419020u) ^ num2 * 878493235u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_B4_0 = (num2 * 2012999360u ^ 998359281u); continue; } return num; } } return num; } public void MergeFrom(MemberAddedNotification other) { if (other == null) { goto IL_C3; } goto IL_1E5; uint arg_18D_0; while (true) { IL_188: uint num; switch ((num = (arg_18D_0 ^ 1319591666u)) % 15u) { case 0u: this.member_ = new Member(); arg_18D_0 = (num * 513765745u ^ 3953961151u); continue; case 1u: this.Member.MergeFrom(other.Member); arg_18D_0 = 1414945342u; continue; case 2u: this.ChannelId.MergeFrom(other.ChannelId); arg_18D_0 = 50737661u; continue; case 3u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_18D_0 = (num * 3105225569u ^ 2495558334u); continue; case 4u: arg_18D_0 = ((other.subscriber_ == null) ? 1883164846u : 1195098748u); continue; case 5u: this.channelId_ = new ChannelId(); arg_18D_0 = (num * 1040430986u ^ 3696425375u); continue; case 6u: this.Subscriber.MergeFrom(other.Subscriber); arg_18D_0 = 1883164846u; continue; case 7u: goto IL_C3; case 8u: arg_18D_0 = (((this.member_ != null) ? 3763478407u : 3622071546u) ^ num * 2214325143u); continue; case 9u: return; case 10u: arg_18D_0 = ((other.channelId_ == null) ? 50737661u : 537036923u); continue; case 11u: arg_18D_0 = (((this.channelId_ == null) ? 3546628651u : 4273215806u) ^ num * 4213991145u); continue; case 12u: goto IL_1E5; case 13u: arg_18D_0 = (((this.subscriber_ != null) ? 1657776720u : 2045810268u) ^ num * 67586844u); continue; } break; } return; IL_C3: arg_18D_0 = 1691933054u; goto IL_188; IL_1E5: arg_18D_0 = ((other.member_ == null) ? 1414945342u : 1619126985u); goto IL_188; } public void MergeFrom(CodedInputStream input) { while (true) { IL_213: uint num; uint arg_1B3_0 = ((num = input.ReadTag()) != 0u) ? 3468496682u : 3907821269u; while (true) { uint num2; switch ((num2 = (arg_1B3_0 ^ 3897418749u)) % 17u) { case 0u: arg_1B3_0 = (num2 * 3927589285u ^ 1072216709u); continue; case 1u: input.ReadMessage(this.member_); arg_1B3_0 = 4069411431u; continue; case 2u: arg_1B3_0 = (((num != 18u) ? 2877221832u : 2816599336u) ^ num2 * 1884852145u); continue; case 4u: arg_1B3_0 = ((this.channelId_ != null) ? 3330168374u : 4040116913u); continue; case 5u: input.ReadMessage(this.channelId_); arg_1B3_0 = 3560493255u; continue; case 6u: input.ReadMessage(this.subscriber_); arg_1B3_0 = 3560493255u; continue; case 7u: arg_1B3_0 = ((this.subscriber_ == null) ? 2554994584u : 2788412162u); continue; case 8u: this.channelId_ = new ChannelId(); arg_1B3_0 = (num2 * 3197043908u ^ 240949254u); continue; case 9u: arg_1B3_0 = 3468496682u; continue; case 10u: arg_1B3_0 = ((this.member_ == null) ? 4020427349u : 4212407390u); continue; case 11u: input.SkipLastField(); arg_1B3_0 = (num2 * 992035768u ^ 2361158591u); continue; case 12u: this.member_ = new Member(); arg_1B3_0 = (num2 * 1947066124u ^ 887895998u); continue; case 13u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_1B3_0 = (num2 * 644874501u ^ 73898491u); continue; case 14u: goto IL_213; case 15u: arg_1B3_0 = ((num != 10u) ? 2890022853u : 2933749913u); continue; case 16u: arg_1B3_0 = (((num == 26u) ? 2707673094u : 2470552871u) ^ num2 * 3998649631u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Managers/ComponentManager.cs using Framework.Database.Auth.Entities; using Framework.Misc; using System; using System.Collections.Generic; namespace AuthServer.Managers { internal class ComponentManager : Singleton<ComponentManager> { public readonly List<Component> ComponentList; private ComponentManager() { while (true) { IL_56: uint arg_3A_0 = 2201085066u; while (true) { uint num; switch ((num = (arg_3A_0 ^ 3426134644u)) % 4u) { case 0u: goto IL_56; case 2u: this.ComponentList = new List<Component>(); arg_3A_0 = (num * 1962598982u ^ 3047614479u); continue; case 3u: this.UpdateComponents(); arg_3A_0 = (num * 793442269u ^ 2768301186u); continue; } return; } } } private void UpdateComponents() { this.ComponentList.Add(new Component { Program = Module.smethod_34<string>(2034649298u), Platform = Module.smethod_34<string>(1166338410u), Build = 37165 }); this.ComponentList.Add(new Component { Program = Module.smethod_37<string>(1549176181u), Platform = Module.smethod_36<string>(3397942751u), Build = 37165 }); this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(810534065u), Platform = Module.smethod_35<string>(1507037613u), Build = 37165 }); while (true) { IL_348: uint arg_320_0 = 1460973133u; while (true) { uint num; switch ((num = (arg_320_0 ^ 2036024312u)) % 7u) { case 0u: this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(4080966195u), Platform = Module.smethod_37<string>(2367262383u), Build = 20740 }); arg_320_0 = (num * 424936345u ^ 514104224u); continue; case 2u: this.ComponentList.Add(new Component { Program = Module.smethod_37<string>(2279612395u), Platform = Module.smethod_36<string>(3397942751u), Build = 20740 }); arg_320_0 = (num * 2746381852u ^ 4005667328u); continue; case 3u: this.ComponentList.Add(new Component { Program = Module.smethod_33<string>(3055332232u), Platform = Module.smethod_33<string>(3272632922u), Build = 20365 }); this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(4080966195u), Platform = Module.smethod_35<string>(975436991u), Build = 20740 }); this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(4080966195u), Platform = Module.smethod_37<string>(1636826169u), Build = 20740 }); arg_320_0 = (num * 1376767305u ^ 642481958u); continue; case 4u: this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(4080966195u), Platform = Module.smethod_33<string>(4141835682u), Build = 20740 }); arg_320_0 = (num * 2675135237u ^ 3124647892u); continue; case 5u: goto IL_348; case 6u: this.ComponentList.Add(new Component { Program = Module.smethod_37<string>(2191962407u), Platform = Module.smethod_37<string>(2892985485u), Build = 20740 }); this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(4080966195u), Platform = Module.smethod_37<string>(731089979u), Build = 20740 }); this.ComponentList.Add(new Component { Program = Module.smethod_33<string>(933371836u), Platform = Module.smethod_36<string>(2605452825u), Build = 20740 }); arg_320_0 = (num * 1684039673u ^ 1973202353u); continue; } goto Block_1; } } Block_1: this.ComponentList.Add(new Component { Program = Module.smethod_36<string>(1835069231u), Platform = Module.smethod_34<string>(2315859134u), Build = 20740 }); } } } <file_sep>/Google.Protobuf/JsonFormatter.cs using Google.Protobuf.Reflection; using Google.Protobuf.WellKnownTypes; using System; using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; namespace Google.Protobuf { [ComVisible(true)] public sealed class JsonFormatter { public sealed class Settings { public static JsonFormatter.Settings Default { [CompilerGenerated] get { return JsonFormatter.Settings.<Default>k__BackingField; } } public bool FormatDefaultValues { [CompilerGenerated] get { return this.<FormatDefaultValues>k__BackingField; } } public TypeRegistry TypeRegistry { [CompilerGenerated] get { return this.<TypeRegistry>k__BackingField; } } static Settings() { JsonFormatter.Settings.<Default>k__BackingField = new JsonFormatter.Settings(false); } public Settings(bool formatDefaultValues) : this(formatDefaultValues, TypeRegistry.Empty) { } public Settings(bool formatDefaultValues, TypeRegistry typeRegistry) { while (true) { IL_39: uint arg_21_0 = 337738775u; while (true) { uint num; switch ((num = (arg_21_0 ^ 867835497u)) % 3u) { case 0u: goto IL_39; case 1u: this.<FormatDefaultValues>k__BackingField = formatDefaultValues; arg_21_0 = (num * 911724236u ^ 3093297566u); continue; } goto Block_1; } } Block_1: this.<TypeRegistry>k__BackingField = Preconditions.CheckNotNull<TypeRegistry>(typeRegistry, Module.smethod_34<string>(3473407542u)); } } internal const string AnyTypeUrlField = "@type"; internal const string AnyDiagnosticValueField = "@value"; internal const string AnyWellKnownTypeValueField = "value"; private const string TypeUrlPrefix = "type.googleapis.com"; private const string NameValueSeparator = ": "; private const string PropertySeparator = ", "; private static readonly JsonFormatter diagnosticFormatter; private static readonly string[] CommonRepresentations; private readonly JsonFormatter.Settings settings; private const string Hex = "0123456789abcdef"; public static JsonFormatter Default { [CompilerGenerated] get { return JsonFormatter.<Default>k__BackingField; } } static JsonFormatter() { JsonFormatter.<Default>k__BackingField = new JsonFormatter(JsonFormatter.Settings.Default); while (true) { IL_882: uint arg_84D_0 = 2105186147u; while (true) { uint num; switch ((num = (arg_84D_0 ^ 234456420u)) % 10u) { case 0u: { int num2; arg_84D_0 = (JsonFormatter.smethod_0(JsonFormatter.CommonRepresentations[num2], "") ? 720579340u : 12377199u); continue; } case 1u: { int num2; arg_84D_0 = ((num2 < JsonFormatter.CommonRepresentations.Length) ? 364004868u : 1489577538u); continue; } case 2u: { int num2; JsonFormatter.CommonRepresentations[num2] = ((char)num2).ToString(); arg_84D_0 = (num * 3338840995u ^ 866146391u); continue; } case 3u: JsonFormatter.diagnosticFormatter = new JsonFormatter(JsonFormatter.Settings.Default); arg_84D_0 = (num * 3340594438u ^ 4021155467u); continue; case 5u: goto IL_882; case 6u: arg_84D_0 = (num * 1015052829u ^ 3531897317u); continue; case 7u: { int num2; num2++; arg_84D_0 = 141203301u; continue; } case 8u: { int num2 = 0; arg_84D_0 = (num * 120494982u ^ 3077917624u); continue; } case 9u: JsonFormatter.CommonRepresentations = new string[] { Module.smethod_35<string>(3735484591u), Module.smethod_36<string>(1127891634u), Module.smethod_36<string>(3787642865u), Module.smethod_33<string>(1601913941u), Module.smethod_36<string>(2763107699u), Module.smethod_35<string>(1525040782u), Module.smethod_37<string>(25233657u), Module.smethod_36<string>(589553280u), Module.smethod_36<string>(517210735u), Module.smethod_36<string>(175699013u), Module.smethod_34<string>(2250255420u), Module.smethod_35<string>(3861404913u), Module.smethod_33<string>(2573209709u), Module.smethod_37<string>(1456899246u), Module.smethod_36<string>(2939733328u), Module.smethod_35<string>(2266603047u), Module.smethod_35<string>(965520826u), Module.smethod_33<string>(3116461434u), Module.smethod_34<string>(309449935u), Module.smethod_34<string>(1312889300u), Module.smethod_34<string>(2316328665u), Module.smethod_35<string>(3301884957u), Module.smethod_34<string>(403186547u), Module.smethod_33<string>(3282715620u), Module.smethod_37<string>(2654821710u), Module.smethod_35<string>(3707565257u), Module.smethod_33<string>(4260568725u), Module.smethod_33<string>(3717317000u), Module.smethod_33<string>(4043268035u), Module.smethod_35<string>(2140682725u), Module.smethod_34<string>(3760787723u), Module.smethod_34<string>(844206240u), "", "", Module.smethod_35<string>(1623041770u), "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", Module.smethod_37<string>(2012035484u), "", Module.smethod_34<string>(3826860968u), "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", Module.smethod_34<string>(535333037u), "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", Module.smethod_33<string>(502295817u), Module.smethod_36<string>(1292777727u), Module.smethod_37<string>(4232521494u), Module.smethod_33<string>(1480148922u), Module.smethod_36<string>(3414190604u), Module.smethod_34<string>(4108070804u), Module.smethod_37<string>(1573726602u), Module.smethod_33<string>(3653155822u), Module.smethod_36<string>(2731167160u), Module.smethod_34<string>(3076968072u), Module.smethod_33<string>(1972354143u), Module.smethod_37<string>(3735828405u), Module.smethod_33<string>(2624256213u), Module.smethod_34<string>(3170704684u), Module.smethod_37<string>(2596349090u), Module.smethod_36<string>(1923659629u), Module.smethod_36<string>(971467008u), Module.smethod_34<string>(3639387744u), Module.smethod_36<string>(2875852250u), Module.smethod_35<string>(2896204657u), Module.smethod_37<string>(229740472u), Module.smethod_34<string>(2233338564u), Module.smethod_35<string>(2728405334u), Module.smethod_33<string>(278437790u), Module.smethod_34<string>(1323635811u), Module.smethod_36<string>(3052477879u), Module.smethod_36<string>(734238370u), Module.smethod_37<string>(2187305989u), Module.smethod_34<string>(1792318871u), Module.smethod_35<string>(1553243435u), Module.smethod_35<string>(252161214u), Module.smethod_36<string>(1148092637u), Module.smethod_34<string>(386269691u) }; arg_84D_0 = (num * 2032237027u ^ 2587709937u); continue; } return; } } } public JsonFormatter(JsonFormatter.Settings settings) { this.settings = settings; } public string Format(IMessage message) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_37<string>(1018619835u)); StringBuilder stringBuilder = JsonFormatter.smethod_1(); if (message.Descriptor.IsWellKnownType) { goto IL_53; } goto IL_7D; uint arg_5D_0; while (true) { IL_58: uint num; switch ((num = (arg_5D_0 ^ 1893909843u)) % 5u) { case 0u: goto IL_53; case 2u: goto IL_7D; case 3u: arg_5D_0 = (num * 3650264944u ^ 2709657310u); continue; case 4u: this.WriteWellKnownTypeValue(stringBuilder, message.Descriptor, message, false); arg_5D_0 = (num * 572768486u ^ 1430449262u); continue; } break; } return JsonFormatter.smethod_2(stringBuilder); IL_53: arg_5D_0 = 326038624u; goto IL_58; IL_7D: this.WriteMessage(stringBuilder, message); arg_5D_0 = 448933710u; goto IL_58; } public static string ToDiagnosticString(IMessage message) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_33<string>(879293356u)); return JsonFormatter.diagnosticFormatter.Format(message); } private void WriteMessage(StringBuilder builder, IMessage message) { if (message == null) { goto IL_03; } goto IL_42; uint arg_22_0; while (true) { IL_1D: uint num; switch ((num = (arg_22_0 ^ 1191668176u)) % 5u) { case 0u: return; case 1u: JsonFormatter.WriteNull(builder); arg_22_0 = (num * 3769227776u ^ 1774658636u); continue; case 3u: goto IL_03; case 4u: goto IL_42; } break; } bool flag; JsonFormatter.smethod_3(builder, flag ? Module.smethod_33<string>(553342321u) : Module.smethod_37<string>(2801062202u)); return; IL_03: arg_22_0 = 353656167u; goto IL_1D; IL_42: JsonFormatter.smethod_3(builder, Module.smethod_33<string>(1205244391u)); flag = this.WriteMessageFields(builder, message, false); arg_22_0 = 781025262u; goto IL_1D; } private bool WriteMessageFields(StringBuilder builder, IMessage message, bool assumeFirstFieldWritten) { MessageDescriptor.FieldCollection arg_10_0 = message.Descriptor.Fields; bool flag = !assumeFirstFieldWritten; IEnumerator<FieldDescriptor> enumerator = arg_10_0.InFieldNumberOrder().GetEnumerator(); try { while (true) { IL_2DC: uint arg_277_0 = (!JsonFormatter.smethod_4(enumerator)) ? 1402409953u : 165060205u; while (true) { uint num; switch ((num = (arg_277_0 ^ 1026981942u)) % 18u) { case 0u: goto IL_2DC; case 1u: { IFieldAccessor accessor; this.WriteString(builder, JsonFormatter.ToCamelCase(accessor.Descriptor.Name)); arg_277_0 = 2158668u; continue; } case 2u: JsonFormatter.smethod_3(builder, Module.smethod_35<string>(1861489385u)); arg_277_0 = (num * 1604822745u ^ 4165754308u); continue; case 3u: { FieldDescriptor current; arg_277_0 = (((current.ContainingOneof == null) ? 3993627330u : 4061494123u) ^ num * 2698464613u); continue; } case 4u: { FieldDescriptor current; arg_277_0 = ((current.IsMap ? 557618324u : 1346986289u) ^ num * 3523831294u); continue; } case 5u: arg_277_0 = 165060205u; continue; case 6u: { FieldDescriptor current; arg_277_0 = (((current.ContainingOneof.Accessor.GetCaseFieldDescriptor(message) == current) ? 1639784039u : 1485527544u) ^ num * 102455092u); continue; } case 7u: arg_277_0 = ((this.settings.FormatDefaultValues ? 3114586957u : 2496116398u) ^ num * 366372929u); continue; case 8u: { object value; this.WriteValue(builder, value); arg_277_0 = (num * 706076324u ^ 2679077334u); continue; } case 9u: { IFieldAccessor accessor; object value = accessor.GetValue(message); FieldDescriptor current; arg_277_0 = ((current.ContainingOneof == null) ? 1199652783u : 1019682452u); continue; } case 10u: arg_277_0 = ((!flag) ? 728559882u : 177645191u); continue; case 11u: { IFieldAccessor accessor; object value; arg_277_0 = ((JsonFormatter.IsDefaultValue(accessor, value) ? 3374691353u : 2561747861u) ^ num * 2582743489u); continue; } case 12u: JsonFormatter.smethod_3(builder, Module.smethod_33<string>(770643011u)); arg_277_0 = (num * 3177800768u ^ 2732923271u); continue; case 13u: { FieldDescriptor current = enumerator.Current; IFieldAccessor accessor = current.Accessor; arg_277_0 = 1838540119u; continue; } case 14u: flag = false; arg_277_0 = (num * 1748852978u ^ 4087060504u); continue; case 16u: { FieldDescriptor current; arg_277_0 = ((!current.IsRepeated) ? 43422670u : 1297104004u); continue; } case 17u: { object value; arg_277_0 = (((!this.CanWriteSingleValue(value)) ? 79996240u : 617027788u) ^ num * 3622050552u); continue; } } goto Block_12; } } Block_12:; } finally { if (enumerator != null) { while (true) { IL_322: uint arg_309_0 = 806593370u; while (true) { uint num; switch ((num = (arg_309_0 ^ 1026981942u)) % 3u) { case 0u: goto IL_322; case 1u: JsonFormatter.smethod_5(enumerator); arg_309_0 = (num * 1467593674u ^ 3772019397u); continue; } goto Block_16; } } Block_16:; } } return !flag; } internal static string ToCamelCase(string input) { bool flag = false; bool flag2 = true; bool flag3 = false; bool flag4 = true; StringBuilder stringBuilder; while (true) { IL_375: uint arg_2FF_0 = 206191107u; while (true) { uint num; switch ((num = (arg_2FF_0 ^ 1595978530u)) % 26u) { case 0u: arg_2FF_0 = (flag ? 1603620348u : 2116974277u); continue; case 1u: arg_2FF_0 = (num * 921501118u ^ 2646579005u); continue; case 2u: { int num2; flag3 = char.IsUpper(JsonFormatter.smethod_8(input, num2)); arg_2FF_0 = ((JsonFormatter.smethod_8(input, num2) != '_') ? 2014014175u : 1522825025u); continue; } case 3u: stringBuilder = JsonFormatter.smethod_7(JsonFormatter.smethod_6(input)); arg_2FF_0 = (num * 3404772411u ^ 3836015716u); continue; case 5u: { int num2; arg_2FF_0 = ((num2 >= JsonFormatter.smethod_6(input)) ? 129582978u : 1556003292u); continue; } case 6u: flag2 = flag3; arg_2FF_0 = (num * 3401987335u ^ 3236208019u); continue; case 7u: arg_2FF_0 = (((!(JsonFormatter.smethod_9(stringBuilder) != 0 & flag3)) ? 1074442757u : 1398498653u) ^ num * 1659372825u); continue; case 8u: { int num2; JsonFormatter.smethod_10(stringBuilder, char.ToUpperInvariant(JsonFormatter.smethod_8(input, num2))); arg_2FF_0 = (num * 1223792315u ^ 4255231802u); continue; } case 9u: flag4 = false; arg_2FF_0 = 124173991u; continue; case 10u: { int num2; arg_2FF_0 = (((!char.IsLower(JsonFormatter.smethod_8(input, num2 + 1))) ? 1610385050u : 872322695u) ^ num * 1535989244u); continue; } case 11u: { int num2 = 0; arg_2FF_0 = (num * 876724130u ^ 3224443425u); continue; } case 12u: arg_2FF_0 = (num * 481699166u ^ 3413616311u); continue; case 13u: { int num2; num2++; arg_2FF_0 = 1241253698u; continue; } case 14u: arg_2FF_0 = ((flag2 ? 3299883306u : 3839360487u) ^ num * 4167389073u); continue; case 15u: arg_2FF_0 = (num * 453685883u ^ 3547237922u); continue; case 16u: { int num2; arg_2FF_0 = (((num2 + 1 >= JsonFormatter.smethod_6(input)) ? 1237449138u : 1995674580u) ^ num * 3175157116u); continue; } case 17u: flag = true; arg_2FF_0 = (num * 3244509933u ^ 5483590u); continue; case 18u: arg_2FF_0 = (num * 708484385u ^ 3542515945u); continue; case 19u: flag4 = false; arg_2FF_0 = (num * 1710123292u ^ 65179576u); continue; case 20u: { int num2; JsonFormatter.smethod_10(stringBuilder, char.ToLowerInvariant(JsonFormatter.smethod_8(input, num2))); arg_2FF_0 = 802972479u; continue; } case 21u: arg_2FF_0 = (flag4 ? 286125421u : 1997697216u); continue; case 22u: { flag = false; int num2; arg_2FF_0 = ((char.IsLower(JsonFormatter.smethod_8(input, num2)) ? 102838578u : 10531385u) ^ num * 2992309858u); continue; } case 23u: arg_2FF_0 = (((JsonFormatter.smethod_9(stringBuilder) == 0) ? 1531264032u : 2039260088u) ^ num * 3332678773u); continue; case 24u: goto IL_375; case 25u: { int num2; JsonFormatter.smethod_10(stringBuilder, JsonFormatter.smethod_8(input, num2)); arg_2FF_0 = 802972479u; continue; } } goto Block_11; } } Block_11: return JsonFormatter.smethod_2(stringBuilder); } private static void WriteNull(StringBuilder builder) { JsonFormatter.smethod_3(builder, Module.smethod_37<string>(2976185352u)); } private static bool IsDefaultValue(IFieldAccessor accessor, object value) { if (accessor.Descriptor.IsMap) { goto IL_80; } goto IL_F9; uint arg_99_0; while (true) { IL_94: uint num; switch ((num = (arg_99_0 ^ 4280658443u)) % 17u) { case 0u: goto IL_139; case 1u: goto IL_18B; case 2u: goto IL_14B; case 3u: goto IL_10B; case 4u: goto IL_19C; case 5u: goto IL_16B; case 6u: goto IL_175; case 7u: arg_99_0 = (num * 3683522956u ^ 3727520145u); continue; case 8u: goto IL_11A; case 9u: goto IL_159; case 11u: goto IL_1A6; case 12u: goto IL_F9; case 13u: goto IL_80; case 14u: goto IL_186; case 15u: goto IL_1B8; case 16u: switch (accessor.Descriptor.FieldType) { case FieldType.Double: goto IL_139; case FieldType.Float: goto IL_14B; case FieldType.Int64: case FieldType.SFixed64: case FieldType.SInt64: goto IL_1A6; case FieldType.UInt64: case FieldType.Fixed64: goto IL_159; case FieldType.Int32: case FieldType.SFixed32: case FieldType.SInt32: case FieldType.Enum: goto IL_1B8; case FieldType.Fixed32: case FieldType.UInt32: goto IL_19C; case FieldType.Bool: goto IL_16B; case FieldType.String: goto IL_175; case FieldType.Group: case FieldType.Message: goto IL_186; case FieldType.Bytes: goto IL_18B; default: arg_99_0 = 4078190519u; continue; } break; } break; } goto IL_129; IL_10B: return JsonFormatter.smethod_11((IList)value) == 0; IL_11A: return JsonFormatter.smethod_11((IDictionary)value) == 0; IL_129: throw JsonFormatter.smethod_12(Module.smethod_37<string>(3706621566u)); IL_139: return (double)value == 0.0; IL_14B: return (float)value == 0f; IL_159: return (ulong)value == 0uL; IL_16B: return !(bool)value; IL_175: return JsonFormatter.smethod_0((string)value, ""); IL_186: return value == null; IL_18B: return (ByteString)value == ByteString.Empty; IL_19C: return (uint)value == 0u; IL_1A6: return (long)value == 0L; IL_1B8: return (int)value == 0; IL_80: arg_99_0 = 3224821924u; goto IL_94; IL_F9: arg_99_0 = (accessor.Descriptor.IsRepeated ? 3955385819u : 2280332705u); goto IL_94; } private void WriteValue(StringBuilder builder, object value) { if (value == null) { goto IL_3D0; } goto IL_514; uint arg_443_0; IMessage message; while (true) { IL_43E: uint num; switch ((num = (arg_443_0 ^ 1621593297u)) % 45u) { case 0u: { IFormattable iformattable_; JsonFormatter.smethod_3(builder, JsonFormatter.smethod_14(iformattable_, Module.smethod_37<string>(463483597u), JsonFormatter.smethod_13())); JsonFormatter.smethod_10(builder, '"'); arg_443_0 = (num * 1120607371u ^ 1237620014u); continue; } case 1u: { string string_; arg_443_0 = ((JsonFormatter.smethod_0(string_, Module.smethod_33<string>(2067889814u)) ? 1470280542u : 1344471735u) ^ num * 3801585783u); continue; } case 2u: goto IL_3D0; case 3u: JsonFormatter.smethod_10(builder, '"'); arg_443_0 = 675135676u; continue; case 4u: { string string_; JsonFormatter.smethod_3(builder, string_); arg_443_0 = 1962219002u; continue; } case 5u: JsonFormatter.smethod_10(builder, '"'); arg_443_0 = 285065u; continue; case 6u: { string string_; JsonFormatter.smethod_3(builder, string_); arg_443_0 = (num * 2637677370u ^ 484980000u); continue; } case 7u: { string string_ = JsonFormatter.smethod_14((IFormattable)value, Module.smethod_37<string>(2830180628u), JsonFormatter.smethod_13()); arg_443_0 = 2014343763u; continue; } case 8u: arg_443_0 = ((value is IList) ? 562811476u : 580610538u); continue; case 9u: return; case 10u: arg_443_0 = (((!(value is ulong)) ? 894267377u : 2111319714u) ^ num * 2039564499u); continue; case 11u: arg_443_0 = ((value is IMessage) ? 612800465u : 780826631u); continue; case 12u: { string string_; arg_443_0 = (((!JsonFormatter.smethod_0(string_, Module.smethod_36<string>(1747034000u))) ? 789481878u : 1261914176u) ^ num * 2487908142u); continue; } case 13u: return; case 14u: return; case 15u: arg_443_0 = ((message.Descriptor.IsWellKnownType ? 3939740412u : 2493888616u) ^ num * 2958175161u); continue; case 16u: { IFormattable iformattable_2 = (IFormattable)value; JsonFormatter.smethod_3(builder, JsonFormatter.smethod_14(iformattable_2, Module.smethod_36<string>(3197162969u), JsonFormatter.smethod_13())); arg_443_0 = 938862962u; continue; } case 17u: goto IL_524; case 18u: this.WriteString(builder, (string)value); arg_443_0 = (num * 3748833977u ^ 3700612484u); continue; case 19u: arg_443_0 = ((!(value is float)) ? 1392691437u : 1811379471u); continue; case 20u: goto IL_514; case 21u: { string string_; arg_443_0 = (((!JsonFormatter.smethod_0(string_, Module.smethod_36<string>(3040738343u))) ? 2083151485u : 747813150u) ^ num * 3475292503u); continue; } case 22u: this.WriteString(builder, JsonFormatter.smethod_2(value)); arg_443_0 = (num * 134500564u ^ 3861462201u); continue; case 23u: arg_443_0 = ((!(value is string)) ? 2137321841u : 113335327u); continue; case 24u: return; case 25u: return; case 27u: arg_443_0 = ((value is System.Enum) ? 1354778316u : 969072339u); continue; case 28u: goto IL_567; case 29u: arg_443_0 = (((value is uint) ? 3782599111u : 3277769563u) ^ num * 779659031u); continue; case 30u: goto IL_575; case 31u: arg_443_0 = ((!(value is IDictionary)) ? 281656066u : 961388721u); continue; case 32u: this.WriteMessage(builder, (IMessage)value); arg_443_0 = 1501640264u; continue; case 33u: goto IL_585; case 34u: return; case 35u: { IFormattable iformattable_ = (IFormattable)value; arg_443_0 = (num * 884156031u ^ 613677387u); continue; } case 36u: this.WriteList(builder, (IList)value); arg_443_0 = (num * 1369545683u ^ 1933103671u); continue; case 37u: goto IL_590; case 38u: message = (IMessage)value; arg_443_0 = (num * 3377440258u ^ 549686281u); continue; case 39u: arg_443_0 = ((value is int) ? 1147142102u : 496046534u); continue; case 40u: arg_443_0 = ((value is ByteString) ? 958105146u : 746957512u); continue; case 41u: arg_443_0 = ((!(value is long)) ? 1056076373u : 14796910u); continue; case 42u: goto IL_597; case 43u: return; case 44u: arg_443_0 = (((value is double) ? 1158894087u : 1118235386u) ^ num * 426890782u); continue; } break; } goto IL_54C; IL_524: JsonFormatter.smethod_3(builder, ((bool)value) ? Module.smethod_36<string>(3538674691u) : Module.smethod_34<string>(1042425975u)); return; IL_54C: throw JsonFormatter.smethod_12(JsonFormatter.smethod_16(Module.smethod_35<string>(4267368532u), JsonFormatter.smethod_15(value))); IL_567: this.WriteDictionary(builder, (IDictionary)value); return; IL_575: this.WriteWellKnownTypeValue(builder, message.Descriptor, value, true); return; IL_585: JsonFormatter.smethod_10(builder, '"'); return; IL_590: JsonFormatter.WriteNull(builder); return; IL_597: JsonFormatter.smethod_10(builder, '"'); JsonFormatter.smethod_3(builder, ((ByteString)value).ToBase64()); JsonFormatter.smethod_10(builder, '"'); return; IL_3D0: arg_443_0 = 1786467716u; goto IL_43E; IL_514: arg_443_0 = ((!(value is bool)) ? 1455669594u : 1677959900u); goto IL_43E; } private void WriteWellKnownTypeValue(StringBuilder builder, MessageDescriptor descriptor, object value, bool inField) { if (value == null) { goto IL_1BC; } goto IL_388; uint arg_2F8_0; while (true) { IL_2F3: uint num; switch ((num = (arg_2F8_0 ^ 4090170974u)) % 29u) { case 0u: return; case 1u: JsonFormatter.WriteNull(builder); arg_2F8_0 = (num * 1877992003u ^ 2773682643u); continue; case 2u: arg_2F8_0 = (JsonFormatter.smethod_0(descriptor.FullName, Timestamp.Descriptor.FullName) ? 3217486200u : 3574881537u); continue; case 3u: this.MaybeWrapInString(builder, value, new Action<StringBuilder, IMessage>(this.WriteDuration), inField); arg_2F8_0 = (num * 1829125597u ^ 3222558612u); continue; case 4u: goto IL_396; case 5u: this.WriteStruct(builder, (IMessage)value); arg_2F8_0 = (num * 3774375972u ^ 556406196u); continue; case 6u: arg_2F8_0 = (((value is IMessage) ? 1912902122u : 582492792u) ^ num * 2564002733u); continue; case 7u: arg_2F8_0 = (JsonFormatter.smethod_0(descriptor.FullName, Any.Descriptor.FullName) ? 3536211615u : 3571490622u); continue; case 8u: this.WriteMessage(builder, (IMessage)value); arg_2F8_0 = 4077993154u; continue; case 9u: return; case 10u: return; case 11u: goto IL_388; case 12u: arg_2F8_0 = (JsonFormatter.smethod_0(descriptor.FullName, Duration.Descriptor.FullName) ? 3268657528u : 3448284902u); continue; case 13u: goto IL_1BC; case 14u: return; case 15u: { IFieldAccessor accessor; this.WriteList(builder, (IList)accessor.GetValue((IMessage)value)); arg_2F8_0 = (num * 2611565836u ^ 2501006461u); continue; } case 16u: { IMessage message = (IMessage)value; value = message.Descriptor.Fields[1].Accessor.GetValue(message); arg_2F8_0 = (num * 3798110305u ^ 2388251596u); continue; } case 17u: goto IL_3A7; case 18u: return; case 19u: arg_2F8_0 = (JsonFormatter.smethod_0(descriptor.FullName, ListValue.Descriptor.FullName) ? 4208204463u : 2536632612u); continue; case 21u: arg_2F8_0 = (JsonFormatter.smethod_0(descriptor.FullName, Value.Descriptor.FullName) ? 3288729026u : 4209721692u); continue; case 22u: return; case 23u: { IFieldAccessor accessor = descriptor.Fields[1].Accessor; arg_2F8_0 = (num * 1635729332u ^ 795913930u); continue; } case 24u: this.MaybeWrapInString(builder, value, new Action<StringBuilder, IMessage>(this.WriteFieldMask), inField); arg_2F8_0 = (num * 3076190033u ^ 1309081541u); continue; case 25u: arg_2F8_0 = ((!JsonFormatter.smethod_0(descriptor.FullName, Struct.Descriptor.FullName)) ? 3703239507u : 2834781220u); continue; case 26u: arg_2F8_0 = ((!JsonFormatter.smethod_0(descriptor.FullName, FieldMask.Descriptor.FullName)) ? 3068033736u : 2240089743u); continue; case 27u: goto IL_3B8; case 28u: this.MaybeWrapInString(builder, value, new Action<StringBuilder, IMessage>(this.WriteTimestamp), inField); arg_2F8_0 = (num * 2100669825u ^ 2573983994u); continue; } break; } return; IL_396: this.WriteStructFieldValue(builder, (IMessage)value); return; IL_3A7: this.WriteAny(builder, (IMessage)value); return; IL_3B8: this.WriteValue(builder, value); return; IL_1BC: arg_2F8_0 = 2577887678u; goto IL_2F3; IL_388: arg_2F8_0 = (descriptor.IsWrapperType ? 3493451338u : 2533086339u); goto IL_2F3; } private void MaybeWrapInString(StringBuilder builder, object value, Action<StringBuilder, IMessage> action, bool inField) { if (inField) { goto IL_2B; } goto IL_71; uint arg_4D_0; while (true) { IL_48: uint num; switch ((num = (arg_4D_0 ^ 1284980570u)) % 6u) { case 0u: JsonFormatter.smethod_10(builder, '"'); arg_4D_0 = (num * 1954168205u ^ 746514839u); continue; case 2u: goto IL_2B; case 3u: JsonFormatter.smethod_10(builder, '"'); action(builder, (IMessage)value); arg_4D_0 = (num * 3070723735u ^ 4181027863u); continue; case 4u: goto IL_71; case 5u: return; } break; } return; IL_2B: arg_4D_0 = 271489915u; goto IL_48; IL_71: action(builder, (IMessage)value); arg_4D_0 = 1770649979u; goto IL_48; } private void WriteTimestamp(StringBuilder builder, IMessage value) { int nanoseconds = (int)value.Descriptor.Fields[2].Accessor.GetValue(value); while (true) { IL_DD: uint arg_BD_0 = 1940827272u; while (true) { uint num; switch ((num = (arg_BD_0 ^ 1468087769u)) % 5u) { case 0u: goto IL_DD; case 1u: { Timestamp timestamp; JsonFormatter.AppendNanoseconds(builder, Math.Abs(timestamp.Nanos)); builder.Append('Z'); arg_BD_0 = (num * 3455065510u ^ 1115450730u); continue; } case 2u: { DateTime dateTime; builder.Append(dateTime.ToString(Module.smethod_33<string>(3806295334u), JsonFormatter.smethod_13())); arg_BD_0 = (num * 1009534176u ^ 525238786u); continue; } case 4u: { Timestamp timestamp = Timestamp.Normalize((long)value.Descriptor.Fields[1].Accessor.GetValue(value), nanoseconds); DateTime dateTime = timestamp.ToDateTime(); arg_BD_0 = (num * 3588276034u ^ 1685304037u); continue; } } return; } } } private void WriteDuration(StringBuilder builder, IMessage value) { int nanoseconds = (int)value.Descriptor.Fields[2].Accessor.GetValue(value); while (true) { IL_13F: uint arg_117_0 = 4253338763u; while (true) { uint num; switch ((num = (arg_117_0 ^ 2255544103u)) % 7u) { case 0u: goto IL_13F; case 1u: { Duration duration; arg_117_0 = (((duration.Nanos >= 0) ? 3724940179u : 2907188943u) ^ num * 1078750781u); continue; } case 2u: JsonFormatter.smethod_10(builder, '-'); arg_117_0 = (num * 2905510713u ^ 469180835u); continue; case 3u: { Duration duration; builder.Append(duration.Seconds.ToString(Module.smethod_34<string>(4146480682u), JsonFormatter.smethod_13())); JsonFormatter.AppendNanoseconds(builder, Math.Abs(duration.Nanos)); builder.Append('s'); arg_117_0 = 3210663445u; continue; } case 5u: { Duration duration = Duration.Normalize((long)value.Descriptor.Fields[1].Accessor.GetValue(value), nanoseconds); arg_117_0 = (num * 802476659u ^ 1779589909u); continue; } case 6u: { Duration duration; arg_117_0 = (((duration.Seconds == 0L) ? 1033999782u : 709844870u) ^ num * 1922538178u); continue; } } return; } } } private void WriteFieldMask(StringBuilder builder, IMessage value) { IList source = (IList)value.Descriptor.Fields[1].Accessor.GetValue(value); while (true) { IL_7B: uint arg_63_0 = 374105818u; while (true) { uint num; switch ((num = (arg_63_0 ^ 690287539u)) % 3u) { case 1u: this.AppendEscapedString(builder, JsonFormatter.smethod_17(Module.smethod_35<string>(3357156987u), source.Cast<string>().Select(new Func<string, string>(JsonFormatter.ToCamelCase)))); arg_63_0 = (num * 3001847033u ^ 2578035016u); continue; case 2u: goto IL_7B; } return; } } } private void WriteAny(StringBuilder builder, IMessage value) { if (this == JsonFormatter.diagnosticFormatter) { goto IL_123; } goto IL_22E; uint arg_1D8_0; string text; string typeName; ByteString data; while (true) { IL_1D3: uint num; switch ((num = (arg_1D8_0 ^ 2944959968u)) % 18u) { case 0u: JsonFormatter.smethod_3(builder, Module.smethod_36<string>(2189550737u)); arg_1D8_0 = (num * 2502956005u ^ 315454798u); continue; case 1u: this.WriteString(builder, Module.smethod_34<string>(264869712u)); arg_1D8_0 = (num * 2227417492u ^ 1566934416u); continue; case 2u: JsonFormatter.smethod_3(builder, Module.smethod_33<string>(1205244391u)); arg_1D8_0 = (num * 229784025u ^ 1737445429u); continue; case 3u: goto IL_22E; case 4u: { MessageDescriptor messageDescriptor; arg_1D8_0 = ((messageDescriptor.IsWellKnownType ? 940325233u : 382285410u) ^ num * 1420331474u); continue; } case 6u: this.WriteString(builder, text); arg_1D8_0 = (num * 2231002834u ^ 497954846u); continue; case 7u: goto IL_123; case 8u: { MessageDescriptor messageDescriptor; IMessage message; this.WriteWellKnownTypeValue(builder, messageDescriptor, message, true); arg_1D8_0 = (num * 2850913905u ^ 1569957665u); continue; } case 9u: this.WriteString(builder, Module.smethod_36<string>(1095253436u)); arg_1D8_0 = (num * 3488007177u ^ 3626640480u); continue; case 10u: { IMessage message; this.WriteMessageFields(builder, message, true); arg_1D8_0 = 3120906837u; continue; } case 11u: JsonFormatter.smethod_3(builder, Module.smethod_37<string>(2625673813u)); arg_1D8_0 = (num * 1893406148u ^ 1239828248u); continue; case 12u: { typeName = JsonFormatter.GetTypeName(text); MessageDescriptor messageDescriptor = this.settings.TypeRegistry.Find(typeName); arg_1D8_0 = (((messageDescriptor == null) ? 1883758825u : 634719812u) ^ num * 3697141193u); continue; } case 13u: return; case 14u: { MessageDescriptor messageDescriptor; IMessage message = messageDescriptor.Parser.ParseFrom(data); arg_1D8_0 = 4184464822u; continue; } case 15u: goto IL_28E; case 16u: this.WriteDiagnosticOnlyAny(builder, value); arg_1D8_0 = (num * 1942897562u ^ 2064551389u); continue; case 17u: JsonFormatter.smethod_3(builder, Module.smethod_33<string>(770643011u)); arg_1D8_0 = (num * 2989998736u ^ 3277770459u); continue; } break; } JsonFormatter.smethod_3(builder, Module.smethod_34<string>(573742915u)); return; IL_28E: throw JsonFormatter.smethod_19(JsonFormatter.smethod_18(Module.smethod_37<string>(1193978753u), new object[] { typeName })); IL_123: arg_1D8_0 = 2335350580u; goto IL_1D3; IL_22E: text = (string)value.Descriptor.Fields[1].Accessor.GetValue(value); data = (ByteString)value.Descriptor.Fields[2].Accessor.GetValue(value); arg_1D8_0 = 3794430646u; goto IL_1D3; } private void WriteDiagnosticOnlyAny(StringBuilder builder, IMessage value) { string text = (string)value.Descriptor.Fields[1].Accessor.GetValue(value); while (true) { IL_15F: uint arg_133_0 = 2392209720u; while (true) { uint num; switch ((num = (arg_133_0 ^ 3870517497u)) % 8u) { case 0u: goto IL_15F; case 1u: { ByteString byteString = (ByteString)value.Descriptor.Fields[2].Accessor.GetValue(value); JsonFormatter.smethod_3(builder, Module.smethod_35<string>(1315362458u)); arg_133_0 = (num * 966451833u ^ 3477661149u); continue; } case 2u: JsonFormatter.smethod_3(builder, Module.smethod_35<string>(1861489385u)); arg_133_0 = (num * 1105940164u ^ 2594348938u); continue; case 3u: { JsonFormatter.smethod_10(builder, '"'); ByteString byteString; JsonFormatter.smethod_3(builder, byteString.ToBase64()); arg_133_0 = (num * 1041690270u ^ 2219002669u); continue; } case 4u: this.WriteString(builder, text); JsonFormatter.smethod_3(builder, Module.smethod_35<string>(2224724046u)); this.WriteString(builder, Module.smethod_36<string>(525672202u)); arg_133_0 = (num * 3124114611u ^ 822621031u); continue; case 5u: this.WriteString(builder, Module.smethod_36<string>(2843911711u)); arg_133_0 = (num * 2535852553u ^ 586824779u); continue; case 7u: JsonFormatter.smethod_3(builder, Module.smethod_37<string>(2625673813u)); arg_133_0 = (num * 1835877891u ^ 3038523408u); continue; } goto Block_1; } } Block_1: JsonFormatter.smethod_10(builder, '"'); JsonFormatter.smethod_3(builder, Module.smethod_37<string>(4261757804u)); } internal static string GetTypeName(string typeUrl) { string[] array = JsonFormatter.smethod_20(typeUrl, new char[] { '/' }); if (array.Length == 2) { while (true) { IL_72: uint arg_56_0 = 3151831623u; while (true) { uint num; switch ((num = (arg_56_0 ^ 4074557162u)) % 4u) { case 0u: goto IL_72; case 1u: arg_56_0 = (((!JsonFormatter.smethod_21(array[0], Module.smethod_36<string>(3185423433u))) ? 1688608980u : 1554082005u) ^ num * 2836047921u); continue; case 2u: goto IL_79; } goto Block_3; } } Block_3: return array[1]; } IL_79: throw new InvalidProtocolBufferException(JsonFormatter.smethod_18(Module.smethod_36<string>(3330108523u), new object[] { typeUrl })); } private static void AppendNanoseconds(StringBuilder builder, int nanos) { if (nanos != 0) { while (true) { IL_EA: uint arg_BE_0 = 2755904108u; while (true) { uint num; switch ((num = (arg_BE_0 ^ 4246923664u)) % 8u) { case 0u: goto IL_EA; case 1u: return; case 3u: builder.Append((nanos / 1000).ToString(Module.smethod_34<string>(4146480682u), CultureInfo.InvariantCulture)); arg_BE_0 = (num * 2836589119u ^ 1569229996u); continue; case 4u: JsonFormatter.smethod_10(builder, '.'); arg_BE_0 = (((nanos % 1000000 == 0) ? 1498919302u : 1130443669u) ^ num * 4250277154u); continue; case 5u: arg_BE_0 = ((nanos % 1000 != 0) ? 3081477135u : 2598399651u); continue; case 6u: goto IL_F2; case 7u: builder.Append(nanos.ToString(Module.smethod_34<string>(4146480682u), CultureInfo.InvariantCulture)); arg_BE_0 = 3212650194u; continue; } goto Block_4; } } Block_4: return; IL_F2: builder.Append((nanos / 1000000).ToString(Module.smethod_35<string>(266120881u), JsonFormatter.smethod_13())); return; } } private void WriteStruct(StringBuilder builder, IMessage message) { JsonFormatter.smethod_3(builder, Module.smethod_37<string>(3531321590u)); IDictionary arg_34_0 = (IDictionary)message.Descriptor.Fields[1].Accessor.GetValue(message); bool flag = true; IDictionaryEnumerator dictionaryEnumerator = JsonFormatter.smethod_22(arg_34_0); try { while (true) { IL_1E7: uint arg_192_0 = (!dictionaryEnumerator.MoveNext()) ? 4229945257u : 2952868706u; while (true) { uint num; switch ((num = (arg_192_0 ^ 2580031324u)) % 14u) { case 0u: arg_192_0 = ((!flag) ? 3702602805u : 2791664705u); continue; case 1u: { string text; arg_192_0 = ((string.IsNullOrEmpty(text) ? 813358995u : 3145148u) ^ num * 3875071783u); continue; } case 2u: goto IL_1F4; case 3u: { string text; this.WriteString(builder, text); arg_192_0 = 4269558113u; continue; } case 4u: { DictionaryEntry dictionaryEntry = (DictionaryEntry)JsonFormatter.smethod_23(dictionaryEnumerator); arg_192_0 = 2724570036u; continue; } case 5u: builder.Append(Module.smethod_37<string>(2625673813u)); arg_192_0 = (num * 2747275843u ^ 327982255u); continue; case 6u: arg_192_0 = 2952868706u; continue; case 8u: goto IL_1E7; case 9u: flag = false; arg_192_0 = (num * 2129621272u ^ 1202167034u); continue; case 10u: { DictionaryEntry dictionaryEntry; string text = (string)dictionaryEntry.Key; IMessage message2 = (IMessage)dictionaryEntry.Value; arg_192_0 = (num * 3751823832u ^ 1855786393u); continue; } case 11u: { IMessage message2; arg_192_0 = (((message2 == null) ? 1939098143u : 1225008165u) ^ num * 651841765u); continue; } case 12u: { IMessage message2; this.WriteStructFieldValue(builder, message2); arg_192_0 = (num * 1911013297u ^ 1059866813u); continue; } case 13u: builder.Append(Module.smethod_37<string>(697226722u)); arg_192_0 = (num * 1842344663u ^ 367209326u); continue; } goto Block_7; } } Block_7: goto IL_204; IL_1F4: throw new InvalidOperationException(Module.smethod_35<string>(2322725034u)); IL_204:; } finally { IDisposable disposable = dictionaryEnumerator as IDisposable; while (true) { IL_26D: uint arg_250_0 = 4267085182u; while (true) { uint num; switch ((num = (arg_250_0 ^ 2580031324u)) % 4u) { case 1u: disposable.Dispose(); arg_250_0 = (num * 1362292923u ^ 740849479u); continue; case 2u: arg_250_0 = (((disposable != null) ? 3932733553u : 3302698384u) ^ num * 3209670766u); continue; case 3u: goto IL_26D; } goto Block_11; } } Block_11:; } builder.Append(flag ? Module.smethod_33<string>(718184315u) : Module.smethod_35<string>(531921192u)); } private void WriteStructFieldValue(StringBuilder builder, IMessage message) { FieldDescriptor caseFieldDescriptor = message.Descriptor.Oneofs[0].Accessor.GetCaseFieldDescriptor(message); if (caseFieldDescriptor == null) { goto IL_4E; } goto IL_FD; uint arg_BB_0; IMessage message2; object value; while (true) { IL_B6: uint num; switch ((num = (arg_BB_0 ^ 1183245376u)) % 13u) { case 0u: goto IL_A9; case 1u: { int fieldNumber; switch (fieldNumber) { case 1: goto IL_55; case 2: case 3: case 4: goto IL_A9; case 5: case 6: goto IL_25; default: arg_BB_0 = (num * 761499672u ^ 1029049007u); continue; } break; } case 2u: { int fieldNumber = caseFieldDescriptor.FieldNumber; arg_BB_0 = (num * 1799281849u ^ 342414610u); continue; } case 4u: goto IL_131; case 5u: goto IL_55; case 6u: goto IL_4E; case 7u: return; case 8u: return; case 9u: goto IL_143; case 10u: arg_BB_0 = (num * 1723709832u ^ 772204564u); continue; case 11u: goto IL_25; case 12u: goto IL_FD; } break; IL_25: message2 = (IMessage)caseFieldDescriptor.Accessor.GetValue(message); arg_BB_0 = 429340318u; continue; IL_55: JsonFormatter.WriteNull(builder); arg_BB_0 = 1183295375u; continue; IL_A9: this.WriteValue(builder, value); arg_BB_0 = 1204574075u; } throw JsonFormatter.smethod_19(JsonFormatter.smethod_16(Module.smethod_33<string>(2821884892u), caseFieldDescriptor.FieldNumber)); IL_131: throw JsonFormatter.smethod_19(Module.smethod_37<string>(2041301265u)); IL_143: this.WriteWellKnownTypeValue(builder, message2.Descriptor, message2, true); return; IL_4E: arg_BB_0 = 1569912375u; goto IL_B6; IL_FD: value = caseFieldDescriptor.Accessor.GetValue(message); arg_BB_0 = 1377419097u; goto IL_B6; } internal void WriteList(StringBuilder builder, IList list) { JsonFormatter.smethod_3(builder, Module.smethod_34<string>(678226038u)); bool flag = true; IEnumerator enumerator = JsonFormatter.smethod_24(list); try { while (true) { IL_109: uint arg_CD_0 = JsonFormatter.smethod_4(enumerator) ? 1962729465u : 438768879u; while (true) { uint num; switch ((num = (arg_CD_0 ^ 785520532u)) % 8u) { case 0u: goto IL_109; case 1u: JsonFormatter.smethod_3(builder, Module.smethod_34<string>(2674358257u)); arg_CD_0 = (num * 331944329u ^ 2404039570u); continue; case 2u: arg_CD_0 = ((flag ? 3031902911u : 2911374385u) ^ num * 2185536370u); continue; case 4u: flag = false; arg_CD_0 = (num * 662842544u ^ 1992362164u); continue; case 5u: { object value = JsonFormatter.smethod_23(enumerator); arg_CD_0 = (this.CanWriteSingleValue(value) ? 1774570422u : 205099124u); continue; } case 6u: arg_CD_0 = 1962729465u; continue; case 7u: { object value; this.WriteValue(builder, value); arg_CD_0 = 850942128u; continue; } } goto Block_6; } } Block_6:; } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { while (true) { IL_156: uint arg_13D_0 = 511921399u; while (true) { uint num; switch ((num = (arg_13D_0 ^ 785520532u)) % 3u) { case 0u: goto IL_156; case 1u: JsonFormatter.smethod_5(disposable); arg_13D_0 = (num * 3749246981u ^ 3467009229u); continue; } goto Block_10; } } Block_10:; } } JsonFormatter.smethod_3(builder, flag ? Module.smethod_33<string>(815132178u) : Module.smethod_36<string>(2554541531u)); } internal void WriteDictionary(StringBuilder builder, IDictionary dictionary) { JsonFormatter.smethod_3(builder, Module.smethod_33<string>(1205244391u)); bool flag; while (true) { IL_41: uint arg_28_0 = 1877896257u; while (true) { uint num; switch ((num = (arg_28_0 ^ 1706756498u)) % 3u) { case 0u: goto IL_41; case 2u: flag = true; arg_28_0 = (num * 2005849876u ^ 855307335u); continue; } goto Block_1; } } Block_1: IDictionaryEnumerator dictionaryEnumerator = JsonFormatter.smethod_22(dictionary); try { DictionaryEntry dictionaryEntry; while (true) { IL_3BB: uint arg_33A_0 = dictionaryEnumerator.MoveNext() ? 1239589536u : 1696484136u; while (true) { uint num; string text; string arg_A6_0; switch ((num = (arg_33A_0 ^ 1706756498u)) % 25u) { case 0u: goto IL_3C8; case 1u: arg_33A_0 = ((dictionaryEntry.Key is string) ? 1469448581u : 551450587u); continue; case 2u: builder.Append(Module.smethod_36<string>(2783308702u)); arg_33A_0 = (num * 1127247588u ^ 1667832443u); continue; case 3u: builder.Append(Module.smethod_36<string>(2189550737u)); this.WriteValue(builder, dictionaryEntry.Value); arg_33A_0 = (num * 2949434496u ^ 2299761527u); continue; case 4u: text = ((IFormattable)dictionaryEntry.Key).ToString(Module.smethod_34<string>(4146480682u), CultureInfo.InvariantCulture); arg_33A_0 = 2037932184u; continue; case 5u: arg_33A_0 = (num * 3685257922u ^ 2478047566u); continue; case 6u: arg_33A_0 = ((!(dictionaryEntry.Key is int)) ? 1761283116u : 1474877148u); continue; case 7u: arg_33A_0 = (((!(dictionaryEntry.Key is uint | dictionaryEntry.Key is long)) ? 154128754u : 602943044u) ^ num * 308279604u); continue; case 8u: arg_33A_0 = (num * 797594830u ^ 3688723238u); continue; case 9u: dictionaryEntry = (DictionaryEntry)JsonFormatter.smethod_23(dictionaryEnumerator); arg_33A_0 = 877786491u; continue; case 10u: arg_33A_0 = (num * 84442549u ^ 3932133283u); continue; case 11u: arg_33A_0 = (((dictionaryEntry.Key is ulong) ? 1149477556u : 752474327u) ^ num * 1359419299u); continue; case 12u: flag = false; arg_33A_0 = (num * 2848758122u ^ 827214974u); continue; case 13u: arg_33A_0 = 1239589536u; continue; case 14u: if (!(bool)dictionaryEntry.Key) { arg_33A_0 = (num * 2841398597u ^ 1800827696u); continue; } arg_A6_0 = Module.smethod_36<string>(3538674691u); goto IL_A6; case 15u: arg_33A_0 = ((this.CanWriteSingleValue(dictionaryEntry.Value) ? 3310036630u : 2342237269u) ^ num * 3756831377u); continue; case 16u: text = (string)dictionaryEntry.Key; arg_33A_0 = (num * 1712387202u ^ 1559269433u); continue; case 17u: goto IL_3BB; case 18u: arg_33A_0 = (((!flag) ? 3815661299u : 3344577367u) ^ num * 1263165256u); continue; case 19u: arg_33A_0 = ((!(dictionaryEntry.Key is bool)) ? 1494067161u : 733728343u); continue; case 20u: goto IL_3E9; case 21u: arg_A6_0 = Module.smethod_36<string>(878923460u); goto IL_A6; case 23u: this.WriteString(builder, text); arg_33A_0 = 1987575248u; continue; case 24u: arg_33A_0 = ((dictionaryEntry.Key != null) ? 1891803265u : 77108712u); continue; } goto Block_14; IL_A6: text = arg_A6_0; arg_33A_0 = 1245927648u; } } Block_14: goto IL_3F9; IL_3C8: throw new ArgumentException(Module.smethod_36<string>(4262100141u) + dictionaryEntry.Key.GetType()); IL_3E9: throw new ArgumentException(Module.smethod_36<string>(505471199u)); IL_3F9:; } finally { IDisposable disposable = dictionaryEnumerator as IDisposable; while (true) { IL_462: uint arg_445_0 = 1343691655u; while (true) { uint num; switch ((num = (arg_445_0 ^ 1706756498u)) % 4u) { case 0u: disposable.Dispose(); arg_445_0 = (num * 1187453380u ^ 976489128u); continue; case 1u: arg_445_0 = (((disposable != null) ? 3944150536u : 4224579894u) ^ num * 43037206u); continue; case 3u: goto IL_462; } goto Block_18; } } Block_18:; } builder.Append(flag ? Module.smethod_33<string>(718184315u) : Module.smethod_37<string>(4261757804u)); } private bool CanWriteSingleValue(object value) { return !(value is System.Enum) || JsonFormatter.smethod_25(JsonFormatter.smethod_15(value), value); } private void WriteString(StringBuilder builder, string text) { JsonFormatter.smethod_10(builder, '"'); while (true) { IL_46: uint arg_2E_0 = 1434834133u; while (true) { uint num; switch ((num = (arg_2E_0 ^ 85713705u)) % 3u) { case 0u: goto IL_46; case 2u: this.AppendEscapedString(builder, text); JsonFormatter.smethod_10(builder, '"'); arg_2E_0 = (num * 236353829u ^ 1758264799u); continue; } return; } } } private void AppendEscapedString(StringBuilder builder, string text) { int num = 0; while (true) { IL_5F1: uint arg_530_0 = 1846827121u; while (true) { uint num2; char c; switch ((num2 = (arg_530_0 ^ 378675745u)) % 45u) { case 0u: arg_530_0 = (num2 * 1769404686u ^ 282958495u); continue; case 1u: { uint num3; switch (num3) { case 65529u: case 65530u: case 65531u: goto IL_4AA; default: arg_530_0 = (num2 * 4030455468u ^ 6638233u); continue; } break; } case 2u: arg_530_0 = ((c < '') ? 1758744393u : 1794591867u); continue; case 3u: arg_530_0 = (num2 * 1984689094u ^ 1756000179u); continue; case 4u: JsonFormatter.smethod_10(builder, c); arg_530_0 = 204809859u; continue; case 5u: goto IL_4AA; case 6u: arg_530_0 = (num2 * 505053412u ^ 1146458224u); continue; case 7u: JsonFormatter.HexEncodeUtf16CodeUnit(builder, c); arg_530_0 = 204809859u; continue; case 8u: arg_530_0 = (((c > '؃') ? 126242925u : 1978267055u) ^ num2 * 2823460072u); continue; case 9u: arg_530_0 = (((c <= '‮') ? 1420906855u : 1943137000u) ^ num2 * 126858580u); continue; case 10u: arg_530_0 = (num2 * 2923135211u ^ 2267758429u); continue; case 11u: num++; arg_530_0 = (num2 * 1701426663u ^ 2716447437u); continue; case 12u: { uint num3; arg_530_0 = (((num3 != 6069u) ? 743885276u : 1102580079u) ^ num2 * 156084174u); continue; } case 13u: arg_530_0 = ((c >= '⁠') ? 1293798222u : 351757129u); continue; case 14u: num++; arg_530_0 = 626622256u; continue; case 15u: arg_530_0 = (num2 * 3234385929u ^ 219499013u); continue; case 16u: arg_530_0 = (((!char.IsLowSurrogate(JsonFormatter.smethod_8(text, num))) ? 294549374u : 1967959459u) ^ num2 * 779020898u); continue; case 17u: { uint num3; arg_530_0 = ((num3 <= 6069u) ? 112513670u : 878161075u); continue; } case 18u: { uint num3; arg_530_0 = (((num3 == 1807u) ? 1944286232u : 906072978u) ^ num2 * 1414208657u); continue; } case 19u: goto IL_5F1; case 20u: arg_530_0 = (((c > '') ? 3148994109u : 2706491755u) ^ num2 * 195023842u); continue; case 21u: { uint num3; arg_530_0 = (((num3 == 173u) ? 1925607482u : 1760918748u) ^ num2 * 1616589227u); continue; } case 22u: arg_530_0 = ((!char.IsLowSurrogate(c)) ? 911407970u : 1936909389u); continue; case 23u: JsonFormatter.smethod_3(builder, JsonFormatter.CommonRepresentations[(int)c]); arg_530_0 = (num2 * 2286699068u ^ 1552861794u); continue; case 25u: JsonFormatter.HexEncodeUtf16CodeUnit(builder, JsonFormatter.smethod_8(text, num)); arg_530_0 = (num2 * 38600255u ^ 662416119u); continue; case 26u: arg_530_0 = (((num != JsonFormatter.smethod_6(text)) ? 399278843u : 2016153571u) ^ num2 * 2716759789u); continue; case 27u: arg_530_0 = (((c >= '\u00a0') ? 335218729u : 1796577537u) ^ num2 * 3480010470u); continue; case 28u: arg_530_0 = ((c < '؀') ? 6026717u : 10830991u); continue; case 29u: arg_530_0 = (num2 * 3643996886u ^ 1141154257u); continue; case 30u: arg_530_0 = ((c < '​') ? 1196350279u : 248682042u); continue; case 31u: goto IL_5FB; case 32u: { uint num3; arg_530_0 = (((num3 == 1757u) ? 1101543879u : 810387022u) ^ num2 * 3935811525u); continue; } case 33u: JsonFormatter.HexEncodeUtf16CodeUnit(builder, c); arg_530_0 = 1623761411u; continue; case 34u: arg_530_0 = ((num < JsonFormatter.smethod_6(text)) ? 459812831u : 1775182443u); continue; case 35u: c = JsonFormatter.smethod_8(text, num); arg_530_0 = 350165194u; continue; case 36u: goto IL_60B; case 37u: arg_530_0 = ((c >= '\u2028') ? 1643367623u : 1431628688u); continue; case 38u: arg_530_0 = (((c <= '⁤') ? 3531448517u : 3032388499u) ^ num2 * 3308678086u); continue; case 39u: { uint num3; arg_530_0 = ((num3 == 65279u) ? 282558471u : 302954218u); continue; } case 40u: arg_530_0 = (((c <= '‏') ? 1774472964u : 1556005980u) ^ num2 * 3162960129u); continue; case 41u: { uint num3; arg_530_0 = (((num3 == 6068u) ? 2107133309u : 1709396087u) ^ num2 * 156478454u); continue; } case 42u: arg_530_0 = ((!char.IsHighSurrogate(c)) ? 1389434594u : 1388112344u); continue; case 43u: { uint num3 = (uint)c; arg_530_0 = ((num3 <= 1807u) ? 2134994838u : 1682343479u); continue; } case 44u: arg_530_0 = (num2 * 1644279278u ^ 351349603u); continue; } goto Block_26; IL_4AA: JsonFormatter.HexEncodeUtf16CodeUnit(builder, c); arg_530_0 = 521086641u; } } Block_26: return; IL_5FB: throw JsonFormatter.smethod_12(Module.smethod_35<string>(700003834u)); IL_60B: throw JsonFormatter.smethod_12(Module.smethod_36<string>(919325466u)); } private static void HexEncodeUtf16CodeUnit(StringBuilder builder, char c) { JsonFormatter.smethod_3(builder, Module.smethod_37<string>(2479521734u)); JsonFormatter.smethod_10(builder, JsonFormatter.smethod_26(Module.smethod_34<string>(1494192179u), (int)(c >> 12 & '\u000f'))); JsonFormatter.smethod_10(builder, JsonFormatter.smethod_26(Module.smethod_37<string>(3209957948u), (int)(c >> 8 & '\u000f'))); JsonFormatter.smethod_10(builder, JsonFormatter.smethod_26(Module.smethod_36<string>(3494994616u), (int)(c >> 4 & '\u000f'))); JsonFormatter.smethod_10(builder, JsonFormatter.smethod_26(Module.smethod_33<string>(859621345u), (int)(c & '\u000f'))); } static bool smethod_0(string string_0, string string_1) { return string_0 == string_1; } static StringBuilder smethod_1() { return new StringBuilder(); } static string smethod_2(object object_0) { return object_0.ToString(); } static StringBuilder smethod_3(StringBuilder stringBuilder_0, string string_0) { return stringBuilder_0.Append(string_0); } static bool smethod_4(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_5(IDisposable idisposable_0) { idisposable_0.Dispose(); } static int smethod_6(string string_0) { return string_0.Length; } static StringBuilder smethod_7(int int_0) { return new StringBuilder(int_0); } static char smethod_8(string string_0, int int_0) { return string_0[int_0]; } static int smethod_9(StringBuilder stringBuilder_0) { return stringBuilder_0.Length; } static StringBuilder smethod_10(StringBuilder stringBuilder_0, char char_0) { return stringBuilder_0.Append(char_0); } static int smethod_11(ICollection icollection_0) { return icollection_0.Count; } static ArgumentException smethod_12(string string_0) { return new ArgumentException(string_0); } static CultureInfo smethod_13() { return CultureInfo.InvariantCulture; } static string smethod_14(IFormattable iformattable_0, string string_0, IFormatProvider iformatProvider_0) { return iformattable_0.ToString(string_0, iformatProvider_0); } static System.Type smethod_15(object object_0) { return object_0.GetType(); } static string smethod_16(object object_0, object object_1) { return object_0 + object_1; } static string smethod_17(string string_0, IEnumerable<string> ienumerable_0) { return string.Join(string_0, ienumerable_0); } static string smethod_18(string string_0, object[] object_0) { return string.Format(string_0, object_0); } static InvalidOperationException smethod_19(string string_0) { return new InvalidOperationException(string_0); } static string[] smethod_20(string string_0, char[] char_0) { return string_0.Split(char_0); } static bool smethod_21(string string_0, string string_1) { return string_0 != string_1; } static IDictionaryEnumerator smethod_22(IDictionary idictionary_0) { return idictionary_0.GetEnumerator(); } static object smethod_23(IEnumerator ienumerator_0) { return ienumerator_0.Current; } static IEnumerator smethod_24(IEnumerable ienumerable_0) { return ienumerable_0.GetEnumerator(); } static bool smethod_25(System.Type type_0, object object_0) { return System.Enum.IsDefined(type_0, object_0); } static char smethod_26(string string_0, int int_0) { return string_0[int_0]; } } } <file_sep>/Google.Protobuf.Reflection/TypeRegistry.cs using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class TypeRegistry { private class Builder { private readonly Dictionary<string, MessageDescriptor> types; private readonly HashSet<string> fileDescriptorNames; internal Builder() { this.types = new Dictionary<string, MessageDescriptor>(); this.fileDescriptorNames = new HashSet<string>(); } internal void AddFile(FileDescriptor fileDescriptor) { if (!this.fileDescriptorNames.Add(fileDescriptor.Name)) { return; } IEnumerator<FileDescriptor> enumerator = fileDescriptor.Dependencies.GetEnumerator(); try { while (true) { IL_7F: int arg_56_0 = (!TypeRegistry.Builder.smethod_0(enumerator)) ? -1090525266 : -792330836; while (true) { switch ((arg_56_0 ^ -136632362) % 4) { case 1: goto IL_7F; case 2: { FileDescriptor current = enumerator.Current; this.AddFile(current); arg_56_0 = -67223049; continue; } case 3: arg_56_0 = -792330836; continue; } goto Block_5; } } Block_5:; } finally { if (enumerator != null) { while (true) { IL_C2: uint arg_A9_0 = 2376606614u; while (true) { uint num; switch ((num = (arg_A9_0 ^ 4158334934u)) % 3u) { case 0u: goto IL_C2; case 2u: TypeRegistry.Builder.smethod_1(enumerator); arg_A9_0 = (num * 353277277u ^ 1794307014u); continue; } goto Block_9; } } Block_9:; } } IEnumerator<MessageDescriptor> enumerator2 = fileDescriptor.MessageTypes.GetEnumerator(); try { while (true) { IL_12E: int arg_105_0 = (!TypeRegistry.Builder.smethod_0(enumerator2)) ? -2052165515 : -913572613; while (true) { switch ((arg_105_0 ^ -136632362) % 4) { case 0: arg_105_0 = -913572613; continue; case 1: { MessageDescriptor current2 = enumerator2.Current; this.AddMessage(current2); arg_105_0 = -1785936184; continue; } case 2: goto IL_12E; } goto Block_11; } } Block_11:; } finally { if (enumerator2 != null) { while (true) { IL_171: uint arg_158_0 = 2295237479u; while (true) { uint num; switch ((num = (arg_158_0 ^ 4158334934u)) % 3u) { case 0u: goto IL_171; case 2u: TypeRegistry.Builder.smethod_1(enumerator2); arg_158_0 = (num * 2014248563u ^ 3207272856u); continue; } goto Block_15; } } Block_15:; } } } private void AddMessage(MessageDescriptor messageDescriptor) { IEnumerator<MessageDescriptor> enumerator = messageDescriptor.NestedTypes.GetEnumerator(); try { while (true) { IL_76: uint arg_4A_0 = TypeRegistry.Builder.smethod_0(enumerator) ? 4034483203u : 2900455577u; while (true) { uint num; switch ((num = (arg_4A_0 ^ 3766789498u)) % 5u) { case 0u: arg_4A_0 = 4034483203u; continue; case 1u: { MessageDescriptor current = enumerator.Current; arg_4A_0 = 3563130679u; continue; } case 3u: { MessageDescriptor current; this.AddMessage(current); arg_4A_0 = (num * 861940351u ^ 2915693501u); continue; } case 4u: goto IL_76; } goto Block_3; } } Block_3:; } finally { if (enumerator != null) { while (true) { IL_B7: uint arg_9F_0 = 3485012909u; while (true) { uint num; switch ((num = (arg_9F_0 ^ 3766789498u)) % 3u) { case 1u: TypeRegistry.Builder.smethod_1(enumerator); arg_9F_0 = (num * 3747808284u ^ 3746933214u); continue; case 2u: goto IL_B7; } goto Block_7; } } Block_7:; } } this.types[messageDescriptor.FullName] = messageDescriptor; } internal TypeRegistry Build() { return new TypeRegistry(this.types); } static bool smethod_0(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_1(IDisposable idisposable_0) { idisposable_0.Dispose(); } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly TypeRegistry.__c __9 = new TypeRegistry.__c(); public static Func<MessageDescriptor, FileDescriptor> __9__9_0; internal FileDescriptor <FromMessages>b__9_0(MessageDescriptor md) { return md.File; } } private readonly Dictionary<string, MessageDescriptor> fullNameToMessageMap; public static TypeRegistry Empty { [CompilerGenerated] get { return TypeRegistry.<Empty>k__BackingField; } } private TypeRegistry(Dictionary<string, MessageDescriptor> fullNameToMessageMap) { this.fullNameToMessageMap = fullNameToMessageMap; } public MessageDescriptor Find(string fullName) { MessageDescriptor result; this.fullNameToMessageMap.TryGetValue(fullName, out result); return result; } public static TypeRegistry FromFiles(params FileDescriptor[] fileDescriptors) { return TypeRegistry.FromFiles(fileDescriptors); } public static TypeRegistry FromFiles(IEnumerable<FileDescriptor> fileDescriptors) { Preconditions.CheckNotNull<IEnumerable<FileDescriptor>>(fileDescriptors, Module.smethod_37<string>(3823684690u)); TypeRegistry.Builder builder; while (true) { IL_43: uint arg_2B_0 = 572427948u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 570727210u)) % 3u) { case 0u: goto IL_43; case 1u: builder = new TypeRegistry.Builder(); arg_2B_0 = (num * 1860881079u ^ 2819786057u); continue; } goto Block_1; } } Block_1: IEnumerator<FileDescriptor> enumerator = fileDescriptors.GetEnumerator(); try { while (true) { IL_BB: uint arg_8F_0 = TypeRegistry.smethod_0(enumerator) ? 1131359393u : 689609985u; while (true) { uint num; switch ((num = (arg_8F_0 ^ 570727210u)) % 5u) { case 1u: { FileDescriptor current = enumerator.Current; arg_8F_0 = 1834372445u; continue; } case 2u: arg_8F_0 = 1131359393u; continue; case 3u: goto IL_BB; case 4u: { FileDescriptor current; builder.AddFile(current); arg_8F_0 = (num * 4146575965u ^ 593622994u); continue; } } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_FC: uint arg_E4_0 = 2091946684u; while (true) { uint num; switch ((num = (arg_E4_0 ^ 570727210u)) % 3u) { case 0u: goto IL_FC; case 1u: TypeRegistry.smethod_1(enumerator); arg_E4_0 = (num * 3508695067u ^ 703506824u); continue; } goto Block_8; } } Block_8:; } } return builder.Build(); } public static TypeRegistry FromMessages(params MessageDescriptor[] messageDescriptors) { return TypeRegistry.FromMessages(messageDescriptors); } public static TypeRegistry FromMessages(IEnumerable<MessageDescriptor> messageDescriptors) { Preconditions.CheckNotNull<IEnumerable<MessageDescriptor>>(messageDescriptors, Module.smethod_36<string>(3395054779u)); Func<MessageDescriptor, FileDescriptor> arg_31_1; if ((arg_31_1 = TypeRegistry.__c.__9__9_0) == null) { arg_31_1 = (TypeRegistry.__c.__9__9_0 = new Func<MessageDescriptor, FileDescriptor>(TypeRegistry.__c.__9.<FromMessages>b__9_0)); } return TypeRegistry.FromFiles(messageDescriptors.Select(arg_31_1)); } static TypeRegistry() { // Note: this type is marked as 'beforefieldinit'. TypeRegistry.<Empty>k__BackingField = new TypeRegistry(new Dictionary<string, MessageDescriptor>()); } static bool smethod_0(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_1(IDisposable idisposable_0) { idisposable_0.Dispose(); } } } <file_sep>/Framework.Attributes/ConsoleCommandAttribute.cs using System; namespace Framework.Attributes { [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class ConsoleCommandAttribute : Attribute { public string Command { get; set; } public string Description { get; set; } public ConsoleCommandAttribute(string command, string description) { this.Command = ConsoleCommandAttribute.smethod_0(command); this.Description = description; } static string smethod_0(string string_0) { return string_0.ToLower(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/FloatValue.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class FloatValue : IMessage<FloatValue>, IEquatable<FloatValue>, IDeepCloneable<FloatValue>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FloatValue.__c __9 = new FloatValue.__c(); internal FloatValue cctor>b__24_0() { return new FloatValue(); } } private static readonly MessageParser<FloatValue> _parser = new MessageParser<FloatValue>(new Func<FloatValue>(FloatValue.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private float value_; public static MessageParser<FloatValue> Parser { get { return FloatValue._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return FloatValue.Descriptor; } } public float Value { get { return this.value_; } set { this.value_ = value; } } public FloatValue() { } public FloatValue(FloatValue other) : this() { this.value_ = other.value_; } public FloatValue Clone() { return new FloatValue(this); } public override bool Equals(object other) { return this.Equals(other as FloatValue); } public bool Equals(FloatValue other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -1153151227) % 7) { case 0: return false; case 2: goto IL_75; case 3: return true; case 4: arg_43_0 = ((this.Value != other.Value) ? -1205176748 : -943673852); continue; case 5: goto IL_12; case 6: return false; } break; } return true; IL_12: arg_43_0 = -1962732247; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? -537062083 : -1141169107); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_71: uint arg_55_0 = 2477020909u; while (true) { uint num2; switch ((num2 = (arg_55_0 ^ 2362435684u)) % 4u) { case 0u: goto IL_71; case 1u: arg_55_0 = (((this.Value != 0f) ? 3337902413u : 3795496372u) ^ num2 * 2079548063u); continue; case 2u: num ^= this.Value.GetHashCode(); arg_55_0 = (num2 * 1032941155u ^ 2729592665u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value != 0f) { while (true) { IL_60: uint arg_44_0 = 4101470090u; while (true) { uint num; switch ((num = (arg_44_0 ^ 3063682080u)) % 4u) { case 0u: goto IL_60; case 2u: output.WriteRawTag(13); arg_44_0 = (num * 3816760559u ^ 1153115841u); continue; case 3u: output.WriteFloat(this.Value); arg_44_0 = (num * 1308207327u ^ 607119636u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_64: uint arg_48_0 = 3111294588u; while (true) { uint num2; switch ((num2 = (arg_48_0 ^ 3832369453u)) % 4u) { case 0u: num += 5; arg_48_0 = (num2 * 241780577u ^ 2574969331u); continue; case 1u: arg_48_0 = (((this.Value == 0f) ? 3900006383u : 4102642737u) ^ num2 * 3110787796u); continue; case 3u: goto IL_64; } return num; } } return num; } public void MergeFrom(FloatValue other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2055920025u)) % 5u) { case 0u: goto IL_63; case 1u: this.Value = other.Value; arg_37_0 = (num * 3615480091u ^ 3431823127u); continue; case 2u: goto IL_12; case 4u: return; } break; } return; IL_12: arg_37_0 = 873840231u; goto IL_32; IL_63: arg_37_0 = ((other.Value != 0f) ? 1652167601u : 1377062191u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) != 0u) ? 1024210798u : 1426770414u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 1233019520u)) % 7u) { case 0u: this.Value = input.ReadFloat(); arg_72_0 = 1216984509u; continue; case 1u: arg_72_0 = (num2 * 2024317045u ^ 838402263u); continue; case 2u: goto IL_A9; case 3u: input.SkipLastField(); arg_72_0 = (num2 * 2617011055u ^ 450168456u); continue; case 5u: arg_72_0 = ((num != 13u) ? 507287446u : 1573940726u); continue; case 6u: arg_72_0 = 1024210798u; continue; } return; } } } } } <file_sep>/AuthServer.AuthServer.Network/RestSession.cs using AuthServer.AuthServer.JsonObjects; using Bgs.Protocol; using Framework.Constants.Misc; using Framework.Cryptography.BNet; using Framework.Database.Auth.Entities; using Framework.Logging; using Framework.Misc; using Framework.Serialization; using Google.Protobuf; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Security; using System.Net.Sockets; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; namespace AuthServer.AuthServer.Network { public class RestSession : IDisposable { private Socket client; private NetworkStream nStream; private SslStream sslStream; private byte[] dataBuffer = new byte[2048]; private uint token; public Account Account { get; set; } public ListModule Modules { get; set; } public SRP6a SecureRemotePassword { get; set; } public BNetCrypt Crypt { get; set; } public RestSession(Socket socket) { this.client = socket; } public string GetCInfo() { IPEndPoint ipendPoint_ = RestSession.smethod_0(this.client) as IPEndPoint; return RestSession.smethod_3(RestSession.smethod_1(ipendPoint_), Module.smethod_35<string>(2164558557u), RestSession.smethod_2(ipendPoint_)); } public void Accept() { RestSession.smethod_4(); X509Certificate2 x509Certificate_; while (true) { IL_82: uint arg_65_0 = 3907938690u; while (true) { uint num; switch ((num = (arg_65_0 ^ 3175972147u)) % 4u) { case 0u: x509Certificate_ = RestSession.smethod_7(Globals.CertData); arg_65_0 = (num * 4011506567u ^ 300618885u); continue; case 1u: this.nStream = RestSession.smethod_5(this.client); this.sslStream = RestSession.smethod_6(this.nStream, false, new RemoteCertificateValidationCallback(this.App_CertificateValidation)); arg_65_0 = (num * 1806681062u ^ 4172582821u); continue; case 3u: goto IL_82; } goto Block_1; } } Block_1: RestSession.smethod_8(); try { RestSession.smethod_9(this.sslStream, x509Certificate_, false, SslProtocols.Tls12, false); int num2 = 0; while (true) { IL_5F9: uint arg_573_0 = 2170226920u; while (true) { uint num; switch ((num = (arg_573_0 ^ 3175972147u)) % 30u) { case 1u: RestSession.smethod_12(this.client); arg_573_0 = 2556496177u; continue; case 2u: arg_573_0 = (num * 1744763105u ^ 3406682519u); continue; case 3u: goto IL_5F9; case 4u: arg_573_0 = (num * 585180848u ^ 3852376867u); continue; case 5u: { string text; HttpHeader header = new HttpHeader { ContentLength = RestSession.smethod_14(text), Content = text }; byte[] byte_ = HttpResponse.Create(HttpCode.OK, header); arg_573_0 = (num * 2775480801u ^ 3304877568u); continue; } case 6u: { byte[] byte_2; RestSession.smethod_15(this.sslStream, byte_2); arg_573_0 = (num * 1250492958u ^ 673772331u); continue; } case 7u: { byte[] array = new byte[num2]; arg_573_0 = (num * 2719918147u ^ 2287814592u); continue; } case 8u: { int num3; arg_573_0 = (((num3 == 0) ? 4097782074u : 3496280056u) ^ num * 161494277u); continue; } case 9u: { HttpHeader header2; byte[] byte_2 = HttpResponse.Create(HttpCode.OK, header2); arg_573_0 = (num * 3879896502u ^ 3651918943u); continue; } case 10u: { byte[] array; HttpHeader httpHeader = HttpRequest.Parse(array); arg_573_0 = ((!RestSession.smethod_13(httpHeader.Method, Module.smethod_33<string>(3773212618u))) ? 2403055654u : 2357400434u); continue; } case 11u: { HttpHeader httpHeader; arg_573_0 = ((!RestSession.smethod_13(httpHeader.Method, Module.smethod_37<string>(3361680046u))) ? 2215941699u : 4202937684u); continue; } case 12u: { byte[] array; arg_573_0 = (((array.Length != 0) ? 2819837061u : 3242441858u) ^ num * 1932756245u); continue; } case 13u: { int num4 = 0; arg_573_0 = (num * 1257474539u ^ 2631169849u); continue; } case 14u: { LogonForm logonForm; arg_573_0 = (((!RestSession.smethod_13(logonForm[Module.smethod_36<string>(2861509726u)], Module.smethod_37<string>(235398904u))) ? 1053858572u : 1055173549u) ^ num * 2475641201u); continue; } case 15u: { byte[] array; arg_573_0 = (((array == null) ? 3243205583u : 2710869470u) ^ num * 891484237u); continue; } case 16u: { LogonForm logonForm; arg_573_0 = ((RestSession.smethod_13(logonForm[Module.smethod_36<string>(2250828827u)], Module.smethod_36<string>(837291206u)) ? 498799901u : 678006082u) ^ num * 2492023149u); continue; } case 17u: { int num4; int num3 = num4++; arg_573_0 = (num * 1111030318u ^ 3356779107u); continue; } case 18u: { string text2; HttpHeader header2 = new HttpHeader { ContentLength = RestSession.smethod_14(text2), Content = text2 }; arg_573_0 = (num * 3964775577u ^ 694209648u); continue; } case 19u: RestSession.smethod_12(this.client); arg_573_0 = 2972599719u; continue; case 20u: { string text2 = Json.CreateString<PostLogonForm>(new PostLogonForm { AuthenticationState = AuthenticationState.Done, LoginTicket = Module.smethod_36<string>(304136250u) }); arg_573_0 = (num * 360167075u ^ 3963249545u); continue; } case 21u: RestSession.smethod_16(Module.smethod_33<string>(3715608777u)); arg_573_0 = 2215941699u; continue; case 22u: { byte[] byte_; RestSession.smethod_15(this.sslStream, byte_); arg_573_0 = (num * 777717677u ^ 724990205u); continue; } case 24u: { byte[] array; RestSession.smethod_11(this.dataBuffer, array, num2); arg_573_0 = (num * 2219576960u ^ 2407803994u); continue; } case 25u: { string text = Json.CreateString<FormInputs>(new FormInputs { Type = Module.smethod_37<string>(3946023123u), Inputs = new List<FormInput>(), Inputs = { new FormInput { Id = Module.smethod_34<string>(1157598820u), Type = Module.smethod_35<string>(660958023u), Label = Module.smethod_36<string>(4155214069u), MaxLength = 320 }, new FormInput { Id = Module.smethod_35<string>(269237390u), Type = Module.smethod_35<string>(269237390u), Label = Module.smethod_33<string>(4156767494u), MaxLength = 16 }, new FormInput { Id = Module.smethod_33<string>(3613515769u), Type = Module.smethod_37<string>(3303236897u), Label = Module.smethod_33<string>(187751233u) } } }); arg_573_0 = (num * 1698536323u ^ 3749898327u); continue; } case 26u: arg_573_0 = (num * 3176669753u ^ 3512643481u); continue; case 27u: { HttpHeader httpHeader; LogonForm logonForm = Json.CreateObject<LogonForm>(httpHeader.Content); arg_573_0 = (num * 207156555u ^ 3087242650u); continue; } case 28u: arg_573_0 = ((num2 == 0) ? 3622369844u : 3326415920u); continue; case 29u: num2 = RestSession.smethod_10(this.sslStream, this.dataBuffer, 0, this.dataBuffer.Length); arg_573_0 = 3087035324u; continue; } goto Block_12; } } Block_12:; } catch (Exception) { while (true) { IL_643: uint arg_60F_0 = 2706351906u; while (true) { uint num; switch ((num = (arg_60F_0 ^ 3175972147u)) % 3u) { case 1u: RestSession.smethod_12(this.client); arg_60F_0 = (num * 734591689u ^ 879456549u); continue; case 2u: goto IL_643; } goto Block_14; } } Block_14: this.Dispose(); } } private bool App_CertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; } public void Send(byte[] rawdata) { RestSession.smethod_15(this.sslStream, rawdata); } public void Send(IMessage message) { try { byte[] array = message.ToByteArray(); byte[] array2 = new Header { Token = 0u, ServiceId = 254u, Size = (uint)array.Length }.ToByteArray(); byte[] array3 = new byte[2]; while (true) { IL_110: uint arg_EB_0 = 3281382246u; while (true) { uint num; switch ((num = (arg_EB_0 ^ 2233116095u)) % 6u) { case 1u: array3[0] = (byte)(array2.Length >> 8); array3[1] = (byte)(array2.Length & 255); array3 = array3.Concat(array2).Concat(array).ToArray<byte>(); arg_EB_0 = (num * 397377048u ^ 1189005203u); continue; case 2u: goto IL_110; case 3u: Log.Message(LogType.Error, RestSession.smethod_18(Module.smethod_37<string>(146717431u), RestSession.smethod_17(message)), Array.Empty<object>()); arg_EB_0 = (num * 4247256910u ^ 511300987u); continue; case 4u: arg_EB_0 = (((array3.Length == 2 + array2.Length + array.Length) ? 3751062502u : 2638181500u) ^ num * 1995585982u); continue; case 5u: RestSession.smethod_15(this.sslStream, array3); arg_EB_0 = 3485856961u; continue; } goto Block_3; } } Block_3:; } catch (SocketException exception_) { while (true) { IL_169: uint arg_121_0 = 3567765158u; while (true) { uint num; switch ((num = (arg_121_0 ^ 2233116095u)) % 3u) { case 0u: goto IL_169; case 1u: Log.Message(LogType.Error, Module.smethod_36<string>(3490486299u), new object[] { RestSession.smethod_19(exception_) }); arg_121_0 = (num * 1261360073u ^ 3352763934u); continue; } goto Block_5; } } Block_5: RestSession.smethod_20(this.client); } } public void Send(IMessage message, uint serviceHash, uint methodId) { try { byte[] array = message.ToByteArray(); while (true) { IL_184: uint arg_14E_0 = 2552486184u; while (true) { uint num; switch ((num = (arg_14E_0 ^ 2204077453u)) % 10u) { case 0u: { byte[] array2; byte[] array3; array2[0] = (byte)(array3.Length >> 8); arg_14E_0 = (num * 2469205237u ^ 922619938u); continue; } case 1u: arg_14E_0 = (num * 369987135u ^ 995479250u); continue; case 2u: goto IL_184; case 3u: Log.Message(LogType.Error, RestSession.smethod_18(Module.smethod_34<string>(2746132316u), RestSession.smethod_17(message)), Array.Empty<object>()); arg_14E_0 = (num * 1089050472u ^ 225111790u); continue; case 4u: { byte[] array3; byte[] array2 = array2.Concat(array3).Concat(array).ToArray<byte>(); arg_14E_0 = (((array2.Length == 2 + array3.Length + array.Length) ? 3650143856u : 2376975962u) ^ num * 2239156228u); continue; } case 5u: { Header expr_61 = new Header(); uint num2 = this.token; this.token = num2 + 1u; expr_61.Token = num2; expr_61.ServiceId = 0u; expr_61.ServiceHash = serviceHash; expr_61.MethodId = methodId; expr_61.Size = (uint)array.Length; byte[] array3 = expr_61.ToByteArray(); arg_14E_0 = (num * 1606904854u ^ 1376312577u); continue; } case 6u: { byte[] array2 = new byte[2]; arg_14E_0 = (num * 3434274782u ^ 1626019935u); continue; } case 7u: { byte[] array2; byte[] array3; array2[1] = (byte)(array3.Length & 255); arg_14E_0 = (num * 4068384342u ^ 4016607499u); continue; } case 9u: { byte[] array2; RestSession.smethod_15(this.sslStream, array2); arg_14E_0 = 3681796951u; continue; } } goto Block_3; } } Block_3:; } catch (SocketException exception_) { Log.Message(LogType.Error, Module.smethod_37<string>(2717862335u), new object[] { RestSession.smethod_19(exception_) }); RestSession.smethod_20(this.client); } } private void SendCompleted(object sender, SocketAsyncEventArgs e) { } public void Dispose() { this.client = null; this.Account = null; this.SecureRemotePassword = null; } static EndPoint smethod_0(Socket socket_0) { return socket_0.RemoteEndPoint; } static IPAddress smethod_1(IPEndPoint ipendPoint_0) { return ipendPoint_0.Address; } static int smethod_2(IPEndPoint ipendPoint_0) { return ipendPoint_0.Port; } static string smethod_3(object object_0, object object_1, object object_2) { return object_0 + object_1 + object_2; } static HttpListener smethod_4() { return new HttpListener(); } static NetworkStream smethod_5(Socket socket_0) { return new NetworkStream(socket_0); } static SslStream smethod_6(Stream stream_0, bool bool_0, RemoteCertificateValidationCallback remoteCertificateValidationCallback_0) { return new SslStream(stream_0, bool_0, remoteCertificateValidationCallback_0); } static X509Certificate2 smethod_7(byte[] byte_0) { return new X509Certificate2(byte_0); } static X509Chain smethod_8() { return X509Chain.Create(); } static void smethod_9(SslStream sslStream_0, X509Certificate x509Certificate_0, bool bool_0, SslProtocols sslProtocols_0, bool bool_1) { sslStream_0.AuthenticateAsServer(x509Certificate_0, bool_0, sslProtocols_0, bool_1); } static int smethod_10(Stream stream_0, byte[] byte_0, int int_0, int int_1) { return stream_0.Read(byte_0, int_0, int_1); } static void smethod_11(Array array_0, Array array_1, int int_0) { Array.Copy(array_0, array_1, int_0); } static void smethod_12(Socket socket_0) { socket_0.Dispose(); } static bool smethod_13(string string_0, string string_1) { return string_0 == string_1; } static int smethod_14(string string_0) { return string_0.Length; } static void smethod_15(SslStream sslStream_0, byte[] byte_0) { sslStream_0.Write(byte_0); } static void smethod_16(string string_0) { Console.WriteLine(string_0); } static string smethod_17(object object_0) { return object_0.ToString(); } static string smethod_18(string string_0, object object_0) { return string.Format(string_0, object_0); } static string smethod_19(Exception exception_0) { return exception_0.Message; } static void smethod_20(Socket socket_0) { socket_0.Close(); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/Namegen.cs using System; namespace AuthServer.WorldServer.Game.Entities { public class Namegen { public string Name { get; set; } public byte Race { get; set; } public byte Sex { get; set; } } } <file_sep>/Bgs.Protocol/Header.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Header : IMessage<Header>, IEquatable<Header>, IDeepCloneable<Header>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Header.__c __9 = new Header.__c(); internal Header cctor>b__74_0() { return new Header(); } } private static readonly MessageParser<Header> _parser = new MessageParser<Header>(new Func<Header>(Header.__c.__9.<.cctor>b__74_0)); public const int ServiceIdFieldNumber = 1; private uint serviceId_; public const int MethodIdFieldNumber = 2; private uint methodId_; public const int TokenFieldNumber = 3; private uint token_; public const int ObjectIdFieldNumber = 4; private ulong objectId_; public const int SizeFieldNumber = 5; private uint size_; public const int StatusFieldNumber = 6; private uint status_; public const int ErrorFieldNumber = 7; private static readonly FieldCodec<ErrorInfo> _repeated_error_codec = FieldCodec.ForMessage<ErrorInfo>(58u, ErrorInfo.Parser); private readonly RepeatedField<ErrorInfo> error_ = new RepeatedField<ErrorInfo>(); public const int TimeoutFieldNumber = 8; private ulong timeout_; public const int IsResponseFieldNumber = 9; private bool isResponse_; public const int ForwardTargetsFieldNumber = 10; private static readonly FieldCodec<ProcessId> _repeated_forwardTargets_codec = FieldCodec.ForMessage<ProcessId>(82u, ProcessId.Parser); private readonly RepeatedField<ProcessId> forwardTargets_ = new RepeatedField<ProcessId>(); public const int ServiceHashFieldNumber = 11; private uint serviceHash_; public static MessageParser<Header> Parser { get { return Header._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return Header.Descriptor; } } public uint ServiceId { get { return this.serviceId_; } set { this.serviceId_ = value; } } public uint MethodId { get { return this.methodId_; } set { this.methodId_ = value; } } public uint Token { get { return this.token_; } set { this.token_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public uint Size { get { return this.size_; } set { this.size_ = value; } } public uint Status { get { return this.status_; } set { this.status_ = value; } } public RepeatedField<ErrorInfo> Error { get { return this.error_; } } public ulong Timeout { get { return this.timeout_; } set { this.timeout_ = value; } } public bool IsResponse { get { return this.isResponse_; } set { this.isResponse_ = value; } } public RepeatedField<ProcessId> ForwardTargets { get { return this.forwardTargets_; } } public uint ServiceHash { get { return this.serviceHash_; } set { this.serviceHash_ = value; } } public Header() { } public Header(Header other) : this() { this.serviceId_ = other.serviceId_; this.methodId_ = other.methodId_; this.token_ = other.token_; this.objectId_ = other.objectId_; this.size_ = other.size_; this.status_ = other.status_; this.error_ = other.error_.Clone(); this.timeout_ = other.timeout_; this.isResponse_ = other.isResponse_; this.forwardTargets_ = other.forwardTargets_.Clone(); this.serviceHash_ = other.serviceHash_; } public Header Clone() { return new Header(this); } public override bool Equals(object other) { return this.Equals(other as Header); } public bool Equals(Header other) { if (other == null) { goto IL_18; } goto IL_277; int arg_1F1_0; while (true) { IL_1EC: switch ((arg_1F1_0 ^ 835977110) % 27) { case 0: arg_1F1_0 = ((this.ServiceId == other.ServiceId) ? 1473572423 : 1397514939); continue; case 1: arg_1F1_0 = ((this.Token != other.Token) ? 957622925 : 142015174); continue; case 2: arg_1F1_0 = ((this.ServiceHash == other.ServiceHash) ? 1556651742 : 672325852); continue; case 3: return false; case 4: arg_1F1_0 = ((this.Timeout == other.Timeout) ? 1214989409 : 1341437749); continue; case 5: return false; case 6: return true; case 7: arg_1F1_0 = ((this.ObjectId == other.ObjectId) ? 413607046 : 1301858163); continue; case 8: arg_1F1_0 = ((this.Size != other.Size) ? 343707450 : 1962889827); continue; case 9: arg_1F1_0 = ((this.Status != other.Status) ? 1663950880 : 1695505832); continue; case 10: return false; case 11: return false; case 12: arg_1F1_0 = ((!this.error_.Equals(other.error_)) ? 465570426 : 926234115); continue; case 13: return false; case 14: arg_1F1_0 = ((this.MethodId == other.MethodId) ? 546678672 : 210890965); continue; case 15: arg_1F1_0 = (this.forwardTargets_.Equals(other.forwardTargets_) ? 624764737 : 1320222962); continue; case 16: return false; case 17: goto IL_277; case 18: return false; case 19: arg_1F1_0 = ((this.IsResponse == other.IsResponse) ? 792871347 : 1968818502); continue; case 21: return false; case 22: return false; case 23: goto IL_18; case 24: return false; case 25: return false; case 26: return false; } break; } return true; IL_18: arg_1F1_0 = 309514385; goto IL_1EC; IL_277: arg_1F1_0 = ((other == this) ? 761468446 : 1363330045); goto IL_1EC; } public override int GetHashCode() { int num = 1 ^ this.ServiceId.GetHashCode(); if (this.MethodId != 0u) { goto IL_17B; } goto IL_282; uint arg_230_0; while (true) { IL_22B: uint num2; switch ((num2 = (arg_230_0 ^ 1761463747u)) % 17u) { case 0u: num ^= this.Status.GetHashCode(); arg_230_0 = (num2 * 388279359u ^ 846492851u); continue; case 1u: num ^= this.MethodId.GetHashCode(); arg_230_0 = (num2 * 1390496085u ^ 3553063500u); continue; case 2u: arg_230_0 = ((this.Size == 0u) ? 905381066u : 2091190091u); continue; case 3u: arg_230_0 = (this.IsResponse ? 874495610u : 1786853419u); continue; case 4u: num ^= this.Size.GetHashCode(); arg_230_0 = (num2 * 3657136974u ^ 2185365946u); continue; case 5u: goto IL_17B; case 6u: num ^= this.IsResponse.GetHashCode(); arg_230_0 = (num2 * 2624026767u ^ 1051550844u); continue; case 7u: arg_230_0 = ((this.Status == 0u) ? 650318841u : 1509270517u); continue; case 8u: num ^= this.forwardTargets_.GetHashCode(); arg_230_0 = 834861364u; continue; case 9u: arg_230_0 = (((this.ServiceHash == 0u) ? 2822970706u : 2669170615u) ^ num2 * 2179165277u); continue; case 10u: arg_230_0 = (((this.ObjectId != 0uL) ? 3533380903u : 3445017442u) ^ num2 * 696668744u); continue; case 11u: goto IL_282; case 12u: num ^= this.error_.GetHashCode(); arg_230_0 = ((this.Timeout == 0uL) ? 2003363121u : 1037982495u); continue; case 13u: num ^= this.ObjectId.GetHashCode(); arg_230_0 = (num2 * 3350871265u ^ 894827270u); continue; case 14u: num ^= this.Timeout.GetHashCode(); arg_230_0 = (num2 * 577460675u ^ 149586085u); continue; case 16u: num ^= this.ServiceHash.GetHashCode(); arg_230_0 = (num2 * 3473681108u ^ 2317726085u); continue; } break; } return num; IL_17B: arg_230_0 = 830784483u; goto IL_22B; IL_282: num ^= this.Token.GetHashCode(); arg_230_0 = 381652572u; goto IL_22B; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_34D: uint arg_2E0_0 = 3237246026u; while (true) { uint num; switch ((num = (arg_2E0_0 ^ 3733632412u)) % 24u) { case 0u: output.WriteUInt64(this.ObjectId); arg_2E0_0 = (num * 1078891772u ^ 3760580697u); continue; case 1u: arg_2E0_0 = (((this.ObjectId == 0uL) ? 794207374u : 327957586u) ^ num * 1282524839u); continue; case 2u: output.WriteRawTag(64); arg_2E0_0 = (num * 4285703750u ^ 1830507895u); continue; case 3u: arg_2E0_0 = ((this.Status == 0u) ? 2253889185u : 3528723712u); continue; case 4u: output.WriteRawTag(48); arg_2E0_0 = (num * 118453463u ^ 786250316u); continue; case 5u: this.error_.WriteTo(output, Header._repeated_error_codec); arg_2E0_0 = 3435959436u; continue; case 6u: arg_2E0_0 = (this.IsResponse ? 2427909861u : 2735404171u); continue; case 7u: arg_2E0_0 = (((this.ServiceHash != 0u) ? 1018677594u : 1783153831u) ^ num * 70875757u); continue; case 8u: arg_2E0_0 = (((this.Timeout != 0uL) ? 2398112718u : 2415332434u) ^ num * 1516901048u); continue; case 9u: output.WriteRawTag(32); arg_2E0_0 = (num * 562087974u ^ 4144123170u); continue; case 10u: output.WriteUInt32(this.Size); arg_2E0_0 = (num * 4184675981u ^ 2653603341u); continue; case 11u: output.WriteRawTag(24); arg_2E0_0 = 2277452704u; continue; case 12u: output.WriteUInt32(this.Token); arg_2E0_0 = (num * 671578154u ^ 3127511477u); continue; case 13u: output.WriteRawTag(93); output.WriteFixed32(this.ServiceHash); arg_2E0_0 = (num * 1614713578u ^ 1849845238u); continue; case 14u: output.WriteUInt32(this.ServiceId); arg_2E0_0 = (((this.MethodId != 0u) ? 2631843366u : 3475919427u) ^ num * 470730806u); continue; case 15u: output.WriteUInt64(this.Timeout); arg_2E0_0 = (num * 2255670280u ^ 510058474u); continue; case 17u: output.WriteRawTag(72); output.WriteBool(this.IsResponse); arg_2E0_0 = (num * 1036782798u ^ 3256419285u); continue; case 18u: goto IL_34D; case 19u: output.WriteRawTag(40); arg_2E0_0 = (num * 3227456148u ^ 2072048498u); continue; case 20u: output.WriteUInt32(this.Status); arg_2E0_0 = (num * 3276872634u ^ 1570447529u); continue; case 21u: arg_2E0_0 = ((this.Size == 0u) ? 3855264007u : 2422296407u); continue; case 22u: output.WriteRawTag(16); output.WriteUInt32(this.MethodId); arg_2E0_0 = (num * 2419523506u ^ 1977368251u); continue; case 23u: this.forwardTargets_.WriteTo(output, Header._repeated_forwardTargets_codec); arg_2E0_0 = 3250518899u; continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_281: uint arg_230_0 = 39713502u; while (true) { uint num2; switch ((num2 = (arg_230_0 ^ 620036951u)) % 17u) { case 1u: arg_230_0 = (this.IsResponse ? 2088358406u : 46548860u); continue; case 2u: arg_230_0 = ((this.Size != 0u) ? 467121794u : 65388016u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MethodId); arg_230_0 = (num2 * 3496149728u ^ 4193955242u); continue; case 4u: arg_230_0 = ((this.Status == 0u) ? 1717321748u : 1449104776u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_230_0 = (num2 * 618507040u ^ 2516326359u); continue; case 6u: goto IL_281; case 7u: num += 5; arg_230_0 = (num2 * 941016515u ^ 870254654u); continue; case 8u: num += 2; arg_230_0 = (num2 * 335134042u ^ 2954175494u); continue; case 9u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Timeout); arg_230_0 = (num2 * 602821029u ^ 2081749824u); continue; case 10u: arg_230_0 = (((this.ObjectId != 0uL) ? 92337772u : 34357350u) ^ num2 * 268620199u); continue; case 11u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Status); arg_230_0 = (num2 * 1497102400u ^ 1601109972u); continue; case 12u: num += this.error_.CalculateSize(Header._repeated_error_codec); arg_230_0 = ((this.Timeout != 0uL) ? 778862727u : 521289296u); continue; case 13u: num += this.forwardTargets_.CalculateSize(Header._repeated_forwardTargets_codec); arg_230_0 = ((this.ServiceHash == 0u) ? 911796049u : 1506761650u); continue; case 14u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ServiceId); arg_230_0 = (((this.MethodId != 0u) ? 1980989029u : 111085239u) ^ num2 * 3969476629u); continue; case 15u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Size); arg_230_0 = (num2 * 3138876406u ^ 868865118u); continue; case 16u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Token); arg_230_0 = 167577840u; continue; } return num; } } return num; } public void MergeFrom(Header other) { if (other == null) { goto IL_EC; } goto IL_2DC; uint arg_26C_0; while (true) { IL_267: uint num; switch ((num = (arg_26C_0 ^ 3520855341u)) % 21u) { case 0u: this.forwardTargets_.Add(other.forwardTargets_); arg_26C_0 = ((other.ServiceHash != 0u) ? 4156457913u : 2931621814u); continue; case 1u: this.Timeout = other.Timeout; arg_26C_0 = (num * 1158433750u ^ 1081217253u); continue; case 2u: goto IL_2DC; case 3u: arg_26C_0 = ((other.Token == 0u) ? 3497177965u : 3553652908u); continue; case 4u: this.ObjectId = other.ObjectId; arg_26C_0 = (num * 4261744410u ^ 3936457795u); continue; case 5u: arg_26C_0 = ((other.Size == 0u) ? 2819585702u : 2719536534u); continue; case 7u: arg_26C_0 = ((!other.IsResponse) ? 4220567087u : 3310645614u); continue; case 8u: arg_26C_0 = ((other.Status == 0u) ? 2916542674u : 3402776913u); continue; case 9u: this.MethodId = other.MethodId; arg_26C_0 = (num * 2773288841u ^ 589514948u); continue; case 10u: this.Token = other.Token; arg_26C_0 = (num * 3043182469u ^ 3796957288u); continue; case 11u: return; case 12u: this.Size = other.Size; arg_26C_0 = (num * 1299235297u ^ 1493479933u); continue; case 13u: arg_26C_0 = ((other.MethodId == 0u) ? 3964147250u : 2622918379u); continue; case 14u: goto IL_EC; case 15u: arg_26C_0 = ((other.ObjectId == 0uL) ? 4147299861u : 3909956794u); continue; case 16u: this.IsResponse = other.IsResponse; arg_26C_0 = (num * 1567705496u ^ 2673728743u); continue; case 17u: this.ServiceHash = other.ServiceHash; arg_26C_0 = (num * 609602925u ^ 3624638130u); continue; case 18u: this.Status = other.Status; arg_26C_0 = (num * 3824877483u ^ 1787724294u); continue; case 19u: this.ServiceId = other.ServiceId; arg_26C_0 = (num * 2927358265u ^ 2586377024u); continue; case 20u: this.error_.Add(other.error_); arg_26C_0 = ((other.Timeout == 0uL) ? 2832013815u : 2604688246u); continue; } break; } return; IL_EC: arg_26C_0 = 3635414551u; goto IL_267; IL_2DC: arg_26C_0 = ((other.ServiceId == 0u) ? 3547158705u : 2207145300u); goto IL_267; } public void MergeFrom(CodedInputStream input) { while (true) { IL_4BF: uint num; uint arg_403_0 = ((num = input.ReadTag()) == 0u) ? 462781708u : 1200789082u; while (true) { uint num2; switch ((num2 = (arg_403_0 ^ 1448827902u)) % 40u) { case 0u: this.ObjectId = input.ReadUInt64(); arg_403_0 = 1383181675u; continue; case 1u: arg_403_0 = (num2 * 2484676307u ^ 1371559099u); continue; case 2u: this.error_.AddEntriesFrom(input, Header._repeated_error_codec); arg_403_0 = 1967183198u; continue; case 3u: arg_403_0 = (((num != 64u) ? 2844860896u : 3774118563u) ^ num2 * 967557145u); continue; case 4u: arg_403_0 = (((num != 40u) ? 1966472171u : 1324681925u) ^ num2 * 4032843651u); continue; case 5u: arg_403_0 = (num2 * 23153884u ^ 495608180u); continue; case 6u: arg_403_0 = (num2 * 3926757050u ^ 1598772967u); continue; case 7u: arg_403_0 = 1200789082u; continue; case 8u: arg_403_0 = (num2 * 2992131565u ^ 4231612683u); continue; case 9u: this.Status = input.ReadUInt32(); arg_403_0 = 2041214852u; continue; case 10u: arg_403_0 = (((num != 58u) ? 590152259u : 1280333690u) ^ num2 * 3692790735u); continue; case 11u: this.Token = input.ReadUInt32(); arg_403_0 = 790605184u; continue; case 12u: arg_403_0 = ((num <= 40u) ? 771893375u : 1368362984u); continue; case 13u: arg_403_0 = (((num != 16u) ? 3485072914u : 2397607450u) ^ num2 * 1858191383u); continue; case 14u: this.Timeout = input.ReadUInt64(); arg_403_0 = 1383181675u; continue; case 15u: arg_403_0 = ((num == 24u) ? 675734261u : 1192643854u); continue; case 16u: arg_403_0 = (((num == 32u) ? 948735814u : 1924135474u) ^ num2 * 1455062780u); continue; case 17u: arg_403_0 = (num2 * 1748195292u ^ 431786263u); continue; case 19u: this.IsResponse = input.ReadBool(); arg_403_0 = 1743807954u; continue; case 20u: arg_403_0 = (num2 * 4040615382u ^ 263601107u); continue; case 21u: goto IL_4BF; case 22u: arg_403_0 = (((num == 8u) ? 248175451u : 177214451u) ^ num2 * 1371567836u); continue; case 23u: this.Size = input.ReadUInt32(); arg_403_0 = 1383181675u; continue; case 24u: arg_403_0 = (num2 * 3534616873u ^ 1563613899u); continue; case 25u: this.ServiceHash = input.ReadFixed32(); arg_403_0 = 1383181675u; continue; case 26u: arg_403_0 = (((num == 82u) ? 3140376123u : 3613182253u) ^ num2 * 326042668u); continue; case 27u: arg_403_0 = (((num == 93u) ? 552047522u : 956173301u) ^ num2 * 3054799335u); continue; case 28u: arg_403_0 = (num2 * 2808625113u ^ 3040108615u); continue; case 29u: this.ServiceId = input.ReadUInt32(); arg_403_0 = 118843626u; continue; case 30u: input.SkipLastField(); arg_403_0 = 132966375u; continue; case 31u: this.MethodId = input.ReadUInt32(); arg_403_0 = 287552030u; continue; case 32u: arg_403_0 = (((num != 48u) ? 1661250628u : 464447071u) ^ num2 * 3956194542u); continue; case 33u: arg_403_0 = (((num <= 16u) ? 2685026202u : 3339153443u) ^ num2 * 1034237922u); continue; case 34u: arg_403_0 = (num2 * 3123328711u ^ 1101980605u); continue; case 35u: arg_403_0 = ((num == 72u) ? 675648757u : 266295628u); continue; case 36u: arg_403_0 = (num2 * 1869574487u ^ 3536200095u); continue; case 37u: this.forwardTargets_.AddEntriesFrom(input, Header._repeated_forwardTargets_codec); arg_403_0 = 1376591090u; continue; case 38u: arg_403_0 = ((num > 64u) ? 2127364693u : 1603517254u); continue; case 39u: arg_403_0 = (num2 * 1903617701u ^ 3937168195u); continue; } return; } } } } } <file_sep>/Google.Protobuf.WellKnownTypes/Enum.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Enum : IMessage<Enum>, IEquatable<Enum>, IDeepCloneable<Enum>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Enum.__c __9 = new Enum.__c(); internal Enum cctor>b__44_0() { return new Enum(); } } private static readonly MessageParser<Enum> _parser = new MessageParser<Enum>(new Func<Enum>(Enum.__c.__9.<.cctor>b__44_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int EnumvalueFieldNumber = 2; private static readonly FieldCodec<EnumValue> _repeated_enumvalue_codec; private readonly RepeatedField<EnumValue> enumvalue_ = new RepeatedField<EnumValue>(); public const int OptionsFieldNumber = 3; private static readonly FieldCodec<Option> _repeated_options_codec; private readonly RepeatedField<Option> options_ = new RepeatedField<Option>(); public const int SourceContextFieldNumber = 4; private SourceContext sourceContext_; public const int SyntaxFieldNumber = 5; private Syntax syntax_; public static MessageParser<Enum> Parser { get { return Enum._parser; } } public static MessageDescriptor Descriptor { get { return TypeReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return Enum.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public RepeatedField<EnumValue> Enumvalue { get { return this.enumvalue_; } } public RepeatedField<Option> Options { get { return this.options_; } } public SourceContext SourceContext { get { return this.sourceContext_; } set { this.sourceContext_ = value; } } public Syntax Syntax { get { return this.syntax_; } set { this.syntax_ = value; } } public Enum() { } public Enum(Enum other) : this() { while (true) { IL_73: uint arg_57_0 = 3538489200u; while (true) { uint num; switch ((num = (arg_57_0 ^ 2930211458u)) % 4u) { case 1u: this.options_ = other.options_.Clone(); arg_57_0 = (num * 2928075236u ^ 1734520718u); continue; case 2u: this.name_ = other.name_; this.enumvalue_ = other.enumvalue_.Clone(); arg_57_0 = (num * 2971254826u ^ 2493607435u); continue; case 3u: goto IL_73; } goto Block_1; } } Block_1: this.SourceContext = ((other.sourceContext_ != null) ? other.SourceContext.Clone() : null); this.syntax_ = other.syntax_; } public Enum Clone() { return new Enum(this); } public override bool Equals(object other) { return this.Equals(other as Enum); } public bool Equals(Enum other) { if (other == null) { goto IL_42; } goto IL_158; int arg_102_0; while (true) { IL_FD: switch ((arg_102_0 ^ 323937694) % 15) { case 0: return false; case 1: arg_102_0 = (this.options_.Equals(other.options_) ? 1778596814 : 102109882); continue; case 2: return false; case 3: arg_102_0 = ((!this.enumvalue_.Equals(other.enumvalue_)) ? 740800639 : 929888477); continue; case 4: goto IL_158; case 5: arg_102_0 = (Enum.smethod_1(this.SourceContext, other.SourceContext) ? 1971345696 : 1379682474); continue; case 6: return false; case 8: arg_102_0 = ((!Enum.smethod_0(this.Name, other.Name)) ? 648473018 : 1229851147); continue; case 9: return false; case 10: goto IL_42; case 11: arg_102_0 = ((this.Syntax != other.Syntax) ? 2026398253 : 32462452); continue; case 12: return true; case 13: return false; case 14: return false; } break; } return true; IL_42: arg_102_0 = 983936600; goto IL_FD; IL_158: arg_102_0 = ((other == this) ? 1478286811 : 55114972); goto IL_FD; } public override int GetHashCode() { int num = 1; while (true) { IL_13F: uint arg_10E_0 = 3175788660u; while (true) { uint num2; switch ((num2 = (arg_10E_0 ^ 2850771719u)) % 9u) { case 0u: num ^= Enum.smethod_3(this.enumvalue_); arg_10E_0 = 2443717634u; continue; case 1u: arg_10E_0 = (((Enum.smethod_2(this.Name) == 0) ? 1600633408u : 330990562u) ^ num2 * 2337405627u); continue; case 2u: arg_10E_0 = ((this.Syntax == Syntax.SYNTAX_PROTO2) ? 3326155321u : 2847979292u); continue; case 3u: num ^= Enum.smethod_3(this.options_); arg_10E_0 = (((this.sourceContext_ != null) ? 1873911089u : 650506936u) ^ num2 * 3546672271u); continue; case 4u: goto IL_13F; case 5u: num ^= Enum.smethod_3(this.Name); arg_10E_0 = (num2 * 1153348899u ^ 4024587629u); continue; case 6u: num ^= Enum.smethod_3(this.SourceContext); arg_10E_0 = (num2 * 1558307675u ^ 3816601244u); continue; case 7u: num ^= this.Syntax.GetHashCode(); arg_10E_0 = (num2 * 2730713023u ^ 2260152092u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Enum.smethod_2(this.Name) != 0) { goto IL_68; } goto IL_ED; uint arg_B6_0; while (true) { IL_B1: uint num; switch ((num = (arg_B6_0 ^ 2815538788u)) % 7u) { case 0u: arg_B6_0 = ((this.Syntax == Syntax.SYNTAX_PROTO2) ? 2277914679u : 2578697149u); continue; case 2u: output.WriteRawTag(40); output.WriteEnum((int)this.Syntax); arg_B6_0 = (num * 577449077u ^ 1536288794u); continue; case 3u: goto IL_68; case 4u: output.WriteRawTag(34); output.WriteMessage(this.SourceContext); arg_B6_0 = (num * 3691026681u ^ 2073463643u); continue; case 5u: goto IL_ED; case 6u: output.WriteRawTag(10); output.WriteString(this.Name); arg_B6_0 = (num * 3030877554u ^ 3203150973u); continue; } break; } return; IL_68: arg_B6_0 = 3144001046u; goto IL_B1; IL_ED: this.enumvalue_.WriteTo(output, Enum._repeated_enumvalue_codec); this.options_.WriteTo(output, Enum._repeated_options_codec); arg_B6_0 = ((this.sourceContext_ == null) ? 3497959824u : 3576529031u); goto IL_B1; } public int CalculateSize() { int num = 0; if (Enum.smethod_2(this.Name) != 0) { goto IL_7C; } goto IL_11E; uint arg_ED_0; while (true) { IL_E8: uint num2; switch ((num2 = (arg_ED_0 ^ 4212539262u)) % 9u) { case 0u: arg_ED_0 = (((this.sourceContext_ != null) ? 1975020876u : 1521070902u) ^ num2 * 1925253417u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceContext); arg_ED_0 = (num2 * 4255239174u ^ 978256858u); continue; case 3u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Syntax); arg_ED_0 = (num2 * 473149217u ^ 2599256690u); continue; case 4u: goto IL_7C; case 5u: num += this.options_.CalculateSize(Enum._repeated_options_codec); arg_ED_0 = (num2 * 37516900u ^ 3433726418u); continue; case 6u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_ED_0 = (num2 * 1847287784u ^ 1026785608u); continue; case 7u: goto IL_11E; case 8u: arg_ED_0 = ((this.Syntax == Syntax.SYNTAX_PROTO2) ? 3086837647u : 3611449379u); continue; } break; } return num; IL_7C: arg_ED_0 = 3051319952u; goto IL_E8; IL_11E: num += this.enumvalue_.CalculateSize(Enum._repeated_enumvalue_codec); arg_ED_0 = 2651850509u; goto IL_E8; } public void MergeFrom(Enum other) { if (other == null) { goto IL_128; } goto IL_17E; uint arg_132_0; while (true) { IL_12D: uint num; switch ((num = (arg_132_0 ^ 680727599u)) % 12u) { case 0u: goto IL_128; case 1u: this.SourceContext.MergeFrom(other.SourceContext); arg_132_0 = 1637777896u; continue; case 2u: arg_132_0 = (((this.sourceContext_ == null) ? 1917014278u : 290389564u) ^ num * 897249047u); continue; case 3u: this.sourceContext_ = new SourceContext(); arg_132_0 = (num * 2332069736u ^ 331275646u); continue; case 4u: this.Syntax = other.Syntax; arg_132_0 = (num * 3092998437u ^ 3086424557u); continue; case 5u: return; case 7u: this.enumvalue_.Add(other.enumvalue_); arg_132_0 = 207582298u; continue; case 8u: goto IL_17E; case 9u: this.options_.Add(other.options_); arg_132_0 = (((other.sourceContext_ == null) ? 1569350962u : 500169443u) ^ num * 274732594u); continue; case 10u: this.Name = other.Name; arg_132_0 = (num * 1235462621u ^ 973384326u); continue; case 11u: arg_132_0 = ((other.Syntax != Syntax.SYNTAX_PROTO2) ? 963732999u : 2100559397u); continue; } break; } return; IL_128: arg_132_0 = 1606897650u; goto IL_12D; IL_17E: arg_132_0 = ((Enum.smethod_2(other.Name) == 0) ? 1529945420u : 1249382269u); goto IL_12D; } public void MergeFrom(CodedInputStream input) { while (true) { IL_24C: uint num; uint arg_1E4_0 = ((num = input.ReadTag()) == 0u) ? 2438217364u : 3601903610u; while (true) { uint num2; switch ((num2 = (arg_1E4_0 ^ 3148470077u)) % 19u) { case 0u: this.Name = input.ReadString(); arg_1E4_0 = 2356201729u; continue; case 1u: arg_1E4_0 = ((num > 18u) ? 4036028587u : 4072887269u); continue; case 2u: this.syntax_ = (Syntax)input.ReadEnum(); arg_1E4_0 = 2356201729u; continue; case 3u: arg_1E4_0 = (((num != 34u) ? 3734350188u : 4153943160u) ^ num2 * 420117721u); continue; case 4u: input.SkipLastField(); arg_1E4_0 = 2857703609u; continue; case 5u: this.enumvalue_.AddEntriesFrom(input, Enum._repeated_enumvalue_codec); arg_1E4_0 = 2356201729u; continue; case 7u: arg_1E4_0 = ((num == 26u) ? 3634850451u : 3837480599u); continue; case 8u: input.ReadMessage(this.sourceContext_); arg_1E4_0 = 2356201729u; continue; case 9u: arg_1E4_0 = (((num == 18u) ? 2086820956u : 795988050u) ^ num2 * 304719182u); continue; case 10u: this.sourceContext_ = new SourceContext(); arg_1E4_0 = (num2 * 362958596u ^ 3326029782u); continue; case 11u: arg_1E4_0 = (num2 * 2737512034u ^ 3862176137u); continue; case 12u: arg_1E4_0 = (((num != 40u) ? 3156659778u : 3337719861u) ^ num2 * 3158042064u); continue; case 13u: arg_1E4_0 = (((num == 10u) ? 3810754177u : 4131919989u) ^ num2 * 1506371928u); continue; case 14u: goto IL_24C; case 15u: arg_1E4_0 = ((this.sourceContext_ != null) ? 2282154210u : 2434721328u); continue; case 16u: this.options_.AddEntriesFrom(input, Enum._repeated_options_codec); arg_1E4_0 = 2356201729u; continue; case 17u: arg_1E4_0 = (num2 * 977052978u ^ 698700476u); continue; case 18u: arg_1E4_0 = 3601903610u; continue; } return; } } } static Enum() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_7B: uint arg_5F_0 = 872438385u; while (true) { uint num; switch ((num = (arg_5F_0 ^ 948318239u)) % 4u) { case 0u: goto IL_7B; case 2u: Enum._repeated_enumvalue_codec = FieldCodec.ForMessage<EnumValue>(18u, EnumValue.Parser); arg_5F_0 = (num * 286300465u ^ 2298908978u); continue; case 3u: Enum._repeated_options_codec = FieldCodec.ForMessage<Option>(26u, Option.Parser); arg_5F_0 = (num * 1331024777u ^ 2765478853u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/ServiceDescriptor.cs using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class ServiceDescriptor : DescriptorBase { private readonly ServiceDescriptorProto proto; private readonly IList<MethodDescriptor> methods; public override string Name { get { return this.proto.Name; } } internal ServiceDescriptorProto Proto { get { return this.proto; } } public IList<MethodDescriptor> Methods { get { return this.methods; } } internal ServiceDescriptor(ServiceDescriptorProto proto, FileDescriptor file, int index) : base(file, file.ComputeFullName(null, proto.Name), index) { ServiceDescriptor __4__this = this; this.proto = proto; this.methods = DescriptorUtil.ConvertAndMakeReadOnly<MethodDescriptorProto, MethodDescriptor>(proto.Method, (MethodDescriptorProto method, int i) => new MethodDescriptor(method, file, __4__this, i)); file.DescriptorPool.AddSymbol(this); } public MethodDescriptor FindMethodByName(string name) { return base.File.DescriptorPool.FindSymbol<MethodDescriptor>(ServiceDescriptor.smethod_0(base.FullName, Module.smethod_37<string>(3886401134u), name)); } internal void CrossLink() { IEnumerator<MethodDescriptor> enumerator = this.methods.GetEnumerator(); try { while (true) { IL_60: int arg_38_0 = ServiceDescriptor.smethod_1(enumerator) ? -766175278 : -1943296255; while (true) { switch ((arg_38_0 ^ -691578849) % 4) { case 0: goto IL_60; case 1: enumerator.Current.CrossLink(); arg_38_0 = -172422773; continue; case 3: arg_38_0 = -766175278; continue; } goto Block_3; } } Block_3:; } finally { if (enumerator != null) { while (true) { IL_A1: uint arg_89_0 = 2295009578u; while (true) { uint num; switch ((num = (arg_89_0 ^ 3603388447u)) % 3u) { case 0u: goto IL_A1; case 1u: ServiceDescriptor.smethod_2(enumerator); arg_89_0 = (num * 898590588u ^ 3854439035u); continue; } goto Block_7; } } Block_7:; } } } static string smethod_0(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } static bool smethod_1(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_2(IDisposable idisposable_0) { idisposable_0.Dispose(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Value.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Value : IMessage<Value>, IEquatable<Value>, IDeepCloneable<Value>, IMessage { public enum KindOneofCase { None, NullValue, NumberValue, StringValue, BoolValue, StructValue, ListValue } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Value.__c __9 = new Value.__c(); internal Value cctor>b__55_0() { return new Value(); } } private static readonly MessageParser<Value> _parser = new MessageParser<Value>(new Func<Value>(Value.__c.__9.<.cctor>b__55_0)); public const int NullValueFieldNumber = 1; public const int NumberValueFieldNumber = 2; public const int StringValueFieldNumber = 3; public const int BoolValueFieldNumber = 4; public const int StructValueFieldNumber = 5; public const int ListValueFieldNumber = 6; private object kind_; private Value.KindOneofCase kindCase_; public static MessageParser<Value> Parser { get { return Value._parser; } } public static MessageDescriptor Descriptor { get { return StructReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Value.Descriptor; } } public NullValue NullValue { get { if (this.kindCase_ != Value.KindOneofCase.NullValue) { return NullValue.NULL_VALUE; } return (NullValue)this.kind_; } set { this.kind_ = value; this.kindCase_ = Value.KindOneofCase.NullValue; } } public double NumberValue { get { if (this.kindCase_ != Value.KindOneofCase.NumberValue) { return 0.0; } return (double)this.kind_; } set { this.kind_ = value; this.kindCase_ = Value.KindOneofCase.NumberValue; } } public string StringValue { get { if (this.kindCase_ != Value.KindOneofCase.StringValue) { return ""; } return (string)this.kind_; } set { this.kind_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); while (true) { IL_49: uint arg_31_0 = 1219508036u; while (true) { uint num; switch ((num = (arg_31_0 ^ 160639072u)) % 3u) { case 0u: goto IL_49; case 2u: this.kindCase_ = Value.KindOneofCase.StringValue; arg_31_0 = (num * 3704655072u ^ 2062357241u); continue; } return; } } } } public bool BoolValue { get { return this.kindCase_ == Value.KindOneofCase.BoolValue && (bool)this.kind_; } set { this.kind_ = value; this.kindCase_ = Value.KindOneofCase.BoolValue; } } public Struct StructValue { get { if (this.kindCase_ != Value.KindOneofCase.StructValue) { return null; } return (Struct)this.kind_; } set { this.kind_ = value; this.kindCase_ = ((value == null) ? Value.KindOneofCase.None : Value.KindOneofCase.StructValue); } } public ListValue ListValue { get { if (this.kindCase_ != Value.KindOneofCase.ListValue) { return null; } return (ListValue)this.kind_; } set { this.kind_ = value; while (true) { IL_36: int arg_20_0 = 1941352082; while (true) { switch ((arg_20_0 ^ 1003313620) % 3) { case 0: goto IL_36; case 2: this.kindCase_ = ((value == null) ? Value.KindOneofCase.None : Value.KindOneofCase.ListValue); arg_20_0 = 362592831; continue; } return; } } } } public Value.KindOneofCase KindCase { get { return this.kindCase_; } } public Value() { } public Value(Value other) : this() { switch (other.KindCase) { case Value.KindOneofCase.NullValue: this.NullValue = other.NullValue; return; case Value.KindOneofCase.NumberValue: this.NumberValue = other.NumberValue; return; case Value.KindOneofCase.StringValue: this.StringValue = other.StringValue; return; case Value.KindOneofCase.BoolValue: this.BoolValue = other.BoolValue; return; case Value.KindOneofCase.StructValue: this.StructValue = other.StructValue.Clone(); return; case Value.KindOneofCase.ListValue: this.ListValue = other.ListValue.Clone(); return; default: return; } } public Value Clone() { return new Value(this); } public void ClearKind() { this.kindCase_ = Value.KindOneofCase.None; this.kind_ = null; } public override bool Equals(object other) { return this.Equals(other as Value); } public bool Equals(Value other) { if (other == null) { goto IL_F6; } goto IL_1B4; int arg_14E_0; while (true) { IL_149: switch ((arg_14E_0 ^ -1157632992) % 19) { case 1: return false; case 2: return false; case 3: arg_14E_0 = ((this.NumberValue != other.NumberValue) ? -2065761332 : -1377871954); continue; case 4: return false; case 5: return false; case 6: arg_14E_0 = ((this.NullValue == other.NullValue) ? -1269934402 : -887493226); continue; case 7: goto IL_F6; case 8: arg_14E_0 = (Value.smethod_1(this.ListValue, other.ListValue) ? -772368568 : -80128937); continue; case 9: return false; case 10: arg_14E_0 = ((this.KindCase == other.KindCase) ? -1481722621 : -2094044351); continue; case 11: arg_14E_0 = ((this.BoolValue == other.BoolValue) ? -1663207624 : -304973300); continue; case 12: arg_14E_0 = (Value.smethod_1(this.StructValue, other.StructValue) ? -146472511 : -170554786); continue; case 13: return true; case 14: goto IL_1B4; case 15: return false; case 16: return false; case 17: return false; case 18: arg_14E_0 = ((!Value.smethod_0(this.StringValue, other.StringValue)) ? -1899277804 : -722029849); continue; } break; } return true; IL_F6: arg_14E_0 = -1796955242; goto IL_149; IL_1B4: arg_14E_0 = ((other == this) ? -514571654 : -1694549476); goto IL_149; } public override int GetHashCode() { int num = 1; if (this.kindCase_ == Value.KindOneofCase.NullValue) { goto IL_45; } goto IL_1D8; uint arg_187_0; while (true) { IL_182: uint num2; switch ((num2 = (arg_187_0 ^ 292250634u)) % 13u) { case 0u: arg_187_0 = ((this.kindCase_ == Value.KindOneofCase.ListValue) ? 1415421870u : 257165338u); continue; case 1u: num ^= this.StructValue.GetHashCode(); arg_187_0 = (num2 * 1035520549u ^ 3580176533u); continue; case 2u: num ^= this.ListValue.GetHashCode(); arg_187_0 = (num2 * 1917418421u ^ 736083694u); continue; case 3u: num ^= this.NumberValue.GetHashCode(); arg_187_0 = (num2 * 2832867848u ^ 3824330689u); continue; case 4u: num ^= this.NullValue.GetHashCode(); arg_187_0 = (num2 * 313496679u ^ 491854507u); continue; case 5u: goto IL_1D8; case 6u: arg_187_0 = ((this.kindCase_ != Value.KindOneofCase.StructValue) ? 1761912941u : 497580946u); continue; case 7u: arg_187_0 = ((this.kindCase_ != Value.KindOneofCase.StringValue) ? 200565252u : 759389871u); continue; case 8u: num ^= this.BoolValue.GetHashCode(); arg_187_0 = (num2 * 3727320478u ^ 2013890702u); continue; case 9u: num ^= this.StringValue.GetHashCode(); arg_187_0 = (num2 * 3409724289u ^ 1723784737u); continue; case 10u: goto IL_45; case 12u: arg_187_0 = ((this.kindCase_ == Value.KindOneofCase.BoolValue) ? 913408809u : 2105605652u); continue; } break; } return num ^ (int)this.kindCase_; IL_45: arg_187_0 = 1552725299u; goto IL_182; IL_1D8: arg_187_0 = ((this.kindCase_ == Value.KindOneofCase.NumberValue) ? 1604369478u : 2049080737u); goto IL_182; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.kindCase_ == Value.KindOneofCase.NullValue) { goto IL_1A2; } goto IL_254; uint arg_1F0_0; while (true) { IL_1EB: uint num; switch ((num = (arg_1F0_0 ^ 2300104802u)) % 18u) { case 0u: arg_1F0_0 = ((this.kindCase_ == Value.KindOneofCase.ListValue) ? 2181047854u : 3062471772u); continue; case 1u: arg_1F0_0 = ((this.kindCase_ != Value.KindOneofCase.StringValue) ? 2338725130u : 3734549707u); continue; case 2u: goto IL_1A2; case 3u: output.WriteRawTag(42); output.WriteMessage(this.StructValue); arg_1F0_0 = (num * 947883934u ^ 453013432u); continue; case 5u: arg_1F0_0 = ((this.kindCase_ == Value.KindOneofCase.StructValue) ? 2847654545u : 3519545666u); continue; case 6u: output.WriteRawTag(50); arg_1F0_0 = (num * 4206287955u ^ 3538988526u); continue; case 7u: output.WriteRawTag(32); arg_1F0_0 = (num * 1780016933u ^ 1956500739u); continue; case 8u: arg_1F0_0 = ((this.kindCase_ != Value.KindOneofCase.BoolValue) ? 4196695423u : 2800780081u); continue; case 9u: output.WriteRawTag(8); arg_1F0_0 = (num * 2157477268u ^ 27745503u); continue; case 10u: goto IL_254; case 11u: output.WriteEnum((int)this.NullValue); arg_1F0_0 = (num * 2672844199u ^ 2544000123u); continue; case 12u: output.WriteMessage(this.ListValue); arg_1F0_0 = (num * 1543478822u ^ 3910927276u); continue; case 13u: output.WriteRawTag(26); arg_1F0_0 = (num * 3519178911u ^ 562717185u); continue; case 14u: output.WriteBool(this.BoolValue); arg_1F0_0 = (num * 1716930570u ^ 2374100819u); continue; case 15u: output.WriteDouble(this.NumberValue); arg_1F0_0 = (num * 3102080262u ^ 291641025u); continue; case 16u: output.WriteString(this.StringValue); arg_1F0_0 = (num * 1139137887u ^ 2778431974u); continue; case 17u: output.WriteRawTag(17); arg_1F0_0 = (num * 2653324029u ^ 2557875940u); continue; } break; } return; IL_1A2: arg_1F0_0 = 3659391527u; goto IL_1EB; IL_254: arg_1F0_0 = ((this.kindCase_ != Value.KindOneofCase.NumberValue) ? 2332457047u : 2867497769u); goto IL_1EB; } public int CalculateSize() { int num = 0; while (true) { IL_1DE: uint arg_199_0 = 4188091112u; while (true) { uint num2; switch ((num2 = (arg_199_0 ^ 2412404914u)) % 14u) { case 0u: goto IL_1DE; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.StructValue); arg_199_0 = (num2 * 1166252893u ^ 820998969u); continue; case 2u: arg_199_0 = ((this.kindCase_ != Value.KindOneofCase.NumberValue) ? 2260815769u : 2698281472u); continue; case 3u: arg_199_0 = ((this.kindCase_ != Value.KindOneofCase.StringValue) ? 2535585282u : 2759116489u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ListValue); arg_199_0 = (num2 * 1103773483u ^ 3524489031u); continue; case 6u: num += 9; arg_199_0 = (num2 * 1917190313u ^ 3670992923u); continue; case 7u: arg_199_0 = ((this.kindCase_ == Value.KindOneofCase.StructValue) ? 2682767557u : 4254348034u); continue; case 8u: arg_199_0 = (((this.kindCase_ == Value.KindOneofCase.NullValue) ? 748834461u : 531983610u) ^ num2 * 1806729309u); continue; case 9u: num += 2; arg_199_0 = (num2 * 1544157725u ^ 3185548378u); continue; case 10u: arg_199_0 = ((this.kindCase_ == Value.KindOneofCase.BoolValue) ? 3458356209u : 2808586445u); continue; case 11u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.NullValue); arg_199_0 = (num2 * 1129035340u ^ 242252500u); continue; case 12u: arg_199_0 = ((this.kindCase_ != Value.KindOneofCase.ListValue) ? 2965984374u : 2236826017u); continue; case 13u: num += 1 + CodedOutputStream.ComputeStringSize(this.StringValue); arg_199_0 = (num2 * 3875489008u ^ 1784170834u); continue; } return num; } } return num; } public void MergeFrom(Value other) { if (other != null) { goto IL_A6; } IL_06: int arg_49_0 = 2113175860; goto IL_44; IL_0D: this.NumberValue = other.NumberValue; arg_49_0 = 1635569781; goto IL_44; IL_20: this.BoolValue = other.BoolValue; arg_49_0 = 405745041; goto IL_44; IL_33: this.NullValue = other.NullValue; arg_49_0 = 624850428; IL_44: switch ((arg_49_0 ^ 1589847026) % 14) { case 0: return; case 1: goto IL_33; case 2: goto IL_8C; case 3: IL_A6: switch (other.KindCase) { case Value.KindOneofCase.NullValue: goto IL_33; case Value.KindOneofCase.NumberValue: goto IL_0D; case Value.KindOneofCase.StringValue: goto IL_E0; case Value.KindOneofCase.BoolValue: goto IL_20; case Value.KindOneofCase.StructValue: goto IL_D3; case Value.KindOneofCase.ListValue: goto IL_8C; default: arg_49_0 = 199445090; goto IL_44; } break; case 4: return; case 5: return; case 6: return; case 7: goto IL_D3; case 8: goto IL_E0; case 9: goto IL_20; case 11: return; case 12: goto IL_0D; case 13: goto IL_06; } return; IL_8C: this.ListValue = other.ListValue; arg_49_0 = 2123779936; goto IL_44; IL_D3: this.StructValue = other.StructValue; return; IL_E0: this.StringValue = other.StringValue; } public void MergeFrom(CodedInputStream input) { while (true) { IL_349: uint num; uint arg_2C1_0 = ((num = input.ReadTag()) != 0u) ? 2245878476u : 2326086732u; while (true) { uint num2; switch ((num2 = (arg_2C1_0 ^ 3787839810u)) % 27u) { case 0u: input.SkipLastField(); arg_2C1_0 = 3640810675u; continue; case 1u: this.BoolValue = input.ReadBool(); arg_2C1_0 = 3640810675u; continue; case 2u: { ListValue listValue; this.ListValue = listValue; arg_2C1_0 = (num2 * 1902871188u ^ 3831713071u); continue; } case 3u: { ListValue listValue; input.ReadMessage(listValue); arg_2C1_0 = 2667384409u; continue; } case 4u: { Struct @struct; @struct.MergeFrom(this.StructValue); arg_2C1_0 = (num2 * 3419195227u ^ 1452483453u); continue; } case 5u: { ListValue listValue = new ListValue(); arg_2C1_0 = ((this.kindCase_ != Value.KindOneofCase.ListValue) ? 4016354824u : 2150149107u); continue; } case 6u: arg_2C1_0 = (((num != 8u) ? 1193115870u : 426980586u) ^ num2 * 2415847765u); continue; case 7u: arg_2C1_0 = (((num != 17u) ? 4044085145u : 3598724209u) ^ num2 * 2580795978u); continue; case 8u: goto IL_349; case 9u: arg_2C1_0 = (((num != 42u) ? 1065250534u : 448162672u) ^ num2 * 4061368535u); continue; case 10u: { Struct @struct; input.ReadMessage(@struct); this.StructValue = @struct; arg_2C1_0 = 3645759884u; continue; } case 11u: arg_2C1_0 = (((this.kindCase_ == Value.KindOneofCase.StructValue) ? 2595769177u : 4003554100u) ^ num2 * 4193559948u); continue; case 12u: this.StringValue = input.ReadString(); arg_2C1_0 = 3640810675u; continue; case 13u: this.kindCase_ = Value.KindOneofCase.NullValue; arg_2C1_0 = (num2 * 2393321188u ^ 728842012u); continue; case 14u: arg_2C1_0 = (((num == 26u) ? 3654590192u : 3748014307u) ^ num2 * 1061369338u); continue; case 15u: arg_2C1_0 = ((num > 26u) ? 3973867417u : 2551855103u); continue; case 16u: arg_2C1_0 = (num2 * 316280825u ^ 171773677u); continue; case 18u: arg_2C1_0 = (num2 * 609281770u ^ 1872618855u); continue; case 19u: this.NumberValue = input.ReadDouble(); arg_2C1_0 = 3640810675u; continue; case 20u: this.kind_ = input.ReadEnum(); arg_2C1_0 = 2773977357u; continue; case 21u: arg_2C1_0 = (num2 * 3647329935u ^ 2155039330u); continue; case 22u: { ListValue listValue; listValue.MergeFrom(this.ListValue); arg_2C1_0 = (num2 * 661050338u ^ 1036621130u); continue; } case 23u: arg_2C1_0 = (((num == 50u) ? 3854850316u : 3088890603u) ^ num2 * 2762288670u); continue; case 24u: arg_2C1_0 = ((num != 32u) ? 2614328064u : 3757124447u); continue; case 25u: arg_2C1_0 = 2245878476u; continue; case 26u: { Struct @struct = new Struct(); arg_2C1_0 = 2415793096u; continue; } } return; } } } public static Value ForString(string value) { Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); return new Value { StringValue = value }; } public static Value ForNumber(double value) { return new Value { NumberValue = value }; } public static Value ForBool(bool value) { return new Value { BoolValue = value }; } public static Value ForNull() { return new Value { NullValue = NullValue.NULL_VALUE }; } public static Value ForList(params Value[] values) { Preconditions.CheckNotNull<Value[]>(values, Module.smethod_35<string>(1960906968u)); return new Value { ListValue = new ListValue { Values = { values } } }; } public static Value ForStruct(Struct value) { Preconditions.CheckNotNull<Struct>(value, Module.smethod_36<string>(1095253436u)); return new Value { StructValue = value }; } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } } } <file_sep>/Bgs.Protocol.Connection.V1/ConnectRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class ConnectRequest : IMessage<ConnectRequest>, IEquatable<ConnectRequest>, IDeepCloneable<ConnectRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ConnectRequest.__c __9 = new ConnectRequest.__c(); internal ConnectRequest cctor>b__34_0() { return new ConnectRequest(); } } private static readonly MessageParser<ConnectRequest> _parser = new MessageParser<ConnectRequest>(new Func<ConnectRequest>(ConnectRequest.__c.__9.<.cctor>b__34_0)); public const int ClientIdFieldNumber = 1; private ProcessId clientId_; public const int BindRequestFieldNumber = 2; private BindRequest bindRequest_; public const int UseBindlessRpcFieldNumber = 3; private bool useBindlessRpc_; public static MessageParser<ConnectRequest> Parser { get { return ConnectRequest._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return ConnectRequest.Descriptor; } } public ProcessId ClientId { get { return this.clientId_; } set { this.clientId_ = value; } } public BindRequest BindRequest { get { return this.bindRequest_; } set { this.bindRequest_ = value; } } public bool UseBindlessRpc { get { return this.useBindlessRpc_; } set { this.useBindlessRpc_ = value; } } public ConnectRequest() { } public ConnectRequest(ConnectRequest other) : this() { while (true) { IL_6B: int arg_51_0 = 974275983; while (true) { switch ((arg_51_0 ^ 1649380609) % 4) { case 0: goto IL_6B; case 1: this.BindRequest = ((other.bindRequest_ != null) ? other.BindRequest.Clone() : null); arg_51_0 = 1594688222; continue; case 2: this.ClientId = ((other.clientId_ != null) ? other.ClientId.Clone() : null); arg_51_0 = 1676444796; continue; } goto Block_3; } } Block_3: this.useBindlessRpc_ = other.useBindlessRpc_; } public ConnectRequest Clone() { return new ConnectRequest(this); } public override bool Equals(object other) { return this.Equals(other as ConnectRequest); } public bool Equals(ConnectRequest other) { if (other == null) { goto IL_3F; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ -1010291281) % 11) { case 0: return false; case 1: arg_A1_0 = (ConnectRequest.smethod_0(this.ClientId, other.ClientId) ? -1624537076 : -1341276263); continue; case 2: return false; case 3: return true; case 4: arg_A1_0 = ((!ConnectRequest.smethod_0(this.BindRequest, other.BindRequest)) ? -828072472 : -146396006); continue; case 5: goto IL_E7; case 7: return false; case 8: return false; case 9: goto IL_3F; case 10: arg_A1_0 = ((this.UseBindlessRpc == other.UseBindlessRpc) ? -36175415 : -2044522125); continue; } break; } return true; IL_3F: arg_A1_0 = -206111548; goto IL_9C; IL_E7: arg_A1_0 = ((other == this) ? -1961699776 : -2096867863); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_101: uint arg_D5_0 = 2744260730u; while (true) { uint num2; switch ((num2 = (arg_D5_0 ^ 2856068951u)) % 8u) { case 0u: goto IL_101; case 1u: num ^= ConnectRequest.smethod_1(this.ClientId); arg_D5_0 = (num2 * 3477154649u ^ 2618185112u); continue; case 2u: num ^= ConnectRequest.smethod_1(this.BindRequest); arg_D5_0 = (num2 * 3460489670u ^ 13017039u); continue; case 4u: arg_D5_0 = (this.UseBindlessRpc ? 4007491472u : 3059152500u); continue; case 5u: arg_D5_0 = (((this.clientId_ == null) ? 884979453u : 433912218u) ^ num2 * 2123788196u); continue; case 6u: arg_D5_0 = ((this.bindRequest_ == null) ? 4114987555u : 2828428869u); continue; case 7u: num ^= this.UseBindlessRpc.GetHashCode(); arg_D5_0 = (num2 * 84725548u ^ 84426048u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.clientId_ != null) { goto IL_3E; } goto IL_E8; uint arg_B1_0; while (true) { IL_AC: uint num; switch ((num = (arg_B1_0 ^ 3534117116u)) % 7u) { case 0u: output.WriteRawTag(24); output.WriteBool(this.UseBindlessRpc); arg_B1_0 = (num * 2787811467u ^ 1695285745u); continue; case 1u: output.WriteRawTag(10); output.WriteMessage(this.ClientId); arg_B1_0 = (num * 4230749695u ^ 1365074559u); continue; case 2u: output.WriteRawTag(18); output.WriteMessage(this.BindRequest); arg_B1_0 = (num * 2610819149u ^ 1698328204u); continue; case 3u: goto IL_3E; case 4u: arg_B1_0 = (this.UseBindlessRpc ? 3238857668u : 3694472857u); continue; case 5u: goto IL_E8; } break; } return; IL_3E: arg_B1_0 = 3993472570u; goto IL_AC; IL_E8: arg_B1_0 = ((this.bindRequest_ == null) ? 3136060425u : 3226722277u); goto IL_AC; } public int CalculateSize() { int num = 0; while (true) { IL_F5: uint arg_C9_0 = 3595148154u; while (true) { uint num2; switch ((num2 = (arg_C9_0 ^ 3199973804u)) % 8u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.BindRequest); arg_C9_0 = (num2 * 2277659983u ^ 2589349913u); continue; case 1u: num += 2; arg_C9_0 = (num2 * 2532710041u ^ 3587581951u); continue; case 3u: arg_C9_0 = ((this.bindRequest_ != null) ? 3819679604u : 3714751665u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ClientId); arg_C9_0 = (num2 * 3389745774u ^ 1905562591u); continue; case 5u: arg_C9_0 = ((!this.UseBindlessRpc) ? 3678631742u : 2453820869u); continue; case 6u: arg_C9_0 = (((this.clientId_ != null) ? 3768983612u : 4287487611u) ^ num2 * 973834210u); continue; case 7u: goto IL_F5; } return num; } } return num; } public void MergeFrom(ConnectRequest other) { if (other == null) { goto IL_A6; } goto IL_197; uint arg_147_0; while (true) { IL_142: uint num; switch ((num = (arg_147_0 ^ 3106712805u)) % 13u) { case 0u: goto IL_197; case 1u: return; case 2u: this.ClientId.MergeFrom(other.ClientId); arg_147_0 = 2221389944u; continue; case 3u: arg_147_0 = ((!other.UseBindlessRpc) ? 3997822109u : 2378936070u); continue; case 4u: this.BindRequest.MergeFrom(other.BindRequest); arg_147_0 = 3130869119u; continue; case 5u: arg_147_0 = (((this.bindRequest_ == null) ? 2468135459u : 2705724859u) ^ num * 860489117u); continue; case 6u: this.bindRequest_ = new BindRequest(); arg_147_0 = (num * 1485037067u ^ 1712956727u); continue; case 8u: goto IL_A6; case 9u: this.clientId_ = new ProcessId(); arg_147_0 = (num * 1077431259u ^ 85333283u); continue; case 10u: arg_147_0 = (((this.clientId_ == null) ? 919371740u : 1715507902u) ^ num * 1656500431u); continue; case 11u: this.UseBindlessRpc = other.UseBindlessRpc; arg_147_0 = (num * 3660935869u ^ 3826128906u); continue; case 12u: arg_147_0 = ((other.bindRequest_ == null) ? 3130869119u : 3200117558u); continue; } break; } return; IL_A6: arg_147_0 = 2639365409u; goto IL_142; IL_197: arg_147_0 = ((other.clientId_ != null) ? 2373019336u : 2221389944u); goto IL_142; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1F0: uint num; uint arg_190_0 = ((num = input.ReadTag()) != 0u) ? 1371810289u : 752352594u; while (true) { uint num2; switch ((num2 = (arg_190_0 ^ 306906795u)) % 17u) { case 0u: arg_190_0 = 1371810289u; continue; case 1u: arg_190_0 = (num2 * 1515340795u ^ 230630611u); continue; case 2u: arg_190_0 = (num2 * 3233260783u ^ 1950446096u); continue; case 3u: input.SkipLastField(); arg_190_0 = (num2 * 2223825229u ^ 917704656u); continue; case 5u: this.clientId_ = new ProcessId(); arg_190_0 = (num2 * 2739254603u ^ 1620559402u); continue; case 6u: arg_190_0 = (num2 * 1185139482u ^ 1563886363u); continue; case 7u: arg_190_0 = ((num == 10u) ? 1020026748u : 226027239u); continue; case 8u: arg_190_0 = (((num != 18u) ? 2190378563u : 3621681721u) ^ num2 * 2181607462u); continue; case 9u: arg_190_0 = ((this.clientId_ == null) ? 1116751169u : 1673826724u); continue; case 10u: goto IL_1F0; case 11u: arg_190_0 = (((num == 24u) ? 4086085689u : 3341415962u) ^ num2 * 802951963u); continue; case 12u: input.ReadMessage(this.bindRequest_); arg_190_0 = 1955026354u; continue; case 13u: arg_190_0 = ((this.bindRequest_ == null) ? 22822262u : 2100341830u); continue; case 14u: input.ReadMessage(this.clientId_); arg_190_0 = 1596127524u; continue; case 15u: this.UseBindlessRpc = input.ReadBool(); arg_190_0 = 1755791505u; continue; case 16u: this.bindRequest_ = new BindRequest(); arg_190_0 = (num2 * 1139545627u ^ 1952768521u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/MethodDescriptor.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class MethodDescriptor : DescriptorBase { private readonly MethodDescriptorProto proto; private readonly ServiceDescriptor service; private MessageDescriptor inputType; private MessageDescriptor outputType; public ServiceDescriptor Service { get { return this.service; } } public MessageDescriptor InputType { get { return this.inputType; } } public MessageDescriptor OutputType { get { return this.outputType; } } public bool IsClientStreaming { get { return this.proto.ClientStreaming; } } public bool IsServerStreaming { get { return this.proto.ServerStreaming; } } internal MethodDescriptorProto Proto { get { return this.proto; } } public override string Name { get { return this.proto.Name; } } internal MethodDescriptor(MethodDescriptorProto proto, FileDescriptor file, ServiceDescriptor parent, int index) : base(file, MethodDescriptor.smethod_0(parent.FullName, Module.smethod_35<string>(3143151842u), proto.Name), index) { while (true) { IL_5E: uint arg_46_0 = 243061988u; while (true) { uint num; switch ((num = (arg_46_0 ^ 209767462u)) % 3u) { case 1u: this.proto = proto; this.service = parent; arg_46_0 = (num * 333704512u ^ 868198461u); continue; case 2u: goto IL_5E; } goto Block_1; } } Block_1: file.DescriptorPool.AddSymbol(this); } internal void CrossLink() { IDescriptor descriptor = base.File.DescriptorPool.LookupSymbol(this.Proto.InputType, this); while (true) { IL_FA: uint arg_C9_0 = 1325031413u; while (true) { uint num; switch ((num = (arg_C9_0 ^ 1162977085u)) % 9u) { case 0u: goto IL_101; case 1u: this.outputType = (MessageDescriptor)descriptor; arg_C9_0 = 629215157u; continue; case 2u: arg_C9_0 = (((descriptor is MessageDescriptor) ? 1793996950u : 1340472884u) ^ num * 3377966943u); continue; case 3u: this.inputType = (MessageDescriptor)descriptor; arg_C9_0 = 927331778u; continue; case 4u: goto IL_FA; case 6u: descriptor = base.File.DescriptorPool.LookupSymbol(this.Proto.OutputType, this); arg_C9_0 = (num * 1183744827u ^ 2149459337u); continue; case 7u: arg_C9_0 = (((!(descriptor is MessageDescriptor)) ? 119396225u : 1532768422u) ^ num * 307037310u); continue; case 8u: goto IL_12C; } goto Block_3; } } Block_3: return; IL_101: throw new DescriptorValidationException(this, MethodDescriptor.smethod_0(Module.smethod_34<string>(1801001672u), this.Proto.InputType, Module.smethod_33<string>(206307083u))); IL_12C: throw new DescriptorValidationException(this, MethodDescriptor.smethod_0(Module.smethod_34<string>(1801001672u), this.Proto.OutputType, Module.smethod_34<string>(4088171961u))); } static string smethod_0(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } } } <file_sep>/Bgs.Protocol.Account.V1/GameStatus.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameStatus : IMessage<GameStatus>, IEquatable<GameStatus>, IDeepCloneable<GameStatus>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameStatus.__c __9 = new GameStatus.__c(); internal GameStatus cctor>b__49_0() { return new GameStatus(); } } private static readonly MessageParser<GameStatus> _parser = new MessageParser<GameStatus>(new Func<GameStatus>(GameStatus.__c.__9.<.cctor>b__49_0)); public const int IsSuspendedFieldNumber = 4; private bool isSuspended_; public const int IsBannedFieldNumber = 5; private bool isBanned_; public const int SuspensionExpiresFieldNumber = 6; private ulong suspensionExpires_; public const int ProgramFieldNumber = 7; private uint program_; public const int IsLockedFieldNumber = 8; private bool isLocked_; public const int IsBamUnlockableFieldNumber = 9; private bool isBamUnlockable_; public static MessageParser<GameStatus> Parser { get { return GameStatus._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[24]; } } MessageDescriptor IMessage.Descriptor { get { return GameStatus.Descriptor; } } public bool IsSuspended { get { return this.isSuspended_; } set { this.isSuspended_ = value; } } public bool IsBanned { get { return this.isBanned_; } set { this.isBanned_ = value; } } public ulong SuspensionExpires { get { return this.suspensionExpires_; } set { this.suspensionExpires_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public bool IsLocked { get { return this.isLocked_; } set { this.isLocked_ = value; } } public bool IsBamUnlockable { get { return this.isBamUnlockable_; } set { this.isBamUnlockable_ = value; } } public GameStatus() { } public GameStatus(GameStatus other) : this() { this.isSuspended_ = other.isSuspended_; this.isBanned_ = other.isBanned_; this.suspensionExpires_ = other.suspensionExpires_; this.program_ = other.program_; this.isLocked_ = other.isLocked_; this.isBamUnlockable_ = other.isBamUnlockable_; } public GameStatus Clone() { return new GameStatus(this); } public override bool Equals(object other) { return this.Equals(other as GameStatus); } public bool Equals(GameStatus other) { if (other == null) { goto IL_18; } goto IL_173; int arg_115_0; while (true) { IL_110: switch ((arg_115_0 ^ 704938898) % 17) { case 0: arg_115_0 = ((this.IsSuspended != other.IsSuspended) ? 125779508 : 576979541); continue; case 1: arg_115_0 = ((this.Program == other.Program) ? 1552015610 : 892418761); continue; case 2: return false; case 3: return false; case 4: return false; case 5: return true; case 6: return false; case 7: arg_115_0 = ((this.IsBanned == other.IsBanned) ? 1674986449 : 1406201151); continue; case 8: goto IL_173; case 9: return false; case 10: arg_115_0 = ((this.IsBamUnlockable != other.IsBamUnlockable) ? 2031535869 : 1177791015); continue; case 12: arg_115_0 = ((this.IsLocked != other.IsLocked) ? 821005336 : 1571598494); continue; case 13: return false; case 14: return false; case 15: arg_115_0 = ((this.SuspensionExpires != other.SuspensionExpires) ? 1236992923 : 1550186207); continue; case 16: goto IL_18; } break; } return true; IL_18: arg_115_0 = 1980764523; goto IL_110; IL_173: arg_115_0 = ((other != this) ? 397469767 : 1833802045); goto IL_110; } public override int GetHashCode() { int num = 1; while (true) { IL_1FD: uint arg_1B7_0 = 2174246834u; while (true) { uint num2; switch ((num2 = (arg_1B7_0 ^ 2915265802u)) % 14u) { case 0u: arg_1B7_0 = (this.IsBanned ? 3987873133u : 2464427640u); continue; case 1u: num ^= this.IsBanned.GetHashCode(); arg_1B7_0 = (num2 * 3074323623u ^ 3624194377u); continue; case 2u: arg_1B7_0 = (this.IsBamUnlockable ? 3320264586u : 2433908111u); continue; case 4u: arg_1B7_0 = ((!this.IsLocked) ? 2812194756u : 3567744314u); continue; case 5u: arg_1B7_0 = ((this.Program != 0u) ? 2634316833u : 2711165038u); continue; case 6u: num ^= this.IsBamUnlockable.GetHashCode(); arg_1B7_0 = (num2 * 2434681340u ^ 1837493135u); continue; case 7u: goto IL_1FD; case 8u: arg_1B7_0 = (((!this.IsSuspended) ? 1534782626u : 2081865591u) ^ num2 * 3249248707u); continue; case 9u: num ^= this.IsSuspended.GetHashCode(); arg_1B7_0 = (num2 * 3787416474u ^ 3945141416u); continue; case 10u: num ^= this.IsLocked.GetHashCode(); arg_1B7_0 = (num2 * 3659852330u ^ 148469796u); continue; case 11u: num ^= this.Program.GetHashCode(); arg_1B7_0 = (num2 * 1315161629u ^ 2599168945u); continue; case 12u: arg_1B7_0 = ((this.SuspensionExpires != 0uL) ? 3180418981u : 2467715403u); continue; case 13u: num ^= this.SuspensionExpires.GetHashCode(); arg_1B7_0 = (num2 * 3283181319u ^ 1158926978u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.IsSuspended) { goto IL_1AD; } goto IL_24D; uint arg_1E9_0; while (true) { IL_1E4: uint num; switch ((num = (arg_1E9_0 ^ 3529202056u)) % 18u) { case 0u: output.WriteBool(this.IsSuspended); arg_1E9_0 = (num * 4222591131u ^ 3942372874u); continue; case 1u: output.WriteRawTag(40); arg_1E9_0 = (num * 2295273288u ^ 2367402868u); continue; case 2u: goto IL_1AD; case 3u: output.WriteFixed32(this.Program); arg_1E9_0 = (num * 1182062462u ^ 752056561u); continue; case 4u: output.WriteRawTag(64); arg_1E9_0 = (num * 321140805u ^ 174703598u); continue; case 5u: output.WriteRawTag(61); arg_1E9_0 = (num * 1352848382u ^ 781429127u); continue; case 6u: output.WriteRawTag(48); arg_1E9_0 = (num * 1950994611u ^ 901734008u); continue; case 7u: arg_1E9_0 = ((!this.IsLocked) ? 3152306185u : 4128204932u); continue; case 8u: output.WriteRawTag(32); arg_1E9_0 = (num * 2898492668u ^ 2492160696u); continue; case 9u: arg_1E9_0 = ((this.Program == 0u) ? 3323112135u : 2370381987u); continue; case 10u: output.WriteBool(this.IsBanned); arg_1E9_0 = (num * 330443539u ^ 889897889u); continue; case 12u: output.WriteUInt64(this.SuspensionExpires); arg_1E9_0 = (num * 526607474u ^ 2760145829u); continue; case 13u: arg_1E9_0 = ((this.SuspensionExpires != 0uL) ? 2192572612u : 3429488589u); continue; case 14u: output.WriteBool(this.IsLocked); arg_1E9_0 = (num * 2742460482u ^ 2121481021u); continue; case 15u: output.WriteRawTag(72); output.WriteBool(this.IsBamUnlockable); arg_1E9_0 = (num * 2291139683u ^ 3548296302u); continue; case 16u: goto IL_24D; case 17u: arg_1E9_0 = (this.IsBamUnlockable ? 3435196439u : 4114063379u); continue; } break; } return; IL_1AD: arg_1E9_0 = 2296593328u; goto IL_1E4; IL_24D: arg_1E9_0 = ((!this.IsBanned) ? 3688584829u : 2876773689u); goto IL_1E4; } public int CalculateSize() { int num = 0; if (this.IsSuspended) { goto IL_BF; } goto IL_18D; uint arg_13D_0; while (true) { IL_138: uint num2; switch ((num2 = (arg_13D_0 ^ 2722431718u)) % 13u) { case 0u: num += 2; arg_13D_0 = (num2 * 4179465297u ^ 3734901049u); continue; case 1u: arg_13D_0 = ((!this.IsLocked) ? 2741388593u : 2442345705u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SuspensionExpires); arg_13D_0 = (num2 * 1701809348u ^ 3269322603u); continue; case 3u: arg_13D_0 = ((this.SuspensionExpires != 0uL) ? 4281590670u : 2495386827u); continue; case 4u: goto IL_BF; case 5u: num += 2; arg_13D_0 = (num2 * 10920059u ^ 2937418756u); continue; case 7u: num += 2; arg_13D_0 = (num2 * 4213893559u ^ 1959316269u); continue; case 8u: goto IL_18D; case 9u: num += 2; arg_13D_0 = (num2 * 645337564u ^ 158725054u); continue; case 10u: num += 5; arg_13D_0 = (num2 * 3437042153u ^ 1542179959u); continue; case 11u: arg_13D_0 = ((!this.IsBamUnlockable) ? 3510189955u : 2401036836u); continue; case 12u: arg_13D_0 = ((this.Program != 0u) ? 2366385766u : 3264859383u); continue; } break; } return num; IL_BF: arg_13D_0 = 3432410772u; goto IL_138; IL_18D: arg_13D_0 = (this.IsBanned ? 2309442562u : 2996098845u); goto IL_138; } public void MergeFrom(GameStatus other) { if (other == null) { goto IL_DB; } goto IL_1D9; uint arg_181_0; while (true) { IL_17C: uint num; switch ((num = (arg_181_0 ^ 2494152374u)) % 15u) { case 0u: this.IsSuspended = other.IsSuspended; arg_181_0 = (num * 475771685u ^ 466501501u); continue; case 1u: arg_181_0 = ((!other.IsBanned) ? 3851206085u : 3642064365u); continue; case 2u: arg_181_0 = ((!other.IsBamUnlockable) ? 3659153738u : 3720507268u); continue; case 3u: arg_181_0 = ((other.Program != 0u) ? 3280544930u : 3630703577u); continue; case 4u: this.IsBamUnlockable = other.IsBamUnlockable; arg_181_0 = (num * 1871693306u ^ 3995698590u); continue; case 5u: goto IL_DB; case 6u: this.SuspensionExpires = other.SuspensionExpires; arg_181_0 = (num * 2128428366u ^ 2496473350u); continue; case 7u: return; case 8u: this.Program = other.Program; arg_181_0 = (num * 1934032453u ^ 709459133u); continue; case 9u: goto IL_1D9; case 10u: this.IsLocked = other.IsLocked; arg_181_0 = (num * 142262143u ^ 260556625u); continue; case 11u: this.IsBanned = other.IsBanned; arg_181_0 = (num * 2882402856u ^ 1353243133u); continue; case 12u: arg_181_0 = ((!other.IsLocked) ? 2227606025u : 3850954782u); continue; case 13u: arg_181_0 = ((other.SuspensionExpires != 0uL) ? 3959304164u : 4007000570u); continue; } break; } return; IL_DB: arg_181_0 = 3773501141u; goto IL_17C; IL_1D9: arg_181_0 = (other.IsSuspended ? 3489351683u : 2820343892u); goto IL_17C; } public void MergeFrom(CodedInputStream input) { while (true) { IL_269: uint num; uint arg_1F9_0 = ((num = input.ReadTag()) == 0u) ? 2687901265u : 4233664132u; while (true) { uint num2; switch ((num2 = (arg_1F9_0 ^ 2937249619u)) % 21u) { case 1u: this.IsBamUnlockable = input.ReadBool(); arg_1F9_0 = 2808365043u; continue; case 2u: input.SkipLastField(); arg_1F9_0 = 2808365043u; continue; case 3u: this.SuspensionExpires = input.ReadUInt64(); arg_1F9_0 = 4200563411u; continue; case 4u: this.IsSuspended = input.ReadBool(); arg_1F9_0 = 2808365043u; continue; case 5u: arg_1F9_0 = ((num == 61u) ? 3868692083u : 2566828164u); continue; case 6u: arg_1F9_0 = (num2 * 1281090770u ^ 1586025747u); continue; case 7u: arg_1F9_0 = (num2 * 2519876589u ^ 4161261364u); continue; case 8u: arg_1F9_0 = (((num == 72u) ? 752205734u : 1397204880u) ^ num2 * 3135799358u); continue; case 9u: arg_1F9_0 = (((num != 40u) ? 366933030u : 1822645494u) ^ num2 * 904805659u); continue; case 10u: arg_1F9_0 = ((num > 48u) ? 2445081200u : 3594365350u); continue; case 11u: arg_1F9_0 = (num2 * 2456076982u ^ 1824474867u); continue; case 12u: goto IL_269; case 13u: this.IsLocked = input.ReadBool(); arg_1F9_0 = 2808365043u; continue; case 14u: arg_1F9_0 = (((num == 48u) ? 226402797u : 89642483u) ^ num2 * 1124960321u); continue; case 15u: arg_1F9_0 = (((num == 32u) ? 925881250u : 2134855725u) ^ num2 * 2641605395u); continue; case 16u: this.Program = input.ReadFixed32(); arg_1F9_0 = 3073369251u; continue; case 17u: arg_1F9_0 = (((num != 64u) ? 2798207785u : 2166756900u) ^ num2 * 2142774483u); continue; case 18u: this.IsBanned = input.ReadBool(); arg_1F9_0 = 3002923439u; continue; case 19u: arg_1F9_0 = 4233664132u; continue; case 20u: arg_1F9_0 = (num2 * 3027626962u ^ 2335535435u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountStateNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountStateNotification : IMessage<GameAccountStateNotification>, IEquatable<GameAccountStateNotification>, IDeepCloneable<GameAccountStateNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountStateNotification.__c __9 = new GameAccountStateNotification.__c(); internal GameAccountStateNotification cctor>b__39_0() { return new GameAccountStateNotification(); } } private static readonly MessageParser<GameAccountStateNotification> _parser = new MessageParser<GameAccountStateNotification>(new Func<GameAccountStateNotification>(GameAccountStateNotification.__c.__9.<.cctor>b__39_0)); public const int GameAccountStateFieldNumber = 1; private GameAccountState gameAccountState_; public const int SubscriberIdFieldNumber = 2; private ulong subscriberId_; public const int GameAccountTagsFieldNumber = 3; private GameAccountFieldTags gameAccountTags_; public const int SubscriptionCompletedFieldNumber = 4; private bool subscriptionCompleted_; public static MessageParser<GameAccountStateNotification> Parser { get { return GameAccountStateNotification._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[29]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountStateNotification.Descriptor; } } public GameAccountState GameAccountState { get { return this.gameAccountState_; } set { this.gameAccountState_ = value; } } public ulong SubscriberId { get { return this.subscriberId_; } set { this.subscriberId_ = value; } } public GameAccountFieldTags GameAccountTags { get { return this.gameAccountTags_; } set { this.gameAccountTags_ = value; } } public bool SubscriptionCompleted { get { return this.subscriptionCompleted_; } set { this.subscriptionCompleted_ = value; } } public GameAccountStateNotification() { } public GameAccountStateNotification(GameAccountStateNotification other) : this() { this.GameAccountState = ((other.gameAccountState_ != null) ? other.GameAccountState.Clone() : null); this.subscriberId_ = other.subscriberId_; this.GameAccountTags = ((other.gameAccountTags_ != null) ? other.GameAccountTags.Clone() : null); this.subscriptionCompleted_ = other.subscriptionCompleted_; } public GameAccountStateNotification Clone() { return new GameAccountStateNotification(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountStateNotification); } public bool Equals(GameAccountStateNotification other) { if (other == null) { goto IL_C4; } goto IL_11C; int arg_CE_0; while (true) { IL_C9: switch ((arg_CE_0 ^ 2019780341) % 13) { case 0: goto IL_C4; case 2: goto IL_11C; case 3: arg_CE_0 = ((this.SubscriberId != other.SubscriberId) ? 202190920 : 141529842); continue; case 4: return false; case 5: return false; case 6: return false; case 7: arg_CE_0 = (GameAccountStateNotification.smethod_0(this.GameAccountState, other.GameAccountState) ? 1665396040 : 205668611); continue; case 8: return false; case 9: return true; case 10: return false; case 11: arg_CE_0 = ((!GameAccountStateNotification.smethod_0(this.GameAccountTags, other.GameAccountTags)) ? 1106733478 : 711829773); continue; case 12: arg_CE_0 = ((this.SubscriptionCompleted == other.SubscriptionCompleted) ? 1621340534 : 343749639); continue; } break; } return true; IL_C4: arg_CE_0 = 1526030904; goto IL_C9; IL_11C: arg_CE_0 = ((other == this) ? 1109872461 : 229470820); goto IL_C9; } public override int GetHashCode() { int num = 1; while (true) { IL_151: uint arg_11C_0 = 2228453846u; while (true) { uint num2; switch ((num2 = (arg_11C_0 ^ 3607754221u)) % 10u) { case 0u: arg_11C_0 = (this.SubscriptionCompleted ? 3591398875u : 2891556666u); continue; case 1u: arg_11C_0 = (((this.gameAccountState_ != null) ? 537711360u : 1162464199u) ^ num2 * 528312338u); continue; case 2u: arg_11C_0 = ((this.SubscriberId == 0uL) ? 2164869745u : 4197346024u); continue; case 3u: num ^= this.SubscriberId.GetHashCode(); arg_11C_0 = (num2 * 2817239887u ^ 570434554u); continue; case 4u: num ^= this.SubscriptionCompleted.GetHashCode(); arg_11C_0 = (num2 * 3858909993u ^ 3801763228u); continue; case 6u: num ^= this.GameAccountTags.GetHashCode(); arg_11C_0 = (num2 * 17938849u ^ 3104917437u); continue; case 7u: num ^= GameAccountStateNotification.smethod_1(this.GameAccountState); arg_11C_0 = (num2 * 3934631209u ^ 4192999010u); continue; case 8u: arg_11C_0 = ((this.gameAccountTags_ != null) ? 2688713013u : 2435699813u); continue; case 9u: goto IL_151; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameAccountState_ != null) { goto IL_CE; } goto IL_154; uint arg_110_0; while (true) { IL_10B: uint num; switch ((num = (arg_110_0 ^ 1241605511u)) % 10u) { case 0u: output.WriteRawTag(16); arg_110_0 = (num * 1671716445u ^ 2411111626u); continue; case 1u: arg_110_0 = ((this.gameAccountTags_ != null) ? 413994709u : 1109826850u); continue; case 2u: goto IL_154; case 3u: goto IL_CE; case 5u: arg_110_0 = (this.SubscriptionCompleted ? 719794329u : 355924311u); continue; case 6u: output.WriteRawTag(32); output.WriteBool(this.SubscriptionCompleted); arg_110_0 = (num * 547529455u ^ 3235154517u); continue; case 7u: output.WriteRawTag(10); output.WriteMessage(this.GameAccountState); arg_110_0 = (num * 203990745u ^ 2467248170u); continue; case 8u: output.WriteRawTag(26); output.WriteMessage(this.GameAccountTags); arg_110_0 = (num * 1927723908u ^ 3235815786u); continue; case 9u: output.WriteUInt64(this.SubscriberId); arg_110_0 = (num * 1950738047u ^ 3798793831u); continue; } break; } return; IL_CE: arg_110_0 = 652785328u; goto IL_10B; IL_154: arg_110_0 = ((this.SubscriberId == 0uL) ? 358916320u : 247271363u); goto IL_10B; } public int CalculateSize() { int num = 0; while (true) { IL_144: uint arg_10F_0 = 1756231839u; while (true) { uint num2; switch ((num2 = (arg_10F_0 ^ 681372566u)) % 10u) { case 0u: num += 2; arg_10F_0 = (num2 * 3095695318u ^ 4244378566u); continue; case 1u: arg_10F_0 = (((this.gameAccountState_ == null) ? 1381444138u : 2102799125u) ^ num2 * 3874815752u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountState); arg_10F_0 = (num2 * 1115537334u ^ 3610610224u); continue; case 4u: arg_10F_0 = ((this.SubscriberId != 0uL) ? 1396398121u : 1669875130u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.SubscriberId); arg_10F_0 = (num2 * 2215539635u ^ 2147171895u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountTags); arg_10F_0 = (num2 * 3164420065u ^ 716954625u); continue; case 7u: goto IL_144; case 8u: arg_10F_0 = ((this.gameAccountTags_ != null) ? 994961398u : 1107254369u); continue; case 9u: arg_10F_0 = (this.SubscriptionCompleted ? 35278434u : 1240340030u); continue; } return num; } } return num; } public void MergeFrom(GameAccountStateNotification other) { if (other == null) { goto IL_17F; } goto IL_1E1; uint arg_189_0; while (true) { IL_184: uint num; switch ((num = (arg_189_0 ^ 3196062235u)) % 15u) { case 0u: goto IL_17F; case 1u: return; case 2u: arg_189_0 = ((other.gameAccountTags_ == null) ? 3542311875u : 2342865837u); continue; case 3u: this.GameAccountTags.MergeFrom(other.GameAccountTags); arg_189_0 = 3542311875u; continue; case 4u: arg_189_0 = (((this.gameAccountState_ == null) ? 985048290u : 1660849120u) ^ num * 2484227954u); continue; case 5u: this.gameAccountTags_ = new GameAccountFieldTags(); arg_189_0 = (num * 1928569070u ^ 2722676706u); continue; case 6u: this.GameAccountState.MergeFrom(other.GameAccountState); arg_189_0 = 3921216275u; continue; case 7u: arg_189_0 = (((this.gameAccountTags_ != null) ? 2998484570u : 3267552964u) ^ num * 2643196409u); continue; case 8u: arg_189_0 = (other.SubscriptionCompleted ? 3148364989u : 3446128461u); continue; case 9u: this.gameAccountState_ = new GameAccountState(); arg_189_0 = (num * 85069794u ^ 2149958908u); continue; case 10u: this.SubscriptionCompleted = other.SubscriptionCompleted; arg_189_0 = (num * 853276136u ^ 2577914685u); continue; case 11u: arg_189_0 = ((other.SubscriberId == 0uL) ? 4079583387u : 3335534246u); continue; case 12u: goto IL_1E1; case 14u: this.SubscriberId = other.SubscriberId; arg_189_0 = (num * 3778289079u ^ 2022265984u); continue; } break; } return; IL_17F: arg_189_0 = 2316078064u; goto IL_184; IL_1E1: arg_189_0 = ((other.gameAccountState_ == null) ? 3921216275u : 2302302878u); goto IL_184; } public void MergeFrom(CodedInputStream input) { while (true) { IL_260: uint num; uint arg_1F4_0 = ((num = input.ReadTag()) != 0u) ? 3933879847u : 3777983546u; while (true) { uint num2; switch ((num2 = (arg_1F4_0 ^ 2477989152u)) % 20u) { case 0u: arg_1F4_0 = ((num != 26u) ? 3251606729u : 3712284843u); continue; case 1u: arg_1F4_0 = (((num == 32u) ? 2695708221u : 2877945691u) ^ num2 * 46065128u); continue; case 2u: arg_1F4_0 = ((this.gameAccountState_ == null) ? 3860056348u : 2647689540u); continue; case 3u: arg_1F4_0 = ((this.gameAccountTags_ != null) ? 2489480958u : 3407915904u); continue; case 4u: this.gameAccountState_ = new GameAccountState(); arg_1F4_0 = (num2 * 3567518279u ^ 442752480u); continue; case 5u: arg_1F4_0 = (((num == 10u) ? 3625046907u : 3380045613u) ^ num2 * 505577821u); continue; case 7u: arg_1F4_0 = (num2 * 973521616u ^ 1258486566u); continue; case 8u: arg_1F4_0 = (((num != 16u) ? 1133375141u : 1063813015u) ^ num2 * 2650024592u); continue; case 9u: this.SubscriptionCompleted = input.ReadBool(); arg_1F4_0 = 3217203094u; continue; case 10u: input.ReadMessage(this.gameAccountTags_); arg_1F4_0 = 3291938378u; continue; case 11u: this.SubscriberId = input.ReadUInt64(); arg_1F4_0 = 4039389815u; continue; case 12u: this.gameAccountTags_ = new GameAccountFieldTags(); arg_1F4_0 = (num2 * 1061684731u ^ 3959904286u); continue; case 13u: arg_1F4_0 = (num2 * 3953691312u ^ 3021610499u); continue; case 14u: goto IL_260; case 15u: input.SkipLastField(); arg_1F4_0 = 3217203094u; continue; case 16u: input.ReadMessage(this.gameAccountState_); arg_1F4_0 = 3217203094u; continue; case 17u: arg_1F4_0 = 3933879847u; continue; case 18u: arg_1F4_0 = (num2 * 737521011u ^ 2173129992u); continue; case 19u: arg_1F4_0 = ((num <= 16u) ? 2391131269u : 2577128648u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/MethodDescriptorProto.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class MethodDescriptorProto : IMessage<MethodDescriptorProto>, IEquatable<MethodDescriptorProto>, IDeepCloneable<MethodDescriptorProto>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MethodDescriptorProto.__c __9 = new MethodDescriptorProto.__c(); internal MethodDescriptorProto cctor>b__39_0() { return new MethodDescriptorProto(); } } private static readonly MessageParser<MethodDescriptorProto> _parser = new MessageParser<MethodDescriptorProto>(new Func<MethodDescriptorProto>(MethodDescriptorProto.__c.__9.<.cctor>b__39_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int InputTypeFieldNumber = 2; private string inputType_ = ""; public const int OutputTypeFieldNumber = 3; private string outputType_ = ""; public const int OptionsFieldNumber = 4; private MethodOptions options_; public static MessageParser<MethodDescriptorProto> Parser { get { return MethodDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return MethodDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string InputType { get { return this.inputType_; } set { this.inputType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public string OutputType { get { return this.outputType_; } set { this.outputType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public MethodOptions Options { get { return this.options_; } set { this.options_ = value; } } public MethodDescriptorProto() { } public MethodDescriptorProto(MethodDescriptorProto other) : this() { while (true) { IL_7D: uint arg_61_0 = 581221705u; while (true) { uint num; switch ((num = (arg_61_0 ^ 1044882612u)) % 4u) { case 0u: goto IL_7D; case 1u: this.name_ = other.name_; this.inputType_ = other.inputType_; arg_61_0 = (num * 3782165661u ^ 4163353431u); continue; case 2u: this.outputType_ = other.outputType_; this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_61_0 = 1895263839u; continue; } return; } } } public MethodDescriptorProto Clone() { return new MethodDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as MethodDescriptorProto); } public bool Equals(MethodDescriptorProto other) { if (other == null) { goto IL_47; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ -2014978059) % 13) { case 0: return true; case 1: goto IL_126; case 2: arg_D8_0 = (MethodDescriptorProto.smethod_0(this.OutputType, other.OutputType) ? -1775912267 : -1090055461); continue; case 3: arg_D8_0 = (MethodDescriptorProto.smethod_0(this.InputType, other.InputType) ? -194306618 : -2093050594); continue; case 4: return false; case 5: return false; case 6: return false; case 7: arg_D8_0 = ((!MethodDescriptorProto.smethod_0(this.Name, other.Name)) ? -337311903 : -522167903); continue; case 8: return false; case 9: goto IL_47; case 11: return false; case 12: arg_D8_0 = (MethodDescriptorProto.smethod_1(this.Options, other.Options) ? -604329728 : -2089561045); continue; } break; } return true; IL_47: arg_D8_0 = -603852138; goto IL_D3; IL_126: arg_D8_0 = ((other != this) ? -1718385416 : -1763475731); goto IL_D3; } public override int GetHashCode() { int num = 1; while (true) { IL_157: uint arg_122_0 = 1260690557u; while (true) { uint num2; switch ((num2 = (arg_122_0 ^ 284979794u)) % 10u) { case 0u: num ^= MethodDescriptorProto.smethod_3(this.InputType); arg_122_0 = (num2 * 2704247287u ^ 3501608699u); continue; case 1u: num ^= MethodDescriptorProto.smethod_3(this.Name); arg_122_0 = (num2 * 3554312208u ^ 2552742566u); continue; case 3u: arg_122_0 = ((MethodDescriptorProto.smethod_2(this.OutputType) != 0) ? 783610434u : 131298277u); continue; case 4u: num ^= MethodDescriptorProto.smethod_3(this.Options); arg_122_0 = (num2 * 203015338u ^ 2600451066u); continue; case 5u: goto IL_157; case 6u: arg_122_0 = ((MethodDescriptorProto.smethod_2(this.InputType) == 0) ? 917533401u : 1919802940u); continue; case 7u: arg_122_0 = (((MethodDescriptorProto.smethod_2(this.Name) == 0) ? 1336910694u : 675122053u) ^ num2 * 1494071120u); continue; case 8u: num ^= MethodDescriptorProto.smethod_3(this.OutputType); arg_122_0 = (num2 * 3827869018u ^ 3847497285u); continue; case 9u: arg_122_0 = ((this.options_ != null) ? 1669038770u : 1215221562u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (MethodDescriptorProto.smethod_2(this.Name) != 0) { goto IL_83; } goto IL_187; uint arg_13B_0; while (true) { IL_136: uint num; switch ((num = (arg_13B_0 ^ 4246778090u)) % 12u) { case 0u: output.WriteString(this.InputType); arg_13B_0 = (num * 785514991u ^ 2168223757u); continue; case 1u: output.WriteRawTag(26); arg_13B_0 = (num * 1843012254u ^ 551542337u); continue; case 2u: goto IL_187; case 3u: output.WriteRawTag(34); arg_13B_0 = (num * 2469151363u ^ 1352243929u); continue; case 5u: output.WriteString(this.OutputType); arg_13B_0 = (num * 3862230041u ^ 2178512632u); continue; case 6u: output.WriteRawTag(10); output.WriteString(this.Name); arg_13B_0 = (num * 2010851305u ^ 4184361342u); continue; case 7u: arg_13B_0 = ((this.options_ != null) ? 3714138197u : 3430540358u); continue; case 8u: goto IL_83; case 9u: output.WriteRawTag(18); arg_13B_0 = (num * 3689672559u ^ 1082091125u); continue; case 10u: output.WriteMessage(this.Options); arg_13B_0 = (num * 4051759574u ^ 2114533106u); continue; case 11u: arg_13B_0 = ((MethodDescriptorProto.smethod_2(this.OutputType) == 0) ? 3145798957u : 4198917983u); continue; } break; } return; IL_83: arg_13B_0 = 2333710072u; goto IL_136; IL_187: arg_13B_0 = ((MethodDescriptorProto.smethod_2(this.InputType) != 0) ? 3261337399u : 3145111033u); goto IL_136; } public int CalculateSize() { int num = 0; if (MethodDescriptorProto.smethod_2(this.Name) != 0) { goto IL_24; } goto IL_13A; uint arg_FA_0; while (true) { IL_F5: uint num2; switch ((num2 = (arg_FA_0 ^ 769896633u)) % 9u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_FA_0 = (num2 * 1612960734u ^ 1168003708u); continue; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_FA_0 = (num2 * 1949399072u ^ 245357387u); continue; case 3u: goto IL_13A; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.InputType); arg_FA_0 = (num2 * 1167323254u ^ 3074109240u); continue; case 5u: arg_FA_0 = ((MethodDescriptorProto.smethod_2(this.OutputType) == 0) ? 407969155u : 512985482u); continue; case 6u: arg_FA_0 = ((this.options_ != null) ? 1475674352u : 1231706162u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.OutputType); arg_FA_0 = (num2 * 2720936503u ^ 2636325494u); continue; case 8u: goto IL_24; } break; } return num; IL_24: arg_FA_0 = 451489806u; goto IL_F5; IL_13A: arg_FA_0 = ((MethodDescriptorProto.smethod_2(this.InputType) != 0) ? 390742646u : 586142802u); goto IL_F5; } public void MergeFrom(MethodDescriptorProto other) { if (other == null) { goto IL_50; } goto IL_19D; uint arg_14D_0; while (true) { IL_148: uint num; switch ((num = (arg_14D_0 ^ 3055961201u)) % 13u) { case 0u: this.InputType = other.InputType; arg_14D_0 = (num * 696408208u ^ 1894570422u); continue; case 1u: this.OutputType = other.OutputType; arg_14D_0 = (num * 2764410862u ^ 1091276823u); continue; case 2u: arg_14D_0 = ((MethodDescriptorProto.smethod_2(other.OutputType) == 0) ? 3609492217u : 2805570288u); continue; case 3u: arg_14D_0 = (((this.options_ == null) ? 785209992u : 465612598u) ^ num * 74693571u); continue; case 4u: arg_14D_0 = ((other.options_ != null) ? 2463013360u : 4259417867u); continue; case 5u: arg_14D_0 = ((MethodDescriptorProto.smethod_2(other.InputType) != 0) ? 3629355743u : 4137437270u); continue; case 6u: this.Name = other.Name; arg_14D_0 = (num * 2795820147u ^ 1686844217u); continue; case 7u: return; case 9u: goto IL_50; case 10u: this.Options.MergeFrom(other.Options); arg_14D_0 = 4259417867u; continue; case 11u: goto IL_19D; case 12u: this.options_ = new MethodOptions(); arg_14D_0 = (num * 3990550291u ^ 689945275u); continue; } break; } return; IL_50: arg_14D_0 = 2188423605u; goto IL_148; IL_19D: arg_14D_0 = ((MethodDescriptorProto.smethod_2(other.Name) == 0) ? 3361311273u : 4202326721u); goto IL_148; } public void MergeFrom(CodedInputStream input) { while (true) { IL_227: uint num; uint arg_1BF_0 = ((num = input.ReadTag()) != 0u) ? 101578911u : 1752597329u; while (true) { uint num2; switch ((num2 = (arg_1BF_0 ^ 853976030u)) % 19u) { case 0u: arg_1BF_0 = 101578911u; continue; case 1u: arg_1BF_0 = (((num != 18u) ? 2340718058u : 3481081254u) ^ num2 * 3258660831u); continue; case 2u: arg_1BF_0 = (((num != 34u) ? 2027960122u : 1248026866u) ^ num2 * 3402668794u); continue; case 3u: arg_1BF_0 = (num2 * 1161521626u ^ 459419522u); continue; case 4u: this.options_ = new MethodOptions(); arg_1BF_0 = (num2 * 3202233623u ^ 3495731603u); continue; case 5u: arg_1BF_0 = ((num != 26u) ? 11725218u : 626239679u); continue; case 6u: goto IL_227; case 7u: this.InputType = input.ReadString(); arg_1BF_0 = 1564559036u; continue; case 8u: this.OutputType = input.ReadString(); arg_1BF_0 = 490908716u; continue; case 9u: arg_1BF_0 = (num2 * 3810229024u ^ 2865393260u); continue; case 10u: arg_1BF_0 = ((num <= 18u) ? 1767568521u : 979783326u); continue; case 11u: arg_1BF_0 = ((this.options_ != null) ? 1338444494u : 49819765u); continue; case 12u: input.ReadMessage(this.options_); arg_1BF_0 = 490908716u; continue; case 13u: arg_1BF_0 = (num2 * 613214609u ^ 2534897574u); continue; case 15u: arg_1BF_0 = (((num != 10u) ? 3940525580u : 3710610995u) ^ num2 * 2536977806u); continue; case 16u: input.SkipLastField(); arg_1BF_0 = 2131787405u; continue; case 17u: this.Name = input.ReadString(); arg_1BF_0 = 1205673567u; continue; case 18u: arg_1BF_0 = (num2 * 3242643688u ^ 3340771524u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Network.Packets/AuthPacketHeader.cs using Framework.Constants.Net; using System; namespace Framework.Network.Packets { public class AuthPacketHeader { public byte Message { get; set; } public AuthChannel Channel { get; set; } } } <file_sep>/Bgs.Protocol.Account.V1/CredentialUpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class CredentialUpdateRequest : IMessage<CredentialUpdateRequest>, IEquatable<CredentialUpdateRequest>, IDeepCloneable<CredentialUpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CredentialUpdateRequest.__c __9 = new CredentialUpdateRequest.__c(); internal CredentialUpdateRequest cctor>b__39_0() { return new CredentialUpdateRequest(); } } private static readonly MessageParser<CredentialUpdateRequest> _parser = new MessageParser<CredentialUpdateRequest>(new Func<CredentialUpdateRequest>(CredentialUpdateRequest.__c.__9.<.cctor>b__39_0)); public const int AccountFieldNumber = 1; private AccountId account_; public const int OldCredentialsFieldNumber = 2; private static readonly FieldCodec<AccountCredential> _repeated_oldCredentials_codec = FieldCodec.ForMessage<AccountCredential>(18u, AccountCredential.Parser); private readonly RepeatedField<AccountCredential> oldCredentials_ = new RepeatedField<AccountCredential>(); public const int NewCredentialsFieldNumber = 3; private static readonly FieldCodec<AccountCredential> _repeated_newCredentials_codec = FieldCodec.ForMessage<AccountCredential>(26u, AccountCredential.Parser); private readonly RepeatedField<AccountCredential> newCredentials_ = new RepeatedField<AccountCredential>(); public const int RegionFieldNumber = 4; private uint region_; public static MessageParser<CredentialUpdateRequest> Parser { get { return CredentialUpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return CredentialUpdateRequest.Descriptor; } } public AccountId Account { get { return this.account_; } set { this.account_ = value; } } public RepeatedField<AccountCredential> OldCredentials { get { return this.oldCredentials_; } } public RepeatedField<AccountCredential> NewCredentials { get { return this.newCredentials_; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public CredentialUpdateRequest() { } public CredentialUpdateRequest(CredentialUpdateRequest other) : this() { this.Account = ((other.account_ != null) ? other.Account.Clone() : null); this.oldCredentials_ = other.oldCredentials_.Clone(); this.newCredentials_ = other.newCredentials_.Clone(); this.region_ = other.region_; } public CredentialUpdateRequest Clone() { return new CredentialUpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as CredentialUpdateRequest); } public bool Equals(CredentialUpdateRequest other) { if (other == null) { goto IL_C9; } goto IL_121; int arg_D3_0; while (true) { IL_CE: switch ((arg_D3_0 ^ 580603534) % 13) { case 0: goto IL_C9; case 1: return true; case 2: arg_D3_0 = (this.oldCredentials_.Equals(other.oldCredentials_) ? 444309964 : 711658726); continue; case 3: arg_D3_0 = ((this.Region != other.Region) ? 478581928 : 399106662); continue; case 4: return false; case 5: return false; case 6: return false; case 7: arg_D3_0 = ((!this.newCredentials_.Equals(other.newCredentials_)) ? 476867826 : 284104870); continue; case 8: arg_D3_0 = (CredentialUpdateRequest.smethod_0(this.Account, other.Account) ? 1375230970 : 1805585247); continue; case 9: return false; case 10: goto IL_121; case 11: return false; } break; } return true; IL_C9: arg_D3_0 = 1460788887; goto IL_CE; IL_121: arg_D3_0 = ((other != this) ? 1709880735 : 333288246); goto IL_CE; } public override int GetHashCode() { int num = 1; while (true) { IL_D5: uint arg_AD_0 = 2397202340u; while (true) { uint num2; switch ((num2 = (arg_AD_0 ^ 2427214325u)) % 7u) { case 1u: arg_AD_0 = (((this.Region == 0u) ? 1176702419u : 1775715134u) ^ num2 * 272399002u); continue; case 2u: num ^= CredentialUpdateRequest.smethod_1(this.oldCredentials_); arg_AD_0 = (num2 * 695806315u ^ 2508479793u); continue; case 3u: num ^= this.Region.GetHashCode(); arg_AD_0 = (num2 * 3958505050u ^ 2003674935u); continue; case 4u: num ^= CredentialUpdateRequest.smethod_1(this.Account); arg_AD_0 = (num2 * 2232119895u ^ 208419626u); continue; case 5u: num ^= CredentialUpdateRequest.smethod_1(this.newCredentials_); arg_AD_0 = (num2 * 2390335019u ^ 2414301030u); continue; case 6u: goto IL_D5; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Account); while (true) { IL_CC: uint arg_A8_0 = 3665232257u; while (true) { uint num; switch ((num = (arg_A8_0 ^ 2918667784u)) % 6u) { case 0u: output.WriteRawTag(32); output.WriteUInt32(this.Region); arg_A8_0 = (num * 1718397994u ^ 2780782269u); continue; case 2u: goto IL_CC; case 3u: this.oldCredentials_.WriteTo(output, CredentialUpdateRequest._repeated_oldCredentials_codec); arg_A8_0 = (num * 2136065166u ^ 2459679780u); continue; case 4u: this.newCredentials_.WriteTo(output, CredentialUpdateRequest._repeated_newCredentials_codec); arg_A8_0 = (num * 1230570139u ^ 4131725187u); continue; case 5u: arg_A8_0 = (((this.Region != 0u) ? 3362370079u : 3465170030u) ^ num * 2087475543u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_E0: uint arg_B8_0 = 1328374299u; while (true) { uint num2; switch ((num2 = (arg_B8_0 ^ 872097984u)) % 7u) { case 0u: arg_B8_0 = (((this.Region != 0u) ? 3656261263u : 2613743617u) ^ num2 * 1835372426u); continue; case 1u: num += this.newCredentials_.CalculateSize(CredentialUpdateRequest._repeated_newCredentials_codec); arg_B8_0 = (num2 * 615687266u ^ 1139649045u); continue; case 2u: goto IL_E0; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Account); arg_B8_0 = (num2 * 527837355u ^ 3666649400u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_B8_0 = (num2 * 955327394u ^ 3823553889u); continue; case 6u: num += this.oldCredentials_.CalculateSize(CredentialUpdateRequest._repeated_oldCredentials_codec); arg_B8_0 = (num2 * 859459701u ^ 3415042527u); continue; } return num; } } return num; } public void MergeFrom(CredentialUpdateRequest other) { if (other == null) { goto IL_FB; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 2157824175u)) % 11u) { case 0u: goto IL_FB; case 1u: arg_105_0 = (((this.account_ != null) ? 4224851079u : 4118080884u) ^ num * 615006745u); continue; case 3u: this.Account.MergeFrom(other.Account); arg_105_0 = 3538977361u; continue; case 4u: arg_105_0 = (((other.Region == 0u) ? 1483839075u : 430857790u) ^ num * 4191290252u); continue; case 5u: this.newCredentials_.Add(other.newCredentials_); arg_105_0 = (num * 3146555655u ^ 3077044455u); continue; case 6u: return; case 7u: this.Region = other.Region; arg_105_0 = (num * 2162423306u ^ 1645347589u); continue; case 8u: this.oldCredentials_.Add(other.oldCredentials_); arg_105_0 = 3306418966u; continue; case 9u: this.account_ = new AccountId(); arg_105_0 = (num * 3380548451u ^ 3337191900u); continue; case 10u: goto IL_14D; } break; } return; IL_FB: arg_105_0 = 2691237538u; goto IL_100; IL_14D: arg_105_0 = ((other.account_ != null) ? 3436543228u : 3538977361u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_231: uint num; uint arg_1C9_0 = ((num = input.ReadTag()) == 0u) ? 4074361556u : 2389225871u; while (true) { uint num2; switch ((num2 = (arg_1C9_0 ^ 2832844712u)) % 19u) { case 0u: arg_1C9_0 = (num2 * 828437196u ^ 3618696197u); continue; case 1u: arg_1C9_0 = ((num == 26u) ? 2778473755u : 2916290563u); continue; case 2u: this.oldCredentials_.AddEntriesFrom(input, CredentialUpdateRequest._repeated_oldCredentials_codec); arg_1C9_0 = 3332952104u; continue; case 3u: arg_1C9_0 = (num2 * 2105134712u ^ 1049231147u); continue; case 4u: this.account_ = new AccountId(); arg_1C9_0 = (num2 * 1749454716u ^ 1455850360u); continue; case 5u: goto IL_231; case 6u: arg_1C9_0 = (((num != 32u) ? 850407014u : 1720421213u) ^ num2 * 3467555319u); continue; case 7u: arg_1C9_0 = (((num != 18u) ? 4263518934u : 3397386366u) ^ num2 * 1260205642u); continue; case 8u: this.newCredentials_.AddEntriesFrom(input, CredentialUpdateRequest._repeated_newCredentials_codec); arg_1C9_0 = 2532571286u; continue; case 9u: arg_1C9_0 = 2389225871u; continue; case 10u: arg_1C9_0 = ((num > 18u) ? 3132722633u : 3561584671u); continue; case 11u: input.SkipLastField(); arg_1C9_0 = 2325930747u; continue; case 13u: arg_1C9_0 = (((num != 10u) ? 1332633145u : 1895185577u) ^ num2 * 586690565u); continue; case 14u: arg_1C9_0 = ((this.account_ == null) ? 3742545992u : 4236678136u); continue; case 15u: arg_1C9_0 = (num2 * 2822385040u ^ 782334173u); continue; case 16u: this.Region = input.ReadUInt32(); arg_1C9_0 = 3640913261u; continue; case 17u: arg_1C9_0 = (num2 * 1662735789u ^ 4038692077u); continue; case 18u: input.ReadMessage(this.account_); arg_1C9_0 = 3640913261u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/Address.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Address : IMessage<Address>, IEquatable<Address>, IDeepCloneable<Address>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Address.__c __9 = new Address.__c(); internal Address cctor>b__29_0() { return new Address(); } } private static readonly MessageParser<Address> _parser = new MessageParser<Address>(new Func<Address>(Address.__c.__9.<.cctor>b__29_0)); public const int Address_FieldNumber = 1; private string address_ = ""; public const int PortFieldNumber = 2; private uint port_; public static MessageParser<Address> Parser { get { return Address._parser; } } public static MessageDescriptor Descriptor { get { return RpcTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Address.Descriptor; } } public string Address_ { get { return this.address_; } set { this.address_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public uint Port { get { return this.port_; } set { this.port_ = value; } } public Address() { } public Address(Address other) : this() { this.address_ = other.address_; this.port_ = other.port_; } public Address Clone() { return new Address(this); } public override bool Equals(object other) { return this.Equals(other as Address); } public bool Equals(Address other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1141965681) % 9) { case 0: goto IL_B0; case 2: goto IL_68; case 3: return false; case 4: arg_72_0 = (Address.smethod_0(this.Address_, other.Address_) ? 1224884589 : 1585560374); continue; case 5: arg_72_0 = ((this.Port == other.Port) ? 355975896 : 2131483726); continue; case 6: return false; case 7: return true; case 8: return false; } break; } return true; IL_68: arg_72_0 = 188933318; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1699268511 : 27009317); goto IL_6D; } public override int GetHashCode() { int num = 1; if (Address.smethod_1(this.Address_) != 0) { goto IL_5E; } goto IL_94; uint arg_68_0; while (true) { IL_63: uint num2; switch ((num2 = (arg_68_0 ^ 540162365u)) % 5u) { case 0u: goto IL_5E; case 2u: num ^= this.Port.GetHashCode(); arg_68_0 = (num2 * 2195541771u ^ 1538048316u); continue; case 3u: num ^= Address.smethod_2(this.Address_); arg_68_0 = (num2 * 1149761982u ^ 4156151173u); continue; case 4u: goto IL_94; } break; } return num; IL_5E: arg_68_0 = 366305514u; goto IL_63; IL_94: arg_68_0 = ((this.Port == 0u) ? 1262520304u : 1167358681u); goto IL_63; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Address.smethod_1(this.Address_) != 0) { goto IL_1F; } goto IL_9B; uint arg_6F_0; while (true) { IL_6A: uint num; switch ((num = (arg_6F_0 ^ 2507342582u)) % 5u) { case 1u: output.WriteRawTag(16); output.WriteUInt32(this.Port); arg_6F_0 = (num * 2672317964u ^ 4224139948u); continue; case 2u: goto IL_9B; case 3u: output.WriteRawTag(10); output.WriteString(this.Address_); arg_6F_0 = (num * 4139644404u ^ 3068099138u); continue; case 4u: goto IL_1F; } break; } return; IL_1F: arg_6F_0 = 4241781515u; goto IL_6A; IL_9B: arg_6F_0 = ((this.Port != 0u) ? 3048208283u : 2242993584u); goto IL_6A; } public int CalculateSize() { int num = 0; if (Address.smethod_1(this.Address_) != 0) { goto IL_40; } goto IL_95; uint arg_69_0; while (true) { IL_64: uint num2; switch ((num2 = (arg_69_0 ^ 2618308694u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Address_); arg_69_0 = (num2 * 52310661u ^ 2459443852u); continue; case 2u: goto IL_40; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Port); arg_69_0 = (num2 * 1011224170u ^ 2720716401u); continue; case 4u: goto IL_95; } break; } return num; IL_40: arg_69_0 = 3003851337u; goto IL_64; IL_95: arg_69_0 = ((this.Port == 0u) ? 2505095833u : 2148466546u); goto IL_64; } public void MergeFrom(Address other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 2007036733u)) % 7u) { case 0u: goto IL_6C; case 1u: goto IL_AD; case 2u: arg_76_0 = ((other.Port != 0u) ? 889150574u : 454640458u); continue; case 3u: this.Address_ = other.Address_; arg_76_0 = (num * 1898859439u ^ 3679643417u); continue; case 4u: this.Port = other.Port; arg_76_0 = (num * 3291169591u ^ 2558206111u); continue; case 5u: return; } break; } return; IL_6C: arg_76_0 = 962890857u; goto IL_71; IL_AD: arg_76_0 = ((Address.smethod_1(other.Address_) == 0) ? 1598209576u : 602829346u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_104: uint num; uint arg_C0_0 = ((num = input.ReadTag()) == 0u) ? 1049885926u : 846020443u; while (true) { uint num2; switch ((num2 = (arg_C0_0 ^ 168299603u)) % 10u) { case 0u: arg_C0_0 = 846020443u; continue; case 1u: this.Address_ = input.ReadString(); arg_C0_0 = 567788184u; continue; case 2u: input.SkipLastField(); arg_C0_0 = (num2 * 676841190u ^ 1487617826u); continue; case 4u: goto IL_104; case 5u: arg_C0_0 = (num2 * 3802216727u ^ 890882430u); continue; case 6u: arg_C0_0 = ((num != 10u) ? 499096013u : 538430626u); continue; case 7u: arg_C0_0 = (num2 * 1418968567u ^ 3758331032u); continue; case 8u: arg_C0_0 = (((num == 16u) ? 1592741762u : 1291171837u) ^ num2 * 2793548394u); continue; case 9u: this.Port = input.ReadUInt32(); arg_C0_0 = 1019743811u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/SourceContextReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class SourceContextReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return SourceContextReflection.descriptor; } } static SourceContextReflection() { SourceContextReflection.descriptor = FileDescriptor.FromGeneratedCode(SourceContextReflection.smethod_1(SourceContextReflection.smethod_0(new string[] { Module.smethod_33<string>(3432122179u), Module.smethod_35<string>(1807633950u), Module.smethod_33<string>(1388849827u), Module.smethod_35<string>(1289143038u), Module.smethod_34<string>(2130243249u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(SourceContextReflection.smethod_2(typeof(SourceContext).TypeHandle), SourceContext.Parser, new string[] { Module.smethod_35<string>(2212464293u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Resources.V1/ResourceServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Resources.V1 { [DebuggerNonUserCode] public static class ResourceServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ResourceServiceReflection.descriptor; } } static ResourceServiceReflection() { ResourceServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(ResourceServiceReflection.smethod_1(ResourceServiceReflection.smethod_0(new string[] { Module.smethod_36<string>(1757318261u), Module.smethod_37<string>(3038047137u), Module.smethod_34<string>(2104530014u), Module.smethod_33<string>(1571754286u), Module.smethod_36<string>(3713845045u), Module.smethod_37<string>(1138924769u), Module.smethod_36<string>(2209669205u), Module.smethod_36<string>(646795685u) })), new FileDescriptor[] { ContentHandleTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ResourceServiceReflection.smethod_2(typeof(ContentHandleRequest).TypeHandle), ContentHandleRequest.Parser, new string[] { Module.smethod_36<string>(2505595523u), Module.smethod_33<string>(3612705877u), Module.smethod_37<string>(4031315431u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Constants/Class.cs using System; namespace Framework.Constants { public enum Class { Warrior = 1, Paladin, Hunter, Rogue, Priest, Deathknight, Shaman, Mage, Warlock, Monk, Druid } } <file_sep>/Bgs.Protocol.Friends.V1/AssignRoleRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class AssignRoleRequest : IMessage<AssignRoleRequest>, IEquatable<AssignRoleRequest>, IDeepCloneable<AssignRoleRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AssignRoleRequest.__c __9 = new AssignRoleRequest.__c(); internal AssignRoleRequest cctor>b__34_0() { return new AssignRoleRequest(); } } private static readonly MessageParser<AssignRoleRequest> _parser = new MessageParser<AssignRoleRequest>(new Func<AssignRoleRequest>(AssignRoleRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int RoleFieldNumber = 3; private static readonly FieldCodec<int> _repeated_role_codec = FieldCodec.ForInt32(26u); private readonly RepeatedField<int> role_ = new RepeatedField<int>(); public static MessageParser<AssignRoleRequest> Parser { get { return AssignRoleRequest._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return AssignRoleRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public RepeatedField<int> Role { get { return this.role_; } } public AssignRoleRequest() { } public AssignRoleRequest(AssignRoleRequest other) : this() { while (true) { IL_7C: int arg_62_0 = -38583686; while (true) { switch ((arg_62_0 ^ -1389250321) % 4) { case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_62_0 = -1538920843; continue; case 2: this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.role_ = other.role_.Clone(); arg_62_0 = -347571025; continue; case 3: goto IL_7C; } return; } } } public AssignRoleRequest Clone() { return new AssignRoleRequest(this); } public override bool Equals(object other) { return this.Equals(other as AssignRoleRequest); } public bool Equals(AssignRoleRequest other) { if (other == null) { goto IL_44; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -1754112119) % 11) { case 0: return false; case 1: return false; case 3: goto IL_EC; case 4: arg_A6_0 = ((!AssignRoleRequest.smethod_0(this.TargetId, other.TargetId)) ? -924450524 : -1176821777); continue; case 5: return false; case 6: arg_A6_0 = ((!AssignRoleRequest.smethod_0(this.AgentId, other.AgentId)) ? -1214100625 : -1950712585); continue; case 7: return false; case 8: goto IL_44; case 9: return true; case 10: arg_A6_0 = (this.role_.Equals(other.role_) ? -66700678 : -1828099843); continue; } break; } return true; IL_44: arg_A6_0 = -623905768; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? -399511263 : -1920077070); goto IL_A1; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_46; } goto IL_70; uint arg_50_0; while (true) { IL_4B: uint num2; switch ((num2 = (arg_50_0 ^ 4193908999u)) % 5u) { case 0u: goto IL_46; case 1u: goto IL_70; case 2u: num ^= AssignRoleRequest.smethod_1(this.AgentId); arg_50_0 = (num2 * 3405343784u ^ 3607705824u); continue; case 3u: num ^= AssignRoleRequest.smethod_1(this.role_); arg_50_0 = (num2 * 1730011359u ^ 2940278307u); continue; } break; } return num; IL_46: arg_50_0 = 2503758317u; goto IL_4B; IL_70: num ^= AssignRoleRequest.smethod_1(this.TargetId); arg_50_0 = 2171463855u; goto IL_4B; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_50; } goto IL_99; uint arg_75_0; while (true) { IL_70: uint num; switch ((num = (arg_75_0 ^ 860974840u)) % 6u) { case 0u: output.WriteMessage(this.TargetId); arg_75_0 = (num * 4246566853u ^ 2124308887u); continue; case 2u: goto IL_50; case 3u: this.role_.WriteTo(output, AssignRoleRequest._repeated_role_codec); arg_75_0 = (num * 560525455u ^ 1578277980u); continue; case 4u: goto IL_99; case 5u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_75_0 = (num * 4215318086u ^ 523508928u); continue; } break; } return; IL_50: arg_75_0 = 623123925u; goto IL_70; IL_99: output.WriteRawTag(18); arg_75_0 = 2140448646u; goto IL_70; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_2E; } goto IL_77; uint arg_57_0; while (true) { IL_52: uint num2; switch ((num2 = (arg_57_0 ^ 1709030642u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_57_0 = (num2 * 2381877094u ^ 1133649803u); continue; case 2u: goto IL_77; case 3u: goto IL_2E; case 4u: num += this.role_.CalculateSize(AssignRoleRequest._repeated_role_codec); arg_57_0 = (num2 * 612445524u ^ 1550390990u); continue; } break; } return num; IL_2E: arg_57_0 = 2123009825u; goto IL_52; IL_77: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_57_0 = 1895622001u; goto IL_52; } public void MergeFrom(AssignRoleRequest other) { if (other == null) { goto IL_E1; } goto IL_169; uint arg_11D_0; while (true) { IL_118: uint num; switch ((num = (arg_11D_0 ^ 1406225327u)) % 12u) { case 0u: this.agentId_ = new EntityId(); arg_11D_0 = (num * 1465556970u ^ 2957033886u); continue; case 1u: this.AgentId.MergeFrom(other.AgentId); arg_11D_0 = 533626530u; continue; case 2u: return; case 4u: goto IL_E1; case 5u: arg_11D_0 = ((other.targetId_ != null) ? 399205180u : 1511187153u); continue; case 6u: this.targetId_ = new EntityId(); arg_11D_0 = (num * 3000422935u ^ 3324428933u); continue; case 7u: goto IL_169; case 8u: this.TargetId.MergeFrom(other.TargetId); arg_11D_0 = 1511187153u; continue; case 9u: arg_11D_0 = (((this.agentId_ != null) ? 2730019673u : 2211265288u) ^ num * 4211950431u); continue; case 10u: this.role_.Add(other.role_); arg_11D_0 = 57319704u; continue; case 11u: arg_11D_0 = (((this.targetId_ == null) ? 2018765665u : 403373479u) ^ num * 1658161932u); continue; } break; } return; IL_E1: arg_11D_0 = 1138459305u; goto IL_118; IL_169: arg_11D_0 = ((other.agentId_ != null) ? 735968630u : 533626530u); goto IL_118; } public void MergeFrom(CodedInputStream input) { while (true) { IL_242: uint num; uint arg_1DA_0 = ((num = input.ReadTag()) == 0u) ? 3187898155u : 3254713875u; while (true) { uint num2; switch ((num2 = (arg_1DA_0 ^ 3269582126u)) % 19u) { case 0u: arg_1DA_0 = (num2 * 3163753099u ^ 419506992u); continue; case 1u: arg_1DA_0 = ((num <= 18u) ? 4125114369u : 3134761968u); continue; case 2u: this.targetId_ = new EntityId(); arg_1DA_0 = (num2 * 4185401340u ^ 2224966766u); continue; case 3u: input.ReadMessage(this.targetId_); arg_1DA_0 = 3727607042u; continue; case 4u: arg_1DA_0 = (num2 * 2497721420u ^ 2485832161u); continue; case 5u: arg_1DA_0 = 3254713875u; continue; case 6u: this.agentId_ = new EntityId(); arg_1DA_0 = (num2 * 2168209061u ^ 2574309932u); continue; case 7u: arg_1DA_0 = (((num == 10u) ? 2223198646u : 2630330299u) ^ num2 * 1541929934u); continue; case 8u: arg_1DA_0 = (((num != 26u) ? 353330001u : 60302847u) ^ num2 * 3113755608u); continue; case 9u: goto IL_242; case 10u: this.role_.AddEntriesFrom(input, AssignRoleRequest._repeated_role_codec); arg_1DA_0 = 3727607042u; continue; case 11u: arg_1DA_0 = ((this.targetId_ != null) ? 2469245962u : 3654671049u); continue; case 12u: input.SkipLastField(); arg_1DA_0 = 2652424184u; continue; case 13u: arg_1DA_0 = (num2 * 684524304u ^ 1994000594u); continue; case 14u: arg_1DA_0 = ((this.agentId_ != null) ? 4090467736u : 2336279434u); continue; case 15u: arg_1DA_0 = ((num == 24u) ? 3880180559u : 3065127820u); continue; case 16u: input.ReadMessage(this.agentId_); arg_1DA_0 = 2573399363u; continue; case 17u: arg_1DA_0 = (((num == 18u) ? 3452386802u : 4006608366u) ^ num2 * 3687451200u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountFlagUpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountFlagUpdateRequest : IMessage<AccountFlagUpdateRequest>, IEquatable<AccountFlagUpdateRequest>, IDeepCloneable<AccountFlagUpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountFlagUpdateRequest.__c __9 = new AccountFlagUpdateRequest.__c(); internal AccountFlagUpdateRequest cctor>b__39_0() { return new AccountFlagUpdateRequest(); } } private static readonly MessageParser<AccountFlagUpdateRequest> _parser = new MessageParser<AccountFlagUpdateRequest>(new Func<AccountFlagUpdateRequest>(AccountFlagUpdateRequest.__c.__9.<.cctor>b__39_0)); public const int AccountFieldNumber = 1; private AccountId account_; public const int RegionFieldNumber = 2; private uint region_; public const int FlagFieldNumber = 3; private ulong flag_; public const int ActiveFieldNumber = 4; private bool active_; public static MessageParser<AccountFlagUpdateRequest> Parser { get { return AccountFlagUpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return AccountFlagUpdateRequest.Descriptor; } } public AccountId Account { get { return this.account_; } set { this.account_ = value; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public ulong Flag { get { return this.flag_; } set { this.flag_ = value; } } public bool Active { get { return this.active_; } set { this.active_ = value; } } public AccountFlagUpdateRequest() { } public AccountFlagUpdateRequest(AccountFlagUpdateRequest other) : this() { while (true) { IL_93: uint arg_73_0 = 3505851735u; while (true) { uint num; switch ((num = (arg_73_0 ^ 2173516452u)) % 5u) { case 1u: this.Account = ((other.account_ != null) ? other.Account.Clone() : null); arg_73_0 = 3473187749u; continue; case 2u: goto IL_93; case 3u: this.active_ = other.active_; arg_73_0 = (num * 2164335488u ^ 670741320u); continue; case 4u: this.region_ = other.region_; this.flag_ = other.flag_; arg_73_0 = (num * 2683136703u ^ 1475538293u); continue; } return; } } } public AccountFlagUpdateRequest Clone() { return new AccountFlagUpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as AccountFlagUpdateRequest); } public bool Equals(AccountFlagUpdateRequest other) { if (other == null) { goto IL_3F; } goto IL_111; int arg_C3_0; while (true) { IL_BE: switch ((arg_C3_0 ^ -575957748) % 13) { case 0: return true; case 1: return false; case 2: arg_C3_0 = (AccountFlagUpdateRequest.smethod_0(this.Account, other.Account) ? -1183915219 : -1966650336); continue; case 3: return false; case 4: return false; case 5: arg_C3_0 = ((this.Region == other.Region) ? -1440334036 : -1332305623); continue; case 7: arg_C3_0 = ((this.Active == other.Active) ? -422759943 : -962536120); continue; case 8: goto IL_3F; case 9: return false; case 10: return false; case 11: arg_C3_0 = ((this.Flag == other.Flag) ? -475869761 : -2082154748); continue; case 12: goto IL_111; } break; } return true; IL_3F: arg_C3_0 = -844749741; goto IL_BE; IL_111: arg_C3_0 = ((other != this) ? -1288644683 : -862580257); goto IL_BE; } public override int GetHashCode() { int num = 1; while (true) { IL_15A: uint arg_124_0 = 3347535218u; while (true) { uint num2; switch ((num2 = (arg_124_0 ^ 2389512948u)) % 10u) { case 0u: num ^= this.Region.GetHashCode(); arg_124_0 = (num2 * 3895069765u ^ 429655459u); continue; case 1u: arg_124_0 = ((this.Flag != 0uL) ? 2460463329u : 3587855399u); continue; case 2u: arg_124_0 = (((this.account_ != null) ? 1122654199u : 1855228670u) ^ num2 * 1341820986u); continue; case 3u: num ^= this.Flag.GetHashCode(); arg_124_0 = (num2 * 2037057175u ^ 2999143492u); continue; case 4u: goto IL_15A; case 5u: arg_124_0 = (this.Active ? 3280175328u : 3314001495u); continue; case 6u: num ^= this.Active.GetHashCode(); arg_124_0 = (num2 * 3211034415u ^ 1620253691u); continue; case 8u: arg_124_0 = ((this.Region != 0u) ? 2459698230u : 3162259433u); continue; case 9u: num ^= AccountFlagUpdateRequest.smethod_1(this.Account); arg_124_0 = (num2 * 3509559226u ^ 1538539172u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.account_ != null) { goto IL_61; } goto IL_167; uint arg_11F_0; while (true) { IL_11A: uint num; switch ((num = (arg_11F_0 ^ 4072238118u)) % 11u) { case 0u: output.WriteUInt64(this.Flag); arg_11F_0 = (num * 1721909423u ^ 4183519380u); continue; case 1u: output.WriteRawTag(24); arg_11F_0 = (num * 3309271186u ^ 3045639420u); continue; case 2u: output.WriteRawTag(32); arg_11F_0 = (num * 1360824194u ^ 194968474u); continue; case 3u: arg_11F_0 = (this.Active ? 3625600576u : 3789083031u); continue; case 4u: arg_11F_0 = ((this.Flag == 0uL) ? 3915449238u : 4199599028u); continue; case 5u: output.WriteRawTag(16); output.WriteUInt32(this.Region); arg_11F_0 = (num * 3934054084u ^ 1421309542u); continue; case 6u: goto IL_61; case 8u: output.WriteRawTag(10); output.WriteMessage(this.Account); arg_11F_0 = (num * 3999308497u ^ 4008823990u); continue; case 9u: goto IL_167; case 10u: output.WriteBool(this.Active); arg_11F_0 = (num * 3005111827u ^ 3643476935u); continue; } break; } return; IL_61: arg_11F_0 = 3297766292u; goto IL_11A; IL_167: arg_11F_0 = ((this.Region != 0u) ? 3849146160u : 2754598590u); goto IL_11A; } public int CalculateSize() { int num = 0; if (this.account_ != null) { goto IL_D7; } goto IL_121; uint arg_E1_0; while (true) { IL_DC: uint num2; switch ((num2 = (arg_E1_0 ^ 1471297560u)) % 9u) { case 0u: goto IL_D7; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Flag); arg_E1_0 = (num2 * 3014395799u ^ 2507740425u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_E1_0 = (num2 * 3153190719u ^ 684288502u); continue; case 4u: arg_E1_0 = ((!this.Active) ? 1999173132u : 1435531748u); continue; case 5u: num += 2; arg_E1_0 = (num2 * 1474407399u ^ 105916520u); continue; case 6u: arg_E1_0 = ((this.Flag != 0uL) ? 1873631420u : 86993333u); continue; case 7u: goto IL_121; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Account); arg_E1_0 = (num2 * 2503540444u ^ 2098112528u); continue; } break; } return num; IL_D7: arg_E1_0 = 1444135521u; goto IL_DC; IL_121: arg_E1_0 = ((this.Region != 0u) ? 245821963u : 231616091u); goto IL_DC; } public void MergeFrom(AccountFlagUpdateRequest other) { if (other == null) { goto IL_AD; } goto IL_193; uint arg_143_0; while (true) { IL_13E: uint num; switch ((num = (arg_143_0 ^ 3460488113u)) % 13u) { case 0u: this.account_ = new AccountId(); arg_143_0 = (num * 1653056528u ^ 245461666u); continue; case 1u: this.Active = other.Active; arg_143_0 = (num * 1281244352u ^ 3458232405u); continue; case 2u: this.Account.MergeFrom(other.Account); arg_143_0 = 2677144922u; continue; case 3u: this.Region = other.Region; arg_143_0 = (num * 2381546538u ^ 2046976586u); continue; case 4u: arg_143_0 = ((other.Region != 0u) ? 2621612849u : 3921127242u); continue; case 5u: return; case 6u: goto IL_AD; case 7u: goto IL_193; case 8u: this.Flag = other.Flag; arg_143_0 = (num * 1969698741u ^ 3674743327u); continue; case 9u: arg_143_0 = ((other.Flag == 0uL) ? 4091104615u : 4071274281u); continue; case 10u: arg_143_0 = (other.Active ? 3000194138u : 3910235157u); continue; case 11u: arg_143_0 = (((this.account_ == null) ? 1133449653u : 1997096327u) ^ num * 610629025u); continue; } break; } return; IL_AD: arg_143_0 = 4134321808u; goto IL_13E; IL_193: arg_143_0 = ((other.account_ != null) ? 3372323236u : 2677144922u); goto IL_13E; } public void MergeFrom(CodedInputStream input) { while (true) { IL_227: uint num; uint arg_1BF_0 = ((num = input.ReadTag()) == 0u) ? 3797864600u : 3004187737u; while (true) { uint num2; switch ((num2 = (arg_1BF_0 ^ 3567355259u)) % 19u) { case 0u: arg_1BF_0 = (num2 * 3452126043u ^ 2518495955u); continue; case 1u: this.Flag = input.ReadUInt64(); arg_1BF_0 = 3562704770u; continue; case 2u: arg_1BF_0 = (((num != 10u) ? 2248709315u : 4059553708u) ^ num2 * 2777934992u); continue; case 3u: arg_1BF_0 = ((num != 24u) ? 4230458334u : 3454192046u); continue; case 5u: this.Region = input.ReadUInt32(); arg_1BF_0 = 2563542045u; continue; case 6u: goto IL_227; case 7u: arg_1BF_0 = (num2 * 3830653517u ^ 2047774680u); continue; case 8u: arg_1BF_0 = (num2 * 4262834686u ^ 687645359u); continue; case 9u: arg_1BF_0 = (((num == 32u) ? 4187410863u : 2998914817u) ^ num2 * 357518869u); continue; case 10u: this.account_ = new AccountId(); arg_1BF_0 = (num2 * 3926504257u ^ 4002614201u); continue; case 11u: input.SkipLastField(); arg_1BF_0 = 3017635362u; continue; case 12u: arg_1BF_0 = (((num == 16u) ? 3464219440u : 2764898506u) ^ num2 * 3250693062u); continue; case 13u: arg_1BF_0 = ((this.account_ != null) ? 3452773124u : 3518146310u); continue; case 14u: arg_1BF_0 = ((num > 16u) ? 2444855376u : 2163590724u); continue; case 15u: this.Active = input.ReadBool(); arg_1BF_0 = 2563542045u; continue; case 16u: arg_1BF_0 = 3004187737u; continue; case 17u: arg_1BF_0 = (num2 * 400908435u ^ 2093818086u); continue; case 18u: input.ReadMessage(this.account_); arg_1BF_0 = 2289824476u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/ContentHandleTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class ContentHandleTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ContentHandleTypesReflection.descriptor; } } static ContentHandleTypesReflection() { ContentHandleTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(ContentHandleTypesReflection.smethod_1(ContentHandleTypesReflection.smethod_0(new string[] { Module.smethod_36<string>(4231367272u), Module.smethod_37<string>(468699964u), Module.smethod_37<string>(118100012u), Module.smethod_36<string>(3837714008u), Module.smethod_33<string>(2134579345u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ContentHandleTypesReflection.smethod_2(typeof(ContentHandle).TypeHandle), ContentHandle.Parser, new string[] { Module.smethod_36<string>(1013076684u), Module.smethod_33<string>(2895131760u), Module.smethod_34<string>(2332982361u), Module.smethod_36<string>(3941997092u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Connection.V1/ConnectResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class ConnectResponse : IMessage<ConnectResponse>, IEquatable<ConnectResponse>, IDeepCloneable<ConnectResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ConnectResponse.__c __9 = new ConnectResponse.__c(); internal ConnectResponse cctor>b__59_0() { return new ConnectResponse(); } } private static readonly MessageParser<ConnectResponse> _parser = new MessageParser<ConnectResponse>(new Func<ConnectResponse>(ConnectResponse.__c.__9.<.cctor>b__59_0)); public const int ServerIdFieldNumber = 1; private ProcessId serverId_; public const int ClientIdFieldNumber = 2; private ProcessId clientId_; public const int BindResultFieldNumber = 3; private uint bindResult_; public const int BindResponseFieldNumber = 4; private BindResponse bindResponse_; public const int ContentHandleArrayFieldNumber = 5; private ConnectionMeteringContentHandles contentHandleArray_; public const int ServerTimeFieldNumber = 6; private ulong serverTime_; public const int UseBindlessRpcFieldNumber = 7; private bool useBindlessRpc_; public const int BinaryContentHandleArrayFieldNumber = 8; private ConnectionMeteringContentHandles binaryContentHandleArray_; public static MessageParser<ConnectResponse> Parser { get { return ConnectResponse._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ConnectResponse.Descriptor; } } public ProcessId ServerId { get { return this.serverId_; } set { this.serverId_ = value; } } public ProcessId ClientId { get { return this.clientId_; } set { this.clientId_ = value; } } public uint BindResult { get { return this.bindResult_; } set { this.bindResult_ = value; } } public BindResponse BindResponse { get { return this.bindResponse_; } set { this.bindResponse_ = value; } } public ConnectionMeteringContentHandles ContentHandleArray { get { return this.contentHandleArray_; } set { this.contentHandleArray_ = value; } } public ulong ServerTime { get { return this.serverTime_; } set { this.serverTime_ = value; } } public bool UseBindlessRpc { get { return this.useBindlessRpc_; } set { this.useBindlessRpc_ = value; } } public ConnectionMeteringContentHandles BinaryContentHandleArray { get { return this.binaryContentHandleArray_; } set { this.binaryContentHandleArray_ = value; } } public ConnectResponse() { } public ConnectResponse(ConnectResponse other) : this() { this.ServerId = ((other.serverId_ != null) ? other.ServerId.Clone() : null); this.ClientId = ((other.clientId_ != null) ? other.ClientId.Clone() : null); this.bindResult_ = other.bindResult_; this.BindResponse = ((other.bindResponse_ != null) ? other.BindResponse.Clone() : null); this.ContentHandleArray = ((other.contentHandleArray_ != null) ? other.ContentHandleArray.Clone() : null); this.serverTime_ = other.serverTime_; this.useBindlessRpc_ = other.useBindlessRpc_; this.BinaryContentHandleArray = ((other.binaryContentHandleArray_ != null) ? other.BinaryContentHandleArray.Clone() : null); } public ConnectResponse Clone() { return new ConnectResponse(this); } public override bool Equals(object other) { return this.Equals(other as ConnectResponse); } public bool Equals(ConnectResponse other) { if (other == null) { goto IL_125; } goto IL_1F0; int arg_182_0; while (true) { IL_17D: switch ((arg_182_0 ^ 1318224496) % 21) { case 0: arg_182_0 = ((!ConnectResponse.smethod_0(this.ClientId, other.ClientId)) ? 729928711 : 447793745); continue; case 1: return false; case 2: return false; case 3: return false; case 4: arg_182_0 = ((this.BindResult != other.BindResult) ? 285442847 : 1209554759); continue; case 5: goto IL_1F0; case 6: goto IL_125; case 7: return false; case 8: arg_182_0 = ((this.UseBindlessRpc == other.UseBindlessRpc) ? 80277860 : 870853466); continue; case 9: return false; case 10: return false; case 11: arg_182_0 = ((!ConnectResponse.smethod_0(this.ServerId, other.ServerId)) ? 2022232747 : 1674356065); continue; case 12: return false; case 13: arg_182_0 = ((!ConnectResponse.smethod_0(this.BindResponse, other.BindResponse)) ? 723383813 : 1946188722); continue; case 14: arg_182_0 = (ConnectResponse.smethod_0(this.ContentHandleArray, other.ContentHandleArray) ? 1201413328 : 1455621694); continue; case 15: return false; case 17: arg_182_0 = ((this.ServerTime == other.ServerTime) ? 2136239711 : 1525322209); continue; case 18: return true; case 19: return false; case 20: arg_182_0 = ((!ConnectResponse.smethod_0(this.BinaryContentHandleArray, other.BinaryContentHandleArray)) ? 580824675 : 167330970); continue; } break; } return true; IL_125: arg_182_0 = 1740000512; goto IL_17D; IL_1F0: arg_182_0 = ((other != this) ? 1850212299 : 1635574018); goto IL_17D; } public override int GetHashCode() { int num = 1 ^ ConnectResponse.smethod_1(this.ServerId); while (true) { IL_24F: uint arg_201_0 = 4204548226u; while (true) { uint num2; switch ((num2 = (arg_201_0 ^ 3232874134u)) % 16u) { case 0u: arg_201_0 = ((this.bindResponse_ == null) ? 3137372903u : 4263648682u); continue; case 1u: arg_201_0 = ((this.contentHandleArray_ == null) ? 3087692593u : 3333885995u); continue; case 2u: num ^= this.UseBindlessRpc.GetHashCode(); arg_201_0 = (num2 * 3560630770u ^ 2175167915u); continue; case 3u: arg_201_0 = (this.UseBindlessRpc ? 2180134516u : 3574037007u); continue; case 4u: arg_201_0 = (((this.clientId_ == null) ? 1362293880u : 13757061u) ^ num2 * 1990547770u); continue; case 5u: num ^= this.BinaryContentHandleArray.GetHashCode(); arg_201_0 = (num2 * 825150998u ^ 3363724032u); continue; case 6u: arg_201_0 = ((this.BindResult == 0u) ? 2360284966u : 3822316092u); continue; case 7u: arg_201_0 = ((this.ServerTime != 0uL) ? 2341345897u : 2722828757u); continue; case 9u: arg_201_0 = ((this.binaryContentHandleArray_ == null) ? 3859734254u : 4153878995u); continue; case 10u: num ^= this.BindResult.GetHashCode(); arg_201_0 = (num2 * 4110663427u ^ 4225811672u); continue; case 11u: num ^= ConnectResponse.smethod_1(this.ClientId); arg_201_0 = (num2 * 1432042725u ^ 3244908119u); continue; case 12u: num ^= this.BindResponse.GetHashCode(); arg_201_0 = (num2 * 2222543029u ^ 3284249483u); continue; case 13u: num ^= this.ContentHandleArray.GetHashCode(); arg_201_0 = (num2 * 3978577118u ^ 868468951u); continue; case 14u: goto IL_24F; case 15u: num ^= this.ServerTime.GetHashCode(); arg_201_0 = (num2 * 1467618343u ^ 408362764u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_2EC: uint arg_287_0 = 645432877u; while (true) { uint num; switch ((num = (arg_287_0 ^ 1272281201u)) % 22u) { case 0u: output.WriteRawTag(18); arg_287_0 = (num * 1761855565u ^ 486136730u); continue; case 1u: arg_287_0 = ((this.bindResponse_ == null) ? 1714917306u : 1865370520u); continue; case 2u: arg_287_0 = ((this.ServerTime == 0uL) ? 1030985863u : 109628753u); continue; case 3u: output.WriteRawTag(56); output.WriteBool(this.UseBindlessRpc); arg_287_0 = (num * 3900573780u ^ 787332181u); continue; case 4u: output.WriteRawTag(48); output.WriteUInt64(this.ServerTime); arg_287_0 = (num * 4056457816u ^ 3097959303u); continue; case 6u: output.WriteMessage(this.BinaryContentHandleArray); arg_287_0 = (num * 1408691408u ^ 2331176142u); continue; case 7u: output.WriteRawTag(66); arg_287_0 = (num * 1282964173u ^ 4278120550u); continue; case 8u: output.WriteMessage(this.ServerId); arg_287_0 = (num * 2998764321u ^ 3681560934u); continue; case 9u: arg_287_0 = (((this.clientId_ != null) ? 2634077527u : 3843204753u) ^ num * 351201398u); continue; case 10u: arg_287_0 = ((!this.UseBindlessRpc) ? 1480123449u : 1646234398u); continue; case 11u: output.WriteRawTag(34); arg_287_0 = (num * 3563278703u ^ 1060092212u); continue; case 12u: goto IL_2EC; case 13u: arg_287_0 = ((this.contentHandleArray_ == null) ? 764244057u : 1112117677u); continue; case 14u: output.WriteRawTag(42); arg_287_0 = (num * 811735379u ^ 1635034010u); continue; case 15u: output.WriteMessage(this.ContentHandleArray); arg_287_0 = (num * 1956159386u ^ 3334784447u); continue; case 16u: output.WriteMessage(this.BindResponse); arg_287_0 = (num * 1623084552u ^ 3271844266u); continue; case 17u: output.WriteRawTag(24); arg_287_0 = (num * 2169675946u ^ 3699870116u); continue; case 18u: arg_287_0 = ((this.binaryContentHandleArray_ == null) ? 942875950u : 1015943540u); continue; case 19u: output.WriteMessage(this.ClientId); arg_287_0 = (num * 461289918u ^ 2933185953u); continue; case 20u: arg_287_0 = ((this.BindResult == 0u) ? 1938655006u : 830097320u); continue; case 21u: output.WriteUInt32(this.BindResult); arg_287_0 = (num * 3296947620u ^ 1776510082u); continue; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.ServerId)); if (this.clientId_ != null) { goto IL_1B9; } goto IL_21B; uint arg_1C3_0; while (true) { IL_1BE: uint num2; switch ((num2 = (arg_1C3_0 ^ 3791955157u)) % 15u) { case 0u: goto IL_1B9; case 1u: num += 2; arg_1C3_0 = (num2 * 2380382816u ^ 1553358268u); continue; case 2u: arg_1C3_0 = ((this.ServerTime != 0uL) ? 3508308971u : 2698460086u); continue; case 3u: arg_1C3_0 = ((this.bindResponse_ != null) ? 3958433110u : 2495748688u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ServerTime); arg_1C3_0 = (num2 * 582912912u ^ 2341603158u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.BindResult); arg_1C3_0 = (num2 * 4224892910u ^ 1678585955u); continue; case 6u: goto IL_21B; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ClientId); arg_1C3_0 = (num2 * 4093551327u ^ 2686556770u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.BinaryContentHandleArray); arg_1C3_0 = (num2 * 4144649271u ^ 542872738u); continue; case 9u: arg_1C3_0 = ((this.contentHandleArray_ != null) ? 3492971801u : 2784346952u); continue; case 10u: arg_1C3_0 = (this.UseBindlessRpc ? 3378108876u : 2403501788u); continue; case 11u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ContentHandleArray); arg_1C3_0 = (num2 * 373644658u ^ 262925200u); continue; case 12u: arg_1C3_0 = ((this.binaryContentHandleArray_ != null) ? 3234260437u : 2673107874u); continue; case 14u: num += 1 + CodedOutputStream.ComputeMessageSize(this.BindResponse); arg_1C3_0 = (num2 * 3266554429u ^ 865042535u); continue; } break; } return num; IL_1B9: arg_1C3_0 = 3754357247u; goto IL_1BE; IL_21B: arg_1C3_0 = ((this.BindResult == 0u) ? 2990741201u : 3771029498u); goto IL_1BE; } public void MergeFrom(ConnectResponse other) { if (other == null) { goto IL_2BD; } goto IL_3F3; uint arg_363_0; while (true) { IL_35E: uint num; switch ((num = (arg_363_0 ^ 2782150612u)) % 29u) { case 0u: arg_363_0 = ((other.ServerTime != 0uL) ? 4004845303u : 3307781695u); continue; case 1u: this.contentHandleArray_ = new ConnectionMeteringContentHandles(); arg_363_0 = (num * 3474839880u ^ 1686640285u); continue; case 2u: arg_363_0 = (((this.bindResponse_ != null) ? 3798175165u : 2688091483u) ^ num * 3746955508u); continue; case 3u: this.clientId_ = new ProcessId(); arg_363_0 = (num * 3129218323u ^ 711262546u); continue; case 4u: this.BindResult = other.BindResult; arg_363_0 = (num * 3247299427u ^ 40460160u); continue; case 5u: goto IL_2BD; case 6u: arg_363_0 = ((other.clientId_ != null) ? 4081932844u : 4225330537u); continue; case 7u: arg_363_0 = ((other.contentHandleArray_ == null) ? 2180499315u : 3454686066u); continue; case 8u: arg_363_0 = (((this.contentHandleArray_ == null) ? 2920582551u : 4027478817u) ^ num * 2908513942u); continue; case 9u: arg_363_0 = ((!other.UseBindlessRpc) ? 3237884814u : 2907279431u); continue; case 10u: arg_363_0 = (((this.clientId_ != null) ? 1721500144u : 1929511106u) ^ num * 352045472u); continue; case 11u: this.binaryContentHandleArray_ = new ConnectionMeteringContentHandles(); arg_363_0 = (num * 2737657680u ^ 554995590u); continue; case 12u: arg_363_0 = ((other.BindResult != 0u) ? 3326611312u : 2470331628u); continue; case 13u: this.ClientId.MergeFrom(other.ClientId); arg_363_0 = 4225330537u; continue; case 14u: this.ServerTime = other.ServerTime; arg_363_0 = (num * 4248313526u ^ 1436935901u); continue; case 15u: this.ContentHandleArray.MergeFrom(other.ContentHandleArray); arg_363_0 = 2180499315u; continue; case 16u: arg_363_0 = (((this.serverId_ != null) ? 4263904922u : 3503317118u) ^ num * 2811650730u); continue; case 17u: goto IL_3F3; case 18u: return; case 19u: arg_363_0 = (((this.binaryContentHandleArray_ == null) ? 2042919258u : 55491295u) ^ num * 530148065u); continue; case 20u: arg_363_0 = ((other.bindResponse_ != null) ? 3224476245u : 3036926837u); continue; case 21u: this.ServerId.MergeFrom(other.ServerId); arg_363_0 = 3116478756u; continue; case 22u: this.UseBindlessRpc = other.UseBindlessRpc; arg_363_0 = (num * 14635639u ^ 3026747611u); continue; case 23u: this.serverId_ = new ProcessId(); arg_363_0 = (num * 3759469448u ^ 1490933116u); continue; case 24u: this.bindResponse_ = new BindResponse(); arg_363_0 = (num * 1281953328u ^ 2751373913u); continue; case 25u: this.BindResponse.MergeFrom(other.BindResponse); arg_363_0 = 3036926837u; continue; case 26u: arg_363_0 = ((other.binaryContentHandleArray_ != null) ? 3419329885u : 3874914061u); continue; case 27u: this.BinaryContentHandleArray.MergeFrom(other.BinaryContentHandleArray); arg_363_0 = 3874914061u; continue; } break; } return; IL_2BD: arg_363_0 = 2210598140u; goto IL_35E; IL_3F3: arg_363_0 = ((other.serverId_ == null) ? 3116478756u : 2157262051u); goto IL_35E; } public void MergeFrom(CodedInputStream input) { while (true) { IL_522: uint num; uint arg_45E_0 = ((num = input.ReadTag()) == 0u) ? 2418578182u : 3120437627u; while (true) { uint num2; switch ((num2 = (arg_45E_0 ^ 2482675237u)) % 42u) { case 0u: arg_45E_0 = (((num != 66u) ? 3910046646u : 2711930753u) ^ num2 * 2320556613u); continue; case 1u: this.ServerTime = input.ReadUInt64(); arg_45E_0 = 2965623458u; continue; case 2u: arg_45E_0 = (((num != 18u) ? 1853795072u : 1832996189u) ^ num2 * 2268374739u); continue; case 3u: input.ReadMessage(this.serverId_); arg_45E_0 = 2732743234u; continue; case 4u: arg_45E_0 = ((this.bindResponse_ != null) ? 2398972302u : 3051169747u); continue; case 5u: input.ReadMessage(this.clientId_); arg_45E_0 = 2805825450u; continue; case 6u: arg_45E_0 = (((num == 10u) ? 99391440u : 29836323u) ^ num2 * 246343287u); continue; case 7u: input.ReadMessage(this.contentHandleArray_); arg_45E_0 = 3313286757u; continue; case 8u: arg_45E_0 = ((this.binaryContentHandleArray_ != null) ? 3329023022u : 3175981844u); continue; case 9u: input.ReadMessage(this.binaryContentHandleArray_); arg_45E_0 = 2965623458u; continue; case 10u: this.bindResponse_ = new BindResponse(); arg_45E_0 = (num2 * 1230666243u ^ 1768882284u); continue; case 11u: arg_45E_0 = ((num > 48u) ? 2591990283u : 3004624348u); continue; case 12u: arg_45E_0 = (num2 * 1116963318u ^ 4267139046u); continue; case 13u: arg_45E_0 = (num2 * 1025630130u ^ 1876794660u); continue; case 14u: arg_45E_0 = (((num != 48u) ? 3262526884u : 2838145356u) ^ num2 * 3798794442u); continue; case 15u: this.BindResult = input.ReadUInt32(); arg_45E_0 = 2401269859u; continue; case 16u: arg_45E_0 = ((this.contentHandleArray_ == null) ? 2231357695u : 2815685752u); continue; case 17u: this.UseBindlessRpc = input.ReadBool(); arg_45E_0 = 2965623458u; continue; case 18u: arg_45E_0 = (num2 * 4156211647u ^ 666563932u); continue; case 19u: input.ReadMessage(this.bindResponse_); arg_45E_0 = 3209187345u; continue; case 20u: arg_45E_0 = (num2 * 2338828754u ^ 1264404938u); continue; case 21u: goto IL_522; case 22u: arg_45E_0 = ((num != 24u) ? 3779788303u : 3498018448u); continue; case 23u: arg_45E_0 = (((num == 42u) ? 3899138507u : 3248015087u) ^ num2 * 263499142u); continue; case 24u: this.contentHandleArray_ = new ConnectionMeteringContentHandles(); arg_45E_0 = (num2 * 3389342373u ^ 1691480826u); continue; case 25u: arg_45E_0 = ((this.serverId_ != null) ? 2721171666u : 4093628274u); continue; case 26u: arg_45E_0 = ((num > 34u) ? 2619294252u : 2755286584u); continue; case 28u: arg_45E_0 = (num2 * 1619897105u ^ 2842769122u); continue; case 29u: arg_45E_0 = (((num <= 18u) ? 2062851886u : 792937794u) ^ num2 * 379563937u); continue; case 30u: arg_45E_0 = (num2 * 2662060290u ^ 2562310858u); continue; case 31u: input.SkipLastField(); arg_45E_0 = 3775713713u; continue; case 32u: arg_45E_0 = ((this.clientId_ == null) ? 3431743965u : 3527271730u); continue; case 33u: this.binaryContentHandleArray_ = new ConnectionMeteringContentHandles(); arg_45E_0 = (num2 * 1790684575u ^ 312001089u); continue; case 34u: arg_45E_0 = ((num != 56u) ? 4010809765u : 2243028052u); continue; case 35u: arg_45E_0 = (num2 * 3552996994u ^ 3641602436u); continue; case 36u: this.clientId_ = new ProcessId(); arg_45E_0 = (num2 * 1230058455u ^ 2731631738u); continue; case 37u: arg_45E_0 = (num2 * 3771555177u ^ 2997658629u); continue; case 38u: arg_45E_0 = (((num != 34u) ? 2461634467u : 2705413377u) ^ num2 * 2508549672u); continue; case 39u: arg_45E_0 = (num2 * 3388986256u ^ 967543890u); continue; case 40u: arg_45E_0 = 3120437627u; continue; case 41u: this.serverId_ = new ProcessId(); arg_45E_0 = (num2 * 1148813679u ^ 2086392683u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Presence.V1/SubscribeRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public sealed class SubscribeRequest : IMessage<SubscribeRequest>, IEquatable<SubscribeRequest>, IDeepCloneable<SubscribeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscribeRequest.__c __9 = new SubscribeRequest.__c(); internal SubscribeRequest cctor>b__44_0() { return new SubscribeRequest(); } } private static readonly MessageParser<SubscribeRequest> _parser = new MessageParser<SubscribeRequest>(new Func<SubscribeRequest>(SubscribeRequest.__c.__9.<.cctor>b__44_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int EntityIdFieldNumber = 2; private EntityId entityId_; public const int ObjectIdFieldNumber = 3; private ulong objectId_; public const int ProgramFieldNumber = 4; private static readonly FieldCodec<uint> _repeated_program_codec = FieldCodec.ForFixed32(34u); private readonly RepeatedField<uint> program_ = new RepeatedField<uint>(); public const int FlagPublicFieldNumber = 5; private bool flagPublic_; public static MessageParser<SubscribeRequest> Parser { get { return SubscribeRequest._parser; } } public static MessageDescriptor Descriptor { get { return PresenceServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return SubscribeRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public RepeatedField<uint> Program { get { return this.program_; } } public bool FlagPublic { get { return this.flagPublic_; } set { this.flagPublic_ = value; } } public SubscribeRequest() { } public SubscribeRequest(SubscribeRequest other) : this() { while (true) { IL_D2: uint arg_AA_0 = 4147933475u; while (true) { uint num; switch ((num = (arg_AA_0 ^ 2161640928u)) % 7u) { case 0u: goto IL_D2; case 1u: this.program_ = other.program_.Clone(); arg_AA_0 = (num * 2449852625u ^ 1261156542u); continue; case 2u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_AA_0 = 2508569309u; continue; case 3u: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); arg_AA_0 = 3630356268u; continue; case 5u: this.flagPublic_ = other.flagPublic_; arg_AA_0 = (num * 3425382422u ^ 623876445u); continue; case 6u: this.objectId_ = other.objectId_; arg_AA_0 = (num * 1995052304u ^ 994650161u); continue; } return; } } } public SubscribeRequest Clone() { return new SubscribeRequest(this); } public override bool Equals(object other) { return this.Equals(other as SubscribeRequest); } public bool Equals(SubscribeRequest other) { if (other == null) { goto IL_71; } goto IL_150; int arg_FA_0; while (true) { IL_F5: switch ((arg_FA_0 ^ -1059517055) % 15) { case 0: goto IL_150; case 1: arg_FA_0 = (this.program_.Equals(other.program_) ? -168163366 : -1793894336); continue; case 2: arg_FA_0 = (SubscribeRequest.smethod_0(this.AgentId, other.AgentId) ? -1293838794 : -1843716421); continue; case 4: arg_FA_0 = ((this.ObjectId == other.ObjectId) ? -816524782 : -1679194175); continue; case 5: return false; case 6: return false; case 7: goto IL_71; case 8: return false; case 9: arg_FA_0 = ((this.FlagPublic != other.FlagPublic) ? -805387789 : -728448309); continue; case 10: return false; case 11: return false; case 12: return false; case 13: arg_FA_0 = (SubscribeRequest.smethod_0(this.EntityId, other.EntityId) ? -399548154 : -2041285777); continue; case 14: return true; } break; } return true; IL_71: arg_FA_0 = -67151912; goto IL_F5; IL_150: arg_FA_0 = ((other == this) ? -1159316683 : -1007009855); goto IL_F5; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_78; } goto IL_FD; uint arg_D1_0; while (true) { IL_CC: uint num2; switch ((num2 = (arg_D1_0 ^ 2585830225u)) % 8u) { case 0u: num ^= this.program_.GetHashCode(); arg_D1_0 = ((!this.FlagPublic) ? 3577033180u : 3445708656u); continue; case 1u: num ^= this.FlagPublic.GetHashCode(); arg_D1_0 = (num2 * 2625452326u ^ 645375034u); continue; case 2u: goto IL_78; case 3u: arg_D1_0 = (((this.ObjectId == 0uL) ? 2540157907u : 3240818796u) ^ num2 * 2870375062u); continue; case 4u: goto IL_FD; case 6u: num ^= SubscribeRequest.smethod_1(this.AgentId); arg_D1_0 = (num2 * 549261466u ^ 445140049u); continue; case 7u: num ^= this.ObjectId.GetHashCode(); arg_D1_0 = (num2 * 1737124730u ^ 2165347047u); continue; } break; } return num; IL_78: arg_D1_0 = 2995339615u; goto IL_CC; IL_FD: num ^= SubscribeRequest.smethod_1(this.EntityId); arg_D1_0 = 3971246154u; goto IL_CC; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_2B; } goto IL_124; uint arg_F3_0; while (true) { IL_EE: uint num; switch ((num = (arg_F3_0 ^ 4066333483u)) % 9u) { case 0u: output.WriteRawTag(24); output.WriteUInt64(this.ObjectId); arg_F3_0 = (num * 3465962251u ^ 2029114433u); continue; case 1u: this.program_.WriteTo(output, SubscribeRequest._repeated_program_codec); arg_F3_0 = (this.FlagPublic ? 3532529957u : 3510009777u); continue; case 3u: output.WriteRawTag(40); output.WriteBool(this.FlagPublic); arg_F3_0 = (num * 1507474584u ^ 1077247969u); continue; case 4u: output.WriteRawTag(10); arg_F3_0 = (num * 1747618687u ^ 1310679324u); continue; case 5u: goto IL_124; case 6u: arg_F3_0 = (((this.ObjectId != 0uL) ? 1834017854u : 1464960798u) ^ num * 1678166577u); continue; case 7u: goto IL_2B; case 8u: output.WriteMessage(this.AgentId); arg_F3_0 = (num * 3070204482u ^ 3519976904u); continue; } break; } return; IL_2B: arg_F3_0 = 3711122022u; goto IL_EE; IL_124: output.WriteRawTag(18); output.WriteMessage(this.EntityId); arg_F3_0 = 3576548959u; goto IL_EE; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_0D; } goto IL_10B; uint arg_DA_0; while (true) { IL_D5: uint num2; switch ((num2 = (arg_DA_0 ^ 2885048772u)) % 9u) { case 0u: num += 2; arg_DA_0 = (num2 * 898855238u ^ 2834593568u); continue; case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_DA_0 = (num2 * 3304442342u ^ 484738084u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_DA_0 = (num2 * 4125124610u ^ 2958909194u); continue; case 4u: arg_DA_0 = (((this.ObjectId == 0uL) ? 2280955048u : 4019406046u) ^ num2 * 3345826934u); continue; case 5u: arg_DA_0 = ((this.FlagPublic ? 566468863u : 639899090u) ^ num2 * 3862836592u); continue; case 6u: num += this.program_.CalculateSize(SubscribeRequest._repeated_program_codec); arg_DA_0 = 3990816709u; continue; case 7u: goto IL_0D; case 8u: goto IL_10B; } break; } return num; IL_0D: arg_DA_0 = 3446539741u; goto IL_D5; IL_10B: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_DA_0 = 3243503244u; goto IL_D5; } public void MergeFrom(SubscribeRequest other) { if (other == null) { goto IL_9D; } goto IL_1F5; uint arg_19D_0; while (true) { IL_198: uint num; switch ((num = (arg_19D_0 ^ 596970489u)) % 15u) { case 0u: this.program_.Add(other.program_); arg_19D_0 = (other.FlagPublic ? 244616871u : 1772022305u); continue; case 2u: arg_19D_0 = ((other.entityId_ != null) ? 1285651062u : 1339385792u); continue; case 3u: this.FlagPublic = other.FlagPublic; arg_19D_0 = (num * 2144609355u ^ 328573099u); continue; case 4u: this.EntityId.MergeFrom(other.EntityId); arg_19D_0 = 1339385792u; continue; case 5u: this.agentId_ = new EntityId(); arg_19D_0 = (num * 4088194530u ^ 1777062448u); continue; case 6u: goto IL_1F5; case 7u: arg_19D_0 = ((other.ObjectId != 0uL) ? 2032832472u : 368178849u); continue; case 8u: arg_19D_0 = (((this.agentId_ == null) ? 2068994494u : 1047071064u) ^ num * 220100641u); continue; case 9u: goto IL_9D; case 10u: this.entityId_ = new EntityId(); arg_19D_0 = (num * 2432052123u ^ 3561017010u); continue; case 11u: this.ObjectId = other.ObjectId; arg_19D_0 = (num * 59873253u ^ 1207983652u); continue; case 12u: this.AgentId.MergeFrom(other.AgentId); arg_19D_0 = 2129066712u; continue; case 13u: return; case 14u: arg_19D_0 = (((this.entityId_ != null) ? 1452155908u : 15482613u) ^ num * 3176192891u); continue; } break; } return; IL_9D: arg_19D_0 = 1265292998u; goto IL_198; IL_1F5: arg_19D_0 = ((other.agentId_ == null) ? 2129066712u : 62599355u); goto IL_198; } public void MergeFrom(CodedInputStream input) { while (true) { IL_315: uint num; uint arg_291_0 = ((num = input.ReadTag()) != 0u) ? 119781018u : 2035633210u; while (true) { uint num2; switch ((num2 = (arg_291_0 ^ 273965724u)) % 26u) { case 0u: arg_291_0 = (num2 * 3664723926u ^ 549080885u); continue; case 1u: arg_291_0 = (((num != 10u) ? 826238375u : 254615165u) ^ num2 * 1855052012u); continue; case 2u: arg_291_0 = (num2 * 3356249962u ^ 1412598367u); continue; case 3u: this.ObjectId = input.ReadUInt64(); arg_291_0 = 675860167u; continue; case 4u: input.ReadMessage(this.agentId_); arg_291_0 = 24068532u; continue; case 5u: this.program_.AddEntriesFrom(input, SubscribeRequest._repeated_program_codec); arg_291_0 = 1326647160u; continue; case 6u: arg_291_0 = ((num <= 24u) ? 1856700279u : 2118962255u); continue; case 7u: arg_291_0 = ((this.agentId_ != null) ? 352554822u : 385957478u); continue; case 8u: arg_291_0 = 119781018u; continue; case 9u: arg_291_0 = ((num == 34u) ? 1944330493u : 2027551040u); continue; case 10u: arg_291_0 = (((num != 37u) ? 4134795712u : 2941735649u) ^ num2 * 3649897201u); continue; case 11u: arg_291_0 = (num2 * 770755779u ^ 503106406u); continue; case 13u: input.ReadMessage(this.entityId_); arg_291_0 = 2074102386u; continue; case 14u: this.agentId_ = new EntityId(); arg_291_0 = (num2 * 1342340260u ^ 4038010734u); continue; case 15u: this.FlagPublic = input.ReadBool(); arg_291_0 = 914556471u; continue; case 16u: arg_291_0 = (num2 * 697989208u ^ 73257975u); continue; case 17u: input.SkipLastField(); arg_291_0 = 465508435u; continue; case 18u: this.entityId_ = new EntityId(); arg_291_0 = (num2 * 7110975u ^ 94061553u); continue; case 19u: arg_291_0 = (num2 * 1278055345u ^ 1228193832u); continue; case 20u: arg_291_0 = (num2 * 1444559645u ^ 2864741057u); continue; case 21u: arg_291_0 = ((this.entityId_ != null) ? 1708823635u : 1462116162u); continue; case 22u: arg_291_0 = (((num != 24u) ? 838952324u : 2089128315u) ^ num2 * 1905480191u); continue; case 23u: arg_291_0 = (((num == 18u) ? 2260332112u : 4105695741u) ^ num2 * 44416239u); continue; case 24u: arg_291_0 = (((num != 40u) ? 898965317u : 263266885u) ^ num2 * 1460261246u); continue; case 25u: goto IL_315; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/SendInvitationRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class SendInvitationRequest : IMessage<SendInvitationRequest>, IEquatable<SendInvitationRequest>, IDeepCloneable<SendInvitationRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendInvitationRequest.__c __9 = new SendInvitationRequest.__c(); internal SendInvitationRequest cctor>b__44_0() { return new SendInvitationRequest(); } } private static readonly MessageParser<SendInvitationRequest> _parser = new MessageParser<SendInvitationRequest>(new Func<SendInvitationRequest>(SendInvitationRequest.__c.__9.<.cctor>b__44_0)); public const int AgentIdentityFieldNumber = 1; private Identity agentIdentity_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int ParamsFieldNumber = 3; private InvitationParams params_; public const int AgentInfoFieldNumber = 4; private AccountInfo agentInfo_; public const int TargetFieldNumber = 5; private InvitationTarget target_; public static MessageParser<SendInvitationRequest> Parser { get { return SendInvitationRequest._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return SendInvitationRequest.Descriptor; } } public Identity AgentIdentity { get { return this.agentIdentity_; } set { this.agentIdentity_ = value; } } [Obsolete] public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public InvitationParams Params { get { return this.params_; } set { this.params_ = value; } } public AccountInfo AgentInfo { get { return this.agentInfo_; } set { this.agentInfo_ = value; } } public InvitationTarget Target { get { return this.target_; } set { this.target_ = value; } } public SendInvitationRequest() { } public SendInvitationRequest(SendInvitationRequest other) : this() { while (true) { IL_CD: int arg_AF_0 = 1510290348; while (true) { switch ((arg_AF_0 ^ 808385605) % 5) { case 0: goto IL_CD; case 1: this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.Params = ((other.params_ != null) ? other.Params.Clone() : null); this.AgentInfo = ((other.agentInfo_ != null) ? other.AgentInfo.Clone() : null); arg_AF_0 = 750766957; continue; case 3: this.Target = ((other.target_ != null) ? other.Target.Clone() : null); arg_AF_0 = 695563032; continue; case 4: this.AgentIdentity = ((other.agentIdentity_ != null) ? other.AgentIdentity.Clone() : null); arg_AF_0 = 1498553803; continue; } return; } } } public SendInvitationRequest Clone() { return new SendInvitationRequest(this); } public override bool Equals(object other) { return this.Equals(other as SendInvitationRequest); } public bool Equals(SendInvitationRequest other) { if (other == null) { goto IL_47; } goto IL_15D; int arg_107_0; while (true) { IL_102: switch ((arg_107_0 ^ 2025144914) % 15) { case 0: arg_107_0 = ((!SendInvitationRequest.smethod_0(this.Params, other.Params)) ? 1667160873 : 1346969776); continue; case 1: arg_107_0 = (SendInvitationRequest.smethod_0(this.AgentInfo, other.AgentInfo) ? 1414472183 : 909666928); continue; case 2: arg_107_0 = ((!SendInvitationRequest.smethod_0(this.TargetId, other.TargetId)) ? 257175677 : 409028160); continue; case 3: arg_107_0 = ((!SendInvitationRequest.smethod_0(this.Target, other.Target)) ? 56716883 : 1470353683); continue; case 4: goto IL_47; case 5: return false; case 6: return false; case 7: goto IL_15D; case 8: return false; case 9: return true; case 10: return false; case 12: arg_107_0 = (SendInvitationRequest.smethod_0(this.AgentIdentity, other.AgentIdentity) ? 1479593920 : 1667803999); continue; case 13: return false; case 14: return false; } break; } return true; IL_47: arg_107_0 = 1044157969; goto IL_102; IL_15D: arg_107_0 = ((other != this) ? 323797573 : 1619594161); goto IL_102; } public override int GetHashCode() { int num = 1; while (true) { IL_197: uint arg_15A_0 = 132576702u; while (true) { uint num2; switch ((num2 = (arg_15A_0 ^ 721519708u)) % 12u) { case 1u: num ^= SendInvitationRequest.smethod_1(this.Target); arg_15A_0 = (num2 * 3591505444u ^ 2590354304u); continue; case 2u: arg_15A_0 = (((this.agentIdentity_ == null) ? 2883825382u : 3242720783u) ^ num2 * 2389658381u); continue; case 3u: goto IL_197; case 4u: arg_15A_0 = ((this.targetId_ != null) ? 479017691u : 2125998910u); continue; case 5u: num ^= SendInvitationRequest.smethod_1(this.AgentIdentity); arg_15A_0 = (num2 * 2579382234u ^ 208597366u); continue; case 6u: arg_15A_0 = ((this.params_ != null) ? 153581790u : 1855625453u); continue; case 7u: num ^= SendInvitationRequest.smethod_1(this.TargetId); arg_15A_0 = (num2 * 140823852u ^ 2613506314u); continue; case 8u: arg_15A_0 = ((this.target_ != null) ? 985846097u : 1980098644u); continue; case 9u: arg_15A_0 = ((this.agentInfo_ != null) ? 682911575u : 2058676340u); continue; case 10u: num ^= SendInvitationRequest.smethod_1(this.Params); arg_15A_0 = (num2 * 452643471u ^ 3479386227u); continue; case 11u: num ^= SendInvitationRequest.smethod_1(this.AgentInfo); arg_15A_0 = (num2 * 291770556u ^ 4189815904u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentIdentity_ != null) { goto IL_13C; } goto IL_1D2; uint arg_17E_0; while (true) { IL_179: uint num; switch ((num = (arg_17E_0 ^ 93951081u)) % 14u) { case 0u: arg_17E_0 = ((this.params_ != null) ? 1354056076u : 1300611552u); continue; case 1u: output.WriteRawTag(26); arg_17E_0 = (num * 1292232891u ^ 2388628713u); continue; case 2u: goto IL_13C; case 3u: arg_17E_0 = ((this.agentInfo_ == null) ? 2007736377u : 640617459u); continue; case 5u: output.WriteRawTag(18); output.WriteMessage(this.TargetId); arg_17E_0 = (num * 1956241553u ^ 1289860594u); continue; case 6u: output.WriteRawTag(34); arg_17E_0 = (num * 2479696975u ^ 2149333973u); continue; case 7u: output.WriteMessage(this.Target); arg_17E_0 = (num * 3361381666u ^ 2660859795u); continue; case 8u: output.WriteMessage(this.AgentInfo); arg_17E_0 = (num * 2676317065u ^ 3394612275u); continue; case 9u: output.WriteRawTag(42); arg_17E_0 = (num * 2216577608u ^ 3338513376u); continue; case 10u: output.WriteRawTag(10); output.WriteMessage(this.AgentIdentity); arg_17E_0 = (num * 1329313313u ^ 206451496u); continue; case 11u: goto IL_1D2; case 12u: arg_17E_0 = ((this.target_ != null) ? 1929301048u : 276872241u); continue; case 13u: output.WriteMessage(this.Params); arg_17E_0 = (num * 3577197065u ^ 1828821791u); continue; } break; } return; IL_13C: arg_17E_0 = 446011563u; goto IL_179; IL_1D2: arg_17E_0 = ((this.targetId_ != null) ? 410210752u : 1477402955u); goto IL_179; } public int CalculateSize() { int num = 0; if (this.agentIdentity_ != null) { goto IL_65; } goto IL_17B; uint arg_133_0; while (true) { IL_12E: uint num2; switch ((num2 = (arg_133_0 ^ 111159404u)) % 11u) { case 0u: arg_133_0 = ((this.params_ == null) ? 462074162u : 1317347740u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Target); arg_133_0 = (num2 * 2806112365u ^ 453569849u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Params); arg_133_0 = (num2 * 2269289643u ^ 4179710562u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_133_0 = (num2 * 742826197u ^ 2651154801u); continue; case 5u: arg_133_0 = ((this.target_ == null) ? 1690791881u : 1780953308u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentIdentity); arg_133_0 = (num2 * 3022224040u ^ 530834084u); continue; case 7u: goto IL_17B; case 8u: goto IL_65; case 9u: arg_133_0 = ((this.agentInfo_ != null) ? 355011069u : 133043382u); continue; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentInfo); arg_133_0 = (num2 * 1050150931u ^ 3485208949u); continue; } break; } return num; IL_65: arg_133_0 = 494755867u; goto IL_12E; IL_17B: arg_133_0 = ((this.targetId_ != null) ? 860627451u : 1755919314u); goto IL_12E; } public void MergeFrom(SendInvitationRequest other) { if (other == null) { goto IL_44; } goto IL_312; uint arg_29A_0; while (true) { IL_295: uint num; switch ((num = (arg_29A_0 ^ 3855063469u)) % 23u) { case 0u: this.Target.MergeFrom(other.Target); arg_29A_0 = 2880268281u; continue; case 1u: goto IL_312; case 2u: this.Params.MergeFrom(other.Params); arg_29A_0 = 3711966001u; continue; case 3u: return; case 4u: this.AgentIdentity.MergeFrom(other.AgentIdentity); arg_29A_0 = 4290884941u; continue; case 5u: arg_29A_0 = (((this.agentIdentity_ == null) ? 2620838903u : 3964011838u) ^ num * 2231507777u); continue; case 6u: arg_29A_0 = (((this.targetId_ == null) ? 972949639u : 1503292489u) ^ num * 4195906360u); continue; case 7u: arg_29A_0 = ((other.agentInfo_ == null) ? 4274579723u : 3486769970u); continue; case 8u: arg_29A_0 = ((other.targetId_ == null) ? 2951070316u : 3974400856u); continue; case 9u: arg_29A_0 = ((other.target_ == null) ? 2880268281u : 4005848807u); continue; case 10u: arg_29A_0 = ((other.params_ == null) ? 3711966001u : 3326848307u); continue; case 11u: this.target_ = new InvitationTarget(); arg_29A_0 = (num * 1969860531u ^ 2024440218u); continue; case 12u: arg_29A_0 = (((this.params_ != null) ? 4089411133u : 2337163710u) ^ num * 3009200040u); continue; case 13u: arg_29A_0 = (((this.target_ == null) ? 825548741u : 283697562u) ^ num * 1794732214u); continue; case 14u: this.agentIdentity_ = new Identity(); arg_29A_0 = (num * 2713943221u ^ 3561919088u); continue; case 15u: this.AgentInfo.MergeFrom(other.AgentInfo); arg_29A_0 = 4274579723u; continue; case 16u: this.params_ = new InvitationParams(); arg_29A_0 = (num * 535890340u ^ 1494726881u); continue; case 17u: this.targetId_ = new EntityId(); arg_29A_0 = (num * 3718407566u ^ 729774701u); continue; case 18u: this.agentInfo_ = new AccountInfo(); arg_29A_0 = (num * 3717961086u ^ 1535166717u); continue; case 20u: this.TargetId.MergeFrom(other.TargetId); arg_29A_0 = 2951070316u; continue; case 21u: goto IL_44; case 22u: arg_29A_0 = (((this.agentInfo_ != null) ? 1194985119u : 1560729160u) ^ num * 3443651636u); continue; } break; } return; IL_44: arg_29A_0 = 2846958446u; goto IL_295; IL_312: arg_29A_0 = ((other.agentIdentity_ != null) ? 2279287320u : 4290884941u); goto IL_295; } public void MergeFrom(CodedInputStream input) { while (true) { IL_392: uint num; uint arg_302_0 = ((num = input.ReadTag()) == 0u) ? 1827693986u : 1469439775u; while (true) { uint num2; switch ((num2 = (arg_302_0 ^ 905885067u)) % 29u) { case 1u: arg_302_0 = (num2 * 1798701549u ^ 2086939658u); continue; case 2u: arg_302_0 = (num2 * 3853523296u ^ 1334526413u); continue; case 3u: arg_302_0 = (((num == 42u) ? 2727641399u : 2204326410u) ^ num2 * 3120627748u); continue; case 4u: arg_302_0 = ((this.agentInfo_ == null) ? 976764193u : 1906129476u); continue; case 5u: this.targetId_ = new EntityId(); arg_302_0 = (num2 * 2757415859u ^ 1760966827u); continue; case 6u: arg_302_0 = ((this.params_ != null) ? 542498549u : 333971998u); continue; case 7u: arg_302_0 = ((this.agentIdentity_ != null) ? 3790383u : 785040497u); continue; case 8u: input.ReadMessage(this.target_); arg_302_0 = 1415627085u; continue; case 9u: this.target_ = new InvitationTarget(); arg_302_0 = (num2 * 2278391978u ^ 809566600u); continue; case 10u: arg_302_0 = 1469439775u; continue; case 11u: input.SkipLastField(); arg_302_0 = 1695621128u; continue; case 12u: arg_302_0 = (((num == 34u) ? 1635764665u : 1247907174u) ^ num2 * 63367510u); continue; case 13u: this.agentInfo_ = new AccountInfo(); arg_302_0 = (num2 * 4004443549u ^ 3968186374u); continue; case 14u: arg_302_0 = ((num != 26u) ? 871441180u : 898466470u); continue; case 15u: arg_302_0 = (num2 * 3025530379u ^ 798160760u); continue; case 16u: arg_302_0 = ((this.targetId_ == null) ? 190933231u : 446627911u); continue; case 17u: this.agentIdentity_ = new Identity(); arg_302_0 = (num2 * 904625972u ^ 3985242855u); continue; case 18u: arg_302_0 = (num2 * 1435642916u ^ 3318478842u); continue; case 19u: arg_302_0 = ((num <= 18u) ? 849371784u : 154595906u); continue; case 20u: input.ReadMessage(this.agentIdentity_); arg_302_0 = 1415627085u; continue; case 21u: input.ReadMessage(this.agentInfo_); arg_302_0 = 933532167u; continue; case 22u: this.params_ = new InvitationParams(); arg_302_0 = (num2 * 157977909u ^ 2262223916u); continue; case 23u: input.ReadMessage(this.params_); arg_302_0 = 1251008820u; continue; case 24u: arg_302_0 = (((num != 18u) ? 1387505185u : 39668938u) ^ num2 * 2671652771u); continue; case 25u: input.ReadMessage(this.targetId_); arg_302_0 = 1415627085u; continue; case 26u: arg_302_0 = (((num != 10u) ? 2793474131u : 3068879583u) ^ num2 * 2360764993u); continue; case 27u: goto IL_392; case 28u: arg_302_0 = ((this.target_ != null) ? 2046244436u : 1437128637u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Database.Auth.Entities/Account.cs using System; namespace Framework.Database.Auth.Entities { public class Account { public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } public string PasswordVerifier { get; set; } public string Salt { get; set; } public string IP { get; set; } public string SessionKey { get; set; } public byte SecurityFlags { get; set; } public string Language { get; set; } public string OS { get; set; } public byte Expansion { get; set; } public bool IsOnline { get; set; } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.ClientDB/FieldInfo.cs using System; namespace Arctium_WoW_ClientDB_Viewer.ClientDB { internal class FieldInfo { public int Bits { get; set; } public int Count { get; set; } } } <file_sep>/Framework.Logging/PacketLog.cs using Framework.Logging.IO; using System; using System.Net; using System.Runtime.CompilerServices; namespace Framework.Logging { public class PacketLog { private static LogWriter logger; public static void Initialize(string directory, string file) { PacketLog.logger = new LogWriter(directory, file); } [AsyncStateMachine(typeof(PacketLog.<Write>d__2__))] public static void Write<T>(ushort value, byte[] data, EndPoint remote) { PacketLog.<Write>d__2<T> <Write>d__; <Write>d__.value = value; while (true) { IL_91: uint arg_71_0 = 3218656159u; while (true) { uint num; switch ((num = (arg_71_0 ^ 2588396673u)) % 5u) { case 0u: <Write>d__.remote = remote; <Write>d__.__t__builder = AsyncVoidMethodBuilder.Create(); arg_71_0 = (num * 2538819616u ^ 1917197710u); continue; case 1u: { <Write>d__.__1__state = -1; AsyncVoidMethodBuilder __t__builder = <Write>d__.__t__builder; __t__builder.Start<PacketLog.<Write>d__2<T>>(ref <Write>d__); arg_71_0 = (num * 3802955501u ^ 3942881345u); continue; } case 2u: goto IL_91; case 3u: <Write>d__.data = data; arg_71_0 = (num * 1036221128u ^ 448973626u); continue; } return; } } } } } <file_sep>/PlayerFields.cs using System; public enum PlayerFields { DuelArbiter = 212, WowAccount = 216, LootTargetGUID = 220, PlayerFlags = 224, PlayerFlagsEx, GuildRankID, GuildDeleteDate, GuildLevel, HairColorID, CustomDisplayOption, Inebriation, ArenaFaction, DuelTeam, GuildTimeStamp, QuestLog, VisibleItems = 1035, PlayerTitle = 1073, FakeInebriation, VirtualPlayerRealm, CurrentSpecID, TaxiMountAnimKitID, AvgItemLevel, CurrentBattlePetBreedQuality = 1082, Prestige, HonorLevel, InvSlots, FarsightObject = 1833, SummonedBattlePetGUID = 1837, KnownTitles = 1841, Coinage = 1853, XP = 1855, NextLevelXP, Skill, CharacterPoints = 2305, MaxTalentTiers, TrackCreatureMask, TrackResourceMask, MainhandExpertise, OffhandExpertise, RangedExpertise, CombatRatingExpertise, BlockPercentage, DodgePercentage, DodgePercentageFromAttribute, ParryPercentage, ParryPercentageFromAttribute, CritPercentage, RangedCritPercentage, OffhandCritPercentage, SpellCritPercentage, ShieldBlock, ShieldBlockCritPercentage, Mastery, Speed, Lifesteal, Avoidance, Sturdiness, Versatility, VersatilityBonus, PvpPowerDamage, PvpPowerHealing, ExploredZones, RestInfo = 2653, ModDamageDonePos = 2657, ModDamageDoneNeg = 2664, ModDamageDonePercent = 2671, ModHealingDonePos = 2678, ModHealingPercent, ModHealingDonePercent, ModPeriodicHealingDonePercent, WeaponDmgMultipliers, WeaponAtkSpeedMultipliers = 2685, ModSpellPowerPercent = 2688, ModResiliencePercent, OverrideSpellPowerByAPPercent, OverrideAPBySpellPowerPercent, ModTargetResistance, ModTargetPhysicalResistance, LocalFlags, NumRespecs, SelfResSpell, PvpMedals, BuybackPrice, BuybackTimestamp = 2710, YesterdayHonorableKills = 2722, LifetimeHonorableKills, WatchedFactionIndex, CombatRatings, PvpInfo = 2757, MaxLevel = 2799, ScalingPlayerLevelDelta, MaxCreatureScalingLevel, NoReagentCostMask, PetSpellPower = 2806, Researching, ProfessionSkillLine = 2817, UiHitModifier = 2819, UiSpellHitModifier, HomeRealmTimeOffset, ModPetHaste, AuraVision, OverrideSpellsID, LfgBonusFactionID, LootSpecID, OverrideZonePVPType, BagSlotFlags, BankBagSlotFlags = 2832, InsertItemsLeftToRight = 2839, QuestCompleted, Honor = 4590, HonorNextLevel, End } <file_sep>/Framework.Cryptography/SARC4.cs using System; namespace Framework.Cryptography { public sealed class SARC4 { private byte[] s; private byte tmp; private byte tmp2; public SARC4() { this.s = new byte[256]; this.tmp = 0; this.tmp2 = 0; } public void PrepareKey(byte[] key) { int num = 0; while (true) { IL_159: uint arg_11B_0 = 596633954u; while (true) { uint num2; switch ((num2 = (arg_11B_0 ^ 1636435107u)) % 12u) { case 0u: arg_11B_0 = (num2 * 1137262568u ^ 4232918736u); continue; case 1u: { int num3 = 0; int num4 = 0; arg_11B_0 = (num2 * 902121721u ^ 3907740830u); continue; } case 2u: { int num4; int num3 = (int)((byte)((num3 + (int)this.s[num4] + (int)key[num4 % key.Length]) % 256)); byte b = this.s[num4]; arg_11B_0 = 58710329u; continue; } case 3u: goto IL_159; case 4u: { int num4; num4++; arg_11B_0 = (num2 * 1156866267u ^ 3165203104u); continue; } case 5u: arg_11B_0 = ((num < 256) ? 1820122929u : 969498250u); continue; case 6u: this.s[num] = (byte)num; num++; arg_11B_0 = 2129022438u; continue; case 7u: { int num4; arg_11B_0 = ((num4 >= 256) ? 1216862808u : 1105516645u); continue; } case 8u: { int num3; byte b; this.s[num3] = b; arg_11B_0 = (num2 * 3649499085u ^ 1967475591u); continue; } case 9u: arg_11B_0 = (num2 * 3633298005u ^ 2674091763u); continue; case 10u: { int num3; int num4; this.s[num4] = this.s[num3]; arg_11B_0 = (num2 * 1629411718u ^ 2579364187u); continue; } } return; } } } public void ProcessBuffer(byte[] data, int length) { int num = 0; while (true) { IL_119: uint arg_E6_0 = (num < length) ? 1735696282u : 644965877u; while (true) { uint num2; switch ((num2 = (arg_E6_0 ^ 1497147913u)) % 6u) { case 1u: this.tmp = (byte)((int)(this.tmp + 1) % 256); arg_E6_0 = 748557597u; continue; case 2u: goto IL_119; case 3u: arg_E6_0 = 1735696282u; continue; case 4u: this.tmp2 = (byte)((int)(this.tmp2 + this.s[(int)this.tmp]) % 256); arg_E6_0 = (num2 * 2775160414u ^ 2707190840u); continue; case 5u: { byte b = this.s[(int)this.tmp]; this.s[(int)this.tmp] = this.s[(int)this.tmp2]; this.s[(int)this.tmp2] = b; data[num] = (this.s[(int)(this.s[(int)this.tmp] + this.s[(int)this.tmp2]) % 256] ^ data[num]); num++; arg_E6_0 = (num2 * 2145145262u ^ 42414599u); continue; } } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountFlagUpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountFlagUpdateRequest : IMessage<GameAccountFlagUpdateRequest>, IEquatable<GameAccountFlagUpdateRequest>, IDeepCloneable<GameAccountFlagUpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountFlagUpdateRequest.__c __9 = new GameAccountFlagUpdateRequest.__c(); internal GameAccountFlagUpdateRequest cctor>b__34_0() { return new GameAccountFlagUpdateRequest(); } } private static readonly MessageParser<GameAccountFlagUpdateRequest> _parser = new MessageParser<GameAccountFlagUpdateRequest>(new Func<GameAccountFlagUpdateRequest>(GameAccountFlagUpdateRequest.__c.__9.<.cctor>b__34_0)); public const int GameAccountFieldNumber = 1; private GameAccountHandle gameAccount_; public const int FlagFieldNumber = 2; private ulong flag_; public const int ActiveFieldNumber = 3; private bool active_; public static MessageParser<GameAccountFlagUpdateRequest> Parser { get { return GameAccountFlagUpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountFlagUpdateRequest.Descriptor; } } public GameAccountHandle GameAccount { get { return this.gameAccount_; } set { this.gameAccount_ = value; } } public ulong Flag { get { return this.flag_; } set { this.flag_ = value; } } public bool Active { get { return this.active_; } set { this.active_ = value; } } public GameAccountFlagUpdateRequest() { } public GameAccountFlagUpdateRequest(GameAccountFlagUpdateRequest other) : this() { while (true) { IL_84: uint arg_64_0 = 232710139u; while (true) { uint num; switch ((num = (arg_64_0 ^ 1849351568u)) % 5u) { case 0u: this.active_ = other.active_; arg_64_0 = (num * 3392496901u ^ 3150541431u); continue; case 1u: this.GameAccount = ((other.gameAccount_ != null) ? other.GameAccount.Clone() : null); arg_64_0 = 841616630u; continue; case 3u: goto IL_84; case 4u: this.flag_ = other.flag_; arg_64_0 = (num * 959532731u ^ 274883880u); continue; } return; } } } public GameAccountFlagUpdateRequest Clone() { return new GameAccountFlagUpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountFlagUpdateRequest); } public bool Equals(GameAccountFlagUpdateRequest other) { if (other == null) { goto IL_3C; } goto IL_DF; int arg_99_0; while (true) { IL_94: switch ((arg_99_0 ^ 1024303389) % 11) { case 0: return false; case 1: arg_99_0 = ((this.Flag == other.Flag) ? 1758189477 : 1645788151); continue; case 2: arg_99_0 = (GameAccountFlagUpdateRequest.smethod_0(this.GameAccount, other.GameAccount) ? 1137960772 : 1884982423); continue; case 3: goto IL_3C; case 4: return false; case 5: return true; case 6: arg_99_0 = ((this.Active != other.Active) ? 1121313275 : 470969805); continue; case 7: goto IL_DF; case 8: return false; case 9: return false; } break; } return true; IL_3C: arg_99_0 = 812182422; goto IL_94; IL_DF: arg_99_0 = ((other == this) ? 1933236167 : 1066318831); goto IL_94; } public override int GetHashCode() { int num = 1; if (this.gameAccount_ != null) { goto IL_60; } goto IL_DE; uint arg_A7_0; while (true) { IL_A2: uint num2; switch ((num2 = (arg_A7_0 ^ 1510758189u)) % 7u) { case 0u: goto IL_DE; case 1u: num ^= GameAccountFlagUpdateRequest.smethod_1(this.GameAccount); arg_A7_0 = (num2 * 3511196660u ^ 2683279472u); continue; case 3u: num ^= this.Active.GetHashCode(); arg_A7_0 = (num2 * 2186350870u ^ 1250420631u); continue; case 4u: goto IL_60; case 5u: arg_A7_0 = (this.Active ? 1196571718u : 1419620773u); continue; case 6u: num ^= this.Flag.GetHashCode(); arg_A7_0 = (num2 * 1646502817u ^ 326922998u); continue; } break; } return num; IL_60: arg_A7_0 = 734792101u; goto IL_A2; IL_DE: arg_A7_0 = ((this.Flag != 0uL) ? 1337043803u : 1193319104u); goto IL_A2; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameAccount_ != null) { goto IL_94; } goto IL_12B; uint arg_E7_0; while (true) { IL_E2: uint num; switch ((num = (arg_E7_0 ^ 3451841113u)) % 10u) { case 1u: output.WriteMessage(this.GameAccount); arg_E7_0 = (num * 453969823u ^ 2925075025u); continue; case 2u: output.WriteRawTag(24); arg_E7_0 = (num * 4216045026u ^ 903581521u); continue; case 3u: goto IL_12B; case 4u: output.WriteRawTag(16); arg_E7_0 = (num * 592974661u ^ 2551942064u); continue; case 5u: goto IL_94; case 6u: arg_E7_0 = ((!this.Active) ? 3229437103u : 3310104755u); continue; case 7u: output.WriteRawTag(10); arg_E7_0 = (num * 3441878743u ^ 3533854207u); continue; case 8u: output.WriteBool(this.Active); arg_E7_0 = (num * 1363019176u ^ 1198872271u); continue; case 9u: output.WriteUInt64(this.Flag); arg_E7_0 = (num * 3718498653u ^ 904263736u); continue; } break; } return; IL_94: arg_E7_0 = 2896694932u; goto IL_E2; IL_12B: arg_E7_0 = ((this.Flag == 0uL) ? 3595188913u : 2313855549u); goto IL_E2; } public int CalculateSize() { int num = 0; if (this.gameAccount_ != null) { goto IL_1C; } goto IL_CF; uint arg_98_0; while (true) { IL_93: uint num2; switch ((num2 = (arg_98_0 ^ 2282269506u)) % 7u) { case 1u: goto IL_CF; case 2u: num += 2; arg_98_0 = (num2 * 1468057062u ^ 128121934u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Flag); arg_98_0 = (num2 * 3586508655u ^ 3542874728u); continue; case 4u: arg_98_0 = ((!this.Active) ? 3361908944u : 2798498167u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccount); arg_98_0 = (num2 * 2878546704u ^ 2452518618u); continue; case 6u: goto IL_1C; } break; } return num; IL_1C: arg_98_0 = 2347956235u; goto IL_93; IL_CF: arg_98_0 = ((this.Flag == 0uL) ? 2571264387u : 2345008647u); goto IL_93; } public void MergeFrom(GameAccountFlagUpdateRequest other) { if (other == null) { goto IL_9E; } goto IL_146; uint arg_FE_0; while (true) { IL_F9: uint num; switch ((num = (arg_FE_0 ^ 3544901368u)) % 11u) { case 0u: this.gameAccount_ = new GameAccountHandle(); arg_FE_0 = (num * 3284961756u ^ 2193906736u); continue; case 1u: arg_FE_0 = ((other.Flag == 0uL) ? 2336555005u : 3716110189u); continue; case 2u: this.Active = other.Active; arg_FE_0 = (num * 876477254u ^ 2261224251u); continue; case 3u: goto IL_146; case 5u: goto IL_9E; case 6u: this.Flag = other.Flag; arg_FE_0 = (num * 1543871646u ^ 168270347u); continue; case 7u: return; case 8u: arg_FE_0 = ((!other.Active) ? 2757938829u : 3551416209u); continue; case 9u: arg_FE_0 = (((this.gameAccount_ != null) ? 631724514u : 1531737962u) ^ num * 1921902007u); continue; case 10u: this.GameAccount.MergeFrom(other.GameAccount); arg_FE_0 = 2230339405u; continue; } break; } return; IL_9E: arg_FE_0 = 2996649526u; goto IL_F9; IL_146: arg_FE_0 = ((other.gameAccount_ == null) ? 2230339405u : 2365440326u); goto IL_F9; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1AD: uint num; uint arg_155_0 = ((num = input.ReadTag()) != 0u) ? 4109539017u : 3126617874u; while (true) { uint num2; switch ((num2 = (arg_155_0 ^ 2455477670u)) % 15u) { case 0u: arg_155_0 = ((this.gameAccount_ == null) ? 3304954850u : 3719546429u); continue; case 1u: this.Flag = input.ReadUInt64(); arg_155_0 = 3683683376u; continue; case 2u: input.ReadMessage(this.gameAccount_); arg_155_0 = 2254335498u; continue; case 3u: arg_155_0 = ((num != 10u) ? 3267291071u : 2813212605u); continue; case 4u: goto IL_1AD; case 5u: arg_155_0 = (num2 * 1913955844u ^ 1813138742u); continue; case 6u: arg_155_0 = (((num != 16u) ? 3572261148u : 2941438137u) ^ num2 * 3740903631u); continue; case 7u: this.Active = input.ReadBool(); arg_155_0 = 2711296902u; continue; case 8u: arg_155_0 = (num2 * 2344796193u ^ 932372432u); continue; case 9u: arg_155_0 = 4109539017u; continue; case 10u: arg_155_0 = (((num == 24u) ? 1416889608u : 2094368934u) ^ num2 * 1635397196u); continue; case 11u: this.gameAccount_ = new GameAccountHandle(); arg_155_0 = (num2 * 2458271045u ^ 610673257u); continue; case 13u: input.SkipLastField(); arg_155_0 = (num2 * 2951776026u ^ 4284399685u); continue; case 14u: arg_155_0 = (num2 * 484465798u ^ 138533988u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/HmacHash.cs using System; using System.Security.Cryptography; using System.Text; namespace AuthServer.Game.Packets.PacketHandler { public class HmacHash : HMACSHA1 { public byte[] Digest { get; private set; } public HmacHash(byte[] key) : base(key, true) { while (true) { IL_3A: uint arg_22_0 = 3010620136u; while (true) { uint num; switch ((num = (arg_22_0 ^ 2699801612u)) % 3u) { case 0u: goto IL_3A; case 1u: HmacHash.smethod_0(this); arg_22_0 = (num * 3559114196u ^ 1693912905u); continue; } return; } } } public void Process(byte[] data, int length) { this.method_0(data, 0, length, data, 0); } public void Process(uint data) { byte[] array = HmacHash.smethod_1(data); this.method_0(array, 0, array.Length, array, 0); } public void Process(string data) { byte[] array = HmacHash.smethod_3(HmacHash.smethod_2(), data); this.method_0(array, 0, array.Length, array, 0); } public void Finish(byte[] data, int length) { this.method_1(data, 0, length); while (true) { IL_42: uint arg_2A_0 = 2162501635u; while (true) { uint num; switch ((num = (arg_2A_0 ^ 2449147266u)) % 3u) { case 0u: goto IL_42; case 2u: this.Digest = HmacHash.smethod_4(this); arg_2A_0 = (num * 1577460123u ^ 632273006u); continue; } return; } } } public void Finish(string data) { byte[] array = HmacHash.smethod_3(HmacHash.smethod_2(), data); while (true) { IL_50: uint arg_38_0 = 3982832027u; while (true) { uint num; switch ((num = (arg_38_0 ^ 3859150612u)) % 3u) { case 1u: this.method_1(array, 0, array.Length); this.Digest = HmacHash.smethod_4(this); arg_38_0 = (num * 2414475336u ^ 1000737194u); continue; case 2u: goto IL_50; } return; } } } static void smethod_0(HashAlgorithm hashAlgorithm_0) { hashAlgorithm_0.Initialize(); } int method_0(byte[] byte_0, int int_0, int int_1, byte[] byte_1, int int_2) { return base.TransformBlock(byte_0, int_0, int_1, byte_1, int_2); } static byte[] smethod_1(uint uint_0) { return BitConverter.GetBytes(uint_0); } static Encoding smethod_2() { return Encoding.ASCII; } static byte[] smethod_3(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } byte[] method_1(byte[] byte_0, int int_0, int int_1) { return base.TransformFinalBlock(byte_0, int_0, int_1); } static byte[] smethod_4(HashAlgorithm hashAlgorithm_0) { return hashAlgorithm_0.Hash; } } } <file_sep>/WorldServer.Game.Packets.PacketHandler/CacheHandler.cs using AuthServer.Game.Entities; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Network.Packets; using System; using System.Collections.Generic; using System.IO; namespace WorldServer.Game.Packets.PacketHandler { public class CacheHandler : Manager { [Opcode2(ClientMessage.CliQueryCreature, "17930")] public static void HandleQueryCreature(ref PacketReader packet, WorldClass2 session) { int num = packet.Read<int>(); PacketWriter packetWriter = new PacketWriter(ServerMessage.QueryCreatureResponse, true); Creature creature; while (true) { IL_2D5: uint arg_273_0 = 935609141u; while (true) { uint num2; Creature arg_94_0; Creature creature2; switch ((num2 = (arg_273_0 ^ 1968969320u)) % 21u) { case 0u: arg_273_0 = (num2 * 1160359644u ^ 1382369928u); continue; case 1u: { BitPack bitPack; bitPack.Write<int>(0, 11); arg_273_0 = (num2 * 677173750u ^ 1461952003u); continue; } case 2u: { int num3; arg_273_0 = ((num3 < 8) ? 494615343u : 1586928102u); continue; } case 3u: { BitPack bitPack; bitPack.Write<int>(CacheHandler.smethod_0(creature.Name) + 1, 11); arg_273_0 = (num2 * 1758624067u ^ 374741763u); continue; } case 4u: { BitPack bitPack; bitPack.Write<int>(CacheHandler.smethod_0(creature.IconName) + 1, 6); arg_273_0 = (num2 * 1232297304u ^ 4160998185u); continue; } case 5u: { int num3; num3++; arg_273_0 = 1308934713u; continue; } case 6u: { int num3 = 0; arg_273_0 = (num2 * 3728719144u ^ 2678938313u); continue; } case 7u: { BitPack bitPack; bitPack.Write<int>(0, 11); arg_273_0 = 1141993764u; continue; } case 8u: { BitPack bitPack; bitPack.Flush(); arg_273_0 = (num2 * 3762835184u ^ 3777278325u); continue; } case 9u: { BitPack bitPack; bool flag; bitPack.Write<bool>(flag); arg_273_0 = (num2 * 138756829u ^ 2636086554u); continue; } case 10u: { bool flag; if (flag) { arg_273_0 = (num2 * 2594936822u ^ 3565690882u); continue; } goto IL_461; } case 11u: arg_94_0 = null; goto IL_94; case 12u: { BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_273_0 = (num2 * 4280214209u ^ 1042752614u); continue; } case 13u: { int num3; arg_273_0 = ((num3 == 0) ? 1779483626u : 1978272905u); continue; } case 14u: { BitPack bitPack; bitPack.Write<byte>(creature.RacialLeader); arg_273_0 = (num2 * 1236445006u ^ 3192248368u); continue; } case 16u: { creature = creature2; BitPack bitPack; bitPack.Write<int>((CacheHandler.smethod_0(creature.SubName) != 0) ? (CacheHandler.smethod_0(creature.SubName) + 1) : 0, 11); arg_273_0 = 1985970779u; continue; } case 17u: if (!Manager.ObjectMgr.Creatures.ContainsKey(num)) { arg_273_0 = (num2 * 3085956927u ^ 2159627834u); continue; } arg_94_0 = Manager.ObjectMgr.Creatures[num]; goto IL_94; case 18u: { bool flag = creature2 != null; packetWriter.WriteInt32(num); arg_273_0 = (num2 * 2288083706u ^ 371019689u); continue; } case 19u: goto IL_2D5; case 20u: { BitPack bitPack; bitPack.Flush(); packetWriter.WriteCString(creature.Name); arg_273_0 = (num2 * 2500615134u ^ 1082460273u); continue; } } goto Block_6; IL_94: creature2 = arg_94_0; arg_273_0 = 499258206u; } } uint arg_57B_0; while (true) { IL_576: uint num2; switch ((num2 = (arg_57B_0 ^ 1968969320u)) % 13u) { case 0u: goto IL_5BD; case 1u: packetWriter.WriteUInt32(0u); packetWriter.WriteInt32(0); packetWriter.WriteInt32(creature.MovementInfoId); arg_57B_0 = (num2 * 2108068086u ^ 2103927701u); continue; case 2u: packetWriter.WriteFloat(creature.PowerModifier); arg_57B_0 = (num2 * 3254214234u ^ 1483086716u); continue; case 3u: packetWriter.WriteCString(creature.SubName); arg_57B_0 = (num2 * 68929227u ^ 1745800214u); continue; case 4u: arg_57B_0 = ((!CacheHandler.smethod_1(creature.IconName, "")) ? 2105694095u : 1920274108u); continue; case 6u: arg_57B_0 = (num2 * 3208784011u ^ 1758951452u); continue; case 7u: arg_57B_0 = ((CacheHandler.smethod_1(creature.SubName, "") ? 515129868u : 272658274u) ^ num2 * 1474246403u); continue; case 8u: session.Send(ref packetWriter); arg_57B_0 = 930990882u; continue; case 9u: goto IL_461; case 10u: packetWriter.WriteInt32(creature.ExpansionRequired); packetWriter.WriteInt32(0); arg_57B_0 = (num2 * 374667452u ^ 3127358176u); continue; case 11u: packetWriter.WriteInt32(0); packetWriter.WriteInt32(creature.DisplayInfoId[0]); packetWriter.WriteInt32(creature.DisplayInfoId[1]); packetWriter.WriteInt32(creature.DisplayInfoId[2]); packetWriter.WriteInt32(creature.DisplayInfoId[3]); packetWriter.WriteFloat(creature.HealthModifier); arg_57B_0 = (num2 * 3255905299u ^ 1742458378u); continue; case 12u: packetWriter.WriteCString(creature.IconName); arg_57B_0 = (num2 * 3969563941u ^ 2161894101u); continue; } break; } return; Block_6: using (List<uint>.Enumerator enumerator = creature.Flag.GetEnumerator()) { while (true) { IL_359: uint arg_32C_0 = enumerator.MoveNext() ? 282529697u : 694090308u; while (true) { uint num2; switch ((num2 = (arg_32C_0 ^ 1968969320u)) % 5u) { case 0u: { uint current; packetWriter.WriteUInt32(current); arg_32C_0 = (num2 * 555555645u ^ 4034385136u); continue; } case 1u: { uint current = enumerator.Current; arg_32C_0 = 2123150290u; continue; } case 2u: arg_32C_0 = 282529697u; continue; case 3u: goto IL_359; } goto Block_12; } } Block_12:; } packetWriter.WriteInt32(creature.Type); packetWriter.WriteInt32(creature.Family); packetWriter.WriteInt32(creature.Rank); packetWriter.WriteInt32(0); goto IL_5BD; IL_461: Log.Message(LogType.Debug, Module.smethod_36<string>(1817613708u), new object[] { num }); arg_57B_0 = 2105694095u; goto IL_576; IL_5BD: arg_57B_0 = 602327916u; goto IL_576; } [Opcode2(ClientMessage.CliQueryGameObject, "17930")] public static void HandleQueryGameObject(ref PacketReader packet, WorldClass2 session) { new BitUnpack(packet); PacketWriter packetWriter; GameObject gameObject; int num2; while (true) { IL_1F1: uint arg_1AF_0 = 939672256u; while (true) { uint num; switch ((num = (arg_1AF_0 ^ 920590424u)) % 13u) { case 0u: packetWriter.WriteInt32(gameObject.Type); arg_1AF_0 = (num * 3489202542u ^ 804866110u); continue; case 1u: num2 = packet.Read<int>(); packetWriter = new PacketWriter(ServerMessage.QueryGameObjectResponse, true); arg_1AF_0 = (num * 4230693193u ^ 1260749569u); continue; case 2u: goto IL_1F1; case 3u: { int num3; arg_1AF_0 = ((num3 < 3) ? 649306648u : 501273771u); continue; } case 4u: packetWriter.WriteCString(gameObject.CastBarCaption); arg_1AF_0 = (num * 1049916045u ^ 2977864359u); continue; case 5u: { int num3 = 0; arg_1AF_0 = (num * 1422964311u ^ 1103477659u); continue; } case 6u: packetWriter.WriteInt32(gameObject.DisplayInfoId); packetWriter.WriteCString(gameObject.Name); arg_1AF_0 = (num * 1555460888u ^ 1306993837u); continue; case 7u: { GameObject gameObject2; gameObject = gameObject2; arg_1AF_0 = (num * 3863233653u ^ 3067406073u); continue; } case 8u: arg_1AF_0 = (num * 3223686670u ^ 3681640510u); continue; case 10u: packetWriter.WriteCString(gameObject.IconName); arg_1AF_0 = (num * 719648425u ^ 184840880u); continue; case 11u: { packetWriter.WriteCString(""); int num3; num3++; arg_1AF_0 = 997737950u; continue; } case 12u: { BitPack arg_69_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); GameObject gameObject2 = Manager.ObjectMgr.GameObjects.ContainsKey(num2) ? Manager.ObjectMgr.GameObjects[num2] : null; bool flag = gameObject2 != null; packetWriter.WriteInt32(num2); arg_69_0.Write<bool>(flag); arg_69_0.Flush(); packetWriter.WriteInt32(0); if (flag) { arg_1AF_0 = 1462109909u; continue; } goto IL_3B5; } } goto Block_4; } } uint arg_390_0; uint data; while (true) { IL_38B: uint num; switch ((num = (arg_390_0 ^ 920590424u)) % 6u) { case 0u: arg_390_0 = (num * 1830974033u ^ 1499644793u); continue; case 2u: goto IL_376; case 3u: session.Send(ref packetWriter); arg_390_0 = 1203705223u; continue; case 4u: packetWriter.WriteUInt32Pos(data, 10); arg_390_0 = (num * 267662565u ^ 3800569846u); continue; case 5u: goto IL_3B5; } break; } return; Block_4: packetWriter.WriteCString(gameObject.Unk); using (List<int>.Enumerator enumerator = gameObject.Data.GetEnumerator()) { while (true) { IL_26E: int arg_245_0 = (!enumerator.MoveNext()) ? 1793865676 : 1818950977; while (true) { switch ((arg_245_0 ^ 920590424) % 4) { case 1: { int current = enumerator.Current; packetWriter.WriteInt32(current); arg_245_0 = 1520035619; continue; } case 2: arg_245_0 = 1818950977; continue; case 3: goto IL_26E; } goto Block_9; } } Block_9:; } packetWriter.WriteFloat(gameObject.Size); packetWriter.WriteUInt8((byte)gameObject.QuestItemId.Count); using (List<int>.Enumerator enumerator = gameObject.QuestItemId.GetEnumerator()) { while (true) { IL_312: int arg_2E9_0 = enumerator.MoveNext() ? 1696554899 : 1349067385; while (true) { switch ((arg_2E9_0 ^ 920590424) % 4) { case 0: goto IL_312; case 2: arg_2E9_0 = 1696554899; continue; case 3: { int current2 = enumerator.Current; packetWriter.WriteInt32(current2); arg_2E9_0 = 2058465060; continue; } } goto Block_13; } } Block_13:; } packetWriter.WriteInt32(gameObject.ExpansionRequired); data = (uint)CacheHandler.smethod_3(CacheHandler.smethod_2(packetWriter)) - 14u; IL_376: arg_390_0 = 842632948u; goto IL_38B; IL_3B5: Log.Message(LogType.Debug, Module.smethod_33<string>(1557632366u), new object[] { num2 }); arg_390_0 = 1862001515u; goto IL_38B; } [Opcode(ClientMessage.ChatMessageYell, "17930")] public static void HandleCliQueryNPCText(ref PacketReader packet, WorldClass session) { } [Opcode(ClientMessage.QueryPlayerName, "17930")] public static void HandleQueryPlayerName(ref PacketReader packet, WorldClass session) { new BitUnpack(packet); while (true) { IL_2C4: uint arg_266_0 = 471575205u; while (true) { uint num; switch ((num = (arg_266_0 ^ 1440773968u)) % 20u) { case 0u: { BitPack bitPack; bitPack.Flush(); arg_266_0 = (num * 9976705u ^ 4278873949u); continue; } case 1u: { PacketWriter packetWriter; ulong guid; packetWriter.WriteSmartGuid(guid, GuidType.Player); arg_266_0 = (num * 3356870011u ^ 2872268516u); continue; } case 2u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.QueryPlayerNameResponse, true); arg_266_0 = (num * 1962979321u ^ 1311665818u); continue; } case 3u: { BitPack bitPack; bitPack.Write<int>(0); Character character; bitPack.Write<int>(CacheHandler.smethod_0(character.Name), 6); arg_266_0 = (num * 593699102u ^ 4074552841u); continue; } case 4u: { PacketWriter packetWriter; BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_266_0 = (num * 98231616u ^ 3990223424u); continue; } case 5u: { ulong guid = packet.ReadSmartGuid(); arg_266_0 = (num * 1518480733u ^ 2785396495u); continue; } case 6u: { Character character = session.Character; arg_266_0 = (num * 3329339062u ^ 2472802355u); continue; } case 8u: { BitPack bitPack; bitPack.Write<int>(0, 7); int num2; num2++; arg_266_0 = 2068035702u; continue; } case 9u: { PacketWriter packetWriter; ulong guid; packetWriter.WriteSmartGuid(guid, GuidType.Player); packetWriter.WriteSmartGuid(guid, GuidType.Player); packetWriter.WriteSmartGuid(guid, GuidType.Player); arg_266_0 = (num * 383643938u ^ 3979968437u); continue; } case 10u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_266_0 = (num * 761741687u ^ 799826553u); continue; } case 11u: { int num2 = 0; arg_266_0 = (num * 313403947u ^ 3917986335u); continue; } case 12u: { PacketWriter packetWriter; Character character; packetWriter.WriteString(character.Name, true); arg_266_0 = (num * 3484391811u ^ 3965746378u); continue; } case 13u: { PacketWriter packetWriter; Character character; packetWriter.WriteUInt8(character.Gender); packetWriter.WriteUInt8(character.Class); packetWriter.WriteUInt8(character.Level); arg_266_0 = (num * 1948881771u ^ 2848931159u); continue; } case 14u: { int num2; arg_266_0 = ((num2 < 5) ? 1177672364u : 684800184u); continue; } case 15u: { PacketWriter packetWriter; packetWriter.WriteUInt32(1u); Character character; packetWriter.WriteUInt8(character.Race); arg_266_0 = (num * 2813796845u ^ 22854294u); continue; } case 16u: { PacketWriter packetWriter; packetWriter.WriteUInt8(0); arg_266_0 = (num * 814051796u ^ 671529825u); continue; } case 17u: goto IL_2C4; case 18u: { ulong guid; Manager.WorldMgr.GetSession(guid); arg_266_0 = (num * 1913069791u ^ 1097462928u); continue; } case 19u: { Character character; arg_266_0 = (((character == null) ? 259922602u : 215274471u) ^ num * 2701800891u); continue; } } return; } } } [Opcode(ClientMessage.QueryRealmName, "17930")] public static void HandleQueryRealmName(ref PacketReader packet, WorldClass session) { Character arg_06_0 = session.Character; PacketWriter packetWriter; while (true) { IL_11C: uint arg_F4_0 = 2976964066u; while (true) { uint num; switch ((num = (arg_F4_0 ^ 4166151237u)) % 7u) { case 0u: { string text; packetWriter.WriteString(text, true); arg_F4_0 = (num * 113468112u ^ 614109454u); continue; } case 1u: { uint data = packet.Read<uint>(); arg_F4_0 = (num * 1651165884u ^ 74766170u); continue; } case 2u: goto IL_11C; case 3u: { BitPack arg_7F_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); uint data; packetWriter.WriteUInt32(data); packetWriter.WriteUInt8(0); arg_7F_0.Write<int>(1); arg_7F_0.Write<int>(0); string text; arg_7F_0.Write<int>(CacheHandler.smethod_0(text), 8); arg_7F_0.Write<int>(CacheHandler.smethod_0(text), 8); arg_7F_0.Flush(); packetWriter.WriteString(text, true); arg_F4_0 = (num * 1933647756u ^ 4288531599u); continue; } case 4u: packetWriter = new PacketWriter(ServerMessage.RealmQueryResponse, true); arg_F4_0 = (num * 1626494029u ^ 1913905659u); continue; case 6u: { string text = Module.smethod_36<string>(4208195762u); arg_F4_0 = (num * 2984712636u ^ 1236121516u); continue; } } goto Block_1; } } Block_1: session.Send(ref packetWriter); } [Opcode(ClientMessage.ChatMessageYell, "17930")] public static void HandleDBQueryBulk(ref PacketReader packet, WorldClass session) { } public static void SendHotfixes(WorldClass session) { } public static void HandleBroadcastText(ref WorldClass session, int id) { } static int smethod_0(string string_0) { return string_0.Length; } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static Stream smethod_2(BinaryWriter binaryWriter_0) { return binaryWriter_0.BaseStream; } static long smethod_3(Stream stream_0) { return stream_0.Length; } } } <file_sep>/Google.Protobuf.Reflection/EnumValueDescriptor.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class EnumValueDescriptor : DescriptorBase { private readonly EnumDescriptor enumDescriptor; private readonly EnumValueDescriptorProto proto; internal EnumValueDescriptorProto Proto { get { return this.proto; } } public override string Name { get { return this.proto.Name; } } public int Number { get { return this.Proto.Number; } } public EnumDescriptor EnumDescriptor { get { return this.enumDescriptor; } } internal EnumValueDescriptor(EnumValueDescriptorProto proto, FileDescriptor file, EnumDescriptor parent, int index) : base(file, EnumValueDescriptor.smethod_0(parent.FullName, Module.smethod_34<string>(3349943853u), proto.Name), index) { while (true) { IL_90: uint arg_70_0 = 3117200364u; while (true) { uint num; switch ((num = (arg_70_0 ^ 2941281634u)) % 5u) { case 0u: goto IL_90; case 1u: file.DescriptorPool.AddSymbol(this); arg_70_0 = (num * 4059409295u ^ 1121610279u); continue; case 3u: this.enumDescriptor = parent; arg_70_0 = (num * 2476227708u ^ 3235142323u); continue; case 4u: this.proto = proto; arg_70_0 = (num * 3737544868u ^ 4180488678u); continue; } goto Block_1; } } Block_1: file.DescriptorPool.AddEnumValueByNumber(this); } static string smethod_0(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } } } <file_sep>/Google.Protobuf.WellKnownTypes/Mixin.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Mixin : IMessage<Mixin>, IEquatable<Mixin>, IDeepCloneable<Mixin>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Mixin.__c __9 = new Mixin.__c(); internal Mixin cctor>b__29_0() { return new Mixin(); } } private static readonly MessageParser<Mixin> _parser = new MessageParser<Mixin>(new Func<Mixin>(Mixin.__c.__9.<.cctor>b__29_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int RootFieldNumber = 2; private string root_ = ""; public static MessageParser<Mixin> Parser { get { return Mixin._parser; } } public static MessageDescriptor Descriptor { get { return ApiReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return Mixin.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public string Root { get { return this.root_; } set { this.root_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public Mixin() { } public Mixin(Mixin other) : this() { this.name_ = other.name_; this.root_ = other.root_; } public Mixin Clone() { return new Mixin(this); } public override bool Equals(object other) { return this.Equals(other as Mixin); } public bool Equals(Mixin other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 171421768) % 9) { case 0: goto IL_6D; case 1: goto IL_B5; case 2: return true; case 3: arg_77_0 = ((!Mixin.smethod_0(this.Name, other.Name)) ? 694751098 : 1039140074); continue; case 4: arg_77_0 = (Mixin.smethod_0(this.Root, other.Root) ? 1400334823 : 801810516); continue; case 5: return false; case 7: return false; case 8: return false; } break; } return true; IL_6D: arg_77_0 = 1131937810; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? 453941896 : 1698603891); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_BC: uint arg_98_0 = 1859862458u; while (true) { uint num2; switch ((num2 = (arg_98_0 ^ 2114016073u)) % 6u) { case 1u: arg_98_0 = ((Mixin.smethod_1(this.Root) != 0) ? 1100364891u : 68989251u); continue; case 2u: num ^= Mixin.smethod_2(this.Name); arg_98_0 = (num2 * 2141705660u ^ 4084696480u); continue; case 3u: arg_98_0 = (((Mixin.smethod_1(this.Name) != 0) ? 3482210938u : 3707982931u) ^ num2 * 196494337u); continue; case 4u: num ^= Mixin.smethod_2(this.Root); arg_98_0 = (num2 * 2131226396u ^ 1218659003u); continue; case 5u: goto IL_BC; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Mixin.smethod_1(this.Name) != 0) { goto IL_36; } goto IL_B1; uint arg_7E_0; while (true) { IL_79: uint num; switch ((num = (arg_7E_0 ^ 4050726112u)) % 6u) { case 0u: output.WriteString(this.Root); arg_7E_0 = (num * 3206021508u ^ 1602284501u); continue; case 1u: output.WriteRawTag(10); output.WriteString(this.Name); arg_7E_0 = (num * 53150773u ^ 1871299191u); continue; case 2u: goto IL_B1; case 3u: goto IL_36; case 4u: output.WriteRawTag(18); arg_7E_0 = (num * 2485965044u ^ 3235344308u); continue; } break; } return; IL_36: arg_7E_0 = 3870243183u; goto IL_79; IL_B1: arg_7E_0 = ((Mixin.smethod_1(this.Root) == 0) ? 4292466949u : 4106378904u); goto IL_79; } public int CalculateSize() { int num = 0; if (Mixin.smethod_1(this.Name) != 0) { goto IL_5F; } goto IL_95; uint arg_69_0; while (true) { IL_64: uint num2; switch ((num2 = (arg_69_0 ^ 1715180091u)) % 5u) { case 0u: goto IL_5F; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Root); arg_69_0 = (num2 * 3764921619u ^ 3428854711u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_69_0 = (num2 * 3996097482u ^ 2721686621u); continue; case 3u: goto IL_95; } break; } return num; IL_5F: arg_69_0 = 1725115502u; goto IL_64; IL_95: arg_69_0 = ((Mixin.smethod_1(this.Root) == 0) ? 664810613u : 46227789u); goto IL_64; } public void MergeFrom(Mixin other) { if (other == null) { goto IL_71; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 3420864661u)) % 7u) { case 0u: goto IL_71; case 1u: return; case 2u: this.Name = other.Name; arg_7B_0 = (num * 3004981485u ^ 408027057u); continue; case 3u: arg_7B_0 = ((Mixin.smethod_1(other.Root) == 0) ? 3192039092u : 2514908272u); continue; case 4u: goto IL_B2; case 6u: this.Root = other.Root; arg_7B_0 = (num * 315293344u ^ 1963778964u); continue; } break; } return; IL_71: arg_7B_0 = 4175921205u; goto IL_76; IL_B2: arg_7B_0 = ((Mixin.smethod_1(other.Name) != 0) ? 2666235522u : 3218930938u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_101: uint num; uint arg_BD_0 = ((num = input.ReadTag()) == 0u) ? 1427470634u : 1114621791u; while (true) { uint num2; switch ((num2 = (arg_BD_0 ^ 1045141300u)) % 10u) { case 0u: arg_BD_0 = 1114621791u; continue; case 1u: input.SkipLastField(); arg_BD_0 = (num2 * 3919988851u ^ 210890761u); continue; case 2u: this.Root = input.ReadString(); arg_BD_0 = 379734757u; continue; case 3u: goto IL_101; case 5u: arg_BD_0 = (num2 * 1282089942u ^ 701528339u); continue; case 6u: this.Name = input.ReadString(); arg_BD_0 = 1220154117u; continue; case 7u: arg_BD_0 = ((num == 10u) ? 1114609904u : 639406277u); continue; case 8u: arg_BD_0 = (num2 * 2859027321u ^ 2344329675u); continue; case 9u: arg_BD_0 = (((num == 18u) ? 4257329964u : 2533140407u) ^ num2 * 3213505586u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountReference.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountReference : IMessage<AccountReference>, IEquatable<AccountReference>, IDeepCloneable<AccountReference>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountReference.__c __9 = new AccountReference.__c(); internal AccountReference cctor>b__44_0() { return new AccountReference(); } } private static readonly MessageParser<AccountReference> _parser = new MessageParser<AccountReference>(new Func<AccountReference>(AccountReference.__c.__9.<.cctor>b__44_0)); public const int IdFieldNumber = 1; private uint id_; public const int EmailFieldNumber = 2; private string email_ = ""; public const int HandleFieldNumber = 3; private GameAccountHandle handle_; public const int BattleTagFieldNumber = 4; private string battleTag_ = ""; public const int RegionFieldNumber = 10; private uint region_; public static MessageParser<AccountReference> Parser { get { return AccountReference._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return AccountReference.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public string Email { get { return this.email_; } set { this.email_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public GameAccountHandle Handle { get { return this.handle_; } set { this.handle_ = value; } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public AccountReference() { } public AccountReference(AccountReference other) : this() { while (true) { IL_9F: uint arg_7F_0 = 3813727875u; while (true) { uint num; switch ((num = (arg_7F_0 ^ 2858351766u)) % 5u) { case 0u: this.battleTag_ = other.battleTag_; this.region_ = other.region_; arg_7F_0 = (num * 3387791303u ^ 2790269389u); continue; case 1u: this.Handle = ((other.handle_ != null) ? other.Handle.Clone() : null); arg_7F_0 = 3596431072u; continue; case 2u: this.id_ = other.id_; this.email_ = other.email_; arg_7F_0 = (num * 520347375u ^ 3597235716u); continue; case 4u: goto IL_9F; } return; } } } public AccountReference Clone() { return new AccountReference(this); } public override bool Equals(object other) { return this.Equals(other as AccountReference); } public bool Equals(AccountReference other) { if (other == null) { goto IL_C4; } goto IL_150; int arg_FA_0; while (true) { IL_F5: switch ((arg_FA_0 ^ -32262283) % 15) { case 0: arg_FA_0 = (AccountReference.smethod_0(this.Email, other.Email) ? -542389541 : -1605033139); continue; case 1: return false; case 2: return true; case 3: goto IL_C4; case 4: arg_FA_0 = ((this.Region == other.Region) ? -1283047372 : -2142836670); continue; case 5: return false; case 6: return false; case 7: arg_FA_0 = ((this.Id == other.Id) ? -113991834 : -2022135112); continue; case 8: arg_FA_0 = (AccountReference.smethod_1(this.Handle, other.Handle) ? -1845388416 : -359486316); continue; case 9: goto IL_150; case 10: arg_FA_0 = (AccountReference.smethod_0(this.BattleTag, other.BattleTag) ? -1413243841 : -1662704724); continue; case 11: return false; case 12: return false; case 14: return false; } break; } return true; IL_C4: arg_FA_0 = -1298380758; goto IL_F5; IL_150: arg_FA_0 = ((other != this) ? -1489201999 : -184327710); goto IL_F5; } public override int GetHashCode() { int num = 1; while (true) { IL_1A7: uint arg_16A_0 = 441256402u; while (true) { uint num2; switch ((num2 = (arg_16A_0 ^ 637252732u)) % 12u) { case 0u: num ^= this.Handle.GetHashCode(); arg_16A_0 = (num2 * 3299753066u ^ 720179124u); continue; case 1u: arg_16A_0 = ((this.handle_ != null) ? 906299012u : 1461007620u); continue; case 2u: arg_16A_0 = (((this.Id != 0u) ? 2282360749u : 2195970911u) ^ num2 * 1621626364u); continue; case 4u: arg_16A_0 = ((this.BattleTag.Length != 0) ? 1619050585u : 99376814u); continue; case 5u: num ^= this.Id.GetHashCode(); arg_16A_0 = (num2 * 3757511298u ^ 650915237u); continue; case 6u: goto IL_1A7; case 7u: arg_16A_0 = ((this.Email.Length != 0) ? 195554548u : 843342621u); continue; case 8u: num ^= this.Email.GetHashCode(); arg_16A_0 = (num2 * 4085097165u ^ 3492059125u); continue; case 9u: num ^= this.BattleTag.GetHashCode(); arg_16A_0 = (num2 * 2130152695u ^ 3602388253u); continue; case 10u: arg_16A_0 = ((this.Region == 0u) ? 1337850283u : 1734946127u); continue; case 11u: num ^= this.Region.GetHashCode(); arg_16A_0 = (num2 * 2316504041u ^ 2406898112u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Id != 0u) { goto IL_1D; } goto IL_1EA; uint arg_192_0; while (true) { IL_18D: uint num; switch ((num = (arg_192_0 ^ 370246798u)) % 15u) { case 0u: output.WriteString(this.Email); arg_192_0 = (num * 3517613621u ^ 3136677269u); continue; case 1u: goto IL_1EA; case 2u: output.WriteUInt32(this.Region); arg_192_0 = (num * 1379712177u ^ 3042971532u); continue; case 3u: output.WriteRawTag(26); arg_192_0 = (num * 1817032638u ^ 230028878u); continue; case 4u: output.WriteRawTag(34); output.WriteString(this.BattleTag); arg_192_0 = (num * 1626080147u ^ 2819300711u); continue; case 5u: arg_192_0 = ((this.handle_ != null) ? 798585045u : 1857891452u); continue; case 6u: arg_192_0 = ((this.Region != 0u) ? 145363515u : 1627522659u); continue; case 7u: output.WriteRawTag(13); arg_192_0 = (num * 3234270118u ^ 1702433538u); continue; case 8u: output.WriteRawTag(80); arg_192_0 = (num * 556772417u ^ 2659189732u); continue; case 9u: output.WriteFixed32(this.Id); arg_192_0 = (num * 3542703908u ^ 3470004296u); continue; case 11u: output.WriteRawTag(18); arg_192_0 = (num * 4286618011u ^ 9517140u); continue; case 12u: arg_192_0 = ((AccountReference.smethod_2(this.BattleTag) != 0) ? 581469203u : 1240607808u); continue; case 13u: output.WriteMessage(this.Handle); arg_192_0 = (num * 1793023723u ^ 2445369746u); continue; case 14u: goto IL_1D; } break; } return; IL_1D: arg_192_0 = 164792592u; goto IL_18D; IL_1EA: arg_192_0 = ((AccountReference.smethod_2(this.Email) == 0) ? 2135897725u : 741951064u); goto IL_18D; } public int CalculateSize() { int num = 0; while (true) { IL_19C: uint arg_15F_0 = 2472887069u; while (true) { uint num2; switch ((num2 = (arg_15F_0 ^ 2266531888u)) % 12u) { case 0u: arg_15F_0 = ((AccountReference.smethod_2(this.BattleTag) != 0) ? 3826198804u : 3839347857u); continue; case 1u: arg_15F_0 = ((this.Region == 0u) ? 3485666312u : 2865767667u); continue; case 2u: num += 5; arg_15F_0 = (num2 * 574953084u ^ 280649765u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Region); arg_15F_0 = (num2 * 3599182241u ^ 3296193963u); continue; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_15F_0 = (num2 * 3482069214u ^ 1066176937u); continue; case 5u: arg_15F_0 = ((AccountReference.smethod_2(this.Email) == 0) ? 3820757983u : 3611733502u); continue; case 6u: num += 1 + CodedOutputStream.ComputeStringSize(this.Email); arg_15F_0 = (num2 * 4239731216u ^ 419433279u); continue; case 7u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Handle); arg_15F_0 = (num2 * 3248918301u ^ 2298426071u); continue; case 9u: arg_15F_0 = (((this.Id == 0u) ? 3853628328u : 2465367683u) ^ num2 * 3170343641u); continue; case 10u: goto IL_19C; case 11u: arg_15F_0 = ((this.handle_ == null) ? 3927180912u : 4084857763u); continue; } return num; } } return num; } public void MergeFrom(AccountReference other) { if (other == null) { goto IL_9A; } goto IL_1E7; uint arg_18F_0; while (true) { IL_18A: uint num; switch ((num = (arg_18F_0 ^ 3716462683u)) % 15u) { case 0u: arg_18F_0 = ((other.Region != 0u) ? 2785649651u : 2477202374u); continue; case 1u: return; case 2u: arg_18F_0 = (((this.handle_ != null) ? 3828395177u : 3817908654u) ^ num * 1328640268u); continue; case 3u: this.BattleTag = other.BattleTag; arg_18F_0 = (num * 2644069830u ^ 3521374858u); continue; case 4u: this.Email = other.Email; arg_18F_0 = (num * 4009049284u ^ 3708226533u); continue; case 5u: this.Id = other.Id; arg_18F_0 = (num * 2239219461u ^ 566930408u); continue; case 6u: arg_18F_0 = ((AccountReference.smethod_2(other.BattleTag) != 0) ? 2390506549u : 2620025246u); continue; case 7u: arg_18F_0 = ((other.handle_ == null) ? 2212953832u : 2742568052u); continue; case 8u: goto IL_9A; case 9u: this.Region = other.Region; arg_18F_0 = (num * 4165622435u ^ 2525409342u); continue; case 10u: this.handle_ = new GameAccountHandle(); arg_18F_0 = (num * 3513940910u ^ 4024632243u); continue; case 11u: arg_18F_0 = ((AccountReference.smethod_2(other.Email) != 0) ? 3356399334u : 2359697233u); continue; case 12u: this.Handle.MergeFrom(other.Handle); arg_18F_0 = 2212953832u; continue; case 14u: goto IL_1E7; } break; } return; IL_9A: arg_18F_0 = 2447903419u; goto IL_18A; IL_1E7: arg_18F_0 = ((other.Id != 0u) ? 3395486292u : 3236683939u); goto IL_18A; } public void MergeFrom(CodedInputStream input) { while (true) { IL_268: uint num; uint arg_1F8_0 = ((num = input.ReadTag()) == 0u) ? 707122069u : 785795232u; while (true) { uint num2; switch ((num2 = (arg_1F8_0 ^ 1173531728u)) % 21u) { case 0u: arg_1F8_0 = (num2 * 169878637u ^ 2575823547u); continue; case 1u: this.Id = input.ReadFixed32(); arg_1F8_0 = 1250712165u; continue; case 2u: arg_1F8_0 = (num2 * 1418516141u ^ 2895447964u); continue; case 3u: arg_1F8_0 = 785795232u; continue; case 4u: input.ReadMessage(this.handle_); arg_1F8_0 = 252553293u; continue; case 5u: arg_1F8_0 = (((num == 80u) ? 3389110747u : 2726625130u) ^ num2 * 299219434u); continue; case 6u: input.SkipLastField(); arg_1F8_0 = 975665452u; continue; case 7u: arg_1F8_0 = ((num != 26u) ? 1979340972u : 934896368u); continue; case 8u: arg_1F8_0 = ((num <= 18u) ? 1255155228u : 1377478812u); continue; case 9u: arg_1F8_0 = ((this.handle_ == null) ? 225604896u : 200183094u); continue; case 10u: arg_1F8_0 = (num2 * 722759410u ^ 2448035912u); continue; case 11u: arg_1F8_0 = (((num != 13u) ? 1221343140u : 293720676u) ^ num2 * 10603602u); continue; case 12u: this.Email = input.ReadString(); arg_1F8_0 = 252553293u; continue; case 13u: this.handle_ = new GameAccountHandle(); arg_1F8_0 = (num2 * 4242699206u ^ 568062358u); continue; case 15u: this.Region = input.ReadUInt32(); arg_1F8_0 = 252553293u; continue; case 16u: arg_1F8_0 = (((num != 18u) ? 785027658u : 715190365u) ^ num2 * 970941289u); continue; case 17u: arg_1F8_0 = (num2 * 1524712317u ^ 2471041473u); continue; case 18u: arg_1F8_0 = (((num != 34u) ? 1169344147u : 1404875752u) ^ num2 * 3598307522u); continue; case 19u: this.BattleTag = input.ReadString(); arg_1F8_0 = 565124446u; continue; case 20u: goto IL_268; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Framework.Constants/ViolenceLevel.cs using System; namespace Framework.Constants { public enum ViolenceLevel { None, Medium, High } } <file_sep>/Google.Protobuf/Preconditions.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public static class Preconditions { public static T CheckNotNull<T>(T value, string name) where T : class { if (value == null) { throw Preconditions.smethod_0(name); } return value; } internal static T CheckNotNullUnconstrained<T>(T value, string name) { if (value == null) { throw Preconditions.smethod_0(name); } return value; } static ArgumentNullException smethod_0(string string_0) { return new ArgumentNullException(string_0); } } } <file_sep>/Bgs.Protocol/Invitation.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Invitation : IMessage<Invitation>, IEquatable<Invitation>, IDeepCloneable<Invitation>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Invitation.__c __9 = new Invitation.__c(); internal Invitation cctor>b__59_0() { return new Invitation(); } } private static readonly MessageParser<Invitation> _parser = new MessageParser<Invitation>(new Func<Invitation>(Invitation.__c.__9.<.cctor>b__59_0)); public const int IdFieldNumber = 1; private ulong id_; public const int InviterIdentityFieldNumber = 2; private Identity inviterIdentity_; public const int InviteeIdentityFieldNumber = 3; private Identity inviteeIdentity_; public const int InviterNameFieldNumber = 4; private string inviterName_ = ""; public const int InviteeNameFieldNumber = 5; private string inviteeName_ = ""; public const int InvitationMessageFieldNumber = 6; private string invitationMessage_ = ""; public const int CreationTimeFieldNumber = 7; private ulong creationTime_; public const int ExpirationTimeFieldNumber = 8; private ulong expirationTime_; public static MessageParser<Invitation> Parser { get { return Invitation._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Invitation.Descriptor; } } public ulong Id { get { return this.id_; } set { this.id_ = value; } } public Identity InviterIdentity { get { return this.inviterIdentity_; } set { this.inviterIdentity_ = value; } } public Identity InviteeIdentity { get { return this.inviteeIdentity_; } set { this.inviteeIdentity_ = value; } } public string InviterName { get { return this.inviterName_; } set { this.inviterName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string InviteeName { get { return this.inviteeName_; } set { this.inviteeName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string InvitationMessage { get { return this.invitationMessage_; } set { this.invitationMessage_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public ulong CreationTime { get { return this.creationTime_; } set { this.creationTime_ = value; } } public ulong ExpirationTime { get { return this.expirationTime_; } set { this.expirationTime_ = value; } } public Invitation() { } public Invitation(Invitation other) : this() { while (true) { IL_F4: uint arg_CC_0 = 3368733936u; while (true) { uint num; switch ((num = (arg_CC_0 ^ 2687013655u)) % 7u) { case 0u: this.creationTime_ = other.creationTime_; arg_CC_0 = (num * 73398191u ^ 2372653017u); continue; case 2u: this.invitationMessage_ = other.invitationMessage_; arg_CC_0 = (num * 901828807u ^ 2507602456u); continue; case 3u: this.InviteeIdentity = ((other.inviteeIdentity_ != null) ? other.InviteeIdentity.Clone() : null); this.inviterName_ = other.inviterName_; this.inviteeName_ = other.inviteeName_; arg_CC_0 = 2517381316u; continue; case 4u: goto IL_F4; case 5u: this.id_ = other.id_; this.InviterIdentity = ((other.inviterIdentity_ != null) ? other.InviterIdentity.Clone() : null); arg_CC_0 = 3448492590u; continue; case 6u: this.expirationTime_ = other.expirationTime_; arg_CC_0 = (num * 654861472u ^ 316785139u); continue; } return; } } } public Invitation Clone() { return new Invitation(this); } public override bool Equals(object other) { return this.Equals(other as Invitation); } public bool Equals(Invitation other) { if (other == null) { goto IL_17B; } goto IL_1F3; int arg_185_0; while (true) { IL_180: switch ((arg_185_0 ^ 54782606) % 21) { case 0: goto IL_17B; case 2: return true; case 3: return false; case 4: arg_185_0 = ((!Invitation.smethod_0(this.InviteeIdentity, other.InviteeIdentity)) ? 132574845 : 176445693); continue; case 5: return false; case 6: return false; case 7: arg_185_0 = ((this.CreationTime == other.CreationTime) ? 283666770 : 44452698); continue; case 8: return false; case 9: arg_185_0 = (Invitation.smethod_1(this.InviterName, other.InviterName) ? 1660927796 : 1931144290); continue; case 10: arg_185_0 = ((!Invitation.smethod_0(this.InviterIdentity, other.InviterIdentity)) ? 879309745 : 629122309); continue; case 11: arg_185_0 = ((!Invitation.smethod_1(this.InviteeName, other.InviteeName)) ? 384647121 : 835534920); continue; case 12: return false; case 13: arg_185_0 = ((this.ExpirationTime != other.ExpirationTime) ? 653818421 : 1315321443); continue; case 14: arg_185_0 = (Invitation.smethod_1(this.InvitationMessage, other.InvitationMessage) ? 1382813114 : 1025171282); continue; case 15: return false; case 16: return false; case 17: goto IL_1F3; case 18: arg_185_0 = ((this.Id != other.Id) ? 890798202 : 41871490); continue; case 19: return false; case 20: return false; } break; } return true; IL_17B: arg_185_0 = 483550535; goto IL_180; IL_1F3: arg_185_0 = ((other != this) ? 1728337702 : 438332444); goto IL_180; } public override int GetHashCode() { int num = 1; if (this.Id != 0uL) { goto IL_AF; } goto IL_1D6; uint arg_186_0; while (true) { IL_181: uint num2; switch ((num2 = (arg_186_0 ^ 1895223327u)) % 13u) { case 0u: num ^= this.InviteeName.GetHashCode(); arg_186_0 = (num2 * 552263203u ^ 1355919074u); continue; case 2u: num ^= this.CreationTime.GetHashCode(); arg_186_0 = (num2 * 1324074850u ^ 3591428752u); continue; case 3u: arg_186_0 = ((this.InviteeName.Length == 0) ? 1366008021u : 644677314u); continue; case 4u: goto IL_1D6; case 5u: arg_186_0 = ((this.ExpirationTime == 0uL) ? 1355199036u : 1770540573u); continue; case 6u: num ^= this.Id.GetHashCode(); arg_186_0 = (num2 * 334445259u ^ 1126945736u); continue; case 7u: num ^= this.ExpirationTime.GetHashCode(); arg_186_0 = (num2 * 4064805956u ^ 1147974324u); continue; case 8u: goto IL_AF; case 9u: num ^= this.InviterName.GetHashCode(); arg_186_0 = (num2 * 139717015u ^ 4204937540u); continue; case 10u: arg_186_0 = ((this.CreationTime != 0uL) ? 1056872876u : 1473741078u); continue; case 11u: arg_186_0 = ((this.InvitationMessage.Length == 0) ? 1760974667u : 986782549u); continue; case 12u: num ^= this.InvitationMessage.GetHashCode(); arg_186_0 = (num2 * 1369252061u ^ 2094262697u); continue; } break; } return num; IL_AF: arg_186_0 = 724233383u; goto IL_181; IL_1D6: num ^= this.InviterIdentity.GetHashCode(); num ^= this.InviteeIdentity.GetHashCode(); arg_186_0 = ((this.InviterName.Length == 0) ? 1458561681u : 929055596u); goto IL_181; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Id != 0uL) { goto IL_1FB; } goto IL_2B9; uint arg_258_0; while (true) { IL_253: uint num; switch ((num = (arg_258_0 ^ 3510684873u)) % 21u) { case 0u: output.WriteString(this.InvitationMessage); arg_258_0 = (num * 3929959948u ^ 2260070866u); continue; case 1u: arg_258_0 = ((this.CreationTime != 0uL) ? 2580219740u : 3719311843u); continue; case 2u: output.WriteRawTag(56); arg_258_0 = (num * 2281649942u ^ 484308282u); continue; case 3u: goto IL_1FB; case 4u: output.WriteRawTag(42); output.WriteString(this.InviteeName); arg_258_0 = (num * 926654138u ^ 954032714u); continue; case 5u: arg_258_0 = ((Invitation.smethod_2(this.InviteeName) != 0) ? 3679866376u : 3931405424u); continue; case 6u: output.WriteRawTag(50); arg_258_0 = (num * 1613914295u ^ 2537708903u); continue; case 7u: arg_258_0 = (((Invitation.smethod_2(this.InviterName) == 0) ? 3825044584u : 2752713479u) ^ num * 241753776u); continue; case 8u: arg_258_0 = ((Invitation.smethod_2(this.InvitationMessage) == 0) ? 3015638422u : 3672318458u); continue; case 9u: output.WriteRawTag(26); arg_258_0 = (num * 2006558531u ^ 2169108969u); continue; case 11u: output.WriteUInt64(this.ExpirationTime); arg_258_0 = (num * 2330285748u ^ 2088692830u); continue; case 12u: goto IL_2B9; case 13u: arg_258_0 = ((this.ExpirationTime == 0uL) ? 3396513530u : 3481020135u); continue; case 14u: output.WriteRawTag(9); arg_258_0 = (num * 3718169875u ^ 2982320365u); continue; case 15u: output.WriteRawTag(34); output.WriteString(this.InviterName); arg_258_0 = (num * 1312519798u ^ 2704358508u); continue; case 16u: output.WriteUInt64(this.CreationTime); arg_258_0 = (num * 3233969359u ^ 3435441328u); continue; case 17u: output.WriteMessage(this.InviterIdentity); arg_258_0 = (num * 4266212696u ^ 4158779317u); continue; case 18u: output.WriteFixed64(this.Id); arg_258_0 = (num * 2644174274u ^ 2308137227u); continue; case 19u: output.WriteRawTag(64); arg_258_0 = (num * 172584452u ^ 3563523612u); continue; case 20u: output.WriteMessage(this.InviteeIdentity); arg_258_0 = (num * 750041473u ^ 3422542546u); continue; } break; } return; IL_1FB: arg_258_0 = 2401963482u; goto IL_253; IL_2B9: output.WriteRawTag(18); arg_258_0 = 4092848872u; goto IL_253; } public int CalculateSize() { int num = 0; if (this.Id != 0uL) { goto IL_EC; } goto IL_1CE; uint arg_17E_0; while (true) { IL_179: uint num2; switch ((num2 = (arg_17E_0 ^ 3536212555u)) % 13u) { case 0u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.CreationTime); arg_17E_0 = (num2 * 3027300053u ^ 3287304706u); continue; case 1u: arg_17E_0 = ((this.ExpirationTime != 0uL) ? 4104858193u : 3601403071u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ExpirationTime); arg_17E_0 = (num2 * 2008366449u ^ 3673897413u); continue; case 3u: arg_17E_0 = ((Invitation.smethod_2(this.InvitationMessage) == 0) ? 3814946107u : 3195855019u); continue; case 4u: goto IL_EC; case 5u: arg_17E_0 = ((Invitation.smethod_2(this.InviteeName) != 0) ? 3998743112u : 2161511637u); continue; case 6u: arg_17E_0 = ((this.CreationTime == 0uL) ? 2783852980u : 2482317717u); continue; case 7u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviterName); arg_17E_0 = (num2 * 3066082169u ^ 3722603954u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviteeName); arg_17E_0 = (num2 * 903004598u ^ 3497769463u); continue; case 9u: num += 1 + CodedOutputStream.ComputeStringSize(this.InvitationMessage); arg_17E_0 = (num2 * 1122191099u ^ 3891647643u); continue; case 11u: num += 9; arg_17E_0 = (num2 * 1173378719u ^ 2181760301u); continue; case 12u: goto IL_1CE; } break; } return num; IL_EC: arg_17E_0 = 3843308850u; goto IL_179; IL_1CE: num += 1 + CodedOutputStream.ComputeMessageSize(this.InviterIdentity); num += 1 + CodedOutputStream.ComputeMessageSize(this.InviteeIdentity); arg_17E_0 = ((Invitation.smethod_2(this.InviterName) == 0) ? 2203309217u : 3536049056u); goto IL_179; } public void MergeFrom(Invitation other) { if (other == null) { goto IL_1F6; } goto IL_318; uint arg_2A0_0; while (true) { IL_29B: uint num; switch ((num = (arg_2A0_0 ^ 370080683u)) % 23u) { case 0u: this.InviterIdentity.MergeFrom(other.InviterIdentity); arg_2A0_0 = 2127012864u; continue; case 1u: this.ExpirationTime = other.ExpirationTime; arg_2A0_0 = (num * 1782234623u ^ 2070407178u); continue; case 2u: this.CreationTime = other.CreationTime; arg_2A0_0 = (num * 90973012u ^ 1727664039u); continue; case 3u: arg_2A0_0 = (((this.inviterIdentity_ == null) ? 3899623766u : 2602491914u) ^ num * 323029515u); continue; case 4u: arg_2A0_0 = ((Invitation.smethod_2(other.InviterName) != 0) ? 671145922u : 1694266536u); continue; case 5u: goto IL_1F6; case 7u: arg_2A0_0 = ((Invitation.smethod_2(other.InviteeName) != 0) ? 1800667564u : 1992291752u); continue; case 8u: this.inviteeIdentity_ = new Identity(); arg_2A0_0 = (num * 3659367352u ^ 2881501315u); continue; case 9u: this.inviterIdentity_ = new Identity(); arg_2A0_0 = (num * 154039771u ^ 4262360941u); continue; case 10u: arg_2A0_0 = ((other.CreationTime != 0uL) ? 645296085u : 436206847u); continue; case 11u: arg_2A0_0 = ((other.ExpirationTime != 0uL) ? 1180700833u : 488728828u); continue; case 12u: this.InviterName = other.InviterName; arg_2A0_0 = (num * 103779340u ^ 2904970308u); continue; case 13u: arg_2A0_0 = ((other.inviteeIdentity_ == null) ? 2074223812u : 1721294856u); continue; case 14u: goto IL_318; case 15u: return; case 16u: arg_2A0_0 = ((other.inviterIdentity_ == null) ? 2127012864u : 748526413u); continue; case 17u: this.InviteeIdentity.MergeFrom(other.InviteeIdentity); arg_2A0_0 = 2074223812u; continue; case 18u: arg_2A0_0 = (((this.inviteeIdentity_ != null) ? 3828127553u : 2265679357u) ^ num * 1091420918u); continue; case 19u: this.Id = other.Id; arg_2A0_0 = (num * 1942002201u ^ 1997449377u); continue; case 20u: this.InviteeName = other.InviteeName; arg_2A0_0 = (num * 357191779u ^ 3085505821u); continue; case 21u: arg_2A0_0 = ((Invitation.smethod_2(other.InvitationMessage) == 0) ? 773409561u : 150274545u); continue; case 22u: this.InvitationMessage = other.InvitationMessage; arg_2A0_0 = (num * 554024972u ^ 3276568353u); continue; } break; } return; IL_1F6: arg_2A0_0 = 1593328176u; goto IL_29B; IL_318: arg_2A0_0 = ((other.Id == 0uL) ? 1200532503u : 592320141u); goto IL_29B; } public void MergeFrom(CodedInputStream input) { while (true) { IL_402: uint num; uint arg_362_0 = ((num = input.ReadTag()) != 0u) ? 2274254786u : 2625044519u; while (true) { uint num2; switch ((num2 = (arg_362_0 ^ 3529736419u)) % 33u) { case 0u: arg_362_0 = ((this.inviterIdentity_ == null) ? 3330333706u : 2498467037u); continue; case 1u: arg_362_0 = (num2 * 2181127679u ^ 1519733500u); continue; case 2u: this.CreationTime = input.ReadUInt64(); arg_362_0 = 2448045609u; continue; case 3u: arg_362_0 = (num2 * 1756287682u ^ 4222261401u); continue; case 4u: arg_362_0 = (num2 * 638982336u ^ 396340077u); continue; case 5u: arg_362_0 = (((num == 18u) ? 3418098292u : 3239727105u) ^ num2 * 3855750199u); continue; case 6u: arg_362_0 = (num2 * 2251500114u ^ 2562261465u); continue; case 7u: input.ReadMessage(this.inviteeIdentity_); arg_362_0 = 3899691593u; continue; case 8u: goto IL_402; case 9u: arg_362_0 = 2274254786u; continue; case 10u: arg_362_0 = (((num != 34u) ? 3789743322u : 2209346366u) ^ num2 * 4263292234u); continue; case 11u: arg_362_0 = (((num != 42u) ? 2990198601u : 3834036184u) ^ num2 * 960790604u); continue; case 12u: arg_362_0 = (num2 * 1453175822u ^ 3203943267u); continue; case 13u: input.SkipLastField(); arg_362_0 = 4176392557u; continue; case 14u: this.InviteeName = input.ReadString(); arg_362_0 = 4176392557u; continue; case 15u: this.InvitationMessage = input.ReadString(); arg_362_0 = 4176392557u; continue; case 16u: arg_362_0 = ((num <= 50u) ? 2375441553u : 4209111589u); continue; case 18u: arg_362_0 = (((num == 64u) ? 3369739727u : 2350430655u) ^ num2 * 1356460946u); continue; case 19u: arg_362_0 = (((num <= 18u) ? 1327922205u : 56919390u) ^ num2 * 2268859138u); continue; case 20u: this.ExpirationTime = input.ReadUInt64(); arg_362_0 = 4176392557u; continue; case 21u: arg_362_0 = ((this.inviteeIdentity_ != null) ? 2588326723u : 2480750117u); continue; case 22u: arg_362_0 = (((num != 50u) ? 2914870800u : 3075947315u) ^ num2 * 1215964930u); continue; case 23u: this.inviterIdentity_ = new Identity(); arg_362_0 = (num2 * 3666864912u ^ 3226281293u); continue; case 24u: input.ReadMessage(this.inviterIdentity_); arg_362_0 = 4176392557u; continue; case 25u: arg_362_0 = (num2 * 1725313192u ^ 4274958077u); continue; case 26u: arg_362_0 = ((num > 34u) ? 3434203796u : 3058361567u); continue; case 27u: arg_362_0 = (((num == 9u) ? 2540091302u : 4033386295u) ^ num2 * 2764341436u); continue; case 28u: this.Id = input.ReadFixed64(); arg_362_0 = 4176392557u; continue; case 29u: arg_362_0 = ((num != 56u) ? 3285001166u : 3558737611u); continue; case 30u: arg_362_0 = ((num == 26u) ? 4073556215u : 2486553761u); continue; case 31u: this.inviteeIdentity_ = new Identity(); arg_362_0 = (num2 * 1193399668u ^ 2598999291u); continue; case 32u: this.InviterName = input.ReadString(); arg_362_0 = 2627252891u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.Game.Managers/ActionManager.cs using AuthServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Misc; using System; using System.Collections.Generic; using System.Linq; namespace AuthServer.Game.Managers { public class ActionManager : Singleton<ActionManager> { private ActionManager() { } public void LoadActionButtons(Character pChar) { } public List<ActionButton> GetActionButtons(Character pChar, byte specGroup) { return (from action in pChar.ActionButtons where action.SpecGroup == specGroup select action).ToList<ActionButton>(); } public void AddActionButton(Character pChar, ActionButton actionButton, bool addToDb = false) { if (pChar != null) { while (true) { IL_80: uint arg_5C_0 = 3472993770u; while (true) { uint num; switch ((num = (arg_5C_0 ^ 3272006349u)) % 6u) { case 1u: Manager.ObjectMgr.SaveChar(pChar); arg_5C_0 = (num * 1333905474u ^ 898686777u); continue; case 2u: return; case 3u: arg_5C_0 = (((actionButton == null) ? 798579798u : 1654583378u) ^ num * 2641820425u); continue; case 4u: pChar.ActionButtons.Add(actionButton); arg_5C_0 = 4069813818u; continue; case 5u: goto IL_80; } return; } } return; } } public void RemoveActionButton(Character pChar, ActionButton actionButton, bool deleteFromDb = false) { if (pChar != null) { while (true) { IL_48: uint arg_2C_0 = 1287114015u; while (true) { uint num; switch ((num = (arg_2C_0 ^ 476689054u)) % 4u) { case 0u: return; case 1u: arg_2C_0 = (((actionButton != null) ? 1999217433u : 504481467u) ^ num * 3309623993u); continue; case 3u: goto IL_48; } goto Block_3; } } Block_3: pChar.ActionButtons.Remove(actionButton); Manager.ObjectMgr.SaveChar(pChar); return; } } } } <file_sep>/Framework.Constants.Movement/MovementFlag.cs using System; namespace Framework.Constants.Movement { [Flags] public enum MovementFlag { Forward = 1, Backward = 2, StrafeLeft = 4, StrafeRight = 8, TurnLeft = 16, TurnRight = 32, PitchUp = 64, PitchDown = 128, RunMode = 256, Gravity = 512, Root = 1024, Falling = 2048, FallReset = 4096, PendingStop = 8192, PendingStrafeStop = 16384, PendingForward = 32768, PendingBackward = 65536, PendingStrafeLeft = 131072, PendingStrafeRight = 262144, PendingRoot = 524288, Swim = 1048576, Ascension = 2097152, Descension = 4194304, CanFly = 8388608, Flight = 16777216, IsSteppingUp = 33554432, WalkOnWater = 67108864, FeatherFall = 134217728, HoverMove = 268435456, Collision = 536870912, DoubleJump = 1073741824 } } <file_sep>/Bgs.Protocol.Account.V1/SubscriptionUpdateRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class SubscriptionUpdateRequest : IMessage<SubscriptionUpdateRequest>, IEquatable<SubscriptionUpdateRequest>, IDeepCloneable<SubscriptionUpdateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscriptionUpdateRequest.__c __9 = new SubscriptionUpdateRequest.__c(); internal SubscriptionUpdateRequest cctor>b__24_0() { return new SubscriptionUpdateRequest(); } } private static readonly MessageParser<SubscriptionUpdateRequest> _parser = new MessageParser<SubscriptionUpdateRequest>(new Func<SubscriptionUpdateRequest>(SubscriptionUpdateRequest.__c.__9.<.cctor>b__24_0)); public const int RefFieldNumber = 2; private static readonly FieldCodec<SubscriberReference> _repeated_ref_codec = FieldCodec.ForMessage<SubscriberReference>(18u, SubscriberReference.Parser); private readonly RepeatedField<SubscriberReference> ref_ = new RepeatedField<SubscriberReference>(); public static MessageParser<SubscriptionUpdateRequest> Parser { get { return SubscriptionUpdateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return SubscriptionUpdateRequest.Descriptor; } } public RepeatedField<SubscriberReference> Ref { get { return this.ref_; } } public SubscriptionUpdateRequest() { } public SubscriptionUpdateRequest(SubscriptionUpdateRequest other) : this() { while (true) { IL_43: uint arg_2B_0 = 874902804u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 1942352146u)) % 3u) { case 0u: goto IL_43; case 2u: this.ref_ = other.ref_.Clone(); arg_2B_0 = (num * 3000122428u ^ 4119397752u); continue; } return; } } } public SubscriptionUpdateRequest Clone() { return new SubscriptionUpdateRequest(this); } public override bool Equals(object other) { return this.Equals(other as SubscriptionUpdateRequest); } public bool Equals(SubscriptionUpdateRequest other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1978412385) % 7) { case 0: goto IL_3E; case 1: arg_48_0 = ((!this.ref_.Equals(other.ref_)) ? 1650721842 : 921575739); continue; case 2: return false; case 3: return false; case 4: goto IL_7A; case 5: return true; } break; } return true; IL_3E: arg_48_0 = 482754061; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? 251604682 : 295902617); goto IL_43; } public override int GetHashCode() { return 1 ^ SubscriptionUpdateRequest.smethod_0(this.ref_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.ref_.WriteTo(output, SubscriptionUpdateRequest._repeated_ref_codec); } public int CalculateSize() { return 0 + this.ref_.CalculateSize(SubscriptionUpdateRequest._repeated_ref_codec); } public void MergeFrom(SubscriptionUpdateRequest other) { if (other == null) { return; } this.ref_.Add(other.ref_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 2726365516u : 3963361502u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 3133808744u)) % 7u) { case 0u: arg_77_0 = 2726365516u; continue; case 1u: this.ref_.AddEntriesFrom(input, SubscriptionUpdateRequest._repeated_ref_codec); arg_77_0 = 4217827931u; continue; case 2u: input.SkipLastField(); arg_77_0 = (num2 * 2028951747u ^ 3589913881u); continue; case 3u: arg_77_0 = ((num != 18u) ? 3946902280u : 2492028482u); continue; case 5u: goto IL_AE; case 6u: arg_77_0 = (num2 * 2291759807u ^ 699893044u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.AuthServer.Packets.BnetHandlers/AuthenticationServerService.cs using AuthServer.AuthServer.Attributes; using AuthServer.Network; using Bgs.Protocol; using Bgs.Protocol.Authentication.V1; using Bgs.Protocol.Challenge.V1; using Framework.Constants.Net; using Framework.Misc; using Google.Protobuf; using System; namespace AuthServer.AuthServer.Packets.BnetHandlers { [BnetService(BnetServiceHash.AuthenticationServerService)] public class AuthenticationServerService : BnetServiceBase { [BnetServiceBase.BnetMethodAttribute(1u)] public static void HandleConnectRequest(AuthSession session, LogonRequest logonRequest) { if (logonRequest.WebClientVerification) { while (true) { IL_98: uint arg_78_0 = 2859478583u; while (true) { uint num; switch ((num = (arg_78_0 ^ 2148169041u)) % 5u) { case 0u: goto IL_98; case 2u: { ChallengeExternalRequest challengeExternalRequest = new ChallengeExternalRequest(); challengeExternalRequest.PayloadType = Module.smethod_36<string>(573305427u); arg_78_0 = (num * 4022609958u ^ 1698604317u); continue; } case 3u: { ChallengeExternalRequest challengeExternalRequest; challengeExternalRequest.Payload = ByteString.CopyFromUtf8(Module.smethod_33<string>(4154950356u)); arg_78_0 = (num * 836868245u ^ 2968312731u); continue; } case 4u: { ChallengeExternalRequest challengeExternalRequest; session.Send(challengeExternalRequest, 3151632159u, 3u); arg_78_0 = (num * 950688502u ^ 1062584357u); continue; } } goto Block_2; } } Block_2:; } } [BnetServiceBase.BnetMethodAttribute(7u)] public static void HandleVerifyWebCredentialsRequest(AuthSession session, VerifyWebCredentialsRequest verifyWebCredentialsRequest) { if (AuthenticationServerService.smethod_0(verifyWebCredentialsRequest.WebCredentials.ToStringUtf8(), Module.smethod_35<string>(135873738u))) { goto IL_40; } goto IL_12A; uint arg_FE_0; while (true) { IL_F9: uint num; switch ((num = (arg_FE_0 ^ 2914461396u)) % 8u) { case 0u: { LogonResult logonResult; logonResult.AccountId = new EntityId { High = 72057594037927936uL, Low = 400392402uL }; logonResult.GameAccountId.Add(new EntityId { High = 144115196671520599uL, Low = 53248613uL }); arg_FE_0 = (num * 1282423581u ^ 3250166064u); continue; } case 2u: { LogonResult logonResult; session.Send(logonResult, 1898188341u, 5u); arg_FE_0 = (num * 2722318603u ^ 3294505385u); continue; } case 3u: return; case 4u: { LogonResult logonResult; logonResult.SessionKey = ByteString.CopyFromUtf8(new byte[0].GenerateRandomKey(64).ToHexString()); arg_FE_0 = (num * 3298850102u ^ 2641972478u); continue; } case 5u: goto IL_12A; case 6u: goto IL_40; case 7u: { LogonResult logonResult = new LogonResult(); logonResult.ErrorCode = 0u; arg_FE_0 = (num * 3066472018u ^ 3234139154u); continue; } } break; } return; IL_40: arg_FE_0 = 2502728195u; goto IL_F9; IL_12A: session.Dispose(); arg_FE_0 = 3425304053u; goto IL_F9; } static bool smethod_0(string string_0, string string_1) { return string_0 == string_1; } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GetPlayerVariablesRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GetPlayerVariablesRequest : IMessage<GetPlayerVariablesRequest>, IEquatable<GetPlayerVariablesRequest>, IDeepCloneable<GetPlayerVariablesRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetPlayerVariablesRequest.__c __9 = new GetPlayerVariablesRequest.__c(); internal GetPlayerVariablesRequest cctor>b__29_0() { return new GetPlayerVariablesRequest(); } } private static readonly MessageParser<GetPlayerVariablesRequest> _parser = new MessageParser<GetPlayerVariablesRequest>(new Func<GetPlayerVariablesRequest>(GetPlayerVariablesRequest.__c.__9.<.cctor>b__29_0)); public const int PlayerVariablesFieldNumber = 1; private static readonly FieldCodec<PlayerVariables> _repeated_playerVariables_codec; private readonly RepeatedField<PlayerVariables> playerVariables_ = new RepeatedField<PlayerVariables>(); public const int HostFieldNumber = 2; private ProcessId host_; public static MessageParser<GetPlayerVariablesRequest> Parser { get { return GetPlayerVariablesRequest._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return GetPlayerVariablesRequest.Descriptor; } } public RepeatedField<PlayerVariables> PlayerVariables { get { return this.playerVariables_; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public GetPlayerVariablesRequest() { } public GetPlayerVariablesRequest(GetPlayerVariablesRequest other) : this() { while (true) { IL_6A: uint arg_4E_0 = 2572134604u; while (true) { uint num; switch ((num = (arg_4E_0 ^ 2897555290u)) % 4u) { case 0u: goto IL_6A; case 1u: this.Host = ((other.host_ != null) ? other.Host.Clone() : null); arg_4E_0 = 3698898453u; continue; case 2u: this.playerVariables_ = other.playerVariables_.Clone(); arg_4E_0 = (num * 2344515251u ^ 2497330949u); continue; } return; } } } public GetPlayerVariablesRequest Clone() { return new GetPlayerVariablesRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetPlayerVariablesRequest); } public bool Equals(GetPlayerVariablesRequest other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -849226111) % 9) { case 0: goto IL_B5; case 1: return false; case 2: goto IL_6D; case 3: return false; case 4: return false; case 6: arg_77_0 = (this.playerVariables_.Equals(other.playerVariables_) ? -381821884 : -345125594); continue; case 7: return true; case 8: arg_77_0 = (GetPlayerVariablesRequest.smethod_0(this.Host, other.Host) ? -1474150651 : -743203078); continue; } break; } return true; IL_6D: arg_77_0 = -1200111040; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -1000121879 : -1438130399); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_8D: uint arg_6D_0 = 2924661399u; while (true) { uint num2; switch ((num2 = (arg_6D_0 ^ 3293814767u)) % 5u) { case 0u: goto IL_8D; case 1u: num ^= GetPlayerVariablesRequest.smethod_1(this.Host); arg_6D_0 = (num2 * 3430765403u ^ 1553812306u); continue; case 2u: num ^= GetPlayerVariablesRequest.smethod_1(this.playerVariables_); arg_6D_0 = (num2 * 2155703191u ^ 2059225540u); continue; case 3u: arg_6D_0 = (((this.host_ != null) ? 3222998895u : 3807856328u) ^ num2 * 2683415045u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.playerVariables_.WriteTo(output, GetPlayerVariablesRequest._repeated_playerVariables_codec); if (this.host_ != null) { while (true) { IL_6C: uint arg_50_0 = 1583625080u; while (true) { uint num; switch ((num = (arg_50_0 ^ 47732242u)) % 4u) { case 0u: goto IL_6C; case 2u: output.WriteRawTag(18); arg_50_0 = (num * 3644489457u ^ 3595027783u); continue; case 3u: output.WriteMessage(this.Host); arg_50_0 = (num * 2333882529u ^ 243588556u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_94: uint arg_74_0 = 3285451449u; while (true) { uint num2; switch ((num2 = (arg_74_0 ^ 3773032666u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_74_0 = (num2 * 4066612768u ^ 2424767810u); continue; case 2u: goto IL_94; case 3u: num += this.playerVariables_.CalculateSize(GetPlayerVariablesRequest._repeated_playerVariables_codec); arg_74_0 = (num2 * 1686078999u ^ 2303618140u); continue; case 4u: arg_74_0 = (((this.host_ == null) ? 3226837454u : 4174489624u) ^ num2 * 659209540u); continue; } return num; } } return num; } public void MergeFrom(GetPlayerVariablesRequest other) { if (other == null) { goto IL_15; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 2385544521u)) % 7u) { case 0u: goto IL_B1; case 1u: return; case 2u: this.host_ = new ProcessId(); arg_7A_0 = (num * 2017616548u ^ 1562276415u); continue; case 3u: this.Host.MergeFrom(other.Host); arg_7A_0 = 3366892281u; continue; case 4u: arg_7A_0 = (((this.host_ != null) ? 853906865u : 143455461u) ^ num * 2770162562u); continue; case 6u: goto IL_15; } break; } return; IL_15: arg_7A_0 = 2334319134u; goto IL_75; IL_B1: this.playerVariables_.Add(other.playerVariables_); arg_7A_0 = ((other.host_ != null) ? 3370969722u : 3366892281u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_12C: uint num; uint arg_E8_0 = ((num = input.ReadTag()) != 0u) ? 360828233u : 1169475597u; while (true) { uint num2; switch ((num2 = (arg_E8_0 ^ 556826632u)) % 10u) { case 0u: this.host_ = new ProcessId(); arg_E8_0 = (num2 * 2894315928u ^ 1740236250u); continue; case 1u: arg_E8_0 = ((num == 10u) ? 1428408440u : 1461109386u); continue; case 2u: arg_E8_0 = (((num == 18u) ? 151099985u : 2065229515u) ^ num2 * 4132525378u); continue; case 3u: goto IL_12C; case 4u: this.playerVariables_.AddEntriesFrom(input, GetPlayerVariablesRequest._repeated_playerVariables_codec); arg_E8_0 = 1615523431u; continue; case 5u: input.SkipLastField(); arg_E8_0 = (num2 * 2260739339u ^ 2089281386u); continue; case 6u: arg_E8_0 = 360828233u; continue; case 7u: arg_E8_0 = ((this.host_ != null) ? 374828714u : 385626834u); continue; case 8u: input.ReadMessage(this.host_); arg_E8_0 = 1615523431u; continue; } return; } } } static GetPlayerVariablesRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 865830122u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 732680864u)) % 3u) { case 1u: GetPlayerVariablesRequest._repeated_playerVariables_codec = FieldCodec.ForMessage<PlayerVariables>(10u, Bgs.Protocol.GameUtilities.V1.PlayerVariables.Parser); arg_3F_0 = (num * 1548562938u ^ 1718774669u); continue; case 2u: goto IL_57; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/ModuleNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class ModuleNotification : IMessage<ModuleNotification>, IEquatable<ModuleNotification>, IDeepCloneable<ModuleNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ModuleNotification.__c __9 = new ModuleNotification.__c(); internal ModuleNotification cctor>b__29_0() { return new ModuleNotification(); } } private static readonly MessageParser<ModuleNotification> _parser = new MessageParser<ModuleNotification>(new Func<ModuleNotification>(ModuleNotification.__c.__9.<.cctor>b__29_0)); public const int ModuleIdFieldNumber = 2; private int moduleId_; public const int ResultFieldNumber = 3; private uint result_; public static MessageParser<ModuleNotification> Parser { get { return ModuleNotification._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return ModuleNotification.Descriptor; } } public int ModuleId { get { return this.moduleId_; } set { this.moduleId_ = value; } } public uint Result { get { return this.result_; } set { this.result_ = value; } } public ModuleNotification() { } public ModuleNotification(ModuleNotification other) : this() { while (true) { IL_5D: uint arg_41_0 = 4189166581u; while (true) { uint num; switch ((num = (arg_41_0 ^ 4145326552u)) % 4u) { case 0u: this.result_ = other.result_; arg_41_0 = (num * 2561572836u ^ 2670963330u); continue; case 1u: this.moduleId_ = other.moduleId_; arg_41_0 = (num * 907510420u ^ 3467429620u); continue; case 3u: goto IL_5D; } return; } } } public ModuleNotification Clone() { return new ModuleNotification(this); } public override bool Equals(object other) { return this.Equals(other as ModuleNotification); } public bool Equals(ModuleNotification other) { if (other == null) { goto IL_3C; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -1352497754) % 9) { case 0: goto IL_AB; case 1: return true; case 2: return false; case 3: return false; case 4: arg_6D_0 = ((this.ModuleId != other.ModuleId) ? -1050991588 : -1676104451); continue; case 5: goto IL_3C; case 7: return false; case 8: arg_6D_0 = ((this.Result != other.Result) ? -175071668 : -404152886); continue; } break; } return true; IL_3C: arg_6D_0 = -1046382439; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? -414371001 : -324352216); goto IL_68; } public override int GetHashCode() { int num = 1; while (true) { IL_B8: uint arg_94_0 = 552921155u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 1144266199u)) % 6u) { case 0u: goto IL_B8; case 1u: num ^= this.ModuleId.GetHashCode(); arg_94_0 = (num2 * 4099576059u ^ 3213662886u); continue; case 2u: arg_94_0 = ((this.Result == 0u) ? 788468746u : 1881397478u); continue; case 3u: num ^= this.Result.GetHashCode(); arg_94_0 = (num2 * 4013278701u ^ 941250391u); continue; case 4u: arg_94_0 = (((this.ModuleId == 0) ? 2333314307u : 4065046640u) ^ num2 * 2377758375u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.ModuleId != 0) { goto IL_6F; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 332935414u)) % 6u) { case 0u: goto IL_6F; case 2u: output.WriteRawTag(16); output.WriteInt32(this.ModuleId); arg_79_0 = (num * 3352984933u ^ 2403226001u); continue; case 3u: goto IL_AC; case 4u: output.WriteUInt32(this.Result); arg_79_0 = (num * 1855000106u ^ 946453783u); continue; case 5u: output.WriteRawTag(24); arg_79_0 = (num * 3352413052u ^ 1520278546u); continue; } break; } return; IL_6F: arg_79_0 = 2092038898u; goto IL_74; IL_AC: arg_79_0 = ((this.Result == 0u) ? 2040753159u : 1367819467u); goto IL_74; } public int CalculateSize() { int num = 0; if (this.ModuleId != 0) { goto IL_1C; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 1194425933u)) % 5u) { case 0u: goto IL_90; case 1u: num += 1 + CodedOutputStream.ComputeInt32Size(this.ModuleId); arg_64_0 = (num2 * 3621976890u ^ 1307139577u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Result); arg_64_0 = (num2 * 1351609714u ^ 2919296893u); continue; case 4u: goto IL_1C; } break; } return num; IL_1C: arg_64_0 = 9059036u; goto IL_5F; IL_90: arg_64_0 = ((this.Result == 0u) ? 581503037u : 1038204653u); goto IL_5F; } public void MergeFrom(ModuleNotification other) { if (other == null) { goto IL_30; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 3581138662u)) % 7u) { case 0u: this.ModuleId = other.ModuleId; arg_76_0 = (num * 2201659995u ^ 2115779222u); continue; case 1u: arg_76_0 = ((other.Result != 0u) ? 3277813657u : 3715206142u); continue; case 3u: goto IL_30; case 4u: return; case 5u: goto IL_AD; case 6u: this.Result = other.Result; arg_76_0 = (num * 4051600391u ^ 1955491207u); continue; } break; } return; IL_30: arg_76_0 = 2157519755u; goto IL_71; IL_AD: arg_76_0 = ((other.ModuleId != 0) ? 3290689588u : 3703929392u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DA: uint num; uint arg_9F_0 = ((num = input.ReadTag()) != 0u) ? 1655556361u : 449925223u; while (true) { uint num2; switch ((num2 = (arg_9F_0 ^ 615774840u)) % 8u) { case 0u: this.Result = input.ReadUInt32(); arg_9F_0 = 1377870778u; continue; case 1u: arg_9F_0 = ((num != 16u) ? 704687436u : 1820684453u); continue; case 2u: goto IL_DA; case 3u: arg_9F_0 = 1655556361u; continue; case 4u: arg_9F_0 = (((num == 24u) ? 3051783420u : 2253334970u) ^ num2 * 2347012145u); continue; case 5u: this.ModuleId = input.ReadInt32(); arg_9F_0 = 1377870778u; continue; case 6u: input.SkipLastField(); arg_9F_0 = (num2 * 4083517686u ^ 2181834334u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/ProgramTag.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class ProgramTag : IMessage<ProgramTag>, IEquatable<ProgramTag>, IDeepCloneable<ProgramTag>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ProgramTag.__c __9 = new ProgramTag.__c(); internal ProgramTag cctor>b__29_0() { return new ProgramTag(); } } private static readonly MessageParser<ProgramTag> _parser = new MessageParser<ProgramTag>(new Func<ProgramTag>(ProgramTag.__c.__9.<.cctor>b__29_0)); public const int ProgramFieldNumber = 1; private uint program_; public const int TagFieldNumber = 2; private uint tag_; public static MessageParser<ProgramTag> Parser { get { return ProgramTag._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return ProgramTag.Descriptor; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Tag { get { return this.tag_; } set { this.tag_ = value; } } public ProgramTag() { } public ProgramTag(ProgramTag other) : this() { this.program_ = other.program_; this.tag_ = other.tag_; } public ProgramTag Clone() { return new ProgramTag(this); } public override bool Equals(object other) { return this.Equals(other as ProgramTag); } public bool Equals(ProgramTag other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -85915909) % 9) { case 0: return false; case 1: return false; case 2: arg_6D_0 = ((this.Tag != other.Tag) ? -169873818 : -609886302); continue; case 3: arg_6D_0 = ((this.Program != other.Program) ? -1606445536 : -1996343049); continue; case 4: return false; case 5: goto IL_AB; case 6: return true; case 7: goto IL_15; } break; } return true; IL_15: arg_6D_0 = -664128261; goto IL_68; IL_AB: arg_6D_0 = ((other == this) ? -1344875209 : -420741222); goto IL_68; } public override int GetHashCode() { int num = 1; if (this.Program != 0u) { goto IL_5C; } goto IL_92; uint arg_66_0; while (true) { IL_61: uint num2; switch ((num2 = (arg_66_0 ^ 2150241310u)) % 5u) { case 0u: goto IL_5C; case 2u: num ^= this.Program.GetHashCode(); arg_66_0 = (num2 * 1691252235u ^ 1696787676u); continue; case 3u: num ^= this.Tag.GetHashCode(); arg_66_0 = (num2 * 3896796313u ^ 1845315858u); continue; case 4u: goto IL_92; } break; } return num; IL_5C: arg_66_0 = 2342576607u; goto IL_61; IL_92: arg_66_0 = ((this.Tag == 0u) ? 2451890172u : 2355970304u); goto IL_61; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Program != 0u) { goto IL_6F; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 4284759364u)) % 6u) { case 0u: goto IL_6F; case 1u: output.WriteRawTag(21); arg_79_0 = (num * 1992263865u ^ 1743149150u); continue; case 2u: output.WriteRawTag(13); output.WriteFixed32(this.Program); arg_79_0 = (num * 2907452528u ^ 2173175318u); continue; case 4u: goto IL_AC; case 5u: output.WriteFixed32(this.Tag); arg_79_0 = (num * 3614088906u ^ 2853858431u); continue; } break; } return; IL_6F: arg_79_0 = 2368588328u; goto IL_74; IL_AC: arg_79_0 = ((this.Tag == 0u) ? 3969412521u : 2976056953u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_9E: uint arg_7A_0 = 3586728690u; while (true) { uint num2; switch ((num2 = (arg_7A_0 ^ 3978313457u)) % 6u) { case 0u: goto IL_9E; case 1u: num += 5; arg_7A_0 = (num2 * 3201902140u ^ 4191804935u); continue; case 3u: num += 5; arg_7A_0 = (num2 * 4247269375u ^ 4179181994u); continue; case 4u: arg_7A_0 = ((this.Tag != 0u) ? 2832067478u : 4267937827u); continue; case 5u: arg_7A_0 = (((this.Program != 0u) ? 442388859u : 76415454u) ^ num2 * 1060008839u); continue; } return num; } } return num; } public void MergeFrom(ProgramTag other) { if (other == null) { goto IL_6C; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 4216252301u)) % 7u) { case 0u: goto IL_6C; case 1u: this.Tag = other.Tag; arg_76_0 = (num * 2348777924u ^ 792538497u); continue; case 3u: goto IL_AD; case 4u: this.Program = other.Program; arg_76_0 = (num * 2337946798u ^ 1957974584u); continue; case 5u: return; case 6u: arg_76_0 = ((other.Tag == 0u) ? 4182480101u : 4259989476u); continue; } break; } return; IL_6C: arg_76_0 = 3373960532u; goto IL_71; IL_AD: arg_76_0 = ((other.Program == 0u) ? 3193377898u : 2238561778u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_107: uint num; uint arg_C3_0 = ((num = input.ReadTag()) == 0u) ? 3117218342u : 2255363733u; while (true) { uint num2; switch ((num2 = (arg_C3_0 ^ 2929144104u)) % 10u) { case 0u: this.Tag = input.ReadFixed32(); arg_C3_0 = 3942569147u; continue; case 1u: arg_C3_0 = (num2 * 337833901u ^ 875229112u); continue; case 2u: input.SkipLastField(); arg_C3_0 = (num2 * 3084353214u ^ 557774423u); continue; case 3u: arg_C3_0 = (num2 * 1238454162u ^ 1502476157u); continue; case 4u: arg_C3_0 = (((num != 21u) ? 3300005478u : 3868662926u) ^ num2 * 3081583210u); continue; case 5u: arg_C3_0 = ((num == 13u) ? 2399725904u : 3294526732u); continue; case 7u: arg_C3_0 = 2255363733u; continue; case 8u: this.Program = input.ReadFixed32(); arg_C3_0 = 2234669639u; continue; case 9u: goto IL_107; } return; } } } } } <file_sep>/Framework.Network.Packets/Opcode2Attribute.cs using Framework.Constants.Net; using System; namespace Framework.Network.Packets { [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class Opcode2Attribute : Attribute { public ClientMessage Opcode { get; set; } public string WoWBuild { get; set; } public Opcode2Attribute(ClientMessage opcode, string wowBuild) { this.Opcode = opcode; this.WoWBuild = wowBuild; } } } <file_sep>/AuthServer.AuthServer.JsonObjects/Address.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class Address { [DataMember(Name = "ip")] public string Ip { get; set; } [DataMember(Name = "port")] public int Port { get; set; } } } <file_sep>/Bgs.Protocol.Friends.V1/SubscribeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class SubscribeRequest : IMessage<SubscribeRequest>, IEquatable<SubscribeRequest>, IDeepCloneable<SubscribeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SubscribeRequest.__c __9 = new SubscribeRequest.__c(); internal SubscribeRequest cctor>b__29_0() { return new SubscribeRequest(); } } private static readonly MessageParser<SubscribeRequest> _parser = new MessageParser<SubscribeRequest>(new Func<SubscribeRequest>(SubscribeRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int ObjectIdFieldNumber = 2; private ulong objectId_; public static MessageParser<SubscribeRequest> Parser { get { return SubscribeRequest._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return SubscribeRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public ulong ObjectId { get { return this.objectId_; } set { this.objectId_ = value; } } public SubscribeRequest() { } public SubscribeRequest(SubscribeRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.objectId_ = other.objectId_; } public SubscribeRequest Clone() { return new SubscribeRequest(this); } public override bool Equals(object other) { return this.Equals(other as SubscribeRequest); } public bool Equals(SubscribeRequest other) { if (other == null) { goto IL_68; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -767932746) % 9) { case 0: goto IL_68; case 1: arg_72_0 = ((this.ObjectId == other.ObjectId) ? -844865021 : -37511448); continue; case 2: arg_72_0 = (SubscribeRequest.smethod_0(this.AgentId, other.AgentId) ? -2126675638 : -2029675882); continue; case 3: return false; case 5: return true; case 6: goto IL_B0; case 7: return false; case 8: return false; } break; } return true; IL_68: arg_72_0 = -1104389290; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? -561566070 : -1099859703); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_B5: uint arg_91_0 = 254318555u; while (true) { uint num2; switch ((num2 = (arg_91_0 ^ 127725062u)) % 6u) { case 0u: goto IL_B5; case 1u: arg_91_0 = ((this.ObjectId == 0uL) ? 908218046u : 860804914u); continue; case 2u: num ^= this.ObjectId.GetHashCode(); arg_91_0 = (num2 * 563241025u ^ 2757642378u); continue; case 3u: num ^= SubscribeRequest.smethod_1(this.AgentId); arg_91_0 = (num2 * 1619528985u ^ 2412429730u); continue; case 5u: arg_91_0 = (((this.agentId_ == null) ? 3806130951u : 2557538763u) ^ num2 * 4031132772u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_1A; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 2990073722u)) % 6u) { case 0u: output.WriteRawTag(16); output.WriteUInt64(this.ObjectId); arg_79_0 = (num * 3464924077u ^ 3784390207u); continue; case 1u: output.WriteMessage(this.AgentId); arg_79_0 = (num * 2522487963u ^ 537492435u); continue; case 2u: goto IL_AC; case 3u: output.WriteRawTag(10); arg_79_0 = (num * 1509271991u ^ 687069666u); continue; case 4u: goto IL_1A; } break; } return; IL_1A: arg_79_0 = 3510113675u; goto IL_74; IL_AC: arg_79_0 = ((this.ObjectId == 0uL) ? 2414118411u : 3051966718u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 1051643815u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 1576812146u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.ObjectId); arg_92_0 = (num2 * 312372767u ^ 1385872725u); continue; case 2u: arg_92_0 = ((this.ObjectId == 0uL) ? 331369561u : 1318824710u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_92_0 = (num2 * 783139522u ^ 4087739690u); continue; case 4u: goto IL_B6; case 5u: arg_92_0 = (((this.agentId_ == null) ? 2594494480u : 3643665195u) ^ num2 * 1990411992u); continue; } return num; } } return num; } public void MergeFrom(SubscribeRequest other) { if (other == null) { goto IL_18; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 1032384965u)) % 9u) { case 0u: this.ObjectId = other.ObjectId; arg_BC_0 = (num * 2803386881u ^ 1578066571u); continue; case 1u: arg_BC_0 = (((this.agentId_ == null) ? 1462361895u : 643624556u) ^ num * 1261594336u); continue; case 2u: goto IL_FC; case 3u: this.agentId_ = new EntityId(); arg_BC_0 = (num * 3313175982u ^ 462008208u); continue; case 4u: this.AgentId.MergeFrom(other.AgentId); arg_BC_0 = 420667591u; continue; case 5u: arg_BC_0 = ((other.ObjectId != 0uL) ? 2019098587u : 280746133u); continue; case 6u: return; case 8u: goto IL_18; } break; } return; IL_18: arg_BC_0 = 974038732u; goto IL_B7; IL_FC: arg_BC_0 = ((other.agentId_ == null) ? 420667591u : 1483508802u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13A: uint num; uint arg_F2_0 = ((num = input.ReadTag()) == 0u) ? 4261659711u : 2204474475u; while (true) { uint num2; switch ((num2 = (arg_F2_0 ^ 3517126273u)) % 11u) { case 0u: arg_F2_0 = (num2 * 1455483933u ^ 1353165317u); continue; case 1u: this.ObjectId = input.ReadUInt64(); arg_F2_0 = 3708605286u; continue; case 2u: arg_F2_0 = ((num != 10u) ? 4078289788u : 3579663696u); continue; case 3u: input.SkipLastField(); arg_F2_0 = (num2 * 2229875154u ^ 1490325928u); continue; case 4u: goto IL_13A; case 5u: arg_F2_0 = (((num == 16u) ? 791106952u : 901800982u) ^ num2 * 928290872u); continue; case 6u: input.ReadMessage(this.agentId_); arg_F2_0 = 3673757182u; continue; case 7u: arg_F2_0 = 2204474475u; continue; case 8u: this.agentId_ = new EntityId(); arg_F2_0 = (num2 * 1655512653u ^ 965723657u); continue; case 10u: arg_F2_0 = ((this.agentId_ == null) ? 3756717918u : 3488338970u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/Member.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class Member : IMessage<Member>, IEquatable<Member>, IDeepCloneable<Member>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Member.__c __9 = new Member.__c(); internal Member cctor>b__29_0() { return new Member(); } } private static readonly MessageParser<Member> _parser = new MessageParser<Member>(new Func<Member>(Member.__c.__9.<.cctor>b__29_0)); public const int IdentityFieldNumber = 1; private Identity identity_; public const int StateFieldNumber = 2; private MemberState state_; public static MessageParser<Member> Parser { get { return Member._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return Member.Descriptor; } } public Identity Identity { get { return this.identity_; } set { this.identity_ = value; } } public MemberState State { get { return this.state_; } set { this.state_ = value; } } public Member() { } public Member(Member other) : this() { while (true) { IL_44: int arg_2E_0 = -1292787121; while (true) { switch ((arg_2E_0 ^ -1867672256) % 3) { case 0: goto IL_44; case 1: this.Identity = ((other.identity_ != null) ? other.Identity.Clone() : null); arg_2E_0 = -751749821; continue; } goto Block_2; } } Block_2: this.State = ((other.state_ != null) ? other.State.Clone() : null); } public Member Clone() { return new Member(this); } public override bool Equals(object other) { return this.Equals(other as Member); } public bool Equals(Member other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1672701637) % 9) { case 0: return true; case 1: arg_77_0 = (Member.smethod_0(this.State, other.State) ? -1597148277 : -794491784); continue; case 2: arg_77_0 = ((!Member.smethod_0(this.Identity, other.Identity)) ? -1801549910 : -295825536); continue; case 3: goto IL_15; case 4: return false; case 6: return false; case 7: goto IL_B5; case 8: return false; } break; } return true; IL_15: arg_77_0 = -1797148378; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -1415763303 : -296898439); goto IL_72; } public override int GetHashCode() { return 1 ^ Member.smethod_1(this.Identity) ^ Member.smethod_1(this.State); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Identity); while (true) { IL_54: uint arg_3C_0 = 2591616176u; while (true) { uint num; switch ((num = (arg_3C_0 ^ 2375239286u)) % 3u) { case 0u: goto IL_54; case 2u: output.WriteRawTag(18); output.WriteMessage(this.State); arg_3C_0 = (num * 2890775567u ^ 9154466u); continue; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Identity)) + (1 + CodedOutputStream.ComputeMessageSize(this.State)); } public void MergeFrom(Member other) { if (other == null) { goto IL_68; } goto IL_14A; uint arg_102_0; while (true) { IL_FD: uint num; switch ((num = (arg_102_0 ^ 4233549494u)) % 11u) { case 0u: arg_102_0 = (((this.identity_ == null) ? 1209241364u : 1036108649u) ^ num * 1770578249u); continue; case 1u: this.state_ = new MemberState(); arg_102_0 = (num * 3855138120u ^ 2461169924u); continue; case 2u: this.identity_ = new Identity(); arg_102_0 = (num * 656541080u ^ 3012071469u); continue; case 3u: this.State.MergeFrom(other.State); arg_102_0 = 3283414722u; continue; case 5u: this.Identity.MergeFrom(other.Identity); arg_102_0 = 2722307032u; continue; case 6u: goto IL_68; case 7u: return; case 8u: goto IL_14A; case 9u: arg_102_0 = ((other.state_ != null) ? 3899534026u : 3283414722u); continue; case 10u: arg_102_0 = (((this.state_ != null) ? 4218211292u : 3395999845u) ^ num * 1091732704u); continue; } break; } return; IL_68: arg_102_0 = 2605819962u; goto IL_FD; IL_14A: arg_102_0 = ((other.identity_ == null) ? 2722307032u : 3157584386u); goto IL_FD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_183: uint num; uint arg_133_0 = ((num = input.ReadTag()) != 0u) ? 3232522935u : 3974503944u; while (true) { uint num2; switch ((num2 = (arg_133_0 ^ 3821917404u)) % 13u) { case 0u: input.ReadMessage(this.state_); arg_133_0 = 4251405533u; continue; case 1u: this.state_ = new MemberState(); arg_133_0 = (num2 * 981090857u ^ 2366905266u); continue; case 2u: arg_133_0 = 3232522935u; continue; case 4u: arg_133_0 = ((num == 10u) ? 3188101311u : 3113326198u); continue; case 5u: arg_133_0 = ((this.state_ == null) ? 2222359176u : 2556321990u); continue; case 6u: this.identity_ = new Identity(); arg_133_0 = (num2 * 399741641u ^ 152210466u); continue; case 7u: arg_133_0 = (num2 * 443517618u ^ 2118424699u); continue; case 8u: input.SkipLastField(); arg_133_0 = (num2 * 1533029528u ^ 3339867597u); continue; case 9u: arg_133_0 = ((this.identity_ == null) ? 3847584048u : 3347556974u); continue; case 10u: input.ReadMessage(this.identity_); arg_133_0 = 2264248151u; continue; case 11u: goto IL_183; case 12u: arg_133_0 = (((num == 18u) ? 2040702423u : 778131960u) ^ num2 * 411084533u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Connection.V1/DisconnectNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class DisconnectNotification : IMessage<DisconnectNotification>, IEquatable<DisconnectNotification>, IDeepCloneable<DisconnectNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DisconnectNotification.__c __9 = new DisconnectNotification.__c(); internal DisconnectNotification cctor>b__29_0() { return new DisconnectNotification(); } } private static readonly MessageParser<DisconnectNotification> _parser = new MessageParser<DisconnectNotification>(new Func<DisconnectNotification>(DisconnectNotification.__c.__9.<.cctor>b__29_0)); public const int ErrorCodeFieldNumber = 1; private uint errorCode_; public const int ReasonFieldNumber = 2; private string reason_ = ""; public static MessageParser<DisconnectNotification> Parser { get { return DisconnectNotification._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[9]; } } MessageDescriptor IMessage.Descriptor { get { return DisconnectNotification.Descriptor; } } public uint ErrorCode { get { return this.errorCode_; } set { this.errorCode_ = value; } } public string Reason { get { return this.reason_; } set { this.reason_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public DisconnectNotification() { } public DisconnectNotification(DisconnectNotification other) : this() { this.errorCode_ = other.errorCode_; this.reason_ = other.reason_; } public DisconnectNotification Clone() { return new DisconnectNotification(this); } public override bool Equals(object other) { return this.Equals(other as DisconnectNotification); } public bool Equals(DisconnectNotification other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1962082648) % 9) { case 0: arg_72_0 = (DisconnectNotification.smethod_0(this.Reason, other.Reason) ? 1193456763 : 1985649246); continue; case 1: return true; case 3: arg_72_0 = ((this.ErrorCode != other.ErrorCode) ? 491538400 : 587253656); continue; case 4: return false; case 5: return false; case 6: goto IL_B0; case 7: return false; case 8: goto IL_15; } break; } return true; IL_15: arg_72_0 = 1053876395; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 1022963011 : 1330329338); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_95: uint arg_75_0 = 270620356u; while (true) { uint num2; switch ((num2 = (arg_75_0 ^ 682722254u)) % 5u) { case 0u: arg_75_0 = (((this.Reason.Length == 0) ? 2125452037u : 1981747327u) ^ num2 * 443203998u); continue; case 1u: num ^= this.Reason.GetHashCode(); arg_75_0 = (num2 * 2548730569u ^ 1645213132u); continue; case 3u: num ^= this.ErrorCode.GetHashCode(); arg_75_0 = (num2 * 2074297616u ^ 134810843u); continue; case 4u: goto IL_95; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_9B: uint arg_7B_0 = 1120006891u; while (true) { uint num; switch ((num = (arg_7B_0 ^ 1800966462u)) % 5u) { case 0u: arg_7B_0 = (((DisconnectNotification.smethod_1(this.Reason) == 0) ? 114186832u : 1626263313u) ^ num * 4275512467u); continue; case 1u: output.WriteUInt32(this.ErrorCode); arg_7B_0 = (num * 4027297186u ^ 3135366442u); continue; case 2u: goto IL_9B; case 3u: output.WriteRawTag(18); output.WriteString(this.Reason); arg_7B_0 = (num * 1154006875u ^ 1113089309u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_80: uint arg_64_0 = 666374123u; while (true) { uint num2; switch ((num2 = (arg_64_0 ^ 1896924473u)) % 4u) { case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Reason); arg_64_0 = (num2 * 2669438851u ^ 4188596162u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ErrorCode); arg_64_0 = (((DisconnectNotification.smethod_1(this.Reason) != 0) ? 236975560u : 459307745u) ^ num2 * 2795989196u); continue; case 3u: goto IL_80; } return num; } } return num; } public void MergeFrom(DisconnectNotification other) { if (other == null) { goto IL_71; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 1074202343u)) % 7u) { case 0u: goto IL_71; case 1u: arg_7B_0 = ((DisconnectNotification.smethod_1(other.Reason) == 0) ? 2133840753u : 889196001u); continue; case 2u: this.ErrorCode = other.ErrorCode; arg_7B_0 = (num * 2898430631u ^ 588046206u); continue; case 3u: goto IL_B2; case 5u: return; case 6u: this.Reason = other.Reason; arg_7B_0 = (num * 4213298707u ^ 2678916611u); continue; } break; } return; IL_71: arg_7B_0 = 902649751u; goto IL_76; IL_B2: arg_7B_0 = ((other.ErrorCode == 0u) ? 400785972u : 1211991361u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_103: uint num; uint arg_BF_0 = ((num = input.ReadTag()) != 0u) ? 3974100276u : 4155532086u; while (true) { uint num2; switch ((num2 = (arg_BF_0 ^ 3294309292u)) % 10u) { case 0u: arg_BF_0 = 3974100276u; continue; case 1u: arg_BF_0 = (num2 * 110414325u ^ 2354991898u); continue; case 3u: goto IL_103; case 4u: arg_BF_0 = (num2 * 2812740999u ^ 4043488643u); continue; case 5u: this.Reason = input.ReadString(); arg_BF_0 = 2841963811u; continue; case 6u: arg_BF_0 = ((num == 8u) ? 2883768193u : 3012595781u); continue; case 7u: arg_BF_0 = (((num != 18u) ? 2714126970u : 3496400841u) ^ num2 * 3615887382u); continue; case 8u: input.SkipLastField(); arg_BF_0 = (num2 * 2285086398u ^ 2088334764u); continue; case 9u: this.ErrorCode = input.ReadUInt32(); arg_BF_0 = 2867891993u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.WorldServer.Game.Packets.PacketHandler/VehicleHandler.cs using AuthServer.Network; using Framework.Constants.Net; using Framework.Network.Packets; using System; namespace AuthServer.WorldServer.Game.Packets.PacketHandler { internal class VehicleHandler { [Opcode(ClientMessage.CastSpell, "21796")] public static void HandleCastSpell(ref PacketReader packet, WorldClass session) { } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeExternalResult.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeExternalResult : IMessage<ChallengeExternalResult>, IEquatable<ChallengeExternalResult>, IDeepCloneable<ChallengeExternalResult>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeExternalResult.__c __9 = new ChallengeExternalResult.__c(); internal ChallengeExternalResult cctor>b__29_0() { return new ChallengeExternalResult(); } } private static readonly MessageParser<ChallengeExternalResult> _parser = new MessageParser<ChallengeExternalResult>(new Func<ChallengeExternalResult>(ChallengeExternalResult.__c.__9.<.cctor>b__29_0)); public const int RequestTokenFieldNumber = 1; private string requestToken_ = ""; public const int PassedFieldNumber = 2; private bool passed_; public static MessageParser<ChallengeExternalResult> Parser { get { return ChallengeExternalResult._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeExternalResult.Descriptor; } } public string RequestToken { get { return this.requestToken_; } set { this.requestToken_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool Passed { get { return this.passed_; } set { this.passed_ = value; } } public ChallengeExternalResult() { } public ChallengeExternalResult(ChallengeExternalResult other) : this() { this.requestToken_ = other.requestToken_; this.passed_ = other.passed_; } public ChallengeExternalResult Clone() { return new ChallengeExternalResult(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeExternalResult); } public bool Equals(ChallengeExternalResult other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1736779809) % 9) { case 0: arg_72_0 = ((this.Passed == other.Passed) ? 631195009 : 100968951); continue; case 1: return true; case 2: return false; case 3: return false; case 4: arg_72_0 = (ChallengeExternalResult.smethod_0(this.RequestToken, other.RequestToken) ? 1517230309 : 1772593890); continue; case 5: goto IL_15; case 6: goto IL_B0; case 8: return false; } break; } return true; IL_15: arg_72_0 = 1551251772; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 414656068 : 100006971); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_BA: uint arg_96_0 = 1867990815u; while (true) { uint num2; switch ((num2 = (arg_96_0 ^ 1209707900u)) % 6u) { case 0u: goto IL_BA; case 1u: num ^= ChallengeExternalResult.smethod_2(this.RequestToken); arg_96_0 = (num2 * 3491061128u ^ 301417564u); continue; case 2u: arg_96_0 = ((!this.Passed) ? 27374356u : 1953295109u); continue; case 3u: num ^= this.Passed.GetHashCode(); arg_96_0 = (num2 * 110587716u ^ 3204029488u); continue; case 5u: arg_96_0 = (((ChallengeExternalResult.smethod_1(this.RequestToken) == 0) ? 434395157u : 1635059252u) ^ num2 * 426999243u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (ChallengeExternalResult.smethod_1(this.RequestToken) != 0) { goto IL_83; } goto IL_C4; uint arg_8D_0; while (true) { IL_88: uint num; switch ((num = (arg_8D_0 ^ 3700803820u)) % 7u) { case 0u: goto IL_83; case 1u: goto IL_C4; case 2u: output.WriteRawTag(10); arg_8D_0 = (num * 2630738541u ^ 3729658465u); continue; case 3u: output.WriteBool(this.Passed); arg_8D_0 = (num * 4229154226u ^ 3864909939u); continue; case 4u: output.WriteString(this.RequestToken); arg_8D_0 = (num * 1021619704u ^ 2435020358u); continue; case 5u: output.WriteRawTag(16); arg_8D_0 = (num * 2739174128u ^ 1063777147u); continue; } break; } return; IL_83: arg_8D_0 = 3819463126u; goto IL_88; IL_C4: arg_8D_0 = ((!this.Passed) ? 3324826797u : 2284290451u); goto IL_88; } public int CalculateSize() { int num = 0; if (ChallengeExternalResult.smethod_1(this.RequestToken) != 0) { goto IL_50; } goto IL_86; uint arg_5A_0; while (true) { IL_55: uint num2; switch ((num2 = (arg_5A_0 ^ 2612068117u)) % 5u) { case 0u: goto IL_50; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.RequestToken); arg_5A_0 = (num2 * 150773621u ^ 944416126u); continue; case 3u: num += 2; arg_5A_0 = (num2 * 907853986u ^ 677217055u); continue; case 4u: goto IL_86; } break; } return num; IL_50: arg_5A_0 = 3328291943u; goto IL_55; IL_86: arg_5A_0 = (this.Passed ? 4151618712u : 3691977765u); goto IL_55; } public void MergeFrom(ChallengeExternalResult other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 2047171486u)) % 7u) { case 0u: goto IL_AD; case 1u: arg_76_0 = (other.Passed ? 1672600061u : 1172567497u); continue; case 2u: this.RequestToken = other.RequestToken; arg_76_0 = (num * 3515561671u ^ 1258290283u); continue; case 3u: this.Passed = other.Passed; arg_76_0 = (num * 532902980u ^ 2828241797u); continue; case 5u: goto IL_15; case 6u: return; } break; } return; IL_15: arg_76_0 = 250113534u; goto IL_71; IL_AD: arg_76_0 = ((ChallengeExternalResult.smethod_1(other.RequestToken) == 0) ? 1171983891u : 178059862u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_104: uint num; uint arg_C0_0 = ((num = input.ReadTag()) != 0u) ? 3794272228u : 3471296918u; while (true) { uint num2; switch ((num2 = (arg_C0_0 ^ 3710357137u)) % 10u) { case 0u: arg_C0_0 = (num2 * 2335262239u ^ 1685367487u); continue; case 1u: this.RequestToken = input.ReadString(); arg_C0_0 = 4170483315u; continue; case 2u: input.SkipLastField(); arg_C0_0 = (num2 * 3540358583u ^ 2490817279u); continue; case 3u: arg_C0_0 = ((num != 10u) ? 2528659538u : 2547324822u); continue; case 4u: goto IL_104; case 5u: this.Passed = input.ReadBool(); arg_C0_0 = 2317972961u; continue; case 6u: arg_C0_0 = (num2 * 2981683289u ^ 2122691441u); continue; case 7u: arg_C0_0 = (((num == 16u) ? 2960526226u : 2876125189u) ^ num2 * 90949922u); continue; case 8u: arg_C0_0 = 3794272228u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.WorldEntities/PlayerSpellState.cs using System; using System.Runtime.Serialization; namespace AuthServer.Game.WorldEntities { [DataContract] [Serializable] public enum PlayerSpellState { Unchanged, Changed, New, Removed, Temporary } } <file_sep>/AuthServer.WorldServer.Game.Packets.PacketHandler/AddonHandler.cs using AuthServer.Network; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Network.Packets; using System; using System.IO; using System.Runtime.CompilerServices; namespace AuthServer.WorldServer.Game.Packets.PacketHandler { public class AddonHandler { private static byte[] addonPublicKey; private static byte[] pubKeyOrder; public static void HandleAddonInfo(byte[] addonData, WorldClass session, WorldClass2 session2) { PacketWriter packetWriter = new PacketWriter(ServerMessage.AddonInfo, true); while (true) { IL_372: uint arg_304_0 = 1809991266u; while (true) { uint num; switch ((num = (arg_304_0 ^ 465668698u)) % 24u) { case 0u: { bool flag; Log.Message(LogType.Debug, Module.smethod_34<string>(1433819748u), new object[] { flag }); uint num2; Log.Message(LogType.Debug, Module.smethod_35<string>(3521479446u), new object[] { num2 }); arg_304_0 = (num * 3803766880u ^ 310157591u); continue; } case 1u: { bool flag; BitPack bitPack; bitPack.Write<bool>(flag); bitPack.Write<bool>(true); arg_304_0 = (num * 2564976232u ^ 4098056120u); continue; } case 2u: session2.Send(ref packetWriter); arg_304_0 = (num * 854072662u ^ 909947967u); continue; case 3u: AddonHandler.smethod_0(packetWriter, AddonHandler.addonPublicKey); arg_304_0 = 1787484475u; continue; case 4u: session.Send(ref packetWriter); arg_304_0 = 1721024912u; continue; case 5u: { packetWriter.WriteInt32(0); int num3 = 0; arg_304_0 = (num * 2826608521u ^ 4236980803u); continue; } case 6u: { bool flag = true; arg_304_0 = (num * 3186595720u ^ 2676385765u); continue; } case 7u: { PacketReader packetReader; uint num2 = packetReader.Read<uint>(); arg_304_0 = (num * 4197325555u ^ 895042553u); continue; } case 8u: { BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); PacketReader packetReader = new PacketReader(addonData, false, true); int num4 = packetReader.Read<int>(); arg_304_0 = (num * 2378964428u ^ 2574027569u); continue; } case 9u: return; case 11u: packetWriter.WriteUInt32(0u); arg_304_0 = (num * 3130896976u ^ 2394918073u); continue; case 12u: { int num3; int num4; arg_304_0 = ((num3 >= num4) ? 1751666612u : 1552554250u); continue; } case 13u: { uint num5; Log.Message(LogType.Debug, Module.smethod_35<string>(3521479446u), new object[] { num5 }); packetWriter.WriteUInt8(2); arg_304_0 = (num * 2886261538u ^ 754012465u); continue; } case 14u: arg_304_0 = (((session2 != null) ? 3483294810u : 2624109236u) ^ num * 2840857279u); continue; case 15u: packetWriter.WriteUInt8(1); arg_304_0 = (num * 396774567u ^ 3621888192u); continue; case 16u: { PacketReader packetReader; string text = packetReader.ReadCString(); bool flag = !packetReader.Read<bool>(); arg_304_0 = 37866661u; continue; } case 17u: { int num3; num3++; arg_304_0 = (num * 2650975885u ^ 450296731u); continue; } case 18u: { BitPack bitPack; bitPack.Write<bool>(false); arg_304_0 = (num * 4029069879u ^ 4124995232u); continue; } case 19u: { int num4; packetWriter.WriteInt32(num4); arg_304_0 = (num * 3154899402u ^ 71122105u); continue; } case 20u: { BitPack bitPack; bitPack.Flush(); bool flag; arg_304_0 = ((flag ? 488058857u : 1913203301u) ^ num * 1804616717u); continue; } case 21u: goto IL_372; case 22u: { PacketReader packetReader; uint num5 = packetReader.Read<uint>(); bool flag; arg_304_0 = ((flag ? 1009495839u : 1036313990u) ^ num * 1645478371u); continue; } case 23u: { string text; Log.Message(LogType.Debug, Module.smethod_35<string>(877436003u), new object[] { text }); arg_304_0 = 1826827818u; continue; } } goto Block_5; } } Block_5:; } static AddonHandler() { // Note: this type is marked as 'beforefieldinit'. byte[] expr_0A = new byte[256]; AddonHandler.smethod_1(expr_0A, fieldof(<PrivateImplementationDetails>.C4102E2A032C6E4B4298689D7A09DB08D3D808FA).FieldHandle); AddonHandler.addonPublicKey = expr_0A; byte[] expr_24 = new byte[256]; AddonHandler.smethod_1(expr_24, fieldof(<PrivateImplementationDetails>.struct11_0).FieldHandle); AddonHandler.pubKeyOrder = expr_24; } static void smethod_0(BinaryWriter binaryWriter_0, byte[] byte_0) { binaryWriter_0.Write(byte_0); } static void smethod_1(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } } } <file_sep>/Arctium_WoW_ClientDB_Viewer.IO/LalTypes.cs using System; using System.Collections.Generic; namespace Arctium_WoW_ClientDB_Viewer.IO { internal class LalTypes { public class LalGroup { public string Name { get; set; } public int Count { get; set; } public Dictionary<string, LalField> Fields { get; set; } } public class LalList { public Dictionary<string, LalField> Fields { get; set; } public List<Dictionary<string, LalField>> Values { get; set; } public LalList() { this.Fieldsk__BackingField = new Dictionary<string, LalField>(); this.Valuesk__BackingField = new List<Dictionary<string, LalField>>(); base..ctor(); } } public class Bit { public int Count { get; set; } public int Value { get; set; } } } } <file_sep>/Google.Protobuf.WellKnownTypes/ListValue.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class ListValue : IMessage<ListValue>, IEquatable<ListValue>, IDeepCloneable<ListValue>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ListValue.__c __9 = new ListValue.__c(); internal ListValue cctor>b__24_0() { return new ListValue(); } } private static readonly MessageParser<ListValue> _parser = new MessageParser<ListValue>(new Func<ListValue>(ListValue.__c.__9.<.cctor>b__24_0)); public const int ValuesFieldNumber = 1; private static readonly FieldCodec<Value> _repeated_values_codec; private readonly RepeatedField<Value> values_ = new RepeatedField<Value>(); public static MessageParser<ListValue> Parser { get { return ListValue._parser; } } public static MessageDescriptor Descriptor { get { return StructReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ListValue.Descriptor; } } public RepeatedField<Value> Values { get { return this.values_; } } public ListValue() { } public ListValue(ListValue other) : this() { this.values_ = other.values_.Clone(); } public ListValue Clone() { return new ListValue(this); } public override bool Equals(object other) { return this.Equals(other as ListValue); } public bool Equals(ListValue other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1100707998) % 7) { case 0: return false; case 2: goto IL_3E; case 3: return true; case 4: return false; case 5: goto IL_7A; case 6: arg_48_0 = ((!this.values_.Equals(other.values_)) ? -685558879 : -1933748675); continue; } break; } return true; IL_3E: arg_48_0 = -2117391217; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -2086324249 : -1862265693); goto IL_43; } public override int GetHashCode() { return 1 ^ ListValue.smethod_0(this.values_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.values_.WriteTo(output, ListValue._repeated_values_codec); } public int CalculateSize() { return 0 + this.values_.CalculateSize(ListValue._repeated_values_codec); } public void MergeFrom(ListValue other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 964395865; IL_08: switch ((arg_0D_0 ^ 1561758888) % 4) { case 1: return; case 2: IL_27: this.values_.Add(other.values_); arg_0D_0 = 106197376; goto IL_08; case 3: goto IL_03; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) == 0u) ? 1669581523u : 1014981123u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 509924749u)) % 6u) { case 0u: arg_68_0 = 1014981123u; continue; case 1u: this.values_.AddEntriesFrom(input, ListValue._repeated_values_codec); arg_68_0 = 1687690660u; continue; case 2u: arg_68_0 = ((num != 10u) ? 1223323390u : 502915878u); continue; case 3u: goto IL_9B; case 5u: input.SkipLastField(); arg_68_0 = (num2 * 3691145874u ^ 2775750706u); continue; } return; } } } static ListValue() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 1697726623u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 1568696848u)) % 3u) { case 1u: ListValue._repeated_values_codec = FieldCodec.ForMessage<Value>(10u, Value.Parser); arg_3F_0 = (num * 1159609478u ^ 3885751130u); continue; case 2u: goto IL_57; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.Managers/SkillManager.cs using Framework.Misc; using System; namespace AuthServer.Game.Managers { public class SkillManager : Singleton<SkillManager> { private SkillManager() { } } } <file_sep>/Bgs.Protocol.Friends.V1/FriendInvitation.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class FriendInvitation : IMessage<FriendInvitation>, IEquatable<FriendInvitation>, IDeepCloneable<FriendInvitation>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FriendInvitation.__c __9 = new FriendInvitation.__c(); internal FriendInvitation cctor>b__34_0() { return new FriendInvitation(); } } private static readonly MessageParser<FriendInvitation> _parser = new MessageParser<FriendInvitation>(new Func<FriendInvitation>(FriendInvitation.__c.__9.<.cctor>b__34_0)); public const int FirstReceivedFieldNumber = 1; private bool firstReceived_; public const int RoleFieldNumber = 2; private static readonly FieldCodec<uint> _repeated_role_codec = FieldCodec.ForUInt32(18u); private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public const int FriendInvitation_FieldNumber = 103; private FriendInvitation friendInvitation_; public static MessageParser<FriendInvitation> Parser { get { return FriendInvitation._parser; } } public static MessageDescriptor Descriptor { get { return FriendsTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return FriendInvitation.Descriptor; } } public bool FirstReceived { get { return this.firstReceived_; } set { this.firstReceived_ = value; } } public RepeatedField<uint> Role { get { return this.role_; } } public FriendInvitation FriendInvitation_ { get { return this.friendInvitation_; } set { this.friendInvitation_ = value; } } public FriendInvitation() { } public FriendInvitation(FriendInvitation other) : this() { while (true) { IL_61: int arg_4B_0 = 1669000918; while (true) { switch ((arg_4B_0 ^ 1170294040) % 3) { case 0: goto IL_61; case 2: this.firstReceived_ = other.firstReceived_; this.role_ = other.role_.Clone(); this.FriendInvitation_ = ((other.friendInvitation_ != null) ? other.FriendInvitation_.Clone() : null); arg_4B_0 = 1771125270; continue; } return; } } } public FriendInvitation Clone() { return new FriendInvitation(this); } public override bool Equals(object other) { return this.Equals(other as FriendInvitation); } public bool Equals(FriendInvitation other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ 239496334) % 11) { case 0: goto IL_9A; case 1: arg_A4_0 = ((this.FirstReceived == other.FirstReceived) ? 1131789002 : 621970087); continue; case 3: arg_A4_0 = (this.role_.Equals(other.role_) ? 948130717 : 1368288528); continue; case 4: goto IL_EA; case 5: return false; case 6: return false; case 7: arg_A4_0 = ((!FriendInvitation.smethod_0(this.FriendInvitation_, other.FriendInvitation_)) ? 1954859973 : 1604954946); continue; case 8: return true; case 9: return false; case 10: return false; } break; } return true; IL_9A: arg_A4_0 = 753390908; goto IL_9F; IL_EA: arg_A4_0 = ((other != this) ? 1786984153 : 445048434); goto IL_9F; } public override int GetHashCode() { int num = 1; while (true) { IL_C3: uint arg_9F_0 = 2095757028u; while (true) { uint num2; switch ((num2 = (arg_9F_0 ^ 1575433419u)) % 6u) { case 1u: arg_9F_0 = ((this.FirstReceived ? 707697101u : 468163296u) ^ num2 * 2092360649u); continue; case 2u: num ^= this.role_.GetHashCode(); arg_9F_0 = ((this.friendInvitation_ != null) ? 808314425u : 1515959211u); continue; case 3u: num ^= this.FirstReceived.GetHashCode(); arg_9F_0 = (num2 * 1178450339u ^ 1421192004u); continue; case 4u: num ^= this.FriendInvitation_.GetHashCode(); arg_9F_0 = (num2 * 722093846u ^ 3375926631u); continue; case 5u: goto IL_C3; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.FirstReceived) { goto IL_63; } goto IL_9C; uint arg_6D_0; while (true) { IL_68: uint num; switch ((num = (arg_6D_0 ^ 4201556848u)) % 5u) { case 0u: goto IL_63; case 1u: output.WriteRawTag(8); output.WriteBool(this.FirstReceived); arg_6D_0 = (num * 1870936425u ^ 1485359356u); continue; case 2u: output.WriteRawTag(186, 6); output.WriteMessage(this.FriendInvitation_); arg_6D_0 = (num * 964747635u ^ 1461788831u); continue; case 4u: goto IL_9C; } break; } return; IL_63: arg_6D_0 = 4130405580u; goto IL_68; IL_9C: this.role_.WriteTo(output, FriendInvitation._repeated_role_codec); arg_6D_0 = ((this.friendInvitation_ == null) ? 3784549820u : 2407500513u); goto IL_68; } public int CalculateSize() { int num = 0; while (true) { IL_D0: uint arg_A8_0 = 3293345480u; while (true) { uint num2; switch ((num2 = (arg_A8_0 ^ 2917676657u)) % 7u) { case 0u: num += 2; arg_A8_0 = (num2 * 3578033293u ^ 1996193491u); continue; case 1u: num += 2 + CodedOutputStream.ComputeMessageSize(this.FriendInvitation_); arg_A8_0 = (num2 * 3200268936u ^ 3683254000u); continue; case 2u: goto IL_D0; case 4u: arg_A8_0 = (((this.friendInvitation_ != null) ? 3997704028u : 4238073474u) ^ num2 * 108284730u); continue; case 5u: num += this.role_.CalculateSize(FriendInvitation._repeated_role_codec); arg_A8_0 = 3210161432u; continue; case 6u: arg_A8_0 = ((this.FirstReceived ? 2520084096u : 2964496766u) ^ num2 * 3573503334u); continue; } return num; } } return num; } public void MergeFrom(FriendInvitation other) { if (other == null) { goto IL_33; } goto IL_126; uint arg_E2_0; while (true) { IL_DD: uint num; switch ((num = (arg_E2_0 ^ 4199841859u)) % 10u) { case 0u: arg_E2_0 = (((this.friendInvitation_ == null) ? 3480631615u : 3287593266u) ^ num * 2615713541u); continue; case 1u: this.role_.Add(other.role_); arg_E2_0 = 2326293901u; continue; case 2u: arg_E2_0 = (((other.friendInvitation_ == null) ? 940321829u : 1244411821u) ^ num * 4100903140u); continue; case 3u: this.FirstReceived = other.FirstReceived; arg_E2_0 = (num * 3670462211u ^ 3386672925u); continue; case 4u: return; case 5u: goto IL_126; case 6u: this.friendInvitation_ = new FriendInvitation(); arg_E2_0 = (num * 84338464u ^ 1193638300u); continue; case 7u: goto IL_33; case 9u: this.FriendInvitation_.MergeFrom(other.FriendInvitation_); arg_E2_0 = 2431846237u; continue; } break; } return; IL_33: arg_E2_0 = 3125889203u; goto IL_DD; IL_126: arg_E2_0 = (other.FirstReceived ? 3750038842u : 2444490870u); goto IL_DD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1FB: uint num; uint arg_19B_0 = ((num = input.ReadTag()) == 0u) ? 1481557437u : 42918632u; while (true) { uint num2; switch ((num2 = (arg_19B_0 ^ 1928913103u)) % 17u) { case 0u: input.SkipLastField(); arg_19B_0 = 1084420749u; continue; case 2u: input.ReadMessage(this.friendInvitation_); arg_19B_0 = 1146898745u; continue; case 3u: arg_19B_0 = (num2 * 191714023u ^ 2707805367u); continue; case 4u: goto IL_1FB; case 5u: arg_19B_0 = (((num != 16u) ? 465674371u : 165991240u) ^ num2 * 1848516133u); continue; case 6u: this.friendInvitation_ = new FriendInvitation(); arg_19B_0 = (num2 * 4134036817u ^ 3437459504u); continue; case 7u: arg_19B_0 = (num2 * 240959498u ^ 1267401087u); continue; case 8u: arg_19B_0 = 42918632u; continue; case 9u: arg_19B_0 = ((this.friendInvitation_ != null) ? 1218101416u : 880445911u); continue; case 10u: arg_19B_0 = (((num == 826u) ? 1622134197u : 1967024079u) ^ num2 * 2426276401u); continue; case 11u: this.FirstReceived = input.ReadBool(); arg_19B_0 = 2056705224u; continue; case 12u: arg_19B_0 = (num2 * 3027514116u ^ 295646737u); continue; case 13u: arg_19B_0 = (((num != 8u) ? 4067874630u : 3616660314u) ^ num2 * 4072922565u); continue; case 14u: arg_19B_0 = ((num != 18u) ? 804590421u : 2040414637u); continue; case 15u: this.role_.AddEntriesFrom(input, FriendInvitation._repeated_role_codec); arg_19B_0 = 1146898745u; continue; case 16u: arg_19B_0 = ((num > 16u) ? 10077620u : 10655079u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } } } <file_sep>/Bgs.Protocol.Friends.V1/FriendsTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public static class FriendsTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return FriendsTypesReflection.descriptor; } } static FriendsTypesReflection() { FriendsTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(FriendsTypesReflection.smethod_1(FriendsTypesReflection.smethod_0(new string[] { Module.smethod_36<string>(686357540u), Module.smethod_35<string>(1452615540u), Module.smethod_34<string>(435782033u), Module.smethod_36<string>(1855577796u), Module.smethod_36<string>(674618004u), Module.smethod_36<string>(3406711780u), Module.smethod_36<string>(1843838260u), Module.smethod_33<string>(1456042981u), Module.smethod_34<string>(2516704903u), Module.smethod_35<string>(2809819748u), Module.smethod_34<string>(1766812007u), Module.smethod_37<string>(3710806448u), Module.smethod_33<string>(4216790773u), Module.smethod_34<string>(1391865559u), Module.smethod_35<string>(2152298804u), Module.smethod_34<string>(641972663u), Module.smethod_36<string>(3013058516u), Module.smethod_33<string>(23916485u), Module.smethod_36<string>(4182278772u), Module.smethod_35<string>(3159661380u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, InvitationTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(FriendsTypesReflection.smethod_2(typeof(Friend).TypeHandle), Friend.Parser, new string[] { Module.smethod_35<string>(915065219u), Module.smethod_36<string>(3548343828u), Module.smethod_36<string>(1553402902u), Module.smethod_34<string>(346621587u), Module.smethod_35<string>(2739738094u), Module.smethod_37<string>(1110425234u), Module.smethod_34<string>(27976939u) }, null, null, null), new GeneratedCodeInfo(FriendsTypesReflection.smethod_2(typeof(FriendInvitation).TypeHandle), FriendInvitation.Parser, new string[] { Module.smethod_34<string>(2052391638u), Module.smethod_33<string>(789209099u), Module.smethod_33<string>(1091251547u) }, null, null, null), new GeneratedCodeInfo(FriendsTypesReflection.smethod_2(typeof(FriendInvitationParams).TypeHandle), FriendInvitationParams.Parser, new string[] { Module.smethod_33<string>(1743153617u), Module.smethod_33<string>(1883682078u), Module.smethod_37<string>(700822184u), Module.smethod_33<string>(2721006722u), Module.smethod_33<string>(4133461207u), Module.smethod_36<string>(1553402902u), Module.smethod_35<string>(3874154268u), Module.smethod_34<string>(3684323920u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Constants.Authentication/AuthResult.cs using System; namespace Framework.Constants.Authentication { public enum AuthResult : byte { GlobalSuccess, BadLoginInformation = 104, InvalidProgram = 109, InvalidPlatform, InvalidLocale, InvalidGameVersion, AlreadyLoggedIn = 205 } } <file_sep>/Google.Protobuf.WellKnownTypes/DoubleValue.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class DoubleValue : IMessage<DoubleValue>, IEquatable<DoubleValue>, IDeepCloneable<DoubleValue>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DoubleValue.__c __9 = new DoubleValue.__c(); internal DoubleValue cctor>b__24_0() { return new DoubleValue(); } } private static readonly MessageParser<DoubleValue> _parser = new MessageParser<DoubleValue>(new Func<DoubleValue>(DoubleValue.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private double value_; public static MessageParser<DoubleValue> Parser { get { return DoubleValue._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return DoubleValue.Descriptor; } } public double Value { get { return this.value_; } set { this.value_ = value; } } public DoubleValue() { } public DoubleValue(DoubleValue other) : this() { while (true) { IL_3E: uint arg_26_0 = 48172625u; while (true) { uint num; switch ((num = (arg_26_0 ^ 380464856u)) % 3u) { case 1u: this.value_ = other.value_; arg_26_0 = (num * 2278192809u ^ 3307742096u); continue; case 2u: goto IL_3E; } return; } } } public DoubleValue Clone() { return new DoubleValue(this); } public override bool Equals(object other) { return this.Equals(other as DoubleValue); } public bool Equals(DoubleValue other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 483590106) % 7) { case 0: arg_43_0 = ((this.Value == other.Value) ? 2014721059 : 2082864806); continue; case 1: goto IL_75; case 2: return false; case 3: return true; case 4: return false; case 5: goto IL_12; } break; } return true; IL_12: arg_43_0 = 1917965878; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? 1446728904 : 556084107); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_75: uint arg_59_0 = 1522342965u; while (true) { uint num2; switch ((num2 = (arg_59_0 ^ 160217918u)) % 4u) { case 0u: goto IL_75; case 1u: num ^= this.Value.GetHashCode(); arg_59_0 = (num2 * 2310797616u ^ 1464086320u); continue; case 3u: arg_59_0 = (((this.Value == 0.0) ? 3796185736u : 3635792463u) ^ num2 * 1376322328u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value != 0.0) { while (true) { IL_64: uint arg_48_0 = 1329153961u; while (true) { uint num; switch ((num = (arg_48_0 ^ 796802158u)) % 4u) { case 0u: goto IL_64; case 1u: output.WriteDouble(this.Value); arg_48_0 = (num * 2883265639u ^ 933437999u); continue; case 3u: output.WriteRawTag(9); arg_48_0 = (num * 2731574727u ^ 1833438334u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_69: uint arg_4D_0 = 997792255u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 1247449349u)) % 4u) { case 0u: goto IL_69; case 2u: arg_4D_0 = (((this.Value != 0.0) ? 4221771738u : 2627344140u) ^ num2 * 3859031916u); continue; case 3u: num += 9; arg_4D_0 = (num2 * 4122098634u ^ 833233586u); continue; } return num; } } return num; } public void MergeFrom(DoubleValue other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1171860348u)) % 5u) { case 0u: this.Value = other.Value; arg_37_0 = (num * 775242876u ^ 1555530578u); continue; case 1u: goto IL_63; case 2u: return; case 4u: goto IL_12; } break; } return; IL_12: arg_37_0 = 1613566495u; goto IL_32; IL_63: arg_37_0 = ((other.Value == 0.0) ? 421661698u : 474519248u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_96: uint num; uint arg_63_0 = ((num = input.ReadTag()) == 0u) ? 3886970757u : 2318846320u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 2444209093u)) % 6u) { case 0u: input.SkipLastField(); arg_63_0 = (num2 * 3228265537u ^ 3792805188u); continue; case 1u: goto IL_96; case 2u: arg_63_0 = 2318846320u; continue; case 3u: arg_63_0 = ((num != 9u) ? 2376670895u : 3775468028u); continue; case 5u: this.Value = input.ReadDouble(); arg_63_0 = 2811976366u; continue; } return; } } } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/SpellHandler.cs using AuthServer.Game.Entities; using AuthServer.Game.WorldEntities; using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants.Net; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; namespace AuthServer.Game.Packets.PacketHandler { public class SpellHandler : Manager { public static int activeSpell; public static void HandleSendKnownSpells(ref WorldClass session) { Character expr_0D = session.Character; int count = expr_0D.SpellList.Count; PacketWriter writer = new PacketWriter(ServerMessage.SendKnownSpells, true); BitPack expr_59 = new BitPack(writer, 0uL, 0uL, 0uL, 0uL); expr_59.Write<int>(1); expr_59.Flush(); writer.WriteInt32(count + Manager.WorldMgr.MountSpells.Count); writer.WriteInt32(0); expr_0D.SpellList.ForEach(delegate(PlayerSpell spell) { writer.WriteUInt32(spell.SpellId); }); using (Dictionary<string, Tuple<uint, uint>>.Enumerator enumerator = Manager.WorldMgr.MountSpells.GetEnumerator()) { while (true) { IL_119: int arg_F3_0 = (!enumerator.MoveNext()) ? 1173552564 : 1226217017; while (true) { switch ((arg_F3_0 ^ 1858704064) % 4) { case 1: { KeyValuePair<string, Tuple<uint, uint>> current = enumerator.Current; writer.WriteUInt32(current.Value.Item2); arg_F3_0 = 665194343; continue; } case 2: arg_F3_0 = 1226217017; continue; case 3: goto IL_119; } goto Block_3; } } Block_3:; } session.Send(ref writer); } [Opcode2(ClientMessage.CancelAura, "17930")] public static void HandleCancelAura(ref PacketReader packet, WorldClass2 session) { packet.Read<int>(); while (true) { IL_A4: uint arg_80_0 = 1946445704u; while (true) { uint num; switch ((num = (arg_80_0 ^ 148890857u)) % 6u) { case 0u: { WorldClass session2; SpellHandler.AuraUpdate(session2, 0u); arg_80_0 = (num * 714797375u ^ 3424544470u); continue; } case 1u: { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_80_0 = (num * 537338206u ^ 3231834507u); continue; } case 2u: goto IL_A4; case 4u: { WorldClass session2; ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_80_0 = (num * 392399052u ^ 1410114410u); continue; } case 5u: { WorldClass session2; session2.Character.SetUpdateField<int>(107, 0, 0); arg_80_0 = (num * 1872475184u ^ 4096526783u); continue; } } return; } } } [Opcode2(ClientMessage.CastSpell, "17930")] public static void HandleCastSpell(ref PacketReader packet, WorldClass2 session) { SmartGuid castId = packet.ReadGuid(); packet.Read<int>(); WorldClass session2; bool flag; int num2; while (true) { IL_A5: uint arg_80_0 = 88971970u; while (true) { uint num; switch ((num = (arg_80_0 ^ 899281459u)) % 6u) { case 0u: session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_80_0 = (num * 2285706345u ^ 946484535u); continue; case 2u: flag = false; arg_80_0 = (num * 2596192904u ^ 1190916770u); continue; case 3u: num2 = packet.Read<int>(); arg_80_0 = (num * 1794880723u ^ 3422198762u); continue; case 4u: goto IL_A5; case 5u: packet.Read<int>(); arg_80_0 = (num * 1876448829u ^ 2032187839u); continue; } goto Block_1; } } Block_1: uint key = 0u; using (Dictionary<string, Tuple<uint, uint>>.Enumerator enumerator = Manager.WorldMgr.MountSpells.GetEnumerator()) { while (true) { IL_178: uint arg_140_0 = enumerator.MoveNext() ? 1710289446u : 1398974958u; while (true) { uint num; switch ((num = (arg_140_0 ^ 899281459u)) % 7u) { case 0u: { KeyValuePair<string, Tuple<uint, uint>> current; arg_140_0 = ((((ulong)current.Value.Item2 != (ulong)((long)num2)) ? 2858814123u : 2326435399u) ^ num * 1448571402u); continue; } case 2u: goto IL_178; case 3u: { KeyValuePair<string, Tuple<uint, uint>> current = enumerator.Current; arg_140_0 = 407543239u; continue; } case 4u: { KeyValuePair<string, Tuple<uint, uint>> current; key = current.Value.Item1; flag = true; arg_140_0 = (num * 3736795090u ^ 2499053439u); continue; } case 5u: arg_140_0 = 1710289446u; continue; } goto Block_8; } } Block_8:; } if (flag) { goto IL_21A; } goto IL_2AA; uint arg_270_0; while (true) { IL_26B: uint num; switch ((num = (arg_270_0 ^ 899281459u)) % 11u) { case 0u: goto IL_2B9; case 1u: SpellHandler.activeSpell = num2; arg_270_0 = 1254900537u; continue; case 2u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_270_0 = (num * 491903829u ^ 962464016u); continue; case 3u: session.Character.SetUpdateField<int>(107, 0, 0); ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_270_0 = (num * 848114486u ^ 2321693018u); continue; case 4u: goto IL_21A; case 5u: session.Character.SetUpdateField<uint>(107, Manager.WorldMgr.MountDisplays[key], 0); arg_270_0 = (num * 1207556804u ^ 358871447u); continue; case 6u: goto IL_2AA; case 7u: goto IL_2C0; case 8u: arg_270_0 = (((SpellHandler.activeSpell != 0) ? 3488354535u : 2713727219u) ^ num * 1240849208u); continue; case 9u: MoveHandler.HandleMoveSetRunSpeed(ref session, 7f); arg_270_0 = (num * 4147973084u ^ 1878138665u); continue; } break; } return; IL_2B9: SpellHandler.activeSpell = 0; return; IL_2C0: MoveHandler.HandleMoveSetRunSpeed(ref session, 14f); return; IL_21A: arg_270_0 = 979607853u; goto IL_26B; IL_2AA: SpellHandler.CastSpell(session2, num2, castId); arg_270_0 = 1740439945u; goto IL_26B; } public static void AuraUpdate(WorldClass session, uint spellId) { PacketWriter packetWriter = new PacketWriter(ServerMessage.AuraUpdate, true); while (true) { IL_295: uint arg_238_0 = 286789388u; while (true) { uint num; switch ((num = (arg_238_0 ^ 29430773u)) % 20u) { case 0u: goto IL_295; case 1u: { BitPack bitPack; bitPack.Write<bool>(false); arg_238_0 = (num * 1084832233u ^ 416632889u); continue; } case 2u: { BitPack bitPack; bitPack.Flush(); packetWriter.WriteUInt8(0); bitPack.Write<bool>(spellId > 0u); arg_238_0 = (num * 1794565636u ^ 1221188297u); continue; } case 3u: { BitPack bitPack; bitPack.Write<bool>(false); arg_238_0 = (num * 1128489096u ^ 1329149150u); continue; } case 4u: packetWriter.WriteUInt32(66297u); arg_238_0 = (num * 3718534684u ^ 3686368565u); continue; case 5u: { BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); bitPack.Write<bool>(false); arg_238_0 = (num * 3197727365u ^ 2704851610u); continue; } case 6u: { BitPack bitPack; bitPack.Write<bool>(false); arg_238_0 = (num * 2529490252u ^ 685696646u); continue; } case 7u: { BitPack bitPack; bitPack.Write<bool>(false); bitPack.Write<bool>(false); arg_238_0 = (num * 3135531796u ^ 638967796u); continue; } case 8u: packetWriter.WriteUInt8(11); packetWriter.WriteUInt32(1u); arg_238_0 = (num * 4002804814u ^ 3175510560u); continue; case 9u: { BitPack bitPack; bitPack.Write<int>(0, 6); arg_238_0 = (num * 503314913u ^ 3530691890u); continue; } case 10u: { BitPack bitPack; bitPack.Write<int>(1, 9); arg_238_0 = (num * 1869515548u ^ 2159229279u); continue; } case 11u: { BitPack bitPack; bitPack.Flush(); arg_238_0 = (num * 535335051u ^ 2590371091u); continue; } case 12u: { BitPack bitPack; bitPack.Flush(); arg_238_0 = (((spellId != 0u) ? 949461760u : 1330977442u) ^ num * 325329682u); continue; } case 13u: packetWriter.WriteSmartGuid(0uL, GuidType.Player); arg_238_0 = (num * 4291735998u ^ 746703605u); continue; case 14u: { BitPack bitPack; bitPack.Write<int>(0, 6); arg_238_0 = (num * 3686269022u ^ 3907984467u); continue; } case 15u: packetWriter.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_238_0 = 187220561u; continue; case 17u: packetWriter.WriteUInt16(0); arg_238_0 = (num * 3623536493u ^ 1614412583u); continue; case 18u: packetWriter.WriteUInt32(spellId); arg_238_0 = (num * 3937256259u ^ 1673177203u); continue; case 19u: packetWriter.WriteUInt8(0); arg_238_0 = (num * 2025498952u ^ 3036305262u); continue; } goto Block_2; } } Block_2: session.Send(ref packetWriter); } public static void CastShit(WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.UnknownMount, true); while (true) { IL_3CA: uint arg_35C_0 = 2603575655u; while (true) { uint num; switch ((num = (arg_35C_0 ^ 2266727687u)) % 24u) { case 0u: { PacketWriter packetWriter2; byte[] array; packetWriter2.WriteBytes(array, 0); arg_35C_0 = (num * 3941501788u ^ 642226778u); continue; } case 1u: { byte[] array; int num2; arg_35C_0 = ((num2 >= array.Length) ? 2998360569u : 4101988280u); continue; } case 2u: { int num3; num3++; arg_35C_0 = (num * 3230039935u ^ 752066653u); continue; } case 3u: { PacketWriter packetWriter2; new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_ = Module.smethod_37<string>(2746803935u); byte[] array = new byte[SpellHandler.smethod_0(string_) / 2]; arg_35C_0 = (num * 2650947370u ^ 869267186u); continue; } case 4u: { byte[] array; int num3; string string_; array[num3] = SpellHandler.smethod_2(SpellHandler.smethod_1(string_, num3 * 2, 2), 16); arg_35C_0 = 2513803173u; continue; } case 5u: { PacketWriter packetWriter2 = new PacketWriter(ServerMessage.SpellGo, true); arg_35C_0 = (num * 3385895038u ^ 3977190338u); continue; } case 6u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); byte[] array; packetWriter2.WriteBytes(array, 0); packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_35C_0 = (num * 645349454u ^ 2094935330u); continue; } case 7u: arg_35C_0 = (num * 814766979u ^ 1627543835u); continue; case 8u: session.Send(ref packetWriter); arg_35C_0 = (num * 386530094u ^ 408343786u); continue; case 9u: { byte[] array; string string_; int num4; array[num4] = SpellHandler.smethod_2(SpellHandler.smethod_1(string_, num4 * 2, 2), 16); num4++; arg_35C_0 = 2248897803u; continue; } case 10u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_35C_0 = (num * 673255875u ^ 680462305u); continue; } case 11u: arg_35C_0 = (num * 1746793927u ^ 774125646u); continue; case 12u: { byte[] array; int num3; arg_35C_0 = ((num3 >= array.Length) ? 2500590081u : 3815223811u); continue; } case 13u: { PacketWriter packetWriter2 = new PacketWriter(ServerMessage.SpellStart, true); new BitPack(packetWriter2, 0uL, 0uL, 0uL, 0uL); string string_ = Module.smethod_35<string>(1869705636u); byte[] array = new byte[SpellHandler.smethod_0(string_) / 2]; int num4 = 0; arg_35C_0 = (num * 3637525854u ^ 2731629069u); continue; } case 14u: { byte[] array; packetWriter.WriteBytes(array, 0); arg_35C_0 = (num * 3176727326u ^ 1608014963u); continue; } case 15u: { byte[] array; int num2; string string_; array[num2] = SpellHandler.smethod_2(SpellHandler.smethod_1(string_, num2 * 2, 2), 16); num2++; arg_35C_0 = 4222645102u; continue; } case 16u: { string string_ = Module.smethod_37<string>(1724181447u); arg_35C_0 = (num * 1899220956u ^ 3503518101u); continue; } case 17u: { PacketWriter packetWriter2; packetWriter2.WriteUInt8(0); arg_35C_0 = (num * 317972108u ^ 2094842830u); continue; } case 18u: { string string_; byte[] array = new byte[SpellHandler.smethod_0(string_) / 2]; int num3 = 0; arg_35C_0 = (num * 486794978u ^ 1577748392u); continue; } case 19u: { int num2 = 0; arg_35C_0 = (num * 2886695706u ^ 4258145214u); continue; } case 20u: { byte[] array; int num4; arg_35C_0 = ((num4 < array.Length) ? 3789216542u : 2803619793u); continue; } case 22u: { PacketWriter packetWriter2; packetWriter2.WriteSmartGuid(session.Character.Guid, GuidType.Player); arg_35C_0 = (num * 3760716457u ^ 3787656715u); continue; } case 23u: goto IL_3CA; } return; } } } [AsyncStateMachine(typeof(SpellHandler.<CastSpell>d__6))] public static void CastSpell(WorldClass session, int spellId, SmartGuid castId) { SpellHandler.<CastSpell>d__6 <CastSpell>d__; <CastSpell>d__.session = session; AsyncVoidMethodBuilder __t__builder; while (true) { IL_85: uint arg_65_0 = 2282171839u; while (true) { uint num; switch ((num = (arg_65_0 ^ 3822533412u)) % 5u) { case 0u: goto IL_85; case 2u: <CastSpell>d__.spellId = spellId; arg_65_0 = (num * 1840100614u ^ 778084457u); continue; case 3u: __t__builder = <CastSpell>d__.__t__builder; arg_65_0 = (num * 3444476317u ^ 1160958368u); continue; case 4u: <CastSpell>d__.castId = castId; <CastSpell>d__.__t__builder = AsyncVoidMethodBuilder.Create(); <CastSpell>d__.__1__state = -1; arg_65_0 = (num * 3355532363u ^ 1849549973u); continue; } goto Block_1; } } Block_1: __t__builder.Start<SpellHandler.<CastSpell>d__6>(ref <CastSpell>d__); } public static void WriteCastData(ref PacketWriter writer, WorldClass session, ref BitPack BitPack, int spellId, SmartGuid castId, uint castTime = 1500u) { writer.WriteSmartGuid(session.Character.Guid, GuidType.Player); writer.WriteSmartGuid(session.Character.Guid, GuidType.Player); while (true) { IL_37D: uint arg_308_0 = 3838886486u; while (true) { uint num; switch ((num = (arg_308_0 ^ 4140424076u)) % 26u) { case 0u: BitPack.Write<int>(0, 25); BitPack.Write<bool>(false); arg_308_0 = (num * 1586089532u ^ 4077363843u); continue; case 1u: BitPack.Write<int>(0, 16); BitPack.Write<int>(0, 16); arg_308_0 = (num * 186755342u ^ 2841960031u); continue; case 2u: writer.WriteSmartGuid(castId); arg_308_0 = (num * 2241734600u ^ 2232724254u); continue; case 3u: BitPack.Write<bool>(false); arg_308_0 = (num * 228909168u ^ 3535531349u); continue; case 4u: writer.WriteSmartGuid(0uL, GuidType.Player); arg_308_0 = (num * 1717643167u ^ 1687754918u); continue; case 5u: BitPack.Write<bool>(false); BitPack.Write<bool>(false); arg_308_0 = (num * 3554873396u ^ 1551941179u); continue; case 7u: writer.WriteInt32(0); arg_308_0 = (num * 3985010016u ^ 3189089925u); continue; case 8u: writer.WriteUInt32(castTime); arg_308_0 = 3877726258u; continue; case 9u: BitPack.Write<int>(0, 9); arg_308_0 = (num * 3044735342u ^ 3261654741u); continue; case 10u: writer.WriteInt32(spellId); arg_308_0 = (num * 3284054643u ^ 4096881426u); continue; case 11u: BitPack.Write<bool>(false); BitPack.Flush(); arg_308_0 = (num * 3987973u ^ 1663004115u); continue; case 12u: writer.WriteUInt32(66297u); arg_308_0 = (((castTime == 0u) ? 298507407u : 935392841u) ^ num * 2052695850u); continue; case 13u: writer.WriteInt32(0); arg_308_0 = 2222930688u; continue; case 14u: BitPack.Write<int>(0, 22); BitPack.Write<int>(0, 16); arg_308_0 = (num * 939684174u ^ 4220231639u); continue; case 15u: writer.WriteInt32(0); arg_308_0 = (num * 2971885772u ^ 386800913u); continue; case 16u: writer.WriteSmartGuid(castId); arg_308_0 = (num * 3491712652u ^ 1488517812u); continue; case 17u: BitPack.Write<bool>(false); BitPack.Write<int>(0, 7); arg_308_0 = (num * 3523674949u ^ 645708779u); continue; case 18u: writer.WriteInt32(0); arg_308_0 = (num * 3410065786u ^ 1420364251u); continue; case 19u: writer.WriteInt32(0); arg_308_0 = (num * 2306076363u ^ 2743430445u); continue; case 20u: arg_308_0 = (num * 3671674926u ^ 2045424404u); continue; case 21u: goto IL_37D; case 22u: writer.WriteInt32(0); writer.WriteUInt8(0); writer.WriteUInt8(0); arg_308_0 = (num * 4101113442u ^ 279876037u); continue; case 23u: writer.WriteFloat(0f); arg_308_0 = (num * 692139264u ^ 1378314312u); continue; case 24u: writer.WriteSmartGuid(session.Character.TargetGuid, GuidType.Player); arg_308_0 = (num * 1794509063u ^ 1223018578u); continue; case 25u: writer.WriteInt32(0); writer.WriteInt32(0); writer.WriteUInt8(0); arg_308_0 = (num * 1707563810u ^ 276352896u); continue; } goto Block_2; } } Block_2: writer.WriteSmartGuid(0uL, GuidType.Player); } public static void HandleLearnedSpells(ref WorldClass session, List<uint> newSpells) { PacketWriter packetWriter = new PacketWriter(ServerMessage.LearnedSpells, true); BitPack bitPack = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); while (true) { IL_1D4: uint arg_18A_0 = 2505692412u; while (true) { uint num; switch ((num = (arg_18A_0 ^ 2887819410u)) % 15u) { case 0u: goto IL_1D4; case 1u: { int num2; packetWriter.WriteUInt32(newSpells[num2]); arg_18A_0 = 2251992918u; continue; } case 2u: bitPack.Flush(); arg_18A_0 = (num * 52899486u ^ 4007865338u); continue; case 3u: { int num3; packetWriter.WriteUInt32(newSpells[num3]); arg_18A_0 = 3612900750u; continue; } case 4u: bitPack.Write<int>(0); arg_18A_0 = (num * 1080477016u ^ 750266935u); continue; case 5u: session.Send(ref packetWriter); arg_18A_0 = (num * 4018288143u ^ 397696686u); continue; case 6u: { packetWriter.WriteInt32(newSpells.Count); int num3 = 0; arg_18A_0 = (num * 684424722u ^ 2788232179u); continue; } case 7u: { int num2 = 0; arg_18A_0 = (num * 376977033u ^ 4112279232u); continue; } case 8u: { int num2; arg_18A_0 = ((num2 >= newSpells.Count) ? 3941076199u : 3047045530u); continue; } case 9u: { int num2; num2++; arg_18A_0 = (num * 3578151209u ^ 560733840u); continue; } case 10u: arg_18A_0 = (num * 501077822u ^ 4198579483u); continue; case 11u: { int num3; arg_18A_0 = ((num3 < newSpells.Count) ? 2543727289u : 3126670086u); continue; } case 12u: { int num3; num3++; arg_18A_0 = (num * 1419794369u ^ 795664741u); continue; } case 14u: packetWriter.WriteInt32(newSpells.Count); arg_18A_0 = (num * 1610544683u ^ 32591431u); continue; } return; } } } public static void HandleUnlearnedSpells(ref WorldClass session, List<uint> oldSpells) { PacketWriter packetWriter = new PacketWriter(ServerMessage.UnlearnedSpells, true); while (true) { IL_FB: uint arg_CF_0 = 2203798513u; while (true) { uint num; switch ((num = (arg_CF_0 ^ 2282107082u)) % 8u) { case 0u: { int num2; num2++; arg_CF_0 = (num * 2717838124u ^ 101302792u); continue; } case 1u: arg_CF_0 = (num * 1380131711u ^ 3037237943u); continue; case 2u: { int num2; arg_CF_0 = ((num2 < oldSpells.Count) ? 3342807749u : 2253144055u); continue; } case 3u: { BitPack expr_66 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); expr_66.Write<int>(oldSpells.Count, 22); expr_66.Flush(); arg_CF_0 = (num * 48424762u ^ 3562694784u); continue; } case 4u: { int num2 = 0; arg_CF_0 = (num * 1234660541u ^ 2769672847u); continue; } case 6u: goto IL_FB; case 7u: { int num2; packetWriter.WriteUInt32(oldSpells[num2]); arg_CF_0 = 2402715770u; continue; } } goto Block_2; } } Block_2: session.Send(ref packetWriter); } static int smethod_0(string string_0) { return string_0.Length; } static string smethod_1(string string_0, int int_0, int int_1) { return string_0.Substring(int_0, int_1); } static byte smethod_2(string string_0, int int_0) { return Convert.ToByte(string_0, int_0); } } } <file_sep>/Framework.ObjectDefines/Quaternion.cs using System; namespace Framework.ObjectDefines { public class Quaternion { public readonly float X; public readonly float Y; public readonly float Z; public readonly float W; private const float multiplier = 9.536743E-07f; public Quaternion(long compressedQuaternion) { while (true) { IL_12F: uint arg_103_0 = 825594213u; while (true) { uint num; switch ((num = (arg_103_0 ^ 174999553u)) % 8u) { case 0u: this.W = (float)Quaternion.smethod_1((double)(1f - this.W)); arg_103_0 = (num * 3584623628u ^ 653656716u); continue; case 2u: this.Z = (float)compressedQuaternion * 9.536743E-07f; arg_103_0 = (num * 2070995609u ^ 53811480u); continue; case 3u: this.W = this.X * this.X + this.Y * this.Y + this.Z * this.Z; arg_103_0 = (((Quaternion.smethod_0(this.W - 1f) >= 9.536743E-07f) ? 2796236138u : 2503607803u) ^ num * 2087592569u); continue; case 4u: this.X = (float)(compressedQuaternion >> 42) * 4.76837158E-07f; arg_103_0 = (num * 3123293855u ^ 3927614322u); continue; case 5u: return; case 6u: goto IL_12F; case 7u: this.Y = (float)(compressedQuaternion >> 21) * 9.536743E-07f; arg_103_0 = (num * 928188314u ^ 2892027333u); continue; } goto Block_2; } } Block_2: this.W = 0f; } public static long GetCompressed(float orientation) { long num = (long)((double)((float)Quaternion.smethod_2((double)orientation / 1.9999945)) / Quaternion.smethod_4(Quaternion.smethod_3(2.0, -20.0))); while (true) { IL_81: uint arg_65_0 = 3686931106u; while (true) { uint num2; switch ((num2 = (arg_65_0 ^ 3731480515u)) % 4u) { case 0u: goto IL_81; case 1u: arg_65_0 = ((((double)orientation >= 3.1415926535897931) ? 249273569u : 1146087880u) ^ num2 * 1020797425u); continue; case 3u: goto IL_8A; } return num; } } return num; IL_8A: return (1048576L - num << 1) + num; } static float smethod_0(float float_0) { return Math.Abs(float_0); } static double smethod_1(double double_0) { return Math.Sqrt(double_0); } static double smethod_2(double double_0) { return Math.Sin(double_0); } static double smethod_3(double double_0, double double_1) { return Math.Pow(double_0, double_1); } static double smethod_4(double double_0) { return Math.Atan(double_0); } } } <file_sep>/Bgs.Protocol/UpdateInvitationRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class UpdateInvitationRequest : IMessage<UpdateInvitationRequest>, IEquatable<UpdateInvitationRequest>, IDeepCloneable<UpdateInvitationRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateInvitationRequest.__c __9 = new UpdateInvitationRequest.__c(); internal UpdateInvitationRequest cctor>b__34_0() { return new UpdateInvitationRequest(); } } private static readonly MessageParser<UpdateInvitationRequest> _parser = new MessageParser<UpdateInvitationRequest>(new Func<UpdateInvitationRequest>(UpdateInvitationRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdentityFieldNumber = 1; private Identity agentIdentity_; public const int InvitationIdFieldNumber = 2; private ulong invitationId_; public const int ParamsFieldNumber = 3; private InvitationParams params_; public static MessageParser<UpdateInvitationRequest> Parser { get { return UpdateInvitationRequest._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateInvitationRequest.Descriptor; } } public Identity AgentIdentity { get { return this.agentIdentity_; } set { this.agentIdentity_ = value; } } public ulong InvitationId { get { return this.invitationId_; } set { this.invitationId_ = value; } } public InvitationParams Params { get { return this.params_; } set { this.params_ = value; } } public UpdateInvitationRequest() { } public UpdateInvitationRequest(UpdateInvitationRequest other) : this() { this.AgentIdentity = ((other.agentIdentity_ != null) ? other.AgentIdentity.Clone() : null); this.invitationId_ = other.invitationId_; this.Params = ((other.params_ != null) ? other.Params.Clone() : null); } public UpdateInvitationRequest Clone() { return new UpdateInvitationRequest(this); } public override bool Equals(object other) { return this.Equals(other as UpdateInvitationRequest); } public bool Equals(UpdateInvitationRequest other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ -1191757984) % 11) { case 0: return false; case 1: return false; case 2: goto IL_9A; case 3: return false; case 4: arg_A4_0 = (UpdateInvitationRequest.smethod_0(this.Params, other.Params) ? -1995235699 : -1752788712); continue; case 5: arg_A4_0 = ((this.InvitationId == other.InvitationId) ? -1005537946 : -1627100552); continue; case 7: arg_A4_0 = ((!UpdateInvitationRequest.smethod_0(this.AgentIdentity, other.AgentIdentity)) ? -425025588 : -1913331405); continue; case 8: return false; case 9: return true; case 10: goto IL_EA; } break; } return true; IL_9A: arg_A4_0 = -941516265; goto IL_9F; IL_EA: arg_A4_0 = ((other == this) ? -636219642 : -1613667757); goto IL_9F; } public override int GetHashCode() { int num = 1; if (this.agentIdentity_ != null) { goto IL_1C; } goto IL_8F; uint arg_63_0; while (true) { IL_5E: uint num2; switch ((num2 = (arg_63_0 ^ 3571811806u)) % 5u) { case 1u: goto IL_8F; case 2u: num ^= UpdateInvitationRequest.smethod_1(this.AgentIdentity); arg_63_0 = (num2 * 1932585292u ^ 1125625719u); continue; case 3u: num ^= this.InvitationId.GetHashCode(); arg_63_0 = (num2 * 3687887507u ^ 2415816799u); continue; case 4u: goto IL_1C; } break; } return num ^ this.Params.GetHashCode(); IL_1C: arg_63_0 = 3215074705u; goto IL_5E; IL_8F: arg_63_0 = ((this.InvitationId == 0uL) ? 2561355809u : 3166081940u); goto IL_5E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentIdentity_ != null) { goto IL_1A; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 2852101716u)) % 6u) { case 1u: output.WriteRawTag(26); arg_79_0 = 4255135418u; continue; case 2u: output.WriteRawTag(10); output.WriteMessage(this.AgentIdentity); arg_79_0 = (num * 2992231922u ^ 2433363271u); continue; case 3u: goto IL_AC; case 4u: output.WriteRawTag(17); output.WriteFixed64(this.InvitationId); arg_79_0 = (num * 3156020748u ^ 2452939947u); continue; case 5u: goto IL_1A; } break; } output.WriteMessage(this.Params); return; IL_1A: arg_79_0 = 3282393852u; goto IL_74; IL_AC: arg_79_0 = ((this.InvitationId != 0uL) ? 4108054614u : 3687293107u); goto IL_74; } public int CalculateSize() { int num = 0; if (this.agentIdentity_ != null) { goto IL_1C; } goto IL_A3; uint arg_70_0; while (true) { IL_6B: uint num2; switch ((num2 = (arg_70_0 ^ 2631024271u)) % 6u) { case 0u: goto IL_A3; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentIdentity); arg_70_0 = (num2 * 675778288u ^ 3426741437u); continue; case 2u: num += 9; arg_70_0 = (num2 * 3994606705u ^ 83634614u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Params); arg_70_0 = 3738218999u; continue; case 5u: goto IL_1C; } break; } return num; IL_1C: arg_70_0 = 2774955586u; goto IL_6B; IL_A3: arg_70_0 = ((this.InvitationId == 0uL) ? 4046459706u : 2469259203u); goto IL_6B; } public void MergeFrom(UpdateInvitationRequest other) { if (other == null) { goto IL_9D; } goto IL_197; uint arg_147_0; while (true) { IL_142: uint num; switch ((num = (arg_147_0 ^ 3419895316u)) % 13u) { case 0u: arg_147_0 = ((other.InvitationId != 0uL) ? 2572791920u : 3915150824u); continue; case 1u: this.params_ = new InvitationParams(); arg_147_0 = (num * 4160504387u ^ 580811139u); continue; case 2u: arg_147_0 = ((other.params_ == null) ? 3281686707u : 2950319505u); continue; case 3u: this.Params.MergeFrom(other.Params); arg_147_0 = 3281686707u; continue; case 4u: arg_147_0 = (((this.agentIdentity_ != null) ? 3432823966u : 2588968177u) ^ num * 2930672746u); continue; case 5u: return; case 7u: goto IL_197; case 8u: goto IL_9D; case 9u: this.AgentIdentity.MergeFrom(other.AgentIdentity); arg_147_0 = 3772748690u; continue; case 10u: arg_147_0 = (((this.params_ != null) ? 3468432509u : 4002311560u) ^ num * 3832455785u); continue; case 11u: this.InvitationId = other.InvitationId; arg_147_0 = (num * 2396792908u ^ 772730968u); continue; case 12u: this.agentIdentity_ = new Identity(); arg_147_0 = (num * 2100483122u ^ 3363296762u); continue; } break; } return; IL_9D: arg_147_0 = 4011299193u; goto IL_142; IL_197: arg_147_0 = ((other.agentIdentity_ == null) ? 3772748690u : 3752331941u); goto IL_142; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1E0: uint num; uint arg_184_0 = ((num = input.ReadTag()) == 0u) ? 1945179017u : 1731948863u; while (true) { uint num2; switch ((num2 = (arg_184_0 ^ 1979769374u)) % 16u) { case 0u: input.ReadMessage(this.agentIdentity_); arg_184_0 = 424671874u; continue; case 1u: arg_184_0 = ((num != 10u) ? 2120989571u : 1653001179u); continue; case 2u: arg_184_0 = (num2 * 1165877852u ^ 1936218991u); continue; case 3u: input.ReadMessage(this.params_); arg_184_0 = 366593111u; continue; case 4u: arg_184_0 = (((num != 26u) ? 3674701580u : 3690475240u) ^ num2 * 3198846002u); continue; case 5u: arg_184_0 = ((this.agentIdentity_ == null) ? 249290216u : 310993998u); continue; case 6u: this.agentIdentity_ = new Identity(); arg_184_0 = (num2 * 1128817607u ^ 164871796u); continue; case 8u: this.InvitationId = input.ReadFixed64(); arg_184_0 = 366593111u; continue; case 9u: goto IL_1E0; case 10u: input.SkipLastField(); arg_184_0 = (num2 * 2661260473u ^ 1280677974u); continue; case 11u: arg_184_0 = 1731948863u; continue; case 12u: arg_184_0 = (num2 * 1615877193u ^ 4156092459u); continue; case 13u: arg_184_0 = (((num != 17u) ? 915696769u : 1838321597u) ^ num2 * 4144204039u); continue; case 14u: arg_184_0 = ((this.params_ != null) ? 1736599405u : 1192825713u); continue; case 15u: this.params_ = new InvitationParams(); arg_184_0 = (num2 * 2095530672u ^ 1992293693u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/MessageExtensions.cs using System; using System.IO; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public static class MessageExtensions { public static void MergeFrom(this IMessage message, byte[] data) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_36<string>(123557471u)); while (true) { IL_88: uint arg_68_0 = 3957484449u; while (true) { uint num; switch ((num = (arg_68_0 ^ 3942961502u)) % 5u) { case 1u: Preconditions.CheckNotNull<byte[]>(data, Module.smethod_33<string>(4183796496u)); arg_68_0 = (num * 2194003209u ^ 3387356842u); continue; case 2u: { CodedInputStream codedInputStream; message.MergeFrom(codedInputStream); codedInputStream.CheckReadEndOfStreamTag(); arg_68_0 = (num * 1632326612u ^ 1254292727u); continue; } case 3u: { CodedInputStream codedInputStream = new CodedInputStream(data); arg_68_0 = (num * 2361737144u ^ 3366543172u); continue; } case 4u: goto IL_88; } return; } } } public static void MergeFrom(this IMessage message, ByteString data) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_37<string>(1018619835u)); while (true) { IL_88: uint arg_68_0 = 1294777110u; while (true) { uint num; switch ((num = (arg_68_0 ^ 774803952u)) % 5u) { case 1u: { CodedInputStream codedInputStream; message.MergeFrom(codedInputStream); codedInputStream.CheckReadEndOfStreamTag(); arg_68_0 = (num * 1646138364u ^ 1655964701u); continue; } case 2u: goto IL_88; case 3u: Preconditions.CheckNotNull<ByteString>(data, Module.smethod_36<string>(1708537323u)); arg_68_0 = (num * 205556053u ^ 3845813091u); continue; case 4u: { CodedInputStream codedInputStream = data.CreateCodedInput(); arg_68_0 = (num * 2511744089u ^ 2886406153u); continue; } } return; } } } public static void MergeFrom(this IMessage message, Stream input) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_35<string>(2616444679u)); Preconditions.CheckNotNull<Stream>(input, Module.smethod_34<string>(3703866810u)); CodedInputStream codedInputStream; while (true) { IL_5C: uint arg_44_0 = 1463404901u; while (true) { uint num; switch ((num = (arg_44_0 ^ 561544202u)) % 3u) { case 0u: goto IL_5C; case 1u: codedInputStream = new CodedInputStream(input); message.MergeFrom(codedInputStream); arg_44_0 = (num * 1287290389u ^ 4230433120u); continue; } goto Block_1; } } Block_1: codedInputStream.CheckReadEndOfStreamTag(); } public static void MergeDelimitedFrom(this IMessage message, Stream input) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_33<string>(879293356u)); Preconditions.CheckNotNull<Stream>(input, Module.smethod_36<string>(1587331305u)); int size; while (true) { IL_55: uint arg_3D_0 = 1352182406u; while (true) { uint num; switch ((num = (arg_3D_0 ^ 864799055u)) % 3u) { case 0u: goto IL_55; case 1u: size = (int)CodedInputStream.ReadRawVarint32(input); arg_3D_0 = (num * 2731188668u ^ 3872850211u); continue; } goto Block_1; } } Block_1: Stream input2 = new LimitedInputStream(input, size); message.MergeFrom(input2); } public static byte[] ToByteArray(this IMessage message) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_33<string>(879293356u)); byte[] expr_1C = new byte[message.CalculateSize()]; CodedOutputStream codedOutputStream = new CodedOutputStream(expr_1C); message.WriteTo(codedOutputStream); codedOutputStream.CheckNoSpaceLeft(); return expr_1C; } public static void WriteTo(this IMessage message, Stream output) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_37<string>(1018619835u)); Preconditions.CheckNotNull<Stream>(output, Module.smethod_34<string>(2188551970u)); CodedOutputStream codedOutputStream = new CodedOutputStream(output); message.WriteTo(codedOutputStream); codedOutputStream.Flush(); } public static void WriteDelimitedTo(this IMessage message, Stream output) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_37<string>(1018619835u)); while (true) { IL_97: uint arg_77_0 = 836366938u; while (true) { uint num; switch ((num = (arg_77_0 ^ 1222686458u)) % 5u) { case 0u: goto IL_97; case 1u: { Preconditions.CheckNotNull<Stream>(output, Module.smethod_36<string>(1367025601u)); CodedOutputStream codedOutputStream = new CodedOutputStream(output); arg_77_0 = (num * 2302164566u ^ 2110158721u); continue; } case 2u: { CodedOutputStream codedOutputStream; codedOutputStream.WriteRawVarint32((uint)message.CalculateSize()); arg_77_0 = (num * 762481410u ^ 1229542845u); continue; } case 4u: { CodedOutputStream codedOutputStream; message.WriteTo(codedOutputStream); codedOutputStream.Flush(); arg_77_0 = (num * 187669686u ^ 2466296953u); continue; } } return; } } } public static ByteString ToByteString(this IMessage message) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_35<string>(2616444679u)); return ByteString.AttachBytes(message.ToByteArray()); } } } <file_sep>/Bgs.Protocol.Authentication.V1/VersionInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class VersionInfo : IMessage<VersionInfo>, IEquatable<VersionInfo>, IDeepCloneable<VersionInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly VersionInfo.__c __9 = new VersionInfo.__c(); internal VersionInfo cctor>b__39_0() { return new VersionInfo(); } } private static readonly MessageParser<VersionInfo> _parser = new MessageParser<VersionInfo>(new Func<VersionInfo>(VersionInfo.__c.__9.<.cctor>b__39_0)); public const int NumberFieldNumber = 1; private uint number_; public const int PatchFieldNumber = 2; private string patch_ = ""; public const int IsOptionalFieldNumber = 3; private bool isOptional_; public const int KickTimeFieldNumber = 4; private ulong kickTime_; public static MessageParser<VersionInfo> Parser { get { return VersionInfo._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return VersionInfo.Descriptor; } } public uint Number { get { return this.number_; } set { this.number_ = value; } } public string Patch { get { return this.patch_; } set { this.patch_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public bool IsOptional { get { return this.isOptional_; } set { this.isOptional_ = value; } } public ulong KickTime { get { return this.kickTime_; } set { this.kickTime_ = value; } } public VersionInfo() { } public VersionInfo(VersionInfo other) : this() { while (true) { IL_9E: uint arg_7A_0 = 1364059622u; while (true) { uint num; switch ((num = (arg_7A_0 ^ 1327362760u)) % 6u) { case 0u: goto IL_9E; case 1u: this.isOptional_ = other.isOptional_; arg_7A_0 = (num * 2418261567u ^ 3888371340u); continue; case 2u: this.number_ = other.number_; arg_7A_0 = (num * 3415483345u ^ 3566500437u); continue; case 3u: this.kickTime_ = other.kickTime_; arg_7A_0 = (num * 932547801u ^ 3362522313u); continue; case 5u: this.patch_ = other.patch_; arg_7A_0 = (num * 881095152u ^ 3422057807u); continue; } return; } } } public VersionInfo Clone() { return new VersionInfo(this); } public override bool Equals(object other) { return this.Equals(other as VersionInfo); } public bool Equals(VersionInfo other) { if (other == null) { goto IL_6B; } goto IL_111; int arg_C3_0; while (true) { IL_BE: switch ((arg_C3_0 ^ 947650556) % 13) { case 1: return false; case 2: arg_C3_0 = ((this.IsOptional != other.IsOptional) ? 1647336774 : 1144041013); continue; case 3: return true; case 4: goto IL_111; case 5: arg_C3_0 = ((this.KickTime != other.KickTime) ? 334836107 : 342410010); continue; case 6: goto IL_6B; case 7: return false; case 8: arg_C3_0 = (VersionInfo.smethod_0(this.Patch, other.Patch) ? 1686937314 : 1190062709); continue; case 9: return false; case 10: return false; case 11: return false; case 12: arg_C3_0 = ((this.Number != other.Number) ? 241013337 : 1876322420); continue; } break; } return true; IL_6B: arg_C3_0 = 292268578; goto IL_BE; IL_111: arg_C3_0 = ((other != this) ? 447886459 : 1455068748); goto IL_BE; } public override int GetHashCode() { int num = 1; while (true) { IL_15F: uint arg_129_0 = 2725894527u; while (true) { uint num2; switch ((num2 = (arg_129_0 ^ 2988652462u)) % 10u) { case 0u: goto IL_15F; case 2u: num ^= this.IsOptional.GetHashCode(); arg_129_0 = (num2 * 3591961589u ^ 791132461u); continue; case 3u: arg_129_0 = (((this.Number == 0u) ? 3808273424u : 2615000015u) ^ num2 * 726473389u); continue; case 4u: num ^= this.KickTime.GetHashCode(); arg_129_0 = (num2 * 195102209u ^ 2176681211u); continue; case 5u: arg_129_0 = ((this.KickTime == 0uL) ? 3014127981u : 2637809208u); continue; case 6u: num ^= this.Number.GetHashCode(); arg_129_0 = (num2 * 2677439645u ^ 3942779969u); continue; case 7u: arg_129_0 = (this.IsOptional ? 2418543502u : 3566490509u); continue; case 8u: num ^= this.Patch.GetHashCode(); arg_129_0 = (num2 * 2861384989u ^ 637890399u); continue; case 9u: arg_129_0 = ((this.Patch.Length != 0) ? 4010344336u : 4145089113u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Number != 0u) { goto IL_67; } goto IL_166; uint arg_11E_0; while (true) { IL_119: uint num; switch ((num = (arg_11E_0 ^ 2793204480u)) % 11u) { case 0u: arg_11E_0 = ((!this.IsOptional) ? 4018151038u : 3033451932u); continue; case 1u: output.WriteRawTag(8); output.WriteUInt32(this.Number); arg_11E_0 = (num * 2598864537u ^ 670734575u); continue; case 2u: output.WriteBool(this.IsOptional); arg_11E_0 = (num * 149519311u ^ 4192727042u); continue; case 3u: output.WriteRawTag(32); arg_11E_0 = (num * 349717085u ^ 350822542u); continue; case 4u: output.WriteRawTag(24); arg_11E_0 = (num * 1947097179u ^ 1459629744u); continue; case 5u: output.WriteUInt64(this.KickTime); arg_11E_0 = (num * 2323908088u ^ 579814074u); continue; case 6u: goto IL_67; case 7u: arg_11E_0 = ((this.KickTime != 0uL) ? 2781745508u : 2204118922u); continue; case 9u: goto IL_166; case 10u: output.WriteRawTag(18); output.WriteString(this.Patch); arg_11E_0 = (num * 3132364488u ^ 973117414u); continue; } break; } return; IL_67: arg_11E_0 = 3370787593u; goto IL_119; IL_166: arg_11E_0 = ((VersionInfo.smethod_1(this.Patch) == 0) ? 2590781990u : 2558540920u); goto IL_119; } public int CalculateSize() { int num = 0; if (this.Number != 0u) { goto IL_A5; } goto IL_121; uint arg_E1_0; while (true) { IL_DC: uint num2; switch ((num2 = (arg_E1_0 ^ 3173006169u)) % 9u) { case 0u: num += 2; arg_E1_0 = (num2 * 1276926376u ^ 1019983233u); continue; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Number); arg_E1_0 = (num2 * 432604733u ^ 1147630583u); continue; case 2u: goto IL_A5; case 3u: goto IL_121; case 4u: num += 1 + CodedOutputStream.ComputeStringSize(this.Patch); arg_E1_0 = (num2 * 3846567858u ^ 619180344u); continue; case 5u: arg_E1_0 = ((this.KickTime == 0uL) ? 2618721213u : 3667209930u); continue; case 6u: arg_E1_0 = (this.IsOptional ? 4272053065u : 3732877057u); continue; case 8u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.KickTime); arg_E1_0 = (num2 * 703044044u ^ 2093059993u); continue; } break; } return num; IL_A5: arg_E1_0 = 4181186983u; goto IL_DC; IL_121: arg_E1_0 = ((VersionInfo.smethod_1(this.Patch) == 0) ? 3998983444u : 2518892639u); goto IL_DC; } public void MergeFrom(VersionInfo other) { if (other == null) { goto IL_78; } goto IL_147; uint arg_FF_0; while (true) { IL_FA: uint num; switch ((num = (arg_FF_0 ^ 2213373195u)) % 11u) { case 0u: this.Number = other.Number; arg_FF_0 = (num * 354893173u ^ 1573609952u); continue; case 2u: this.KickTime = other.KickTime; arg_FF_0 = (num * 2592170375u ^ 96191666u); continue; case 3u: arg_FF_0 = (other.IsOptional ? 2435340847u : 3157613251u); continue; case 4u: arg_FF_0 = ((VersionInfo.smethod_1(other.Patch) == 0) ? 2469043940u : 3785702229u); continue; case 5u: goto IL_78; case 6u: goto IL_147; case 7u: this.Patch = other.Patch; arg_FF_0 = (num * 2531104312u ^ 3782157940u); continue; case 8u: arg_FF_0 = ((other.KickTime != 0uL) ? 2463457192u : 4172966471u); continue; case 9u: this.IsOptional = other.IsOptional; arg_FF_0 = (num * 3312379157u ^ 1830042423u); continue; case 10u: return; } break; } return; IL_78: arg_FF_0 = 3445962367u; goto IL_FA; IL_147: arg_FF_0 = ((other.Number != 0u) ? 4291572852u : 3711296491u); goto IL_FA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1CA: uint num; uint arg_16E_0 = ((num = input.ReadTag()) == 0u) ? 2226538663u : 2298826256u; while (true) { uint num2; switch ((num2 = (arg_16E_0 ^ 2882684379u)) % 16u) { case 0u: this.Number = input.ReadUInt32(); arg_16E_0 = 2957220115u; continue; case 1u: arg_16E_0 = (((num != 8u) ? 3378391704u : 3623365090u) ^ num2 * 3219491737u); continue; case 2u: arg_16E_0 = (((num == 32u) ? 663441937u : 1358222379u) ^ num2 * 3764751535u); continue; case 3u: this.IsOptional = input.ReadBool(); arg_16E_0 = 2382688146u; continue; case 4u: this.KickTime = input.ReadUInt64(); arg_16E_0 = 2382688146u; continue; case 5u: this.Patch = input.ReadString(); arg_16E_0 = 2643703469u; continue; case 6u: arg_16E_0 = (num2 * 1860288561u ^ 166393348u); continue; case 7u: arg_16E_0 = (num2 * 2660228181u ^ 657254534u); continue; case 8u: arg_16E_0 = (num2 * 2256099300u ^ 2759620018u); continue; case 9u: goto IL_1CA; case 10u: arg_16E_0 = (((num != 18u) ? 704355562u : 1876631976u) ^ num2 * 3641181159u); continue; case 11u: arg_16E_0 = ((num <= 18u) ? 3447499834u : 3885078758u); continue; case 13u: arg_16E_0 = ((num == 24u) ? 3232369784u : 3164750617u); continue; case 14u: input.SkipLastField(); arg_16E_0 = 2382688146u; continue; case 15u: arg_16E_0 = 2298826256u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/Framework.ObjectDefines/ObjectMovementValues.cs using Framework.Constants; using Framework.Constants.Movement; using System; namespace Framework.ObjectDefines { public class ObjectMovementValues { public bool HasAnimKits; public bool HasUnknown; public uint BitCounter; public bool Bit0; public bool HasUnknown2; public bool IsVehicle; public bool Bit2; public bool HasUnknown3; public bool HasStationaryPosition; public bool HasGoTransportPosition; public bool IsSelf; public bool IsAlive; public uint BitCounter2; public bool Bit3; public bool HasUnknown4; public bool HasTarget; public bool Bit1; public bool HasRotation; public bool IsTransport; public bool HasMovementFlags; public bool HasMovementFlags2; public bool IsFallingOrJumping; public bool HasJumpData; public bool IsAreaTrigger; public bool IsSceneObject; public MovementFlag MovementFlags; public MovementFlag2 MovementFlags2; public uint Time; public float JumpVelocity; public float Cos; public float Sin; public float CurrentSpeed; public uint FallTime; public ObjectMovementValues() { } public ObjectMovementValues(UpdateFlag updateflags) { this.IsSelf = ((updateflags & UpdateFlag.Self) > (UpdateFlag)0); this.IsAlive = ((updateflags & UpdateFlag.Alive) > (UpdateFlag)0); this.HasRotation = ((updateflags & UpdateFlag.Rotation) > (UpdateFlag)0); this.HasStationaryPosition = ((updateflags & UpdateFlag.StationaryPosition) > (UpdateFlag)0); this.HasTarget = ((updateflags & UpdateFlag.Target) > (UpdateFlag)0); this.IsTransport = ((updateflags & UpdateFlag.Transport) > (UpdateFlag)0); this.HasGoTransportPosition = ((updateflags & UpdateFlag.GoTransportPosition) > (UpdateFlag)0); this.HasAnimKits = ((updateflags & UpdateFlag.AnimKits) > (UpdateFlag)0); this.IsVehicle = ((updateflags & UpdateFlag.Vehicle) > (UpdateFlag)0); } } } <file_sep>/Google.Protobuf/ByteString.cs using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Text; namespace Google.Protobuf { [ComVisible(true)] public sealed class ByteString : IEnumerable, IEnumerable<byte>, IEquatable<ByteString> { internal static class Unsafe { internal static ByteString FromBytes(byte[] bytes) { return new ByteString(bytes); } internal static byte[] GetBuffer(ByteString bytes) { return bytes.bytes; } } private static readonly ByteString empty = new ByteString(new byte[0]); private readonly byte[] bytes; public static ByteString Empty { get { return ByteString.empty; } } public int Length { get { return this.bytes.Length; } } public bool IsEmpty { get { return this.Length == 0; } } public byte this[int index] { get { return this.bytes[index]; } } internal static ByteString AttachBytes(byte[] bytes) { return new ByteString(bytes); } private ByteString(byte[] bytes) { this.bytes = bytes; } public byte[] ToByteArray() { return (byte[])ByteString.smethod_0(this.bytes); } public string ToBase64() { return ByteString.smethod_1(this.bytes); } public static ByteString FromBase64(string bytes) { if (!ByteString.smethod_2(bytes, "")) { return new ByteString(ByteString.smethod_3(bytes)); } return ByteString.Empty; } public static ByteString CopyFrom(params byte[] bytes) { return new ByteString((byte[])ByteString.smethod_0(bytes)); } public static ByteString CopyFrom(byte[] bytes, int offset, int count) { byte[] dst = new byte[count]; ByteArray.Copy(bytes, offset, dst, 0, count); return new ByteString(dst); } public static ByteString CopyFrom(string text, Encoding encoding) { return new ByteString(ByteString.smethod_4(encoding, text)); } public static ByteString CopyFromUtf8(string text) { return ByteString.CopyFrom(text, ByteString.smethod_5()); } public string ToString(Encoding encoding) { return ByteString.smethod_6(encoding, this.bytes, 0, this.bytes.Length); } public string ToStringUtf8() { return this.ToString(ByteString.smethod_5()); } public IEnumerator<byte> GetEnumerator() { return ((IEnumerable<byte>)this.bytes).GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); } public CodedInputStream CreateCodedInput() { return new CodedInputStream(this.bytes); } public static bool operator ==(ByteString lhs, ByteString rhs) { if (lhs == rhs) { goto IL_4C; } goto IL_13F; uint arg_EB_0; while (true) { IL_E6: uint num; switch ((num = (arg_EB_0 ^ 3015203442u)) % 14u) { case 0u: arg_EB_0 = (num * 1526800505u ^ 369249965u); continue; case 1u: return true; case 2u: goto IL_13F; case 3u: arg_EB_0 = ((lhs.bytes.Length == rhs.bytes.Length) ? 3810513461u : 2661449894u); continue; case 4u: arg_EB_0 = (((rhs == null) ? 797756859u : 1966787781u) ^ num * 3274123226u); continue; case 5u: return false; case 7u: { int num2 = 0; arg_EB_0 = 3362854364u; continue; } case 8u: return false; case 9u: { int num2; arg_EB_0 = ((rhs.bytes[num2] == lhs.bytes[num2]) ? 2540292665u : 3053227692u); continue; } case 10u: goto IL_4C; case 11u: { int num2; arg_EB_0 = ((num2 >= lhs.Length) ? 4291605266u : 2382418493u); continue; } case 12u: return false; case 13u: { int num2; num2++; arg_EB_0 = 3284674451u; continue; } } break; } return true; IL_4C: arg_EB_0 = 3390293503u; goto IL_E6; IL_13F: arg_EB_0 = ((lhs == null) ? 3671513855u : 3857634200u); goto IL_E6; } public static bool operator !=(ByteString lhs, ByteString rhs) { return !(lhs == rhs); } public override bool Equals(object obj) { return this == obj as ByteString; } public override int GetHashCode() { int num = 23; byte[] array = this.bytes; while (true) { IL_A1: uint arg_78_0 = 1378755444u; while (true) { uint num2; switch ((num2 = (arg_78_0 ^ 428542771u)) % 7u) { case 0u: arg_78_0 = (num2 * 3625772926u ^ 3541393194u); continue; case 1u: { int num3; arg_78_0 = ((num3 >= array.Length) ? 1921554962u : 562842858u); continue; } case 2u: { int num3; num3++; arg_78_0 = (num2 * 2042663034u ^ 425373550u); continue; } case 3u: goto IL_A1; case 4u: { int num3; byte b = array[num3]; num = (num << 8 | (int)b); arg_78_0 = 581374215u; continue; } case 6u: { int num3 = 0; arg_78_0 = (num2 * 2147684290u ^ 2262103751u); continue; } } return num; } } return num; } public bool Equals(ByteString other) { return this == other; } internal void WriteRawBytesTo(CodedOutputStream outputStream) { outputStream.WriteRawBytes(this.bytes, 0, this.bytes.Length); } public void CopyTo(byte[] array, int position) { ByteArray.Copy(this.bytes, 0, array, position, this.bytes.Length); } public void WriteTo(Stream outputStream) { ByteString.smethod_7(outputStream, this.bytes, 0, this.bytes.Length); } static object smethod_0(Array array_0) { return array_0.Clone(); } static string smethod_1(byte[] byte_0) { return Convert.ToBase64String(byte_0); } static bool smethod_2(string string_0, string string_1) { return string_0 == string_1; } static byte[] smethod_3(string string_0) { return Convert.FromBase64String(string_0); } static byte[] smethod_4(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static Encoding smethod_5() { return Encoding.UTF8; } static string smethod_6(Encoding encoding_0, byte[] byte_0, int int_0, int int_1) { return encoding_0.GetString(byte_0, int_0, int_1); } static void smethod_7(Stream stream_0, byte[] byte_0, int int_0, int int_1) { stream_0.Write(byte_0, int_0, int_1); } } } <file_sep>/AuthServer/Sandbox.cs using AuthServer.Configuration; using AuthServer.Game.Entities; using AuthServer.Game.Chat; using AuthServer.Managers; using AuthServer.Network; using AuthServer.Packets; using AuthServer.WorldServer.Game.Packets; using AuthServer.WorldServer.Managers; using Bgs.Protocol.Connection.V1; using Framework.Constants.Misc; using Framework.Logging; using Framework.Misc; using Framework.Serialization; using Google.Protobuf.Reflection; using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; namespace AuthServer { internal class Sandbox { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Sandbox.__c __9 = new Sandbox.__c(); public static ThreadStart __9__1_0; public static ThreadStart __9__1_1; public static ThreadStart __9__1_3; public static ThreadStart __9__1_2; internal void <Main>b__1_0() { new Server(AuthConfig.BindIP, 8000, false); AuthServer.Packets.PacketManager.Initialize(); while (true) { IL_47: uint arg_2F_0 = 5108531u; while (true) { uint num; switch ((num = (arg_2F_0 ^ 1907576337u)) % 3u) { case 0u: goto IL_47; case 2u: AuthServer.Managers.Manager.Initialize(); arg_2F_0 = (num * 1653129125u ^ 1942729776u); continue; } goto Block_1; } } while (true) { IL_4E: Sandbox.__c.smethod_0(5); } Block_1: goto IL_4E; } internal void <Main>b__1_1() { new Server(AuthConfig.BindIP, 8001, true); while (true) { Sandbox.__c.smethod_0(5); } } internal void <Main>b__1_2() { AuthServer.WorldServer.Managers.Manager.Initialize(); WorldClass.world = new WorldNetwork(); while (true) { IL_22D: uint arg_1E8_0 = 3352817744u; while (true) { uint num; switch ((num = (arg_1E8_0 ^ 2174237086u)) % 14u) { case 0u: Log.Message(LogType.Info, Module.smethod_36<string>(3199210790u), Array.Empty<object>()); arg_1E8_0 = (num * 293830216u ^ 3785111977u); continue; case 1u: arg_1E8_0 = (num * 1159999155u ^ 2715109765u); continue; case 3u: Log.Message(LogType.Info, Module.smethod_33<string>(3408924807u), Array.Empty<object>()); arg_1E8_0 = (num * 2188278457u ^ 3075230937u); continue; case 4u: WorldClass.world.AcceptConnectionThread(); arg_1E8_0 = (num * 1988231028u ^ 1363700904u); continue; case 5u: goto IL_22D; case 6u: arg_1E8_0 = ((WorldClass.world.Start(Module.smethod_35<string>(78051837u), 8085) ? 4111792120u : 2412095149u) ^ num * 2486324963u); continue; case 7u: Log.Message(LogType.Info, Module.smethod_33<string>(264622139u), Array.Empty<object>()); arg_1E8_0 = (num * 4255687717u ^ 170489561u); continue; case 8u: Log.Message(LogType.Info, Module.smethod_34<string>(290469369u), Array.Empty<object>()); arg_1E8_0 = (num * 2824688434u ^ 3191605882u); continue; case 9u: Log.Message(LogType.Info, Module.smethod_33<string>(967570713u), Array.Empty<object>()); arg_1E8_0 = (num * 3591803169u ^ 1592472184u); continue; case 10u: { ThreadStart arg_AB_0; if ((arg_AB_0 = Sandbox.__c.__9__1_3) == null) { arg_AB_0 = (Sandbox.__c.__9__1_3 = new ThreadStart(Sandbox.__c.__9.<Main>b__1_3)); } Sandbox.__c.smethod_2(Sandbox.__c.smethod_1(arg_AB_0)); arg_1E8_0 = 3635468527u; continue; } case 11u: Log.Message(LogType.Error, Module.smethod_36<string>(2638766104u), Array.Empty<object>()); arg_1E8_0 = 2534700142u; continue; case 12u: AuthServer.WorldServer.Game.Packets.PacketManager.DefineOpcodeHandler(); ChatCommandParser.DefineChatCommands(); arg_1E8_0 = (num * 3339465046u ^ 1488328179u); continue; case 13u: Log.Message(LogType.Normal, Module.smethod_37<string>(3623392228u), Array.Empty<object>()); Log.Message(LogType.Info, Module.smethod_37<string>(2659212889u), Array.Empty<object>()); arg_1E8_0 = (num * 2429953406u ^ 1192654773u); continue; } return; } } } internal void <Main>b__1_3() { WorldClass2.world = new WorldNetwork(); while (true) { IL_DA: uint arg_AE_0 = 3787839266u; while (true) { uint num; switch ((num = (arg_AE_0 ^ 3818991086u)) % 8u) { case 0u: Log.Message(LogType.Error, Module.smethod_36<string>(2638766104u), Array.Empty<object>()); arg_AE_0 = 2821928925u; continue; case 1u: WorldClass2.world.AcceptConnectionThread2(); arg_AE_0 = (num * 2867472236u ^ 24152677u); continue; case 2u: ChatCommandParser.DefineChatCommands2(); arg_AE_0 = (num * 2966987160u ^ 772862995u); continue; case 4u: arg_AE_0 = ((WorldClass2.world.Start(Module.smethod_33<string>(3600904718u), 3724) ? 4080538975u : 2924591654u) ^ num * 1703302812u); continue; case 5u: return; case 6u: goto IL_DA; case 7u: AuthServer.WorldServer.Game.Packets.PacketManager.DefineOpcodeHandler2(); arg_AE_0 = (num * 3421968766u ^ 2603198422u); continue; } return; } } } static void smethod_0(int int_0) { Thread.Sleep(int_0); } static Thread smethod_1(ThreadStart threadStart_0) { return new Thread(threadStart_0); } static void smethod_2(Thread thread_0) { thread_0.Start(); } } public static uint StartTime; public static void Main(string[] args) { Sandbox.smethod_1(Sandbox.smethod_0()); while (true) { IL_371: uint arg_311_0 = 1708240695u; while (true) { uint num; switch ((num = (arg_311_0 ^ 2105863856u)) % 20u) { case 0u: Log.Message(LogType.Init, Module.smethod_37<string>(1637150350u), Array.Empty<object>()); arg_311_0 = (num * 1471496522u ^ 1690010414u); continue; case 1u: Log.Message(LogType.Init, Module.smethod_35<string>(609652459u), Array.Empty<object>()); arg_311_0 = (num * 4061345325u ^ 1360549289u); continue; case 2u: Log.Message(LogType.Init, Module.smethod_37<string>(1403407225u), Array.Empty<object>()); Log.Message(); arg_311_0 = (num * 2004520375u ^ 3273204487u); continue; case 3u: Log.Message(LogType.Error, Module.smethod_35<string>(4093259155u), Array.Empty<object>()); Log.Message(LogType.Normal, Module.smethod_35<string>(3057977245u), Array.Empty<object>()); arg_311_0 = (num * 2349762838u ^ 2034718379u); continue; case 4u: Log.Message(LogType.Init, Module.smethod_37<string>(848270987u), Array.Empty<object>()); arg_311_0 = (num * 3772370626u ^ 3471602137u); continue; case 5u: { ThreadStart arg_229_0; if ((arg_229_0 = Sandbox.__c.__9__1_0) == null) { arg_229_0 = (Sandbox.__c.__9__1_0 = new ThreadStart(Sandbox.__c.__9.<Main>b__1_0)); } Sandbox.smethod_7(Sandbox.smethod_6(arg_229_0)); arg_311_0 = 1664077542u; continue; } case 7u: { ThreadStart arg_1F6_0; if ((arg_1F6_0 = Sandbox.__c.__9__1_2) == null) { arg_1F6_0 = (Sandbox.__c.__9__1_2 = new ThreadStart(Sandbox.__c.__9.<Main>b__1_2)); } Sandbox.smethod_7(Sandbox.smethod_6(arg_1F6_0)); arg_311_0 = 1361824293u; continue; } case 8u: Sandbox.smethod_5(5000); arg_311_0 = (num * 990183502u ^ 3401419919u); continue; case 9u: arg_311_0 = ((Sandbox.smethod_8(Module.smethod_34<string>(2772407875u)) ? 1364857755u : 87273350u) ^ num * 4016381820u); continue; case 10u: goto IL_371; case 11u: { string string_ = Json.CreateString<List<Character>>(Serializator.Get<Character>(Sandbox.smethod_9(Helper.DataDirectory(), Module.smethod_33<string>(2623051613u)))); Sandbox.smethod_10(Module.smethod_37<string>(234721071u), string_); Sandbox.smethod_11(Module.smethod_37<string>(1841686636u)); arg_311_0 = (num * 142752336u ^ 2054263962u); continue; } case 12u: Sandbox.smethod_3(Sandbox.smethod_2(Module.smethod_36<string>(3052620371u))); arg_311_0 = (num * 1503141282u ^ 4077129067u); continue; case 14u: { ThreadStart arg_EC_0; if ((arg_EC_0 = Sandbox.__c.__9__1_1) == null) { arg_EC_0 = (Sandbox.__c.__9__1_1 = new ThreadStart(Sandbox.__c.__9.<Main>b__1_1)); } Sandbox.smethod_7(Sandbox.smethod_6(arg_EC_0)); arg_311_0 = 1522564795u; continue; } case 15u: Sandbox.smethod_4(Sandbox.smethod_2(Module.smethod_33<string>(2028753384u))); arg_311_0 = (num * 622432704u ^ 3549537790u); continue; case 16u: Log.Message(); Log.Message(LogType.Error, Module.smethod_36<string>(1831258573u), Array.Empty<object>()); Log.Message(); arg_311_0 = (num * 3302199861u ^ 357139032u); continue; case 17u: Log.Message(LogType.Info, Module.smethod_37<string>(3565509028u), Array.Empty<object>()); arg_311_0 = (num * 3493419402u ^ 3084770070u); continue; case 18u: AuthConfig.ReadConfig(); Helper.PrintHeader(Module.smethod_36<string>(734380862u)); arg_311_0 = (num * 1757761741u ^ 908751518u); continue; case 19u: { FileDescriptor arg_15_0 = ConnectionServiceReflection.Descriptor; arg_311_0 = (num * 2838421996u ^ 2086787572u); continue; } } Sandbox.smethod_5(5); arg_311_0 = 431780641u; } } } static Assembly smethod_0() { return Assembly.GetExecutingAssembly(); } static string[] smethod_1(Assembly assembly_0) { return assembly_0.GetManifestResourceNames(); } static CultureInfo smethod_2(string string_0) { return CultureInfo.GetCultureInfo(string_0); } static void smethod_3(CultureInfo cultureInfo_0) { CultureInfo.DefaultThreadCurrentCulture = cultureInfo_0; } static void smethod_4(CultureInfo cultureInfo_0) { CultureInfo.DefaultThreadCurrentUICulture = cultureInfo_0; } static void smethod_5(int int_0) { Thread.Sleep(int_0); } static Thread smethod_6(ThreadStart threadStart_0) { return new Thread(threadStart_0); } static void smethod_7(Thread thread_0) { thread_0.Start(); } static bool smethod_8(string string_0) { return File.Exists(string_0); } static string smethod_9(string string_0, string string_1) { return string_0 + string_1; } static void smethod_10(string string_0, string string_1) { File.WriteAllText(string_0, string_1); } static void smethod_11(string string_0) { File.Delete(string_0); } } } <file_sep>/Bgs.Protocol.Config/RPCMeterConfig.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Config { [DebuggerNonUserCode] public sealed class RPCMeterConfig : IMessage<RPCMeterConfig>, IEquatable<RPCMeterConfig>, IDeepCloneable<RPCMeterConfig>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RPCMeterConfig.__c __9 = new RPCMeterConfig.__c(); internal RPCMeterConfig cctor>b__44_0() { return new RPCMeterConfig(); } } private static readonly MessageParser<RPCMeterConfig> _parser = new MessageParser<RPCMeterConfig>(new Func<RPCMeterConfig>(RPCMeterConfig.__c.__9.<.cctor>b__44_0)); public const int MethodFieldNumber = 1; private static readonly FieldCodec<RPCMethodConfig> _repeated_method_codec; private readonly RepeatedField<RPCMethodConfig> method_ = new RepeatedField<RPCMethodConfig>(); public const int IncomePerSecondFieldNumber = 2; private uint incomePerSecond_; public const int InitialBalanceFieldNumber = 3; private uint initialBalance_; public const int CapBalanceFieldNumber = 4; private uint capBalance_; public const int StartupPeriodFieldNumber = 5; private float startupPeriod_; public static MessageParser<RPCMeterConfig> Parser { get { return RPCMeterConfig._parser; } } public static MessageDescriptor Descriptor { get { return RpcConfigReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return RPCMeterConfig.Descriptor; } } public RepeatedField<RPCMethodConfig> Method { get { return this.method_; } } public uint IncomePerSecond { get { return this.incomePerSecond_; } set { this.incomePerSecond_ = value; } } public uint InitialBalance { get { return this.initialBalance_; } set { this.initialBalance_ = value; } } public uint CapBalance { get { return this.capBalance_; } set { this.capBalance_ = value; } } public float StartupPeriod { get { return this.startupPeriod_; } set { this.startupPeriod_ = value; } } public RPCMeterConfig() { } public RPCMeterConfig(RPCMeterConfig other) : this() { while (true) { IL_7A: uint arg_5E_0 = 2578826414u; while (true) { uint num; switch ((num = (arg_5E_0 ^ 3722312116u)) % 4u) { case 0u: goto IL_7A; case 2u: this.method_ = other.method_.Clone(); arg_5E_0 = (num * 2891572958u ^ 137931275u); continue; case 3u: this.incomePerSecond_ = other.incomePerSecond_; this.initialBalance_ = other.initialBalance_; this.capBalance_ = other.capBalance_; arg_5E_0 = (num * 854752895u ^ 1583635436u); continue; } goto Block_1; } } Block_1: this.startupPeriod_ = other.startupPeriod_; } public RPCMeterConfig Clone() { return new RPCMeterConfig(this); } public override bool Equals(object other) { return this.Equals(other as RPCMeterConfig); } public bool Equals(RPCMeterConfig other) { if (other == null) { goto IL_98; } goto IL_146; int arg_F0_0; while (true) { IL_EB: switch ((arg_F0_0 ^ 1688334249) % 15) { case 0: arg_F0_0 = ((this.InitialBalance == other.InitialBalance) ? 390098876 : 999748883); continue; case 1: return false; case 2: return false; case 3: return false; case 4: arg_F0_0 = ((this.StartupPeriod == other.StartupPeriod) ? 10505267 : 1032044307); continue; case 5: goto IL_98; case 6: arg_F0_0 = ((this.IncomePerSecond == other.IncomePerSecond) ? 2038216547 : 644256818); continue; case 7: return false; case 8: return false; case 9: arg_F0_0 = ((this.CapBalance != other.CapBalance) ? 302230513 : 116988619); continue; case 10: goto IL_146; case 11: return true; case 12: arg_F0_0 = (this.method_.Equals(other.method_) ? 301108216 : 791381753); continue; case 14: return false; } break; } return true; IL_98: arg_F0_0 = 496386684; goto IL_EB; IL_146: arg_F0_0 = ((other == this) ? 1737799138 : 394189334); goto IL_EB; } public override int GetHashCode() { int num = 1 ^ RPCMeterConfig.smethod_0(this.method_); while (true) { IL_16A: uint arg_135_0 = 1052430560u; while (true) { uint num2; switch ((num2 = (arg_135_0 ^ 1163529799u)) % 10u) { case 1u: arg_135_0 = (((this.IncomePerSecond == 0u) ? 1951839132u : 1962415719u) ^ num2 * 2882211435u); continue; case 2u: arg_135_0 = ((this.StartupPeriod == 0f) ? 1558069511u : 1801060398u); continue; case 3u: arg_135_0 = ((this.CapBalance == 0u) ? 963726355u : 1156117777u); continue; case 4u: goto IL_16A; case 5u: num ^= this.StartupPeriod.GetHashCode(); arg_135_0 = (num2 * 2635843949u ^ 3619148466u); continue; case 6u: num ^= this.CapBalance.GetHashCode(); arg_135_0 = (num2 * 1075804795u ^ 895414849u); continue; case 7u: num ^= this.IncomePerSecond.GetHashCode(); arg_135_0 = (num2 * 3795388469u ^ 4124546112u); continue; case 8u: arg_135_0 = ((this.InitialBalance != 0u) ? 2064891506u : 167788752u); continue; case 9u: num ^= this.InitialBalance.GetHashCode(); arg_135_0 = (num2 * 4294609835u ^ 1990671031u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.method_.WriteTo(output, RPCMeterConfig._repeated_method_codec); while (true) { IL_1A3: uint arg_166_0 = 1333377318u; while (true) { uint num; switch ((num = (arg_166_0 ^ 597997360u)) % 12u) { case 0u: arg_166_0 = ((this.InitialBalance == 0u) ? 499486653u : 1310726572u); continue; case 1u: output.WriteRawTag(32); arg_166_0 = (num * 522113231u ^ 3889755070u); continue; case 2u: arg_166_0 = (((this.IncomePerSecond != 0u) ? 1765629824u : 2067176046u) ^ num * 2723197415u); continue; case 3u: goto IL_1A3; case 4u: output.WriteRawTag(24); output.WriteUInt32(this.InitialBalance); arg_166_0 = (num * 3488937359u ^ 2771212953u); continue; case 5u: arg_166_0 = ((this.CapBalance != 0u) ? 1743189125u : 1086415274u); continue; case 6u: output.WriteRawTag(16); output.WriteUInt32(this.IncomePerSecond); arg_166_0 = (num * 3661362704u ^ 2577687316u); continue; case 8u: output.WriteFloat(this.StartupPeriod); arg_166_0 = (num * 1840586503u ^ 1727679927u); continue; case 9u: output.WriteUInt32(this.CapBalance); arg_166_0 = (num * 1445661512u ^ 3447266114u); continue; case 10u: arg_166_0 = ((this.StartupPeriod != 0f) ? 1575057383u : 827179671u); continue; case 11u: output.WriteRawTag(45); arg_166_0 = (num * 4136678150u ^ 3618726618u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_175: uint arg_13C_0 = 2016739239u; while (true) { uint num2; switch ((num2 = (arg_13C_0 ^ 725896283u)) % 11u) { case 0u: arg_13C_0 = ((this.StartupPeriod == 0f) ? 402995745u : 596491352u); continue; case 1u: num += this.method_.CalculateSize(RPCMeterConfig._repeated_method_codec); arg_13C_0 = (num2 * 4135867793u ^ 3835198383u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.InitialBalance); arg_13C_0 = (num2 * 2232036700u ^ 1952523884u); continue; case 3u: arg_13C_0 = (((this.IncomePerSecond != 0u) ? 4119260048u : 3486124219u) ^ num2 * 1864114193u); continue; case 4u: arg_13C_0 = ((this.InitialBalance == 0u) ? 1592555804u : 1833719263u); continue; case 5u: goto IL_175; case 6u: arg_13C_0 = ((this.CapBalance != 0u) ? 1983416091u : 1852139680u); continue; case 8u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.IncomePerSecond); arg_13C_0 = (num2 * 1967391490u ^ 1218354549u); continue; case 9u: num += 5; arg_13C_0 = (num2 * 4037485016u ^ 3426934697u); continue; case 10u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.CapBalance); arg_13C_0 = (num2 * 817728135u ^ 3472541280u); continue; } return num; } } return num; } public void MergeFrom(RPCMeterConfig other) { if (other == null) { goto IL_26; } goto IL_158; uint arg_11B_0; while (true) { IL_116: uint num; switch ((num = (arg_11B_0 ^ 496466141u)) % 12u) { case 0u: this.CapBalance = other.CapBalance; arg_11B_0 = (num * 1230496058u ^ 851076195u); continue; case 1u: arg_11B_0 = ((other.InitialBalance != 0u) ? 425567942u : 303095906u); continue; case 2u: arg_11B_0 = ((other.StartupPeriod == 0f) ? 423546011u : 254282629u); continue; case 3u: return; case 4u: this.StartupPeriod = other.StartupPeriod; arg_11B_0 = (num * 1375253155u ^ 3127340435u); continue; case 5u: arg_11B_0 = (((other.IncomePerSecond == 0u) ? 2413130625u : 2251114096u) ^ num * 3803037813u); continue; case 7u: arg_11B_0 = ((other.CapBalance == 0u) ? 2134895683u : 1795069837u); continue; case 8u: this.IncomePerSecond = other.IncomePerSecond; arg_11B_0 = (num * 1591333419u ^ 405411964u); continue; case 9u: goto IL_158; case 10u: goto IL_26; case 11u: this.InitialBalance = other.InitialBalance; arg_11B_0 = (num * 653589978u ^ 1475162524u); continue; } break; } return; IL_26: arg_11B_0 = 141638786u; goto IL_116; IL_158: this.method_.Add(other.method_); arg_11B_0 = 1223588268u; goto IL_116; } public void MergeFrom(CodedInputStream input) { while (true) { IL_259: uint num; uint arg_1E9_0 = ((num = input.ReadTag()) == 0u) ? 3385299684u : 3871052133u; while (true) { uint num2; switch ((num2 = (arg_1E9_0 ^ 3295332274u)) % 21u) { case 0u: this.InitialBalance = input.ReadUInt32(); arg_1E9_0 = 3822153306u; continue; case 1u: arg_1E9_0 = (num2 * 49434523u ^ 2688118764u); continue; case 2u: arg_1E9_0 = ((num != 24u) ? 3758006521u : 3225586364u); continue; case 3u: arg_1E9_0 = (((num == 10u) ? 3415969199u : 2343944072u) ^ num2 * 2696633915u); continue; case 4u: arg_1E9_0 = (((num != 16u) ? 1858706996u : 117608996u) ^ num2 * 2029877209u); continue; case 5u: arg_1E9_0 = (((num != 32u) ? 968007412u : 434497921u) ^ num2 * 3064593234u); continue; case 6u: arg_1E9_0 = (num2 * 764588774u ^ 1328886873u); continue; case 7u: this.StartupPeriod = input.ReadFloat(); arg_1E9_0 = 2648807253u; continue; case 8u: goto IL_259; case 9u: input.SkipLastField(); arg_1E9_0 = 3662182736u; continue; case 10u: arg_1E9_0 = ((num > 16u) ? 3549269606u : 3067280891u); continue; case 11u: arg_1E9_0 = (num2 * 311052518u ^ 400589325u); continue; case 12u: arg_1E9_0 = (num2 * 3240426239u ^ 966482253u); continue; case 13u: arg_1E9_0 = (((num != 45u) ? 2035394971u : 211302189u) ^ num2 * 905176672u); continue; case 14u: arg_1E9_0 = (num2 * 3943773180u ^ 3748566655u); continue; case 16u: this.method_.AddEntriesFrom(input, RPCMeterConfig._repeated_method_codec); arg_1E9_0 = 2814231224u; continue; case 17u: this.CapBalance = input.ReadUInt32(); arg_1E9_0 = 4218496905u; continue; case 18u: arg_1E9_0 = 3871052133u; continue; case 19u: this.IncomePerSecond = input.ReadUInt32(); arg_1E9_0 = 2450525206u; continue; case 20u: arg_1E9_0 = (num2 * 1535555739u ^ 2917837403u); continue; } return; } } } static RPCMeterConfig() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 2868421256u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2373402144u)) % 3u) { case 0u: goto IL_57; case 2u: RPCMeterConfig._repeated_method_codec = FieldCodec.ForMessage<RPCMethodConfig>(10u, RPCMethodConfig.Parser); arg_3F_0 = (num * 334432441u ^ 1666815779u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/MemModuleLoadResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class MemModuleLoadResponse : IMessage<MemModuleLoadResponse>, IEquatable<MemModuleLoadResponse>, IDeepCloneable<MemModuleLoadResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MemModuleLoadResponse.__c __9 = new MemModuleLoadResponse.__c(); internal MemModuleLoadResponse cctor>b__24_0() { return new MemModuleLoadResponse(); } } private static readonly MessageParser<MemModuleLoadResponse> _parser = new MessageParser<MemModuleLoadResponse>(new Func<MemModuleLoadResponse>(MemModuleLoadResponse.__c.__9.<.cctor>b__24_0)); public const int DataFieldNumber = 1; private ByteString data_ = ByteString.Empty; public static MessageParser<MemModuleLoadResponse> Parser { get { return MemModuleLoadResponse._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[14]; } } MessageDescriptor IMessage.Descriptor { get { return MemModuleLoadResponse.Descriptor; } } public ByteString Data { get { return this.data_; } set { this.data_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_35<string>(4287036u)); } } public MemModuleLoadResponse() { } public MemModuleLoadResponse(MemModuleLoadResponse other) : this() { while (true) { IL_3E: uint arg_26_0 = 2225156761u; while (true) { uint num; switch ((num = (arg_26_0 ^ 3291385310u)) % 3u) { case 1u: this.data_ = other.data_; arg_26_0 = (num * 612533839u ^ 2772005066u); continue; case 2u: goto IL_3E; } return; } } } public MemModuleLoadResponse Clone() { return new MemModuleLoadResponse(this); } public override bool Equals(object other) { return this.Equals(other as MemModuleLoadResponse); } public bool Equals(MemModuleLoadResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1659638366) % 7) { case 0: goto IL_7A; case 1: arg_48_0 = ((this.Data != other.Data) ? -1755534720 : -868457710); continue; case 3: return false; case 4: return false; case 5: goto IL_12; case 6: return true; } break; } return true; IL_12: arg_48_0 = -2062170989; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -435506360 : -958129923); goto IL_43; } public override int GetHashCode() { return 1 ^ MemModuleLoadResponse.smethod_0(this.Data); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteBytes(this.Data); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeBytesSize(this.Data)); } public void MergeFrom(MemModuleLoadResponse other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 639490967u)) % 5u) { case 1u: goto IL_63; case 2u: this.Data = other.Data; arg_37_0 = (num * 1114774024u ^ 1098709182u); continue; case 3u: return; case 4u: goto IL_12; } break; } return; IL_12: arg_37_0 = 806021679u; goto IL_32; IL_63: arg_37_0 = ((other.Data.Length == 0) ? 1761134990u : 1250275633u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) == 0u) ? 1131039098u : 1382621794u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 297379284u)) % 7u) { case 0u: arg_72_0 = (num2 * 71235794u ^ 1310614366u); continue; case 1u: arg_72_0 = ((num != 10u) ? 614668152u : 91625337u); continue; case 2u: input.SkipLastField(); arg_72_0 = (num2 * 2628716216u ^ 3162790274u); continue; case 3u: this.Data = input.ReadBytes(); arg_72_0 = 2054947986u; continue; case 4u: goto IL_A9; case 6u: arg_72_0 = 1382621794u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.WorldServer.Game.Packets.PacketHandler/GarrisonHandler.cs using AuthServer.Network; using Framework.Constants.Net; using Framework.Network.Packets; using System; using System.IO; using System.Runtime.CompilerServices; namespace AuthServer.WorldServer.Game.Packets.PacketHandler { internal class GarrisonHandler { public static void HandleGarrisonArchitectShow(ref WorldClass session) { PacketWriter writer = new PacketWriter(ServerMessage.GarrisonArchitectShow, true); while (true) { IL_DF: uint arg_BB_0 = 519852802u; while (true) { uint num; switch ((num = (arg_BB_0 ^ 2020681083u)) % 6u) { case 0u: { BitPack bitPack; BitPack arg_9B_0 = bitPack; byte[] expr_90 = new byte[8]; GarrisonHandler.smethod_0(expr_90, fieldof(<PrivateImplementationDetails>.A6356C34D834F1378076C055107CCAC50CB8FD29).FieldHandle); arg_9B_0.WriteGuidBytes(expr_90); session.Send(ref writer); arg_BB_0 = (num * 633679243u ^ 2700141092u); continue; } case 2u: { BitPack bitPack; BitPack arg_75_0 = bitPack; byte[] expr_6A = new byte[8]; GarrisonHandler.smethod_0(expr_6A, fieldof(<PrivateImplementationDetails>.B5D22AB939F65E39BB62E1597149F6799F44E90B).FieldHandle); arg_75_0.WriteGuidMask(expr_6A); arg_BB_0 = (num * 3489683734u ^ 862438344u); continue; } case 3u: { BitPack bitPack; bitPack.Flush(); arg_BB_0 = (num * 2364201028u ^ 2081367199u); continue; } case 4u: goto IL_DF; case 5u: { BitPack bitPack = new BitPack(writer, session.Character.Guid, 0uL, 0uL, 0uL); arg_BB_0 = (num * 3788217399u ^ 2705928972u); continue; } } return; } } } [Opcode(ClientMessage.GetGarrisonInfo, "17930")] public static void HandleGetGarrisonInfo(ref PacketReader packet, WorldClass session) { GarrisonHandler.HandleGetGarrisonInfoResult(ref session, false); } [Opcode(ClientMessage.UpgradeGarrison, "17930")] public static void HandleUpgradeGarrison(ref PacketReader packet, WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.GarrisonUpgradeResult, true); while (true) { IL_AF: uint arg_8F_0 = 4193328415u; while (true) { uint num; switch ((num = (arg_8F_0 ^ 3693211980u)) % 5u) { case 0u: GarrisonHandler.smethod_1(packetWriter, 2); GarrisonHandler.smethod_1(packetWriter, 2); arg_8F_0 = (num * 888375759u ^ 4118426997u); continue; case 2u: goto IL_AF; case 3u: session.Send(ref packetWriter); arg_8F_0 = (num * 1459184172u ^ 711672708u); continue; case 4u: { BitPack expr_3D = new BitPack(packetWriter, session.Character.Guid, 0uL, 0uL, 0uL); expr_3D.Write<int>(1); expr_3D.Flush(); arg_8F_0 = (num * 1902694356u ^ 1637576038u); continue; } } return; } } } public static void HandleGetGarrisonInfoResult(ref WorldClass session, bool sendFollower = false) { PacketWriter packetWriter = new PacketWriter(ServerMessage.GetGarrisonInfoResult, true); while (true) { IL_562: uint arg_4C5_0 = 3561853899u; while (true) { uint num; switch ((num = (arg_4C5_0 ^ 2830501285u)) % 36u) { case 0u: GarrisonHandler.smethod_1(packetWriter, 32); GarrisonHandler.smethod_1(packetWriter, 40); arg_4C5_0 = (num * 825722682u ^ 121559643u); continue; case 1u: GarrisonHandler.smethod_1(packetWriter, 10); GarrisonHandler.smethod_1(packetWriter, 30); arg_4C5_0 = (num * 961562074u ^ 2501287071u); continue; case 2u: GarrisonHandler.smethod_1(packetWriter, 1); arg_4C5_0 = (num * 4032344731u ^ 1067531926u); continue; case 3u: GarrisonHandler.smethod_1(packetWriter, 79376); arg_4C5_0 = (num * 4136917369u ^ 2773565368u); continue; case 4u: GarrisonHandler.smethod_1(packetWriter, 100); arg_4C5_0 = (num * 149461949u ^ 2307757127u); continue; case 5u: GarrisonHandler.smethod_1(packetWriter, 9999999); GarrisonHandler.smethod_1(packetWriter, 9999999); GarrisonHandler.smethod_1(packetWriter, 7); arg_4C5_0 = (num * 17051684u ^ 728896212u); continue; case 6u: GarrisonHandler.smethod_1(packetWriter, 100); arg_4C5_0 = (num * 4045292107u ^ 287597023u); continue; case 7u: GarrisonHandler.smethod_1(packetWriter, 2); arg_4C5_0 = (num * 2151162458u ^ 1542205032u); continue; case 8u: GarrisonHandler.smethod_3(packetWriter, session.Character.Faction); GarrisonHandler.smethod_1(packetWriter, 8); GarrisonHandler.smethod_1(packetWriter, 3); session.Send(ref packetWriter); arg_4C5_0 = (num * 910955810u ^ 2809289210u); continue; case 9u: GarrisonHandler.smethod_1(packetWriter, 90); arg_4C5_0 = (num * 2327499916u ^ 236408667u); continue; case 10u: GarrisonHandler.smethod_1(packetWriter, 5); arg_4C5_0 = (num * 2606565209u ^ 2979529350u); continue; case 11u: GarrisonHandler.smethod_1(packetWriter, 2); GarrisonHandler.smethod_1(packetWriter, 200); arg_4C5_0 = (num * 77438082u ^ 1956769023u); continue; case 12u: GarrisonHandler.smethod_1(packetWriter, 1); GarrisonHandler.smethod_1(packetWriter, 14); GarrisonHandler.smethod_1(packetWriter, 15); arg_4C5_0 = (num * 4061237938u ^ 4062143700u); continue; case 13u: GarrisonHandler.smethod_1(packetWriter, 450); arg_4C5_0 = (num * 3690551919u ^ 1841607985u); continue; case 14u: GarrisonHandler.smethod_1(packetWriter, 6); GarrisonHandler.smethod_1(packetWriter, 4); GarrisonHandler.smethod_1(packetWriter, 7); GarrisonHandler.smethod_1(packetWriter, 18); arg_4C5_0 = (num * 2127045538u ^ 836825253u); continue; case 15u: GarrisonHandler.smethod_1(packetWriter, 100); GarrisonHandler.smethod_2(packetWriter, 6uL); arg_4C5_0 = (num * 4068629923u ^ 1039405337u); continue; case 16u: GarrisonHandler.smethod_1(packetWriter, 78009); arg_4C5_0 = (num * 3019492862u ^ 1788859454u); continue; case 17u: GarrisonHandler.smethod_1(packetWriter, 5); arg_4C5_0 = (num * 1098062784u ^ 3567512997u); continue; case 18u: GarrisonHandler.smethod_1(packetWriter, 0); GarrisonHandler.smethod_1(packetWriter, 100); arg_4C5_0 = (num * 1085281412u ^ 2566269497u); continue; case 20u: GarrisonHandler.smethod_1(packetWriter, 7); arg_4C5_0 = (num * 857096085u ^ 2760092355u); continue; case 21u: GarrisonHandler.smethod_1(packetWriter, 1); arg_4C5_0 = (num * 634702657u ^ 1687870474u); continue; case 22u: GarrisonHandler.smethod_1(packetWriter, 9999999); arg_4C5_0 = (num * 1888837307u ^ 145682651u); continue; case 23u: GarrisonHandler.smethod_1(packetWriter, 9999999); GarrisonHandler.smethod_2(packetWriter, 7uL); arg_4C5_0 = (num * 1093247655u ^ 1346875589u); continue; case 24u: GarrisonHandler.smethod_2(packetWriter, 18uL); arg_4C5_0 = (num * 3497617775u ^ 2338852855u); continue; case 25u: GarrisonHandler.smethod_1(packetWriter, 0); arg_4C5_0 = (num * 2645098000u ^ 2487509600u); continue; case 26u: { BitPack expr_142 = new BitPack(packetWriter, session.Character.Guid, 0uL, 0uL, 0uL); expr_142.Write<int>(0, 19); expr_142.Write<int>(2, 19); expr_142.Write<int>(0, 22); expr_142.Write<int>(0, 19); expr_142.Write<int>(2, 18); expr_142.Write<int>(2, 22); expr_142.Write<int>(3, 22); expr_142.Flush(); GarrisonHandler.smethod_1(packetWriter, 6); arg_4C5_0 = (num * 1643873379u ^ 3047625204u); continue; } case 27u: goto IL_562; case 28u: GarrisonHandler.smethod_2(packetWriter, 2uL); arg_4C5_0 = (num * 3009439549u ^ 962137315u); continue; case 29u: GarrisonHandler.smethod_1(packetWriter, 0); arg_4C5_0 = (num * 532258800u ^ 3210186917u); continue; case 30u: GarrisonHandler.smethod_1(packetWriter, 0); GarrisonHandler.smethod_1(packetWriter, 9999999); GarrisonHandler.smethod_1(packetWriter, 9999999); GarrisonHandler.smethod_1(packetWriter, 2); GarrisonHandler.smethod_1(packetWriter, 0); GarrisonHandler.smethod_1(packetWriter, 9999999); arg_4C5_0 = (num * 2179556401u ^ 563014784u); continue; case 31u: GarrisonHandler.smethod_1(packetWriter, 9999999); arg_4C5_0 = (num * 3285096176u ^ 2094535865u); continue; case 32u: GarrisonHandler.smethod_1(packetWriter, 100); arg_4C5_0 = (num * 3963403881u ^ 3293912424u); continue; case 33u: GarrisonHandler.smethod_1(packetWriter, 0); arg_4C5_0 = (num * 170033010u ^ 1448757196u); continue; case 34u: GarrisonHandler.smethod_1(packetWriter, 2); arg_4C5_0 = (num * 1417663002u ^ 325535084u); continue; case 35u: GarrisonHandler.smethod_1(packetWriter, 0); arg_4C5_0 = (num * 801168964u ^ 3012279010u); continue; } return; } } } public static void HandleGarrisonOpenMissionNPC(ref WorldClass session) { PacketWriter writer = new PacketWriter(ServerMessage.GarrisonOpenMissionNPC, true); while (true) { IL_C3: uint arg_A3_0 = 2714239886u; while (true) { uint num; switch ((num = (arg_A3_0 ^ 2392012593u)) % 5u) { case 0u: goto IL_C3; case 1u: { BitPack bitPack = new BitPack(writer, session.Character.Guid, 0uL, 0uL, 0uL); arg_A3_0 = (num * 2983679983u ^ 607895734u); continue; } case 2u: { BitPack bitPack; BitPack arg_49_0 = bitPack; byte[] expr_3E = new byte[8]; GarrisonHandler.smethod_0(expr_3E, fieldof(<PrivateImplementationDetails>.CDC007DD9FFBE9A681CA63B649C577839F6F7283).FieldHandle); arg_49_0.WriteGuidMask(expr_3E); bitPack.Flush(); arg_A3_0 = (num * 2707350706u ^ 1297577509u); continue; } case 3u: { BitPack bitPack; BitPack arg_23_0 = bitPack; byte[] expr_18 = new byte[8]; GarrisonHandler.smethod_0(expr_18, fieldof(<PrivateImplementationDetails>.long_1).FieldHandle); arg_23_0.WriteGuidBytes(expr_18); arg_A3_0 = (num * 39461106u ^ 4123022775u); continue; } } goto Block_1; } } Block_1: session.Send(ref writer); } public static void HandleOpenShipmentNPCFromGossip(ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.OpenShipmentNPCFromGossip, true); while (true) { IL_E6: uint arg_C2_0 = 1706632547u; while (true) { uint num; switch ((num = (arg_C2_0 ^ 826624662u)) % 6u) { case 0u: goto IL_E6; case 2u: { BitPack bitPack; BitPack arg_A4_0 = bitPack; byte[] expr_99 = new byte[8]; GarrisonHandler.smethod_0(expr_99, fieldof(<PrivateImplementationDetails>.D1CC183912176D7A58FD0DEA46BB48CBE1A343D4).FieldHandle); arg_A4_0.WriteGuidBytes(expr_99); GarrisonHandler.smethod_1(packetWriter, 1); arg_C2_0 = (num * 56463787u ^ 4222683955u); continue; } case 3u: session.Send(ref packetWriter); arg_C2_0 = (num * 3027281237u ^ 365100312u); continue; case 4u: { BitPack bitPack; bitPack.Flush(); arg_C2_0 = (num * 3682290592u ^ 368987776u); continue; } case 5u: { BitPack bitPack = new BitPack(packetWriter, session.Character.Guid, 0uL, 0uL, 0uL); BitPack arg_51_0 = bitPack; byte[] expr_46 = new byte[8]; GarrisonHandler.smethod_0(expr_46, fieldof(<PrivateImplementationDetails>.long_0).FieldHandle); arg_51_0.WriteGuidMask(expr_46); arg_C2_0 = (num * 3076292236u ^ 1337455236u); continue; } } return; } } } public static void HandleGarrisonAddMissionResult(ref WorldClass session) { PacketWriter binaryWriter_ = new PacketWriter(ServerMessage.GarrisonAddMissionResult, true); while (true) { IL_11F: uint arg_EA_0 = 2812564501u; while (true) { uint num; switch ((num = (arg_EA_0 ^ 2389566991u)) % 10u) { case 0u: GarrisonHandler.smethod_1(binaryWriter_, 1); arg_EA_0 = (num * 1624367509u ^ 2968768183u); continue; case 2u: session.Send(ref binaryWriter_); arg_EA_0 = (num * 1335241701u ^ 3614886240u); continue; case 3u: goto IL_11F; case 4u: GarrisonHandler.smethod_1(binaryWriter_, 9999999); arg_EA_0 = (num * 3413545384u ^ 3876579938u); continue; case 5u: GarrisonHandler.smethod_1(binaryWriter_, 0); arg_EA_0 = (num * 3099256018u ^ 276318819u); continue; case 6u: GarrisonHandler.smethod_1(binaryWriter_, 0); GarrisonHandler.smethod_1(binaryWriter_, 2); arg_EA_0 = (num * 3947976649u ^ 468107334u); continue; case 7u: GarrisonHandler.smethod_1(binaryWriter_, 9999999); arg_EA_0 = (num * 2757309549u ^ 2406265062u); continue; case 8u: GarrisonHandler.smethod_1(binaryWriter_, 9999999); GarrisonHandler.smethod_1(binaryWriter_, 9999999); arg_EA_0 = (num * 3081306777u ^ 4082432338u); continue; case 9u: GarrisonHandler.smethod_1(binaryWriter_, 2); arg_EA_0 = (num * 1341176448u ^ 362941049u); continue; } return; } } } static void smethod_0(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } static void smethod_1(BinaryWriter binaryWriter_0, int int_0) { binaryWriter_0.Write(int_0); } static void smethod_2(BinaryWriter binaryWriter_0, ulong ulong_0) { binaryWriter_0.Write(ulong_0); } static void smethod_3(BinaryWriter binaryWriter_0, uint uint_0) { binaryWriter_0.Write(uint_0); } } } <file_sep>/Framework.Logging/Log.cs using Framework.Constants.Misc; using Framework.Logging.IO; using System; using System.Collections.Concurrent; using System.Runtime.CompilerServices; namespace Framework.Logging { public class Log { private static LogType logLevel; private static BlockingCollection<Tuple<ConsoleColor, string>> logQueue = new BlockingCollection<Tuple<ConsoleColor, string>>(); [AsyncStateMachine(typeof(Log.<Initialize>d__2))] public static void Initialize(LogType logLevel, LogWriter fileLogger = null) { Log.<Initialize>d__2 <Initialize>d__; <Initialize>d__.logLevel = logLevel; while (true) { IL_86: uint arg_66_0 = 3113489483u; while (true) { uint num; switch ((num = (arg_66_0 ^ 2308665641u)) % 5u) { case 0u: { AsyncVoidMethodBuilder __t__builder = <Initialize>d__.__t__builder; __t__builder.Start<Log.<Initialize>d__2>(ref <Initialize>d__); arg_66_0 = (num * 877270842u ^ 1481472347u); continue; } case 1u: <Initialize>d__.__t__builder = AsyncVoidMethodBuilder.Create(); <Initialize>d__.__1__state = -1; arg_66_0 = (num * 1487676232u ^ 233386490u); continue; case 2u: <Initialize>d__.fileLogger = fileLogger; arg_66_0 = (num * 1678750232u ^ 2273318913u); continue; case 3u: goto IL_86; } return; } } } public static void Message() { Log.SetLogger(LogType.None, "", Array.Empty<object>()); } public static void Message(LogType type, string text, params object[] args) { Log.SetLogger(type, text, args); } public static void Wait() { Log.smethod_0(true); } private static void SetLogger(LogType type, string text, params object[] args) { if (type <= LogType.Debug) { goto IL_AE; } goto IL_344; uint arg_2BC_0; ConsoleColor item; while (true) { IL_2B7: uint num; switch ((num = (arg_2BC_0 ^ 3480863151u)) % 27u) { case 0u: goto IL_2AF; case 1u: switch (type) { case LogType.Init: goto IL_E1; case LogType.Normal: goto IL_1DC; case LogType.Init | LogType.Normal: goto IL_130; case LogType.Error: goto IL_2AF; default: arg_2BC_0 = (num * 29380560u ^ 2609463449u); continue; } break; case 2u: text = Log.smethod_1(text, 0, Module.smethod_33<string>(3824555153u)); arg_2BC_0 = (num * 1488785168u ^ 3003896097u); continue; case 3u: arg_2BC_0 = (num * 630349490u ^ 3410984367u); continue; case 4u: arg_2BC_0 = (num * 388368878u ^ 2199012548u); continue; case 5u: arg_2BC_0 = ((type.Equals(LogType.None) ? 3622719623u : 2395694699u) ^ num * 5683277u); continue; case 6u: arg_2BC_0 = (((type != LogType.Database) ? 4270553469u : 2963259474u) ^ num * 1067508702u); continue; case 7u: goto IL_1DC; case 8u: Log.logQueue.Add(Tuple.Create<ConsoleColor, string>(item, string.Format(Module.smethod_36<string>(626677217u) + DateTime.Now.ToLongTimeString() + Module.smethod_34<string>(3776110400u) + text, args))); arg_2BC_0 = 2298070045u; continue; case 9u: item = ConsoleColor.DarkRed; text = Log.smethod_1(text, 0, Module.smethod_35<string>(1595689074u)); arg_2BC_0 = 2724106417u; continue; case 10u: arg_2BC_0 = (((!type.Equals(LogType.Init)) ? 1098694891u : 96357387u) ^ num * 1151934750u); continue; case 11u: goto IL_130; case 12u: goto IL_344; case 14u: item = ConsoleColor.DarkMagenta; arg_2BC_0 = 3189801514u; continue; case 15u: arg_2BC_0 = (num * 1506391283u ^ 2025020885u); continue; case 16u: arg_2BC_0 = (num * 240639445u ^ 1830147619u); continue; case 17u: arg_2BC_0 = (num * 3830279919u ^ 1878717959u); continue; case 18u: goto IL_E1; case 19u: arg_2BC_0 = (((type == LogType.Info) ? 2377804597u : 2424405559u) ^ num * 590112295u); continue; case 20u: goto IL_34F; case 21u: goto IL_AE; case 22u: arg_2BC_0 = (((Log.logLevel & type) == type) ? 3227681998u : 2298070045u); continue; case 23u: arg_2BC_0 = (num * 3845934040u ^ 687909629u); continue; case 24u: arg_2BC_0 = (((type == LogType.Debug) ? 2261310422u : 3671839948u) ^ num * 3869338176u); continue; case 25u: text = Log.smethod_1(text, 0, Module.smethod_37<string>(1982887587u)); arg_2BC_0 = (num * 86982953u ^ 1438082591u); continue; case 26u: item = ConsoleColor.Yellow; arg_2BC_0 = 2600121813u; continue; } break; IL_E1: item = ConsoleColor.Cyan; arg_2BC_0 = 2243607472u; continue; IL_130: item = ConsoleColor.White; arg_2BC_0 = 2600121813u; continue; IL_1DC: item = ConsoleColor.Green; arg_2BC_0 = 4005755379u; continue; IL_2AF: item = ConsoleColor.Red; arg_2BC_0 = 3949059349u; } return; IL_34F: Log.logQueue.Add(Tuple.Create<ConsoleColor, string>(item, Log.smethod_2(text, args))); return; IL_AE: arg_2BC_0 = 3215317051u; goto IL_2B7; IL_344: arg_2BC_0 = ((type != LogType.Packet) ? 3442451454u : 3418615233u); goto IL_2B7; } static ConsoleKeyInfo smethod_0(bool bool_0) { return Console.ReadKey(bool_0); } static string smethod_1(string string_0, int int_0, string string_1) { return string_0.Insert(int_0, string_1); } static string smethod_2(string string_0, object[] object_0) { return string.Format(string_0, object_0); } } } <file_sep>/Google.Protobuf/WireFormat.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf { [ComVisible(true)] public static class WireFormat { public enum WireType : uint { Varint, Fixed64, LengthDelimited, StartGroup, EndGroup, Fixed32 } private const int TagTypeBits = 3; private const uint TagTypeMask = 7u; public static WireFormat.WireType GetTagWireType(uint tag) { return (WireFormat.WireType)(tag & 7u); } public static int GetTagFieldNumber(uint tag) { return (int)tag >> 3; } public static uint MakeTag(int fieldNumber, WireFormat.WireType wireType) { return (uint)(fieldNumber << 3 | (int)wireType); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GetAllValuesForAttributeRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GetAllValuesForAttributeRequest : IMessage<GetAllValuesForAttributeRequest>, IEquatable<GetAllValuesForAttributeRequest>, IDeepCloneable<GetAllValuesForAttributeRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAllValuesForAttributeRequest.__c __9 = new GetAllValuesForAttributeRequest.__c(); internal GetAllValuesForAttributeRequest cctor>b__34_0() { return new GetAllValuesForAttributeRequest(); } } private static readonly MessageParser<GetAllValuesForAttributeRequest> _parser = new MessageParser<GetAllValuesForAttributeRequest>(new Func<GetAllValuesForAttributeRequest>(GetAllValuesForAttributeRequest.__c.__9.<.cctor>b__34_0)); public const int AttributeKeyFieldNumber = 1; private string attributeKey_ = ""; public const int AgentIdFieldNumber = 2; private EntityId agentId_; public const int ProgramFieldNumber = 5; private uint program_; public static MessageParser<GetAllValuesForAttributeRequest> Parser { get { return GetAllValuesForAttributeRequest._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return GetAllValuesForAttributeRequest.Descriptor; } } public string AttributeKey { get { return this.attributeKey_; } set { this.attributeKey_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public GetAllValuesForAttributeRequest() { } public GetAllValuesForAttributeRequest(GetAllValuesForAttributeRequest other) : this() { this.attributeKey_ = other.attributeKey_; this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.program_ = other.program_; } public GetAllValuesForAttributeRequest Clone() { return new GetAllValuesForAttributeRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetAllValuesForAttributeRequest); } public bool Equals(GetAllValuesForAttributeRequest other) { if (other == null) { goto IL_44; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ -1940671593) % 11) { case 0: arg_A1_0 = ((this.Program != other.Program) ? -1852295654 : -188445995); continue; case 1: goto IL_E7; case 2: arg_A1_0 = (GetAllValuesForAttributeRequest.smethod_1(this.AgentId, other.AgentId) ? -1402713956 : -824677356); continue; case 3: goto IL_44; case 4: return false; case 5: return false; case 6: return false; case 8: arg_A1_0 = ((!GetAllValuesForAttributeRequest.smethod_0(this.AttributeKey, other.AttributeKey)) ? -256939012 : -1383186324); continue; case 9: return true; case 10: return false; } break; } return true; IL_44: arg_A1_0 = -221128457; goto IL_9C; IL_E7: arg_A1_0 = ((other != this) ? -1757988094 : -1519304498); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_106: uint arg_DA_0 = 1240929540u; while (true) { uint num2; switch ((num2 = (arg_DA_0 ^ 1973254597u)) % 8u) { case 0u: goto IL_106; case 1u: arg_DA_0 = (((GetAllValuesForAttributeRequest.smethod_2(this.AttributeKey) != 0) ? 1816699917u : 1627383126u) ^ num2 * 275600070u); continue; case 2u: num ^= GetAllValuesForAttributeRequest.smethod_3(this.AgentId); arg_DA_0 = (num2 * 40219652u ^ 4016968969u); continue; case 4u: arg_DA_0 = ((this.Program != 0u) ? 709829018u : 624879430u); continue; case 5u: arg_DA_0 = ((this.agentId_ != null) ? 127722447u : 757687585u); continue; case 6u: num ^= GetAllValuesForAttributeRequest.smethod_3(this.AttributeKey); arg_DA_0 = (num2 * 1847297003u ^ 3663272010u); continue; case 7u: num ^= this.Program.GetHashCode(); arg_DA_0 = (num2 * 1487777448u ^ 527660830u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (GetAllValuesForAttributeRequest.smethod_2(this.AttributeKey) != 0) { goto IL_D0; } goto IL_11A; uint arg_DA_0; while (true) { IL_D5: uint num; switch ((num = (arg_DA_0 ^ 3587750386u)) % 9u) { case 0u: goto IL_D0; case 1u: arg_DA_0 = ((this.Program != 0u) ? 3251863161u : 2346731980u); continue; case 2u: output.WriteRawTag(10); arg_DA_0 = (num * 3381043683u ^ 749097303u); continue; case 3u: goto IL_11A; case 4u: output.WriteMessage(this.AgentId); arg_DA_0 = (num * 1406821031u ^ 858017266u); continue; case 6u: output.WriteRawTag(45); output.WriteFixed32(this.Program); arg_DA_0 = (num * 1642519795u ^ 2473301309u); continue; case 7u: output.WriteString(this.AttributeKey); arg_DA_0 = (num * 398374308u ^ 3962018921u); continue; case 8u: output.WriteRawTag(18); arg_DA_0 = (num * 652084338u ^ 4190677401u); continue; } break; } return; IL_D0: arg_DA_0 = 3298870528u; goto IL_D5; IL_11A: arg_DA_0 = ((this.agentId_ == null) ? 2663585341u : 2262813875u); goto IL_D5; } public int CalculateSize() { int num = 0; while (true) { IL_FD: uint arg_D1_0 = 2375468129u; while (true) { uint num2; switch ((num2 = (arg_D1_0 ^ 3834579723u)) % 8u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_D1_0 = (num2 * 2147078886u ^ 2775949210u); continue; case 1u: arg_D1_0 = ((this.Program != 0u) ? 2974277861u : 3281393191u); continue; case 2u: arg_D1_0 = (((GetAllValuesForAttributeRequest.smethod_2(this.AttributeKey) == 0) ? 2852270174u : 3268661556u) ^ num2 * 598540681u); continue; case 3u: goto IL_FD; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.AttributeKey); arg_D1_0 = (num2 * 578200184u ^ 563546556u); continue; case 6u: num += 5; arg_D1_0 = (num2 * 507217110u ^ 1357113043u); continue; case 7u: arg_D1_0 = ((this.agentId_ != null) ? 2743595699u : 4287943882u); continue; } return num; } } return num; } public void MergeFrom(GetAllValuesForAttributeRequest other) { if (other == null) { goto IL_5A; } goto IL_146; uint arg_FE_0; while (true) { IL_F9: uint num; switch ((num = (arg_FE_0 ^ 1402284499u)) % 11u) { case 0u: goto IL_146; case 1u: arg_FE_0 = (((this.agentId_ == null) ? 1329621753u : 681888985u) ^ num * 1238041926u); continue; case 2u: this.AgentId.MergeFrom(other.AgentId); arg_FE_0 = 898140066u; continue; case 3u: arg_FE_0 = ((other.agentId_ != null) ? 1708964544u : 898140066u); continue; case 4u: this.agentId_ = new EntityId(); arg_FE_0 = (num * 11089816u ^ 697103531u); continue; case 6u: this.Program = other.Program; arg_FE_0 = (num * 1072385817u ^ 2450994955u); continue; case 7u: goto IL_5A; case 8u: return; case 9u: arg_FE_0 = ((other.Program != 0u) ? 1485678008u : 1910803576u); continue; case 10u: this.AttributeKey = other.AttributeKey; arg_FE_0 = (num * 3455952380u ^ 3633180051u); continue; } break; } return; IL_5A: arg_FE_0 = 342820052u; goto IL_F9; IL_146: arg_FE_0 = ((GetAllValuesForAttributeRequest.smethod_2(other.AttributeKey) != 0) ? 1301796738u : 1935958319u); goto IL_F9; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1AD: uint num; uint arg_155_0 = ((num = input.ReadTag()) != 0u) ? 149787098u : 2022853604u; while (true) { uint num2; switch ((num2 = (arg_155_0 ^ 441694570u)) % 15u) { case 1u: input.SkipLastField(); arg_155_0 = (num2 * 569317955u ^ 2697977327u); continue; case 2u: arg_155_0 = (((num == 18u) ? 1858013426u : 1379932160u) ^ num2 * 218002110u); continue; case 3u: arg_155_0 = (num2 * 2670130033u ^ 2796434995u); continue; case 4u: arg_155_0 = ((num != 10u) ? 206145004u : 824761142u); continue; case 5u: arg_155_0 = (num2 * 3364306379u ^ 1498788459u); continue; case 6u: this.Program = input.ReadFixed32(); arg_155_0 = 1834656318u; continue; case 7u: arg_155_0 = (num2 * 411110116u ^ 1009074354u); continue; case 8u: input.ReadMessage(this.agentId_); arg_155_0 = 1474993973u; continue; case 9u: arg_155_0 = (((num != 45u) ? 1827356368u : 1769742374u) ^ num2 * 4203097368u); continue; case 10u: arg_155_0 = ((this.agentId_ == null) ? 246554252u : 456967371u); continue; case 11u: this.AttributeKey = input.ReadString(); arg_155_0 = 1111874871u; continue; case 12u: this.agentId_ = new EntityId(); arg_155_0 = (num2 * 1119923637u ^ 1639901013u); continue; case 13u: arg_155_0 = 149787098u; continue; case 14u: goto IL_1AD; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public static class AccountServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return AccountServiceReflection.descriptor; } } static AccountServiceReflection() { AccountServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(AccountServiceReflection.smethod_1(AccountServiceReflection.smethod_0(new string[] { Module.smethod_33<string>(1032837814u), Module.smethod_37<string>(493957689u), Module.smethod_36<string>(2352141404u), Module.smethod_35<string>(2233017333u), Module.smethod_33<string>(316774566u), Module.smethod_33<string>(3691492598u), Module.smethod_35<string>(2890538277u), Module.smethod_34<string>(685165078u), Module.smethod_33<string>(2975429350u), Module.smethod_33<string>(2055180086u), Module.smethod_36<string>(73546285u), Module.smethod_34<string>(3480346582u), Module.smethod_36<string>(1624680269u), Module.smethod_34<string>(2730453686u), Module.smethod_37<string>(3386525177u), Module.smethod_33<string>(2259366102u), Module.smethod_36<string>(3581207053u), Module.smethod_34<string>(1230667894u), Module.smethod_35<string>(3590221541u), Module.smethod_36<string>(3569467517u), Module.smethod_35<string>(3940063173u), Module.smethod_36<string>(443720477u), Module.smethod_37<string>(2889802617u), Module.smethod_36<string>(1231027005u), Module.smethod_37<string>(4087725081u), Module.smethod_33<string>(4099864630u), Module.smethod_33<string>(1543302854u), Module.smethod_37<string>(27591337u), Module.smethod_36<string>(1148850253u), Module.smethod_37<string>(1225513801u), Module.smethod_33<string>(2145975558u), Module.smethod_34<string>(163990u), Module.smethod_37<string>(3971958681u), Module.smethod_36<string>(1542503517u), Module.smethod_35<string>(4171427813u), Module.smethod_37<string>(3825836073u), Module.smethod_33<string>(2350161574u), Module.smethod_36<string>(4262857757u), Module.smethod_37<string>(2277313657u), Module.smethod_37<string>(1926713705u), Module.smethod_35<string>(1891185669u), Module.smethod_33<string>(4088567094u), Module.smethod_35<string>(3206227557u), Module.smethod_35<string>(4213590133u), Module.smethod_37<string>(2569558873u), Module.smethod_37<string>(2218958921u), Module.smethod_33<string>(4190660102u), Module.smethod_33<string>(4292753110u), Module.smethod_33<string>(1736191334u), Module.smethod_35<string>(2898548245u), Module.smethod_37<string>(1868358969u), Module.smethod_37<string>(524313897u), Module.smethod_37<string>(2072836313u), Module.smethod_37<string>(1722236361u), Module.smethod_37<string>(3270758777u), Module.smethod_34<string>(3886351126u), Module.smethod_36<string>(4251118221u), Module.smethod_37<string>(4118081289u), Module.smethod_36<string>(1125371181u), Module.smethod_36<string>(1184068861u), Module.smethod_33<string>(1533417510u), Module.smethod_34<string>(4158408630u), Module.smethod_33<string>(2351573766u), Module.smethod_33<string>(2453666774u), Module.smethod_34<string>(3783462182u), Module.smethod_36<string>(14848605u), Module.smethod_35<string>(3737261541u), Module.smethod_34<string>(1908729942u), Module.smethod_33<string>(2555759782u), Module.smethod_35<string>(1764698709u), Module.smethod_33<string>(3373916038u), Module.smethod_36<string>(3522509373u), Module.smethod_36<string>(1959635853u), Module.smethod_37<string>(1137745929u), Module.smethod_35<string>(2772061285u), Module.smethod_33<string>(1839696534u), Module.smethod_37<string>(582668633u), Module.smethod_33<string>(2657852790u), Module.smethod_37<string>(1780591097u), Module.smethod_37<string>(1429991145u), Module.smethod_37<string>(2978513561u), Module.smethod_37<string>(2627913609u), Module.smethod_35<string>(1806861029u), Module.smethod_35<string>(2814223605u), Module.smethod_36<string>(766936525u), Module.smethod_34<string>(3749628470u), Module.smethod_34<string>(4124574918u), Module.smethod_37<string>(933268585u), Module.smethod_34<string>(3374682022u), Module.smethod_35<string>(1499181717u), Module.smethod_37<string>(3679713465u), Module.smethod_33<string>(3473184662u), Module.smethod_34<string>(101665126u), Module.smethod_34<string>(3271793078u), Module.smethod_34<string>(3646739526u), Module.smethod_33<string>(1836872150u), Module.smethod_36<string>(1865719565u), Module.smethod_36<string>(302846045u), Module.smethod_33<string>(98466630u), Module.smethod_37<string>(3504649257u), Module.smethod_33<string>(1938965158u), Module.smethod_36<string>(3023200285u), Module.smethod_37<string>(1956126841u), Module.smethod_37<string>(1605526889u), Module.smethod_36<string>(2247633293u), Module.smethod_35<string>(437113749u), Module.smethod_36<string>(3416853549u), Module.smethod_36<string>(2235893757u), Module.smethod_33<string>(2961307430u), Module.smethod_36<string>(3405114013u), Module.smethod_37<string>(3446294521u), Module.smethod_35<string>(2451838901u), Module.smethod_35<string>(1794317957u), Module.smethod_34<string>(67831414u), Module.smethod_34<string>(442777862u), Module.smethod_36<string>(2617807485u), Module.smethod_37<string>(1751649497u), Module.smethod_35<string>(1136797013u), Module.smethod_37<string>(2949571961u), Module.smethod_33<string>(608931670u), Module.smethod_34<string>(2488066470u), Module.smethod_35<string>(2801680533u), Module.smethod_36<string>(4180681005u), Module.smethod_35<string>(2283189621u), Module.smethod_35<string>(1625668677u), Module.smethod_35<string>(3598231509u), Module.smethod_37<string>(465959161u), Module.smethod_37<string>(115359209u), Module.smethod_37<string>(1663881625u), Module.smethod_33<string>(2860626614u), Module.smethod_33<string>(304064838u), Module.smethod_33<string>(406157846u), Module.smethod_37<string>(3066281433u), Module.smethod_33<string>(1224314102u), Module.smethod_37<string>(4264203897u), Module.smethod_34<string>(2930680342u), Module.smethod_34<string>(3305626790u), Module.smethod_37<string>(816559113u), Module.smethod_37<string>(2365081529u), Module.smethod_33<string>(1428500118u), Module.smethod_33<string>(3166905638u), Module.smethod_33<string>(2246656374u), Module.smethod_36<string>(314585581u), Module.smethod_37<string>(1108804329u), Module.smethod_34<string>(306055206u), Module.smethod_33<string>(610343862u), Module.smethod_37<string>(3855249209u), Module.smethod_37<string>(2511204137u), Module.smethod_35<string>(3025035205u), Module.smethod_37<string>(3709126601u), Module.smethod_34<string>(2351343814u), Module.smethod_33<string>(814529878u), Module.smethod_34<string>(1601450918u), Module.smethod_35<string>(2367514261u), Module.smethod_36<string>(2653026093u), Module.smethod_37<string>(669964969u), Module.smethod_36<string>(2964502605u), Module.smethod_35<string>(605763029u) })), new FileDescriptor[] { AccountTypesReflection.Descriptor, EntityTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetAccountRequest).TypeHandle), GetAccountRequest.Parser, new string[] { Module.smethod_35<string>(3851488748u), Module.smethod_35<string>(1249324306u), Module.smethod_35<string>(857603673u), Module.smethod_37<string>(494664993u), Module.smethod_33<string>(3294319425u), Module.smethod_34<string>(348834879u), Module.smethod_37<string>(231715029u), Module.smethod_35<string>(437963706u), Module.smethod_37<string>(3387203010u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetAccountResponse).TypeHandle), GetAccountResponse.Parser, new string[] { Module.smethod_34<string>(3827836034u), Module.smethod_36<string>(94729931u), Module.smethod_33<string>(2222145487u), Module.smethod_36<string>(503400800u), Module.smethod_37<string>(1110425234u), Module.smethod_33<string>(1165801692u), Module.smethod_36<string>(1578254714u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(CreateGameAccountRequest).TypeHandle), CreateGameAccountRequest.Parser, new string[] { Module.smethod_36<string>(1722939804u), Module.smethod_36<string>(1013076684u), Module.smethod_35<string>(2043171339u), Module.smethod_34<string>(602381348u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(CacheExpireRequest).TypeHandle), CacheExpireRequest.Parser, new string[] { Module.smethod_36<string>(1722939804u), Module.smethod_35<string>(60202740u), Module.smethod_37<string>(936421982u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(CredentialUpdateRequest).TypeHandle), CredentialUpdateRequest.Parser, new string[] { Module.smethod_35<string>(1878925916u), Module.smethod_37<string>(3854689260u), Module.smethod_33<string>(1332055878u), Module.smethod_34<string>(326103631u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(CredentialUpdateResponse).TypeHandle), CredentialUpdateResponse.Parser, null, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(AccountFlagUpdateRequest).TypeHandle), AccountFlagUpdateRequest.Parser, new string[] { Module.smethod_36<string>(1722939804u), Module.smethod_34<string>(326103631u), Module.smethod_35<string>(3823569414u), Module.smethod_37<string>(3942339248u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GameAccountFlagUpdateRequest).TypeHandle), GameAccountFlagUpdateRequest.Parser, new string[] { Module.smethod_34<string>(4081382503u), Module.smethod_33<string>(1006104843u), Module.smethod_37<string>(3942339248u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(SubscriptionUpdateRequest).TypeHandle), SubscriptionUpdateRequest.Parser, new string[] { Module.smethod_33<string>(2859718045u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(SubscriptionUpdateResponse).TypeHandle), SubscriptionUpdateResponse.Parser, new string[] { Module.smethod_35<string>(3851488748u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(IsIgrAddressRequest).TypeHandle), IsIgrAddressRequest.Parser, new string[] { Module.smethod_34<string>(1725213771u), Module.smethod_33<string>(3438383485u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(AccountServiceRegion).TypeHandle), AccountServiceRegion.Parser, new string[] { Module.smethod_35<string>(4021477587u), Module.smethod_33<string>(1549356568u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(AccountServiceConfig).TypeHandle), AccountServiceConfig.Parser, new string[] { Module.smethod_34<string>(326103631u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetAccountStateRequest).TypeHandle), GetAccountStateRequest.Parser, new string[] { Module.smethod_33<string>(3081156634u), Module.smethod_37<string>(700380119u), Module.smethod_34<string>(326103631u), Module.smethod_35<string>(1556926582u), Module.smethod_37<string>(1838680594u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetAccountStateResponse).TypeHandle), GetAccountStateResponse.Parser, new string[] { Module.smethod_37<string>(3328553564u), Module.smethod_37<string>(1838680594u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetGameAccountStateRequest).TypeHandle), GetGameAccountStateRequest.Parser, new string[] { Module.smethod_34<string>(750206468u), Module.smethod_36<string>(1993931775u), Module.smethod_33<string>(2909155003u), Module.smethod_35<string>(2004846238u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetGameAccountStateResponse).TypeHandle), GetGameAccountStateResponse.Parser, new string[] { Module.smethod_35<string>(1252157496u), Module.smethod_37<string>(1838680594u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetLicensesRequest).TypeHandle), GetLicensesRequest.Parser, new string[] { Module.smethod_33<string>(3091348247u), Module.smethod_35<string>(2228767548u), Module.smethod_36<string>(3615585510u), Module.smethod_33<string>(1868750266u), Module.smethod_34<string>(3421418748u), Module.smethod_37<string>(3182637253u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetLicensesResponse).TypeHandle), GetLicensesResponse.Parser, new string[] { Module.smethod_35<string>(2162935679u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetGameSessionInfoRequest).TypeHandle), GetGameSessionInfoRequest.Parser, new string[] { Module.smethod_35<string>(1666543649u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetGameSessionInfoResponse).TypeHandle), GetGameSessionInfoResponse.Parser, new string[] { Module.smethod_37<string>(1312721724u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetGameTimeRemainingInfoRequest).TypeHandle), GetGameTimeRemainingInfoRequest.Parser, new string[] { Module.smethod_35<string>(2481947751u), Module.smethod_33<string>(542756000u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetGameTimeRemainingInfoResponse).TypeHandle), GetGameTimeRemainingInfoResponse.Parser, new string[] { Module.smethod_36<string>(148326748u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetCAISInfoRequest).TypeHandle), GetCAISInfoRequest.Parser, new string[] { Module.smethod_36<string>(1294600521u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetCAISInfoResponse).TypeHandle), GetCAISInfoResponse.Parser, new string[] { Module.smethod_35<string>(424004039u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(ForwardCacheExpireRequest).TypeHandle), ForwardCacheExpireRequest.Parser, new string[] { Module.smethod_33<string>(3081156634u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetAuthorizedDataRequest).TypeHandle), GetAuthorizedDataRequest.Parser, new string[] { Module.smethod_34<string>(3169466458u), Module.smethod_35<string>(3417889114u), Module.smethod_36<string>(388525893u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GetAuthorizedDataResponse).TypeHandle), GetAuthorizedDataResponse.Parser, new string[] { Module.smethod_35<string>(874396530u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(AccountStateNotification).TypeHandle), AccountStateNotification.Parser, new string[] { Module.smethod_36<string>(3760270600u), Module.smethod_37<string>(3971516616u), Module.smethod_34<string>(2675333323u), Module.smethod_33<string>(456295781u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GameAccountStateNotification).TypeHandle), GameAccountStateNotification.Parser, new string[] { Module.smethod_37<string>(1838651123u), Module.smethod_36<string>(2880420524u), Module.smethod_33<string>(3549551945u), Module.smethod_35<string>(1067565316u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GameAccountNotification).TypeHandle), GameAccountNotification.Parser, new string[] { Module.smethod_36<string>(1204802453u), Module.smethod_37<string>(3971516616u), Module.smethod_36<string>(3563443968u) }, null, null, null), new GeneratedCodeInfo(AccountServiceReflection.smethod_2(typeof(GameAccountSessionNotification).TypeHandle), GameAccountSessionNotification.Parser, new string[] { Module.smethod_35<string>(60202740u), Module.smethod_37<string>(1312721724u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf.Compatibility/TypeExtensions.cs using System; using System.Reflection; namespace Google.Protobuf.Compatibility { internal static class TypeExtensions { internal static bool IsValueType(this Type target) { return TypeExtensions.smethod_1(TypeExtensions.smethod_0(target)); } internal static bool IsAssignableFrom(this Type target, Type c) { return TypeExtensions.smethod_2(TypeExtensions.smethod_0(target), TypeExtensions.smethod_0(c)); } internal static PropertyInfo GetProperty(this Type target, string name) { while (true) { IL_173: uint arg_127_0 = (target != null) ? 3462574241u : 2188921634u; while (true) { uint num; switch ((num = (arg_127_0 ^ 3380171852u)) % 12u) { case 0u: { PropertyInfo propertyInfo; arg_127_0 = ((!TypeExtensions.smethod_7(propertyInfo)) ? 3618814751u : 2973301651u); continue; } case 1u: { TypeInfo typeInfo = TypeExtensions.smethod_0(target); arg_127_0 = 3231725208u; continue; } case 2u: arg_127_0 = 3462574241u; continue; case 3u: { TypeInfo typeInfo; target = TypeExtensions.smethod_9(typeInfo); arg_127_0 = 2243421325u; continue; } case 4u: { PropertyInfo propertyInfo; return propertyInfo; } case 5u: { PropertyInfo propertyInfo; arg_127_0 = (((propertyInfo != null) ? 3875040517u : 4036738732u) ^ num * 4172870815u); continue; } case 6u: { PropertyInfo propertyInfo; arg_127_0 = (((!TypeExtensions.smethod_4(propertyInfo)) ? 2465284096u : 3240594463u) ^ num * 3716117260u); continue; } case 7u: { PropertyInfo propertyInfo; arg_127_0 = ((TypeExtensions.smethod_6(TypeExtensions.smethod_8(propertyInfo)) ? 1083058896u : 547771499u) ^ num * 1931570956u); continue; } case 8u: { TypeInfo typeInfo; PropertyInfo propertyInfo = TypeExtensions.smethod_3(typeInfo, name); arg_127_0 = (num * 1158742807u ^ 2567007021u); continue; } case 9u: goto IL_173; case 11u: { PropertyInfo propertyInfo; arg_127_0 = ((TypeExtensions.smethod_6(TypeExtensions.smethod_5(propertyInfo)) ? 3951386411u : 3282301751u) ^ num * 2213342445u); continue; } } goto Block_6; } } Block_6: return null; } internal static MethodInfo GetMethod(this Type target, string name) { while (true) { IL_CA: uint arg_8F_0 = (target == null) ? 2521468880u : 2181048316u; while (true) { uint num; switch ((num = (arg_8F_0 ^ 2469246798u)) % 8u) { case 0u: arg_8F_0 = 2181048316u; continue; case 1u: { TypeInfo typeInfo; target = TypeExtensions.smethod_9(typeInfo); arg_8F_0 = 4021995645u; continue; } case 2u: { TypeInfo typeInfo = TypeExtensions.smethod_0(target); MethodInfo methodInfo = TypeExtensions.smethod_10(typeInfo, name); arg_8F_0 = 2376643290u; continue; } case 3u: goto IL_CA; case 4u: { MethodInfo methodInfo; arg_8F_0 = (((methodInfo != null) ? 1298327965u : 61772627u) ^ num * 1060594473u); continue; } case 5u: { MethodInfo methodInfo; return methodInfo; } case 7u: { MethodInfo methodInfo; arg_8F_0 = (((!TypeExtensions.smethod_6(methodInfo)) ? 2160196137u : 4256106933u) ^ num * 185674498u); continue; } } goto Block_3; } } Block_3: return null; } static TypeInfo smethod_0(Type type_0) { return type_0.GetTypeInfo(); } static bool smethod_1(Type type_0) { return type_0.IsValueType; } static bool smethod_2(TypeInfo typeInfo_0, TypeInfo typeInfo_1) { return typeInfo_0.IsAssignableFrom(typeInfo_1); } static PropertyInfo smethod_3(TypeInfo typeInfo_0, string string_0) { return typeInfo_0.GetDeclaredProperty(string_0); } static bool smethod_4(PropertyInfo propertyInfo_0) { return propertyInfo_0.CanRead; } static MethodInfo smethod_5(PropertyInfo propertyInfo_0) { return propertyInfo_0.GetMethod; } static bool smethod_6(MethodBase methodBase_0) { return methodBase_0.IsPublic; } static bool smethod_7(PropertyInfo propertyInfo_0) { return propertyInfo_0.CanWrite; } static MethodInfo smethod_8(PropertyInfo propertyInfo_0) { return propertyInfo_0.SetMethod; } static Type smethod_9(Type type_0) { return type_0.BaseType; } static MethodInfo smethod_10(TypeInfo typeInfo_0, string string_0) { return typeInfo_0.GetDeclaredMethod(string_0); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Timestamp.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Timestamp : IMessage<Timestamp>, IEquatable<Timestamp>, IDeepCloneable<Timestamp>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Timestamp.__c __9 = new Timestamp.__c(); internal Timestamp cctor>b__41_0() { return new Timestamp(); } } private static readonly MessageParser<Timestamp> _parser = new MessageParser<Timestamp>(new Func<Timestamp>(Timestamp.__c.__9.<.cctor>b__41_0)); public const int SecondsFieldNumber = 1; private long seconds_; public const int NanosFieldNumber = 2; private int nanos_; private static readonly DateTime UnixEpoch; private static readonly long BclSecondsAtUnixEpoch; internal static readonly long UnixSecondsAtBclMinValue; internal static readonly long UnixSecondsAtBclMaxValue; public static MessageParser<Timestamp> Parser { get { return Timestamp._parser; } } public static MessageDescriptor Descriptor { get { return TimestampReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Timestamp.Descriptor; } } public long Seconds { get { return this.seconds_; } set { this.seconds_ = value; } } public int Nanos { get { return this.nanos_; } set { this.nanos_ = value; } } public Timestamp() { } public Timestamp(Timestamp other) : this() { this.seconds_ = other.seconds_; this.nanos_ = other.nanos_; } public Timestamp Clone() { return new Timestamp(this); } public override bool Equals(object other) { return this.Equals(other as Timestamp); } public bool Equals(Timestamp other) { if (other == null) { goto IL_15; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -1105935621) % 9) { case 0: return false; case 1: return false; case 3: arg_6D_0 = ((this.Seconds == other.Seconds) ? -1599928251 : -256015206); continue; case 4: return true; case 5: arg_6D_0 = ((this.Nanos != other.Nanos) ? -789486440 : -318907503); continue; case 6: goto IL_15; case 7: goto IL_AB; case 8: return false; } break; } return true; IL_15: arg_6D_0 = -149202933; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? -112188169 : -2070322413); goto IL_68; } public override int GetHashCode() { int num = 1; if (this.Seconds != 0L) { goto IL_1C; } goto IL_92; uint arg_66_0; while (true) { IL_61: uint num2; switch ((num2 = (arg_66_0 ^ 4209271202u)) % 5u) { case 0u: num ^= this.Nanos.GetHashCode(); arg_66_0 = (num2 * 1612087655u ^ 3586496705u); continue; case 2u: num ^= this.Seconds.GetHashCode(); arg_66_0 = (num2 * 3227999504u ^ 3032321690u); continue; case 3u: goto IL_1C; case 4u: goto IL_92; } break; } return num; IL_1C: arg_66_0 = 3191810418u; goto IL_61; IL_92: arg_66_0 = ((this.Nanos == 0) ? 2945756888u : 3331210717u); goto IL_61; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Seconds != 0L) { goto IL_3C; } goto IL_AB; uint arg_78_0; while (true) { IL_73: uint num; switch ((num = (arg_78_0 ^ 3331514368u)) % 6u) { case 0u: output.WriteRawTag(16); arg_78_0 = (num * 488847302u ^ 2310371461u); continue; case 1u: output.WriteInt32(this.Nanos); arg_78_0 = (num * 1790572481u ^ 1055528423u); continue; case 3u: goto IL_3C; case 4u: goto IL_AB; case 5u: output.WriteRawTag(8); output.WriteInt64(this.Seconds); arg_78_0 = (num * 2062721162u ^ 3815613788u); continue; } break; } return; IL_3C: arg_78_0 = 2542253343u; goto IL_73; IL_AB: arg_78_0 = ((this.Nanos != 0) ? 2704264906u : 3550514590u); goto IL_73; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 2306621565u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 2267353836u)) % 6u) { case 0u: goto IL_B6; case 2u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Nanos); arg_92_0 = (num2 * 2628540604u ^ 596052875u); continue; case 3u: arg_92_0 = (((this.Seconds == 0L) ? 1456134848u : 654942607u) ^ num2 * 841381087u); continue; case 4u: num += 1 + CodedOutputStream.ComputeInt64Size(this.Seconds); arg_92_0 = (num2 * 1622232830u ^ 2789611303u); continue; case 5u: arg_92_0 = ((this.Nanos == 0) ? 4170189787u : 2798650048u); continue; } return num; } } return num; } public void MergeFrom(Timestamp other) { if (other == null) { goto IL_15; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 437624264u)) % 7u) { case 0u: arg_76_0 = ((other.Nanos == 0) ? 96772549u : 548634700u); continue; case 1u: this.Nanos = other.Nanos; arg_76_0 = (num * 3552550232u ^ 3748968613u); continue; case 3u: this.Seconds = other.Seconds; arg_76_0 = (num * 1276971452u ^ 3373765809u); continue; case 4u: goto IL_15; case 5u: return; case 6u: goto IL_AD; } break; } return; IL_15: arg_76_0 = 517709175u; goto IL_71; IL_AD: arg_76_0 = ((other.Seconds == 0L) ? 979099609u : 2022457870u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_106: uint num; uint arg_C2_0 = ((num = input.ReadTag()) != 0u) ? 2888686981u : 2761910801u; while (true) { uint num2; switch ((num2 = (arg_C2_0 ^ 4029492457u)) % 10u) { case 1u: arg_C2_0 = (num2 * 3553691144u ^ 2487151499u); continue; case 2u: arg_C2_0 = (((num == 16u) ? 2371306162u : 2168529145u) ^ num2 * 1595294522u); continue; case 3u: arg_C2_0 = (num2 * 4042333155u ^ 3443394352u); continue; case 4u: goto IL_106; case 5u: this.Nanos = input.ReadInt32(); arg_C2_0 = 3108242179u; continue; case 6u: arg_C2_0 = ((num != 8u) ? 3685197319u : 3833938444u); continue; case 7u: this.Seconds = input.ReadInt64(); arg_C2_0 = 3924143000u; continue; case 8u: input.SkipLastField(); arg_C2_0 = (num2 * 2144122492u ^ 3186870952u); continue; case 9u: arg_C2_0 = 2888686981u; continue; } return; } } } public static Duration operator -(Timestamp lhs, Timestamp rhs) { Preconditions.CheckNotNull<Timestamp>(lhs, Module.smethod_35<string>(1863472618u)); Preconditions.CheckNotNull<Timestamp>(rhs, Module.smethod_33<string>(3930884737u)); return checked(Duration.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos)); } public static Timestamp operator +(Timestamp lhs, Duration rhs) { Preconditions.CheckNotNull<Timestamp>(lhs, Module.smethod_36<string>(4262632730u)); while (true) { IL_4E: uint arg_36_0 = 2548782806u; while (true) { uint num; switch ((num = (arg_36_0 ^ 3573228391u)) % 3u) { case 0u: goto IL_4E; case 2u: Preconditions.CheckNotNull<Duration>(rhs, Module.smethod_36<string>(992200600u)); arg_36_0 = (num * 3929087969u ^ 2970693231u); continue; } goto Block_1; } } Block_1: return checked(Timestamp.Normalize(lhs.Seconds + rhs.Seconds, lhs.Nanos + rhs.Nanos)); } public static Timestamp operator -(Timestamp lhs, Duration rhs) { Preconditions.CheckNotNull<Timestamp>(lhs, Module.smethod_35<string>(1863472618u)); Preconditions.CheckNotNull<Duration>(rhs, Module.smethod_35<string>(1080031352u)); return checked(Timestamp.Normalize(lhs.Seconds - rhs.Seconds, lhs.Nanos - rhs.Nanos)); } public DateTime ToDateTime() { DateTime dateTime = Timestamp.UnixEpoch; while (true) { IL_41: uint arg_29_0 = 3434036289u; while (true) { uint num; switch ((num = (arg_29_0 ^ 2901336283u)) % 3u) { case 1u: dateTime = dateTime.AddSeconds((double)this.Seconds); arg_29_0 = (num * 4144795151u ^ 3942889573u); continue; case 2u: goto IL_41; } goto Block_1; } } Block_1: return dateTime.AddTicks((long)(this.Nanos / 100)); } public DateTimeOffset ToDateTimeOffset() { return new DateTimeOffset(this.ToDateTime(), TimeSpan.Zero); } public static Timestamp FromDateTime(DateTime dateTime) { if (dateTime.Kind == DateTimeKind.Utc) { goto IL_2E; } IL_0A: int arg_14_0 = -675111661; IL_0F: long num; int nanos; switch ((arg_14_0 ^ -417967718) % 4) { case 0: IL_2E: num = dateTime.Ticks / 10000000L; nanos = (int)(dateTime.Ticks % 10000000L) * 100; arg_14_0 = -1623257116; goto IL_0F; case 1: throw new ArgumentException(Module.smethod_34<string>(3248912248u), Module.smethod_37<string>(3238811135u)); case 3: goto IL_0A; } return new Timestamp { Seconds = num - Timestamp.BclSecondsAtUnixEpoch, Nanos = nanos }; } public static Timestamp FromDateTimeOffset(DateTimeOffset dateTimeOffset) { return Timestamp.FromDateTime(dateTimeOffset.UtcDateTime); } internal static Timestamp Normalize(long seconds, int nanoseconds) { int num = nanoseconds / 1000000000; while (true) { IL_84: uint arg_68_0 = 1070302856u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 1496102549u)) % 4u) { case 0u: goto IL_84; case 1u: seconds += (long)num; nanoseconds -= num * 1000000000; arg_68_0 = (((nanoseconds < 0) ? 3041678510u : 2446566947u) ^ num2 * 1027905645u); continue; case 2u: nanoseconds += 1000000000; seconds -= 1L; arg_68_0 = (num2 * 2586930818u ^ 2748640190u); continue; } goto Block_2; } } Block_2: return new Timestamp { Seconds = seconds, Nanos = nanoseconds }; } static Timestamp() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_B7: uint arg_9B_0 = 1608512577u; while (true) { uint num; switch ((num = (arg_9B_0 ^ 451714620u)) % 4u) { case 1u: Timestamp.UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); Timestamp.BclSecondsAtUnixEpoch = Timestamp.UnixEpoch.Ticks / 10000000L; arg_9B_0 = (num * 2101686026u ^ 3060946912u); continue; case 2u: Timestamp.UnixSecondsAtBclMinValue = -Timestamp.BclSecondsAtUnixEpoch; Timestamp.UnixSecondsAtBclMaxValue = DateTime.MaxValue.Ticks / 10000000L - Timestamp.BclSecondsAtUnixEpoch; arg_9B_0 = (num * 2213172070u ^ 2058793308u); continue; case 3u: goto IL_B7; } return; } } } } } <file_sep>/Google.Protobuf/LimitedInputStream.cs using System; using System.IO; namespace Google.Protobuf { internal sealed class LimitedInputStream : Stream { private readonly Stream proxied; private int bytesLeft; public override bool CanRead { get { return true; } } public override bool CanSeek { get { return false; } } public override bool CanWrite { get { return false; } } public override long Length { get { throw LimitedInputStream.smethod_0(); } } public override long Position { get { throw LimitedInputStream.smethod_0(); } set { throw LimitedInputStream.smethod_0(); } } internal LimitedInputStream(Stream proxied, int size) { while (true) { IL_53: uint arg_37_0 = 4003410864u; while (true) { uint num; switch ((num = (arg_37_0 ^ 2648308497u)) % 4u) { case 1u: this.proxied = proxied; arg_37_0 = (num * 2611616036u ^ 1752725666u); continue; case 2u: goto IL_53; case 3u: this.bytesLeft = size; arg_37_0 = (num * 3914505600u ^ 3519685525u); continue; } return; } } } public override void Flush() { } public override int Read(byte[] buffer, int offset, int count) { if (this.bytesLeft > 0) { while (true) { IL_61: uint arg_45_0 = 1171296126u; while (true) { uint num; switch ((num = (arg_45_0 ^ 370393729u)) % 4u) { case 0u: goto IL_61; case 2u: { int num2; return num2; } case 3u: { int num2 = LimitedInputStream.smethod_2(this.proxied, buffer, offset, LimitedInputStream.smethod_1(this.bytesLeft, count)); this.bytesLeft -= num2; arg_45_0 = (num * 134526951u ^ 422163270u); continue; } } goto Block_2; } } Block_2: return 0; } return 0; } public override long Seek(long offset, SeekOrigin origin) { throw LimitedInputStream.smethod_0(); } public override void SetLength(long value) { throw LimitedInputStream.smethod_0(); } public override void Write(byte[] buffer, int offset, int count) { throw LimitedInputStream.smethod_0(); } static NotSupportedException smethod_0() { return new NotSupportedException(); } static int smethod_1(int int_0, int int_1) { return Math.Min(int_0, int_1); } static int smethod_2(Stream stream_0, byte[] byte_0, int int_0, int int_1) { return stream_0.Read(byte_0, int_0, int_1); } } } <file_sep>/Bgs.Protocol.Account.V1/GetAccountRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetAccountRequest : IMessage<GetAccountRequest>, IEquatable<GetAccountRequest>, IDeepCloneable<GetAccountRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAccountRequest.__c __9 = new GetAccountRequest.__c(); internal GetAccountRequest cctor>b__64_0() { return new GetAccountRequest(); } } private static readonly MessageParser<GetAccountRequest> _parser = new MessageParser<GetAccountRequest>(new Func<GetAccountRequest>(GetAccountRequest.__c.__9.<.cctor>b__64_0)); public const int RefFieldNumber = 1; private AccountReference ref_; public const int FetchAllFieldNumber = 10; private bool fetchAll_; public const int FetchBlobFieldNumber = 11; private bool fetchBlob_; public const int FetchIdFieldNumber = 12; private bool fetchId_; public const int FetchEmailFieldNumber = 13; private bool fetchEmail_; public const int FetchBattleTagFieldNumber = 14; private bool fetchBattleTag_; public const int FetchFullNameFieldNumber = 15; private bool fetchFullName_; public const int FetchLinksFieldNumber = 16; private bool fetchLinks_; public const int FetchParentalControlsFieldNumber = 17; private bool fetchParentalControls_; public static MessageParser<GetAccountRequest> Parser { get { return GetAccountRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return GetAccountRequest.Descriptor; } } public AccountReference Ref { get { return this.ref_; } set { this.ref_ = value; } } public bool FetchAll { get { return this.fetchAll_; } set { this.fetchAll_ = value; } } public bool FetchBlob { get { return this.fetchBlob_; } set { this.fetchBlob_ = value; } } public bool FetchId { get { return this.fetchId_; } set { this.fetchId_ = value; } } public bool FetchEmail { get { return this.fetchEmail_; } set { this.fetchEmail_ = value; } } public bool FetchBattleTag { get { return this.fetchBattleTag_; } set { this.fetchBattleTag_ = value; } } public bool FetchFullName { get { return this.fetchFullName_; } set { this.fetchFullName_ = value; } } public bool FetchLinks { get { return this.fetchLinks_; } set { this.fetchLinks_ = value; } } public bool FetchParentalControls { get { return this.fetchParentalControls_; } set { this.fetchParentalControls_ = value; } } public GetAccountRequest() { } public GetAccountRequest(GetAccountRequest other) : this() { while (true) { IL_F8: uint arg_D0_0 = 3142363072u; while (true) { uint num; switch ((num = (arg_D0_0 ^ 4020977170u)) % 7u) { case 0u: this.fetchAll_ = other.fetchAll_; arg_D0_0 = (num * 3822196430u ^ 1409698025u); continue; case 2u: this.fetchBattleTag_ = other.fetchBattleTag_; this.fetchFullName_ = other.fetchFullName_; this.fetchLinks_ = other.fetchLinks_; this.fetchParentalControls_ = other.fetchParentalControls_; arg_D0_0 = (num * 3682265239u ^ 3664450586u); continue; case 3u: this.Ref = ((other.ref_ != null) ? other.Ref.Clone() : null); arg_D0_0 = 4103299969u; continue; case 4u: this.fetchBlob_ = other.fetchBlob_; arg_D0_0 = (num * 2315855216u ^ 1828915943u); continue; case 5u: goto IL_F8; case 6u: this.fetchId_ = other.fetchId_; this.fetchEmail_ = other.fetchEmail_; arg_D0_0 = (num * 99097471u ^ 131928831u); continue; } return; } } } public GetAccountRequest Clone() { return new GetAccountRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetAccountRequest); } public bool Equals(GetAccountRequest other) { if (other == null) { goto IL_18; } goto IL_20E; int arg_198_0; while (true) { IL_193: switch ((arg_198_0 ^ -847805793) % 23) { case 0: return false; case 1: arg_198_0 = ((this.FetchBlob != other.FetchBlob) ? -589754747 : -2085603656); continue; case 2: goto IL_20E; case 3: return false; case 4: return false; case 5: return false; case 6: arg_198_0 = ((this.FetchFullName != other.FetchFullName) ? -1435074159 : -1511765467); continue; case 7: return false; case 8: return true; case 9: arg_198_0 = ((!GetAccountRequest.smethod_0(this.Ref, other.Ref)) ? -1172084261 : -437085979); continue; case 10: return false; case 11: return false; case 13: arg_198_0 = ((this.FetchParentalControls != other.FetchParentalControls) ? -944139996 : -1892609862); continue; case 14: arg_198_0 = ((this.FetchId == other.FetchId) ? -265351608 : -474810593); continue; case 15: arg_198_0 = ((this.FetchEmail != other.FetchEmail) ? -2065838753 : -430528170); continue; case 16: arg_198_0 = ((this.FetchAll != other.FetchAll) ? -1844580872 : -678151045); continue; case 17: arg_198_0 = ((this.FetchBattleTag == other.FetchBattleTag) ? -1665983072 : -1697630007); continue; case 18: arg_198_0 = ((this.FetchLinks != other.FetchLinks) ? -994345468 : -2043592771); continue; case 19: goto IL_18; case 20: return false; case 21: return false; case 22: return false; } break; } return true; IL_18: arg_198_0 = -381583474; goto IL_193; IL_20E: arg_198_0 = ((other == this) ? -1677138455 : -589822004); goto IL_193; } public override int GetHashCode() { int num = 1; if (this.ref_ != null) { goto IL_24A; } goto IL_2BC; uint arg_254_0; while (true) { IL_24F: uint num2; switch ((num2 = (arg_254_0 ^ 172632704u)) % 19u) { case 0u: goto IL_24A; case 1u: arg_254_0 = ((!this.FetchEmail) ? 1745150730u : 1005635232u); continue; case 2u: arg_254_0 = ((!this.FetchBattleTag) ? 721837195u : 1754135228u); continue; case 3u: num ^= this.FetchBattleTag.GetHashCode(); arg_254_0 = (num2 * 1173068787u ^ 987013247u); continue; case 4u: arg_254_0 = ((!this.FetchId) ? 1810738072u : 966365681u); continue; case 5u: num ^= this.FetchAll.GetHashCode(); arg_254_0 = (num2 * 3904229107u ^ 1988930586u); continue; case 6u: goto IL_2BC; case 7u: num ^= this.FetchFullName.GetHashCode(); arg_254_0 = (num2 * 3419487808u ^ 1905751278u); continue; case 8u: arg_254_0 = (this.FetchLinks ? 520125827u : 243129350u); continue; case 9u: num ^= this.FetchEmail.GetHashCode(); arg_254_0 = (num2 * 1872591073u ^ 1805413162u); continue; case 10u: arg_254_0 = ((!this.FetchParentalControls) ? 792126276u : 1825209133u); continue; case 11u: num ^= this.FetchLinks.GetHashCode(); arg_254_0 = (num2 * 3307674613u ^ 3384429273u); continue; case 12u: arg_254_0 = ((!this.FetchFullName) ? 1821586542u : 1375238418u); continue; case 13u: arg_254_0 = ((!this.FetchBlob) ? 2078565473u : 393464365u); continue; case 14u: num ^= this.FetchParentalControls.GetHashCode(); arg_254_0 = (num2 * 500526509u ^ 1515731373u); continue; case 16u: num ^= this.FetchId.GetHashCode(); arg_254_0 = (num2 * 395151427u ^ 467057931u); continue; case 17u: num ^= this.FetchBlob.GetHashCode(); arg_254_0 = (num2 * 681424433u ^ 4093877116u); continue; case 18u: num ^= GetAccountRequest.smethod_1(this.Ref); arg_254_0 = (num2 * 1394005301u ^ 1281172675u); continue; } break; } return num; IL_24A: arg_254_0 = 1489681897u; goto IL_24F; IL_2BC: arg_254_0 = ((!this.FetchAll) ? 964836620u : 1010878098u); goto IL_24F; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.ref_ != null) { goto IL_12C; } goto IL_338; uint arg_2C0_0; while (true) { IL_2BB: uint num; switch ((num = (arg_2C0_0 ^ 2369489846u)) % 23u) { case 0u: output.WriteBool(this.FetchBlob); arg_2C0_0 = (num * 2427286944u ^ 1923477231u); continue; case 1u: goto IL_338; case 2u: output.WriteRawTag(10); output.WriteMessage(this.Ref); arg_2C0_0 = (num * 1232238613u ^ 907633668u); continue; case 3u: output.WriteRawTag(112); output.WriteBool(this.FetchBattleTag); arg_2C0_0 = (num * 4217483469u ^ 1753719411u); continue; case 4u: output.WriteRawTag(96); arg_2C0_0 = (num * 1925778880u ^ 1384232404u); continue; case 5u: output.WriteBool(this.FetchFullName); arg_2C0_0 = (num * 904598182u ^ 3217422111u); continue; case 6u: output.WriteRawTag(120); arg_2C0_0 = (num * 103534462u ^ 668942089u); continue; case 7u: arg_2C0_0 = ((!this.FetchBlob) ? 4244579471u : 3495363650u); continue; case 8u: output.WriteRawTag(104); output.WriteBool(this.FetchEmail); arg_2C0_0 = (num * 2045840464u ^ 1685900143u); continue; case 9u: arg_2C0_0 = (this.FetchBattleTag ? 3172432739u : 4190365922u); continue; case 11u: arg_2C0_0 = (this.FetchParentalControls ? 2833731190u : 3435499945u); continue; case 12u: output.WriteRawTag(128, 1); output.WriteBool(this.FetchLinks); arg_2C0_0 = (num * 3309038210u ^ 1096503054u); continue; case 13u: output.WriteRawTag(136, 1); arg_2C0_0 = (num * 4197704706u ^ 377552212u); continue; case 14u: goto IL_12C; case 15u: arg_2C0_0 = ((!this.FetchId) ? 3939138300u : 3905455935u); continue; case 16u: output.WriteRawTag(88); arg_2C0_0 = (num * 402469874u ^ 2316022497u); continue; case 17u: arg_2C0_0 = ((!this.FetchLinks) ? 2996997712u : 3295027801u); continue; case 18u: arg_2C0_0 = ((!this.FetchFullName) ? 3633228413u : 3132747040u); continue; case 19u: output.WriteRawTag(80); output.WriteBool(this.FetchAll); arg_2C0_0 = (num * 856705979u ^ 1509747949u); continue; case 20u: arg_2C0_0 = ((!this.FetchEmail) ? 2282417919u : 2978756403u); continue; case 21u: output.WriteBool(this.FetchParentalControls); arg_2C0_0 = (num * 2768266595u ^ 1990670159u); continue; case 22u: output.WriteBool(this.FetchId); arg_2C0_0 = (num * 1267434991u ^ 337737410u); continue; } break; } return; IL_12C: arg_2C0_0 = 3183629405u; goto IL_2BB; IL_338: arg_2C0_0 = ((!this.FetchAll) ? 4069857517u : 3300333494u); goto IL_2BB; } public int CalculateSize() { int num = 0; while (true) { IL_273: uint arg_216_0 = 3013214507u; while (true) { uint num2; switch ((num2 = (arg_216_0 ^ 3457195625u)) % 20u) { case 0u: arg_216_0 = (this.FetchEmail ? 4077784508u : 3569317063u); continue; case 1u: num += 2; arg_216_0 = (num2 * 1838888546u ^ 3748000077u); continue; case 2u: num += 3; arg_216_0 = (num2 * 3261385715u ^ 2270454923u); continue; case 3u: arg_216_0 = ((!this.FetchAll) ? 3174684510u : 3276314909u); continue; case 4u: num += 2; arg_216_0 = (num2 * 852173208u ^ 1796192190u); continue; case 5u: goto IL_273; case 6u: num += 3; arg_216_0 = (num2 * 747507874u ^ 787724872u); continue; case 7u: num += 2; arg_216_0 = (num2 * 3101292130u ^ 219650584u); continue; case 8u: arg_216_0 = ((!this.FetchFullName) ? 4120328006u : 3026889142u); continue; case 9u: num += 2; arg_216_0 = (num2 * 2482290284u ^ 1848178857u); continue; case 10u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Ref); arg_216_0 = (num2 * 380823123u ^ 1600518860u); continue; case 11u: num += 2; arg_216_0 = (num2 * 3687304856u ^ 2621229669u); continue; case 12u: arg_216_0 = (this.FetchParentalControls ? 2784508415u : 3189036708u); continue; case 14u: arg_216_0 = (this.FetchBattleTag ? 4068575594u : 3066288557u); continue; case 15u: arg_216_0 = (this.FetchLinks ? 2416537167u : 4189155993u); continue; case 16u: num += 2; arg_216_0 = (num2 * 1084184877u ^ 2157567756u); continue; case 17u: arg_216_0 = ((!this.FetchId) ? 3996088549u : 2297166464u); continue; case 18u: arg_216_0 = (((this.ref_ != null) ? 3370290961u : 3289391552u) ^ num2 * 3935693519u); continue; case 19u: arg_216_0 = ((!this.FetchBlob) ? 2614130276u : 4177985121u); continue; } return num; } } return num; } public void MergeFrom(GetAccountRequest other) { if (other == null) { goto IL_280; } goto IL_302; uint arg_28A_0; while (true) { IL_285: uint num; switch ((num = (arg_28A_0 ^ 673477329u)) % 23u) { case 0u: goto IL_280; case 1u: arg_28A_0 = (other.FetchLinks ? 1604185315u : 2080222985u); continue; case 2u: arg_28A_0 = ((!other.FetchFullName) ? 1387670941u : 579867938u); continue; case 3u: return; case 4u: this.FetchFullName = other.FetchFullName; arg_28A_0 = (num * 1068212818u ^ 2169781323u); continue; case 5u: this.FetchParentalControls = other.FetchParentalControls; arg_28A_0 = (num * 2373865870u ^ 1833459914u); continue; case 6u: this.FetchAll = other.FetchAll; arg_28A_0 = (num * 1619829963u ^ 2694937319u); continue; case 7u: goto IL_302; case 8u: arg_28A_0 = ((!other.FetchBattleTag) ? 409361859u : 948422999u); continue; case 9u: this.FetchBlob = other.FetchBlob; arg_28A_0 = (num * 3846366214u ^ 299201568u); continue; case 10u: this.Ref.MergeFrom(other.Ref); arg_28A_0 = 2050757583u; continue; case 11u: this.ref_ = new AccountReference(); arg_28A_0 = (num * 579010534u ^ 2698437859u); continue; case 13u: arg_28A_0 = (other.FetchParentalControls ? 2129701518u : 956330872u); continue; case 14u: arg_28A_0 = (other.FetchAll ? 2056916435u : 2065859697u); continue; case 15u: arg_28A_0 = (other.FetchId ? 409574630u : 1255531028u); continue; case 16u: arg_28A_0 = (other.FetchEmail ? 1321952580u : 1003518474u); continue; case 17u: this.FetchEmail = other.FetchEmail; arg_28A_0 = (num * 1541112811u ^ 3251805901u); continue; case 18u: this.FetchBattleTag = other.FetchBattleTag; arg_28A_0 = (num * 3031463927u ^ 1445160329u); continue; case 19u: arg_28A_0 = (other.FetchBlob ? 1525578258u : 1075483826u); continue; case 20u: this.FetchLinks = other.FetchLinks; arg_28A_0 = (num * 4071698923u ^ 1757439727u); continue; case 21u: this.FetchId = other.FetchId; arg_28A_0 = (num * 1545862157u ^ 892198623u); continue; case 22u: arg_28A_0 = (((this.ref_ == null) ? 4058487060u : 3861223325u) ^ num * 4156128112u); continue; } break; } return; IL_280: arg_28A_0 = 1290491901u; goto IL_285; IL_302: arg_28A_0 = ((other.ref_ == null) ? 2050757583u : 1076001753u); goto IL_285; } public void MergeFrom(CodedInputStream input) { while (true) { IL_448: uint num; uint arg_39C_0 = ((num = input.ReadTag()) == 0u) ? 2989231291u : 3245901478u; while (true) { uint num2; switch ((num2 = (arg_39C_0 ^ 3952351511u)) % 36u) { case 0u: arg_39C_0 = 3245901478u; continue; case 1u: this.FetchParentalControls = input.ReadBool(); arg_39C_0 = 3783385365u; continue; case 2u: arg_39C_0 = (((num != 128u) ? 3267756230u : 3861666492u) ^ num2 * 1266392662u); continue; case 3u: arg_39C_0 = (num2 * 3200685881u ^ 855117821u); continue; case 5u: arg_39C_0 = ((num <= 96u) ? 2656000491u : 3115938048u); continue; case 6u: arg_39C_0 = ((this.ref_ == null) ? 3297236128u : 3840928548u); continue; case 7u: this.FetchLinks = input.ReadBool(); arg_39C_0 = 2707356377u; continue; case 8u: arg_39C_0 = (num2 * 549510053u ^ 116389293u); continue; case 9u: input.SkipLastField(); arg_39C_0 = 3604515569u; continue; case 10u: arg_39C_0 = (num2 * 3045130534u ^ 3025043329u); continue; case 11u: arg_39C_0 = (num2 * 1782718454u ^ 2926477304u); continue; case 12u: arg_39C_0 = (((num != 80u) ? 2128333104u : 55862190u) ^ num2 * 1951667292u); continue; case 13u: this.FetchFullName = input.ReadBool(); arg_39C_0 = 3978009603u; continue; case 14u: this.FetchBattleTag = input.ReadBool(); arg_39C_0 = 3074076605u; continue; case 15u: arg_39C_0 = (((num != 112u) ? 2495303002u : 2415822599u) ^ num2 * 3875813950u); continue; case 16u: arg_39C_0 = (((num <= 80u) ? 3860326805u : 3750893487u) ^ num2 * 4061641522u); continue; case 17u: arg_39C_0 = ((num != 120u) ? 4250205201u : 3331126958u); continue; case 18u: arg_39C_0 = (((num == 10u) ? 2239717267u : 2585195037u) ^ num2 * 3759650949u); continue; case 19u: arg_39C_0 = (((num != 96u) ? 1115791081u : 23196779u) ^ num2 * 1753324244u); continue; case 20u: arg_39C_0 = (num2 * 2494555315u ^ 269106665u); continue; case 21u: arg_39C_0 = (((num == 136u) ? 3982057351u : 3130771015u) ^ num2 * 591428593u); continue; case 22u: arg_39C_0 = (num2 * 1583998082u ^ 2538758246u); continue; case 23u: input.ReadMessage(this.ref_); arg_39C_0 = 3206408308u; continue; case 24u: this.FetchId = input.ReadBool(); arg_39C_0 = 3783385365u; continue; case 25u: arg_39C_0 = (((num != 104u) ? 1749119998u : 1716007532u) ^ num2 * 2770328650u); continue; case 26u: goto IL_448; case 27u: arg_39C_0 = (num2 * 3705748970u ^ 2166348395u); continue; case 28u: this.FetchBlob = input.ReadBool(); arg_39C_0 = 3783385365u; continue; case 29u: this.FetchAll = input.ReadBool(); arg_39C_0 = 3783385365u; continue; case 30u: arg_39C_0 = (num2 * 50782457u ^ 2856421967u); continue; case 31u: this.ref_ = new AccountReference(); arg_39C_0 = (num2 * 2098915091u ^ 2017562289u); continue; case 32u: arg_39C_0 = ((num != 88u) ? 4164132456u : 4266700635u); continue; case 33u: this.FetchEmail = input.ReadBool(); arg_39C_0 = 2536512847u; continue; case 34u: arg_39C_0 = (num2 * 49989246u ^ 1093750305u); continue; case 35u: arg_39C_0 = ((num <= 112u) ? 3243707350u : 4276857262u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/UpdateMemberStateNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class UpdateMemberStateNotification : IMessage<UpdateMemberStateNotification>, IEquatable<UpdateMemberStateNotification>, IDeepCloneable<UpdateMemberStateNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateMemberStateNotification.__c __9 = new UpdateMemberStateNotification.__c(); internal UpdateMemberStateNotification cctor>b__44_0() { return new UpdateMemberStateNotification(); } } private static readonly MessageParser<UpdateMemberStateNotification> _parser = new MessageParser<UpdateMemberStateNotification>(new Func<UpdateMemberStateNotification>(UpdateMemberStateNotification.__c.__9.<.cctor>b__44_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int StateChangeFieldNumber = 2; private static readonly FieldCodec<Member> _repeated_stateChange_codec = FieldCodec.ForMessage<Member>(18u, Member.Parser); private readonly RepeatedField<Member> stateChange_ = new RepeatedField<Member>(); public const int RemovedRoleFieldNumber = 3; private static readonly FieldCodec<uint> _repeated_removedRole_codec = FieldCodec.ForUInt32(26u); private readonly RepeatedField<uint> removedRole_ = new RepeatedField<uint>(); public const int ChannelIdFieldNumber = 4; private ChannelId channelId_; public const int SubscriberFieldNumber = 5; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<UpdateMemberStateNotification> Parser { get { return UpdateMemberStateNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[14]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateMemberStateNotification.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public RepeatedField<Member> StateChange { get { return this.stateChange_; } } public RepeatedField<uint> RemovedRole { get { return this.removedRole_; } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public UpdateMemberStateNotification() { } public UpdateMemberStateNotification(UpdateMemberStateNotification other) : this() { while (true) { IL_A5: uint arg_85_0 = 2155922120u; while (true) { uint num; switch ((num = (arg_85_0 ^ 4224366541u)) % 5u) { case 0u: goto IL_A5; case 1u: this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); arg_85_0 = 2347134806u; continue; case 3u: this.removedRole_ = other.removedRole_.Clone(); arg_85_0 = (num * 1389563123u ^ 846737169u); continue; case 4u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.stateChange_ = other.stateChange_.Clone(); arg_85_0 = 2358331013u; continue; } goto Block_3; } } Block_3: this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); } public UpdateMemberStateNotification Clone() { return new UpdateMemberStateNotification(this); } public override bool Equals(object other) { return this.Equals(other as UpdateMemberStateNotification); } public bool Equals(UpdateMemberStateNotification other) { if (other == null) { goto IL_47; } goto IL_15D; int arg_107_0; while (true) { IL_102: switch ((arg_107_0 ^ 1547878738) % 15) { case 0: return false; case 1: goto IL_15D; case 2: arg_107_0 = (this.stateChange_.Equals(other.stateChange_) ? 837464946 : 688645962); continue; case 3: arg_107_0 = (this.removedRole_.Equals(other.removedRole_) ? 1133939901 : 67485430); continue; case 4: arg_107_0 = ((!UpdateMemberStateNotification.smethod_0(this.ChannelId, other.ChannelId)) ? 193049714 : 1166556471); continue; case 5: arg_107_0 = ((!UpdateMemberStateNotification.smethod_0(this.AgentId, other.AgentId)) ? 577344707 : 1002717907); continue; case 6: return false; case 8: goto IL_47; case 9: return false; case 10: arg_107_0 = (UpdateMemberStateNotification.smethod_0(this.Subscriber, other.Subscriber) ? 1600490383 : 1231481732); continue; case 11: return false; case 12: return false; case 13: return false; case 14: return true; } break; } return true; IL_47: arg_107_0 = 1924647573; goto IL_102; IL_15D: arg_107_0 = ((other != this) ? 1854318873 : 1330206149); goto IL_102; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_97; } goto IL_D8; uint arg_A1_0; while (true) { IL_9C: uint num2; switch ((num2 = (arg_A1_0 ^ 4114379538u)) % 7u) { case 0u: goto IL_97; case 1u: num ^= UpdateMemberStateNotification.smethod_1(this.Subscriber); arg_A1_0 = (num2 * 3677193049u ^ 2202261084u); continue; case 2u: num ^= UpdateMemberStateNotification.smethod_1(this.AgentId); arg_A1_0 = (num2 * 1789034262u ^ 1983548406u); continue; case 3u: goto IL_D8; case 4u: num ^= UpdateMemberStateNotification.smethod_1(this.ChannelId); arg_A1_0 = (num2 * 2065928323u ^ 1754720455u); continue; case 5u: arg_A1_0 = ((this.subscriber_ != null) ? 2930467252u : 3967663082u); continue; } break; } return num; IL_97: arg_A1_0 = 4268409653u; goto IL_9C; IL_D8: num ^= UpdateMemberStateNotification.smethod_1(this.stateChange_); num ^= UpdateMemberStateNotification.smethod_1(this.removedRole_); arg_A1_0 = ((this.channelId_ != null) ? 2197051314u : 2842842407u); goto IL_9C; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_54; } goto IL_160; uint arg_123_0; while (true) { IL_11E: uint num; switch ((num = (arg_123_0 ^ 3971209753u)) % 12u) { case 0u: output.WriteMessage(this.ChannelId); arg_123_0 = (num * 2845704604u ^ 4210474791u); continue; case 1u: output.WriteMessage(this.Subscriber); arg_123_0 = (num * 365755258u ^ 4265004637u); continue; case 2u: output.WriteRawTag(34); arg_123_0 = (num * 2801960818u ^ 2103325161u); continue; case 3u: output.WriteRawTag(42); arg_123_0 = (num * 2260172983u ^ 1998285937u); continue; case 4u: output.WriteRawTag(10); arg_123_0 = (num * 2525382236u ^ 4200358097u); continue; case 5u: arg_123_0 = (((this.channelId_ == null) ? 2149023154u : 4188661242u) ^ num * 1415447713u); continue; case 7u: goto IL_160; case 8u: output.WriteMessage(this.AgentId); arg_123_0 = (num * 313646284u ^ 695575506u); continue; case 9u: goto IL_54; case 10u: arg_123_0 = ((this.subscriber_ != null) ? 2552836622u : 3314455735u); continue; case 11u: this.removedRole_.WriteTo(output, UpdateMemberStateNotification._repeated_removedRole_codec); arg_123_0 = (num * 3686590603u ^ 1621278469u); continue; } break; } return; IL_54: arg_123_0 = 2671957825u; goto IL_11E; IL_160: this.stateChange_.WriteTo(output, UpdateMemberStateNotification._repeated_stateChange_codec); arg_123_0 = 4181015186u; goto IL_11E; } public int CalculateSize() { int num = 0; while (true) { IL_12D: uint arg_101_0 = 3595103087u; while (true) { uint num2; switch ((num2 = (arg_101_0 ^ 2347773906u)) % 8u) { case 0u: num += this.stateChange_.CalculateSize(UpdateMemberStateNotification._repeated_stateChange_codec); num += this.removedRole_.CalculateSize(UpdateMemberStateNotification._repeated_removedRole_codec); arg_101_0 = ((this.channelId_ != null) ? 3040614406u : 3969441696u); continue; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_101_0 = (num2 * 2097013371u ^ 3870425074u); continue; case 2u: arg_101_0 = ((this.subscriber_ == null) ? 2195970793u : 4183702067u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_101_0 = (num2 * 1098599031u ^ 863364140u); continue; case 5u: arg_101_0 = (((this.agentId_ != null) ? 1913368235u : 211983445u) ^ num2 * 2428859011u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_101_0 = (num2 * 2600652638u ^ 3800859974u); continue; case 7u: goto IL_12D; } return num; } } return num; } public void MergeFrom(UpdateMemberStateNotification other) { if (other == null) { goto IL_E2; } goto IL_20A; uint arg_1B2_0; while (true) { IL_1AD: uint num; switch ((num = (arg_1B2_0 ^ 3184958617u)) % 15u) { case 0u: arg_1B2_0 = (((this.channelId_ != null) ? 3326561877u : 3258649586u) ^ num * 1493382148u); continue; case 1u: arg_1B2_0 = ((other.subscriber_ == null) ? 3638200566u : 3505857797u); continue; case 2u: this.ChannelId.MergeFrom(other.ChannelId); arg_1B2_0 = 2783351259u; continue; case 3u: arg_1B2_0 = (((this.subscriber_ != null) ? 1800339654u : 423538025u) ^ num * 2560712119u); continue; case 5u: this.AgentId.MergeFrom(other.AgentId); arg_1B2_0 = 2939520357u; continue; case 6u: this.channelId_ = new ChannelId(); arg_1B2_0 = (num * 1195280328u ^ 2427563993u); continue; case 7u: goto IL_20A; case 8u: goto IL_E2; case 9u: this.Subscriber.MergeFrom(other.Subscriber); arg_1B2_0 = 3638200566u; continue; case 10u: arg_1B2_0 = (((this.agentId_ == null) ? 3538976330u : 3340813506u) ^ num * 2291483656u); continue; case 11u: return; case 12u: this.stateChange_.Add(other.stateChange_); this.removedRole_.Add(other.removedRole_); arg_1B2_0 = ((other.channelId_ != null) ? 4207762996u : 2783351259u); continue; case 13u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_1B2_0 = (num * 3111519374u ^ 503132186u); continue; case 14u: this.agentId_ = new EntityId(); arg_1B2_0 = (num * 1957591726u ^ 4082357920u); continue; } break; } return; IL_E2: arg_1B2_0 = 2754770374u; goto IL_1AD; IL_20A: arg_1B2_0 = ((other.agentId_ == null) ? 2939520357u : 2916836938u); goto IL_1AD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_324: uint num; uint arg_2A4_0 = ((num = input.ReadTag()) == 0u) ? 3373349260u : 3262704705u; while (true) { uint num2; switch ((num2 = (arg_2A4_0 ^ 2248115575u)) % 25u) { case 0u: arg_2A4_0 = (((num == 18u) ? 2399427570u : 4141470442u) ^ num2 * 2499365022u); continue; case 1u: input.ReadMessage(this.subscriber_); arg_2A4_0 = 4115854121u; continue; case 2u: arg_2A4_0 = ((num != 26u) ? 3582314748u : 2565578017u); continue; case 3u: arg_2A4_0 = 3262704705u; continue; case 4u: arg_2A4_0 = (((num != 24u) ? 1652629392u : 6847910u) ^ num2 * 3410658217u); continue; case 5u: arg_2A4_0 = ((num <= 24u) ? 2482663312u : 4052944787u); continue; case 6u: input.ReadMessage(this.channelId_); arg_2A4_0 = 4048263346u; continue; case 7u: arg_2A4_0 = (num2 * 2642880907u ^ 1327580638u); continue; case 8u: arg_2A4_0 = (num2 * 1486358784u ^ 833171497u); continue; case 9u: input.ReadMessage(this.agentId_); arg_2A4_0 = 2888987932u; continue; case 10u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_2A4_0 = (num2 * 2392867893u ^ 2956448509u); continue; case 11u: arg_2A4_0 = ((this.agentId_ != null) ? 3778397272u : 2279546109u); continue; case 12u: this.channelId_ = new ChannelId(); arg_2A4_0 = (num2 * 1337298334u ^ 2031341976u); continue; case 14u: this.removedRole_.AddEntriesFrom(input, UpdateMemberStateNotification._repeated_removedRole_codec); arg_2A4_0 = 4115854121u; continue; case 15u: this.agentId_ = new EntityId(); arg_2A4_0 = (num2 * 35633968u ^ 13587384u); continue; case 16u: this.stateChange_.AddEntriesFrom(input, UpdateMemberStateNotification._repeated_stateChange_codec); arg_2A4_0 = 4115854121u; continue; case 17u: arg_2A4_0 = (((num == 10u) ? 3405187356u : 4065688603u) ^ num2 * 812807373u); continue; case 18u: arg_2A4_0 = (num2 * 1873072235u ^ 4011443397u); continue; case 19u: input.SkipLastField(); arg_2A4_0 = 4115854121u; continue; case 20u: arg_2A4_0 = ((this.subscriber_ == null) ? 3264938124u : 3262233098u); continue; case 21u: arg_2A4_0 = ((this.channelId_ != null) ? 2970478512u : 2949152219u); continue; case 22u: goto IL_324; case 23u: arg_2A4_0 = (((num != 34u) ? 152758423u : 826413558u) ^ num2 * 3372063668u); continue; case 24u: arg_2A4_0 = (((num != 42u) ? 3709098453u : 4275072519u) ^ num2 * 1334612500u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/RoleTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class RoleTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return RoleTypesReflection.descriptor; } } static RoleTypesReflection() { RoleTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(RoleTypesReflection.smethod_1(RoleTypesReflection.smethod_0(new string[] { Module.smethod_33<string>(752087161u), Module.smethod_36<string>(2019316176u), Module.smethod_37<string>(1170135636u), Module.smethod_33<string>(1672336425u), Module.smethod_34<string>(2004210315u), Module.smethod_37<string>(3010903268u), Module.smethod_33<string>(956273177u), Module.smethod_33<string>(36023913u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(RoleTypesReflection.smethod_2(typeof(Role).TypeHandle), Role.Parser, new string[] { Module.smethod_34<string>(4055669268u), Module.smethod_37<string>(2134609685u), Module.smethod_35<string>(2496757375u), Module.smethod_34<string>(1601600500u), Module.smethod_36<string>(2296946820u), Module.smethod_35<string>(1587395787u), Module.smethod_35<string>(286313566u), Module.smethod_37<string>(1754272416u), Module.smethod_34<string>(476761156u), Module.smethod_34<string>(757970992u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf.WellKnownTypes/AnyReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class AnyReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return AnyReflection.descriptor; } } static AnyReflection() { AnyReflection.descriptor = FileDescriptor.FromGeneratedCode(AnyReflection.smethod_1(AnyReflection.smethod_0(Module.smethod_36<string>(3424557400u), Module.smethod_33<string>(3013459857u), Module.smethod_34<string>(1019132403u), Module.smethod_37<string>(1923796076u))), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(AnyReflection.smethod_2(typeof(Any).TypeHandle), Any.Parser, new string[] { Module.smethod_35<string>(2589658621u), Module.smethod_36<string>(994248421u) }, null, null, null) })); } static string smethod_0(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountLevelInfo.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountLevelInfo : IMessage<AccountLevelInfo>, IEquatable<AccountLevelInfo>, IDeepCloneable<AccountLevelInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountLevelInfo.__c __9 = new AccountLevelInfo.__c(); internal AccountLevelInfo cctor>b__74_0() { return new AccountLevelInfo(); } } private static readonly MessageParser<AccountLevelInfo> _parser = new MessageParser<AccountLevelInfo>(new Func<AccountLevelInfo>(AccountLevelInfo.__c.__9.<.cctor>b__74_0)); public const int LicensesFieldNumber = 3; private static readonly FieldCodec<AccountLicense> _repeated_licenses_codec; private readonly RepeatedField<AccountLicense> licenses_ = new RepeatedField<AccountLicense>(); public const int DefaultCurrencyFieldNumber = 4; private uint defaultCurrency_; public const int CountryFieldNumber = 5; private string country_ = ""; public const int PreferredRegionFieldNumber = 6; private uint preferredRegion_; public const int FullNameFieldNumber = 7; private string fullName_ = ""; public const int BattleTagFieldNumber = 8; private string battleTag_ = ""; public const int MutedFieldNumber = 9; private bool muted_; public const int ManualReviewFieldNumber = 10; private bool manualReview_; public const int AccountPaidAnyFieldNumber = 11; private bool accountPaidAny_; public const int IdentityCheckStatusFieldNumber = 12; private IdentityVerificationStatus identityCheckStatus_; public const int EmailFieldNumber = 13; private string email_ = ""; public static MessageParser<AccountLevelInfo> Parser { get { return AccountLevelInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[18]; } } MessageDescriptor IMessage.Descriptor { get { return AccountLevelInfo.Descriptor; } } public RepeatedField<AccountLicense> Licenses { get { return this.licenses_; } } public uint DefaultCurrency { get { return this.defaultCurrency_; } set { this.defaultCurrency_ = value; } } public string Country { get { return this.country_; } set { this.country_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public uint PreferredRegion { get { return this.preferredRegion_; } set { this.preferredRegion_ = value; } } public string FullName { get { return this.fullName_; } set { this.fullName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public bool Muted { get { return this.muted_; } set { this.muted_ = value; } } public bool ManualReview { get { return this.manualReview_; } set { this.manualReview_ = value; } } public bool AccountPaidAny { get { return this.accountPaidAny_; } set { this.accountPaidAny_ = value; } } public IdentityVerificationStatus IdentityCheckStatus { get { return this.identityCheckStatus_; } set { this.identityCheckStatus_ = value; } } public string Email { get { return this.email_; } set { this.email_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public AccountLevelInfo() { } public AccountLevelInfo(AccountLevelInfo other) : this() { while (true) { IL_126: uint arg_FA_0 = 2133868732u; while (true) { uint num; switch ((num = (arg_FA_0 ^ 973291341u)) % 8u) { case 0u: this.defaultCurrency_ = other.defaultCurrency_; this.country_ = other.country_; this.preferredRegion_ = other.preferredRegion_; this.fullName_ = other.fullName_; arg_FA_0 = (num * 380203362u ^ 3677914152u); continue; case 1u: this.licenses_ = other.licenses_.Clone(); arg_FA_0 = (num * 2244943882u ^ 2202727455u); continue; case 2u: this.muted_ = other.muted_; this.manualReview_ = other.manualReview_; arg_FA_0 = (num * 2857336166u ^ 2326466405u); continue; case 4u: this.accountPaidAny_ = other.accountPaidAny_; arg_FA_0 = (num * 2062832376u ^ 2882767458u); continue; case 5u: this.battleTag_ = other.battleTag_; arg_FA_0 = (num * 2414220908u ^ 400497955u); continue; case 6u: goto IL_126; case 7u: this.identityCheckStatus_ = other.identityCheckStatus_; this.email_ = other.email_; arg_FA_0 = (num * 766078153u ^ 4039406769u); continue; } return; } } } public AccountLevelInfo Clone() { return new AccountLevelInfo(this); } public override bool Equals(object other) { return this.Equals(other as AccountLevelInfo); } public bool Equals(AccountLevelInfo other) { if (other == null) { goto IL_C8; } goto IL_289; int arg_203_0; while (true) { IL_1FE: switch ((arg_203_0 ^ -781233351) % 27) { case 0: arg_203_0 = ((!AccountLevelInfo.smethod_0(this.Country, other.Country)) ? -1782879865 : -1591729317); continue; case 1: arg_203_0 = (AccountLevelInfo.smethod_0(this.BattleTag, other.BattleTag) ? -1200911610 : -768580493); continue; case 2: return false; case 3: arg_203_0 = ((this.PreferredRegion != other.PreferredRegion) ? -378217023 : -1312555324); continue; case 4: return false; case 5: return false; case 6: return true; case 7: return false; case 8: return false; case 9: arg_203_0 = ((!AccountLevelInfo.smethod_0(this.Email, other.Email)) ? -534739402 : -906543525); continue; case 10: return false; case 11: return false; case 12: return false; case 13: arg_203_0 = ((this.DefaultCurrency == other.DefaultCurrency) ? -307719332 : -1197213946); continue; case 14: return false; case 15: arg_203_0 = ((this.AccountPaidAny == other.AccountPaidAny) ? -1513567802 : -483513830); continue; case 16: arg_203_0 = ((!this.licenses_.Equals(other.licenses_)) ? -3916259 : -69917665); continue; case 17: goto IL_C8; case 18: return false; case 19: goto IL_289; case 21: return false; case 22: arg_203_0 = ((!AccountLevelInfo.smethod_0(this.FullName, other.FullName)) ? -1400154228 : -33101720); continue; case 23: arg_203_0 = ((this.IdentityCheckStatus == other.IdentityCheckStatus) ? -422899652 : -513771142); continue; case 24: arg_203_0 = ((this.ManualReview == other.ManualReview) ? -2036037191 : -2037951264); continue; case 25: return false; case 26: arg_203_0 = ((this.Muted != other.Muted) ? -564935307 : -1011341407); continue; } break; } return true; IL_C8: arg_203_0 = -1264456410; goto IL_1FE; IL_289: arg_203_0 = ((other == this) ? -744922958 : -917604816); goto IL_1FE; } public override int GetHashCode() { int num = 1 ^ AccountLevelInfo.smethod_1(this.licenses_); if (this.DefaultCurrency != 0u) { goto IL_E6; } goto IL_333; uint arg_2C2_0; while (true) { IL_2BD: uint num2; switch ((num2 = (arg_2C2_0 ^ 1664839643u)) % 21u) { case 0u: goto IL_333; case 1u: arg_2C2_0 = ((this.IdentityCheckStatus == IdentityVerificationStatus.IDENT_NO_DATA) ? 1035366487u : 831186676u); continue; case 2u: num ^= this.IdentityCheckStatus.GetHashCode(); arg_2C2_0 = (num2 * 4276140811u ^ 3661646418u); continue; case 3u: arg_2C2_0 = ((this.FullName.Length == 0) ? 1596648021u : 1539472502u); continue; case 4u: arg_2C2_0 = ((this.PreferredRegion != 0u) ? 1589733349u : 1881158414u); continue; case 5u: num ^= this.FullName.GetHashCode(); arg_2C2_0 = (num2 * 662013861u ^ 902824916u); continue; case 6u: num ^= this.Email.GetHashCode(); arg_2C2_0 = (num2 * 1771023189u ^ 2244463996u); continue; case 7u: num ^= this.AccountPaidAny.GetHashCode(); arg_2C2_0 = (num2 * 4288676547u ^ 2110615391u); continue; case 8u: num ^= this.DefaultCurrency.GetHashCode(); arg_2C2_0 = (num2 * 1679275032u ^ 516793898u); continue; case 10u: arg_2C2_0 = ((this.Email.Length != 0) ? 195160958u : 852790453u); continue; case 11u: num ^= this.BattleTag.GetHashCode(); arg_2C2_0 = (num2 * 2385658734u ^ 1084980959u); continue; case 12u: arg_2C2_0 = (this.ManualReview ? 1380106523u : 1167657382u); continue; case 13u: arg_2C2_0 = ((!this.AccountPaidAny) ? 1244920030u : 764329904u); continue; case 14u: arg_2C2_0 = (this.Muted ? 1994703422u : 522609903u); continue; case 15u: goto IL_E6; case 16u: num ^= this.Muted.GetHashCode(); arg_2C2_0 = (num2 * 3600989476u ^ 2967921115u); continue; case 17u: num ^= this.ManualReview.GetHashCode(); arg_2C2_0 = (num2 * 3279678374u ^ 3137902886u); continue; case 18u: num ^= this.PreferredRegion.GetHashCode(); arg_2C2_0 = (num2 * 2471521234u ^ 4123828178u); continue; case 19u: arg_2C2_0 = ((this.BattleTag.Length != 0) ? 47137646u : 1599334937u); continue; case 20u: num ^= this.Country.GetHashCode(); arg_2C2_0 = (num2 * 781300108u ^ 1816857094u); continue; } break; } return num; IL_E6: arg_2C2_0 = 1944299170u; goto IL_2BD; IL_333: arg_2C2_0 = ((this.Country.Length == 0) ? 1301091558u : 91927859u); goto IL_2BD; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.licenses_.WriteTo(output, AccountLevelInfo._repeated_licenses_codec); if (this.DefaultCurrency != 0u) { goto IL_247; } goto IL_3B8; uint arg_334_0; while (true) { IL_32F: uint num; switch ((num = (arg_334_0 ^ 2566696005u)) % 26u) { case 0u: output.WriteRawTag(42); output.WriteString(this.Country); arg_334_0 = (num * 3988988997u ^ 1445247679u); continue; case 1u: output.WriteBool(this.AccountPaidAny); arg_334_0 = (num * 1004326155u ^ 205781198u); continue; case 2u: output.WriteUInt32(this.PreferredRegion); arg_334_0 = (num * 4029841407u ^ 1913095571u); continue; case 3u: output.WriteRawTag(72); output.WriteBool(this.Muted); arg_334_0 = (num * 2539986752u ^ 540998569u); continue; case 4u: arg_334_0 = ((AccountLevelInfo.smethod_2(this.BattleTag) != 0) ? 3174529621u : 3776649775u); continue; case 5u: output.WriteRawTag(37); arg_334_0 = (num * 3070597156u ^ 1795496907u); continue; case 6u: arg_334_0 = ((this.PreferredRegion == 0u) ? 4283282979u : 2560453485u); continue; case 7u: goto IL_247; case 8u: arg_334_0 = ((AccountLevelInfo.smethod_2(this.FullName) == 0) ? 3492058721u : 4010655210u); continue; case 9u: output.WriteRawTag(80); arg_334_0 = (num * 2962532506u ^ 2692470588u); continue; case 10u: arg_334_0 = (this.Muted ? 3400222792u : 4270419433u); continue; case 11u: arg_334_0 = (this.AccountPaidAny ? 2991295954u : 2583695037u); continue; case 12u: output.WriteRawTag(106); output.WriteString(this.Email); arg_334_0 = (num * 2789732332u ^ 337215767u); continue; case 13u: output.WriteRawTag(58); arg_334_0 = (num * 233867463u ^ 1411519417u); continue; case 14u: output.WriteRawTag(66); output.WriteString(this.BattleTag); arg_334_0 = (num * 1425689721u ^ 1302329279u); continue; case 15u: goto IL_3B8; case 16u: output.WriteRawTag(48); arg_334_0 = (num * 1993773271u ^ 3843400333u); continue; case 17u: output.WriteBool(this.ManualReview); arg_334_0 = (num * 2746764005u ^ 804187903u); continue; case 19u: arg_334_0 = ((AccountLevelInfo.smethod_2(this.Email) == 0) ? 3289578775u : 3962028357u); continue; case 20u: arg_334_0 = ((this.IdentityCheckStatus != IdentityVerificationStatus.IDENT_NO_DATA) ? 3552001340u : 3034742676u); continue; case 21u: output.WriteString(this.FullName); arg_334_0 = (num * 1499005067u ^ 1977240422u); continue; case 22u: arg_334_0 = (this.ManualReview ? 3829211036u : 3270887584u); continue; case 23u: output.WriteRawTag(96); output.WriteEnum((int)this.IdentityCheckStatus); arg_334_0 = (num * 2764691742u ^ 701096634u); continue; case 24u: output.WriteFixed32(this.DefaultCurrency); arg_334_0 = (num * 1028586845u ^ 3982187352u); continue; case 25u: output.WriteRawTag(88); arg_334_0 = (num * 1150973278u ^ 1754839310u); continue; } break; } return; IL_247: arg_334_0 = 3997912046u; goto IL_32F; IL_3B8: arg_334_0 = ((AccountLevelInfo.smethod_2(this.Country) != 0) ? 2253905785u : 3845834131u); goto IL_32F; } public int CalculateSize() { int num = 0 + this.licenses_.CalculateSize(AccountLevelInfo._repeated_licenses_codec); while (true) { IL_31B: uint arg_2B6_0 = 750391156u; while (true) { uint num2; switch ((num2 = (arg_2B6_0 ^ 1792579531u)) % 22u) { case 0u: arg_2B6_0 = ((!this.ManualReview) ? 366059586u : 391262942u); continue; case 1u: arg_2B6_0 = ((AccountLevelInfo.smethod_2(this.FullName) == 0) ? 1989211116u : 1003112414u); continue; case 2u: arg_2B6_0 = ((AccountLevelInfo.smethod_2(this.Country) != 0) ? 1316519296u : 1801137929u); continue; case 3u: num += 2; arg_2B6_0 = (num2 * 742479131u ^ 2167650360u); continue; case 4u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.IdentityCheckStatus); arg_2B6_0 = (num2 * 4162235536u ^ 2219960173u); continue; case 5u: arg_2B6_0 = ((AccountLevelInfo.smethod_2(this.BattleTag) != 0) ? 1650758687u : 121427487u); continue; case 6u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_2B6_0 = (num2 * 2847546548u ^ 2006529807u); continue; case 7u: num += 2; arg_2B6_0 = (num2 * 1787396189u ^ 3992246499u); continue; case 8u: arg_2B6_0 = ((this.IdentityCheckStatus != IdentityVerificationStatus.IDENT_NO_DATA) ? 493228693u : 1720437645u); continue; case 9u: arg_2B6_0 = (((this.DefaultCurrency == 0u) ? 564430804u : 1075690564u) ^ num2 * 2041642983u); continue; case 10u: num += 5; arg_2B6_0 = (num2 * 1695391135u ^ 2802439783u); continue; case 11u: goto IL_31B; case 12u: arg_2B6_0 = (this.Muted ? 668634396u : 394956693u); continue; case 13u: num += 1 + CodedOutputStream.ComputeStringSize(this.FullName); arg_2B6_0 = (num2 * 3707303997u ^ 1576476397u); continue; case 14u: num += 2; arg_2B6_0 = (num2 * 276098336u ^ 3588854121u); continue; case 15u: num += 1 + CodedOutputStream.ComputeStringSize(this.Email); arg_2B6_0 = (num2 * 1229554670u ^ 4209588874u); continue; case 16u: arg_2B6_0 = ((this.PreferredRegion == 0u) ? 585764742u : 996044319u); continue; case 17u: arg_2B6_0 = ((!this.AccountPaidAny) ? 1649207977u : 907077861u); continue; case 18u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.PreferredRegion); arg_2B6_0 = (num2 * 4287221848u ^ 2906402662u); continue; case 20u: arg_2B6_0 = ((AccountLevelInfo.smethod_2(this.Email) == 0) ? 1631648032u : 341495896u); continue; case 21u: num += 1 + CodedOutputStream.ComputeStringSize(this.Country); arg_2B6_0 = (num2 * 2590734004u ^ 2468831669u); continue; } return num; } } return num; } public void MergeFrom(AccountLevelInfo other) { if (other == null) { goto IL_128; } goto IL_315; uint arg_29D_0; while (true) { IL_298: uint num; switch ((num = (arg_29D_0 ^ 3314702777u)) % 23u) { case 0u: this.Muted = other.Muted; arg_29D_0 = (num * 2732854696u ^ 308847747u); continue; case 1u: return; case 2u: arg_29D_0 = (other.AccountPaidAny ? 3661255754u : 2269982428u); continue; case 3u: this.PreferredRegion = other.PreferredRegion; arg_29D_0 = (num * 3202793535u ^ 1375277235u); continue; case 4u: this.Email = other.Email; arg_29D_0 = (num * 3286311336u ^ 2265454726u); continue; case 5u: arg_29D_0 = ((AccountLevelInfo.smethod_2(other.Country) != 0) ? 2545336102u : 3854177288u); continue; case 6u: this.Country = other.Country; arg_29D_0 = (num * 1285538532u ^ 1977153428u); continue; case 7u: arg_29D_0 = ((AccountLevelInfo.smethod_2(other.FullName) == 0) ? 3079871281u : 3861447842u); continue; case 8u: arg_29D_0 = ((AccountLevelInfo.smethod_2(other.Email) == 0) ? 4182256558u : 3585435336u); continue; case 9u: this.AccountPaidAny = other.AccountPaidAny; arg_29D_0 = (num * 181375199u ^ 1744107633u); continue; case 10u: arg_29D_0 = ((!other.Muted) ? 3925193299u : 2973621771u); continue; case 11u: this.BattleTag = other.BattleTag; arg_29D_0 = (num * 3028340383u ^ 1770859456u); continue; case 12u: goto IL_128; case 13u: this.FullName = other.FullName; arg_29D_0 = (num * 3200240992u ^ 1197838865u); continue; case 15u: arg_29D_0 = ((other.IdentityCheckStatus != IdentityVerificationStatus.IDENT_NO_DATA) ? 2220756511u : 2295517784u); continue; case 16u: this.IdentityCheckStatus = other.IdentityCheckStatus; arg_29D_0 = (num * 123658108u ^ 278584368u); continue; case 17u: arg_29D_0 = ((AccountLevelInfo.smethod_2(other.BattleTag) == 0) ? 2935886320u : 2955501161u); continue; case 18u: arg_29D_0 = ((!other.ManualReview) ? 3713600210u : 4094590231u); continue; case 19u: this.ManualReview = other.ManualReview; arg_29D_0 = (num * 915357782u ^ 965269670u); continue; case 20u: this.DefaultCurrency = other.DefaultCurrency; arg_29D_0 = (num * 852577616u ^ 401322282u); continue; case 21u: goto IL_315; case 22u: arg_29D_0 = ((other.PreferredRegion == 0u) ? 2641434285u : 2957003739u); continue; } break; } return; IL_128: arg_29D_0 = 3689521652u; goto IL_298; IL_315: this.licenses_.Add(other.licenses_); arg_29D_0 = ((other.DefaultCurrency == 0u) ? 2642336378u : 3369202648u); goto IL_298; } public void MergeFrom(CodedInputStream input) { while (true) { IL_48C: uint num; uint arg_3D8_0 = ((num = input.ReadTag()) == 0u) ? 1928709294u : 1267001088u; while (true) { uint num2; switch ((num2 = (arg_3D8_0 ^ 1258752266u)) % 38u) { case 0u: this.Email = input.ReadString(); arg_3D8_0 = 602145337u; continue; case 1u: arg_3D8_0 = ((num == 88u) ? 2074344266u : 1215346897u); continue; case 2u: arg_3D8_0 = (num2 * 4194898813u ^ 3781856029u); continue; case 3u: arg_3D8_0 = (((num != 26u) ? 1248229920u : 1221377777u) ^ num2 * 1607718105u); continue; case 4u: arg_3D8_0 = (num2 * 1274558833u ^ 2120020303u); continue; case 5u: this.FullName = input.ReadString(); arg_3D8_0 = 671606904u; continue; case 6u: this.DefaultCurrency = input.ReadFixed32(); arg_3D8_0 = 1150986238u; continue; case 7u: arg_3D8_0 = (((num == 66u) ? 1865446929u : 1623192361u) ^ num2 * 861012009u); continue; case 9u: this.ManualReview = input.ReadBool(); arg_3D8_0 = 602145337u; continue; case 10u: this.Muted = input.ReadBool(); arg_3D8_0 = 738989280u; continue; case 11u: arg_3D8_0 = (((num > 37u) ? 2186786834u : 3503449859u) ^ num2 * 3976234952u); continue; case 12u: arg_3D8_0 = (((num == 106u) ? 991663548u : 1666732995u) ^ num2 * 2028124512u); continue; case 13u: arg_3D8_0 = (num2 * 1725541289u ^ 1353637998u); continue; case 14u: arg_3D8_0 = ((num > 58u) ? 1815689027u : 1404593461u); continue; case 15u: arg_3D8_0 = (((num == 96u) ? 2491170430u : 2760707907u) ^ num2 * 3963145173u); continue; case 16u: this.AccountPaidAny = input.ReadBool(); arg_3D8_0 = 846157532u; continue; case 17u: arg_3D8_0 = ((num > 80u) ? 683727089u : 1017350159u); continue; case 18u: arg_3D8_0 = ((num == 42u) ? 281464862u : 199707514u); continue; case 19u: arg_3D8_0 = (num2 * 3511810550u ^ 99511643u); continue; case 20u: arg_3D8_0 = (num2 * 1543879833u ^ 330594075u); continue; case 21u: arg_3D8_0 = (num2 * 3964556297u ^ 954709292u); continue; case 22u: this.Country = input.ReadString(); arg_3D8_0 = 602145337u; continue; case 23u: arg_3D8_0 = (((num == 80u) ? 1254315168u : 1565435516u) ^ num2 * 3195951831u); continue; case 24u: this.licenses_.AddEntriesFrom(input, AccountLevelInfo._repeated_licenses_codec); arg_3D8_0 = 1628427509u; continue; case 25u: input.SkipLastField(); arg_3D8_0 = 1959423817u; continue; case 26u: arg_3D8_0 = (num2 * 3725564116u ^ 154156403u); continue; case 27u: this.PreferredRegion = input.ReadUInt32(); arg_3D8_0 = 602145337u; continue; case 28u: this.BattleTag = input.ReadString(); arg_3D8_0 = 602145337u; continue; case 29u: arg_3D8_0 = (((num != 37u) ? 1676098291u : 1503022590u) ^ num2 * 172276680u); continue; case 30u: arg_3D8_0 = (((num == 58u) ? 1658493093u : 288680054u) ^ num2 * 2587183244u); continue; case 31u: this.identityCheckStatus_ = (IdentityVerificationStatus)input.ReadEnum(); arg_3D8_0 = 602145337u; continue; case 32u: arg_3D8_0 = (((num != 48u) ? 2792946014u : 3164003955u) ^ num2 * 1914004496u); continue; case 33u: arg_3D8_0 = (num2 * 2953447043u ^ 707985376u); continue; case 34u: arg_3D8_0 = (((num == 72u) ? 1278589212u : 46949333u) ^ num2 * 2138091652u); continue; case 35u: arg_3D8_0 = 1267001088u; continue; case 36u: arg_3D8_0 = (num2 * 3241303602u ^ 1430241677u); continue; case 37u: goto IL_48C; } return; } } } static AccountLevelInfo() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 4133404150u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2471241398u)) % 3u) { case 0u: goto IL_57; case 2u: AccountLevelInfo._repeated_licenses_codec = FieldCodec.ForMessage<AccountLicense>(26u, AccountLicense.Parser); arg_3F_0 = (num * 378406172u ^ 2338433229u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Account.V1/AccountFieldOptions.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountFieldOptions : IMessage<AccountFieldOptions>, IEquatable<AccountFieldOptions>, IDeepCloneable<AccountFieldOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountFieldOptions.__c __9 = new AccountFieldOptions.__c(); internal AccountFieldOptions cctor>b__54_0() { return new AccountFieldOptions(); } } private static readonly MessageParser<AccountFieldOptions> _parser = new MessageParser<AccountFieldOptions>(new Func<AccountFieldOptions>(AccountFieldOptions.__c.__9.<.cctor>b__54_0)); public const int AllFieldsFieldNumber = 1; private bool allFields_; public const int FieldAccountLevelInfoFieldNumber = 2; private bool fieldAccountLevelInfo_; public const int FieldPrivacyInfoFieldNumber = 3; private bool fieldPrivacyInfo_; public const int FieldParentalControlInfoFieldNumber = 4; private bool fieldParentalControlInfo_; public const int FieldGameLevelInfoFieldNumber = 6; private bool fieldGameLevelInfo_; public const int FieldGameStatusFieldNumber = 7; private bool fieldGameStatus_; public const int FieldGameAccountsFieldNumber = 8; private bool fieldGameAccounts_; public static MessageParser<AccountFieldOptions> Parser { get { return AccountFieldOptions._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[15]; } } MessageDescriptor IMessage.Descriptor { get { return AccountFieldOptions.Descriptor; } } public bool AllFields { get { return this.allFields_; } set { this.allFields_ = value; } } public bool FieldAccountLevelInfo { get { return this.fieldAccountLevelInfo_; } set { this.fieldAccountLevelInfo_ = value; } } public bool FieldPrivacyInfo { get { return this.fieldPrivacyInfo_; } set { this.fieldPrivacyInfo_ = value; } } public bool FieldParentalControlInfo { get { return this.fieldParentalControlInfo_; } set { this.fieldParentalControlInfo_ = value; } } public bool FieldGameLevelInfo { get { return this.fieldGameLevelInfo_; } set { this.fieldGameLevelInfo_ = value; } } public bool FieldGameStatus { get { return this.fieldGameStatus_; } set { this.fieldGameStatus_ = value; } } public bool FieldGameAccounts { get { return this.fieldGameAccounts_; } set { this.fieldGameAccounts_ = value; } } public AccountFieldOptions() { } public AccountFieldOptions(AccountFieldOptions other) : this() { while (true) { IL_D5: uint arg_AD_0 = 1734400600u; while (true) { uint num; switch ((num = (arg_AD_0 ^ 1156509716u)) % 7u) { case 0u: this.fieldAccountLevelInfo_ = other.fieldAccountLevelInfo_; arg_AD_0 = (num * 3700181386u ^ 2312010353u); continue; case 2u: goto IL_D5; case 3u: this.allFields_ = other.allFields_; arg_AD_0 = (num * 2216029725u ^ 3777893453u); continue; case 4u: this.fieldGameLevelInfo_ = other.fieldGameLevelInfo_; this.fieldGameStatus_ = other.fieldGameStatus_; arg_AD_0 = (num * 2581913572u ^ 4179316797u); continue; case 5u: this.fieldGameAccounts_ = other.fieldGameAccounts_; arg_AD_0 = (num * 3738502471u ^ 3750000138u); continue; case 6u: this.fieldPrivacyInfo_ = other.fieldPrivacyInfo_; this.fieldParentalControlInfo_ = other.fieldParentalControlInfo_; arg_AD_0 = (num * 443046003u ^ 1395747408u); continue; } return; } } } public AccountFieldOptions Clone() { return new AccountFieldOptions(this); } public override bool Equals(object other) { return this.Equals(other as AccountFieldOptions); } public bool Equals(AccountFieldOptions other) { if (other == null) { goto IL_10E; } goto IL_1A5; int arg_13F_0; while (true) { IL_13A: switch ((arg_13F_0 ^ -1807244442) % 19) { case 0: goto IL_1A5; case 1: arg_13F_0 = ((this.FieldGameAccounts != other.FieldGameAccounts) ? -1427198393 : -1816969118); continue; case 2: goto IL_10E; case 3: arg_13F_0 = ((this.FieldGameLevelInfo == other.FieldGameLevelInfo) ? -294151186 : -1520527443); continue; case 4: return false; case 5: arg_13F_0 = ((this.FieldGameStatus != other.FieldGameStatus) ? -2098688357 : -335818026); continue; case 6: return false; case 7: arg_13F_0 = ((this.FieldAccountLevelInfo != other.FieldAccountLevelInfo) ? -2008620776 : -931411096); continue; case 8: arg_13F_0 = ((this.FieldParentalControlInfo == other.FieldParentalControlInfo) ? -1183587001 : -1820565844); continue; case 9: return false; case 11: return false; case 12: return false; case 13: arg_13F_0 = ((this.FieldPrivacyInfo != other.FieldPrivacyInfo) ? -979620489 : -295355773); continue; case 14: return true; case 15: return false; case 16: arg_13F_0 = ((this.AllFields != other.AllFields) ? -29753654 : -873586042); continue; case 17: return false; case 18: return false; } break; } return true; IL_10E: arg_13F_0 = -346564682; goto IL_13A; IL_1A5: arg_13F_0 = ((other == this) ? -1468516975 : -1787671864); goto IL_13A; } public override int GetHashCode() { int num = 1; while (true) { IL_244: uint arg_1F7_0 = 657739004u; while (true) { uint num2; switch ((num2 = (arg_1F7_0 ^ 2018328537u)) % 16u) { case 0u: arg_1F7_0 = ((!this.FieldParentalControlInfo) ? 1904237954u : 1494597706u); continue; case 1u: num ^= this.FieldPrivacyInfo.GetHashCode(); arg_1F7_0 = (num2 * 2924090806u ^ 1046269903u); continue; case 2u: arg_1F7_0 = ((!this.FieldGameStatus) ? 1889539747u : 283409252u); continue; case 3u: num ^= this.FieldParentalControlInfo.GetHashCode(); arg_1F7_0 = (num2 * 3986916933u ^ 366774557u); continue; case 4u: goto IL_244; case 5u: arg_1F7_0 = (((!this.AllFields) ? 2799520071u : 2320080265u) ^ num2 * 3231970094u); continue; case 6u: num ^= this.AllFields.GetHashCode(); arg_1F7_0 = (num2 * 2842751006u ^ 4007724085u); continue; case 7u: num ^= this.FieldGameLevelInfo.GetHashCode(); arg_1F7_0 = (num2 * 3707775539u ^ 4256736334u); continue; case 8u: arg_1F7_0 = (this.FieldAccountLevelInfo ? 150181302u : 549798656u); continue; case 9u: arg_1F7_0 = (this.FieldPrivacyInfo ? 10361576u : 2014296601u); continue; case 10u: arg_1F7_0 = (this.FieldGameAccounts ? 1716189671u : 715870853u); continue; case 11u: arg_1F7_0 = (this.FieldGameLevelInfo ? 1016683070u : 129013579u); continue; case 13u: num ^= this.FieldGameStatus.GetHashCode(); arg_1F7_0 = (num2 * 3874541520u ^ 1475131955u); continue; case 14u: num ^= this.FieldGameAccounts.GetHashCode(); arg_1F7_0 = (num2 * 1896808131u ^ 3869956031u); continue; case 15u: num ^= this.FieldAccountLevelInfo.GetHashCode(); arg_1F7_0 = (num2 * 1569769824u ^ 201610144u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.AllFields) { goto IL_207; } goto IL_275; uint arg_211_0; while (true) { IL_20C: uint num; switch ((num = (arg_211_0 ^ 1488801095u)) % 18u) { case 0u: goto IL_207; case 1u: output.WriteRawTag(16); output.WriteBool(this.FieldAccountLevelInfo); arg_211_0 = (num * 2643642822u ^ 3932633292u); continue; case 2u: arg_211_0 = ((!this.FieldGameStatus) ? 112498435u : 193152028u); continue; case 3u: output.WriteRawTag(32); output.WriteBool(this.FieldParentalControlInfo); arg_211_0 = (num * 3831928653u ^ 483677389u); continue; case 4u: output.WriteRawTag(64); arg_211_0 = (num * 3359443784u ^ 2897470820u); continue; case 5u: output.WriteRawTag(56); arg_211_0 = (num * 3554152190u ^ 2334819098u); continue; case 6u: output.WriteBool(this.AllFields); arg_211_0 = (num * 3736973150u ^ 225208312u); continue; case 7u: output.WriteBool(this.FieldGameStatus); arg_211_0 = (num * 940186810u ^ 3299924917u); continue; case 8u: arg_211_0 = ((!this.FieldGameAccounts) ? 1256833169u : 1872642671u); continue; case 9u: arg_211_0 = (this.FieldPrivacyInfo ? 1323651035u : 2081019323u); continue; case 10u: output.WriteRawTag(24); output.WriteBool(this.FieldPrivacyInfo); arg_211_0 = (num * 1800194062u ^ 2300825907u); continue; case 11u: output.WriteBool(this.FieldGameAccounts); arg_211_0 = (num * 2803582399u ^ 818750796u); continue; case 12u: output.WriteRawTag(8); arg_211_0 = (num * 90231862u ^ 769973875u); continue; case 13u: arg_211_0 = (this.FieldGameLevelInfo ? 1512716618u : 350998787u); continue; case 14u: arg_211_0 = ((!this.FieldParentalControlInfo) ? 346963274u : 229961572u); continue; case 15u: output.WriteRawTag(48); output.WriteBool(this.FieldGameLevelInfo); arg_211_0 = (num * 2210230699u ^ 4246114476u); continue; case 17u: goto IL_275; } break; } return; IL_207: arg_211_0 = 2112541843u; goto IL_20C; IL_275: arg_211_0 = ((!this.FieldAccountLevelInfo) ? 101576046u : 1965555452u); goto IL_20C; } public int CalculateSize() { int num = 0; while (true) { IL_1E6: uint arg_199_0 = 3621484426u; while (true) { uint num2; switch ((num2 = (arg_199_0 ^ 3494992494u)) % 16u) { case 0u: arg_199_0 = ((!this.FieldAccountLevelInfo) ? 2267118531u : 2909480571u); continue; case 1u: num += 2; arg_199_0 = (num2 * 480172791u ^ 150880866u); continue; case 2u: num += 2; arg_199_0 = (num2 * 3205498145u ^ 1719052566u); continue; case 3u: num += 2; arg_199_0 = (num2 * 2583900604u ^ 1540675347u); continue; case 4u: arg_199_0 = (((!this.AllFields) ? 861275650u : 395215509u) ^ num2 * 1060856391u); continue; case 5u: num += 2; arg_199_0 = (num2 * 3262280307u ^ 4039142572u); continue; case 6u: arg_199_0 = ((!this.FieldGameLevelInfo) ? 3109078661u : 3860456447u); continue; case 7u: num += 2; arg_199_0 = (num2 * 2123691916u ^ 1651220970u); continue; case 8u: goto IL_1E6; case 9u: arg_199_0 = ((!this.FieldParentalControlInfo) ? 4054214200u : 2420370448u); continue; case 11u: arg_199_0 = (this.FieldGameStatus ? 2448343089u : 4142661570u); continue; case 12u: arg_199_0 = ((!this.FieldGameAccounts) ? 3692379972u : 2372968572u); continue; case 13u: arg_199_0 = (this.FieldPrivacyInfo ? 2161463725u : 2203394343u); continue; case 14u: num += 2; arg_199_0 = (num2 * 3832568467u ^ 2678157410u); continue; case 15u: num += 2; arg_199_0 = (num2 * 3401790325u ^ 843351465u); continue; } return num; } } return num; } public void MergeFrom(AccountFieldOptions other) { if (other == null) { goto IL_54; } goto IL_220; uint arg_1C0_0; while (true) { IL_1BB: uint num; switch ((num = (arg_1C0_0 ^ 2528105642u)) % 17u) { case 1u: return; case 2u: arg_1C0_0 = (other.FieldPrivacyInfo ? 3928880008u : 2825561522u); continue; case 3u: arg_1C0_0 = ((!other.FieldGameAccounts) ? 3917929187u : 3402943353u); continue; case 4u: this.FieldPrivacyInfo = other.FieldPrivacyInfo; arg_1C0_0 = (num * 790076348u ^ 1463744330u); continue; case 5u: arg_1C0_0 = ((!other.FieldParentalControlInfo) ? 2233305437u : 3736020421u); continue; case 6u: arg_1C0_0 = (other.FieldAccountLevelInfo ? 3176569071u : 2988087837u); continue; case 7u: this.AllFields = other.AllFields; arg_1C0_0 = (num * 3912963050u ^ 4164892800u); continue; case 8u: goto IL_220; case 9u: this.FieldGameLevelInfo = other.FieldGameLevelInfo; arg_1C0_0 = (num * 1030792841u ^ 4181940248u); continue; case 10u: arg_1C0_0 = (other.FieldGameLevelInfo ? 3831932384u : 3336619138u); continue; case 11u: arg_1C0_0 = ((!other.FieldGameStatus) ? 3361221153u : 3104177287u); continue; case 12u: this.FieldAccountLevelInfo = other.FieldAccountLevelInfo; arg_1C0_0 = (num * 1749674316u ^ 234941281u); continue; case 13u: this.FieldGameStatus = other.FieldGameStatus; arg_1C0_0 = (num * 1718846243u ^ 1498525446u); continue; case 14u: goto IL_54; case 15u: this.FieldGameAccounts = other.FieldGameAccounts; arg_1C0_0 = (num * 1826048094u ^ 3185106329u); continue; case 16u: this.FieldParentalControlInfo = other.FieldParentalControlInfo; arg_1C0_0 = (num * 3265725012u ^ 3129384753u); continue; } break; } return; IL_54: arg_1C0_0 = 3313810361u; goto IL_1BB; IL_220: arg_1C0_0 = (other.AllFields ? 2998844572u : 2502458332u); goto IL_1BB; } public void MergeFrom(CodedInputStream input) { while (true) { IL_303: uint num; uint arg_27F_0 = ((num = input.ReadTag()) == 0u) ? 2439597942u : 3874362131u; while (true) { uint num2; switch ((num2 = (arg_27F_0 ^ 3906075014u)) % 26u) { case 0u: arg_27F_0 = (num2 * 3206045207u ^ 5541088u); continue; case 1u: arg_27F_0 = ((num > 24u) ? 2273924335u : 3549329679u); continue; case 2u: arg_27F_0 = (num2 * 585306669u ^ 1954052232u); continue; case 3u: goto IL_303; case 4u: arg_27F_0 = (((num == 32u) ? 1717396481u : 26736813u) ^ num2 * 1061518597u); continue; case 5u: this.FieldPrivacyInfo = input.ReadBool(); arg_27F_0 = 3397456339u; continue; case 6u: arg_27F_0 = (num2 * 3905126725u ^ 437113609u); continue; case 7u: arg_27F_0 = ((num != 56u) ? 4064766205u : 3709868263u); continue; case 8u: arg_27F_0 = (((num != 24u) ? 1738082924u : 2012929459u) ^ num2 * 1258195181u); continue; case 9u: arg_27F_0 = ((num <= 48u) ? 3327860332u : 3771194237u); continue; case 10u: arg_27F_0 = 3874362131u; continue; case 11u: arg_27F_0 = (((num == 48u) ? 4039134311u : 2810634358u) ^ num2 * 2143920380u); continue; case 12u: arg_27F_0 = (((num == 16u) ? 3865620109u : 2701780490u) ^ num2 * 2914058667u); continue; case 13u: this.FieldGameLevelInfo = input.ReadBool(); arg_27F_0 = 2885830036u; continue; case 14u: this.AllFields = input.ReadBool(); arg_27F_0 = 3397456339u; continue; case 15u: arg_27F_0 = (num2 * 2141153989u ^ 3269225600u); continue; case 17u: this.FieldParentalControlInfo = input.ReadBool(); arg_27F_0 = 2416450138u; continue; case 18u: arg_27F_0 = (num2 * 1569294411u ^ 3474960551u); continue; case 19u: arg_27F_0 = (((num != 64u) ? 4137697959u : 3035434187u) ^ num2 * 3548026729u); continue; case 20u: input.SkipLastField(); arg_27F_0 = 4274448782u; continue; case 21u: arg_27F_0 = (((num == 8u) ? 40932423u : 808892047u) ^ num2 * 2735582247u); continue; case 22u: arg_27F_0 = (num2 * 1565118835u ^ 4030442059u); continue; case 23u: this.FieldAccountLevelInfo = input.ReadBool(); arg_27F_0 = 3387281585u; continue; case 24u: this.FieldGameAccounts = input.ReadBool(); arg_27F_0 = 3397456339u; continue; case 25u: this.FieldGameStatus = input.ReadBool(); arg_27F_0 = 3397456339u; continue; } return; } } } } } <file_sep>/AuthServer.WorldServer.Game.Entities/CreatureSpawn.cs using AuthServer.WorldServer.Managers; using Framework.ObjectDefines; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; namespace AuthServer.WorldServer.Game.Entities { [Serializable] public class CreatureSpawn : WorldObject { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CreatureSpawn.__c __9 = new CreatureSpawn.__c(); public static Func<ulong, ulong> __9__5_0; internal ulong <GetLastGuid>b__5_0(ulong k) { return k; } } public int Id; public Creature Creature; public int Emote; public ConcurrentBag<Waypoint> Waypoints; public CreatureSpawn(int updateLength = 212) : base(updateLength) { this.Waypoints = new ConcurrentBag<Waypoint>(); } public static ulong GetLastGuid() { IEnumerable<ulong> arg_2E_0 = Manager.SpawnMgr.CreatureSpawns.Keys; Func<ulong, ulong> arg_2E_1; if ((arg_2E_1 = CreatureSpawn.__c.__9__5_0) == null) { arg_2E_1 = (CreatureSpawn.__c.__9__5_0 = new Func<ulong, ulong>(CreatureSpawn.__c.__9.<GetLastGuid>b__5_0)); } return arg_2E_0.OrderByDescending(arg_2E_1).FirstOrDefault<ulong>(); } public void CreateFullGuid() { this.SGuid = new SmartGuid(this.Guid, this.Id, GuidType.Creature, (ulong)this.Map); this.Guid = this.SGuid.Guid; } public void CreateData(Creature creature) { this.Creature = creature; } public bool AddToDB() { Manager.SpawnMgr.AddSpawn(new CreatureSpawn(212) { Id = this.Id, Creature = this.Creature, Guid = CreatureSpawn.GetLastGuid() + 1uL, Map = this.Map, Position = new Vector4 { X = this.Position.X, Y = this.Position.Y, Z = this.Position.Z, O = this.Position.O } }); return true; } public void AddToWorld() { this.CreateFullGuid(); this.CreateData(this.Creature); Manager.SpawnMgr.AddSpawn(this); } public override void SetUpdateFields() { base.SetUpdateField<ulong>(0, this.Guid, 0); while (true) { IL_836: uint arg_750_0 = 237886523u; while (true) { uint num; switch ((num = (arg_750_0 ^ 1528320836u)) % 54u) { case 0u: base.SetUpdateField<int>(64, 1, 0); arg_750_0 = (num * 3610745583u ^ 1838084446u); continue; case 1u: { int num2; base.SetUpdateField<int>(153 + num2, 0, 0); arg_750_0 = (num * 1619586627u ^ 3244614014u); continue; } case 2u: base.SetUpdateField<ulong>(124, 0uL, 0); arg_750_0 = (num * 1812117381u ^ 2456935444u); continue; case 3u: base.SetUpdateField<float>(117, 1f, 0); arg_750_0 = (num * 3565188234u ^ 1477123020u); continue; case 4u: goto IL_836; case 5u: { int num2; arg_750_0 = ((num2 >= 7) ? 269169050u : 586025614u); continue; } case 6u: { int num3; arg_750_0 = ((num3 >= 6) ? 571949700u : 737065791u); continue; } case 7u: base.SetUpdateField<int>(162, 1, 0); arg_750_0 = (num * 3907973660u ^ 3394182677u); continue; case 8u: base.SetUpdateField<int>(96, 0, 0); base.SetUpdateField<int>(97, 0, 0); arg_750_0 = (num * 2028371504u ^ 707893916u); continue; case 9u: { int num4; arg_750_0 = ((num4 < 6) ? 909025174u : 762720453u); continue; } case 10u: { int num4; base.SetUpdateField<int>(66 + num4, 0, 0); arg_750_0 = 1935149233u; continue; } case 11u: { int num5; base.SetUpdateField<int>(127 + num5, 1, 0); arg_750_0 = 757635734u; continue; } case 12u: { int num2; base.SetUpdateField<int>(146 + num2, 0, 0); arg_750_0 = (num * 2435287739u ^ 3658749741u); continue; } case 13u: base.SetUpdateField<float>(109, 0f, 0); arg_750_0 = (num * 4016325890u ^ 1225666739u); continue; case 14u: base.SetUpdateField<int>(89, 7, 0); arg_750_0 = (num * 2262316087u ^ 180881922u); continue; case 15u: { int num3; num3++; arg_750_0 = (num * 1322641156u ^ 2613785378u); continue; } case 16u: base.SetUpdateField<int>(164, 0, 0); base.SetUpdateField<int>(168, 0, 0); arg_750_0 = (num * 1093106460u ^ 3967094936u); continue; case 17u: base.SetUpdateField<float>(110, 0f, 0); base.SetUpdateField<float>(111, 0f, 0); arg_750_0 = (num * 631746108u ^ 281948068u); continue; case 18u: base.SetUpdateField<int>(165, 0, 0); base.SetUpdateField<int>(169, 0, 0); base.SetUpdateField<float>(173, 0f, 0); base.SetUpdateField<float>(174, 0f, 0); base.SetUpdateField<float>(167, 0f, 0); arg_750_0 = (num * 1283258722u ^ 511658920u); continue; case 19u: base.SetUpdateField<int>(107, 0, 0); arg_750_0 = (num * 3419386998u ^ 3627557574u); continue; case 20u: { int num2 = 0; arg_750_0 = (num * 1883164299u ^ 2313590937u); continue; } case 21u: { SmartGuid smartGuid = new SmartGuid(this.Guid, this.Id, GuidType.Creature, (ulong)this.Map); base.SetUpdateField<ulong>(2, smartGuid.HighGuid, 0); base.SetUpdateField<ulong>(4, 0uL, 0); base.SetUpdateField<int>(9, this.Id, 0); arg_750_0 = (num * 2255509972u ^ 1618986453u); continue; } case 22u: base.SetUpdateField<int>(54, 0, 0); base.SetUpdateField<int>(105, this.Creature.DisplayInfoId[0], 0); arg_750_0 = (num * 1813632837u ^ 2273520395u); continue; case 24u: { int num5; arg_750_0 = ((num5 >= 5) ? 1782073348u : 1144773961u); continue; } case 25u: arg_750_0 = (num * 4148259167u ^ 2514504695u); continue; case 26u: base.SetUpdateField<float>(11, 1f, 0); arg_750_0 = (num * 1625486723u ^ 3338259225u); continue; case 27u: { int num5; base.SetUpdateField<int>(135 + num5, 0, 0); arg_750_0 = (num * 3130670064u ^ 629823659u); continue; } case 28u: base.SetUpdateField<float>(189, 1f, 0); arg_750_0 = (((this.Id == 114791) ? 735727167u : 1522774325u) ^ num * 3193800621u); continue; case 29u: base.SetUpdateField<float>(190, 6f, 0); base.SetUpdateField<int>(54, 1, 0); arg_750_0 = (num * 162856968u ^ 183126627u); continue; case 30u: base.SetUpdateField<short>(102, 0, 0); arg_750_0 = (num * 2555578126u ^ 3095029771u); continue; case 31u: base.SetUpdateField<int>(106, this.Creature.DisplayInfoId[0], 0); arg_750_0 = (num * 4103549470u ^ 1174276495u); continue; case 32u: base.SetUpdateField<float>(103, 0.389f, 0); arg_750_0 = (num * 2633248044u ^ 2667827738u); continue; case 33u: { int num5; num5++; arg_750_0 = (num * 3145927869u ^ 370126679u); continue; } case 34u: base.SetUpdateField<int>(96, 33088, 0); arg_750_0 = (num * 640744838u ^ 3801238860u); continue; case 35u: { int num4; num4++; arg_750_0 = (num * 2594117446u ^ 2099580485u); continue; } case 36u: { int num4 = 0; arg_750_0 = (num * 1354476460u ^ 2712581059u); continue; } case 37u: base.SetUpdateField<int>(56, 1, 0); arg_750_0 = (num * 2544577213u ^ 435928766u); continue; case 38u: base.SetUpdateField<float>(171, 0f, 0); arg_750_0 = (num * 4142851119u ^ 4208899568u); continue; case 39u: { int num2; num2++; arg_750_0 = (num * 627873502u ^ 1245213075u); continue; } case 40u: base.SetUpdateField<ulong>(204, 100uL, 0); arg_750_0 = (num * 589149039u ^ 1827455864u); continue; case 41u: { int num3; base.SetUpdateField<int>(58 + num3, 0, 0); arg_750_0 = 1908405377u; continue; } case 42u: base.SetUpdateField<ulong>(112, 50331648uL, 0); base.SetUpdateField<ulong>(163, 1uL, 0); arg_750_0 = (num * 740895270u ^ 2494309065u); continue; case 43u: base.SetUpdateField<int>(161, 0, 0); base.SetUpdateField<int>(84, 110, 0); arg_750_0 = (num * 716606811u ^ 683298147u); continue; case 44u: { int num5 = 0; arg_750_0 = (num * 645724212u ^ 2219005145u); continue; } case 45u: base.SetUpdateField<int>(72, 0, 0); base.SetUpdateField<int>(78, 0, 0); arg_750_0 = (num * 2369184928u ^ 402976831u); continue; case 46u: { int num5; base.SetUpdateField<int>(131 + num5, 0, 0); arg_750_0 = (num * 3755003001u ^ 2166038637u); continue; } case 47u: base.SetUpdateField<short>(102, 0, 1); arg_750_0 = (num * 1276678106u ^ 3835185211u); continue; case 48u: base.SetUpdateField<int>(97, 4196352, 0); arg_750_0 = (num * 2619014669u ^ 2577791090u); continue; case 49u: { int num3 = 0; arg_750_0 = (num * 1247933337u ^ 506390079u); continue; } case 50u: base.SetUpdateField<float>(104, 1.5f, 0); base.SetUpdateField<float>(108, 0f, 0); arg_750_0 = (num * 263025040u ^ 294895891u); continue; case 51u: base.SetUpdateField<int>(8, 9, 0); arg_750_0 = (num * 2994754189u ^ 1955941347u); continue; case 52u: { int num2; base.SetUpdateField<int>(139 + num2, 0, 0); arg_750_0 = 383154904u; continue; } case 53u: base.SetUpdateField<int>(53, 16777472, 0); base.SetUpdateField<int>(84, 110, 0); arg_750_0 = (num * 3484837175u ^ 3470856369u); continue; } goto Block_6; } } Block_6: base.SetUpdateField<int>(126, this.Emote, 0); } } } <file_sep>/Framework.ObjectDefines/Vector4.cs using System; using System.Runtime.Serialization; namespace Framework.ObjectDefines { [DataContract] [Serializable] public class Vector4 { [DataMember] public float X { get; set; } [DataMember] public float Y { get; set; } [DataMember] public float Z { get; set; } [DataMember] public float O { get; set; } } } <file_sep>/Google.Protobuf/OneofDescriptorProto.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class OneofDescriptorProto : IMessage<OneofDescriptorProto>, IEquatable<OneofDescriptorProto>, IDeepCloneable<OneofDescriptorProto>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly OneofDescriptorProto.__c __9 = new OneofDescriptorProto.__c(); internal OneofDescriptorProto cctor>b__24_0() { return new OneofDescriptorProto(); } } private static readonly MessageParser<OneofDescriptorProto> _parser = new MessageParser<OneofDescriptorProto>(new Func<OneofDescriptorProto>(OneofDescriptorProto.__c.__9.<.cctor>b__24_0)); public const int NameFieldNumber = 1; private string name_ = ""; public static MessageParser<OneofDescriptorProto> Parser { get { return OneofDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return OneofDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public OneofDescriptorProto() { } public OneofDescriptorProto(OneofDescriptorProto other) : this() { this.name_ = other.name_; } public OneofDescriptorProto Clone() { return new OneofDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as OneofDescriptorProto); } public bool Equals(OneofDescriptorProto other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 760303866) % 7) { case 0: goto IL_3E; case 1: goto IL_7A; case 2: return false; case 3: return false; case 4: return true; case 6: arg_48_0 = ((!OneofDescriptorProto.smethod_0(this.Name, other.Name)) ? 164187143 : 1511705419); continue; } break; } return true; IL_3E: arg_48_0 = 1519880068; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 1146569014 : 1600587860); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 3391022013u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 3764088767u)) % 4u) { case 0u: goto IL_6E; case 1u: num ^= OneofDescriptorProto.smethod_2(this.Name); arg_52_0 = (num2 * 81616272u ^ 1452581360u); continue; case 2u: arg_52_0 = (((OneofDescriptorProto.smethod_1(this.Name) != 0) ? 1447463862u : 630060248u) ^ num2 * 2157929180u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (OneofDescriptorProto.smethod_1(this.Name) != 0) { while (true) { IL_60: uint arg_44_0 = 1911835850u; while (true) { uint num; switch ((num = (arg_44_0 ^ 2022042783u)) % 4u) { case 0u: goto IL_60; case 1u: output.WriteRawTag(10); arg_44_0 = (num * 1275649596u ^ 3393519489u); continue; case 2u: output.WriteString(this.Name); arg_44_0 = (num * 4172664462u ^ 2700273104u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (OneofDescriptorProto.smethod_1(this.Name) != 0) { while (true) { IL_4B: uint arg_33_0 = 2538656730u; while (true) { uint num2; switch ((num2 = (arg_33_0 ^ 2975618881u)) % 3u) { case 0u: goto IL_4B; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_33_0 = (num2 * 1253888077u ^ 654977411u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(OneofDescriptorProto other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 2506557662u)) % 5u) { case 1u: return; case 2u: this.Name = other.Name; arg_37_0 = (num * 1408225162u ^ 2861659490u); continue; case 3u: goto IL_12; case 4u: goto IL_63; } break; } return; IL_12: arg_37_0 = 3494605203u; goto IL_32; IL_63: arg_37_0 = ((OneofDescriptorProto.smethod_1(other.Name) == 0) ? 3937845172u : 2958767025u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) == 0u) ? 2617520824u : 4034183063u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 2467263005u)) % 7u) { case 0u: arg_72_0 = 4034183063u; continue; case 1u: arg_72_0 = ((num != 10u) ? 3745028253u : 2491817672u); continue; case 2u: this.Name = input.ReadString(); arg_72_0 = 2925856456u; continue; case 4u: input.SkipLastField(); arg_72_0 = (num2 * 2977871713u ^ 1883693947u); continue; case 5u: goto IL_A9; case 6u: arg_72_0 = (num2 * 1112311778u ^ 4074196420u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.AuthServer.JsonObjects/RealmListServerIPAddresses.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class RealmListServerIPAddresses { [DataMember(Name = "families")] public IList<Family> Families { get; set; } } } <file_sep>/Bgs.Protocol.Channel.V1/ChannelInfo.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class ChannelInfo : IMessage<ChannelInfo>, IEquatable<ChannelInfo>, IDeepCloneable<ChannelInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChannelInfo.__c __9 = new ChannelInfo.__c(); internal ChannelInfo cctor>b__29_0() { return new ChannelInfo(); } } private static readonly MessageParser<ChannelInfo> _parser = new MessageParser<ChannelInfo>(new Func<ChannelInfo>(ChannelInfo.__c.__9.<.cctor>b__29_0)); public const int DescriptionFieldNumber = 1; private ChannelDescription description_; public const int MemberFieldNumber = 2; private static readonly FieldCodec<Member> _repeated_member_codec = FieldCodec.ForMessage<Member>(18u, Bgs.Protocol.Channel.V1.Member.Parser); private readonly RepeatedField<Member> member_ = new RepeatedField<Member>(); public static MessageParser<ChannelInfo> Parser { get { return ChannelInfo._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return ChannelInfo.Descriptor; } } public ChannelDescription Description { get { return this.description_; } set { this.description_ = value; } } public RepeatedField<Member> Member { get { return this.member_; } } public ChannelInfo() { } public ChannelInfo(ChannelInfo other) : this() { while (true) { IL_55: int arg_3F_0 = 145698129; while (true) { switch ((arg_3F_0 ^ 1279609202) % 3) { case 0: goto IL_55; case 2: this.Description = ((other.description_ != null) ? other.Description.Clone() : null); this.member_ = other.member_.Clone(); arg_3F_0 = 1173525740; continue; } return; } } } public ChannelInfo Clone() { return new ChannelInfo(this); } public override bool Equals(object other) { return this.Equals(other as ChannelInfo); } public bool Equals(ChannelInfo other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1181358713) % 9) { case 0: return false; case 1: return false; case 2: return true; case 3: return false; case 4: goto IL_B5; case 5: arg_77_0 = ((!ChannelInfo.smethod_0(this.Description, other.Description)) ? -1256247803 : -1387286740); continue; case 6: arg_77_0 = ((!this.member_.Equals(other.member_)) ? -439694023 : -1143257880); continue; case 8: goto IL_15; } break; } return true; IL_15: arg_77_0 = -1315941912; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -135786796 : -1698872224); goto IL_72; } public override int GetHashCode() { return 1 ^ ChannelInfo.smethod_1(this.Description) ^ ChannelInfo.smethod_1(this.member_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Description); this.member_.WriteTo(output, ChannelInfo._repeated_member_codec); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Description)) + this.member_.CalculateSize(ChannelInfo._repeated_member_codec); } public void MergeFrom(ChannelInfo other) { if (other == null) { goto IL_2D; } goto IL_CD; uint arg_92_0; while (true) { IL_8D: uint num; switch ((num = (arg_92_0 ^ 1226571012u)) % 8u) { case 0u: arg_92_0 = (((this.description_ != null) ? 2917911395u : 4028149543u) ^ num * 3629027422u); continue; case 2u: this.member_.Add(other.member_); arg_92_0 = 184893909u; continue; case 3u: this.description_ = new ChannelDescription(); arg_92_0 = (num * 2192252830u ^ 2463513177u); continue; case 4u: goto IL_CD; case 5u: return; case 6u: goto IL_2D; case 7u: this.Description.MergeFrom(other.Description); arg_92_0 = 248041326u; continue; } break; } return; IL_2D: arg_92_0 = 530107553u; goto IL_8D; IL_CD: arg_92_0 = ((other.description_ == null) ? 248041326u : 900905812u); goto IL_8D; } public void MergeFrom(CodedInputStream input) { while (true) { IL_158: uint num; uint arg_10C_0 = ((num = input.ReadTag()) == 0u) ? 3021152974u : 3479129743u; while (true) { uint num2; switch ((num2 = (arg_10C_0 ^ 3307076525u)) % 12u) { case 0u: goto IL_158; case 1u: this.description_ = new ChannelDescription(); arg_10C_0 = (num2 * 2017116177u ^ 3047478442u); continue; case 2u: arg_10C_0 = ((this.description_ == null) ? 2646354020u : 3233481971u); continue; case 3u: arg_10C_0 = (((num != 18u) ? 2191868591u : 2462664979u) ^ num2 * 920186085u); continue; case 4u: arg_10C_0 = (num2 * 2435924433u ^ 1939982789u); continue; case 5u: input.SkipLastField(); arg_10C_0 = (num2 * 4137158995u ^ 58176598u); continue; case 6u: arg_10C_0 = ((num == 10u) ? 2546747911u : 4260304198u); continue; case 7u: arg_10C_0 = (num2 * 1312867481u ^ 2005853054u); continue; case 8u: arg_10C_0 = 3479129743u; continue; case 9u: this.member_.AddEntriesFrom(input, ChannelInfo._repeated_member_codec); arg_10C_0 = 2384874193u; continue; case 10u: input.ReadMessage(this.description_); arg_10C_0 = 3123183146u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/StructReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class StructReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return StructReflection.descriptor; } } static StructReflection() { StructReflection.descriptor = FileDescriptor.FromGeneratedCode(StructReflection.smethod_1(StructReflection.smethod_0(new string[] { Module.smethod_34<string>(217101131u), Module.smethod_33<string>(2961001161u), Module.smethod_35<string>(3079946880u), Module.smethod_33<string>(3779157417u), Module.smethod_37<string>(1281186676u), Module.smethod_37<string>(4232108900u), Module.smethod_34<string>(2262389739u), Module.smethod_36<string>(55025584u), Module.smethod_35<string>(1764904992u), Module.smethod_36<string>(842332112u), Module.smethod_37<string>(3881508948u), Module.smethod_33<string>(506532393u), Module.smethod_34<string>(12711051u), Module.smethod_37<string>(4150146815u) })), new FileDescriptor[0], new GeneratedCodeInfo(new System.Type[] { StructReflection.smethod_2(typeof(NullValue).TypeHandle) }, new GeneratedCodeInfo[] { new GeneratedCodeInfo(StructReflection.smethod_2(typeof(Struct).TypeHandle), Struct.Parser, new string[] { Module.smethod_33<string>(2347030921u) }, null, null, new GeneratedCodeInfo[1]), new GeneratedCodeInfo(StructReflection.smethod_2(typeof(Value).TypeHandle), Value.Parser, new string[] { Module.smethod_36<string>(3490343807u), Module.smethod_35<string>(1317345691u), Module.smethod_35<string>(2760291134u), Module.smethod_37<string>(2367881274u), Module.smethod_35<string>(1569186335u), Module.smethod_34<string>(359994132u) }, new string[] { Module.smethod_34<string>(641203968u) }, null, null), new GeneratedCodeInfo(StructReflection.smethod_2(typeof(ListValue).TypeHandle), ListValue.Parser, new string[] { Module.smethod_37<string>(1836352385u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/GameAccountOfflineNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class GameAccountOfflineNotification : IMessage<GameAccountOfflineNotification>, IEquatable<GameAccountOfflineNotification>, IDeepCloneable<GameAccountOfflineNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountOfflineNotification.__c __9 = new GameAccountOfflineNotification.__c(); internal GameAccountOfflineNotification cctor>b__34_0() { return new GameAccountOfflineNotification(); } } private static readonly MessageParser<GameAccountOfflineNotification> _parser = new MessageParser<GameAccountOfflineNotification>(new Func<GameAccountOfflineNotification>(GameAccountOfflineNotification.__c.__9.<.cctor>b__34_0)); public const int GameAccountIdFieldNumber = 1; private EntityId gameAccountId_; public const int HostFieldNumber = 2; private ProcessId host_; public const int SessionIdFieldNumber = 3; private string sessionId_ = ""; public static MessageParser<GameAccountOfflineNotification> Parser { get { return GameAccountOfflineNotification._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountOfflineNotification.Descriptor; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public ProcessId Host { get { return this.host_; } set { this.host_ = value; } } public string SessionId { get { return this.sessionId_; } set { this.sessionId_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public GameAccountOfflineNotification() { } public GameAccountOfflineNotification(GameAccountOfflineNotification other) : this() { this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.Host = ((other.host_ != null) ? other.Host.Clone() : null); this.sessionId_ = other.sessionId_; } public GameAccountOfflineNotification Clone() { return new GameAccountOfflineNotification(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountOfflineNotification); } public bool Equals(GameAccountOfflineNotification other) { if (other == null) { goto IL_70; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ 584034928) % 11) { case 1: goto IL_EC; case 2: return false; case 3: return false; case 4: arg_A6_0 = ((!GameAccountOfflineNotification.smethod_0(this.GameAccountId, other.GameAccountId)) ? 1372416767 : 800454457); continue; case 5: goto IL_70; case 6: return false; case 7: arg_A6_0 = ((!GameAccountOfflineNotification.smethod_1(this.SessionId, other.SessionId)) ? 1749857959 : 432414334); continue; case 8: arg_A6_0 = ((!GameAccountOfflineNotification.smethod_0(this.Host, other.Host)) ? 602600850 : 1150801411); continue; case 9: return false; case 10: return true; } break; } return true; IL_70: arg_A6_0 = 1761637141; goto IL_A1; IL_EC: arg_A6_0 = ((other == this) ? 1114251026 : 1217857912); goto IL_A1; } public override int GetHashCode() { int num = 1; while (true) { IL_DB: uint arg_B3_0 = 1965819252u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 1209535492u)) % 7u) { case 0u: goto IL_DB; case 1u: arg_B3_0 = ((GameAccountOfflineNotification.smethod_3(this.SessionId) != 0) ? 154941781u : 2055554638u); continue; case 2u: num ^= GameAccountOfflineNotification.smethod_2(this.Host); arg_B3_0 = (num2 * 1174474721u ^ 2436990007u); continue; case 3u: num ^= GameAccountOfflineNotification.smethod_2(this.SessionId); arg_B3_0 = (num2 * 2737101001u ^ 3192615639u); continue; case 4u: arg_B3_0 = (((this.host_ != null) ? 3687531722u : 3200642745u) ^ num2 * 2312274062u); continue; case 5u: num ^= GameAccountOfflineNotification.smethod_2(this.GameAccountId); arg_B3_0 = (num2 * 2554128522u ^ 2755040196u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_FE: uint arg_D2_0 = 3123947244u; while (true) { uint num; switch ((num = (arg_D2_0 ^ 2787816551u)) % 8u) { case 0u: goto IL_FE; case 1u: arg_D2_0 = (((this.host_ != null) ? 2429227841u : 3465575408u) ^ num * 3974444849u); continue; case 3u: output.WriteMessage(this.GameAccountId); arg_D2_0 = (num * 782822121u ^ 2144926149u); continue; case 4u: output.WriteString(this.SessionId); arg_D2_0 = (num * 1106271198u ^ 4230200453u); continue; case 5u: output.WriteRawTag(26); arg_D2_0 = (num * 2474351876u ^ 987879367u); continue; case 6u: arg_D2_0 = ((GameAccountOfflineNotification.smethod_3(this.SessionId) == 0) ? 3783372893u : 4158137818u); continue; case 7u: output.WriteRawTag(18); output.WriteMessage(this.Host); arg_D2_0 = (num * 909674359u ^ 3993887472u); continue; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId)); while (true) { IL_CB: uint arg_A7_0 = 637495294u; while (true) { uint num2; switch ((num2 = (arg_A7_0 ^ 1933150455u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.SessionId); arg_A7_0 = (num2 * 1460470515u ^ 3233632035u); continue; case 1u: arg_A7_0 = (((this.host_ != null) ? 424377294u : 120343922u) ^ num2 * 1107066388u); continue; case 2u: goto IL_CB; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Host); arg_A7_0 = (num2 * 645278798u ^ 775566128u); continue; case 5u: arg_A7_0 = ((GameAccountOfflineNotification.smethod_3(this.SessionId) != 0) ? 1649851525u : 310174485u); continue; } return num; } } return num; } public void MergeFrom(GameAccountOfflineNotification other) { if (other == null) { goto IL_18; } goto IL_199; uint arg_149_0; while (true) { IL_144: uint num; switch ((num = (arg_149_0 ^ 1672682679u)) % 13u) { case 0u: this.SessionId = other.SessionId; arg_149_0 = (num * 3295747611u ^ 4038594862u); continue; case 1u: arg_149_0 = (((this.gameAccountId_ != null) ? 1421690194u : 186125960u) ^ num * 3807097226u); continue; case 2u: arg_149_0 = ((other.host_ == null) ? 1922309912u : 1439326218u); continue; case 3u: return; case 4u: this.gameAccountId_ = new EntityId(); arg_149_0 = (num * 2265645718u ^ 3154196990u); continue; case 5u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_149_0 = 1450647575u; continue; case 6u: arg_149_0 = (((this.host_ != null) ? 485618266u : 1321838593u) ^ num * 4241729169u); continue; case 7u: this.host_ = new ProcessId(); arg_149_0 = (num * 3125634392u ^ 2804586527u); continue; case 8u: this.Host.MergeFrom(other.Host); arg_149_0 = 1922309912u; continue; case 9u: goto IL_199; case 11u: arg_149_0 = ((GameAccountOfflineNotification.smethod_3(other.SessionId) != 0) ? 1944085667u : 554439474u); continue; case 12u: goto IL_18; } break; } return; IL_18: arg_149_0 = 1661714755u; goto IL_144; IL_199: arg_149_0 = ((other.gameAccountId_ == null) ? 1450647575u : 166607474u); goto IL_144; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1E0: uint num; uint arg_184_0 = ((num = input.ReadTag()) == 0u) ? 3229080614u : 3676262558u; while (true) { uint num2; switch ((num2 = (arg_184_0 ^ 3799257852u)) % 16u) { case 0u: input.SkipLastField(); arg_184_0 = (num2 * 1737847088u ^ 1789875978u); continue; case 1u: arg_184_0 = (num2 * 3498690857u ^ 45365923u); continue; case 2u: arg_184_0 = ((num != 10u) ? 2969238530u : 2982887845u); continue; case 3u: arg_184_0 = 3676262558u; continue; case 4u: arg_184_0 = (((num != 26u) ? 747549492u : 1230651356u) ^ num2 * 3996502918u); continue; case 5u: input.ReadMessage(this.host_); arg_184_0 = 4294933079u; continue; case 6u: goto IL_1E0; case 7u: input.ReadMessage(this.gameAccountId_); arg_184_0 = 3987113853u; continue; case 8u: this.SessionId = input.ReadString(); arg_184_0 = 2962292746u; continue; case 9u: arg_184_0 = ((this.gameAccountId_ == null) ? 3743884499u : 3606298139u); continue; case 11u: arg_184_0 = (num2 * 3713371880u ^ 3401430258u); continue; case 12u: arg_184_0 = ((this.host_ == null) ? 3699004897u : 2625338889u); continue; case 13u: this.host_ = new ProcessId(); arg_184_0 = (num2 * 429415747u ^ 3887160222u); continue; case 14u: arg_184_0 = (((num == 18u) ? 543182618u : 1997454850u) ^ num2 * 604174019u); continue; case 15u: this.gameAccountId_ = new EntityId(); arg_184_0 = (num2 * 945263263u ^ 3950889770u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountHandle.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountHandle : IMessage<GameAccountHandle>, IEquatable<GameAccountHandle>, IDeepCloneable<GameAccountHandle>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountHandle.__c __9 = new GameAccountHandle.__c(); internal GameAccountHandle cctor>b__34_0() { return new GameAccountHandle(); } } private static readonly MessageParser<GameAccountHandle> _parser = new MessageParser<GameAccountHandle>(new Func<GameAccountHandle>(GameAccountHandle.__c.__9.<.cctor>b__34_0)); public const int IdFieldNumber = 1; private uint id_; public const int ProgramFieldNumber = 2; private uint program_; public const int RegionFieldNumber = 3; private uint region_; public static MessageParser<GameAccountHandle> Parser { get { return GameAccountHandle._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountHandle.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public GameAccountHandle() { } public GameAccountHandle(GameAccountHandle other) : this() { this.id_ = other.id_; this.program_ = other.program_; this.region_ = other.region_; } public GameAccountHandle Clone() { return new GameAccountHandle(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountHandle); } public bool Equals(GameAccountHandle other) { if (other == null) { goto IL_63; } goto IL_DA; int arg_94_0; while (true) { IL_8F: switch ((arg_94_0 ^ 1647739770) % 11) { case 0: return true; case 2: return false; case 3: arg_94_0 = ((this.Program == other.Program) ? 478190360 : 1423706175); continue; case 4: goto IL_63; case 5: return false; case 6: goto IL_DA; case 7: arg_94_0 = ((this.Region != other.Region) ? 2026218469 : 490430371); continue; case 8: arg_94_0 = ((this.Id == other.Id) ? 1683505394 : 862191327); continue; case 9: return false; case 10: return false; } break; } return true; IL_63: arg_94_0 = 1558907728; goto IL_8F; IL_DA: arg_94_0 = ((other != this) ? 1239919129 : 728912531); goto IL_8F; } public override int GetHashCode() { return 1 ^ this.Id.GetHashCode() ^ this.Program.GetHashCode() ^ this.Region.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(13); output.WriteFixed32(this.Id); output.WriteRawTag(21); while (true) { IL_68: uint arg_50_0 = 2280320138u; while (true) { uint num; switch ((num = (arg_50_0 ^ 3513225793u)) % 3u) { case 1u: output.WriteFixed32(this.Program); output.WriteRawTag(24); output.WriteUInt32(this.Region); arg_50_0 = (num * 915199142u ^ 2439915390u); continue; case 2u: goto IL_68; } return; } } } public int CalculateSize() { return 10 + (1 + CodedOutputStream.ComputeUInt32Size(this.Region)); } public void MergeFrom(GameAccountHandle other) { if (other == null) { goto IL_AE; } goto IL_F8; uint arg_B8_0; while (true) { IL_B3: uint num; switch ((num = (arg_B8_0 ^ 4020953324u)) % 9u) { case 0u: goto IL_AE; case 2u: this.Id = other.Id; arg_B8_0 = (num * 669862586u ^ 3021158761u); continue; case 3u: arg_B8_0 = ((other.Region != 0u) ? 3267553764u : 3976939042u); continue; case 4u: this.Program = other.Program; arg_B8_0 = (num * 876692524u ^ 1297193058u); continue; case 5u: return; case 6u: goto IL_F8; case 7u: this.Region = other.Region; arg_B8_0 = (num * 3314831185u ^ 878646698u); continue; case 8u: arg_B8_0 = ((other.Program == 0u) ? 3669362650u : 2432125030u); continue; } break; } return; IL_AE: arg_B8_0 = 3268791917u; goto IL_B3; IL_F8: arg_B8_0 = ((other.Id != 0u) ? 4000722834u : 3424392421u); goto IL_B3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_148: uint num; uint arg_FC_0 = ((num = input.ReadTag()) != 0u) ? 2673013858u : 2823313124u; while (true) { uint num2; switch ((num2 = (arg_FC_0 ^ 2210839519u)) % 12u) { case 0u: arg_FC_0 = 2673013858u; continue; case 1u: arg_FC_0 = (num2 * 1184337201u ^ 1120384252u); continue; case 2u: goto IL_148; case 3u: this.Id = input.ReadFixed32(); arg_FC_0 = 2371660337u; continue; case 4u: input.SkipLastField(); arg_FC_0 = (num2 * 3438703135u ^ 2781545629u); continue; case 5u: this.Program = input.ReadFixed32(); arg_FC_0 = 2216261298u; continue; case 6u: arg_FC_0 = (num2 * 707130932u ^ 1517139577u); continue; case 8u: this.Region = input.ReadUInt32(); arg_FC_0 = 4253150753u; continue; case 9u: arg_FC_0 = ((num == 13u) ? 2393229056u : 3695480992u); continue; case 10u: arg_FC_0 = (((num != 24u) ? 1235265309u : 552543845u) ^ num2 * 1838112559u); continue; case 11u: arg_FC_0 = (((num == 21u) ? 3578763110u : 4199841489u) ^ num2 * 3503081772u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/GetGameAccountStateRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetGameAccountStateRequest : IMessage<GetGameAccountStateRequest>, IEquatable<GetGameAccountStateRequest>, IDeepCloneable<GetGameAccountStateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetGameAccountStateRequest.__c __9 = new GetGameAccountStateRequest.__c(); internal GetGameAccountStateRequest cctor>b__39_0() { return new GetGameAccountStateRequest(); } } private static readonly MessageParser<GetGameAccountStateRequest> _parser = new MessageParser<GetGameAccountStateRequest>(new Func<GetGameAccountStateRequest>(GetGameAccountStateRequest.__c.__9.<.cctor>b__39_0)); public const int AccountIdFieldNumber = 1; private EntityId accountId_; public const int GameAccountIdFieldNumber = 2; private EntityId gameAccountId_; public const int OptionsFieldNumber = 10; private GameAccountFieldOptions options_; public const int TagsFieldNumber = 11; private GameAccountFieldTags tags_; public static MessageParser<GetGameAccountStateRequest> Parser { get { return GetGameAccountStateRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[15]; } } MessageDescriptor IMessage.Descriptor { get { return GetGameAccountStateRequest.Descriptor; } } [Obsolete] public EntityId AccountId { get { return this.accountId_; } set { this.accountId_ = value; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public GameAccountFieldOptions Options { get { return this.options_; } set { this.options_ = value; } } public GameAccountFieldTags Tags { get { return this.tags_; } set { this.tags_ = value; } } public GetGameAccountStateRequest() { } public GetGameAccountStateRequest(GetGameAccountStateRequest other) : this() { this.AccountId = ((other.accountId_ != null) ? other.AccountId.Clone() : null); this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); this.Options = ((other.options_ != null) ? other.Options.Clone() : null); this.Tags = ((other.tags_ != null) ? other.Tags.Clone() : null); } public GetGameAccountStateRequest Clone() { return new GetGameAccountStateRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetGameAccountStateRequest); } public bool Equals(GetGameAccountStateRequest other) { if (other == null) { goto IL_47; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ -1289276732) % 13) { case 0: return false; case 1: return false; case 2: return false; case 3: return false; case 4: arg_D8_0 = (GetGameAccountStateRequest.smethod_0(this.AccountId, other.AccountId) ? -241238532 : -1014381965); continue; case 5: arg_D8_0 = (GetGameAccountStateRequest.smethod_0(this.GameAccountId, other.GameAccountId) ? -535136579 : -1149992538); continue; case 6: goto IL_126; case 7: return false; case 9: arg_D8_0 = ((!GetGameAccountStateRequest.smethod_0(this.Tags, other.Tags)) ? -1926673718 : -438886013); continue; case 10: goto IL_47; case 11: arg_D8_0 = (GetGameAccountStateRequest.smethod_0(this.Options, other.Options) ? -1233971579 : -1569884154); continue; case 12: return true; } break; } return true; IL_47: arg_D8_0 = -414878951; goto IL_D3; IL_126: arg_D8_0 = ((other != this) ? -518599723 : -1091596591); goto IL_D3; } public override int GetHashCode() { int num = 1; if (this.accountId_ != null) { goto IL_80; } goto IL_125; uint arg_E5_0; while (true) { IL_E0: uint num2; switch ((num2 = (arg_E5_0 ^ 3728158985u)) % 9u) { case 0u: arg_E5_0 = ((this.tags_ == null) ? 2929549678u : 2353031925u); continue; case 1u: num ^= GetGameAccountStateRequest.smethod_1(this.Tags); arg_E5_0 = (num2 * 682172404u ^ 2313048414u); continue; case 2u: num ^= GetGameAccountStateRequest.smethod_1(this.AccountId); arg_E5_0 = (num2 * 3119847847u ^ 3585186747u); continue; case 3u: goto IL_80; case 4u: arg_E5_0 = ((this.options_ != null) ? 2901276672u : 2665116110u); continue; case 5u: num ^= GetGameAccountStateRequest.smethod_1(this.Options); arg_E5_0 = (num2 * 3194888653u ^ 2720093435u); continue; case 7u: goto IL_125; case 8u: num ^= GetGameAccountStateRequest.smethod_1(this.GameAccountId); arg_E5_0 = (num2 * 1240348646u ^ 975448655u); continue; } break; } return num; IL_80: arg_E5_0 = 4275373698u; goto IL_E0; IL_125: arg_E5_0 = ((this.gameAccountId_ == null) ? 3134458293u : 2744219462u); goto IL_E0; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.accountId_ != null) { goto IL_3B; } goto IL_17D; uint arg_131_0; while (true) { IL_12C: uint num; switch ((num = (arg_131_0 ^ 3202430304u)) % 12u) { case 0u: arg_131_0 = ((this.options_ == null) ? 3556321899u : 3704327723u); continue; case 1u: output.WriteRawTag(10); output.WriteMessage(this.AccountId); arg_131_0 = (num * 3997486349u ^ 37361455u); continue; case 2u: output.WriteMessage(this.Tags); arg_131_0 = (num * 3261207184u ^ 2710174901u); continue; case 3u: output.WriteRawTag(82); arg_131_0 = (num * 1503488437u ^ 540496743u); continue; case 4u: output.WriteRawTag(90); arg_131_0 = (num * 3429523533u ^ 2628376174u); continue; case 6u: goto IL_17D; case 7u: arg_131_0 = ((this.tags_ != null) ? 2441796428u : 3951713429u); continue; case 8u: output.WriteMessage(this.Options); arg_131_0 = (num * 4120306731u ^ 3939658091u); continue; case 9u: output.WriteRawTag(18); arg_131_0 = (num * 4292384758u ^ 4025415669u); continue; case 10u: goto IL_3B; case 11u: output.WriteMessage(this.GameAccountId); arg_131_0 = (num * 3835907917u ^ 2411186419u); continue; } break; } return; IL_3B: arg_131_0 = 3635473445u; goto IL_12C; IL_17D: arg_131_0 = ((this.gameAccountId_ == null) ? 2228430572u : 3688479941u); goto IL_12C; } public int CalculateSize() { int num = 0; while (true) { IL_153: uint arg_11E_0 = 825073631u; while (true) { uint num2; switch ((num2 = (arg_11E_0 ^ 1588651238u)) % 10u) { case 0u: goto IL_153; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId); arg_11E_0 = (num2 * 37271729u ^ 1421773230u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Tags); arg_11E_0 = (num2 * 2868178784u ^ 3173061262u); continue; case 3u: arg_11E_0 = (((this.accountId_ != null) ? 2226052894u : 3923807784u) ^ num2 * 299831548u); continue; case 4u: arg_11E_0 = ((this.gameAccountId_ != null) ? 1498939297u : 1129475513u); continue; case 5u: arg_11E_0 = ((this.tags_ == null) ? 466109966u : 2133583946u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AccountId); arg_11E_0 = (num2 * 2912788476u ^ 1963307588u); continue; case 7u: arg_11E_0 = ((this.options_ == null) ? 1868762923u : 1076884673u); continue; case 9u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_11E_0 = (num2 * 537371522u ^ 1245906917u); continue; } return num; } } return num; } public void MergeFrom(GetGameAccountStateRequest other) { if (other == null) { goto IL_A5; } goto IL_280; uint arg_218_0; while (true) { IL_213: uint num; switch ((num = (arg_218_0 ^ 3847594146u)) % 19u) { case 0u: arg_218_0 = (((this.tags_ != null) ? 4097310359u : 4257944052u) ^ num * 825030935u); continue; case 1u: arg_218_0 = (((this.accountId_ == null) ? 1563741268u : 1960999662u) ^ num * 3385394609u); continue; case 2u: this.Options.MergeFrom(other.Options); arg_218_0 = 3365649516u; continue; case 3u: arg_218_0 = ((other.options_ == null) ? 3365649516u : 2606077412u); continue; case 4u: arg_218_0 = (((this.options_ != null) ? 58819000u : 1505117387u) ^ num * 1594447087u); continue; case 5u: this.AccountId.MergeFrom(other.AccountId); arg_218_0 = 2546782468u; continue; case 6u: return; case 7u: this.Tags.MergeFrom(other.Tags); arg_218_0 = 3460574568u; continue; case 8u: this.options_ = new GameAccountFieldOptions(); arg_218_0 = (num * 3009604816u ^ 1898256530u); continue; case 9u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_218_0 = 4197057254u; continue; case 10u: arg_218_0 = ((other.gameAccountId_ == null) ? 4197057254u : 3966350129u); continue; case 11u: this.tags_ = new GameAccountFieldTags(); arg_218_0 = (num * 1497475096u ^ 3340469232u); continue; case 12u: goto IL_A5; case 13u: this.gameAccountId_ = new EntityId(); arg_218_0 = (num * 684928181u ^ 3385125078u); continue; case 15u: goto IL_280; case 16u: arg_218_0 = (((this.gameAccountId_ != null) ? 1802675875u : 633221731u) ^ num * 72820354u); continue; case 17u: arg_218_0 = ((other.tags_ != null) ? 2655315515u : 3460574568u); continue; case 18u: this.accountId_ = new EntityId(); arg_218_0 = (num * 3779599780u ^ 985769119u); continue; } break; } return; IL_A5: arg_218_0 = 2319734412u; goto IL_213; IL_280: arg_218_0 = ((other.accountId_ != null) ? 3059137583u : 2546782468u); goto IL_213; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2D9: uint num; uint arg_261_0 = ((num = input.ReadTag()) == 0u) ? 647179442u : 196458912u; while (true) { uint num2; switch ((num2 = (arg_261_0 ^ 1807758080u)) % 23u) { case 0u: arg_261_0 = (((num == 18u) ? 468199480u : 454290373u) ^ num2 * 737196258u); continue; case 1u: this.accountId_ = new EntityId(); arg_261_0 = (num2 * 1352429530u ^ 1563910493u); continue; case 2u: arg_261_0 = ((this.gameAccountId_ == null) ? 1638589137u : 1218815643u); continue; case 3u: arg_261_0 = ((num != 82u) ? 814762745u : 759181509u); continue; case 4u: input.ReadMessage(this.tags_); arg_261_0 = 1103155923u; continue; case 5u: arg_261_0 = ((this.options_ == null) ? 789917887u : 362452930u); continue; case 6u: arg_261_0 = (num2 * 1430089411u ^ 2031060155u); continue; case 7u: arg_261_0 = (num2 * 42985276u ^ 3056441139u); continue; case 8u: this.tags_ = new GameAccountFieldTags(); arg_261_0 = (num2 * 1205886460u ^ 230189037u); continue; case 9u: arg_261_0 = ((this.accountId_ != null) ? 816944953u : 1495084730u); continue; case 10u: arg_261_0 = ((num <= 18u) ? 2055098443u : 247931711u); continue; case 11u: arg_261_0 = (((num != 10u) ? 2750333011u : 2421432407u) ^ num2 * 3663109332u); continue; case 12u: arg_261_0 = 196458912u; continue; case 13u: this.gameAccountId_ = new EntityId(); arg_261_0 = (num2 * 479169344u ^ 3808053723u); continue; case 14u: arg_261_0 = ((this.tags_ != null) ? 625485229u : 1708819568u); continue; case 16u: input.SkipLastField(); arg_261_0 = 1103155923u; continue; case 17u: arg_261_0 = (((num == 90u) ? 2264125027u : 4156618492u) ^ num2 * 4199992243u); continue; case 18u: input.ReadMessage(this.gameAccountId_); arg_261_0 = 1432226424u; continue; case 19u: goto IL_2D9; case 20u: this.options_ = new GameAccountFieldOptions(); arg_261_0 = (num2 * 4120379090u ^ 3297182572u); continue; case 21u: input.ReadMessage(this.accountId_); arg_261_0 = 1103155923u; continue; case 22u: input.ReadMessage(this.options_); arg_261_0 = 1103155923u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Friends.V1/FriendInvitationParams.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class FriendInvitationParams : IMessage<FriendInvitationParams>, IEquatable<FriendInvitationParams>, IDeepCloneable<FriendInvitationParams>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FriendInvitationParams.__c __9 = new FriendInvitationParams.__c(); internal FriendInvitationParams cctor>b__59_0() { return new FriendInvitationParams(); } } private static readonly MessageParser<FriendInvitationParams> _parser = new MessageParser<FriendInvitationParams>(new Func<FriendInvitationParams>(FriendInvitationParams.__c.__9.<.cctor>b__59_0)); public const int TargetEmailFieldNumber = 1; private string targetEmail_ = ""; public const int TargetBattleTagFieldNumber = 2; private string targetBattleTag_ = ""; public const int InviterBattleTagFieldNumber = 3; private string inviterBattleTag_ = ""; public const int InviterFullNameFieldNumber = 4; private string inviterFullName_ = ""; public const int InviteeDisplayNameFieldNumber = 5; private string inviteeDisplayName_ = ""; public const int RoleFieldNumber = 6; private static readonly FieldCodec<uint> _repeated_role_codec = FieldCodec.ForUInt32(50u); private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public const int PreviousRoleDeprecatedFieldNumber = 7; private static readonly FieldCodec<uint> _repeated_previousRoleDeprecated_codec = FieldCodec.ForUInt32(58u); private readonly RepeatedField<uint> previousRoleDeprecated_ = new RepeatedField<uint>(); public const int FriendParamsFieldNumber = 103; private FriendInvitationParams friendParams_; public static MessageParser<FriendInvitationParams> Parser { get { return FriendInvitationParams._parser; } } public static MessageDescriptor Descriptor { get { return FriendsTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return FriendInvitationParams.Descriptor; } } public string TargetEmail { get { return this.targetEmail_; } set { this.targetEmail_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public string TargetBattleTag { get { return this.targetBattleTag_; } set { this.targetBattleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string InviterBattleTag { get { return this.inviterBattleTag_; } set { this.inviterBattleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string InviterFullName { get { return this.inviterFullName_; } set { this.inviterFullName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string InviteeDisplayName { get { return this.inviteeDisplayName_; } set { this.inviteeDisplayName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public RepeatedField<uint> Role { get { return this.role_; } } [Obsolete] public RepeatedField<uint> PreviousRoleDeprecated { get { return this.previousRoleDeprecated_; } } public FriendInvitationParams FriendParams { get { return this.friendParams_; } set { this.friendParams_ = value; } } public FriendInvitationParams() { } public FriendInvitationParams(FriendInvitationParams other) : this() { while (true) { IL_109: uint arg_DD_0 = 2255238252u; while (true) { uint num; switch ((num = (arg_DD_0 ^ 2368817000u)) % 8u) { case 0u: goto IL_109; case 1u: this.inviterBattleTag_ = other.inviterBattleTag_; arg_DD_0 = (num * 3214299529u ^ 854123678u); continue; case 3u: this.targetBattleTag_ = other.targetBattleTag_; arg_DD_0 = (num * 4192292525u ^ 843622222u); continue; case 4u: this.targetEmail_ = other.targetEmail_; arg_DD_0 = (num * 210951744u ^ 1482506739u); continue; case 5u: this.FriendParams = ((other.friendParams_ != null) ? other.FriendParams.Clone() : null); arg_DD_0 = 2821262946u; continue; case 6u: this.inviteeDisplayName_ = other.inviteeDisplayName_; this.role_ = other.role_.Clone(); this.previousRoleDeprecated_ = other.previousRoleDeprecated_.Clone(); arg_DD_0 = (num * 4120346862u ^ 1583382625u); continue; case 7u: this.inviterFullName_ = other.inviterFullName_; arg_DD_0 = (num * 1417074464u ^ 4123635006u); continue; } return; } } } public FriendInvitationParams Clone() { return new FriendInvitationParams(this); } public override bool Equals(object other) { return this.Equals(other as FriendInvitationParams); } public bool Equals(FriendInvitationParams other) { if (other == null) { goto IL_18; } goto IL_202; int arg_194_0; while (true) { IL_18F: switch ((arg_194_0 ^ 1175706165) % 21) { case 0: arg_194_0 = (FriendInvitationParams.smethod_0(this.TargetEmail, other.TargetEmail) ? 2141320275 : 1139399290); continue; case 1: arg_194_0 = (FriendInvitationParams.smethod_0(this.InviterBattleTag, other.InviterBattleTag) ? 85489346 : 1815050190); continue; case 2: return false; case 4: return false; case 5: return false; case 6: arg_194_0 = ((!FriendInvitationParams.smethod_0(this.InviteeDisplayName, other.InviteeDisplayName)) ? 273642046 : 736590512); continue; case 7: return false; case 8: return false; case 9: goto IL_202; case 10: arg_194_0 = ((!FriendInvitationParams.smethod_0(this.TargetBattleTag, other.TargetBattleTag)) ? 720002825 : 1787569953); continue; case 11: return false; case 12: arg_194_0 = (FriendInvitationParams.smethod_1(this.FriendParams, other.FriendParams) ? 1215755718 : 2110369704); continue; case 13: arg_194_0 = (FriendInvitationParams.smethod_0(this.InviterFullName, other.InviterFullName) ? 1096518041 : 794426857); continue; case 14: return false; case 15: arg_194_0 = (this.role_.Equals(other.role_) ? 815274554 : 1623681335); continue; case 16: return true; case 17: arg_194_0 = ((!this.previousRoleDeprecated_.Equals(other.previousRoleDeprecated_)) ? 281326030 : 492138051); continue; case 18: goto IL_18; case 19: return false; case 20: return false; } break; } return true; IL_18: arg_194_0 = 1679852057; goto IL_18F; IL_202: arg_194_0 = ((other != this) ? 814546190 : 2050183808); goto IL_18F; } public override int GetHashCode() { int num = 1; if (FriendInvitationParams.smethod_2(this.TargetEmail) != 0) { goto IL_4D; } goto IL_1ED; uint arg_19D_0; while (true) { IL_198: uint num2; switch ((num2 = (arg_19D_0 ^ 3989111325u)) % 13u) { case 0u: num ^= FriendInvitationParams.smethod_3(this.TargetBattleTag); arg_19D_0 = (num2 * 3590332690u ^ 3493724683u); continue; case 1u: num ^= FriendInvitationParams.smethod_3(this.InviteeDisplayName); arg_19D_0 = (num2 * 2924253596u ^ 1500235760u); continue; case 2u: goto IL_1ED; case 3u: num ^= FriendInvitationParams.smethod_3(this.InviterBattleTag); arg_19D_0 = (num2 * 4141327424u ^ 3770721188u); continue; case 4u: arg_19D_0 = ((FriendInvitationParams.smethod_2(this.InviterFullName) != 0) ? 3173906465u : 3842003778u); continue; case 5u: num ^= FriendInvitationParams.smethod_3(this.InviterFullName); arg_19D_0 = (num2 * 188190018u ^ 1640487994u); continue; case 6u: arg_19D_0 = ((FriendInvitationParams.smethod_2(this.InviteeDisplayName) != 0) ? 3608851372u : 4226436908u); continue; case 8u: num ^= FriendInvitationParams.smethod_3(this.role_); num ^= FriendInvitationParams.smethod_3(this.previousRoleDeprecated_); arg_19D_0 = ((this.friendParams_ != null) ? 2922373390u : 4191303718u); continue; case 9u: num ^= FriendInvitationParams.smethod_3(this.TargetEmail); arg_19D_0 = (num2 * 3233752418u ^ 1741967521u); continue; case 10u: num ^= FriendInvitationParams.smethod_3(this.FriendParams); arg_19D_0 = (num2 * 3489485003u ^ 4046272567u); continue; case 11u: goto IL_4D; case 12u: arg_19D_0 = ((FriendInvitationParams.smethod_2(this.InviterBattleTag) == 0) ? 2309832484u : 2778574415u); continue; } break; } return num; IL_4D: arg_19D_0 = 2315770190u; goto IL_198; IL_1ED: arg_19D_0 = ((FriendInvitationParams.smethod_2(this.TargetBattleTag) != 0) ? 4027313200u : 3011415585u); goto IL_198; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FriendInvitationParams.smethod_2(this.TargetEmail) != 0) { goto IL_22; } goto IL_271; uint arg_211_0; while (true) { IL_20C: uint num; switch ((num = (arg_211_0 ^ 3269060556u)) % 17u) { case 1u: output.WriteString(this.TargetEmail); arg_211_0 = (num * 3245396760u ^ 889194438u); continue; case 2u: this.role_.WriteTo(output, FriendInvitationParams._repeated_role_codec); arg_211_0 = 2785565825u; continue; case 3u: output.WriteRawTag(26); arg_211_0 = (num * 1011395629u ^ 665320106u); continue; case 4u: arg_211_0 = ((FriendInvitationParams.smethod_2(this.InviterBattleTag) == 0) ? 2342553067u : 4138643730u); continue; case 5u: output.WriteRawTag(42); output.WriteString(this.InviteeDisplayName); arg_211_0 = (num * 2971126182u ^ 3547355352u); continue; case 6u: output.WriteRawTag(186, 6); arg_211_0 = (num * 1600449145u ^ 1856797397u); continue; case 7u: output.WriteString(this.InviterBattleTag); arg_211_0 = (num * 1813342572u ^ 1049775467u); continue; case 8u: arg_211_0 = ((FriendInvitationParams.smethod_2(this.InviterFullName) == 0) ? 3782662459u : 3197591182u); continue; case 9u: arg_211_0 = ((FriendInvitationParams.smethod_2(this.InviteeDisplayName) == 0) ? 2666168356u : 2460945670u); continue; case 10u: output.WriteRawTag(10); arg_211_0 = (num * 1025200798u ^ 1421611565u); continue; case 11u: output.WriteRawTag(34); output.WriteString(this.InviterFullName); arg_211_0 = (num * 1769711113u ^ 2666370665u); continue; case 12u: this.previousRoleDeprecated_.WriteTo(output, FriendInvitationParams._repeated_previousRoleDeprecated_codec); arg_211_0 = (((this.friendParams_ == null) ? 226482572u : 1743902468u) ^ num * 2386056183u); continue; case 13u: output.WriteMessage(this.FriendParams); arg_211_0 = (num * 4281373831u ^ 3619136601u); continue; case 14u: goto IL_271; case 15u: output.WriteRawTag(18); output.WriteString(this.TargetBattleTag); arg_211_0 = (num * 328591779u ^ 2069100781u); continue; case 16u: goto IL_22; } break; } return; IL_22: arg_211_0 = 2855025521u; goto IL_20C; IL_271: arg_211_0 = ((FriendInvitationParams.smethod_2(this.TargetBattleTag) != 0) ? 3505347448u : 3759014513u); goto IL_20C; } public int CalculateSize() { int num = 0; if (FriendInvitationParams.smethod_2(this.TargetEmail) != 0) { goto IL_124; } goto IL_235; uint arg_1DD_0; while (true) { IL_1D8: uint num2; switch ((num2 = (arg_1DD_0 ^ 727562242u)) % 15u) { case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviterFullName); arg_1DD_0 = (num2 * 1086243656u ^ 3216930187u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.TargetBattleTag); arg_1DD_0 = (num2 * 2766512319u ^ 3727932363u); continue; case 3u: arg_1DD_0 = ((FriendInvitationParams.smethod_2(this.InviterFullName) != 0) ? 687272u : 1041676379u); continue; case 4u: num += 2 + CodedOutputStream.ComputeMessageSize(this.FriendParams); arg_1DD_0 = (num2 * 1753864383u ^ 2228110332u); continue; case 5u: arg_1DD_0 = ((FriendInvitationParams.smethod_2(this.InviteeDisplayName) != 0) ? 967203323u : 1116105295u); continue; case 6u: goto IL_124; case 7u: num += this.previousRoleDeprecated_.CalculateSize(FriendInvitationParams._repeated_previousRoleDeprecated_codec); arg_1DD_0 = (num2 * 1695451879u ^ 4276178044u); continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviteeDisplayName); arg_1DD_0 = (num2 * 20702446u ^ 1247195953u); continue; case 9u: arg_1DD_0 = ((FriendInvitationParams.smethod_2(this.InviterBattleTag) == 0) ? 340659389u : 104597575u); continue; case 10u: num += 1 + CodedOutputStream.ComputeStringSize(this.TargetEmail); arg_1DD_0 = (num2 * 2293634479u ^ 512053801u); continue; case 11u: num += this.role_.CalculateSize(FriendInvitationParams._repeated_role_codec); arg_1DD_0 = 144266922u; continue; case 12u: num += 1 + CodedOutputStream.ComputeStringSize(this.InviterBattleTag); arg_1DD_0 = (num2 * 24110972u ^ 3221530833u); continue; case 13u: goto IL_235; case 14u: arg_1DD_0 = (((this.friendParams_ != null) ? 1321111258u : 1785774168u) ^ num2 * 3389185841u); continue; } break; } return num; IL_124: arg_1DD_0 = 1799268225u; goto IL_1D8; IL_235: arg_1DD_0 = ((FriendInvitationParams.smethod_2(this.TargetBattleTag) != 0) ? 1619248506u : 468789059u); goto IL_1D8; } public void MergeFrom(FriendInvitationParams other) { if (other == null) { goto IL_15D; } goto IL_289; uint arg_221_0; while (true) { IL_21C: uint num; switch ((num = (arg_221_0 ^ 3302905434u)) % 19u) { case 0u: arg_221_0 = ((FriendInvitationParams.smethod_2(other.TargetBattleTag) == 0) ? 3316417408u : 3195953158u); continue; case 1u: this.FriendParams.MergeFrom(other.FriendParams); arg_221_0 = 2796204070u; continue; case 3u: this.role_.Add(other.role_); arg_221_0 = 3760559042u; continue; case 4u: this.InviterFullName = other.InviterFullName; arg_221_0 = (num * 3184389384u ^ 2693033320u); continue; case 5u: this.friendParams_ = new FriendInvitationParams(); arg_221_0 = (num * 88014056u ^ 2458062253u); continue; case 6u: arg_221_0 = (((this.friendParams_ == null) ? 457790043u : 914328166u) ^ num * 366019385u); continue; case 7u: goto IL_289; case 8u: goto IL_15D; case 9u: this.TargetBattleTag = other.TargetBattleTag; arg_221_0 = (num * 2498957470u ^ 3191328584u); continue; case 10u: this.TargetEmail = other.TargetEmail; arg_221_0 = (num * 711730810u ^ 358553416u); continue; case 11u: arg_221_0 = (((other.friendParams_ != null) ? 201906113u : 371006350u) ^ num * 2813562266u); continue; case 12u: this.previousRoleDeprecated_.Add(other.previousRoleDeprecated_); arg_221_0 = (num * 191257306u ^ 3375529998u); continue; case 13u: arg_221_0 = ((FriendInvitationParams.smethod_2(other.InviteeDisplayName) != 0) ? 2973106760u : 3091903749u); continue; case 14u: arg_221_0 = ((FriendInvitationParams.smethod_2(other.InviterBattleTag) != 0) ? 2986202203u : 2339299982u); continue; case 15u: return; case 16u: arg_221_0 = ((FriendInvitationParams.smethod_2(other.InviterFullName) == 0) ? 2466686112u : 3751400131u); continue; case 17u: this.InviteeDisplayName = other.InviteeDisplayName; arg_221_0 = (num * 2340848922u ^ 3439023825u); continue; case 18u: this.InviterBattleTag = other.InviterBattleTag; arg_221_0 = (num * 2200939543u ^ 1238808729u); continue; } break; } return; IL_15D: arg_221_0 = 2187005870u; goto IL_21C; IL_289: arg_221_0 = ((FriendInvitationParams.smethod_2(other.TargetEmail) != 0) ? 4167100066u : 2358915448u); goto IL_21C; } public void MergeFrom(CodedInputStream input) { while (true) { IL_44C: uint num; uint arg_3A4_0 = ((num = input.ReadTag()) == 0u) ? 206374280u : 2054628544u; while (true) { uint num2; switch ((num2 = (arg_3A4_0 ^ 524765286u)) % 35u) { case 0u: arg_3A4_0 = 2054628544u; continue; case 1u: arg_3A4_0 = ((num <= 50u) ? 104493640u : 59807835u); continue; case 2u: arg_3A4_0 = ((num != 26u) ? 883388049u : 434417743u); continue; case 3u: this.TargetBattleTag = input.ReadString(); arg_3A4_0 = 1374247454u; continue; case 5u: arg_3A4_0 = (num2 * 3305819265u ^ 523759572u); continue; case 6u: arg_3A4_0 = (((num != 10u) ? 3594263217u : 2922405909u) ^ num2 * 4265562731u); continue; case 7u: arg_3A4_0 = ((num != 56u) ? 496414743u : 1339154395u); continue; case 8u: arg_3A4_0 = (((num == 42u) ? 635976815u : 1869464573u) ^ num2 * 1271652621u); continue; case 9u: arg_3A4_0 = (((num > 18u) ? 2343221922u : 2720400756u) ^ num2 * 560725071u); continue; case 10u: arg_3A4_0 = ((this.friendParams_ != null) ? 269504788u : 31722538u); continue; case 11u: input.ReadMessage(this.friendParams_); arg_3A4_0 = 14581929u; continue; case 12u: arg_3A4_0 = (num2 * 3776950618u ^ 4072993863u); continue; case 13u: this.InviterFullName = input.ReadString(); arg_3A4_0 = 1742362319u; continue; case 14u: arg_3A4_0 = (((num == 48u) ? 2229725959u : 2653305000u) ^ num2 * 394716768u); continue; case 15u: arg_3A4_0 = (((num == 826u) ? 114969049u : 842119137u) ^ num2 * 2803297186u); continue; case 16u: arg_3A4_0 = (num2 * 1164143711u ^ 1933978654u); continue; case 17u: arg_3A4_0 = (((num == 18u) ? 663458871u : 1015495037u) ^ num2 * 2295647848u); continue; case 18u: arg_3A4_0 = ((num > 42u) ? 395002725u : 1585366284u); continue; case 19u: arg_3A4_0 = (num2 * 3443473257u ^ 3364376217u); continue; case 20u: this.role_.AddEntriesFrom(input, FriendInvitationParams._repeated_role_codec); arg_3A4_0 = 14581929u; continue; case 21u: goto IL_44C; case 22u: arg_3A4_0 = (((num != 34u) ? 1151456998u : 492303359u) ^ num2 * 3611771621u); continue; case 23u: arg_3A4_0 = (num2 * 3390011310u ^ 2482167555u); continue; case 24u: input.SkipLastField(); arg_3A4_0 = 1021582491u; continue; case 25u: this.previousRoleDeprecated_.AddEntriesFrom(input, FriendInvitationParams._repeated_previousRoleDeprecated_codec); arg_3A4_0 = 1225529429u; continue; case 26u: arg_3A4_0 = (num2 * 1587718082u ^ 765277505u); continue; case 27u: arg_3A4_0 = (((num == 58u) ? 1499132729u : 173924878u) ^ num2 * 1373174786u); continue; case 28u: this.InviterBattleTag = input.ReadString(); arg_3A4_0 = 14581929u; continue; case 29u: this.TargetEmail = input.ReadString(); arg_3A4_0 = 14581929u; continue; case 30u: arg_3A4_0 = (num2 * 1078052058u ^ 4127791769u); continue; case 31u: arg_3A4_0 = (((num == 50u) ? 1402063719u : 1173914748u) ^ num2 * 3679770864u); continue; case 32u: this.friendParams_ = new FriendInvitationParams(); arg_3A4_0 = (num2 * 171481545u ^ 2595379896u); continue; case 33u: this.InviteeDisplayName = input.ReadString(); arg_3A4_0 = 574526549u; continue; case 34u: arg_3A4_0 = (num2 * 3907211007u ^ 3528186792u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Friends.V1/ViewFriendsRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class ViewFriendsRequest : IMessage<ViewFriendsRequest>, IEquatable<ViewFriendsRequest>, IDeepCloneable<ViewFriendsRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ViewFriendsRequest.__c __9 = new ViewFriendsRequest.__c(); internal ViewFriendsRequest cctor>b__34_0() { return new ViewFriendsRequest(); } } private static readonly MessageParser<ViewFriendsRequest> _parser = new MessageParser<ViewFriendsRequest>(new Func<ViewFriendsRequest>(ViewFriendsRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int RoleFieldNumber = 3; private static readonly FieldCodec<uint> _repeated_role_codec; private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public static MessageParser<ViewFriendsRequest> Parser { get { return ViewFriendsRequest._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return ViewFriendsRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public RepeatedField<uint> Role { get { return this.role_; } } public ViewFriendsRequest() { } public ViewFriendsRequest(ViewFriendsRequest other) : this() { while (true) { IL_71: int arg_5B_0 = 830563187; while (true) { switch ((arg_5B_0 ^ 38527621) % 3) { case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.role_ = other.role_.Clone(); arg_5B_0 = 957425184; continue; case 2: goto IL_71; } return; } } } public ViewFriendsRequest Clone() { return new ViewFriendsRequest(this); } public override bool Equals(object other) { return this.Equals(other as ViewFriendsRequest); } public bool Equals(ViewFriendsRequest other) { if (other == null) { goto IL_70; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -2128832251) % 11) { case 0: return false; case 1: arg_A6_0 = ((!this.role_.Equals(other.role_)) ? -148819915 : -411667621); continue; case 2: goto IL_EC; case 3: return false; case 4: goto IL_70; case 6: return false; case 7: arg_A6_0 = (ViewFriendsRequest.smethod_0(this.TargetId, other.TargetId) ? -1474841505 : -1224500517); continue; case 8: return true; case 9: arg_A6_0 = (ViewFriendsRequest.smethod_0(this.AgentId, other.AgentId) ? -1284404463 : -204166657); continue; case 10: return false; } break; } return true; IL_70: arg_A6_0 = -1823551675; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? -309028623 : -929117797); goto IL_A1; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_53; } goto IL_89; uint arg_5D_0; while (true) { IL_58: uint num2; switch ((num2 = (arg_5D_0 ^ 3057239186u)) % 5u) { case 0u: goto IL_53; case 2u: num ^= ViewFriendsRequest.smethod_1(this.AgentId); arg_5D_0 = (num2 * 1732604161u ^ 2809072907u); continue; case 3u: num ^= ViewFriendsRequest.smethod_1(this.TargetId); arg_5D_0 = (num2 * 692986329u ^ 489880796u); continue; case 4u: goto IL_89; } break; } return num ^ ViewFriendsRequest.smethod_1(this.role_); IL_53: arg_5D_0 = 3927777670u; goto IL_58; IL_89: arg_5D_0 = ((this.targetId_ != null) ? 3199862587u : 4283785117u); goto IL_58; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_87; } goto IL_C8; uint arg_91_0; while (true) { IL_8C: uint num; switch ((num = (arg_91_0 ^ 4216496526u)) % 7u) { case 0u: goto IL_87; case 1u: this.role_.WriteTo(output, ViewFriendsRequest._repeated_role_codec); arg_91_0 = 3752050463u; continue; case 2u: goto IL_C8; case 3u: output.WriteMessage(this.AgentId); arg_91_0 = (num * 3349460964u ^ 740484430u); continue; case 4u: output.WriteRawTag(10); arg_91_0 = (num * 3161935329u ^ 182660182u); continue; case 5u: output.WriteRawTag(18); output.WriteMessage(this.TargetId); arg_91_0 = (num * 486212450u ^ 1818396439u); continue; } break; } return; IL_87: arg_91_0 = 2258914373u; goto IL_8C; IL_C8: arg_91_0 = ((this.targetId_ != null) ? 4049334404u : 3962610883u); goto IL_8C; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 2027518720u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 2093499469u)) % 6u) { case 0u: arg_92_0 = ((this.targetId_ != null) ? 805273769u : 2136364738u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_92_0 = (num2 * 1333621778u ^ 1436659853u); continue; case 3u: goto IL_B6; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_92_0 = (num2 * 463906400u ^ 1765538626u); continue; case 5u: arg_92_0 = (((this.agentId_ == null) ? 2698927809u : 4016867311u) ^ num2 * 1983316024u); continue; } goto Block_3; } } Block_3: return num + this.role_.CalculateSize(ViewFriendsRequest._repeated_role_codec); } public void MergeFrom(ViewFriendsRequest other) { if (other == null) { goto IL_33; } goto IL_14A; uint arg_102_0; while (true) { IL_FD: uint num; switch ((num = (arg_102_0 ^ 1191653078u)) % 11u) { case 0u: this.TargetId.MergeFrom(other.TargetId); arg_102_0 = 952057765u; continue; case 1u: arg_102_0 = (((this.targetId_ != null) ? 2140693247u : 479562822u) ^ num * 2447436232u); continue; case 2u: this.targetId_ = new EntityId(); arg_102_0 = (num * 3205973762u ^ 1151193527u); continue; case 3u: goto IL_14A; case 5u: return; case 6u: this.agentId_ = new EntityId(); arg_102_0 = (num * 1357459244u ^ 3351312432u); continue; case 7u: arg_102_0 = (((this.agentId_ != null) ? 3310089488u : 2277518543u) ^ num * 1298028245u); continue; case 8u: arg_102_0 = ((other.targetId_ == null) ? 952057765u : 363615557u); continue; case 9u: goto IL_33; case 10u: this.AgentId.MergeFrom(other.AgentId); arg_102_0 = 807405967u; continue; } break; } this.role_.Add(other.role_); return; IL_33: arg_102_0 = 1825304945u; goto IL_FD; IL_14A: arg_102_0 = ((other.agentId_ != null) ? 161436506u : 807405967u); goto IL_FD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_235: uint num; uint arg_1D1_0 = ((num = input.ReadTag()) != 0u) ? 3798320823u : 2699038397u; while (true) { uint num2; switch ((num2 = (arg_1D1_0 ^ 3199339238u)) % 18u) { case 0u: arg_1D1_0 = (((num == 18u) ? 3804597845u : 2399411763u) ^ num2 * 3710419518u); continue; case 1u: arg_1D1_0 = ((num > 18u) ? 2544347862u : 3864890642u); continue; case 2u: arg_1D1_0 = ((this.agentId_ != null) ? 2937213038u : 2260977933u); continue; case 3u: arg_1D1_0 = ((this.targetId_ == null) ? 2963192075u : 3667748296u); continue; case 4u: input.ReadMessage(this.agentId_); arg_1D1_0 = 4013741389u; continue; case 5u: arg_1D1_0 = (num2 * 3081502412u ^ 3410129138u); continue; case 6u: this.role_.AddEntriesFrom(input, ViewFriendsRequest._repeated_role_codec); arg_1D1_0 = 2830931638u; continue; case 7u: arg_1D1_0 = (((num != 26u) ? 3309878434u : 3113696613u) ^ num2 * 3770197099u); continue; case 8u: arg_1D1_0 = 3798320823u; continue; case 10u: input.ReadMessage(this.targetId_); arg_1D1_0 = 2830931638u; continue; case 11u: input.SkipLastField(); arg_1D1_0 = 2830931638u; continue; case 12u: arg_1D1_0 = ((num != 24u) ? 3484299631u : 3204422438u); continue; case 13u: arg_1D1_0 = (num2 * 1546222842u ^ 2381362667u); continue; case 14u: goto IL_235; case 15u: this.targetId_ = new EntityId(); arg_1D1_0 = (num2 * 712203429u ^ 846022153u); continue; case 16u: arg_1D1_0 = (((num == 10u) ? 1725675046u : 1151457520u) ^ num2 * 1429403721u); continue; case 17u: this.agentId_ = new EntityId(); arg_1D1_0 = (num2 * 3883295361u ^ 4139253509u); continue; } return; } } } static ViewFriendsRequest() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_52: uint arg_3A_0 = 2450646179u; while (true) { uint num; switch ((num = (arg_3A_0 ^ 3642600596u)) % 3u) { case 1u: ViewFriendsRequest._repeated_role_codec = FieldCodec.ForUInt32(26u); arg_3A_0 = (num * 3803794232u ^ 1951300325u); continue; case 2u: goto IL_52; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/RegionTag.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class RegionTag : IMessage<RegionTag>, IEquatable<RegionTag>, IDeepCloneable<RegionTag>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly RegionTag.__c __9 = new RegionTag.__c(); internal RegionTag cctor>b__29_0() { return new RegionTag(); } } private static readonly MessageParser<RegionTag> _parser = new MessageParser<RegionTag>(new Func<RegionTag>(RegionTag.__c.__9.<.cctor>b__29_0)); public const int RegionFieldNumber = 1; private uint region_; public const int TagFieldNumber = 2; private uint tag_; public static MessageParser<RegionTag> Parser { get { return RegionTag._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[12]; } } MessageDescriptor IMessage.Descriptor { get { return RegionTag.Descriptor; } } public uint Region { get { return this.region_; } set { this.region_ = value; } } public uint Tag { get { return this.tag_; } set { this.tag_ = value; } } public RegionTag() { } public RegionTag(RegionTag other) : this() { while (true) { IL_4A: uint arg_32_0 = 3696840306u; while (true) { uint num; switch ((num = (arg_32_0 ^ 3146092368u)) % 3u) { case 0u: goto IL_4A; case 1u: this.region_ = other.region_; this.tag_ = other.tag_; arg_32_0 = (num * 4040161747u ^ 2228374286u); continue; } return; } } } public RegionTag Clone() { return new RegionTag(this); } public override bool Equals(object other) { return this.Equals(other as RegionTag); } public bool Equals(RegionTag other) { if (other == null) { goto IL_3C; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ 2043307661) % 9) { case 1: return false; case 2: return true; case 3: arg_6D_0 = ((this.Region != other.Region) ? 893721832 : 1896318819); continue; case 4: goto IL_3C; case 5: return false; case 6: goto IL_AB; case 7: arg_6D_0 = ((this.Tag == other.Tag) ? 1128657239 : 715571709); continue; case 8: return false; } break; } return true; IL_3C: arg_6D_0 = 2055337744; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? 171213264 : 770937400); goto IL_68; } public override int GetHashCode() { int num = 1; if (this.Region != 0u) { goto IL_3C; } goto IL_92; uint arg_66_0; while (true) { IL_61: uint num2; switch ((num2 = (arg_66_0 ^ 2420517357u)) % 5u) { case 1u: num ^= this.Tag.GetHashCode(); arg_66_0 = (num2 * 2728849644u ^ 3505070855u); continue; case 2u: goto IL_3C; case 3u: num ^= this.Region.GetHashCode(); arg_66_0 = (num2 * 2894504445u ^ 2831360142u); continue; case 4u: goto IL_92; } break; } return num; IL_3C: arg_66_0 = 2194312281u; goto IL_61; IL_92: arg_66_0 = ((this.Tag != 0u) ? 2953663868u : 3264210603u); goto IL_61; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Region != 0u) { goto IL_6F; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 1001591562u)) % 6u) { case 0u: goto IL_6F; case 1u: output.WriteRawTag(21); arg_79_0 = (num * 3769724643u ^ 1811810191u); continue; case 3u: goto IL_AC; case 4u: output.WriteFixed32(this.Tag); arg_79_0 = (num * 1243360513u ^ 1355817802u); continue; case 5u: output.WriteRawTag(13); output.WriteFixed32(this.Region); arg_79_0 = (num * 1634156165u ^ 608345030u); continue; } break; } return; IL_6F: arg_79_0 = 1771703303u; goto IL_74; IL_AC: arg_79_0 = ((this.Tag != 0u) ? 886134321u : 876269214u); goto IL_74; } public int CalculateSize() { int num = 0; if (this.Region != 0u) { goto IL_3F; } goto IL_75; uint arg_49_0; while (true) { IL_44: uint num2; switch ((num2 = (arg_49_0 ^ 1013190539u)) % 5u) { case 0u: goto IL_3F; case 1u: num += 5; arg_49_0 = (num2 * 3370250133u ^ 3525720103u); continue; case 2u: goto IL_75; case 3u: num += 5; arg_49_0 = (num2 * 3681935504u ^ 641222474u); continue; } break; } return num; IL_3F: arg_49_0 = 853550776u; goto IL_44; IL_75: arg_49_0 = ((this.Tag == 0u) ? 1203886012u : 704993764u); goto IL_44; } public void MergeFrom(RegionTag other) { if (other == null) { goto IL_30; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 2406882994u)) % 7u) { case 0u: arg_76_0 = ((other.Tag == 0u) ? 3481701740u : 4189816713u); continue; case 1u: goto IL_AD; case 2u: this.Tag = other.Tag; arg_76_0 = (num * 17163898u ^ 1095468402u); continue; case 4u: goto IL_30; case 5u: return; case 6u: this.Region = other.Region; arg_76_0 = (num * 3739087552u ^ 439980076u); continue; } break; } return; IL_30: arg_76_0 = 3282156175u; goto IL_71; IL_AD: arg_76_0 = ((other.Region == 0u) ? 3764588524u : 2701158191u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_EE: uint num; uint arg_AE_0 = ((num = input.ReadTag()) == 0u) ? 1714563902u : 1671751132u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 353205341u)) % 9u) { case 0u: arg_AE_0 = (num2 * 1151550331u ^ 1068208598u); continue; case 1u: this.Region = input.ReadFixed32(); arg_AE_0 = 1569786575u; continue; case 2u: arg_AE_0 = 1671751132u; continue; case 3u: input.SkipLastField(); arg_AE_0 = (num2 * 3273717224u ^ 1824099528u); continue; case 5u: this.Tag = input.ReadFixed32(); arg_AE_0 = 578863088u; continue; case 6u: goto IL_EE; case 7u: arg_AE_0 = (((num == 21u) ? 203988571u : 1187894249u) ^ num2 * 1392072753u); continue; case 8u: arg_AE_0 = ((num == 13u) ? 774502907u : 244410282u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Authentication.V1/ModuleLoadRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class ModuleLoadRequest : IMessage<ModuleLoadRequest>, IEquatable<ModuleLoadRequest>, IDeepCloneable<ModuleLoadRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ModuleLoadRequest.__c __9 = new ModuleLoadRequest.__c(); internal ModuleLoadRequest cctor>b__29_0() { return new ModuleLoadRequest(); } } private static readonly MessageParser<ModuleLoadRequest> _parser = new MessageParser<ModuleLoadRequest>(new Func<ModuleLoadRequest>(ModuleLoadRequest.__c.__9.<.cctor>b__29_0)); public const int ModuleHandleFieldNumber = 1; private ContentHandle moduleHandle_; public const int MessageFieldNumber = 2; private ByteString message_ = ByteString.Empty; public static MessageParser<ModuleLoadRequest> Parser { get { return ModuleLoadRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return ModuleLoadRequest.Descriptor; } } public ContentHandle ModuleHandle { get { return this.moduleHandle_; } set { this.moduleHandle_ = value; } } public ByteString Message { get { return this.message_; } set { this.message_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_34<string>(2130392831u)); } } public ModuleLoadRequest() { } public ModuleLoadRequest(ModuleLoadRequest other) : this() { while (true) { IL_50: int arg_3A_0 = 227403691; while (true) { switch ((arg_3A_0 ^ 907570580) % 3) { case 1: this.ModuleHandle = ((other.moduleHandle_ != null) ? other.ModuleHandle.Clone() : null); this.message_ = other.message_; arg_3A_0 = 718809343; continue; case 2: goto IL_50; } return; } } } public ModuleLoadRequest Clone() { return new ModuleLoadRequest(this); } public override bool Equals(object other) { return this.Equals(other as ModuleLoadRequest); } public bool Equals(ModuleLoadRequest other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 122354242) % 9) { case 0: goto IL_6D; case 1: return true; case 2: goto IL_B5; case 3: arg_77_0 = ((!(this.Message != other.Message)) ? 1606535281 : 711143776); continue; case 4: return false; case 5: return false; case 6: arg_77_0 = ((!ModuleLoadRequest.smethod_0(this.ModuleHandle, other.ModuleHandle)) ? 1150256612 : 1089966512); continue; case 8: return false; } break; } return true; IL_6D: arg_77_0 = 2039536103; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? 1931391754 : 1916817085); goto IL_72; } public override int GetHashCode() { int num = 1 ^ ModuleLoadRequest.smethod_1(this.ModuleHandle); while (true) { IL_7C: uint arg_60_0 = 146414588u; while (true) { uint num2; switch ((num2 = (arg_60_0 ^ 299600817u)) % 4u) { case 1u: arg_60_0 = (((this.Message.Length != 0) ? 2638775749u : 2376584702u) ^ num2 * 3452490515u); continue; case 2u: goto IL_7C; case 3u: num ^= ModuleLoadRequest.smethod_1(this.Message); arg_60_0 = (num2 * 258671607u ^ 3722850924u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.ModuleHandle); while (true) { IL_86: uint arg_6A_0 = 2050773038u; while (true) { uint num; switch ((num = (arg_6A_0 ^ 365091409u)) % 4u) { case 0u: goto IL_86; case 2u: output.WriteRawTag(18); output.WriteBytes(this.Message); arg_6A_0 = (num * 2719542989u ^ 2087845406u); continue; case 3u: arg_6A_0 = (((this.Message.Length != 0) ? 2074067179u : 1757741484u) ^ num * 2729404816u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_96: uint arg_76_0 = 4036261903u; while (true) { uint num2; switch ((num2 = (arg_76_0 ^ 3059735664u)) % 5u) { case 0u: goto IL_96; case 1u: arg_76_0 = (((this.Message.Length != 0) ? 4033344523u : 2628193201u) ^ num2 * 610919169u); continue; case 3u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Message); arg_76_0 = (num2 * 2327052240u ^ 3020676233u); continue; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ModuleHandle); arg_76_0 = (num2 * 3311032481u ^ 3960045287u); continue; } return num; } } return num; } public void MergeFrom(ModuleLoadRequest other) { if (other == null) { goto IL_18; } goto IL_101; uint arg_C1_0; while (true) { IL_BC: uint num; switch ((num = (arg_C1_0 ^ 3517434530u)) % 9u) { case 0u: goto IL_101; case 1u: return; case 3u: this.ModuleHandle.MergeFrom(other.ModuleHandle); arg_C1_0 = 4009164021u; continue; case 4u: this.moduleHandle_ = new ContentHandle(); arg_C1_0 = (num * 2478017156u ^ 2317219278u); continue; case 5u: this.Message = other.Message; arg_C1_0 = (num * 2925704472u ^ 3035999500u); continue; case 6u: arg_C1_0 = ((other.Message.Length == 0) ? 3854963524u : 3151335425u); continue; case 7u: arg_C1_0 = (((this.moduleHandle_ == null) ? 2739492028u : 3580182373u) ^ num * 554656167u); continue; case 8u: goto IL_18; } break; } return; IL_18: arg_C1_0 = 4024937404u; goto IL_BC; IL_101: arg_C1_0 = ((other.moduleHandle_ != null) ? 3292008923u : 4009164021u); goto IL_BC; } public void MergeFrom(CodedInputStream input) { while (true) { IL_150: uint num; uint arg_104_0 = ((num = input.ReadTag()) == 0u) ? 3240851680u : 3911203106u; while (true) { uint num2; switch ((num2 = (arg_104_0 ^ 3874519837u)) % 12u) { case 0u: goto IL_150; case 2u: input.ReadMessage(this.moduleHandle_); arg_104_0 = 2345928663u; continue; case 3u: this.moduleHandle_ = new ContentHandle(); arg_104_0 = (num2 * 1852460054u ^ 1869735793u); continue; case 4u: arg_104_0 = 3911203106u; continue; case 5u: arg_104_0 = (((num == 18u) ? 2278601351u : 3960444390u) ^ num2 * 2526387095u); continue; case 6u: arg_104_0 = (num2 * 942189939u ^ 2834218227u); continue; case 7u: arg_104_0 = ((num != 10u) ? 3643248240u : 3386124454u); continue; case 8u: input.SkipLastField(); arg_104_0 = (num2 * 2982677482u ^ 1373722523u); continue; case 9u: this.Message = input.ReadBytes(); arg_104_0 = 4154862669u; continue; case 10u: arg_104_0 = (num2 * 3716635894u ^ 2688044617u); continue; case 11u: arg_104_0 = ((this.moduleHandle_ == null) ? 2521825334u : 2740502211u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/TimestampReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class TimestampReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return TimestampReflection.descriptor; } } static TimestampReflection() { TimestampReflection.descriptor = FileDescriptor.FromGeneratedCode(TimestampReflection.smethod_1(TimestampReflection.smethod_0(new string[] { Module.smethod_34<string>(3623858696u), Module.smethod_34<string>(3998805144u), Module.smethod_33<string>(1036669444u), Module.smethod_36<string>(3823394062u), Module.smethod_33<string>(2207006083u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(TimestampReflection.smethod_2(typeof(Timestamp).TypeHandle), Timestamp.Parser, new string[] { Module.smethod_36<string>(2358247488u), Module.smethod_36<string>(2285904943u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.Account.V1/GetAccountStateResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetAccountStateResponse : IMessage<GetAccountStateResponse>, IEquatable<GetAccountStateResponse>, IDeepCloneable<GetAccountStateResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAccountStateResponse.__c __9 = new GetAccountStateResponse.__c(); internal GetAccountStateResponse cctor>b__29_0() { return new GetAccountStateResponse(); } } private static readonly MessageParser<GetAccountStateResponse> _parser = new MessageParser<GetAccountStateResponse>(new Func<GetAccountStateResponse>(GetAccountStateResponse.__c.__9.<.cctor>b__29_0)); public const int StateFieldNumber = 1; private AccountState state_; public const int TagsFieldNumber = 2; private AccountFieldTags tags_; public static MessageParser<GetAccountStateResponse> Parser { get { return GetAccountStateResponse._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[14]; } } MessageDescriptor IMessage.Descriptor { get { return GetAccountStateResponse.Descriptor; } } public AccountState State { get { return this.state_; } set { this.state_ = value; } } public AccountFieldTags Tags { get { return this.tags_; } set { this.tags_ = value; } } public GetAccountStateResponse() { } public GetAccountStateResponse(GetAccountStateResponse other) : this() { this.State = ((other.state_ != null) ? other.State.Clone() : null); this.Tags = ((other.tags_ != null) ? other.Tags.Clone() : null); } public GetAccountStateResponse Clone() { return new GetAccountStateResponse(this); } public override bool Equals(object other) { return this.Equals(other as GetAccountStateResponse); } public bool Equals(GetAccountStateResponse other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -1687552726) % 9) { case 0: return true; case 2: return false; case 3: goto IL_B5; case 4: return false; case 5: return false; case 6: goto IL_6D; case 7: arg_77_0 = ((!GetAccountStateResponse.smethod_0(this.Tags, other.Tags)) ? -233046160 : -305317679); continue; case 8: arg_77_0 = ((!GetAccountStateResponse.smethod_0(this.State, other.State)) ? -56909209 : -1851734415); continue; } break; } return true; IL_6D: arg_77_0 = -1111408515; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -827428232 : -1044642426); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_B2: uint arg_8E_0 = 1192141269u; while (true) { uint num2; switch ((num2 = (arg_8E_0 ^ 825847480u)) % 6u) { case 0u: goto IL_B2; case 1u: num ^= GetAccountStateResponse.smethod_1(this.State); arg_8E_0 = (num2 * 2630304918u ^ 729230510u); continue; case 2u: arg_8E_0 = ((this.tags_ == null) ? 1737483728u : 1804657041u); continue; case 3u: arg_8E_0 = (((this.state_ != null) ? 3277158962u : 2397436403u) ^ num2 * 566643607u); continue; case 5u: num ^= GetAccountStateResponse.smethod_1(this.Tags); arg_8E_0 = (num2 * 1791276164u ^ 3941941492u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.state_ != null) { goto IL_4C; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 1328244346u)) % 7u) { case 0u: output.WriteRawTag(18); arg_88_0 = (num * 3972944297u ^ 828451658u); continue; case 1u: output.WriteMessage(this.Tags); arg_88_0 = (num * 2224951266u ^ 941293645u); continue; case 2u: goto IL_BF; case 3u: goto IL_4C; case 4u: output.WriteMessage(this.State); arg_88_0 = (num * 1355784573u ^ 2313651708u); continue; case 6u: output.WriteRawTag(10); arg_88_0 = (num * 2869527048u ^ 1637614084u); continue; } break; } return; IL_4C: arg_88_0 = 1886400662u; goto IL_83; IL_BF: arg_88_0 = ((this.tags_ == null) ? 1124087951u : 1165490339u); goto IL_83; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 790206393u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 64087238u)) % 6u) { case 0u: goto IL_B6; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.State); arg_92_0 = (num2 * 3480751528u ^ 1570012290u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Tags); arg_92_0 = (num2 * 912821537u ^ 3561609765u); continue; case 3u: arg_92_0 = (((this.state_ != null) ? 555743008u : 1423926863u) ^ num2 * 2146729675u); continue; case 4u: arg_92_0 = ((this.tags_ != null) ? 1113776218u : 213147193u); continue; } return num; } } return num; } public void MergeFrom(GetAccountStateResponse other) { if (other == null) { goto IL_A0; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 970913399u)) % 11u) { case 0u: arg_105_0 = (((this.state_ != null) ? 1816053164u : 157240523u) ^ num * 3615220267u); continue; case 1u: return; case 2u: this.tags_ = new AccountFieldTags(); arg_105_0 = (num * 4078457186u ^ 2395646500u); continue; case 3u: goto IL_14D; case 4u: this.State.MergeFrom(other.State); arg_105_0 = 144421123u; continue; case 6u: goto IL_A0; case 7u: arg_105_0 = ((other.tags_ == null) ? 2017395288u : 921466645u); continue; case 8u: this.Tags.MergeFrom(other.Tags); arg_105_0 = 2017395288u; continue; case 9u: arg_105_0 = (((this.tags_ == null) ? 1773767056u : 1860118328u) ^ num * 254695015u); continue; case 10u: this.state_ = new AccountState(); arg_105_0 = (num * 3897954854u ^ 4212685177u); continue; } break; } return; IL_A0: arg_105_0 = 1793264017u; goto IL_100; IL_14D: arg_105_0 = ((other.state_ == null) ? 144421123u : 21849362u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) == 0u) ? 2551808155u : 2666383639u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 3701454866u)) % 14u) { case 0u: arg_145_0 = 2666383639u; continue; case 1u: arg_145_0 = (num2 * 199873194u ^ 2699360040u); continue; case 2u: arg_145_0 = ((this.state_ == null) ? 2674879392u : 2786218461u); continue; case 3u: input.ReadMessage(this.state_); arg_145_0 = 2576809839u; continue; case 4u: this.tags_ = new AccountFieldTags(); arg_145_0 = (num2 * 3931299784u ^ 2090356866u); continue; case 5u: arg_145_0 = ((this.tags_ == null) ? 3898931468u : 4114108914u); continue; case 6u: input.SkipLastField(); arg_145_0 = (num2 * 1359421668u ^ 848988169u); continue; case 7u: arg_145_0 = (((num != 18u) ? 2229604346u : 3520760637u) ^ num2 * 756836570u); continue; case 8u: this.state_ = new AccountState(); arg_145_0 = (num2 * 4281969333u ^ 3228152071u); continue; case 9u: arg_145_0 = ((num == 10u) ? 3802219304u : 3057195187u); continue; case 10u: goto IL_199; case 12u: input.ReadMessage(this.tags_); arg_145_0 = 2883582646u; continue; case 13u: arg_145_0 = (num2 * 3009794267u ^ 2676575577u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Misc/HttpCode.cs using System; namespace Framework.Misc { public enum HttpCode { OK = 200 } } <file_sep>/Bgs.Protocol.Account.V1/IdentityVerificationStatus.cs using System; namespace Bgs.Protocol.Account.V1 { public enum IdentityVerificationStatus { IDENT_NO_DATA, IDENT_PENDING, IDENT_FAILED = 4, IDENT_SUCCESS, IDENT_SUCC_MNL, IDENT_UNKNOWN } } <file_sep>/Bgs.Protocol.Channel.V1/MemberRemovedNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class MemberRemovedNotification : IMessage<MemberRemovedNotification>, IEquatable<MemberRemovedNotification>, IDeepCloneable<MemberRemovedNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MemberRemovedNotification.__c __9 = new MemberRemovedNotification.__c(); internal MemberRemovedNotification cctor>b__44_0() { return new MemberRemovedNotification(); } } private static readonly MessageParser<MemberRemovedNotification> _parser = new MessageParser<MemberRemovedNotification>(new Func<MemberRemovedNotification>(MemberRemovedNotification.__c.__9.<.cctor>b__44_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MemberIdFieldNumber = 2; private EntityId memberId_; public const int ReasonFieldNumber = 3; private uint reason_; public const int ChannelIdFieldNumber = 4; private ChannelId channelId_; public const int SubscriberFieldNumber = 5; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<MemberRemovedNotification> Parser { get { return MemberRemovedNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return MemberRemovedNotification.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId MemberId { get { return this.memberId_; } set { this.memberId_ = value; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public MemberRemovedNotification() { } public MemberRemovedNotification(MemberRemovedNotification other) : this() { while (true) { IL_D2: uint arg_AE_0 = 2504272384u; while (true) { uint num; switch ((num = (arg_AE_0 ^ 3770397819u)) % 6u) { case 0u: this.reason_ = other.reason_; arg_AE_0 = (num * 327395331u ^ 557669525u); continue; case 1u: this.MemberId = ((other.memberId_ != null) ? other.MemberId.Clone() : null); arg_AE_0 = 2873140595u; continue; case 2u: this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); arg_AE_0 = 2789885817u; continue; case 3u: goto IL_D2; case 5u: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_AE_0 = 3112303738u; continue; } return; } } } public MemberRemovedNotification Clone() { return new MemberRemovedNotification(this); } public override bool Equals(object other) { return this.Equals(other as MemberRemovedNotification); } public bool Equals(MemberRemovedNotification other) { if (other == null) { goto IL_F8; } goto IL_158; int arg_102_0; while (true) { IL_FD: switch ((arg_102_0 ^ 1522280374) % 15) { case 0: goto IL_F8; case 1: arg_102_0 = ((!MemberRemovedNotification.smethod_0(this.AgentId, other.AgentId)) ? 1061705716 : 107823115); continue; case 2: arg_102_0 = ((!MemberRemovedNotification.smethod_0(this.Subscriber, other.Subscriber)) ? 958227093 : 232387758); continue; case 4: return false; case 5: return false; case 6: return true; case 7: return false; case 8: arg_102_0 = ((!MemberRemovedNotification.smethod_0(this.MemberId, other.MemberId)) ? 1934098534 : 889591628); continue; case 9: goto IL_158; case 10: arg_102_0 = ((this.Reason == other.Reason) ? 284618078 : 789803828); continue; case 11: return false; case 12: arg_102_0 = ((!MemberRemovedNotification.smethod_0(this.ChannelId, other.ChannelId)) ? 93923933 : 235616317); continue; case 13: return false; case 14: return false; } break; } return true; IL_F8: arg_102_0 = 361346480; goto IL_FD; IL_158: arg_102_0 = ((other != this) ? 245292449 : 1521011635); goto IL_FD; } public override int GetHashCode() { int num = 1; while (true) { IL_15C: uint arg_127_0 = 3014014675u; while (true) { uint num2; switch ((num2 = (arg_127_0 ^ 3990723824u)) % 10u) { case 0u: num ^= MemberRemovedNotification.smethod_1(this.AgentId); arg_127_0 = (num2 * 3263203318u ^ 3195585113u); continue; case 1u: arg_127_0 = ((this.channelId_ == null) ? 4174843671u : 3018631727u); continue; case 2u: num ^= this.Reason.GetHashCode(); arg_127_0 = (num2 * 1197124972u ^ 1828065023u); continue; case 3u: num ^= MemberRemovedNotification.smethod_1(this.MemberId); arg_127_0 = ((this.Reason != 0u) ? 2276400802u : 3049417319u); continue; case 4u: goto IL_15C; case 5u: num ^= this.ChannelId.GetHashCode(); arg_127_0 = (num2 * 4109373220u ^ 3873818443u); continue; case 6u: num ^= this.Subscriber.GetHashCode(); arg_127_0 = (num2 * 1964828135u ^ 748585832u); continue; case 7u: arg_127_0 = (((this.agentId_ != null) ? 3063267493u : 2590540910u) ^ num2 * 3058504881u); continue; case 9u: arg_127_0 = ((this.subscriber_ != null) ? 3713950918u : 2224801234u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_45; } goto IL_1B0; uint arg_16B_0; while (true) { IL_166: uint num; switch ((num = (arg_16B_0 ^ 3279305448u)) % 14u) { case 0u: output.WriteRawTag(42); arg_16B_0 = (num * 2400961921u ^ 2857604568u); continue; case 1u: goto IL_1B0; case 2u: output.WriteMessage(this.MemberId); arg_16B_0 = (num * 3502027523u ^ 3624806527u); continue; case 3u: output.WriteMessage(this.AgentId); arg_16B_0 = (num * 170854364u ^ 2283596435u); continue; case 4u: arg_16B_0 = ((this.subscriber_ == null) ? 4001468008u : 2331108190u); continue; case 5u: arg_16B_0 = (((this.Reason == 0u) ? 3058078898u : 3803936442u) ^ num * 2001056607u); continue; case 6u: output.WriteMessage(this.Subscriber); arg_16B_0 = (num * 4175127420u ^ 629690496u); continue; case 7u: output.WriteRawTag(34); output.WriteMessage(this.ChannelId); arg_16B_0 = (num * 601385855u ^ 374398609u); continue; case 9u: arg_16B_0 = ((this.channelId_ == null) ? 2847606794u : 4209862669u); continue; case 10u: output.WriteRawTag(10); arg_16B_0 = (num * 2663712724u ^ 761397771u); continue; case 11u: goto IL_45; case 12u: output.WriteUInt32(this.Reason); arg_16B_0 = (num * 4098222369u ^ 2898264875u); continue; case 13u: output.WriteRawTag(24); arg_16B_0 = (num * 3763786899u ^ 2884136961u); continue; } break; } return; IL_45: arg_16B_0 = 4225435054u; goto IL_166; IL_1B0: output.WriteRawTag(18); arg_16B_0 = 2348254220u; goto IL_166; } public int CalculateSize() { int num = 0; while (true) { IL_179: uint arg_140_0 = 1655425227u; while (true) { uint num2; switch ((num2 = (arg_140_0 ^ 389503796u)) % 11u) { case 0u: goto IL_179; case 1u: arg_140_0 = (((this.agentId_ != null) ? 3086249054u : 3730191658u) ^ num2 * 3186913476u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_140_0 = (num2 * 1711231218u ^ 3673451354u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_140_0 = (num2 * 2570103633u ^ 2069187624u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_140_0 = (num2 * 2249533756u ^ 2649742037u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.MemberId); arg_140_0 = 805743583u; continue; case 7u: arg_140_0 = (((this.Reason == 0u) ? 1297292551u : 1704918555u) ^ num2 * 3754888333u); continue; case 8u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_140_0 = (num2 * 1658280204u ^ 70004757u); continue; case 9u: arg_140_0 = ((this.channelId_ == null) ? 1913039965u : 1285479346u); continue; case 10u: arg_140_0 = ((this.subscriber_ != null) ? 1661786790u : 1329797869u); continue; } return num; } } return num; } public void MergeFrom(MemberRemovedNotification other) { if (other == null) { goto IL_1DF; } goto IL_2C4; uint arg_254_0; while (true) { IL_24F: uint num; switch ((num = (arg_254_0 ^ 260824695u)) % 21u) { case 0u: this.MemberId.MergeFrom(other.MemberId); arg_254_0 = 1297981803u; continue; case 1u: arg_254_0 = ((other.subscriber_ == null) ? 2106276739u : 1218851798u); continue; case 2u: goto IL_2C4; case 3u: this.agentId_ = new EntityId(); arg_254_0 = (num * 407575369u ^ 2462956544u); continue; case 4u: this.ChannelId.MergeFrom(other.ChannelId); arg_254_0 = 1285890174u; continue; case 5u: goto IL_1DF; case 6u: arg_254_0 = (((this.channelId_ == null) ? 1281702833u : 225400893u) ^ num * 4241968528u); continue; case 7u: this.channelId_ = new ChannelId(); arg_254_0 = (num * 4061626318u ^ 127807577u); continue; case 8u: this.Reason = other.Reason; arg_254_0 = (num * 3550527524u ^ 1795425076u); continue; case 9u: arg_254_0 = ((other.memberId_ == null) ? 1297981803u : 640693915u); continue; case 10u: arg_254_0 = (((this.subscriber_ == null) ? 730577020u : 1127617455u) ^ num * 1440280998u); continue; case 11u: arg_254_0 = (((this.agentId_ == null) ? 2774122336u : 3682623687u) ^ num * 1641247371u); continue; case 12u: this.memberId_ = new EntityId(); arg_254_0 = (num * 1067174194u ^ 3320396879u); continue; case 13u: this.AgentId.MergeFrom(other.AgentId); arg_254_0 = 1361379246u; continue; case 15u: arg_254_0 = ((other.Reason != 0u) ? 2072200785u : 1175840364u); continue; case 16u: this.Subscriber.MergeFrom(other.Subscriber); arg_254_0 = 2106276739u; continue; case 17u: arg_254_0 = ((other.channelId_ != null) ? 1438487218u : 1285890174u); continue; case 18u: arg_254_0 = (((this.memberId_ != null) ? 2554877447u : 2455242091u) ^ num * 3202540364u); continue; case 19u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_254_0 = (num * 1154171792u ^ 433709209u); continue; case 20u: return; } break; } return; IL_1DF: arg_254_0 = 1245520607u; goto IL_24F; IL_2C4: arg_254_0 = ((other.agentId_ == null) ? 1361379246u : 1563237428u); goto IL_24F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_336: uint num; uint arg_2B2_0 = ((num = input.ReadTag()) == 0u) ? 3450627796u : 3407350645u; while (true) { uint num2; switch ((num2 = (arg_2B2_0 ^ 2440066659u)) % 26u) { case 0u: arg_2B2_0 = ((this.memberId_ != null) ? 3004692867u : 2783210342u); continue; case 1u: arg_2B2_0 = ((this.channelId_ == null) ? 2925942482u : 2371999662u); continue; case 2u: arg_2B2_0 = ((num > 18u) ? 4128773144u : 2726264325u); continue; case 3u: arg_2B2_0 = ((num == 24u) ? 4227609601u : 3310828511u); continue; case 4u: input.ReadMessage(this.agentId_); arg_2B2_0 = 2843532596u; continue; case 5u: arg_2B2_0 = ((this.agentId_ == null) ? 2149782884u : 4201311749u); continue; case 6u: arg_2B2_0 = (((num == 18u) ? 2635557481u : 3999046745u) ^ num2 * 129880019u); continue; case 7u: this.agentId_ = new EntityId(); arg_2B2_0 = (num2 * 180623919u ^ 1205013068u); continue; case 8u: input.ReadMessage(this.memberId_); arg_2B2_0 = 2321041102u; continue; case 9u: this.channelId_ = new ChannelId(); arg_2B2_0 = (num2 * 3720862469u ^ 3533494747u); continue; case 10u: arg_2B2_0 = (((num == 10u) ? 55111916u : 1188276849u) ^ num2 * 1829712379u); continue; case 11u: goto IL_336; case 12u: input.SkipLastField(); arg_2B2_0 = 2321041102u; continue; case 14u: arg_2B2_0 = (num2 * 935950610u ^ 997021277u); continue; case 15u: arg_2B2_0 = (num2 * 3156516006u ^ 2256820388u); continue; case 16u: arg_2B2_0 = (((num != 34u) ? 2811026285u : 3023789280u) ^ num2 * 2201127861u); continue; case 17u: input.ReadMessage(this.channelId_); arg_2B2_0 = 2321041102u; continue; case 18u: arg_2B2_0 = (((num != 42u) ? 4127676379u : 2679667509u) ^ num2 * 1826657961u); continue; case 19u: input.ReadMessage(this.subscriber_); arg_2B2_0 = 2321041102u; continue; case 20u: arg_2B2_0 = ((this.subscriber_ != null) ? 3450151862u : 2546955826u); continue; case 21u: this.memberId_ = new EntityId(); arg_2B2_0 = (num2 * 538845782u ^ 4012216365u); continue; case 22u: this.Reason = input.ReadUInt32(); arg_2B2_0 = 4186814347u; continue; case 23u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_2B2_0 = (num2 * 426519665u ^ 338439287u); continue; case 24u: arg_2B2_0 = (num2 * 3473672916u ^ 13624046u); continue; case 25u: arg_2B2_0 = 3407350645u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GetAuthorizedDataRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetAuthorizedDataRequest : IMessage<GetAuthorizedDataRequest>, IEquatable<GetAuthorizedDataRequest>, IDeepCloneable<GetAuthorizedDataRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetAuthorizedDataRequest.__c __9 = new GetAuthorizedDataRequest.__c(); internal GetAuthorizedDataRequest cctor>b__34_0() { return new GetAuthorizedDataRequest(); } } private static readonly MessageParser<GetAuthorizedDataRequest> _parser = new MessageParser<GetAuthorizedDataRequest>(new Func<GetAuthorizedDataRequest>(GetAuthorizedDataRequest.__c.__9.<.cctor>b__34_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public const int TagFieldNumber = 2; private static readonly FieldCodec<string> _repeated_tag_codec = FieldCodec.ForString(18u); private readonly RepeatedField<string> tag_ = new RepeatedField<string>(); public const int PrivilegedNetworkFieldNumber = 3; private bool privilegedNetwork_; public static MessageParser<GetAuthorizedDataRequest> Parser { get { return GetAuthorizedDataRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[26]; } } MessageDescriptor IMessage.Descriptor { get { return GetAuthorizedDataRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public RepeatedField<string> Tag { get { return this.tag_; } } public bool PrivilegedNetwork { get { return this.privilegedNetwork_; } set { this.privilegedNetwork_ = value; } } public GetAuthorizedDataRequest() { } public GetAuthorizedDataRequest(GetAuthorizedDataRequest other) : this() { while (true) { IL_44: int arg_2E_0 = 411880156; while (true) { switch ((arg_2E_0 ^ 253295107) % 3) { case 0: goto IL_44; case 1: this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); arg_2E_0 = 64999162; continue; } goto Block_2; } } Block_2: this.tag_ = other.tag_.Clone(); this.privilegedNetwork_ = other.privilegedNetwork_; } public GetAuthorizedDataRequest Clone() { return new GetAuthorizedDataRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetAuthorizedDataRequest); } public bool Equals(GetAuthorizedDataRequest other) { if (other == null) { goto IL_18; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ 1049770579) % 11) { case 0: arg_A1_0 = ((!this.tag_.Equals(other.tag_)) ? 1866995938 : 1359098599); continue; case 1: return false; case 3: return false; case 4: arg_A1_0 = (GetAuthorizedDataRequest.smethod_0(this.EntityId, other.EntityId) ? 1904281011 : 2050886190); continue; case 5: return false; case 6: return false; case 7: goto IL_E7; case 8: return true; case 9: arg_A1_0 = ((this.PrivilegedNetwork != other.PrivilegedNetwork) ? 2015332713 : 683295574); continue; case 10: goto IL_18; } break; } return true; IL_18: arg_A1_0 = 97895365; goto IL_9C; IL_E7: arg_A1_0 = ((other == this) ? 59884591 : 304797678); goto IL_9C; } public override int GetHashCode() { int num = 1; while (true) { IL_D6: uint arg_AE_0 = 1676625961u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 813048434u)) % 7u) { case 1u: arg_AE_0 = (((this.entityId_ == null) ? 4069462313u : 3002962258u) ^ num2 * 2827610088u); continue; case 2u: goto IL_D6; case 3u: num ^= GetAuthorizedDataRequest.smethod_1(this.EntityId); arg_AE_0 = (num2 * 3926748413u ^ 3673390249u); continue; case 4u: num ^= this.PrivilegedNetwork.GetHashCode(); arg_AE_0 = (num2 * 2542054564u ^ 1361671118u); continue; case 5u: num ^= GetAuthorizedDataRequest.smethod_1(this.tag_); arg_AE_0 = 418574998u; continue; case 6u: arg_AE_0 = ((this.PrivilegedNetwork ? 1760644900u : 688735890u) ^ num2 * 844869613u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.entityId_ != null) { goto IL_0B; } goto IL_D1; uint arg_A5_0; while (true) { IL_A0: uint num; switch ((num = (arg_A5_0 ^ 2183881433u)) % 8u) { case 0u: arg_A5_0 = (((!this.PrivilegedNetwork) ? 238862922u : 1288727080u) ^ num * 3447973964u); continue; case 1u: output.WriteRawTag(24); arg_A5_0 = (num * 2681821802u ^ 1195759663u); continue; case 2u: output.WriteMessage(this.EntityId); arg_A5_0 = (num * 2079688325u ^ 1180763132u); continue; case 4u: output.WriteBool(this.PrivilegedNetwork); arg_A5_0 = (num * 2647748961u ^ 548420886u); continue; case 5u: output.WriteRawTag(10); arg_A5_0 = (num * 1672041261u ^ 163994066u); continue; case 6u: goto IL_0B; case 7u: goto IL_D1; } break; } return; IL_0B: arg_A5_0 = 4042311692u; goto IL_A0; IL_D1: this.tag_.WriteTo(output, GetAuthorizedDataRequest._repeated_tag_codec); arg_A5_0 = 3305042913u; goto IL_A0; } public int CalculateSize() { int num = 0; if (this.entityId_ != null) { goto IL_0D; } goto IL_96; uint arg_72_0; while (true) { IL_6D: uint num2; switch ((num2 = (arg_72_0 ^ 1429821198u)) % 6u) { case 1u: num += 2; arg_72_0 = (num2 * 3899569780u ^ 765317886u); continue; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_72_0 = (num2 * 1808153319u ^ 3566691338u); continue; case 3u: arg_72_0 = ((this.PrivilegedNetwork ? 167672933u : 1376372942u) ^ num2 * 4123531628u); continue; case 4u: goto IL_96; case 5u: goto IL_0D; } break; } return num; IL_0D: arg_72_0 = 346699230u; goto IL_6D; IL_96: num += this.tag_.CalculateSize(GetAuthorizedDataRequest._repeated_tag_codec); arg_72_0 = 1572702427u; goto IL_6D; } public void MergeFrom(GetAuthorizedDataRequest other) { if (other == null) { goto IL_5C; } goto IL_120; uint arg_DC_0; while (true) { IL_D7: uint num; switch ((num = (arg_DC_0 ^ 2101225724u)) % 10u) { case 0u: this.EntityId.MergeFrom(other.EntityId); arg_DC_0 = 1675355494u; continue; case 1u: arg_DC_0 = (((this.entityId_ != null) ? 1233190537u : 770094727u) ^ num * 948408821u); continue; case 2u: this.entityId_ = new EntityId(); arg_DC_0 = (num * 4226767462u ^ 2781405726u); continue; case 3u: return; case 4u: this.PrivilegedNetwork = other.PrivilegedNetwork; arg_DC_0 = (num * 8702870u ^ 1316778094u); continue; case 5u: goto IL_120; case 7u: goto IL_5C; case 8u: this.tag_.Add(other.tag_); arg_DC_0 = 204656187u; continue; case 9u: arg_DC_0 = (((!other.PrivilegedNetwork) ? 1924101121u : 65655571u) ^ num * 594608665u); continue; } break; } return; IL_5C: arg_DC_0 = 1899230793u; goto IL_D7; IL_120: arg_DC_0 = ((other.entityId_ != null) ? 4675503u : 1675355494u); goto IL_D7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) == 0u) ? 2149067814u : 3881170608u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 3041056606u)) % 14u) { case 0u: arg_145_0 = 3881170608u; continue; case 1u: this.PrivilegedNetwork = input.ReadBool(); arg_145_0 = 3652740355u; continue; case 2u: arg_145_0 = (num2 * 1567258661u ^ 2425374199u); continue; case 3u: input.ReadMessage(this.entityId_); arg_145_0 = 3282532292u; continue; case 4u: arg_145_0 = (((num != 24u) ? 935152125u : 414101071u) ^ num2 * 1958717415u); continue; case 5u: this.entityId_ = new EntityId(); arg_145_0 = (num2 * 1121040908u ^ 2755985661u); continue; case 7u: input.SkipLastField(); arg_145_0 = (num2 * 924377564u ^ 2262142006u); continue; case 8u: arg_145_0 = ((num != 10u) ? 3138347249u : 3086822283u); continue; case 9u: arg_145_0 = ((this.entityId_ != null) ? 2226119377u : 3848157191u); continue; case 10u: this.tag_.AddEntriesFrom(input, GetAuthorizedDataRequest._repeated_tag_codec); arg_145_0 = 3652740355u; continue; case 11u: arg_145_0 = (((num != 18u) ? 1524515635u : 881449773u) ^ num2 * 474276569u); continue; case 12u: arg_145_0 = (num2 * 1722097871u ^ 1857714565u); continue; case 13u: goto IL_199; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/UnsubscribeMemberRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class UnsubscribeMemberRequest : IMessage<UnsubscribeMemberRequest>, IEquatable<UnsubscribeMemberRequest>, IDeepCloneable<UnsubscribeMemberRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UnsubscribeMemberRequest.__c __9 = new UnsubscribeMemberRequest.__c(); internal UnsubscribeMemberRequest cctor>b__29_0() { return new UnsubscribeMemberRequest(); } } private static readonly MessageParser<UnsubscribeMemberRequest> _parser = new MessageParser<UnsubscribeMemberRequest>(new Func<UnsubscribeMemberRequest>(UnsubscribeMemberRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int MemberIdFieldNumber = 2; private EntityId memberId_; public static MessageParser<UnsubscribeMemberRequest> Parser { get { return UnsubscribeMemberRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return UnsubscribeMemberRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId MemberId { get { return this.memberId_; } set { this.memberId_ = value; } } public UnsubscribeMemberRequest() { } public UnsubscribeMemberRequest(UnsubscribeMemberRequest other) : this() { while (true) { IL_60: int arg_4A_0 = 927234250; while (true) { switch ((arg_4A_0 ^ 1296988755) % 3) { case 0: goto IL_60; case 2: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.MemberId = ((other.memberId_ != null) ? other.MemberId.Clone() : null); arg_4A_0 = 1183172801; continue; } return; } } } public UnsubscribeMemberRequest Clone() { return new UnsubscribeMemberRequest(this); } public override bool Equals(object other) { return this.Equals(other as UnsubscribeMemberRequest); } public bool Equals(UnsubscribeMemberRequest other) { if (other == null) { goto IL_41; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -167940682) % 9) { case 0: goto IL_B5; case 1: return false; case 2: return false; case 3: arg_77_0 = (UnsubscribeMemberRequest.smethod_0(this.MemberId, other.MemberId) ? -1143885313 : -1557719991); continue; case 4: return true; case 5: goto IL_41; case 6: return false; case 8: arg_77_0 = (UnsubscribeMemberRequest.smethod_0(this.AgentId, other.AgentId) ? -1712009215 : -478247914); continue; } break; } return true; IL_41: arg_77_0 = -1854773971; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? -1910488493 : -1040158353); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_0A; } goto IL_4D; uint arg_31_0; while (true) { IL_2C: uint num2; switch ((num2 = (arg_31_0 ^ 2008617987u)) % 4u) { case 1u: num ^= UnsubscribeMemberRequest.smethod_1(this.AgentId); arg_31_0 = (num2 * 3801673916u ^ 1021183549u); continue; case 2u: goto IL_4D; case 3u: goto IL_0A; } break; } return num; IL_0A: arg_31_0 = 459383774u; goto IL_2C; IL_4D: num ^= UnsubscribeMemberRequest.smethod_1(this.MemberId); arg_31_0 = 1520428503u; goto IL_2C; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_08; } goto IL_70; uint arg_50_0; while (true) { IL_4B: uint num; switch ((num = (arg_50_0 ^ 2730290041u)) % 5u) { case 1u: goto IL_70; case 2u: output.WriteMessage(this.MemberId); arg_50_0 = (num * 1364834161u ^ 448406429u); continue; case 3u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_50_0 = (num * 1402643247u ^ 3570306290u); continue; case 4u: goto IL_08; } break; } return; IL_08: arg_50_0 = 2779991768u; goto IL_4B; IL_70: output.WriteRawTag(18); arg_50_0 = 2510420361u; goto IL_4B; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { while (true) { IL_46: uint arg_2E_0 = 4155351295u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 3627325577u)) % 3u) { case 0u: goto IL_46; case 2u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_2E_0 = (num2 * 178729500u ^ 683332688u); continue; } goto Block_2; } } Block_2:; } return num + (1 + CodedOutputStream.ComputeMessageSize(this.MemberId)); } public void MergeFrom(UnsubscribeMemberRequest other) { if (other == null) { goto IL_C6; } goto IL_14A; uint arg_102_0; while (true) { IL_FD: uint num; switch ((num = (arg_102_0 ^ 736849994u)) % 11u) { case 0u: this.MemberId.MergeFrom(other.MemberId); arg_102_0 = 1494610465u; continue; case 1u: this.agentId_ = new EntityId(); arg_102_0 = (num * 322099242u ^ 2406101210u); continue; case 2u: return; case 3u: goto IL_C6; case 4u: this.AgentId.MergeFrom(other.AgentId); arg_102_0 = 1789680115u; continue; case 5u: arg_102_0 = (((this.memberId_ == null) ? 2815840589u : 3423585763u) ^ num * 1677484102u); continue; case 6u: goto IL_14A; case 7u: arg_102_0 = ((other.memberId_ != null) ? 1764684826u : 1494610465u); continue; case 8u: this.memberId_ = new EntityId(); arg_102_0 = (num * 2648341358u ^ 3331022913u); continue; case 10u: arg_102_0 = (((this.agentId_ == null) ? 2092300854u : 2124800224u) ^ num * 2149964762u); continue; } break; } return; IL_C6: arg_102_0 = 1420114060u; goto IL_FD; IL_14A: arg_102_0 = ((other.agentId_ == null) ? 1789680115u : 1823781193u); goto IL_FD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_19C: uint num; uint arg_148_0 = ((num = input.ReadTag()) != 0u) ? 4032039184u : 3257110963u; while (true) { uint num2; switch ((num2 = (arg_148_0 ^ 3556166456u)) % 14u) { case 0u: goto IL_19C; case 1u: this.memberId_ = new EntityId(); arg_148_0 = (num2 * 3816633015u ^ 1976673646u); continue; case 2u: input.ReadMessage(this.agentId_); arg_148_0 = 2839644897u; continue; case 3u: this.agentId_ = new EntityId(); arg_148_0 = (num2 * 2112691217u ^ 2987813055u); continue; case 4u: arg_148_0 = ((this.memberId_ == null) ? 4170964641u : 4197906225u); continue; case 5u: arg_148_0 = ((this.agentId_ != null) ? 2802879180u : 3619103099u); continue; case 6u: arg_148_0 = ((num != 10u) ? 2264490788u : 3622954537u); continue; case 7u: arg_148_0 = (num2 * 3073349746u ^ 503761842u); continue; case 8u: input.SkipLastField(); arg_148_0 = (num2 * 2788732171u ^ 4115953975u); continue; case 9u: input.ReadMessage(this.memberId_); arg_148_0 = 4089805472u; continue; case 10u: arg_148_0 = (((num == 18u) ? 399208752u : 1796363182u) ^ num2 * 4205383733u); continue; case 12u: arg_148_0 = 4032039184u; continue; case 13u: arg_148_0 = (num2 * 3165721795u ^ 1577084651u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Constants/UpdateFlag.cs using System; namespace Framework.Constants { [Flags] public enum UpdateFlag { Self = 1, Alive = 2, Rotation = 4, StationaryPosition = 8, Target = 16, Transport = 32, GoTransportPosition = 64, AnimKits = 128, Vehicle = 256 } } <file_sep>/Google.Protobuf/DescriptorProto.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class DescriptorProto : IMessage<DescriptorProto>, IEquatable<DescriptorProto>, IDeepCloneable<DescriptorProto>, IMessage { [DebuggerNonUserCode] public static class Types { [DebuggerNonUserCode] internal sealed class ExtensionRange : IMessage<DescriptorProto.Types.ExtensionRange>, IEquatable<DescriptorProto.Types.ExtensionRange>, IDeepCloneable<DescriptorProto.Types.ExtensionRange>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DescriptorProto.Types.ExtensionRange.__c __9 = new DescriptorProto.Types.ExtensionRange.__c(); internal DescriptorProto.Types.ExtensionRange cctor>b__29_0() { return new DescriptorProto.Types.ExtensionRange(); } } private static readonly MessageParser<DescriptorProto.Types.ExtensionRange> _parser = new MessageParser<DescriptorProto.Types.ExtensionRange>(new Func<DescriptorProto.Types.ExtensionRange>(DescriptorProto.Types.ExtensionRange.__c.__9.<.cctor>b__29_0)); public const int StartFieldNumber = 1; private int start_; public const int EndFieldNumber = 2; private int end_; public static MessageParser<DescriptorProto.Types.ExtensionRange> Parser { get { return DescriptorProto.Types.ExtensionRange._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorProto.Descriptor.NestedTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return DescriptorProto.Types.ExtensionRange.Descriptor; } } public int Start { get { return this.start_; } set { this.start_ = value; } } public int End { get { return this.end_; } set { this.end_ = value; } } public ExtensionRange() { } public ExtensionRange(DescriptorProto.Types.ExtensionRange other) : this() { while (true) { IL_4A: uint arg_32_0 = 3580077551u; while (true) { uint num; switch ((num = (arg_32_0 ^ 3312480114u)) % 3u) { case 1u: this.start_ = other.start_; this.end_ = other.end_; arg_32_0 = (num * 1984968941u ^ 1916133270u); continue; case 2u: goto IL_4A; } return; } } } public DescriptorProto.Types.ExtensionRange Clone() { return new DescriptorProto.Types.ExtensionRange(this); } public override bool Equals(object other) { return this.Equals(other as DescriptorProto.Types.ExtensionRange); } public bool Equals(DescriptorProto.Types.ExtensionRange other) { if (other == null) { goto IL_63; } goto IL_AB; int arg_6D_0; while (true) { IL_68: switch ((arg_6D_0 ^ -820746025) % 9) { case 0: goto IL_AB; case 1: return false; case 2: goto IL_63; case 3: return false; case 4: arg_6D_0 = ((this.End != other.End) ? -2146257056 : -925492087); continue; case 5: return true; case 7: arg_6D_0 = ((this.Start != other.Start) ? -1885684364 : -555266228); continue; case 8: return false; } break; } return true; IL_63: arg_6D_0 = -1725424017; goto IL_68; IL_AB: arg_6D_0 = ((other != this) ? -2086901594 : -844595038); goto IL_68; } public override int GetHashCode() { int num = 1; while (true) { IL_B8: uint arg_94_0 = 2780518959u; while (true) { uint num2; switch ((num2 = (arg_94_0 ^ 3191626884u)) % 6u) { case 0u: goto IL_B8; case 1u: num ^= this.Start.GetHashCode(); arg_94_0 = (num2 * 3585920570u ^ 1697210827u); continue; case 3u: arg_94_0 = (((this.Start == 0) ? 1953183978u : 2063074806u) ^ num2 * 2669491809u); continue; case 4u: num ^= this.End.GetHashCode(); arg_94_0 = (num2 * 1056975766u ^ 3249388444u); continue; case 5u: arg_94_0 = ((this.End == 0) ? 3688196304u : 3319735478u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Start != 0) { goto IL_4C; } goto IL_BE; uint arg_87_0; while (true) { IL_82: uint num; switch ((num = (arg_87_0 ^ 2558673973u)) % 7u) { case 0u: output.WriteInt32(this.End); arg_87_0 = (num * 1078497601u ^ 1175681491u); continue; case 1u: output.WriteRawTag(8); arg_87_0 = (num * 4244478541u ^ 2774833388u); continue; case 2u: goto IL_4C; case 3u: output.WriteInt32(this.Start); arg_87_0 = (num * 4044301929u ^ 1626924624u); continue; case 4u: goto IL_BE; case 5u: output.WriteRawTag(16); arg_87_0 = (num * 3296568415u ^ 3865425179u); continue; } break; } return; IL_4C: arg_87_0 = 3640988978u; goto IL_82; IL_BE: arg_87_0 = ((this.End == 0) ? 4091317099u : 2946072095u); goto IL_82; } public int CalculateSize() { int num = 0; if (this.Start != 0) { goto IL_5A; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 2294297653u)) % 5u) { case 0u: goto IL_5A; case 1u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Start); arg_64_0 = (num2 * 2965579311u ^ 3280985325u); continue; case 3u: num += 1 + CodedOutputStream.ComputeInt32Size(this.End); arg_64_0 = (num2 * 1126898946u ^ 1656968638u); continue; case 4u: goto IL_90; } break; } return num; IL_5A: arg_64_0 = 3483054291u; goto IL_5F; IL_90: arg_64_0 = ((this.End == 0) ? 3136078798u : 4250872589u); goto IL_5F; } public void MergeFrom(DescriptorProto.Types.ExtensionRange other) { if (other == null) { goto IL_51; } goto IL_AD; uint arg_76_0; while (true) { IL_71: uint num; switch ((num = (arg_76_0 ^ 257236096u)) % 7u) { case 1u: return; case 2u: goto IL_AD; case 3u: this.End = other.End; arg_76_0 = (num * 3476656831u ^ 4046810049u); continue; case 4u: goto IL_51; case 5u: this.Start = other.Start; arg_76_0 = (num * 1047509236u ^ 2053535008u); continue; case 6u: arg_76_0 = ((other.End != 0) ? 1588774565u : 580169818u); continue; } break; } return; IL_51: arg_76_0 = 1835440376u; goto IL_71; IL_AD: arg_76_0 = ((other.Start == 0) ? 241999244u : 1284826119u); goto IL_71; } public void MergeFrom(CodedInputStream input) { while (true) { IL_D9: uint num; uint arg_9E_0 = ((num = input.ReadTag()) != 0u) ? 123760098u : 340881777u; while (true) { uint num2; switch ((num2 = (arg_9E_0 ^ 2069247364u)) % 8u) { case 0u: input.SkipLastField(); arg_9E_0 = (num2 * 3109966835u ^ 1634015013u); continue; case 1u: goto IL_D9; case 2u: this.End = input.ReadInt32(); arg_9E_0 = 651504541u; continue; case 3u: this.Start = input.ReadInt32(); arg_9E_0 = 651504541u; continue; case 4u: arg_9E_0 = (((num == 16u) ? 3653100894u : 3502071340u) ^ num2 * 176730384u); continue; case 6u: arg_9E_0 = ((num != 8u) ? 730284952u : 1349205327u); continue; case 7u: arg_9E_0 = 123760098u; continue; } return; } } } } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly DescriptorProto.__c __9 = new DescriptorProto.__c(); internal DescriptorProto cctor>b__60_0() { return new DescriptorProto(); } } private static readonly MessageParser<DescriptorProto> _parser = new MessageParser<DescriptorProto>(new Func<DescriptorProto>(DescriptorProto.__c.__9.<.cctor>b__60_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int FieldFieldNumber = 2; private static readonly FieldCodec<FieldDescriptorProto> _repeated_field_codec; private readonly RepeatedField<FieldDescriptorProto> field_ = new RepeatedField<FieldDescriptorProto>(); public const int ExtensionFieldNumber = 6; private static readonly FieldCodec<FieldDescriptorProto> _repeated_extension_codec; private readonly RepeatedField<FieldDescriptorProto> extension_ = new RepeatedField<FieldDescriptorProto>(); public const int NestedTypeFieldNumber = 3; private static readonly FieldCodec<DescriptorProto> _repeated_nestedType_codec; private readonly RepeatedField<DescriptorProto> nestedType_ = new RepeatedField<DescriptorProto>(); public const int EnumTypeFieldNumber = 4; private static readonly FieldCodec<EnumDescriptorProto> _repeated_enumType_codec; private readonly RepeatedField<EnumDescriptorProto> enumType_ = new RepeatedField<EnumDescriptorProto>(); public const int ExtensionRangeFieldNumber = 5; private static readonly FieldCodec<DescriptorProto.Types.ExtensionRange> _repeated_extensionRange_codec; private readonly RepeatedField<DescriptorProto.Types.ExtensionRange> extensionRange_ = new RepeatedField<DescriptorProto.Types.ExtensionRange>(); public const int OneofDeclFieldNumber = 8; private static readonly FieldCodec<OneofDescriptorProto> _repeated_oneofDecl_codec; private readonly RepeatedField<OneofDescriptorProto> oneofDecl_ = new RepeatedField<OneofDescriptorProto>(); public const int OptionsFieldNumber = 7; private MessageOptions options_; public static MessageParser<DescriptorProto> Parser { get { return DescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return DescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public RepeatedField<FieldDescriptorProto> Field { get { return this.field_; } } public RepeatedField<FieldDescriptorProto> Extension { get { return this.extension_; } } public RepeatedField<DescriptorProto> NestedType { get { return this.nestedType_; } } public RepeatedField<EnumDescriptorProto> EnumType { get { return this.enumType_; } } public RepeatedField<DescriptorProto.Types.ExtensionRange> ExtensionRange { get { return this.extensionRange_; } } public RepeatedField<OneofDescriptorProto> OneofDecl { get { return this.oneofDecl_; } } public MessageOptions Options { get { return this.options_; } set { this.options_ = value; } } public DescriptorProto() { } public DescriptorProto(DescriptorProto other) : this() { this.name_ = other.name_; this.field_ = other.field_.Clone(); this.extension_ = other.extension_.Clone(); this.nestedType_ = other.nestedType_.Clone(); this.enumType_ = other.enumType_.Clone(); this.extensionRange_ = other.extensionRange_.Clone(); this.oneofDecl_ = other.oneofDecl_.Clone(); this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public DescriptorProto Clone() { return new DescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as DescriptorProto); } public bool Equals(DescriptorProto other) { if (other == null) { goto IL_76; } goto IL_202; int arg_194_0; while (true) { IL_18F: switch ((arg_194_0 ^ 1272619472) % 21) { case 0: return false; case 1: return false; case 2: arg_194_0 = ((!this.oneofDecl_.Equals(other.oneofDecl_)) ? 2078274049 : 264309249); continue; case 3: return true; case 4: arg_194_0 = ((!DescriptorProto.smethod_0(this.Name, other.Name)) ? 2048948999 : 1170699933); continue; case 5: goto IL_202; case 6: return false; case 7: arg_194_0 = ((!DescriptorProto.smethod_1(this.Options, other.Options)) ? 635457826 : 982849708); continue; case 8: return false; case 9: return false; case 10: arg_194_0 = (this.extension_.Equals(other.extension_) ? 856943527 : 464817879); continue; case 11: return false; case 12: arg_194_0 = (this.field_.Equals(other.field_) ? 179850000 : 172238156); continue; case 13: arg_194_0 = (this.nestedType_.Equals(other.nestedType_) ? 503460632 : 562814912); continue; case 14: return false; case 16: goto IL_76; case 17: arg_194_0 = (this.extensionRange_.Equals(other.extensionRange_) ? 1738494431 : 1855341069); continue; case 18: return false; case 19: return false; case 20: arg_194_0 = ((!this.enumType_.Equals(other.enumType_)) ? 1331457126 : 1980584694); continue; } break; } return true; IL_76: arg_194_0 = 561646862; goto IL_18F; IL_202: arg_194_0 = ((other == this) ? 1937704644 : 550600715); goto IL_18F; } public override int GetHashCode() { int num = 1; while (true) { IL_14E: uint arg_11D_0 = 292611357u; while (true) { uint num2; switch ((num2 = (arg_11D_0 ^ 1644907272u)) % 9u) { case 0u: num ^= DescriptorProto.smethod_3(this.Name); arg_11D_0 = (num2 * 2419318705u ^ 873704460u); continue; case 1u: arg_11D_0 = (((DescriptorProto.smethod_2(this.Name) != 0) ? 591439680u : 1724063796u) ^ num2 * 2402713777u); continue; case 2u: arg_11D_0 = (((this.options_ == null) ? 2910234623u : 3011106858u) ^ num2 * 2878395464u); continue; case 3u: num ^= DescriptorProto.smethod_3(this.enumType_); num ^= DescriptorProto.smethod_3(this.extensionRange_); arg_11D_0 = (num2 * 3607733367u ^ 3396166285u); continue; case 4u: num ^= DescriptorProto.smethod_3(this.oneofDecl_); arg_11D_0 = (num2 * 2905326813u ^ 2300092912u); continue; case 5u: goto IL_14E; case 7u: num ^= DescriptorProto.smethod_3(this.field_); num ^= DescriptorProto.smethod_3(this.extension_); num ^= DescriptorProto.smethod_3(this.nestedType_); arg_11D_0 = 1024545617u; continue; case 8u: num ^= DescriptorProto.smethod_3(this.Options); arg_11D_0 = (num2 * 2167445785u ^ 259142541u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (DescriptorProto.smethod_2(this.Name) != 0) { goto IL_9D; } goto IL_125; uint arg_F9_0; while (true) { IL_F4: uint num; switch ((num = (arg_F9_0 ^ 1380886249u)) % 8u) { case 0u: output.WriteRawTag(58); arg_F9_0 = (num * 3903705093u ^ 2606529127u); continue; case 2u: this.oneofDecl_.WriteTo(output, DescriptorProto._repeated_oneofDecl_codec); arg_F9_0 = 1298599872u; continue; case 3u: output.WriteRawTag(10); output.WriteString(this.Name); arg_F9_0 = (num * 4273463212u ^ 891032528u); continue; case 4u: goto IL_9D; case 5u: goto IL_125; case 6u: output.WriteMessage(this.Options); arg_F9_0 = (num * 4011476582u ^ 2911732887u); continue; case 7u: this.nestedType_.WriteTo(output, DescriptorProto._repeated_nestedType_codec); this.enumType_.WriteTo(output, DescriptorProto._repeated_enumType_codec); this.extensionRange_.WriteTo(output, DescriptorProto._repeated_extensionRange_codec); this.extension_.WriteTo(output, DescriptorProto._repeated_extension_codec); arg_F9_0 = (((this.options_ == null) ? 2913162548u : 4289190750u) ^ num * 2185416361u); continue; } break; } return; IL_9D: arg_F9_0 = 1892936346u; goto IL_F4; IL_125: this.field_.WriteTo(output, DescriptorProto._repeated_field_codec); arg_F9_0 = 1763663670u; goto IL_F4; } public int CalculateSize() { int num = 0; if (DescriptorProto.smethod_2(this.Name) != 0) { goto IL_9A; } goto IL_14B; uint arg_11A_0; while (true) { IL_115: uint num2; switch ((num2 = (arg_11A_0 ^ 234700641u)) % 9u) { case 0u: num += this.nestedType_.CalculateSize(DescriptorProto._repeated_nestedType_codec); num += this.enumType_.CalculateSize(DescriptorProto._repeated_enumType_codec); arg_11A_0 = (num2 * 901751045u ^ 3233857168u); continue; case 1u: goto IL_14B; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_11A_0 = (num2 * 3706851503u ^ 1544335696u); continue; case 3u: num += this.extensionRange_.CalculateSize(DescriptorProto._repeated_extensionRange_codec); arg_11A_0 = (num2 * 2379446004u ^ 1129849892u); continue; case 4u: goto IL_9A; case 5u: num += this.oneofDecl_.CalculateSize(DescriptorProto._repeated_oneofDecl_codec); arg_11A_0 = (((this.options_ != null) ? 1913281033u : 2117958754u) ^ num2 * 2556608639u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_11A_0 = (num2 * 2234966633u ^ 1446791266u); continue; case 8u: num += this.extension_.CalculateSize(DescriptorProto._repeated_extension_codec); arg_11A_0 = (num2 * 3297273507u ^ 1521020661u); continue; } break; } return num; IL_9A: arg_11A_0 = 184420792u; goto IL_115; IL_14B: num += this.field_.CalculateSize(DescriptorProto._repeated_field_codec); arg_11A_0 = 521291075u; goto IL_115; } public void MergeFrom(DescriptorProto other) { if (other == null) { goto IL_163; } goto IL_1BD; uint arg_16D_0; while (true) { IL_168: uint num; switch ((num = (arg_16D_0 ^ 2347292674u)) % 13u) { case 0u: goto IL_163; case 1u: this.field_.Add(other.field_); arg_16D_0 = 3873166709u; continue; case 2u: return; case 3u: this.Options.MergeFrom(other.Options); arg_16D_0 = 2682599840u; continue; case 4u: this.extension_.Add(other.extension_); this.nestedType_.Add(other.nestedType_); this.enumType_.Add(other.enumType_); arg_16D_0 = (num * 4293805498u ^ 2383043474u); continue; case 5u: goto IL_1BD; case 6u: this.options_ = new MessageOptions(); arg_16D_0 = (num * 955065949u ^ 1423452240u); continue; case 7u: this.oneofDecl_.Add(other.oneofDecl_); arg_16D_0 = (num * 2178831324u ^ 3500342588u); continue; case 8u: arg_16D_0 = (((this.options_ != null) ? 3835910596u : 2750712974u) ^ num * 2596314786u); continue; case 9u: this.extensionRange_.Add(other.extensionRange_); arg_16D_0 = (num * 1160625397u ^ 2906773108u); continue; case 11u: this.Name = other.Name; arg_16D_0 = (num * 4016300485u ^ 2180500426u); continue; case 12u: arg_16D_0 = (((other.options_ != null) ? 1212144423u : 1032667466u) ^ num * 834638491u); continue; } break; } return; IL_163: arg_16D_0 = 4152115582u; goto IL_168; IL_1BD: arg_16D_0 = ((DescriptorProto.smethod_2(other.Name) == 0) ? 2867657384u : 2324993016u); goto IL_168; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3F0: uint num; uint arg_354_0 = ((num = input.ReadTag()) == 0u) ? 153875435u : 1126066364u; while (true) { uint num2; switch ((num2 = (arg_354_0 ^ 1430567159u)) % 32u) { case 0u: arg_354_0 = (((num == 18u) ? 4081539266u : 2394529891u) ^ num2 * 1086135964u); continue; case 1u: arg_354_0 = (num2 * 3202435107u ^ 3693961353u); continue; case 2u: arg_354_0 = (num2 * 3153139116u ^ 3190717522u); continue; case 3u: this.oneofDecl_.AddEntriesFrom(input, DescriptorProto._repeated_oneofDecl_codec); arg_354_0 = 1350218506u; continue; case 4u: arg_354_0 = (((num == 34u) ? 4032918355u : 2766907753u) ^ num2 * 3010484411u); continue; case 5u: arg_354_0 = ((num <= 50u) ? 1141702476u : 1833242052u); continue; case 6u: arg_354_0 = (num2 * 2900007877u ^ 773551060u); continue; case 7u: this.options_ = new MessageOptions(); arg_354_0 = (num2 * 3650175264u ^ 3384080457u); continue; case 8u: this.enumType_.AddEntriesFrom(input, DescriptorProto._repeated_enumType_codec); arg_354_0 = 1350218506u; continue; case 9u: arg_354_0 = (((num <= 18u) ? 3809506346u : 3830788666u) ^ num2 * 4014580463u); continue; case 10u: arg_354_0 = ((num == 26u) ? 1657650744u : 743455059u); continue; case 11u: arg_354_0 = ((num > 34u) ? 1305109234u : 247982718u); continue; case 12u: arg_354_0 = ((this.options_ == null) ? 991437328u : 319552425u); continue; case 13u: arg_354_0 = 1126066364u; continue; case 14u: arg_354_0 = (num2 * 162509203u ^ 2280292773u); continue; case 15u: this.nestedType_.AddEntriesFrom(input, DescriptorProto._repeated_nestedType_codec); arg_354_0 = 992452198u; continue; case 16u: this.extension_.AddEntriesFrom(input, DescriptorProto._repeated_extension_codec); arg_354_0 = 1350218506u; continue; case 17u: arg_354_0 = (num2 * 1380787067u ^ 4093438369u); continue; case 18u: arg_354_0 = (num2 * 1492148555u ^ 3637361129u); continue; case 19u: arg_354_0 = ((num == 58u) ? 2133348123u : 1136668008u); continue; case 20u: arg_354_0 = (num2 * 465234465u ^ 4059377147u); continue; case 21u: this.field_.AddEntriesFrom(input, DescriptorProto._repeated_field_codec); arg_354_0 = 1350218506u; continue; case 22u: this.Name = input.ReadString(); arg_354_0 = 575898613u; continue; case 23u: arg_354_0 = (((num != 50u) ? 4241886121u : 2703732791u) ^ num2 * 2260641776u); continue; case 24u: input.SkipLastField(); arg_354_0 = 1047393750u; continue; case 25u: this.extensionRange_.AddEntriesFrom(input, DescriptorProto._repeated_extensionRange_codec); arg_354_0 = 545303985u; continue; case 26u: arg_354_0 = (((num == 10u) ? 3331026663u : 2423119537u) ^ num2 * 1676932671u); continue; case 27u: arg_354_0 = (((num == 42u) ? 2314717108u : 4060626842u) ^ num2 * 3222330574u); continue; case 29u: goto IL_3F0; case 30u: input.ReadMessage(this.options_); arg_354_0 = 1350218506u; continue; case 31u: arg_354_0 = (((num != 66u) ? 2439413431u : 4026632812u) ^ num2 * 1449125032u); continue; } return; } } } static DescriptorProto() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_D5: uint arg_B5_0 = 772929701u; while (true) { uint num; switch ((num = (arg_B5_0 ^ 933086600u)) % 5u) { case 0u: DescriptorProto._repeated_nestedType_codec = FieldCodec.ForMessage<DescriptorProto>(26u, DescriptorProto.Parser); DescriptorProto._repeated_enumType_codec = FieldCodec.ForMessage<EnumDescriptorProto>(34u, EnumDescriptorProto.Parser); DescriptorProto._repeated_extensionRange_codec = FieldCodec.ForMessage<DescriptorProto.Types.ExtensionRange>(42u, DescriptorProto.Types.ExtensionRange.Parser); DescriptorProto._repeated_oneofDecl_codec = FieldCodec.ForMessage<OneofDescriptorProto>(66u, OneofDescriptorProto.Parser); arg_B5_0 = (num * 1929235804u ^ 711273320u); continue; case 1u: DescriptorProto._repeated_field_codec = FieldCodec.ForMessage<FieldDescriptorProto>(18u, FieldDescriptorProto.Parser); arg_B5_0 = (num * 1947074557u ^ 1771611389u); continue; case 3u: goto IL_D5; case 4u: DescriptorProto._repeated_extension_codec = FieldCodec.ForMessage<FieldDescriptorProto>(50u, FieldDescriptorProto.Parser); arg_B5_0 = (num * 3318703956u ^ 1455410250u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.WorldServer.Game.Entities/Creature.cs using System; using System.Collections.Generic; namespace AuthServer.WorldServer.Game.Entities { [Serializable] public class Creature { public int Id; public string Name; public string SubName; public string IconName; public List<uint> Flag = new List<uint>(2); public int Type; public int Family; public int Rank; public List<int> QuestKillNpcId = new List<int>(2); public List<int> DisplayInfoId = new List<int>(4); public float HealthModifier; public float PowerModifier; public byte RacialLeader; public List<int> QuestItemId = new List<int>(6); public int MovementInfoId; public int ExpansionRequired; } } <file_sep>/Bgs.Protocol.Account.V1/GetCAISInfoRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetCAISInfoRequest : IMessage<GetCAISInfoRequest>, IEquatable<GetCAISInfoRequest>, IDeepCloneable<GetCAISInfoRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetCAISInfoRequest.__c __9 = new GetCAISInfoRequest.__c(); internal GetCAISInfoRequest cctor>b__24_0() { return new GetCAISInfoRequest(); } } private static readonly MessageParser<GetCAISInfoRequest> _parser = new MessageParser<GetCAISInfoRequest>(new Func<GetCAISInfoRequest>(GetCAISInfoRequest.__c.__9.<.cctor>b__24_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public static MessageParser<GetCAISInfoRequest> Parser { get { return GetCAISInfoRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[23]; } } MessageDescriptor IMessage.Descriptor { get { return GetCAISInfoRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public GetCAISInfoRequest() { } public GetCAISInfoRequest(GetCAISInfoRequest other) : this() { this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); } public GetCAISInfoRequest Clone() { return new GetCAISInfoRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetCAISInfoRequest); } public bool Equals(GetCAISInfoRequest other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 39852171) % 7) { case 0: goto IL_7A; case 1: return false; case 2: goto IL_3E; case 3: return false; case 5: return true; case 6: arg_48_0 = (GetCAISInfoRequest.smethod_0(this.EntityId, other.EntityId) ? 60082191 : 1034273949); continue; } break; } return true; IL_3E: arg_48_0 = 73121364; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 1968018128 : 1860485897); goto IL_43; } public override int GetHashCode() { int num = 1; if (this.entityId_ != null) { while (true) { IL_44: uint arg_2C_0 = 2542658607u; while (true) { uint num2; switch ((num2 = (arg_2C_0 ^ 4061116204u)) % 3u) { case 0u: goto IL_44; case 2u: num ^= GetCAISInfoRequest.smethod_1(this.EntityId); arg_2C_0 = (num2 * 3334318442u ^ 1366253892u); continue; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.entityId_ != null) { while (true) { IL_5B: uint arg_3F_0 = 4294000879u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 3078613749u)) % 4u) { case 0u: goto IL_5B; case 1u: output.WriteMessage(this.EntityId); arg_3F_0 = (num * 3499573530u ^ 3600306372u); continue; case 2u: output.WriteRawTag(10); arg_3F_0 = (num * 1870964940u ^ 2944750336u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.entityId_ != null) { while (true) { IL_46: uint arg_2E_0 = 2925305462u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 3334730307u)) % 3u) { case 0u: goto IL_46; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_2E_0 = (num2 * 660222197u ^ 2380804289u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(GetCAISInfoRequest other) { if (other == null) { goto IL_3E; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 907285080u)) % 7u) { case 0u: this.entityId_ = new EntityId(); arg_7A_0 = (num * 3505015282u ^ 2672358434u); continue; case 1u: return; case 2u: this.EntityId.MergeFrom(other.EntityId); arg_7A_0 = 1350743651u; continue; case 3u: goto IL_3E; case 5u: arg_7A_0 = (((this.entityId_ == null) ? 1761971155u : 2042645831u) ^ num * 3016304991u); continue; case 6u: goto IL_B1; } break; } return; IL_3E: arg_7A_0 = 1752322176u; goto IL_75; IL_B1: arg_7A_0 = ((other.entityId_ != null) ? 49165495u : 1350743651u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F0: uint num; uint arg_B0_0 = ((num = input.ReadTag()) != 0u) ? 3160579036u : 3052097194u; while (true) { uint num2; switch ((num2 = (arg_B0_0 ^ 3598060594u)) % 9u) { case 0u: arg_B0_0 = 3160579036u; continue; case 1u: this.entityId_ = new EntityId(); arg_B0_0 = (num2 * 4003554419u ^ 955615351u); continue; case 2u: input.SkipLastField(); arg_B0_0 = (num2 * 3397152304u ^ 3229558868u); continue; case 4u: arg_B0_0 = (num2 * 1348634166u ^ 2344811220u); continue; case 5u: arg_B0_0 = ((this.entityId_ == null) ? 3511653299u : 3349643908u); continue; case 6u: goto IL_F0; case 7u: input.ReadMessage(this.entityId_); arg_B0_0 = 4085651280u; continue; case 8u: arg_B0_0 = ((num != 10u) ? 3090064594u : 4127250860u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/FieldDescriptorProto.cs using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class FieldDescriptorProto : IMessage, IMessage<FieldDescriptorProto>, IEquatable<FieldDescriptorProto>, IDeepCloneable<FieldDescriptorProto> { [DebuggerNonUserCode] public static class Types { internal enum Type { TYPE_DOUBLE = 1, TYPE_FLOAT, TYPE_INT64, TYPE_UINT64, TYPE_INT32, TYPE_FIXED64, TYPE_FIXED32, TYPE_BOOL, TYPE_STRING, TYPE_GROUP, TYPE_MESSAGE, TYPE_BYTES, TYPE_UINT32, TYPE_ENUM, TYPE_SFIXED32, TYPE_SFIXED64, TYPE_SINT32, TYPE_SINT64 } internal enum Label { LABEL_OPTIONAL = 1, LABEL_REQUIRED, LABEL_REPEATED } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FieldDescriptorProto.__c __9 = new FieldDescriptorProto.__c(); internal FieldDescriptorProto cctor>b__70_0() { return new FieldDescriptorProto(); } } private static readonly MessageParser<FieldDescriptorProto> _parser = new MessageParser<FieldDescriptorProto>(new Func<FieldDescriptorProto>(FieldDescriptorProto.__c.__9.<.cctor>b__70_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int NumberFieldNumber = 3; private int number_; public const int LabelFieldNumber = 4; private FieldDescriptorProto.Types.Label label_ = FieldDescriptorProto.Types.Label.LABEL_OPTIONAL; public const int TypeFieldNumber = 5; private FieldDescriptorProto.Types.Type type_ = FieldDescriptorProto.Types.Type.TYPE_DOUBLE; public const int TypeNameFieldNumber = 6; private string typeName_ = ""; public const int ExtendeeFieldNumber = 2; private string extendee_ = ""; public const int DefaultValueFieldNumber = 7; private string defaultValue_ = ""; public const int OneofIndexFieldNumber = 9; private int oneofIndex_; public const int JsonNameFieldNumber = 10; private string jsonName_ = ""; public const int OptionsFieldNumber = 8; private FieldOptions options_; public static MessageParser<FieldDescriptorProto> Parser { get { return FieldDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return FieldDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public int Number { get { return this.number_; } set { this.number_ = value; } } public FieldDescriptorProto.Types.Label Label { get { return this.label_; } set { this.label_ = value; } } public FieldDescriptorProto.Types.Type Type { get { return this.type_; } set { this.type_ = value; } } public string TypeName { get { return this.typeName_; } set { this.typeName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string Extendee { get { return this.extendee_; } set { this.extendee_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string DefaultValue { get { return this.defaultValue_; } set { this.defaultValue_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public int OneofIndex { get { return this.oneofIndex_; } set { this.oneofIndex_ = value; } } public string JsonName { get { return this.jsonName_; } set { this.jsonName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public FieldOptions Options { get { return this.options_; } set { this.options_ = value; } } public FieldDescriptorProto() { while (true) { IL_7D: uint arg_65_0 = 2148063955u; while (true) { uint num; switch ((num = (arg_65_0 ^ 2784742453u)) % 3u) { case 0u: goto IL_7D; case 1u: this.OnConstruction(); arg_65_0 = (num * 1763556460u ^ 3064805440u); continue; } return; } } } private void OnConstruction() { this.OneofIndex = -1; } public FieldDescriptorProto(FieldDescriptorProto other) : this() { this.name_ = other.name_; this.number_ = other.number_; this.label_ = other.label_; this.type_ = other.type_; this.typeName_ = other.typeName_; this.extendee_ = other.extendee_; this.defaultValue_ = other.defaultValue_; this.oneofIndex_ = other.oneofIndex_; this.jsonName_ = other.jsonName_; this.Options = ((other.options_ != null) ? other.Options.Clone() : null); } public FieldDescriptorProto Clone() { return new FieldDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as FieldDescriptorProto); } public bool Equals(FieldDescriptorProto other) { if (other == null) { goto IL_9E; } goto IL_25C; int arg_1DE_0; while (true) { IL_1D9: switch ((arg_1DE_0 ^ -1535746256) % 25) { case 0: return false; case 1: arg_1DE_0 = ((this.Label != other.Label) ? -1784902040 : -138567075); continue; case 2: return false; case 3: return false; case 4: arg_1DE_0 = ((this.OneofIndex == other.OneofIndex) ? -1106147361 : -1946960307); continue; case 5: arg_1DE_0 = ((!FieldDescriptorProto.smethod_1(this.Options, other.Options)) ? -1713296620 : -603866968); continue; case 6: arg_1DE_0 = ((!FieldDescriptorProto.smethod_0(this.Extendee, other.Extendee)) ? -34183041 : -1434263572); continue; case 7: return false; case 8: return false; case 9: arg_1DE_0 = (FieldDescriptorProto.smethod_0(this.JsonName, other.JsonName) ? -388303921 : -1863779604); continue; case 10: arg_1DE_0 = ((!FieldDescriptorProto.smethod_0(this.Name, other.Name)) ? -84473239 : -1681219839); continue; case 11: arg_1DE_0 = (FieldDescriptorProto.smethod_0(this.TypeName, other.TypeName) ? -297335134 : -262434306); continue; case 12: goto IL_9E; case 13: arg_1DE_0 = ((this.Type == other.Type) ? -243887192 : -178624946); continue; case 14: goto IL_25C; case 15: return false; case 16: arg_1DE_0 = ((!FieldDescriptorProto.smethod_0(this.DefaultValue, other.DefaultValue)) ? -161884585 : -759004045); continue; case 18: return true; case 19: return false; case 20: return false; case 21: return false; case 22: arg_1DE_0 = ((this.Number == other.Number) ? -387782294 : -1702669360); continue; case 23: return false; case 24: return false; } break; } return true; IL_9E: arg_1DE_0 = -2061810536; goto IL_1D9; IL_25C: arg_1DE_0 = ((other == this) ? -847235380 : -2101735055); goto IL_1D9; } public override int GetHashCode() { int num = 1; if (FieldDescriptorProto.smethod_2(this.Name) != 0) { goto IL_1FE; } goto IL_331; uint arg_2C0_0; while (true) { IL_2BB: uint num2; switch ((num2 = (arg_2C0_0 ^ 4039995951u)) % 21u) { case 0u: num ^= this.Type.GetHashCode(); arg_2C0_0 = (num2 * 2544801981u ^ 2747017242u); continue; case 1u: arg_2C0_0 = ((this.Extendee.Length == 0) ? 3432194599u : 3604502266u); continue; case 2u: arg_2C0_0 = ((this.DefaultValue.Length != 0) ? 2549318557u : 2911423173u); continue; case 3u: num ^= this.Options.GetHashCode(); arg_2C0_0 = (num2 * 1465855176u ^ 1934216863u); continue; case 4u: arg_2C0_0 = ((this.OneofIndex != 0) ? 3051164232u : 2745102667u); continue; case 5u: goto IL_1FE; case 6u: num ^= this.Label.GetHashCode(); arg_2C0_0 = (num2 * 1358107791u ^ 2183879306u); continue; case 8u: num ^= FieldDescriptorProto.smethod_3(this.Name); arg_2C0_0 = (num2 * 1985113078u ^ 226745858u); continue; case 9u: arg_2C0_0 = ((this.Label == FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 3940442121u : 4086468322u); continue; case 10u: num ^= this.JsonName.GetHashCode(); arg_2C0_0 = (num2 * 1842066173u ^ 1938999457u); continue; case 11u: num ^= this.DefaultValue.GetHashCode(); arg_2C0_0 = (num2 * 2816572269u ^ 316122127u); continue; case 12u: num ^= this.Number.GetHashCode(); arg_2C0_0 = (num2 * 2733012613u ^ 2402309914u); continue; case 13u: num ^= this.TypeName.GetHashCode(); arg_2C0_0 = (num2 * 650515170u ^ 2133990605u); continue; case 14u: num ^= this.OneofIndex.GetHashCode(); arg_2C0_0 = (num2 * 1797946656u ^ 3701122731u); continue; case 15u: arg_2C0_0 = ((this.options_ != null) ? 2790140014u : 3423166551u); continue; case 16u: goto IL_331; case 17u: num ^= this.Extendee.GetHashCode(); arg_2C0_0 = (num2 * 3156112082u ^ 2821075613u); continue; case 18u: arg_2C0_0 = ((this.TypeName.Length != 0) ? 2250387178u : 2902565671u); continue; case 19u: arg_2C0_0 = ((this.JsonName.Length != 0) ? 3947188092u : 2609617318u); continue; case 20u: arg_2C0_0 = ((this.Type == FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 3904446384u : 2563804125u); continue; } break; } return num; IL_1FE: arg_2C0_0 = 3542299782u; goto IL_2BB; IL_331: arg_2C0_0 = ((this.Number != 0) ? 3051112902u : 2547503383u); goto IL_2BB; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FieldDescriptorProto.smethod_2(this.Name) != 0) { goto IL_241; } goto IL_3DA; uint arg_34E_0; while (true) { IL_349: uint num; switch ((num = (arg_34E_0 ^ 3711728245u)) % 28u) { case 0u: arg_34E_0 = ((this.Type != FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 3344220916u : 4062717749u); continue; case 1u: output.WriteString(this.TypeName); arg_34E_0 = (num * 1461530474u ^ 906673557u); continue; case 2u: output.WriteRawTag(24); arg_34E_0 = (num * 694434564u ^ 2698549046u); continue; case 3u: output.WriteRawTag(50); arg_34E_0 = (num * 2991707005u ^ 2313681143u); continue; case 4u: arg_34E_0 = ((this.options_ == null) ? 3512634484u : 2630882754u); continue; case 5u: output.WriteMessage(this.Options); arg_34E_0 = (num * 4004818973u ^ 2318404801u); continue; case 6u: goto IL_3DA; case 8u: output.WriteEnum((int)this.Type); arg_34E_0 = (num * 1005724324u ^ 1623169829u); continue; case 9u: output.WriteString(this.DefaultValue); arg_34E_0 = (num * 485746091u ^ 885934154u); continue; case 10u: output.WriteRawTag(32); arg_34E_0 = (num * 1043290128u ^ 1593029053u); continue; case 11u: goto IL_241; case 12u: arg_34E_0 = ((FieldDescriptorProto.smethod_2(this.TypeName) != 0) ? 2740920242u : 3433399151u); continue; case 13u: arg_34E_0 = ((this.Number != 0) ? 2720936323u : 3931059337u); continue; case 14u: output.WriteRawTag(82); output.WriteString(this.JsonName); arg_34E_0 = (num * 3191804709u ^ 3119111760u); continue; case 15u: output.WriteRawTag(10); output.WriteString(this.Name); arg_34E_0 = (num * 2103086976u ^ 2778336319u); continue; case 16u: arg_34E_0 = ((this.Label != FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 2875264551u : 2943626949u); continue; case 17u: arg_34E_0 = ((this.OneofIndex != 0) ? 4244740015u : 3232959594u); continue; case 18u: output.WriteRawTag(72); arg_34E_0 = (num * 1643148706u ^ 4063896945u); continue; case 19u: output.WriteInt32(this.Number); arg_34E_0 = (num * 1887599270u ^ 2263563787u); continue; case 20u: output.WriteEnum((int)this.Label); arg_34E_0 = (num * 1335185622u ^ 2393914165u); continue; case 21u: output.WriteRawTag(40); arg_34E_0 = (num * 1872078328u ^ 2298339049u); continue; case 22u: arg_34E_0 = ((FieldDescriptorProto.smethod_2(this.DefaultValue) != 0) ? 3046860884u : 2712391441u); continue; case 23u: output.WriteRawTag(66); arg_34E_0 = (num * 328699326u ^ 997790174u); continue; case 24u: output.WriteInt32(this.OneofIndex); arg_34E_0 = (num * 2297612326u ^ 2421994442u); continue; case 25u: output.WriteRawTag(58); arg_34E_0 = (num * 3171749231u ^ 3848349227u); continue; case 26u: output.WriteRawTag(18); output.WriteString(this.Extendee); arg_34E_0 = (num * 3606759021u ^ 2701088358u); continue; case 27u: arg_34E_0 = ((FieldDescriptorProto.smethod_2(this.JsonName) == 0) ? 4113223018u : 2404082759u); continue; } break; } return; IL_241: arg_34E_0 = 2165106486u; goto IL_349; IL_3DA: arg_34E_0 = ((FieldDescriptorProto.smethod_2(this.Extendee) == 0) ? 3577605116u : 4019585463u); goto IL_349; } public int CalculateSize() { int num = 0; while (true) { IL_342: uint arg_2DD_0 = 3774015416u; while (true) { uint num2; switch ((num2 = (arg_2DD_0 ^ 4177676322u)) % 22u) { case 0u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Label); arg_2DD_0 = (num2 * 421678569u ^ 3600733590u); continue; case 1u: arg_2DD_0 = ((FieldDescriptorProto.smethod_2(this.TypeName) == 0) ? 4016154119u : 4268867403u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_2DD_0 = (num2 * 1689553535u ^ 182657865u); continue; case 3u: arg_2DD_0 = ((FieldDescriptorProto.smethod_2(this.Extendee) == 0) ? 2773250833u : 3222653858u); continue; case 4u: arg_2DD_0 = ((this.OneofIndex != 0) ? 2295039641u : 2418608551u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.JsonName); arg_2DD_0 = (num2 * 321066919u ^ 859899349u); continue; case 6u: num += 1 + CodedOutputStream.ComputeStringSize(this.DefaultValue); arg_2DD_0 = (num2 * 1379927852u ^ 3122797396u); continue; case 8u: arg_2DD_0 = ((this.options_ == null) ? 2974286979u : 3257237030u); continue; case 9u: arg_2DD_0 = ((this.Number != 0) ? 2737414653u : 3152485347u); continue; case 10u: arg_2DD_0 = ((this.Type != FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 2377971186u : 3127795869u); continue; case 11u: num += 1 + CodedOutputStream.ComputeInt32Size(this.OneofIndex); arg_2DD_0 = (num2 * 707808933u ^ 3577098528u); continue; case 12u: num += 1 + CodedOutputStream.ComputeStringSize(this.Extendee); arg_2DD_0 = (num2 * 781975083u ^ 748709265u); continue; case 13u: num += 1 + CodedOutputStream.ComputeStringSize(this.TypeName); arg_2DD_0 = (num2 * 33973161u ^ 2379237718u); continue; case 14u: goto IL_342; case 15u: arg_2DD_0 = ((FieldDescriptorProto.smethod_2(this.DefaultValue) == 0) ? 3423984772u : 2200440702u); continue; case 16u: arg_2DD_0 = (((FieldDescriptorProto.smethod_2(this.Name) != 0) ? 710245838u : 1920903005u) ^ num2 * 487132812u); continue; case 17u: arg_2DD_0 = ((this.Label != FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 2984542270u : 3312081130u); continue; case 18u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.Type); arg_2DD_0 = (num2 * 743107124u ^ 338743005u); continue; case 19u: arg_2DD_0 = ((FieldDescriptorProto.smethod_2(this.JsonName) != 0) ? 3001691527u : 3104449654u); continue; case 20u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_2DD_0 = (num2 * 2812836282u ^ 552412779u); continue; case 21u: num += 1 + CodedOutputStream.ComputeInt32Size(this.Number); arg_2DD_0 = (num2 * 1348246531u ^ 919386750u); continue; } return num; } } return num; } public void MergeFrom(FieldDescriptorProto other) { if (other == null) { goto IL_2D8; } goto IL_362; uint arg_2E2_0; while (true) { IL_2DD: uint num; switch ((num = (arg_2E2_0 ^ 2374484747u)) % 25u) { case 0u: goto IL_2D8; case 1u: this.TypeName = other.TypeName; arg_2E2_0 = (num * 3566535236u ^ 129450778u); continue; case 2u: this.OneofIndex = other.OneofIndex; arg_2E2_0 = (num * 743044092u ^ 3093827994u); continue; case 3u: this.Type = other.Type; arg_2E2_0 = (num * 3195505839u ^ 3690373218u); continue; case 4u: arg_2E2_0 = ((FieldDescriptorProto.smethod_2(other.TypeName) == 0) ? 2365591174u : 3010466684u); continue; case 5u: this.JsonName = other.JsonName; arg_2E2_0 = (num * 4221385245u ^ 934156903u); continue; case 6u: arg_2E2_0 = ((FieldDescriptorProto.smethod_2(other.Extendee) != 0) ? 3836257807u : 3944558005u); continue; case 7u: this.Extendee = other.Extendee; arg_2E2_0 = (num * 2788269702u ^ 3623253421u); continue; case 8u: this.Number = other.Number; arg_2E2_0 = (num * 3674845492u ^ 2512164195u); continue; case 9u: arg_2E2_0 = ((other.Number == 0) ? 2332967887u : 3237512924u); continue; case 10u: arg_2E2_0 = ((other.options_ != null) ? 2343913497u : 2736460334u); continue; case 11u: this.options_ = new FieldOptions(); arg_2E2_0 = (num * 1367859665u ^ 741748540u); continue; case 12u: arg_2E2_0 = ((other.OneofIndex != 0) ? 3623734052u : 4146313950u); continue; case 13u: return; case 14u: arg_2E2_0 = ((other.Type == FieldDescriptorProto.Types.Type.TYPE_DOUBLE) ? 3120372135u : 3429598912u); continue; case 15u: this.Options.MergeFrom(other.Options); arg_2E2_0 = 2736460334u; continue; case 16u: goto IL_362; case 17u: arg_2E2_0 = ((other.Label == FieldDescriptorProto.Types.Label.LABEL_OPTIONAL) ? 3781157021u : 3910515226u); continue; case 19u: arg_2E2_0 = ((FieldDescriptorProto.smethod_2(other.DefaultValue) == 0) ? 3348437862u : 2682441713u); continue; case 20u: arg_2E2_0 = ((FieldDescriptorProto.smethod_2(other.JsonName) != 0) ? 4201569389u : 2646454505u); continue; case 21u: this.DefaultValue = other.DefaultValue; arg_2E2_0 = (num * 3461118370u ^ 2866379602u); continue; case 22u: this.Name = other.Name; arg_2E2_0 = (num * 4132100803u ^ 3637734008u); continue; case 23u: arg_2E2_0 = (((this.options_ != null) ? 1921338571u : 2140789068u) ^ num * 413541895u); continue; case 24u: this.Label = other.Label; arg_2E2_0 = (num * 312888910u ^ 433451443u); continue; } break; } return; IL_2D8: arg_2E2_0 = 3016864292u; goto IL_2DD; IL_362: arg_2E2_0 = ((FieldDescriptorProto.smethod_2(other.Name) == 0) ? 3181690346u : 2309701133u); goto IL_2DD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_489: uint num; uint arg_3D5_0 = ((num = input.ReadTag()) == 0u) ? 1251283102u : 2003035552u; while (true) { uint num2; switch ((num2 = (arg_3D5_0 ^ 951053310u)) % 38u) { case 0u: arg_3D5_0 = ((num > 58u) ? 879138517u : 1210347673u); continue; case 1u: arg_3D5_0 = (((num != 10u) ? 2859550899u : 3752943317u) ^ num2 * 2279187692u); continue; case 2u: goto IL_489; case 3u: this.Name = input.ReadString(); arg_3D5_0 = 2127783950u; continue; case 5u: this.options_ = new FieldOptions(); arg_3D5_0 = (num2 * 1134712440u ^ 2434000627u); continue; case 6u: arg_3D5_0 = (num2 * 3912352093u ^ 3602392744u); continue; case 7u: arg_3D5_0 = (num2 * 2494665525u ^ 4080170679u); continue; case 8u: arg_3D5_0 = (num2 * 3939914713u ^ 23585891u); continue; case 9u: this.DefaultValue = input.ReadString(); arg_3D5_0 = 125097945u; continue; case 10u: arg_3D5_0 = (num2 * 1420733787u ^ 803493491u); continue; case 11u: arg_3D5_0 = (((num != 58u) ? 919865892u : 113304953u) ^ num2 * 4051331292u); continue; case 12u: arg_3D5_0 = (((num == 82u) ? 2958136616u : 2212381861u) ^ num2 * 4078678413u); continue; case 13u: arg_3D5_0 = (((num == 50u) ? 2101612530u : 1650020530u) ^ num2 * 775000013u); continue; case 14u: this.JsonName = input.ReadString(); arg_3D5_0 = 2127783950u; continue; case 15u: arg_3D5_0 = ((num != 66u) ? 1901701756u : 2123882824u); continue; case 16u: arg_3D5_0 = ((this.options_ == null) ? 1545148413u : 1615250843u); continue; case 17u: this.TypeName = input.ReadString(); arg_3D5_0 = 1733151520u; continue; case 18u: arg_3D5_0 = (((num != 32u) ? 116667108u : 1034923518u) ^ num2 * 3212814227u); continue; case 19u: input.SkipLastField(); arg_3D5_0 = 2127783950u; continue; case 20u: this.Number = input.ReadInt32(); arg_3D5_0 = 2127783950u; continue; case 21u: arg_3D5_0 = (((num <= 18u) ? 1094608370u : 486755418u) ^ num2 * 3207938603u); continue; case 22u: arg_3D5_0 = (num2 * 1192474902u ^ 3066219390u); continue; case 23u: arg_3D5_0 = (num2 * 726716163u ^ 3437278354u); continue; case 24u: arg_3D5_0 = (((num != 72u) ? 3544705902u : 2816018012u) ^ num2 * 822796972u); continue; case 25u: arg_3D5_0 = (num2 * 3760504627u ^ 2665053387u); continue; case 26u: arg_3D5_0 = ((num <= 40u) ? 493953681u : 1288148930u); continue; case 27u: arg_3D5_0 = (num2 * 2025430693u ^ 3442948783u); continue; case 28u: arg_3D5_0 = 2003035552u; continue; case 29u: arg_3D5_0 = (((num != 18u) ? 4121145511u : 3174419143u) ^ num2 * 1230479852u); continue; case 30u: this.OneofIndex = input.ReadInt32(); arg_3D5_0 = 1129239731u; continue; case 31u: this.type_ = (FieldDescriptorProto.Types.Type)input.ReadEnum(); arg_3D5_0 = 1594556939u; continue; case 32u: arg_3D5_0 = (num2 * 1693697911u ^ 3760691052u); continue; case 33u: arg_3D5_0 = ((num == 24u) ? 1773035486u : 1057405000u); continue; case 34u: this.label_ = (FieldDescriptorProto.Types.Label)input.ReadEnum(); arg_3D5_0 = 1350824912u; continue; case 35u: input.ReadMessage(this.options_); arg_3D5_0 = 2127783950u; continue; case 36u: arg_3D5_0 = (((num != 40u) ? 3508778908u : 2678337317u) ^ num2 * 3260241597u); continue; case 37u: this.Extendee = input.ReadString(); arg_3D5_0 = 1242922966u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/CorpseFields.cs using System; public enum CorpseFields { Owner = 12, PartyGUID = 16, DisplayID = 20, Items, SkinID = 40, FacialHairStyleID, Flags, DynamicFlags, FactionTemplate, CustomDisplayOption, End } <file_sep>/Google.Protobuf/DescriptorReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Google.Protobuf { [DebuggerNonUserCode] internal static class DescriptorReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return DescriptorReflection.descriptor; } } static DescriptorReflection() { DescriptorReflection.descriptor = FileDescriptor.FromGeneratedCode(DescriptorReflection.smethod_1(DescriptorReflection.smethod_0(new string[] { Module.smethod_33<string>(1267697346u), Module.smethod_35<string>(2451761865u), Module.smethod_36<string>(2302970369u), Module.smethod_33<string>(2187946610u), Module.smethod_33<string>(3926352130u), Module.smethod_33<string>(3006102866u), Module.smethod_35<string>(3459124441u), Module.smethod_36<string>(3078537361u), Module.smethod_37<string>(4092086789u), Module.smethod_33<string>(1369790354u), Module.smethod_36<string>(2684884097u), Module.smethod_36<string>(1503924305u), Module.smethod_36<string>(4236018081u), Module.smethod_34<string>(1554038290u), Module.smethod_34<string>(1928984738u), Module.smethod_36<string>(3460451089u), Module.smethod_37<string>(1287287173u), Module.smethod_36<string>(334704049u), Module.smethod_35<string>(4158807705u), Module.smethod_34<string>(3599326898u), Module.smethod_37<string>(2689686981u), Module.smethod_33<string>(755820114u), Module.smethod_37<string>(3887609445u), Module.smethod_37<string>(3537009493u), Module.smethod_35<string>(1878565561u), Module.smethod_35<string>(3851128393u), Module.smethod_35<string>(3193607449u), Module.smethod_34<string>(3121491506u), Module.smethod_33<string>(3109608066u), Module.smethod_34<string>(2371598610u), Module.smethod_33<string>(3927764322u), Module.smethod_33<string>(4029857330u), Module.smethod_35<string>(45032761u), Module.smethod_35<string>(2017595593u), Module.smethod_33<string>(2291451810u), Module.smethod_33<string>(2393544818u), Module.smethod_37<string>(4004318917u), Module.smethod_37<string>(3653718965u), Module.smethod_34<string>(4041940770u), Module.smethod_36<string>(1550882449u), Module.smethod_34<string>(3292047874u), Module.smethod_35<string>(1052395337u), Module.smethod_33<string>(3313794082u), Module.smethod_36<string>(4271236689u), Module.smethod_37<string>(1199519301u), Module.smethod_34<string>(667422738u), Module.smethod_35<string>(2059757913u), Module.smethod_37<string>(2046841813u), Module.smethod_37<string>(3595364229u), Module.smethod_36<string>(3102016433u), Module.smethod_36<string>(1539142913u), Module.smethod_33<string>(143262066u), Module.smethod_36<string>(3090276897u), Module.smethod_33<string>(961418322u), Module.smethod_34<string>(2337764898u), Module.smethod_34<string>(1212925554u), Module.smethod_34<string>(1587872002u), Module.smethod_37<string>(2748041717u), Module.smethod_33<string>(1063511330u), Module.smethod_34<string>(2234875954u), Module.smethod_37<string>(1871777605u), Module.smethod_36<string>(669659633u), Module.smethod_33<string>(3310969698u), Module.smethod_35<string>(2005052521u), Module.smethod_35<string>(1347531577u), Module.smethod_35<string>(3320094409u), Module.smethod_36<string>(1063312897u), Module.smethod_34<string>(3530271666u), Module.smethod_33<string>(3515155714u), Module.smethod_34<string>(2780378770u), Module.smethod_35<string>(32489689u), Module.smethod_33<string>(140437682u), Module.smethod_36<string>(276006369u), Module.smethod_36<string>(3008100145u), Module.smethod_34<string>(1655539426u), Module.smethod_34<string>(530700082u), Module.smethod_35<string>(2047214841u), Module.smethod_35<string>(4019777673u), Module.smethod_35<string>(3362256729u), Module.smethod_35<string>(74652009u), Module.smethod_34<string>(3700828034u), Module.smethod_35<string>(1389693897u), Module.smethod_35<string>(732172953u), Module.smethod_34<string>(1826095794u), Module.smethod_35<string>(1082014585u), Module.smethod_36<string>(1815400817u), Module.smethod_36<string>(252527297u), Module.smethod_37<string>(3215822677u), Module.smethod_36<string>(1039833825u), Module.smethod_33<string>(3003278482u), Module.smethod_34<string>(4246330850u), Module.smethod_36<string>(2267751761u), Module.smethod_36<string>(704878241u), Module.smethod_33<string>(1778162386u), Module.smethod_34<string>(973313954u), Module.smethod_37<string>(732209877u), Module.smethod_35<string>(913365305u), Module.smethod_35<string>(2885928137u), Module.smethod_34<string>(3768495458u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FileDescriptorSet).TypeHandle), FileDescriptorSet.Parser, new string[] { Module.smethod_35<string>(1542966915u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FileDescriptorProto).TypeHandle), FileDescriptorProto.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_33<string>(3068851852u), Module.smethod_36<string>(2918834666u), Module.smethod_33<string>(2960201507u), Module.smethod_34<string>(917987220u), Module.smethod_33<string>(620940421u), Module.smethod_37<string>(1813216572u), Module.smethod_35<string>(1948647215u), Module.smethod_33<string>(3343756383u), Module.smethod_35<string>(1556926582u), Module.smethod_34<string>(2174973054u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(DescriptorProto).TypeHandle), DescriptorProto.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_36<string>(476111070u), Module.smethod_37<string>(3653925262u), Module.smethod_37<string>(3420182137u), Module.smethod_35<string>(367805016u), Module.smethod_36<string>(2256012225u), Module.smethod_34<string>(1452743525u), Module.smethod_35<string>(1556926582u) }, null, null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(DescriptorProto.Types.ExtensionRange).TypeHandle), DescriptorProto.Types.ExtensionRange.Parser, new string[] { Module.smethod_33<string>(1221795987u), Module.smethod_33<string>(780637270u) }, null, null, null) }), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FieldDescriptorProto).TypeHandle), FieldDescriptorProto.Parser, new string[] { Module.smethod_35<string>(3235769769u), Module.smethod_36<string>(652736699u), Module.smethod_34<string>(46694345u), Module.smethod_37<string>(147837329u), Module.smethod_37<string>(878273543u), Module.smethod_36<string>(1263417598u), Module.smethod_36<string>(2360295309u), Module.smethod_33<string>(2084441410u), Module.smethod_33<string>(2909155003u) }, null, new Type[] { DescriptorReflection.smethod_2(typeof(FieldDescriptorProto.Types.Type).TypeHandle), DescriptorReflection.smethod_2(typeof(FieldDescriptorProto.Types.Label).TypeHandle) }, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(OneofDescriptorProto).TypeHandle), OneofDescriptorProto.Parser, new string[] { Module.smethod_34<string>(2643656114u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumDescriptorProto).TypeHandle), EnumDescriptorProto.Parser, new string[] { Module.smethod_36<string>(2649665489u), Module.smethod_34<string>(1800026606u), Module.smethod_35<string>(1556926582u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumValueDescriptorProto).TypeHandle), EnumValueDescriptorProto.Parser, new string[] { Module.smethod_34<string>(2643656114u), Module.smethod_36<string>(652736699u), Module.smethod_37<string>(819830394u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(ServiceDescriptorProto).TypeHandle), ServiceDescriptorProto.Parser, new string[] { Module.smethod_36<string>(2649665489u), Module.smethod_37<string>(4209061500u), Module.smethod_35<string>(1556926582u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(MethodDescriptorProto).TypeHandle), MethodDescriptorProto.Parser, new string[] { Module.smethod_35<string>(3235769769u), Module.smethod_35<string>(3613530735u), Module.smethod_33<string>(946891456u), Module.smethod_37<string>(819830394u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FileOptions).TypeHandle), FileOptions.Parser, new string[] { Module.smethod_33<string>(2250695596u), Module.smethod_34<string>(2775802604u), Module.smethod_37<string>(1521059769u), Module.smethod_37<string>(2163845995u), Module.smethod_33<string>(3221991364u), Module.smethod_35<string>(2270569513u), Module.smethod_34<string>(4220261662u), Module.smethod_36<string>(1665532329u), Module.smethod_33<string>(230828208u), Module.smethod_34<string>(300240814u), Module.smethod_37<string>(2631391187u), Module.smethod_36<string>(247343899u) }, null, new Type[] { DescriptorReflection.smethod_2(typeof(FileOptions.Types.OptimizeMode).TypeHandle) }, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(MessageOptions).TypeHandle), MessageOptions.Parser, new string[] { Module.smethod_34<string>(3470368766u), Module.smethod_34<string>(1557226648u), Module.smethod_35<string>(983446959u), Module.smethod_35<string>(1892808547u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(FieldOptions).TypeHandle), FieldOptions.Parser, new string[] { Module.smethod_36<string>(930367343u), Module.smethod_37<string>(3770870502u), Module.smethod_33<string>(2135487914u), Module.smethod_37<string>(2631391187u), Module.smethod_36<string>(351626983u), Module.smethod_36<string>(693138705u), Module.smethod_33<string>(3605546240u) }, null, new Type[] { DescriptorReflection.smethod_2(typeof(FieldOptions.Types.CType).TypeHandle) }, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumOptions).TypeHandle), EnumOptions.Parser, new string[] { Module.smethod_35<string>(3809532711u), Module.smethod_35<string>(983446959u), Module.smethod_35<string>(1892808547u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(EnumValueOptions).TypeHandle), EnumValueOptions.Parser, new string[] { Module.smethod_33<string>(4040147620u), Module.smethod_36<string>(247343899u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(ServiceOptions).TypeHandle), ServiceOptions.Parser, new string[] { Module.smethod_36<string>(3859287751u), Module.smethod_35<string>(1892808547u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(MethodOptions).TypeHandle), MethodOptions.Parser, new string[] { Module.smethod_36<string>(3859287751u), Module.smethod_36<string>(247343899u) }, null, null, null), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(UninterpretedOption).TypeHandle), UninterpretedOption.Parser, new string[] { Module.smethod_35<string>(3235769769u), Module.smethod_37<string>(2368441223u), Module.smethod_33<string>(3432734717u), Module.smethod_33<string>(3106783682u), Module.smethod_34<string>(1998246341u), Module.smethod_34<string>(1904509729u), Module.smethod_35<string>(1347248258u) }, null, null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(UninterpretedOption.Types.NamePart).TypeHandle), UninterpretedOption.Types.NamePart.Parser, new string[] { Module.smethod_35<string>(829607303u), Module.smethod_34<string>(4071198316u) }, null, null, null) }), new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(SourceCodeInfo).TypeHandle), SourceCodeInfo.Parser, new string[] { Module.smethod_33<string>(4142240628u) }, null, null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(DescriptorReflection.smethod_2(typeof(SourceCodeInfo.Types.Location).TypeHandle), SourceCodeInfo.Types.Location.Parser, new string[] { Module.smethod_34<string>(1060880221u), Module.smethod_34<string>(3161495563u), Module.smethod_35<string>(1599088902u), Module.smethod_36<string>(3569917571u) }, null, null, null) }) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Constants.Movement/MovementFlagMask.cs using System; namespace Framework.Constants.Movement { [Flags] public enum MovementFlagMask { FreeLook = 0, MovePlayer = 3, StrafePlayer = 12, TurnPlayer = 48, PitchPlayer = 192 } } <file_sep>/Bgs.Protocol.Config/RpcConfigReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Config { [DebuggerNonUserCode] public static class RpcConfigReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return RpcConfigReflection.descriptor; } } static RpcConfigReflection() { RpcConfigReflection.descriptor = FileDescriptor.FromGeneratedCode(RpcConfigReflection.smethod_1(RpcConfigReflection.smethod_0(new string[] { Module.smethod_34<string>(3423012927u), Module.smethod_34<string>(3797959375u), Module.smethod_34<string>(2673120031u), Module.smethod_37<string>(320809096u), Module.smethod_33<string>(2742090925u), Module.smethod_36<string>(2287195148u), Module.smethod_37<string>(174686488u), Module.smethod_34<string>(1548280687u), Module.smethod_37<string>(1372608952u), Module.smethod_35<string>(911305036u), Module.smethod_33<string>(1923934669u), Module.smethod_34<string>(48494895u), Module.smethod_37<string>(466931704u), Module.smethod_37<string>(2015454120u), Module.smethod_34<string>(2468729951u), Module.smethod_34<string>(2843676399u), Module.smethod_36<string>(1893541884u), Module.smethod_37<string>(116331752u) })), new FileDescriptor[0], new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(RpcConfigReflection.smethod_2(typeof(RPCMethodConfig).TypeHandle), RPCMethodConfig.Parser, new string[] { Module.smethod_34<string>(902870914u), Module.smethod_34<string>(1184080750u), Module.smethod_33<string>(114810634u), Module.smethod_37<string>(496168014u), Module.smethod_37<string>(3651655995u), Module.smethod_36<string>(4014954761u), Module.smethod_36<string>(3135104685u), Module.smethod_33<string>(172414475u), Module.smethod_36<string>(2793592963u), Module.smethod_37<string>(4265176440u), Module.smethod_36<string>(998059079u), Module.smethod_37<string>(379252245u), Module.smethod_34<string>(3604315806u), Module.smethod_33<string>(3565293649u), Module.smethod_34<string>(3461010063u) }, null, null, null), new GeneratedCodeInfo(RpcConfigReflection.smethod_2(typeof(RPCMeterConfig).TypeHandle), RPCMeterConfig.Parser, new string[] { Module.smethod_37<string>(4209061500u), Module.smethod_36<string>(588098005u), Module.smethod_34<string>(2413403217u), Module.smethod_36<string>(2637168337u), Module.smethod_37<string>(1197338447u) }, null, null, null), new GeneratedCodeInfo(RpcConfigReflection.smethod_2(typeof(ProtocolAlias).TypeHandle), ProtocolAlias.Parser, new string[] { Module.smethod_33<string>(3099416453u), Module.smethod_35<string>(2394429566u) }, null, null, null), new GeneratedCodeInfo(RpcConfigReflection.smethod_2(typeof(ServiceAliases).TypeHandle), ServiceAliases.Parser, new string[] { Module.smethod_34<string>(3670389051u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Constants.Objects/EquipmentSlots.cs using System; namespace Framework.Constants.Objects { public enum EquipmentSlots { Head, Neck, Shoulder, Body, Chest, Waist, Legs, Feet, Wrist, Hand, Finger1, Finger2, Trinket1, Trinket2, Back, MainHand, OffHand, Ranged, Tabard } } <file_sep>/Bgs.Protocol/SendInvitationResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class SendInvitationResponse : IMessage<SendInvitationResponse>, IEquatable<SendInvitationResponse>, IDeepCloneable<SendInvitationResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SendInvitationResponse.__c __9 = new SendInvitationResponse.__c(); internal SendInvitationResponse cctor>b__24_0() { return new SendInvitationResponse(); } } private static readonly MessageParser<SendInvitationResponse> _parser = new MessageParser<SendInvitationResponse>(new Func<SendInvitationResponse>(SendInvitationResponse.__c.__9.<.cctor>b__24_0)); public const int InvitationFieldNumber = 2; private Invitation invitation_; public static MessageParser<SendInvitationResponse> Parser { get { return SendInvitationResponse._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return SendInvitationResponse.Descriptor; } } public Invitation Invitation { get { return this.invitation_; } set { this.invitation_ = value; } } public SendInvitationResponse() { } public SendInvitationResponse(SendInvitationResponse other) : this() { while (true) { IL_44: int arg_2E_0 = 1657710906; while (true) { switch ((arg_2E_0 ^ 884992976) % 3) { case 1: this.Invitation = ((other.invitation_ != null) ? other.Invitation.Clone() : null); arg_2E_0 = 2008036035; continue; case 2: goto IL_44; } return; } } } public SendInvitationResponse Clone() { return new SendInvitationResponse(this); } public override bool Equals(object other) { return this.Equals(other as SendInvitationResponse); } public bool Equals(SendInvitationResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -799886851) % 7) { case 1: return false; case 2: goto IL_3E; case 3: return false; case 4: arg_48_0 = ((!SendInvitationResponse.smethod_0(this.Invitation, other.Invitation)) ? -311008703 : -1166603550); continue; case 5: goto IL_7A; case 6: return true; } break; } return true; IL_3E: arg_48_0 = -1936641338; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1078047457 : -1155175197); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 2488253992u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 2669238039u)) % 4u) { case 0u: goto IL_69; case 1u: num ^= SendInvitationResponse.smethod_1(this.Invitation); arg_4D_0 = (num2 * 1503231475u ^ 695963030u); continue; case 3u: arg_4D_0 = (((this.invitation_ == null) ? 1053878005u : 1861284014u) ^ num2 * 3803070460u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.invitation_ != null) { while (true) { IL_5B: uint arg_3F_0 = 812594939u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 2060839406u)) % 4u) { case 0u: goto IL_5B; case 1u: output.WriteRawTag(18); arg_3F_0 = (num * 768386530u ^ 3487028131u); continue; case 3u: output.WriteMessage(this.Invitation); arg_3F_0 = (num * 3878601901u ^ 2977732207u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.invitation_ != null) { while (true) { IL_46: uint arg_2E_0 = 978929698u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 1549666783u)) % 3u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Invitation); arg_2E_0 = (num2 * 2207499234u ^ 3366098488u); continue; case 2u: goto IL_46; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(SendInvitationResponse other) { if (other == null) { goto IL_2D; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 1117200954u)) % 7u) { case 0u: goto IL_B1; case 1u: this.invitation_ = new Invitation(); arg_7A_0 = (num * 2612508560u ^ 3564039130u); continue; case 2u: arg_7A_0 = (((this.invitation_ == null) ? 708039692u : 1288204934u) ^ num * 3166136370u); continue; case 3u: goto IL_2D; case 4u: this.Invitation.MergeFrom(other.Invitation); arg_7A_0 = 1183684380u; continue; case 5u: return; } break; } return; IL_2D: arg_7A_0 = 707008351u; goto IL_75; IL_B1: arg_7A_0 = ((other.invitation_ == null) ? 1183684380u : 958193940u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) != 0u) ? 381900891u : 1163231807u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 1760262813u)) % 9u) { case 1u: input.ReadMessage(this.invitation_); arg_B3_0 = 1066913849u; continue; case 2u: arg_B3_0 = ((num == 18u) ? 1038888405u : 1941290367u); continue; case 3u: this.invitation_ = new Invitation(); arg_B3_0 = (num2 * 3449643963u ^ 188940281u); continue; case 4u: arg_B3_0 = 381900891u; continue; case 5u: arg_B3_0 = ((this.invitation_ == null) ? 782457185u : 292176621u); continue; case 6u: input.SkipLastField(); arg_B3_0 = (num2 * 2397627654u ^ 2994147970u); continue; case 7u: arg_B3_0 = (num2 * 2295918249u ^ 2266950130u); continue; case 8u: goto IL_F3; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountStateTagged.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountStateTagged : IMessage<GameAccountStateTagged>, IEquatable<GameAccountStateTagged>, IDeepCloneable<GameAccountStateTagged>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountStateTagged.__c __9 = new GameAccountStateTagged.__c(); internal GameAccountStateTagged cctor>b__29_0() { return new GameAccountStateTagged(); } } private static readonly MessageParser<GameAccountStateTagged> _parser = new MessageParser<GameAccountStateTagged>(new Func<GameAccountStateTagged>(GameAccountStateTagged.__c.__9.<.cctor>b__29_0)); public const int GameAccountStateFieldNumber = 1; private GameAccountState gameAccountState_; public const int GameAccountTagsFieldNumber = 2; private GameAccountFieldTags gameAccountTags_; public static MessageParser<GameAccountStateTagged> Parser { get { return GameAccountStateTagged._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[34]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountStateTagged.Descriptor; } } public GameAccountState GameAccountState { get { return this.gameAccountState_; } set { this.gameAccountState_ = value; } } public GameAccountFieldTags GameAccountTags { get { return this.gameAccountTags_; } set { this.gameAccountTags_ = value; } } public GameAccountStateTagged() { } public GameAccountStateTagged(GameAccountStateTagged other) : this() { this.GameAccountState = ((other.gameAccountState_ != null) ? other.GameAccountState.Clone() : null); this.GameAccountTags = ((other.gameAccountTags_ != null) ? other.GameAccountTags.Clone() : null); } public GameAccountStateTagged Clone() { return new GameAccountStateTagged(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountStateTagged); } public bool Equals(GameAccountStateTagged other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 1304958851) % 9) { case 0: arg_77_0 = ((!GameAccountStateTagged.smethod_0(this.GameAccountState, other.GameAccountState)) ? 2071239984 : 70196962); continue; case 1: goto IL_B5; case 2: return true; case 3: return false; case 4: return false; case 5: arg_77_0 = ((!GameAccountStateTagged.smethod_0(this.GameAccountTags, other.GameAccountTags)) ? 307454719 : 1670116908); continue; case 7: goto IL_15; case 8: return false; } break; } return true; IL_15: arg_77_0 = 2013397497; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? 333826408 : 1442790170); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_B2: uint arg_8E_0 = 3905125738u; while (true) { uint num2; switch ((num2 = (arg_8E_0 ^ 4255204237u)) % 6u) { case 1u: arg_8E_0 = (((this.gameAccountState_ != null) ? 3252352532u : 2170787275u) ^ num2 * 3502197694u); continue; case 2u: arg_8E_0 = ((this.gameAccountTags_ == null) ? 4052291921u : 2891865547u); continue; case 3u: goto IL_B2; case 4u: num ^= GameAccountStateTagged.smethod_1(this.GameAccountTags); arg_8E_0 = (num2 * 2375675286u ^ 298949205u); continue; case 5u: num ^= GameAccountStateTagged.smethod_1(this.GameAccountState); arg_8E_0 = (num2 * 698168115u ^ 217555816u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameAccountState_ != null) { goto IL_35; } goto IL_AC; uint arg_79_0; while (true) { IL_74: uint num; switch ((num = (arg_79_0 ^ 1645111295u)) % 6u) { case 1u: output.WriteRawTag(18); arg_79_0 = (num * 971210851u ^ 1799494081u); continue; case 2u: output.WriteRawTag(10); output.WriteMessage(this.GameAccountState); arg_79_0 = (num * 647616801u ^ 4098913464u); continue; case 3u: goto IL_AC; case 4u: goto IL_35; case 5u: output.WriteMessage(this.GameAccountTags); arg_79_0 = (num * 3625714254u ^ 364910795u); continue; } break; } return; IL_35: arg_79_0 = 136466437u; goto IL_74; IL_AC: arg_79_0 = ((this.gameAccountTags_ == null) ? 1007601569u : 1560466400u); goto IL_74; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 2536558851u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 4173770992u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountState); arg_92_0 = (num2 * 283573391u ^ 3644502114u); continue; case 1u: arg_92_0 = (((this.gameAccountState_ == null) ? 3291895973u : 2457454663u) ^ num2 * 1963813333u); continue; case 3u: goto IL_B6; case 4u: arg_92_0 = ((this.gameAccountTags_ != null) ? 3491395009u : 2969894962u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccountTags); arg_92_0 = (num2 * 3391467071u ^ 4151694653u); continue; } return num; } } return num; } public void MergeFrom(GameAccountStateTagged other) { if (other == null) { goto IL_7C; } goto IL_14A; uint arg_102_0; while (true) { IL_FD: uint num; switch ((num = (arg_102_0 ^ 3922801888u)) % 11u) { case 0u: this.GameAccountState.MergeFrom(other.GameAccountState); arg_102_0 = 2862366396u; continue; case 1u: arg_102_0 = (((this.gameAccountState_ == null) ? 741765232u : 1391641675u) ^ num * 3155956642u); continue; case 3u: return; case 4u: this.gameAccountTags_ = new GameAccountFieldTags(); arg_102_0 = (num * 355118143u ^ 2902166665u); continue; case 5u: goto IL_14A; case 6u: arg_102_0 = ((other.gameAccountTags_ != null) ? 3129292557u : 3537774981u); continue; case 7u: goto IL_7C; case 8u: this.gameAccountState_ = new GameAccountState(); arg_102_0 = (num * 835121093u ^ 2006572891u); continue; case 9u: arg_102_0 = (((this.gameAccountTags_ == null) ? 3218850039u : 2675433760u) ^ num * 1402894534u); continue; case 10u: this.GameAccountTags.MergeFrom(other.GameAccountTags); arg_102_0 = 3537774981u; continue; } break; } return; IL_7C: arg_102_0 = 3933840632u; goto IL_FD; IL_14A: arg_102_0 = ((other.gameAccountState_ == null) ? 2862366396u : 2356165016u); goto IL_FD; } public void MergeFrom(CodedInputStream input) { while (true) { IL_199: uint num; uint arg_145_0 = ((num = input.ReadTag()) != 0u) ? 198660265u : 292714018u; while (true) { uint num2; switch ((num2 = (arg_145_0 ^ 1998510890u)) % 14u) { case 0u: arg_145_0 = (num2 * 110825685u ^ 757041961u); continue; case 1u: arg_145_0 = ((this.gameAccountTags_ != null) ? 2101867833u : 463130378u); continue; case 2u: input.ReadMessage(this.gameAccountState_); arg_145_0 = 1718763534u; continue; case 3u: this.gameAccountState_ = new GameAccountState(); arg_145_0 = (num2 * 2143880122u ^ 3978760088u); continue; case 4u: arg_145_0 = 198660265u; continue; case 5u: arg_145_0 = ((this.gameAccountState_ != null) ? 1435517074u : 1055735523u); continue; case 6u: arg_145_0 = (((num != 18u) ? 1145260143u : 2018497365u) ^ num2 * 1056065553u); continue; case 7u: goto IL_199; case 8u: this.gameAccountTags_ = new GameAccountFieldTags(); arg_145_0 = (num2 * 3295020965u ^ 1865035161u); continue; case 9u: arg_145_0 = ((num == 10u) ? 850439345u : 1004637050u); continue; case 11u: input.SkipLastField(); arg_145_0 = (num2 * 1233676987u ^ 4005103191u); continue; case 12u: arg_145_0 = (num2 * 2482412949u ^ 3651284911u); continue; case 13u: input.ReadMessage(this.gameAccountTags_); arg_145_0 = 583327709u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Network.Packets/AuthPacket.cs using Framework.Constants.Net; using Framework.Misc; using System; using System.IO; using System.Text; namespace Framework.Network.Packets { public class AuthPacket { private object stream; private byte bytePart; private byte preByte; private int count; public AuthPacketHeader Header { get; set; } public byte[] Data { get; set; } public int ProcessedBytes { get; set; } public AuthPacket() { while (true) { IL_42: uint arg_2A_0 = 575686330u; while (true) { uint num; switch ((num = (arg_2A_0 ^ 1375028428u)) % 3u) { case 1u: this.stream = AuthPacket.smethod_1(AuthPacket.smethod_0()); arg_2A_0 = (num * 3148369998u ^ 2997472847u); continue; case 2u: goto IL_42; } return; } } } public AuthPacket(byte[] data, int size) { while (true) { IL_C9: uint arg_A5_0 = 1445719530u; while (true) { uint num; switch ((num = (arg_A5_0 ^ 859620147u)) % 6u) { case 1u: this.Header.Message = this.Read<byte>(6); arg_A5_0 = (num * 1334912898u ^ 628600217u); continue; case 2u: arg_A5_0 = ((this.Read<bool>(1) ? 393606493u : 137688773u) ^ num * 4214401147u); continue; case 3u: this.stream = AuthPacket.smethod_3(AuthPacket.smethod_2(data)); this.Header = new AuthPacketHeader(); arg_A5_0 = (num * 515657235u ^ 1769185713u); continue; case 4u: this.Header.Channel = (AuthChannel)this.Read<byte>(4); arg_A5_0 = (num * 2930748750u ^ 179895641u); continue; case 5u: goto IL_C9; } goto Block_2; } } Block_2: this.Data = new byte[size]; AuthPacket.smethod_4(data, 0, this.Data, 0, size); } public AuthPacket(AuthServerMessage message, AuthChannel channel = AuthChannel.None) { while (true) { IL_111: uint arg_E5_0 = 4169648401u; while (true) { uint num; switch ((num = (arg_E5_0 ^ 2523131924u)) % 8u) { case 0u: goto IL_111; case 2u: this.Header = new AuthPacketHeader(); arg_E5_0 = (num * 4138080164u ^ 2675252904u); continue; case 3u: this.Write<byte>((byte)this.Header.Channel, 4); arg_E5_0 = (num * 3127461979u ^ 2628254444u); continue; case 4u: this.Header.Message = (byte)message; arg_E5_0 = (num * 1888841257u ^ 182257382u); continue; case 5u: this.stream = AuthPacket.smethod_1(AuthPacket.smethod_0()); arg_E5_0 = (num * 4268182235u ^ 1808986985u); continue; case 6u: { this.Header.Channel = channel; bool flag = channel > AuthChannel.None; this.Write<byte>(this.Header.Message, 6); arg_E5_0 = (num * 1702613302u ^ 3433456695u); continue; } case 7u: { bool flag; this.Write<bool>(flag, 1); arg_E5_0 = (((!flag) ? 1611924362u : 28007344u) ^ num * 3110452489u); continue; } } return; } } } public void Finish() { BinaryWriter binaryWriter_ = this.stream as BinaryWriter; this.Data = new byte[AuthPacket.smethod_6(AuthPacket.smethod_5(binaryWriter_))]; AuthPacket.smethod_7(AuthPacket.smethod_5(binaryWriter_), 0L, SeekOrigin.Begin); while (true) { IL_E1: uint arg_B9_0 = 1466481927u; while (true) { uint num; switch ((num = (arg_B9_0 ^ 1551557017u)) % 7u) { case 0u: arg_B9_0 = (num * 2253729810u ^ 227172829u); continue; case 2u: { int num2; arg_B9_0 = ((num2 < this.Data.Length) ? 2122156349u : 255820720u); continue; } case 3u: AuthPacket.smethod_9(binaryWriter_); arg_B9_0 = (num * 567103296u ^ 58757299u); continue; case 4u: goto IL_E1; case 5u: { int num2; this.Data[num2] = (byte)AuthPacket.smethod_8(AuthPacket.smethod_5(binaryWriter_)); num2++; arg_B9_0 = 1863802127u; continue; } case 6u: { int num2 = 0; arg_B9_0 = (num * 2791334335u ^ 1099283738u); continue; } } return; } } } public T Read<T>() { BinaryReader expr_0B = this.stream as BinaryReader; if (expr_0B == null) { throw AuthPacket.smethod_10(""); } return expr_0B.Read<T>(); } public byte[] Read(int count) { BinaryReader expr_0B = this.stream as BinaryReader; if (expr_0B == null) { throw AuthPacket.smethod_10(""); } this.ProcessedBytes += count; return AuthPacket.smethod_11(expr_0B, count); } public string ReadString(int count) { return AuthPacket.smethod_13(AuthPacket.smethod_12(), this.Read(count)); } public T Read<T>(int bits) { ulong num = 0uL; int num2 = 0; while (true) { IL_174: uint arg_137_0 = 3555674250u; while (true) { uint num3; switch ((num3 = (arg_137_0 ^ 3548092431u)) % 12u) { case 0u: arg_137_0 = (((num2 < bits) ? 1393347338u : 1826137086u) ^ num3 * 3315800535u); continue; case 1u: num2 = bits; arg_137_0 = (num3 * 2296605026u ^ 3989491448u); continue; case 2u: goto IL_174; case 3u: this.bytePart = this.Read<byte>(); arg_137_0 = (num3 * 1061505809u ^ 2825260414u); continue; case 5u: bits -= num2; arg_137_0 = 3196994772u; continue; case 6u: arg_137_0 = ((this.count % 8 != 0) ? 2688345364u : 3582494364u); continue; case 7u: { int num4; num |= (ulong)((ulong)(this.bytePart >> num4 & (int)((byte)(1 << num2) - 1)) << bits); this.count += num2; arg_137_0 = (num3 * 711456157u ^ 1145706872u); continue; } case 8u: arg_137_0 = ((bits != 0) ? 3190377533u : 3490406871u); continue; case 9u: arg_137_0 = (num3 * 4100535845u ^ 100802830u); continue; case 10u: this.ProcessedBytes++; arg_137_0 = (num3 * 1932297174u ^ 2224319960u); continue; case 11u: { int num4 = this.count & 7; num2 = 8 - num4; arg_137_0 = 3565036863u; continue; } } goto Block_4; } } Block_4: return (T)((object)AuthPacket.smethod_15(num, AuthPacket.smethod_14(typeof(T).TypeHandle))); } public string ReadFourCC() { byte[] array = AuthPacket.smethod_16(this.Read<uint>(32)); while (true) { IL_40: uint arg_28_0 = 1971614857u; while (true) { uint num; switch ((num = (arg_28_0 ^ 546170987u)) % 3u) { case 0u: goto IL_40; case 2u: AuthPacket.smethod_17(array); arg_28_0 = (num * 568442981u ^ 4157547354u); continue; } goto Block_1; } } Block_1: return AuthPacket.smethod_18(AuthPacket.smethod_13(AuthPacket.smethod_12(), array), new char[1]); } public void Write<T>(T value) { BinaryWriter binaryWriter = this.stream as BinaryWriter; while (true) { IL_1FB: uint arg_18E_0 = 3721335647u; while (true) { uint num; switch ((num = (arg_18E_0 ^ 3850814296u)) % 24u) { case 0u: return; case 1u: goto IL_107; case 2u: goto IL_14F; case 3u: this.Flush(); arg_18E_0 = (num * 825481829u ^ 3064178000u); continue; case 4u: goto IL_11F; case 5u: goto IL_137; case 6u: arg_18E_0 = (num * 4014390826u ^ 3274484134u); continue; case 7u: { TypeCode typeCode; switch (typeCode) { case TypeCode.SByte: goto IL_234; case TypeCode.Byte: goto IL_107; case TypeCode.Int16: goto IL_94; case TypeCode.UInt16: goto IL_20F; case TypeCode.Int32: goto IL_11F; case TypeCode.UInt32: goto IL_137; case TypeCode.Int64: goto IL_222; case TypeCode.UInt64: goto IL_247; case TypeCode.Single: goto IL_14F; default: arg_18E_0 = (num * 2762671822u ^ 313630772u); continue; } break; } case 8u: return; case 9u: goto IL_204; case 10u: goto IL_20F; case 11u: return; case 12u: { TypeCode typeCode = AuthPacket.smethod_19(AuthPacket.smethod_14(typeof(T).TypeHandle)); arg_18E_0 = 2367109391u; continue; } case 13u: goto IL_94; case 14u: goto IL_222; case 15u: { byte[] byte_ = value as byte[]; AuthPacket.smethod_39(binaryWriter, byte_); arg_18E_0 = (num * 3201777706u ^ 281211471u); continue; } case 16u: goto IL_234; case 18u: arg_18E_0 = ((!AuthPacket.smethod_38(AuthPacket.smethod_14(typeof(T).TypeHandle), AuthPacket.smethod_14(typeof(byte[]).TypeHandle))) ? 2322063593u : 3547962235u); continue; case 19u: goto IL_1FB; case 20u: goto IL_247; case 21u: return; case 22u: return; case 23u: arg_18E_0 = (((binaryWriter != null) ? 3400374826u : 2994678575u) ^ num * 3971327378u); continue; } goto Block_4; IL_94: AuthPacket.smethod_25(binaryWriter, AuthPacket.smethod_24(value)); arg_18E_0 = 2155509429u; continue; IL_107: AuthPacket.smethod_23(binaryWriter, AuthPacket.smethod_22(value)); arg_18E_0 = 3704779824u; continue; IL_11F: AuthPacket.smethod_29(binaryWriter, AuthPacket.smethod_28(value)); arg_18E_0 = 3309188710u; continue; IL_137: AuthPacket.smethod_31(binaryWriter, AuthPacket.smethod_30(value)); arg_18E_0 = 2848762291u; continue; IL_14F: AuthPacket.smethod_37(binaryWriter, AuthPacket.smethod_36(value)); arg_18E_0 = 2335994440u; } } Block_4: return; IL_204: throw AuthPacket.smethod_10(""); IL_20F: AuthPacket.smethod_27(binaryWriter, AuthPacket.smethod_26(value)); return; IL_222: AuthPacket.smethod_33(binaryWriter, AuthPacket.smethod_32(value)); return; IL_234: AuthPacket.smethod_21(binaryWriter, AuthPacket.smethod_20(value)); return; IL_247: AuthPacket.smethod_35(binaryWriter, AuthPacket.smethod_34(value)); } public void Write<T>(T value, int bits) { BinaryWriter binaryWriter_ = this.stream as BinaryWriter; int num = 0; int num2 = 0; byte value2; while (true) { IL_236: uint arg_1EC_0 = 3853054254u; while (true) { uint num3; switch ((num3 = (arg_1EC_0 ^ 3822343185u)) % 15u) { case 0u: this.preByte = 0; arg_1EC_0 = (num3 * 1308454025u ^ 2360235369u); continue; case 1u: num = bits; arg_1EC_0 = (num3 * 615170171u ^ 1083175457u); continue; case 2u: goto IL_236; case 3u: num2 = (this.count & 7); arg_1EC_0 = ((num2 != 0) ? 4047609542u : 3817100251u); continue; case 4u: num = 8 - num2; arg_1EC_0 = ((num >= bits) ? 2275874581u : 2260975821u); continue; case 5u: arg_1EC_0 = ((bits != 0) ? 2292956640u : 2290361256u); continue; case 6u: arg_1EC_0 = (num3 * 1271639527u ^ 1190542238u); continue; case 7u: arg_1EC_0 = (((num2 != 0) ? 4225350203u : 3087155715u) ^ num3 * 567680321u); continue; case 8u: bits -= num; arg_1EC_0 = (num3 * 1418491570u ^ 710958391u); continue; case 9u: this.Write<byte>(value2); arg_1EC_0 = 3397105997u; continue; case 10u: { Stream expr_D1 = AuthPacket.smethod_5(binaryWriter_); AuthPacket.smethod_41(expr_D1, AuthPacket.smethod_40(expr_D1) - 1L); arg_1EC_0 = (num3 * 2093632183u ^ 3005065087u); continue; } case 12u: { ulong num4; value2 = (byte)(((ulong)this.preByte & (ulong)(~(ulong)((1L << (num & 31)) - 1L << (num2 & 31)))) | (num4 >> bits - num & (ulong)((long)((1 << num) - 1))) << num2); this.count += num; arg_1EC_0 = 3527270891u; continue; } case 13u: { ulong num4 = (ulong)AuthPacket.smethod_15(value, AuthPacket.smethod_14(typeof(ulong).TypeHandle)); value2 = 0; arg_1EC_0 = (num3 * 2889322655u ^ 1901488133u); continue; } case 14u: arg_1EC_0 = (((AuthPacket.smethod_6(AuthPacket.smethod_5(binaryWriter_)) <= 0L) ? 1517721775u : 1685766937u) ^ num3 * 506475948u); continue; } goto Block_6; } } Block_6: this.preByte = value2; } public void Flush() { int num = 8 - (this.count & 7); if (num < 8) { while (true) { IL_43: uint arg_2B_0 = 1476457130u; while (true) { uint num2; switch ((num2 = (arg_2B_0 ^ 1174923224u)) % 3u) { case 1u: this.Write<int>(0, num); arg_2B_0 = (num2 * 3963131986u ^ 3346701059u); continue; case 2u: goto IL_43; } goto Block_2; } } Block_2:; } this.preByte = 0; } public void WriteString(string data, int bits, bool isCString = true, int additionalCount = 0) { byte[] array = AuthPacket.smethod_42(AuthPacket.smethod_12(), data); while (true) { IL_BA: uint arg_92_0 = 88256940u; while (true) { uint num; switch ((num = (arg_92_0 ^ 1145632018u)) % 7u) { case 1u: this.Write<int>(array.Length + additionalCount, bits); arg_92_0 = (num * 3933157738u ^ 3858785379u); continue; case 2u: this.Flush(); arg_92_0 = 1411661349u; continue; case 3u: this.Write<byte[]>(array); arg_92_0 = (num * 3707020536u ^ 2244404174u); continue; case 4u: goto IL_BA; case 5u: arg_92_0 = (((!isCString) ? 3123080973u : 3522398342u) ^ num * 866731608u); continue; case 6u: this.Write<byte[]>(new byte[1]); arg_92_0 = (num * 4187764293u ^ 4101948329u); continue; } return; } } } public void WriteFourCC(string data) { byte[] value = AuthPacket.smethod_42(AuthPacket.smethod_12(), data); while (true) { IL_3F: uint arg_27_0 = 2115914845u; while (true) { uint num; switch ((num = (arg_27_0 ^ 427277530u)) % 3u) { case 1u: this.Write<byte[]>(value); arg_27_0 = (num * 1839703030u ^ 159873758u); continue; case 2u: goto IL_3F; } return; } } } static MemoryStream smethod_0() { return new MemoryStream(); } static BinaryWriter smethod_1(Stream stream_0) { return new BinaryWriter(stream_0); } static MemoryStream smethod_2(byte[] byte_0) { return new MemoryStream(byte_0); } static BinaryReader smethod_3(Stream stream_0) { return new BinaryReader(stream_0); } static void smethod_4(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static Stream smethod_5(BinaryWriter binaryWriter_0) { return binaryWriter_0.BaseStream; } static long smethod_6(Stream stream_0) { return stream_0.Length; } static long smethod_7(Stream stream_0, long long_0, SeekOrigin seekOrigin_0) { return stream_0.Seek(long_0, seekOrigin_0); } static int smethod_8(Stream stream_0) { return stream_0.ReadByte(); } static void smethod_9(BinaryWriter binaryWriter_0) { binaryWriter_0.Dispose(); } static InvalidOperationException smethod_10(string string_0) { return new InvalidOperationException(string_0); } static byte[] smethod_11(BinaryReader binaryReader_0, int int_0) { return binaryReader_0.ReadBytes(int_0); } static Encoding smethod_12() { return Encoding.UTF8; } static string smethod_13(Encoding encoding_0, byte[] byte_0) { return encoding_0.GetString(byte_0); } static Type smethod_14(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static object smethod_15(object object_0, Type type_0) { return Convert.ChangeType(object_0, type_0); } static byte[] smethod_16(uint uint_0) { return BitConverter.GetBytes(uint_0); } static void smethod_17(Array array_0) { Array.Reverse(array_0); } static string smethod_18(string string_0, char[] char_0) { return string_0.Trim(char_0); } static TypeCode smethod_19(Type type_0) { return Type.GetTypeCode(type_0); } static sbyte smethod_20(object object_0) { return Convert.ToSByte(object_0); } static void smethod_21(BinaryWriter binaryWriter_0, sbyte sbyte_0) { binaryWriter_0.Write(sbyte_0); } static byte smethod_22(object object_0) { return Convert.ToByte(object_0); } static void smethod_23(BinaryWriter binaryWriter_0, byte byte_0) { binaryWriter_0.Write(byte_0); } static short smethod_24(object object_0) { return Convert.ToInt16(object_0); } static void smethod_25(BinaryWriter binaryWriter_0, short short_0) { binaryWriter_0.Write(short_0); } static ushort smethod_26(object object_0) { return Convert.ToUInt16(object_0); } static void smethod_27(BinaryWriter binaryWriter_0, ushort ushort_0) { binaryWriter_0.Write(ushort_0); } static int smethod_28(object object_0) { return Convert.ToInt32(object_0); } static void smethod_29(BinaryWriter binaryWriter_0, int int_0) { binaryWriter_0.Write(int_0); } static uint smethod_30(object object_0) { return Convert.ToUInt32(object_0); } static void smethod_31(BinaryWriter binaryWriter_0, uint uint_0) { binaryWriter_0.Write(uint_0); } static long smethod_32(object object_0) { return Convert.ToInt64(object_0); } static void smethod_33(BinaryWriter binaryWriter_0, long long_0) { binaryWriter_0.Write(long_0); } static ulong smethod_34(object object_0) { return Convert.ToUInt64(object_0); } static void smethod_35(BinaryWriter binaryWriter_0, ulong ulong_0) { binaryWriter_0.Write(ulong_0); } static float smethod_36(object object_0) { return Convert.ToSingle(object_0); } static void smethod_37(BinaryWriter binaryWriter_0, float float_0) { binaryWriter_0.Write(float_0); } static bool smethod_38(Type type_0, Type type_1) { return type_0 == type_1; } static void smethod_39(BinaryWriter binaryWriter_0, byte[] byte_0) { binaryWriter_0.Write(byte_0); } static long smethod_40(Stream stream_0) { return stream_0.Position; } static void smethod_41(Stream stream_0, long long_0) { stream_0.Position = long_0; } static byte[] smethod_42(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } } } <file_sep>/Bgs.Protocol.Channel.V1/ListChannelsOptions.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class ListChannelsOptions : IMessage<ListChannelsOptions>, IEquatable<ListChannelsOptions>, IDeepCloneable<ListChannelsOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ListChannelsOptions.__c __9 = new ListChannelsOptions.__c(); internal ListChannelsOptions cctor>b__59_0() { return new ListChannelsOptions(); } } private static readonly MessageParser<ListChannelsOptions> _parser = new MessageParser<ListChannelsOptions>(new Func<ListChannelsOptions>(ListChannelsOptions.__c.__9.<.cctor>b__59_0)); public const int StartIndexFieldNumber = 1; private uint startIndex_; public const int MaxResultsFieldNumber = 2; private uint maxResults_; public const int NameFieldNumber = 3; private string name_ = ""; public const int ProgramFieldNumber = 4; private uint program_; public const int LocaleFieldNumber = 5; private uint locale_; public const int CapacityFullFieldNumber = 6; private uint capacityFull_; public const int AttributeFilterFieldNumber = 7; private AttributeFilter attributeFilter_; public const int ChannelTypeFieldNumber = 8; private string channelType_ = ""; public static MessageParser<ListChannelsOptions> Parser { get { return ListChannelsOptions._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ListChannelsOptions.Descriptor; } } public uint StartIndex { get { return this.startIndex_; } set { this.startIndex_ = value; } } public uint MaxResults { get { return this.maxResults_; } set { this.maxResults_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public uint Locale { get { return this.locale_; } set { this.locale_ = value; } } public uint CapacityFull { get { return this.capacityFull_; } set { this.capacityFull_ = value; } } public AttributeFilter AttributeFilter { get { return this.attributeFilter_; } set { this.attributeFilter_ = value; } } public string ChannelType { get { return this.channelType_; } set { this.channelType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public ListChannelsOptions() { } public ListChannelsOptions(ListChannelsOptions other) : this() { while (true) { IL_B7: uint arg_97_0 = 3325570453u; while (true) { uint num; switch ((num = (arg_97_0 ^ 2644902632u)) % 5u) { case 0u: this.capacityFull_ = other.capacityFull_; this.AttributeFilter = ((other.attributeFilter_ != null) ? other.AttributeFilter.Clone() : null); arg_97_0 = 3787716722u; continue; case 1u: this.startIndex_ = other.startIndex_; this.maxResults_ = other.maxResults_; this.name_ = other.name_; arg_97_0 = (num * 1008692473u ^ 1456313509u); continue; case 2u: this.program_ = other.program_; this.locale_ = other.locale_; arg_97_0 = (num * 2526046404u ^ 4176921743u); continue; case 3u: goto IL_B7; } goto Block_2; } } Block_2: this.channelType_ = other.channelType_; } public ListChannelsOptions Clone() { return new ListChannelsOptions(this); } public override bool Equals(object other) { return this.Equals(other as ListChannelsOptions); } public bool Equals(ListChannelsOptions other) { if (other == null) { goto IL_120; } goto IL_1E6; int arg_178_0; while (true) { IL_173: switch ((arg_178_0 ^ -943803855) % 21) { case 0: return true; case 1: arg_178_0 = ((this.Program != other.Program) ? -2021084905 : -1126683269); continue; case 2: arg_178_0 = ((this.MaxResults != other.MaxResults) ? -1604307183 : -723244386); continue; case 3: goto IL_120; case 4: return false; case 5: return false; case 6: arg_178_0 = ((this.CapacityFull != other.CapacityFull) ? -1641926169 : -2127954822); continue; case 7: goto IL_1E6; case 8: arg_178_0 = ((this.Locale == other.Locale) ? -131929152 : -1679363161); continue; case 9: return false; case 11: arg_178_0 = (ListChannelsOptions.smethod_0(this.ChannelType, other.ChannelType) ? -652720936 : -615261505); continue; case 12: return false; case 13: return false; case 14: arg_178_0 = ((this.StartIndex == other.StartIndex) ? -1723999604 : -383912141); continue; case 15: return false; case 16: arg_178_0 = (ListChannelsOptions.smethod_0(this.Name, other.Name) ? -1989645911 : -2039723548); continue; case 17: arg_178_0 = (ListChannelsOptions.smethod_1(this.AttributeFilter, other.AttributeFilter) ? -96227881 : -1698424902); continue; case 18: return false; case 19: return false; case 20: return false; } break; } return true; IL_120: arg_178_0 = -1008614805; goto IL_173; IL_1E6: arg_178_0 = ((other == this) ? -148893023 : -1618358983); goto IL_173; } public override int GetHashCode() { int num = 1; if (this.StartIndex != 0u) { goto IL_14F; } goto IL_236; uint arg_1DE_0; while (true) { IL_1D9: uint num2; switch ((num2 = (arg_1DE_0 ^ 1064501087u)) % 15u) { case 0u: arg_1DE_0 = ((this.CapacityFull == 0u) ? 391078355u : 830643332u); continue; case 1u: arg_1DE_0 = ((this.Program != 0u) ? 1740851690u : 1053956632u); continue; case 2u: num ^= this.CapacityFull.GetHashCode(); arg_1DE_0 = (num2 * 3656263155u ^ 1920470578u); continue; case 3u: num ^= this.MaxResults.GetHashCode(); arg_1DE_0 = (num2 * 1584179355u ^ 4008184443u); continue; case 4u: goto IL_14F; case 5u: num ^= this.StartIndex.GetHashCode(); arg_1DE_0 = (num2 * 1890413766u ^ 1408143051u); continue; case 6u: num ^= this.Name.GetHashCode(); arg_1DE_0 = (num2 * 70363042u ^ 3974991090u); continue; case 8u: goto IL_236; case 9u: num ^= this.AttributeFilter.GetHashCode(); arg_1DE_0 = ((this.ChannelType.Length != 0) ? 1599177317u : 1647880629u); continue; case 10u: arg_1DE_0 = ((this.Name.Length == 0) ? 1745103666u : 1631654591u); continue; case 11u: arg_1DE_0 = ((this.Locale != 0u) ? 1364503252u : 1738662947u); continue; case 12u: num ^= this.Locale.GetHashCode(); arg_1DE_0 = (num2 * 1549355789u ^ 3824481580u); continue; case 13u: num ^= this.Program.GetHashCode(); arg_1DE_0 = (num2 * 2781385531u ^ 3717533871u); continue; case 14u: num ^= this.ChannelType.GetHashCode(); arg_1DE_0 = (num2 * 4185499116u ^ 2028960461u); continue; } break; } return num; IL_14F: arg_1DE_0 = 37207508u; goto IL_1D9; IL_236: arg_1DE_0 = ((this.MaxResults != 0u) ? 205425522u : 711710020u); goto IL_1D9; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.StartIndex != 0u) { goto IL_234; } goto IL_2A6; uint arg_23E_0; while (true) { IL_239: uint num; switch ((num = (arg_23E_0 ^ 4060144007u)) % 19u) { case 0u: goto IL_234; case 1u: output.WriteRawTag(58); arg_23E_0 = 2375956189u; continue; case 2u: output.WriteRawTag(16); output.WriteUInt32(this.MaxResults); arg_23E_0 = (num * 2090578025u ^ 2899257598u); continue; case 3u: output.WriteRawTag(66); arg_23E_0 = (num * 2949946763u ^ 619420464u); continue; case 4u: arg_23E_0 = ((this.Program == 0u) ? 2254195981u : 3889924566u); continue; case 5u: output.WriteRawTag(45); output.WriteFixed32(this.Locale); arg_23E_0 = (num * 3011122707u ^ 4140584205u); continue; case 7u: output.WriteString(this.ChannelType); arg_23E_0 = (num * 1471882319u ^ 2440105804u); continue; case 8u: output.WriteRawTag(26); output.WriteString(this.Name); arg_23E_0 = (num * 441301596u ^ 923459440u); continue; case 9u: output.WriteRawTag(48); arg_23E_0 = (num * 2318753882u ^ 3449675381u); continue; case 10u: goto IL_2A6; case 11u: output.WriteFixed32(this.Program); arg_23E_0 = (num * 1339226718u ^ 3055921497u); continue; case 12u: output.WriteRawTag(8); output.WriteUInt32(this.StartIndex); arg_23E_0 = (num * 1525315782u ^ 2540018246u); continue; case 13u: arg_23E_0 = ((this.Locale != 0u) ? 3116777540u : 3613298292u); continue; case 14u: arg_23E_0 = ((this.CapacityFull != 0u) ? 3110722040u : 3150627041u); continue; case 15u: arg_23E_0 = ((ListChannelsOptions.smethod_2(this.Name) != 0) ? 3880387252u : 2740546340u); continue; case 16u: output.WriteUInt32(this.CapacityFull); arg_23E_0 = (num * 3209139751u ^ 845592877u); continue; case 17u: output.WriteRawTag(37); arg_23E_0 = (num * 2628151050u ^ 3239592539u); continue; case 18u: output.WriteMessage(this.AttributeFilter); arg_23E_0 = (((ListChannelsOptions.smethod_2(this.ChannelType) != 0) ? 2693576053u : 4168565283u) ^ num * 172807682u); continue; } break; } return; IL_234: arg_23E_0 = 3140255784u; goto IL_239; IL_2A6: arg_23E_0 = ((this.MaxResults != 0u) ? 3357757792u : 3469768257u); goto IL_239; } public int CalculateSize() { int num = 0; while (true) { IL_255: uint arg_204_0 = 4075893891u; while (true) { uint num2; switch ((num2 = (arg_204_0 ^ 3487218876u)) % 17u) { case 0u: arg_204_0 = ((this.Locale == 0u) ? 2199617314u : 2855692288u); continue; case 1u: arg_204_0 = (((ListChannelsOptions.smethod_2(this.ChannelType) != 0) ? 2030392519u : 1152532521u) ^ num2 * 182011302u); continue; case 2u: num += 1 + CodedOutputStream.ComputeStringSize(this.ChannelType); arg_204_0 = (num2 * 3254713230u ^ 3067181377u); continue; case 3u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_204_0 = (num2 * 598277745u ^ 1858877272u); continue; case 4u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.StartIndex); arg_204_0 = (num2 * 1176717702u ^ 1149230182u); continue; case 6u: num += 5; arg_204_0 = (num2 * 974566898u ^ 795441818u); continue; case 7u: goto IL_255; case 8u: num += 5; arg_204_0 = (num2 * 2674188975u ^ 1405295104u); continue; case 9u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxResults); arg_204_0 = (num2 * 2373208270u ^ 2518526108u); continue; case 10u: arg_204_0 = ((this.CapacityFull != 0u) ? 3306789954u : 2865211491u); continue; case 11u: arg_204_0 = ((this.Program == 0u) ? 2545103035u : 2470778633u); continue; case 12u: arg_204_0 = ((ListChannelsOptions.smethod_2(this.Name) == 0) ? 2158510260u : 3722541072u); continue; case 13u: arg_204_0 = ((this.MaxResults != 0u) ? 3938021451u : 2231225950u); continue; case 14u: arg_204_0 = (((this.StartIndex == 0u) ? 1686377021u : 1983313889u) ^ num2 * 4119093113u); continue; case 15u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.CapacityFull); arg_204_0 = (num2 * 2596663229u ^ 3885356517u); continue; case 16u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AttributeFilter); arg_204_0 = 2198724353u; continue; } return num; } } return num; } public void MergeFrom(ListChannelsOptions other) { if (other == null) { goto IL_9F; } goto IL_2C8; uint arg_258_0; while (true) { IL_253: uint num; switch ((num = (arg_258_0 ^ 4105045435u)) % 21u) { case 0u: arg_258_0 = ((ListChannelsOptions.smethod_2(other.ChannelType) == 0) ? 2355860090u : 3114016056u); continue; case 1u: this.AttributeFilter.MergeFrom(other.AttributeFilter); arg_258_0 = 4212222669u; continue; case 2u: arg_258_0 = (((this.attributeFilter_ != null) ? 679618758u : 294125222u) ^ num * 2024246580u); continue; case 3u: arg_258_0 = ((other.Program != 0u) ? 2825710528u : 3713110160u); continue; case 4u: this.CapacityFull = other.CapacityFull; arg_258_0 = (num * 1719051169u ^ 2756419611u); continue; case 5u: goto IL_2C8; case 6u: this.attributeFilter_ = new AttributeFilter(); arg_258_0 = (num * 3668562634u ^ 2631529624u); continue; case 7u: arg_258_0 = ((other.attributeFilter_ != null) ? 3264778934u : 4212222669u); continue; case 8u: this.Program = other.Program; arg_258_0 = (num * 3810557539u ^ 1819497217u); continue; case 9u: arg_258_0 = ((ListChannelsOptions.smethod_2(other.Name) == 0) ? 3506446620u : 2618466495u); continue; case 10u: return; case 11u: this.MaxResults = other.MaxResults; arg_258_0 = (num * 3368549554u ^ 188982307u); continue; case 12u: this.ChannelType = other.ChannelType; arg_258_0 = (num * 810682312u ^ 2611947810u); continue; case 13u: this.Locale = other.Locale; arg_258_0 = (num * 3718110149u ^ 4038999092u); continue; case 14u: arg_258_0 = ((other.Locale != 0u) ? 3194552601u : 2378767006u); continue; case 15u: goto IL_9F; case 17u: this.Name = other.Name; arg_258_0 = (num * 1475222873u ^ 1560212344u); continue; case 18u: this.StartIndex = other.StartIndex; arg_258_0 = (num * 3645300672u ^ 2746318202u); continue; case 19u: arg_258_0 = ((other.CapacityFull != 0u) ? 2705785204u : 3008262964u); continue; case 20u: arg_258_0 = ((other.MaxResults == 0u) ? 3605418415u : 3495784845u); continue; } break; } return; IL_9F: arg_258_0 = 3472454790u; goto IL_253; IL_2C8: arg_258_0 = ((other.StartIndex == 0u) ? 3897635770u : 3008556542u); goto IL_253; } public void MergeFrom(CodedInputStream input) { while (true) { IL_3F7: uint num; uint arg_353_0 = ((num = input.ReadTag()) != 0u) ? 153474601u : 2012332127u; while (true) { uint num2; switch ((num2 = (arg_353_0 ^ 1144375476u)) % 34u) { case 0u: this.CapacityFull = input.ReadUInt32(); arg_353_0 = 551806783u; continue; case 1u: this.StartIndex = input.ReadUInt32(); arg_353_0 = 712001555u; continue; case 2u: arg_353_0 = (num2 * 4147591553u ^ 675607262u); continue; case 3u: arg_353_0 = (((num != 45u) ? 2052657265u : 1496770542u) ^ num2 * 710135660u); continue; case 4u: this.Program = input.ReadFixed32(); arg_353_0 = 711955894u; continue; case 5u: input.ReadMessage(this.attributeFilter_); arg_353_0 = 338811344u; continue; case 6u: arg_353_0 = (num2 * 2403907790u ^ 303144524u); continue; case 7u: arg_353_0 = (num2 * 2559375546u ^ 1568729902u); continue; case 8u: arg_353_0 = (num2 * 396764355u ^ 2753171277u); continue; case 9u: arg_353_0 = (num2 * 1779498436u ^ 138330527u); continue; case 10u: arg_353_0 = (num2 * 3390951969u ^ 2907225388u); continue; case 11u: arg_353_0 = (((num == 48u) ? 2405043671u : 3445429060u) ^ num2 * 2112564979u); continue; case 12u: arg_353_0 = (((num <= 16u) ? 1946999411u : 2041388189u) ^ num2 * 2883204430u); continue; case 13u: arg_353_0 = ((num != 26u) ? 1755297881u : 1247327042u); continue; case 14u: goto IL_3F7; case 15u: arg_353_0 = (num2 * 1038584718u ^ 3710439538u); continue; case 16u: this.Name = input.ReadString(); arg_353_0 = 338811344u; continue; case 17u: input.SkipLastField(); arg_353_0 = 2089301448u; continue; case 18u: arg_353_0 = (num2 * 2875762275u ^ 1086819762u); continue; case 19u: arg_353_0 = (((num != 37u) ? 2348312541u : 2538647386u) ^ num2 * 2229741636u); continue; case 20u: this.MaxResults = input.ReadUInt32(); arg_353_0 = 1419060738u; continue; case 21u: arg_353_0 = (((num != 66u) ? 5331762u : 1050419436u) ^ num2 * 4099860081u); continue; case 22u: arg_353_0 = ((num == 58u) ? 239127930u : 392277509u); continue; case 23u: this.attributeFilter_ = new AttributeFilter(); arg_353_0 = (num2 * 2843077579u ^ 807775310u); continue; case 24u: arg_353_0 = (((num != 16u) ? 2208785782u : 3011456522u) ^ num2 * 428797899u); continue; case 25u: arg_353_0 = ((num > 37u) ? 1603168644u : 140072164u); continue; case 26u: arg_353_0 = 153474601u; continue; case 27u: this.ChannelType = input.ReadString(); arg_353_0 = 338811344u; continue; case 28u: arg_353_0 = ((this.attributeFilter_ != null) ? 1004299399u : 254606223u); continue; case 29u: arg_353_0 = (((num != 8u) ? 666076826u : 1917107179u) ^ num2 * 617388890u); continue; case 30u: this.Locale = input.ReadFixed32(); arg_353_0 = 1168297658u; continue; case 32u: arg_353_0 = ((num <= 48u) ? 1525965403u : 632180082u); continue; case 33u: arg_353_0 = (num2 * 1489257006u ^ 2144728357u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.Reflection/FileDescriptor.cs using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public sealed class FileDescriptor : IDescriptor { internal FileDescriptorProto Proto { [CompilerGenerated] get { return this.<Proto>k__BackingField; } } public string Name { get { return this.Proto.Name; } } public string Package { get { return this.Proto.Package; } } public IList<MessageDescriptor> MessageTypes { [CompilerGenerated] get { return this.<MessageTypes>k__BackingField; } } public IList<EnumDescriptor> EnumTypes { [CompilerGenerated] get { return this.<EnumTypes>k__BackingField; } } public IList<ServiceDescriptor> Services { [CompilerGenerated] get { return this.<Services>k__BackingField; } } public IList<FileDescriptor> Dependencies { [CompilerGenerated] get { return this.<Dependencies>k__BackingField; } } public IList<FileDescriptor> PublicDependencies { [CompilerGenerated] get { return this.<PublicDependencies>k__BackingField; } } public ByteString SerializedData { [CompilerGenerated] get { return this.<SerializedData>k__BackingField; } } string IDescriptor.FullName { get { return this.Name; } } FileDescriptor IDescriptor.File { get { return this; } } internal DescriptorPool DescriptorPool { [CompilerGenerated] get { return this.<DescriptorPool>k__BackingField; } } public static FileDescriptor DescriptorProtoFileDescriptor { get { return DescriptorReflection.Descriptor; } } private FileDescriptor(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, DescriptorPool pool, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo) { FileDescriptor __4__this; while (true) { IL_113: uint arg_E7_0 = 3109136426u; while (true) { uint num; switch ((num = (arg_E7_0 ^ 2557234891u)) % 8u) { case 0u: pool.AddPackage(this.Package, this); arg_E7_0 = (num * 1105332455u ^ 1354664894u); continue; case 1u: __4__this = this; arg_E7_0 = (num * 4125576103u ^ 2241118048u); continue; case 2u: this.<Dependencies>k__BackingField = new ReadOnlyCollection<FileDescriptor>((FileDescriptor[])FileDescriptor.smethod_0(dependencies)); this.<PublicDependencies>k__BackingField = FileDescriptor.DeterminePublicDependencies(this, proto, dependencies, allowUnknownDependencies); arg_E7_0 = (num * 2070285500u ^ 1583842795u); continue; case 3u: goto IL_113; case 4u: this.<SerializedData>k__BackingField = descriptorData; arg_E7_0 = (num * 559784837u ^ 3768172688u); continue; case 5u: this.<MessageTypes>k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly<DescriptorProto, MessageDescriptor>(proto.MessageType, (DescriptorProto message, int index) => new MessageDescriptor(message, __4__this, null, index, generatedCodeInfo.NestedTypes[index])); arg_E7_0 = (num * 3261531694u ^ 3702070131u); continue; case 7u: this.<DescriptorPool>k__BackingField = pool; this.<Proto>k__BackingField = proto; arg_E7_0 = (num * 2550378934u ^ 3723757811u); continue; } goto Block_1; } } Block_1: this.<EnumTypes>k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly<EnumDescriptorProto, EnumDescriptor>(proto.EnumType, (EnumDescriptorProto enumType, int index) => new EnumDescriptor(enumType, __4__this, null, index, generatedCodeInfo.NestedEnums[index])); this.<Services>k__BackingField = DescriptorUtil.ConvertAndMakeReadOnly<ServiceDescriptorProto, ServiceDescriptor>(proto.Service, (ServiceDescriptorProto service, int index) => new ServiceDescriptor(service, this, index)); } internal string ComputeFullName(MessageDescriptor parent, string name) { if (parent == null) { goto IL_46; } IL_12: int arg_1C_0 = -1406984416; IL_17: switch ((arg_1C_0 ^ -1811609614) % 5) { case 0: IL_46: arg_1C_0 = ((FileDescriptor.smethod_2(this.Package) <= 0) ? -1756364047 : -1888255348); goto IL_17; case 2: goto IL_12; case 3: return FileDescriptor.smethod_1(parent.FullName, Module.smethod_36<string>(1323488018u), name); case 4: return FileDescriptor.smethod_1(this.Package, Module.smethod_37<string>(3886401134u), name); } return name; } private static IList<FileDescriptor> DeterminePublicDependencies(FileDescriptor @this, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies) { Dictionary<string, FileDescriptor> dictionary = new Dictionary<string, FileDescriptor>(); List<FileDescriptor> list; string text; while (true) { IL_25F: uint arg_1FD_0 = 1480753851u; while (true) { uint num; switch ((num = (arg_1FD_0 ^ 354656998u)) % 21u) { case 0u: { int num2; arg_1FD_0 = ((num2 < dependencies.Length) ? 755598000u : 1625878074u); continue; } case 1u: { FileDescriptor fileDescriptor; arg_1FD_0 = (((fileDescriptor != null) ? 3503588187u : 2689291383u) ^ num * 269180022u); continue; } case 2u: arg_1FD_0 = (num * 1428810503u ^ 597188103u); continue; case 3u: { int num2; num2++; arg_1FD_0 = (num * 4026010881u ^ 1873699178u); continue; } case 4u: { list = new List<FileDescriptor>(); int num3 = 0; arg_1FD_0 = (num * 172851441u ^ 2057392629u); continue; } case 5u: { int num4; text = proto.Dependency[num4]; arg_1FD_0 = 1182864162u; continue; } case 6u: { int num4; arg_1FD_0 = (((num4 < proto.Dependency.Count) ? 199583157u : 1553389033u) ^ num * 904630291u); continue; } case 7u: { int num2 = 0; arg_1FD_0 = (num * 2059016605u ^ 2886768975u); continue; } case 8u: { FileDescriptor fileDescriptor2; dictionary[fileDescriptor2.Name] = fileDescriptor2; arg_1FD_0 = (num * 2415469140u ^ 158078469u); continue; } case 9u: { FileDescriptor fileDescriptor = dictionary[text]; arg_1FD_0 = (num * 1703034579u ^ 4134718755u); continue; } case 10u: { int num3; num3++; arg_1FD_0 = 1400639947u; continue; } case 11u: goto IL_266; case 13u: goto IL_277; case 14u: { int num3; int num4 = proto.PublicDependency[num3]; arg_1FD_0 = ((num4 < 0) ? 43381538u : 749549455u); continue; } case 15u: arg_1FD_0 = (num * 1315834947u ^ 1640480294u); continue; case 16u: arg_1FD_0 = (((!allowUnknownDependencies) ? 1742178966u : 1225729944u) ^ num * 865084290u); continue; case 17u: { FileDescriptor fileDescriptor; list.Add(fileDescriptor); arg_1FD_0 = 83744118u; continue; } case 18u: { int num2; FileDescriptor fileDescriptor2 = dependencies[num2]; arg_1FD_0 = 266579083u; continue; } case 19u: goto IL_25F; case 20u: { int num3; arg_1FD_0 = ((num3 < proto.PublicDependency.Count) ? 1502489908u : 1152782524u); continue; } } goto Block_7; } } Block_7: goto IL_28F; IL_266: throw new DescriptorValidationException(@this, Module.smethod_34<string>(2614455357u)); IL_277: throw new DescriptorValidationException(@this, FileDescriptor.smethod_3(Module.smethod_35<string>(82095339u), text)); IL_28F: return new ReadOnlyCollection<FileDescriptor>(list); } public T FindTypeByName<T>(string name) where T : class, IDescriptor { if (FileDescriptor.smethod_4(name, '.') != -1) { goto IL_49; } goto IL_FD; uint arg_BD_0; while (true) { IL_B8: uint num; switch ((num = (arg_BD_0 ^ 464370408u)) % 9u) { case 0u: { T t; arg_BD_0 = (((t.File == this) ? 192187766u : 338264466u) ^ num * 343090665u); continue; } case 2u: name = FileDescriptor.smethod_1(this.Package, Module.smethod_36<string>(1323488018u), name); arg_BD_0 = (num * 3152909545u ^ 3774283465u); continue; case 3u: { T t = this.DescriptorPool.FindSymbol<T>(name); arg_BD_0 = 1469809664u; continue; } case 4u: goto IL_FD; case 5u: goto IL_49; case 6u: { T t; return t; } case 7u: { T t; arg_BD_0 = (((t != null) ? 484983571u : 1629139297u) ^ num * 2175120638u); continue; } case 8u: goto IL_11C; } break; } return default(T); IL_11C: return default(T); IL_49: arg_BD_0 = 1699441690u; goto IL_B8; IL_FD: arg_BD_0 = ((FileDescriptor.smethod_2(this.Package) <= 0) ? 1039614224u : 1192626073u); goto IL_B8; } private static FileDescriptor BuildFrom(ByteString descriptorData, FileDescriptorProto proto, FileDescriptor[] dependencies, bool allowUnknownDependencies, GeneratedCodeInfo generatedCodeInfo) { if (dependencies == null) { goto IL_18; } goto IL_122; uint arg_D3_0; FileDescriptor fileDescriptor; int num2; while (true) { IL_CE: uint num; switch ((num = (arg_D3_0 ^ 4161713641u)) % 12u) { case 0u: fileDescriptor.CrossLink(); arg_D3_0 = (num * 1953233347u ^ 2707760628u); continue; case 1u: num2 = 0; arg_D3_0 = 2574715432u; continue; case 2u: num2++; arg_D3_0 = 4243801185u; continue; case 3u: dependencies = new FileDescriptor[0]; arg_D3_0 = (num * 3942966366u ^ 4286440245u); continue; case 4u: arg_D3_0 = ((num2 < proto.Dependency.Count) ? 2982469083u : 3757505837u); continue; case 5u: arg_D3_0 = (num * 314203903u ^ 1276877662u); continue; case 6u: arg_D3_0 = ((!FileDescriptor.smethod_5(dependencies[num2].Name, proto.Dependency[num2])) ? 3773742995u : 2893382989u); continue; case 7u: goto IL_18; case 8u: goto IL_14B; case 10u: goto IL_122; case 11u: goto IL_183; } break; } return fileDescriptor; IL_14B: throw new DescriptorValidationException(fileDescriptor, FileDescriptor.smethod_6(Module.smethod_37<string>(2509052754u), proto.Dependency[num2], Module.smethod_35<string>(3048061080u), dependencies[num2].Name)); IL_183: throw new DescriptorValidationException(fileDescriptor, Module.smethod_33<string>(2639691648u)); IL_18: arg_D3_0 = 3320637418u; goto IL_CE; IL_122: DescriptorPool pool = new DescriptorPool(dependencies); fileDescriptor = new FileDescriptor(descriptorData, proto, dependencies, pool, allowUnknownDependencies, generatedCodeInfo); arg_D3_0 = ((dependencies.Length != proto.Dependency.Count) ? 2984046962u : 2591580144u); goto IL_CE; } private void CrossLink() { IEnumerator<MessageDescriptor> enumerator = this.MessageTypes.GetEnumerator(); try { while (true) { IL_60: int arg_38_0 = (!FileDescriptor.smethod_7(enumerator)) ? -152615990 : -2058392403; while (true) { switch ((arg_38_0 ^ -323940801) % 4) { case 0: arg_38_0 = -2058392403; continue; case 2: enumerator.Current.CrossLink(); arg_38_0 = -393624028; continue; case 3: goto IL_60; } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_A1: uint arg_89_0 = 3921181848u; while (true) { uint num; switch ((num = (arg_89_0 ^ 3971026495u)) % 3u) { case 1u: FileDescriptor.smethod_8(enumerator); arg_89_0 = (num * 3830264196u ^ 519961653u); continue; case 2u: goto IL_A1; } goto Block_8; } } Block_8:; } } IEnumerator<ServiceDescriptor> enumerator2 = this.Services.GetEnumerator(); try { while (true) { IL_109: int arg_E1_0 = (!FileDescriptor.smethod_7(enumerator2)) ? -1638352192 : -1864184730; while (true) { switch ((arg_E1_0 ^ -323940801) % 4) { case 0: arg_E1_0 = -1864184730; continue; case 1: enumerator2.Current.CrossLink(); arg_E1_0 = -584973483; continue; case 2: goto IL_109; } goto Block_10; } } Block_10:; } finally { if (enumerator2 != null) { while (true) { IL_14A: uint arg_132_0 = 3979203725u; while (true) { uint num; switch ((num = (arg_132_0 ^ 3971026495u)) % 3u) { case 0u: goto IL_14A; case 1u: FileDescriptor.smethod_8(enumerator2); arg_132_0 = (num * 2140043047u ^ 1525068915u); continue; } goto Block_14; } } Block_14:; } } } public static FileDescriptor FromGeneratedCode(byte[] descriptorData, FileDescriptor[] dependencies, GeneratedCodeInfo generatedCodeInfo) { FileDescriptorProto fileDescriptorProto; try { fileDescriptorProto = FileDescriptorProto.Parser.ParseFrom(descriptorData); } catch (InvalidProtocolBufferException exception_) { throw FileDescriptor.smethod_9(Module.smethod_36<string>(4196006172u), exception_); } FileDescriptor result; try { result = FileDescriptor.BuildFrom(ByteString.CopyFrom(descriptorData), fileDescriptorProto, dependencies, true, generatedCodeInfo); } catch (DescriptorValidationException exception_2) { throw FileDescriptor.smethod_9(FileDescriptor.smethod_10(Module.smethod_33<string>(3393686726u), new object[] { fileDescriptorProto.Name }), exception_2); } return result; } public override string ToString() { return FileDescriptor.smethod_10(Module.smethod_37<string>(4174461468u), new object[] { this.Name }); } static object smethod_0(Array array_0) { return array_0.Clone(); } static string smethod_1(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } static int smethod_2(string string_0) { return string_0.Length; } static string smethod_3(string string_0, string string_1) { return string_0 + string_1; } static int smethod_4(string string_0, char char_0) { return string_0.IndexOf(char_0); } static bool smethod_5(string string_0, string string_1) { return string_0 != string_1; } static string smethod_6(string string_0, string string_1, string string_2, string string_3) { return string_0 + string_1 + string_2 + string_3; } static bool smethod_7(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_8(IDisposable idisposable_0) { idisposable_0.Dispose(); } static ArgumentException smethod_9(string string_0, Exception exception_0) { return new ArgumentException(string_0, exception_0); } static string smethod_10(string string_0, object[] object_0) { return string.Format(string_0, object_0); } } } <file_sep>/Bgs.Protocol.Account.V1/ParentalControlInfo.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class ParentalControlInfo : IMessage<ParentalControlInfo>, IEquatable<ParentalControlInfo>, IDeepCloneable<ParentalControlInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ParentalControlInfo.__c __9 = new ParentalControlInfo.__c(); internal ParentalControlInfo cctor>b__49_0() { return new ParentalControlInfo(); } } private static readonly MessageParser<ParentalControlInfo> _parser = new MessageParser<ParentalControlInfo>(new Func<ParentalControlInfo>(ParentalControlInfo.__c.__9.<.cctor>b__49_0)); public const int TimezoneFieldNumber = 3; private string timezone_ = ""; public const int MinutesPerDayFieldNumber = 4; private uint minutesPerDay_; public const int MinutesPerWeekFieldNumber = 5; private uint minutesPerWeek_; public const int CanReceiveVoiceFieldNumber = 6; private bool canReceiveVoice_; public const int CanSendVoiceFieldNumber = 7; private bool canSendVoice_; public const int PlayScheduleFieldNumber = 8; private static readonly FieldCodec<bool> _repeated_playSchedule_codec = FieldCodec.ForBool(66u); private readonly RepeatedField<bool> playSchedule_ = new RepeatedField<bool>(); public static MessageParser<ParentalControlInfo> Parser { get { return ParentalControlInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[20]; } } MessageDescriptor IMessage.Descriptor { get { return ParentalControlInfo.Descriptor; } } public string Timezone { get { return this.timezone_; } set { this.timezone_ = Preconditions.CheckNotNull<string>(value, Module.smethod_35<string>(4287036u)); } } public uint MinutesPerDay { get { return this.minutesPerDay_; } set { this.minutesPerDay_ = value; } } public uint MinutesPerWeek { get { return this.minutesPerWeek_; } set { this.minutesPerWeek_ = value; } } public bool CanReceiveVoice { get { return this.canReceiveVoice_; } set { this.canReceiveVoice_ = value; } } public bool CanSendVoice { get { return this.canSendVoice_; } set { this.canSendVoice_ = value; } } public RepeatedField<bool> PlaySchedule { get { return this.playSchedule_; } } public ParentalControlInfo() { } public ParentalControlInfo(ParentalControlInfo other) : this() { this.timezone_ = other.timezone_; this.minutesPerDay_ = other.minutesPerDay_; this.minutesPerWeek_ = other.minutesPerWeek_; this.canReceiveVoice_ = other.canReceiveVoice_; this.canSendVoice_ = other.canSendVoice_; this.playSchedule_ = other.playSchedule_.Clone(); } public ParentalControlInfo Clone() { return new ParentalControlInfo(this); } public override bool Equals(object other) { return this.Equals(other as ParentalControlInfo); } public bool Equals(ParentalControlInfo other) { if (other == null) { goto IL_115; } goto IL_17D; int arg_11F_0; while (true) { IL_11A: switch ((arg_11F_0 ^ 590114685) % 17) { case 0: goto IL_115; case 1: return false; case 2: arg_11F_0 = ((this.CanSendVoice != other.CanSendVoice) ? 1214919115 : 1192928218); continue; case 4: goto IL_17D; case 5: arg_11F_0 = ((this.MinutesPerDay != other.MinutesPerDay) ? 374827048 : 1706902480); continue; case 6: return true; case 7: arg_11F_0 = ((this.MinutesPerWeek != other.MinutesPerWeek) ? 971962667 : 1674710957); continue; case 8: return false; case 9: arg_11F_0 = ((!ParentalControlInfo.smethod_0(this.Timezone, other.Timezone)) ? 1246296646 : 296200013); continue; case 10: arg_11F_0 = ((this.CanReceiveVoice != other.CanReceiveVoice) ? 936810417 : 1184159197); continue; case 11: return false; case 12: return false; case 13: return false; case 14: return false; case 15: arg_11F_0 = ((!this.playSchedule_.Equals(other.playSchedule_)) ? 549947237 : 2058981451); continue; case 16: return false; } break; } return true; IL_115: arg_11F_0 = 1748777605; goto IL_11A; IL_17D: arg_11F_0 = ((other != this) ? 1724628259 : 1016446481); goto IL_11A; } public override int GetHashCode() { int num = 1; while (true) { IL_1A5: uint arg_168_0 = 3647482608u; while (true) { uint num2; switch ((num2 = (arg_168_0 ^ 3195490826u)) % 12u) { case 0u: arg_168_0 = ((this.MinutesPerWeek == 0u) ? 3822180434u : 3284059363u); continue; case 1u: num ^= this.MinutesPerWeek.GetHashCode(); arg_168_0 = (num2 * 531901601u ^ 4149882075u); continue; case 2u: goto IL_1A5; case 3u: num ^= this.CanReceiveVoice.GetHashCode(); arg_168_0 = (num2 * 2266529235u ^ 996498664u); continue; case 4u: num ^= this.CanSendVoice.GetHashCode(); arg_168_0 = (num2 * 2040237371u ^ 3000413052u); continue; case 5u: num ^= ParentalControlInfo.smethod_2(this.Timezone); arg_168_0 = (num2 * 1540116650u ^ 3472773795u); continue; case 6u: arg_168_0 = (((ParentalControlInfo.smethod_1(this.Timezone) != 0) ? 472042909u : 551401503u) ^ num2 * 3215141543u); continue; case 7u: arg_168_0 = ((this.MinutesPerDay == 0u) ? 2711656986u : 2889430191u); continue; case 8u: arg_168_0 = (this.CanReceiveVoice ? 3533426489u : 3404342497u); continue; case 9u: num ^= this.MinutesPerDay.GetHashCode(); arg_168_0 = (num2 * 455801386u ^ 1854628616u); continue; case 11u: arg_168_0 = ((!this.CanSendVoice) ? 3829195064u : 4207220870u); continue; } goto Block_6; } } Block_6: return num ^ this.playSchedule_.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (ParentalControlInfo.smethod_1(this.Timezone) != 0) { goto IL_56; } goto IL_209; uint arg_1AD_0; while (true) { IL_1A8: uint num; switch ((num = (arg_1AD_0 ^ 1574715142u)) % 16u) { case 1u: arg_1AD_0 = ((!this.CanReceiveVoice) ? 1222008722u : 1781754219u); continue; case 2u: output.WriteRawTag(32); arg_1AD_0 = (num * 1629211168u ^ 4007944533u); continue; case 3u: output.WriteUInt32(this.MinutesPerDay); arg_1AD_0 = (num * 3645485639u ^ 1895908649u); continue; case 4u: arg_1AD_0 = ((!this.CanSendVoice) ? 1696171037u : 1642940175u); continue; case 5u: output.WriteRawTag(26); output.WriteString(this.Timezone); arg_1AD_0 = (num * 334410219u ^ 363822830u); continue; case 6u: output.WriteBool(this.CanSendVoice); arg_1AD_0 = (num * 2282995271u ^ 1118507319u); continue; case 7u: output.WriteUInt32(this.MinutesPerWeek); arg_1AD_0 = (num * 391538023u ^ 2573500022u); continue; case 8u: output.WriteBool(this.CanReceiveVoice); arg_1AD_0 = (num * 3120009563u ^ 2608578810u); continue; case 9u: output.WriteRawTag(56); arg_1AD_0 = (num * 3205255015u ^ 2509179167u); continue; case 10u: arg_1AD_0 = ((this.MinutesPerWeek == 0u) ? 1641669639u : 185673736u); continue; case 11u: this.playSchedule_.WriteTo(output, ParentalControlInfo._repeated_playSchedule_codec); arg_1AD_0 = 1966133942u; continue; case 12u: goto IL_56; case 13u: output.WriteRawTag(48); arg_1AD_0 = (num * 941950124u ^ 4208896130u); continue; case 14u: output.WriteRawTag(40); arg_1AD_0 = (num * 1524009932u ^ 3979002953u); continue; case 15u: goto IL_209; } break; } return; IL_56: arg_1AD_0 = 1383915731u; goto IL_1A8; IL_209: arg_1AD_0 = ((this.MinutesPerDay == 0u) ? 472653932u : 1020174116u); goto IL_1A8; } public int CalculateSize() { int num = 0; while (true) { IL_1AC: uint arg_16B_0 = 2052727058u; while (true) { uint num2; switch ((num2 = (arg_16B_0 ^ 309256277u)) % 13u) { case 0u: num += 2; arg_16B_0 = (num2 * 2787715206u ^ 1970590729u); continue; case 1u: arg_16B_0 = (((ParentalControlInfo.smethod_1(this.Timezone) != 0) ? 3669823085u : 3457920944u) ^ num2 * 1929386028u); continue; case 2u: arg_16B_0 = ((this.MinutesPerDay != 0u) ? 455915211u : 399285947u); continue; case 3u: num += 2; arg_16B_0 = (num2 * 2000718395u ^ 3637693186u); continue; case 4u: arg_16B_0 = ((this.MinutesPerWeek != 0u) ? 1159863798u : 413954004u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.Timezone); arg_16B_0 = (num2 * 2686566504u ^ 240057188u); continue; case 6u: arg_16B_0 = ((!this.CanReceiveVoice) ? 587508915u : 1922880138u); continue; case 7u: arg_16B_0 = (this.CanSendVoice ? 1165828815u : 740693628u); continue; case 8u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MinutesPerDay); arg_16B_0 = (num2 * 1148177609u ^ 3209786549u); continue; case 10u: goto IL_1AC; case 11u: num += this.playSchedule_.CalculateSize(ParentalControlInfo._repeated_playSchedule_codec); arg_16B_0 = 1439370935u; continue; case 12u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MinutesPerWeek); arg_16B_0 = (num2 * 3583145685u ^ 2101495115u); continue; } return num; } } return num; } public void MergeFrom(ParentalControlInfo other) { if (other == null) { goto IL_36; } goto IL_1AB; uint arg_157_0; while (true) { IL_152: uint num; switch ((num = (arg_157_0 ^ 1809358090u)) % 14u) { case 0u: arg_157_0 = ((other.MinutesPerDay == 0u) ? 948620773u : 492566147u); continue; case 1u: arg_157_0 = ((other.MinutesPerWeek != 0u) ? 1619891145u : 346839762u); continue; case 2u: this.Timezone = other.Timezone; arg_157_0 = (num * 4257192246u ^ 1177094038u); continue; case 3u: arg_157_0 = ((!other.CanSendVoice) ? 1704779604u : 1081862775u); continue; case 4u: this.playSchedule_.Add(other.playSchedule_); arg_157_0 = 1109604156u; continue; case 5u: this.MinutesPerWeek = other.MinutesPerWeek; arg_157_0 = (num * 905152202u ^ 3428642060u); continue; case 6u: arg_157_0 = (other.CanReceiveVoice ? 1922510623u : 1345312441u); continue; case 7u: this.MinutesPerDay = other.MinutesPerDay; arg_157_0 = (num * 2375591585u ^ 909359820u); continue; case 8u: goto IL_1AB; case 9u: return; case 11u: this.CanSendVoice = other.CanSendVoice; arg_157_0 = (num * 317462288u ^ 1051946372u); continue; case 12u: goto IL_36; case 13u: this.CanReceiveVoice = other.CanReceiveVoice; arg_157_0 = (num * 3419557464u ^ 3889056641u); continue; } break; } return; IL_36: arg_157_0 = 808439477u; goto IL_152; IL_1AB: arg_157_0 = ((ParentalControlInfo.smethod_1(other.Timezone) == 0) ? 619479394u : 647427076u); goto IL_152; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2C3: uint num; uint arg_24B_0 = ((num = input.ReadTag()) == 0u) ? 1984139637u : 1123701344u; while (true) { uint num2; switch ((num2 = (arg_24B_0 ^ 573256886u)) % 23u) { case 0u: arg_24B_0 = ((num <= 56u) ? 632744017u : 86148862u); continue; case 1u: arg_24B_0 = (((num != 26u) ? 4187821568u : 2916113960u) ^ num2 * 2486801257u); continue; case 2u: arg_24B_0 = ((num <= 40u) ? 1049279737u : 1143870636u); continue; case 3u: arg_24B_0 = (num2 * 1007816354u ^ 1504240553u); continue; case 4u: input.SkipLastField(); arg_24B_0 = 952203335u; continue; case 5u: this.playSchedule_.AddEntriesFrom(input, ParentalControlInfo._repeated_playSchedule_codec); arg_24B_0 = 952203335u; continue; case 6u: this.CanSendVoice = input.ReadBool(); arg_24B_0 = 952203335u; continue; case 8u: arg_24B_0 = (num2 * 4189374392u ^ 821109415u); continue; case 9u: arg_24B_0 = (((num != 48u) ? 790097828u : 391876710u) ^ num2 * 2491149709u); continue; case 10u: this.MinutesPerWeek = input.ReadUInt32(); arg_24B_0 = 304907315u; continue; case 11u: goto IL_2C3; case 12u: arg_24B_0 = 1123701344u; continue; case 13u: arg_24B_0 = (((num != 66u) ? 2683426271u : 2351141245u) ^ num2 * 1160768817u); continue; case 14u: this.MinutesPerDay = input.ReadUInt32(); arg_24B_0 = 831097457u; continue; case 15u: arg_24B_0 = ((num == 64u) ? 2139566973u : 1257600694u); continue; case 16u: this.Timezone = input.ReadString(); arg_24B_0 = 952203335u; continue; case 17u: arg_24B_0 = (((num != 40u) ? 2310571755u : 3650618439u) ^ num2 * 4013685679u); continue; case 18u: arg_24B_0 = (((num == 32u) ? 1372918167u : 2065382129u) ^ num2 * 1456317273u); continue; case 19u: arg_24B_0 = (num2 * 3518533243u ^ 4109561248u); continue; case 20u: arg_24B_0 = (num2 * 1495766471u ^ 1554189590u); continue; case 21u: this.CanReceiveVoice = input.ReadBool(); arg_24B_0 = 952203335u; continue; case 22u: arg_24B_0 = (((num == 56u) ? 3315413200u : 3460361274u) ^ num2 * 944023037u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/ChannelState.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class ChannelState : IMessage<ChannelState>, IEquatable<ChannelState>, IDeepCloneable<ChannelState>, IMessage { [DebuggerNonUserCode] public static class Types { public enum PrivacyLevel { NONE, PRIVACY_LEVEL_OPEN, PRIVACY_LEVEL_OPEN_INVITATION_AND_FRIEND, PRIVACY_LEVEL_OPEN_INVITATION, PRIVACY_LEVEL_CLOSED } } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChannelState.__c __9 = new ChannelState.__c(); internal ChannelState cctor>b__90_0() { return new ChannelState(); } } private static readonly MessageParser<ChannelState> _parser = new MessageParser<ChannelState>(new Func<ChannelState>(ChannelState.__c.__9.<.cctor>b__90_0)); public const int MaxMembersFieldNumber = 1; private uint maxMembers_; public const int MinMembersFieldNumber = 2; private uint minMembers_; public const int AttributeFieldNumber = 3; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int InvitationFieldNumber = 4; private static readonly FieldCodec<Invitation> _repeated_invitation_codec; private readonly RepeatedField<Invitation> invitation_ = new RepeatedField<Invitation>(); public const int MaxInvitationsFieldNumber = 5; private uint maxInvitations_; public const int ReasonFieldNumber = 6; private uint reason_; public const int PrivacyLevelFieldNumber = 7; private ChannelState.Types.PrivacyLevel privacyLevel_; public const int NameFieldNumber = 8; private string name_ = ""; public const int DelegateNameFieldNumber = 9; private string delegateName_ = ""; public const int ChannelTypeFieldNumber = 10; private string channelType_ = ""; public const int ProgramFieldNumber = 11; private uint program_; public const int AllowOfflineMembersFieldNumber = 12; private bool allowOfflineMembers_; public const int SubscribeToPresenceFieldNumber = 13; private bool subscribeToPresence_; public const int DestroyOnFounderLeaveFieldNumber = 14; private bool destroyOnFounderLeave_; public static MessageParser<ChannelState> Parser { get { return ChannelState._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return ChannelState.Descriptor; } } public uint MaxMembers { get { return this.maxMembers_; } set { this.maxMembers_ = value; } } public uint MinMembers { get { return this.minMembers_; } set { this.minMembers_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public RepeatedField<Invitation> Invitation { get { return this.invitation_; } } public uint MaxInvitations { get { return this.maxInvitations_; } set { this.maxInvitations_ = value; } } public uint Reason { get { return this.reason_; } set { this.reason_ = value; } } public ChannelState.Types.PrivacyLevel PrivacyLevel { get { return this.privacyLevel_; } set { this.privacyLevel_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string DelegateName { get { return this.delegateName_; } set { this.delegateName_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string ChannelType { get { return this.channelType_; } set { this.channelType_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public bool AllowOfflineMembers { get { return this.allowOfflineMembers_; } set { this.allowOfflineMembers_ = value; } } public bool SubscribeToPresence { get { return this.subscribeToPresence_; } set { this.subscribeToPresence_ = value; } } public bool DestroyOnFounderLeave { get { return this.destroyOnFounderLeave_; } set { this.destroyOnFounderLeave_ = value; } } public ChannelState() { } public ChannelState(ChannelState other) : this() { this.maxMembers_ = other.maxMembers_; this.minMembers_ = other.minMembers_; this.attribute_ = other.attribute_.Clone(); this.invitation_ = other.invitation_.Clone(); this.maxInvitations_ = other.maxInvitations_; this.reason_ = other.reason_; this.privacyLevel_ = other.privacyLevel_; this.name_ = other.name_; this.delegateName_ = other.delegateName_; this.channelType_ = other.channelType_; this.program_ = other.program_; this.allowOfflineMembers_ = other.allowOfflineMembers_; this.subscribeToPresence_ = other.subscribeToPresence_; this.destroyOnFounderLeave_ = other.destroyOnFounderLeave_; } public ChannelState Clone() { return new ChannelState(this); } public override bool Equals(object other) { return this.Equals(other as ChannelState); } public bool Equals(ChannelState other) { if (other == null) { goto IL_274; } goto IL_31C; int arg_27E_0; while (true) { IL_279: switch ((arg_27E_0 ^ 983009610) % 33) { case 0: goto IL_274; case 1: arg_27E_0 = ((this.DestroyOnFounderLeave != other.DestroyOnFounderLeave) ? 2087773962 : 1225408122); continue; case 2: return false; case 3: return false; case 4: arg_27E_0 = ((this.MaxInvitations != other.MaxInvitations) ? 1579945811 : 1761378684); continue; case 5: arg_27E_0 = ((this.Program == other.Program) ? 1572850154 : 1147624128); continue; case 6: return false; case 7: return false; case 8: return true; case 9: return false; case 10: return false; case 12: arg_27E_0 = ((!this.attribute_.Equals(other.attribute_)) ? 417384277 : 1653307004); continue; case 13: return false; case 14: return false; case 15: arg_27E_0 = (ChannelState.smethod_0(this.ChannelType, other.ChannelType) ? 261079218 : 334673294); continue; case 16: arg_27E_0 = ((this.MinMembers != other.MinMembers) ? 637679815 : 1642901761); continue; case 17: arg_27E_0 = ((this.PrivacyLevel == other.PrivacyLevel) ? 581036697 : 635137934); continue; case 18: arg_27E_0 = ((this.SubscribeToPresence != other.SubscribeToPresence) ? 971636959 : 770685264); continue; case 19: return false; case 20: return false; case 21: arg_27E_0 = ((!ChannelState.smethod_0(this.DelegateName, other.DelegateName)) ? 1040829083 : 1106545803); continue; case 22: return false; case 23: return false; case 24: return false; case 25: arg_27E_0 = (ChannelState.smethod_0(this.Name, other.Name) ? 1615176884 : 1221953630); continue; case 26: arg_27E_0 = (this.invitation_.Equals(other.invitation_) ? 596243089 : 1643615237); continue; case 27: return false; case 28: arg_27E_0 = ((this.AllowOfflineMembers == other.AllowOfflineMembers) ? 427355199 : 1641362163); continue; case 29: arg_27E_0 = ((this.MaxMembers != other.MaxMembers) ? 107195872 : 1410737933); continue; case 30: return false; case 31: goto IL_31C; case 32: arg_27E_0 = ((this.Reason == other.Reason) ? 1728439146 : 1408391749); continue; } break; } return true; IL_274: arg_27E_0 = 1070178264; goto IL_279; IL_31C: arg_27E_0 = ((other != this) ? 1831189131 : 1582004344); goto IL_279; } public override int GetHashCode() { int num = 1; while (true) { IL_430: uint arg_3B2_0 = 448713372u; while (true) { uint num2; switch ((num2 = (arg_3B2_0 ^ 1592648795u)) % 28u) { case 0u: arg_3B2_0 = ((this.ChannelType.Length != 0) ? 1276156829u : 362184038u); continue; case 1u: num ^= this.MinMembers.GetHashCode(); arg_3B2_0 = (num2 * 4167873605u ^ 791879837u); continue; case 2u: arg_3B2_0 = ((!this.SubscribeToPresence) ? 1185913090u : 1003902215u); continue; case 3u: num ^= this.attribute_.GetHashCode(); arg_3B2_0 = 1588206879u; continue; case 4u: num ^= this.SubscribeToPresence.GetHashCode(); arg_3B2_0 = (num2 * 2143620003u ^ 1673754774u); continue; case 5u: arg_3B2_0 = ((!this.AllowOfflineMembers) ? 1680185373u : 616051794u); continue; case 6u: goto IL_430; case 7u: arg_3B2_0 = ((this.DelegateName.Length != 0) ? 237652410u : 1280049503u); continue; case 8u: num ^= this.Name.GetHashCode(); arg_3B2_0 = (num2 * 2075495364u ^ 2429178156u); continue; case 9u: num ^= this.DelegateName.GetHashCode(); arg_3B2_0 = (num2 * 130374347u ^ 2060515892u); continue; case 10u: num ^= this.MaxInvitations.GetHashCode(); arg_3B2_0 = (num2 * 516579266u ^ 2371157161u); continue; case 11u: arg_3B2_0 = ((this.Name.Length != 0) ? 958969043u : 1295634700u); continue; case 12u: num ^= this.MaxMembers.GetHashCode(); arg_3B2_0 = (num2 * 800594101u ^ 48453180u); continue; case 13u: num ^= this.AllowOfflineMembers.GetHashCode(); arg_3B2_0 = (num2 * 1629284222u ^ 2866092915u); continue; case 14u: arg_3B2_0 = ((this.PrivacyLevel == ChannelState.Types.PrivacyLevel.NONE) ? 366803448u : 2137781863u); continue; case 16u: num ^= this.invitation_.GetHashCode(); arg_3B2_0 = (num2 * 3379332212u ^ 4242719232u); continue; case 17u: arg_3B2_0 = ((!this.DestroyOnFounderLeave) ? 160008356u : 1509066163u); continue; case 18u: num ^= this.Program.GetHashCode(); arg_3B2_0 = (num2 * 1589944475u ^ 1336134328u); continue; case 19u: arg_3B2_0 = (((this.MaxMembers == 0u) ? 2313997987u : 3226166036u) ^ num2 * 1912930581u); continue; case 20u: num ^= this.PrivacyLevel.GetHashCode(); arg_3B2_0 = (num2 * 186882310u ^ 3923947664u); continue; case 21u: arg_3B2_0 = ((this.Program == 0u) ? 61380722u : 182001573u); continue; case 22u: arg_3B2_0 = ((this.Reason == 0u) ? 483006989u : 226561946u); continue; case 23u: arg_3B2_0 = (((this.MaxInvitations != 0u) ? 3643547900u : 4091918876u) ^ num2 * 121693083u); continue; case 24u: num ^= this.DestroyOnFounderLeave.GetHashCode(); arg_3B2_0 = (num2 * 3391965033u ^ 3964078220u); continue; case 25u: num ^= this.Reason.GetHashCode(); arg_3B2_0 = (num2 * 1422614395u ^ 3658940086u); continue; case 26u: num ^= this.ChannelType.GetHashCode(); arg_3B2_0 = (num2 * 735332133u ^ 178068728u); continue; case 27u: arg_3B2_0 = ((this.MinMembers == 0u) ? 711459592u : 858082122u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.MaxMembers != 0u) { goto IL_84; } goto IL_495; uint arg_3F9_0; while (true) { IL_3F4: uint num; switch ((num = (arg_3F9_0 ^ 1360226264u)) % 32u) { case 0u: arg_3F9_0 = (this.DestroyOnFounderLeave ? 831371793u : 1859043545u); continue; case 2u: output.WriteRawTag(74); arg_3F9_0 = (num * 1643230646u ^ 3602672687u); continue; case 3u: arg_3F9_0 = (this.AllowOfflineMembers ? 2079197264u : 1123055093u); continue; case 4u: arg_3F9_0 = ((ChannelState.smethod_1(this.ChannelType) != 0) ? 50788297u : 1602525150u); continue; case 5u: output.WriteRawTag(16); output.WriteUInt32(this.MinMembers); arg_3F9_0 = (num * 2797237824u ^ 4207688903u); continue; case 6u: arg_3F9_0 = ((this.Program == 0u) ? 1867091995u : 1660453806u); continue; case 7u: output.WriteRawTag(56); arg_3F9_0 = (num * 4203002461u ^ 490904956u); continue; case 8u: output.WriteRawTag(96); arg_3F9_0 = (num * 2418338104u ^ 633350959u); continue; case 9u: output.WriteRawTag(112); arg_3F9_0 = (num * 1982005786u ^ 375331522u); continue; case 10u: arg_3F9_0 = ((this.Reason != 0u) ? 49814565u : 88519604u); continue; case 11u: output.WriteBool(this.SubscribeToPresence); arg_3F9_0 = (num * 3889453034u ^ 1804712630u); continue; case 12u: arg_3F9_0 = ((this.PrivacyLevel == ChannelState.Types.PrivacyLevel.NONE) ? 475036715u : 1644667679u); continue; case 13u: arg_3F9_0 = (this.SubscribeToPresence ? 2122586976u : 480507512u); continue; case 14u: output.WriteString(this.ChannelType); arg_3F9_0 = (num * 2838236788u ^ 859808262u); continue; case 15u: output.WriteEnum((int)this.PrivacyLevel); arg_3F9_0 = (num * 50929022u ^ 3163210889u); continue; case 16u: output.WriteBool(this.DestroyOnFounderLeave); arg_3F9_0 = (num * 1196937048u ^ 1539223129u); continue; case 17u: output.WriteRawTag(82); arg_3F9_0 = (num * 3848789396u ^ 1791218018u); continue; case 18u: output.WriteRawTag(40); output.WriteUInt32(this.MaxInvitations); arg_3F9_0 = (num * 3800031165u ^ 1086958808u); continue; case 19u: arg_3F9_0 = ((ChannelState.smethod_1(this.Name) == 0) ? 1892912909u : 942337190u); continue; case 20u: this.invitation_.WriteTo(output, ChannelState._repeated_invitation_codec); arg_3F9_0 = (((this.MaxInvitations == 0u) ? 3470271514u : 3590518210u) ^ num * 3499065114u); continue; case 21u: arg_3F9_0 = ((ChannelState.smethod_1(this.DelegateName) != 0) ? 1270866778u : 1977290236u); continue; case 22u: output.WriteRawTag(93); output.WriteFixed32(this.Program); arg_3F9_0 = (num * 580398978u ^ 2441231863u); continue; case 23u: output.WriteBool(this.AllowOfflineMembers); arg_3F9_0 = (num * 2412640745u ^ 3728838650u); continue; case 24u: output.WriteRawTag(104); arg_3F9_0 = (num * 1009231673u ^ 3178618955u); continue; case 25u: goto IL_495; case 26u: output.WriteRawTag(8); output.WriteUInt32(this.MaxMembers); arg_3F9_0 = (num * 3862516516u ^ 481125801u); continue; case 27u: output.WriteString(this.DelegateName); arg_3F9_0 = (num * 1704668432u ^ 3385693516u); continue; case 28u: goto IL_84; case 29u: output.WriteRawTag(48); output.WriteUInt32(this.Reason); arg_3F9_0 = (num * 3435013883u ^ 3679890619u); continue; case 30u: output.WriteRawTag(66); output.WriteString(this.Name); arg_3F9_0 = (num * 3530364040u ^ 1456373245u); continue; case 31u: this.attribute_.WriteTo(output, ChannelState._repeated_attribute_codec); arg_3F9_0 = 561881452u; continue; } break; } return; IL_84: arg_3F9_0 = 141114498u; goto IL_3F4; IL_495: arg_3F9_0 = ((this.MinMembers == 0u) ? 769340295u : 971056349u); goto IL_3F4; } public int CalculateSize() { int num = 0; while (true) { IL_3DE: uint arg_365_0 = 1443195449u; while (true) { uint num2; switch ((num2 = (arg_365_0 ^ 1858431049u)) % 27u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.DelegateName); arg_365_0 = (num2 * 3571166690u ^ 3691660175u); continue; case 2u: arg_365_0 = ((this.MinMembers == 0u) ? 1618862722u : 1135960244u); continue; case 3u: arg_365_0 = ((ChannelState.smethod_1(this.Name) != 0) ? 1199456088u : 195286549u); continue; case 4u: arg_365_0 = ((this.PrivacyLevel != ChannelState.Types.PrivacyLevel.NONE) ? 220222364u : 1878864589u); continue; case 5u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_365_0 = (num2 * 1100426486u ^ 4070588483u); continue; case 6u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxInvitations); arg_365_0 = (num2 * 4265146383u ^ 2820432835u); continue; case 7u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Reason); arg_365_0 = (num2 * 2573616096u ^ 1672432049u); continue; case 8u: goto IL_3DE; case 9u: num += 1 + CodedOutputStream.ComputeEnumSize((int)this.PrivacyLevel); arg_365_0 = (num2 * 2574501097u ^ 4108106256u); continue; case 10u: num += 5; arg_365_0 = (num2 * 875129769u ^ 3455518753u); continue; case 11u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MaxMembers); arg_365_0 = (num2 * 100807387u ^ 601605268u); continue; case 12u: arg_365_0 = ((ChannelState.smethod_1(this.ChannelType) == 0) ? 186470626u : 818996877u); continue; case 13u: num += 2; arg_365_0 = (num2 * 295547762u ^ 2893019423u); continue; case 14u: arg_365_0 = (this.AllowOfflineMembers ? 2111637610u : 939845983u); continue; case 15u: num += this.invitation_.CalculateSize(ChannelState._repeated_invitation_codec); arg_365_0 = (((this.MaxInvitations == 0u) ? 3729278620u : 4031685592u) ^ num2 * 560157716u); continue; case 16u: arg_365_0 = ((this.Reason == 0u) ? 1594800017u : 1205695398u); continue; case 17u: arg_365_0 = (((this.MaxMembers == 0u) ? 3107107182u : 3645919175u) ^ num2 * 976254578u); continue; case 18u: arg_365_0 = (this.DestroyOnFounderLeave ? 2007503011u : 597788001u); continue; case 19u: arg_365_0 = ((this.Program != 0u) ? 717283889u : 137861401u); continue; case 20u: arg_365_0 = ((ChannelState.smethod_1(this.DelegateName) != 0) ? 154666798u : 1999351905u); continue; case 21u: num += 2; arg_365_0 = (num2 * 3152193468u ^ 1686603755u); continue; case 22u: arg_365_0 = (this.SubscribeToPresence ? 2142471807u : 818687763u); continue; case 23u: num += this.attribute_.CalculateSize(ChannelState._repeated_attribute_codec); arg_365_0 = 2076121554u; continue; case 24u: num += 1 + CodedOutputStream.ComputeStringSize(this.ChannelType); arg_365_0 = (num2 * 3544029680u ^ 2887887650u); continue; case 25u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MinMembers); arg_365_0 = (num2 * 2768036268u ^ 2353366142u); continue; case 26u: num += 2; arg_365_0 = (num2 * 2597461069u ^ 2965074691u); continue; } return num; } } return num; } public void MergeFrom(ChannelState other) { if (other == null) { goto IL_232; } goto IL_3F2; uint arg_362_0; while (true) { IL_35D: uint num; switch ((num = (arg_362_0 ^ 1155922278u)) % 29u) { case 0u: arg_362_0 = ((!other.AllowOfflineMembers) ? 1300710262u : 2144413263u); continue; case 1u: arg_362_0 = ((other.Program == 0u) ? 1183055139u : 1508506733u); continue; case 2u: arg_362_0 = ((other.Reason != 0u) ? 94810869u : 352138629u); continue; case 3u: this.MaxInvitations = other.MaxInvitations; arg_362_0 = (num * 4283710677u ^ 4239040579u); continue; case 4u: this.PrivacyLevel = other.PrivacyLevel; arg_362_0 = (num * 1028149320u ^ 2798380415u); continue; case 5u: arg_362_0 = ((!other.SubscribeToPresence) ? 40118684u : 1779533638u); continue; case 6u: this.MinMembers = other.MinMembers; arg_362_0 = (num * 2950868703u ^ 3268574190u); continue; case 7u: arg_362_0 = ((!other.DestroyOnFounderLeave) ? 1913687264u : 955355846u); continue; case 8u: arg_362_0 = ((other.MinMembers != 0u) ? 1432739455u : 915765033u); continue; case 9u: goto IL_232; case 10u: arg_362_0 = ((ChannelState.smethod_1(other.Name) != 0) ? 645091481u : 1188302669u); continue; case 11u: arg_362_0 = (((other.MaxInvitations != 0u) ? 2342665547u : 3976766274u) ^ num * 37227225u); continue; case 12u: this.attribute_.Add(other.attribute_); arg_362_0 = 2035103237u; continue; case 13u: this.SubscribeToPresence = other.SubscribeToPresence; arg_362_0 = (num * 899203881u ^ 1180613308u); continue; case 14u: this.AllowOfflineMembers = other.AllowOfflineMembers; arg_362_0 = (num * 1557216786u ^ 2847661460u); continue; case 15u: arg_362_0 = ((other.PrivacyLevel == ChannelState.Types.PrivacyLevel.NONE) ? 979563631u : 2038798580u); continue; case 16u: this.Name = other.Name; arg_362_0 = (num * 2341106919u ^ 363134548u); continue; case 17u: this.ChannelType = other.ChannelType; arg_362_0 = (num * 1475626796u ^ 2291729458u); continue; case 18u: this.invitation_.Add(other.invitation_); arg_362_0 = (num * 1121354080u ^ 28163694u); continue; case 19u: this.DelegateName = other.DelegateName; arg_362_0 = (num * 2728625271u ^ 8364114u); continue; case 20u: arg_362_0 = ((ChannelState.smethod_1(other.DelegateName) != 0) ? 1655025425u : 1346186499u); continue; case 21u: this.Reason = other.Reason; arg_362_0 = (num * 1311345153u ^ 2021047318u); continue; case 22u: this.MaxMembers = other.MaxMembers; arg_362_0 = (num * 1599075166u ^ 1205324973u); continue; case 23u: goto IL_3F2; case 24u: this.DestroyOnFounderLeave = other.DestroyOnFounderLeave; arg_362_0 = (num * 2498238644u ^ 1130504288u); continue; case 25u: this.Program = other.Program; arg_362_0 = (num * 338357012u ^ 3151790335u); continue; case 27u: arg_362_0 = ((ChannelState.smethod_1(other.ChannelType) == 0) ? 1163917162u : 1470585508u); continue; case 28u: return; } break; } return; IL_232: arg_362_0 = 2050479472u; goto IL_35D; IL_3F2: arg_362_0 = ((other.MaxMembers != 0u) ? 1558531539u : 762504667u); goto IL_35D; } public void MergeFrom(CodedInputStream input) { while (true) { IL_5C8: uint num; uint arg_4F0_0 = ((num = input.ReadTag()) == 0u) ? 3148916480u : 3244761465u; while (true) { uint num2; switch ((num2 = (arg_4F0_0 ^ 3974336230u)) % 47u) { case 0u: this.ChannelType = input.ReadString(); arg_4F0_0 = 3239519432u; continue; case 1u: arg_4F0_0 = (((num > 26u) ? 3870413635u : 3327549208u) ^ num2 * 2894448183u); continue; case 2u: arg_4F0_0 = ((num > 56u) ? 3090792975u : 3258297746u); continue; case 3u: arg_4F0_0 = ((num > 40u) ? 3683046052u : 2237605987u); continue; case 4u: arg_4F0_0 = (num2 * 537028337u ^ 3095366423u); continue; case 5u: arg_4F0_0 = (num2 * 4221577898u ^ 363082760u); continue; case 6u: input.SkipLastField(); arg_4F0_0 = 3239519432u; continue; case 7u: arg_4F0_0 = (num2 * 3580462446u ^ 3508121784u); continue; case 8u: arg_4F0_0 = (num2 * 2022511790u ^ 1845908976u); continue; case 9u: arg_4F0_0 = (((num != 26u) ? 1949482591u : 961921563u) ^ num2 * 743446607u); continue; case 10u: arg_4F0_0 = (((num == 96u) ? 3035200906u : 2740195379u) ^ num2 * 1975796381u); continue; case 11u: arg_4F0_0 = 3244761465u; continue; case 12u: arg_4F0_0 = (((num != 8u) ? 2061109408u : 1963517400u) ^ num2 * 3076842329u); continue; case 13u: this.AllowOfflineMembers = input.ReadBool(); arg_4F0_0 = 2420697094u; continue; case 14u: goto IL_5C8; case 15u: arg_4F0_0 = (((num != 16u) ? 3476238628u : 4260091737u) ^ num2 * 4116392147u); continue; case 16u: this.MaxMembers = input.ReadUInt32(); arg_4F0_0 = 2857315625u; continue; case 17u: arg_4F0_0 = (((num == 112u) ? 784377876u : 1809420486u) ^ num2 * 3069668260u); continue; case 18u: this.MinMembers = input.ReadUInt32(); arg_4F0_0 = 3630711055u; continue; case 19u: this.privacyLevel_ = (ChannelState.Types.PrivacyLevel)input.ReadEnum(); arg_4F0_0 = 4041829410u; continue; case 20u: this.SubscribeToPresence = input.ReadBool(); arg_4F0_0 = 3239519432u; continue; case 21u: arg_4F0_0 = (num2 * 3914646396u ^ 1818733474u); continue; case 22u: arg_4F0_0 = (((num == 34u) ? 1152325133u : 2102432038u) ^ num2 * 3062844065u); continue; case 23u: arg_4F0_0 = (num2 * 3615714167u ^ 1157236025u); continue; case 24u: arg_4F0_0 = (((num != 40u) ? 595078775u : 1136098687u) ^ num2 * 2709138911u); continue; case 25u: arg_4F0_0 = ((num != 48u) ? 4280302978u : 3165785425u); continue; case 26u: arg_4F0_0 = ((num > 96u) ? 4082152903u : 2310495601u); continue; case 27u: this.MaxInvitations = input.ReadUInt32(); arg_4F0_0 = 3239519432u; continue; case 28u: arg_4F0_0 = (((num == 56u) ? 171502817u : 1939545711u) ^ num2 * 4035145839u); continue; case 29u: arg_4F0_0 = (((num != 74u) ? 811739994u : 1266304181u) ^ num2 * 4179486380u); continue; case 30u: arg_4F0_0 = (((num == 82u) ? 744785590u : 719290108u) ^ num2 * 2665727112u); continue; case 31u: arg_4F0_0 = (((num == 66u) ? 1005700630u : 355459434u) ^ num2 * 2751076109u); continue; case 32u: arg_4F0_0 = (num2 * 875272772u ^ 826018626u); continue; case 34u: arg_4F0_0 = (num2 * 1338637227u ^ 3869095924u); continue; case 35u: this.attribute_.AddEntriesFrom(input, ChannelState._repeated_attribute_codec); arg_4F0_0 = 3239519432u; continue; case 36u: this.invitation_.AddEntriesFrom(input, ChannelState._repeated_invitation_codec); arg_4F0_0 = 3239519432u; continue; case 37u: arg_4F0_0 = (num2 * 529432293u ^ 1185257869u); continue; case 38u: this.Program = input.ReadFixed32(); arg_4F0_0 = 3239519432u; continue; case 39u: this.DelegateName = input.ReadString(); arg_4F0_0 = 3239519432u; continue; case 40u: this.Reason = input.ReadUInt32(); arg_4F0_0 = 2757910894u; continue; case 41u: this.Name = input.ReadString(); arg_4F0_0 = 3239519432u; continue; case 42u: arg_4F0_0 = (num2 * 4006010161u ^ 3965965393u); continue; case 43u: this.DestroyOnFounderLeave = input.ReadBool(); arg_4F0_0 = 3239519432u; continue; case 44u: arg_4F0_0 = ((num != 104u) ? 2207980097u : 3926088169u); continue; case 45u: arg_4F0_0 = (((num != 93u) ? 2388472758u : 2526088688u) ^ num2 * 2727925281u); continue; case 46u: arg_4F0_0 = ((num <= 82u) ? 2174009263u : 2669700338u); continue; } return; } } } static ChannelState() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_7B: uint arg_5F_0 = 1108157751u; while (true) { uint num; switch ((num = (arg_5F_0 ^ 1476560614u)) % 4u) { case 0u: goto IL_7B; case 1u: ChannelState._repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(26u, Bgs.Protocol.Attribute.Parser); arg_5F_0 = (num * 3647256347u ^ 575056611u); continue; case 2u: ChannelState._repeated_invitation_codec = FieldCodec.ForMessage<Invitation>(34u, Bgs.Protocol.Invitation.Parser); arg_5F_0 = (num * 1773206092u ^ 4124402533u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Account.V1/GameTimeInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameTimeInfo : IMessage<GameTimeInfo>, IEquatable<GameTimeInfo>, IDeepCloneable<GameTimeInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameTimeInfo.__c __9 = new GameTimeInfo.__c(); internal GameTimeInfo cctor>b__39_0() { return new GameTimeInfo(); } } private static readonly MessageParser<GameTimeInfo> _parser = new MessageParser<GameTimeInfo>(new Func<GameTimeInfo>(GameTimeInfo.__c.__9.<.cctor>b__39_0)); public const int IsUnlimitedPlayTimeFieldNumber = 3; private bool isUnlimitedPlayTime_; public const int PlayTimeExpiresFieldNumber = 5; private ulong playTimeExpires_; public const int IsSubscriptionFieldNumber = 6; private bool isSubscription_; public const int IsRecurringSubscriptionFieldNumber = 7; private bool isRecurringSubscription_; public static MessageParser<GameTimeInfo> Parser { get { return GameTimeInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[22]; } } MessageDescriptor IMessage.Descriptor { get { return GameTimeInfo.Descriptor; } } public bool IsUnlimitedPlayTime { get { return this.isUnlimitedPlayTime_; } set { this.isUnlimitedPlayTime_ = value; } } public ulong PlayTimeExpires { get { return this.playTimeExpires_; } set { this.playTimeExpires_ = value; } } public bool IsSubscription { get { return this.isSubscription_; } set { this.isSubscription_ = value; } } public bool IsRecurringSubscription { get { return this.isRecurringSubscription_; } set { this.isRecurringSubscription_ = value; } } public GameTimeInfo() { } public GameTimeInfo(GameTimeInfo other) : this() { while (true) { IL_5D: uint arg_41_0 = 3602275973u; while (true) { uint num; switch ((num = (arg_41_0 ^ 3198732164u)) % 4u) { case 1u: this.isUnlimitedPlayTime_ = other.isUnlimitedPlayTime_; arg_41_0 = (num * 3655563608u ^ 1813241327u); continue; case 2u: goto IL_5D; case 3u: this.playTimeExpires_ = other.playTimeExpires_; arg_41_0 = (num * 863551025u ^ 2866047399u); continue; } goto Block_1; } } Block_1: this.isSubscription_ = other.isSubscription_; this.isRecurringSubscription_ = other.isRecurringSubscription_; } public GameTimeInfo Clone() { return new GameTimeInfo(this); } public override bool Equals(object other) { return this.Equals(other as GameTimeInfo); } public bool Equals(GameTimeInfo other) { if (other == null) { goto IL_B7; } goto IL_10F; int arg_C1_0; while (true) { IL_BC: switch ((arg_C1_0 ^ 746529686) % 13) { case 0: goto IL_B7; case 1: return true; case 2: goto IL_10F; case 4: return false; case 5: arg_C1_0 = ((this.IsUnlimitedPlayTime == other.IsUnlimitedPlayTime) ? 1941741381 : 985612789); continue; case 6: return false; case 7: return false; case 8: arg_C1_0 = ((this.IsSubscription == other.IsSubscription) ? 1475474008 : 1752349830); continue; case 9: arg_C1_0 = ((this.PlayTimeExpires != other.PlayTimeExpires) ? 1391513001 : 567571621); continue; case 10: arg_C1_0 = ((this.IsRecurringSubscription != other.IsRecurringSubscription) ? 900195119 : 988631239); continue; case 11: return false; case 12: return false; } break; } return true; IL_B7: arg_C1_0 = 757025905; goto IL_BC; IL_10F: arg_C1_0 = ((other == this) ? 2056781396 : 421944477); goto IL_BC; } public override int GetHashCode() { int num = 1; if (this.IsUnlimitedPlayTime) { goto IL_66; } goto IL_131; uint arg_F1_0; while (true) { IL_EC: uint num2; switch ((num2 = (arg_F1_0 ^ 2847128956u)) % 9u) { case 0u: goto IL_131; case 1u: num ^= this.IsRecurringSubscription.GetHashCode(); arg_F1_0 = (num2 * 1878415994u ^ 2277784839u); continue; case 2u: num ^= this.IsSubscription.GetHashCode(); arg_F1_0 = (num2 * 1216864577u ^ 3270196655u); continue; case 3u: num ^= this.PlayTimeExpires.GetHashCode(); arg_F1_0 = (num2 * 4016113339u ^ 3663968010u); continue; case 4u: arg_F1_0 = ((!this.IsSubscription) ? 3099546537u : 4062100474u); continue; case 5u: goto IL_66; case 6u: arg_F1_0 = (this.IsRecurringSubscription ? 2661449705u : 2496208901u); continue; case 7u: num ^= this.IsUnlimitedPlayTime.GetHashCode(); arg_F1_0 = (num2 * 1787413873u ^ 2170065536u); continue; } break; } return num; IL_66: arg_F1_0 = 3872063840u; goto IL_EC; IL_131: arg_F1_0 = ((this.PlayTimeExpires != 0uL) ? 3074779365u : 4146801609u); goto IL_EC; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.IsUnlimitedPlayTime) { goto IL_ED; } goto IL_17D; uint arg_131_0; while (true) { IL_12C: uint num; switch ((num = (arg_131_0 ^ 3636632299u)) % 12u) { case 0u: output.WriteRawTag(40); output.WriteUInt64(this.PlayTimeExpires); arg_131_0 = (num * 1052604510u ^ 2094441647u); continue; case 1u: output.WriteRawTag(56); arg_131_0 = (num * 2489699817u ^ 1354504647u); continue; case 3u: goto IL_ED; case 4u: output.WriteRawTag(48); arg_131_0 = (num * 4069860581u ^ 2419833484u); continue; case 5u: goto IL_17D; case 6u: arg_131_0 = (this.IsRecurringSubscription ? 3049597822u : 2410519229u); continue; case 7u: output.WriteBool(this.IsSubscription); arg_131_0 = (num * 992443645u ^ 66921438u); continue; case 8u: arg_131_0 = ((!this.IsSubscription) ? 2931234001u : 3208253831u); continue; case 9u: output.WriteBool(this.IsRecurringSubscription); arg_131_0 = (num * 3010728642u ^ 4081895071u); continue; case 10u: output.WriteRawTag(24); arg_131_0 = (num * 2958756816u ^ 3504931896u); continue; case 11u: output.WriteBool(this.IsUnlimitedPlayTime); arg_131_0 = (num * 4264823141u ^ 2142448845u); continue; } break; } return; IL_ED: arg_131_0 = 4100759733u; goto IL_12C; IL_17D: arg_131_0 = ((this.PlayTimeExpires == 0uL) ? 2951819799u : 2179046799u); goto IL_12C; } public int CalculateSize() { int num = 0; if (this.IsUnlimitedPlayTime) { goto IL_85; } goto IL_103; uint arg_C3_0; while (true) { IL_BE: uint num2; switch ((num2 = (arg_C3_0 ^ 1177913292u)) % 9u) { case 0u: arg_C3_0 = ((!this.IsRecurringSubscription) ? 974203901u : 629709780u); continue; case 1u: num += 2; arg_C3_0 = (num2 * 2016200696u ^ 2386097341u); continue; case 2u: goto IL_85; case 3u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.PlayTimeExpires); arg_C3_0 = (num2 * 821010884u ^ 3739596345u); continue; case 4u: num += 2; arg_C3_0 = (num2 * 1480017282u ^ 4088801763u); continue; case 5u: num += 2; arg_C3_0 = (num2 * 2483916660u ^ 2062307051u); continue; case 7u: arg_C3_0 = ((!this.IsSubscription) ? 1811330353u : 1959238245u); continue; case 8u: goto IL_103; } break; } return num; IL_85: arg_C3_0 = 1225201101u; goto IL_BE; IL_103: arg_C3_0 = ((this.PlayTimeExpires == 0uL) ? 10465537u : 620548706u); goto IL_BE; } public void MergeFrom(GameTimeInfo other) { if (other == null) { goto IL_D5; } goto IL_142; uint arg_FA_0; while (true) { IL_F5: uint num; switch ((num = (arg_FA_0 ^ 1533742554u)) % 11u) { case 0u: this.IsUnlimitedPlayTime = other.IsUnlimitedPlayTime; arg_FA_0 = (num * 1953361960u ^ 202599206u); continue; case 1u: return; case 2u: goto IL_D5; case 3u: arg_FA_0 = (other.IsSubscription ? 178581258u : 1879838060u); continue; case 4u: arg_FA_0 = ((!other.IsRecurringSubscription) ? 437598352u : 1454063079u); continue; case 5u: this.PlayTimeExpires = other.PlayTimeExpires; arg_FA_0 = (num * 429844447u ^ 2380229598u); continue; case 6u: arg_FA_0 = ((other.PlayTimeExpires == 0uL) ? 25736822u : 1332476546u); continue; case 7u: this.IsRecurringSubscription = other.IsRecurringSubscription; arg_FA_0 = (num * 3765170131u ^ 1375374807u); continue; case 8u: this.IsSubscription = other.IsSubscription; arg_FA_0 = (num * 4117448332u ^ 44623020u); continue; case 10u: goto IL_142; } break; } return; IL_D5: arg_FA_0 = 908826704u; goto IL_F5; IL_142: arg_FA_0 = ((!other.IsUnlimitedPlayTime) ? 1203594070u : 1080013292u); goto IL_F5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1C2: uint num; uint arg_166_0 = ((num = input.ReadTag()) == 0u) ? 1417992160u : 647609780u; while (true) { uint num2; switch ((num2 = (arg_166_0 ^ 1763525878u)) % 16u) { case 0u: arg_166_0 = ((num != 48u) ? 538067070u : 1218339516u); continue; case 1u: arg_166_0 = (num2 * 2793299539u ^ 2086395192u); continue; case 2u: arg_166_0 = ((num <= 40u) ? 2048604265u : 213184982u); continue; case 3u: this.IsUnlimitedPlayTime = input.ReadBool(); arg_166_0 = 1578914379u; continue; case 4u: arg_166_0 = 647609780u; continue; case 5u: input.SkipLastField(); arg_166_0 = 1578914379u; continue; case 7u: arg_166_0 = (num2 * 977953524u ^ 1808996711u); continue; case 8u: arg_166_0 = (((num != 56u) ? 1255886371u : 2123091311u) ^ num2 * 220825578u); continue; case 9u: this.IsRecurringSubscription = input.ReadBool(); arg_166_0 = 1578914379u; continue; case 10u: this.IsSubscription = input.ReadBool(); arg_166_0 = 414835409u; continue; case 11u: arg_166_0 = (((num != 40u) ? 3983105647u : 2498481517u) ^ num2 * 3860019151u); continue; case 12u: arg_166_0 = (num2 * 3462588562u ^ 838158187u); continue; case 13u: goto IL_1C2; case 14u: this.PlayTimeExpires = input.ReadUInt64(); arg_166_0 = 1363796631u; continue; case 15u: arg_166_0 = (((num != 24u) ? 204023570u : 1750700378u) ^ num2 * 546724033u); continue; } return; } } } } } <file_sep>/AuthServer.WorldServer.Game.Entities/CharStartOutfit.cs using System; namespace AuthServer.WorldServer.Game.Entities { public class CharStartOutfit { public uint Id { get; set; } public uint[] ItemId { get; set; } public uint PetDisplayId { get; set; } public byte RaceId { get; set; } public byte ClassId { get; set; } public byte SexId { get; set; } public byte OutfitId { get; set; } public byte PetFamilyId { get; set; } public CharStartOutfit() { this.<ItemId>k__BackingField = new uint[24]; base..ctor(); } } } <file_sep>/Google.Protobuf/JsonToken.cs using System; namespace Google.Protobuf { internal sealed class JsonToken : IEquatable<JsonToken> { internal enum TokenType { Null, False, True, StringValue, Number, Name, StartObject, EndObject, StartArray, EndArray, EndDocument } private static readonly JsonToken _true = new JsonToken(JsonToken.TokenType.True, null, 0.0); private static readonly JsonToken _false; private static readonly JsonToken _null; private static readonly JsonToken startObject; private static readonly JsonToken endObject; private static readonly JsonToken startArray; private static readonly JsonToken endArray; private static readonly JsonToken endDocument; private readonly JsonToken.TokenType type; private readonly string stringValue; private readonly double numberValue; internal static JsonToken Null { get { return JsonToken._null; } } internal static JsonToken False { get { return JsonToken._false; } } internal static JsonToken True { get { return JsonToken._true; } } internal static JsonToken StartObject { get { return JsonToken.startObject; } } internal static JsonToken EndObject { get { return JsonToken.endObject; } } internal static JsonToken StartArray { get { return JsonToken.startArray; } } internal static JsonToken EndArray { get { return JsonToken.endArray; } } internal static JsonToken EndDocument { get { return JsonToken.endDocument; } } internal JsonToken.TokenType Type { get { return this.type; } } internal string StringValue { get { return this.stringValue; } } internal double NumberValue { get { return this.numberValue; } } internal static JsonToken Name(string name) { return new JsonToken(JsonToken.TokenType.Name, name, 0.0); } internal static JsonToken Value(string value) { return new JsonToken(JsonToken.TokenType.StringValue, value, 0.0); } internal static JsonToken Value(double value) { return new JsonToken(JsonToken.TokenType.Number, null, value); } private JsonToken(JsonToken.TokenType type, string stringValue = null, double numberValue = 0.0) { while (true) { IL_5A: uint arg_3E_0 = 2482964016u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 3449118601u)) % 4u) { case 0u: this.numberValue = numberValue; arg_3E_0 = (num * 3564385074u ^ 1989645462u); continue; case 1u: this.type = type; this.stringValue = stringValue; arg_3E_0 = (num * 2560805287u ^ 1189576714u); continue; case 2u: goto IL_5A; } return; } } } public override bool Equals(object obj) { return this.Equals(obj as JsonToken); } public override int GetHashCode() { return ((JsonToken.smethod_0((int)(((JsonToken.TokenType)527 + (int)this.type) * (JsonToken.TokenType)31), this.stringValue) == null) ? 0 : JsonToken.smethod_1(this.stringValue)) * 31 + this.numberValue.GetHashCode(); } public override string ToString() { JsonToken.TokenType tokenType = this.type; while (true) { IL_AB: uint arg_5F_0 = 2682264506u; while (true) { uint num; switch ((num = (arg_5F_0 ^ 4241128215u)) % 15u) { case 0u: goto IL_C8; case 1u: goto IL_BD; case 2u: goto IL_E8; case 3u: goto IL_B2; case 4u: arg_5F_0 = (num * 3627266443u ^ 1115301066u); continue; case 5u: switch (tokenType) { case JsonToken.TokenType.Null: goto IL_B2; case JsonToken.TokenType.False: goto IL_144; case JsonToken.TokenType.True: goto IL_BD; case JsonToken.TokenType.StringValue: goto IL_16F; case JsonToken.TokenType.Number: goto IL_F3; case JsonToken.TokenType.Name: goto IL_C8; case JsonToken.TokenType.StartObject: goto IL_123; case JsonToken.TokenType.EndObject: goto IL_139; case JsonToken.TokenType.StartArray: goto IL_12E; case JsonToken.TokenType.EndArray: goto IL_E8; case JsonToken.TokenType.EndDocument: goto IL_118; default: arg_5F_0 = (num * 2433619620u ^ 3405509361u); continue; } break; case 6u: goto IL_AB; case 7u: goto IL_F3; case 8u: goto IL_118; case 9u: goto IL_123; case 10u: goto IL_12E; case 11u: goto IL_139; case 12u: goto IL_144; case 14u: goto IL_16F; } goto Block_2; } } Block_2: goto IL_14F; IL_B2: return Module.smethod_34<string>(854952751u); IL_BD: return Module.smethod_33<string>(2183097496u); IL_C8: return JsonToken.smethod_2(Module.smethod_35<string>(2827822917u), this.stringValue, Module.smethod_36<string>(472157920u)); IL_E8: return Module.smethod_36<string>(1155181364u); IL_F3: return JsonToken.smethod_3(Module.smethod_34<string>(1106698670u), this.numberValue, Module.smethod_33<string>(4291034649u)); IL_118: return Module.smethod_34<string>(985298691u); IL_123: return Module.smethod_34<string>(2110138035u); IL_12E: return Module.smethod_33<string>(3370785385u); IL_139: return Module.smethod_34<string>(891562079u); IL_144: return Module.smethod_34<string>(1042425975u); IL_14F: throw JsonToken.smethod_4(JsonToken.smethod_0(Module.smethod_34<string>(1266508527u), this.type)); IL_16F: return JsonToken.smethod_2(Module.smethod_35<string>(743299430u), this.stringValue, Module.smethod_37<string>(988941460u)); } public bool Equals(JsonToken other) { if (other == null) { goto IL_12; } goto IL_80; uint arg_50_0; while (true) { IL_4B: uint num; switch ((num = (arg_50_0 ^ 2022758360u)) % 6u) { case 0u: arg_50_0 = ((JsonToken.smethod_5(other.stringValue, this.stringValue) ? 3339617465u : 4144370203u) ^ num * 1474894069u); continue; case 1u: goto IL_80; case 2u: return false; case 3u: goto IL_95; case 4u: goto IL_12; } break; } return false; IL_95: return other.numberValue.Equals(this.numberValue); IL_12: arg_50_0 = 349897714u; goto IL_4B; IL_80: arg_50_0 = ((other.type != this.type) ? 525633735u : 1412776500u); goto IL_4B; } static JsonToken() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_141: uint arg_115_0 = 1875517405u; while (true) { uint num; switch ((num = (arg_115_0 ^ 143700716u)) % 8u) { case 0u: goto IL_141; case 1u: JsonToken._false = new JsonToken(JsonToken.TokenType.False, null, 0.0); JsonToken._null = new JsonToken(JsonToken.TokenType.Null, null, 0.0); arg_115_0 = (num * 2365135103u ^ 2905530529u); continue; case 2u: JsonToken.startObject = new JsonToken(JsonToken.TokenType.StartObject, null, 0.0); arg_115_0 = (num * 2387771332u ^ 3997082761u); continue; case 4u: JsonToken.endDocument = new JsonToken(JsonToken.TokenType.EndDocument, null, 0.0); arg_115_0 = (num * 2008010039u ^ 961248203u); continue; case 5u: JsonToken.endObject = new JsonToken(JsonToken.TokenType.EndObject, null, 0.0); arg_115_0 = (num * 253508060u ^ 4097918919u); continue; case 6u: JsonToken.endArray = new JsonToken(JsonToken.TokenType.EndArray, null, 0.0); arg_115_0 = (num * 3755424471u ^ 987096586u); continue; case 7u: JsonToken.startArray = new JsonToken(JsonToken.TokenType.StartArray, null, 0.0); arg_115_0 = (num * 2598877456u ^ 1311215378u); continue; } return; } } } static string smethod_0(object object_0, object object_1) { return object_0 + object_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static string smethod_2(string string_0, string string_1, string string_2) { return string_0 + string_1 + string_2; } static string smethod_3(object object_0, object object_1, object object_2) { return object_0 + object_1 + object_2; } static InvalidOperationException smethod_4(string string_0) { return new InvalidOperationException(string_0); } static bool smethod_5(string string_0, string string_1) { return string_0 == string_1; } } } <file_sep>/AuthServer.AuthServer.JsonObjects/FormInputValue.cs using System; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class FormInputValue { [DataMember(Name = "input_id")] public string Id { get; set; } [DataMember(Name = "value")] public string Value { get; set; } } } <file_sep>/Bgs.Protocol.UserManager.V1/ClearRecentPlayersRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class ClearRecentPlayersRequest : IMessage<ClearRecentPlayersRequest>, IEquatable<ClearRecentPlayersRequest>, IDeepCloneable<ClearRecentPlayersRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ClearRecentPlayersRequest.__c __9 = new ClearRecentPlayersRequest.__c(); internal ClearRecentPlayersRequest cctor>b__29_0() { return new ClearRecentPlayersRequest(); } } private static readonly MessageParser<ClearRecentPlayersRequest> _parser = new MessageParser<ClearRecentPlayersRequest>(new Func<ClearRecentPlayersRequest>(ClearRecentPlayersRequest.__c.__9.<.cctor>b__29_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int ProgramFieldNumber = 2; private uint program_; public static MessageParser<ClearRecentPlayersRequest> Parser { get { return ClearRecentPlayersRequest._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return ClearRecentPlayersRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public ClearRecentPlayersRequest() { } public ClearRecentPlayersRequest(ClearRecentPlayersRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.program_ = other.program_; } public ClearRecentPlayersRequest Clone() { return new ClearRecentPlayersRequest(this); } public override bool Equals(object other) { return this.Equals(other as ClearRecentPlayersRequest); } public bool Equals(ClearRecentPlayersRequest other) { if (other == null) { goto IL_15; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 748845754) % 9) { case 0: arg_72_0 = ((this.Program == other.Program) ? 591391368 : 985474973); continue; case 1: return false; case 2: return false; case 4: return false; case 5: arg_72_0 = (ClearRecentPlayersRequest.smethod_0(this.AgentId, other.AgentId) ? 1943420574 : 1451277237); continue; case 6: goto IL_B0; case 7: goto IL_15; case 8: return true; } break; } return true; IL_15: arg_72_0 = 1828746358; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? 1304190205 : 1584535417); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_B5: uint arg_91_0 = 597871833u; while (true) { uint num2; switch ((num2 = (arg_91_0 ^ 1030944233u)) % 6u) { case 0u: goto IL_B5; case 1u: num ^= ClearRecentPlayersRequest.smethod_1(this.AgentId); arg_91_0 = (num2 * 3018240934u ^ 17502428u); continue; case 3u: num ^= this.Program.GetHashCode(); arg_91_0 = (num2 * 1037390454u ^ 3946709141u); continue; case 4u: arg_91_0 = (((this.agentId_ != null) ? 2292147860u : 2830396898u) ^ num2 * 1598286115u); continue; case 5u: arg_91_0 = ((this.Program != 0u) ? 991076550u : 905269567u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_31; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 164211479u)) % 7u) { case 0u: output.WriteUInt32(this.Program); arg_88_0 = (num * 1156221316u ^ 875679789u); continue; case 1u: output.WriteRawTag(10); arg_88_0 = (num * 3544004047u ^ 4232123549u); continue; case 2u: output.WriteMessage(this.AgentId); arg_88_0 = (num * 260085712u ^ 3608184552u); continue; case 3u: goto IL_BF; case 5u: goto IL_31; case 6u: output.WriteRawTag(16); arg_88_0 = (num * 1531831259u ^ 3656550375u); continue; } break; } return; IL_31: arg_88_0 = 1520380915u; goto IL_83; IL_BF: arg_88_0 = ((this.Program == 0u) ? 1320999013u : 521885329u); goto IL_83; } public int CalculateSize() { int num = 0; while (true) { IL_B6: uint arg_92_0 = 2042261754u; while (true) { uint num2; switch ((num2 = (arg_92_0 ^ 1924088770u)) % 6u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_92_0 = (num2 * 3751271564u ^ 723943466u); continue; case 2u: arg_92_0 = ((this.Program == 0u) ? 1239570069u : 1060919691u); continue; case 3u: goto IL_B6; case 4u: arg_92_0 = (((this.agentId_ != null) ? 2566735222u : 3204073194u) ^ num2 * 3714342994u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Program); arg_92_0 = (num2 * 2858228757u ^ 865367400u); continue; } return num; } } return num; } public void MergeFrom(ClearRecentPlayersRequest other) { if (other == null) { goto IL_9D; } goto IL_FF; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 263505804u)) % 9u) { case 0u: this.AgentId.MergeFrom(other.AgentId); arg_BF_0 = 663701328u; continue; case 2u: goto IL_9D; case 3u: this.agentId_ = new EntityId(); arg_BF_0 = (num * 2664145013u ^ 3000308724u); continue; case 4u: return; case 5u: goto IL_FF; case 6u: arg_BF_0 = ((other.Program == 0u) ? 1624365777u : 361202041u); continue; case 7u: arg_BF_0 = (((this.agentId_ == null) ? 1350635889u : 1286024253u) ^ num * 35132881u); continue; case 8u: this.Program = other.Program; arg_BF_0 = (num * 3578763297u ^ 4052305732u); continue; } break; } return; IL_9D: arg_BF_0 = 1317028304u; goto IL_BA; IL_FF: arg_BF_0 = ((other.agentId_ == null) ? 663701328u : 1173245326u); goto IL_BA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13A: uint num; uint arg_F2_0 = ((num = input.ReadTag()) == 0u) ? 2737167952u : 4281465108u; while (true) { uint num2; switch ((num2 = (arg_F2_0 ^ 3890161303u)) % 11u) { case 0u: arg_F2_0 = 4281465108u; continue; case 1u: arg_F2_0 = ((this.agentId_ != null) ? 3833943132u : 2260638917u); continue; case 3u: this.Program = input.ReadUInt32(); arg_F2_0 = 3996638629u; continue; case 4u: arg_F2_0 = ((num == 10u) ? 3626667199u : 3781183690u); continue; case 5u: arg_F2_0 = (((num != 16u) ? 3847689829u : 3146855879u) ^ num2 * 2582375872u); continue; case 6u: input.ReadMessage(this.agentId_); arg_F2_0 = 4084983106u; continue; case 7u: this.agentId_ = new EntityId(); arg_F2_0 = (num2 * 48063015u ^ 1485148706u); continue; case 8u: input.SkipLastField(); arg_F2_0 = (num2 * 1470343769u ^ 756342471u); continue; case 9u: arg_F2_0 = (num2 * 2070404822u ^ 2876684203u); continue; case 10u: goto IL_13A; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Game.Chat/ChatCommandAttribute.cs using System; namespace AuthServer.Game.Chat { public class ChatCommandAttribute : Attribute { public string ChatCommand { get; set; } public string Description { get; set; } public ChatCommandAttribute(string chatCommand, string description = "") { while (true) { IL_39: uint arg_21_0 = 2049581474u; while (true) { uint num; switch ((num = (arg_21_0 ^ 145379230u)) % 3u) { case 0u: goto IL_39; case 1u: this.ChatCommand = chatCommand; arg_21_0 = (num * 1602605988u ^ 2913181962u); continue; } goto Block_1; } } Block_1: this.Description = description; } } } <file_sep>/Bgs.Protocol.Friends.V1/UpdateFriendStateRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class UpdateFriendStateRequest : IMessage<UpdateFriendStateRequest>, IEquatable<UpdateFriendStateRequest>, IDeepCloneable<UpdateFriendStateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateFriendStateRequest.__c __9 = new UpdateFriendStateRequest.__c(); internal UpdateFriendStateRequest cctor>b__39_0() { return new UpdateFriendStateRequest(); } } private static readonly MessageParser<UpdateFriendStateRequest> _parser = new MessageParser<UpdateFriendStateRequest>(new Func<UpdateFriendStateRequest>(UpdateFriendStateRequest.__c.__9.<.cctor>b__39_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int AttributeFieldNumber = 3; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(26u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int AttributesEpochFieldNumber = 4; private ulong attributesEpoch_; public static MessageParser<UpdateFriendStateRequest> Parser { get { return UpdateFriendStateRequest._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[8]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateFriendStateRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public ulong AttributesEpoch { get { return this.attributesEpoch_; } set { this.attributesEpoch_ = value; } } public UpdateFriendStateRequest() { } public UpdateFriendStateRequest(UpdateFriendStateRequest other) : this() { while (true) { IL_71: int arg_5B_0 = 138197937; while (true) { switch ((arg_5B_0 ^ 1969178045) % 3) { case 0: goto IL_71; case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.attribute_ = other.attribute_.Clone(); arg_5B_0 = 990959739; continue; } goto Block_3; } } Block_3: this.attributesEpoch_ = other.attributesEpoch_; } public UpdateFriendStateRequest Clone() { return new UpdateFriendStateRequest(this); } public override bool Equals(object other) { return this.Equals(other as UpdateFriendStateRequest); } public bool Equals(UpdateFriendStateRequest other) { if (other == null) { goto IL_9D; } goto IL_121; int arg_D3_0; while (true) { IL_CE: switch ((arg_D3_0 ^ -1744303010) % 13) { case 0: return false; case 1: arg_D3_0 = (UpdateFriendStateRequest.smethod_0(this.AgentId, other.AgentId) ? -367357248 : -1182270221); continue; case 2: return false; case 3: goto IL_9D; case 4: return false; case 5: goto IL_121; case 6: arg_D3_0 = ((!UpdateFriendStateRequest.smethod_0(this.TargetId, other.TargetId)) ? -1053466276 : -1931448835); continue; case 7: return false; case 8: arg_D3_0 = ((this.AttributesEpoch == other.AttributesEpoch) ? -2037267707 : -829539027); continue; case 9: return true; case 10: arg_D3_0 = (this.attribute_.Equals(other.attribute_) ? -1418002173 : -846892585); continue; case 11: return false; } break; } return true; IL_9D: arg_D3_0 = -1250883148; goto IL_CE; IL_121: arg_D3_0 = ((other != this) ? -490091127 : -459482617); goto IL_CE; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_4C; } goto IL_B1; uint arg_8D_0; while (true) { IL_88: uint num2; switch ((num2 = (arg_8D_0 ^ 3673112673u)) % 6u) { case 1u: num ^= UpdateFriendStateRequest.smethod_1(this.attribute_); arg_8D_0 = (((this.AttributesEpoch != 0uL) ? 3441392688u : 2304809195u) ^ num2 * 3418237658u); continue; case 2u: goto IL_4C; case 3u: num ^= this.AttributesEpoch.GetHashCode(); arg_8D_0 = (num2 * 3144632720u ^ 3493593837u); continue; case 4u: num ^= UpdateFriendStateRequest.smethod_1(this.AgentId); arg_8D_0 = (num2 * 2975703401u ^ 2390940476u); continue; case 5u: goto IL_B1; } break; } return num; IL_4C: arg_8D_0 = 3962648551u; goto IL_88; IL_B1: num ^= UpdateFriendStateRequest.smethod_1(this.TargetId); arg_8D_0 = 3193435110u; goto IL_88; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_2B; } goto IL_107; uint arg_D6_0; while (true) { IL_D1: uint num; switch ((num = (arg_D6_0 ^ 2297569733u)) % 9u) { case 1u: output.WriteMessage(this.AgentId); arg_D6_0 = (num * 489847472u ^ 2009233427u); continue; case 2u: output.WriteRawTag(10); arg_D6_0 = (num * 44108021u ^ 430178756u); continue; case 3u: output.WriteRawTag(32); arg_D6_0 = (num * 3054711198u ^ 85011882u); continue; case 4u: output.WriteUInt64(this.AttributesEpoch); arg_D6_0 = (num * 1420928030u ^ 2254976809u); continue; case 5u: this.attribute_.WriteTo(output, UpdateFriendStateRequest._repeated_attribute_codec); arg_D6_0 = (((this.AttributesEpoch == 0uL) ? 1706750650u : 1578081427u) ^ num * 940206737u); continue; case 6u: goto IL_2B; case 7u: goto IL_107; case 8u: output.WriteMessage(this.TargetId); arg_D6_0 = (num * 4174769364u ^ 2497432248u); continue; } break; } return; IL_2B: arg_D6_0 = 3894385544u; goto IL_D1; IL_107: output.WriteRawTag(18); arg_D6_0 = 3168805495u; goto IL_D1; } public int CalculateSize() { int num = 0; while (true) { IL_EF: uint arg_C7_0 = 2952557868u; while (true) { uint num2; switch ((num2 = (arg_C7_0 ^ 2855555594u)) % 7u) { case 1u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.AttributesEpoch); arg_C7_0 = (num2 * 3277525720u ^ 2981143680u); continue; case 2u: arg_C7_0 = (((this.AttributesEpoch != 0uL) ? 3949298729u : 3585021286u) ^ num2 * 122314675u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_C7_0 = (num2 * 3995431770u ^ 123008760u); continue; case 4u: arg_C7_0 = (((this.agentId_ != null) ? 101371693u : 1707490576u) ^ num2 * 3523334303u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); num += this.attribute_.CalculateSize(UpdateFriendStateRequest._repeated_attribute_codec); arg_C7_0 = 2172676064u; continue; case 6u: goto IL_EF; } return num; } } return num; } public void MergeFrom(UpdateFriendStateRequest other) { if (other == null) { goto IL_7D; } goto IL_1BB; uint arg_167_0; while (true) { IL_162: uint num; switch ((num = (arg_167_0 ^ 4033578344u)) % 14u) { case 0u: this.TargetId.MergeFrom(other.TargetId); arg_167_0 = 3120567902u; continue; case 1u: arg_167_0 = ((other.targetId_ == null) ? 3120567902u : 2937769436u); continue; case 2u: arg_167_0 = (((this.agentId_ == null) ? 2810436113u : 2858136429u) ^ num * 1263126810u); continue; case 3u: this.targetId_ = new EntityId(); arg_167_0 = (num * 542081306u ^ 1050733782u); continue; case 4u: arg_167_0 = (((other.AttributesEpoch != 0uL) ? 3524541772u : 2617335865u) ^ num * 3253687053u); continue; case 5u: this.agentId_ = new EntityId(); arg_167_0 = (num * 1421639247u ^ 3446453658u); continue; case 6u: this.attribute_.Add(other.attribute_); arg_167_0 = 2163636080u; continue; case 7u: goto IL_7D; case 8u: this.AttributesEpoch = other.AttributesEpoch; arg_167_0 = (num * 1390216915u ^ 2203960085u); continue; case 9u: goto IL_1BB; case 10u: return; case 11u: this.AgentId.MergeFrom(other.AgentId); arg_167_0 = 2944760849u; continue; case 12u: arg_167_0 = (((this.targetId_ != null) ? 3473917956u : 3294514847u) ^ num * 2338902375u); continue; } break; } return; IL_7D: arg_167_0 = 3372186654u; goto IL_162; IL_1BB: arg_167_0 = ((other.agentId_ == null) ? 2944760849u : 3686297322u); goto IL_162; } public void MergeFrom(CodedInputStream input) { while (true) { IL_262: uint num; uint arg_1F6_0 = ((num = input.ReadTag()) != 0u) ? 3788085689u : 2409127402u; while (true) { uint num2; switch ((num2 = (arg_1F6_0 ^ 3693909572u)) % 20u) { case 0u: arg_1F6_0 = 3788085689u; continue; case 1u: arg_1F6_0 = ((this.targetId_ != null) ? 3332044670u : 2903467373u); continue; case 2u: arg_1F6_0 = (((num != 32u) ? 1389340984u : 786263566u) ^ num2 * 1735052582u); continue; case 3u: arg_1F6_0 = ((this.agentId_ == null) ? 3657556252u : 4248260315u); continue; case 4u: arg_1F6_0 = ((num == 26u) ? 2467712628u : 4036331210u); continue; case 5u: arg_1F6_0 = (((num != 18u) ? 3971195589u : 2805828785u) ^ num2 * 2406439664u); continue; case 6u: this.AttributesEpoch = input.ReadUInt64(); arg_1F6_0 = 3764528815u; continue; case 7u: arg_1F6_0 = (((num != 10u) ? 179541607u : 359374357u) ^ num2 * 448373366u); continue; case 8u: this.agentId_ = new EntityId(); arg_1F6_0 = (num2 * 1353132457u ^ 1270853571u); continue; case 9u: arg_1F6_0 = (num2 * 3350685996u ^ 3749103168u); continue; case 11u: arg_1F6_0 = (num2 * 772906691u ^ 2799111034u); continue; case 12u: input.SkipLastField(); arg_1F6_0 = 3764528815u; continue; case 13u: arg_1F6_0 = ((num <= 18u) ? 3050284999u : 2947723572u); continue; case 14u: arg_1F6_0 = (num2 * 2166039190u ^ 1435099115u); continue; case 15u: input.ReadMessage(this.agentId_); arg_1F6_0 = 2290282947u; continue; case 16u: this.attribute_.AddEntriesFrom(input, UpdateFriendStateRequest._repeated_attribute_codec); arg_1F6_0 = 2414544098u; continue; case 17u: this.targetId_ = new EntityId(); arg_1F6_0 = (num2 * 3893482996u ^ 3419871082u); continue; case 18u: input.ReadMessage(this.targetId_); arg_1F6_0 = 3764528815u; continue; case 19u: goto IL_262; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Framework.Misc/Singleton.cs using System; using System.Reflection; using System.Threading; namespace Framework.Misc { public abstract class Singleton<T> where T : class { private static object sync = Singleton<T>.smethod_4(); private static T instance; public static T GetInstance() { object object_ = Singleton<T>.sync; bool flag = false; try { Singleton<T>.smethod_0(object_, ref flag); T result; while (true) { IL_77: uint arg_57_0 = 766018763u; while (true) { uint num; switch ((num = (arg_57_0 ^ 359265617u)) % 5u) { case 0u: goto IL_7E; case 1u: arg_57_0 = (((Singleton<T>.instance != null) ? 1848335579u : 1108333807u) ^ num * 124799509u); continue; case 2u: result = Singleton<T>.instance; arg_57_0 = (num * 764848325u ^ 39872962u); continue; case 3u: goto IL_77; } goto Block_4; } } Block_4: goto IL_80; IL_7E: return result; IL_80:; } finally { if (flag) { while (true) { IL_B7: uint arg_9F_0 = 1107217742u; while (true) { uint num; switch ((num = (arg_9F_0 ^ 359265617u)) % 3u) { case 1u: Singleton<T>.smethod_1(object_); arg_9F_0 = (num * 980933481u ^ 355050012u); continue; case 2u: goto IL_B7; } goto Block_7; } } Block_7:; } } return Singleton<T>.instance = (Singleton<T>.smethod_3(Singleton<T>.smethod_2(typeof(T).TypeHandle).method_0(BindingFlags.Instance | BindingFlags.NonPublic, null, Type.EmptyTypes, null), new object[0]) as T); } static void smethod_0(object object_0, ref bool bool_0) { Monitor.Enter(object_0, ref bool_0); } static void smethod_1(object object_0) { Monitor.Exit(object_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } ConstructorInfo method_0(BindingFlags bindingFlags_0, Binder binder_0, Type[] type_0, ParameterModifier[] parameterModifier_0) { return base.GetConstructor(bindingFlags_0, binder_0, type_0, parameterModifier_0); } static object smethod_3(ConstructorInfo constructorInfo_0, object[] object_0) { return constructorInfo_0.Invoke(object_0); } static object smethod_4() { return new object(); } } } <file_sep>/Framework.Constants.Movement/MovementFlag2.cs using System; namespace Framework.Constants.Movement { [Flags] public enum MovementFlag2 { Unknown = 1, Unknown2 = 2, Unknown3 = 4, Unknown4 = 8, Unknown5 = 16, Unknown6 = 32, Unknown7 = 64, Unknown8 = 128, Unknown9 = 256, Unknown10 = 512, Unknown11 = 1024, Unknown12 = 8192, Unknown13 = 16384, Unknown14 = 32768, Unknown15 = 65536, Unknown16 = 131072, Unknown17 = 262144 } } <file_sep>/Bgs.Protocol/InvitationTarget.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class InvitationTarget : IMessage<InvitationTarget>, IEquatable<InvitationTarget>, IDeepCloneable<InvitationTarget>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly InvitationTarget.__c __9 = new InvitationTarget.__c(); internal InvitationTarget cctor>b__34_0() { return new InvitationTarget(); } } private static readonly MessageParser<InvitationTarget> _parser = new MessageParser<InvitationTarget>(new Func<InvitationTarget>(InvitationTarget.__c.__9.<.cctor>b__34_0)); public const int IdentityFieldNumber = 1; private Identity identity_; public const int EmailFieldNumber = 2; private string email_ = ""; public const int BattleTagFieldNumber = 3; private string battleTag_ = ""; public static MessageParser<InvitationTarget> Parser { get { return InvitationTarget._parser; } } public static MessageDescriptor Descriptor { get { return InvitationTypesReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return InvitationTarget.Descriptor; } } public Identity Identity { get { return this.identity_; } set { this.identity_ = value; } } public string Email { get { return this.email_; } set { this.email_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public string BattleTag { get { return this.battleTag_; } set { this.battleTag_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public InvitationTarget() { } public InvitationTarget(InvitationTarget other) : this() { while (true) { IL_84: uint arg_64_0 = 1293158970u; while (true) { uint num; switch ((num = (arg_64_0 ^ 581874021u)) % 5u) { case 0u: goto IL_84; case 2u: this.battleTag_ = other.battleTag_; arg_64_0 = (num * 2534233388u ^ 2105641391u); continue; case 3u: this.email_ = other.email_; arg_64_0 = (num * 370127091u ^ 2989491841u); continue; case 4u: this.Identity = ((other.identity_ != null) ? other.Identity.Clone() : null); arg_64_0 = 1053271994u; continue; } return; } } } public InvitationTarget Clone() { return new InvitationTarget(this); } public override bool Equals(object other) { return this.Equals(other as InvitationTarget); } public bool Equals(InvitationTarget other) { if (other == null) { goto IL_18; } goto IL_EF; int arg_A9_0; while (true) { IL_A4: switch ((arg_A9_0 ^ -1464697841) % 11) { case 1: arg_A9_0 = (InvitationTarget.smethod_0(this.Identity, other.Identity) ? -815569005 : -182179835); continue; case 2: arg_A9_0 = ((!InvitationTarget.smethod_1(this.BattleTag, other.BattleTag)) ? -438962322 : -2041126269); continue; case 3: return false; case 4: arg_A9_0 = ((!InvitationTarget.smethod_1(this.Email, other.Email)) ? -142131300 : -911325721); continue; case 5: return false; case 6: return true; case 7: return false; case 8: goto IL_18; case 9: return false; case 10: goto IL_EF; } break; } return true; IL_18: arg_A9_0 = -1143796936; goto IL_A4; IL_EF: arg_A9_0 = ((other == this) ? -1017652279 : -226030094); goto IL_A4; } public override int GetHashCode() { int num = 1; if (this.identity_ != null) { goto IL_1F; } goto IL_DD; uint arg_A6_0; while (true) { IL_A1: uint num2; switch ((num2 = (arg_A6_0 ^ 542063503u)) % 7u) { case 0u: arg_A6_0 = ((InvitationTarget.smethod_3(this.BattleTag) == 0) ? 234027055u : 235004355u); continue; case 1u: num ^= InvitationTarget.smethod_2(this.Identity); arg_A6_0 = (num2 * 2812839430u ^ 2203635570u); continue; case 2u: num ^= InvitationTarget.smethod_2(this.BattleTag); arg_A6_0 = (num2 * 1812412790u ^ 3807736615u); continue; case 3u: num ^= InvitationTarget.smethod_2(this.Email); arg_A6_0 = (num2 * 521890068u ^ 454696927u); continue; case 4u: goto IL_1F; case 6u: goto IL_DD; } break; } return num; IL_1F: arg_A6_0 = 1183323723u; goto IL_A1; IL_DD: arg_A6_0 = ((InvitationTarget.smethod_3(this.Email) == 0) ? 1737555347u : 1641061240u); goto IL_A1; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.identity_ != null) { goto IL_43; } goto IL_11A; uint arg_DA_0; while (true) { IL_D5: uint num; switch ((num = (arg_DA_0 ^ 3104834726u)) % 9u) { case 0u: output.WriteString(this.Email); arg_DA_0 = (num * 3895185694u ^ 1904042383u); continue; case 1u: goto IL_11A; case 2u: arg_DA_0 = ((InvitationTarget.smethod_3(this.BattleTag) == 0) ? 3284107111u : 2321937597u); continue; case 3u: output.WriteRawTag(26); arg_DA_0 = (num * 94161486u ^ 636072543u); continue; case 4u: output.WriteRawTag(18); arg_DA_0 = (num * 4260277304u ^ 572739764u); continue; case 5u: output.WriteString(this.BattleTag); arg_DA_0 = (num * 4205741005u ^ 4169816640u); continue; case 6u: goto IL_43; case 8u: output.WriteRawTag(10); output.WriteMessage(this.Identity); arg_DA_0 = (num * 124134465u ^ 977088389u); continue; } break; } return; IL_43: arg_DA_0 = 3717389813u; goto IL_D5; IL_11A: arg_DA_0 = ((InvitationTarget.smethod_3(this.Email) == 0) ? 2537043891u : 2188869768u); goto IL_D5; } public int CalculateSize() { int num = 0; while (true) { IL_10E: uint arg_E2_0 = 1965375945u; while (true) { uint num2; switch ((num2 = (arg_E2_0 ^ 870622999u)) % 8u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.Email); arg_E2_0 = (num2 * 4285220991u ^ 3355189899u); continue; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.BattleTag); arg_E2_0 = (num2 * 2046767665u ^ 1442256636u); continue; case 3u: arg_E2_0 = ((InvitationTarget.smethod_3(this.Email) == 0) ? 1868316115u : 1489359807u); continue; case 4u: arg_E2_0 = ((InvitationTarget.smethod_3(this.BattleTag) != 0) ? 1044742662u : 1609792701u); continue; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Identity); arg_E2_0 = (num2 * 65253591u ^ 2992012327u); continue; case 6u: arg_E2_0 = (((this.identity_ != null) ? 3595774630u : 3858071312u) ^ num2 * 219496698u); continue; case 7u: goto IL_10E; } return num; } } return num; } public void MergeFrom(InvitationTarget other) { if (other == null) { goto IL_101; } goto IL_153; uint arg_10B_0; while (true) { IL_106: uint num; switch ((num = (arg_10B_0 ^ 128429106u)) % 11u) { case 0u: goto IL_101; case 1u: arg_10B_0 = ((InvitationTarget.smethod_3(other.Email) == 0) ? 1264449550u : 1578303999u); continue; case 2u: goto IL_153; case 3u: this.Identity.MergeFrom(other.Identity); arg_10B_0 = 373572617u; continue; case 4u: this.identity_ = new Identity(); arg_10B_0 = (num * 2843593886u ^ 1921193449u); continue; case 5u: arg_10B_0 = ((InvitationTarget.smethod_3(other.BattleTag) == 0) ? 13464445u : 1835787145u); continue; case 6u: this.Email = other.Email; arg_10B_0 = (num * 3559346774u ^ 197457104u); continue; case 7u: this.BattleTag = other.BattleTag; arg_10B_0 = (num * 1895651964u ^ 704655337u); continue; case 8u: arg_10B_0 = (((this.identity_ != null) ? 3641390961u : 3226621156u) ^ num * 615036505u); continue; case 9u: return; } break; } return; IL_101: arg_10B_0 = 1230129158u; goto IL_106; IL_153: arg_10B_0 = ((other.identity_ != null) ? 1548669078u : 373572617u); goto IL_106; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1AA: uint num; uint arg_152_0 = ((num = input.ReadTag()) != 0u) ? 4120374329u : 2412510818u; while (true) { uint num2; switch ((num2 = (arg_152_0 ^ 3114483619u)) % 15u) { case 0u: arg_152_0 = 4120374329u; continue; case 1u: input.SkipLastField(); arg_152_0 = (num2 * 2611984491u ^ 1185075762u); continue; case 2u: arg_152_0 = (num2 * 3932401031u ^ 4144928171u); continue; case 3u: arg_152_0 = (num2 * 2314201282u ^ 403021835u); continue; case 5u: goto IL_1AA; case 6u: arg_152_0 = (((num == 26u) ? 819288335u : 876085805u) ^ num2 * 564671746u); continue; case 7u: this.identity_ = new Identity(); arg_152_0 = (num2 * 2287522231u ^ 1684420270u); continue; case 8u: arg_152_0 = (num2 * 2958989048u ^ 2504780945u); continue; case 9u: input.ReadMessage(this.identity_); arg_152_0 = 3990377482u; continue; case 10u: arg_152_0 = ((this.identity_ == null) ? 4286373039u : 3136171834u); continue; case 11u: arg_152_0 = (((num == 18u) ? 4220038924u : 2868102749u) ^ num2 * 967795452u); continue; case 12u: this.BattleTag = input.ReadString(); arg_152_0 = 3403292185u; continue; case 13u: arg_152_0 = ((num != 10u) ? 3383413984u : 3127068585u); continue; case 14u: this.Email = input.ReadString(); arg_152_0 = 3291983005u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static bool smethod_1(string string_0, string string_1) { return string_0 != string_1; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.Game.Managers/WorldManager.cs using AuthServer.Game.Entities; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Constants; using Framework.Constants.Misc; using Framework.Constants.Movement; using Framework.Constants.Net; using Framework.Logging; using Framework.Misc; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Text; using System.Threading; namespace AuthServer.Game.Managers { public sealed class WorldManager : Singleton<WorldManager> { public enum AccountDataTypes { GlobalConfigCache, PerCharacterConfigCache, GlobalBindingsCache, PerCharacterBindingsCache, GlobalMacrosCache, PerCharacterMacrosCache, PerCharacterLayoutCache, PerCharacterChatCache } [CompilerGenerated] [Serializable] private sealed class __c { public static readonly WorldManager.__c __9 = new WorldManager.__c(); public static Func<string, string> __9__40_0; internal string SendHotfixesb__40_0(string s) { return WorldManager.__c.smethod_0(s, Module.smethod_37<string>(3974021651u), ""); } static string smethod_0(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } } public List<Emote> EmoteList = new List<Emote>(); public List<Character> CharaterList = new List<Character>(); public List<Races> ChrRaces = new List<Races>(); public ConcurrentDictionary<ulong, WorldClass> Sessions; public ConcurrentDictionary<ulong, WorldClass2> Sessions2; public Dictionary<uint, uint> SpellVisualIds = new Dictionary<uint, uint>(); public Dictionary<uint, uint> MountDisplays = new Dictionary<uint, uint>(); public Dictionary<string, Tuple<uint, uint>> MountSpells = new Dictionary<string, Tuple<uint, uint>>(); public Dictionary<uint, uint> DefaultPowerTypes = new Dictionary<uint, uint>(); public Dictionary<uint, uint> DefaultChrSpec = new Dictionary<uint, uint>(); private static readonly object taskObject = WorldManager.smethod_53(); public Dictionary<string, DBInfo> DBInfo = new Dictionary<string, DBInfo>(); public WorldClass Session { get; set; } private WorldManager() { StreamReader streamReader = WorldManager.smethod_7(WorldManager.smethod_6(WorldManager.smethod_5(), Module.smethod_35<string>(1758028300u))); try { while (!WorldManager.smethod_11(streamReader)) { string[] array = WorldManager.smethod_9(WorldManager.smethod_8(streamReader), new char[] { ';' }); string[] array2 = WorldManager.smethod_10(array[3], new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); DBInfo dBInfo = new DBInfo { Name = array[0], TableHash = uint.Parse(array[1]), HasIndex = bool.Parse(array[2]) }; dBInfo.FieldBytes = new sbyte[array2.Length]; for (int i = 0; i < array2.Length; i++) { dBInfo.FieldBytes[i] = sbyte.Parse(array2[i]); } this.DBInfo.Add(array[0], dBInfo); } } finally { if (streamReader != null) { WorldManager.smethod_12(streamReader); } } StreamReader streamReader2 = WorldManager.smethod_7(WorldManager.smethod_6(WorldManager.smethod_5(), Module.smethod_36<string>(330893391u))); try { while (!WorldManager.smethod_11(streamReader2)) { string[] array3 = WorldManager.smethod_9(WorldManager.smethod_8(streamReader2), new char[] { ',' }); try { if (!this.SpellVisualIds.ContainsKey(uint.Parse(WorldManager.smethod_13(array3[1], Module.smethod_34<string>(1801001672u), "")))) { this.SpellVisualIds.Add(uint.Parse(WorldManager.smethod_13(array3[1], Module.smethod_36<string>(1708679815u), "")), uint.Parse(WorldManager.smethod_13(array3[2], Module.smethod_36<string>(1708679815u), ""))); } } catch (Exception) { } } } finally { if (streamReader2 != null) { WorldManager.smethod_12(streamReader2); } } using (StreamReader streamReader3 = WorldManager.smethod_7(WorldManager.smethod_6(WorldManager.smethod_5(), Module.smethod_35<string>(3730591132u)))) { while (!streamReader3.EndOfStream) { string[] array4 = WorldManager.smethod_9(WorldManager.smethod_8(streamReader3), new char[] { ',' }); int num; if (array4.Length >= 3 && int.TryParse(WorldManager.smethod_13(array4[0], Module.smethod_35<string>(764625391u), ""), out num)) { try { uint item = uint.Parse(WorldManager.smethod_13(array4[0], Module.smethod_35<string>(764625391u), "")); uint item2 = uint.Parse(WorldManager.smethod_13(array4[1], Module.smethod_34<string>(1801001672u), "")); string text = WorldManager.smethod_13(WorldManager.smethod_13(array4[2], Module.smethod_37<string>(3974021651u), ""), Module.smethod_36<string>(2793817990u), ""); int num2 = 2; while (this.MountSpells.ContainsKey(text)) { string arg_321_0 = text; int num3 = num2; num2 = num3 + 1; text = arg_321_0 + num3.ToString(); } this.MountSpells.Add(text, Tuple.Create<uint, uint>(item, item2)); } catch (Exception) { } } } } using (StreamReader streamReader4 = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(Module.smethod_33<string>(2373467861u)))) { while (!streamReader4.EndOfStream) { string[] array5 = streamReader4.ReadLine().Split(new char[] { ',' }); try { uint key = uint.Parse(array5[1].Replace(Module.smethod_35<string>(764625391u), "")); uint value = uint.Parse(array5[2].Replace(Module.smethod_34<string>(1801001672u), "")); if (!this.MountDisplays.ContainsKey(key)) { this.MountDisplays.Add(key, value); } } catch (Exception) { } } Log.Message(LogType.Debug, string.Format(Module.smethod_36<string>(889432748u), this.MountSpells.Count), Array.Empty<object>()); } using (StreamReader streamReader5 = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(Module.smethod_34<string>(1585865081u)))) { while (!streamReader5.EndOfStream) { string[] array6 = streamReader5.ReadLine().Split(new char[] { ';' }); try { uint key2 = uint.Parse(array6[1].Replace(Module.smethod_35<string>(764625391u), "")); uint value2 = uint.Parse(array6[2].Replace(Module.smethod_33<string>(3031927268u), "")); if (!this.DefaultPowerTypes.ContainsKey(key2)) { this.DefaultPowerTypes.Add(key2, value2); } } catch (Exception) { } } } using (StreamReader streamReader6 = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(Module.smethod_35<string>(4080432764u)))) { while (!streamReader6.EndOfStream) { string[] array7 = streamReader6.ReadLine().Split(new string[] { Module.smethod_36<string>(3508781973u) }, StringSplitOptions.None); try { uint value3 = uint.Parse(array7[0].Replace(Module.smethod_33<string>(3031927268u), "")); uint key3 = uint.Parse(array7[6].Replace(Module.smethod_35<string>(764625391u), "")); if (!this.DefaultChrSpec.ContainsKey(key3)) { this.DefaultChrSpec.Add(key3, value3); } } catch (Exception) { } } } this.Sessions = new ConcurrentDictionary<ulong, WorldClass>(); this.Sessions2 = new ConcurrentDictionary<ulong, WorldClass2>(); this.LoadEmotes(); this.LoadRaces(); this.StartRangeUpdateTimers(); } public void LoadEmotes() { this.EmoteList.Add(new Emote { Id = 3, EmoteId = 14 }); while (true) { IL_119B: uint arg_1096_0 = 383320789u; while (true) { uint num; switch ((num = (arg_1096_0 ^ 1033623843u)) % 62u) { case 0u: this.EmoteList.Add(new Emote { Id = 61, EmoteId = 12 }); arg_1096_0 = (num * 3988128806u ^ 1907664105u); continue; case 1u: this.EmoteList.Add(new Emote { Id = 183, EmoteId = 14 }); arg_1096_0 = (num * 3949113554u ^ 3858867641u); continue; case 2u: this.EmoteList.Add(new Emote { Id = 20, EmoteId = 11 }); this.EmoteList.Add(new Emote { Id = 21, EmoteId = 4 }); this.EmoteList.Add(new Emote { Id = 22, EmoteId = 19 }); arg_1096_0 = (num * 1985080112u ^ 2700034040u); continue; case 3u: this.EmoteList.Add(new Emote { Id = 303, EmoteId = 22 }); arg_1096_0 = (num * 879220111u ^ 3539647698u); continue; case 4u: this.EmoteList.Add(new Emote { Id = 65, EmoteId = 18 }); arg_1096_0 = (num * 226760681u ^ 3881186566u); continue; case 5u: this.EmoteList.Add(new Emote { Id = 143, EmoteId = 18 }); arg_1096_0 = (num * 672488247u ^ 4288360987u); continue; case 6u: this.EmoteList.Add(new Emote { Id = 33, EmoteId = 2 }); arg_1096_0 = (num * 2412453073u ^ 2583259582u); continue; case 7u: this.EmoteList.Add(new Emote { Id = 87, EmoteId = 12 }); this.EmoteList.Add(new Emote { Id = 92, EmoteId = 20 }); arg_1096_0 = (num * 1761933501u ^ 3017686905u); continue; case 8u: this.EmoteList.Add(new Emote { Id = 304, EmoteId = 25 }); this.EmoteList.Add(new Emote { Id = 305, EmoteId = 25 }); this.EmoteList.Add(new Emote { Id = 306, EmoteId = 22 }); this.EmoteList.Add(new Emote { Id = 307, EmoteId = 15 }); this.EmoteList.Add(new Emote { Id = 323, EmoteId = 1 }); arg_1096_0 = (num * 2919730049u ^ 1023028719u); continue; case 9u: this.EmoteList.Add(new Emote { Id = 59, EmoteId = 68 }); this.EmoteList.Add(new Emote { Id = 60, EmoteId = 11 }); arg_1096_0 = (num * 3336805849u ^ 1391685926u); continue; case 10u: this.EmoteList.Add(new Emote { Id = 204, EmoteId = 15 }); arg_1096_0 = (num * 324831070u ^ 2312068459u); continue; case 11u: this.EmoteList.Add(new Emote { Id = 8, EmoteId = 20 }); arg_1096_0 = (num * 2382385865u ^ 912716636u); continue; case 12u: this.EmoteList.Add(new Emote { Id = 28, EmoteId = 431 }); this.EmoteList.Add(new Emote { Id = 31, EmoteId = 18 }); arg_1096_0 = (num * 1069288867u ^ 3171396263u); continue; case 13u: this.EmoteList.Add(new Emote { Id = 379, EmoteId = 18 }); arg_1096_0 = (num * 1204384598u ^ 2498832053u); continue; case 14u: this.EmoteList.Add(new Emote { Id = 368, EmoteId = 25 }); arg_1096_0 = (num * 2115931019u ^ 4196830548u); continue; case 15u: this.EmoteList.Add(new Emote { Id = 84, EmoteId = 24 }); this.EmoteList.Add(new Emote { Id = 86, EmoteId = 13 }); arg_1096_0 = (num * 1813435559u ^ 3064602599u); continue; case 16u: this.EmoteList.Add(new Emote { Id = 223, EmoteId = 430 }); this.EmoteList.Add(new Emote { Id = 243, EmoteId = 21 }); arg_1096_0 = (num * 3444559954u ^ 2173418787u); continue; case 17u: this.EmoteList.Add(new Emote { Id = 45, EmoteId = 11 }); arg_1096_0 = (num * 678895071u ^ 3909931692u); continue; case 18u: this.EmoteList.Add(new Emote { Id = 41, EmoteId = 23 }); arg_1096_0 = (num * 3866074734u ^ 4248679983u); continue; case 19u: this.EmoteList.Add(new Emote { Id = 120, EmoteId = 6 }); arg_1096_0 = (num * 2002016998u ^ 2747455175u); continue; case 20u: this.EmoteList.Add(new Emote { Id = 113, EmoteId = 14 }); this.EmoteList.Add(new Emote { Id = 118, EmoteId = 6 }); arg_1096_0 = (num * 3616658991u ^ 3550801574u); continue; case 21u: this.EmoteList.Add(new Emote { Id = 329, EmoteId = 1 }); arg_1096_0 = (num * 3591773383u ^ 238948831u); continue; case 22u: this.EmoteList.Add(new Emote { Id = 71, EmoteId = 20 }); this.EmoteList.Add(new Emote { Id = 72, EmoteId = 25 }); this.EmoteList.Add(new Emote { Id = 74, EmoteId = 16 }); arg_1096_0 = (num * 4037692556u ^ 1919369583u); continue; case 23u: this.EmoteList.Add(new Emote { Id = 66, EmoteId = 274 }); arg_1096_0 = (num * 2243908024u ^ 3279251898u); continue; case 24u: this.EmoteList.Add(new Emote { Id = 75, EmoteId = 15 }); this.EmoteList.Add(new Emote { Id = 76, EmoteId = 11 }); this.EmoteList.Add(new Emote { Id = 77, EmoteId = 14 }); this.EmoteList.Add(new Emote { Id = 78, EmoteId = 66 }); arg_1096_0 = (num * 821018009u ^ 4120528689u); continue; case 25u: this.EmoteList.Add(new Emote { Id = 48, EmoteId = 3 }); this.EmoteList.Add(new Emote { Id = 51, EmoteId = 20 }); this.EmoteList.Add(new Emote { Id = 52, EmoteId = 11 }); arg_1096_0 = (num * 3432060165u ^ 1844422215u); continue; case 26u: this.EmoteList.Add(new Emote { Id = 327, EmoteId = 25 }); arg_1096_0 = (num * 2096857026u ^ 281974834u); continue; case 27u: this.EmoteList.Add(new Emote { Id = 34, EmoteId = 10 }); this.EmoteList.Add(new Emote { Id = 35, EmoteId = 7 }); arg_1096_0 = (num * 400824335u ^ 2672116513u); continue; case 28u: this.EmoteList.Add(new Emote { Id = 5, EmoteId = 21 }); arg_1096_0 = (num * 4015744615u ^ 4208577417u); continue; case 29u: goto IL_119B; case 31u: this.EmoteList.Add(new Emote { Id = 83, EmoteId = 6 }); arg_1096_0 = (num * 4072189047u ^ 3535729883u); continue; case 32u: this.EmoteList.Add(new Emote { Id = 97, EmoteId = 1 }); this.EmoteList.Add(new Emote { Id = 100, EmoteId = 4 }); arg_1096_0 = (num * 783184666u ^ 740102824u); continue; case 33u: this.EmoteList.Add(new Emote { Id = 343, EmoteId = 21 }); arg_1096_0 = (num * 3541583344u ^ 1152898197u); continue; case 34u: this.EmoteList.Add(new Emote { Id = 450, EmoteId = 25 }); this.EmoteList.Add(new Emote { Id = 453, EmoteId = 1 }); this.EmoteList.Add(new Emote { Id = 456, EmoteId = 483 }); this.EmoteList.Add(new Emote { Id = 506, EmoteId = 60 }); arg_1096_0 = (num * 126481702u ^ 2173508319u); continue; case 35u: this.EmoteList.Add(new Emote { Id = 372, EmoteId = 274 }); this.EmoteList.Add(new Emote { Id = 373, EmoteId = 274 }); arg_1096_0 = (num * 1882115798u ^ 1999724116u); continue; case 36u: this.EmoteList.Add(new Emote { Id = 366, EmoteId = 377 }); arg_1096_0 = (num * 396734040u ^ 4282366865u); continue; case 37u: this.EmoteList.Add(new Emote { Id = 141, EmoteId = 26 }); arg_1096_0 = (num * 874622311u ^ 3406593241u); continue; case 38u: this.EmoteList.Add(new Emote { Id = 43, EmoteId = 5 }); arg_1096_0 = (num * 1064566403u ^ 2092857606u); continue; case 39u: this.EmoteList.Add(new Emote { Id = 101, EmoteId = 3 }); this.EmoteList.Add(new Emote { Id = 102, EmoteId = 3 }); this.EmoteList.Add(new Emote { Id = 107, EmoteId = 6 }); arg_1096_0 = (num * 977384842u ^ 1300664921u); continue; case 40u: this.EmoteList.Add(new Emote { Id = 324, EmoteId = 1 }); this.EmoteList.Add(new Emote { Id = 325, EmoteId = 1 }); arg_1096_0 = (num * 438029976u ^ 4097691800u); continue; case 41u: this.EmoteList.Add(new Emote { Id = 58, EmoteId = 17 }); arg_1096_0 = (num * 1129476334u ^ 1384260922u); continue; case 42u: this.EmoteList.Add(new Emote { Id = 406, EmoteId = 20 }); this.EmoteList.Add(new Emote { Id = 433, EmoteId = 1 }); arg_1096_0 = (num * 2600772560u ^ 2077837713u); continue; case 43u: this.EmoteList.Add(new Emote { Id = 37, EmoteId = 7 }); arg_1096_0 = (num * 3039431943u ^ 2652790730u); continue; case 44u: this.EmoteList.Add(new Emote { Id = 264, EmoteId = 275 }); arg_1096_0 = (num * 1016826721u ^ 2004982134u); continue; case 45u: this.EmoteList.Add(new Emote { Id = 24, EmoteId = 21 }); this.EmoteList.Add(new Emote { Id = 25, EmoteId = 6 }); this.EmoteList.Add(new Emote { Id = 26, EmoteId = 4 }); arg_1096_0 = (num * 928883127u ^ 4103030592u); continue; case 46u: this.EmoteList.Add(new Emote { Id = 12, EmoteId = 24 }); this.EmoteList.Add(new Emote { Id = 17, EmoteId = 2 }); this.EmoteList.Add(new Emote { Id = 19, EmoteId = 3 }); arg_1096_0 = (num * 3080942513u ^ 1159393063u); continue; case 47u: this.EmoteList.Add(new Emote { Id = 378, EmoteId = 7 }); arg_1096_0 = (num * 3859871708u ^ 791082682u); continue; case 48u: this.EmoteList.Add(new Emote { Id = 124, EmoteId = 6 }); this.EmoteList.Add(new Emote { Id = 132, EmoteId = 479 }); arg_1096_0 = (num * 133261945u ^ 1781375818u); continue; case 49u: this.EmoteList.Add(new Emote { Id = 93, EmoteId = 1 }); this.EmoteList.Add(new Emote { Id = 94, EmoteId = 5 }); arg_1096_0 = (num * 1311885094u ^ 3377101607u); continue; case 50u: this.EmoteList.Add(new Emote { Id = 47, EmoteId = 11 }); arg_1096_0 = (num * 1367274857u ^ 508205686u); continue; case 51u: this.EmoteList.Add(new Emote { Id = 328, EmoteId = 24 }); arg_1096_0 = (num * 1143844133u ^ 3790230005u); continue; case 52u: this.EmoteList.Add(new Emote { Id = 95, EmoteId = 6 }); arg_1096_0 = (num * 3116750435u ^ 3360215427u); continue; case 53u: this.EmoteList.Add(new Emote { Id = 67, EmoteId = 273 }); arg_1096_0 = (num * 2799762999u ^ 178461902u); continue; case 54u: this.EmoteList.Add(new Emote { Id = 55, EmoteId = 3 }); arg_1096_0 = (num * 2620263892u ^ 808570436u); continue; case 55u: this.EmoteList.Add(new Emote { Id = 23, EmoteId = 11 }); arg_1096_0 = (num * 154120020u ^ 917128732u); continue; case 56u: this.EmoteList.Add(new Emote { Id = 6, EmoteId = 24 }); arg_1096_0 = (num * 551626148u ^ 2234039218u); continue; case 57u: this.EmoteList.Add(new Emote { Id = 136, EmoteId = 19 }); arg_1096_0 = (num * 403777378u ^ 4202562932u); continue; case 58u: this.EmoteList.Add(new Emote { Id = 82, EmoteId = 22 }); arg_1096_0 = (num * 1935989534u ^ 2806915022u); continue; case 59u: this.EmoteList.Add(new Emote { Id = 326, EmoteId = 1 }); arg_1096_0 = (num * 985577322u ^ 1151179855u); continue; case 60u: this.EmoteList.Add(new Emote { Id = 32, EmoteId = 6 }); arg_1096_0 = (num * 289906865u ^ 3244127327u); continue; case 61u: this.EmoteList.Add(new Emote { Id = 53, EmoteId = 3 }); arg_1096_0 = (num * 684403862u ^ 3910573083u); continue; } return; } } } public void LoadRaces() { this.ChrRaces.Add(new Races { Id = 1u, MaleDisplayId = 49u, FemaleDisplayId = 50u, CinematicSequence = 81u, Faction = 1u }); this.ChrRaces.Add(new Races { Id = 2u, MaleDisplayId = 51u, FemaleDisplayId = 52u, CinematicSequence = 21u, Faction = 2u }); this.ChrRaces.Add(new Races { Id = 3u, MaleDisplayId = 53u, FemaleDisplayId = 54u, CinematicSequence = 41u, Faction = 3u }); while (true) { IL_532: uint arg_4ED_0 = 2844743432u; while (true) { uint num; switch ((num = (arg_4ED_0 ^ 3663340779u)) % 14u) { case 0u: this.ChrRaces.Add(new Races { Id = 29u, MaleDisplayId = 75082u, FemaleDisplayId = 75083u, CinematicSequence = 0u, Faction = 4u }); this.ChrRaces.Add(new Races { Id = 30u, MaleDisplayId = 75084u, FemaleDisplayId = 75085u, CinematicSequence = 0u, Faction = 1629u }); arg_4ED_0 = (num * 3899624556u ^ 578884844u); continue; case 2u: this.ChrRaces.Add(new Races { Id = 5u, MaleDisplayId = 57u, FemaleDisplayId = 58u, CinematicSequence = 2u, Faction = 5u }); arg_4ED_0 = (num * 3849523252u ^ 3668419392u); continue; case 3u: this.ChrRaces.Add(new Races { Id = 4u, MaleDisplayId = 55u, FemaleDisplayId = 56u, CinematicSequence = 61u, Faction = 4u }); arg_4ED_0 = (num * 1634226968u ^ 2493302219u); continue; case 4u: this.ChrRaces.Add(new Races { Id = 9u, MaleDisplayId = 6894u, FemaleDisplayId = 6895u, CinematicSequence = 172u, Faction = 2204u }); arg_4ED_0 = (num * 2619368077u ^ 3772967955u); continue; case 5u: this.ChrRaces.Add(new Races { Id = 22u, MaleDisplayId = 29422u, FemaleDisplayId = 29423u, CinematicSequence = 170u, Faction = 2203u }); arg_4ED_0 = (num * 2046422190u ^ 792325859u); continue; case 6u: this.ChrRaces.Add(new Races { Id = 10u, MaleDisplayId = 15476u, FemaleDisplayId = 15475u, CinematicSequence = 162u, Faction = 1610u }); arg_4ED_0 = (num * 2372201018u ^ 2396748051u); continue; case 7u: this.ChrRaces.Add(new Races { Id = 6u, MaleDisplayId = 59u, FemaleDisplayId = 60u, CinematicSequence = 141u, Faction = 6u }); arg_4ED_0 = (num * 3362953633u ^ 3896888015u); continue; case 8u: this.ChrRaces.Add(new Races { Id = 11u, MaleDisplayId = 16125u, FemaleDisplayId = 16126u, CinematicSequence = 163u, Faction = 1629u }); arg_4ED_0 = (num * 2041017202u ^ 903895460u); continue; case 9u: this.ChrRaces.Add(new Races { Id = 7u, MaleDisplayId = 1563u, FemaleDisplayId = 1564u, CinematicSequence = 101u, Faction = 115u }); arg_4ED_0 = (num * 2116441773u ^ 4134192853u); continue; case 10u: this.ChrRaces.Add(new Races { Id = 24u, MaleDisplayId = 38551u, FemaleDisplayId = 38552u, CinematicSequence = 259u, Faction = 2395u }); arg_4ED_0 = (num * 3765964621u ^ 2300467412u); continue; case 11u: this.ChrRaces.Add(new Races { Id = 27u, MaleDisplayId = 75078u, FemaleDisplayId = 75079u, CinematicSequence = 259u, Faction = 1610u }); this.ChrRaces.Add(new Races { Id = 28u, MaleDisplayId = 75080u, FemaleDisplayId = 75081u, CinematicSequence = 0u, Faction = 6u }); arg_4ED_0 = (num * 2697379296u ^ 486200463u); continue; case 12u: goto IL_532; case 13u: this.ChrRaces.Add(new Races { Id = 8u, MaleDisplayId = 1478u, FemaleDisplayId = 1479u, CinematicSequence = 121u, Faction = 116u }); arg_4ED_0 = (num * 4236021631u ^ 237223990u); continue; } return; } } } public void StartRangeUpdateTimers() { Thread expr_11 = WorldManager.smethod_14(new ThreadStart(this.UpdateTask)); WorldManager.smethod_15(expr_11, true); WorldManager.smethod_16(expr_11); } private void UpdateTask() { while (true) { object object_ = WorldManager.taskObject; bool flag = false; try { WorldManager.smethod_17(object_, ref flag); WorldManager.smethod_18(50); using (List<KeyValuePair<ulong, WorldClass>>.Enumerator enumerator = this.Sessions.ToList<KeyValuePair<ulong, WorldClass>>().GetEnumerator()) { while (true) { IL_D0: int arg_A4_0 = enumerator.MoveNext() ? 961296191 : 1040266866; while (true) { switch ((arg_A4_0 ^ 665094178) % 4) { case 1: { KeyValuePair<ulong, WorldClass> current = enumerator.Current; WorldClass value = current.Value; Character character = value.Character; this.WriteInRangeObjects(Manager.SpawnMgr.GetInRangeCreatures(character), value, ObjectType.Unit); this.WriteInRangeObjects(Manager.SpawnMgr.GetInRangeObjects(character), value, ObjectType.GameObject); this.WriteOutOfRangeObjects(Manager.SpawnMgr.GetOutOfRangeCreatures(character), value); arg_A4_0 = 661127700; continue; } case 2: goto IL_D0; case 3: arg_A4_0 = 961296191; continue; } goto Block_4; } } Block_4:; } } finally { if (flag) { while (true) { IL_128: uint arg_10F_0 = 28277465u; while (true) { uint num; switch ((num = (arg_10F_0 ^ 665094178u)) % 3u) { case 0u: goto IL_128; case 2u: WorldManager.smethod_19(object_); arg_10F_0 = (num * 50070957u ^ 75260493u); continue; } goto Block_9; } } Block_9:; } } } } public bool AddSession(ulong guid, ref WorldClass session) { return this.Sessions.TryAdd(guid, session); } public WorldClass DeleteSession(ulong guid) { WorldClass result; this.Sessions.TryRemove(guid, out result); return result; } public WorldClass GetSession(string name) { IEnumerator<KeyValuePair<ulong, WorldClass>> enumerator = this.Sessions.GetEnumerator(); try { WorldClass value; while (true) { IL_AC: uint arg_79_0 = WorldManager.smethod_21(enumerator) ? 1123578797u : 80446224u; while (true) { uint num; switch ((num = (arg_79_0 ^ 906019294u)) % 6u) { case 1u: goto IL_AC; case 2u: goto IL_BB; case 3u: { KeyValuePair<ulong, WorldClass> current = enumerator.Current; arg_79_0 = (WorldManager.smethod_20(current.Value.Character.Name, name) ? 204615514u : 757521103u); continue; } case 4u: { KeyValuePair<ulong, WorldClass> current; value = current.Value; arg_79_0 = (num * 1777530322u ^ 1277159314u); continue; } case 5u: arg_79_0 = 1123578797u; continue; } goto Block_4; } } Block_4: goto IL_FA; IL_BB: return value; } finally { if (enumerator != null) { while (true) { IL_F2: uint arg_DA_0 = 325433707u; while (true) { uint num; switch ((num = (arg_DA_0 ^ 906019294u)) % 3u) { case 1u: WorldManager.smethod_12(enumerator); arg_DA_0 = (num * 3562700384u ^ 864247161u); continue; case 2u: goto IL_F2; } goto Block_8; } } Block_8:; } } IL_FA: return null; } public WorldClass GetSession(ulong guid) { WorldClass result; if (this.Sessions.TryGetValue(guid, out result)) { return result; } return null; } public bool AddSession2(ulong guid, ref WorldClass2 session) { return this.Sessions2.TryAdd(guid, session); } public WorldClass2 DeleteSession2(ulong guid) { WorldClass2 result; this.Sessions2.TryRemove(guid, out result); return result; } public WorldClass2 GetSession2(string name) { IEnumerator<KeyValuePair<ulong, WorldClass2>> enumerator = this.Sessions2.GetEnumerator(); try { KeyValuePair<ulong, WorldClass2> current; while (true) { IL_A4: uint arg_71_0 = WorldManager.smethod_21(enumerator) ? 2804172031u : 3884806164u; while (true) { uint num; switch ((num = (arg_71_0 ^ 3663131711u)) % 6u) { case 0u: arg_71_0 = 2804172031u; continue; case 1u: goto IL_B1; case 2u: arg_71_0 = ((WorldManager.smethod_20(current.Value.Character.Name, name) ? 587633784u : 1054374254u) ^ num * 2411786678u); continue; case 3u: goto IL_A4; case 4u: current = enumerator.Current; arg_71_0 = 3002903789u; continue; } goto Block_4; } } Block_4: goto IL_BB; IL_B1: return current.Value; IL_BB:; } finally { if (enumerator != null) { while (true) { IL_F2: uint arg_DA_0 = 2350916655u; while (true) { uint num; switch ((num = (arg_DA_0 ^ 3663131711u)) % 3u) { case 0u: goto IL_F2; case 2u: WorldManager.smethod_12(enumerator); arg_DA_0 = (num * 488464690u ^ 3685562903u); continue; } goto Block_8; } } Block_8:; } } return null; } public WorldClass2 GetSession2(ulong guid) { WorldClass2 result; if (this.Sessions2.TryGetValue(0uL, out result)) { return result; } return null; } public WorldClass2 GetSession2() { return this.Sessions2.First<KeyValuePair<ulong, WorldClass2>>().Value; } public void WriteCreateObject(ref PacketWriter updateObject, WorldObject obj, UpdateFlag updateFlags, ObjectType type) { updateObject.WriteUInt8(1); while (true) { IL_126: uint arg_F5_0 = 674662183u; while (true) { uint num; switch ((num = (arg_F5_0 ^ 145398461u)) % 9u) { case 0u: arg_F5_0 = ((type != ObjectType.Unit) ? 1990474711u : 1061379083u); continue; case 2u: arg_F5_0 = (((type == ObjectType.GameObject) ? 131431087u : 1498186933u) ^ num * 2612077386u); continue; case 3u: updateObject.WriteSmartGuid(obj.Guid, global::GuidType.Player); arg_F5_0 = (num * 3017626571u ^ 983361560u); continue; case 4u: goto IL_126; case 5u: updateObject.WriteSmartGuid(obj.SGuid); arg_F5_0 = 1641718289u; continue; case 6u: obj.WriteUpdateFields(ref updateObject); obj.WriteDynamicUpdateFields(ref updateObject); arg_F5_0 = (num * 4147143403u ^ 515290481u); continue; case 7u: updateObject.WriteUInt8((byte)type); Manager.WorldMgr.WriteUpdateObjectMovement(ref updateObject, ref obj, updateFlags, type); obj.SetUpdateFields(); arg_F5_0 = 1130912710u; continue; case 8u: arg_F5_0 = (((type != ObjectType.Player) ? 2708534600u : 3055127722u) ^ num * 3889688142u); continue; } return; } } } private void WriteInRangeObjects(IEnumerable<WorldObject> objects, WorldClass session, ObjectType type) { Character character = session.Character; UpdateFlag updateFlags; while (true) { IL_43: int arg_2A_0 = 1234824824; while (true) { switch ((arg_2A_0 ^ 985693193) % 3) { case 1: { int arg_1B_0 = objects.Count<WorldObject>(); if (type != ObjectType.GameObject) { updateFlags = UpdateFlag.Alive; } else { updateFlags = (UpdateFlag.Rotation | UpdateFlag.StationaryPosition); } if (arg_1B_0 > 0) { arg_2A_0 = 806033563; continue; } return; } case 2: goto IL_43; } goto Block_3; } } Block_3: IEnumerator<WorldObject> enumerator = objects.GetEnumerator(); try { while (true) { IL_282: uint arg_225_0 = (!WorldManager.smethod_21(enumerator)) ? 924584528u : 1822438603u; while (true) { uint num; switch ((num = (arg_225_0 ^ 985693193u)) % 16u) { case 0u: { WorldObject current; arg_225_0 = (((!character.InRangeObjects.ContainsKey(current.Guid)) ? 3520304230u : 2991050421u) ^ num * 3218604820u); continue; } case 1u: { PacketWriter packetWriter; packetWriter.WriteUInt8(0); packetWriter.WriteInt32(0); arg_225_0 = (num * 1971030994u ^ 185807692u); continue; } case 2u: { WorldObject current = enumerator.Current; PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_225_0 = 628504039u; continue; } case 3u: { PacketWriter packetWriter; packetWriter.WriteUInt16((ushort)character.Map); arg_225_0 = (num * 3400387387u ^ 2257466905u); continue; } case 4u: goto IL_282; case 5u: { PacketWriter packetWriter; uint data; packetWriter.WriteUInt32Pos(data, 13); arg_225_0 = (num * 2454347700u ^ 1429499287u); continue; } case 6u: { WorldObject current; arg_225_0 = (((character.Guid != current.Guid) ? 3687278576u : 3094749975u) ^ num * 4233083803u); continue; } case 7u: { WorldObject current; WorldObject worldObject = current; arg_225_0 = (num * 2094950269u ^ 583101170u); continue; } case 8u: arg_225_0 = 1822438603u; continue; case 10u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_225_0 = (num * 4007941317u ^ 1157130079u); continue; } case 11u: { WorldObject worldObject; character.InRangeObjects.Add(worldObject.Guid, worldObject); arg_225_0 = 964864693u; continue; } case 12u: { PacketWriter packetWriter; uint data = (uint)WorldManager.smethod_23(WorldManager.smethod_22(packetWriter)) - 17u; arg_225_0 = 733619068u; continue; } case 13u: { WorldObject current; arg_225_0 = (((!(current is Character)) ? 1739856535u : 1828267210u) ^ num * 2159438873u); continue; } case 14u: { PacketWriter packetWriter; packetWriter.WriteInt32(1); arg_225_0 = (num * 24512047u ^ 1709481080u); continue; } case 15u: { PacketWriter packetWriter; WorldObject worldObject; this.WriteCreateObject(ref packetWriter, worldObject, updateFlags, type); arg_225_0 = (num * 208065683u ^ 1445449785u); continue; } } goto Block_9; } } Block_9:; } finally { if (enumerator != null) { while (true) { IL_2C8: uint arg_2AF_0 = 571821702u; while (true) { uint num; switch ((num = (arg_2AF_0 ^ 985693193u)) % 3u) { case 0u: goto IL_2C8; case 1u: WorldManager.smethod_12(enumerator); arg_2AF_0 = (num * 2789025238u ^ 661065302u); continue; } goto Block_13; } } Block_13:; } } } public void WriteOutOfRangeObjects(IEnumerable<WorldObject> objects, WorldClass session) { Character character = session.Character; int num = objects.Count<WorldObject>(); while (true) { IL_43: uint arg_2A_0 = 693627332u; while (true) { uint num2; switch ((num2 = (arg_2A_0 ^ 21199706u)) % 3u) { case 0u: goto IL_43; case 1u: if (num > 0) { arg_2A_0 = (num2 * 2386250042u ^ 475668437u); continue; } return; } goto Block_2; } } Block_2: IEnumerator<WorldObject> enumerator = objects.GetEnumerator(); try { while (true) { IL_1D7: uint arg_196_0 = (!WorldManager.smethod_21(enumerator)) ? 1433957386u : 899731421u; while (true) { uint num2; switch ((num2 = (arg_196_0 ^ 21199706u)) % 9u) { case 0u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_196_0 = (num2 * 2193315011u ^ 3754142677u); continue; } case 1u: { PacketWriter packetWriter; packetWriter.WriteUInt32((uint)num); arg_196_0 = (num2 * 3660954480u ^ 3218481449u); continue; } case 2u: goto IL_1D7; case 3u: { WorldObject current = enumerator.Current; arg_196_0 = 1035913311u; continue; } case 4u: { PacketWriter packetWriter; WorldObject current; packetWriter.WriteSmartGuid(current.SGuid); packetWriter.WriteInt32(0); character.InRangeObjects.Remove(current.Guid); CreatureSpawn spawn = Manager.SpawnMgr.FindSpawn(current.Guid); Manager.SpawnMgr.RemoveSpawn(spawn, false); arg_196_0 = (num2 * 1433764750u ^ 3590980830u); continue; } case 5u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); BitPack arg_E0_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(0u); packetWriter.WriteUInt16((ushort)character.Map); arg_E0_0.Write<bool>(true); arg_E0_0.Flush(); arg_196_0 = (num2 * 4148304612u ^ 867955073u); continue; } case 6u: arg_196_0 = 899731421u; continue; case 8u: { PacketWriter packetWriter; packetWriter.WriteUInt16((ushort)character.Map); arg_196_0 = (num2 * 4287648869u ^ 736804586u); continue; } } goto Block_5; } } Block_5:; } finally { if (enumerator != null) { while (true) { IL_21D: uint arg_204_0 = 239391907u; while (true) { uint num2; switch ((num2 = (arg_204_0 ^ 21199706u)) % 3u) { case 0u: goto IL_21D; case 2u: WorldManager.smethod_12(enumerator); arg_204_0 = (num2 * 1157515060u ^ 2781673789u); continue; } goto Block_9; } } Block_9:; } } } [IteratorStateMachine(typeof(WorldManager.<GetInRangeCharacter>d__32))] public IEnumerable<Character> GetInRangeCharacter(WorldObject obj) { WorldManager.<GetInRangeCharacter>d__32 expr_07 = new WorldManager.<GetInRangeCharacter>d__32(-2); expr_07.__4__this = this; expr_07.__3__obj = obj; return expr_07; } [IteratorStateMachine(typeof(WorldManager.<GetOutOfRangeCharacter>d__33))] public IEnumerable<Character> GetOutOfRangeCharacter(WorldObject obj) { WorldManager.<GetOutOfRangeCharacter>d__33 expr_07 = new WorldManager.<GetOutOfRangeCharacter>d__33(-2); expr_07.__4__this = this; expr_07.__3__obj = obj; return expr_07; } public void SendByDist(WorldObject obj, PacketWriter packet, float dist) { IEnumerator<KeyValuePair<ulong, WorldClass>> enumerator = this.Sessions.GetEnumerator(); try { while (true) { IL_AA: uint arg_7B_0 = WorldManager.smethod_21(enumerator) ? 2458791872u : 3517714363u; while (true) { uint num; switch ((num = (arg_7B_0 ^ 4117508765u)) % 5u) { case 0u: goto IL_AA; case 1u: { KeyValuePair<ulong, WorldClass> current = enumerator.Current; arg_7B_0 = (obj.CheckDistance(current.Value.Character, dist) ? 3560768156u : 2549315586u); continue; } case 3u: { KeyValuePair<ulong, WorldClass> current; current.Value.Send(ref packet); arg_7B_0 = (num * 2408584879u ^ 3353124525u); continue; } case 4u: arg_7B_0 = 2458791872u; continue; } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_EE: uint arg_D6_0 = 4040458552u; while (true) { uint num; switch ((num = (arg_D6_0 ^ 4117508765u)) % 3u) { case 0u: goto IL_EE; case 2u: WorldManager.smethod_12(enumerator); arg_D6_0 = (num * 61350925u ^ 2293884979u); continue; } goto Block_8; } } Block_8:; } } } public void SendByDist2(WorldObject obj, PacketWriter packet, float dist) { IEnumerator<KeyValuePair<ulong, WorldClass2>> enumerator = this.Sessions2.GetEnumerator(); try { while (true) { IL_BD: uint arg_8A_0 = WorldManager.smethod_21(enumerator) ? 40362623u : 2011750552u; while (true) { uint num; switch ((num = (arg_8A_0 ^ 204828737u)) % 6u) { case 0u: arg_8A_0 = 40362623u; continue; case 1u: { KeyValuePair<ulong, WorldClass2> current; arg_8A_0 = ((obj.CheckDistance(current.Value.Character, dist) ? 3596064837u : 2379713056u) ^ num * 4178867009u); continue; } case 2u: goto IL_BD; case 4u: { KeyValuePair<ulong, WorldClass2> current = enumerator.Current; arg_8A_0 = 1216636346u; continue; } case 5u: { KeyValuePair<ulong, WorldClass2> current; current.Value.Send(ref packet); arg_8A_0 = (num * 2413282981u ^ 105961856u); continue; } } goto Block_4; } } Block_4:; } finally { if (enumerator != null) { while (true) { IL_101: uint arg_E9_0 = 622670937u; while (true) { uint num; switch ((num = (arg_E9_0 ^ 204828737u)) % 3u) { case 0u: goto IL_101; case 2u: WorldManager.smethod_12(enumerator); arg_E9_0 = (num * 561996056u ^ 3528409004u); continue; } goto Block_8; } } Block_8:; } } } public void WriteAccountDataTimes(AccountDataMasks mask, ref WorldClass session, bool meh = false) { PacketWriter packetWriter = new PacketWriter(ServerMessage.AccountDataTimes, true); while (true) { IL_143: uint arg_10A_0 = 3668158452u; while (true) { uint num; switch ((num = (arg_10A_0 ^ 4025612247u)) % 11u) { case 0u: arg_10A_0 = (num * 1971086703u ^ 2146890618u); continue; case 1u: goto IL_69; case 2u: packetWriter.WriteSmartGuid(session.Character.Guid, global::GuidType.Player); Log.Message(LogType.Debug, WorldManager.smethod_24(Module.smethod_33<string>(3670714664u), session.Character.Guid), Array.Empty<object>()); packetWriter.WriteUnixTime(); arg_10A_0 = (num * 3181084677u ^ 775392923u); continue; case 3u: goto IL_7A; case 4u: goto IL_143; case 5u: { int num2; arg_10A_0 = ((num2 < 8) ? 3491153182u : 4111038315u); continue; } case 6u: { int num2; switch (num2) { case 0: case 2: case 4: goto IL_7A; case 1: case 3: goto IL_69; default: arg_10A_0 = 4026970799u; continue; } break; } case 7u: { int num2; num2++; arg_10A_0 = 2290808960u; continue; } case 9u: { int num2 = 0; arg_10A_0 = (num * 2213661120u ^ 3147778097u); continue; } case 10u: arg_10A_0 = (num * 2365755116u ^ 2832131068u); continue; } goto Block_3; IL_69: packetWriter.WriteUInt32(0u); arg_10A_0 = 4158533852u; continue; IL_7A: packetWriter.WriteUInt32(0u); arg_10A_0 = 4158533852u; } } Block_3: session.Send(ref packetWriter); } public void SendToInRangeCharacter(Character pChar, PacketWriter packet) { using (List<KeyValuePair<ulong, WorldClass>>.Enumerator enumerator = this.Sessions.ToList<KeyValuePair<ulong, WorldClass>>().GetEnumerator()) { while (true) { IL_CE: uint arg_9B_0 = enumerator.MoveNext() ? 1328269498u : 508812519u; while (true) { uint num; switch ((num = (arg_9B_0 ^ 1311648729u)) % 6u) { case 0u: { KeyValuePair<ulong, WorldClass> current; current.Value.Send(ref packet); arg_9B_0 = (num * 1624707868u ^ 1707921748u); continue; } case 1u: goto IL_CE; case 2u: arg_9B_0 = 1328269498u; continue; case 3u: { KeyValuePair<ulong, WorldClass> current; WorldObject worldObject; arg_9B_0 = (((!pChar.InRangeObjects.TryGetValue(current.Value.Character.Guid, out worldObject)) ? 969593120u : 80473267u) ^ num * 488022060u); continue; } case 5u: { KeyValuePair<ulong, WorldClass> current = enumerator.Current; arg_9B_0 = 130797068u; continue; } } goto Block_4; } } Block_4:; } } public void WriteUpdateObjectMovement(ref PacketWriter packet, ref WorldObject wObject, UpdateFlag updateFlags, ObjectType type = ObjectType.Player) { ObjectMovementValues objectMovementValues = new ObjectMovementValues(updateFlags); while (true) { IL_6CC: uint arg_60F_0 = 129998000u; while (true) { uint num; switch ((num = (arg_60F_0 ^ 1215747490u)) % 44u) { case 0u: goto IL_4B9; case 1u: arg_60F_0 = (((type == ObjectType.Unit) ? 1762629752u : 624449284u) ^ num * 3921122461u); continue; case 2u: packet.WriteFloat(wObject.Position.O); packet.WriteFloat(0f); arg_60F_0 = (num * 1090892758u ^ 3245297273u); continue; case 3u: packet.WriteFloat(wObject.Position.Y); arg_60F_0 = (num * 787746376u ^ 972146496u); continue; case 4u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Write<int>(0); arg_60F_0 = (num * 1192361361u ^ 3230239995u); continue; } case 5u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Write<int>(0); arg_60F_0 = (num * 4071676343u ^ 4233786399u); continue; } case 6u: objectMovementValues.MovementFlags |= MovementFlag.Collision; arg_60F_0 = (num * 3125468036u ^ 4201600533u); continue; case 7u: arg_60F_0 = (objectMovementValues.HasRotation ? 783855162u : 461242124u); continue; case 8u: packet.WriteFloat(wObject.Position.Y); arg_60F_0 = (num * 1872323493u ^ 3277724555u); continue; case 9u: { packet.WriteUInt32(0u); packet.WriteUInt32(0u); CreatureSpawn expr_49A = wObject as CreatureSpawn; if (expr_49A != null && expr_49A.Id == 114791) { arg_60F_0 = 1626558302u; continue; } goto IL_4B9; } case 10u: { BitPack bitPack = new BitPack(packet, 0uL, 0uL, 0uL, 0uL); arg_60F_0 = (num * 144501222u ^ 3352292114u); continue; } case 11u: { BitPack bitPack; bitPack.Write<uint>((uint)objectMovementValues.MovementFlags, 30); arg_60F_0 = 333079794u; continue; } case 12u: packet.WriteUInt32(0u); arg_60F_0 = (objectMovementValues.HasStationaryPosition ? 1407329u : 702657881u); continue; case 13u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Write<bool>(objectMovementValues.IsSelf); bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Flush(); arg_60F_0 = (num * 958593297u ^ 3636374212u); continue; } case 14u: packet.WriteFloat(MovementSpeed.FlyBackSpeed); arg_60F_0 = (num * 4195910354u ^ 2408132270u); continue; case 15u: packet.WriteFloat(wObject.Position.X); arg_60F_0 = (num * 1628950764u ^ 1220746505u); continue; case 16u: packet.WriteFloat(MovementSpeed.RunBackSpeed); arg_60F_0 = (num * 2555421199u ^ 3184962399u); continue; case 17u: packet.WriteFloat(wObject.Position.Z); arg_60F_0 = (num * 3121449693u ^ 238152381u); continue; case 18u: packet.WriteFloat(wObject.Position.Z); packet.WriteFloat(wObject.Position.O); arg_60F_0 = (num * 1251600730u ^ 3521839613u); continue; case 19u: arg_60F_0 = (((type != ObjectType.GameObject) ? 3315887855u : 3604501638u) ^ num * 713846617u); continue; case 20u: packet.WriteFloat(MovementSpeed.TurnSpeed); arg_60F_0 = (num * 769968778u ^ 1298751733u); continue; case 21u: packet.WriteFloat(MovementSpeed.RunSpeed); arg_60F_0 = (num * 1508763429u ^ 2576139551u); continue; case 23u: { packet.WriteFloat(MovementSpeed.PitchSpeed); packet.WriteUInt32(0u); BitPack bitPack; bitPack.Write<int>(0); bitPack.Flush(); arg_60F_0 = (num * 1702723272u ^ 4258413466u); continue; } case 24u: packet.WriteUInt32(0u); arg_60F_0 = 1412853704u; continue; case 25u: packet.WriteFloat(MovementSpeed.WalkSpeed); arg_60F_0 = (num * 1472905094u ^ 1122743905u); continue; case 26u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Flush(); arg_60F_0 = (num * 1681626296u ^ 2014118735u); continue; } case 27u: arg_60F_0 = (((!objectMovementValues.IsAlive) ? 2584000468u : 2545470181u) ^ num * 3029667794u); continue; case 28u: { BitPack bitPack; bitPack.Write<int>(0); arg_60F_0 = (num * 3984996728u ^ 2662328856u); continue; } case 29u: packet.WriteFloat(MovementSpeed.SwimBackSpeed); arg_60F_0 = (num * 298942841u ^ 3422764309u); continue; case 30u: { BitPack bitPack; bitPack.Write<int>(0); bitPack.Write<int>(0); bitPack.Write<bool>(objectMovementValues.HasRotation); arg_60F_0 = (num * 599397252u ^ 1918635711u); continue; } case 31u: { BitPack bitPack; bitPack.Write<bool>(objectMovementValues.HasStationaryPosition); arg_60F_0 = (num * 1497745409u ^ 1763630698u); continue; } case 32u: objectMovementValues.MovementFlags = MovementFlag.Gravity; arg_60F_0 = (num * 868046579u ^ 4244940630u); continue; case 33u: packet.WriteFloat(MovementSpeed.SwimSpeed); arg_60F_0 = (num * 628557227u ^ 1283953472u); continue; case 34u: packet.WriteFloat(MovementSpeed.FlySpeed); arg_60F_0 = (num * 594481187u ^ 1398282350u); continue; case 35u: packet.WriteFloat(0f); arg_60F_0 = (num * 2961737432u ^ 787087167u); continue; case 36u: packet.WriteInt64(Quaternion.GetCompressed(wObject.Position.O)); arg_60F_0 = (num * 1693518408u ^ 2944617932u); continue; case 37u: { BitPack bitPack; bitPack.Write<bool>(objectMovementValues.IsAlive); bitPack.Write<int>(0); arg_60F_0 = (num * 1103236590u ^ 736974011u); continue; } case 38u: packet.WriteFloat(wObject.Position.X); arg_60F_0 = (num * 3011618815u ^ 150330436u); continue; case 39u: packet.WriteSmartGuid(wObject.SGuid); arg_60F_0 = 1647713622u; continue; case 40u: { BitPack bitPack; bitPack.Write<uint>((uint)objectMovementValues.MovementFlags2, 18); arg_60F_0 = (num * 887354071u ^ 4121645171u); continue; } case 41u: goto IL_6CC; case 42u: packet.WriteSmartGuid(wObject.Guid, global::GuidType.Player); arg_60F_0 = 1647713622u; continue; case 43u: { BitPack bitPack; bitPack.Write<int>(0); arg_60F_0 = (num * 3024857735u ^ 3973602051u); continue; } } return; IL_4B9: arg_60F_0 = ((wObject is CreatureSpawn) ? 1468379108u : 219133965u); } } } public void SendHotfixes(WorldClass session) { List<string> list = new List<string>(); StreamReader streamReader = WorldManager.smethod_7(WorldManager.smethod_6(WorldManager.smethod_5(), Module.smethod_36<string>(1335227554u))); try { while (true) { IL_76: int arg_4D_0 = (!WorldManager.smethod_11(streamReader)) ? -1821766704 : -1918179255; while (true) { switch ((arg_4D_0 ^ -943006534) % 4) { case 0: arg_4D_0 = -1821766704; continue; case 1: goto IL_76; case 2: list.Add(WorldManager.smethod_8(streamReader)); arg_4D_0 = -2045482233; continue; } goto Block_31; } } Block_31:; } finally { if (streamReader != null) { while (true) { IL_B9: uint arg_A0_0 = 4282511890u; while (true) { uint num; switch ((num = (arg_A0_0 ^ 3351960762u)) % 3u) { case 1u: WorldManager.smethod_12(streamReader); arg_A0_0 = (num * 675983878u ^ 1158056770u); continue; case 2u: goto IL_B9; } goto Block_35; } } Block_35:; } } List<string> list2 = new List<string>(); StreamReader streamReader2 = WorldManager.smethod_7(WorldManager.smethod_6(WorldManager.smethod_5(), Module.smethod_37<string>(4149292156u))); try { while (true) { IL_137: int arg_10E_0 = WorldManager.smethod_11(streamReader2) ? -263276491 : -1168098321; while (true) { switch ((arg_10E_0 ^ -943006534) % 4) { case 0: arg_10E_0 = -1168098321; continue; case 1: list2.Add(WorldManager.smethod_8(streamReader2)); arg_10E_0 = -138331108; continue; case 2: goto IL_137; } goto Block_37; } } Block_37:; } finally { if (streamReader2 != null) { while (true) { IL_17A: uint arg_161_0 = 4002669197u; while (true) { uint num; switch ((num = (arg_161_0 ^ 3351960762u)) % 3u) { case 1u: WorldManager.smethod_12(streamReader2); arg_161_0 = (num * 2460620703u ^ 2420999515u); continue; case 2u: goto IL_17A; } goto Block_41; } } Block_41:; } } List<string> list3 = new List<string>(); StreamReader streamReader3 = WorldManager.smethod_7(WorldManager.smethod_6(WorldManager.smethod_5(), Module.smethod_34<string>(808308818u))); try { while (true) { IL_1FC: int arg_1D3_0 = WorldManager.smethod_11(streamReader3) ? -1478501989 : -286397264; while (true) { switch ((arg_1D3_0 ^ -943006534) % 4) { case 0: arg_1D3_0 = -286397264; continue; case 2: list3.Add(WorldManager.smethod_8(streamReader3)); arg_1D3_0 = -323844719; continue; case 3: goto IL_1FC; } goto Block_43; } } Block_43:; } finally { if (streamReader3 != null) { while (true) { IL_242: uint arg_229_0 = 3819996849u; while (true) { uint num; switch ((num = (arg_229_0 ^ 3351960762u)) % 3u) { case 1u: WorldManager.smethod_12(streamReader3); arg_229_0 = (num * 159726851u ^ 558385827u); continue; case 2u: goto IL_242; } goto Block_47; } } Block_47:; } } KeyValuePair<string, string[]>[] arg_29D_0 = new Dictionary<string, string[]> { { Module.smethod_36<string>(2845959532u), list.ToArray() }, { Module.smethod_37<string>(3973992180u), list2.ToArray() }, { Module.smethod_33<string>(2366910524u), list3.ToArray() } }.ToArray<KeyValuePair<string, string[]>>(); new List<HotfixEntry>(); KeyValuePair<string, string[]>[] array = arg_29D_0; while (true) { IL_DE5: uint arg_CB3_0 = 4114314167u; while (true) { uint num; switch ((num = (arg_CB3_0 ^ 3351960762u)) % 73u) { case 0u: { int num2; num2++; arg_CB3_0 = 3883525235u; continue; } case 1u: { string[] array2; int num3; arg_CB3_0 = ((!WorldManager.smethod_20(WorldManager.smethod_37(array2[num3]), Module.smethod_34<string>(1249328511u))) ? 3156625681u : 3129884034u); continue; } case 2u: { PacketWriter binaryWriter_ = new PacketWriter(ServerMessage.DBReply, true); arg_CB3_0 = (num * 3936356842u ^ 3734980536u); continue; } case 3u: { string[] array2; uint uint_ = uint.Parse(array2[0]); arg_CB3_0 = (num * 752231235u ^ 248922869u); continue; } case 4u: { int num2; arg_CB3_0 = ((num2 >= array.Length) ? 3005882202u : 2541234465u); continue; } case 5u: { int num3; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes[num3] == 4) ? 3340753439u : 2622676352u); continue; } case 6u: { string[] array3; int num4; array3[num4] = Module.smethod_35<string>(1226427678u); arg_CB3_0 = 2151535425u; continue; } case 7u: { DBInfo dBInfo; int num5; sbyte b = dBInfo.FieldBytes[num5]; arg_CB3_0 = 2277441523u; continue; } case 8u: { DBInfo dBInfo; int num5; arg_CB3_0 = ((num5 < dBInfo.FieldBytes.Length) ? 4161359915u : 2686295563u); continue; } case 9u: { string[] array2 = array2.Skip(1).ToArray<string>(); arg_CB3_0 = (num * 665224995u ^ 3775302635u); continue; } case 10u: { string[] value; int num6; IEnumerable<string> arg_B51_0 = WorldManager.smethod_27(value[num6], new string[] { Module.smethod_36<string>(2162936088u) }, StringSplitOptions.None); Func<string, string> arg_B51_1; if ((arg_B51_1 = WorldManager.__c.__9__40_0) == null) { arg_B51_1 = (WorldManager.__c.__9__40_0 = new Func<string, string>(WorldManager.__c.__9.SendHotfixesb__40_0)); } string[] array2 = arg_B51_0.Select(arg_B51_1).ToArray<string>(); arg_CB3_0 = 2682721714u; continue; } case 11u: arg_CB3_0 = (num * 897889744u ^ 139128096u); continue; case 12u: { PacketWriter binaryWriter_; string[] value; WorldManager.smethod_25(binaryWriter_, (uint)((value.Length < 50) ? value.Length : 50)); arg_CB3_0 = 2362296894u; continue; } case 13u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_42(binaryWriter_2, float.Parse(array2[num3])); arg_CB3_0 = (num * 2460759494u ^ 2459602260u); continue; } case 14u: { int num5; num5++; arg_CB3_0 = 2385465178u; continue; } case 15u: { DBInfo dBInfo; arg_CB3_0 = (((!dBInfo.HasIndex) ? 2075256828u : 1600314029u) ^ num * 2037012033u); continue; } case 16u: { string[] array2; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes.Length > array2.Length) ? 4046074280u : 2412213547u); continue; } case 17u: { string[] array3; int num4; arg_CB3_0 = ((num4 < array3.Length) ? 3792741066u : 2454995688u); continue; } case 18u: { sbyte b; arg_CB3_0 = (((b == -1) ? 1065433920u : 343619630u) ^ num * 4037374063u); continue; } case 19u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_43(binaryWriter_2, long.Parse(array2[num3])); arg_CB3_0 = (num * 2526707777u ^ 3029318587u); continue; } case 20u: { KeyValuePair<string, string[]> keyValuePair; string[] value = keyValuePair.Value; PacketWriter binaryWriter_ = new PacketWriter(ServerMessage.DBReply, true); int num7 = 0; int num5 = 0; arg_CB3_0 = (num * 1465778865u ^ 3761136241u); continue; } case 21u: { int num2 = 0; arg_CB3_0 = (num * 661521374u ^ 3527479349u); continue; } case 22u: { string[] array2; int num3; arg_CB3_0 = ((num3 < array2.Length) ? 3424934690u : 4211295968u); continue; } case 23u: { PacketWriter binaryWriter_; byte[] byte_; WorldManager.smethod_30(binaryWriter_, byte_); arg_CB3_0 = (num * 978835068u ^ 1601987398u); continue; } case 24u: { PacketWriter binaryWriter_; int num8; WorldManager.smethod_26(binaryWriter_, num8); BinaryWriter binaryWriter_2; WorldManager.smethod_30(binaryWriter_, WorldManager.smethod_45(WorldManager.smethod_22(binaryWriter_2) as MemoryStream)); int num6; num6++; arg_CB3_0 = (num * 731127645u ^ 920579482u); continue; } case 25u: { int num9; num9++; arg_CB3_0 = (num * 2102584341u ^ 2859284816u); continue; } case 26u: { string[] array2; int num3; arg_CB3_0 = (((!WorldManager.smethod_20(WorldManager.smethod_37(array2[num3]), Module.smethod_37<string>(3155964920u))) ? 3145619627u : 3838415364u) ^ num * 1067950292u); continue; } case 28u: { int num4; num4++; arg_CB3_0 = (num * 2499463060u ^ 3235126393u); continue; } case 29u: { string[] value; int num6; arg_CB3_0 = ((num6 < value.Length) ? 3581861470u : 4094187285u); continue; } case 30u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_36(binaryWriter_2, WorldManager.smethod_28(int.Parse(array2[num3])), 0, 3); arg_CB3_0 = (num * 582767338u ^ 2510263648u); continue; } case 31u: { string[] array2; int num3; arg_CB3_0 = ((WorldManager.smethod_20(WorldManager.smethod_37(array2[num3]), Module.smethod_35<string>(1450348988u)) ? 3407953591u : 3089505394u) ^ num * 2930763513u); continue; } case 32u: { PacketWriter binaryWriter_; session.Send(ref binaryWriter_); arg_CB3_0 = (num * 436278088u ^ 3797916996u); continue; } case 33u: { PacketWriter binaryWriter_; session.Send(ref binaryWriter_); arg_CB3_0 = (num * 888513865u ^ 1101150870u); continue; } case 34u: { int num3; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes[num3] == -1) ? 3121901486u : 3955779979u); continue; } case 35u: { string[] array2; DBInfo dBInfo; string[] array3 = new string[dBInfo.FieldBytes.Length - array2.Length]; arg_CB3_0 = (num * 4111128937u ^ 1747399980u); continue; } case 36u: { int num3; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes[num3] == 1) ? 4252407131u : 3337104815u); continue; } case 37u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_25(binaryWriter_2, uint.Parse(array2[num3])); arg_CB3_0 = 2622676352u; continue; } case 38u: { PacketWriter binaryWriter_; uint uint_; WorldManager.smethod_25(binaryWriter_, uint_); arg_CB3_0 = (num * 2723354798u ^ 725568371u); continue; } case 39u: { int num6; arg_CB3_0 = ((num6 <= 0) ? 3655471179u : 4205951225u); continue; } case 40u: { int num2; KeyValuePair<string, string[]> keyValuePair = array[num2]; string key = keyValuePair.Key; DBInfo dBInfo = this.DBInfo[key]; arg_CB3_0 = 4093983988u; continue; } case 41u: { DBInfo dBInfo; int num10; byte[] byte_ = WorldManager.smethod_28(num10++).Concat(WorldManager.smethod_29(dBInfo.TableHash)).ToArray<byte>(); arg_CB3_0 = 4134788138u; continue; } case 42u: { string[] array2; int num3; arg_CB3_0 = ((WorldManager.smethod_20(WorldManager.smethod_37(array2[num3]), Module.smethod_36<string>(1664999740u)) ? 2252339831u : 2892691487u) ^ num * 1970336797u); continue; } case 43u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_38(binaryWriter_2, sbyte.Parse(array2[num3])); arg_CB3_0 = (num * 4227732606u ^ 753402639u); continue; } case 44u: { int num3; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes[num3] == 8) ? 3301808171u : 2544414077u); continue; } case 45u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_44(binaryWriter_2, ulong.Parse(array2[num3])); arg_CB3_0 = 2544414077u; continue; } case 46u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_26(binaryWriter_2, int.Parse(array2[num3])); arg_CB3_0 = (num * 4264943359u ^ 867232177u); continue; } case 47u: { int num6 = 0; arg_CB3_0 = (num * 2974403205u ^ 1972425475u); continue; } case 48u: arg_CB3_0 = (num * 2811483129u ^ 2973242412u); continue; case 49u: arg_CB3_0 = (num * 3984516638u ^ 3954005623u); continue; case 50u: { int num3; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes[num3] != 3) ? 3119984824u : 3658735878u); continue; } case 51u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_39(binaryWriter_2, short.Parse(array2[num3])); arg_CB3_0 = (num * 4060967414u ^ 638278327u); continue; } case 52u: arg_CB3_0 = (num * 3520865308u ^ 2545961172u); continue; case 53u: { int num9; arg_CB3_0 = (((num9 <= 50) ? 3369612915u : 3411185519u) ^ num * 55113301u); continue; } case 54u: { int num9 = 0; arg_CB3_0 = (num * 3226780449u ^ 3946266654u); continue; } case 55u: { int num6; arg_CB3_0 = (((num6 % 50 == 0) ? 43002753u : 880411684u) ^ num * 3167421029u); continue; } case 56u: { string[] array3; string[] array2 = array2.Concat(array3).ToArray<string>(); arg_CB3_0 = (num * 1849339066u ^ 1844800191u); continue; } case 57u: { string[] array2; int num3; arg_CB3_0 = (((!WorldManager.smethod_41(WorldManager.smethod_37(array2[num3]), Module.smethod_35<string>(3143151842u))) ? 2640793704u : 2332470793u) ^ num * 148078949u); continue; } case 58u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_40(binaryWriter_2, ushort.Parse(array2[num3])); arg_CB3_0 = 4123887515u; continue; } case 59u: goto IL_DE5; case 60u: arg_CB3_0 = (num * 3283479811u ^ 3538258094u); continue; case 61u: { PacketWriter binaryWriter_; WorldManager.smethod_31(binaryWriter_, 128); BinaryWriter binaryWriter_2 = WorldManager.smethod_33(WorldManager.smethod_32()); arg_CB3_0 = (num * 489730257u ^ 1920912783u); continue; } case 62u: { string[] array2; int num3; byte[] array4 = WorldManager.smethod_35(WorldManager.smethod_34(), array2[num3]); int num8; num8 += array4.Length + 1; arg_CB3_0 = (num * 3187481465u ^ 467302530u); continue; } case 63u: { PacketWriter binaryWriter_; string[] value; int num6; WorldManager.smethod_26(binaryWriter_, (value.Length - num6 < 50) ? (value.Length - num6) : 50); arg_CB3_0 = 3655471179u; continue; } case 64u: { BinaryWriter binaryWriter_2; byte[] array4; WorldManager.smethod_36(binaryWriter_2, array4, 0, array4.Length); WorldManager.smethod_31(binaryWriter_2, 0); arg_CB3_0 = (num * 3314784077u ^ 839358295u); continue; } case 65u: { sbyte b; int num7; num7 += (int)b; arg_CB3_0 = (num * 4038829678u ^ 2226515981u); continue; } case 66u: { int num4 = 0; arg_CB3_0 = (num * 2373268253u ^ 918918337u); continue; } case 67u: arg_CB3_0 = (num * 3471201856u ^ 2935453722u); continue; case 68u: { int num3; DBInfo dBInfo; arg_CB3_0 = ((dBInfo.FieldBytes[num3] == 2) ? 4011232868u : 4123887515u); continue; } case 69u: { int num7; int num8 = num7; int num3 = 0; arg_CB3_0 = (num * 1931592375u ^ 3608255983u); continue; } case 70u: { string[] array2; int num3; BinaryWriter binaryWriter_2; WorldManager.smethod_31(binaryWriter_2, byte.Parse(array2[num3])); arg_CB3_0 = 3337104815u; continue; } case 71u: { int num3; num3++; arg_CB3_0 = 3725859157u; continue; } case 72u: { int num10 = 1; int num9 = 0; arg_CB3_0 = (num * 2356110470u ^ 612677495u); continue; } } return; } } } public T Clone<T>(T source) { if (!WorldManager.smethod_47(WorldManager.smethod_46(typeof(T).TypeHandle))) { goto IL_33; } goto IL_6E; int arg_3D_0; IFormatter iformatter_; Stream stream; while (true) { IL_38: switch ((arg_3D_0 ^ -1470923769) % 6) { case 0: goto IL_33; case 1: goto IL_6E; case 2: goto IL_78; case 3: iformatter_ = WorldManager.smethod_49(); stream = WorldManager.smethod_32(); arg_3D_0 = -1460486632; continue; case 4: goto IL_92; } break; } goto IL_9C; IL_78: throw WorldManager.smethod_48(Module.smethod_37<string>(321870052u), Module.smethod_36<string>(2617192361u)); IL_92: T result = default(T); return result; IL_9C: Stream stream2 = stream; try { WorldManager.smethod_50(iformatter_, stream, source); WorldManager.smethod_51(stream, 0L, SeekOrigin.Begin); result = (T)((object)WorldManager.smethod_52(iformatter_, stream)); } finally { if (stream2 != null) { while (true) { IL_102: uint arg_E9_0 = 2476003598u; while (true) { uint num; switch ((num = (arg_E9_0 ^ 2824043527u)) % 3u) { case 0u: goto IL_102; case 2u: WorldManager.smethod_12(stream2); arg_E9_0 = (num * 4231273988u ^ 3716994402u); continue; } goto Block_8; } } Block_8:; } } return result; IL_33: arg_3D_0 = -1615506447; goto IL_38; IL_6E: arg_3D_0 = ((source == null) ? -2106654699 : -1845476174); goto IL_38; } static Assembly smethod_5() { return Assembly.GetExecutingAssembly(); } static Stream smethod_6(Assembly assembly_0, string string_0) { return assembly_0.GetManifestResourceStream(string_0); } static StreamReader smethod_7(Stream stream_0) { return new StreamReader(stream_0); } static string smethod_8(TextReader textReader_0) { return textReader_0.ReadLine(); } static string[] smethod_9(string string_0, char[] char_0) { return string_0.Split(char_0); } static string[] smethod_10(string string_0, char[] char_0, StringSplitOptions stringSplitOptions_0) { return string_0.Split(char_0, stringSplitOptions_0); } static bool smethod_11(StreamReader streamReader_0) { return streamReader_0.EndOfStream; } static void smethod_12(IDisposable idisposable_0) { idisposable_0.Dispose(); } static string smethod_13(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static Thread smethod_14(ThreadStart threadStart_0) { return new Thread(threadStart_0); } static void smethod_15(Thread thread_0, bool bool_0) { thread_0.IsBackground = bool_0; } static void smethod_16(Thread thread_0) { thread_0.Start(); } static void smethod_17(object object_0, ref bool bool_0) { Monitor.Enter(object_0, ref bool_0); } static void smethod_18(int int_0) { Thread.Sleep(int_0); } static void smethod_19(object object_0) { Monitor.Exit(object_0); } static bool smethod_20(string string_0, string string_1) { return string_0 == string_1; } static bool smethod_21(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static Stream smethod_22(BinaryWriter binaryWriter_0) { return binaryWriter_0.BaseStream; } static long smethod_23(Stream stream_0) { return stream_0.Length; } static string smethod_24(string string_0, object object_0) { return string.Format(string_0, object_0); } static void smethod_25(BinaryWriter binaryWriter_0, uint uint_0) { binaryWriter_0.Write(uint_0); } static void smethod_26(BinaryWriter binaryWriter_0, int int_0) { binaryWriter_0.Write(int_0); } static string[] smethod_27(string string_0, string[] string_1, StringSplitOptions stringSplitOptions_0) { return string_0.Split(string_1, stringSplitOptions_0); } static byte[] smethod_28(int int_0) { return BitConverter.GetBytes(int_0); } static byte[] smethod_29(uint uint_0) { return BitConverter.GetBytes(uint_0); } static void smethod_30(BinaryWriter binaryWriter_0, byte[] byte_0) { binaryWriter_0.Write(byte_0); } static void smethod_31(BinaryWriter binaryWriter_0, byte byte_0) { binaryWriter_0.Write(byte_0); } static MemoryStream smethod_32() { return new MemoryStream(); } static BinaryWriter smethod_33(Stream stream_0) { return new BinaryWriter(stream_0); } static Encoding smethod_34() { return Encoding.ASCII; } static byte[] smethod_35(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } static void smethod_36(BinaryWriter binaryWriter_0, byte[] byte_0, int int_0, int int_1) { binaryWriter_0.Write(byte_0, int_0, int_1); } static string smethod_37(object object_0) { return object_0.ToString(); } static void smethod_38(BinaryWriter binaryWriter_0, sbyte sbyte_0) { binaryWriter_0.Write(sbyte_0); } static void smethod_39(BinaryWriter binaryWriter_0, short short_0) { binaryWriter_0.Write(short_0); } static void smethod_40(BinaryWriter binaryWriter_0, ushort ushort_0) { binaryWriter_0.Write(ushort_0); } static bool smethod_41(string string_0, string string_1) { return string_0.Contains(string_1); } static void smethod_42(BinaryWriter binaryWriter_0, float float_0) { binaryWriter_0.Write(float_0); } static void smethod_43(BinaryWriter binaryWriter_0, long long_0) { binaryWriter_0.Write(long_0); } static void smethod_44(BinaryWriter binaryWriter_0, ulong ulong_0) { binaryWriter_0.Write(ulong_0); } static byte[] smethod_45(MemoryStream memoryStream_0) { return memoryStream_0.ToArray(); } static Type smethod_46(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static bool smethod_47(Type type_0) { return type_0.IsSerializable; } static ArgumentException smethod_48(string string_0, string string_1) { return new ArgumentException(string_0, string_1); } static BinaryFormatter smethod_49() { return new BinaryFormatter(); } static void smethod_50(IFormatter iformatter_0, Stream stream_0, object object_0) { iformatter_0.Serialize(stream_0, object_0); } static long smethod_51(Stream stream_0, long long_0, SeekOrigin seekOrigin_0) { return stream_0.Seek(long_0, seekOrigin_0); } static object smethod_52(IFormatter iformatter_0, Stream stream_0) { return iformatter_0.Deserialize(stream_0); } static object smethod_53() { return new object(); } } } <file_sep>/GuidSubType.cs using System; public enum GuidSubType : byte { None } <file_sep>/Bgs.Protocol.Channel.V1/UpdateChannelStateNotification.cs using Bgs.Protocol.Account.V1; using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class UpdateChannelStateNotification : IMessage<UpdateChannelStateNotification>, IEquatable<UpdateChannelStateNotification>, IDeepCloneable<UpdateChannelStateNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateChannelStateNotification.__c __9 = new UpdateChannelStateNotification.__c(); internal UpdateChannelStateNotification cctor>b__39_0() { return new UpdateChannelStateNotification(); } } private static readonly MessageParser<UpdateChannelStateNotification> _parser = new MessageParser<UpdateChannelStateNotification>(new Func<UpdateChannelStateNotification>(UpdateChannelStateNotification.__c.__9.<.cctor>b__39_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int StateChangeFieldNumber = 2; private ChannelState stateChange_; public const int ChannelIdFieldNumber = 3; private ChannelId channelId_; public const int SubscriberFieldNumber = 4; private Bgs.Protocol.Account.V1.Identity subscriber_; public static MessageParser<UpdateChannelStateNotification> Parser { get { return UpdateChannelStateNotification._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[13]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateChannelStateNotification.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public ChannelState StateChange { get { return this.stateChange_; } set { this.stateChange_ = value; } } public ChannelId ChannelId { get { return this.channelId_; } set { this.channelId_ = value; } } public Bgs.Protocol.Account.V1.Identity Subscriber { get { return this.subscriber_; } set { this.subscriber_ = value; } } public UpdateChannelStateNotification() { } public UpdateChannelStateNotification(UpdateChannelStateNotification other) : this() { while (true) { IL_B1: int arg_93_0 = -582971106; while (true) { switch ((arg_93_0 ^ -592326298) % 5) { case 0: goto IL_B1; case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); arg_93_0 = -461147441; continue; case 2: this.ChannelId = ((other.channelId_ != null) ? other.ChannelId.Clone() : null); this.Subscriber = ((other.subscriber_ != null) ? other.Subscriber.Clone() : null); arg_93_0 = -524352020; continue; case 3: this.StateChange = ((other.stateChange_ != null) ? other.StateChange.Clone() : null); arg_93_0 = -1417812937; continue; } return; } } } public UpdateChannelStateNotification Clone() { return new UpdateChannelStateNotification(this); } public override bool Equals(object other) { return this.Equals(other as UpdateChannelStateNotification); } public bool Equals(UpdateChannelStateNotification other) { if (other == null) { goto IL_CE; } goto IL_126; int arg_D8_0; while (true) { IL_D3: switch ((arg_D8_0 ^ -1642326095) % 13) { case 0: return false; case 1: return false; case 2: return true; case 3: goto IL_CE; case 4: arg_D8_0 = ((!UpdateChannelStateNotification.smethod_0(this.StateChange, other.StateChange)) ? -2088751989 : -1950595263); continue; case 5: arg_D8_0 = (UpdateChannelStateNotification.smethod_0(this.ChannelId, other.ChannelId) ? -1312037880 : -1308376503); continue; case 6: goto IL_126; case 7: return false; case 8: return false; case 9: arg_D8_0 = (UpdateChannelStateNotification.smethod_0(this.Subscriber, other.Subscriber) ? -1616244250 : -1032091748); continue; case 10: return false; case 11: arg_D8_0 = ((!UpdateChannelStateNotification.smethod_0(this.AgentId, other.AgentId)) ? -1708889696 : -1436284152); continue; } break; } return true; IL_CE: arg_D8_0 = -1390436414; goto IL_D3; IL_126: arg_D8_0 = ((other == this) ? -103018446 : -828632907); goto IL_D3; } public override int GetHashCode() { int num = 1; while (true) { IL_120: uint arg_EF_0 = 855157566u; while (true) { uint num2; switch ((num2 = (arg_EF_0 ^ 1080531338u)) % 9u) { case 0u: arg_EF_0 = ((this.subscriber_ == null) ? 522212852u : 1395477771u); continue; case 1u: num ^= UpdateChannelStateNotification.smethod_1(this.StateChange); arg_EF_0 = 668166058u; continue; case 2u: num ^= UpdateChannelStateNotification.smethod_1(this.Subscriber); arg_EF_0 = (num2 * 1754909990u ^ 763334098u); continue; case 3u: num ^= UpdateChannelStateNotification.smethod_1(this.AgentId); arg_EF_0 = (num2 * 3106679633u ^ 2882877849u); continue; case 5u: arg_EF_0 = (((this.agentId_ != null) ? 3822290783u : 4101554076u) ^ num2 * 3148348987u); continue; case 6u: goto IL_120; case 7u: num ^= UpdateChannelStateNotification.smethod_1(this.ChannelId); arg_EF_0 = (num2 * 3756065025u ^ 2572837892u); continue; case 8u: arg_EF_0 = (((this.channelId_ != null) ? 1057683203u : 1548607885u) ^ num2 * 4059417353u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_C1; } goto IL_11F; uint arg_EE_0; while (true) { IL_E9: uint num; switch ((num = (arg_EE_0 ^ 2255582124u)) % 9u) { case 1u: output.WriteRawTag(26); output.WriteMessage(this.ChannelId); arg_EE_0 = (num * 4068615681u ^ 2265688861u); continue; case 2u: goto IL_C1; case 3u: goto IL_11F; case 4u: output.WriteRawTag(34); output.WriteMessage(this.Subscriber); arg_EE_0 = (num * 1749753191u ^ 2334915074u); continue; case 5u: arg_EE_0 = (((this.channelId_ != null) ? 671538890u : 1563902587u) ^ num * 1841861416u); continue; case 6u: output.WriteMessage(this.StateChange); arg_EE_0 = (num * 294584427u ^ 3979352210u); continue; case 7u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_EE_0 = (num * 303622308u ^ 965635156u); continue; case 8u: arg_EE_0 = ((this.subscriber_ == null) ? 4260806033u : 2299219801u); continue; } break; } return; IL_C1: arg_EE_0 = 2998725446u; goto IL_E9; IL_11F: output.WriteRawTag(18); arg_EE_0 = 4291148252u; goto IL_E9; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_3E; } goto IL_DE; uint arg_A7_0; while (true) { IL_A2: uint num2; switch ((num2 = (arg_A7_0 ^ 4036211738u)) % 7u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.ChannelId); arg_A7_0 = (num2 * 3759254122u ^ 3443716230u); continue; case 2u: arg_A7_0 = ((this.subscriber_ != null) ? 3090607654u : 2203599366u); continue; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Subscriber); arg_A7_0 = (num2 * 2675870517u ^ 4237951082u); continue; case 4u: goto IL_3E; case 5u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_A7_0 = (num2 * 4020850134u ^ 2559137712u); continue; case 6u: goto IL_DE; } break; } return num; IL_3E: arg_A7_0 = 3615064650u; goto IL_A2; IL_DE: num += 1 + CodedOutputStream.ComputeMessageSize(this.StateChange); arg_A7_0 = ((this.channelId_ != null) ? 4235645512u : 4112654706u); goto IL_A2; } public void MergeFrom(UpdateChannelStateNotification other) { if (other == null) { goto IL_72; } goto IL_27D; uint arg_215_0; while (true) { IL_210: uint num; switch ((num = (arg_215_0 ^ 1349634352u)) % 19u) { case 0u: arg_215_0 = (((this.subscriber_ == null) ? 1340546501u : 1197859411u) ^ num * 3998993658u); continue; case 1u: this.stateChange_ = new ChannelState(); arg_215_0 = (num * 2396870813u ^ 2738058873u); continue; case 2u: this.agentId_ = new EntityId(); arg_215_0 = (num * 2081181368u ^ 1208200076u); continue; case 3u: arg_215_0 = (((this.agentId_ != null) ? 935468187u : 1542549582u) ^ num * 3413966261u); continue; case 4u: arg_215_0 = ((other.subscriber_ != null) ? 1307756674u : 318337879u); continue; case 5u: arg_215_0 = (((this.channelId_ == null) ? 4280661599u : 2319493417u) ^ num * 3084488781u); continue; case 6u: goto IL_27D; case 7u: this.Subscriber.MergeFrom(other.Subscriber); arg_215_0 = 318337879u; continue; case 8u: this.AgentId.MergeFrom(other.AgentId); arg_215_0 = 974495083u; continue; case 9u: arg_215_0 = ((other.channelId_ != null) ? 580864589u : 1971261310u); continue; case 10u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_215_0 = (num * 2071727217u ^ 985434134u); continue; case 11u: arg_215_0 = (((this.stateChange_ == null) ? 1973106836u : 2088311241u) ^ num * 3079521685u); continue; case 13u: return; case 14u: this.channelId_ = new ChannelId(); arg_215_0 = (num * 3857057902u ^ 660231684u); continue; case 15u: goto IL_72; case 16u: this.StateChange.MergeFrom(other.StateChange); arg_215_0 = 1966632969u; continue; case 17u: this.ChannelId.MergeFrom(other.ChannelId); arg_215_0 = 1971261310u; continue; case 18u: arg_215_0 = ((other.stateChange_ == null) ? 1966632969u : 698295085u); continue; } break; } return; IL_72: arg_215_0 = 1058296515u; goto IL_210; IL_27D: arg_215_0 = ((other.agentId_ == null) ? 974495083u : 1372638947u); goto IL_210; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2D9: uint num; uint arg_261_0 = ((num = input.ReadTag()) != 0u) ? 3874509795u : 2422499713u; while (true) { uint num2; switch ((num2 = (arg_261_0 ^ 2553552371u)) % 23u) { case 0u: this.stateChange_ = new ChannelState(); arg_261_0 = (num2 * 2412476100u ^ 2964052126u); continue; case 1u: arg_261_0 = (((num != 34u) ? 4117814922u : 2503797537u) ^ num2 * 417295782u); continue; case 2u: arg_261_0 = (((num == 18u) ? 3994176271u : 2550750671u) ^ num2 * 196233152u); continue; case 3u: this.channelId_ = new ChannelId(); arg_261_0 = (num2 * 3293738469u ^ 3096300803u); continue; case 4u: input.ReadMessage(this.agentId_); arg_261_0 = 3835294388u; continue; case 5u: this.agentId_ = new EntityId(); arg_261_0 = (num2 * 135864003u ^ 1893303729u); continue; case 6u: arg_261_0 = (num2 * 3604934645u ^ 359271750u); continue; case 7u: arg_261_0 = (((num != 10u) ? 4195890818u : 3726926509u) ^ num2 * 2596800732u); continue; case 8u: arg_261_0 = (num2 * 3455331912u ^ 229131196u); continue; case 9u: this.subscriber_ = new Bgs.Protocol.Account.V1.Identity(); arg_261_0 = (num2 * 2913214433u ^ 3284148085u); continue; case 10u: input.ReadMessage(this.channelId_); arg_261_0 = 3835294388u; continue; case 11u: arg_261_0 = ((num <= 18u) ? 3896628548u : 4190975167u); continue; case 12u: goto IL_2D9; case 13u: input.SkipLastField(); arg_261_0 = 2617156714u; continue; case 14u: arg_261_0 = ((this.agentId_ == null) ? 3232005457u : 2445742807u); continue; case 15u: arg_261_0 = ((this.subscriber_ != null) ? 3332533689u : 2550948287u); continue; case 16u: arg_261_0 = ((this.channelId_ != null) ? 4284758205u : 2264358677u); continue; case 17u: input.ReadMessage(this.stateChange_); arg_261_0 = 3835294388u; continue; case 19u: arg_261_0 = 3874509795u; continue; case 20u: input.ReadMessage(this.subscriber_); arg_261_0 = 3835294388u; continue; case 21u: arg_261_0 = ((this.stateChange_ != null) ? 3362445402u : 3992172402u); continue; case 22u: arg_261_0 = ((num == 26u) ? 4047767074u : 4244893731u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf/ByteArray.cs using System; namespace Google.Protobuf { internal static class ByteArray { private const int CopyThreshold = 12; internal static void Copy(byte[] src, int srcOffset, byte[] dst, int dstOffset, int count) { if (count > 12) { goto IL_6D; } goto IL_C6; uint arg_91_0; int num3; while (true) { IL_8C: uint num; switch ((num = (arg_91_0 ^ 1930007156u)) % 10u) { case 0u: return; case 1u: ByteArray.smethod_0(src, srcOffset, dst, dstOffset, count); arg_91_0 = (num * 413042327u ^ 1632786903u); continue; case 2u: goto IL_6D; case 3u: { int num2; num2++; arg_91_0 = (num * 2391009160u ^ 1725920377u); continue; } case 4u: goto IL_C6; case 6u: { int num2 = srcOffset; arg_91_0 = (num * 2783204400u ^ 4161099569u); continue; } case 7u: { int num2; arg_91_0 = ((num2 >= num3) ? 1788008595u : 1153902532u); continue; } case 8u: { int num2; dst[dstOffset++] = src[num2]; arg_91_0 = 1859355451u; continue; } case 9u: arg_91_0 = (num * 245412605u ^ 736293232u); continue; } break; } return; IL_6D: arg_91_0 = 1312584901u; goto IL_8C; IL_C6: num3 = srcOffset + count; arg_91_0 = 912022232u; goto IL_8C; } internal static void Reverse(byte[] bytes) { int num = 0; while (true) { IL_8C: uint arg_68_0 = 4044189016u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 2411602661u)) % 6u) { case 0u: goto IL_8C; case 1u: { byte b = bytes[num]; arg_68_0 = 3824140403u; continue; } case 3u: { int num3 = bytes.Length - 1; arg_68_0 = (num2 * 308520363u ^ 2779861225u); continue; } case 4u: { int num3; bytes[num] = bytes[num3]; byte b; bytes[num3] = b; num++; num3--; arg_68_0 = (num2 * 3442540430u ^ 2982960610u); continue; } case 5u: { int num3; arg_68_0 = ((num >= num3) ? 2606236795u : 3898309236u); continue; } } return; } } } static void smethod_0(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } } } <file_sep>/Google.Protobuf.Reflection/DescriptorBase.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public abstract class DescriptorBase : IDescriptor { private readonly FileDescriptor file; private readonly string fullName; private readonly int index; public int Index { get { return this.index; } } public abstract string Name { get; } public string FullName { get { return this.fullName; } } public FileDescriptor File { get { return this.file; } } internal DescriptorBase(FileDescriptor file, string fullName, int index) { this.file = file; this.fullName = fullName; this.index = index; } } } <file_sep>/Google.Protobuf.WellKnownTypes/Struct.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Struct : IMessage<Struct>, IEquatable<Struct>, IDeepCloneable<Struct>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Struct.__c __9 = new Struct.__c(); internal Struct cctor>b__24_0() { return new Struct(); } } private static readonly MessageParser<Struct> _parser = new MessageParser<Struct>(new Func<Struct>(Struct.__c.__9.<.cctor>b__24_0)); public const int FieldsFieldNumber = 1; private static readonly MapField<string, Value>.Codec _map_fields_codec = new MapField<string, Value>.Codec(FieldCodec.ForString(10u), FieldCodec.ForMessage<Value>(18u, Value.Parser), 10u); private readonly MapField<string, Value> fields_ = new MapField<string, Value>(); public static MessageParser<Struct> Parser { get { return Struct._parser; } } public static MessageDescriptor Descriptor { get { return StructReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Struct.Descriptor; } } public MapField<string, Value> Fields { get { return this.fields_; } } public Struct() { } public Struct(Struct other) : this() { this.fields_ = other.fields_.Clone(); } public Struct Clone() { return new Struct(this); } public override bool Equals(object other) { return this.Equals(other as Struct); } public bool Equals(Struct other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -678569526) % 7) { case 0: arg_48_0 = ((!this.Fields.Equals(other.Fields)) ? -2017316130 : -738402119); continue; case 1: return false; case 2: goto IL_7A; case 3: return false; case 4: goto IL_12; case 5: return true; } break; } return true; IL_12: arg_48_0 = -1081432966; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -1509403308 : -1338302477); goto IL_43; } public override int GetHashCode() { return 1 ^ Struct.smethod_0(this.Fields); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.fields_.WriteTo(output, Struct._map_fields_codec); } public int CalculateSize() { return 0 + this.fields_.CalculateSize(Struct._map_fields_codec); } public void MergeFrom(Struct other) { if (other == null) { return; } this.fields_.Add(other.fields_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) == 0u) ? 3549203535u : 4033922203u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 3285916908u)) % 7u) { case 0u: arg_77_0 = 4033922203u; continue; case 1u: this.fields_.AddEntriesFrom(input, Struct._map_fields_codec); arg_77_0 = 3690910909u; continue; case 2u: input.SkipLastField(); arg_77_0 = (num2 * 668889924u ^ 1131644761u); continue; case 3u: arg_77_0 = (num2 * 935097955u ^ 1600727358u); continue; case 4u: arg_77_0 = ((num == 10u) ? 3564299018u : 3977425289u); continue; case 6u: goto IL_AE; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/SelectGameAccountRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class SelectGameAccountRequest : IMessage<SelectGameAccountRequest>, IEquatable<SelectGameAccountRequest>, IDeepCloneable<SelectGameAccountRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly SelectGameAccountRequest.__c __9 = new SelectGameAccountRequest.__c(); internal SelectGameAccountRequest cctor>b__24_0() { return new SelectGameAccountRequest(); } } private static readonly MessageParser<SelectGameAccountRequest> _parser = new MessageParser<SelectGameAccountRequest>(new Func<SelectGameAccountRequest>(SelectGameAccountRequest.__c.__9.<.cctor>b__24_0)); public const int GameAccountIdFieldNumber = 1; private EntityId gameAccountId_; public static MessageParser<SelectGameAccountRequest> Parser { get { return SelectGameAccountRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[15]; } } MessageDescriptor IMessage.Descriptor { get { return SelectGameAccountRequest.Descriptor; } } public EntityId GameAccountId { get { return this.gameAccountId_; } set { this.gameAccountId_ = value; } } public SelectGameAccountRequest() { } public SelectGameAccountRequest(SelectGameAccountRequest other) : this() { this.GameAccountId = ((other.gameAccountId_ != null) ? other.GameAccountId.Clone() : null); } public SelectGameAccountRequest Clone() { return new SelectGameAccountRequest(this); } public override bool Equals(object other) { return this.Equals(other as SelectGameAccountRequest); } public bool Equals(SelectGameAccountRequest other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ 1973231055) % 7) { case 0: arg_48_0 = (SelectGameAccountRequest.smethod_0(this.GameAccountId, other.GameAccountId) ? 1782922729 : 1937597232); continue; case 1: return false; case 2: return false; case 3: goto IL_7A; case 4: goto IL_12; case 5: return true; } break; } return true; IL_12: arg_48_0 = 1163497633; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? 1556145813 : 1849648676); goto IL_43; } public override int GetHashCode() { return 1 ^ SelectGameAccountRequest.smethod_1(this.GameAccountId); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.GameAccountId); } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.GameAccountId)); } public void MergeFrom(SelectGameAccountRequest other) { if (other == null) { goto IL_70; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 4080886162u)) % 7u) { case 0u: goto IL_70; case 1u: return; case 2u: this.GameAccountId.MergeFrom(other.GameAccountId); arg_7A_0 = 3547320528u; continue; case 3u: this.gameAccountId_ = new EntityId(); arg_7A_0 = (num * 2641439357u ^ 3813158137u); continue; case 5u: arg_7A_0 = (((this.gameAccountId_ == null) ? 3735095641u : 2416720946u) ^ num * 2345360609u); continue; case 6u: goto IL_B1; } break; } return; IL_70: arg_7A_0 = 2274930308u; goto IL_75; IL_B1: arg_7A_0 = ((other.gameAccountId_ == null) ? 3547320528u : 2357907641u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_DC: uint num; uint arg_A1_0 = ((num = input.ReadTag()) != 0u) ? 3126533616u : 2431159198u; while (true) { uint num2; switch ((num2 = (arg_A1_0 ^ 4138909025u)) % 8u) { case 0u: goto IL_DC; case 1u: arg_A1_0 = ((num != 10u) ? 3704836300u : 2861837839u); continue; case 2u: arg_A1_0 = 3126533616u; continue; case 3u: this.gameAccountId_ = new EntityId(); arg_A1_0 = (num2 * 1209953835u ^ 4076204100u); continue; case 4u: input.ReadMessage(this.gameAccountId_); arg_A1_0 = 3467924385u; continue; case 5u: input.SkipLastField(); arg_A1_0 = (num2 * 1781727078u ^ 2990167631u); continue; case 6u: arg_A1_0 = ((this.gameAccountId_ == null) ? 3220013114u : 4210268173u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/GenerateWebCredentialsRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class GenerateWebCredentialsRequest : IMessage<GenerateWebCredentialsRequest>, IEquatable<GenerateWebCredentialsRequest>, IDeepCloneable<GenerateWebCredentialsRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenerateWebCredentialsRequest.__c __9 = new GenerateWebCredentialsRequest.__c(); internal GenerateWebCredentialsRequest cctor>b__24_0() { return new GenerateWebCredentialsRequest(); } } private static readonly MessageParser<GenerateWebCredentialsRequest> _parser = new MessageParser<GenerateWebCredentialsRequest>(new Func<GenerateWebCredentialsRequest>(GenerateWebCredentialsRequest.__c.__9.<.cctor>b__24_0)); public const int ProgramFieldNumber = 1; private uint program_; public static MessageParser<GenerateWebCredentialsRequest> Parser { get { return GenerateWebCredentialsRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[17]; } } MessageDescriptor IMessage.Descriptor { get { return GenerateWebCredentialsRequest.Descriptor; } } public uint Program { get { return this.program_; } set { this.program_ = value; } } public GenerateWebCredentialsRequest() { } public GenerateWebCredentialsRequest(GenerateWebCredentialsRequest other) : this() { this.program_ = other.program_; } public GenerateWebCredentialsRequest Clone() { return new GenerateWebCredentialsRequest(this); } public override bool Equals(object other) { return this.Equals(other as GenerateWebCredentialsRequest); } public bool Equals(GenerateWebCredentialsRequest other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -1615798032) % 7) { case 0: return true; case 1: return false; case 3: goto IL_39; case 4: return false; case 5: arg_43_0 = ((this.Program != other.Program) ? -1438166326 : -416725948); continue; case 6: goto IL_75; } break; } return true; IL_39: arg_43_0 = -828128790; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? -2109463340 : -2087183230); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 3788980110u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 3245953433u)) % 4u) { case 0u: goto IL_6C; case 2u: num ^= this.Program.GetHashCode(); arg_50_0 = (num2 * 3085561070u ^ 1538596476u); continue; case 3u: arg_50_0 = (((this.Program != 0u) ? 995119013u : 1834763358u) ^ num2 * 1034564402u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Program != 0u) { while (true) { IL_48: uint arg_30_0 = 283605157u; while (true) { uint num; switch ((num = (arg_30_0 ^ 724870426u)) % 3u) { case 1u: output.WriteRawTag(13); output.WriteFixed32(this.Program); arg_30_0 = (num * 2372022560u ^ 655928265u); continue; case 2u: goto IL_48; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_5F: uint arg_43_0 = 2821990665u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 2338014012u)) % 4u) { case 1u: arg_43_0 = (((this.Program == 0u) ? 1072200521u : 555987026u) ^ num2 * 1027715937u); continue; case 2u: goto IL_5F; case 3u: num += 5; arg_43_0 = (num2 * 3467335099u ^ 4198026373u); continue; } return num; } } return num; } public void MergeFrom(GenerateWebCredentialsRequest other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 3673134615u)) % 5u) { case 0u: goto IL_2D; case 2u: return; case 3u: this.Program = other.Program; arg_37_0 = (num * 2689686178u ^ 4094840836u); continue; case 4u: goto IL_63; } break; } return; IL_2D: arg_37_0 = 4035903930u; goto IL_32; IL_63: arg_37_0 = ((other.Program != 0u) ? 2914782773u : 3174459776u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) != 0u) ? 3223745461u : 3690594088u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 3647028001u)) % 7u) { case 1u: arg_72_0 = ((num == 13u) ? 3925968244u : 3586684755u); continue; case 2u: arg_72_0 = 3223745461u; continue; case 3u: this.Program = input.ReadFixed32(); arg_72_0 = 3302930560u; continue; case 4u: goto IL_A9; case 5u: input.SkipLastField(); arg_72_0 = (num2 * 2414251679u ^ 2393943078u); continue; case 6u: arg_72_0 = (num2 * 3515206833u ^ 2546351993u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Presence.V1/PresenceServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Presence.V1 { [DebuggerNonUserCode] public static class PresenceServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return PresenceServiceReflection.descriptor; } } static PresenceServiceReflection() { PresenceServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(PresenceServiceReflection.smethod_1(PresenceServiceReflection.smethod_0(new string[] { Module.smethod_35<string>(1358581018u), Module.smethod_37<string>(1431022630u), Module.smethod_37<string>(86977558u), Module.smethod_37<string>(1635499974u), Module.smethod_33<string>(2602066087u), Module.smethod_35<string>(2365943594u), Module.smethod_36<string>(3335209386u), Module.smethod_33<string>(1886002839u), Module.smethod_34<string>(3665812885u), Module.smethod_37<string>(934300070u), Module.smethod_33<string>(4039841351u), Module.smethod_34<string>(20625157u), Module.smethod_37<string>(3738628150u), Module.smethod_33<string>(2301435831u), Module.smethod_33<string>(2403528839u), Module.smethod_36<string>(914592122u), Module.smethod_37<string>(1839505782u), Module.smethod_33<string>(665123319u), Module.smethod_33<string>(767216327u), Module.smethod_35<string>(4283801034u), Module.smethod_35<string>(1961396570u), Module.smethod_33<string>(3323778103u), Module.smethod_34<string>(3736255925u), Module.smethod_35<string>(1653717258u), Module.smethod_34<string>(2986363029u), Module.smethod_37<string>(2891305638u), Module.smethod_36<string>(1284766314u), Module.smethod_33<string>(3527964119u), Module.smethod_35<string>(996196314u), Module.smethod_35<string>(338675370u), Module.smethod_34<string>(736684341u), Module.smethod_37<string>(3183550854u), Module.smethod_37<string>(2832950902u), Module.smethod_35<string>(2003558890u), Module.smethod_36<string>(1666680042u), Module.smethod_35<string>(2353400522u) })), new FileDescriptor[] { EntityTypesReflection.Descriptor, PresenceTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(SubscribeRequest).TypeHandle), SubscribeRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_34<string>(3169466458u), Module.smethod_37<string>(1316110889u), Module.smethod_37<string>(700380119u), Module.smethod_37<string>(1751855794u) }, null, null, null), new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(SubscribeNotificationRequest).TypeHandle), SubscribeNotificationRequest.Parser, new string[] { Module.smethod_37<string>(2453674589u) }, null, null, null), new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(UnsubscribeRequest).TypeHandle), UnsubscribeRequest.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_36<string>(1294600521u), Module.smethod_35<string>(4063073269u) }, null, null, null), new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(UpdateRequest).TypeHandle), UpdateRequest.Parser, new string[] { Module.smethod_35<string>(1666543649u), Module.smethod_34<string>(2594499725u), Module.smethod_37<string>(1722648955u), Module.smethod_34<string>(1899727192u) }, null, null, null), new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(QueryRequest).TypeHandle), QueryRequest.Parser, new string[] { Module.smethod_35<string>(1666543649u), Module.smethod_34<string>(2781972949u), Module.smethod_37<string>(3916609987u) }, null, null, null), new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(QueryResponse).TypeHandle), QueryResponse.Parser, new string[] { Module.smethod_33<string>(3778357763u) }, null, null, null), new GeneratedCodeInfo(PresenceServiceReflection.smethod_2(typeof(OwnershipRequest).TypeHandle), OwnershipRequest.Parser, new string[] { Module.smethod_33<string>(3081156634u), Module.smethod_33<string>(2978155057u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Google.Protobuf/CodedInputStream.cs using System; using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; using System.Text; namespace Google.Protobuf { [ComVisible(true)] public sealed class CodedInputStream { private readonly byte[] buffer; private int bufferSize; private int bufferSizeAfterLimit; private int bufferPos; private readonly Stream input; private uint lastTag; private uint nextTag; private bool hasNextTag; internal const int DefaultRecursionLimit = 64; internal const int DefaultSizeLimit = 67108864; internal const int BufferSize = 4096; private int totalBytesRetired; private int currentLimit = 2147483647; private int recursionDepth; private readonly int recursionLimit; private readonly int sizeLimit; public long Position { get { if (this.input != null) { return CodedInputStream.smethod_1(this.input) - (long)(this.bufferSize + this.bufferSizeAfterLimit - this.bufferPos); } return (long)this.bufferPos; } } internal uint LastTag { get { return this.lastTag; } } public int SizeLimit { get { return this.sizeLimit; } } public int RecursionLimit { get { return this.recursionLimit; } } internal bool ReachedLimit { get { return this.currentLimit != 2147483647 && this.totalBytesRetired + this.bufferPos >= this.currentLimit; } } public bool IsAtEnd { get { return this.bufferPos == this.bufferSize && !this.RefillBuffer(false); } } public CodedInputStream(byte[] buffer) : this(null, Preconditions.CheckNotNull<byte[]>(buffer, Module.smethod_34<string>(158792410u)), 0, buffer.Length) { } public CodedInputStream(byte[] buffer, int offset, int length) : this(null, Preconditions.CheckNotNull<byte[]>(buffer, Module.smethod_33<string>(4137391514u)), offset, offset + length) { while (true) { IL_E1: uint arg_B5_0 = 4105809620u; while (true) { uint num; switch ((num = (arg_B5_0 ^ 3055581533u)) % 8u) { case 0u: goto IL_E8; case 1u: arg_B5_0 = (((offset >= 0) ? 4187037825u : 2165485583u) ^ num * 635038362u); continue; case 2u: goto IL_E1; case 4u: goto IL_102; case 5u: arg_B5_0 = (((offset + length <= buffer.Length) ? 2611700846u : 3673290905u) ^ num * 660699824u); continue; case 6u: arg_B5_0 = (((offset > buffer.Length) ? 4145083265u : 2421336766u) ^ num * 3312781942u); continue; case 7u: arg_B5_0 = ((length < 0) ? 2770183273u : 2368368432u); continue; } goto Block_5; } } Block_5: return; IL_E8: throw CodedInputStream.smethod_0(Module.smethod_36<string>(2579925932u), Module.smethod_36<string>(944709867u)); IL_102: throw CodedInputStream.smethod_0(Module.smethod_37<string>(2099803356u), Module.smethod_33<string>(1031020676u)); } public CodedInputStream(Stream input) : this(input, new byte[4096], 0, 0) { Preconditions.CheckNotNull<Stream>(input, Module.smethod_35<string>(2407332993u)); } internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize) { this.input = input; this.buffer = buffer; this.bufferPos = bufferPos; this.bufferSize = bufferSize; this.sizeLimit = 67108864; this.recursionLimit = 64; } internal CodedInputStream(Stream input, byte[] buffer, int bufferPos, int bufferSize, int sizeLimit, int recursionLimit) : this(input, buffer, bufferPos, bufferSize) { while (true) { IL_96: uint arg_6E_0 = 795374245u; while (true) { uint num; switch ((num = (arg_6E_0 ^ 775856385u)) % 7u) { case 0u: arg_6E_0 = ((recursionLimit > 0) ? 269118455u : 1545511542u); continue; case 1u: goto IL_9D; case 2u: this.sizeLimit = sizeLimit; this.recursionLimit = recursionLimit; arg_6E_0 = 126081230u; continue; case 3u: goto IL_96; case 5u: arg_6E_0 = (((sizeLimit <= 0) ? 691199968u : 700376769u) ^ num * 2166325011u); continue; case 6u: goto IL_B7; } goto Block_3; } } Block_3: return; IL_9D: throw CodedInputStream.smethod_0(Module.smethod_36<string>(2684209016u), Module.smethod_33<string>(2066477622u)); IL_B7: throw CodedInputStream.smethod_0(Module.smethod_33<string>(2878076541u), Module.smethod_36<string>(4050255904u)); } public static CodedInputStream CreateWithLimits(Stream input, int sizeLimit, int recursionLimit) { return new CodedInputStream(input, new byte[4096], 0, 0, sizeLimit, recursionLimit); } internal void CheckReadEndOfStreamTag() { if (this.lastTag != 0u) { throw InvalidProtocolBufferException.MoreDataAvailable(); } } public uint PeekTag() { if (this.hasNextTag) { goto IL_08; } goto IL_48; uint arg_28_0; while (true) { IL_23: uint num; switch ((num = (arg_28_0 ^ 843549161u)) % 5u) { case 0u: this.hasNextTag = true; arg_28_0 = (num * 144223796u ^ 2669347567u); continue; case 2u: goto IL_48; case 3u: goto IL_08; case 4u: goto IL_70; } break; } uint num2; this.lastTag = num2; return this.nextTag; IL_70: return this.nextTag; IL_08: arg_28_0 = 1162068261u; goto IL_23; IL_48: num2 = this.lastTag; this.nextTag = this.ReadTag(); arg_28_0 = 1996846084u; goto IL_23; } public uint ReadTag() { if (this.hasNextTag) { goto IL_12C; } goto IL_260; uint arg_1F0_0; while (true) { IL_1EB: uint num; switch ((num = (arg_1F0_0 ^ 3473818248u)) % 21u) { case 0u: this.lastTag = this.ReadRawVarint32(); arg_1F0_0 = 4258493852u; continue; case 1u: this.lastTag = this.ReadRawVarint32(); arg_1F0_0 = (num * 1928200741u ^ 984766884u); continue; case 2u: { int num2; int num3; num2 |= num3 << 7; arg_1F0_0 = (num * 2870894154u ^ 3386794191u); continue; } case 3u: arg_1F0_0 = (this.IsAtEnd ? 3602356442u : 2446105956u); continue; case 4u: arg_1F0_0 = ((this.lastTag == 0u) ? 2348968086u : 2303431287u); continue; case 5u: { int num2; this.lastTag = (uint)num2; arg_1F0_0 = (num * 2253391335u ^ 2512173805u); continue; } case 6u: this.hasNextTag = false; arg_1F0_0 = (num * 242178369u ^ 2396804050u); continue; case 7u: goto IL_12C; case 8u: goto IL_260; case 9u: { int num3; int num2 = num3 & 127; arg_1F0_0 = 4275598682u; continue; } case 10u: this.lastTag = this.nextTag; arg_1F0_0 = (num * 2614616463u ^ 266469774u); continue; case 11u: { int num3; arg_1F0_0 = (((num3 >= 128) ? 4053449985u : 2233079898u) ^ num * 3568448975u); continue; } case 12u: goto IL_275; case 13u: this.bufferPos -= 2; arg_1F0_0 = 3949501264u; continue; case 15u: arg_1F0_0 = (num * 3391944534u ^ 1178678178u); continue; case 16u: goto IL_285; case 17u: { int num3; this.lastTag = (uint)num3; arg_1F0_0 = (num * 2219623533u ^ 4172071489u); continue; } case 18u: { byte[] arg_62_0 = this.buffer; int num4 = this.bufferPos; this.bufferPos = num4 + 1; int num3; arg_1F0_0 = ((((num3 = arg_62_0[num4]) < 128) ? 950429324u : 1470973633u) ^ num * 1299985402u); continue; } case 19u: { byte[] arg_37_0 = this.buffer; int num4 = this.bufferPos; this.bufferPos = num4 + 1; int num3 = arg_37_0[num4]; arg_1F0_0 = (num * 296800850u ^ 1922126118u); continue; } case 20u: goto IL_28B; } break; } goto IL_27E; IL_275: this.lastTag = 0u; return 0u; IL_27E: return this.lastTag; IL_285: throw InvalidProtocolBufferException.InvalidTag(); IL_28B: return this.lastTag; IL_12C: arg_1F0_0 = 2318356756u; goto IL_1EB; IL_260: arg_1F0_0 = ((this.bufferPos + 2 > this.bufferSize) ? 3868930545u : 2295496730u); goto IL_1EB; } public void SkipLastField() { if (this.lastTag == 0u) { goto IL_1B; } goto IL_DA; uint arg_91_0; WireFormat.WireType tagWireType; while (true) { IL_8C: uint num; int size; switch ((num = (arg_91_0 ^ 216291838u)) % 15u) { case 0u: return; case 1u: this.SkipRawBytes(size); arg_91_0 = (num * 3252926349u ^ 3202087247u); continue; case 2u: switch (tagWireType) { case WireFormat.WireType.Varint: goto IL_3D; case WireFormat.WireType.Fixed64: goto IL_0D; case WireFormat.WireType.LengthDelimited: goto IL_2F; case WireFormat.WireType.StartGroup: goto IL_22; case WireFormat.WireType.EndGroup: break; case WireFormat.WireType.Fixed32: goto IL_EE; default: arg_91_0 = (num * 875934909u ^ 2465386267u); continue; } break; case 3u: goto IL_EE; case 4u: goto IL_3D; case 5u: return; case 6u: goto IL_2F; case 8u: return; case 9u: return; case 10u: goto IL_22; case 11u: goto IL_DA; case 12u: goto IL_1B; case 13u: goto IL_0D; case 14u: goto IL_F9; } break; IL_0D: this.ReadFixed64(); arg_91_0 = 199393957u; continue; IL_22: this.SkipGroup(); arg_91_0 = 531198599u; continue; IL_2F: size = this.ReadLength(); arg_91_0 = 937284604u; continue; IL_3D: this.ReadRawVarint32(); arg_91_0 = 1298294393u; } return; IL_EE: this.ReadFixed32(); return; IL_F9: throw CodedInputStream.smethod_2(Module.smethod_34<string>(1950534549u)); IL_1B: arg_91_0 = 1897579666u; goto IL_8C; IL_DA: tagWireType = WireFormat.GetTagWireType(this.lastTag); arg_91_0 = 1149262345u; goto IL_8C; } private void SkipGroup() { this.recursionDepth++; while (true) { IL_103: uint arg_CE_0 = 4083027391u; while (true) { uint num; switch ((num = (arg_CE_0 ^ 3668092328u)) % 10u) { case 0u: this.recursionDepth--; arg_CE_0 = (num * 1200733701u ^ 2869581373u); continue; case 1u: goto IL_10A; case 2u: { uint num2; arg_CE_0 = (((num2 == 0u) ? 1156442343u : 1656609996u) ^ num * 1373211518u); continue; } case 3u: goto IL_103; case 4u: { uint num2 = this.ReadTag(); arg_CE_0 = 3291722014u; continue; } case 5u: { uint num2; arg_CE_0 = (((WireFormat.GetTagWireType(num2) != WireFormat.WireType.EndGroup) ? 4252641792u : 3120290318u) ^ num * 2023774452u); continue; } case 6u: this.SkipLastField(); arg_CE_0 = 4170186089u; continue; case 8u: goto IL_110; case 9u: arg_CE_0 = (((this.recursionDepth >= this.recursionLimit) ? 2276855929u : 3951636107u) ^ num * 1840386265u); continue; } goto Block_4; } } Block_4: return; IL_10A: throw InvalidProtocolBufferException.TruncatedMessage(); IL_110: throw InvalidProtocolBufferException.RecursionLimitExceeded(); } public double ReadDouble() { return CodedInputStream.smethod_3((long)this.ReadRawLittleEndian64()); } public float ReadFloat() { if (BitConverter.IsLittleEndian) { goto IL_34; } goto IL_AC; uint arg_84_0; byte[] array; while (true) { IL_7F: uint num; switch ((num = (arg_84_0 ^ 3485784093u)) % 7u) { case 0u: goto IL_AC; case 1u: arg_84_0 = (((4 > this.bufferSize - this.bufferPos) ? 3912687515u : 3243081089u) ^ num * 3128540336u); continue; case 2u: goto IL_BB; case 4u: ByteArray.Reverse(array); arg_84_0 = (num * 1462737641u ^ 3256312271u); continue; case 5u: goto IL_34; case 6u: arg_84_0 = (((!BitConverter.IsLittleEndian) ? 1832188435u : 825894561u) ^ num * 276359282u); continue; } break; } goto IL_DB; IL_BB: float arg_DA_0 = CodedInputStream.smethod_4(this.buffer, this.bufferPos); this.bufferPos += 4; return arg_DA_0; IL_DB: return CodedInputStream.smethod_4(array, 0); IL_34: arg_84_0 = 3505293392u; goto IL_7F; IL_AC: array = this.ReadRawBytes(4); arg_84_0 = 3875258764u; goto IL_7F; } public ulong ReadUInt64() { return this.ReadRawVarint64(); } public long ReadInt64() { return (long)this.ReadRawVarint64(); } public int ReadInt32() { return (int)this.ReadRawVarint32(); } public ulong ReadFixed64() { return this.ReadRawLittleEndian64(); } public uint ReadFixed32() { return this.ReadRawLittleEndian32(); } public bool ReadBool() { return this.ReadRawVarint32() > 0u; } public string ReadString() { int num = this.ReadLength(); while (true) { IL_7D: uint arg_59_0 = 2897944458u; while (true) { uint num2; switch ((num2 = (arg_59_0 ^ 3853002500u)) % 6u) { case 0u: goto IL_84; case 1u: goto IL_AA; case 2u: arg_59_0 = (((num != 0) ? 1371295095u : 232031949u) ^ num2 * 771795367u); continue; case 3u: goto IL_7D; case 5u: arg_59_0 = ((num <= this.bufferSize - this.bufferPos) ? 2296444942u : 3697458936u); continue; } goto Block_3; } } Block_3: goto IL_B0; IL_84: string arg_A9_0 = CodedInputStream.smethod_5(CodedOutputStream.Utf8Encoding, this.buffer, this.bufferPos, num); this.bufferPos += num; return arg_A9_0; IL_AA: return ""; IL_B0: return CodedInputStream.smethod_5(CodedOutputStream.Utf8Encoding, this.ReadRawBytes(num), 0, num); } public void ReadMessage(IMessage builder) { int byteLimit = this.ReadLength(); if (this.recursionDepth >= this.recursionLimit) { goto IL_18; } goto IL_D1; uint arg_A0_0; int oldLimit; while (true) { IL_9B: uint num; switch ((num = (arg_A0_0 ^ 3594406295u)) % 9u) { case 1u: goto IL_D1; case 2u: goto IL_E0; case 3u: goto IL_E6; case 4u: builder.MergeFrom(this); this.CheckReadEndOfStreamTag(); arg_A0_0 = (num * 668934549u ^ 3320989511u); continue; case 5u: this.recursionDepth--; this.PopLimit(oldLimit); arg_A0_0 = 3753135618u; continue; case 6u: this.recursionDepth++; arg_A0_0 = (num * 3605077701u ^ 1442008241u); continue; case 7u: arg_A0_0 = (((!this.ReachedLimit) ? 1131663392u : 1455061091u) ^ num * 2448985038u); continue; case 8u: goto IL_18; } break; } return; IL_E0: throw InvalidProtocolBufferException.TruncatedMessage(); IL_E6: throw InvalidProtocolBufferException.RecursionLimitExceeded(); IL_18: arg_A0_0 = 3717192022u; goto IL_9B; IL_D1: oldLimit = this.PushLimit(byteLimit); arg_A0_0 = 3338082229u; goto IL_9B; } public ByteString ReadBytes() { int num = this.ReadLength(); while (true) { IL_82: uint arg_62_0 = 1567729408u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 1637773446u)) % 5u) { case 0u: goto IL_82; case 1u: arg_62_0 = (((num > 0) ? 1867247043u : 1970150730u) ^ num2 * 3990839928u); continue; case 2u: goto IL_89; case 3u: arg_62_0 = (((num > this.bufferSize - this.bufferPos) ? 1667764960u : 435160074u) ^ num2 * 3095056575u); continue; } goto Block_3; } } Block_3: goto IL_AA; IL_89: ByteString arg_A9_0 = ByteString.CopyFrom(this.buffer, this.bufferPos, num); this.bufferPos += num; return arg_A9_0; IL_AA: return ByteString.AttachBytes(this.ReadRawBytes(num)); } public uint ReadUInt32() { return this.ReadRawVarint32(); } public int ReadEnum() { return (int)this.ReadRawVarint32(); } public int ReadSFixed32() { return (int)this.ReadRawLittleEndian32(); } public long ReadSFixed64() { return (long)this.ReadRawLittleEndian64(); } public int ReadSInt32() { return CodedInputStream.DecodeZigZag32(this.ReadRawVarint32()); } public long ReadSInt64() { return CodedInputStream.DecodeZigZag64(this.ReadRawVarint64()); } public int ReadLength() { return (int)this.ReadRawVarint32(); } public bool MaybeConsumeTag(uint tag) { if (this.PeekTag() == tag) { this.hasNextTag = false; return true; } return false; } private uint SlowReadRawVarint32() { int num = (int)this.ReadRawByte(); int num3; while (true) { IL_288: uint arg_21F_0 = 2494979447u; while (true) { uint num2; switch ((num2 = (arg_21F_0 ^ 3418350901u)) % 23u) { case 0u: return (uint)num3; case 1u: return (uint)num; case 3u: { int num4; num4++; arg_21F_0 = 2554834133u; continue; } case 4u: num3 |= (num = (int)this.ReadRawByte()) << 28; arg_21F_0 = (((num >= 128) ? 3681311557u : 2476857353u) ^ num2 * 1734438028u); continue; case 5u: goto IL_288; case 6u: num3 |= num << 14; arg_21F_0 = (num2 * 459560486u ^ 2682837157u); continue; case 7u: { int num4 = 0; arg_21F_0 = (num2 * 2618328153u ^ 1651887273u); continue; } case 8u: num3 |= (num & 127) << 21; arg_21F_0 = 2672725996u; continue; case 9u: arg_21F_0 = ((this.ReadRawByte() < 128) ? 4259782305u : 2517833240u); continue; case 10u: goto IL_293; case 11u: arg_21F_0 = (num2 * 1187933065u ^ 300630263u); continue; case 12u: num3 = (num & 127); arg_21F_0 = (((num = (int)this.ReadRawByte()) < 128) ? 4028052120u : 4031939389u); continue; case 13u: num3 |= num << 7; arg_21F_0 = (num2 * 3923040291u ^ 436777168u); continue; case 14u: arg_21F_0 = ((((num = (int)this.ReadRawByte()) >= 128) ? 3503358724u : 3786568342u) ^ num2 * 2057946794u); continue; case 15u: num3 |= (num & 127) << 7; arg_21F_0 = 3385038264u; continue; case 16u: arg_21F_0 = (num2 * 2239769208u ^ 1246018549u); continue; case 17u: { int num4; arg_21F_0 = ((num4 >= 5) ? 3691206458u : 2737399246u); continue; } case 18u: arg_21F_0 = ((((num = (int)this.ReadRawByte()) < 128) ? 2996681071u : 2391661239u) ^ num2 * 60861131u); continue; case 19u: arg_21F_0 = (num2 * 4080467692u ^ 2433901261u); continue; case 20u: num3 |= (num & 127) << 14; arg_21F_0 = 2221719431u; continue; case 21u: arg_21F_0 = (((num < 128) ? 2147615258u : 2480450257u) ^ num2 * 2779953663u); continue; case 22u: num3 |= num << 21; arg_21F_0 = (num2 * 736477684u ^ 1309517483u); continue; } goto Block_8; } } Block_8: return (uint)num3; IL_293: throw InvalidProtocolBufferException.MalformedVarint(); } internal uint ReadRawVarint32() { if (this.bufferPos + 5 > this.bufferSize) { goto IL_241; } goto IL_2E0; uint arg_272_0; int num2; int num3; int num4; while (true) { IL_26D: uint num; switch ((num = (arg_272_0 ^ 3279982842u)) % 24u) { case 0u: num2 |= (num3 & 127) << 7; arg_272_0 = 4106779700u; continue; case 1u: num2 |= num3 << 14; arg_272_0 = (num * 2099631965u ^ 2426853294u); continue; case 2u: goto IL_241; case 3u: num2 |= (num3 & 127) << 14; arg_272_0 = 3762280186u; continue; case 4u: arg_272_0 = (((num3 >= 128) ? 3888434060u : 3230110178u) ^ num * 1744454279u); continue; case 5u: arg_272_0 = (num * 890748299u ^ 3649802996u); continue; case 6u: goto IL_303; case 7u: arg_272_0 = (num * 2669149444u ^ 4188353389u); continue; case 8u: { byte[] arg_1B7_0 = this.buffer; num4 = this.bufferPos; this.bufferPos = num4 + 1; arg_272_0 = ((((num3 = arg_1B7_0[num4]) >= 128) ? 64094121u : 33788384u) ^ num * 89356256u); continue; } case 9u: { int num5 = 0; arg_272_0 = (num * 4200415343u ^ 1980682066u); continue; } case 10u: num2 |= num3 << 21; arg_272_0 = (num * 4183951820u ^ 1722326823u); continue; case 11u: { int num5; arg_272_0 = ((num5 >= 5) ? 3527917750u : 3273196900u); continue; } case 12u: goto IL_30A; case 13u: return (uint)num2; case 14u: { byte[] arg_122_0 = this.buffer; num4 = this.bufferPos; this.bufferPos = num4 + 1; arg_272_0 = ((((num3 = arg_122_0[num4]) < 128) ? 3565351491u : 4152685305u) ^ num * 49595068u); continue; } case 15u: arg_272_0 = (((num3 < 128) ? 1999244824u : 398399328u) ^ num * 186532357u); continue; case 16u: num2 |= num3 << 7; arg_272_0 = (num * 780565301u ^ 1203515011u); continue; case 18u: { num2 = (num3 & 127); byte[] arg_9F_0 = this.buffer; num4 = this.bufferPos; this.bufferPos = num4 + 1; arg_272_0 = (((num3 = arg_9F_0[num4]) >= 128) ? 2173382714u : 3175365850u); continue; } case 19u: { num2 |= (num3 & 127) << 21; int arg_77_0 = num2; byte[] arg_71_0 = this.buffer; num4 = this.bufferPos; this.bufferPos = num4 + 1; num2 = (arg_77_0 | (num3 = arg_71_0[num4]) << 28); arg_272_0 = 2263177157u; continue; } case 20u: return (uint)num3; case 21u: goto IL_2E0; case 22u: arg_272_0 = ((this.ReadRawByte() < 128) ? 3539851855u : 2680636509u); continue; case 23u: { int num5; num5++; arg_272_0 = 2741648369u; continue; } } break; } return (uint)num2; IL_303: return this.SlowReadRawVarint32(); IL_30A: throw InvalidProtocolBufferException.MalformedVarint(); IL_241: arg_272_0 = 2274601772u; goto IL_26D; IL_2E0: byte[] arg_2F7_0 = this.buffer; num4 = this.bufferPos; this.bufferPos = num4 + 1; num3 = arg_2F7_0[num4]; arg_272_0 = 2187291510u; goto IL_26D; } internal static uint ReadRawVarint32(Stream input) { int num = 0; int num2 = 0; while (true) { IL_170: uint arg_118_0 = (num2 < 32) ? 2765393581u : 2548159426u; while (true) { uint num3; switch ((num3 = (arg_118_0 ^ 3646265261u)) % 15u) { case 0u: { int expr_EB = CodedInputStream.smethod_6(input); if (expr_EB == -1) { goto Block_4; } arg_118_0 = (((expr_EB & 128) == 0) ? 2162612612u : 2608631623u); continue; } case 1u: arg_118_0 = ((num2 < 64) ? 2251615257u : 4175910191u); continue; case 2u: arg_118_0 = (num3 * 3834085602u ^ 1974180542u); continue; case 3u: { int num4; arg_118_0 = (((num4 != -1) ? 499273271u : 604089970u) ^ num3 * 1734040573u); continue; } case 4u: goto IL_180; case 5u: num2 += 7; arg_118_0 = 4199510848u; continue; case 6u: arg_118_0 = 2765393581u; continue; case 7u: num2 += 7; arg_118_0 = 2860650326u; continue; case 8u: { int num4; num |= (num4 & 127) << num2; arg_118_0 = 4179695946u; continue; } case 9u: { int num4 = CodedInputStream.smethod_6(input); arg_118_0 = 3235844255u; continue; } case 11u: { int num4; arg_118_0 = ((((num4 & 128) != 0) ? 702572663u : 1678848673u) ^ num3 * 1391402526u); continue; } case 12u: return (uint)num; case 13u: goto IL_170; case 14u: return (uint)num; } goto Block_6; } } Block_4: throw InvalidProtocolBufferException.TruncatedMessage(); Block_6: goto IL_186; IL_180: throw InvalidProtocolBufferException.TruncatedMessage(); IL_186: throw InvalidProtocolBufferException.MalformedVarint(); } internal ulong ReadRawVarint64() { int num = 0; while (true) { IL_AA: uint arg_82_0 = 3464255710u; while (true) { uint num2; switch ((num2 = (arg_82_0 ^ 3687335287u)) % 7u) { case 0u: num += 7; arg_82_0 = 4289862063u; continue; case 1u: { ulong num3 = 0uL; arg_82_0 = (num2 * 9274271u ^ 59965272u); continue; } case 2u: goto IL_AA; case 3u: arg_82_0 = ((num >= 64) ? 3463336456u : 2532640387u); continue; case 4u: { byte b = this.ReadRawByte(); ulong num3; num3 |= (ulong)((ulong)((long)(b & 127)) << num); arg_82_0 = (((b & 128) != 0) ? 2842789293u : 2754475659u); continue; } case 6u: { ulong num3; return num3; } } goto Block_3; } } Block_3: throw InvalidProtocolBufferException.MalformedVarint(); } internal uint ReadRawLittleEndian32() { uint arg_1E_0 = (uint)this.ReadRawByte(); uint num = (uint)this.ReadRawByte(); uint num2 = (uint)this.ReadRawByte(); uint num3 = (uint)this.ReadRawByte(); return arg_1E_0 | num << 8 | num2 << 16 | num3 << 24; } internal ulong ReadRawLittleEndian64() { ulong arg_45_0 = (ulong)this.ReadRawByte(); ulong num = (ulong)this.ReadRawByte(); ulong num2 = (ulong)this.ReadRawByte(); ulong num3 = (ulong)this.ReadRawByte(); ulong num4 = (ulong)this.ReadRawByte(); ulong num5 = (ulong)this.ReadRawByte(); ulong num6 = (ulong)this.ReadRawByte(); ulong num7 = (ulong)this.ReadRawByte(); return arg_45_0 | num << 8 | num2 << 16 | num3 << 24 | num4 << 32 | num5 << 40 | num6 << 48 | num7 << 56; } internal static int DecodeZigZag32(uint n) { return (int)(n >> 1 ^ -(int)(n & 1u)); } internal static long DecodeZigZag64(ulong n) { return (long)(n >> 1 ^ -(long)(n & 1uL)); } internal int PushLimit(int byteLimit) { if (byteLimit < 0) { goto IL_46; } goto IL_78; uint arg_50_0; int num2; while (true) { IL_4B: uint num; switch ((num = (arg_50_0 ^ 2735523281u)) % 7u) { case 1u: goto IL_90; case 2u: goto IL_46; case 3u: goto IL_96; case 4u: num2 = this.currentLimit; arg_50_0 = (((byteLimit <= num2) ? 588888188u : 1005381115u) ^ num * 269960379u); continue; case 5u: goto IL_78; case 6u: this.currentLimit = byteLimit; this.RecomputeBufferSizeAfterLimit(); arg_50_0 = 3547802966u; continue; } break; } return num2; IL_90: throw InvalidProtocolBufferException.NegativeSize(); IL_96: throw InvalidProtocolBufferException.TruncatedMessage(); IL_46: arg_50_0 = 3055544971u; goto IL_4B; IL_78: byteLimit += this.totalBytesRetired + this.bufferPos; arg_50_0 = 3404370136u; goto IL_4B; } private void RecomputeBufferSizeAfterLimit() { this.bufferSize += this.bufferSizeAfterLimit; int num = this.totalBytesRetired + this.bufferSize; while (true) { IL_B5: uint arg_91_0 = 3290214909u; while (true) { uint num2; switch ((num2 = (arg_91_0 ^ 3100274198u)) % 6u) { case 0u: this.bufferSizeAfterLimit = num - this.currentLimit; this.bufferSize -= this.bufferSizeAfterLimit; arg_91_0 = (num2 * 393322617u ^ 1672770352u); continue; case 1u: arg_91_0 = (((num <= this.currentLimit) ? 2753221319u : 3208512394u) ^ num2 * 1742307460u); continue; case 3u: this.bufferSizeAfterLimit = 0; arg_91_0 = 2418410008u; continue; case 4u: return; case 5u: goto IL_B5; } return; } } } internal void PopLimit(int oldLimit) { this.currentLimit = oldLimit; this.RecomputeBufferSizeAfterLimit(); } private bool RefillBuffer(bool mustSucceed) { if (this.bufferPos < this.bufferSize) { goto IL_97; } goto IL_217; uint arg_1AB_0; while (true) { IL_1A6: uint num; switch ((num = (arg_1AB_0 ^ 2758101618u)) % 20u) { case 0u: return false; case 1u: arg_1AB_0 = ((this.bufferSize == 0) ? 4237450053u : 3753781680u); continue; case 2u: this.bufferPos = 0; this.bufferSize = ((this.input == null) ? 0 : CodedInputStream.smethod_7(this.input, this.buffer, 0, this.buffer.Length)); arg_1AB_0 = 3014807158u; continue; case 3u: goto IL_233; case 5u: goto IL_23B; case 6u: arg_1AB_0 = (((!mustSucceed) ? 241612496u : 967117457u) ^ num * 3458513293u); continue; case 7u: arg_1AB_0 = ((mustSucceed ? 3018651586u : 2316642734u) ^ num * 3607192857u); continue; case 8u: goto IL_241; case 9u: goto IL_251; case 10u: this.RecomputeBufferSizeAfterLimit(); arg_1AB_0 = 4081370257u; continue; case 11u: return false; case 12u: goto IL_261; case 13u: { int num2; arg_1AB_0 = (((num2 <= this.sizeLimit) ? 1299469164u : 1364638650u) ^ num * 3651766796u); continue; } case 14u: { int num2; arg_1AB_0 = (((num2 < 0) ? 806268128u : 1618192280u) ^ num * 303689379u); continue; } case 15u: goto IL_97; case 16u: arg_1AB_0 = (((this.bufferSize >= 0) ? 3915762819u : 3216895022u) ^ num * 3397340665u); continue; case 17u: goto IL_217; case 18u: this.totalBytesRetired += this.bufferSize; arg_1AB_0 = 4004614912u; continue; case 19u: { int num2 = this.totalBytesRetired + this.bufferSize + this.bufferSizeAfterLimit; arg_1AB_0 = (num * 1102194507u ^ 847959022u); continue; } } break; } return true; IL_233: throw InvalidProtocolBufferException.TruncatedMessage(); IL_23B: throw InvalidProtocolBufferException.TruncatedMessage(); IL_241: throw CodedInputStream.smethod_2(Module.smethod_34<string>(3441168009u)); IL_251: throw CodedInputStream.smethod_2(Module.smethod_35<string>(2155492349u)); IL_261: throw InvalidProtocolBufferException.SizeLimitExceeded(); IL_97: arg_1AB_0 = 3424268023u; goto IL_1A6; IL_217: arg_1AB_0 = ((this.totalBytesRetired + this.bufferSize != this.currentLimit) ? 3852252224u : 3817785332u); goto IL_1A6; } internal byte ReadRawByte() { if (this.bufferPos == this.bufferSize) { while (true) { IL_42: uint arg_2A_0 = 4040314937u; while (true) { uint num; switch ((num = (arg_2A_0 ^ 4163407359u)) % 3u) { case 0u: goto IL_42; case 2u: this.RefillBuffer(true); arg_2A_0 = (num * 883459474u ^ 3285745337u); continue; } goto Block_2; } } Block_2:; } byte[] arg_60_0 = this.buffer; int num2 = this.bufferPos; this.bufferPos = num2 + 1; return arg_60_0[num2]; } internal byte[] ReadRawBytes(int size) { if (size < 0) { goto IL_CB; } goto IL_43F; uint arg_396_0; List<byte[]> list; byte[] array2; int num3; byte[] array3; byte[] array4; int num7; while (true) { IL_391: uint num; int arg_EB_0; int num8; switch ((num = (arg_396_0 ^ 4198500303u)) % 35u) { case 0u: arg_396_0 = (num * 1583257911u ^ 2317854726u); continue; case 1u: goto IL_45B; case 2u: { byte[] array; list.Add(array); arg_396_0 = (num * 2669546329u ^ 1320475763u); continue; } case 3u: { byte[] array; int num2; num2 -= array.Length; arg_396_0 = (num * 4192541851u ^ 128370559u); continue; } case 4u: this.RefillBuffer(true); arg_396_0 = (num * 2838157372u ^ 2314411635u); continue; case 5u: arg_396_0 = ((size >= this.buffer.Length) ? 4054630116u : 3494658266u); continue; case 6u: goto IL_47F; case 7u: if (this.input != null) { arg_396_0 = 2186150901u; continue; } arg_EB_0 = -1; goto IL_EB; case 8u: CodedInputStream.smethod_8(this.buffer, 0, array2, num3, this.bufferSize); arg_396_0 = 3670660346u; continue; case 9u: arg_396_0 = ((size <= this.bufferSize - this.bufferPos) ? 4145414909u : 3180445376u); continue; case 10u: this.RefillBuffer(true); arg_396_0 = (num * 340903748u ^ 2855422178u); continue; case 11u: { int num2; arg_396_0 = ((num2 <= 0) ? 3397405552u : 2828618787u); continue; } case 12u: goto IL_49B; case 13u: num3 += this.bufferSize; arg_396_0 = (num * 1512197290u ^ 4214158784u); continue; case 14u: { byte[] array; int num4; arg_396_0 = ((num4 >= array.Length) ? 3816933501u : 3703400626u); continue; } case 15u: { int num5 = this.bufferSize; this.totalBytesRetired += this.bufferSize; this.bufferPos = 0; arg_396_0 = (num * 1391487145u ^ 3026251098u); continue; } case 16u: arg_396_0 = ((size - num3 > this.bufferSize) ? 3357071582u : 2262020265u); continue; case 17u: array3 = new byte[size]; arg_396_0 = (num * 3404612690u ^ 1239836236u); continue; case 18u: this.bufferPos = this.bufferSize; arg_396_0 = (num * 1507912885u ^ 691528269u); continue; case 19u: arg_396_0 = (num * 2362500617u ^ 1123306658u); continue; case 20u: { int num6 = this.bufferPos; arg_396_0 = 2716249524u; continue; } case 21u: array2 = new byte[size]; num3 = this.bufferSize - this.bufferPos; ByteArray.Copy(this.buffer, this.bufferPos, array2, 0, num3); this.bufferPos = this.bufferSize; arg_396_0 = (num * 3945553975u ^ 4215046507u); continue; case 23u: goto IL_548; case 24u: array4 = new byte[size]; arg_396_0 = (num * 1938307283u ^ 3597995925u); continue; case 25u: { int num6; ByteArray.Copy(this.buffer, num6, array3, 0, num7); arg_396_0 = (num * 647542001u ^ 2646979897u); continue; } case 26u: { byte[] array; int num4; arg_EB_0 = CodedInputStream.smethod_7(this.input, array, num4, array.Length - num4); goto IL_EB; } case 27u: goto IL_CB; case 28u: { this.bufferSize = 0; int num5; int num6; int num2 = size - (num5 - num6); list = new List<byte[]>(); arg_396_0 = (num * 2931708483u ^ 2690219271u); continue; } case 29u: goto IL_54E; case 30u: { int num2; byte[] array = new byte[CodedInputStream.smethod_9(num2, this.buffer.Length)]; int num4 = 0; arg_396_0 = 4262424359u; continue; } case 31u: goto IL_43F; case 32u: arg_396_0 = (((num8 > 0) ? 99622287u : 1347347889u) ^ num * 472951448u); continue; case 33u: { int num5; int num6; num7 = num5 - num6; arg_396_0 = (num * 1808256215u ^ 2179633551u); continue; } case 34u: { this.totalBytesRetired += num8; int num4; num4 += num8; arg_396_0 = 3649006730u; continue; } } break; IL_EB: num8 = arg_EB_0; arg_396_0 = 4062446728u; } goto IL_4A1; IL_45B: ByteArray.Copy(this.buffer, this.bufferPos, array4, 0, size); this.bufferPos += size; return array4; IL_47F: ByteArray.Copy(this.buffer, 0, array2, num3, size - num3); this.bufferPos = size - num3; return array2; IL_49B: throw InvalidProtocolBufferException.NegativeSize(); IL_4A1: using (List<byte[]>.Enumerator enumerator = list.GetEnumerator()) { while (true) { IL_52A: uint arg_4FD_0 = enumerator.MoveNext() ? 3095270417u : 2442424314u; while (true) { uint num; switch ((num = (arg_4FD_0 ^ 4198500303u)) % 5u) { case 0u: { byte[] current; num7 += current.Length; arg_4FD_0 = (num * 3371994623u ^ 404198586u); continue; } case 2u: arg_4FD_0 = 3095270417u; continue; case 3u: goto IL_52A; case 4u: { byte[] current = enumerator.Current; CodedInputStream.smethod_8(current, 0, array3, num7, current.Length); arg_4FD_0 = 2354534497u; continue; } } goto Block_13; } } Block_13: return array3; } IL_548: throw InvalidProtocolBufferException.TruncatedMessage(); IL_54E: this.SkipRawBytes(this.currentLimit - this.totalBytesRetired - this.bufferPos); throw InvalidProtocolBufferException.TruncatedMessage(); IL_CB: arg_396_0 = 3787950150u; goto IL_391; IL_43F: arg_396_0 = ((this.totalBytesRetired + this.bufferPos + size > this.currentLimit) ? 2838122396u : 2529660600u); goto IL_391; } private void SkipRawBytes(int size) { if (size < 0) { goto IL_FB; } goto IL_1AF; uint arg_157_0; while (true) { IL_152: uint num; switch ((num = (arg_157_0 ^ 675223999u)) % 15u) { case 0u: this.totalBytesRetired += this.bufferSize; this.bufferPos = 0; arg_157_0 = (num * 2042037585u ^ 3275181463u); continue; case 1u: arg_157_0 = (((this.input != null) ? 1111826091u : 689824421u) ^ num * 3861121661u); continue; case 2u: return; case 3u: goto IL_FB; case 4u: goto IL_1AF; case 5u: { this.bufferSize = 0; int num2; arg_157_0 = (((num2 >= size) ? 578666474u : 394180680u) ^ num * 3300267338u); continue; } case 7u: arg_157_0 = ((size > this.bufferSize - this.bufferPos) ? 2062244670u : 1844427517u); continue; case 8u: this.SkipRawBytes(this.currentLimit - this.totalBytesRetired - this.bufferPos); arg_157_0 = (num * 3432233981u ^ 4173888967u); continue; case 9u: { int num2 = this.bufferSize - this.bufferPos; arg_157_0 = 248771127u; continue; } case 10u: goto IL_1CC; case 11u: this.bufferPos += size; arg_157_0 = (num * 512570349u ^ 2989942840u); continue; case 12u: { int num2; this.SkipImpl(size - num2); this.totalBytesRetired += size - num2; arg_157_0 = 236606122u; continue; } case 13u: goto IL_1D2; case 14u: goto IL_1D8; } break; } return; IL_1CC: throw InvalidProtocolBufferException.TruncatedMessage(); IL_1D2: throw InvalidProtocolBufferException.TruncatedMessage(); IL_1D8: throw InvalidProtocolBufferException.NegativeSize(); IL_FB: arg_157_0 = 1190105578u; goto IL_152; IL_1AF: arg_157_0 = ((this.totalBytesRetired + this.bufferPos + size > this.currentLimit) ? 1175312733u : 777567675u); goto IL_152; } private void SkipImpl(int amountToSkip) { if (CodedInputStream.smethod_10(this.input)) { goto IL_C8; } goto IL_141; uint arg_104_0; byte[] array; while (true) { IL_FF: uint num; switch ((num = (arg_104_0 ^ 3026985626u)) % 12u) { case 0u: { long num2; arg_104_0 = (((CodedInputStream.smethod_1(this.input) == num2 + (long)amountToSkip) ? 512983504u : 1388170089u) ^ num * 1523900090u); continue; } case 1u: goto IL_159; case 3u: goto IL_C8; case 4u: { long num2 = CodedInputStream.smethod_1(this.input); arg_104_0 = (num * 4274641188u ^ 1918555231u); continue; } case 5u: { int num3 = CodedInputStream.smethod_7(this.input, array, 0, CodedInputStream.smethod_9(array.Length, amountToSkip)); arg_104_0 = 3097663354u; continue; } case 6u: goto IL_141; case 7u: goto IL_15F; case 8u: { int num3; arg_104_0 = (((num3 > 0) ? 1079543017u : 1976489343u) ^ num * 538338490u); continue; } case 9u: { Stream expr_4A = this.input; CodedInputStream.smethod_11(expr_4A, CodedInputStream.smethod_1(expr_4A) + (long)amountToSkip); arg_104_0 = (num * 3918813266u ^ 2965109464u); continue; } case 10u: arg_104_0 = ((amountToSkip <= 0) ? 3550478304u : 3594009823u); continue; case 11u: { int num3; amountToSkip -= num3; arg_104_0 = 2956050980u; continue; } } break; } return; IL_159: throw InvalidProtocolBufferException.TruncatedMessage(); IL_15F: throw InvalidProtocolBufferException.TruncatedMessage(); IL_C8: arg_104_0 = 2542451118u; goto IL_FF; IL_141: array = new byte[CodedInputStream.smethod_9(1024, amountToSkip)]; arg_104_0 = 2956050980u; goto IL_FF; } static ArgumentOutOfRangeException smethod_0(string string_0, string string_1) { return new ArgumentOutOfRangeException(string_0, string_1); } static long smethod_1(Stream stream_0) { return stream_0.Position; } static InvalidOperationException smethod_2(string string_0) { return new InvalidOperationException(string_0); } static double smethod_3(long long_0) { return BitConverter.Int64BitsToDouble(long_0); } static float smethod_4(byte[] byte_0, int int_0) { return BitConverter.ToSingle(byte_0, int_0); } static string smethod_5(Encoding encoding_0, byte[] byte_0, int int_0, int int_1) { return encoding_0.GetString(byte_0, int_0, int_1); } static int smethod_6(Stream stream_0) { return stream_0.ReadByte(); } static int smethod_7(Stream stream_0, byte[] byte_0, int int_0, int int_1) { return stream_0.Read(byte_0, int_0, int_1); } static void smethod_8(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Buffer.BlockCopy(array_0, int_0, array_1, int_1, int_2); } static int smethod_9(int int_0, int int_1) { return Math.Min(int_0, int_1); } static bool smethod_10(Stream stream_0) { return stream_0.CanSeek; } static void smethod_11(Stream stream_0, long long_0) { stream_0.Position = long_0; } } } <file_sep>/Bgs.Protocol.Account.V1/GetGameSessionInfoRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GetGameSessionInfoRequest : IMessage<GetGameSessionInfoRequest>, IEquatable<GetGameSessionInfoRequest>, IDeepCloneable<GetGameSessionInfoRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GetGameSessionInfoRequest.__c __9 = new GetGameSessionInfoRequest.__c(); internal GetGameSessionInfoRequest cctor>b__24_0() { return new GetGameSessionInfoRequest(); } } private static readonly MessageParser<GetGameSessionInfoRequest> _parser = new MessageParser<GetGameSessionInfoRequest>(new Func<GetGameSessionInfoRequest>(GetGameSessionInfoRequest.__c.__9.<.cctor>b__24_0)); public const int EntityIdFieldNumber = 1; private EntityId entityId_; public static MessageParser<GetGameSessionInfoRequest> Parser { get { return GetGameSessionInfoRequest._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[19]; } } MessageDescriptor IMessage.Descriptor { get { return GetGameSessionInfoRequest.Descriptor; } } public EntityId EntityId { get { return this.entityId_; } set { this.entityId_ = value; } } public GetGameSessionInfoRequest() { } public GetGameSessionInfoRequest(GetGameSessionInfoRequest other) : this() { this.EntityId = ((other.entityId_ != null) ? other.EntityId.Clone() : null); } public GetGameSessionInfoRequest Clone() { return new GetGameSessionInfoRequest(this); } public override bool Equals(object other) { return this.Equals(other as GetGameSessionInfoRequest); } public bool Equals(GetGameSessionInfoRequest other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1738228360) % 7) { case 0: goto IL_3E; case 1: return false; case 3: return true; case 4: goto IL_7A; case 5: arg_48_0 = (GetGameSessionInfoRequest.smethod_0(this.EntityId, other.EntityId) ? -48275030 : -716682265); continue; case 6: return false; } break; } return true; IL_3E: arg_48_0 = -1758113270; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -1647240463 : -1468951569); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_69: uint arg_4D_0 = 1640396899u; while (true) { uint num2; switch ((num2 = (arg_4D_0 ^ 1723184338u)) % 4u) { case 0u: goto IL_69; case 1u: arg_4D_0 = (((this.entityId_ != null) ? 957455493u : 991493616u) ^ num2 * 4044129629u); continue; case 2u: num ^= GetGameSessionInfoRequest.smethod_1(this.EntityId); arg_4D_0 = (num2 * 2581413152u ^ 1842477565u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.entityId_ != null) { while (true) { IL_5B: uint arg_3F_0 = 1625297930u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 80942059u)) % 4u) { case 0u: output.WriteMessage(this.EntityId); arg_3F_0 = (num * 1469074688u ^ 3665809232u); continue; case 1u: output.WriteRawTag(10); arg_3F_0 = (num * 2387460534u ^ 2376816649u); continue; case 2u: goto IL_5B; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.entityId_ != null) { while (true) { IL_46: uint arg_2E_0 = 3383589631u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 3440446898u)) % 3u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.EntityId); arg_2E_0 = (num2 * 3041265804u ^ 548811897u); continue; case 2u: goto IL_46; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(GetGameSessionInfoRequest other) { if (other == null) { goto IL_3E; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 1766582783u)) % 7u) { case 0u: goto IL_B1; case 2u: this.entityId_ = new EntityId(); arg_7A_0 = (num * 2746760170u ^ 1424049834u); continue; case 3u: this.EntityId.MergeFrom(other.EntityId); arg_7A_0 = 1877422110u; continue; case 4u: goto IL_3E; case 5u: return; case 6u: arg_7A_0 = (((this.entityId_ == null) ? 3955450797u : 2312291524u) ^ num * 1046387919u); continue; } break; } return; IL_3E: arg_7A_0 = 1163709466u; goto IL_75; IL_B1: arg_7A_0 = ((other.entityId_ == null) ? 1877422110u : 1301536197u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) != 0u) ? 699207808u : 522258459u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 889944629u)) % 9u) { case 0u: arg_B3_0 = (num2 * 143334810u ^ 3815318663u); continue; case 2u: arg_B3_0 = ((this.entityId_ != null) ? 57160326u : 908967346u); continue; case 3u: this.entityId_ = new EntityId(); arg_B3_0 = (num2 * 2548808453u ^ 772190245u); continue; case 4u: arg_B3_0 = ((num != 10u) ? 1493312204u : 1088673756u); continue; case 5u: arg_B3_0 = 699207808u; continue; case 6u: goto IL_F3; case 7u: input.SkipLastField(); arg_B3_0 = (num2 * 1462329645u ^ 623563581u); continue; case 8u: input.ReadMessage(this.entityId_); arg_B3_0 = 2092430037u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Empty.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Empty : IMessage<Empty>, IEquatable<Empty>, IDeepCloneable<Empty>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Empty.__c __9 = new Empty.__c(); internal Empty cctor>b__19_0() { return new Empty(); } } private static readonly MessageParser<Empty> _parser = new MessageParser<Empty>(new Func<Empty>(Empty.__c.__9.<.cctor>b__19_0)); public static MessageParser<Empty> Parser { get { return Empty._parser; } } public static MessageDescriptor Descriptor { get { return EmptyReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Empty.Descriptor; } } public Empty() { } public Empty(Empty other) : this() { } public Empty Clone() { return new Empty(this); } public override bool Equals(object other) { return this.Equals(other as Empty); } public bool Equals(Empty other) { return other != null; } public override int GetHashCode() { return 1; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { } public int CalculateSize() { return 0; } public void MergeFrom(Empty other) { } public void MergeFrom(CodedInputStream input) { while (true) { IL_4D: int arg_27_0 = (input.ReadTag() == 0u) ? 1997961641 : 747400071; while (true) { switch ((arg_27_0 ^ 2063866528) % 4) { case 0: goto IL_4D; case 2: arg_27_0 = 747400071; continue; case 3: input.SkipLastField(); arg_27_0 = 1511674276; continue; } return; } } } } } <file_sep>/Google.Protobuf.WellKnownTypes/ApiReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public static class ApiReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return ApiReflection.descriptor; } } static ApiReflection() { ApiReflection.descriptor = FileDescriptor.FromGeneratedCode(ApiReflection.smethod_1(ApiReflection.smethod_0(new string[] { Module.smethod_33<string>(2378405414u), Module.smethod_34<string>(4020298166u), Module.smethod_35<string>(2646630565u), Module.smethod_37<string>(2303897577u), Module.smethod_36<string>(1377392397u), Module.smethod_36<string>(4109486173u), Module.smethod_34<string>(2895458822u), Module.smethod_34<string>(1770619478u), Module.smethod_34<string>(2145565926u), Module.smethod_35<string>(2338951253u), Module.smethod_34<string>(1395673030u), Module.smethod_37<string>(1807175017u), Module.smethod_34<string>(645780134u), Module.smethod_34<string>(3815908086u), Module.smethod_35<string>(3346313829u), Module.smethod_36<string>(1747566589u) })), new FileDescriptor[] { SourceContextReflection.Descriptor, TypeReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(ApiReflection.smethod_2(typeof(Api).TypeHandle), Api.Parser, new string[] { Module.smethod_33<string>(1982348402u), Module.smethod_33<string>(3119285818u), Module.smethod_35<string>(1556926582u), Module.smethod_33<string>(3069454152u), Module.smethod_37<string>(3501849512u), Module.smethod_35<string>(310549753u), Module.smethod_35<string>(1485711652u) }, null, null, null), new GeneratedCodeInfo(ApiReflection.smethod_2(typeof(Method).TypeHandle), Method.Parser, new string[] { Module.smethod_37<string>(2134609685u), Module.smethod_33<string>(345423352u), Module.smethod_37<string>(3151249560u), Module.smethod_34<string>(2222385682u), Module.smethod_34<string>(1406419541u), Module.smethod_36<string>(1842157958u), Module.smethod_34<string>(430643543u) }, null, null, null), new GeneratedCodeInfo(ApiReflection.smethod_2(typeof(Mixin).TypeHandle), Mixin.Parser, new string[] { Module.smethod_33<string>(1982348402u), Module.smethod_33<string>(837628573u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static System.Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return System.Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Bgs.Protocol.GameUtilities.V1/ServerResponse.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.GameUtilities.V1 { [DebuggerNonUserCode] public sealed class ServerResponse : IMessage<ServerResponse>, IEquatable<ServerResponse>, IDeepCloneable<ServerResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ServerResponse.__c __9 = new ServerResponse.__c(); internal ServerResponse cctor>b__24_0() { return new ServerResponse(); } } private static readonly MessageParser<ServerResponse> _parser = new MessageParser<ServerResponse>(new Func<ServerResponse>(ServerResponse.__c.__9.<.cctor>b__24_0)); public const int AttributeFieldNumber = 1; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec; private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public static MessageParser<ServerResponse> Parser { get { return ServerResponse._parser; } } public static MessageDescriptor Descriptor { get { return GameUtilitiesServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return ServerResponse.Descriptor; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public ServerResponse() { } public ServerResponse(ServerResponse other) : this() { this.attribute_ = other.attribute_.Clone(); } public ServerResponse Clone() { return new ServerResponse(this); } public override bool Equals(object other) { return this.Equals(other as ServerResponse); } public bool Equals(ServerResponse other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -136253788) % 7) { case 0: goto IL_7A; case 1: return false; case 3: return true; case 4: arg_48_0 = ((!this.attribute_.Equals(other.attribute_)) ? -1337136749 : -1814785561); continue; case 5: return false; case 6: goto IL_12; } break; } return true; IL_12: arg_48_0 = -900986934; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -2066298524 : -354686245); goto IL_43; } public override int GetHashCode() { return 1 ^ ServerResponse.smethod_0(this.attribute_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attribute_.WriteTo(output, ServerResponse._repeated_attribute_codec); } public int CalculateSize() { return 0 + this.attribute_.CalculateSize(ServerResponse._repeated_attribute_codec); } public void MergeFrom(ServerResponse other) { if (other != null) { goto IL_27; } IL_03: int arg_0D_0 = 1519033767; IL_08: switch ((arg_0D_0 ^ 732749010) % 4) { case 0: goto IL_03; case 1: return; case 2: IL_27: this.attribute_.Add(other.attribute_); arg_0D_0 = 164220689; goto IL_08; } } public void MergeFrom(CodedInputStream input) { while (true) { IL_AE: uint num; uint arg_77_0 = ((num = input.ReadTag()) != 0u) ? 1237913662u : 716902232u; while (true) { uint num2; switch ((num2 = (arg_77_0 ^ 1596697169u)) % 7u) { case 0u: arg_77_0 = 1237913662u; continue; case 1u: input.SkipLastField(); arg_77_0 = (num2 * 1275023330u ^ 2714899253u); continue; case 2u: goto IL_AE; case 4u: arg_77_0 = (num2 * 1086105345u ^ 2668523276u); continue; case 5u: this.attribute_.AddEntriesFrom(input, ServerResponse._repeated_attribute_codec); arg_77_0 = 283710852u; continue; case 6u: arg_77_0 = ((num != 10u) ? 93399303u : 1194845891u); continue; } return; } } } static ServerResponse() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_57: uint arg_3F_0 = 2611793139u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 3522437237u)) % 3u) { case 0u: goto IL_57; case 1u: ServerResponse._repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(10u, Bgs.Protocol.Attribute.Parser); arg_3F_0 = (num * 2704498165u ^ 928992842u); continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol/AttributeTypesReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol { [DebuggerNonUserCode] public static class AttributeTypesReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return AttributeTypesReflection.descriptor; } } static AttributeTypesReflection() { AttributeTypesReflection.descriptor = FileDescriptor.FromGeneratedCode(AttributeTypesReflection.smethod_1(AttributeTypesReflection.smethod_0(new string[] { Module.smethod_34<string>(3133832196u), Module.smethod_37<string>(3946141007u), Module.smethod_33<string>(332921216u), Module.smethod_36<string>(3361351403u), Module.smethod_37<string>(498496223u), Module.smethod_36<string>(4148657931u), Module.smethod_34<string>(884153508u), Module.smethod_33<string>(435014224u), Module.smethod_36<string>(2897260923u), Module.smethod_33<string>(3509102000u), Module.smethod_33<string>(2588852736u), Module.smethod_37<string>(3302824303u), Module.smethod_35<string>(1180582211u), Module.smethod_34<string>(34147284u), Module.smethod_34<string>(3204275236u) })), new FileDescriptor[] { EntityTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(AttributeTypesReflection.smethod_2(typeof(Variant).TypeHandle), Variant.Parser, new string[] { Module.smethod_37<string>(2367881274u), Module.smethod_36<string>(1655698122u), Module.smethod_36<string>(20482057u), Module.smethod_36<string>(82457806u), Module.smethod_37<string>(673265721u), Module.smethod_36<string>(4118622721u), Module.smethod_35<string>(802821245u), Module.smethod_34<string>(1572342954u), Module.smethod_34<string>(353766998u) }, null, null, null), new GeneratedCodeInfo(AttributeTypesReflection.smethod_2(typeof(Attribute).TypeHandle), Attribute.Parser, new string[] { Module.smethod_34<string>(2643656114u), Module.smethod_35<string>(1515047581u) }, null, null, null), new GeneratedCodeInfo(AttributeTypesReflection.smethod_2(typeof(AttributeFilter).TypeHandle), AttributeFilter.Parser, new string[] { Module.smethod_33<string>(3118989787u), Module.smethod_36<string>(3548343828u) }, null, new Type[] { AttributeTypesReflection.smethod_2(typeof(AttributeFilter.Types.Operation).TypeHandle) }, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/AuthServer.WorldServer.Game.Packets.PacketHandler/ItemHandler.cs using AuthServer.Game.Entities; using AuthServer.Game.Packets.PacketHandler; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Constants.Net; using Framework.Misc; using Framework.Network.Packets; using Framework.ObjectDefines; using Framework.Serialization; using System; using System.Collections.Generic; using System.IO; namespace AuthServer.WorldServer.Game.Packets.PacketHandler { public class ItemHandler { [Opcode2(ClientMessage.UnEquipItem, "18125")] public static void HandleUnEquipItem(ref PacketReader packet, WorldClass2 session) { packet.Skip(5); byte b = packet.Read<byte>(); byte b2; while (true) { IL_303: uint arg_2B5_0 = 1819372127u; while (true) { uint num; switch ((num = (arg_2B5_0 ^ 1136699870u)) % 16u) { case 0u: { session.Character.SetUpdateField<ushort>(1035 + (int)(b2 * 2) + 1, 0, 0); session.Character.SetUpdateField<ushort>(1035 + (int)(b2 * 2) + 1, 0, 1); WorldClass session2; ObjectHandler.HandleUpdateObjectValues(ref session2, false); ObjectHandler.HandleUpdateObjectValues(ref session2, true); arg_2B5_0 = (num * 3374913412u ^ 2282626695u); continue; } case 1u: b2 = packet.Read<byte>(); arg_2B5_0 = (num * 1902157130u ^ 174221922u); continue; case 2u: session.Character.Bag.Remove(b); arg_2B5_0 = (num * 4091420843u ^ 2617997471u); continue; case 3u: { WorldClass session2; ObjectHandler.HandleUpdateObjectValues(ref session2, false); session.Character.SetUpdateField<int>(1035 + (int)(b2 * 2), 0, 0); arg_2B5_0 = (num * 3351533450u ^ 858014557u); continue; } case 4u: { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_2B5_0 = (num * 3970539045u ^ 265521657u); continue; } case 5u: session.Character.SetUpdateField<ulong>(1085 + (int)(b2 * 4), 0uL, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(b2 * 4) + 2, 0uL, 0); arg_2B5_0 = (num * 4224354357u ^ 2053361779u); continue; case 6u: arg_2B5_0 = (((!session.Character.Equipment.ContainsKey(b2)) ? 1606302786u : 36007046u) ^ num * 2311842534u); continue; case 7u: { session.Character.Equipment.Remove(b2); Item item; session.Character.Bag.Add(b, item); SmartGuid smartGuid = new SmartGuid(item.Guid, 0, GuidType.Item, 0uL); arg_2B5_0 = 523317569u; continue; } case 8u: goto IL_30A; case 9u: { WorldClass session2; session2.Character = session.Character; arg_2B5_0 = (num * 1020405840u ^ 1878556788u); continue; } case 11u: arg_2B5_0 = (session.Character.Bag.ContainsKey(b) ? 1868005100u : 1269139193u); continue; case 12u: { Item item = session.Character.Equipment[b2]; arg_2B5_0 = (num * 125860851u ^ 2899062321u); continue; } case 13u: session.Character.SetUpdateField<ushort>(1035 + (int)(b2 * 2) + 1, 0, 0); arg_2B5_0 = (num * 1261327750u ^ 544625808u); continue; case 14u: goto IL_303; case 15u: { SmartGuid smartGuid; session.Character.SetUpdateField<ulong>(1085 + (int)(b * 4), smartGuid.Guid, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(b * 4) + 2, smartGuid.HighGuid, 0); arg_2B5_0 = (num * 4049090278u ^ 4148349777u); continue; } } goto Block_3; } } Block_3: return; IL_30A: ItemHandler.AddItem(session, b2); } [Opcode2(ClientMessage.EquipItem, "18125")] public static void HandleEquipItem(ref PacketReader packet, WorldClass2 session) { packet.Skip(4); byte bagSlot = packet.Read<byte>(); while (true) { IL_43: uint arg_2B_0 = 2890883479u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 3187418839u)) % 3u) { case 1u: ItemHandler.AddItem(session, bagSlot); arg_2B_0 = (num * 4216493879u ^ 2545498223u); continue; case 2u: goto IL_43; } return; } } } private static void AddItem(WorldClass2 session, byte bagSlot) { WorldClass session2 = Manager.WorldMgr.GetSession(session.Character.Guid); byte equipSlot; Item item2; SmartGuid smartGuid; while (true) { IL_14F: uint arg_122_0 = 3901046590u; while (true) { uint num; switch ((num = (arg_122_0 ^ 2735090873u)) % 8u) { case 0u: goto IL_14F; case 1u: session.Character.Bag.Remove(bagSlot); arg_122_0 = (num * 413465045u ^ 3934698462u); continue; case 3u: { Item item; equipSlot = ItemHandler.GetEquipSlot(item.InventoryType); if (!session.Character.Equipment.ContainsKey(equipSlot)) { arg_122_0 = (num * 88286537u ^ 102903164u); continue; } goto IL_928; } case 4u: smartGuid = new SmartGuid(item2.Guid, 0, GuidType.Item, 0uL); arg_122_0 = (num * 3934272609u ^ 2187647340u); continue; case 5u: item2 = session.Character.Bag[bagSlot]; arg_122_0 = (num * 2864327870u ^ 3823397051u); continue; case 6u: { Item item; session.Character.Equipment.Add(equipSlot, item); if (session.Character.Bag.ContainsKey(bagSlot)) { arg_122_0 = (num * 2375106689u ^ 756885426u); continue; } goto IL_912; } case 7u: { Item item; if (session.Character.Bag.TryGetValue(bagSlot, out item)) { arg_122_0 = (num * 2306049815u ^ 322888747u); continue; } goto IL_B4B; } } goto Block_4; } } uint arg_A6D_0; int index; Dictionary<byte, Item> dictionary; while (true) { IL_A68: uint num; switch ((num = (arg_A6D_0 ^ 2735090873u)) % 52u) { case 0u: { Item item3; session.Character.SetUpdateField<ushort>(1035 + (int)(equipSlot * 2) + 1, (ushort)item3.ModId, 0); arg_A6D_0 = (num * 2688365806u ^ 3665580916u); continue; } case 2u: session.Character.SetUpdateField<ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 1); arg_A6D_0 = (num * 397079707u ^ 2550042554u); continue; case 3u: { byte b; arg_A6D_0 = (((int)b < session.Character.Bag.Count) ? 3012765023u : 3532292612u); continue; } case 4u: { Item item4 = session.Character.Equipment[equipSlot]; arg_A6D_0 = (num * 625219965u ^ 158864307u); continue; } case 5u: { int num2; arg_A6D_0 = ((num2 >= 16) ? 3752629640u : 3003850106u); continue; } case 6u: { int num2 = 0; arg_A6D_0 = (num * 2687791784u ^ 2016439126u); continue; } case 7u: { int num3; index = num3; arg_A6D_0 = (num * 971334227u ^ 618718611u); continue; } case 8u: { byte b; b += 1; arg_A6D_0 = (num * 1052352431u ^ 2217463802u); continue; } case 9u: goto IL_928; case 10u: goto IL_912; case 11u: { int num2; session.Character.SetUpdateField<ulong>(1085 + (23 + num2) * 4 + 2, 0uL, 0); arg_A6D_0 = (num * 3990101372u ^ 1156157827u); continue; } case 12u: session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4), 0uL, 0); arg_A6D_0 = (num * 2450056873u ^ 1905378433u); continue; case 13u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_A6D_0 = (num * 2846314608u ^ 3060895351u); continue; case 14u: session.Character.SetUpdateField<ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 0); arg_A6D_0 = (num * 3375404461u ^ 3611762605u); continue; case 15u: { int num2; session.Character.SetUpdateField<ulong>(1085 + (23 + num2) * 4, 0uL, 0); arg_A6D_0 = 3244715514u; continue; } case 16u: session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4) + 2, 0uL, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4), smartGuid.Guid, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4) + 2, smartGuid.HighGuid, 0); ObjectHandler.HandleUpdateObjectValues(ref session2, false); session.Character.SetUpdateField<int>(1035 + (int)(equipSlot * 2), 0, 0); arg_A6D_0 = (num * 1510252851u ^ 1999990189u); continue; case 17u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_A6D_0 = (num * 1475435762u ^ 2350161561u); continue; case 18u: { int num2; num2++; arg_A6D_0 = (num * 312829336u ^ 108542544u); continue; } case 19u: { Item item3; session.Character.Equipment.Add(equipSlot, item3); Item item4; session.Character.Bag.Add(bagSlot, item4); arg_A6D_0 = (num * 2281705214u ^ 4242836535u); continue; } case 20u: session.Character.SetUpdateField<int>(1035 + (int)(equipSlot * 2), item2.Id, 0); arg_A6D_0 = (num * 1960862831u ^ 2754346203u); continue; case 21u: { byte b = 0; arg_A6D_0 = (num * 269226237u ^ 265745344u); continue; } case 22u: { int num3 = 0; arg_A6D_0 = (num * 888651060u ^ 1045458128u); continue; } case 23u: arg_A6D_0 = (num * 3169614868u ^ 1615237482u); continue; case 24u: arg_A6D_0 = (num * 1798968942u ^ 2783094218u); continue; case 25u: session.Character.Equipment.Remove(equipSlot); arg_A6D_0 = (num * 2316556123u ^ 1531280410u); continue; case 26u: { Item item3 = session.Character.Bag[bagSlot]; Item item4; SmartGuid smartGuid2 = new SmartGuid(item4.Guid, 0, GuidType.Item, 0uL); SmartGuid smartGuid3 = new SmartGuid(item3.Guid, 0, GuidType.Item, 0uL); arg_A6D_0 = (num * 2984176438u ^ 4129044090u); continue; } case 27u: { byte b; SmartGuid smartGuid4; session.Character.SetUpdateField<ulong>(1085 + (int)((23 + b) * 4) + 2, smartGuid4.HighGuid, 0); arg_A6D_0 = (num * 2890893173u ^ 349214354u); continue; } case 28u: { SmartGuid smartGuid2; session.Character.SetUpdateField<ulong>(1085 + (int)(bagSlot * 4), smartGuid2.Guid, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(bagSlot * 4) + 2, smartGuid2.HighGuid, 0); arg_A6D_0 = (num * 737849647u ^ 1775535865u); continue; } case 29u: { int num3; arg_A6D_0 = ((num3 < Manager.WorldMgr.CharaterList.Count) ? 4017585302u : 2853305574u); continue; } case 30u: goto IL_588; case 31u: { int num3; num3++; arg_A6D_0 = 4264159176u; continue; } case 32u: arg_A6D_0 = ((session.Character.Equipment.ContainsKey(equipSlot) ? 3897993171u : 4023075236u) ^ num * 3842347572u); continue; case 33u: goto IL_B4B; case 34u: session.Character.SetUpdateField<ushort>(1035 + (int)(equipSlot * 2) + 1, (ushort)item2.ModId, 0); arg_A6D_0 = (num * 2822665324u ^ 3380783635u); continue; case 35u: arg_A6D_0 = (num * 3349837127u ^ 2233701625u); continue; case 36u: { session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4) + 2, 0uL, 0); SmartGuid smartGuid3; session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4), smartGuid3.Guid, 0); arg_A6D_0 = (num * 927448395u ^ 866192737u); continue; } case 37u: session.Character.SetUpdateField<ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 0); arg_A6D_0 = (num * 1706796764u ^ 3182899609u); continue; case 38u: { Item item3; session.Character.SetUpdateField<int>(1035 + (int)(equipSlot * 2), item3.Id, 0); arg_A6D_0 = (num * 42299747u ^ 2380411742u); continue; } case 39u: arg_A6D_0 = (num * 1318585816u ^ 3647086635u); continue; case 40u: session.Character.Bag = dictionary; arg_A6D_0 = (num * 2027637424u ^ 1585480347u); continue; case 41u: arg_A6D_0 = (((!session.Character.Bag.ContainsKey(bagSlot)) ? 1338625282u : 395459323u) ^ num * 783094712u); continue; case 42u: session.Character.SetUpdateField<int>(1035 + (int)(equipSlot * 2), 0, 0); arg_A6D_0 = (num * 1468912291u ^ 969255781u); continue; case 43u: Manager.WorldMgr.CharaterList[index] = session.Character; arg_A6D_0 = 2195683288u; continue; case 44u: { byte b; SmartGuid smartGuid4; session.Character.SetUpdateField<ulong>(1085 + (int)((23 + b) * 4), smartGuid4.Guid, 0); arg_A6D_0 = (num * 1452020312u ^ 1516754462u); continue; } case 45u: session.Character.SetUpdateField<ushort>(1035 + (int)(equipSlot * 2) + 1, 0, 1); arg_A6D_0 = (num * 4099664907u ^ 2811872651u); continue; case 46u: { byte b; SmartGuid smartGuid4 = new SmartGuid(session.Character.Bag[23 + b].Guid, 0, GuidType.Item, 0uL); arg_A6D_0 = 3795433309u; continue; } case 47u: session.Character.Bag.Remove(bagSlot); arg_A6D_0 = (num * 75564486u ^ 2509859790u); continue; case 48u: { SmartGuid smartGuid3; session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4) + 2, smartGuid3.HighGuid, 0); arg_A6D_0 = (num * 2532079306u ^ 2782626003u); continue; } case 49u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); ObjectHandler.HandleUpdateObjectValues(ref session2, true); arg_A6D_0 = (num * 617855158u ^ 1998553940u); continue; case 50u: session.Character.SetUpdateField<ulong>(1085 + (int)(equipSlot * 4), 0uL, 0); arg_A6D_0 = (num * 2240052089u ^ 4263156475u); continue; case 51u: { int num3; arg_A6D_0 = ((Manager.WorldMgr.CharaterList[num3].Guid != session.Character.Guid) ? 3122669558u : 3428108934u); continue; } } break; } ItemHandler.smethod_1(ItemHandler.smethod_0(Helper.DataDirectory(), Module.smethod_34<string>(1144845388u)), Json.CreateString<List<Character>>(Manager.WorldMgr.CharaterList)); return; Block_4: dictionary = new Dictionary<byte, Item>(); using (Dictionary<byte, Item>.Enumerator enumerator = session.Character.Bag.GetEnumerator()) { while (true) { IL_1ED: int arg_1C4_0 = enumerator.MoveNext() ? -232738112 : -1969773645; while (true) { switch ((arg_1C4_0 ^ -1559876423) % 4) { case 0: arg_1C4_0 = -232738112; continue; case 1: { KeyValuePair<byte, Item> current = enumerator.Current; dictionary.Add((current.Key > bagSlot) ? (current.Key - 1) : current.Key, current.Value); arg_1C4_0 = -1601354682; continue; } case 3: goto IL_1ED; } goto Block_16; } } Block_16:; } session.Character.Bag.Clear(); IL_588: arg_A6D_0 = 2199478937u; goto IL_A68; IL_912: session2.Character = session.Character; arg_A6D_0 = 3632523060u; goto IL_A68; IL_928: arg_A6D_0 = (session.Character.Equipment.ContainsKey(equipSlot) ? 2517109469u : 3799877539u); goto IL_A68; IL_B4B: index = 0; arg_A6D_0 = 3332340327u; goto IL_A68; } [Opcode2(ClientMessage.DestroyItem, "18125")] public static void HandleDestroyItem(ref PacketReader packet, WorldClass2 session) { packet.Read<uint>(); byte b; Dictionary<byte, Item> dictionary; WorldClass session2; while (true) { IL_E1: uint arg_B8_0 = 1479706634u; while (true) { uint num; switch ((num = (arg_B8_0 ^ 940884380u)) % 7u) { case 0u: goto IL_E1; case 1u: session.Character.Bag.Remove(b); arg_B8_0 = (num * 3750115250u ^ 704789659u); continue; case 2u: if (b >= 23) { arg_B8_0 = (num * 10468204u ^ 43277318u); continue; } goto IL_439; case 3u: { Item arg_6A_0 = session.Character.Bag[b]; arg_B8_0 = (num * 4157225570u ^ 1490106046u); continue; } case 4u: dictionary = new Dictionary<byte, Item>(); arg_B8_0 = (num * 2455461421u ^ 1748343064u); continue; case 5u: packet.Read<byte>(); b = packet.Read<byte>(); session2 = Manager.WorldMgr.GetSession(session.Character.Guid); arg_B8_0 = (num * 1883076200u ^ 3879309864u); continue; } goto Block_2; } } uint arg_63A_0; Item item; while (true) { IL_635: uint num; switch ((num = (arg_63A_0 ^ 940884380u)) % 30u) { case 0u: session.Character.SetUpdateField<int>(1035 + (int)(b * 2), 0, 0); session.Character.SetUpdateField<ushort>(1035 + (int)(b * 2) + 1, 0, 0); session.Character.SetUpdateField<ushort>(1035 + (int)(b * 2) + 1, 0, 0); session.Character.SetUpdateField<ushort>(1035 + (int)(b * 2) + 1, 0, 1); arg_63A_0 = (num * 2347620057u ^ 297415167u); continue; case 1u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); BitPack arg_5AD_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(1u); Character character; packetWriter.WriteUInt16((ushort)character.Map); arg_5AD_0.Write<bool>(true); arg_5AD_0.Flush(); arg_63A_0 = (num * 364780618u ^ 4039577125u); continue; } case 2u: { byte b2; arg_63A_0 = (((int)b2 < session.Character.Bag.Count) ? 1177635618u : 1980991802u); continue; } case 3u: { PacketWriter packetWriter; packetWriter.WriteInt32(0); arg_63A_0 = (num * 1863506504u ^ 2872540547u); continue; } case 4u: session2.Character = session.Character; arg_63A_0 = 2092284884u; continue; case 5u: { PacketWriter packetWriter; SmartGuid guid; packetWriter.WriteSmartGuid(guid); session.Send(ref packetWriter); arg_63A_0 = (num * 1992055980u ^ 2561592906u); continue; } case 6u: arg_63A_0 = (num * 2481838976u ^ 2085966606u); continue; case 7u: { byte b2; b2 += 1; arg_63A_0 = (num * 581392080u ^ 1120063516u); continue; } case 8u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_63A_0 = (num * 3730459737u ^ 4119815487u); continue; case 9u: arg_63A_0 = (num * 4013260396u ^ 3339049186u); continue; case 10u: { int num2 = 0; arg_63A_0 = (num * 170813716u ^ 815519874u); continue; } case 11u: goto IL_439; case 12u: { byte b2; SmartGuid smartGuid; session.Character.SetUpdateField<ulong>(1085 + (int)((23 + b2) * 4) + 2, smartGuid.HighGuid, 0); arg_63A_0 = (num * 599351454u ^ 1201031827u); continue; } case 13u: ObjectHandler.HandleUpdateObjectValues(ref session2, false); arg_63A_0 = (num * 1722599098u ^ 78266358u); continue; case 14u: { int num3 = 0; arg_63A_0 = (num * 2079855051u ^ 1201392757u); continue; } case 15u: { byte b2; SmartGuid smartGuid; session.Character.SetUpdateField<ulong>(1085 + (int)((23 + b2) * 4), smartGuid.Guid, 0); arg_63A_0 = (num * 1686053465u ^ 2337712971u); continue; } case 16u: { Character character = session.Character; arg_63A_0 = (num * 2024021156u ^ 3868436006u); continue; } case 17u: session.Character.Bag = dictionary; arg_63A_0 = (num * 2306417256u ^ 1137006036u); continue; case 19u: { PacketWriter packetWriter; Character character; packetWriter.WriteUInt16((ushort)character.Map); int num3; packetWriter.WriteUInt32((uint)num3); SmartGuid guid = new SmartGuid(item.Guid, 0, GuidType.Item, 0uL); arg_63A_0 = (num * 3758715600u ^ 4001188091u); continue; } case 20u: session.Character.SetUpdateField<ulong>(1085 + (int)(b * 4), 0uL, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(b * 4) + 2, 0uL, 0); arg_63A_0 = (num * 4263489551u ^ 4220117414u); continue; case 21u: { int num3; arg_63A_0 = (((num3 > 0) ? 897509384u : 511989551u) ^ num * 999052215u); continue; } case 22u: { int num2; arg_63A_0 = ((num2 >= 16) ? 906854550u : 933086591u); continue; } case 23u: { int num2; session.Character.SetUpdateField<ulong>(1085 + (23 + num2) * 4, 0uL, 0); arg_63A_0 = 869087837u; continue; } case 24u: { byte b2 = 0; arg_63A_0 = (num * 877610943u ^ 4050923773u); continue; } case 25u: { int num2; num2++; arg_63A_0 = (num * 3409590307u ^ 4053566833u); continue; } case 26u: { byte b2; SmartGuid smartGuid = new SmartGuid(session.Character.Bag[23 + b2].Guid, 0, GuidType.Item, 0uL); arg_63A_0 = 684885291u; continue; } case 27u: { int num2; session.Character.SetUpdateField<ulong>(1085 + (23 + num2) * 4 + 2, 0uL, 0); arg_63A_0 = (num * 2108742514u ^ 956540315u); continue; } case 28u: goto IL_6C0; case 29u: arg_63A_0 = (num * 66432867u ^ 1045735881u); continue; } break; } return; Block_2: using (Dictionary<byte, Item>.Enumerator enumerator = session.Character.Bag.GetEnumerator()) { while (true) { IL_176: int arg_14D_0 = (!enumerator.MoveNext()) ? 177736481 : 1734923895; while (true) { switch ((arg_14D_0 ^ 940884380) % 4) { case 0: arg_14D_0 = 1734923895; continue; case 2: goto IL_176; case 3: { KeyValuePair<byte, Item> current = enumerator.Current; dictionary.Add((current.Key > b) ? (current.Key - 1) : current.Key, current.Value); arg_14D_0 = 1924910954; continue; } } goto Block_10; } } Block_10:; } session.Character.Bag.Clear(); goto IL_6C0; IL_439: item = session.Character.Equipment[b]; session.Character.Equipment.Remove(b); arg_63A_0 = 875231736u; goto IL_635; IL_6C0: arg_63A_0 = 1448980257u; goto IL_635; } public static byte GetEquipSlot(byte equipSlot) { uint arg_5B_0; switch (equipSlot) { case 11: IL_13B: equipSlot = 10; arg_5B_0 = 3909118595u; break; case 12: IL_1D8: equipSlot = 12; arg_5B_0 = 2734251434u; break; case 13: IL_1E6: equipSlot = 15; arg_5B_0 = 2734251434u; break; case 14: IL_149: equipSlot = 16; arg_5B_0 = 2555984845u; break; case 15: IL_198: equipSlot = 15; arg_5B_0 = 4106678855u; break; case 16: IL_1B8: equipSlot = 14; arg_5B_0 = 3064797242u; break; case 17: IL_202: equipSlot = 15; arg_5B_0 = 2734251434u; break; case 18: return 18; case 19: IL_109: equipSlot = 18; arg_5B_0 = 3529446854u; break; case 20: IL_18B: equipSlot = 4; arg_5B_0 = 4115910047u; break; case 21: IL_1F4: equipSlot = 15; arg_5B_0 = 2734251434u; break; case 22: case 23: IL_210: equipSlot = 16; arg_5B_0 = 2165381071u; break; case 24: return 24; case 25: case 26: case 27: case 28: IL_21E: equipSlot = 15; arg_5B_0 = 2264719853u; break; default: IL_51: arg_5B_0 = 2612180903u; break; } while (true) { uint num; switch ((num = (arg_5B_0 ^ 3438758084u)) % 26u) { case 0u: goto IL_202; case 1u: goto IL_1F4; case 2u: goto IL_1E6; case 3u: goto IL_1D8; case 4u: goto IL_210; case 5u: arg_5B_0 = (num * 666848517u ^ 3393978215u); continue; case 6u: goto IL_1B8; case 7u: return 24; case 8u: arg_5B_0 = (num * 1276685670u ^ 3974509926u); continue; case 9u: goto IL_198; case 10u: goto IL_18B; case 11u: arg_5B_0 = (num * 3754330600u ^ 2814399218u); continue; case 12u: equipSlot -= 1; arg_5B_0 = 2734251434u; continue; case 13u: goto IL_51; case 14u: arg_5B_0 = (num * 2535710746u ^ 4198311014u); continue; case 15u: goto IL_149; case 16u: goto IL_13B; case 17u: arg_5B_0 = (num * 1048723800u ^ 4201033698u); continue; case 18u: goto IL_21E; case 19u: arg_5B_0 = (num * 1924184679u ^ 4016858399u); continue; case 20u: goto IL_109; case 21u: arg_5B_0 = (num * 1804965198u ^ 420479472u); continue; case 23u: arg_5B_0 = (num * 496771006u ^ 3039250676u); continue; case 24u: return 18; case 25u: arg_5B_0 = (num * 3078994998u ^ 2299167308u); continue; } break; } return equipSlot; } public static void HandleItemPushResult(int itemId, ref WorldClass session) { PacketWriter packetWriter = new PacketWriter(ServerMessage.ItemPushResult, true); BitPack bitPack = new BitPack(packetWriter, session.Character.Guid, 0uL, 0uL, 0uL); bitPack.WriteGuidMask(new byte[] { 1 }); while (true) { IL_3EC: uint arg_377_0 = 909021692u; while (true) { uint num; switch ((num = (arg_377_0 ^ 935844983u)) % 26u) { case 0u: packetWriter.WriteInt32(0); bitPack.WriteGuidBytes(new byte[] { 0, 6 }); arg_377_0 = (num * 928309760u ^ 2986799762u); continue; case 1u: bitPack.Write<bool>(false); arg_377_0 = (num * 3938014638u ^ 1429137374u); continue; case 2u: bitPack.WriteGuidMask(new byte[] { 5 }); arg_377_0 = (num * 1720432155u ^ 3025882064u); continue; case 3u: session.Send(ref packetWriter); arg_377_0 = (num * 3073065698u ^ 2572400910u); continue; case 4u: bitPack.Write<bool>(false); bitPack.Write<bool>(false); arg_377_0 = (num * 3496805978u ^ 1994654579u); continue; case 5u: packetWriter.WriteInt32(itemId); arg_377_0 = (num * 3055987258u ^ 3242072529u); continue; case 6u: goto IL_3EC; case 7u: bitPack.Write<bool>(false); arg_377_0 = (num * 2896448710u ^ 3382928632u); continue; case 8u: bitPack.WriteGuidBytes(new byte[] { 5, 7 }); arg_377_0 = (num * 2018327844u ^ 4127578553u); continue; case 9u: bitPack.WriteGuidBytes(new byte[] { 1 }); arg_377_0 = (num * 2939031280u ^ 1844060896u); continue; case 10u: bitPack.Write<bool>(false); bitPack.Write<bool>(false); bitPack.WriteGuidMask(new byte[] { 3 }); arg_377_0 = (num * 4174044662u ^ 1408249211u); continue; case 11u: bitPack.Write<bool>(false); arg_377_0 = (num * 2759647948u ^ 645900932u); continue; case 12u: bitPack.Write<bool>(false); arg_377_0 = (num * 1692886088u ^ 1243261087u); continue; case 14u: bitPack.Write<bool>(true); arg_377_0 = (num * 3998004725u ^ 1832986328u); continue; case 15u: packetWriter.WriteUInt8(1); arg_377_0 = (num * 1248761089u ^ 2873989142u); continue; case 16u: packetWriter.WriteInt32(1); arg_377_0 = (num * 2808146406u ^ 2093798743u); continue; case 17u: bitPack.Write<bool>(false); bitPack.WriteGuidMask(new byte[] { 4 }); arg_377_0 = (num * 73540350u ^ 2658189703u); continue; case 18u: packetWriter.WriteInt32(0); packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(0u); bitPack.WriteGuidBytes(new byte[] { 2 }); arg_377_0 = (num * 3281236275u ^ 2278699308u); continue; case 19u: bitPack.WriteGuidBytes(new byte[] { 4, 3 }); arg_377_0 = (num * 3370243852u ^ 2197024189u); continue; case 20u: packetWriter.WriteInt32(0); packetWriter.WriteInt32(0); arg_377_0 = (num * 3926998091u ^ 214892544u); continue; case 21u: bitPack.Write<bool>(false); arg_377_0 = (num * 2485854747u ^ 992343886u); continue; case 22u: bitPack.WriteGuidMask(new byte[1]); bitPack.Write<bool>(true); bitPack.Write<bool>(false); arg_377_0 = (num * 2532008586u ^ 2581047111u); continue; case 23u: bitPack.Write<bool>(true); bitPack.WriteGuidMask(new byte[] { 2, 6 }); bitPack.Write<bool>(true); bitPack.WriteGuidMask(new byte[] { 7 }); bitPack.Flush(); arg_377_0 = (num * 2517137752u ^ 2854991386u); continue; case 24u: bitPack.Write<bool>(false); bitPack.Write<bool>(false); arg_377_0 = (num * 3447671502u ^ 3800525856u); continue; case 25u: bitPack.Write<bool>(false); arg_377_0 = (num * 3805512309u ^ 3362271688u); continue; } return; } } } static string smethod_0(string string_0, string string_1) { return string_0 + string_1; } static void smethod_1(string string_0, string string_1) { File.WriteAllText(string_0, string_1); } } } <file_sep>/AuthServer.AuthServer.Packets.BnetHandlers/AccountService.cs using AuthServer.AuthServer.Attributes; using AuthServer.Network; using Bgs.Protocol.Account.V1; using Framework.Constants.Net; using System; namespace AuthServer.AuthServer.Packets.BnetHandlers { [BnetService(BnetServiceHash.AccountService)] public class AccountService : BnetServiceBase { [BnetServiceBase.BnetMethodAttribute(30u)] public static void HandleGetAccountStateRequest(AuthSession session, GetAccountStateRequest getAccountStateRequest) { GetAccountStateResponse getAccountStateResponse = new GetAccountStateResponse(); while (true) { IL_6C: uint arg_54_0 = 2075659893u; while (true) { uint num; switch ((num = (arg_54_0 ^ 1809695806u)) % 3u) { case 0u: goto IL_6C; case 1u: getAccountStateResponse.State = new AccountState { PrivacyInfo = new PrivacyInfo { IsHiddenFromFriendFinder = true, IsUsingRid = true } }; getAccountStateResponse.Tags = new AccountFieldTags { PrivacyInfoTag = 3620373325u }; arg_54_0 = (num * 1819771145u ^ 3782781945u); continue; } goto Block_1; } } Block_1: session.Send(getAccountStateResponse); } [BnetServiceBase.BnetMethodAttribute(31u)] public static void HandleGetGameAccountStateRequest(AuthSession session, GetGameAccountStateRequest getGameAccountStateRequest) { GetGameAccountStateResponse getGameAccountStateResponse = new GetGameAccountStateResponse(); while (true) { IL_B4: uint arg_98_0 = 2765505756u; while (true) { uint num; switch ((num = (arg_98_0 ^ 3049173021u)) % 4u) { case 0u: goto IL_B4; case 1u: getGameAccountStateResponse.State = new GameAccountState { GameLevelInfo = new GameLevelInfo { Program = 5730135u, Name = Module.smethod_35<string>(3787279757u) }, GameStatus = new GameStatus { Program = 5730135u } }; arg_98_0 = (num * 2239678423u ^ 1144755469u); continue; case 3u: getGameAccountStateResponse.State.GameLevelInfo.Licenses.Add(new AccountLicense { Id = 250u }); arg_98_0 = (num * 1730719577u ^ 2890598956u); continue; } goto Block_1; } } Block_1: getGameAccountStateResponse.Tags = new GameAccountFieldTags { GameLevelInfoTag = 4140539163u, GameStatusTag = 2562154393u }; session.Send(getGameAccountStateResponse); } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/ChatHandler.cs using AuthServer.Game.Entities; using AuthServer.Game.Chat; using AuthServer.Network; using AuthServer.WorldServer.Managers; using Framework.Constants; using Framework.Constants.Net; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.IO; namespace AuthServer.Game.Packets.PacketHandler { public class ChatHandler : Manager { [Opcode(ClientMessage.ChatMessageSay, "17930")] public static void HandleChatMessageSay(ref PacketReader packet, WorldClass session) { BitUnpack arg_0F_0 = new BitUnpack(packet); int num = packet.Read<int>(); int num2 = (int)arg_0F_0.GetBits<byte>(8) << 1; bool bit = arg_0F_0.GetBit(); ChatMessageValues chatMessageValues; while (true) { IL_10D: uint arg_E0_0 = 325641967u; while (true) { uint num3; switch ((num3 = (arg_E0_0 ^ 1114592966u)) % 8u) { case 0u: goto IL_10D; case 1u: { string text = packet.ReadString((uint)(bit ? ((byte)num2 + 1) : ((byte)num2))); arg_E0_0 = 1695780296u; continue; } case 2u: return; case 3u: { string text; arg_E0_0 = ((ChatCommandParser.CheckForCommand(text) ? 3993131816u : 2950447498u) ^ num3 * 3295186339u); continue; } case 4u: { string text; ChatCommandParser.ExecuteChatHandler2(text, Manager.WorldMgr.GetSession2(session.Character.Guid)); arg_E0_0 = (num3 * 451064634u ^ 332353724u); continue; } case 6u: { string text; chatMessageValues = new ChatMessageValues(MessageType.ChatMessageSay, text, true, true, session.Character.Name); chatMessageValues.Language = (byte)num; arg_E0_0 = (num3 * 3671775661u ^ 3376883115u); continue; } case 7u: { string text; ChatCommandParser.ExecuteChatHandler(text, session); arg_E0_0 = (num3 * 3654367289u ^ 3353498485u); continue; } } goto Block_3; } } Block_3: ChatHandler.SendMessage(ref session, chatMessageValues, null); } [Opcode(ClientMessage.ChatMessageYell, "17930")] public static void HandleChatMessageYell(ref PacketReader packet, WorldClass session) { new BitUnpack(packet); while (true) { IL_DF: uint arg_B2_0 = 1471274433u; while (true) { uint num; switch ((num = (arg_B2_0 ^ 1457246423u)) % 8u) { case 0u: goto IL_DF; case 1u: { byte count; string message = packet.ReadString((uint)count); arg_B2_0 = (num * 1956220272u ^ 333181946u); continue; } case 2u: { ChatMessageValues chatMessageValues; ChatHandler.SendMessage(ref session, chatMessageValues, null); arg_B2_0 = (num * 1360094918u ^ 3810658607u); continue; } case 3u: { ChatMessageValues chatMessageValues; int num2; chatMessageValues.Language = (byte)num2; arg_B2_0 = (num * 1375933563u ^ 3990099844u); continue; } case 5u: { string message; ChatMessageValues chatMessageValues = new ChatMessageValues(MessageType.ChatMessageYell, message, true, true, session.Character.Name); arg_B2_0 = (num * 1524374222u ^ 112341642u); continue; } case 6u: { int num2 = packet.Read<int>(); arg_B2_0 = (num * 3683192221u ^ 500492390u); continue; } case 7u: { byte count = ChatHandler.smethod_0(packet); arg_B2_0 = (num * 1784485323u ^ 3798317019u); continue; } } return; } } } [Opcode(ClientMessage.ChatMessageYell, "17930")] public static void HandleChatMessageWhisper(ref PacketReader packet, WorldClass session) { BitUnpack arg_0F_0 = new BitUnpack(packet); packet.Read<int>(); byte bits = arg_0F_0.GetBits<byte>(8); byte bits2 = arg_0F_0.GetBits<byte>(9); while (true) { IL_12D: uint arg_FB_0 = 508952321u; while (true) { uint num; switch ((num = (arg_FB_0 ^ 680197638u)) % 9u) { case 0u: goto IL_12D; case 2u: { string message; ChatMessageValues chatMessage = new ChatMessageValues(MessageType.ChatMessageWhisper, message, false, true, session.Character.Name); WorldClass session2; ChatHandler.SendMessage(ref session2, chatMessage, session); arg_FB_0 = (num * 176779959u ^ 339669786u); continue; } case 3u: return; case 4u: { string message; ChatMessageValues chatMessage = new ChatMessageValues(MessageType.ChatMessageWhisperInform, message, false, true, session.Character.Name); WorldClass session2; ChatHandler.SendMessage(ref session, chatMessage, session2); arg_FB_0 = 1982110815u; continue; } case 5u: { string name; WorldClass session2 = Manager.WorldMgr.GetSession(name); arg_FB_0 = (num * 827851986u ^ 138547638u); continue; } case 6u: { string name = packet.ReadString((uint)bits2); arg_FB_0 = (num * 3640695171u ^ 579213927u); continue; } case 7u: { string message = packet.ReadString((uint)bits); arg_FB_0 = (num * 3110842643u ^ 1736535012u); continue; } case 8u: { WorldClass session2; arg_FB_0 = (((session2 != null) ? 3244820180u : 2596212753u) ^ num * 1051122596u); continue; } } return; } } } public static void SendMessage(ref WorldClass session, ChatMessageValues chatMessage, WorldClass pSession = null) { Character character = session.Character; PacketWriter packetWriter; while (true) { IL_2C6: uint arg_280_0 = 3219657197u; while (true) { uint num; switch ((num = (arg_280_0 ^ 2724133076u)) % 14u) { case 0u: Manager.WorldMgr.SendByDist(character, packetWriter, 90000f); arg_280_0 = 3801484219u; continue; case 1u: goto IL_2CD; case 2u: packetWriter = new PacketWriter(ServerMessage.Chat, true); arg_280_0 = 3086779355u; continue; case 3u: { ulong guid = character.Guid; arg_280_0 = (num * 2535786402u ^ 3025165946u); continue; } case 4u: goto IL_2C6; case 5u: { BitPack arg_1D6_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt8((byte)chatMessage.ChatType); packetWriter.WriteUInt8(chatMessage.Language); if (chatMessage.ChatType != MessageType.ChatMessageRaidWarning && chatMessage.ChatType != MessageType.ChatMessageSystem) { ulong guid; packetWriter.WriteSmartGuid(guid, global::GuidType.Player); packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); packetWriter.WriteSmartGuid(guid, global::GuidType.Player); packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); } else { packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); } packetWriter.WriteUInt32(0u); packetWriter.WriteUInt32(0u); packetWriter.WriteSmartGuid(0uL, global::GuidType.Player); packetWriter.WriteUInt32(0u); packetWriter.WriteFloat(0f); arg_1D6_0.WriteStringLength(chatMessage.From, 11); arg_1D6_0.Write<int>(0, 11); arg_1D6_0.Write<int>(0, 5); arg_1D6_0.Write<int>(0, 7); arg_1D6_0.WriteStringLength(chatMessage.Message, 12); arg_1D6_0.Write<int>(0, 11); arg_1D6_0.Write<bool>(false); arg_1D6_0.Write<bool>(false); arg_1D6_0.Flush(); packetWriter.WriteString(chatMessage.From, false); arg_280_0 = 3261358435u; continue; } case 6u: arg_280_0 = (((pSession != null) ? 3836401640u : 3716149786u) ^ num * 3311463245u); continue; case 7u: return; case 9u: { MessageType chatType; arg_280_0 = (((chatType != MessageType.ChatMessageYell) ? 62246047u : 1826229881u) ^ num * 1877845205u); continue; } case 10u: { ulong guid = pSession.Character.Guid; arg_280_0 = (num * 35042165u ^ 1911025126u); continue; } case 11u: { MessageType chatType; arg_280_0 = (((chatType == MessageType.ChatMessageSay) ? 3596693928u : 2666586472u) ^ num * 3026481033u); continue; } case 12u: arg_280_0 = (num * 878843307u ^ 1944765790u); continue; case 13u: { packetWriter.WriteString(chatMessage.Message, false); MessageType chatType = chatMessage.ChatType; arg_280_0 = (num * 638995587u ^ 2704000042u); continue; } } goto Block_6; } } Block_6: goto IL_2E0; IL_2CD: Manager.WorldMgr.SendByDist(character, packetWriter, 625f); return; IL_2E0: session.Send(ref packetWriter); } static byte smethod_0(BinaryReader binaryReader_0) { return binaryReader_0.ReadByte(); } } } <file_sep>/AuthServer.Packets.Handlers/RealmHandler.cs using System; namespace AuthServer.Packets.Handlers { internal class RealmHandler { } } <file_sep>/Bgs.Protocol.Profanity.V1/WordFilter.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Profanity.V1 { [DebuggerNonUserCode] public sealed class WordFilter : IMessage<WordFilter>, IEquatable<WordFilter>, IDeepCloneable<WordFilter>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly WordFilter.__c __9 = new WordFilter.__c(); internal WordFilter cctor>b__29_0() { return new WordFilter(); } } private static readonly MessageParser<WordFilter> _parser = new MessageParser<WordFilter>(new Func<WordFilter>(WordFilter.__c.__9.<.cctor>b__29_0)); public const int TypeFieldNumber = 1; private string type_ = ""; public const int RegexFieldNumber = 2; private string regex_ = ""; public static MessageParser<WordFilter> Parser { get { return WordFilter._parser; } } public static MessageDescriptor Descriptor { get { return ProfanityFilterConfigReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return WordFilter.Descriptor; } } public string Type { get { return this.type_; } set { this.type_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public string Regex { get { return this.regex_; } set { this.regex_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public WordFilter() { } public WordFilter(WordFilter other) : this() { this.type_ = other.type_; this.regex_ = other.regex_; } public WordFilter Clone() { return new WordFilter(this); } public override bool Equals(object other) { return this.Equals(other as WordFilter); } public bool Equals(WordFilter other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 1180649682) % 9) { case 0: goto IL_6D; case 1: return true; case 2: return false; case 3: arg_77_0 = (WordFilter.smethod_0(this.Regex, other.Regex) ? 1141495469 : 2135546674); continue; case 4: return false; case 5: goto IL_B5; case 7: arg_77_0 = ((!WordFilter.smethod_0(this.Type, other.Type)) ? 1320976021 : 555786837); continue; case 8: return false; } break; } return true; IL_6D: arg_77_0 = 2131538239; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? 1705903226 : 1941087765); goto IL_72; } public override int GetHashCode() { return 1 ^ WordFilter.smethod_1(this.Type) ^ WordFilter.smethod_1(this.Regex); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_54: uint arg_3C_0 = 792696616u; while (true) { uint num; switch ((num = (arg_3C_0 ^ 1438615281u)) % 3u) { case 1u: output.WriteString(this.Type); output.WriteRawTag(18); output.WriteString(this.Regex); arg_3C_0 = (num * 707227727u ^ 1752250088u); continue; case 2u: goto IL_54; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeStringSize(this.Type)) + (1 + CodedOutputStream.ComputeStringSize(this.Regex)); } public void MergeFrom(WordFilter other) { if (other == null) { goto IL_4B; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 2338810362u)) % 7u) { case 0u: arg_7B_0 = ((WordFilter.smethod_2(other.Regex) != 0) ? 2193237106u : 2729027723u); continue; case 2u: return; case 3u: goto IL_B2; case 4u: goto IL_4B; case 5u: this.Type = other.Type; arg_7B_0 = (num * 2532217204u ^ 1136756226u); continue; case 6u: this.Regex = other.Regex; arg_7B_0 = (num * 2477747733u ^ 1556505763u); continue; } break; } return; IL_4B: arg_7B_0 = 2799063862u; goto IL_76; IL_B2: arg_7B_0 = ((WordFilter.smethod_2(other.Type) != 0) ? 2810757993u : 2434861982u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_EE: uint num; uint arg_AE_0 = ((num = input.ReadTag()) == 0u) ? 4223179575u : 3386969625u; while (true) { uint num2; switch ((num2 = (arg_AE_0 ^ 4068419742u)) % 9u) { case 0u: this.Regex = input.ReadString(); arg_AE_0 = 2891915470u; continue; case 2u: arg_AE_0 = (num2 * 800110882u ^ 601764642u); continue; case 3u: arg_AE_0 = ((num != 10u) ? 3682255026u : 3650804832u); continue; case 4u: arg_AE_0 = (((num != 18u) ? 160971757u : 1462786302u) ^ num2 * 2038564213u); continue; case 5u: this.Type = input.ReadString(); arg_AE_0 = 3983594760u; continue; case 6u: arg_AE_0 = 3386969625u; continue; case 7u: goto IL_EE; case 8u: input.SkipLastField(); arg_AE_0 = (num2 * 4092212776u ^ 3225097110u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/AuthServer.WorldServer.Managers/EquipmentManager.cs using AuthServer.WorldServer.Game.Entities; using Framework.Constants.Misc; using Framework.Logging; using Framework.Misc; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Reflection; namespace AuthServer.WorldServer.Managers { public class EquipmentManager : Singleton<EquipmentManager> { public ConcurrentDictionary<int, Item> AvailableItems = new ConcurrentDictionary<int, Item>(); public ConcurrentDictionary<int, Item> ItemRefs = new ConcurrentDictionary<int, Item>(); public ConcurrentDictionary<int, int> AvailableDisplayIds = new ConcurrentDictionary<int, int>(); public ConcurrentDictionary<int, Dictionary<string, Tuple<int, int>>> AvailableDisplayIds2 = new ConcurrentDictionary<int, Dictionary<string, Tuple<int, int>>>(); public List<CharStartOutfit> CharStartOutfits = new List<CharStartOutfit>(); public List<Namegen> Namegens = new List<Namegen>(); private string[] line; private EquipmentManager() { while (true) { IL_7A: uint arg_62_0 = 1209675309u; while (true) { uint num; switch ((num = (arg_62_0 ^ 183618116u)) % 3u) { case 0u: goto IL_7A; case 1u: this.LoadAvailableItmes(); arg_62_0 = (num * 1531967429u ^ 3032100478u); continue; } return; } } } private void LoadAvailableItmes() { StreamReader streamReader = EquipmentManager.smethod_7(EquipmentManager.smethod_6(EquipmentManager.smethod_5(), Module.smethod_33<string>(2775282556u))); try { while (true) { IL_224: uint arg_1D7_0 = (!EquipmentManager.smethod_10(streamReader)) ? 3461010831u : 3426587474u; while (true) { uint num; switch ((num = (arg_1D7_0 ^ 2626580690u)) % 12u) { case 0u: { CharStartOutfit charStartOutfit; charStartOutfit.ClassId = byte.Parse(this.line[27]); charStartOutfit.SexId = byte.Parse(this.line[28]); charStartOutfit.OutfitId = byte.Parse(this.line[29]); arg_1D7_0 = (num * 2077656181u ^ 2075374387u); continue; } case 1u: { int num2 = 1; arg_1D7_0 = (num * 4094123927u ^ 4252297251u); continue; } case 2u: { CharStartOutfit charStartOutfit; int num2; arg_1D7_0 = ((num2 > charStartOutfit.ItemId.Length) ? 2555147717u : 2500467789u); continue; } case 3u: { CharStartOutfit charStartOutfit; int num2; charStartOutfit.ItemId[num2 - 1] = uint.Parse(this.line[num2]); arg_1D7_0 = 3707076784u; continue; } case 4u: goto IL_224; case 5u: { this.line = EquipmentManager.smethod_9(EquipmentManager.smethod_8(streamReader), new char[] { ';' }); CharStartOutfit charStartOutfit = new CharStartOutfit(); charStartOutfit.Id = uint.Parse(this.line[0]); arg_1D7_0 = 2242302911u; continue; } case 6u: { int num2; num2++; arg_1D7_0 = (num * 2585752736u ^ 1017943336u); continue; } case 7u: { CharStartOutfit charStartOutfit; charStartOutfit.PetDisplayId = uint.Parse(this.line[25]); charStartOutfit.RaceId = byte.Parse(this.line[26]); arg_1D7_0 = (num * 362195882u ^ 714632876u); continue; } case 9u: { CharStartOutfit charStartOutfit; charStartOutfit.PetFamilyId = byte.Parse(this.line[30]); arg_1D7_0 = (num * 599166167u ^ 762590322u); continue; } case 10u: arg_1D7_0 = 3461010831u; continue; case 11u: { CharStartOutfit charStartOutfit; this.CharStartOutfits.Add(charStartOutfit); arg_1D7_0 = (num * 3430256344u ^ 2239010134u); continue; } } goto Block_9; } } Block_9:; } finally { if (streamReader != null) { while (true) { IL_26A: uint arg_251_0 = 4257077129u; while (true) { uint num; switch ((num = (arg_251_0 ^ 2626580690u)) % 3u) { case 0u: goto IL_26A; case 1u: EquipmentManager.smethod_11(streamReader); arg_251_0 = (num * 835379987u ^ 2486029765u); continue; } goto Block_13; } } Block_13:; } } StreamReader streamReader2 = EquipmentManager.smethod_7(EquipmentManager.smethod_6(EquipmentManager.smethod_5(), Module.smethod_33<string>(2116823149u))); try { while (true) { IL_359: int arg_32D_0 = (!EquipmentManager.smethod_10(streamReader2)) ? -1013399805 : -1101339282; while (true) { switch ((arg_32D_0 ^ -1668386606) % 4) { case 1: { this.line = EquipmentManager.smethod_9(EquipmentManager.smethod_8(streamReader2), new char[] { ';' }); string s = EquipmentManager.smethod_12(this.line[1], Module.smethod_37<string>(3974021651u), ""); string s2 = EquipmentManager.smethod_12(this.line[0], Module.smethod_33<string>(3031927268u), ""); this.AvailableDisplayIds.TryAdd(int.Parse(s2), int.Parse(s)); arg_32D_0 = -2100030119; continue; } case 2: arg_32D_0 = -1013399805; continue; case 3: goto IL_359; } goto Block_15; } } Block_15:; } finally { if (streamReader2 != null) { while (true) { IL_39F: uint arg_386_0 = 3923196079u; while (true) { uint num; switch ((num = (arg_386_0 ^ 2626580690u)) % 3u) { case 0u: goto IL_39F; case 1u: EquipmentManager.smethod_11(streamReader2); arg_386_0 = (num * 4013498643u ^ 3261947067u); continue; } goto Block_19; } } Block_19:; } } StreamReader streamReader3 = EquipmentManager.smethod_7(EquipmentManager.smethod_6(EquipmentManager.smethod_5(), Module.smethod_36<string>(359555861u))); try { while (true) { IL_6E0: uint arg_67B_0 = (!EquipmentManager.smethod_10(streamReader3)) ? 4276022470u : 2181295176u; while (true) { uint num; string key; switch ((num = (arg_67B_0 ^ 2626580690u)) % 18u) { case 0u: goto IL_6E0; case 1u: goto IL_541; case 2u: { string s3; this.AvailableDisplayIds2.TryAdd(int.Parse(s3), new Dictionary<string, Tuple<int, int>>()); arg_67B_0 = (num * 223768797u ^ 1426707423u); continue; } case 3u: goto IL_52B; case 5u: arg_67B_0 = (num * 1466427458u ^ 97242185u); continue; case 6u: { this.line = EquipmentManager.smethod_9(EquipmentManager.smethod_8(streamReader3), new char[] { ';' }); string s3 = EquipmentManager.smethod_12(this.line[1], Module.smethod_34<string>(1801001672u), ""); arg_67B_0 = 3157067419u; continue; } case 7u: goto IL_4FF; case 8u: arg_67B_0 = (num * 2221118697u ^ 3909868360u); continue; case 9u: goto IL_4D3; case 10u: goto IL_4E9; case 11u: arg_67B_0 = 4276022470u; continue; case 12u: { string s3; int item; this.AvailableDisplayIds2[int.Parse(s3)].Add(key, Tuple.Create<int, int>(item, int.Parse(EquipmentManager.smethod_12(this.line[3], Module.smethod_35<string>(764625391u), "")))); arg_67B_0 = 2331671664u; continue; } case 13u: { int num3 = int.Parse(EquipmentManager.smethod_12(this.line[3], Module.smethod_33<string>(3031927268u), "")); arg_67B_0 = (num * 284313300u ^ 514507668u); continue; } case 14u: { int num3; switch (num3) { case 0: goto IL_4D3; case 1: goto IL_4E9; case 2: goto IL_4FF; case 3: goto IL_52B; case 4: goto IL_541; default: arg_67B_0 = (num * 2855740908u ^ 4218272821u); continue; } break; } case 15u: key = Module.smethod_36<string>(102126220u); arg_67B_0 = 2880666535u; continue; case 16u: { int item = this.AvailableDisplayIds[int.Parse(EquipmentManager.smethod_12(this.line[2], Module.smethod_35<string>(764625391u), ""))]; string s3; arg_67B_0 = ((this.AvailableDisplayIds2.ContainsKey(int.Parse(s3)) ? 3711815613u : 3173784448u) ^ num * 2379889547u); continue; } case 17u: arg_67B_0 = (((int.Parse(EquipmentManager.smethod_12(this.line[2], Module.smethod_34<string>(1801001672u), "")) == 0) ? 869108670u : 1918094454u) ^ num * 1926906206u); continue; } goto Block_24; IL_4D3: key = Module.smethod_33<string>(3446856637u); arg_67B_0 = 2458526896u; continue; IL_4E9: key = Module.smethod_35<string>(1436672640u); arg_67B_0 = 2241113722u; continue; IL_4FF: key = EquipmentManager.smethod_12(this.line[3], Module.smethod_34<string>(1801001672u), ""); arg_67B_0 = 2241113722u; continue; IL_52B: key = Module.smethod_37<string>(3389766987u); arg_67B_0 = 2241113722u; continue; IL_541: key = Module.smethod_36<string>(1114921850u); arg_67B_0 = 2241113722u; } } Block_24:; } finally { if (streamReader3 != null) { while (true) { IL_729: uint arg_710_0 = 2388129943u; while (true) { uint num; switch ((num = (arg_710_0 ^ 2626580690u)) % 3u) { case 0u: goto IL_729; case 2u: EquipmentManager.smethod_11(streamReader3); arg_710_0 = (num * 573678255u ^ 992583810u); continue; } goto Block_28; } } Block_28:; } } StreamReader streamReader4 = EquipmentManager.smethod_7(EquipmentManager.smethod_6(EquipmentManager.smethod_5(), Module.smethod_35<string>(3912916760u))); try { while (true) { IL_8D8: uint arg_89C_0 = (!EquipmentManager.smethod_10(streamReader4)) ? 3398431451u : 3176612841u; while (true) { uint num; switch ((num = (arg_89C_0 ^ 2626580690u)) % 8u) { case 0u: arg_89C_0 = 3398431451u; continue; case 1u: this.line = EquipmentManager.smethod_9(EquipmentManager.smethod_8(streamReader4), new char[] { ';' }); arg_89C_0 = 2481746045u; continue; case 2u: { int num4; Dictionary<string, Tuple<int, int>> dictionary; arg_89C_0 = ((this.AvailableDisplayIds2.TryGetValue(num4, out dictionary) ? 3095803325u : 2725875438u) ^ num * 4288170837u); continue; } case 4u: goto IL_8D8; case 5u: { int num4; string s4; this.AvailableItems.TryAdd(num4, new Item { Id = num4, DisplayInfoIds = this.AvailableDisplayIds2[num4], InventoryType = byte.Parse(s4) }); arg_89C_0 = (num * 402617654u ^ 3623275920u); continue; } case 6u: { int num4; string s4; this.AvailableItems.TryAdd(num4, new Item { Id = num4, InventoryType = byte.Parse(s4) }); arg_89C_0 = 3483778670u; continue; } case 7u: { string arg_7A4_0 = EquipmentManager.smethod_12(this.line[0], Module.smethod_36<string>(1708679815u), ""); string s4 = EquipmentManager.smethod_12(this.line[2], Module.smethod_35<string>(764625391u), ""); int num4 = int.Parse(arg_7A4_0); arg_89C_0 = (num * 1860668236u ^ 1191528156u); continue; } } goto Block_31; } } Block_31:; } finally { if (streamReader4 != null) { while (true) { IL_921: uint arg_908_0 = 2965684795u; while (true) { uint num; switch ((num = (arg_908_0 ^ 2626580690u)) % 3u) { case 0u: goto IL_921; case 1u: EquipmentManager.smethod_11(streamReader4); arg_908_0 = (num * 2627898260u ^ 3996126377u); continue; } goto Block_35; } } Block_35:; } } StreamReader streamReader5 = EquipmentManager.smethod_7(EquipmentManager.smethod_6(EquipmentManager.smethod_5(), Module.smethod_35<string>(4192676738u))); try { while (true) { IL_A4C: uint arg_A14_0 = (!EquipmentManager.smethod_10(streamReader5)) ? 2962417221u : 4091737895u; while (true) { uint num; switch ((num = (arg_A14_0 ^ 2626580690u)) % 7u) { case 0u: arg_A14_0 = 2962417221u; continue; case 1u: { string name = this.line[0]; arg_A14_0 = (num * 3704255759u ^ 3887901866u); continue; } case 2u: goto IL_A4C; case 3u: { byte race = byte.Parse(this.line[1]); byte sex = byte.Parse(this.line[2]); arg_A14_0 = (num * 469991047u ^ 3704787315u); continue; } case 4u: this.line = EquipmentManager.smethod_9(EquipmentManager.smethod_8(streamReader5), new char[] { ';' }); arg_A14_0 = 4277341210u; continue; case 5u: { string name; byte race; byte sex; this.Namegens.Add(new Namegen { Name = name, Race = race, Sex = sex }); arg_A14_0 = (num * 905516309u ^ 3416554058u); continue; } } goto Block_37; } } Block_37:; } finally { if (streamReader5 != null) { while (true) { IL_A95: uint arg_A7C_0 = 3292403005u; while (true) { uint num; switch ((num = (arg_A7C_0 ^ 2626580690u)) % 3u) { case 1u: EquipmentManager.smethod_11(streamReader5); arg_A7C_0 = (num * 830996846u ^ 714018961u); continue; case 2u: goto IL_A95; } goto Block_41; } } Block_41:; } } Item arg_AAD_0 = this.AvailableItems[112454]; while (true) { IL_B05: uint arg_AEC_0 = 2636670562u; while (true) { uint num; switch ((num = (arg_AEC_0 ^ 2626580690u)) % 3u) { case 0u: goto IL_B05; case 2u: Log.Message(LogType.Debug, Module.smethod_33<string>(3912832510u), new object[] { this.AvailableItems.Count }); arg_AEC_0 = (num * 513635594u ^ 549473989u); continue; } return; } } } public string GetEmbeddedResource(string ns, string res) { StreamReader streamReader = EquipmentManager.smethod_7(EquipmentManager.smethod_6(EquipmentManager.smethod_5(), EquipmentManager.smethod_13(Module.smethod_36<string>(235071774u), ns, res))); string result; try { result = EquipmentManager.smethod_14(streamReader); } finally { if (streamReader != null) { while (true) { IL_5F: uint arg_47_0 = 1779120404u; while (true) { uint num; switch ((num = (arg_47_0 ^ 735590380u)) % 3u) { case 0u: goto IL_5F; case 1u: EquipmentManager.smethod_11(streamReader); arg_47_0 = (num * 1175224119u ^ 183579225u); continue; } goto Block_5; } } Block_5:; } } return result; } static Assembly smethod_5() { return Assembly.GetExecutingAssembly(); } static Stream smethod_6(Assembly assembly_0, string string_0) { return assembly_0.GetManifestResourceStream(string_0); } static StreamReader smethod_7(Stream stream_0) { return new StreamReader(stream_0); } static string smethod_8(TextReader textReader_0) { return textReader_0.ReadLine(); } static string[] smethod_9(string string_0, char[] char_0) { return string_0.Split(char_0); } static bool smethod_10(StreamReader streamReader_0) { return streamReader_0.EndOfStream; } static void smethod_11(IDisposable idisposable_0) { idisposable_0.Dispose(); } static string smethod_12(string string_0, string string_1, string string_2) { return string_0.Replace(string_1, string_2); } static string smethod_13(string string_0, object object_0, object object_1) { return string.Format(string_0, object_0, object_1); } static string smethod_14(TextReader textReader_0) { return textReader_0.ReadToEnd(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Any.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Any : IMessage<Any>, IEquatable<Any>, IDeepCloneable<Any>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Any.__c __9 = new Any.__c(); internal Any cctor>b__32_0() { return new Any(); } } private static readonly MessageParser<Any> _parser = new MessageParser<Any>(new Func<Any>(Any.__c.__9.<.cctor>b__32_0)); public const int TypeUrlFieldNumber = 1; private string typeUrl_ = ""; public const int ValueFieldNumber = 2; private ByteString value_ = ByteString.Empty; public static MessageParser<Any> Parser { get { return Any._parser; } } public static MessageDescriptor Descriptor { get { return AnyReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Any.Descriptor; } } public string TypeUrl { get { return this.typeUrl_; } set { this.typeUrl_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public ByteString Value { get { return this.value_; } set { this.value_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public Any() { } public Any(Any other) : this() { this.typeUrl_ = other.typeUrl_; this.value_ = other.value_; } public Any Clone() { return new Any(this); } public override bool Equals(object other) { return this.Equals(other as Any); } public bool Equals(Any other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -266947875) % 9) { case 0: goto IL_6D; case 1: return false; case 2: return true; case 3: arg_77_0 = ((!Any.smethod_0(this.TypeUrl, other.TypeUrl)) ? -49924200 : -1634714796); continue; case 5: return false; case 6: arg_77_0 = ((!(this.Value != other.Value)) ? -1501110427 : -1202618130); continue; case 7: return false; case 8: goto IL_B5; } break; } return true; IL_6D: arg_77_0 = -1733635347; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? -1856424846 : -1557946227); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_BC: uint arg_98_0 = 3238189062u; while (true) { uint num2; switch ((num2 = (arg_98_0 ^ 2582109860u)) % 6u) { case 0u: goto IL_BC; case 1u: arg_98_0 = ((this.Value.Length == 0) ? 3739400481u : 3153666163u); continue; case 2u: arg_98_0 = (((Any.smethod_1(this.TypeUrl) == 0) ? 1718208019u : 613206384u) ^ num2 * 3704984589u); continue; case 4u: num ^= Any.smethod_2(this.TypeUrl); arg_98_0 = (num2 * 1357708642u ^ 1179581237u); continue; case 5u: num ^= Any.smethod_2(this.Value); arg_98_0 = (num2 * 2537426074u ^ 1565251703u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Any.smethod_1(this.TypeUrl) != 0) { goto IL_3A; } goto IL_C4; uint arg_8D_0; while (true) { IL_88: uint num; switch ((num = (arg_8D_0 ^ 3542651897u)) % 7u) { case 0u: output.WriteBytes(this.Value); arg_8D_0 = (num * 3096950004u ^ 1550694974u); continue; case 1u: output.WriteRawTag(18); arg_8D_0 = (num * 3759571440u ^ 4103770029u); continue; case 3u: goto IL_C4; case 4u: output.WriteRawTag(10); arg_8D_0 = (num * 668947384u ^ 1936825636u); continue; case 5u: goto IL_3A; case 6u: output.WriteString(this.TypeUrl); arg_8D_0 = (num * 4247973150u ^ 3768294887u); continue; } break; } return; IL_3A: arg_8D_0 = 2936706576u; goto IL_88; IL_C4: arg_8D_0 = ((this.Value.Length != 0) ? 2348183275u : 3168545198u); goto IL_88; } public int CalculateSize() { int num = 0; while (true) { IL_C0: uint arg_9C_0 = 627454731u; while (true) { uint num2; switch ((num2 = (arg_9C_0 ^ 1964764111u)) % 6u) { case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.TypeUrl); arg_9C_0 = (num2 * 4205353441u ^ 3643455519u); continue; case 2u: arg_9C_0 = (((Any.smethod_1(this.TypeUrl) != 0) ? 871222102u : 890700454u) ^ num2 * 4125686318u); continue; case 3u: arg_9C_0 = ((this.Value.Length != 0) ? 1812534943u : 296351795u); continue; case 4u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Value); arg_9C_0 = (num2 * 1702148799u ^ 3370051203u); continue; case 5u: goto IL_C0; } return num; } } return num; } public void MergeFrom(Any other) { if (other == null) { goto IL_4B; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 3619588254u)) % 7u) { case 0u: arg_7B_0 = ((other.Value.Length != 0) ? 2690639846u : 4017128255u); continue; case 2u: goto IL_B2; case 3u: goto IL_4B; case 4u: this.TypeUrl = other.TypeUrl; arg_7B_0 = (num * 667143161u ^ 3625366420u); continue; case 5u: return; case 6u: this.Value = other.Value; arg_7B_0 = (num * 1706520041u ^ 4028370695u); continue; } break; } return; IL_4B: arg_7B_0 = 2995681125u; goto IL_76; IL_B2: arg_7B_0 = ((Any.smethod_1(other.TypeUrl) != 0) ? 3546046839u : 2210067765u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_104: uint num; uint arg_C0_0 = ((num = input.ReadTag()) == 0u) ? 2525882889u : 4083236235u; while (true) { uint num2; switch ((num2 = (arg_C0_0 ^ 2907843882u)) % 10u) { case 0u: goto IL_104; case 2u: this.Value = input.ReadBytes(); arg_C0_0 = 3282640910u; continue; case 3u: arg_C0_0 = (num2 * 949591935u ^ 1293658861u); continue; case 4u: this.TypeUrl = input.ReadString(); arg_C0_0 = 2903211081u; continue; case 5u: arg_C0_0 = 4083236235u; continue; case 6u: arg_C0_0 = (((num != 18u) ? 1706837388u : 341647534u) ^ num2 * 3560770054u); continue; case 7u: arg_C0_0 = ((num == 10u) ? 2877676408u : 3509322910u); continue; case 8u: input.SkipLastField(); arg_C0_0 = (num2 * 3800174213u ^ 2397004705u); continue; case 9u: arg_C0_0 = (num2 * 522163179u ^ 2954866415u); continue; } return; } } } private static string GetTypeUrl(MessageDescriptor descriptor) { return Any.smethod_3(Module.smethod_37<string>(3472318492u), descriptor.FullName); } public T Unpack<T>() where T : IMessage, new() { T t = Activator.CreateInstance<T>(); string typeUrl = Any.GetTypeUrl(t.Descriptor); if (Any.smethod_0(this.TypeUrl, typeUrl)) { throw new InvalidProtocolBufferException(Any.smethod_4(Module.smethod_37<string>(1690318190u), new object[] { t.Descriptor.Name, typeUrl, this.TypeUrl })); } t.MergeFrom(this.Value); return t; } public static Any Pack(IMessage message) { Preconditions.CheckNotNull<IMessage>(message, Module.smethod_35<string>(2616444679u)); return new Any { TypeUrl = Any.GetTypeUrl(message.Descriptor), Value = message.ToByteString() }; } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static string smethod_3(string string_0, string string_1) { return string_0 + string_1; } static string smethod_4(string string_0, object[] object_0) { return string.Format(string_0, object_0); } } } <file_sep>/Google.Protobuf/MessageOptions.cs using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf { [DebuggerNonUserCode] internal sealed class MessageOptions : IMessage<MessageOptions>, IEquatable<MessageOptions>, IDeepCloneable<MessageOptions>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MessageOptions.__c __9 = new MessageOptions.__c(); internal MessageOptions cctor>b__39_0() { return new MessageOptions(); } } private static readonly MessageParser<MessageOptions> _parser = new MessageParser<MessageOptions>(new Func<MessageOptions>(MessageOptions.__c.__9.<.cctor>b__39_0)); public const int MessageSetWireFormatFieldNumber = 1; private bool messageSetWireFormat_; public const int NoStandardDescriptorAccessorFieldNumber = 2; private bool noStandardDescriptorAccessor_; public const int DeprecatedFieldNumber = 3; private bool deprecated_; public const int UninterpretedOptionFieldNumber = 999; private static readonly FieldCodec<UninterpretedOption> _repeated_uninterpretedOption_codec = FieldCodec.ForMessage<UninterpretedOption>(7994u, Google.Protobuf.UninterpretedOption.Parser); private readonly RepeatedField<UninterpretedOption> uninterpretedOption_ = new RepeatedField<UninterpretedOption>(); public static MessageParser<MessageOptions> Parser { get { return MessageOptions._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[10]; } } MessageDescriptor IMessage.Descriptor { get { return MessageOptions.Descriptor; } } public bool MessageSetWireFormat { get { return this.messageSetWireFormat_; } set { this.messageSetWireFormat_ = value; } } public bool NoStandardDescriptorAccessor { get { return this.noStandardDescriptorAccessor_; } set { this.noStandardDescriptorAccessor_ = value; } } public bool Deprecated { get { return this.deprecated_; } set { this.deprecated_ = value; } } public RepeatedField<UninterpretedOption> UninterpretedOption { get { return this.uninterpretedOption_; } } public MessageOptions() { } public MessageOptions(MessageOptions other) : this() { while (true) { IL_A3: uint arg_7F_0 = 1810609710u; while (true) { uint num; switch ((num = (arg_7F_0 ^ 1789795105u)) % 6u) { case 0u: goto IL_A3; case 1u: this.uninterpretedOption_ = other.uninterpretedOption_.Clone(); arg_7F_0 = (num * 80097078u ^ 3121442486u); continue; case 2u: this.deprecated_ = other.deprecated_; arg_7F_0 = (num * 3494916184u ^ 3015347862u); continue; case 3u: this.messageSetWireFormat_ = other.messageSetWireFormat_; arg_7F_0 = (num * 2462053270u ^ 3617191277u); continue; case 4u: this.noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_; arg_7F_0 = (num * 2666392095u ^ 1647372255u); continue; } return; } } } public MessageOptions Clone() { return new MessageOptions(this); } public override bool Equals(object other) { return this.Equals(other as MessageOptions); } public bool Equals(MessageOptions other) { if (other == null) { goto IL_3F; } goto IL_111; int arg_C3_0; while (true) { IL_BE: switch ((arg_C3_0 ^ -916466922) % 13) { case 0: return false; case 1: arg_C3_0 = ((this.NoStandardDescriptorAccessor != other.NoStandardDescriptorAccessor) ? -1378345383 : -1284365396); continue; case 2: arg_C3_0 = ((!this.uninterpretedOption_.Equals(other.uninterpretedOption_)) ? -1438070114 : -694841738); continue; case 3: arg_C3_0 = ((this.Deprecated != other.Deprecated) ? -1689487534 : -1642349531); continue; case 4: goto IL_3F; case 5: goto IL_111; case 6: return false; case 7: return true; case 8: return false; case 9: return false; case 11: return false; case 12: arg_C3_0 = ((this.MessageSetWireFormat != other.MessageSetWireFormat) ? -339289710 : -380413081); continue; } break; } return true; IL_3F: arg_C3_0 = -16534744; goto IL_BE; IL_111: arg_C3_0 = ((other == this) ? -17084311 : -1555527056); goto IL_BE; } public override int GetHashCode() { int num = 1; if (this.MessageSetWireFormat) { goto IL_3F; } goto IL_FA; uint arg_BF_0; while (true) { IL_BA: uint num2; switch ((num2 = (arg_BF_0 ^ 2738966235u)) % 8u) { case 0u: num ^= this.Deprecated.GetHashCode(); arg_BF_0 = (num2 * 1308123137u ^ 158815137u); continue; case 1u: num ^= this.MessageSetWireFormat.GetHashCode(); arg_BF_0 = (num2 * 3883162257u ^ 256210676u); continue; case 2u: num ^= this.uninterpretedOption_.GetHashCode(); arg_BF_0 = 3751619628u; continue; case 3u: arg_BF_0 = (this.Deprecated ? 4190101187u : 2838545337u); continue; case 4u: goto IL_3F; case 5u: num ^= this.NoStandardDescriptorAccessor.GetHashCode(); arg_BF_0 = (num2 * 807997363u ^ 180619175u); continue; case 6u: goto IL_FA; } break; } return num; IL_3F: arg_BF_0 = 2487497954u; goto IL_BA; IL_FA: arg_BF_0 = (this.NoStandardDescriptorAccessor ? 2199124918u : 4197398928u); goto IL_BA; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.MessageSetWireFormat) { goto IL_5B; } goto IL_127; uint arg_E3_0; while (true) { IL_DE: uint num; switch ((num = (arg_E3_0 ^ 951963882u)) % 10u) { case 0u: output.WriteBool(this.Deprecated); arg_E3_0 = (num * 1853097621u ^ 1285350501u); continue; case 1u: output.WriteBool(this.NoStandardDescriptorAccessor); arg_E3_0 = (num * 2168742739u ^ 3881378557u); continue; case 2u: output.WriteRawTag(24); arg_E3_0 = (num * 2002657638u ^ 3034140764u); continue; case 3u: output.WriteBool(this.MessageSetWireFormat); arg_E3_0 = (num * 2523171750u ^ 1556911390u); continue; case 4u: goto IL_127; case 5u: output.WriteRawTag(8); arg_E3_0 = (num * 1118136248u ^ 949784191u); continue; case 6u: goto IL_5B; case 7u: output.WriteRawTag(16); arg_E3_0 = (num * 1752014014u ^ 2426403999u); continue; case 8u: arg_E3_0 = ((!this.Deprecated) ? 1706662211u : 1336236894u); continue; } break; } this.uninterpretedOption_.WriteTo(output, MessageOptions._repeated_uninterpretedOption_codec); return; IL_5B: arg_E3_0 = 1524825373u; goto IL_DE; IL_127: arg_E3_0 = (this.NoStandardDescriptorAccessor ? 977061835u : 1999339628u); goto IL_DE; } public int CalculateSize() { int num = 0; while (true) { IL_DD: uint arg_B1_0 = 1785449052u; while (true) { uint num2; switch ((num2 = (arg_B1_0 ^ 1318596341u)) % 8u) { case 1u: arg_B1_0 = (((!this.MessageSetWireFormat) ? 688744089u : 1990868644u) ^ num2 * 2065000006u); continue; case 2u: arg_B1_0 = (this.NoStandardDescriptorAccessor ? 1531004408u : 1985520446u); continue; case 3u: arg_B1_0 = ((!this.Deprecated) ? 1489533717u : 1295185649u); continue; case 4u: num += 2; arg_B1_0 = (num2 * 1900658079u ^ 2641585513u); continue; case 5u: num += 2; arg_B1_0 = (num2 * 1132636427u ^ 1304792497u); continue; case 6u: goto IL_DD; case 7u: num += 2; arg_B1_0 = (num2 * 3724957919u ^ 1075891990u); continue; } goto Block_4; } } Block_4: return num + this.uninterpretedOption_.CalculateSize(MessageOptions._repeated_uninterpretedOption_codec); } public void MergeFrom(MessageOptions other) { if (other == null) { goto IL_A8; } goto IL_117; uint arg_D3_0; while (true) { IL_CE: uint num; switch ((num = (arg_D3_0 ^ 4283838371u)) % 10u) { case 1u: arg_D3_0 = ((!other.NoStandardDescriptorAccessor) ? 3126937724u : 2516863061u); continue; case 2u: goto IL_A8; case 3u: return; case 4u: this.uninterpretedOption_.Add(other.uninterpretedOption_); arg_D3_0 = 2397152733u; continue; case 5u: arg_D3_0 = (other.Deprecated ? 3594499254u : 4142555761u); continue; case 6u: this.NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor; arg_D3_0 = (num * 3764584522u ^ 1603618144u); continue; case 7u: this.Deprecated = other.Deprecated; arg_D3_0 = (num * 1312232300u ^ 4034435501u); continue; case 8u: this.MessageSetWireFormat = other.MessageSetWireFormat; arg_D3_0 = (num * 2950677792u ^ 2878946870u); continue; case 9u: goto IL_117; } break; } return; IL_A8: arg_D3_0 = 3333535426u; goto IL_CE; IL_117: arg_D3_0 = ((!other.MessageSetWireFormat) ? 2829283382u : 4066280275u); goto IL_CE; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1CF: uint num; uint arg_173_0 = ((num = input.ReadTag()) == 0u) ? 799449716u : 679777123u; while (true) { uint num2; switch ((num2 = (arg_173_0 ^ 1642442908u)) % 16u) { case 0u: this.MessageSetWireFormat = input.ReadBool(); arg_173_0 = 316907623u; continue; case 1u: this.Deprecated = input.ReadBool(); arg_173_0 = 785905307u; continue; case 2u: arg_173_0 = (num2 * 3601143989u ^ 2321672289u); continue; case 3u: arg_173_0 = ((num == 24u) ? 1458448077u : 67688950u); continue; case 4u: arg_173_0 = (((num != 16u) ? 1789142442u : 2022779985u) ^ num2 * 2113000264u); continue; case 5u: input.SkipLastField(); arg_173_0 = 999829966u; continue; case 6u: arg_173_0 = (num2 * 453841557u ^ 3055602887u); continue; case 7u: goto IL_1CF; case 9u: arg_173_0 = 679777123u; continue; case 10u: arg_173_0 = (((num != 7994u) ? 3416903083u : 4135695410u) ^ num2 * 64727149u); continue; case 11u: arg_173_0 = (num2 * 4224271711u ^ 2435908286u); continue; case 12u: this.uninterpretedOption_.AddEntriesFrom(input, MessageOptions._repeated_uninterpretedOption_codec); arg_173_0 = 785905307u; continue; case 13u: this.NoStandardDescriptorAccessor = input.ReadBool(); arg_173_0 = 785905307u; continue; case 14u: arg_173_0 = (((num != 8u) ? 3108429310u : 2737616170u) ^ num2 * 691769549u); continue; case 15u: arg_173_0 = ((num <= 16u) ? 1130305874u : 1526627103u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Account.V1/CAIS.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class CAIS : IMessage<CAIS>, IEquatable<CAIS>, IDeepCloneable<CAIS>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly CAIS.__c __9 = new CAIS.__c(); internal CAIS cctor>b__34_0() { return new CAIS(); } } private static readonly MessageParser<CAIS> _parser = new MessageParser<CAIS>(new Func<CAIS>(CAIS.__c.__9.<.cctor>b__34_0)); public const int PlayedMinutesFieldNumber = 1; private uint playedMinutes_; public const int RestedMinutesFieldNumber = 2; private uint restedMinutes_; public const int LastHeardTimeFieldNumber = 3; private ulong lastHeardTime_; public static MessageParser<CAIS> Parser { get { return CAIS._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[29]; } } MessageDescriptor IMessage.Descriptor { get { return CAIS.Descriptor; } } public uint PlayedMinutes { get { return this.playedMinutes_; } set { this.playedMinutes_ = value; } } public uint RestedMinutes { get { return this.restedMinutes_; } set { this.restedMinutes_ = value; } } public ulong LastHeardTime { get { return this.lastHeardTime_; } set { this.lastHeardTime_ = value; } } public CAIS() { } public CAIS(CAIS other) : this() { this.playedMinutes_ = other.playedMinutes_; this.restedMinutes_ = other.restedMinutes_; this.lastHeardTime_ = other.lastHeardTime_; } public CAIS Clone() { return new CAIS(this); } public override bool Equals(object other) { return this.Equals(other as CAIS); } public bool Equals(CAIS other) { if (other == null) { goto IL_15; } goto IL_DA; int arg_94_0; while (true) { IL_8F: switch ((arg_94_0 ^ -543145949) % 11) { case 0: return false; case 1: arg_94_0 = ((this.RestedMinutes == other.RestedMinutes) ? -1532837262 : -1083600432); continue; case 2: return false; case 4: arg_94_0 = ((this.LastHeardTime == other.LastHeardTime) ? -1347461862 : -394787137); continue; case 5: return true; case 6: arg_94_0 = ((this.PlayedMinutes == other.PlayedMinutes) ? -875897569 : -526584138); continue; case 7: goto IL_15; case 8: return false; case 9: goto IL_DA; case 10: return false; } break; } return true; IL_15: arg_94_0 = -1546120889; goto IL_8F; IL_DA: arg_94_0 = ((other != this) ? -1658604238 : -606880997); goto IL_8F; } public override int GetHashCode() { int num = 1; while (true) { IL_107: uint arg_DB_0 = 1962987964u; while (true) { uint num2; switch ((num2 = (arg_DB_0 ^ 901537614u)) % 8u) { case 0u: num ^= this.LastHeardTime.GetHashCode(); arg_DB_0 = (num2 * 3084281597u ^ 3159695849u); continue; case 1u: num ^= this.RestedMinutes.GetHashCode(); arg_DB_0 = (num2 * 448395839u ^ 3995251908u); continue; case 2u: arg_DB_0 = (((this.PlayedMinutes != 0u) ? 4272970276u : 3827088267u) ^ num2 * 1774890807u); continue; case 3u: arg_DB_0 = ((this.RestedMinutes != 0u) ? 954814119u : 418334355u); continue; case 4u: num ^= this.PlayedMinutes.GetHashCode(); arg_DB_0 = (num2 * 205455522u ^ 2604331485u); continue; case 5u: arg_DB_0 = ((this.LastHeardTime == 0uL) ? 1165606953u : 1789209486u); continue; case 6u: goto IL_107; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.PlayedMinutes != 0u) { goto IL_8A; } goto IL_111; uint arg_D1_0; while (true) { IL_CC: uint num; switch ((num = (arg_D1_0 ^ 155981260u)) % 9u) { case 0u: output.WriteUInt32(this.RestedMinutes); arg_D1_0 = (num * 1811475733u ^ 3708700066u); continue; case 1u: output.WriteRawTag(8); output.WriteUInt32(this.PlayedMinutes); arg_D1_0 = (num * 2555029284u ^ 2810492738u); continue; case 2u: goto IL_8A; case 3u: output.WriteUInt64(this.LastHeardTime); arg_D1_0 = (num * 186596288u ^ 1521572225u); continue; case 4u: goto IL_111; case 6u: output.WriteRawTag(24); arg_D1_0 = (num * 2076385301u ^ 380596949u); continue; case 7u: output.WriteRawTag(16); arg_D1_0 = (num * 548678034u ^ 2987952886u); continue; case 8u: arg_D1_0 = ((this.LastHeardTime == 0uL) ? 127149377u : 1215334744u); continue; } break; } return; IL_8A: arg_D1_0 = 573170018u; goto IL_CC; IL_111: arg_D1_0 = ((this.RestedMinutes == 0u) ? 426695144u : 1922573088u); goto IL_CC; } public int CalculateSize() { int num = 0; while (true) { IL_104: uint arg_D8_0 = 857681489u; while (true) { uint num2; switch ((num2 = (arg_D8_0 ^ 1740180947u)) % 8u) { case 0u: arg_D8_0 = ((this.LastHeardTime != 0uL) ? 497396605u : 523424127u); continue; case 1u: arg_D8_0 = ((this.RestedMinutes == 0u) ? 1145820915u : 476631932u); continue; case 2u: arg_D8_0 = (((this.PlayedMinutes != 0u) ? 364237456u : 758900106u) ^ num2 * 1905355708u); continue; case 3u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.PlayedMinutes); arg_D8_0 = (num2 * 1148747790u ^ 3876715464u); continue; case 5u: goto IL_104; case 6u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.LastHeardTime); arg_D8_0 = (num2 * 3031618132u ^ 3492789351u); continue; case 7u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RestedMinutes); arg_D8_0 = (num2 * 810113680u ^ 4202045059u); continue; } return num; } } return num; } public void MergeFrom(CAIS other) { if (other == null) { goto IL_75; } goto IL_F5; uint arg_B5_0; while (true) { IL_B0: uint num; switch ((num = (arg_B5_0 ^ 1364849488u)) % 9u) { case 0u: this.LastHeardTime = other.LastHeardTime; arg_B5_0 = (num * 1792188523u ^ 2982327818u); continue; case 1u: return; case 2u: goto IL_F5; case 3u: this.PlayedMinutes = other.PlayedMinutes; arg_B5_0 = (num * 3080066855u ^ 3164104926u); continue; case 5u: goto IL_75; case 6u: arg_B5_0 = ((other.RestedMinutes == 0u) ? 535616843u : 818182767u); continue; case 7u: this.RestedMinutes = other.RestedMinutes; arg_B5_0 = (num * 3243017014u ^ 1841753345u); continue; case 8u: arg_B5_0 = ((other.LastHeardTime != 0uL) ? 1608127018u : 1239272436u); continue; } break; } return; IL_75: arg_B5_0 = 337209324u; goto IL_B0; IL_F5: arg_B5_0 = ((other.PlayedMinutes != 0u) ? 2055855364u : 780202514u); goto IL_B0; } public void MergeFrom(CodedInputStream input) { while (true) { IL_14A: uint num; uint arg_FE_0 = ((num = input.ReadTag()) != 0u) ? 1790477706u : 759564264u; while (true) { uint num2; switch ((num2 = (arg_FE_0 ^ 1469330716u)) % 12u) { case 0u: arg_FE_0 = (num2 * 1869952245u ^ 1445616303u); continue; case 1u: this.RestedMinutes = input.ReadUInt32(); arg_FE_0 = 1733251629u; continue; case 2u: arg_FE_0 = ((num == 8u) ? 1323734714u : 1525353709u); continue; case 3u: goto IL_14A; case 4u: input.SkipLastField(); arg_FE_0 = (num2 * 203685526u ^ 1603747804u); continue; case 5u: arg_FE_0 = (num2 * 1999272859u ^ 3923468356u); continue; case 6u: this.PlayedMinutes = input.ReadUInt32(); arg_FE_0 = 1571644911u; continue; case 7u: this.LastHeardTime = input.ReadUInt64(); arg_FE_0 = 1571644911u; continue; case 9u: arg_FE_0 = (((num != 16u) ? 1404183982u : 1665641032u) ^ num2 * 1280648697u); continue; case 10u: arg_FE_0 = 1790477706u; continue; case 11u: arg_FE_0 = (((num == 24u) ? 3600765743u : 2328140624u) ^ num2 * 472972132u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Friends.V1/FriendsServiceReflection.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public static class FriendsServiceReflection { private static FileDescriptor descriptor; public static FileDescriptor Descriptor { get { return FriendsServiceReflection.descriptor; } } static FriendsServiceReflection() { FriendsServiceReflection.descriptor = FileDescriptor.FromGeneratedCode(FriendsServiceReflection.smethod_1(FriendsServiceReflection.smethod_0(new string[] { Module.smethod_34<string>(1791287016u), Module.smethod_35<string>(2893294431u), Module.smethod_36<string>(1108140685u), Module.smethod_36<string>(1320517511u), Module.smethod_37<string>(2863395523u), Module.smethod_36<string>(2871651495u), Module.smethod_33<string>(887974100u), Module.smethod_35<string>(2235773487u), Module.smethod_36<string>(2477998231u), Module.smethod_36<string>(533210983u), Module.smethod_37<string>(1168750499u), Module.smethod_36<string>(1702431239u), Module.smethod_33<string>(69817844u), Module.smethod_34<string>(4108633128u), Module.smethod_37<string>(584260067u), Module.smethod_34<string>(3358740232u), Module.smethod_35<string>(4039687039u), Module.smethod_37<string>(1431582579u), Module.smethod_33<string>(685200276u), Module.smethod_33<string>(4059918308u), Module.smethod_36<string>(1761128919u), Module.smethod_34<string>(1109061544u), Module.smethod_35<string>(103137981u), Module.smethod_37<string>(87537507u), Module.smethod_33<string>(2423605796u), Module.smethod_37<string>(1285459971u), Module.smethod_37<string>(934860019u), Module.smethod_35<string>(3424328415u), Module.smethod_33<string>(787293284u), Module.smethod_34<string>(3529296600u), Module.smethod_33<string>(2627791812u), Module.smethod_37<string>(1577705187u), Module.smethod_36<string>(2131303111u), Module.smethod_37<string>(2775627651u), Module.smethod_33<string>(991479300u), Module.smethod_35<string>(2459128159u), Module.smethod_35<string>(136723695u), Module.smethod_35<string>(3774170047u), Module.smethod_35<string>(486565327u), Module.smethod_37<string>(1080982627u), Module.smethod_35<string>(1801607215u), Module.smethod_37<string>(2278905091u), Module.smethod_34<string>(2200067176u), Module.smethod_34<string>(2575013624u), Module.smethod_33<string>(2831977828u), Module.smethod_37<string>(379782723u), Module.smethod_37<string>(701441075u), Module.smethod_36<string>(3218346615u), Module.smethod_34<string>(2472124680u), Module.smethod_36<string>(92599575u), Module.smethod_37<string>(3097286003u), Module.smethod_37<string>(350841123u), Module.smethod_37<string>(241171u), Module.smethod_37<string>(1548763587u), Module.smethod_34<string>(222445992u), Module.smethod_36<string>(3600260343u), Module.smethod_37<string>(1402640979u), Module.smethod_34<string>(4142466840u), Module.smethod_37<string>(2600563443u), Module.smethod_36<string>(1261819831u), Module.smethod_36<string>(3993913607u), Module.smethod_34<string>(2642681048u), Module.smethod_35<string>(2754264399u), Module.smethod_33<string>(3749402708u), Module.smethod_33<string>(2829153444u), Module.smethod_36<string>(856427031u), Module.smethod_35<string>(124180623u), Module.smethod_36<string>(1643733559u), Module.smethod_36<string>(80860039u), Module.smethod_37<string>(2542208707u), Module.smethod_36<string>(1631994023u), Module.smethod_36<string>(69120503u), Module.smethod_35<string>(3104106031u), Module.smethod_37<string>(3944608515u), Module.smethod_35<string>(3453947663u), Module.smethod_35<string>(2796426719u), Module.smethod_37<string>(496963731u), Module.smethod_33<string>(3953588724u), Module.smethod_37<string>(3009518131u), Module.smethod_34<string>(2710348472u), Module.smethod_36<string>(127818183u), Module.smethod_37<string>(1460995715u), Module.smethod_35<string>(1620414863u), Module.smethod_33<string>(274003860u), Module.smethod_37<string>(2308318227u), Module.smethod_34<string>(460669784u), Module.smethod_35<string>(3285298383u), Module.smethod_37<string>(4061317987u), Module.smethod_36<string>(509731911u) })), new FileDescriptor[] { AttributeTypesReflection.Descriptor, EntityTypesReflection.Descriptor, FriendsTypesReflection.Descriptor, InvitationTypesReflection.Descriptor, RoleTypesReflection.Descriptor, RpcTypesReflection.Descriptor }, new GeneratedCodeInfo(null, new GeneratedCodeInfo[] { new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(SubscribeRequest).TypeHandle), SubscribeRequest.Parser, new string[] { Module.smethod_36<string>(2537453527u), Module.smethod_37<string>(1316110889u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(SubscribeResponse).TypeHandle), SubscribeResponse.Parser, new string[] { Module.smethod_36<string>(4121675763u), Module.smethod_34<string>(3255851288u), Module.smethod_34<string>(4165554041u), Module.smethod_36<string>(1553402902u), Module.smethod_35<string>(39572664u), Module.smethod_35<string>(655214607u), Module.smethod_33<string>(3526956873u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(UnsubscribeRequest).TypeHandle), UnsubscribeRequest.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_33<string>(3239342614u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(GenericFriendRequest).TypeHandle), GenericFriendRequest.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_37<string>(2309644422u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(GenericFriendResponse).TypeHandle), GenericFriendResponse.Parser, new string[] { Module.smethod_37<string>(204630102u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(AssignRoleRequest).TypeHandle), AssignRoleRequest.Parser, new string[] { Module.smethod_34<string>(1899727192u), Module.smethod_35<string>(1657194122u), Module.smethod_34<string>(4237384889u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(ViewFriendsRequest).TypeHandle), ViewFriendsRequest.Parser, new string[] { Module.smethod_33<string>(2714350708u), Module.smethod_36<string>(1978914170u), Module.smethod_36<string>(1553402902u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(ViewFriendsResponse).TypeHandle), ViewFriendsResponse.Parser, new string[] { Module.smethod_37<string>(1285666268u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(UpdateFriendStateRequest).TypeHandle), UpdateFriendStateRequest.Parser, new string[] { Module.smethod_35<string>(1797074111u), Module.smethod_34<string>(3840532677u), Module.smethod_33<string>(4205493237u), Module.smethod_37<string>(1665502530u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(FriendNotification).TypeHandle), FriendNotification.Parser, new string[] { Module.smethod_33<string>(649994153u), Module.smethod_37<string>(965451995u), Module.smethod_35<string>(759165294u), Module.smethod_33<string>(542756000u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(UpdateFriendStateNotification).TypeHandle), UpdateFriendStateNotification.Parser, new string[] { Module.smethod_36<string>(417188363u), Module.smethod_33<string>(1846560140u), Module.smethod_34<string>(573892497u), Module.smethod_36<string>(4043002107u) }, null, null, null), new GeneratedCodeInfo(FriendsServiceReflection.smethod_2(typeof(InvitationNotification).TypeHandle), InvitationNotification.Parser, new string[] { Module.smethod_37<string>(3741310011u), Module.smethod_36<string>(1993931775u), Module.smethod_36<string>(3148134426u), Module.smethod_36<string>(1920831614u), Module.smethod_37<string>(1053101983u) }, null, null, null) })); } static string smethod_0(string[] string_0) { return string.Concat(string_0); } static byte[] smethod_1(string string_0) { return Convert.FromBase64String(string_0); } static Type smethod_2(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } } } <file_sep>/Framework.Network.Packets/BitPack.cs using System; using System.Globalization; using System.Text; namespace Framework.Network.Packets { public class BitPack { private PacketWriter writer; private byte[] GuidBytes; private byte[] GuildGuidBytes; private byte[] TransportGuidBytes; private byte[] TargetGuidBytes; private byte BitPosition { get; set; } private byte BitValue { get; set; } public ulong Guid { set { this.GuidBytes = BitPack.smethod_0(value); } } public ulong GuildGuid { set { this.GuildGuidBytes = BitPack.smethod_0(value); } } public ulong TargetGuid { set { this.TargetGuidBytes = BitPack.smethod_0(value); } } public ulong TransportGuid { set { this.TransportGuidBytes = BitPack.smethod_0(value); } } public BitPack(PacketWriter writer, ulong guid = 0uL, ulong guildGuid = 0uL, ulong targetGuid = 0uL, ulong transportGuid = 0uL) { this.Guid = guid; this.GuildGuid = guildGuid; this.TargetGuid = targetGuid; this.TransportGuid = transportGuid; this.writer = writer; this.BitPosition = 8; } public void Write<T>(T bit) { byte bitPosition = this.BitPosition - 1; while (true) { IL_114: uint arg_E8_0 = 1652849313u; while (true) { uint num; switch ((num = (arg_E8_0 ^ 140211783u)) % 8u) { case 0u: goto IL_114; case 1u: this.BitValue |= (byte)(1 << (int)this.BitPosition); arg_E8_0 = (num * 1776002121u ^ 345365165u); continue; case 2u: this.writer.WriteUInt8(this.BitValue); this.BitValue = 0; arg_E8_0 = (num * 1665770702u ^ 1806027702u); continue; case 3u: arg_E8_0 = ((this.BitPosition != 0) ? 318830762u : 1370622304u); continue; case 4u: arg_E8_0 = (((!BitPack.smethod_2(bit, BitPack.smethod_1())) ? 183628340u : 963482438u) ^ num * 100361154u); continue; case 6u: this.BitPosition = bitPosition; arg_E8_0 = (num * 2241878331u ^ 3402166817u); continue; case 7u: this.BitPosition = 8; arg_E8_0 = (num * 4265802296u ^ 648773005u); continue; } return; } } } public void Write<T>(T bit, int count) { checked { int num = count - 1; while (true) { IL_7F: int arg_59_0 = (num >= 0) ? 429789314 : 61619512; while (true) { switch ((arg_59_0 ^ 250283959) % 4) { case 0: arg_59_0 = 429789314; continue; case 1: this.Write<T>((T)((object)BitPack.smethod_5(BitPack.smethod_3(bit) >> num & 1, BitPack.smethod_4(typeof(T).TypeHandle)))); num--; arg_59_0 = 1923155801; continue; case 2: goto IL_7F; } return; } } } } public void WriteStringLength(string data, int count) { int bit = BitPack.smethod_7(BitPack.smethod_6(), data).Length; this.Write<int>(bit, count); } public void WriteGuidMask(params byte[] order) { byte b = 0; while (true) { IL_72: uint arg_46_0 = ((int)b >= order.Length) ? 742699901u : 1831024341u; while (true) { uint num; switch ((num = (arg_46_0 ^ 13696436u)) % 5u) { case 0u: arg_46_0 = 1831024341u; continue; case 2u: this.Write<byte>(this.GuidBytes[(int)order[(int)b]]); arg_46_0 = 229046717u; continue; case 3u: goto IL_72; case 4u: b += 1; arg_46_0 = (num * 4239758255u ^ 2295222825u); continue; } return; } } } public void WriteGuildGuidMask(params byte[] order) { byte b = 0; while (true) { IL_5D: int arg_37_0 = ((int)b >= order.Length) ? -1778762875 : -1883923476; while (true) { switch ((arg_37_0 ^ -1645389830) % 4) { case 0: arg_37_0 = -1883923476; continue; case 1: goto IL_5D; case 2: this.Write<byte>(this.GuildGuidBytes[(int)order[(int)b]]); b += 1; arg_37_0 = -1446034705; continue; } return; } } } public void WriteTargetGuidMask(params byte[] order) { byte b = 0; while (true) { IL_87: uint arg_63_0 = 2618047285u; while (true) { uint num; switch ((num = (arg_63_0 ^ 3831443114u)) % 6u) { case 0u: b += 1; arg_63_0 = (num * 355054239u ^ 1756138953u); continue; case 1u: this.Write<byte>(this.TargetGuidBytes[(int)order[(int)b]]); arg_63_0 = 2753277804u; continue; case 3u: arg_63_0 = (((int)b >= order.Length) ? 2790138570u : 3544108679u); continue; case 4u: goto IL_87; case 5u: arg_63_0 = (num * 232588484u ^ 3538207119u); continue; } return; } } } public void WriteTransportGuidMask(params byte[] order) { byte b = 0; while (true) { IL_71: uint arg_51_0 = 3651688635u; while (true) { uint num; switch ((num = (arg_51_0 ^ 2962787270u)) % 5u) { case 0u: goto IL_71; case 2u: this.Write<byte>(this.TransportGuidBytes[(int)order[(int)b]]); b += 1; arg_51_0 = 2933615343u; continue; case 3u: arg_51_0 = (((int)b < order.Length) ? 3875957300u : 3070195006u); continue; case 4u: arg_51_0 = (num * 2812235026u ^ 1416961317u); continue; } return; } } } public void WriteGuidBytes(params byte[] order) { byte b = 0; while (true) { IL_A9: uint arg_76_0 = ((int)b < order.Length) ? 3203827650u : 3066299643u; while (true) { uint num; switch ((num = (arg_76_0 ^ 3612932043u)) % 6u) { case 0u: goto IL_A9; case 1u: arg_76_0 = ((this.GuidBytes[(int)order[(int)b]] == 0) ? 2220640897u : 3843280124u); continue; case 2u: b += 1; arg_76_0 = 3638058699u; continue; case 3u: arg_76_0 = 3203827650u; continue; case 5u: this.writer.WriteUInt8(this.GuidBytes[(int)order[(int)b]] ^ 1); arg_76_0 = (num * 3407355055u ^ 1112749080u); continue; } return; } } } public void WriteGuildGuidBytes(params byte[] order) { byte b = 0; while (true) { IL_B8: uint arg_90_0 = 2294763294u; while (true) { uint num; switch ((num = (arg_90_0 ^ 2510344227u)) % 7u) { case 0u: goto IL_B8; case 1u: arg_90_0 = (num * 1299295679u ^ 1938888267u); continue; case 2u: arg_90_0 = (((int)b >= order.Length) ? 3912687287u : 2895310131u); continue; case 3u: this.writer.WriteUInt8(this.GuildGuidBytes[(int)order[(int)b]] ^ 1); arg_90_0 = (num * 414783976u ^ 1115128758u); continue; case 4u: arg_90_0 = ((this.GuildGuidBytes[(int)order[(int)b]] != 0) ? 3419106966u : 2724594366u); continue; case 6u: b += 1; arg_90_0 = 3930591688u; continue; } return; } } } public void WriteTargetGuidBytes(params byte[] order) { byte b = 0; while (true) { IL_B8: uint arg_90_0 = 44758558u; while (true) { uint num; switch ((num = (arg_90_0 ^ 182393944u)) % 7u) { case 0u: this.writer.WriteUInt8(this.TargetGuidBytes[(int)order[(int)b]] ^ 1); arg_90_0 = (num * 2324142117u ^ 3197070114u); continue; case 2u: arg_90_0 = (num * 3083810847u ^ 1890738461u); continue; case 3u: arg_90_0 = (((int)b >= order.Length) ? 1389107581u : 97734117u); continue; case 4u: b += 1; arg_90_0 = 982699879u; continue; case 5u: goto IL_B8; case 6u: arg_90_0 = ((this.TargetGuidBytes[(int)order[(int)b]] != 0) ? 561474180u : 627091182u); continue; } return; } } } public void WriteTransportGuidBytes(params byte[] order) { byte b = 0; while (true) { IL_B8: uint arg_90_0 = 4089021566u; while (true) { uint num; switch ((num = (arg_90_0 ^ 4098104018u)) % 7u) { case 0u: arg_90_0 = (((int)b < order.Length) ? 3191731948u : 2330085967u); continue; case 1u: arg_90_0 = (num * 527965989u ^ 2994918719u); continue; case 2u: b += 1; arg_90_0 = 2700875747u; continue; case 3u: this.writer.WriteUInt8(this.TransportGuidBytes[(int)order[(int)b]] ^ 1); arg_90_0 = (num * 388758195u ^ 2771035326u); continue; case 5u: goto IL_B8; case 6u: arg_90_0 = ((this.TransportGuidBytes[(int)order[(int)b]] != 0) ? 2424527978u : 3731129878u); continue; } return; } } } public void Flush() { this.writer.WriteUInt8(this.BitValue); this.BitValue = 0; this.BitPosition = 8; } static byte[] smethod_0(ulong ulong_0) { return BitConverter.GetBytes(ulong_0); } static CultureInfo smethod_1() { return CultureInfo.InvariantCulture; } static bool smethod_2(object object_0, IFormatProvider iformatProvider_0) { return Convert.ToBoolean(object_0, iformatProvider_0); } static int smethod_3(object object_0) { return Convert.ToInt32(object_0); } static Type smethod_4(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static object smethod_5(object object_0, Type type_0) { return Convert.ChangeType(object_0, type_0); } static Encoding smethod_6() { return Encoding.UTF8; } static byte[] smethod_7(Encoding encoding_0, string string_0) { return encoding_0.GetBytes(string_0); } } } <file_sep>/Framework.Constants.Net/ClientMessage.cs using System; namespace Framework.Constants.Net { public enum ClientMessage : ushort { EnableCrypt2 = 14183, ChatMessageSay = 14315, ChatMessageYell = 65535, ChatMessageWhisper = 65535, AuthContinuedSession = 14182, test = 14180, AuthSession, Ping = 6295, LogDisconnect = 14185, ActivePlayer = 65535, CancelAura = 12717, CastSpell = 12938, ObjectUpdateFailed = 65535, ViolenceLevel = 12674, DBQueryBulk = 65535, GenerateRandomCharacterName = 13799, EnumCharacters, PlayerLogin = 13802, LoadingScreenNotify = 13815, SetActionButton = 13879, CreateCharacter = 13893, QueryPlayerName = 13965, QueryRealmName, UITimeRequest = 13980, CharDelete, CliSetSpecialization = 65535, CliLearnTalents = 65535, CliQueryCreature = 12894, CliQueryGameObject, CliQueryNPCText = 65535, CliTalkToGossip = 65535, CliLogoutRequest = 13531, CliSetSelection = 13612, MoveStartForward = 14820, MoveStartBackward, MoveStop, MoveStartStrafeLeft = 65535, MoveStartStrafeRight = 65535, MoveStopStrafe = 65535, MoveJump = 14826, MoveStartTurnLeft = 14828, MoveStartTurnRight, MoveStopTurn, MoveStartPitchUp = 65535, MoveStartPitchDown = 65535, MoveStopPitch = 65535, MoveSetRunMode = 65535, MoveSetWalkMode = 65535, MoveFallLand = 14841, MoveStartSwim, MoveStopSwim, MoveToggleCollisionCheat = 65535, MoveSetFacing = 65535, MoveSetPitch = 65535, MoveHeartbeat = 14861, MoveFallReset = 65535, MoveSetFly = 65535, MoveStartAscend = 65535, MoveStopAscend = 65535, MoveChangeTransport = 82, MoveStartDescend = 65535, MoveDismissVehicle = 65535, Emote = 13450, EquipItem = 14746, DestroyItem = 12929, UnEquipItem = 14749, TransferInitiate = 45518, GetGarrisonInfo = 3067, UpgradeGarrison = 2717 } } <file_sep>/Bgs.Protocol.Account.V1/GameAccountSessionNotification.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameAccountSessionNotification : IMessage<GameAccountSessionNotification>, IEquatable<GameAccountSessionNotification>, IDeepCloneable<GameAccountSessionNotification>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameAccountSessionNotification.__c __9 = new GameAccountSessionNotification.__c(); internal GameAccountSessionNotification cctor>b__29_0() { return new GameAccountSessionNotification(); } } private static readonly MessageParser<GameAccountSessionNotification> _parser = new MessageParser<GameAccountSessionNotification>(new Func<GameAccountSessionNotification>(GameAccountSessionNotification.__c.__9.<.cctor>b__29_0)); public const int GameAccountFieldNumber = 1; private GameAccountHandle gameAccount_; public const int SessionInfoFieldNumber = 2; private GameSessionUpdateInfo sessionInfo_; public static MessageParser<GameAccountSessionNotification> Parser { get { return GameAccountSessionNotification._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[31]; } } MessageDescriptor IMessage.Descriptor { get { return GameAccountSessionNotification.Descriptor; } } public GameAccountHandle GameAccount { get { return this.gameAccount_; } set { this.gameAccount_ = value; } } public GameSessionUpdateInfo SessionInfo { get { return this.sessionInfo_; } set { this.sessionInfo_ = value; } } public GameAccountSessionNotification() { } public GameAccountSessionNotification(GameAccountSessionNotification other) : this() { while (true) { IL_60: int arg_4A_0 = 620424843; while (true) { switch ((arg_4A_0 ^ 1087377796) % 3) { case 1: this.GameAccount = ((other.gameAccount_ != null) ? other.GameAccount.Clone() : null); this.SessionInfo = ((other.sessionInfo_ != null) ? other.SessionInfo.Clone() : null); arg_4A_0 = 279416032; continue; case 2: goto IL_60; } return; } } } public GameAccountSessionNotification Clone() { return new GameAccountSessionNotification(this); } public override bool Equals(object other) { return this.Equals(other as GameAccountSessionNotification); } public bool Equals(GameAccountSessionNotification other) { if (other == null) { goto IL_6D; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 1561408686) % 9) { case 0: goto IL_6D; case 1: return false; case 2: return false; case 3: return false; case 4: return true; case 5: goto IL_B5; case 7: arg_77_0 = ((!GameAccountSessionNotification.smethod_0(this.SessionInfo, other.SessionInfo)) ? 1098362412 : 468746630); continue; case 8: arg_77_0 = ((!GameAccountSessionNotification.smethod_0(this.GameAccount, other.GameAccount)) ? 1540688979 : 829835220); continue; } break; } return true; IL_6D: arg_77_0 = 1340440498; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? 168773056 : 1297884187); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.gameAccount_ != null) { goto IL_36; } goto IL_89; uint arg_5D_0; while (true) { IL_58: uint num2; switch ((num2 = (arg_5D_0 ^ 4269037885u)) % 5u) { case 1u: num ^= GameAccountSessionNotification.smethod_1(this.SessionInfo); arg_5D_0 = (num2 * 3144237901u ^ 3082735212u); continue; case 2u: goto IL_36; case 3u: num ^= GameAccountSessionNotification.smethod_1(this.GameAccount); arg_5D_0 = (num2 * 3603458143u ^ 1915968483u); continue; case 4u: goto IL_89; } break; } return num; IL_36: arg_5D_0 = 2444664810u; goto IL_58; IL_89: arg_5D_0 = ((this.sessionInfo_ != null) ? 2403383514u : 4286097687u); goto IL_58; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.gameAccount_ != null) { goto IL_60; } goto IL_96; uint arg_6A_0; while (true) { IL_65: uint num; switch ((num = (arg_6A_0 ^ 1796036701u)) % 5u) { case 0u: goto IL_60; case 1u: goto IL_96; case 3u: output.WriteRawTag(10); output.WriteMessage(this.GameAccount); arg_6A_0 = (num * 3002749556u ^ 2919084897u); continue; case 4u: output.WriteRawTag(18); output.WriteMessage(this.SessionInfo); arg_6A_0 = (num * 3252380848u ^ 3993032764u); continue; } break; } return; IL_60: arg_6A_0 = 2127140168u; goto IL_65; IL_96: arg_6A_0 = ((this.sessionInfo_ != null) ? 1776467666u : 676562540u); goto IL_65; } public int CalculateSize() { int num = 0; if (this.gameAccount_ != null) { goto IL_3B; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 1316726899u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SessionInfo); arg_64_0 = (num2 * 720325476u ^ 1831873192u); continue; case 2u: goto IL_3B; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.GameAccount); arg_64_0 = (num2 * 3278385078u ^ 448032295u); continue; case 4u: goto IL_90; } break; } return num; IL_3B: arg_64_0 = 1912620540u; goto IL_5F; IL_90: arg_64_0 = ((this.sessionInfo_ != null) ? 290647076u : 997000276u); goto IL_5F; } public void MergeFrom(GameAccountSessionNotification other) { if (other == null) { goto IL_E3; } goto IL_14D; uint arg_105_0; while (true) { IL_100: uint num; switch ((num = (arg_105_0 ^ 391428166u)) % 11u) { case 0u: this.GameAccount.MergeFrom(other.GameAccount); arg_105_0 = 5465253u; continue; case 1u: return; case 2u: goto IL_E3; case 3u: goto IL_14D; case 4u: arg_105_0 = (((this.sessionInfo_ != null) ? 729509147u : 680641853u) ^ num * 979568515u); continue; case 6u: arg_105_0 = (((this.gameAccount_ != null) ? 3114116859u : 2216677420u) ^ num * 1168125988u); continue; case 7u: this.SessionInfo.MergeFrom(other.SessionInfo); arg_105_0 = 676181792u; continue; case 8u: this.gameAccount_ = new GameAccountHandle(); arg_105_0 = (num * 4226349050u ^ 3333713223u); continue; case 9u: arg_105_0 = ((other.sessionInfo_ == null) ? 676181792u : 1991817574u); continue; case 10u: this.sessionInfo_ = new GameSessionUpdateInfo(); arg_105_0 = (num * 1353236465u ^ 2062774800u); continue; } break; } return; IL_E3: arg_105_0 = 535752065u; goto IL_100; IL_14D: arg_105_0 = ((other.gameAccount_ != null) ? 1154155188u : 5465253u); goto IL_100; } public void MergeFrom(CodedInputStream input) { while (true) { IL_180: uint num; uint arg_130_0 = ((num = input.ReadTag()) == 0u) ? 160061623u : 1773571977u; while (true) { uint num2; switch ((num2 = (arg_130_0 ^ 526212172u)) % 13u) { case 0u: arg_130_0 = 1773571977u; continue; case 1u: this.sessionInfo_ = new GameSessionUpdateInfo(); arg_130_0 = (num2 * 1907170149u ^ 1430850974u); continue; case 2u: input.SkipLastField(); arg_130_0 = (num2 * 2648699100u ^ 2710162912u); continue; case 3u: arg_130_0 = (num2 * 1876571138u ^ 2498605988u); continue; case 4u: input.ReadMessage(this.sessionInfo_); arg_130_0 = 1519602736u; continue; case 6u: goto IL_180; case 7u: arg_130_0 = ((num == 10u) ? 1725126622u : 1044036104u); continue; case 8u: input.ReadMessage(this.gameAccount_); arg_130_0 = 385329030u; continue; case 9u: this.gameAccount_ = new GameAccountHandle(); arg_130_0 = (num2 * 1783360941u ^ 1600370238u); continue; case 10u: arg_130_0 = (((num != 18u) ? 2819555680u : 2371564103u) ^ num2 * 3468401408u); continue; case 11u: arg_130_0 = ((this.sessionInfo_ != null) ? 1382408375u : 1759646777u); continue; case 12u: arg_130_0 = ((this.gameAccount_ != null) ? 1860249975u : 138489793u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/StringValue.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class StringValue : IMessage<StringValue>, IMessage, IEquatable<StringValue>, IDeepCloneable<StringValue> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly StringValue.__c __9 = new StringValue.__c(); internal StringValue cctor>b__24_0() { return new StringValue(); } } private static readonly MessageParser<StringValue> _parser = new MessageParser<StringValue>(new Func<StringValue>(StringValue.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private string value_ = ""; public static MessageParser<StringValue> Parser { get { return StringValue._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return StringValue.Descriptor; } } public string Value { get { return this.value_; } set { this.value_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public StringValue() { } public StringValue(StringValue other) : this() { this.value_ = other.value_; } public StringValue Clone() { return new StringValue(this); } public override bool Equals(object other) { return this.Equals(other as StringValue); } public bool Equals(StringValue other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1263802105) % 7) { case 0: return false; case 1: return true; case 2: arg_48_0 = (StringValue.smethod_0(this.Value, other.Value) ? -141375324 : -260536584); continue; case 3: return false; case 4: goto IL_7A; case 5: goto IL_12; } break; } return true; IL_12: arg_48_0 = -1200080730; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1836947825 : -1933936153); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 763514593u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 175983276u)) % 4u) { case 0u: num ^= StringValue.smethod_2(this.Value); arg_52_0 = (num2 * 3783353000u ^ 1448269218u); continue; case 1u: arg_52_0 = (((StringValue.smethod_1(this.Value) != 0) ? 3858043379u : 3360361697u) ^ num2 * 3573188143u); continue; case 3u: goto IL_6E; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (StringValue.smethod_1(this.Value) != 0) { while (true) { IL_60: uint arg_44_0 = 90788105u; while (true) { uint num; switch ((num = (arg_44_0 ^ 824169899u)) % 4u) { case 0u: goto IL_60; case 1u: output.WriteString(this.Value); arg_44_0 = (num * 3149218996u ^ 2104094208u); continue; case 2u: output.WriteRawTag(10); arg_44_0 = (num * 3732086352u ^ 938894630u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_70: uint arg_54_0 = 2796195775u; while (true) { uint num2; switch ((num2 = (arg_54_0 ^ 3793409952u)) % 4u) { case 0u: goto IL_70; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Value); arg_54_0 = (num2 * 831506503u ^ 1421556553u); continue; case 3u: arg_54_0 = (((StringValue.smethod_1(this.Value) == 0) ? 1473366872u : 13810999u) ^ num2 * 2307889566u); continue; } return num; } } return num; } public void MergeFrom(StringValue other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 171763367u)) % 5u) { case 0u: goto IL_2D; case 2u: this.Value = other.Value; arg_37_0 = (num * 108128614u ^ 4220800551u); continue; case 3u: goto IL_63; case 4u: return; } break; } return; IL_2D: arg_37_0 = 1741970253u; goto IL_32; IL_63: arg_37_0 = ((StringValue.smethod_1(other.Value) == 0) ? 867908447u : 875443955u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) == 0u) ? 54247302u : 207229117u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 410145730u)) % 7u) { case 0u: arg_72_0 = (num2 * 1062902489u ^ 1139187804u); continue; case 1u: input.SkipLastField(); arg_72_0 = (num2 * 1448371858u ^ 3470927109u); continue; case 3u: arg_72_0 = 207229117u; continue; case 4u: this.Value = input.ReadString(); arg_72_0 = 1046130945u; continue; case 5u: arg_72_0 = ((num == 10u) ? 1286828698u : 277419307u); continue; case 6u: goto IL_A9; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } static int smethod_2(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/BoolValue.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class BoolValue : IMessage<BoolValue>, IEquatable<BoolValue>, IDeepCloneable<BoolValue>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BoolValue.__c __9 = new BoolValue.__c(); internal BoolValue cctor>b__24_0() { return new BoolValue(); } } private static readonly MessageParser<BoolValue> _parser = new MessageParser<BoolValue>(new Func<BoolValue>(BoolValue.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private bool value_; public static MessageParser<BoolValue> Parser { get { return BoolValue._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return BoolValue.Descriptor; } } public bool Value { get { return this.value_; } set { this.value_ = value; } } public BoolValue() { } public BoolValue(BoolValue other) : this() { while (true) { IL_3E: uint arg_26_0 = 1769763656u; while (true) { uint num; switch ((num = (arg_26_0 ^ 1984974658u)) % 3u) { case 0u: goto IL_3E; case 1u: this.value_ = other.value_; arg_26_0 = (num * 2309130594u ^ 3708433242u); continue; } return; } } } public BoolValue Clone() { return new BoolValue(this); } public override bool Equals(object other) { return this.Equals(other as BoolValue); } public bool Equals(BoolValue other) { if (other == null) { goto IL_39; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ 641488445) % 7) { case 0: goto IL_39; case 1: goto IL_75; case 2: return false; case 3: return true; case 4: return false; case 5: arg_43_0 = ((this.Value == other.Value) ? 1070099383 : 1741206112); continue; } break; } return true; IL_39: arg_43_0 = 312997048; goto IL_3E; IL_75: arg_43_0 = ((other == this) ? 21110083 : 1048484400); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 1270096041u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 2108046935u)) % 4u) { case 1u: num ^= this.Value.GetHashCode(); arg_50_0 = (num2 * 4008933902u ^ 4157047061u); continue; case 2u: arg_50_0 = (((!this.Value) ? 697887751u : 2020163018u) ^ num2 * 975738354u); continue; case 3u: goto IL_6C; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value) { while (true) { IL_5A: uint arg_3E_0 = 2143557810u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 275318803u)) % 4u) { case 0u: output.WriteBool(this.Value); arg_3E_0 = (num * 2889550032u ^ 2838278952u); continue; case 1u: output.WriteRawTag(8); arg_3E_0 = (num * 3252564579u ^ 3918936248u); continue; case 2u: goto IL_5A; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_5F: uint arg_43_0 = 3788332925u; while (true) { uint num2; switch ((num2 = (arg_43_0 ^ 4185801590u)) % 4u) { case 0u: goto IL_5F; case 2u: num += 2; arg_43_0 = (num2 * 3721250531u ^ 2212888493u); continue; case 3u: arg_43_0 = (((!this.Value) ? 1622309267u : 2145179052u) ^ num2 * 2669066972u); continue; } return num; } } return num; } public void MergeFrom(BoolValue other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 3784576412u)) % 5u) { case 0u: this.Value = other.Value; arg_37_0 = (num * 1134764340u ^ 3585724961u); continue; case 2u: return; case 3u: goto IL_12; case 4u: goto IL_63; } break; } return; IL_12: arg_37_0 = 3645322272u; goto IL_32; IL_63: arg_37_0 = (other.Value ? 3392203467u : 3843024525u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A8: uint num; uint arg_71_0 = ((num = input.ReadTag()) == 0u) ? 216543058u : 314750847u; while (true) { uint num2; switch ((num2 = (arg_71_0 ^ 446421772u)) % 7u) { case 0u: input.SkipLastField(); arg_71_0 = (num2 * 131220957u ^ 1819764258u); continue; case 1u: arg_71_0 = (num2 * 3991844700u ^ 1888577468u); continue; case 2u: this.Value = input.ReadBool(); arg_71_0 = 454504576u; continue; case 3u: goto IL_A8; case 4u: arg_71_0 = 314750847u; continue; case 5u: arg_71_0 = ((num == 8u) ? 816712489u : 494306207u); continue; } return; } } } } } <file_sep>/Bgs.Protocol.Authentication.V1/ModuleMessageRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class ModuleMessageRequest : IMessage<ModuleMessageRequest>, IEquatable<ModuleMessageRequest>, IDeepCloneable<ModuleMessageRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ModuleMessageRequest.__c __9 = new ModuleMessageRequest.__c(); internal ModuleMessageRequest cctor>b__29_0() { return new ModuleMessageRequest(); } } private static readonly MessageParser<ModuleMessageRequest> _parser = new MessageParser<ModuleMessageRequest>(new Func<ModuleMessageRequest>(ModuleMessageRequest.__c.__9.<.cctor>b__29_0)); public const int ModuleIdFieldNumber = 1; private int moduleId_; public const int MessageFieldNumber = 2; private ByteString message_ = ByteString.Empty; public static MessageParser<ModuleMessageRequest> Parser { get { return ModuleMessageRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return ModuleMessageRequest.Descriptor; } } public int ModuleId { get { return this.moduleId_; } set { this.moduleId_ = value; } } public ByteString Message { get { return this.message_; } set { this.message_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public ModuleMessageRequest() { } public ModuleMessageRequest(ModuleMessageRequest other) : this() { this.moduleId_ = other.moduleId_; this.message_ = other.message_; } public ModuleMessageRequest Clone() { return new ModuleMessageRequest(this); } public override bool Equals(object other) { return this.Equals(other as ModuleMessageRequest); } public bool Equals(ModuleMessageRequest other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ 1542479470) % 9) { case 0: arg_72_0 = ((this.ModuleId == other.ModuleId) ? 1639838774 : 2042867377); continue; case 1: return false; case 2: return false; case 3: goto IL_41; case 4: goto IL_B0; case 6: arg_72_0 = ((this.Message != other.Message) ? 628911309 : 793882916); continue; case 7: return true; case 8: return false; } break; } return true; IL_41: arg_72_0 = 1549714871; goto IL_6D; IL_B0: arg_72_0 = ((other != this) ? 993188932 : 307329844); goto IL_6D; } public override int GetHashCode() { int num = 1; while (true) { IL_7F: uint arg_63_0 = 531676141u; while (true) { uint num2; switch ((num2 = (arg_63_0 ^ 1999646688u)) % 4u) { case 0u: goto IL_7F; case 1u: num ^= this.ModuleId.GetHashCode(); arg_63_0 = (((this.Message.Length == 0) ? 3898083131u : 3079401746u) ^ num2 * 2043049836u); continue; case 2u: num ^= this.Message.GetHashCode(); arg_63_0 = (num2 * 3606793103u ^ 2081156117u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_9B: uint arg_7B_0 = 4155028264u; while (true) { uint num; switch ((num = (arg_7B_0 ^ 2926507677u)) % 5u) { case 0u: goto IL_9B; case 1u: output.WriteRawTag(18); arg_7B_0 = (num * 1927068880u ^ 2924592135u); continue; case 2u: output.WriteInt32(this.ModuleId); arg_7B_0 = (((this.Message.Length == 0) ? 3323606335u : 3365270438u) ^ num * 1188699298u); continue; case 3u: output.WriteBytes(this.Message); arg_7B_0 = (num * 3537584055u ^ 3214314579u); continue; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_80: uint arg_64_0 = 144551469u; while (true) { uint num2; switch ((num2 = (arg_64_0 ^ 240356304u)) % 4u) { case 0u: goto IL_80; case 1u: num += 1 + CodedOutputStream.ComputeInt32Size(this.ModuleId); arg_64_0 = (((this.Message.Length == 0) ? 253002282u : 167928735u) ^ num2 * 3207193553u); continue; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Message); arg_64_0 = (num2 * 2982261712u ^ 1631927047u); continue; } return num; } } return num; } public void MergeFrom(ModuleMessageRequest other) { if (other == null) { goto IL_71; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 4029559410u)) % 7u) { case 0u: goto IL_71; case 2u: this.ModuleId = other.ModuleId; arg_7B_0 = (num * 2249628694u ^ 1651750243u); continue; case 3u: goto IL_B2; case 4u: this.Message = other.Message; arg_7B_0 = (num * 1033054816u ^ 1739415604u); continue; case 5u: return; case 6u: arg_7B_0 = ((other.Message.Length != 0) ? 4044488294u : 2236526516u); continue; } break; } return; IL_71: arg_7B_0 = 2282081470u; goto IL_76; IL_B2: arg_7B_0 = ((other.ModuleId == 0) ? 2636534361u : 3372574597u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_ED: uint num; uint arg_AD_0 = ((num = input.ReadTag()) != 0u) ? 1058508433u : 1766903877u; while (true) { uint num2; switch ((num2 = (arg_AD_0 ^ 485959174u)) % 9u) { case 0u: this.ModuleId = input.ReadInt32(); arg_AD_0 = 1489327786u; continue; case 1u: input.SkipLastField(); arg_AD_0 = (num2 * 1018673584u ^ 1412776485u); continue; case 2u: arg_AD_0 = 1058508433u; continue; case 3u: arg_AD_0 = (num2 * 4230974440u ^ 195026389u); continue; case 4u: this.Message = input.ReadBytes(); arg_AD_0 = 1005101621u; continue; case 5u: arg_AD_0 = ((num == 8u) ? 396980799u : 1628599047u); continue; case 7u: goto IL_ED; case 8u: arg_AD_0 = (((num == 18u) ? 1070496585u : 1967516742u) ^ num2 * 2287146963u); continue; } return; } } } } } <file_sep>/Bgs.Protocol/Attribute.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Attribute : IMessage<Attribute>, IEquatable<Attribute>, IDeepCloneable<Attribute>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Attribute.__c __9 = new Attribute.__c(); internal Attribute cctor>b__29_0() { return new Attribute(); } } private static readonly MessageParser<Attribute> _parser = new MessageParser<Attribute>(new Func<Attribute>(Attribute.__c.__9.<.cctor>b__29_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int ValueFieldNumber = 2; private Variant value_; public static MessageParser<Attribute> Parser { get { return Attribute._parser; } } public static MessageDescriptor Descriptor { get { return AttributeTypesReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return Attribute.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_33<string>(58016685u)); } } public Variant Value { get { return this.value_; } set { this.value_ = value; } } public Attribute() { } public Attribute(Attribute other) : this() { this.name_ = other.name_; this.Value = ((other.value_ != null) ? other.Value.Clone() : null); } public Attribute Clone() { return new Attribute(this); } public override bool Equals(object other) { return this.Equals(other as Attribute); } public bool Equals(Attribute other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ -397246943) % 9) { case 0: goto IL_B5; case 2: arg_77_0 = (Attribute.smethod_0(this.Name, other.Name) ? -908047197 : -764957006); continue; case 3: return false; case 4: arg_77_0 = (Attribute.smethod_1(this.Value, other.Value) ? -1104395530 : -19163910); continue; case 5: return true; case 6: goto IL_15; case 7: return false; case 8: return false; } break; } return true; IL_15: arg_77_0 = -98832027; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? -892104369 : -908873573); goto IL_72; } public override int GetHashCode() { return 1 ^ Attribute.smethod_2(this.Name) ^ Attribute.smethod_2(this.Value); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); while (true) { IL_7A: uint arg_5A_0 = 3892346721u; while (true) { uint num; switch ((num = (arg_5A_0 ^ 3085630562u)) % 5u) { case 0u: goto IL_7A; case 1u: output.WriteRawTag(18); arg_5A_0 = (num * 1185210585u ^ 1416897137u); continue; case 2u: output.WriteMessage(this.Value); arg_5A_0 = (num * 2099161203u ^ 542558782u); continue; case 3u: output.WriteString(this.Name); arg_5A_0 = (num * 2513104209u ^ 2041399234u); continue; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeStringSize(this.Name)) + (1 + CodedOutputStream.ComputeMessageSize(this.Value)); } public void MergeFrom(Attribute other) { if (other == null) { goto IL_5C; } goto IL_FC; uint arg_BC_0; while (true) { IL_B7: uint num; switch ((num = (arg_BC_0 ^ 547831224u)) % 9u) { case 0u: this.Name = other.Name; arg_BC_0 = (num * 1774095613u ^ 3682209267u); continue; case 1u: this.value_ = new Variant(); arg_BC_0 = (num * 424544086u ^ 2201794949u); continue; case 2u: arg_BC_0 = ((other.value_ != null) ? 814509243u : 1434468247u); continue; case 3u: goto IL_5C; case 5u: arg_BC_0 = (((this.value_ == null) ? 356394885u : 138452319u) ^ num * 4209913508u); continue; case 6u: return; case 7u: goto IL_FC; case 8u: this.Value.MergeFrom(other.Value); arg_BC_0 = 1434468247u; continue; } break; } return; IL_5C: arg_BC_0 = 1805810552u; goto IL_B7; IL_FC: arg_BC_0 = ((Attribute.smethod_3(other.Name) == 0) ? 1026070909u : 1029918366u); goto IL_B7; } public void MergeFrom(CodedInputStream input) { while (true) { IL_153: uint num; uint arg_107_0 = ((num = input.ReadTag()) != 0u) ? 265423580u : 1712036896u; while (true) { uint num2; switch ((num2 = (arg_107_0 ^ 1437190637u)) % 12u) { case 0u: arg_107_0 = 265423580u; continue; case 1u: arg_107_0 = ((num == 10u) ? 819515532u : 1809132943u); continue; case 2u: arg_107_0 = (((num != 18u) ? 2721404663u : 4019503450u) ^ num2 * 3297885908u); continue; case 3u: arg_107_0 = ((this.value_ != null) ? 1786109682u : 1601053971u); continue; case 4u: goto IL_153; case 6u: this.value_ = new Variant(); arg_107_0 = (num2 * 1541781704u ^ 231237762u); continue; case 7u: input.ReadMessage(this.value_); arg_107_0 = 585932897u; continue; case 8u: arg_107_0 = (num2 * 2875010486u ^ 3672313057u); continue; case 9u: this.Name = input.ReadString(); arg_107_0 = 1313421314u; continue; case 10u: input.SkipLastField(); arg_107_0 = (num2 * 3827489861u ^ 1712042071u); continue; case 11u: arg_107_0 = (num2 * 2718028517u ^ 2222053546u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(object object_0) { return object_0.GetHashCode(); } static int smethod_3(string string_0) { return string_0.Length; } } } <file_sep>/Google.Protobuf.-PrivateImplementationDetails-.cs using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [CompilerGenerated] internal sealed class <PrivateImplementationDetails> { [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 44)] private struct Struct17 { } internal static readonly Google.Protobuf.<PrivateImplementationDetails>.Struct17 CA6D43393CCBD523D8BC1CAC86DE8DC9F018B896; } <file_sep>/Bgs.Protocol.Account.V1/AccountFieldTags.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountFieldTags : IMessage<AccountFieldTags>, IEquatable<AccountFieldTags>, IDeepCloneable<AccountFieldTags>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountFieldTags.__c __9 = new AccountFieldTags.__c(); internal AccountFieldTags cctor>b__49_0() { return new AccountFieldTags(); } } private static readonly MessageParser<AccountFieldTags> _parser = new MessageParser<AccountFieldTags>(new Func<AccountFieldTags>(AccountFieldTags.__c.__9.<.cctor>b__49_0)); public const int AccountLevelInfoTagFieldNumber = 2; private uint accountLevelInfoTag_; public const int PrivacyInfoTagFieldNumber = 3; private uint privacyInfoTag_; public const int ParentalControlInfoTagFieldNumber = 4; private uint parentalControlInfoTag_; public const int GameLevelInfoTagsFieldNumber = 7; private static readonly FieldCodec<ProgramTag> _repeated_gameLevelInfoTags_codec; private readonly RepeatedField<ProgramTag> gameLevelInfoTags_ = new RepeatedField<ProgramTag>(); public const int GameStatusTagsFieldNumber = 9; private static readonly FieldCodec<ProgramTag> _repeated_gameStatusTags_codec; private readonly RepeatedField<ProgramTag> gameStatusTags_ = new RepeatedField<ProgramTag>(); public const int GameAccountTagsFieldNumber = 11; private static readonly FieldCodec<RegionTag> _repeated_gameAccountTags_codec; private readonly RepeatedField<RegionTag> gameAccountTags_ = new RepeatedField<RegionTag>(); public static MessageParser<AccountFieldTags> Parser { get { return AccountFieldTags._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[13]; } } MessageDescriptor IMessage.Descriptor { get { return AccountFieldTags.Descriptor; } } public uint AccountLevelInfoTag { get { return this.accountLevelInfoTag_; } set { this.accountLevelInfoTag_ = value; } } public uint PrivacyInfoTag { get { return this.privacyInfoTag_; } set { this.privacyInfoTag_ = value; } } public uint ParentalControlInfoTag { get { return this.parentalControlInfoTag_; } set { this.parentalControlInfoTag_ = value; } } public RepeatedField<ProgramTag> GameLevelInfoTags { get { return this.gameLevelInfoTags_; } } public RepeatedField<ProgramTag> GameStatusTags { get { return this.gameStatusTags_; } } public RepeatedField<RegionTag> GameAccountTags { get { return this.gameAccountTags_; } } public AccountFieldTags() { } public AccountFieldTags(AccountFieldTags other) : this() { this.accountLevelInfoTag_ = other.accountLevelInfoTag_; this.privacyInfoTag_ = other.privacyInfoTag_; this.parentalControlInfoTag_ = other.parentalControlInfoTag_; this.gameLevelInfoTags_ = other.gameLevelInfoTags_.Clone(); this.gameStatusTags_ = other.gameStatusTags_.Clone(); this.gameAccountTags_ = other.gameAccountTags_.Clone(); } public AccountFieldTags Clone() { return new AccountFieldTags(this); } public override bool Equals(object other) { return this.Equals(other as AccountFieldTags); } public bool Equals(AccountFieldTags other) { if (other == null) { goto IL_CA; } goto IL_185; int arg_127_0; while (true) { IL_122: switch ((arg_127_0 ^ 1495762588) % 17) { case 0: arg_127_0 = ((!this.gameStatusTags_.Equals(other.gameStatusTags_)) ? 489718452 : 220199713); continue; case 2: arg_127_0 = ((this.PrivacyInfoTag != other.PrivacyInfoTag) ? 734956148 : 1558150255); continue; case 3: return false; case 4: goto IL_CA; case 5: return true; case 6: return false; case 7: goto IL_185; case 8: return false; case 9: arg_127_0 = (this.gameLevelInfoTags_.Equals(other.gameLevelInfoTags_) ? 1853564229 : 938600069); continue; case 10: arg_127_0 = ((this.AccountLevelInfoTag != other.AccountLevelInfoTag) ? 1675769632 : 245276277); continue; case 11: return false; case 12: arg_127_0 = (this.gameAccountTags_.Equals(other.gameAccountTags_) ? 629296013 : 452130122); continue; case 13: return false; case 14: return false; case 15: arg_127_0 = ((this.ParentalControlInfoTag != other.ParentalControlInfoTag) ? 2039362759 : 560995139); continue; case 16: return false; } break; } return true; IL_CA: arg_127_0 = 550431555; goto IL_122; IL_185: arg_127_0 = ((other == this) ? 158377168 : 742562337); goto IL_122; } public override int GetHashCode() { int num = 1; while (true) { IL_140: uint arg_10F_0 = 2088997715u; while (true) { uint num2; switch ((num2 = (arg_10F_0 ^ 563640804u)) % 9u) { case 0u: arg_10F_0 = ((this.PrivacyInfoTag == 0u) ? 570266850u : 393840652u); continue; case 1u: num ^= this.AccountLevelInfoTag.GetHashCode(); arg_10F_0 = (num2 * 3215873138u ^ 114147050u); continue; case 2u: num ^= this.ParentalControlInfoTag.GetHashCode(); arg_10F_0 = (num2 * 2988552919u ^ 2394621992u); continue; case 3u: goto IL_140; case 4u: num ^= this.gameLevelInfoTags_.GetHashCode(); num ^= this.gameStatusTags_.GetHashCode(); num ^= this.gameAccountTags_.GetHashCode(); arg_10F_0 = 124131471u; continue; case 5u: arg_10F_0 = ((this.ParentalControlInfoTag == 0u) ? 1121698003u : 1325794201u); continue; case 6u: arg_10F_0 = (((this.AccountLevelInfoTag == 0u) ? 892132553u : 1522330217u) ^ num2 * 2472933185u); continue; case 8u: num ^= this.PrivacyInfoTag.GetHashCode(); arg_10F_0 = (num2 * 4228965756u ^ 279453826u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.AccountLevelInfoTag != 0u) { goto IL_DA; } goto IL_16F; uint arg_127_0; while (true) { IL_122: uint num; switch ((num = (arg_127_0 ^ 1952857112u)) % 11u) { case 0u: this.gameAccountTags_.WriteTo(output, AccountFieldTags._repeated_gameAccountTags_codec); arg_127_0 = (num * 1471932312u ^ 3759409331u); continue; case 1u: output.WriteRawTag(21); output.WriteFixed32(this.AccountLevelInfoTag); arg_127_0 = (num * 1431086317u ^ 4014176796u); continue; case 2u: goto IL_DA; case 3u: arg_127_0 = ((this.ParentalControlInfoTag != 0u) ? 1987839027u : 845581436u); continue; case 4u: output.WriteRawTag(37); arg_127_0 = (num * 2308537614u ^ 392603193u); continue; case 5u: output.WriteRawTag(29); output.WriteFixed32(this.PrivacyInfoTag); arg_127_0 = (num * 717941418u ^ 2551598687u); continue; case 7u: goto IL_16F; case 8u: this.gameStatusTags_.WriteTo(output, AccountFieldTags._repeated_gameStatusTags_codec); arg_127_0 = (num * 3467609849u ^ 31581909u); continue; case 9u: output.WriteFixed32(this.ParentalControlInfoTag); arg_127_0 = (num * 3099116267u ^ 2508632981u); continue; case 10u: this.gameLevelInfoTags_.WriteTo(output, AccountFieldTags._repeated_gameLevelInfoTags_codec); arg_127_0 = 1891037733u; continue; } break; } return; IL_DA: arg_127_0 = 1071323166u; goto IL_122; IL_16F: arg_127_0 = ((this.PrivacyInfoTag == 0u) ? 667479109u : 634736833u); goto IL_122; } public int CalculateSize() { int num = 0; while (true) { IL_125: uint arg_F4_0 = 3511828047u; while (true) { uint num2; switch ((num2 = (arg_F4_0 ^ 3235747853u)) % 9u) { case 0u: arg_F4_0 = ((this.ParentalControlInfoTag == 0u) ? 2693409330u : 3057319775u); continue; case 1u: arg_F4_0 = ((this.PrivacyInfoTag == 0u) ? 3552167299u : 3600748487u); continue; case 2u: arg_F4_0 = (((this.AccountLevelInfoTag != 0u) ? 2069477640u : 520171612u) ^ num2 * 488605024u); continue; case 3u: num += 5; arg_F4_0 = (num2 * 790136146u ^ 3633927479u); continue; case 4u: num += this.gameLevelInfoTags_.CalculateSize(AccountFieldTags._repeated_gameLevelInfoTags_codec); num += this.gameStatusTags_.CalculateSize(AccountFieldTags._repeated_gameStatusTags_codec); num += this.gameAccountTags_.CalculateSize(AccountFieldTags._repeated_gameAccountTags_codec); arg_F4_0 = 3171609002u; continue; case 5u: goto IL_125; case 6u: num += 5; arg_F4_0 = (num2 * 3960443743u ^ 109791068u); continue; case 7u: num += 5; arg_F4_0 = (num2 * 3679962122u ^ 1731685166u); continue; } return num; } } return num; } public void MergeFrom(AccountFieldTags other) { if (other == null) { goto IL_A4; } goto IL_152; uint arg_10A_0; while (true) { IL_105: uint num; switch ((num = (arg_10A_0 ^ 3089493893u)) % 11u) { case 0u: goto IL_152; case 1u: return; case 2u: this.ParentalControlInfoTag = other.ParentalControlInfoTag; arg_10A_0 = (num * 3250220199u ^ 2279995418u); continue; case 3u: this.gameAccountTags_.Add(other.gameAccountTags_); arg_10A_0 = (num * 3279546606u ^ 3569464995u); continue; case 4u: arg_10A_0 = ((other.ParentalControlInfoTag != 0u) ? 4268857209u : 3772302462u); continue; case 5u: goto IL_A4; case 6u: this.gameLevelInfoTags_.Add(other.gameLevelInfoTags_); this.gameStatusTags_.Add(other.gameStatusTags_); arg_10A_0 = 2805786857u; continue; case 7u: this.AccountLevelInfoTag = other.AccountLevelInfoTag; arg_10A_0 = (num * 3266444576u ^ 1450688877u); continue; case 8u: arg_10A_0 = ((other.PrivacyInfoTag == 0u) ? 3993273861u : 3027402931u); continue; case 9u: this.PrivacyInfoTag = other.PrivacyInfoTag; arg_10A_0 = (num * 3874647367u ^ 2778813439u); continue; } break; } return; IL_A4: arg_10A_0 = 3049224193u; goto IL_105; IL_152: arg_10A_0 = ((other.AccountLevelInfoTag == 0u) ? 3728477069u : 3456777146u); goto IL_105; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2C0: uint num; uint arg_244_0 = ((num = input.ReadTag()) == 0u) ? 3212691713u : 2364452976u; while (true) { uint num2; switch ((num2 = (arg_244_0 ^ 3793294634u)) % 24u) { case 0u: arg_244_0 = (((num == 29u) ? 2705414539u : 3106142341u) ^ num2 * 503420558u); continue; case 1u: arg_244_0 = (((num != 90u) ? 278332316u : 1775220668u) ^ num2 * 3642053194u); continue; case 2u: arg_244_0 = (((num != 21u) ? 2636951632u : 3808365610u) ^ num2 * 263334685u); continue; case 4u: arg_244_0 = (num2 * 1301623319u ^ 608095131u); continue; case 5u: goto IL_2C0; case 6u: arg_244_0 = (num2 * 1538288903u ^ 521082820u); continue; case 7u: arg_244_0 = (((num == 37u) ? 1997083948u : 1289045908u) ^ num2 * 2696957328u); continue; case 8u: this.gameLevelInfoTags_.AddEntriesFrom(input, AccountFieldTags._repeated_gameLevelInfoTags_codec); arg_244_0 = 2601868106u; continue; case 9u: this.PrivacyInfoTag = input.ReadFixed32(); arg_244_0 = 2837754718u; continue; case 10u: this.AccountLevelInfoTag = input.ReadFixed32(); arg_244_0 = 3884028060u; continue; case 11u: arg_244_0 = ((num != 58u) ? 3897001827u : 3330181490u); continue; case 12u: input.SkipLastField(); arg_244_0 = 3233662845u; continue; case 13u: arg_244_0 = (num2 * 3293973076u ^ 1363621299u); continue; case 14u: this.ParentalControlInfoTag = input.ReadFixed32(); arg_244_0 = 3701709729u; continue; case 15u: arg_244_0 = (num2 * 1681513757u ^ 2972825900u); continue; case 16u: arg_244_0 = (num2 * 835942005u ^ 1095648791u); continue; case 17u: arg_244_0 = (((num == 74u) ? 2977454448u : 4274995012u) ^ num2 * 1761533279u); continue; case 18u: arg_244_0 = ((num > 37u) ? 2616572665u : 2888917320u); continue; case 19u: arg_244_0 = (num2 * 99220778u ^ 2857604665u); continue; case 20u: this.gameAccountTags_.AddEntriesFrom(input, AccountFieldTags._repeated_gameAccountTags_codec); arg_244_0 = 3064879095u; continue; case 21u: this.gameStatusTags_.AddEntriesFrom(input, AccountFieldTags._repeated_gameStatusTags_codec); arg_244_0 = 2859470375u; continue; case 22u: arg_244_0 = (num2 * 1257955773u ^ 3900045993u); continue; case 23u: arg_244_0 = 2364452976u; continue; } return; } } } static AccountFieldTags() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_8C: uint arg_70_0 = 71599001u; while (true) { uint num; switch ((num = (arg_70_0 ^ 1657912444u)) % 4u) { case 1u: AccountFieldTags._repeated_gameLevelInfoTags_codec = FieldCodec.ForMessage<ProgramTag>(58u, ProgramTag.Parser); arg_70_0 = (num * 3060174800u ^ 2379504694u); continue; case 2u: AccountFieldTags._repeated_gameStatusTags_codec = FieldCodec.ForMessage<ProgramTag>(74u, ProgramTag.Parser); AccountFieldTags._repeated_gameAccountTags_codec = FieldCodec.ForMessage<RegionTag>(90u, RegionTag.Parser); arg_70_0 = (num * 3515518794u ^ 2241834260u); continue; case 3u: goto IL_8C; } return; } } } } } <file_sep>/AuthServer.Packets/PacketManager.cs using AuthServer.AuthServer.Attributes; using AuthServer.Network; using Bgs.Protocol; using Bgs.Protocol.Connection.V1; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Google.Protobuf; using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; namespace AuthServer.Packets { internal class PacketManager { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly PacketManager.__c __9 = new PacketManager.__c(); public static Func<Type, bool> __9__1_0; public static Func<MethodInfo, bool> __9__1_1; internal bool <Initialize>b__1_0(Type t) { return t.GetCustomAttribute<BnetServiceAttribute>() != null; } internal bool <Initialize>b__1_1(MethodInfo m) { return m.GetCustomAttribute<BnetServiceBase.BnetMethodAttribute>() != null; } } private static Dictionary<BnetServiceHash, Dictionary<uint, Tuple<MethodInfo, Type>>> BnetHandlers = new Dictionary<BnetServiceHash, Dictionary<uint, Tuple<MethodInfo, Type>>>(); public static void Initialize() { new ConnectRequest(); IEnumerable<Type> arg_2F_0 = PacketManager.smethod_1(PacketManager.smethod_0()); Func<Type, bool> arg_2F_1; if ((arg_2F_1 = PacketManager.__c.__9__1_0) == null) { arg_2F_1 = (PacketManager.__c.__9__1_0 = new Func<Type, bool>(PacketManager.__c.__9.<Initialize>b__1_0)); } IEnumerator<Type> enumerator = arg_2F_0.Where(arg_2F_1).GetEnumerator(); try { while (true) { IL_1FE: Dictionary<uint, Tuple<MethodInfo, Type>> dictionary; BnetServiceAttribute customAttribute2; if (PacketManager.smethod_5(enumerator)) { Type current; while (true) { IL_7D: current = enumerator.Current; uint arg_60_0 = 3939181532u; while (true) { uint num; switch ((num = (arg_60_0 ^ 3675968825u)) % 4u) { case 0u: arg_60_0 = 2366066018u; continue; case 1u: dictionary = new Dictionary<uint, Tuple<MethodInfo, Type>>(); arg_60_0 = (num * 501308084u ^ 1268659751u); continue; case 3u: goto IL_7D; } goto Block_4; } } IL_8B: IEnumerable<MethodInfo> arg_B0_0 = PacketManager.smethod_2(current); Func<MethodInfo, bool> arg_B0_1; if ((arg_B0_1 = PacketManager.__c.__9__1_1) == null) { arg_B0_1 = (PacketManager.__c.__9__1_1 = new Func<MethodInfo, bool>(PacketManager.__c.__9.<Initialize>b__1_1)); } IEnumerator<MethodInfo> enumerator2 = arg_B0_0.Where(arg_B0_1).GetEnumerator(); try { while (true) { IL_156: uint arg_126_0 = (!PacketManager.smethod_5(enumerator2)) ? 2192753665u : 2863704170u; while (true) { uint num; switch ((num = (arg_126_0 ^ 3675968825u)) % 5u) { case 1u: { MethodInfo current2 = enumerator2.Current; arg_126_0 = 2582712217u; continue; } case 2u: arg_126_0 = 2863704170u; continue; case 3u: goto IL_156; case 4u: { MethodInfo current2; BnetServiceBase.BnetMethodAttribute customAttribute = current2.GetCustomAttribute<BnetServiceBase.BnetMethodAttribute>(); dictionary.Add(customAttribute.MethodId, Tuple.Create<MethodInfo, Type>(current2, PacketManager.smethod_4(PacketManager.smethod_3(current2)[1]))); arg_126_0 = (num * 2219415123u ^ 1278772922u); continue; } } goto Block_10; } } Block_10:; } finally { if (enumerator2 != null) { while (true) { IL_19C: uint arg_183_0 = 3982012916u; while (true) { uint num; switch ((num = (arg_183_0 ^ 3675968825u)) % 3u) { case 0u: goto IL_19C; case 2u: PacketManager.smethod_6(enumerator2); arg_183_0 = (num * 1197318719u ^ 1041664316u); continue; } goto Block_14; } } Block_14:; } } customAttribute2 = current.GetCustomAttribute<BnetServiceAttribute>(); goto IL_1F0; Block_4: goto IL_8B; } uint arg_1D3_0 = 2990972076u; while (true) { IL_1CE: uint num; switch ((num = (arg_1D3_0 ^ 3675968825u)) % 4u) { case 0u: goto IL_1FE; case 2u: goto IL_1F0; case 3u: PacketManager.BnetHandlers.Add(customAttribute2.Hash, dictionary); arg_1D3_0 = (num * 2817925832u ^ 2492262217u); continue; } goto Block_7; } IL_1F0: arg_1D3_0 = 3221093554u; goto IL_1CE; } Block_7:; } finally { if (enumerator != null) { while (true) { IL_244: uint arg_22B_0 = 4219142732u; while (true) { uint num; switch ((num = (arg_22B_0 ^ 3675968825u)) % 3u) { case 0u: goto IL_244; case 2u: PacketManager.smethod_6(enumerator); arg_22B_0 = (num * 2380696322u ^ 4103158020u); continue; } goto Block_17; } } Block_17:; } } } public static void InvokeHandler(AuthSession session, Header header, byte[] mesageData) { Dictionary<uint, Tuple<MethodInfo, Type>> dictionary; if (PacketManager.BnetHandlers.TryGetValue((BnetServiceHash)header.ServiceHash, out dictionary)) { goto IL_4D; } goto IL_15E; uint arg_116_0; while (true) { IL_111: uint num; switch ((num = (arg_116_0 ^ 2546600134u)) % 11u) { case 1u: return; case 2u: { Tuple<MethodInfo, Type> tuple; arg_116_0 = ((dictionary.TryGetValue(header.MethodId, out tuple) ? 1003190270u : 800285307u) ^ num * 1238219360u); continue; } case 3u: { Tuple<MethodInfo, Type> tuple; IMessage message; PacketManager.smethod_8(tuple.Item1, null, new object[] { session, message }); arg_116_0 = (num * 2382358017u ^ 1800995334u); continue; } case 4u: goto IL_15E; case 5u: goto IL_181; case 6u: return; case 7u: { Tuple<MethodInfo, Type> tuple; IMessage message = PacketManager.smethod_7(tuple.Item2) as IMessage; message.MergeFrom(mesageData); arg_116_0 = (num * 1361450107u ^ 2957748103u); continue; } case 8u: Log.Message(LogType.Error, PacketManager.smethod_9(Module.smethod_33<string>(4182591896u), header.MethodId, (BnetServiceHash)header.ServiceHash), Array.Empty<object>()); arg_116_0 = 3522289751u; continue; case 9u: goto IL_4D; case 10u: PacketManager.smethod_14(PacketManager.smethod_13(Module.smethod_34<string>(1555219727u), PacketManager.smethod_12(header))); arg_116_0 = 3581752722u; continue; } break; } return; IL_181: PacketManager.smethod_14(PacketManager.smethod_13(Module.smethod_33<string>(13122572u), PacketManager.smethod_12(header))); return; IL_4D: arg_116_0 = 3450652428u; goto IL_111; IL_15E: arg_116_0 = (PacketManager.smethod_11(PacketManager.smethod_10(typeof(BnetServiceHash).TypeHandle), header.ServiceHash) ? 4239861377u : 3878306067u); goto IL_111; } static Assembly smethod_0() { return Assembly.GetExecutingAssembly(); } static Type[] smethod_1(Assembly assembly_0) { return assembly_0.GetTypes(); } static MethodInfo[] smethod_2(Type type_0) { return type_0.GetMethods(); } static ParameterInfo[] smethod_3(MethodBase methodBase_0) { return methodBase_0.GetParameters(); } static Type smethod_4(ParameterInfo parameterInfo_0) { return parameterInfo_0.ParameterType; } static bool smethod_5(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_6(IDisposable idisposable_0) { idisposable_0.Dispose(); } static object smethod_7(Type type_0) { return Activator.CreateInstance(type_0); } static object smethod_8(MethodBase methodBase_0, object object_0, object[] object_1) { return methodBase_0.Invoke(object_0, object_1); } static string smethod_9(string string_0, object object_0, object object_1) { return string.Format(string_0, object_0, object_1); } static Type smethod_10(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static bool smethod_11(Type type_0, object object_0) { return Enum.IsDefined(type_0, object_0); } static string smethod_12(object object_0) { return object_0.ToString(); } static string smethod_13(string string_0, object object_0) { return string.Format(string_0, object_0); } static void smethod_14(string string_0) { Console.WriteLine(string_0); } } } <file_sep>/AuthServer.Game.Packets.PacketHandler/ObjectHandler.cs using AuthServer.Game.Entities; using AuthServer.Network; using AuthServer.WorldServer.Game.Entities; using AuthServer.WorldServer.Managers; using Framework.Constants; using Framework.Constants.Misc; using Framework.Constants.Net; using Framework.Logging; using Framework.Network.Packets; using Framework.ObjectDefines; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Threading; namespace AuthServer.Game.Packets.PacketHandler { public class ObjectHandler : Manager { public static void HandleUpdateObjectCreate(ref WorldClass session, bool tele = false) { WorldObject character = session.Character; while (true) { IL_238: uint arg_1F2_0 = 2275508388u; while (true) { uint num; switch ((num = (arg_1F2_0 ^ 3154599871u)) % 14u) { case 0u: { PacketWriter packetWriter; packetWriter.WriteSmartGuid(character.Guid, global::GuidType.Player); arg_1F2_0 = (num * 3881833045u ^ 1180485233u); continue; } case 1u: (character as Character).InRangeObjects.Clear(); arg_1F2_0 = (num * 2283818524u ^ 355223714u); continue; case 2u: { PacketWriter packetWriter; packetWriter.WriteUInt8(4); UpdateFlag updateFlags = UpdateFlag.Self | UpdateFlag.Alive | UpdateFlag.Rotation; arg_1F2_0 = (num * 103799057u ^ 21624365u); continue; } case 3u: { PacketWriter packetWriter; character.WriteUpdateFields(ref packetWriter); arg_1F2_0 = (num * 49266881u ^ 2307507266u); continue; } case 4u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_1F2_0 = (num * 1672062260u ^ 2814400482u); continue; } case 6u: { PacketWriter packetWriter; UpdateFlag updateFlags; Manager.WorldMgr.WriteUpdateObjectMovement(ref packetWriter, ref character, updateFlags, ObjectType.Player); arg_1F2_0 = (num * 86580379u ^ 2193049942u); continue; } case 7u: character.SetUpdateFields(); arg_1F2_0 = (num * 2334973880u ^ 3652082974u); continue; case 8u: { PacketWriter packetWriter; packetWriter.WriteUInt8(1); arg_1F2_0 = (num * 2061835051u ^ 1546086745u); continue; } case 9u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_1F2_0 = (num * 3719673916u ^ 4267485768u); continue; } case 10u: { PacketWriter packetWriter; character.WriteDynamicUpdateFields(ref packetWriter); uint data = (uint)ObjectHandler.smethod_1(ObjectHandler.smethod_0(packetWriter)) - 17u; packetWriter.WriteUInt32Pos(data, 13); arg_1F2_0 = (num * 91628017u ^ 979890369u); continue; } case 11u: { PacketWriter packetWriter; BitPack arg_A2_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); if (session.Character.Bag == null) { session.Character.Bag = new Dictionary<byte, Item>(); } if (session.Character.Equipment == null) { session.Character.Equipment = new Dictionary<byte, Item>(); } packetWriter.WriteInt32(1); packetWriter.WriteUInt16((ushort)character.Map); arg_A2_0.Write<int>(0); arg_A2_0.Flush(); packetWriter.WriteInt32(0); arg_1F2_0 = 3587135917u; continue; } case 12u: goto IL_238; case 13u: if (!tele) { arg_1F2_0 = (num * 4070430128u ^ 2204553002u); continue; } return; } goto Block_4; } } Block_4: using (Dictionary<byte, Item>.Enumerator enumerator = session.Character.Bag.GetEnumerator()) { while (true) { IL_39B: uint arg_35F_0 = enumerator.MoveNext() ? 4174226275u : 4027859808u; while (true) { uint num; switch ((num = (arg_35F_0 ^ 3154599871u)) % 8u) { case 0u: arg_35F_0 = 4174226275u; continue; case 1u: ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_35F_0 = (num * 2901385184u ^ 3008738973u); continue; case 2u: goto IL_39B; case 3u: { SmartGuid smartGuid; session.Character.SetUpdateField<ulong>(1085 + (23 + (session.Character.Bag.Count - 1)) * 4, smartGuid.Guid, 0); arg_35F_0 = (num * 1633749325u ^ 882616989u); continue; } case 4u: { KeyValuePair<byte, Item> current = enumerator.Current; arg_35F_0 = 2355109817u; continue; } case 5u: { SmartGuid smartGuid; session.Character.SetUpdateField<ulong>(1085 + (23 + (session.Character.Bag.Count - 1)) * 4 + 2, smartGuid.HighGuid, 0); arg_35F_0 = (num * 2081811083u ^ 929503609u); continue; } case 6u: { KeyValuePair<byte, Item> current; SmartGuid smartGuid = new SmartGuid(current.Value.Guid, 0, global::GuidType.Item, 0uL); ObjectHandler.HandleUpdateObjectCreateItem(smartGuid, current.Value, ref session); arg_35F_0 = (num * 935936635u ^ 2677446734u); continue; } } goto Block_8; } } Block_8:; } using (Dictionary<byte, Item>.Enumerator enumerator = session.Character.Equipment.GetEnumerator()) { while (true) { IL_60C: uint arg_5CB_0 = (!enumerator.MoveNext()) ? 4153873960u : 2528389413u; while (true) { uint num; switch ((num = (arg_5CB_0 ^ 3154599871u)) % 9u) { case 0u: { KeyValuePair<byte, Item> current2; session.Character.SetUpdateField<ulong>(1085 + (int)(current2.Key * 4) + 2, 0uL, 0); arg_5CB_0 = (num * 2903315187u ^ 1606612479u); continue; } case 1u: { KeyValuePair<byte, Item> current2; session.Character.SetUpdateField<ushort>(1035 + (int)(current2.Key * 2) + 1, (ushort)current2.Value.ModId, 0); arg_5CB_0 = (num * 2254772229u ^ 3249291789u); continue; } case 2u: arg_5CB_0 = 2528389413u; continue; case 3u: goto IL_60C; case 4u: { KeyValuePair<byte, Item> current2 = enumerator.Current; SmartGuid smartGuid2 = new SmartGuid(current2.Value.Guid, 0, global::GuidType.Item, 0uL); ObjectHandler.HandleUpdateObjectCreateItem(smartGuid2, current2.Value, ref session); session.Character.SetUpdateField<ulong>(1085 + (int)(current2.Key * 4), 0uL, 0); arg_5CB_0 = 3525416964u; continue; } case 6u: { KeyValuePair<byte, Item> current2; session.Character.SetUpdateField<int>(1035 + (int)(current2.Key * 2), current2.Value.Id, 0); ObjectHandler.HandleUpdateObjectValues(ref session, false); arg_5CB_0 = (num * 2025118931u ^ 1226385667u); continue; } case 7u: { KeyValuePair<byte, Item> current2; SmartGuid smartGuid2; session.Character.SetUpdateField<ulong>(1085 + (int)(current2.Key * 4), smartGuid2.Guid, 0); session.Character.SetUpdateField<ulong>(1085 + (int)(current2.Key * 4) + 2, smartGuid2.HighGuid, 0); session.Character.SetUpdateField<ushort>(1035 + (int)(current2.Key * 2) + 1, 0, 0); arg_5CB_0 = (num * 1833648401u ^ 1914681319u); continue; } case 8u: { KeyValuePair<byte, Item> current2; session.Character.SetUpdateField<ushort>(1035 + (int)(current2.Key * 2) + 1, 0, 1); session.Character.SetUpdateField<int>(1035 + (int)(current2.Key * 2), 0, 0); arg_5CB_0 = (num * 772582332u ^ 2291984992u); continue; } } goto Block_12; } } Block_12:; } } private static void WriteInRangeObjects(IEnumerable<WorldObject> objects, WorldClass session, ObjectType type) { Character character = session.Character; int arg_10_0 = objects.Count<WorldObject>(); UpdateFlag updateFlag = UpdateFlag.Alive; if (arg_10_0 > 0) { updateFlag |= ((type == ObjectType.GameObject) ? UpdateFlag.StationaryPosition : UpdateFlag.Alive); IEnumerator<WorldObject> enumerator = objects.GetEnumerator(); try { while (true) { IL_361: uint arg_2F0_0 = (!ObjectHandler.smethod_3(enumerator)) ? 1527969684u : 1848967450u; while (true) { uint num; switch ((num = (arg_2F0_0 ^ 969171285u)) % 21u) { case 0u: arg_2F0_0 = (((type == ObjectType.GameObject) ? 1738499285u : 646977882u) ^ num * 1593683944u); continue; case 1u: { PacketWriter packetWriter; packetWriter.WriteUInt8(1); arg_2F0_0 = (((type == ObjectType.Player) ? 3818654308u : 3591559160u) ^ num * 648131247u); continue; } case 2u: { PacketWriter packetWriter; WorldObject worldObject; packetWriter.WriteSmartGuid(worldObject.SGuid); arg_2F0_0 = 2122628810u; continue; } case 3u: { WorldObject current; arg_2F0_0 = (((character.Guid != current.Guid) ? 2929494894u : 2211260839u) ^ num * 4047706010u); continue; } case 4u: { PacketWriter packetWriter; packetWriter.WriteUInt8((byte)type); arg_2F0_0 = 2032235371u; continue; } case 5u: ObjectHandler.smethod_2(5); arg_2F0_0 = (num * 2857407048u ^ 4065091795u); continue; case 6u: { PacketWriter packetWriter; uint data; packetWriter.WriteUInt32Pos(data, 13); arg_2F0_0 = (num * 945023592u ^ 666258815u); continue; } case 7u: arg_2F0_0 = ((type == ObjectType.Unit) ? 1066124101u : 1317094159u); continue; case 8u: { PacketWriter packetWriter; WorldObject worldObject; worldObject.WriteDynamicUpdateFields(ref packetWriter); arg_2F0_0 = (num * 3168312685u ^ 1016797372u); continue; } case 9u: { WorldObject current; WorldObject worldObject = current; arg_2F0_0 = (((!character.InRangeObjects.ContainsKey(current.Guid)) ? 241293809u : 970459467u) ^ num * 547093509u); continue; } case 11u: { WorldObject worldObject; character.InRangeObjects.Add(worldObject.Guid, worldObject); arg_2F0_0 = (num * 1271401156u ^ 2252314095u); continue; } case 12u: { PacketWriter packetWriter; uint data = (uint)ObjectHandler.smethod_1(ObjectHandler.smethod_0(packetWriter)) - 17u; arg_2F0_0 = 1218186453u; continue; } case 13u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); BitPack arg_131_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteInt32(1); packetWriter.WriteUInt16((ushort)character.Map); arg_131_0.Write<int>(0); arg_131_0.Flush(); arg_2F0_0 = (num * 3222425454u ^ 2984538751u); continue; } case 14u: { PacketWriter packetWriter; WorldObject worldObject; packetWriter.WriteSmartGuid(worldObject.Guid, global::GuidType.Player); arg_2F0_0 = (num * 1757694464u ^ 3297668298u); continue; } case 15u: goto IL_361; case 16u: { PacketWriter packetWriter; packetWriter.WriteInt32(0); arg_2F0_0 = (num * 4015340619u ^ 2939785537u); continue; } case 17u: { WorldObject current = enumerator.Current; arg_2F0_0 = 1029453396u; continue; } case 18u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_2F0_0 = (num * 3659980510u ^ 976080836u); continue; } case 19u: { PacketWriter packetWriter; WorldObject worldObject; Manager.WorldMgr.WriteUpdateObjectMovement(ref packetWriter, ref worldObject, updateFlag, type); worldObject.SetUpdateFields(); worldObject.WriteUpdateFields(ref packetWriter); arg_2F0_0 = (num * 3313353577u ^ 2170531980u); continue; } case 20u: arg_2F0_0 = 1848967450u; continue; } goto Block_10; } } Block_10:; } finally { if (enumerator != null) { while (true) { IL_3A7: uint arg_38E_0 = 1857051829u; while (true) { uint num; switch ((num = (arg_38E_0 ^ 969171285u)) % 3u) { case 0u: goto IL_3A7; case 2u: ObjectHandler.smethod_4(enumerator); arg_38E_0 = (num * 3244275826u ^ 1817846266u); continue; } goto Block_14; } } Block_14:; } } } } public static void HandleUpdateObjectCreateItem(SmartGuid guid, Item item2, ref WorldClass session) { int id = item2.Id; while (true) { IL_1E2: uint arg_1B9_0 = 2511239562u; while (true) { uint num; switch ((num = (arg_1B9_0 ^ 4026668597u)) % 7u) { case 0u: goto IL_1E2; case 1u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_1B9_0 = (num * 930516696u ^ 722285656u); continue; } case 2u: { WorldObject character = session.Character; arg_1B9_0 = (num * 3409398618u ^ 278691816u); continue; } case 3u: { PacketWriter packetWriter; uint data = (uint)ObjectHandler.smethod_1(ObjectHandler.smethod_0(packetWriter)) - 17u; arg_1B9_0 = (num * 3608865686u ^ 1852252423u); continue; } case 4u: { PacketWriter packetWriter; uint data; packetWriter.WriteUInt32Pos(data, 13); session.Send(ref packetWriter); arg_1B9_0 = (num * 1567485334u ^ 1076014059u); continue; } case 5u: { PacketWriter packetWriter; BitPack arg_6D_0 = new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(1u); WorldObject character; packetWriter.WriteUInt16((ushort)character.Map); packetWriter.WriteUInt8(0); packetWriter.WriteInt32(0); packetWriter.WriteUInt8(1); packetWriter.WriteSmartGuid(guid); packetWriter.WriteUInt8(1); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Write<int>(0); arg_6D_0.Flush(); packetWriter.WriteUInt32(0u); WorldObject expr_101 = new WorldObject(230); expr_101.Guid = session.Character.Guid; expr_101.SetItemUpdateFields(guid, id, item2.ModId); expr_101.WriteUpdateFields(ref packetWriter); expr_101.WriteDynamicUpdateFields(ref packetWriter); arg_1B9_0 = (num * 64307666u ^ 2886005418u); continue; } } return; } } } public static void HandleUpdateObjectValues(ref WorldClass session, bool broadcast = false) { WorldObject character = session.Character; PacketWriter packetWriter; while (true) { IL_181: uint arg_148_0 = 607021314u; while (true) { uint num; switch ((num = (arg_148_0 ^ 415926280u)) % 11u) { case 0u: character.WriteDynamicUpdateFields(ref packetWriter); arg_148_0 = (num * 2669928215u ^ 2408650936u); continue; case 1u: packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_148_0 = (num * 1462708285u ^ 3455762409u); continue; case 2u: goto IL_181; case 3u: Manager.WorldMgr.SendToInRangeCharacter(character as Character, packetWriter); arg_148_0 = 625155154u; continue; case 5u: new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); packetWriter.WriteUInt32(1u); packetWriter.WriteUInt16((ushort)character.Map); arg_148_0 = (num * 4087013210u ^ 3756105403u); continue; case 6u: packetWriter.WriteSmartGuid(character.Guid, global::GuidType.Player); character.WriteUpdateFields(ref packetWriter); arg_148_0 = (num * 1587475413u ^ 2510458295u); continue; case 7u: { uint data = (uint)ObjectHandler.smethod_1(ObjectHandler.smethod_0(packetWriter)) - 17u; packetWriter.WriteUInt32Pos(data, 13); arg_148_0 = ((broadcast ? 1303551731u : 1806187314u) ^ num * 1103903223u); continue; } case 8u: packetWriter.WriteUInt8(0); arg_148_0 = (num * 3208002226u ^ 2425809978u); continue; case 9u: goto IL_189; case 10u: packetWriter.WriteInt32(0); packetWriter.WriteUInt8(0); arg_148_0 = (num * 250629053u ^ 2467687846u); continue; } return; } } return; IL_189: session.Send(ref packetWriter); } public static void HandleUpdateObjectValues(ref WorldClass session, WorldObject obj, bool broadcast = false) { WorldObject character = session.Character; while (true) { IL_1DE: uint arg_195_0 = 3838918492u; while (true) { uint num; switch ((num = (arg_195_0 ^ 2293926252u)) % 15u) { case 1u: { PacketWriter packetWriter; session.Send(ref packetWriter); arg_195_0 = (num * 1908781805u ^ 753648174u); continue; } case 2u: return; case 3u: { PacketWriter packetWriter; packetWriter.WriteUInt32(1u); arg_195_0 = (num * 731726856u ^ 77037749u); continue; } case 4u: goto IL_1DE; case 5u: { PacketWriter packetWriter; packetWriter.WriteInt32(0); arg_195_0 = (num * 3606854279u ^ 1362373309u); continue; } case 6u: { PacketWriter packetWriter; Manager.WorldMgr.SendToInRangeCharacter(character as Character, packetWriter); arg_195_0 = 2338729526u; continue; } case 7u: { PacketWriter packetWriter; new BitPack(packetWriter, 0uL, 0uL, 0uL, 0uL); arg_195_0 = (num * 1333306621u ^ 1308058188u); continue; } case 8u: { PacketWriter packetWriter; uint data = (uint)ObjectHandler.smethod_1(ObjectHandler.smethod_0(packetWriter)) - 17u; packetWriter.WriteUInt32Pos(data, 13); arg_195_0 = (num * 1914621205u ^ 2418392944u); continue; } case 9u: { PacketWriter packetWriter; packetWriter.WriteUInt8(0); arg_195_0 = (num * 880452894u ^ 877143482u); continue; } case 10u: { PacketWriter packetWriter = new PacketWriter(ServerMessage.ObjectUpdate, true); arg_195_0 = (num * 4173316949u ^ 3732895873u); continue; } case 11u: { PacketWriter packetWriter; packetWriter.WriteSmartGuid(obj.SGuid); obj.WriteUpdateFields(ref packetWriter); obj.WriteDynamicUpdateFields(ref packetWriter); arg_195_0 = (num * 2326981483u ^ 2821617165u); continue; } case 12u: arg_195_0 = (((!broadcast) ? 3218131395u : 3828016721u) ^ num * 2357201326u); continue; case 13u: { PacketWriter packetWriter; packetWriter.WriteUInt16((ushort)character.Map); arg_195_0 = (num * 4256119138u ^ 2559866254u); continue; } case 14u: { PacketWriter packetWriter; packetWriter.WriteUInt8(0); arg_195_0 = (num * 4029856956u ^ 1381471971u); continue; } } return; } } } public static PacketWriter HandleDestroyObject(ref WorldClass session, ulong guid, bool animation = false, bool item = false) { PacketWriter packetWriter = new PacketWriter(ServerMessage.DestroyObject, true); while (true) { IL_82: int arg_6C_0 = -527747855; while (true) { switch ((arg_6C_0 ^ -1331919861) % 3) { case 0: goto IL_82; case 1: { BitPack arg_56_0 = new BitPack(packetWriter, guid, 0uL, 0uL, 0uL); if (item) { SmartGuid guid2 = new SmartGuid(guid, 0, global::GuidType.Item, 0uL); packetWriter.WriteSmartGuid(guid2); } else { packetWriter.WriteSmartGuid(guid, global::GuidType.Player); } arg_56_0.Write<bool>(animation); arg_56_0.Flush(); arg_6C_0 = -1061865820; continue; } } return packetWriter; } } return packetWriter; } [Opcode(ClientMessage.ChatMessageYell, "17930")] public static void HandleObjectUpdateFailed(ref PacketReader packet, WorldClass session) { byte[] expr_06 = new byte[8]; ObjectHandler.smethod_5(expr_06, fieldof(<PrivateImplementationDetails>.F33CCE85FC4963E786F0E3E51BF6D41F7DF910C5).FieldHandle); byte[] mask = expr_06; while (true) { IL_A7: uint arg_87_0 = 1795528629u; while (true) { uint num; switch ((num = (arg_87_0 ^ 1171644517u)) % 5u) { case 0u: goto IL_A7; case 1u: { byte[] expr_69 = new byte[8]; ObjectHandler.smethod_5(expr_69, fieldof(<PrivateImplementationDetails>.F194F7A523191120A0E0795F84A21254E1B48C5F).FieldHandle); byte[] bytes = expr_69; arg_87_0 = (num * 2480489431u ^ 3809568048u); continue; } case 2u: { byte[] bytes; ulong packedValue = new BitUnpack(packet).GetPackedValue(mask, bytes); arg_87_0 = (num * 2972380924u ^ 2047378812u); continue; } case 4u: { ulong packedValue; Log.Message(LogType.Debug, Module.smethod_33<string>(2827741252u), new object[] { packedValue }); arg_87_0 = (num * 1499607034u ^ 1240785080u); continue; } } return; } } } static Stream smethod_0(BinaryWriter binaryWriter_0) { return binaryWriter_0.BaseStream; } static long smethod_1(Stream stream_0) { return stream_0.Length; } static void smethod_2(int int_0) { Thread.Sleep(int_0); } static bool smethod_3(IEnumerator ienumerator_0) { return ienumerator_0.MoveNext(); } static void smethod_4(IDisposable idisposable_0) { idisposable_0.Dispose(); } static void smethod_5(Array array_0, RuntimeFieldHandle runtimeFieldHandle_0) { RuntimeHelpers.InitializeArray(array_0, runtimeFieldHandle_0); } } } <file_sep>/Google.Protobuf.Reflection/SingleFieldAccessor.cs using Google.Protobuf.Compatibility; using System; using System.Reflection; namespace Google.Protobuf.Reflection { internal sealed class SingleFieldAccessor : FieldAccessorBase { private readonly Action<IMessage, object> setValueDelegate; private readonly Action<IMessage> clearDelegate; internal SingleFieldAccessor(PropertyInfo property, FieldDescriptor descriptor) : base(property, descriptor) { while (true) { IL_10F: uint arg_E3_0 = 1941025569u; while (true) { uint num; switch ((num = (arg_E3_0 ^ 199827664u)) % 8u) { case 1u: arg_E3_0 = (num * 3210510662u ^ 4032699640u); continue; case 2u: goto IL_10F; case 3u: goto IL_116; case 4u: { Type type; __c__DisplayClass2_.defaultValue = ((descriptor.FieldType == FieldType.Message) ? null : ((type == SingleFieldAccessor.smethod_3(typeof(string).TypeHandle)) ? "" : ((type == SingleFieldAccessor.smethod_3(typeof(ByteString).TypeHandle)) ? ByteString.Empty : SingleFieldAccessor.smethod_4(type)))); this.clearDelegate = delegate(IMessage message) { __c__DisplayClass2_.__4__this.SetValue(message, __c__DisplayClass2_.defaultValue); }; arg_E3_0 = 1884219440u; continue; } case 5u: this.setValueDelegate = ReflectionUtil.CreateActionIMessageObject(property.GetSetMethod()); arg_E3_0 = 2064311039u; continue; case 6u: __c__DisplayClass2_.__4__this = this; arg_E3_0 = ((SingleFieldAccessor.smethod_0(property) ? 2142081437u : 1483086867u) ^ num * 2346426732u); continue; case 7u: { Type type = SingleFieldAccessor.smethod_2(property); arg_E3_0 = (num * 1124000945u ^ 3750043923u); continue; } } goto Block_5; } } Block_5: return; IL_116: throw SingleFieldAccessor.smethod_1(Module.smethod_35<string>(1200568613u)); } public override void Clear(IMessage message) { this.clearDelegate(message); } public override void SetValue(IMessage message, object value) { this.setValueDelegate(message, value); } static bool smethod_0(PropertyInfo propertyInfo_0) { return propertyInfo_0.CanWrite; } static ArgumentException smethod_1(string string_0) { return new ArgumentException(string_0); } static Type smethod_2(PropertyInfo propertyInfo_0) { return propertyInfo_0.PropertyType; } static Type smethod_3(RuntimeTypeHandle runtimeTypeHandle_0) { return Type.GetTypeFromHandle(runtimeTypeHandle_0); } static object smethod_4(Type type_0) { return Activator.CreateInstance(type_0); } } } <file_sep>/Bgs.Protocol.Authentication.V1/MemModuleLoadRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class MemModuleLoadRequest : IMessage<MemModuleLoadRequest>, IEquatable<MemModuleLoadRequest>, IDeepCloneable<MemModuleLoadRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MemModuleLoadRequest.__c __9 = new MemModuleLoadRequest.__c(); internal MemModuleLoadRequest cctor>b__34_0() { return new MemModuleLoadRequest(); } } private static readonly MessageParser<MemModuleLoadRequest> _parser = new MessageParser<MemModuleLoadRequest>(new Func<MemModuleLoadRequest>(MemModuleLoadRequest.__c.__9.<.cctor>b__34_0)); public const int HandleFieldNumber = 1; private ContentHandle handle_; public const int KeyFieldNumber = 2; private ByteString key_ = ByteString.Empty; public const int InputFieldNumber = 3; private ByteString input_ = ByteString.Empty; public static MessageParser<MemModuleLoadRequest> Parser { get { return MemModuleLoadRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[13]; } } MessageDescriptor IMessage.Descriptor { get { return MemModuleLoadRequest.Descriptor; } } public ContentHandle Handle { get { return this.handle_; } set { this.handle_ = value; } } public ByteString Key { get { return this.key_; } set { this.key_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_34<string>(2130392831u)); } } public ByteString Input { get { return this.input_; } set { this.input_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public MemModuleLoadRequest() { } public MemModuleLoadRequest(MemModuleLoadRequest other) : this() { while (true) { IL_84: uint arg_64_0 = 3660146628u; while (true) { uint num; switch ((num = (arg_64_0 ^ 2562444466u)) % 5u) { case 0u: this.key_ = other.key_; arg_64_0 = (num * 1996960927u ^ 2498852074u); continue; case 1u: this.Handle = ((other.handle_ != null) ? other.Handle.Clone() : null); arg_64_0 = 2475913443u; continue; case 3u: this.input_ = other.input_; arg_64_0 = (num * 2189016823u ^ 2334561991u); continue; case 4u: goto IL_84; } return; } } } public MemModuleLoadRequest Clone() { return new MemModuleLoadRequest(this); } public override bool Equals(object other) { return this.Equals(other as MemModuleLoadRequest); } public bool Equals(MemModuleLoadRequest other) { if (other == null) { goto IL_44; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -545960206) % 11) { case 1: return true; case 2: arg_A6_0 = ((!MemModuleLoadRequest.smethod_0(this.Handle, other.Handle)) ? -31116484 : -1119954870); continue; case 3: return false; case 4: return false; case 5: return false; case 6: arg_A6_0 = ((this.Key != other.Key) ? -637790031 : -938712221); continue; case 7: goto IL_EC; case 8: goto IL_44; case 9: return false; case 10: arg_A6_0 = ((this.Input != other.Input) ? -1007138837 : -1176368319); continue; } break; } return true; IL_44: arg_A6_0 = -814188914; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? -1486914974 : -813743348); goto IL_A1; } public override int GetHashCode() { return 1 ^ MemModuleLoadRequest.smethod_1(this.Handle) ^ MemModuleLoadRequest.smethod_1(this.Key) ^ MemModuleLoadRequest.smethod_1(this.Input); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteMessage(this.Handle); while (true) { IL_8E: uint arg_6E_0 = 2656127753u; while (true) { uint num; switch ((num = (arg_6E_0 ^ 3527024739u)) % 5u) { case 0u: output.WriteRawTag(26); output.WriteBytes(this.Input); arg_6E_0 = (num * 1017322877u ^ 1149341449u); continue; case 1u: output.WriteRawTag(18); arg_6E_0 = (num * 2858448699u ^ 2592475497u); continue; case 2u: output.WriteBytes(this.Key); arg_6E_0 = (num * 166497264u ^ 203705007u); continue; case 3u: goto IL_8E; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeMessageSize(this.Handle)) + (1 + CodedOutputStream.ComputeBytesSize(this.Key)) + (1 + CodedOutputStream.ComputeBytesSize(this.Input)); } public void MergeFrom(MemModuleLoadRequest other) { if (other == null) { goto IL_DB; } goto IL_153; uint arg_10B_0; while (true) { IL_106: uint num; switch ((num = (arg_10B_0 ^ 1733169685u)) % 11u) { case 1u: arg_10B_0 = ((other.Key.Length == 0) ? 1035309351u : 323293873u); continue; case 2u: goto IL_DB; case 3u: goto IL_153; case 4u: arg_10B_0 = (((this.handle_ != null) ? 3113664507u : 2293154297u) ^ num * 964338006u); continue; case 5u: return; case 6u: arg_10B_0 = ((other.Input.Length == 0) ? 701020044u : 205263302u); continue; case 7u: this.Key = other.Key; arg_10B_0 = (num * 3864261624u ^ 1422252999u); continue; case 8u: this.Handle.MergeFrom(other.Handle); arg_10B_0 = 526040831u; continue; case 9u: this.handle_ = new ContentHandle(); arg_10B_0 = (num * 1500587489u ^ 1210784855u); continue; case 10u: this.Input = other.Input; arg_10B_0 = (num * 1848408413u ^ 397846827u); continue; } break; } return; IL_DB: arg_10B_0 = 212394142u; goto IL_106; IL_153: arg_10B_0 = ((other.handle_ == null) ? 526040831u : 1522601854u); goto IL_106; } public void MergeFrom(CodedInputStream input) { while (true) { IL_197: uint num; uint arg_143_0 = ((num = input.ReadTag()) == 0u) ? 4152991702u : 2911821788u; while (true) { uint num2; switch ((num2 = (arg_143_0 ^ 2417721053u)) % 14u) { case 0u: this.handle_ = new ContentHandle(); arg_143_0 = (num2 * 3382806737u ^ 1703479610u); continue; case 1u: goto IL_197; case 2u: arg_143_0 = (num2 * 1852283086u ^ 1884059718u); continue; case 3u: arg_143_0 = ((num != 10u) ? 3032329293u : 3675297542u); continue; case 4u: this.Input = input.ReadBytes(); arg_143_0 = 3710304194u; continue; case 5u: arg_143_0 = (((num != 26u) ? 925116337u : 125034904u) ^ num2 * 279269693u); continue; case 6u: arg_143_0 = (num2 * 2961365507u ^ 1970846926u); continue; case 7u: input.SkipLastField(); arg_143_0 = (num2 * 2791188777u ^ 2842763631u); continue; case 8u: arg_143_0 = (((num != 18u) ? 1230739264u : 268835931u) ^ num2 * 3896893626u); continue; case 9u: arg_143_0 = ((this.handle_ != null) ? 2519520100u : 3863893283u); continue; case 10u: arg_143_0 = 2911821788u; continue; case 12u: this.Key = input.ReadBytes(); arg_143_0 = 3566663641u; continue; case 13u: input.ReadMessage(this.handle_); arg_143_0 = 4067768883u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.WellKnownTypes/Int64Value.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Int64Value : IMessage<Int64Value>, IEquatable<Int64Value>, IDeepCloneable<Int64Value>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Int64Value.__c __9 = new Int64Value.__c(); internal Int64Value cctor>b__24_0() { return new Int64Value(); } } private static readonly MessageParser<Int64Value> _parser = new MessageParser<Int64Value>(new Func<Int64Value>(Int64Value.__c.__9.<.cctor>b__24_0)); public const int ValueFieldNumber = 1; private long value_; public static MessageParser<Int64Value> Parser { get { return Int64Value._parser; } } public static MessageDescriptor Descriptor { get { return WrappersReflection.Descriptor.MessageTypes[2]; } } MessageDescriptor IMessage.Descriptor { get { return Int64Value.Descriptor; } } public long Value { get { return this.value_; } set { this.value_ = value; } } public Int64Value() { } public Int64Value(Int64Value other) : this() { while (true) { IL_3E: uint arg_26_0 = 520537951u; while (true) { uint num; switch ((num = (arg_26_0 ^ 198464487u)) % 3u) { case 1u: this.value_ = other.value_; arg_26_0 = (num * 2817859888u ^ 965486303u); continue; case 2u: goto IL_3E; } return; } } } public Int64Value Clone() { return new Int64Value(this); } public override bool Equals(object other) { return this.Equals(other as Int64Value); } public bool Equals(Int64Value other) { if (other == null) { goto IL_12; } goto IL_75; int arg_43_0; while (true) { IL_3E: switch ((arg_43_0 ^ -1797088729) % 7) { case 0: return false; case 1: goto IL_75; case 2: arg_43_0 = ((this.Value != other.Value) ? -1663479058 : -1366623856); continue; case 3: return false; case 4: return true; case 6: goto IL_12; } break; } return true; IL_12: arg_43_0 = -498087108; goto IL_3E; IL_75: arg_43_0 = ((other != this) ? -1491460870 : -953711739); goto IL_3E; } public override int GetHashCode() { int num = 1; while (true) { IL_6C: uint arg_50_0 = 113187288u; while (true) { uint num2; switch ((num2 = (arg_50_0 ^ 458116053u)) % 4u) { case 0u: num ^= this.Value.GetHashCode(); arg_50_0 = (num2 * 2513678705u ^ 3557916122u); continue; case 1u: arg_50_0 = (((this.Value == 0L) ? 3453337413u : 4184709066u) ^ num2 * 4105978579u); continue; case 2u: goto IL_6C; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Value != 0L) { while (true) { IL_5A: uint arg_3E_0 = 844406692u; while (true) { uint num; switch ((num = (arg_3E_0 ^ 1481640981u)) % 4u) { case 0u: output.WriteInt64(this.Value); arg_3E_0 = (num * 546958130u ^ 903410522u); continue; case 1u: output.WriteRawTag(8); arg_3E_0 = (num * 3145577355u ^ 641928094u); continue; case 2u: goto IL_5A; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.Value != 0L) { while (true) { IL_46: uint arg_2E_0 = 1363249360u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 1578089428u)) % 3u) { case 0u: goto IL_46; case 1u: num += 1 + CodedOutputStream.ComputeInt64Size(this.Value); arg_2E_0 = (num2 * 2699531435u ^ 2711705217u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(Int64Value other) { if (other == null) { goto IL_2D; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 1924256238u)) % 5u) { case 0u: goto IL_63; case 2u: goto IL_2D; case 3u: return; case 4u: this.Value = other.Value; arg_37_0 = (num * 1026267401u ^ 464423223u); continue; } break; } return; IL_2D: arg_37_0 = 1994140865u; goto IL_32; IL_63: arg_37_0 = ((other.Value == 0L) ? 1318213219u : 1055165530u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_95: uint num; uint arg_62_0 = ((num = input.ReadTag()) != 0u) ? 3177752674u : 4171684265u; while (true) { uint num2; switch ((num2 = (arg_62_0 ^ 2371339411u)) % 6u) { case 0u: this.Value = input.ReadInt64(); arg_62_0 = 2986402692u; continue; case 1u: arg_62_0 = ((num == 8u) ? 2294375095u : 3895454993u); continue; case 2u: input.SkipLastField(); arg_62_0 = (num2 * 2762577601u ^ 616273030u); continue; case 3u: arg_62_0 = 3177752674u; continue; case 5u: goto IL_95; } return; } } } } } <file_sep>/Google.Protobuf.WellKnownTypes/Option.cs using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Google.Protobuf.WellKnownTypes { [DebuggerNonUserCode, ComVisible(true)] public sealed class Option : IMessage<Option>, IEquatable<Option>, IDeepCloneable<Option>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Option.__c __9 = new Option.__c(); internal Option cctor>b__29_0() { return new Option(); } } private static readonly MessageParser<Option> _parser = new MessageParser<Option>(new Func<Option>(Option.__c.__9.<.cctor>b__29_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int ValueFieldNumber = 2; private Any value_; public static MessageParser<Option> Parser { get { return Option._parser; } } public static MessageDescriptor Descriptor { get { return TypeReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return Option.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public Any Value { get { return this.value_; } set { this.value_ = value; } } public Option() { } public Option(Option other) : this() { this.name_ = other.name_; this.Value = ((other.value_ != null) ? other.Value.Clone() : null); } public Option Clone() { return new Option(this); } public override bool Equals(object other) { return this.Equals(other as Option); } public bool Equals(Option other) { if (other == null) { goto IL_15; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 169597419) % 9) { case 0: return false; case 1: arg_77_0 = (Option.smethod_0(this.Name, other.Name) ? 1709475802 : 1792862078); continue; case 2: goto IL_B5; case 3: return true; case 4: return false; case 5: arg_77_0 = ((!Option.smethod_1(this.Value, other.Value)) ? 1742073465 : 1945617259); continue; case 6: goto IL_15; case 8: return false; } break; } return true; IL_15: arg_77_0 = 1567911070; goto IL_72; IL_B5: arg_77_0 = ((other == this) ? 733654072 : 54776471); goto IL_72; } public override int GetHashCode() { int num = 1; while (true) { IL_B7: uint arg_93_0 = 3154855486u; while (true) { uint num2; switch ((num2 = (arg_93_0 ^ 2948804352u)) % 6u) { case 0u: goto IL_B7; case 1u: arg_93_0 = ((this.value_ != null) ? 2173846167u : 3579040126u); continue; case 2u: arg_93_0 = (((Option.smethod_2(this.Name) != 0) ? 3938773715u : 3810148649u) ^ num2 * 3478582543u); continue; case 3u: num ^= Option.smethod_3(this.Value); arg_93_0 = (num2 * 653797532u ^ 1381347706u); continue; case 5u: num ^= Option.smethod_3(this.Name); arg_93_0 = (num2 * 671937116u ^ 1172637463u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (Option.smethod_2(this.Name) != 0) { goto IL_42; } goto IL_9B; uint arg_6F_0; while (true) { IL_6A: uint num; switch ((num = (arg_6F_0 ^ 877079752u)) % 5u) { case 0u: goto IL_9B; case 2u: output.WriteRawTag(18); output.WriteMessage(this.Value); arg_6F_0 = (num * 2504534018u ^ 4221574781u); continue; case 3u: goto IL_42; case 4u: output.WriteRawTag(10); output.WriteString(this.Name); arg_6F_0 = (num * 3085354764u ^ 1937371291u); continue; } break; } return; IL_42: arg_6F_0 = 1206940515u; goto IL_6A; IL_9B: arg_6F_0 = ((this.value_ != null) ? 124651853u : 825691511u); goto IL_6A; } public int CalculateSize() { int num = 0; if (Option.smethod_2(this.Name) != 0) { goto IL_40; } goto IL_95; uint arg_69_0; while (true) { IL_64: uint num2; switch ((num2 = (arg_69_0 ^ 1382819445u)) % 5u) { case 0u: goto IL_95; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_69_0 = (num2 * 3896350370u ^ 3627944469u); continue; case 2u: goto IL_40; case 4u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Value); arg_69_0 = (num2 * 234555415u ^ 3367908179u); continue; } break; } return num; IL_40: arg_69_0 = 680242676u; goto IL_64; IL_95: arg_69_0 = ((this.value_ == null) ? 107246058u : 168549338u); goto IL_64; } public void MergeFrom(Option other) { if (other == null) { goto IL_9D; } goto IL_FF; uint arg_BF_0; while (true) { IL_BA: uint num; switch ((num = (arg_BF_0 ^ 2763792398u)) % 9u) { case 0u: this.Value.MergeFrom(other.Value); arg_BF_0 = 2261838607u; continue; case 2u: goto IL_9D; case 3u: this.Name = other.Name; arg_BF_0 = (num * 1803026089u ^ 21847576u); continue; case 4u: return; case 5u: arg_BF_0 = (((this.value_ != null) ? 122298191u : 584554343u) ^ num * 1513529166u); continue; case 6u: arg_BF_0 = ((other.value_ == null) ? 2261838607u : 2888855002u); continue; case 7u: goto IL_FF; case 8u: this.value_ = new Any(); arg_BF_0 = (num * 2193707583u ^ 3414402456u); continue; } break; } return; IL_9D: arg_BF_0 = 2456838343u; goto IL_BA; IL_FF: arg_BF_0 = ((Option.smethod_2(other.Name) == 0) ? 2344952516u : 3350776690u); goto IL_BA; } public void MergeFrom(CodedInputStream input) { while (true) { IL_13A: uint num; uint arg_F2_0 = ((num = input.ReadTag()) == 0u) ? 1489148489u : 1420216282u; while (true) { uint num2; switch ((num2 = (arg_F2_0 ^ 2044215250u)) % 11u) { case 0u: arg_F2_0 = ((this.value_ != null) ? 785830018u : 489585262u); continue; case 1u: arg_F2_0 = (num2 * 2284699776u ^ 1045631441u); continue; case 2u: arg_F2_0 = 1420216282u; continue; case 3u: arg_F2_0 = (((num == 18u) ? 1773621369u : 1348923340u) ^ num2 * 2952931518u); continue; case 5u: input.ReadMessage(this.value_); arg_F2_0 = 808848849u; continue; case 6u: input.SkipLastField(); arg_F2_0 = (num2 * 688863350u ^ 3337169706u); continue; case 7u: this.value_ = new Any(); arg_F2_0 = (num2 * 3805681516u ^ 3582435282u); continue; case 8u: this.Name = input.ReadString(); arg_F2_0 = 808848849u; continue; case 9u: goto IL_13A; case 10u: arg_F2_0 = ((num != 10u) ? 315416211u : 1084141741u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Authentication.V1/VerifyWebCredentialsRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class VerifyWebCredentialsRequest : IMessage<VerifyWebCredentialsRequest>, IEquatable<VerifyWebCredentialsRequest>, IDeepCloneable<VerifyWebCredentialsRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly VerifyWebCredentialsRequest.__c __9 = new VerifyWebCredentialsRequest.__c(); internal VerifyWebCredentialsRequest cctor>b__24_0() { return new VerifyWebCredentialsRequest(); } } private static readonly MessageParser<VerifyWebCredentialsRequest> _parser = new MessageParser<VerifyWebCredentialsRequest>(new Func<VerifyWebCredentialsRequest>(VerifyWebCredentialsRequest.__c.__9.<.cctor>b__24_0)); public const int WebCredentialsFieldNumber = 1; private ByteString webCredentials_ = ByteString.Empty; public static MessageParser<VerifyWebCredentialsRequest> Parser { get { return VerifyWebCredentialsRequest._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[19]; } } MessageDescriptor IMessage.Descriptor { get { return VerifyWebCredentialsRequest.Descriptor; } } public ByteString WebCredentials { get { return this.webCredentials_; } set { this.webCredentials_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public VerifyWebCredentialsRequest() { } public VerifyWebCredentialsRequest(VerifyWebCredentialsRequest other) : this() { while (true) { IL_3E: uint arg_26_0 = 2121198536u; while (true) { uint num; switch ((num = (arg_26_0 ^ 1735868047u)) % 3u) { case 0u: goto IL_3E; case 1u: this.webCredentials_ = other.webCredentials_; arg_26_0 = (num * 3879575880u ^ 2103906623u); continue; } return; } } } public VerifyWebCredentialsRequest Clone() { return new VerifyWebCredentialsRequest(this); } public override bool Equals(object other) { return this.Equals(other as VerifyWebCredentialsRequest); } public bool Equals(VerifyWebCredentialsRequest other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -433815543) % 7) { case 0: arg_48_0 = ((!(this.WebCredentials != other.WebCredentials)) ? -726851445 : -1934092721); continue; case 1: return false; case 3: return false; case 4: goto IL_12; case 5: goto IL_7A; case 6: return true; } break; } return true; IL_12: arg_48_0 = -612538491; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -1134171515 : -690736530); goto IL_43; } public override int GetHashCode() { int num = 1; while (true) { IL_6E: uint arg_52_0 = 4199803091u; while (true) { uint num2; switch ((num2 = (arg_52_0 ^ 4193567702u)) % 4u) { case 0u: num ^= VerifyWebCredentialsRequest.smethod_0(this.WebCredentials); arg_52_0 = (num2 * 2423204365u ^ 414480476u); continue; case 1u: arg_52_0 = (((this.WebCredentials.Length == 0) ? 1281775629u : 1617626359u) ^ num2 * 1876382681u); continue; case 3u: goto IL_6E; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.WebCredentials.Length != 0) { while (true) { IL_4D: uint arg_35_0 = 2518966983u; while (true) { uint num; switch ((num = (arg_35_0 ^ 2688069330u)) % 3u) { case 0u: goto IL_4D; case 1u: output.WriteRawTag(10); output.WriteBytes(this.WebCredentials); arg_35_0 = (num * 1534716797u ^ 401061091u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; while (true) { IL_70: uint arg_54_0 = 3483324365u; while (true) { uint num2; switch ((num2 = (arg_54_0 ^ 2336970210u)) % 4u) { case 0u: num += 1 + CodedOutputStream.ComputeBytesSize(this.WebCredentials); arg_54_0 = (num2 * 3772662937u ^ 3550292515u); continue; case 2u: goto IL_70; case 3u: arg_54_0 = (((this.WebCredentials.Length != 0) ? 288833944u : 480495577u) ^ num2 * 2344236374u); continue; } return num; } } return num; } public void MergeFrom(VerifyWebCredentialsRequest other) { if (other == null) { goto IL_12; } goto IL_63; uint arg_37_0; while (true) { IL_32: uint num; switch ((num = (arg_37_0 ^ 264672591u)) % 5u) { case 0u: this.WebCredentials = other.WebCredentials; arg_37_0 = (num * 3442778457u ^ 2981769345u); continue; case 1u: return; case 3u: goto IL_12; case 4u: goto IL_63; } break; } return; IL_12: arg_37_0 = 28392868u; goto IL_32; IL_63: arg_37_0 = ((other.WebCredentials.Length == 0) ? 1616404971u : 638623797u); goto IL_32; } public void MergeFrom(CodedInputStream input) { while (true) { IL_A9: uint num; uint arg_72_0 = ((num = input.ReadTag()) == 0u) ? 338383156u : 40637341u; while (true) { uint num2; switch ((num2 = (arg_72_0 ^ 517683580u)) % 7u) { case 0u: goto IL_A9; case 1u: arg_72_0 = (num2 * 3991535634u ^ 3705156617u); continue; case 2u: this.WebCredentials = input.ReadBytes(); arg_72_0 = 1785121257u; continue; case 3u: arg_72_0 = ((num == 10u) ? 138579522u : 1899295322u); continue; case 4u: input.SkipLastField(); arg_72_0 = (num2 * 302699530u ^ 2869050736u); continue; case 6u: arg_72_0 = 40637341u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/AuthServer.Network/AuthSession.cs using AuthServer.Packets; using Bgs.Protocol; using Framework.Constants.Misc; using Framework.Cryptography.BNet; using Framework.Database.Auth.Entities; using Framework.Logging; using Google.Protobuf; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Security; using System.Net.Sockets; using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; namespace AuthServer.Network { public class AuthSession : IDisposable { private Socket client; private NetworkStream nStream; private SslStream sslStream; private byte[] dataBuffer = new byte[2048]; private uint token; public Account Account { get; set; } public ListModule Modules { get; set; } public SRP6a SecureRemotePassword { get; set; } public BNetCrypt Crypt { get; set; } public AuthSession(Socket socket) { while (true) { IL_49: uint arg_31_0 = 2548465828u; while (true) { uint num; switch ((num = (arg_31_0 ^ 2539585623u)) % 3u) { case 1u: this.client = socket; arg_31_0 = (num * 2589854966u ^ 159818506u); continue; case 2u: goto IL_49; } return; } } } public string GetCInfo() { IPEndPoint ipendPoint_ = AuthSession.smethod_0(this.client) as IPEndPoint; return AuthSession.smethod_3(AuthSession.smethod_1(ipendPoint_), Module.smethod_36<string>(2662777765u), AuthSession.smethod_2(ipendPoint_)); } public void Accept() { this.nStream = AuthSession.smethod_4(this.client); this.sslStream = AuthSession.smethod_5(this.nStream, false, new RemoteCertificateValidationCallback(this.App_CertificateValidation)); X509Certificate2 x509Certificate_; while (true) { IL_82: uint arg_65_0 = 860733640u; while (true) { uint num; switch ((num = (arg_65_0 ^ 246562425u)) % 4u) { case 1u: x509Certificate_ = AuthSession.smethod_6(Globals.CertData); arg_65_0 = (num * 1229629450u ^ 2865226121u); continue; case 2u: AuthSession.smethod_7(); arg_65_0 = (num * 587216413u ^ 2305725567u); continue; case 3u: goto IL_82; } goto Block_1; } } Block_1: AuthSession.smethod_8(this.sslStream, x509Certificate_, false, SslProtocols.Tls12, false); try { int num2 = 0; while (true) { IL_309: uint arg_2AF_0 = 49108843u; while (true) { uint num; switch ((num = (arg_2AF_0 ^ 246562425u)) % 19u) { case 0u: { byte[] array; int num3; byte[] array2; AuthSession.smethod_12(array, 2 + num3, array2, 0, array2.Length); arg_2AF_0 = (num * 1170099715u ^ 2371495065u); continue; } case 2u: { num2 = AuthSession.smethod_9(this.sslStream, this.dataBuffer, 0, this.dataBuffer.Length); byte[] array = new byte[num2]; arg_2AF_0 = 1549349530u; continue; } case 3u: { int num4; arg_2AF_0 = ((num4 == 0) ? 1463133268u : 1037717072u); continue; } case 4u: { byte[] array3; byte[] array = array3; arg_2AF_0 = (num * 4033826896u ^ 2031620618u); continue; } case 5u: { byte[] array2; Header header; PacketManager.InvokeHandler(this, header, array2); byte[] array; int num3; byte[] array3 = new byte[array.Length - (2 + num3 + array2.Length)]; AuthSession.smethod_12(array, 2 + num3 + array2.Length, array3, 0, array3.Length); arg_2AF_0 = (num * 3708909547u ^ 2854981413u); continue; } case 6u: { byte[] array; arg_2AF_0 = (((array.Length != 0) ? 2945062073u : 3965050639u) ^ num * 1155918630u); continue; } case 7u: { byte[] array; int num3 = (int)array[0] << 8 | (int)array[1]; arg_2AF_0 = 578192904u; continue; } case 8u: goto IL_309; case 10u: arg_2AF_0 = (num * 2487307768u ^ 3498454815u); continue; case 11u: AuthSession.smethod_11(this.client); arg_2AF_0 = 1429566910u; continue; case 12u: arg_2AF_0 = (((num2 == 0) ? 626390441u : 591395909u) ^ num * 3512777382u); continue; case 13u: { byte[] array; AuthSession.smethod_10(this.dataBuffer, array, num2); arg_2AF_0 = (num * 1924678482u ^ 1480375202u); continue; } case 14u: { Header header; byte[] array2 = new byte[header.Size]; arg_2AF_0 = (num * 1432188463u ^ 2010760901u); continue; } case 15u: { byte[] array; arg_2AF_0 = (((array == null) ? 1352117440u : 1641829883u) ^ num * 3270442297u); continue; } case 16u: { int num3; byte[] array2; int num4; num4 -= 2 + num3 + array2.Length; arg_2AF_0 = (num * 1437371291u ^ 225455286u); continue; } case 17u: { byte[] array; int num3; Header header = Header.Parser.ParseFrom(new CodedInputStream(array, 2, num3)); arg_2AF_0 = (num * 1259081135u ^ 326502318u); continue; } case 18u: { byte[] array; int num4 = array.Length; arg_2AF_0 = 77016214u; continue; } } goto Block_8; } } Block_8:; } catch { AuthSession.smethod_13(this.nStream); AuthSession.smethod_13(this.sslStream); AuthSession.smethod_11(this.client); this.Dispose(); } } private bool App_CertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; } public void Send(byte[] rawdata) { AuthSession.smethod_14(this.sslStream, rawdata); } public void Send(IMessage message) { try { byte[] array = message.ToByteArray(); Header expr_0C = new Header(); uint num = this.token; this.token = num + 1u; expr_0C.Token = num; expr_0C.ServiceId = 254u; expr_0C.Size = (uint)array.Length; byte[] array2 = expr_0C.ToByteArray(); byte[] array3 = new byte[] { (byte)(array2.Length >> 8), (byte)(array2.Length & 255) }.Concat(array2).Concat(array).ToArray<byte>(); if (array3.Length != 2 + array2.Length + array.Length) { goto IL_BD; } goto IL_E8; uint arg_C7_0; while (true) { IL_C2: uint num2; switch ((num2 = (arg_C7_0 ^ 3498315501u)) % 5u) { case 0u: goto IL_BD; case 1u: Log.Message(LogType.Error, AuthSession.smethod_16(Module.smethod_34<string>(2746132316u), AuthSession.smethod_15(message)), Array.Empty<object>()); arg_C7_0 = (num2 * 2776554468u ^ 2779500804u); continue; case 2u: goto IL_E8; case 4u: arg_C7_0 = (num2 * 1413244438u ^ 368722621u); continue; } break; } return; IL_BD: arg_C7_0 = 2237932556u; goto IL_C2; IL_E8: AuthSession.smethod_14(this.sslStream, array3); arg_C7_0 = 4047401123u; goto IL_C2; } catch (SocketException exception_) { Log.Message(LogType.Error, Module.smethod_35<string>(877436003u), new object[] { AuthSession.smethod_17(exception_) }); AuthSession.smethod_18(this.client); } } public void Send(IMessage message, uint serviceHash, uint methodId) { try { byte[] array = message.ToByteArray(); Header expr_0C = new Header(); uint num = this.token; this.token = num + 1u; expr_0C.Token = num; expr_0C.ServiceId = 0u; expr_0C.ServiceHash = serviceHash; expr_0C.MethodId = methodId; expr_0C.Size = (uint)array.Length; byte[] array2 = expr_0C.ToByteArray(); while (true) { IL_152: uint arg_125_0 = 366186159u; while (true) { uint num2; switch ((num2 = (arg_125_0 ^ 1624281610u)) % 8u) { case 0u: Log.Message(LogType.Error, AuthSession.smethod_16(Module.smethod_37<string>(146717431u), AuthSession.smethod_15(message)), Array.Empty<object>()); arg_125_0 = (num2 * 972919856u ^ 2132085211u); continue; case 1u: arg_125_0 = (num2 * 1574694440u ^ 1593343040u); continue; case 3u: { byte[] array3; AuthSession.smethod_14(this.sslStream, array3); arg_125_0 = 2110467816u; continue; } case 4u: goto IL_152; case 5u: { byte[] array3 = new byte[2]; arg_125_0 = (num2 * 163145253u ^ 3423772749u); continue; } case 6u: { byte[] array3; array3[0] = (byte)(array2.Length >> 8); arg_125_0 = (num2 * 4016648404u ^ 1584836037u); continue; } case 7u: { byte[] array3; array3[1] = (byte)(array2.Length & 255); array3 = array3.Concat(array2).Concat(array).ToArray<byte>(); arg_125_0 = (((array3.Length != 2 + array2.Length + array.Length) ? 300038973u : 1367012310u) ^ num2 * 1699785961u); continue; } } goto Block_3; } } Block_3:; } catch (SocketException exception_) { Log.Message(LogType.Error, Module.smethod_37<string>(2717862335u), new object[] { AuthSession.smethod_17(exception_) }); AuthSession.smethod_18(this.client); } } private void SendCompleted(object sender, SocketAsyncEventArgs e) { } public void Dispose() { this.client = null; this.Account = null; this.SecureRemotePassword = null; } static EndPoint smethod_0(Socket socket_0) { return socket_0.RemoteEndPoint; } static IPAddress smethod_1(IPEndPoint ipendPoint_0) { return ipendPoint_0.Address; } static int smethod_2(IPEndPoint ipendPoint_0) { return ipendPoint_0.Port; } static string smethod_3(object object_0, object object_1, object object_2) { return object_0 + object_1 + object_2; } static NetworkStream smethod_4(Socket socket_0) { return new NetworkStream(socket_0); } static SslStream smethod_5(Stream stream_0, bool bool_0, RemoteCertificateValidationCallback remoteCertificateValidationCallback_0) { return new SslStream(stream_0, bool_0, remoteCertificateValidationCallback_0); } static X509Certificate2 smethod_6(byte[] byte_0) { return new X509Certificate2(byte_0); } static X509Chain smethod_7() { return X509Chain.Create(); } static void smethod_8(SslStream sslStream_0, X509Certificate x509Certificate_0, bool bool_0, SslProtocols sslProtocols_0, bool bool_1) { sslStream_0.AuthenticateAsServer(x509Certificate_0, bool_0, sslProtocols_0, bool_1); } static int smethod_9(Stream stream_0, byte[] byte_0, int int_0, int int_1) { return stream_0.Read(byte_0, int_0, int_1); } static void smethod_10(Array array_0, Array array_1, int int_0) { Array.Copy(array_0, array_1, int_0); } static void smethod_11(Socket socket_0) { socket_0.Dispose(); } static void smethod_12(Array array_0, int int_0, Array array_1, int int_1, int int_2) { Array.Copy(array_0, int_0, array_1, int_1, int_2); } static void smethod_13(Stream stream_0) { stream_0.Dispose(); } static void smethod_14(SslStream sslStream_0, byte[] byte_0) { sslStream_0.Write(byte_0); } static string smethod_15(object object_0) { return object_0.ToString(); } static string smethod_16(string string_0, object object_0) { return string.Format(string_0, object_0); } static string smethod_17(Exception exception_0) { return exception_0.Message; } static void smethod_18(Socket socket_0) { socket_0.Close(); } } } <file_sep>/Bgs.Protocol.Account.V1/AccountServiceRegion.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class AccountServiceRegion : IMessage<AccountServiceRegion>, IEquatable<AccountServiceRegion>, IDeepCloneable<AccountServiceRegion>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly AccountServiceRegion.__c __9 = new AccountServiceRegion.__c(); internal AccountServiceRegion cctor>b__29_0() { return new AccountServiceRegion(); } } private static readonly MessageParser<AccountServiceRegion> _parser = new MessageParser<AccountServiceRegion>(new Func<AccountServiceRegion>(AccountServiceRegion.__c.__9.<.cctor>b__29_0)); public const int IdFieldNumber = 1; private uint id_; public const int ShardFieldNumber = 2; private string shard_ = ""; public static MessageParser<AccountServiceRegion> Parser { get { return AccountServiceRegion._parser; } } public static MessageDescriptor Descriptor { get { return AccountServiceReflection.Descriptor.MessageTypes[11]; } } MessageDescriptor IMessage.Descriptor { get { return AccountServiceRegion.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public string Shard { get { return this.shard_; } set { this.shard_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public AccountServiceRegion() { } public AccountServiceRegion(AccountServiceRegion other) : this() { this.id_ = other.id_; this.shard_ = other.shard_; } public AccountServiceRegion Clone() { return new AccountServiceRegion(this); } public override bool Equals(object other) { return this.Equals(other as AccountServiceRegion); } public bool Equals(AccountServiceRegion other) { if (other == null) { goto IL_41; } goto IL_B0; int arg_72_0; while (true) { IL_6D: switch ((arg_72_0 ^ -243784355) % 9) { case 1: return false; case 2: return false; case 3: return true; case 4: arg_72_0 = ((this.Id == other.Id) ? -474019286 : -1454842775); continue; case 5: return false; case 6: goto IL_41; case 7: goto IL_B0; case 8: arg_72_0 = (AccountServiceRegion.smethod_0(this.Shard, other.Shard) ? -285594393 : -78928658); continue; } break; } return true; IL_41: arg_72_0 = -1761915908; goto IL_6D; IL_B0: arg_72_0 = ((other == this) ? -920005855 : -591651993); goto IL_6D; } public override int GetHashCode() { return 1 ^ this.Id.GetHashCode() ^ this.Shard.GetHashCode(); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(8); while (true) { IL_79: uint arg_59_0 = 1558647255u; while (true) { uint num; switch ((num = (arg_59_0 ^ 1901724315u)) % 5u) { case 0u: output.WriteString(this.Shard); arg_59_0 = (num * 3240259012u ^ 4000651009u); continue; case 2u: output.WriteRawTag(18); arg_59_0 = (num * 3962168832u ^ 2372137528u); continue; case 3u: goto IL_79; case 4u: output.WriteUInt32(this.Id); arg_59_0 = (num * 547823106u ^ 3543405076u); continue; } return; } } } public int CalculateSize() { return 0 + (1 + CodedOutputStream.ComputeUInt32Size(this.Id)) + (1 + CodedOutputStream.ComputeStringSize(this.Shard)); } public void MergeFrom(AccountServiceRegion other) { if (other == null) { goto IL_15; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 106138988u)) % 7u) { case 0u: goto IL_B2; case 1u: return; case 2u: this.Id = other.Id; arg_7B_0 = (num * 2047854339u ^ 2498826554u); continue; case 3u: arg_7B_0 = ((AccountServiceRegion.smethod_1(other.Shard) == 0) ? 524268752u : 1267221343u); continue; case 4u: this.Shard = other.Shard; arg_7B_0 = (num * 4205492649u ^ 3871624827u); continue; case 5u: goto IL_15; } break; } return; IL_15: arg_7B_0 = 304907078u; goto IL_76; IL_B2: arg_7B_0 = ((other.Id != 0u) ? 1267497756u : 1177674346u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_103: uint num; uint arg_BF_0 = ((num = input.ReadTag()) == 0u) ? 2931390880u : 4096333378u; while (true) { uint num2; switch ((num2 = (arg_BF_0 ^ 3455439912u)) % 10u) { case 0u: arg_BF_0 = 4096333378u; continue; case 1u: arg_BF_0 = (((num != 18u) ? 418279692u : 955041696u) ^ num2 * 2088151111u); continue; case 2u: arg_BF_0 = ((num == 8u) ? 3143272109u : 3573490085u); continue; case 3u: this.Id = input.ReadUInt32(); arg_BF_0 = 4205719437u; continue; case 5u: input.SkipLastField(); arg_BF_0 = (num2 * 4042029960u ^ 2971808628u); continue; case 6u: goto IL_103; case 7u: arg_BF_0 = (num2 * 2590078781u ^ 949263805u); continue; case 8u: arg_BF_0 = (num2 * 3133103258u ^ 472906564u); continue; case 9u: this.Shard = input.ReadString(); arg_BF_0 = 3070047468u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Authentication.V1/GenerateSSOTokenResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Authentication.V1 { [DebuggerNonUserCode] public sealed class GenerateSSOTokenResponse : IMessage<GenerateSSOTokenResponse>, IEquatable<GenerateSSOTokenResponse>, IDeepCloneable<GenerateSSOTokenResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenerateSSOTokenResponse.__c __9 = new GenerateSSOTokenResponse.__c(); internal GenerateSSOTokenResponse cctor>b__29_0() { return new GenerateSSOTokenResponse(); } } private static readonly MessageParser<GenerateSSOTokenResponse> _parser = new MessageParser<GenerateSSOTokenResponse>(new Func<GenerateSSOTokenResponse>(GenerateSSOTokenResponse.__c.__9.<.cctor>b__29_0)); public const int SsoIdFieldNumber = 1; private ByteString ssoId_ = ByteString.Empty; public const int SsoSecretFieldNumber = 2; private ByteString ssoSecret_ = ByteString.Empty; public static MessageParser<GenerateSSOTokenResponse> Parser { get { return GenerateSSOTokenResponse._parser; } } public static MessageDescriptor Descriptor { get { return AuthenticationServiceReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return GenerateSSOTokenResponse.Descriptor; } } public ByteString SsoId { get { return this.ssoId_; } set { this.ssoId_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_37<string>(2719011704u)); } } public ByteString SsoSecret { get { return this.ssoSecret_; } set { this.ssoSecret_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_33<string>(58016685u)); } } public GenerateSSOTokenResponse() { } public GenerateSSOTokenResponse(GenerateSSOTokenResponse other) : this() { while (true) { IL_4A: uint arg_32_0 = 1482045540u; while (true) { uint num; switch ((num = (arg_32_0 ^ 1994678771u)) % 3u) { case 0u: goto IL_4A; case 2u: this.ssoId_ = other.ssoId_; this.ssoSecret_ = other.ssoSecret_; arg_32_0 = (num * 1835675730u ^ 3430762727u); continue; } return; } } } public GenerateSSOTokenResponse Clone() { return new GenerateSSOTokenResponse(this); } public override bool Equals(object other) { return this.Equals(other as GenerateSSOTokenResponse); } public bool Equals(GenerateSSOTokenResponse other) { if (other == null) { goto IL_41; } goto IL_B5; int arg_77_0; while (true) { IL_72: switch ((arg_77_0 ^ 711765672) % 9) { case 0: return false; case 1: return false; case 2: goto IL_B5; case 4: return false; case 5: return true; case 6: arg_77_0 = ((this.SsoSecret != other.SsoSecret) ? 594370519 : 844436430); continue; case 7: goto IL_41; case 8: arg_77_0 = ((this.SsoId != other.SsoId) ? 1005038691 : 573248186); continue; } break; } return true; IL_41: arg_77_0 = 539041465; goto IL_72; IL_B5: arg_77_0 = ((other != this) ? 1963992318 : 306518208); goto IL_72; } public override int GetHashCode() { int num = 1; if (this.SsoId.Length != 0) { goto IL_58; } goto IL_8E; uint arg_62_0; while (true) { IL_5D: uint num2; switch ((num2 = (arg_62_0 ^ 1561005036u)) % 5u) { case 0u: goto IL_58; case 1u: goto IL_8E; case 3u: num ^= GenerateSSOTokenResponse.smethod_0(this.SsoId); arg_62_0 = (num2 * 4021015553u ^ 3233888778u); continue; case 4u: num ^= GenerateSSOTokenResponse.smethod_0(this.SsoSecret); arg_62_0 = (num2 * 2417445672u ^ 2491701601u); continue; } break; } return num; IL_58: arg_62_0 = 343712879u; goto IL_5D; IL_8E: arg_62_0 = ((this.SsoSecret.Length == 0) ? 1831729025u : 1075864896u); goto IL_5D; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.SsoId.Length != 0) { goto IL_5D; } goto IL_B1; uint arg_7E_0; while (true) { IL_79: uint num; switch ((num = (arg_7E_0 ^ 423600484u)) % 6u) { case 1u: output.WriteRawTag(10); arg_7E_0 = (num * 2907994506u ^ 1529198111u); continue; case 2u: goto IL_5D; case 3u: goto IL_B1; case 4u: output.WriteRawTag(18); output.WriteBytes(this.SsoSecret); arg_7E_0 = (num * 457886960u ^ 3573352830u); continue; case 5u: output.WriteBytes(this.SsoId); arg_7E_0 = (num * 2317270511u ^ 2714632348u); continue; } break; } return; IL_5D: arg_7E_0 = 2083937047u; goto IL_79; IL_B1: arg_7E_0 = ((this.SsoSecret.Length != 0) ? 1231143644u : 534320638u); goto IL_79; } public int CalculateSize() { int num = 0; while (true) { IL_C0: uint arg_9C_0 = 3512620918u; while (true) { uint num2; switch ((num2 = (arg_9C_0 ^ 2476875105u)) % 6u) { case 0u: goto IL_C0; case 1u: arg_9C_0 = (((this.SsoId.Length != 0) ? 1447886262u : 1787173029u) ^ num2 * 2748678068u); continue; case 2u: num += 1 + CodedOutputStream.ComputeBytesSize(this.SsoSecret); arg_9C_0 = (num2 * 3301904398u ^ 977283400u); continue; case 4u: arg_9C_0 = ((this.SsoSecret.Length != 0) ? 3476082677u : 3902598480u); continue; case 5u: num += 1 + CodedOutputStream.ComputeBytesSize(this.SsoId); arg_9C_0 = (num2 * 3690301719u ^ 3226974468u); continue; } return num; } } return num; } public void MergeFrom(GenerateSSOTokenResponse other) { if (other == null) { goto IL_3B; } goto IL_B2; uint arg_7B_0; while (true) { IL_76: uint num; switch ((num = (arg_7B_0 ^ 421240551u)) % 7u) { case 0u: this.SsoSecret = other.SsoSecret; arg_7B_0 = (num * 1424743615u ^ 290105704u); continue; case 2u: goto IL_B2; case 3u: return; case 4u: this.SsoId = other.SsoId; arg_7B_0 = (num * 845027319u ^ 2357486188u); continue; case 5u: goto IL_3B; case 6u: arg_7B_0 = ((other.SsoSecret.Length != 0) ? 1523669165u : 903159902u); continue; } break; } return; IL_3B: arg_7B_0 = 1488212743u; goto IL_76; IL_B2: arg_7B_0 = ((other.SsoId.Length != 0) ? 1097860040u : 1823572789u); goto IL_76; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F1: uint num; uint arg_B1_0 = ((num = input.ReadTag()) != 0u) ? 2437974588u : 4279548387u; while (true) { uint num2; switch ((num2 = (arg_B1_0 ^ 4165014924u)) % 9u) { case 0u: arg_B1_0 = (((num != 18u) ? 486518728u : 1752602802u) ^ num2 * 1521196738u); continue; case 1u: arg_B1_0 = ((num != 10u) ? 3062444248u : 3233553058u); continue; case 2u: goto IL_F1; case 3u: arg_B1_0 = (num2 * 2734270329u ^ 437922431u); continue; case 4u: arg_B1_0 = 2437974588u; continue; case 5u: input.SkipLastField(); arg_B1_0 = (num2 * 1142279484u ^ 2330195963u); continue; case 7u: this.SsoId = input.ReadBytes(); arg_B1_0 = 3005885944u; continue; case 8u: this.SsoSecret = input.ReadBytes(); arg_B1_0 = 4065292459u; continue; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Friends.V1/GenericFriendResponse.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Friends.V1 { [DebuggerNonUserCode] public sealed class GenericFriendResponse : IMessage<GenericFriendResponse>, IEquatable<GenericFriendResponse>, IDeepCloneable<GenericFriendResponse>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GenericFriendResponse.__c __9 = new GenericFriendResponse.__c(); internal GenericFriendResponse cctor>b__24_0() { return new GenericFriendResponse(); } } private static readonly MessageParser<GenericFriendResponse> _parser = new MessageParser<GenericFriendResponse>(new Func<GenericFriendResponse>(GenericFriendResponse.__c.__9.<.cctor>b__24_0)); public const int TargetFriendFieldNumber = 1; private Friend targetFriend_; public static MessageParser<GenericFriendResponse> Parser { get { return GenericFriendResponse._parser; } } public static MessageDescriptor Descriptor { get { return FriendsServiceReflection.Descriptor.MessageTypes[4]; } } MessageDescriptor IMessage.Descriptor { get { return GenericFriendResponse.Descriptor; } } public Friend TargetFriend { get { return this.targetFriend_; } set { this.targetFriend_ = value; } } public GenericFriendResponse() { } public GenericFriendResponse(GenericFriendResponse other) : this() { this.TargetFriend = ((other.targetFriend_ != null) ? other.TargetFriend.Clone() : null); } public GenericFriendResponse Clone() { return new GenericFriendResponse(this); } public override bool Equals(object other) { return this.Equals(other as GenericFriendResponse); } public bool Equals(GenericFriendResponse other) { if (other == null) { goto IL_3E; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -481284102) % 7) { case 0: goto IL_3E; case 1: return true; case 2: return false; case 3: return false; case 4: goto IL_7A; case 6: arg_48_0 = ((!GenericFriendResponse.smethod_0(this.TargetFriend, other.TargetFriend)) ? -755819204 : -215223555); continue; } break; } return true; IL_3E: arg_48_0 = -1433998514; goto IL_43; IL_7A: arg_48_0 = ((other == this) ? -1363562283 : -174120665); goto IL_43; } public override int GetHashCode() { int num = 1; if (this.targetFriend_ != null) { while (true) { IL_44: uint arg_2C_0 = 608288889u; while (true) { uint num2; switch ((num2 = (arg_2C_0 ^ 582910853u)) % 3u) { case 1u: num ^= GenericFriendResponse.smethod_1(this.TargetFriend); arg_2C_0 = (num2 * 602309793u ^ 2349492596u); continue; case 2u: goto IL_44; } goto Block_2; } } Block_2:; } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.targetFriend_ != null) { while (true) { IL_5B: uint arg_3F_0 = 3176292016u; while (true) { uint num; switch ((num = (arg_3F_0 ^ 3401141181u)) % 4u) { case 1u: output.WriteRawTag(10); arg_3F_0 = (num * 1500409397u ^ 2435209951u); continue; case 2u: goto IL_5B; case 3u: output.WriteMessage(this.TargetFriend); arg_3F_0 = (num * 3313887079u ^ 971432596u); continue; } goto Block_2; } } Block_2:; } } public int CalculateSize() { int num = 0; if (this.targetFriend_ != null) { while (true) { IL_46: uint arg_2E_0 = 2279332820u; while (true) { uint num2; switch ((num2 = (arg_2E_0 ^ 3321124023u)) % 3u) { case 0u: goto IL_46; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetFriend); arg_2E_0 = (num2 * 2963102706u ^ 3279582639u); continue; } goto Block_2; } } Block_2:; } return num; } public void MergeFrom(GenericFriendResponse other) { if (other == null) { goto IL_15; } goto IL_B1; uint arg_7A_0; while (true) { IL_75: uint num; switch ((num = (arg_7A_0 ^ 2743814540u)) % 7u) { case 0u: goto IL_B1; case 1u: this.TargetFriend.MergeFrom(other.TargetFriend); arg_7A_0 = 2858933175u; continue; case 2u: this.targetFriend_ = new Friend(); arg_7A_0 = (num * 3012147199u ^ 3870607763u); continue; case 3u: arg_7A_0 = (((this.targetFriend_ == null) ? 1138256825u : 942591064u) ^ num * 1900074668u); continue; case 5u: return; case 6u: goto IL_15; } break; } return; IL_15: arg_7A_0 = 3987139808u; goto IL_75; IL_B1: arg_7A_0 = ((other.targetFriend_ == null) ? 2858933175u : 3723162430u); goto IL_75; } public void MergeFrom(CodedInputStream input) { while (true) { IL_F3: uint num; uint arg_B3_0 = ((num = input.ReadTag()) == 0u) ? 391262270u : 792127524u; while (true) { uint num2; switch ((num2 = (arg_B3_0 ^ 1330379313u)) % 9u) { case 0u: arg_B3_0 = 792127524u; continue; case 1u: this.targetFriend_ = new Friend(); arg_B3_0 = (num2 * 3289956026u ^ 3664980577u); continue; case 2u: arg_B3_0 = ((num != 10u) ? 1246199755u : 664788917u); continue; case 3u: arg_B3_0 = (num2 * 584974791u ^ 1741251918u); continue; case 4u: goto IL_F3; case 5u: arg_B3_0 = ((this.targetFriend_ == null) ? 133000300u : 1663660019u); continue; case 7u: input.SkipLastField(); arg_B3_0 = (num2 * 2896022696u ^ 1921387539u); continue; case 8u: input.ReadMessage(this.targetFriend_); arg_B3_0 = 1738077072u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.UserManager.V1/BlockPlayerRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.UserManager.V1 { [DebuggerNonUserCode] public sealed class BlockPlayerRequest : IMessage<BlockPlayerRequest>, IEquatable<BlockPlayerRequest>, IDeepCloneable<BlockPlayerRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly BlockPlayerRequest.__c __9 = new BlockPlayerRequest.__c(); internal BlockPlayerRequest cctor>b__34_0() { return new BlockPlayerRequest(); } } private static readonly MessageParser<BlockPlayerRequest> _parser = new MessageParser<BlockPlayerRequest>(new Func<BlockPlayerRequest>(BlockPlayerRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int TargetIdFieldNumber = 2; private EntityId targetId_; public const int RoleFieldNumber = 3; private uint role_; public static MessageParser<BlockPlayerRequest> Parser { get { return BlockPlayerRequest._parser; } } public static MessageDescriptor Descriptor { get { return UserManagerServiceReflection.Descriptor.MessageTypes[7]; } } MessageDescriptor IMessage.Descriptor { get { return BlockPlayerRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public EntityId TargetId { get { return this.targetId_; } set { this.targetId_ = value; } } public uint Role { get { return this.role_; } set { this.role_ = value; } } public BlockPlayerRequest() { } public BlockPlayerRequest(BlockPlayerRequest other) : this() { this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.TargetId = ((other.targetId_ != null) ? other.TargetId.Clone() : null); this.role_ = other.role_; } public BlockPlayerRequest Clone() { return new BlockPlayerRequest(this); } public override bool Equals(object other) { return this.Equals(other as BlockPlayerRequest); } public bool Equals(BlockPlayerRequest other) { if (other == null) { goto IL_9A; } goto IL_EA; int arg_A4_0; while (true) { IL_9F: switch ((arg_A4_0 ^ 1753505809) % 11) { case 0: goto IL_9A; case 1: return false; case 3: goto IL_EA; case 4: return false; case 5: return false; case 6: return false; case 7: arg_A4_0 = ((!BlockPlayerRequest.smethod_0(this.TargetId, other.TargetId)) ? 636131386 : 174501307); continue; case 8: arg_A4_0 = ((!BlockPlayerRequest.smethod_0(this.AgentId, other.AgentId)) ? 850816351 : 1094753121); continue; case 9: arg_A4_0 = ((this.Role != other.Role) ? 1342000158 : 1383478453); continue; case 10: return true; } break; } return true; IL_9A: arg_A4_0 = 1343805689; goto IL_9F; IL_EA: arg_A4_0 = ((other == this) ? 887754127 : 2035226501); goto IL_9F; } public override int GetHashCode() { int num = 1; while (true) { IL_C3: uint arg_9F_0 = 4094351029u; while (true) { uint num2; switch ((num2 = (arg_9F_0 ^ 2345737771u)) % 6u) { case 0u: goto IL_C3; case 1u: num ^= BlockPlayerRequest.smethod_1(this.AgentId); arg_9F_0 = (num2 * 3190853153u ^ 3389760901u); continue; case 2u: arg_9F_0 = (((this.agentId_ != null) ? 3889054368u : 3821063790u) ^ num2 * 342501023u); continue; case 4u: num ^= this.Role.GetHashCode(); arg_9F_0 = (num2 * 55733820u ^ 2422720590u); continue; case 5u: num ^= BlockPlayerRequest.smethod_1(this.TargetId); arg_9F_0 = ((this.Role != 0u) ? 2789697781u : 2467596358u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { goto IL_1A; } goto IL_BF; uint arg_88_0; while (true) { IL_83: uint num; switch ((num = (arg_88_0 ^ 2951151578u)) % 7u) { case 0u: output.WriteRawTag(24); arg_88_0 = (num * 2370403513u ^ 1744669602u); continue; case 1u: output.WriteRawTag(10); arg_88_0 = (num * 547637763u ^ 3526781927u); continue; case 2u: output.WriteMessage(this.AgentId); arg_88_0 = (num * 3405917161u ^ 2562478544u); continue; case 3u: goto IL_BF; case 4u: output.WriteUInt32(this.Role); arg_88_0 = (num * 678869454u ^ 287951380u); continue; case 5u: goto IL_1A; } break; } return; IL_1A: arg_88_0 = 2202569035u; goto IL_83; IL_BF: output.WriteRawTag(18); output.WriteMessage(this.TargetId); arg_88_0 = ((this.Role == 0u) ? 3369837810u : 4175645967u); goto IL_83; } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_3B; } goto IL_90; uint arg_64_0; while (true) { IL_5F: uint num2; switch ((num2 = (arg_64_0 ^ 3198271240u)) % 5u) { case 0u: goto IL_90; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Role); arg_64_0 = (num2 * 957960704u ^ 619359941u); continue; case 2u: goto IL_3B; case 3u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_64_0 = (num2 * 3541752243u ^ 630721529u); continue; } break; } return num; IL_3B: arg_64_0 = 2231367339u; goto IL_5F; IL_90: num += 1 + CodedOutputStream.ComputeMessageSize(this.TargetId); arg_64_0 = ((this.Role == 0u) ? 2728806085u : 2703546460u); goto IL_5F; } public void MergeFrom(BlockPlayerRequest other) { if (other == null) { goto IL_18; } goto IL_194; uint arg_144_0; while (true) { IL_13F: uint num; switch ((num = (arg_144_0 ^ 63297788u)) % 13u) { case 0u: goto IL_194; case 1u: this.targetId_ = new EntityId(); arg_144_0 = (num * 106352405u ^ 238230404u); continue; case 2u: this.Role = other.Role; arg_144_0 = (num * 156142235u ^ 607593007u); continue; case 3u: this.TargetId.MergeFrom(other.TargetId); arg_144_0 = 1165542181u; continue; case 5u: arg_144_0 = ((other.Role != 0u) ? 213234559u : 1809355902u); continue; case 6u: arg_144_0 = (((this.targetId_ == null) ? 4168382957u : 4047503905u) ^ num * 3927165783u); continue; case 7u: arg_144_0 = ((other.targetId_ != null) ? 1505818934u : 1165542181u); continue; case 8u: arg_144_0 = (((this.agentId_ != null) ? 1203856628u : 778278600u) ^ num * 1146978903u); continue; case 9u: this.AgentId.MergeFrom(other.AgentId); arg_144_0 = 2002319659u; continue; case 10u: return; case 11u: this.agentId_ = new EntityId(); arg_144_0 = (num * 1577662211u ^ 228338114u); continue; case 12u: goto IL_18; } break; } return; IL_18: arg_144_0 = 1186313025u; goto IL_13F; IL_194: arg_144_0 = ((other.agentId_ == null) ? 2002319659u : 2035635631u); goto IL_13F; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1D0: uint num; uint arg_178_0 = ((num = input.ReadTag()) != 0u) ? 4101443890u : 4046772019u; while (true) { uint num2; switch ((num2 = (arg_178_0 ^ 2259886453u)) % 15u) { case 1u: arg_178_0 = (((num == 24u) ? 2442498287u : 3806788788u) ^ num2 * 1797531592u); continue; case 2u: this.agentId_ = new EntityId(); arg_178_0 = (num2 * 2831909177u ^ 4184217701u); continue; case 3u: arg_178_0 = ((this.targetId_ != null) ? 3005186690u : 2520838329u); continue; case 4u: arg_178_0 = (((num == 18u) ? 775325560u : 855551950u) ^ num2 * 2672481410u); continue; case 5u: input.ReadMessage(this.targetId_); arg_178_0 = 4060227092u; continue; case 6u: input.SkipLastField(); arg_178_0 = (num2 * 2880381674u ^ 811564078u); continue; case 7u: goto IL_1D0; case 8u: this.Role = input.ReadUInt32(); arg_178_0 = 4060227092u; continue; case 9u: arg_178_0 = ((num != 10u) ? 4143138184u : 3878435998u); continue; case 10u: arg_178_0 = ((this.agentId_ != null) ? 2499596536u : 3707828208u); continue; case 11u: arg_178_0 = (num2 * 3492598426u ^ 3502039540u); continue; case 12u: this.targetId_ = new EntityId(); arg_178_0 = (num2 * 1051312624u ^ 779418050u); continue; case 13u: arg_178_0 = 4101443890u; continue; case 14u: input.ReadMessage(this.agentId_); arg_178_0 = 2380815045u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Channel.V1/MemberState.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class MemberState : IMessage<MemberState>, IEquatable<MemberState>, IDeepCloneable<MemberState>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly MemberState.__c __9 = new MemberState.__c(); internal MemberState cctor>b__44_0() { return new MemberState(); } } private static readonly MessageParser<MemberState> _parser = new MessageParser<MemberState>(new Func<MemberState>(MemberState.__c.__9.<.cctor>b__44_0)); public const int AttributeFieldNumber = 1; private static readonly FieldCodec<Bgs.Protocol.Attribute> _repeated_attribute_codec = FieldCodec.ForMessage<Bgs.Protocol.Attribute>(10u, Bgs.Protocol.Attribute.Parser); private readonly RepeatedField<Bgs.Protocol.Attribute> attribute_ = new RepeatedField<Bgs.Protocol.Attribute>(); public const int RoleFieldNumber = 2; private static readonly FieldCodec<uint> _repeated_role_codec = FieldCodec.ForUInt32(18u); private readonly RepeatedField<uint> role_ = new RepeatedField<uint>(); public const int PrivilegesFieldNumber = 3; private ulong privileges_; public const int InfoFieldNumber = 4; private AccountInfo info_; public const int DEPRECATEDHiddenFieldNumber = 5; private bool dEPRECATEDHidden_; public static MessageParser<MemberState> Parser { get { return MemberState._parser; } } public static MessageDescriptor Descriptor { get { return ChannelTypesReflection.Descriptor.MessageTypes[6]; } } MessageDescriptor IMessage.Descriptor { get { return MemberState.Descriptor; } } public RepeatedField<Bgs.Protocol.Attribute> Attribute { get { return this.attribute_; } } public RepeatedField<uint> Role { get { return this.role_; } } public ulong Privileges { get { return this.privileges_; } set { this.privileges_ = value; } } public AccountInfo Info { get { return this.info_; } set { this.info_ = value; } } public bool DEPRECATEDHidden { get { return this.dEPRECATEDHidden_; } set { this.dEPRECATEDHidden_ = value; } } public MemberState() { } public MemberState(MemberState other) : this() { while (true) { IL_9D: uint arg_7D_0 = 721556297u; while (true) { uint num; switch ((num = (arg_7D_0 ^ 1363805824u)) % 5u) { case 0u: this.role_ = other.role_.Clone(); arg_7D_0 = (num * 3858104767u ^ 2844106940u); continue; case 1u: this.attribute_ = other.attribute_.Clone(); arg_7D_0 = (num * 2889401468u ^ 679540175u); continue; case 2u: this.privileges_ = other.privileges_; this.Info = ((other.info_ != null) ? other.Info.Clone() : null); arg_7D_0 = 2017433432u; continue; case 3u: goto IL_9D; } goto Block_2; } } Block_2: this.dEPRECATEDHidden_ = other.dEPRECATEDHidden_; } public MemberState Clone() { return new MemberState(this); } public override bool Equals(object other) { return this.Equals(other as MemberState); } public bool Equals(MemberState other) { if (other == null) { goto IL_42; } goto IL_150; int arg_FA_0; while (true) { IL_F5: switch ((arg_FA_0 ^ -1858847969) % 15) { case 0: return false; case 1: arg_FA_0 = ((this.Privileges == other.Privileges) ? -84682189 : -2137937122); continue; case 2: return false; case 3: arg_FA_0 = (this.attribute_.Equals(other.attribute_) ? -204513718 : -2048964916); continue; case 4: return false; case 5: arg_FA_0 = ((!MemberState.smethod_0(this.Info, other.Info)) ? -818685483 : -1110293389); continue; case 6: return false; case 7: return true; case 8: goto IL_150; case 10: arg_FA_0 = (this.role_.Equals(other.role_) ? -265732000 : -2042606299); continue; case 11: goto IL_42; case 12: return false; case 13: return false; case 14: arg_FA_0 = ((this.DEPRECATEDHidden == other.DEPRECATEDHidden) ? -1703177146 : -2013638314); continue; } break; } return true; IL_42: arg_FA_0 = -22956260; goto IL_F5; IL_150: arg_FA_0 = ((other != this) ? -292120238 : -767756230); goto IL_F5; } public override int GetHashCode() { int num = 1 ^ MemberState.smethod_1(this.attribute_); while (true) { IL_11D: uint arg_F1_0 = 1902943516u; while (true) { uint num2; switch ((num2 = (arg_F1_0 ^ 653977585u)) % 8u) { case 0u: arg_F1_0 = ((this.info_ != null) ? 711376971u : 1993413637u); continue; case 2u: num ^= this.Info.GetHashCode(); arg_F1_0 = (num2 * 1416454424u ^ 1026697077u); continue; case 3u: num ^= this.DEPRECATEDHidden.GetHashCode(); arg_F1_0 = (num2 * 4178116074u ^ 1621441190u); continue; case 4u: arg_F1_0 = ((!this.DEPRECATEDHidden) ? 246386792u : 1382348442u); continue; case 5u: num ^= MemberState.smethod_1(this.role_); arg_F1_0 = (((this.Privileges == 0uL) ? 2728981340u : 3729454491u) ^ num2 * 3623796657u); continue; case 6u: goto IL_11D; case 7u: num ^= this.Privileges.GetHashCode(); arg_F1_0 = (num2 * 1446323759u ^ 648661528u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.attribute_.WriteTo(output, MemberState._repeated_attribute_codec); this.role_.WriteTo(output, MemberState._repeated_role_codec); while (true) { IL_170: uint arg_137_0 = 1884313537u; while (true) { uint num; switch ((num = (arg_137_0 ^ 902067631u)) % 11u) { case 0u: output.WriteMessage(this.Info); arg_137_0 = (num * 1327175836u ^ 3096049689u); continue; case 1u: output.WriteRawTag(40); arg_137_0 = (num * 2856329942u ^ 2708513521u); continue; case 2u: arg_137_0 = ((this.info_ == null) ? 1167416737u : 365036957u); continue; case 4u: arg_137_0 = ((!this.DEPRECATEDHidden) ? 1930386799u : 726812864u); continue; case 5u: output.WriteRawTag(24); arg_137_0 = (num * 416795661u ^ 1857733431u); continue; case 6u: output.WriteRawTag(34); arg_137_0 = (num * 3201061230u ^ 1636941617u); continue; case 7u: output.WriteUInt64(this.Privileges); arg_137_0 = (num * 3474962530u ^ 1909128225u); continue; case 8u: arg_137_0 = (((this.Privileges != 0uL) ? 1248055545u : 1239822585u) ^ num * 2153484202u); continue; case 9u: output.WriteBool(this.DEPRECATEDHidden); arg_137_0 = (num * 1121168799u ^ 2650844547u); continue; case 10u: goto IL_170; } return; } } } public int CalculateSize() { int num = 0; while (true) { IL_135: uint arg_104_0 = 4054054329u; while (true) { uint num2; switch ((num2 = (arg_104_0 ^ 4161636974u)) % 9u) { case 0u: goto IL_135; case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Info); arg_104_0 = (num2 * 1831532562u ^ 321379960u); continue; case 2u: arg_104_0 = (((this.Privileges != 0uL) ? 2582065712u : 2430194462u) ^ num2 * 222837101u); continue; case 3u: arg_104_0 = ((!this.DEPRECATEDHidden) ? 2538728038u : 3737668088u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt64Size(this.Privileges); arg_104_0 = (num2 * 1949783375u ^ 4251518108u); continue; case 6u: num += this.attribute_.CalculateSize(MemberState._repeated_attribute_codec); num += this.role_.CalculateSize(MemberState._repeated_role_codec); arg_104_0 = (num2 * 554937248u ^ 1797354938u); continue; case 7u: num += 2; arg_104_0 = (num2 * 2454858535u ^ 3310819260u); continue; case 8u: arg_104_0 = ((this.info_ == null) ? 2769840164u : 2550006608u); continue; } return num; } } return num; } public void MergeFrom(MemberState other) { if (other == null) { goto IL_44; } goto IL_157; uint arg_11A_0; while (true) { IL_115: uint num; switch ((num = (arg_11A_0 ^ 1135144546u)) % 12u) { case 0u: this.info_ = new AccountInfo(); arg_11A_0 = (num * 3713590745u ^ 4174200629u); continue; case 1u: return; case 2u: arg_11A_0 = ((!other.DEPRECATEDHidden) ? 1656915793u : 285998200u); continue; case 3u: this.Info.MergeFrom(other.Info); arg_11A_0 = 1262946996u; continue; case 4u: goto IL_157; case 5u: arg_11A_0 = (((other.Privileges == 0uL) ? 1057389418u : 498458735u) ^ num * 2269014494u); continue; case 6u: arg_11A_0 = ((other.info_ == null) ? 1262946996u : 1831171274u); continue; case 8u: arg_11A_0 = (((this.info_ != null) ? 2787483793u : 2866442278u) ^ num * 2349235473u); continue; case 9u: goto IL_44; case 10u: this.DEPRECATEDHidden = other.DEPRECATEDHidden; arg_11A_0 = (num * 2648308074u ^ 2095599509u); continue; case 11u: this.Privileges = other.Privileges; arg_11A_0 = (num * 3749417044u ^ 566501992u); continue; } break; } return; IL_44: arg_11A_0 = 778702515u; goto IL_115; IL_157: this.attribute_.Add(other.attribute_); this.role_.Add(other.role_); arg_11A_0 = 2018291315u; goto IL_115; } public void MergeFrom(CodedInputStream input) { while (true) { IL_2BE: uint num; uint arg_246_0 = ((num = input.ReadTag()) != 0u) ? 2737835890u : 3048208745u; while (true) { uint num2; switch ((num2 = (arg_246_0 ^ 2246414525u)) % 23u) { case 0u: goto IL_2BE; case 1u: arg_246_0 = (((num != 40u) ? 3236060553u : 3938239125u) ^ num2 * 1413439998u); continue; case 2u: arg_246_0 = (num2 * 3248911609u ^ 2172688267u); continue; case 3u: arg_246_0 = (((num != 34u) ? 3880279389u : 3164557566u) ^ num2 * 3534801821u); continue; case 4u: input.ReadMessage(this.info_); arg_246_0 = 2810466451u; continue; case 6u: arg_246_0 = (((num != 16u) ? 3948674076u : 2869721572u) ^ num2 * 3973123142u); continue; case 7u: arg_246_0 = ((num != 24u) ? 3538106183u : 2185289230u); continue; case 8u: this.role_.AddEntriesFrom(input, MemberState._repeated_role_codec); arg_246_0 = 3227112410u; continue; case 9u: arg_246_0 = ((this.info_ == null) ? 3665285871u : 2166767670u); continue; case 10u: arg_246_0 = (num2 * 2621446487u ^ 2333199786u); continue; case 11u: input.SkipLastField(); arg_246_0 = 3136612711u; continue; case 12u: this.DEPRECATEDHidden = input.ReadBool(); arg_246_0 = 3018986856u; continue; case 13u: arg_246_0 = (((num != 10u) ? 677713617u : 1620343950u) ^ num2 * 3525774661u); continue; case 14u: arg_246_0 = 2737835890u; continue; case 15u: arg_246_0 = (((num == 18u) ? 3103107255u : 3720668524u) ^ num2 * 3120522683u); continue; case 16u: arg_246_0 = ((num <= 18u) ? 2452045483u : 4274272447u); continue; case 17u: this.Privileges = input.ReadUInt64(); arg_246_0 = 3018986856u; continue; case 18u: arg_246_0 = (num2 * 3448593532u ^ 3117857932u); continue; case 19u: this.info_ = new AccountInfo(); arg_246_0 = (num2 * 3369335760u ^ 1179912342u); continue; case 20u: arg_246_0 = (num2 * 1102161004u ^ 3571128976u); continue; case 21u: arg_246_0 = (num2 * 2861331600u ^ 4106937480u); continue; case 22u: this.attribute_.AddEntriesFrom(input, MemberState._repeated_attribute_codec); arg_246_0 = 2704075443u; continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/IFieldAccessor.cs using System; using System.Runtime.InteropServices; namespace Google.Protobuf.Reflection { [ComVisible(true)] public interface IFieldAccessor { FieldDescriptor Descriptor { get; } void Clear(IMessage message); object GetValue(IMessage message); void SetValue(IMessage message, object value); } } <file_sep>/Bgs.Protocol.Account.V1/GameTimeRemainingInfo.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Account.V1 { [DebuggerNonUserCode] public sealed class GameTimeRemainingInfo : IMessage<GameTimeRemainingInfo>, IEquatable<GameTimeRemainingInfo>, IDeepCloneable<GameTimeRemainingInfo>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly GameTimeRemainingInfo.__c __9 = new GameTimeRemainingInfo.__c(); internal GameTimeRemainingInfo cctor>b__39_0() { return new GameTimeRemainingInfo(); } } private static readonly MessageParser<GameTimeRemainingInfo> _parser = new MessageParser<GameTimeRemainingInfo>(new Func<GameTimeRemainingInfo>(GameTimeRemainingInfo.__c.__9.<.cctor>b__39_0)); public const int MinutesRemainingFieldNumber = 1; private uint minutesRemaining_; public const int ParentalDailyMinutesRemainingFieldNumber = 2; private uint parentalDailyMinutesRemaining_; public const int ParentalWeeklyMinutesRemainingFieldNumber = 3; private uint parentalWeeklyMinutesRemaining_; public const int SecondsRemainingUntilKickFieldNumber = 4; private uint secondsRemainingUntilKick_; public static MessageParser<GameTimeRemainingInfo> Parser { get { return GameTimeRemainingInfo._parser; } } public static MessageDescriptor Descriptor { get { return AccountTypesReflection.Descriptor.MessageTypes[23]; } } MessageDescriptor IMessage.Descriptor { get { return GameTimeRemainingInfo.Descriptor; } } public uint MinutesRemaining { get { return this.minutesRemaining_; } set { this.minutesRemaining_ = value; } } public uint ParentalDailyMinutesRemaining { get { return this.parentalDailyMinutesRemaining_; } set { this.parentalDailyMinutesRemaining_ = value; } } public uint ParentalWeeklyMinutesRemaining { get { return this.parentalWeeklyMinutesRemaining_; } set { this.parentalWeeklyMinutesRemaining_ = value; } } public uint SecondsRemainingUntilKick { get { return this.secondsRemainingUntilKick_; } set { this.secondsRemainingUntilKick_ = value; } } public GameTimeRemainingInfo() { } public GameTimeRemainingInfo(GameTimeRemainingInfo other) : this() { while (true) { IL_8B: uint arg_6B_0 = 1334479563u; while (true) { uint num; switch ((num = (arg_6B_0 ^ 2011994161u)) % 5u) { case 1u: this.minutesRemaining_ = other.minutesRemaining_; arg_6B_0 = (num * 3032968231u ^ 1985865826u); continue; case 2u: this.parentalWeeklyMinutesRemaining_ = other.parentalWeeklyMinutesRemaining_; this.secondsRemainingUntilKick_ = other.secondsRemainingUntilKick_; arg_6B_0 = (num * 796308061u ^ 3112442197u); continue; case 3u: goto IL_8B; case 4u: this.parentalDailyMinutesRemaining_ = other.parentalDailyMinutesRemaining_; arg_6B_0 = (num * 3827292595u ^ 442628402u); continue; } return; } } } public GameTimeRemainingInfo Clone() { return new GameTimeRemainingInfo(this); } public override bool Equals(object other) { return this.Equals(other as GameTimeRemainingInfo); } public bool Equals(GameTimeRemainingInfo other) { if (other == null) { goto IL_B7; } goto IL_10F; int arg_C1_0; while (true) { IL_BC: switch ((arg_C1_0 ^ 1108728933) % 13) { case 0: return true; case 1: return false; case 2: goto IL_B7; case 3: return false; case 4: arg_C1_0 = ((this.SecondsRemainingUntilKick == other.SecondsRemainingUntilKick) ? 1548450896 : 394552166); continue; case 5: return false; case 6: return false; case 7: arg_C1_0 = ((this.ParentalDailyMinutesRemaining == other.ParentalDailyMinutesRemaining) ? 322847209 : 1698043102); continue; case 8: arg_C1_0 = ((this.ParentalWeeklyMinutesRemaining != other.ParentalWeeklyMinutesRemaining) ? 1519474985 : 1406408068); continue; case 9: goto IL_10F; case 10: arg_C1_0 = ((this.MinutesRemaining != other.MinutesRemaining) ? 245569071 : 1138568159); continue; case 12: return false; } break; } return true; IL_B7: arg_C1_0 = 1239026021; goto IL_BC; IL_10F: arg_C1_0 = ((other == this) ? 823495174 : 1601204904); goto IL_BC; } public override int GetHashCode() { int num = 1; if (this.MinutesRemaining != 0u) { goto IL_42; } goto IL_134; uint arg_F4_0; while (true) { IL_EF: uint num2; switch ((num2 = (arg_F4_0 ^ 1252092497u)) % 9u) { case 0u: goto IL_134; case 1u: arg_F4_0 = ((this.SecondsRemainingUntilKick == 0u) ? 1573162544u : 597437664u); continue; case 3u: num ^= this.ParentalDailyMinutesRemaining.GetHashCode(); arg_F4_0 = (num2 * 3191000824u ^ 2249053647u); continue; case 4u: arg_F4_0 = ((this.ParentalWeeklyMinutesRemaining != 0u) ? 1739034547u : 2070203717u); continue; case 5u: num ^= this.ParentalWeeklyMinutesRemaining.GetHashCode(); arg_F4_0 = (num2 * 2817116869u ^ 3137468335u); continue; case 6u: num ^= this.MinutesRemaining.GetHashCode(); arg_F4_0 = (num2 * 3028446015u ^ 3635102536u); continue; case 7u: goto IL_42; case 8u: num ^= this.SecondsRemainingUntilKick.GetHashCode(); arg_F4_0 = (num2 * 3147985672u ^ 2322151096u); continue; } break; } return num; IL_42: arg_F4_0 = 1699683512u; goto IL_EF; IL_134: arg_F4_0 = ((this.ParentalDailyMinutesRemaining == 0u) ? 700866439u : 650740614u); goto IL_EF; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.MinutesRemaining != 0u) { goto IL_9E; } goto IL_166; uint arg_11E_0; while (true) { IL_119: uint num; switch ((num = (arg_11E_0 ^ 1443989396u)) % 11u) { case 0u: output.WriteUInt32(this.MinutesRemaining); arg_11E_0 = (num * 1906318153u ^ 101627716u); continue; case 1u: arg_11E_0 = ((this.ParentalWeeklyMinutesRemaining == 0u) ? 2124977148u : 983362526u); continue; case 2u: output.WriteRawTag(16); arg_11E_0 = (num * 3771641000u ^ 607446359u); continue; case 3u: output.WriteRawTag(32); output.WriteUInt32(this.SecondsRemainingUntilKick); arg_11E_0 = (num * 683761773u ^ 3899789931u); continue; case 4u: goto IL_9E; case 5u: arg_11E_0 = ((this.SecondsRemainingUntilKick == 0u) ? 973808713u : 1826704126u); continue; case 6u: output.WriteRawTag(8); arg_11E_0 = (num * 1540757261u ^ 1403889235u); continue; case 7u: output.WriteRawTag(24); output.WriteUInt32(this.ParentalWeeklyMinutesRemaining); arg_11E_0 = (num * 1662541385u ^ 3652165350u); continue; case 8u: output.WriteUInt32(this.ParentalDailyMinutesRemaining); arg_11E_0 = (num * 2070313900u ^ 3407234370u); continue; case 9u: goto IL_166; } break; } return; IL_9E: arg_11E_0 = 1281729900u; goto IL_119; IL_166: arg_11E_0 = ((this.ParentalDailyMinutesRemaining != 0u) ? 1156073229u : 477099686u); goto IL_119; } public int CalculateSize() { int num = 0; if (this.MinutesRemaining != 0u) { goto IL_E6; } goto IL_130; uint arg_F0_0; while (true) { IL_EB: uint num2; switch ((num2 = (arg_F0_0 ^ 1990061862u)) % 9u) { case 0u: goto IL_E6; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.MinutesRemaining); arg_F0_0 = (num2 * 1523330026u ^ 1020555326u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.SecondsRemainingUntilKick); arg_F0_0 = (num2 * 2258341739u ^ 3576632522u); continue; case 3u: arg_F0_0 = ((this.SecondsRemainingUntilKick != 0u) ? 1878390054u : 1445448394u); continue; case 4u: arg_F0_0 = ((this.ParentalWeeklyMinutesRemaining == 0u) ? 648795471u : 1874262675u); continue; case 5u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ParentalDailyMinutesRemaining); arg_F0_0 = (num2 * 50370749u ^ 2042565846u); continue; case 6u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.ParentalWeeklyMinutesRemaining); arg_F0_0 = (num2 * 2291712911u ^ 3401198164u); continue; case 7u: goto IL_130; } break; } return num; IL_E6: arg_F0_0 = 147186989u; goto IL_EB; IL_130: arg_F0_0 = ((this.ParentalDailyMinutesRemaining == 0u) ? 2062740312u : 1305966208u); goto IL_EB; } public void MergeFrom(GameTimeRemainingInfo other) { if (other == null) { goto IL_B4; } goto IL_142; uint arg_FA_0; while (true) { IL_F5: uint num; switch ((num = (arg_FA_0 ^ 1732481152u)) % 11u) { case 0u: goto IL_142; case 1u: arg_FA_0 = ((other.SecondsRemainingUntilKick == 0u) ? 54932113u : 480832012u); continue; case 2u: this.SecondsRemainingUntilKick = other.SecondsRemainingUntilKick; arg_FA_0 = (num * 1191462452u ^ 1321279201u); continue; case 4u: goto IL_B4; case 5u: return; case 6u: arg_FA_0 = ((other.ParentalDailyMinutesRemaining != 0u) ? 190350255u : 1303300692u); continue; case 7u: this.ParentalDailyMinutesRemaining = other.ParentalDailyMinutesRemaining; arg_FA_0 = (num * 204726876u ^ 2326374576u); continue; case 8u: this.ParentalWeeklyMinutesRemaining = other.ParentalWeeklyMinutesRemaining; arg_FA_0 = (num * 1858816156u ^ 2758176590u); continue; case 9u: arg_FA_0 = ((other.ParentalWeeklyMinutesRemaining == 0u) ? 1589121918u : 1114127508u); continue; case 10u: this.MinutesRemaining = other.MinutesRemaining; arg_FA_0 = (num * 45647181u ^ 2041268913u); continue; } break; } return; IL_B4: arg_FA_0 = 2051357815u; goto IL_F5; IL_142: arg_FA_0 = ((other.MinutesRemaining == 0u) ? 980481496u : 753546253u); goto IL_F5; } public void MergeFrom(CodedInputStream input) { while (true) { IL_1C4: uint num; uint arg_168_0 = ((num = input.ReadTag()) == 0u) ? 4217257166u : 3678895974u; while (true) { uint num2; switch ((num2 = (arg_168_0 ^ 2686828653u)) % 16u) { case 0u: arg_168_0 = 3678895974u; continue; case 1u: this.ParentalWeeklyMinutesRemaining = input.ReadUInt32(); arg_168_0 = 4278304665u; continue; case 2u: input.SkipLastField(); arg_168_0 = 2439819975u; continue; case 4u: goto IL_1C4; case 5u: arg_168_0 = (num2 * 472258690u ^ 3425863827u); continue; case 6u: arg_168_0 = (((num == 8u) ? 1089951388u : 769894490u) ^ num2 * 264770532u); continue; case 7u: this.SecondsRemainingUntilKick = input.ReadUInt32(); arg_168_0 = 4278304665u; continue; case 8u: arg_168_0 = ((num == 24u) ? 2946641516u : 2826423923u); continue; case 9u: this.MinutesRemaining = input.ReadUInt32(); arg_168_0 = 4278304665u; continue; case 10u: arg_168_0 = (num2 * 3913435159u ^ 2695668447u); continue; case 11u: arg_168_0 = ((num > 16u) ? 3953409109u : 2595424859u); continue; case 12u: arg_168_0 = (num2 * 1868726851u ^ 3519582427u); continue; case 13u: this.ParentalDailyMinutesRemaining = input.ReadUInt32(); arg_168_0 = 2684227112u; continue; case 14u: arg_168_0 = (((num != 32u) ? 2539890263u : 3123533954u) ^ num2 * 1641793964u); continue; case 15u: arg_168_0 = (((num == 16u) ? 1691229296u : 2112846705u) ^ num2 * 1094445424u); continue; } return; } } } } } <file_sep>/Bgs.Protocol/Role.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol { [DebuggerNonUserCode] public sealed class Role : IMessage<Role>, IEquatable<Role>, IDeepCloneable<Role>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly Role.__c __9 = new Role.__c(); internal Role cctor>b__69_0() { return new Role(); } } private static readonly MessageParser<Role> _parser = new MessageParser<Role>(new Func<Role>(Role.__c.__9.<.cctor>b__69_0)); public const int IdFieldNumber = 1; private uint id_; public const int NameFieldNumber = 2; private string name_ = ""; public const int PrivilegeFieldNumber = 3; private static readonly FieldCodec<string> _repeated_privilege_codec; private readonly RepeatedField<string> privilege_ = new RepeatedField<string>(); public const int AssignableRoleFieldNumber = 4; private static readonly FieldCodec<uint> _repeated_assignableRole_codec; private readonly RepeatedField<uint> assignableRole_ = new RepeatedField<uint>(); public const int RequiredFieldNumber = 5; private bool required_; public const int UniqueFieldNumber = 6; private bool unique_; public const int RelegationRoleFieldNumber = 7; private uint relegationRole_; public const int AttributeFieldNumber = 8; private static readonly FieldCodec<Attribute> _repeated_attribute_codec; private readonly RepeatedField<Attribute> attribute_ = new RepeatedField<Attribute>(); public const int KickableRoleFieldNumber = 9; private static readonly FieldCodec<uint> _repeated_kickableRole_codec; private readonly RepeatedField<uint> kickableRole_ = new RepeatedField<uint>(); public const int RemovableRoleFieldNumber = 10; private static readonly FieldCodec<uint> _repeated_removableRole_codec; private readonly RepeatedField<uint> removableRole_ = new RepeatedField<uint>(); public static MessageParser<Role> Parser { get { return Role._parser; } } public static MessageDescriptor Descriptor { get { return RoleTypesReflection.Descriptor.MessageTypes[0]; } } MessageDescriptor IMessage.Descriptor { get { return Role.Descriptor; } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public RepeatedField<string> Privilege { get { return this.privilege_; } } public RepeatedField<uint> AssignableRole { get { return this.assignableRole_; } } public bool Required { get { return this.required_; } set { this.required_ = value; } } public bool Unique { get { return this.unique_; } set { this.unique_ = value; } } public uint RelegationRole { get { return this.relegationRole_; } set { this.relegationRole_ = value; } } public RepeatedField<Attribute> Attribute { get { return this.attribute_; } } public RepeatedField<uint> KickableRole { get { return this.kickableRole_; } } public RepeatedField<uint> RemovableRole { get { return this.removableRole_; } } public Role() { } public Role(Role other) : this() { while (true) { IL_155: uint arg_120_0 = 2750803760u; while (true) { uint num; switch ((num = (arg_120_0 ^ 4276379795u)) % 10u) { case 0u: this.required_ = other.required_; arg_120_0 = (num * 3527570097u ^ 1362470637u); continue; case 1u: this.id_ = other.id_; arg_120_0 = (num * 17804372u ^ 2909655824u); continue; case 2u: this.unique_ = other.unique_; arg_120_0 = (num * 3953481028u ^ 3119153057u); continue; case 3u: this.name_ = other.name_; arg_120_0 = (num * 520231665u ^ 1894993683u); continue; case 4u: goto IL_155; case 5u: this.attribute_ = other.attribute_.Clone(); arg_120_0 = (num * 1302334675u ^ 854755355u); continue; case 6u: this.relegationRole_ = other.relegationRole_; arg_120_0 = (num * 839803219u ^ 643061396u); continue; case 7u: this.privilege_ = other.privilege_.Clone(); this.assignableRole_ = other.assignableRole_.Clone(); arg_120_0 = (num * 4086130012u ^ 1078124559u); continue; case 9u: this.kickableRole_ = other.kickableRole_.Clone(); this.removableRole_ = other.removableRole_.Clone(); arg_120_0 = (num * 3855341870u ^ 3906954289u); continue; } return; } } } public Role Clone() { return new Role(this); } public override bool Equals(object other) { return this.Equals(other as Role); } public bool Equals(Role other) { if (other == null) { goto IL_A3; } goto IL_25C; int arg_1DE_0; while (true) { IL_1D9: switch ((arg_1DE_0 ^ 1618090448) % 25) { case 0: return false; case 1: arg_1DE_0 = ((!this.attribute_.Equals(other.attribute_)) ? 3192222 : 1325585834); continue; case 2: arg_1DE_0 = ((this.Id == other.Id) ? 576223733 : 1440698807); continue; case 3: arg_1DE_0 = ((this.RelegationRole != other.RelegationRole) ? 2011591835 : 1215400645); continue; case 4: return false; case 5: arg_1DE_0 = (this.kickableRole_.Equals(other.kickableRole_) ? 58949371 : 1325288917); continue; case 6: arg_1DE_0 = (Role.smethod_0(this.Name, other.Name) ? 80001538 : 1408377419); continue; case 7: arg_1DE_0 = ((this.Required != other.Required) ? 1069724708 : 588033886); continue; case 8: arg_1DE_0 = ((!this.privilege_.Equals(other.privilege_)) ? 1580595351 : 930336357); continue; case 10: return false; case 11: return false; case 12: return false; case 13: return false; case 14: return true; case 15: return false; case 16: goto IL_A3; case 17: arg_1DE_0 = ((this.Unique == other.Unique) ? 1094641394 : 1928165038); continue; case 18: return false; case 19: return false; case 20: return false; case 21: arg_1DE_0 = ((!this.removableRole_.Equals(other.removableRole_)) ? 1920535709 : 880392953); continue; case 22: return false; case 23: goto IL_25C; case 24: arg_1DE_0 = (this.assignableRole_.Equals(other.assignableRole_) ? 274196013 : 1069009527); continue; } break; } return true; IL_A3: arg_1DE_0 = 915023132; goto IL_1D9; IL_25C: arg_1DE_0 = ((other != this) ? 379999354 : 1171231999); goto IL_1D9; } public override int GetHashCode() { int num = 1; while (true) { IL_23B: uint arg_1EE_0 = 2282674892u; while (true) { uint num2; switch ((num2 = (arg_1EE_0 ^ 2437381402u)) % 16u) { case 0u: goto IL_23B; case 1u: num ^= this.RelegationRole.GetHashCode(); arg_1EE_0 = (num2 * 3185657539u ^ 565387275u); continue; case 2u: num ^= this.attribute_.GetHashCode(); arg_1EE_0 = 3768097232u; continue; case 3u: arg_1EE_0 = ((this.Name.Length == 0) ? 3088559390u : 3934013791u); continue; case 4u: num ^= this.privilege_.GetHashCode(); num ^= this.assignableRole_.GetHashCode(); arg_1EE_0 = 3878885524u; continue; case 5u: num ^= this.Name.GetHashCode(); arg_1EE_0 = (num2 * 3420380964u ^ 1235671466u); continue; case 6u: arg_1EE_0 = (((this.Id != 0u) ? 3883093353u : 3288304293u) ^ num2 * 2246729466u); continue; case 7u: arg_1EE_0 = (this.Unique ? 4043175939u : 3492667303u); continue; case 9u: num ^= this.Unique.GetHashCode(); arg_1EE_0 = (num2 * 2180661542u ^ 2697512209u); continue; case 10u: num ^= this.kickableRole_.GetHashCode(); arg_1EE_0 = (num2 * 336037523u ^ 701110760u); continue; case 11u: num ^= this.Required.GetHashCode(); arg_1EE_0 = (num2 * 2718080471u ^ 1377715232u); continue; case 12u: num ^= this.removableRole_.GetHashCode(); arg_1EE_0 = (num2 * 2809808463u ^ 1897089030u); continue; case 13u: arg_1EE_0 = ((this.RelegationRole != 0u) ? 2507652715u : 2555766040u); continue; case 14u: arg_1EE_0 = ((this.Required ? 1278074949u : 1239481289u) ^ num2 * 565799934u); continue; case 15u: num ^= this.Id.GetHashCode(); arg_1EE_0 = (num2 * 924074179u ^ 1211595444u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.Id != 0u) { goto IL_41; } goto IL_24A; uint arg_1EE_0; while (true) { IL_1E9: uint num; switch ((num = (arg_1EE_0 ^ 2796933705u)) % 16u) { case 0u: output.WriteRawTag(40); output.WriteBool(this.Required); arg_1EE_0 = (num * 1610629102u ^ 2884988528u); continue; case 1u: goto IL_24A; case 2u: this.privilege_.WriteTo(output, Role._repeated_privilege_codec); arg_1EE_0 = 3907389009u; continue; case 3u: output.WriteString(this.Name); arg_1EE_0 = (num * 3135631177u ^ 3009501776u); continue; case 4u: this.kickableRole_.WriteTo(output, Role._repeated_kickableRole_codec); this.removableRole_.WriteTo(output, Role._repeated_removableRole_codec); arg_1EE_0 = (num * 1665994315u ^ 167614555u); continue; case 5u: output.WriteUInt32(this.Id); arg_1EE_0 = (num * 2051358770u ^ 131037106u); continue; case 6u: output.WriteRawTag(8); arg_1EE_0 = (num * 3843591733u ^ 3028864066u); continue; case 7u: output.WriteRawTag(18); arg_1EE_0 = (num * 2096581532u ^ 1075785406u); continue; case 8u: this.assignableRole_.WriteTo(output, Role._repeated_assignableRole_codec); arg_1EE_0 = (((!this.Required) ? 3826759976u : 2453196609u) ^ num * 1737881509u); continue; case 9u: arg_1EE_0 = ((!this.Unique) ? 2333262550u : 4167878325u); continue; case 10u: output.WriteRawTag(56); output.WriteUInt32(this.RelegationRole); arg_1EE_0 = (num * 2294507803u ^ 1134671916u); continue; case 11u: this.attribute_.WriteTo(output, Role._repeated_attribute_codec); arg_1EE_0 = 2940955917u; continue; case 12u: output.WriteRawTag(48); output.WriteBool(this.Unique); arg_1EE_0 = (num * 1576658447u ^ 129785874u); continue; case 13u: goto IL_41; case 15u: arg_1EE_0 = ((this.RelegationRole != 0u) ? 3340185235u : 3428166866u); continue; } break; } return; IL_41: arg_1EE_0 = 2732920143u; goto IL_1E9; IL_24A: arg_1EE_0 = ((Role.smethod_1(this.Name) == 0) ? 2805429787u : 4263428382u); goto IL_1E9; } public int CalculateSize() { int num = 0; while (true) { IL_1E5: uint arg_1A4_0 = 4069802421u; while (true) { uint num2; switch ((num2 = (arg_1A4_0 ^ 2523925552u)) % 13u) { case 0u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_1A4_0 = (num2 * 2362712871u ^ 1834182994u); continue; case 1u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.RelegationRole); arg_1A4_0 = (num2 * 527993018u ^ 3400085765u); continue; case 2u: arg_1A4_0 = ((this.RelegationRole != 0u) ? 3656474764u : 2336608669u); continue; case 4u: num += 2; arg_1A4_0 = (num2 * 3498251098u ^ 1337523647u); continue; case 5u: goto IL_1E5; case 6u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_1A4_0 = (num2 * 443805911u ^ 4279321022u); continue; case 7u: arg_1A4_0 = ((Role.smethod_1(this.Name) == 0) ? 4067008006u : 3000573628u); continue; case 8u: arg_1A4_0 = (this.Unique ? 2610717588u : 2401930670u); continue; case 9u: num += this.privilege_.CalculateSize(Role._repeated_privilege_codec); num += this.assignableRole_.CalculateSize(Role._repeated_assignableRole_codec); arg_1A4_0 = ((!this.Required) ? 3203432757u : 3959375305u); continue; case 10u: num += this.attribute_.CalculateSize(Role._repeated_attribute_codec); num += this.kickableRole_.CalculateSize(Role._repeated_kickableRole_codec); arg_1A4_0 = 2905377924u; continue; case 11u: arg_1A4_0 = (((this.Id != 0u) ? 4131103051u : 3915141577u) ^ num2 * 341043405u); continue; case 12u: num += 2; arg_1A4_0 = (num2 * 472924454u ^ 1998306294u); continue; } goto Block_6; } } Block_6: return num + this.removableRole_.CalculateSize(Role._repeated_removableRole_codec); } public void MergeFrom(Role other) { if (other == null) { goto IL_183; } goto IL_228; uint arg_1C8_0; while (true) { IL_1C3: uint num; switch ((num = (arg_1C8_0 ^ 1508787429u)) % 17u) { case 0u: this.assignableRole_.Add(other.assignableRole_); arg_1C8_0 = (num * 3832648980u ^ 846389822u); continue; case 1u: this.Required = other.Required; arg_1C8_0 = (num * 2065462373u ^ 874305834u); continue; case 2u: goto IL_183; case 3u: arg_1C8_0 = ((Role.smethod_1(other.Name) == 0) ? 803495441u : 1522577671u); continue; case 4u: this.kickableRole_.Add(other.kickableRole_); arg_1C8_0 = (num * 1494548506u ^ 3958707778u); continue; case 6u: this.Unique = other.Unique; arg_1C8_0 = (num * 2243563u ^ 2911238176u); continue; case 7u: this.privilege_.Add(other.privilege_); arg_1C8_0 = 2096078865u; continue; case 8u: return; case 9u: this.Id = other.Id; arg_1C8_0 = (num * 4071844074u ^ 3267950335u); continue; case 10u: this.Name = other.Name; arg_1C8_0 = (num * 883443844u ^ 843712153u); continue; case 11u: this.RelegationRole = other.RelegationRole; arg_1C8_0 = (num * 1705395640u ^ 2848565857u); continue; case 12u: goto IL_228; case 13u: arg_1C8_0 = ((other.RelegationRole != 0u) ? 141276922u : 1147915049u); continue; case 14u: arg_1C8_0 = ((other.Required ? 4126288059u : 2220704336u) ^ num * 467323619u); continue; case 15u: arg_1C8_0 = ((!other.Unique) ? 1198179687u : 2096463344u); continue; case 16u: this.attribute_.Add(other.attribute_); arg_1C8_0 = 1560456346u; continue; } break; } this.removableRole_.Add(other.removableRole_); return; IL_183: arg_1C8_0 = 1905897388u; goto IL_1C3; IL_228: arg_1C8_0 = ((other.Id == 0u) ? 1458775373u : 1779132336u); goto IL_1C3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_4F1: uint num; uint arg_439_0 = ((num = input.ReadTag()) != 0u) ? 3370127047u : 2202903852u; while (true) { uint num2; switch ((num2 = (arg_439_0 ^ 4204185252u)) % 39u) { case 0u: arg_439_0 = (num2 * 209064284u ^ 20798933u); continue; case 1u: arg_439_0 = (((num != 56u) ? 1533700052u : 99630514u) ^ num2 * 1253072719u); continue; case 2u: arg_439_0 = ((num > 40u) ? 4214644297u : 2463858076u); continue; case 3u: arg_439_0 = (((num == 66u) ? 3575273115u : 2798052536u) ^ num2 * 4104041714u); continue; case 4u: this.attribute_.AddEntriesFrom(input, Role._repeated_attribute_codec); arg_439_0 = 3267769041u; continue; case 5u: arg_439_0 = (((num != 72u) ? 2473628166u : 2715016544u) ^ num2 * 1428096712u); continue; case 6u: this.privilege_.AddEntriesFrom(input, Role._repeated_privilege_codec); arg_439_0 = 3876577291u; continue; case 7u: arg_439_0 = (((num <= 26u) ? 2080350122u : 36066956u) ^ num2 * 2895778110u); continue; case 8u: arg_439_0 = (((num == 34u) ? 4066433630u : 4109887366u) ^ num2 * 39939200u); continue; case 9u: arg_439_0 = (((num != 8u) ? 1713205979u : 1411563252u) ^ num2 * 107862865u); continue; case 10u: input.SkipLastField(); arg_439_0 = 3876577291u; continue; case 12u: arg_439_0 = (num2 * 490144081u ^ 2526805984u); continue; case 13u: arg_439_0 = (((num != 74u) ? 683813603u : 1221476328u) ^ num2 * 3451468940u); continue; case 14u: arg_439_0 = (((num == 26u) ? 1321416629u : 482926387u) ^ num2 * 4253466010u); continue; case 15u: this.Id = input.ReadUInt32(); arg_439_0 = 2838738183u; continue; case 16u: arg_439_0 = (num2 * 1240709006u ^ 2206407287u); continue; case 17u: goto IL_4F1; case 18u: arg_439_0 = ((num <= 74u) ? 4240978318u : 3158325000u); continue; case 19u: arg_439_0 = ((num <= 66u) ? 3192051328u : 3147066230u); continue; case 20u: arg_439_0 = (num2 * 1517658603u ^ 1832383799u); continue; case 21u: arg_439_0 = (((num == 40u) ? 2029882928u : 1934476663u) ^ num2 * 3353503225u); continue; case 22u: arg_439_0 = (num2 * 2856855776u ^ 3321360907u); continue; case 23u: this.Required = input.ReadBool(); arg_439_0 = 3395208276u; continue; case 24u: arg_439_0 = ((num == 32u) ? 2651172190u : 4193515322u); continue; case 25u: this.assignableRole_.AddEntriesFrom(input, Role._repeated_assignableRole_codec); arg_439_0 = 3876577291u; continue; case 26u: arg_439_0 = (((num != 48u) ? 3667771521u : 4227812979u) ^ num2 * 158570183u); continue; case 27u: this.kickableRole_.AddEntriesFrom(input, Role._repeated_kickableRole_codec); arg_439_0 = 3876577291u; continue; case 28u: this.Name = input.ReadString(); arg_439_0 = 3811406352u; continue; case 29u: this.Unique = input.ReadBool(); arg_439_0 = 3876577291u; continue; case 30u: arg_439_0 = (((num == 18u) ? 2244045815u : 3713845180u) ^ num2 * 283092773u); continue; case 31u: arg_439_0 = 3370127047u; continue; case 32u: this.removableRole_.AddEntriesFrom(input, Role._repeated_removableRole_codec); arg_439_0 = 3876577291u; continue; case 33u: arg_439_0 = (num2 * 254731675u ^ 749394503u); continue; case 34u: arg_439_0 = (num2 * 2475391671u ^ 3790452622u); continue; case 35u: arg_439_0 = (num2 * 651313657u ^ 3720780486u); continue; case 36u: arg_439_0 = (((num != 82u) ? 1975548639u : 1572114559u) ^ num2 * 1507116615u); continue; case 37u: arg_439_0 = ((num == 80u) ? 2794112337u : 3807765702u); continue; case 38u: this.RelegationRole = input.ReadUInt32(); arg_439_0 = 3876577291u; continue; } return; } } } static Role() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_8E: uint arg_72_0 = 367187079u; while (true) { uint num; switch ((num = (arg_72_0 ^ 1334128992u)) % 4u) { case 0u: goto IL_8E; case 2u: Role._repeated_attribute_codec = FieldCodec.ForMessage<Attribute>(66u, Bgs.Protocol.Attribute.Parser); Role._repeated_kickableRole_codec = FieldCodec.ForUInt32(74u); arg_72_0 = (num * 4112454304u ^ 1379539457u); continue; case 3u: Role._repeated_privilege_codec = FieldCodec.ForString(26u); Role._repeated_assignableRole_codec = FieldCodec.ForUInt32(34u); arg_72_0 = (num * 3174530060u ^ 674672746u); continue; } goto Block_1; } } Block_1: Role._repeated_removableRole_codec = FieldCodec.ForUInt32(82u); } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(string string_0) { return string_0.Length; } } } <file_sep>/ContainerFields.cs using System; public enum ContainerFields { Slots = 85, NumSlots = 229, End } <file_sep>/AuthServer.AuthServer.JsonObjects/FormInputs.cs using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace AuthServer.AuthServer.JsonObjects { [DataContract] public class FormInputs { [DataMember(Name = "type")] public string Type { get; set; } [DataMember(Name = "inputs")] public List<FormInput> Inputs { get; set; } } } <file_sep>/Bgs.Protocol.Channel.V1/UpdateMemberStateRequest.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Channel.V1 { [DebuggerNonUserCode] public sealed class UpdateMemberStateRequest : IMessage<UpdateMemberStateRequest>, IEquatable<UpdateMemberStateRequest>, IDeepCloneable<UpdateMemberStateRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly UpdateMemberStateRequest.__c __9 = new UpdateMemberStateRequest.__c(); internal UpdateMemberStateRequest cctor>b__34_0() { return new UpdateMemberStateRequest(); } } private static readonly MessageParser<UpdateMemberStateRequest> _parser = new MessageParser<UpdateMemberStateRequest>(new Func<UpdateMemberStateRequest>(UpdateMemberStateRequest.__c.__9.<.cctor>b__34_0)); public const int AgentIdFieldNumber = 1; private EntityId agentId_; public const int StateChangeFieldNumber = 2; private static readonly FieldCodec<Member> _repeated_stateChange_codec = FieldCodec.ForMessage<Member>(18u, Member.Parser); private readonly RepeatedField<Member> stateChange_ = new RepeatedField<Member>(); public const int RemovedRoleFieldNumber = 3; private static readonly FieldCodec<uint> _repeated_removedRole_codec = FieldCodec.ForUInt32(26u); private readonly RepeatedField<uint> removedRole_ = new RepeatedField<uint>(); public static MessageParser<UpdateMemberStateRequest> Parser { get { return UpdateMemberStateRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChannelServiceReflection.Descriptor.MessageTypes[5]; } } MessageDescriptor IMessage.Descriptor { get { return UpdateMemberStateRequest.Descriptor; } } public EntityId AgentId { get { return this.agentId_; } set { this.agentId_ = value; } } public RepeatedField<Member> StateChange { get { return this.stateChange_; } } public RepeatedField<uint> RemovedRole { get { return this.removedRole_; } } public UpdateMemberStateRequest() { } public UpdateMemberStateRequest(UpdateMemberStateRequest other) : this() { while (true) { IL_66: int arg_50_0 = 850845766; while (true) { switch ((arg_50_0 ^ 736126315) % 3) { case 1: this.AgentId = ((other.agentId_ != null) ? other.AgentId.Clone() : null); this.stateChange_ = other.stateChange_.Clone(); this.removedRole_ = other.removedRole_.Clone(); arg_50_0 = 554002508; continue; case 2: goto IL_66; } return; } } } public UpdateMemberStateRequest Clone() { return new UpdateMemberStateRequest(this); } public override bool Equals(object other) { return this.Equals(other as UpdateMemberStateRequest); } public bool Equals(UpdateMemberStateRequest other) { if (other == null) { goto IL_44; } goto IL_EC; int arg_A6_0; while (true) { IL_A1: switch ((arg_A6_0 ^ -631403506) % 11) { case 0: return false; case 1: return false; case 2: return true; case 3: arg_A6_0 = (this.stateChange_.Equals(other.stateChange_) ? -828941427 : -2146904447); continue; case 5: arg_A6_0 = ((!UpdateMemberStateRequest.smethod_0(this.AgentId, other.AgentId)) ? -1461638918 : -1202750806); continue; case 6: return false; case 7: return false; case 8: goto IL_EC; case 9: goto IL_44; case 10: arg_A6_0 = ((!this.removedRole_.Equals(other.removedRole_)) ? -729071986 : -765786416); continue; } break; } return true; IL_44: arg_A6_0 = -173499904; goto IL_A1; IL_EC: arg_A6_0 = ((other != this) ? -1435839128 : -2054833209); goto IL_A1; } public override int GetHashCode() { int num = 1; if (this.agentId_ != null) { goto IL_29; } goto IL_4F; uint arg_33_0; while (true) { IL_2E: uint num2; switch ((num2 = (arg_33_0 ^ 2575251654u)) % 4u) { case 0u: goto IL_29; case 1u: num ^= UpdateMemberStateRequest.smethod_1(this.AgentId); arg_33_0 = (num2 * 1771267578u ^ 693058726u); continue; case 2u: goto IL_4F; } break; } return num ^ UpdateMemberStateRequest.smethod_1(this.removedRole_); IL_29: arg_33_0 = 3156074159u; goto IL_2E; IL_4F: num ^= UpdateMemberStateRequest.smethod_1(this.stateChange_); arg_33_0 = 3096065537u; goto IL_2E; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (this.agentId_ != null) { while (true) { IL_48: uint arg_30_0 = 833414229u; while (true) { uint num; switch ((num = (arg_30_0 ^ 222512655u)) % 3u) { case 0u: goto IL_48; case 2u: output.WriteRawTag(10); output.WriteMessage(this.AgentId); arg_30_0 = (num * 3600838038u ^ 1693871099u); continue; } goto Block_2; } } Block_2:; } this.stateChange_.WriteTo(output, UpdateMemberStateRequest._repeated_stateChange_codec); this.removedRole_.WriteTo(output, UpdateMemberStateRequest._repeated_removedRole_codec); } public int CalculateSize() { int num = 0; if (this.agentId_ != null) { goto IL_0A; } goto IL_75; uint arg_55_0; while (true) { IL_50: uint num2; switch ((num2 = (arg_55_0 ^ 2237752594u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeMessageSize(this.AgentId); arg_55_0 = (num2 * 4209147650u ^ 2769747269u); continue; case 2u: goto IL_75; case 3u: num += this.removedRole_.CalculateSize(UpdateMemberStateRequest._repeated_removedRole_codec); arg_55_0 = (num2 * 690402857u ^ 2271886010u); continue; case 4u: goto IL_0A; } break; } return num; IL_0A: arg_55_0 = 4064576427u; goto IL_50; IL_75: num += this.stateChange_.CalculateSize(UpdateMemberStateRequest._repeated_stateChange_codec); arg_55_0 = 3818084292u; goto IL_50; } public void MergeFrom(UpdateMemberStateRequest other) { if (other == null) { goto IL_18; } goto IL_F8; uint arg_B8_0; while (true) { IL_B3: uint num; switch ((num = (arg_B8_0 ^ 3547188952u)) % 9u) { case 0u: this.agentId_ = new EntityId(); arg_B8_0 = (num * 2373240021u ^ 2613452947u); continue; case 1u: arg_B8_0 = (((this.agentId_ != null) ? 1906028511u : 86352164u) ^ num * 1082708184u); continue; case 2u: this.removedRole_.Add(other.removedRole_); arg_B8_0 = (num * 2512516360u ^ 1608729529u); continue; case 3u: this.stateChange_.Add(other.stateChange_); arg_B8_0 = 2698152107u; continue; case 4u: this.AgentId.MergeFrom(other.AgentId); arg_B8_0 = 4150654416u; continue; case 5u: goto IL_F8; case 6u: return; case 7u: goto IL_18; } break; } return; IL_18: arg_B8_0 = 2818641096u; goto IL_B3; IL_F8: arg_B8_0 = ((other.agentId_ == null) ? 4150654416u : 3116224766u); goto IL_B3; } public void MergeFrom(CodedInputStream input) { while (true) { IL_204: uint num; uint arg_1A4_0 = ((num = input.ReadTag()) != 0u) ? 1513284915u : 1074130050u; while (true) { uint num2; switch ((num2 = (arg_1A4_0 ^ 222716253u)) % 17u) { case 0u: goto IL_204; case 1u: arg_1A4_0 = (((num != 18u) ? 3130216117u : 3447243854u) ^ num2 * 2631972990u); continue; case 2u: arg_1A4_0 = (((num == 26u) ? 3092510051u : 2645237550u) ^ num2 * 2388803022u); continue; case 3u: arg_1A4_0 = ((num > 18u) ? 1759275716u : 233478955u); continue; case 4u: input.ReadMessage(this.agentId_); arg_1A4_0 = 1412306154u; continue; case 5u: arg_1A4_0 = 1513284915u; continue; case 6u: arg_1A4_0 = (num2 * 3166653711u ^ 4068922146u); continue; case 7u: arg_1A4_0 = (num2 * 1815726153u ^ 1014297157u); continue; case 8u: this.removedRole_.AddEntriesFrom(input, UpdateMemberStateRequest._repeated_removedRole_codec); arg_1A4_0 = 1412306154u; continue; case 9u: this.stateChange_.AddEntriesFrom(input, UpdateMemberStateRequest._repeated_stateChange_codec); arg_1A4_0 = 1698268778u; continue; case 10u: this.agentId_ = new EntityId(); arg_1A4_0 = (num2 * 4116891937u ^ 1824788916u); continue; case 11u: arg_1A4_0 = ((num == 24u) ? 397865155u : 672300525u); continue; case 12u: arg_1A4_0 = ((this.agentId_ == null) ? 2064803633u : 1744014936u); continue; case 13u: arg_1A4_0 = (((num == 10u) ? 1914118777u : 147718191u) ^ num2 * 2887819080u); continue; case 14u: input.SkipLastField(); arg_1A4_0 = 99297063u; continue; case 16u: arg_1A4_0 = (num2 * 3216037854u ^ 3531441958u); continue; } return; } } } static bool smethod_0(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_1(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Bgs.Protocol.Challenge.V1/ChallengeAnsweredRequest.cs using Google.Protobuf; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Challenge.V1 { [DebuggerNonUserCode] public sealed class ChallengeAnsweredRequest : IMessage<ChallengeAnsweredRequest>, IEquatable<ChallengeAnsweredRequest>, IDeepCloneable<ChallengeAnsweredRequest>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ChallengeAnsweredRequest.__c __9 = new ChallengeAnsweredRequest.__c(); internal ChallengeAnsweredRequest cctor>b__34_0() { return new ChallengeAnsweredRequest(); } } private static readonly MessageParser<ChallengeAnsweredRequest> _parser = new MessageParser<ChallengeAnsweredRequest>(new Func<ChallengeAnsweredRequest>(ChallengeAnsweredRequest.__c.__9.<.cctor>b__34_0)); public const int AnswerFieldNumber = 1; private string answer_ = ""; public const int DataFieldNumber = 2; private ByteString data_ = ByteString.Empty; public const int IdFieldNumber = 3; private uint id_; public static MessageParser<ChallengeAnsweredRequest> Parser { get { return ChallengeAnsweredRequest._parser; } } public static MessageDescriptor Descriptor { get { return ChallengeServiceReflection.Descriptor.MessageTypes[3]; } } MessageDescriptor IMessage.Descriptor { get { return ChallengeAnsweredRequest.Descriptor; } } public string Answer { get { return this.answer_; } set { this.answer_ = Preconditions.CheckNotNull<string>(value, Module.smethod_34<string>(2130392831u)); } } public ByteString Data { get { return this.data_; } set { this.data_ = Preconditions.CheckNotNull<ByteString>(value, Module.smethod_34<string>(2130392831u)); } } public uint Id { get { return this.id_; } set { this.id_ = value; } } public ChallengeAnsweredRequest() { } public ChallengeAnsweredRequest(ChallengeAnsweredRequest other) : this() { this.answer_ = other.answer_; this.data_ = other.data_; this.id_ = other.id_; } public ChallengeAnsweredRequest Clone() { return new ChallengeAnsweredRequest(this); } public override bool Equals(object other) { return this.Equals(other as ChallengeAnsweredRequest); } public bool Equals(ChallengeAnsweredRequest other) { if (other == null) { goto IL_18; } goto IL_E7; int arg_A1_0; while (true) { IL_9C: switch ((arg_A1_0 ^ 2013607477) % 11) { case 0: return false; case 1: return false; case 2: arg_A1_0 = ((this.Id == other.Id) ? 1334747664 : 1591618882); continue; case 3: return false; case 4: arg_A1_0 = ((!ChallengeAnsweredRequest.smethod_0(this.Answer, other.Answer)) ? 604173205 : 1384555402); continue; case 6: goto IL_E7; case 7: return false; case 8: return true; case 9: arg_A1_0 = ((!(this.Data != other.Data)) ? 1108449149 : 825880546); continue; case 10: goto IL_18; } break; } return true; IL_18: arg_A1_0 = 781344912; goto IL_9C; IL_E7: arg_A1_0 = ((other != this) ? 1938051258 : 278448106); goto IL_9C; } public override int GetHashCode() { int num = 1 ^ ChallengeAnsweredRequest.smethod_1(this.Answer); while (true) { IL_C8: uint arg_A4_0 = 1276586674u; while (true) { uint num2; switch ((num2 = (arg_A4_0 ^ 126333373u)) % 6u) { case 0u: goto IL_C8; case 1u: arg_A4_0 = ((this.Id != 0u) ? 1612663377u : 91719667u); continue; case 3u: num ^= ChallengeAnsweredRequest.smethod_1(this.Data); arg_A4_0 = (num2 * 4221747396u ^ 522637354u); continue; case 4u: num ^= this.Id.GetHashCode(); arg_A4_0 = (num2 * 2296352533u ^ 3283024303u); continue; case 5u: arg_A4_0 = (((this.Data.Length != 0) ? 1022166241u : 547082219u) ^ num2 * 1636392267u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { output.WriteRawTag(10); output.WriteString(this.Answer); while (true) { IL_E8: uint arg_C0_0 = 3460301839u; while (true) { uint num; switch ((num = (arg_C0_0 ^ 2994952642u)) % 7u) { case 0u: output.WriteUInt32(this.Id); arg_C0_0 = (num * 2360905336u ^ 2292279376u); continue; case 1u: output.WriteRawTag(18); output.WriteBytes(this.Data); arg_C0_0 = (num * 1754295071u ^ 3609546951u); continue; case 3u: goto IL_E8; case 4u: output.WriteRawTag(24); arg_C0_0 = (num * 3489346009u ^ 745601404u); continue; case 5u: arg_C0_0 = ((this.Id == 0u) ? 2502594168u : 4019615199u); continue; case 6u: arg_C0_0 = (((this.Data.Length == 0) ? 945632044u : 410498231u) ^ num * 183227806u); continue; } return; } } } public int CalculateSize() { int num = 0 + (1 + CodedOutputStream.ComputeStringSize(this.Answer)); if (this.Data.Length != 0) { goto IL_31; } goto IL_A5; uint arg_79_0; while (true) { IL_74: uint num2; switch ((num2 = (arg_79_0 ^ 1513400426u)) % 5u) { case 1u: num += 1 + CodedOutputStream.ComputeBytesSize(this.Data); arg_79_0 = (num2 * 131805875u ^ 3451800742u); continue; case 2u: num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id); arg_79_0 = (num2 * 1522600327u ^ 1283415835u); continue; case 3u: goto IL_31; case 4u: goto IL_A5; } break; } return num; IL_31: arg_79_0 = 1317462509u; goto IL_74; IL_A5: arg_79_0 = ((this.Id == 0u) ? 1304157405u : 114786272u); goto IL_74; } public void MergeFrom(ChallengeAnsweredRequest other) { if (other == null) { goto IL_36; } goto IL_FD; uint arg_BD_0; while (true) { IL_B8: uint num; switch ((num = (arg_BD_0 ^ 2482896263u)) % 9u) { case 1u: return; case 2u: arg_BD_0 = ((other.Id == 0u) ? 2244010945u : 3317921244u); continue; case 3u: this.Id = other.Id; arg_BD_0 = (num * 2075303047u ^ 2610411580u); continue; case 4u: this.Answer = other.Answer; arg_BD_0 = (num * 458266466u ^ 3194020199u); continue; case 5u: arg_BD_0 = ((other.Data.Length == 0) ? 2271333857u : 2250151958u); continue; case 6u: goto IL_FD; case 7u: goto IL_36; case 8u: this.Data = other.Data; arg_BD_0 = (num * 1783104841u ^ 3472492216u); continue; } break; } return; IL_36: arg_BD_0 = 2685011236u; goto IL_B8; IL_FD: arg_BD_0 = ((ChallengeAnsweredRequest.smethod_2(other.Answer) == 0) ? 3324869627u : 3806541353u); goto IL_B8; } public void MergeFrom(CodedInputStream input) { while (true) { IL_151: uint num; uint arg_105_0 = ((num = input.ReadTag()) != 0u) ? 313608526u : 512146575u; while (true) { uint num2; switch ((num2 = (arg_105_0 ^ 1295199956u)) % 12u) { case 0u: this.Data = input.ReadBytes(); arg_105_0 = 1450349118u; continue; case 1u: goto IL_151; case 2u: arg_105_0 = ((num != 10u) ? 1439386266u : 32728963u); continue; case 4u: arg_105_0 = (((num != 24u) ? 534326781u : 940122512u) ^ num2 * 1930759454u); continue; case 5u: arg_105_0 = (num2 * 2839322027u ^ 2371802198u); continue; case 6u: arg_105_0 = (((num == 18u) ? 1262070304u : 829182112u) ^ num2 * 2794482212u); continue; case 7u: arg_105_0 = 313608526u; continue; case 8u: this.Id = input.ReadUInt32(); arg_105_0 = 43155097u; continue; case 9u: input.SkipLastField(); arg_105_0 = (num2 * 2791204856u ^ 405198913u); continue; case 10u: arg_105_0 = (num2 * 308458390u ^ 3080860037u); continue; case 11u: this.Answer = input.ReadString(); arg_105_0 = 43155097u; continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static int smethod_1(object object_0) { return object_0.GetHashCode(); } static int smethod_2(string string_0) { return string_0.Length; } } } <file_sep>/Bgs.Protocol.Connection.V1/ConnectionMeteringContentHandles.cs using Google.Protobuf; using Google.Protobuf.Collections; using Google.Protobuf.Reflection; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Bgs.Protocol.Connection.V1 { [DebuggerNonUserCode] public sealed class ConnectionMeteringContentHandles : IMessage<ConnectionMeteringContentHandles>, IEquatable<ConnectionMeteringContentHandles>, IDeepCloneable<ConnectionMeteringContentHandles>, IMessage { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly ConnectionMeteringContentHandles.__c __9 = new ConnectionMeteringContentHandles.__c(); internal ConnectionMeteringContentHandles cctor>b__24_0() { return new ConnectionMeteringContentHandles(); } } private static readonly MessageParser<ConnectionMeteringContentHandles> _parser = new MessageParser<ConnectionMeteringContentHandles>(new Func<ConnectionMeteringContentHandles>(ConnectionMeteringContentHandles.__c.__9.<.cctor>b__24_0)); public const int ContentHandleFieldNumber = 1; private static readonly FieldCodec<ContentHandle> _repeated_contentHandle_codec = FieldCodec.ForMessage<ContentHandle>(10u, Bgs.Protocol.ContentHandle.Parser); private readonly RepeatedField<ContentHandle> contentHandle_ = new RepeatedField<ContentHandle>(); public static MessageParser<ConnectionMeteringContentHandles> Parser { get { return ConnectionMeteringContentHandles._parser; } } public static MessageDescriptor Descriptor { get { return ConnectionServiceReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return ConnectionMeteringContentHandles.Descriptor; } } public RepeatedField<ContentHandle> ContentHandle { get { return this.contentHandle_; } } public ConnectionMeteringContentHandles() { } public ConnectionMeteringContentHandles(ConnectionMeteringContentHandles other) : this() { while (true) { IL_43: uint arg_2B_0 = 805634705u; while (true) { uint num; switch ((num = (arg_2B_0 ^ 18227793u)) % 3u) { case 0u: goto IL_43; case 1u: this.contentHandle_ = other.contentHandle_.Clone(); arg_2B_0 = (num * 993386224u ^ 3821718727u); continue; } return; } } } public ConnectionMeteringContentHandles Clone() { return new ConnectionMeteringContentHandles(this); } public override bool Equals(object other) { return this.Equals(other as ConnectionMeteringContentHandles); } public bool Equals(ConnectionMeteringContentHandles other) { if (other == null) { goto IL_12; } goto IL_7A; int arg_48_0; while (true) { IL_43: switch ((arg_48_0 ^ -1861139250) % 7) { case 0: goto IL_7A; case 1: return false; case 2: arg_48_0 = (this.contentHandle_.Equals(other.contentHandle_) ? -1974796784 : -1213030504); continue; case 3: return false; case 4: return true; case 5: goto IL_12; } break; } return true; IL_12: arg_48_0 = -1501355481; goto IL_43; IL_7A: arg_48_0 = ((other != this) ? -300635687 : -938899260); goto IL_43; } public override int GetHashCode() { return 1 ^ ConnectionMeteringContentHandles.smethod_0(this.contentHandle_); } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { this.contentHandle_.WriteTo(output, ConnectionMeteringContentHandles._repeated_contentHandle_codec); } public int CalculateSize() { return 0 + this.contentHandle_.CalculateSize(ConnectionMeteringContentHandles._repeated_contentHandle_codec); } public void MergeFrom(ConnectionMeteringContentHandles other) { if (other == null) { return; } this.contentHandle_.Add(other.contentHandle_); } public void MergeFrom(CodedInputStream input) { while (true) { IL_9B: uint num; uint arg_68_0 = ((num = input.ReadTag()) != 0u) ? 2004300352u : 562414307u; while (true) { uint num2; switch ((num2 = (arg_68_0 ^ 1026528567u)) % 6u) { case 0u: arg_68_0 = 2004300352u; continue; case 1u: arg_68_0 = ((num != 10u) ? 477558627u : 817790408u); continue; case 3u: this.contentHandle_.AddEntriesFrom(input, ConnectionMeteringContentHandles._repeated_contentHandle_codec); arg_68_0 = 462478470u; continue; case 4u: input.SkipLastField(); arg_68_0 = (num2 * 656091581u ^ 17420418u); continue; case 5u: goto IL_9B; } return; } } } static int smethod_0(object object_0) { return object_0.GetHashCode(); } } } <file_sep>/Google.Protobuf.Reflection/FileDescriptorProto.cs using Google.Protobuf.Collections; using System; using System.Diagnostics; using System.Runtime.CompilerServices; namespace Google.Protobuf.Reflection { [DebuggerNonUserCode] internal sealed class FileDescriptorProto : IMessage, IMessage<FileDescriptorProto>, IEquatable<FileDescriptorProto>, IDeepCloneable<FileDescriptorProto> { [CompilerGenerated] [Serializable] private sealed class __c { public static readonly FileDescriptorProto.__c __9 = new FileDescriptorProto.__c(); internal FileDescriptorProto cctor>b__79_0() { return new FileDescriptorProto(); } } private static readonly MessageParser<FileDescriptorProto> _parser = new MessageParser<FileDescriptorProto>(new Func<FileDescriptorProto>(FileDescriptorProto.__c.__9.<.cctor>b__79_0)); public const int NameFieldNumber = 1; private string name_ = ""; public const int PackageFieldNumber = 2; private string package_ = ""; public const int DependencyFieldNumber = 3; private static readonly FieldCodec<string> _repeated_dependency_codec = FieldCodec.ForString(26u); private readonly RepeatedField<string> dependency_ = new RepeatedField<string>(); public const int PublicDependencyFieldNumber = 10; private static readonly FieldCodec<int> _repeated_publicDependency_codec; private readonly RepeatedField<int> publicDependency_ = new RepeatedField<int>(); public const int WeakDependencyFieldNumber = 11; private static readonly FieldCodec<int> _repeated_weakDependency_codec; private readonly RepeatedField<int> weakDependency_ = new RepeatedField<int>(); public const int MessageTypeFieldNumber = 4; private static readonly FieldCodec<DescriptorProto> _repeated_messageType_codec; private readonly RepeatedField<DescriptorProto> messageType_ = new RepeatedField<DescriptorProto>(); public const int EnumTypeFieldNumber = 5; private static readonly FieldCodec<EnumDescriptorProto> _repeated_enumType_codec; private readonly RepeatedField<EnumDescriptorProto> enumType_ = new RepeatedField<EnumDescriptorProto>(); public const int ServiceFieldNumber = 6; private static readonly FieldCodec<ServiceDescriptorProto> _repeated_service_codec; private readonly RepeatedField<ServiceDescriptorProto> service_ = new RepeatedField<ServiceDescriptorProto>(); public const int ExtensionFieldNumber = 7; private static readonly FieldCodec<FieldDescriptorProto> _repeated_extension_codec; private readonly RepeatedField<FieldDescriptorProto> extension_ = new RepeatedField<FieldDescriptorProto>(); public const int OptionsFieldNumber = 8; private FileOptions options_; public const int SourceCodeInfoFieldNumber = 9; private SourceCodeInfo sourceCodeInfo_; public const int SyntaxFieldNumber = 12; private string syntax_ = ""; public static MessageParser<FileDescriptorProto> Parser { get { return FileDescriptorProto._parser; } } public static MessageDescriptor Descriptor { get { return DescriptorReflection.Descriptor.MessageTypes[1]; } } MessageDescriptor IMessage.Descriptor { get { return FileDescriptorProto.Descriptor; } } public string Name { get { return this.name_; } set { this.name_ = Preconditions.CheckNotNull<string>(value, Module.smethod_36<string>(1095253436u)); } } public string Package { get { return this.package_; } set { this.package_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public RepeatedField<string> Dependency { get { return this.dependency_; } } public RepeatedField<int> PublicDependency { get { return this.publicDependency_; } } public RepeatedField<int> WeakDependency { get { return this.weakDependency_; } } public RepeatedField<DescriptorProto> MessageType { get { return this.messageType_; } } public RepeatedField<EnumDescriptorProto> EnumType { get { return this.enumType_; } } public RepeatedField<ServiceDescriptorProto> Service { get { return this.service_; } } public RepeatedField<FieldDescriptorProto> Extension { get { return this.extension_; } } public FileOptions Options { get { return this.options_; } set { this.options_ = value; } } public SourceCodeInfo SourceCodeInfo { get { return this.sourceCodeInfo_; } set { this.sourceCodeInfo_ = value; } } public string Syntax { get { return this.syntax_; } set { this.syntax_ = Preconditions.CheckNotNull<string>(value, Module.smethod_37<string>(2719011704u)); } } public FileDescriptorProto() { } public FileDescriptorProto(FileDescriptorProto other) : this() { while (true) { IL_154: uint arg_123_0 = 3575929238u; while (true) { uint num; switch ((num = (arg_123_0 ^ 2184623750u)) % 9u) { case 0u: goto IL_154; case 1u: this.dependency_ = other.dependency_.Clone(); arg_123_0 = (num * 1388212647u ^ 3763579264u); continue; case 3u: this.enumType_ = other.enumType_.Clone(); this.service_ = other.service_.Clone(); arg_123_0 = (num * 3065078095u ^ 2127772231u); continue; case 4u: this.Options = ((other.options_ != null) ? other.Options.Clone() : null); arg_123_0 = 3807456888u; continue; case 5u: this.publicDependency_ = other.publicDependency_.Clone(); arg_123_0 = (num * 1524559630u ^ 3399945333u); continue; case 6u: this.name_ = other.name_; this.package_ = other.package_; arg_123_0 = (num * 1873401823u ^ 673299681u); continue; case 7u: this.weakDependency_ = other.weakDependency_.Clone(); this.messageType_ = other.messageType_.Clone(); arg_123_0 = (num * 2598007098u ^ 2368810627u); continue; case 8u: this.extension_ = other.extension_.Clone(); arg_123_0 = (num * 1383762144u ^ 2356962222u); continue; } goto Block_2; } } Block_2: this.SourceCodeInfo = ((other.sourceCodeInfo_ != null) ? other.SourceCodeInfo.Clone() : null); this.syntax_ = other.syntax_; } public FileDescriptorProto Clone() { return new FileDescriptorProto(this); } public override bool Equals(object other) { return this.Equals(other as FileDescriptorProto); } public bool Equals(FileDescriptorProto other) { if (other == null) { goto IL_193; } goto IL_2E1; int arg_253_0; while (true) { IL_24E: switch ((arg_253_0 ^ 1423993945) % 29) { case 0: arg_253_0 = (this.messageType_.Equals(other.messageType_) ? 250297761 : 1816271783); continue; case 1: return true; case 2: arg_253_0 = ((!this.extension_.Equals(other.extension_)) ? 863250447 : 1678889957); continue; case 3: arg_253_0 = (this.service_.Equals(other.service_) ? 105404568 : 1059399591); continue; case 4: arg_253_0 = (this.enumType_.Equals(other.enumType_) ? 391392919 : 269614242); continue; case 5: return false; case 6: return false; case 7: goto IL_193; case 8: arg_253_0 = (this.weakDependency_.Equals(other.weakDependency_) ? 470890988 : 649668332); continue; case 9: arg_253_0 = (this.publicDependency_.Equals(other.publicDependency_) ? 1245894391 : 153445290); continue; case 10: return false; case 11: arg_253_0 = (FileDescriptorProto.smethod_0(this.Name, other.Name) ? 2000780036 : 1855336936); continue; case 12: arg_253_0 = ((!FileDescriptorProto.smethod_1(this.Options, other.Options)) ? 560506800 : 643090032); continue; case 13: return false; case 14: return false; case 15: return false; case 16: arg_253_0 = (FileDescriptorProto.smethod_0(this.Syntax, other.Syntax) ? 456655127 : 1603943830); continue; case 17: return false; case 18: return false; case 19: return false; case 20: goto IL_2E1; case 21: arg_253_0 = (this.dependency_.Equals(other.dependency_) ? 2042391476 : 1284745999); continue; case 22: return false; case 23: arg_253_0 = (FileDescriptorProto.smethod_0(this.Package, other.Package) ? 1416359973 : 1475563243); continue; case 24: return false; case 25: return false; case 26: arg_253_0 = (FileDescriptorProto.smethod_1(this.SourceCodeInfo, other.SourceCodeInfo) ? 733905757 : 627971778); continue; case 28: return false; } break; } return true; IL_193: arg_253_0 = 1362730375; goto IL_24E; IL_2E1: arg_253_0 = ((other == this) ? 136794140 : 532375342); goto IL_24E; } public override int GetHashCode() { int num = 1; while (true) { IL_247: uint arg_1FE_0 = 2063206840u; while (true) { uint num2; switch ((num2 = (arg_1FE_0 ^ 628707035u)) % 15u) { case 0u: num ^= FileDescriptorProto.smethod_3(this.Package); arg_1FE_0 = (num2 * 683899996u ^ 4051133618u); continue; case 2u: num ^= FileDescriptorProto.smethod_3(this.enumType_); arg_1FE_0 = (num2 * 3604887501u ^ 2860327677u); continue; case 3u: arg_1FE_0 = ((FileDescriptorProto.smethod_2(this.Syntax) != 0) ? 1011365958u : 2078100017u); continue; case 4u: num ^= FileDescriptorProto.smethod_3(this.Syntax); arg_1FE_0 = (num2 * 2326690851u ^ 3694135622u); continue; case 5u: num ^= FileDescriptorProto.smethod_3(this.SourceCodeInfo); arg_1FE_0 = (num2 * 1372958930u ^ 2114007303u); continue; case 6u: arg_1FE_0 = (((FileDescriptorProto.smethod_2(this.Name) == 0) ? 2310777205u : 3682993566u) ^ num2 * 757379244u); continue; case 7u: num ^= FileDescriptorProto.smethod_3(this.service_); num ^= FileDescriptorProto.smethod_3(this.extension_); arg_1FE_0 = (((this.options_ == null) ? 2696068965u : 4021405452u) ^ num2 * 3053807802u); continue; case 8u: goto IL_247; case 9u: num ^= FileDescriptorProto.smethod_3(this.dependency_); arg_1FE_0 = 1353690902u; continue; case 10u: num ^= FileDescriptorProto.smethod_3(this.Name); arg_1FE_0 = (num2 * 1967288003u ^ 3230173170u); continue; case 11u: num ^= FileDescriptorProto.smethod_3(this.publicDependency_); num ^= FileDescriptorProto.smethod_3(this.weakDependency_); num ^= FileDescriptorProto.smethod_3(this.messageType_); arg_1FE_0 = (num2 * 2963645360u ^ 488714282u); continue; case 12u: arg_1FE_0 = ((FileDescriptorProto.smethod_2(this.Package) == 0) ? 1063633222u : 1831663184u); continue; case 13u: arg_1FE_0 = ((this.sourceCodeInfo_ == null) ? 695427623u : 1268475339u); continue; case 14u: num ^= FileDescriptorProto.smethod_3(this.Options); arg_1FE_0 = (num2 * 1395976384u ^ 3790287643u); continue; } return num; } } return num; } public override string ToString() { return JsonFormatter.ToDiagnosticString(this); } public void WriteTo(CodedOutputStream output) { if (FileDescriptorProto.smethod_2(this.Name) != 0) { goto IL_142; } goto IL_2D7; uint arg_26B_0; while (true) { IL_266: uint num; switch ((num = (arg_26B_0 ^ 2141970552u)) % 20u) { case 0u: output.WriteString(this.Syntax); arg_26B_0 = (num * 891968062u ^ 488854514u); continue; case 1u: output.WriteMessage(this.SourceCodeInfo); arg_26B_0 = (num * 549984498u ^ 4165275474u); continue; case 2u: output.WriteString(this.Name); arg_26B_0 = (num * 2346760264u ^ 87056129u); continue; case 3u: output.WriteRawTag(66); output.WriteMessage(this.Options); arg_26B_0 = (num * 618613826u ^ 4148186224u); continue; case 4u: this.dependency_.WriteTo(output, FileDescriptorProto._repeated_dependency_codec); arg_26B_0 = 765621259u; continue; case 5u: output.WriteRawTag(74); arg_26B_0 = (num * 647892067u ^ 2343897654u); continue; case 7u: this.weakDependency_.WriteTo(output, FileDescriptorProto._repeated_weakDependency_codec); arg_26B_0 = (((FileDescriptorProto.smethod_2(this.Syntax) != 0) ? 1706845051u : 1717899730u) ^ num * 1046609600u); continue; case 8u: this.enumType_.WriteTo(output, FileDescriptorProto._repeated_enumType_codec); this.service_.WriteTo(output, FileDescriptorProto._repeated_service_codec); arg_26B_0 = (num * 2780825842u ^ 2841685598u); continue; case 9u: goto IL_142; case 10u: output.WriteRawTag(18); arg_26B_0 = (num * 1998727022u ^ 980438927u); continue; case 11u: output.WriteRawTag(98); arg_26B_0 = (num * 4080617821u ^ 3007854463u); continue; case 12u: this.publicDependency_.WriteTo(output, FileDescriptorProto._repeated_publicDependency_codec); arg_26B_0 = 333743959u; continue; case 13u: output.WriteRawTag(10); arg_26B_0 = (num * 3777853415u ^ 4084976273u); continue; case 14u: arg_26B_0 = ((this.sourceCodeInfo_ == null) ? 160479688u : 914677297u); continue; case 15u: output.WriteString(this.Package); arg_26B_0 = (num * 2326637175u ^ 1527913553u); continue; case 16u: arg_26B_0 = (((this.options_ == null) ? 671890806u : 459397835u) ^ num * 3363857649u); continue; case 17u: goto IL_2D7; case 18u: this.extension_.WriteTo(output, FileDescriptorProto._repeated_extension_codec); arg_26B_0 = (num * 1542808062u ^ 1370167292u); continue; case 19u: this.messageType_.WriteTo(output, FileDescriptorProto._repeated_messageType_codec); arg_26B_0 = (num * 1124482291u ^ 3682725413u); continue; } break; } return; IL_142: arg_26B_0 = 1453753241u; goto IL_266; IL_2D7: arg_26B_0 = ((FileDescriptorProto.smethod_2(this.Package) != 0) ? 2144773326u : 1467215348u); goto IL_266; } public int CalculateSize() { int num = 0; while (true) { IL_28D: uint arg_240_0 = 2678321268u; while (true) { uint num2; switch ((num2 = (arg_240_0 ^ 2998008459u)) % 16u) { case 0u: num += 1 + CodedOutputStream.ComputeMessageSize(this.SourceCodeInfo); arg_240_0 = (num2 * 1998575584u ^ 614984952u); continue; case 1u: num += 1 + CodedOutputStream.ComputeStringSize(this.Package); arg_240_0 = (num2 * 2515148190u ^ 2062787730u); continue; case 2u: num += this.service_.CalculateSize(FileDescriptorProto._repeated_service_codec); num += this.extension_.CalculateSize(FileDescriptorProto._repeated_extension_codec); arg_240_0 = (num2 * 3405254182u ^ 3686798669u); continue; case 3u: arg_240_0 = ((FileDescriptorProto.smethod_2(this.Syntax) == 0) ? 3652579202u : 2718604455u); continue; case 4u: num += this.weakDependency_.CalculateSize(FileDescriptorProto._repeated_weakDependency_codec); num += this.messageType_.CalculateSize(FileDescriptorProto._repeated_messageType_codec); num += this.enumType_.CalculateSize(FileDescriptorProto._repeated_enumType_codec); arg_240_0 = (num2 * 836152376u ^ 2323224697u); continue; case 5u: num += this.publicDependency_.CalculateSize(FileDescriptorProto._repeated_publicDependency_codec); arg_240_0 = (num2 * 4003264926u ^ 1020558761u); continue; case 6u: num += 1 + CodedOutputStream.ComputeMessageSize(this.Options); arg_240_0 = (num2 * 311541268u ^ 1633113885u); continue; case 7u: num += this.dependency_.CalculateSize(FileDescriptorProto._repeated_dependency_codec); arg_240_0 = 2974179902u; continue; case 8u: num += 1 + CodedOutputStream.ComputeStringSize(this.Name); arg_240_0 = (num2 * 3433867051u ^ 969402542u); continue; case 10u: arg_240_0 = (((this.options_ != null) ? 3345198335u : 2913778775u) ^ num2 * 2339025109u); continue; case 11u: goto IL_28D; case 12u: num += 1 + CodedOutputStream.ComputeStringSize(this.Syntax); arg_240_0 = (num2 * 73868573u ^ 520552830u); continue; case 13u: arg_240_0 = ((FileDescriptorProto.smethod_2(this.Package) == 0) ? 2531598476u : 2461569610u); continue; case 14u: arg_240_0 = ((this.sourceCodeInfo_ != null) ? 2695163259u : 3677908728u); continue; case 15u: arg_240_0 = (((FileDescriptorProto.smethod_2(this.Name) != 0) ? 1607429488u : 1695531333u) ^ num2 * 1923024413u); continue; } return num; } } return num; } public void MergeFrom(FileDescriptorProto other) { if (other == null) { goto IL_252; } goto IL_307; uint arg_297_0; while (true) { IL_292: uint num; switch ((num = (arg_297_0 ^ 3747012698u)) % 21u) { case 0u: this.Package = other.Package; arg_297_0 = (num * 2891496509u ^ 2689437845u); continue; case 2u: this.weakDependency_.Add(other.weakDependency_); arg_297_0 = (num * 1590212279u ^ 230515261u); continue; case 3u: goto IL_252; case 4u: this.enumType_.Add(other.enumType_); this.service_.Add(other.service_); this.extension_.Add(other.extension_); arg_297_0 = (num * 3763304133u ^ 3764563442u); continue; case 5u: this.options_ = new FileOptions(); arg_297_0 = (num * 2806335943u ^ 1327564284u); continue; case 6u: this.Name = other.Name; arg_297_0 = (num * 359145698u ^ 2448152882u); continue; case 7u: arg_297_0 = ((FileDescriptorProto.smethod_2(other.Syntax) != 0) ? 3547840750u : 2187627440u); continue; case 8u: this.Syntax = other.Syntax; arg_297_0 = (num * 732106943u ^ 2939825660u); continue; case 9u: goto IL_307; case 10u: arg_297_0 = (((other.options_ != null) ? 2909039613u : 2893597917u) ^ num * 3080653002u); continue; case 11u: arg_297_0 = (((this.sourceCodeInfo_ == null) ? 3833044371u : 3043259062u) ^ num * 1788227699u); continue; case 12u: this.messageType_.Add(other.messageType_); arg_297_0 = (num * 3665581954u ^ 1357302765u); continue; case 13u: this.SourceCodeInfo.MergeFrom(other.SourceCodeInfo); arg_297_0 = 2725563441u; continue; case 14u: return; case 15u: arg_297_0 = ((FileDescriptorProto.smethod_2(other.Package) != 0) ? 2558204566u : 2685338121u); continue; case 16u: arg_297_0 = (((this.options_ != null) ? 3467117287u : 3402127853u) ^ num * 458057237u); continue; case 17u: this.sourceCodeInfo_ = new SourceCodeInfo(); arg_297_0 = (num * 534316533u ^ 3815259915u); continue; case 18u: this.dependency_.Add(other.dependency_); this.publicDependency_.Add(other.publicDependency_); arg_297_0 = 3488571248u; continue; case 19u: this.Options.MergeFrom(other.Options); arg_297_0 = 2149137111u; continue; case 20u: arg_297_0 = ((other.sourceCodeInfo_ != null) ? 3096650730u : 2725563441u); continue; } break; } return; IL_252: arg_297_0 = 3007324796u; goto IL_292; IL_307: arg_297_0 = ((FileDescriptorProto.smethod_2(other.Name) != 0) ? 2972218799u : 4075608952u); goto IL_292; } public void MergeFrom(CodedInputStream input) { while (true) { IL_614: uint num; uint arg_53C_0 = ((num = input.ReadTag()) != 0u) ? 2426693751u : 2746740417u; while (true) { uint num2; switch ((num2 = (arg_53C_0 ^ 2796671478u)) % 47u) { case 0u: arg_53C_0 = (((num != 26u) ? 3234518167u : 4080755734u) ^ num2 * 3763736491u); continue; case 1u: arg_53C_0 = ((num > 88u) ? 3934412663u : 4174775471u); continue; case 2u: arg_53C_0 = (((num != 58u) ? 3480500766u : 2963671683u) ^ num2 * 105112105u); continue; case 3u: arg_53C_0 = (num2 * 2352432553u ^ 530834772u); continue; case 4u: this.messageType_.AddEntriesFrom(input, FileDescriptorProto._repeated_messageType_codec); arg_53C_0 = 2625973319u; continue; case 5u: arg_53C_0 = (((num == 66u) ? 2399266528u : 2990888610u) ^ num2 * 49967855u); continue; case 6u: this.sourceCodeInfo_ = new SourceCodeInfo(); arg_53C_0 = (num2 * 1680181953u ^ 2199333464u); continue; case 7u: input.SkipLastField(); arg_53C_0 = 2625973319u; continue; case 8u: arg_53C_0 = (num2 * 1929843402u ^ 1009531716u); continue; case 9u: goto IL_614; case 10u: arg_53C_0 = (num2 * 523290572u ^ 871966656u); continue; case 11u: this.weakDependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_weakDependency_codec); arg_53C_0 = 3078703021u; continue; case 12u: arg_53C_0 = (((num != 42u) ? 3663485356u : 2547820296u) ^ num2 * 1098197768u); continue; case 13u: arg_53C_0 = 2426693751u; continue; case 14u: arg_53C_0 = (((num == 80u) ? 3388393731u : 3850663134u) ^ num2 * 2853416292u); continue; case 15u: arg_53C_0 = (num2 * 1690967044u ^ 2760031920u); continue; case 16u: input.ReadMessage(this.sourceCodeInfo_); arg_53C_0 = 2625973319u; continue; case 17u: arg_53C_0 = (num2 * 100914873u ^ 459393050u); continue; case 18u: arg_53C_0 = (((num <= 26u) ? 1624393110u : 1659306327u) ^ num2 * 1272127782u); continue; case 19u: arg_53C_0 = (((num != 18u) ? 3725914569u : 3273919117u) ^ num2 * 3961008691u); continue; case 20u: arg_53C_0 = ((this.options_ == null) ? 3094926438u : 3448572962u); continue; case 21u: this.enumType_.AddEntriesFrom(input, FileDescriptorProto._repeated_enumType_codec); arg_53C_0 = 3557833011u; continue; case 22u: arg_53C_0 = ((this.sourceCodeInfo_ == null) ? 2904150378u : 3818891204u); continue; case 23u: arg_53C_0 = ((num == 50u) ? 2935341907u : 2742497708u); continue; case 24u: arg_53C_0 = (((num != 82u) ? 1523011975u : 1280503552u) ^ num2 * 1167527151u); continue; case 25u: this.Syntax = input.ReadString(); arg_53C_0 = 2625973319u; continue; case 26u: this.options_ = new FileOptions(); arg_53C_0 = (num2 * 4112195377u ^ 1876659378u); continue; case 27u: this.Package = input.ReadString(); arg_53C_0 = 2625973319u; continue; case 28u: arg_53C_0 = (((num != 74u) ? 1641478123u : 520753610u) ^ num2 * 161714108u); continue; case 29u: arg_53C_0 = (((num != 34u) ? 2293718899u : 4294795246u) ^ num2 * 404660977u); continue; case 30u: arg_53C_0 = (num2 * 224820281u ^ 1464024683u); continue; case 31u: arg_53C_0 = (num2 * 763365213u ^ 2164902010u); continue; case 32u: arg_53C_0 = (((num == 10u) ? 1652832291u : 796519026u) ^ num2 * 2092453958u); continue; case 33u: arg_53C_0 = (num2 * 3564613589u ^ 1403965428u); continue; case 34u: this.Name = input.ReadString(); arg_53C_0 = 2625973319u; continue; case 35u: arg_53C_0 = ((num > 58u) ? 2727037027u : 3484348619u); continue; case 36u: this.publicDependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_publicDependency_codec); arg_53C_0 = 2773543546u; continue; case 37u: input.ReadMessage(this.options_); arg_53C_0 = 2625973319u; continue; case 38u: arg_53C_0 = ((num <= 42u) ? 3701563203u : 3646822911u); continue; case 40u: arg_53C_0 = (((num != 98u) ? 332180504u : 305955724u) ^ num2 * 3633178782u); continue; case 41u: this.dependency_.AddEntriesFrom(input, FileDescriptorProto._repeated_dependency_codec); arg_53C_0 = 2625973319u; continue; case 42u: arg_53C_0 = (((num != 88u) ? 566040478u : 718732372u) ^ num2 * 2981097676u); continue; case 43u: arg_53C_0 = ((num > 80u) ? 2235219671u : 3494151182u); continue; case 44u: this.service_.AddEntriesFrom(input, FileDescriptorProto._repeated_service_codec); arg_53C_0 = 2625973319u; continue; case 45u: arg_53C_0 = ((num != 90u) ? 3818832610u : 3854914844u); continue; case 46u: this.extension_.AddEntriesFrom(input, FileDescriptorProto._repeated_extension_codec); arg_53C_0 = 2625973319u; continue; } return; } } } static FileDescriptorProto() { // Note: this type is marked as 'beforefieldinit'. while (true) { IL_100: uint arg_D8_0 = 3941137493u; while (true) { uint num; switch ((num = (arg_D8_0 ^ 2214840476u)) % 7u) { case 0u: FileDescriptorProto._repeated_enumType_codec = FieldCodec.ForMessage<EnumDescriptorProto>(42u, EnumDescriptorProto.Parser); arg_D8_0 = (num * 1592216465u ^ 2792509350u); continue; case 1u: FileDescriptorProto._repeated_weakDependency_codec = FieldCodec.ForInt32(88u); arg_D8_0 = (num * 1061256043u ^ 3239522193u); continue; case 2u: FileDescriptorProto._repeated_publicDependency_codec = FieldCodec.ForInt32(80u); arg_D8_0 = (num * 2285483405u ^ 757075284u); continue; case 3u: goto IL_100; case 5u: FileDescriptorProto._repeated_service_codec = FieldCodec.ForMessage<ServiceDescriptorProto>(50u, ServiceDescriptorProto.Parser); FileDescriptorProto._repeated_extension_codec = FieldCodec.ForMessage<FieldDescriptorProto>(58u, FieldDescriptorProto.Parser); arg_D8_0 = (num * 3611654478u ^ 784137409u); continue; case 6u: FileDescriptorProto._repeated_messageType_codec = FieldCodec.ForMessage<DescriptorProto>(34u, DescriptorProto.Parser); arg_D8_0 = (num * 2039997192u ^ 3630502781u); continue; } return; } } } static bool smethod_0(string string_0, string string_1) { return string_0 != string_1; } static bool smethod_1(object object_0, object object_1) { return object.Equals(object_0, object_1); } static int smethod_2(string string_0) { return string_0.Length; } static int smethod_3(object object_0) { return object_0.GetHashCode(); } } }
93635a6ea7b249cd73bb892a04d85c1b7b62d765
[ "C#" ]
559
C#
IllidanS4/Arctium-RE
723a2f4b73a80875b6297bb5074f31096784c851
67374ead75ecdfc547627e278bef3681c2f7dc62
refs/heads/master
<repo_name>DeepaliVerma011/MVVM<file_sep>/app/src/main/java/com/deepaliverma/mvvm/ui/adapter/UsersAdapter.kt package com.deepaliverma.mvvm.ui.adapter import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.deepaliverma.mvvm.R import com.deepaliverma.mvvm.data.models.Users import com.squareup.picasso.Picasso import kotlinx.android.synthetic.main.item_user.view.* class UsersAdapter(val data:List<Users>): RecyclerView.Adapter<UserVeiwHolder>() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int)=UserVeiwHolder( LayoutInflater.from(parent.context).inflate(R.layout.item_user,parent,false) ) override fun onBindViewHolder(holder: UserVeiwHolder, position: Int) { holder.bind(data[position]) } override fun getItemCount()=data.size } class UserVeiwHolder(itemView:View):RecyclerView.ViewHolder(itemView) { fun bind(item:Users)=with(itemView){ usernameTv.text=item.login Picasso.get().load(item.avatarUrl).into(userImgView) } } <file_sep>/app/src/main/java/com/deepaliverma/mvvm/data/api/GithubService.kt package com.deepaliverma.mvvm.data.api import com.deepaliverma.mvvm.data.models.SearchResponse import com.deepaliverma.mvvm.data.models.Users import com.google.gson.JsonObject import retrofit2.Response import retrofit2.http.GET import retrofit2.http.Query interface GithubService { @GET("users") suspend fun getUsers():Response<List<Users>> @GET("search/users") suspend fun searchUsers(@Query("q") name:String):Response<SearchResponse> } <file_sep>/app/src/main/java/com/deepaliverma/mvvm/ui/viewmodel/GithubViewModel.kt package com.deepaliverma.mvvm.ui.viewmodel import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.liveData import androidx.lifecycle.viewModelScope import com.deepaliverma.mvvm.data.models.Users import com.deepaliverma.mvvm.data.repos.GithubRepository import kotlinx.coroutines.* class GithubViewModel : ViewModel() { val users = MutableLiveData<List<Users>>() //VIEW MODEL : HAVE INBUILD SUPPORT FOR COROROUTINES fun fetchUsers() { viewModelScope.launch(Dispatchers.IO) { val response = withContext(Dispatchers.IO) { GithubRepository.getUsers() } if (response.isSuccessful) { response.body()?.let { //for writing in main thread we use post users.postValue(it) } } } /*runIO { }*/ } fun SearchUsers(name: String) = liveData(Dispatchers.IO) { val response = withContext(Dispatchers.IO) { GithubRepository.searchUsers(name) } if (response.isSuccessful) { response.body()?.let { emit(it.items) } } } } //Extension Function for ViewModel scope then we can directly use runIO{} fun ViewModel.runIO( dispatchers: CoroutineDispatcher = Dispatchers.IO, function: suspend CoroutineScope.() -> Unit ) { viewModelScope.launch(dispatchers) { function() } } <file_sep>/app/src/main/java/com/deepaliverma/mvvm/data/repos/GithubRepository.kt package com.deepaliverma.mvvm.data.repos import com.deepaliverma.mvvm.data.api.Client object GithubRepository { suspend fun getUsers()= Client.api.getUsers() suspend fun searchUsers(name:String)=Client.api.searchUsers(name) }
02610905037d0eebd5ff7961467dc500f05bac63
[ "Kotlin" ]
4
Kotlin
DeepaliVerma011/MVVM
dedcc8df31fdb5bfd523e1ad9e2fa6188126b524
ce97cf4a0af8c8e4ae19548e61dbeab46c63f465
refs/heads/master
<file_sep># gsrpc the offical gsrpc plugin for gsmake <file_sep>name "github.com/gsmake/gsrpc" plugin "github.com/gsmake/lua"
2ba70d5eaeb872312f2377cbe949e50cd740e5ae
[ "Markdown", "Lua" ]
2
Markdown
gsmake/gsrpc
0af90f5381f3084653b4f3ac94b8f5dd5d7f3b2c
d8c6ad57c328c0ea74285ea42ddfe708e990f623
refs/heads/master
<file_sep>##Testers & programmers needed: [follow me](https://github.com/csaki/Hentoid/issues/46)# ![Hentoid App Icon](https://github.com/avluis/Hentoid-Resources/raw/master/wiki/assets/img/ic_launcher-web.png) #####`Hentoid` is a Hentai Manga reader & archiving app designed to work with:# ######[Fakku](https://www.fakku.net/), [Pururin](http://pururin.com/) and [Hitomi](http://hitomi.la/).# ######[nhentai](http://nhentai.net/) support has been recently added after Fakku going legit, and Pururin getting abandoned. #####Check out the [Getting Started with Hentoid](https://github.com/csaki/Hentoid/wiki/Getting-Started-with-Hentoid) guide if you need assistance installing `Hentoid` on your device.# #####For the latest release, [go here](https://github.com/csaki/Hentoid/releases/latest).# ___ #####Visit our [Google+ Community](https://plus.google.com/communities/110496467189870321840) for Announcements, and Updates.# ######Help us shape Hentoid into the best H-Manga App for you.# ___<file_sep>package me.devsaki.hentoid.database.domains; import com.google.gson.annotations.Expose; import java.util.List; import me.devsaki.hentoid.database.contants.ContentTable; import me.devsaki.hentoid.database.enums.AttributeType; import me.devsaki.hentoid.database.enums.Site; import me.devsaki.hentoid.database.enums.StatusContent; import me.devsaki.hentoid.util.AttributeMap; /** * Created by DevSaki on 09/05/2015. */ @Deprecated public class ContentV1 extends ContentTable { @Expose private String url; @Expose private String title; @Expose private String htmlDescription; @Expose private Attribute serie; @Expose private List<Attribute> artists; @Expose private List<Attribute> publishers; @Expose private Attribute language; @Expose private List<Attribute> tags; @Expose private List<Attribute> translators; @Expose private String coverImageUrl; @Expose private Integer qtyPages; @Expose private long uploadDate; @Expose private Attribute user; @Expose private long downloadDate; @Expose private StatusContent status; @Expose private List<ImageFile> imageFiles; @Expose(serialize = false, deserialize = false) private boolean downloadable; @Expose(serialize = false, deserialize = false) private double percent; @Expose private Site site; public void setUrl(String url) { this.url = url; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public void setHtmlDescription(String htmlDescription) { this.htmlDescription = htmlDescription; } public void setSerie(Attribute serie) { this.serie = serie; } public void setArtists(List<Attribute> artists) { this.artists = artists; } public void setLanguage(Attribute language) { this.language = language; } public void setTags(List<Attribute> tags) { this.tags = tags; } public void setTranslators(List<Attribute> translators) { this.translators = translators; } public void setCoverImageUrl(String coverImageUrl) { this.coverImageUrl = coverImageUrl; } public void setQtyPages(Integer qtyPages) { this.qtyPages = qtyPages; } public void setDownloadDate(long downloadDate) { this.downloadDate = downloadDate; } public StatusContent getStatus() { return status; } public void setMigratedStatus() { status = StatusContent.MIGRATED; } private Site getSite() { //to keep compatibility, if null return Fakku if (site == null) return Site.FAKKU; return site; } public void setSite(Site site) { this.site = site; } public Content toContent() { Content content = new Content(); content.setSite(getSite()); content.setUrl(url); content.setUploadDate(uploadDate); //Process and add attributes AttributeMap attributes = new AttributeMap(); attributes.put(AttributeType.ARTIST, artists); attributes.put(AttributeType.PUBLISHER, publishers); attributes.put(AttributeType.TRANSLATOR, translators); attributes.put(AttributeType.TAG, tags); if (serie != null) attributes.add(serie); if (language != null) attributes.add(language); if (user != null) attributes.add(user); content.setAttributes(attributes); content.setImageFiles(imageFiles); content.setCoverImageUrl(coverImageUrl); content.setHtmlDescription(htmlDescription); content.setTitle(title); content.setQtyPages(qtyPages); content.setDownloadDate(downloadDate); content.setStatus(status); return content; } } <file_sep>package me.devsaki.hentoid.updater; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Handler; import android.support.v4.app.NotificationCompat; import android.text.format.Formatter; import android.util.Log; import android.widget.RemoteViews; import android.widget.Toast; import com.thin.downloadmanager.DownloadManager; import com.thin.downloadmanager.DownloadRequest; import com.thin.downloadmanager.DownloadStatusListener; import com.thin.downloadmanager.ThinDownloadManager; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.Charset; import me.devsaki.hentoid.R; import me.devsaki.hentoid.util.Constants; import me.devsaki.hentoid.util.NetworkStatus; /** * Created by avluis on 8/21/15. */ public class UpdateCheck implements IUpdateCheck { public static final String ACTION_DOWNLOAD_CANCELLED = "me.devsaki.hentoid.updater.DOWNLOAD_CANCELLED"; public static final String ACTION_NOTIFICATION_REMOVED = "me.devsaki.hentoid.updater.NOTIFICATION_REMOVED"; public static final String ACTION_DOWNLOAD_UPDATE = "me.devsaki.hentoid.updater.INSTALL_UPDATE"; public static final String ACTION_UPDATE_DOWNLOADED = "me.devsaki.hentoid.updater.UPDATE_DOWNLOADED"; private static final String TAG = UpdateCheck.class.getName(); private static final String KEY_VERSION_CODE = "versionCode"; private static final String KEY_UPDATED_URL = "updateURL"; private static volatile UpdateCheck instance; private final int NOTIFICATION_ID = 1; private final UpdateNotificationRunnable updateNotificationRunnable = new UpdateNotificationRunnable(); private NotificationCompat.Builder builder; private NotificationManager notificationManager; private RemoteViews notificationView; private int downloadID = -1; private DownloadManager downloadManager; private String updateDownloadPath; private Context context; private UpdateCheckCallback updateCheckResult; private Handler mHandler; private String downloadURL; private int progressBar; private long total; private long done; private boolean showToast; private boolean connected; private UpdateCheck() { } public static UpdateCheck getInstance() { if (instance == null) { instance = new UpdateCheck(); } return instance; } @Override public void checkForUpdate(Context context, final boolean onlyWifi, final boolean showToast, final UpdateCheckCallback updateCheckResult) { if (context == null) { throw new NullPointerException("context or UpdateURL is null"); } this.context = context; this.updateCheckResult = updateCheckResult; mHandler = new Handler(context.getMainLooper()); if ((onlyWifi && NetworkStatus.isWifi(context)) || (!onlyWifi && NetworkStatus.isOnline(context))) { connected = true; } else { Log.e("networkInfo", "Network is not connected!"); } if (connected) { runAsyncTask(); } this.showToast = showToast; } private void runAsyncTask() { String updateURL = Constants.UPDATE_URL; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { new UpdateCheckTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, updateURL); } else { new UpdateCheckTask().execute(updateURL); } } @Override public int getAppVersionCode(Context context) throws PackageManager.NameNotFoundException { if (context != null) { return context.getPackageManager().getPackageInfo( context.getPackageName(), 0).versionCode; } else { throw new NullPointerException("context is null"); } } private void updateAvailableNotification(String updateURL) { if (downloadManager != null) { downloadingUpdateNotification(); try { mHandler.removeCallbacks(updateNotificationRunnable); mHandler.post(updateNotificationRunnable); } catch (Exception e) { e.printStackTrace(); } } downloadURL = updateURL; Intent installUpdate = new Intent(ACTION_DOWNLOAD_UPDATE); installUpdate.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent updateIntent = PendingIntent.getBroadcast(context, 0, installUpdate, 0); notificationView = new RemoteViews(context.getPackageName(), R.layout.update_notification_available); notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); builder = new NotificationCompat .Builder(context) .setSmallIcon(R.drawable.ic_hentoid) .setPriority(NotificationCompat.PRIORITY_MAX) .setVibrate(new long[]{1, 1, 1}) .setCategory(NotificationCompat.CATEGORY_MESSAGE) .setTicker(context.getString(R.string.update_available)) .setContent(notificationView); notificationView.setTextViewText(R.id.tv_2, context.getString(R.string.download_update)); notificationView.setOnClickPendingIntent(R.id.rl_notify_root, updateIntent); notificationManager.notify(NOTIFICATION_ID, builder.build()); } public void downloadingUpdateNotification() { Intent stopIntent = new Intent(ACTION_DOWNLOAD_CANCELLED); stopIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent cancelIntent = PendingIntent.getBroadcast(context, 0, stopIntent, 0); Intent clearIntent = new Intent(ACTION_NOTIFICATION_REMOVED); clearIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent removeIntent = PendingIntent.getBroadcast(context, 0, clearIntent, 0); notificationView = new RemoteViews(context.getPackageName(), R.layout.update_notification); notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); builder = new NotificationCompat .Builder(context) .setSmallIcon(R.drawable.ic_hentoid) .setTicker(context.getString(R.string.downloading_update)) .setContent(notificationView) .setDeleteIntent(removeIntent); notificationView.setProgressBar(R.id.pb_notification, 100, 0, true); notificationView.setTextViewText(R.id.tv_1, context.getString(R.string.downloading_update)); notificationView.setTextViewText(R.id.tv_2, ""); notificationView.setOnClickPendingIntent(R.id.bt_cancel, cancelIntent); notificationManager.notify(NOTIFICATION_ID, builder.build()); } private void updateDownloadedNotification() { Intent installUpdate = new Intent(ACTION_UPDATE_DOWNLOADED); installUpdate.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent installIntent = PendingIntent.getBroadcast(context, 0, installUpdate, 0); notificationView = new RemoteViews(context.getPackageName(), R.layout.update_notification_available); notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); builder = new NotificationCompat .Builder(context) .setSmallIcon(R.drawable.ic_hentoid) .setPriority(NotificationCompat.PRIORITY_MAX) .setVibrate(new long[]{1, 1, 1}) .setCategory(NotificationCompat.CATEGORY_MESSAGE) .setTicker(context.getString(R.string.install_update)) .setContent(notificationView); notificationView.setTextViewText(R.id.tv_2, context.getString(R.string.install_update)); notificationView.setOnClickPendingIntent(R.id.rl_notify_root, installIntent); notificationManager.notify(NOTIFICATION_ID, builder.build()); } public void installUpdate() { Intent intent; if (Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH) { intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); //noinspection deprecation intent.putExtra(Intent.EXTRA_ALLOW_REPLACE, true); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { intent = new Intent(Intent.ACTION_INSTALL_PACKAGE); } else { intent = new Intent(Intent.ACTION_VIEW); } intent.setDataAndType(Uri.parse("file://" + updateDownloadPath), "application/vnd.android.package-archive"); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } public void downloadUpdate() { if (downloadURL != null) { cancelDownload(); Uri downloadUri = Uri.parse(downloadURL); assert context.getExternalCacheDir() != null; Uri destinationUri = Uri.parse(updateDownloadPath = context.getExternalCacheDir() + "/hentoid_update.apk"); DownloadRequest downloadRequest = new DownloadRequest(downloadUri) .setDestinationURI(destinationUri) .setPriority(DownloadRequest.Priority.HIGH) .setDownloadListener(new DownloadStatusListener() { private boolean posted; @Override public void onDownloadComplete(int id) { cancelNotificationAndUpdateRunnable(); updateDownloadedNotification(); } @Override public void onDownloadFailed(int id, int errorCode, String errorMessage) { cancelNotificationAndUpdateRunnable(); if (errorCode != DownloadManager.ERROR_DOWNLOAD_CANCELLED) { try { notificationView.setProgressBar(R.id.pb_notification, 100, 0, true); notificationView.setTextViewText(R.id.tv_1, context.getString(R.string.error_network)); notificationView.setTextViewText(R.id.tv_2, context.getString(R.string.error)); notificationManager.notify(NOTIFICATION_ID, builder.build()); } catch (Exception e) { e.printStackTrace(); } } downloadManager = null; } @Override public void onProgress(int id, long totalBytes, long downloadedBytes, int progress) { progressBar = progress; total = totalBytes; done = downloadedBytes; if (!posted) { posted = true; mHandler.post(updateNotificationRunnable); } } }); downloadManager = new ThinDownloadManager(); downloadID = downloadManager.add(downloadRequest); } else { Toast.makeText(context.getApplicationContext(), R.string.update_failed, Toast.LENGTH_LONG).show(); instance.cancelNotification(); } } public void cancelNotificationAndUpdateRunnable() { try { mHandler.removeCallbacks(updateNotificationRunnable); } catch (Exception e) { e.printStackTrace(); } cancelNotification(); } public void cancelNotification() { try { notificationManager.cancel(NOTIFICATION_ID); } catch (Exception e) { e.printStackTrace(); } } public void cancelDownload() { cancelNotificationAndUpdateRunnable(); try { downloadManager.cancel(downloadID); downloadManager.release(); } catch (Exception e) { e.printStackTrace(); } } public interface UpdateCheckCallback { void noUpdateAvailable(); void onUpdateAvailable(); } public class UpdateCheckTask extends AsyncTask<String, Void, Void> { @Override protected Void doInBackground(String... params) { try { JSONObject jsonObject = downloadURL(params[0]); if (jsonObject != null) { int updateVersionCode = jsonObject.getInt(KEY_VERSION_CODE); if (getAppVersionCode(context) < updateVersionCode) { if (updateCheckResult != null) { updateCheckResult.onUpdateAvailable(); if (showToast) { mHandler.post(new Runnable() { @Override public void run() { Toast.makeText(context, "Update Check: An update is available!", Toast.LENGTH_LONG).show(); } }); } } downloadURL = jsonObject.getString(KEY_UPDATED_URL); updateAvailableNotification(downloadURL); } else { if (updateCheckResult != null) { updateCheckResult.noUpdateAvailable(); if (showToast) { mHandler.post(new Runnable() { @Override public void run() { Toast.makeText(context, "Update Check: No new updates.", Toast.LENGTH_LONG).show(); } }); } } } } } catch (IOException | JSONException | PackageManager.NameNotFoundException e) { e.printStackTrace(); } return null; } private JSONObject downloadURL(String updateURL) throws IOException, JSONException { InputStream inputStream = null; try { disableConnectionReuse(); URL url = new URL(updateURL); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setReadTimeout(10000); connection.setConnectTimeout(15000); connection.setRequestMethod("GET"); connection.setDoInput(true); connection.connect(); int response = connection.getResponseCode(); Log.d(TAG, "The response is: " + response); inputStream = connection.getInputStream(); String contentString = readInputStream(inputStream); return new JSONObject(contentString); } finally { if (inputStream != null) { inputStream.close(); } } } private void disableConnectionReuse() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) { System.setProperty("http.keepAlive", "false"); } } private String readInputStream(InputStream inputStream) throws IOException { StringBuilder stringBuilder = new StringBuilder(inputStream.available()); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8"))); String line = reader.readLine(); while (line != null) { stringBuilder.append(line); line = reader.readLine(); } return stringBuilder.toString(); } } private class UpdateNotificationRunnable implements Runnable { @Override public void run() { notificationView.setProgressBar(R.id.pb_notification, 100, progressBar, false); notificationView.setTextViewText(R.id.tv_2, "(" + Formatter.formatShortFileSize(context, done) + "/" + Formatter.formatShortFileSize(context, total) + ") " + progressBar + "%"); notificationManager.notify(NOTIFICATION_ID, builder.build()); mHandler.postDelayed(this, 1000 * 2); } } }<file_sep>package me.devsaki.hentoid.util; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.util.Log; /** * Created by avluis on 7/6/15. */ public final class NetworkStatus { private static NetworkInfo initialize(Context ctx) { Context context = ctx.getApplicationContext(); ConnectivityManager connMgr = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); return connMgr.getActiveNetworkInfo(); } public static boolean isOnline(Context context) { boolean connected; try { NetworkInfo netInfo = initialize(context); connected = netInfo != null && netInfo.isAvailable() && netInfo.isConnected(); return connected; } catch (Exception e) { System.out.println("CheckConnectivity Exception: " + e.getMessage()); Log.v("connectivity", e.toString()); } return false; } public static boolean isWifi(Context context) { boolean wifi; try { NetworkInfo netInfo = initialize(context); wifi = netInfo != null && netInfo.isConnected() && netInfo.getType() == ConnectivityManager.TYPE_WIFI; return wifi; } catch (Exception e) { System.out.println("CheckConnectivity Exception: " + e.getMessage()); Log.v("connectivity", e.toString()); } return false; } public boolean isMobile(Context context) { boolean mobile; try { NetworkInfo netInfo = initialize(context); mobile = netInfo != null && netInfo.isConnected() && netInfo.getType() == ConnectivityManager.TYPE_MOBILE; return mobile; } catch (Exception e) { System.out.println("CheckConnectivity Exception: " + e.getMessage()); Log.v("connectivity", e.toString()); } return false; } }<file_sep>package me.devsaki.hentoid.components; import android.app.ListFragment; import android.content.SharedPreferences; import me.devsaki.hentoid.database.HentoidDB; /** * Created by neko on 06/06/2015. */ public abstract class HentoidFragment extends ListFragment { protected SharedPreferences getSharedPreferences() { return ((HentoidActivity) getActivity()).getSharedPreferences(); } protected HentoidDB getDB() { return ((HentoidActivity) getActivity()).getDB(); } protected HentoidActivity getHentoidActivity() { return (HentoidActivity) getActivity(); } }<file_sep>package me.devsaki.hentoid.database.enums; import android.util.Log; import me.devsaki.hentoid.R; /** * Created by neko on 20/06/2015. */ public enum Site { FAKKU(0, "Fakku", "https://www.fakku.net", R.drawable.ic_fakku, "/Downloads"), PURURIN(1, "Pururin", "http://pururin.com", R.drawable.ic_pururin, "/Pururin"), HITOMI(2, "Hitomi", "https://hitomi.la", R.drawable.ic_hitomi, "/Hitomi"), NHENTAI(3, "nhentai", "http://nhentai.net", R.drawable.ic_nhentai, "/nhentai"); private static final String TAG = Site.class.getName(); private final int code; private final String description; private final String url; private final String folder; private final int ico; Site(int code, String description, String url, int ico, String folder) { this.code = code; this.description = description; this.url = url; this.ico = ico; this.folder = folder; } public static Site searchByCode(int code) { if (code == -1) Log.e(TAG, "Invalid site code"); for (Site s : Site.values()) { if (s.getCode() == code) return s; } return null; } public int getCode() { return code; } public String getDescription() { return description; } public String getUrl() { return url; } public int getIco() { return ico; } public String getFolder() { return folder; } }<file_sep>package me.devsaki.hentoid; import android.content.Intent; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v7.app.AppCompatActivity; import me.devsaki.hentoid.util.ConstantsPreferences; /** * Created by avluis on 1/9/16. */ public class SplashActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final String appLock = PreferenceManager .getDefaultSharedPreferences(this) .getString(ConstantsPreferences.PREF_APP_LOCK, ""); if (appLock.isEmpty()) { Intent intent = new Intent(this, DownloadsActivity.class); startActivity(intent); finish(); } else { Intent intent = new Intent(this, AppLockActivity.class); startActivity(intent); finish(); } } }<file_sep>package me.devsaki.hentoid.components; import android.app.FragmentManager; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; import android.view.View; import me.devsaki.hentoid.AboutActivity; import me.devsaki.hentoid.DownloadManagerActivity; import me.devsaki.hentoid.DownloadsActivity; import me.devsaki.hentoid.MainActivity; import me.devsaki.hentoid.PreferencesActivity; import me.devsaki.hentoid.R; import me.devsaki.hentoid.database.HentoidDB; import me.devsaki.hentoid.database.enums.Site; /** * Created by DevSaki on 04/06/2015. */ public abstract class HentoidActivity<T extends HentoidFragment> extends AppCompatActivity { private DrawerLayout mDrawerLayout; private ActionBarDrawerToggle mDrawerToggle; private HentoidDB db; private SharedPreferences sharedPreferences; private T fragment; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_hentoid); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mDrawerToggle = new ActionBarDrawerToggle( this, mDrawerLayout, R.string.drawer_open, R.string.drawer_close ); // Set the drawer toggle as the DrawerListener mDrawerLayout.setDrawerListener(mDrawerToggle); assert getSupportActionBar() != null; getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); db = new HentoidDB(this); fragment = buildFragment(); FragmentManager fragmentManager = getFragmentManager(); fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit(); mDrawerLayout.closeDrawer(GravityCompat.START); } protected abstract T buildFragment(); public T getFragment() { return fragment; } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); // Sync the toggle state after onRestoreInstanceState has occurred. mDrawerToggle.syncState(); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); mDrawerToggle.onConfigurationChanged(newConfig); } @Override public boolean onOptionsItemSelected(MenuItem item) { // Pass the event to ActionBarDrawerToggle, if it returns // true, then it has handled the app icon touch event if (mDrawerToggle.onOptionsItemSelected(item)) { return true; } // Handle your other action bar items... return super.onOptionsItemSelected(item); } @Override public void onBackPressed() { if (mDrawerLayout.isDrawerOpen(GravityCompat.START)) { mDrawerLayout.closeDrawer(GravityCompat.START); } else { super.onBackPressed(); } } public void ndOpenWebView(View view) { mDrawerLayout.closeDrawer(GravityCompat.START); Intent intent = new Intent(this, MainActivity.class); if (view.getId() == R.id.ndHitomiWbButton) { intent.putExtra(MainActivity.INTENT_SITE, Site.HITOMI.getCode()); } else if (view.getId() == R.id.ndNhentaiWbButton) { intent.putExtra(MainActivity.INTENT_SITE, Site.NHENTAI.getCode()); } intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } @SuppressWarnings({"UnusedParameters", "unused"}) public void ndPreferences(View view) { mDrawerLayout.closeDrawer(GravityCompat.START); Intent intent = new Intent(this, PreferencesActivity.class); startActivity(intent); } @SuppressWarnings({"UnusedParameters", "unused"}) public void ndDownloads(View view) { mDrawerLayout.closeDrawer(GravityCompat.START); Intent intent = new Intent(this, DownloadsActivity.class); startActivity(intent); } @SuppressWarnings({"UnusedParameters", "unused"}) public void ndDownloadManager(View view) { mDrawerLayout.closeDrawer(GravityCompat.START); Intent intent = new Intent(this, DownloadManagerActivity.class); startActivity(intent); } @SuppressWarnings({"UnusedParameters", "unused"}) public void ndAbout(View view) { mDrawerLayout.closeDrawer(GravityCompat.START); Intent intent = new Intent(this, AboutActivity.class); startActivity(intent); } public HentoidDB getDB() { return db; } public SharedPreferences getSharedPreferences() { return sharedPreferences; } }<file_sep>package me.devsaki.hentoid; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.NavUtils; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatDelegate; import android.support.v7.widget.AppCompatCheckBox; import android.support.v7.widget.AppCompatCheckedTextView; import android.support.v7.widget.AppCompatEditText; import android.support.v7.widget.AppCompatRadioButton; import android.support.v7.widget.AppCompatSpinner; import android.support.v7.widget.Toolbar; import android.text.Html; import android.text.Spanned; import android.util.AttributeSet; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; /** * Created by avluis on 8/22/15. */ public class AboutActivity extends AppCompatActivity { private AppCompatDelegate mDelegate; private String verName = "Hentoid ver: "; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); setContentView(R.layout.activity_about); setTitle(R.string.title_activity_about); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { getDelegate().getSupportActionBar().setDisplayHomeAsUpEnabled(true); } final Intent intent = new Intent(Intent.ACTION_VIEW); Spanned spGitHub = Html.fromHtml(getString(R.string.about_github)); TextView tvGitHub = (TextView) findViewById(R.id.tv_github); final String urlGitHub = getString(R.string.about_github_url); tvGitHub.setText(spGitHub); tvGitHub.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { intent.setData(Uri.parse(urlGitHub)); startActivity(intent); } }); Spanned spCommunity = Html.fromHtml(getString(R.string.about_community)); TextView tvCommunity = (TextView) findViewById(R.id.tv_community); final String urlCommunity = getString(R.string.about_community_url); tvCommunity.setText(spCommunity); tvCommunity.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { intent.setData(Uri.parse(urlCommunity)); startActivity(intent); } }); Spanned spBlog = Html.fromHtml(getString(R.string.about_blog)); TextView tvBlog = (TextView) findViewById(R.id.tv_blog); final String urlBlog = getString(R.string.about_blog_url); tvBlog.setText(spBlog); tvBlog.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { intent.setData(Uri.parse(urlBlog)); startActivity(intent); } }); Spanned spAbout = Html.fromHtml(getString(R.string.about)); TextView tvAbout = (TextView) findViewById(R.id.tv_about); tvAbout.setText(spAbout); getVersionInfo(); TextView tvVersionName = (TextView) findViewById(R.id.tv_version_name); tvVersionName.setText(verName); Spanned spAboutNotes = Html.fromHtml(getString(R.string.about_notes)); TextView tvAboutNotes = (TextView) findViewById(R.id.tv_about_notes); tvAboutNotes.setText(spAboutNotes); } private void getVersionInfo() { PackageInfo packageInfo; try { packageInfo = getApplicationContext() .getPackageManager() .getPackageInfo( getApplicationContext().getPackageName(), 0); verName += packageInfo.versionName; } catch (PackageManager.NameNotFoundException e) { verName += "Unknown"; } } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // Respond to the action bar's Up/Home button case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; } return super.onOptionsItemSelected(item); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); getDelegate().onPostCreate(savedInstanceState); } public ActionBar getSupportActionBar() { return getDelegate().getSupportActionBar(); } public void setSupportActionBar(@Nullable Toolbar toolbar) { getDelegate().setSupportActionBar(toolbar); } @NonNull @Override public MenuInflater getMenuInflater() { return getDelegate().getMenuInflater(); } @Override public void setContentView(@LayoutRes int layoutResID) { getDelegate().setContentView(layoutResID); } @Override public void setContentView(View view) { getDelegate().setContentView(view); } @Override public void setContentView(View view, ViewGroup.LayoutParams params) { getDelegate().setContentView(view, params); } @Override public void addContentView(View view, ViewGroup.LayoutParams params) { getDelegate().addContentView(view, params); } @Override protected void onPostResume() { super.onPostResume(); getDelegate().onPostResume(); } @Override protected void onTitleChanged(CharSequence title, int color) { super.onTitleChanged(title, color); getDelegate().setTitle(title); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); getDelegate().onConfigurationChanged(newConfig); } @Override protected void onStop() { super.onStop(); getDelegate().onStop(); } @Override protected void onDestroy() { super.onDestroy(); getDelegate().onDestroy(); } public void invalidateOptionsMenu() { getDelegate().invalidateOptionsMenu(); } public AppCompatDelegate getDelegate() { if (mDelegate == null) { mDelegate = AppCompatDelegate.create(this, null); } return mDelegate; } @Override public View onCreateView(String name, @NonNull Context context, @NonNull AttributeSet attrs) { // Allow super to try and create a view first final View result = super.onCreateView(name, context, attrs); if (result != null) { return result; } if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { // If we're running pre-L, we need to 'inject' our tint aware Views in place of the // standard framework versions switch (name) { case "EditText": return new AppCompatEditText(this, attrs); case "Spinner": return new AppCompatSpinner(this, attrs); case "CheckBox": return new AppCompatCheckBox(this, attrs); case "RadioButton": return new AppCompatRadioButton(this, attrs); case "CheckedTextView": return new AppCompatCheckedTextView(this, attrs); } } return null; } }<file_sep>package me.devsaki.hentoid; import android.app.Application; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.os.AsyncTask; import android.preference.PreferenceManager; import android.util.LruCache; import android.widget.ImageView; import java.io.File; import me.devsaki.hentoid.database.HentoidDB; import me.devsaki.hentoid.database.enums.StatusContent; import me.devsaki.hentoid.updater.UpdateCheck; import me.devsaki.hentoid.updater.UpdateCheck.UpdateCheckCallback; import me.devsaki.hentoid.util.AndroidHelper; import me.devsaki.hentoid.util.ConstantsPreferences; import me.devsaki.hentoid.util.Helper; import me.devsaki.hentoid.util.ImageQuality; /** * Created by DevSaki on 20/05/2015. */ public class HentoidApplication extends Application { private static final String TAG = HentoidApplication.class.getName(); private LruCache<String, Bitmap> mMemoryCache; private SharedPreferences sharedPreferences; @Override public void onCreate() { super.onCreate(); AndroidHelper.ignoreSslErrors(); HentoidDB db = new HentoidDB(this); db.updateContentStatus(StatusContent.PAUSED, StatusContent.DOWNLOADING); // Get max available VM memory, exceeding this amount will throw an // OutOfMemory exception. Stored in kilobytes as LruCache takes an // int in its constructor. final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); // Use 1/8th of the available memory for this memory cache. final int cacheSize = maxMemory / 8; mMemoryCache = new LruCache<String, Bitmap>(cacheSize) { @Override protected int sizeOf(String key, Bitmap bitmap) { // The cache size will be measured in kilobytes rather than // number of items. return bitmap.getByteCount() / 1024; } }; sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); if (sharedPreferences.getString( ConstantsPreferences.PREF_CHECK_UPDATES_LISTS, ConstantsPreferences.PREF_CHECK_UPDATES_DEFAULT + "").equals( ConstantsPreferences.PREF_CHECK_UPDATES_ENABLE + "")) { UpdateCheck(false); } else { UpdateCheck(true); } } private void UpdateCheck(boolean onlyWifi) { UpdateCheck.getInstance().checkForUpdate(getApplicationContext(), onlyWifi, false, new UpdateCheckCallback() { @Override public void noUpdateAvailable() { System.out.println("Auto update check: No update available."); } @Override public void onUpdateAvailable() { System.out.println("Auto update check: Update available!"); } }); } private void addBitmapToMemoryCache(String key, Bitmap bitmap) { if (key != null && bitmap != null) { if (getBitmapFromMemCache(key) == null) { mMemoryCache.put(key, bitmap); } } } private Bitmap getBitmapFromMemCache(String key) { return mMemoryCache.get(key); } public void loadBitmap(File file, ImageView mImageView) { final String imageKey = file.getAbsolutePath(); final Bitmap bitmap = getBitmapFromMemCache(imageKey); if (bitmap != null) { mImageView.setImageBitmap(bitmap); } else { mImageView.setImageResource(R.drawable.ic_hentoid); BitmapWorkerTask task = new BitmapWorkerTask(mImageView); task.execute(file); } } class BitmapWorkerTask extends AsyncTask<File, Void, Bitmap> { private final ImageView imageView; public BitmapWorkerTask(ImageView imageView) { this.imageView = imageView; } // Decode image in background. @Override protected Bitmap doInBackground(File... params) { if (params[0].exists()) { String imageQualityPref = sharedPreferences.getString( ConstantsPreferences.PREF_QUALITY_IMAGE_LISTS, ConstantsPreferences.PREF_QUALITY_IMAGE_DEFAULT); ImageQuality imageQuality = ImageQuality.LOW; switch (imageQualityPref) { case "Medium": imageQuality = ImageQuality.MEDIUM; break; case "High": imageQuality = ImageQuality.HIGH; break; case "Low": imageQuality = ImageQuality.LOW; break; } Bitmap thumbBitmap = Helper.decodeSampledBitmapFromFile( params[0].getAbsolutePath(), imageQuality.getWidth(), imageQuality.getHeight()); addBitmapToMemoryCache(params[0].getAbsolutePath(), thumbBitmap); return thumbBitmap; } else return null; } @Override protected void onPostExecute(Bitmap bitmap) { if (bitmap != null) { imageView.setImageBitmap(bitmap); } else { imageView.setImageResource(R.drawable.ic_hentoid); } } } }<file_sep>package me.devsaki.hentoid.util; import android.text.TextUtils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.CookieHandler; import java.net.CookieManager; import java.net.HttpURLConnection; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import me.devsaki.hentoid.exceptions.HttpClientException; /** * Created by DevSaki on 14/05/2015. */ public class HttpClientHelper { public static String call(String address) throws HttpClientException, IOException, URISyntaxException { URL url = new URL(address); URI uri = new URI(address); CookieManager cookieManager = (CookieManager) CookieHandler.getDefault(); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod("GET"); urlConnection.setConnectTimeout(10000); urlConnection.setRequestProperty("User-Agent", Constants.USER_AGENT); if (cookieManager != null && cookieManager.getCookieStore().getCookies().size() > 0) { urlConnection.setRequestProperty("Cookie", TextUtils.join("; ", cookieManager.getCookieStore().get(uri))); } urlConnection.connect(); int code = urlConnection.getResponseCode(); // Read the input stream into a String InputStream inputStream = urlConnection.getInputStream(); StringBuilder builder = new StringBuilder(); if (inputStream == null) { // Nothing to do. return null; } BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); String line; while ((line = reader.readLine()) != null) { builder.append(line); } if (builder.length() == 0) { // Stream was empty. No point in parsing. return null; } String result = builder.toString(); if (code != 200) { throw new HttpClientException(result, code); } return result; } }
152b9d7047330dd5e5fbb75ca0865eb75e4c5b6c
[ "Markdown", "Java" ]
11
Markdown
iamzim102/Hentoid
72591a4177e6fc00dd2e52e668467b35ced633c7
0c54bdff3642f7db9e5584ba89768ecc2f7f6c0a
refs/heads/master
<file_sep>--- jupyter: jupytext: formats: ipynb,Rmd text_representation: extension: .Rmd format_name: rmarkdown format_version: '1.2' jupytext_version: 1.4.2 kernelspec: display_name: R language: R name: ir --- ```{r} library(xts) library(fields) library(plotly) ``` ```{r} # Read in data of sentiment of placebo words sentSeries = read.csv('placebo_sentiments2019-08-25.csv') # convert to .xts format sentSeries.xts = xts(sentSeries[,-1], order.by=as.Date(sentSeries$Date, '%m/%d/%Y')) # read in data of sentiment of 'Trump' tweets trumpSent = read.csv('trumpSent2019-08-25.csv') trumpSent.xts = xts(trumpSent$allMean, order.by=as.Date(trumpSent$date)) # read in presidential approval data from fivethirtyeight # downloaded from https://projects.fivethirtyeight.com/trump-approval-ratings/ trend = read.csv('approval_topline2019-08-30.csv') # convert trend for Adult approval and disapproval to .xts format trend.xts = xts(trend[trend$subgroup=='Adults',which(names(trend) %in% c('approve_estimate', 'disapprove_estimate'))], order.by=as.Date(trend$modeldate[trend$subgroup=='Adults'], format='%m/%d/%Y')) trend.xts = trend.xts[index(trend.xts)<=as.Date('2019-08-25'),] ``` ```{r} # smoothing and lag functions kSmooth = function(data.xts, k){ # k-day smoothing for data in xts form # takes the average of the current and previous k-1 days, even if some of those days are missing data beginDate = index(data.xts)[1] # first date in xts data xtsDates = index(data.xts)[index(data.xts)-beginDate >= (k-1)] # dates to interate over newData = matrix(NA, nrow=length(xtsDates), ncol=ncol(data.xts)) # create new data frame of smoothed data colnames(newData) = names(data.xts) # same column names as original data for(date in xtsDates){ date = as.Date(date) subset = data.xts[date-index(data.xts)>=0 & date-index(data.xts)<=(k-1),] # data of current and previous k-1 days newData[which(xtsDates==date),] = colMeans(subset, na.rm=TRUE) # means of each variable, ignoring NA's } dataNew.xts = xts(newData, order.by=as.Date(xtsDates)) return(dataNew.xts) } ccfLag = function(ts1, ts2, max.lag){ # time series 1, time series 2, maximum lag # shift time series 1 by -lag to lag days lagDF = data.frame() for(lag in -max.lag:max.lag){ new = ts1 index(new) = index(new)+lag merged = merge(new, ts2) corr = cor(merged[,1], merged[,2], use='pairwise.complete') tempDF = data.frame('lag'=lag, 'corr'=corr) lagDF = rbind(lagDF, tempDF) } names(lagDF) = c('lag', 'correlation') return(lagDF) } ``` ```{r} ## unsmoothed sentiment with error bars: first 100 days plot(as.Date(trumpSent$date)[1:100], trumpSent$allMean[1:100], pch='.', xlab='Date', ylab='Mean Sentiment', main='Unsmoothed Sentiment of "Trump" Tweets Over Time: First 100 Days') for(i in 1:100){ segments(x0=as.Date(trumpSent$date[i]), y0=trumpSent$allMean[i]-2*trumpSent$sd[i]/sqrt(1000), x1=as.Date(trumpSent$date[i]), y1=trumpSent$allMean[i]+2*trumpSent$sd[i]/sqrt(1000)) } ``` ```{r} # set window of smoothing and lag parameters ks = 1:45 # number of days to smooth over lag = 30 # maximum lag ``` ```{r} # correlations between sentiment of placebo words and presidential approval klCorrs = array(0, dim=c(length(ks), 2*lag+1, ncol(sentSeries)-1)) vars = names(sentSeries)[names(sentSeries) %in% c('Date')==FALSE] for(j in 1:dim(klCorrs)[3]){ # iterate through each reference word # time series of sentiment of word series = sentSeries.xts[,which(names(sentSeries.xts)==vars[j])] for(k in ks){ # iterate through each smoothing level # smooth sentiment of Twitter sentiment smoothed = kSmooth(series, k) cc = ccfLag(smoothed, trend.xts$approve_estimate, lag) klCorrs[which(ks==k),,j] = cc$correlation } #print(paste(j, 'of', dim(klCorrs)[3])) } ``` ```{r} # find maximum correlation for each placebo word and location of optimal smoothing, lag parameter placeboCorrs = data.frame() for(i in 1:length(vars)){ var = vars[i] varCorrs = klCorrs[,,i] if(sum(is.na(varCorrs))!=length(ks)*(2*lag+1)){ kl = which(abs(varCorrs)==max(abs(varCorrs), na.rm=TRUE), arr.ind=TRUE) maxCorr = varCorrs[kl] temp = data.frame('word'=var, 'k'=ks[kl[,1]], 'l'=c(-lag:lag)[kl[,2]], 'maxCorr' = maxCorr) placeboCorrs = rbind(placeboCorrs, temp) } } placeboCorrs = placeboCorrs[abs(placeboCorrs$maxCorr)<1,] ``` ```{r} # smoothing and lag values where maximum absolute correlation occurs plot(placeboCorrs$k, placeboCorrs$l, xlab='smoothing value', ylab='lag value', pch=19) ``` ```{r} # correlation between Trump tweets and presidential approval klTrump = matrix(0, nrow=length(ks), ncol=2*lag+1) for(k in ks){ smoothed = kSmooth(trumpSent.xts[,1], k) linked = merge(smoothed, trend.xts$approve_estimate) cc = ccfLag(smoothed, trend.xts$approve_estimate, lag) klTrump[which(ks==k),] = cc$correlation } ``` ```{r} # maximum correlation and where it occurs kl = which(abs(klTrump)==max(abs(klTrump), na.rm=TRUE), arr.ind=TRUE) trumpCorr = klTrump[kl] print('Correlation between sentiment of Trump tweets and presidential approval is:') print(trumpCorr) print('Which occurs at a lag of ') c(-lag:lag)[kl[1,2]] print('and a smoothing of ') ks[kl[1,1]] ``` ```{r} # how correlation between sentiment of Trump tweets and presidential approval changes with smoothing, lag parameters f_label = list(size=24); f_tick = list(size=18) plot_ly(x=ks, y=c(-lag:lag), z=t(klTrump), type='contour', reversescale=T) %>% layout(title='Trump', font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) ``` ```{r} # in comparison to placebo words hist(placeboCorrs$maxCorr, freq=TRUE, main='', breaks=seq(-1, 1, by=.1), ylab='', xlab='', cex.axis=1.5) abline(v=trumpCorr, col='red', lwd=6) mtext("Maximum Absolute Correlation", side=1, cex=2, line=2.75) mtext("Frequency", side=2, cex=2, line=2.75) ``` ```{r} # robustness to change in end date endDates = as.Date('2017-05-20'):as.Date('2019-08-25') robust.df = data.frame() # endDate, k, l, maxCorr for(end in endDates){ trumpTemp.xts = trumpSent.xts[index(trumpSent.xts)<=as.Date(end), ] # optimal k, l klTrumpTemp = matrix(nrow=length(ks), ncol=2*lag+1) approvalTemp = trend.xts$approve_estimate[index(trend.xts)<=as.Date(end)] for(k in ks){ smoothed = kSmooth(trumpTemp.xts[,1], k) cc = ccfLag(smoothed, approvalTemp, lag) klTrumpTemp[which(ks==k),] = cc$correlation } klTemp = which(abs(klTrumpTemp)==max(abs(klTrumpTemp), na.rm=TRUE), arr.ind=TRUE) corrTemp = klTrumpTemp[klTemp] dfTemp = data.frame('endDate'=as.Date(end), 'k'=ks[klTemp[1,1]], 'l'=c(-lag:lag)[klTemp[1,2]], 'maxCorr' = corrTemp) robust.df = rbind(robust.df, dfTemp) #print(as.Date(end)) } ``` ```{r} optK = robust.df$k[length(robust.df$k)] optL = robust.df$l[length(robust.df$l)] corrs = c() for(end in endDates){ trumpTemp.xts = trumpSent.xts[index(trumpSent.xts)<=as.Date(end), ] approvalTemp = trend.xts$approve_estimate[index(trend.xts)<=as.Date(end)] smoothed = kSmooth(trumpTemp.xts[,1], optK) index(smoothed) = index(smoothed) + optL merged = merge(smoothed, approvalTemp) corrs = c(corrs, cor(merged[,1], merged[,2], use='pairwise.complete')) } robust.df$corrs = corrs ``` ```{r} par(mfrow=c(2,1)) plot(robust.df$endDate, robust.df$k, ylab='Optimal Smoothing', xlab='', pch=19) plot(robust.df$endDate, robust.df$l, ylab='Optimal Lag', xlab='Data End Date', pch=19) par(mfrow=c(1,1)) plot(robust.df$endDate, robust.df$maxCorr, ylab='Correlation', xlab='Data End Date', pch=20) lines(robust.df$endDate, robust.df$corrs, lty=2) legend('bottomright', c('Maximum Absolute Correlation', 'With 30 day lag, 45 day smoothing'), lty=c(1,2), lwd=c(3, 1)) ``` ```{r} # 'p-value' pval = sum(abs(placeboCorrs$maxCorr)>=trumpCorr)/nrow(placeboCorrs) print(pval) ``` ```{r} # how 'p-value' changes over time allOverTime = list() monthlyEndDates = seq(as.Date('2017-06-01'), as.Date('2019-08-01'), "month") pval_changes = data.frame() placeboCorrs_list = vector(mode='list', length=length(monthlyEndDates)) for(date in monthlyEndDates){ temp = array(0, dim=c(length(ks), 2*lag+1, ncol(sentSeries)-1)) for(j in 1:dim(klCorrs)[3]){ # iterate through each reference word # time series of sentiment of word series = sentSeries.xts[index(sentSeries.xts)<=date,which(names(sentSeries.xts)==vars[j])] for(k in ks){ # iterate through each smoothing level # smooth sentiment of Twitter sentiment smoothed = kSmooth(series, k) cc = ccfLag(smoothed, trend.xts$approve_estimate[index(trend.xts)<=date], lag) temp[which(ks==k),,j] = cc$correlation } allOverTime[[which(monthlyEndDates==date)]] = temp #print(paste(j, 'of', dim(klCorrs)[3])) } # calculate optimal correlation and location of optimal parameters for each word for(i in 1:length(vars)){ var = vars[i] varCorrs = temp[,,i] if(sum(is.na(varCorrs))!=length(ks)*(2*lag+1)){ kl = which(abs(varCorrs)==max(abs(varCorrs), na.rm=TRUE), arr.ind=TRUE) maxCorr = varCorrs[kl] placeboTemp = data.frame('word'=var, 'k'=ks[kl[,1]],'l'=c(-lag:lag)[kl[,2]], 'maxCorr'=maxCorr) placeboCorrs_list[[which(monthlyEndDates==date)]] = rbind(placeboCorrs_list[[which(monthlyEndDates==date)]], placeboTemp) } } placeboCorrs_list[[which(monthlyEndDates==date)]] = na.omit(placeboCorrs_list[[which(monthlyEndDates==date)]]) # calculate 'p-value' at end date trumpCorrEnd = robust.df$maxCorr[robust.df$endDate==date] pvalEnd = sum(abs(placeboCorrs_list[[which(monthlyEndDates==date)]]$maxCorr)>=abs(trumpCorrEnd))/nrow(placeboCorrs_list[[which(monthlyEndDates==date)]]) pval_changes = rbind(pval_changes, data.frame('endDate'=date, 'trumpCorr'=trumpCorrEnd, 'pval'=pvalEnd)) #print(as.Date(date)) } pval_changes = rbind(pval_changes, data.frame('endDate'=as.Date('2019-08-25'), 'trumpCorr'= trumpCorr,'pval'=pval)) plot(as.Date(pval_changes$endDate), pval_changes$pval, xlab='End Date', ylab='Proportion', pch=19, ylim=c(0, 1)) ``` ```{r} # smaller window for smoothing and lag for comparison newMaxK = 45 newMaxLag = 7 placeboCorrs_list_instKL = vector(mode='list', length=length(placeboCorrs_list)) pval_changes_instKL = data.frame() for(j in 1:length(placeboCorrs_list_instKL)){ temp = allOverTime[[j]] temp = temp[1:newMaxK, (30-newMaxLag):(30+newMaxLag), ] # calculate optimal correlation in updated smoothing, lag window for each word for(i in 1:length(vars)){ var = vars[i] varCorrs = temp[,,i] if(sum(is.na(varCorrs))!=newMaxK*(2*newMaxLag+1)){ kl = which(abs(varCorrs)==max(abs(varCorrs), na.rm=TRUE), arr.ind=TRUE) maxCorr = varCorrs[kl] placeboTemp = data.frame('word'=var, 'k'=c(1:newMaxK)[kl[,1]], 'l'=c(-newMaxLag:newMaxLag)[kl[,2]], 'maxCorr'=maxCorr) placeboCorrs_list_instKL[[j]] = rbind(placeboCorrs_list_instKL[[j]], placeboTemp) } } placeboCorrs_list_instKL[[j]] = na.omit(placeboCorrs_list_instKL[[j]]) # calcualte "Trump" correlation using new window trumpTemp.xts = trumpSent.xts[index(trumpSent.xts)<=as.Date(monthlyEndDates[j]), ] # optimal k, l klTrumpTemp = matrix(nrow=newMaxK, ncol=2*newMaxLag+1) approvalTemp = trend.xts$approve_estimate[index(trend.xts)<=as.Date(monthlyEndDates[j])] for(k in 1:newMaxK){ smoothed = kSmooth(trumpTemp.xts[,1], k) cc = ccfLag(smoothed, approvalTemp, newMaxLag) klTrumpTemp[k,] = cc$correlation } klTemp = which(abs(klTrumpTemp)==max(abs(klTrumpTemp), na.rm=TRUE), arr.ind=TRUE) corrTemp = klTrumpTemp[klTemp] # calculate 'p-value' pval_end_new = sum(abs(placeboCorrs_list_instKL[[j]]$maxCorr)>=abs(corrTemp))/nrow(placeboCorrs_list_instKL[[j]]) pval_changes_instKL = rbind(pval_changes_instKL, data.frame('endDate'=monthlyEndDates[j], 'trumpCorr'=corrTemp, 'pval'=pval_end_new)) #print(j) } ``` ```{r} plot(pval_changes_instKL$endDate, pval_changes_instKL$pval, ylim=c(0,1), pch=19, main="p-value over time with max lag of 7 days") plot(as.Date(pval_changes$endDate), pval_changes$trumpCorr, col='red', pch=19, main='"Trump" correlations') points(pval_changes_instKL$endDate, pval_changes_instKL$trumpCorr, col='blue', pch=19) legend('bottomright', legend=c("Max. Lag=30", "Max. Lag=7"), col=c('red', 'blue'), pch=c(19,19)) plot(as.Date(pval_changes$endDate), pval_changes$pval, col='gray50', pch=19, ylim=c(0,1), xlab="End Date", ylab='Proportion') points(pval_changes_instKL$endDate, pval_changes_instKL$pval, col='black', pch=0) legend('topright', legend=c("Max. Lag=30", "Max. Lag=7"), col=c('gray50', 'black'), pch=c(19,0)) ``` <file_sep>## calculate daily mean and standard deviation of "Trump" tweets import os import csv import nltk from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer import numpy as np sid = SentimentIntensityAnalyzer() # change directory to folder containing csv files of "Trump" tweets # each csv contains a week of "Trump" tweets with columns: os.chdir(' ') allFiles = os.listdir() date = list() # date of "Trump" tweets means = list() # daily mean sentiments sds = list() # daily standard deviation of sentiments for file in allFiles: # read in csv file fileRead = csv.reader(open(file, encoding="ISO-8859-1")) tweets = list() fileDates = list() for row in fileRead: tweets.append(row[1]) fileDates.append(row[5][0:10]) tweets = tweets[1:] fileDates = fileDates[1:] # calculate daily sentiment for each day in csv file for day in list(set(fileDates)): date.append(day) allSents = [sid.polarity_scores(tweets[i])['compound'] for i in range(len(tweets)) if fileDates[i]==day] means.append(np.mean(allSents)) sds.append(np.std(allSents)) # write to csv file os.chdir(' ') with open('trumpSent2019-08-25.csv', 'w', encoding="ISO-8859-1") as output: writer = csv.writer(output, lineterminator='\n') writer.writerow(['date', 'allMean', 'sd']) for i in range(len(date)): writer.writerow([date[i], means[i], sds[i]]) <file_sep># Tracking_Presidential_Approval_with_Twitter Data and scripts for 'A Critical Evaluation of Tracking Surveys with Social Media: A Case Study in Presidential Approval' by <NAME>, Gagnon-Bartsch Data sets: - approval_topline2019-08-30.csv: Daily survey data as downloaded from https://projects.fivethirtyeight.com/trump-approval-ratings/?ex_cid=rrpromo on August 30, 2019. - placebo_sentiments2019-08-25.csv: Daily mean sentiment of tweets containing each of the placebo words from January 16, 2017 through August 25, 2019. - trumpSent2019-08-25.csv: Daily mean sentiment of the 1000 randomly sampled tweets per day used in the tracking analysis from January 17, 2017 through August 23, 2019. - Tweets from our set of users in the longitudinal study are under 'Releases'. To protect the privacy of these users, we do not include any identifying information about the users or their tweets. Scripts: - Cross-Sectional Analysis.R: R script for cross-sectional analysis. Using 'approval_topline2019-08-30.csv', 'placebo_sentiments2019-08-25.csv', and 'trumpSent2019-08-25.csv' data files, calculates optimal correlation between tweets and survey data, finds reference distribution, and how these change over time as more data is gathered. - Longitudinal Analysis.R: R script for longitudinal analysis. Creates plots for frequency and sentiment of tweets of users in the longitudinal study from 2016 through mid-2017. We also provide code for how we compute the sentiment scores from csv files of raw tweets in the 'Creating_data_files' folder. To protect the privacy of users, we do not provide the tweets themselves. A docker image of the above analyses can be found at: https://hub.docker.com/r/johanngb/twitter-presidential <file_sep>library(xts) library(fields) library(plotly) # Read in data of sentiment of placebo words sentSeries = read.csv('placebo_sentiments2019-08-25.csv') # convert to .xts format sentSeries.xts = xts(sentSeries[,-1], order.by=as.Date(sentSeries$Date, '%m/%d/%Y')) # read in data of sentiment of 'Trump' tweets trumpSent = read.csv('trumpSent2019-08-25.csv') trumpSent.xts = xts(trumpSent$allMean, order.by=as.Date(trumpSent$date)) # read in presidential approval data from fivethirtyeight # downloaded from https://projects.fivethirtyeight.com/trump-approval-ratings/ trend = read.csv('approval_topline2019-08-30.csv') # convert trend for Adult approval and disapproval to .xts format trend.xts = xts(trend[trend$subgroup=='Adults',which(names(trend) %in% c('approve_estimate', 'disapprove_estimate'))], order.by=as.Date(trend$modeldate[trend$subgroup=='Adults'], format='%m/%d/%Y')) trend.xts = trend.xts[index(trend.xts)<=as.Date('2019-08-25'),] # smoothing and lag functions kSmooth = function(data.xts, k){ # k-day smoothing for data in xts form # takes the average of the current and previous k-1 days, even if some of those days are missing data beginDate = index(data.xts)[1] # first date in xts data xtsDates = index(data.xts)[index(data.xts)-beginDate >= (k-1)] # dates to interate over newData = matrix(NA, nrow=length(xtsDates), ncol=ncol(data.xts)) # create new data frame of smoothed data colnames(newData) = names(data.xts) # same column names as original data for(date in xtsDates){ date = as.Date(date) subset = data.xts[date-index(data.xts)>=0 & date-index(data.xts)<=(k-1),] # data of current and previous k-1 days newData[which(xtsDates==date),] = colMeans(subset, na.rm=TRUE) # means of each variable, ignoring NA's } dataNew.xts = xts(newData, order.by=as.Date(xtsDates)) return(dataNew.xts) } ccfLag = function(ts1, ts2, max.lag){ # time series 1, time series 2, maximum lag # shift time series 1 by -lag to lag days lagDF = data.frame() for(lag in -max.lag:max.lag){ new = ts1 index(new) = index(new)+lag merged = merge(new, ts2) corr = cor(merged[,1], merged[,2], use='pairwise.complete') tempDF = data.frame('lag'=lag, 'corr'=corr) lagDF = rbind(lagDF, tempDF) } names(lagDF) = c('lag', 'correlation') return(lagDF) } ## unsmoothed sentiment with error bars: first 100 days plot(as.Date(trumpSent$date)[1:100], trumpSent$allMean[1:100], pch='.', xlab='Date', ylab='Mean Sentiment', main='Unsmoothed Sentiment of "Trump" Tweets Over Time: First 100 Days') for(i in 1:100){ segments(x0=as.Date(trumpSent$date[i]), y0=trumpSent$allMean[i]-2*trumpSent$sd[i]/sqrt(1000), x1=as.Date(trumpSent$date[i]), y1=trumpSent$allMean[i]+2*trumpSent$sd[i]/sqrt(1000)) } # set window of smoothing and lag parameters ks = 1:45 # number of days to smooth over lag = 30 # maximum lag # correlations between sentiment of placebo words and presidential approval klCorrs = array(0, dim=c(length(ks), 2*lag+1, ncol(sentSeries)-1)) vars = names(sentSeries)[names(sentSeries) %in% c('Date')==FALSE] for(j in 1:dim(klCorrs)[3]){ # iterate through each reference word # time series of sentiment of word series = sentSeries.xts[,which(names(sentSeries.xts)==vars[j])] for(k in ks){ # iterate through each smoothing level # smooth sentiment of Twitter sentiment smoothed = kSmooth(series, k) cc = ccfLag(smoothed, trend.xts$approve_estimate, lag) klCorrs[which(ks==k),,j] = cc$correlation } #print(paste(j, 'of', dim(klCorrs)[3])) } # find maximum correlation for each placebo word and location of optimal smoothing, lag parameter placeboCorrs = data.frame() for(i in 1:length(vars)){ var = vars[i] varCorrs = klCorrs[,,i] if(sum(is.na(varCorrs))!=length(ks)*(2*lag+1)){ kl = which(abs(varCorrs)==max(abs(varCorrs), na.rm=TRUE), arr.ind=TRUE) maxCorr = varCorrs[kl] temp = data.frame('word'=var, 'k'=ks[kl[,1]], 'l'=c(-lag:lag)[kl[,2]], 'maxCorr' = maxCorr) placeboCorrs = rbind(placeboCorrs, temp) } } placeboCorrs = placeboCorrs[abs(placeboCorrs$maxCorr)<1,] # histogram of maximum absolute correlations hist(placeboCorrs$maxCorr, xlab='Maximum Absolute Correlation', main='') # smoothing and lag values where maximum absolute correlation occurs plot(placeboCorrs$k, placeboCorrs$l, xlab='smoothing value', ylab='lag value', pch=19) # look at heatmap of correlations based on smoothing, lag parameters set.seed(1234) is = sample(1:length(vars), 6) f_label = list(size=24); f_tick = list(size=18) plot_ly(x=ks, y=c(-lag:lag), z=t(klCorrs[,,is[1]]), type='contour', reversescale=T) %>% layout(title=vars[is[1]], font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) plot_ly(x=ks, y=c(-lag:lag), z=t(klCorrs[,,is[2]]), type='contour', reversescale=T) %>% layout(title=vars[is[2]], font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) plot_ly(x=ks, y=c(-lag:lag), z=t(klCorrs[,,is[3]]), type='contour', reversescale=T) %>% layout(title=vars[is[3]], font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) plot_ly(x=ks, y=c(-lag:lag), z=t(klCorrs[,,is[4]]), type='contour', reversescale=T) %>% layout(title=vars[is[4]], font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) plot_ly(x=ks, y=c(-lag:lag), z=t(klCorrs[,,is[5]]), type='contour', reversescale=T) %>% layout(title=vars[is[5]], font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) plot_ly(x=ks, y=c(-lag:lag), z=t(klCorrs[,,is[6]]), type='contour', reversescale=T) %>% layout(title=vars[is[6]], font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) # correlation between Trump tweets and presidential approval klTrump = matrix(0, nrow=length(ks), ncol=2*lag+1) for(k in ks){ smoothed = kSmooth(trumpSent.xts[,1], k) linked = merge(smoothed, trend.xts$approve_estimate) cc = ccfLag(smoothed, trend.xts$approve_estimate, lag) klTrump[which(ks==k),] = cc$correlation } # maximum correlation and where it occurs kl = which(abs(klTrump)==max(abs(klTrump), na.rm=TRUE), arr.ind=TRUE) trumpCorr = klTrump[kl] print(trumpCorr) c(-lag:lag)[kl[1,2]] ks[kl[1,1]] # how correlation between sentiment of Trump tweets and presidential approval changes with smoothing, lag parameters f_label = list(size=24); f_tick = list(size=18) plot_ly(x=ks, y=c(-lag:lag), z=t(klTrump), type='contour', reversescale=T) %>% layout(title='Trump', font=f_label, xaxis=list(title='Smoothing', titlefont=f_label, tickfont=f_tick), yaxis=list(title='Lag', titlefont=f_label, tickfont=f_tick), margin=list(b=50, t=50)) # in comparison to placebo words hist(placeboCorrs$maxCorr, freq=TRUE, main='', breaks=seq(-1, 1, by=.1), ylab='', xlab='', cex.axis=1.5) abline(v=trumpCorr, col='red', lwd=6) mtext("Maximum Absolute Correlation", side=1, cex=2, line=2.75) mtext("Frequency", side=2, cex=2, line=2.75) # robustness to change in end date endDates = as.Date('2017-05-20'):as.Date('2019-08-25') robust.df = data.frame() # endDate, k, l, maxCorr for(end in endDates){ trumpTemp.xts = trumpSent.xts[index(trumpSent.xts)<=as.Date(end), ] # optimal k, l klTrumpTemp = matrix(nrow=length(ks), ncol=2*lag+1) approvalTemp = trend.xts$approve_estimate[index(trend.xts)<=as.Date(end)] for(k in ks){ smoothed = kSmooth(trumpTemp.xts[,1], k) cc = ccfLag(smoothed, approvalTemp, lag) klTrumpTemp[which(ks==k),] = cc$correlation } klTemp = which(abs(klTrumpTemp)==max(abs(klTrumpTemp), na.rm=TRUE), arr.ind=TRUE) corrTemp = klTrumpTemp[klTemp] dfTemp = data.frame('endDate'=as.Date(end), 'k'=ks[klTemp[1,1]], 'l'=c(-lag:lag)[klTemp[1,2]], 'maxCorr' = corrTemp) robust.df = rbind(robust.df, dfTemp) print(as.Date(end)) } optK = robust.df$k[length(robust.df$k)] optL = robust.df$l[length(robust.df$l)] corrs = c() for(end in endDates){ trumpTemp.xts = trumpSent.xts[index(trumpSent.xts)<=as.Date(end), ] approvalTemp = trend.xts$approve_estimate[index(trend.xts)<=as.Date(end)] smoothed = kSmooth(trumpTemp.xts[,1], optK) index(smoothed) = index(smoothed) + optL merged = merge(smoothed, approvalTemp) corrs = c(corrs, cor(merged[,1], merged[,2], use='pairwise.complete')) } robust.df$corrs = corrs par(mfrow=c(2,1)) plot(robust.df$endDate, robust.df$k, ylab='Optimal Smoothing', xlab='', pch=19) plot(robust.df$endDate, robust.df$l, ylab='Optimal Lag', xlab='Data End Date', pch=19) par(mfrow=c(1,1)) plot(robust.df$endDate, robust.df$maxCorr, ylab='Correlation', xlab='Data End Date', pch=20) lines(robust.df$endDate, robust.df$corrs, lty=2) legend('bottomright', c('Maximum Absolute Correlation', 'With 30 day lag, 45 day smoothing'), lty=c(1,2), lwd=c(3, 1)) # 'p-value' pval = sum(abs(placeboCorrs$maxCorr)>=trumpCorr)/nrow(placeboCorrs) # how 'p-value' changes over time allOverTime = list() monthlyEndDates = seq(as.Date('2017-06-01'), as.Date('2019-08-01'), "month") pval_changes = data.frame() placeboCorrs_list = vector(mode='list', length=length(monthlyEndDates)) for(date in monthlyEndDates){ temp = array(0, dim=c(length(ks), 2*lag+1, ncol(sentSeries)-1)) for(j in 1:dim(klCorrs)[3]){ # iterate through each reference word # time series of sentiment of word series = sentSeries.xts[index(sentSeries.xts)<=date,which(names(sentSeries.xts)==vars[j])] for(k in ks){ # iterate through each smoothing level # smooth sentiment of Twitter sentiment smoothed = kSmooth(series, k) cc = ccfLag(smoothed, trend.xts$approve_estimate[index(trend.xts)<=date], lag) temp[which(ks==k),,j] = cc$correlation } allOverTime[[which(monthlyEndDates==date)]] = temp print(paste(j, 'of', dim(klCorrs)[3])) } # calculate optimal correlation and location of optimal parameters for each word for(i in 1:length(vars)){ var = vars[i] varCorrs = temp[,,i] if(sum(is.na(varCorrs))!=length(ks)*(2*lag+1)){ kl = which(abs(varCorrs)==max(abs(varCorrs), na.rm=TRUE), arr.ind=TRUE) maxCorr = varCorrs[kl] placeboTemp = data.frame('word'=var, 'k'=ks[kl[,1]],'l'=c(-lag:lag)[kl[,2]], 'maxCorr'=maxCorr) placeboCorrs_list[[which(monthlyEndDates==date)]] = rbind(placeboCorrs_list[[which(monthlyEndDates==date)]], placeboTemp) } } placeboCorrs_list[[which(monthlyEndDates==date)]] = na.omit(placeboCorrs_list[[which(monthlyEndDates==date)]]) # calculate 'p-value' at end date trumpCorrEnd = robust.df$maxCorr[robust.df$endDate==date] pvalEnd = sum(abs(placeboCorrs_list[[which(monthlyEndDates==date)]]$maxCorr)>=abs(trumpCorrEnd))/nrow(placeboCorrs_list[[which(monthlyEndDates==date)]]) pval_changes = rbind(pval_changes, data.frame('endDate'=date, 'trumpCorr'=trumpCorrEnd, 'pval'=pvalEnd)) print(as.Date(date)) } pval_changes = rbind(pval_changes, data.frame('endDate'=as.Date('2019-08-25'), 'trumpCorr'= trumpCorr,'pval'=pval)) plot(as.Date(pval_changes$endDate), pval_changes$pval, xlab='End Date', ylab='Proportion', pch=19, ylim=c(0, 1)) # smaller window for smoothing and lag for comparison newMaxK = 45 newMaxLag = 7 placeboCorrs_list_instKL = vector(mode='list', length=length(placeboCorrs_list)) pval_changes_instKL = data.frame() for(j in 1:length(placeboCorrs_list_instKL)){ temp = allOverTime[[j]] temp = temp[1:newMaxK, (30-newMaxLag):(30+newMaxLag), ] # calculate optimal correlation in updated smoothing, lag window for each word for(i in 1:length(vars)){ var = vars[i] varCorrs = temp[,,i] if(sum(is.na(varCorrs))!=newMaxK*(2*newMaxLag+1)){ kl = which(abs(varCorrs)==max(abs(varCorrs), na.rm=TRUE), arr.ind=TRUE) maxCorr = varCorrs[kl] placeboTemp = data.frame('word'=var, 'k'=c(1:newMaxK)[kl[,1]], 'l'=c(-newMaxLag:newMaxLag)[kl[,2]], 'maxCorr'=maxCorr) placeboCorrs_list_instKL[[j]] = rbind(placeboCorrs_list_instKL[[j]], placeboTemp) } } placeboCorrs_list_instKL[[j]] = na.omit(placeboCorrs_list_instKL[[j]]) # calcualte "Trump" correlation using new window trumpTemp.xts = trumpSent.xts[index(trumpSent.xts)<=as.Date(monthlyEndDates[j]), ] # optimal k, l klTrumpTemp = matrix(nrow=newMaxK, ncol=2*newMaxLag+1) approvalTemp = trend.xts$approve_estimate[index(trend.xts)<=as.Date(monthlyEndDates[j])] for(k in 1:newMaxK){ smoothed = kSmooth(trumpTemp.xts[,1], k) cc = ccfLag(smoothed, approvalTemp, newMaxLag) klTrumpTemp[k,] = cc$correlation } klTemp = which(abs(klTrumpTemp)==max(abs(klTrumpTemp), na.rm=TRUE), arr.ind=TRUE) corrTemp = klTrumpTemp[klTemp] # calculate 'p-value' pval_end_new = sum(abs(placeboCorrs_list_instKL[[j]]$maxCorr)>=abs(corrTemp))/nrow(placeboCorrs_list_instKL[[j]]) pval_changes_instKL = rbind(pval_changes_instKL, data.frame('endDate'=monthlyEndDates[j], 'trumpCorr'=corrTemp, 'pval'=pval_end_new)) print(j) } plot(pval_changes_instKL$endDate, pval_changes_instKL$pval, ylim=c(0,1), pch=19, main="p-value over time with max lag of 7 days") plot(as.Date(pval_changes$endDate), pval_changes$trumpCorr, col='red', pch=19, main='"Trump" correlations') points(pval_changes_instKL$endDate, pval_changes_instKL$trumpCorr, col='blue', pch=19) legend('bottomright', legend=c("Max. Lag=30", "Max. Lag=7"), col=c('red', 'blue'), pch=c(19,19)) plot(as.Date(pval_changes$endDate), pval_changes$pval, col='gray50', pch=19, ylim=c(0,1), xlab="End Date", ylab='Proportion') points(pval_changes_instKL$endDate, pval_changes_instKL$pval, col='black', pch=0) legend('topright', legend=c("Max. Lag=30", "Max. Lag=7"), col=c('gray50', 'black'), pch=c(19,0)) <file_sep>library(ggplot2) ### Longitudinal Analysis # import Republican, Democratic tweets Republican_tweets = read.csv('Republican_tweets.csv') Democratic_tweets = read.csv('Democratic_tweets.csv') # convert to list repTweets = list() for(i in 1:length(unique(Republican_tweets$userCode))){ repTweets[[i]] = Republican_tweets[Republican_tweets$userCode==i, 3:5] print(i) } demTweets = list() for(i in 1:length(unique(Democratic_tweets$userCode))){ demTweets[[i]] = Democratic_tweets[Democratic_tweets$userCode==i+length(repTweets), 3:5] print(i) } ## create data frame for daily frequency, sentiment of Democratic, Republican tweets repDaily = data.frame() demDaily = data.frame() dates = as.Date('2016-01-01'):as.Date('2017-05-01') repFirstTweetDates = as.Date(sapply(repTweets, function(x)return(as.Date(substr(min(as.Date(x$created)), 1, 10)))), origin=as.Date('1970-01-01')) demFirstTweetDates = as.Date(sapply(demTweets, function(x)return(as.Date(substr(min(as.Date(x$created)), 1, 10)))), origin=as.Date('1970-01-01')) for(date in dates){ date = as.Date(date, origin=as.Date('1970-01-01')) demTemp = Democratic_tweets[Democratic_tweets$rt=='False' & substr(Democratic_tweets$created, 1, 10)==as.Date(date),] repTemp = Republican_tweets[Republican_tweets$rt=='False' & substr(Republican_tweets$created, 1, 10)==as.Date(date),] # number of original tweets from that day nRepTweets = nrow(repTemp) nDemTweets = nrow(demTemp) # number of users nRepUsers = sum(repFirstTweetDates<=date) nDemUsers = sum(demFirstTweetDates<=date) # mean sentiment of tweets RepMean = mean(repTemp$vader) DemMean = mean(demTemp$vader) # positive and negative means RepPosMean = mean(repTemp$vader[repTemp$vader>0]) RepNegMean = mean(repTemp$vader[repTemp$vader<0]) DemPosMean = mean(demTemp$vader[demTemp$vader>0]) DemNegMean = mean(demTemp$vader[demTemp$vader<0]) # put in data frame repTemp = data.frame('date'=as.Date(date), 'nOrigTweets'=nRepTweets, 'nUsers'=nRepUsers, 'meanSent'=RepMean, 'PosMean'=RepPosMean, 'NegMean'=RepNegMean) repDaily = rbind(repDaily, repTemp) demTemp = data.frame('date'=as.Date(date), 'nOrigTweets'=nDemTweets, 'nUsers'=nDemUsers, 'meanSent'=DemMean, 'PosMean'=DemPosMean, 'NegMean'=DemNegMean) demDaily = rbind(demDaily, demTemp) print(as.Date(date)) } ## Frequency of original tweets # days with highest frequency of tweets nTopDays = 4 repDaily[order(repDaily$nOrigTweets/repDaily$nUsers, decreasing=TRUE)[1:nTopDays],] demDaily[order(demDaily$nOrigTweets/demDaily$nUsers, decreasing=TRUE)[1:nTopDays],] topDates = as.Date(c('2016-11-09', '2016-10-20', '2016-10-10', '2016-11-08', '2016-09-27')) repDaily$top = ifelse(repDaily$date %in% topDates, TRUE, FALSE) demDaily$top = ifelse(demDaily$date %in% topDates, TRUE, FALSE) # plots of frequency for Democrats and Republicans ggplot(repDaily, aes(x=date, y=nOrigTweets/nUsers)) + geom_point() + xlab('Date') + ylab('Average Number of Original Tweets') + ggtitle('Frequency of Republican Tweets') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_point(data=repDaily[repDaily$top,], aes(x=date, y=nOrigTweets/nUsers), shape=21, colour='black', fill='white', size=2) ggplot(demDaily, aes(x=date, y=nOrigTweets/nUsers)) + geom_point() + xlab('Date') + ylab('Average Number of Original Tweets') + ggtitle('Frequency of Democratic Tweets') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_point(data=demDaily[demDaily$top,], aes(x=date, y=nOrigTweets/nUsers), shape=21, colour='black', fill='white', size=2) ## Sentiment of original tweets # all sentiment bothSentiment = data.frame('date'=c(demDaily$date, repDaily$date), 'sent'=c(demDaily$meanSent, repDaily$meanSent), 'party'=c(rep('Democratic', nrow(demDaily)), rep('Republican', nrow(repDaily)))) ggplot(bothSentiment, aes(x=date, y=sent, group=party)) + geom_line(aes(color=party)) + scale_color_manual(values=c('blue', 'red')) + ggtitle('Mean Sentiment of Democratic and Republican Tweets') + xlab('Date') + ylab('Mean Sentiment') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) nMostExtremeDays = 5 repDaily[order(repDaily$meanSent)[1:nMostExtremeDays],] repDaily[order(repDaily$meanSent, decreasing=TRUE)[1:nMostExtremeDays],] demDaily[order(demDaily$meanSent)[1:nMostExtremeDays],] demDaily[order(demDaily$meanSent, decreasing=TRUE)[1:nMostExtremeDays],] # difference in sentiment +/- 2 months around election diffSentiment = data.frame('date'=demDaily$date, 'diff'=demDaily$meanSent-repDaily$meanSent, 'posDiff'=demDaily$PosMean-repDaily$PosMean, 'negDiff'=demDaily$NegMean-repDaily$NegMean) ggplot(diffSentiment, aes(x=date, y=diff)) + geom_line() + xlim(as.Date('2016-09-08'), as.Date('2017-01-08')) + geom_vline(xintercept=as.Date('2016-11-08'), color='green') + geom_hline(yintercept=0, color='grey') + xlab('Date') + ylab('Difference in Mean Sentiment') + ggtitle('Difference (Democratic-Republican) in Mean Sentiment') # Difference in positive means ggplot(diffSentiment, aes(x=date, y=posDiff)) + geom_line(color='grey') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_smooth(color='orange', se=FALSE, span=.01) + geom_smooth(color='purple', se=FALSE, span=.1) + ggtitle('Difference (Democratic-Republican) in Mean of Positive Tweets') + xlab('Date') + ylab('Difference in Mean Sentiment') # Difference in negative means ggplot(diffSentiment, aes(x=date, y=negDiff)) + geom_line(color='grey') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_smooth(color='orange', se=FALSE, span=.01) + geom_smooth(color='purple', se=FALSE, span=.1) + ggtitle('Difference (Democratic-Republican) in Mean of Negative Tweets') + xlab('Date') + ylab('Difference in Mean Sentiment') <file_sep>--- jupyter: jupytext: formats: ipynb,Rmd text_representation: extension: .Rmd format_name: rmarkdown format_version: '1.2' jupytext_version: 1.4.2 kernelspec: display_name: R language: R name: ir --- ```{r} library(ggplot2) ``` ```{r} ### Longitudinal Analysis # import Republican, Democratic tweets Republican_tweets = read.csv('Republican_tweets.csv') Democratic_tweets = read.csv('Democratic_tweets.csv') ``` ```{r} # convert to list repTweets = list() for(i in 1:length(unique(Republican_tweets$userCode))){ repTweets[[i]] = Republican_tweets[Republican_tweets$userCode==i, 3:5] #print(i) } demTweets = list() for(i in 1:length(unique(Democratic_tweets$userCode))){ demTweets[[i]] = Democratic_tweets[Democratic_tweets$userCode==i+length(repTweets), 3:5] #print(i) } ``` ```{r} ## create data frame for daily frequency, sentiment of Democratic, Republican tweets repDaily = data.frame() demDaily = data.frame() dates = as.Date('2016-01-01'):as.Date('2017-05-01') repFirstTweetDates = as.Date(sapply(repTweets, function(x)return(as.Date(substr(min(as.Date(x$created)), 1, 10)))), origin=as.Date('1970-01-01')) demFirstTweetDates = as.Date(sapply(demTweets, function(x)return(as.Date(substr(min(as.Date(x$created)), 1, 10)))), origin=as.Date('1970-01-01')) for(date in dates){ date = as.Date(date, origin=as.Date('1970-01-01')) demTemp = Democratic_tweets[Democratic_tweets$rt=='False' & substr(Democratic_tweets$created, 1, 10)==as.Date(date),] repTemp = Republican_tweets[Republican_tweets$rt=='False' & substr(Republican_tweets$created, 1, 10)==as.Date(date),] # number of original tweets from that day nRepTweets = nrow(repTemp) nDemTweets = nrow(demTemp) # number of users nRepUsers = sum(repFirstTweetDates<=date) nDemUsers = sum(demFirstTweetDates<=date) # mean sentiment of tweets RepMean = mean(repTemp$vader) DemMean = mean(demTemp$vader) # positive and negative means RepPosMean = mean(repTemp$vader[repTemp$vader>0]) RepNegMean = mean(repTemp$vader[repTemp$vader<0]) DemPosMean = mean(demTemp$vader[demTemp$vader>0]) DemNegMean = mean(demTemp$vader[demTemp$vader<0]) # put in data frame repTemp = data.frame('date'=as.Date(date), 'nOrigTweets'=nRepTweets, 'nUsers'=nRepUsers, 'meanSent'=RepMean, 'PosMean'=RepPosMean, 'NegMean'=RepNegMean) repDaily = rbind(repDaily, repTemp) demTemp = data.frame('date'=as.Date(date), 'nOrigTweets'=nDemTweets, 'nUsers'=nDemUsers, 'meanSent'=DemMean, 'PosMean'=DemPosMean, 'NegMean'=DemNegMean) demDaily = rbind(demDaily, demTemp) #print(as.Date(date)) } ``` ```{r} ## Frequency of original tweets # days with highest frequency of tweets nTopDays = 4 repDaily[order(repDaily$nOrigTweets/repDaily$nUsers, decreasing=TRUE)[1:nTopDays],] demDaily[order(demDaily$nOrigTweets/demDaily$nUsers, decreasing=TRUE)[1:nTopDays],] topDates = as.Date(c('2016-11-09', '2016-10-20', '2016-10-10', '2016-11-08', '2016-09-27')) repDaily$top = ifelse(repDaily$date %in% topDates, TRUE, FALSE) demDaily$top = ifelse(demDaily$date %in% topDates, TRUE, FALSE) ``` ```{r} # plots of frequency for Democrats and Republicans ggplot(repDaily, aes(x=date, y=nOrigTweets/nUsers)) + geom_point() + xlab('Date') + ylab('Average Number of Original Tweets') + ggtitle('Frequency of Republican Tweets') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_point(data=repDaily[repDaily$top,], aes(x=date, y=nOrigTweets/nUsers), shape=21, colour='black', fill='white', size=2) ggplot(demDaily, aes(x=date, y=nOrigTweets/nUsers)) + geom_point() + xlab('Date') + ylab('Average Number of Original Tweets') + ggtitle('Frequency of Democratic Tweets') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_point(data=demDaily[demDaily$top,], aes(x=date, y=nOrigTweets/nUsers), shape=21, colour='black', fill='white', size=2) ``` ```{r} ## Sentiment of original tweets # all sentiment bothSentiment = data.frame('date'=c(demDaily$date, repDaily$date), 'sent'=c(demDaily$meanSent, repDaily$meanSent), 'party'=c(rep('Democratic', nrow(demDaily)), rep('Republican', nrow(repDaily)))) ggplot(bothSentiment, aes(x=date, y=sent, group=party)) + geom_line(aes(color=party)) + scale_color_manual(values=c('blue', 'red')) + ggtitle('Mean Sentiment of Democratic and Republican Tweets') + xlab('Date') + ylab('Mean Sentiment') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) ``` ```{r} nMostExtremeDays = 5 repDaily[order(repDaily$meanSent)[1:nMostExtremeDays],] repDaily[order(repDaily$meanSent, decreasing=TRUE)[1:nMostExtremeDays],] demDaily[order(demDaily$meanSent)[1:nMostExtremeDays],] demDaily[order(demDaily$meanSent, decreasing=TRUE)[1:nMostExtremeDays],] # difference in sentiment +/- 2 months around election diffSentiment = data.frame('date'=demDaily$date, 'diff'=demDaily$meanSent-repDaily$meanSent, 'posDiff'=demDaily$PosMean-repDaily$PosMean, 'negDiff'=demDaily$NegMean-repDaily$NegMean) ggplot(diffSentiment, aes(x=date, y=diff)) + geom_line() + xlim(as.Date('2016-09-08'), as.Date('2017-01-08')) + geom_vline(xintercept=as.Date('2016-11-08'), color='green') + geom_hline(yintercept=0, color='grey') + xlab('Date') + ylab('Difference in Mean Sentiment') + ggtitle('Difference (Democratic-Republican) in Mean Sentiment') ``` ```{r} # Difference in positive means ggplot(diffSentiment, aes(x=date, y=posDiff)) + geom_line(color='grey') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_smooth(color='orange', se=FALSE, span=.01) + geom_smooth(color='purple', se=FALSE, span=.1) + ggtitle('Difference (Democratic-Republican) in Mean of Positive Tweets') + xlab('Date') + ylab('Difference in Mean Sentiment') ``` ```{r} # Difference in negative means ggplot(diffSentiment, aes(x=date, y=negDiff)) + geom_line(color='grey') + geom_vline(xintercept=c(as.Date('2016-11-08'), as.Date('2017-01-20'))) + geom_smooth(color='orange', se=FALSE, span=.01) + geom_smooth(color='purple', se=FALSE, span=.1) + ggtitle('Difference (Democratic-Republican) in Mean of Negative Tweets') + xlab('Date') + ylab('Difference in Mean Sentiment') ```
fefcfbc1378f44397c841ee66b7bbfad37f82c92
[ "Markdown", "Python", "R", "RMarkdown" ]
6
RMarkdown
robynferg/Tracking_Presidential_Approval_with_Twitter
03e01750694d73e02d86e9e135092c4b961556e7
387d53884d16ed9f8f20082a4a86d178cf905166
refs/heads/master
<file_sep>#quiz print("<----Hello! Let's get started---->") print("|********************************|") print("We Welcome you to Our Introdution Application....") print("|********************************|") print("Featuring the Basic Project for introduction..") print("|********************************|") print("Design By <NAME>") print("|********************************|") print("<----:Please Enter Your gender:---->") gender=input("If You are Male Plz Write 'M or m' and 'F or f' for Female:") def nam(): #this function is called when user enter the name orher than in alphabet name=input("What Is Your Good Name : ") if name.isalpha(): #if name is only in alphabet then if execute print("Hii Sir, Your Name is",name) print("") print("I Would like to collect some more information About You") age=input("Enter your age (Eligibility criteria is more than 20):") if age.isdigit(): #if age is only in digit then this condition execute if int(age)>20: #if age is greater than 20 then this condition execute print("Welcome",name,"sir,as your age is",age,"years,You are eligible for Python Fundamental Course...") else: print("Sir!..you are not eligible for Python Fundamental course...") else: print("Sir!..please enter your age correctly(in digit)..") ag() #this function is called when user enter the age other than iinteger else: #if the user enter the name other than in alphabet then this condition execute print("Sir!..please enter your name correctly(in alphabet)..") nam() #this function is called when user enter the name orher than in alphabet def ag(): #this function is called when user enter the age other than integer age=input("Enter your age (Eligibility criteria is more than 20):") if age.isdigit(): #if age is only in digit then this condition execute if int(age)>20: #if age is greater than 20 then this condition execute print("Welcome",name,"sir,as your age is",age,"years,You are eligible for Python Fundamental Course...") else: print("Sir!..you are not eligible for Python Fundamental course...") else: #if user enter the age other than integer print("Sir!..please enter your age correctly(in digit)..") ag() #this function is called when user enter the age other than integer def namf(): #this function is called when user enter the name orher than in alphabet name=input("What Is Your Good Name : ") if name.isalpha(): #if name is only in alphabet then if execute print("H<NAME>, Your Name is",name) print("I Would like to collect some more information About You") age=input("Enter your age (Eligibility criteria is more than 19):") if age.isdigit(): #if age is only in digit then this condition execute if int(age)>19: #if age is greater than 19 then this condition execute print("Welcome",name,"Mam,as your age is",age,"years,You are eligible for core Java Fundamental course..") else: print("Sorry!..you are not eligible for core Java Fundamental course") else: print("Mam!..please enter your age correctly(in digit)") agf() #this function is called when user enter the age other than integer else: #if the user enter the name other than in alphabet then this condition execute print("Mam!..please enter your name correctly(in alphabet)..") namf() #this function is called when user enter the name orher than in alphabet def agf():#this function is called when user enter the age other than integer age=input("Enter your age (Eligibility criteria is more than 19):") if age.isdigit(): #if age is only in digit then this condition execute if int(age)>19: #if age is greater than 19 then this condition execute print("Welcome",name,"Mam,as your age is",age,"years,You are eligible for core Java Fundamental course..") else: print("Sorry!..you are not eligible for core Java Fundamental course") else: #if user enter the age other than integer print("Mam!..please enter your age correctly(in digit)") agf() #this function is called when user enter the age other than integer def el(): #if user enter gender other than in m/M or f/F print("please enter your age correctly...!!") gender=input("If You are Male Plz Write 'M or m' and 'F or f' for Female:") if gender=="m" or gender=="M": namb() # elif gender=="f" or gender=="F": namfg() else: el() def namb(): #this function is called if user enter name other than integer in final else condition print("Hello Sir,,We Welcome you on Board...") name=input("What Is Your Good Name : ") if name.isalpha(): print("Hii Sir, Your Name is",name) print("") print("I Would like to collect some more information About You") age=input("Enter your age (Eligibility criteria is more than 20):") if age.isdigit(): if int(age)>20: print("Welcome",name,"sir,as your age is",age,"years,You are eligible for Python Fundamental Course...") else: print("Sir!..you are not eligible for Python Fundamental course...") else: print("Sir!..please enter your age correctly(in digit)..") ag() else: print("Sir!..please enter your name correctly(in alphabet)..") nam() def namfg(): #this function is called if user enter name other than integer in final else condition print("Hello Mam,,We Welcome you on board...") name=input("What Is Your Good Name : ") if name.isalpha(): print("Hii Mam, Your Name is",name) print("I Would like to collect some more information About You") age=input("Enter your age (Eligibility criteria is more than 19):") if age.isdigit(): if int(age)>19: print("Welcome",name,"Mam,as your age is",age,"years,You are eligible for core Java Fundamental course..") else: print("Sorry!..you are not eligible for core Java Fundamental course") else: print("Mam!..please enter your age correctly(in digit)") agf() else: print("Mam!..please enter your name correctly(in alphabet)..") namf() if gender=="m" or gender=="M": print("Hello Sir,,We Welcome you on Board...") name=input("What Is Your Good Name : ") if name.isalpha(): print("Hii Sir, Your Name is",name) print("") print("I Would like to collect some more information About You") age=input("Enter your age (Eligibility criteria is more than 20):") if age.isdigit(): if int(age)>20: print("Welcome",name,"sir,as your age is",age,"years,You are eligible for Python Fundamental Course...") else: print("Sir!..you are not eligible for Python Fundamental course...") else: print("Sir!..please enter your age correctly(in digit)..") ag() else: print("Sir!..please enter your name correctly(in alphabet)..") nam() elif gender=="f" or gender=="F": print("Hello Mam,,We Welcome you on Board...") name=input("What Is Your Good Name : ") if name.isalpha(): print("Hii Mam, Your Name is",name) print("I Would like to collect some more information About You") age=input("Enter your age (Eligibility criteria is more than 19):") if age.isdigit(): if int(age)>19: print("Welcome",name,"Mam,as your age is",age,"years,You are eligible for core Java Fundamental course..") else: print("Sorry!..you are not eligible for core Java Fundamental course") else: print("Mam!..please enter your age correctly(in digit)") agf() else: print("Mam!..please enter your name correctly(in alphabet)..") namf() else: print("please enter your gender correctly...!!") gender=input("If You are Male Plz Write 'M or m' and 'F or f' for Female:") if gender=="m" or gender=="M": namb() elif gender=="f" or gender=="F": namfg() else: el() <file_sep># create a program that asks the user to enter their name and age . print out a message addressed to them that tell them that \ #they turn 100 years. name=input("enter your name:") age=int(input("enter your age:")) if age>101: print(name,",congrats! you have turned 100") else: rest=100-age print(name,",you will turn hundred after",rest,"years") #WAP to print a number divisible by 7 not 5 for x in range(2000,3201):#3200 included if x%7==0: if x%5==0: pass #if number divisible by then pass else: print(x) #WAP which accepts a sequence if comma separated variable and generate a list abc=input("enter number separated by ,: ") l=abc.split(",")#split number seaprated by , and return list print(l) print(tuple(l)) #WAP that accepts a sentence and calculate the upper and lower case letter abc=input("Enter any sentence: ") a=0 b=0 for x in abc: if x.isupper(): a+=1 elif x.islower(): b+=1 elif x.isspace(): pass print("total uppercase letter",a) print("total lowercase letter",b) <file_sep>import boto3 client = boto3.client('s3') response = client.delete_object( Bucket='bucket01ethans', Key='bootstrap.txt' )<file_sep>#Write a program that takes a list and returns a new list that contains all the elements of the first list minus all the duplicates. l=[] for x in range(10): l.append(int(input("enter ant number:"))) print(l) s=set(l) abc=list(s) print(abc) <file_sep>#to find entered number is keyword or not #method-1 def keywords(): d={1:'false',2:"none",3:"true",4:"and",5:"as",6:"assert",7:"break",8:"class",9:"continue",10:"def",11:"del",12:"elif",13:"else",14:"except",15:"finally",16:"for",17:"from",18:"global",19:"if",20:"import",21:"in",22:"is",23:"lamba",24:"nonlocal",25:"not",26:"or",27:"pass",28:"raise",29:"return",30:"try",31:"while",32:"with",33:"yield"} search=input("enter a keyword:") flag=0 for x in range(1,34): if d[x]==search: print(search, "is a keyword") flag=1 break if flag==0: print(search,"is not a keyword.") print('keywords:') for x in range(1,34): print(d[x]) keywords() #method-2 import keyword search=input("enter any keyword:") if keyword.iskeyword(search): print(search,"is a keyword.") else: print(search,"is not akeyword") print("list of keywords") print(keyword.kwlist)<file_sep>import boto3 client = boto3.client('s3') response = client.create_bucket( ACL='private', Bucket='bucketohio123gayatri', CreateBucketConfiguration={ 'LocationConstraint': 'us-west-1' }, #GrantRead= 'string' ) <file_sep>import boto3 client = boto3.client('s3') response = client.list_objects( Bucket='bucket01ethans' ) for content in response['Contents']: print(content['Key'])<file_sep>import boto3 client = boto3.client('s3') response = client.list_buckets() for bucket in response['Buckets']: print(bucket['Name']) <file_sep>#calculation print("_____welcome_____") print("choose numbers below to perform various operation") print("") print("1. Addition") print("2. Subtraction") print("3. Multiplication") print("4. Raise to power") print("5. Division") print("6. Floor Division") print("7. Factorail") def again(): #here function is used to perform calculation according to user and to be used after one opeartion num=int(input("Enter your choice:")) print("") if type(num)==int: #condition check-entered number is integer if num==1: print("you want to perform addition") num1=int(input("enter the number:")) num2=int(input("enter the second one:")) add=num1+num2 print("addition of two number is ",add) print("") again1() #if user want to continue elif num==2: print("you want to perform subtraction") num1=int(input("enter the number:")) num2=int(input("enter the second one:")) sub=num1-num2 print("subtraction of two numbers is ",sub) print("") again1() #if user want to continue elif num==3: print("you want to perform multiplication") num1=int(input("enter the number:")) num2=int(input("enter the second one:")) mul=num1*num2 print("multiplication of two number is ",mul) print("") again1() #if user want to continue elif num==4: print("you want to find power") num1=int(input("enter the base value:")) num2=int(input("enter the index value:")) pow=num1**num2 print("power: ",pow) print("") #if user want to continue again1() elif num==5: print("you want to perform division") num1=int(input("enter the number:")) num2=int(input("enter the second one:")) div=num1/num2 print("Division of number is",div) print("") again1() #if user want to continue elif num==6: print("you want to floor value") num1=int(input("enter the number:")) num2=int(input("enter the second one:")) flrdiv=num1//num2 print("result of floor division is ",flrdiv) print("") again1() #if user want to continue elif num==7: print("you want to find factorail:") num=int(input("enter any number:")) fact=1 for x in range(1,num+1): fact=fact*x print("factorial of that number is ",fact) print("") again1() #if user want to continue else: print("enter valid number") print("") again() #this function called if user enter invalid number else: #enter number other than integer print("enter valid number") print("") again() #this function called to get valid input from user def again1(): #funtion ask user taht they want to perform operation print("do you want to perform again or to exit press any key ") choice=input("enter 'y' to continue:") if choice=="y": again() #if user want to continue after a operation again() #start the execution<file_sep>#calculator import tkinter from tkinter import * from tkinter import ttk root=Tk() root.title("Calculator") root.geometry("350x360") root.resizable(True,True) root.minsize(200,200) #root.maxsize(300,300) l1 = ttk.Label(root,text="Test").pack() entry=Entry(root,width=56,bd=5,bg='beige',justify='right',validatecommand = vcmd) entry.pack() f1=Frame(root) f1.pack() #ttk.Button(f1) b1=Button(f1,text='7',bd=2,width=10,height=5) b1.pack(side=LEFT) b1=Button(f1,text='8',width=10,height=5) b1.pack(side=LEFT) b1=Button(f1,text='9',width=10,height=5) b1.pack(side=LEFT) b1=Button(f1,text='+',width=10,height=5) b1.pack(side=LEFT) f2=Frame(root) f2.pack() b1=Button(f2,text='4',width=10,height=5) b1.pack(side=LEFT) b1=Button(f2,text='5',width=10,height=5) b1.pack(side=LEFT) b1=Button(f2,text='6',width=10,height=5) b1.pack(side=LEFT) b1=Button(f2,text='-',width=10,height=5) b1.pack(side=LEFT) f3=Frame(root) f3.pack() b1=Button(f3,text='1',width=10,height=5) b1.pack(side=LEFT) b1=Button(f3,text='2',width=10,height=5) b1.pack(side=LEFT) b1=Button(f3,text='3',width=10,height=5) b1.pack(side=LEFT) b1=Button(f3,text='*',width=10,height=5) b1.pack(side=LEFT) f4=Frame(root) f4.pack() b1=Button(f4,text='0',width=10,height=5) b1.pack(side=LEFT) b1=Button(f4,text='.',width=10,height=5) b1.pack(side=LEFT) b1=Button(f4,text='/',width=10,height=5) b1.pack(side=LEFT) b1=Button(f4,text='=',width=10,height=5) b1.pack(side=LEFT) root.mainloop()<file_sep>import boto3 client = boto3.client('s3') file_reader = open('upload.py').read() response = client.put_object( ACL='private', Body=file_reader, Bucket='bucketohio123gayatri', Key='uploading_object.py' )<file_sep>#hangman version1 import random import string import time #output formatting! print("") print("") print(" ********************Welcome*********************") print(" **************Let's Play Hangman****************") print("") print("____________") print("Instruction:") print("------------") print("") print("A game for two in which one player tries to guess the letters of a word,\nthe other player recording failed attempts by drawing a gallows and someone hanging on it,\nline by line") print(" ------------------------------------------------------------") print(" you got maximum 9 guesses") print(" ============================================================") print(".-----") time.sleep(1) print("| |") time.sleep(1) print("| O") time.sleep(1) print("| |") time.sleep(1) print("| ~~.~~") time.sleep(1) print("| |") time.sleep(1) print("| / \ ") time.sleep(1) print("Let's Start") time.sleep(2) print("") #making lists for word slection! animal=["panda","tiger","lion","giraffe","cat","hippo","pyhton","leopard","chameleon","camel","Chimpanzee","buffalo","butterfly"] cricplayer=["virat","kohli","dhoni","pollard","rahul","sachin","yuvraj","sahwag","hardik","rohit","gayle","warner"] color=["red","pink","white","yellow","black","green","voilet","maroon","purple","navy","teal","beige","orange","coral"] car=["Nissan","Toyota"," Honda","Chevrolet","Mercedes","Volvo","Cadillac","Lexus","audi"] #hints! print("1.Animal") print("2.cricplayer") print("3.color") print("4.car") print("5.Exit") choice=int(input("Enter your choice:")) #take input from user # function define def animal_f(): lista=[] animal_v=random.choice(animal).lower() #select random word from list animal n=len(animal_v) #find length of word for x in animal_v: #selected word is append in new list lista.append(x) list=[] for x in range(n): list.append("_") print(" ".join(list)) count=0 sucess=0 while count<9 and sucess<n: search=input("enter your guess...") #take a letter as input from user search=search.lower() if search in lista: #if letter found in word index=lista.index(search) lista[index]="*" list[index]=search print(" ".join(list)) print("") sucess+=1 else: print(" ".join(list)) count+=1 print((9-count),"chances remainig") print(" ") if count<9 and sucess==n: print(" ") print("Congrats ,you won!") else: print("") print("you loose..try again later") #function define! def cricplayer_f(): lista=[] cric_v=random.choice(cricplayer).lower() #select random word from list cricplayer n=len(cric_v) for x in cric_v: #selected word is append in new list lista.append(x) list=[] for x in range(n): list.append("_") print(" ".join(list)) count=0 sucess=0 while count<9 and sucess<n: search=input("enter your guess...") #take a letter as input from user search=search.lower() if search in lista: #chech entered letter is found in word or not index=lista.index(search) lista[index]="*" list[index]=search print(" ".join(list)) print("") sucess+=1 else: print(" ".join(list)) count+=1 print((9-count),"chances remainig") print(" ") if count<9 and sucess==n: print(" ") print("Congrats ,you won!") else: print("") print("you loose..try again later") #function define! def color_f(): lista=[] color_v=random.choice(color).lower() #select random word from list color n=len(color_v) for x in color_v: #selected word is append in new list lista.append(x) list=[] for x in range(n): list.append("_") print(" ".join(list)) count=0 sucess=0 while count<9 and sucess<n: search=input("enter your guess...") #take a letter as input from user search=search.lower() if search in lista: #chech entered letter is found in word or not index=lista.index(search) lista[index]="*" list[index]=search print(" ".join(list)) print("") sucess+=1 else: print(" ".join(list)) count+=1 print((9-count),"chances remainig") print(" ") if count<9 and sucess==n: print(" ") print("Congrats ,you won!") else: print("") print("you loose..try again later") #function define! def car_f(): lista=[] car_v=random.choice(car).lower() #select random word from list car n=len(car_v) for x in car_v: #selected word is append in new list lista.append(x) list=[] for x in range(n): list.append("_") print(" ".join(list)) count=0 sucess=0 while count<9 and sucess<n: search=input("enter your guess...") #take a letter as input from user search=search.lower() if search in lista: #chech entered letter is found in word or not index=lista.index(search) lista[index]="*" list[index]=search print(" ".join(list)) print("") sucess+=1 else: print(" ".join(list)) count+=1 print((9-count),"chances remainig") print(" ") if count<9 and sucess==n: print(" ") print("Congrats ,you won!") else: print("") print("you loose..try again later") def exit_f(): exit() #corresponding function according to choice if choice==1: animal_f() elif choice==2: cricplayer_f() elif choice==3: color_f() elif choice==4: car_f() elif choice==5: exit_f() <file_sep>#Write a Python program to display the examination schedule. (extract the date from exam_st_date). x = (11, 12, 2014) print(x[0],x[1],x[2],sep='/',end="")
9bbeb7a5c1c2ca584ba4b8b9afb13cdd23b25733
[ "Python" ]
13
Python
malay190/quiz
a94edd78f33ec268df95727882e8f39f56631853
9c305dfd5d8666a7c6ff16ac90eb26b4a0692f67
refs/heads/master
<repo_name>mateussilvasouza/Componentizacao<file_sep>/src/componentes/ListaDeSignos/index.js import React from 'react'; import Titulo from '../Titulo'; import ItemLista from '../ItemLista'; import signos from '../data/dataSignos'; import './estilo.css'; export default function ListaDeSignos() { return ( <div> <Titulo /> <div className="lista"> {signos.map(signo => { return( <ItemLista signo={signo.signo} dataInicio={signo.dataInicio} dataFim={signo.dataFim} imagem={signo.imagem} /> ) })} </div> </div> ) }<file_sep>/src/componentes/data/dataSignos.js const signos = [ {signo:"Aquário", dataInicio:"21/01", dataFim:"19/02", imagem:"./assets/aquario.jpg"}, {signo:"Peixes", dataInicio:"20/02", dataFim:"20/03", imagem:"./assets/peixes.jpg"}, {signo:"Áries", dataInicio:"21/03", dataFim:"20/04", imagem:"./assets/aries.jpg"}, {signo:"Touro", dataInicio:"21/04", dataFim:"21/05", imagem:"./assets/touro.jpg"}, {signo:"Gêmeos", dataInicio:"22/05", dataFim:"21/06", imagem:"./assets/gemeos.jpg"}, {signo:"Câncer", dataInicio:"21/06", dataFim:"23/07", imagem:"./assets/cancer.jpg"}, {signo:"Leão", dataInicio:"24/07", dataFim:"23/08", imagem:"./assets/leao.jpg"}, {signo:"Virgem", dataInicio:"24/08", dataFim:"23/09", imagem:"./assets/virgem.jpg"}, {signo:"Libra", dataInicio:"24/09", dataFim:"23/10", imagem:"./assets/libra.jpg"}, {signo:"Escorpião", dataInicio:"24/10", dataFim:"22/11", imagem:"./assets/escorpiao.jpg"}, {signo:"Sagitário", dataInicio:"23/11", dataFim:"21/12", imagem:"./assets/sagitario.jpg"}, {signo:"Capricórnio", dataInicio:"22/12", dataFim:"20/01", imagem:"./assets/capricornio.jpg"}, ]; export default signos; <file_sep>/src/App.js import React from 'react'; import ListaDeSignos from './componentes/ListaDeSignos'; export default function App() { return ( <ListaDeSignos /> ); }
3a60abd3de1e12ce8f5d30727b71ca8838301f89
[ "JavaScript" ]
3
JavaScript
mateussilvasouza/Componentizacao
c954546cac505eaa8d53326f572033460bccf200
a7255b65e95b834599c4c5f11ed3292b599eb4e6
refs/heads/main
<repo_name>Jabaca3/CLI<file_sep>/minershell.c #include <stdio.h> #include <sys/types.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <signal.h> #include <fcntl.h> #define MAX_INPUT_SIZE 1024 #define MAX_TOKEN_SIZE 64 #define MAX_NUM_TOKENS 64 /* Splits the string by space and returns the array of tokens * */ char **tokenize(char *line){ char **tokens = (char **)malloc(MAX_NUM_TOKENS * sizeof(char *)); char *token = (char *)malloc(MAX_TOKEN_SIZE * sizeof(char)); int i, tokenIndex = 0, tokenNo = 0; for (i = 0; i < strlen(line); i++){ char readChar = line[i]; if (readChar == ' ' || readChar == '\n' || readChar == '\t'){ token[tokenIndex] = '\0'; if (tokenIndex != 0){ tokens[tokenNo] = (char *)malloc(MAX_TOKEN_SIZE * sizeof(char)); strcpy(tokens[tokenNo++], token); tokenIndex = 0; } } else{ token[tokenIndex++] = readChar; } } free(token); tokens[tokenNo] = NULL; return tokens; } int main(int argc, char *argv[]){ char line[MAX_INPUT_SIZE]; char **tokens; int i; while (1){ /* BEGIN: TAKING INPUT */ //dup2(STDOUT_FILENO, 1); bzero(line, sizeof(line)); printf("minersh$ "); scanf("%[^\n]", line); getchar(); line[strlen(line)] = '\n'; //terminate with new line tokens = tokenize(line); // If no tokens found we dont execute anything if(*tokens == NULL){ //pass } // Testing for user input "cd" // This changes the current directory of this process else if(strcmp(*tokens, "cd")==0){ if(chdir(tokens[1]) == -1){ printf("%s", "Incorrect command to the display and prompting for the next command.\n"); } } // Testing for user input "exit" // This exits the main program for this process else if (strcmp(*tokens, "exit") == 0 ){ printf("%s", "Thank you, now exiting program\n"); exit(0); } // Checking user input for various commands that may exist else if(*tokens){ // Searching for | boolean value piping to determin if we are piping later char **index = tokens; int piping = 0; while( *index != 0 ){ if( strcmp(*index, "|") ==0 ){ printf("%s", "Piping...\n"); piping = 1; break; } index++; } int fd[2]; if(piping && pipe(fd) == -1){ char error_message[30] = "Anerrorhasoccurred\n"; printf("%s", "were erroring here"); write(STDERR_FILENO,error_message,strlen(error_message)); } //----------------------------------------------Creating child proces--------------------------------------------------- int rc = fork(); // If child process fails exit if (rc < 0){ fprintf(stderr, "fork failed\n"); exit(1); } // Child (new process) if it exist else if (rc == 0){ //Counting tokens int count = 0; char **clone = tokens; while(*clone){ clone++; count += 1; } // Handeling piping here ------------------------------------------ if(piping){ dup2(fd[1], STDOUT_FILENO); close(fd[0]); close(fd[1]); execlp(tokens[0], tokens[0], (char *)NULL); } // Handeling piping here ------------------------------------------ // Switching to dupping mode // Changing outputs by detecting > argument // Taking in amount of flags (Not dynamic) if(!piping && count >= 2 && tokens[count-2] && strcmp(tokens[count-2], ">") == 0){ printf("%s", "Duplicating\n"); int fw = open(tokens[count-1], O_WRONLY | O_CREAT | O_TRUNC); dup2(fw, STDOUT_FILENO); dup2(fw, STDERR_FILENO); // Specific for echo because echo has different properties than other commands if(strcmp(*tokens, "echo")==0){ char *pointer = line+5; execlp(*tokens, *tokens, tokens[1], (char *)NULL); } // Taking in 2 flags else if(count == 5 && execlp(*tokens, *tokens, tokens[1], tokens[2], (char *)NULL) == -1){ printf("%s", "Please enter a real command\n"); } // Taking in 1 flag else if(count == 4 && execlp(*tokens, *tokens, tokens[1], (char *)NULL) == -1){ printf("%s", "Please enter a real command\n"); } // Taking in no flags else if(count == 3 && execlp(*tokens, *tokens, (char *)NULL) == -1){ printf("%s", "Please enter a real command\n"); } close(fw); } // Specific for echo because echo has different properties than other commands else if(!piping && strcmp(*tokens, "echo")==0){ char *pointer = line+5; execlp(*tokens, *tokens, pointer, (char *)NULL); } // The standard execution for a single command else if(!piping && execlp(*tokens, *tokens, tokens[1], (char *)NULL) == -1){ printf("%s", "Please enter a real command\n"); } exit(0); } else{ if(piping){ int child2 = fork(); if(child2 == 0){ dup2(fd[0], STDIN_FILENO); close(fd[0]); close(fd[1]); if(execlp(tokens[2], tokens[2], (char *)NULL)==-1){ printf("%s", "Execlp broke or something"); } exit(0); } else{ close(fd[0]); close(fd[1]); wait(NULL); } } wait(NULL); } } //----------------------------------------------Ending processes--------------------------------------------------- // Freeing the allocated memory for (i = 0; tokens[i] != NULL; i++){ free(tokens[i]); } free(tokens); } return 0; }
82d852a42046830641e38b771038f1e610f2bbdc
[ "C" ]
1
C
Jabaca3/CLI
23462546e192c3a77c66c8ac1061e678146a7bda
53cb77a0bb22a60bc737e68d8a220786fbc82e2d
refs/heads/master
<file_sep>import React from "react"; import "./styles.css"; const BuyPrintsButton = ({ src }) => { return ( <a href={src} className="buy-prints-button"> BUY PRINTS </a> ); }; export default BuyPrintsButton; <file_sep>import React from "react"; import pinkstatue from "../../images/art/pinkstatue.jpg"; import goddessportrait from "../../images/art/goddessportrait.jpg"; import pinkdesigntee from "../../images/art/pinkdesigntee.jpg"; import humanexperimenttiny from "../../images/art/humanexperimenttiny.jpg"; export const artdata = [ { img: pinkstatue, alt: "Beautiful pink ribbon dancer", status: "SOLD", price: "$110", size: "24x30in", type: "oil painting", src: "https://www.redbubble.com/i/canvas-print/Ribbon-dance-oil-painting-by-almondbeans/56071310.56DNM", }, { img: goddessportrait, alt: "Beautiful goddess portrait with poem", status: "SOLD", price: "$100", size: "24x30in", type: "oil painting", src: "https://www.redbubble.com/i/canvas-print/Goddess-Oil-Painting-by-almondbeans/58662684.56DNM", }, { img: pinkdesigntee, alt: "Classic white tee with a blond dark skin lady in pink shirt", status: "SOLD", price: "$400", size: "medium t-shirt", type: "fabric", src: undefined, }, { img: humanexperimenttiny, alt: "4 small paintings of girl, eye, and lips", status: "SOLD", price: "$50/pair", size: "4x6in", type: "acrylic painting", src: "https://www.redbubble.com/i/sticker/Acrylic-Painting-Enjoying-the-rain-by-almondbeans/60186069.EJUG5", }, ]; <file_sep>import React from "react"; import "./styles.scss"; import { artdata } from "./data"; import BuyPrintsButton from "../BuyPrintsButton"; const ArtContainer = ({ img, alt, status, price, size, type, src }) => { return ( <div className="art-section-container"> <div className="art-container"> <img src={img} alt={alt} /> </div> <div className="description"> {/* Buy prints button */} <p className="title"> {status} - {price} </p> <p className="size">{size}</p> <p className="details">{type}</p> {src ? <BuyPrintsButton src={src} /> : null} </div> </div> ); }; const Art = () => { return ( <div className="art-section"> {artdata.map(({ img, alt, status, price, size, type, src }) => ( <ArtContainer img={img} alt={alt} status={status} price={price} size={size} type={type} src={src} /> ))} </div> ); }; export default Art; <file_sep>import React from "react"; import "./styles.css"; import logo from "../../images/logo.png"; import { faInstagram, faFacebook } from "@fortawesome/free-brands-svg-icons"; import { faEnvelopeOpenText } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; const Banner = () => { return ( <div className="banner"> <img className="logo" src={logo} alt="Company logo initials AJ" /> <div className="icons"> {/* fontawesome ig, fb, email, redbubble */} <a target="_blank" href="https://www.instagram.com/annnysha7/"> <FontAwesomeIcon className="icon" icon={faInstagram} size="2x" /> </a> <a target="_blank" href="https://www.facebook.com/Almondbeans/"> <FontAwesomeIcon className="icon" icon={faFacebook} size="2x" /> </a> <a target="_blank" href="mailto: <EMAIL>"> <FontAwesomeIcon className="icon" icon={faEnvelopeOpenText} size="2x" /> </a> </div> <div className="textblock"> <NAME> is an artist. She gives away her art to raise money for charities. Each auction is posted on her instagram, facebook, and on this site. Contact her for custom requests or buy prints <span> <a href="https://www.redbubble.com/people/almondbeans/shop?asc=u" target="_blank" > here </a> </span> . </div> </div> ); }; export default Banner;
53c71510ce8f9f0de7e1611fa6ae17f1eae68e95
[ "JavaScript" ]
4
JavaScript
Anisha7/art-site
aacf2df9284c151b9727b31f6a09ba56b1ced594
87c306871968b76969eb11ef2eb88a8bd758b981
refs/heads/master
<repo_name>cdouglass/tour_scheduling<file_sep>/test/controllers/api/bookings_controller_test.rb require 'test_helper' class Api::BookingsControllerTest < ActionDispatch::IntegrationTest def test_create assert_difference('Booking.count', 1) do timeslot = timeslots(:one) post api_bookings_url, params: {booking: {timeslot_id: timeslot.id, size: 4}} assert_response :created end end def test_create_with_invalid_timeslot assert_no_difference('Booking.count') do post api_bookings_url, params: {booking: {timeslot_id: 999, size: 4}} assert_response :not_found end end def test_create_with_insufficient_availability assert_no_difference('Booking.count') do timeslot = timeslots(:before_and_after_day_one) post api_bookings_url, params: {booking: {timeslot_id: timeslot.id, size: 4}} assert_response :unprocessable_entity end end end <file_sep>/app/models/boat.rb class Boat < ApplicationRecord has_many :assignments has_many :timeslots, through: :assignments validates_presence_of :name validates_numericality_of :capacity, only_integer: true, greater_than: 0 def as_json(options = {}) super(except: [:created_at, :updated_at]) end end <file_sep>/app/controllers/api/bookings_controller.rb class Api::BookingsController < ApplicationController def create @booking = Booking.new(params.require(:booking).permit(:timeslot_id, :size)) if @booking.save head :created elsif @booking.errors[:timeslot].include? "must exist" head :not_found else head :unprocessable_entity end end end <file_sep>/app/controllers/application_controller.rb class ApplicationController < ActionController::Base protect_from_forgery unless: -> { request.format.json? } after_action :set_access_control_headers private def set_access_control_headers headers['Access-Control-Allow-Origin'] = "http://localhost:3333" headers['Access-Control-Allow-Headers'] = "*" headers['Access-Control-Request-Method'] = '*' end end <file_sep>/test/controllers/api/timeslots_controller_test.rb require 'test_helper' class Api::TimeslotsControllerTest < ActionDispatch::IntegrationTest def test_index_defaults_to_today Timecop.travel("2014-07-22".to_time.midnight) do get api_timeslots_url assert_response :success expected_response = "[{\"id\":350923364,\"start_time\":1406012400,\"duration\":1,\"availability\":0,\"customer_count\":0,\"boats\":[]},{\"id\":298486374,\"start_time\":1406052000,\"duration\":1,\"availability\":0,\"customer_count\":0,\"boats\":[]}]" assert_equal(response.body, expected_response) end end def test_filters_by_date days = [ ["2014-07-21", "[{\"id\":358349050,\"start_time\":1406012399,\"duration\":0,\"availability\":2,\"customer_count\":0,\"boats\":[{\"id\":1015256526,\"name\":\"Pelagian\",\"capacity\":2}]}]"], ["2014-07-22", "[{\"id\":350923364,\"start_time\":1406012400,\"duration\":1,\"availability\":0,\"customer_count\":0,\"boats\":[]},{\"id\":298486374,\"start_time\":1406052000,\"duration\":1,\"availability\":0,\"customer_count\":0,\"boats\":[]}]"], ["2014-07-23", "[{\"id\":970024125,\"start_time\":1406098800,\"duration\":1,\"availability\":0,\"customer_count\":0,\"boats\":[]}]"] ] days.each do |date, expected_response| get api_timeslots_url, params: {date: date} assert_equal(response.body, expected_response) end end def test_includes_timeslots_overlapping_date days = [ ["2017-09-27", "[{\"id\":980190962,\"start_time\":1506520000,\"duration\":5,\"availability\":999989,\"customer_count\":11,\"boats\":[{\"id\":476007621,\"name\":\"Funny, It Worked Last Time...\",\"capacity\":1000000},{\"id\":1064137960,\"name\":\"Just Testing\",\"capacity\":10}]},{\"id\":610585660,\"start_time\":1505520000,\"duration\":16671,\"availability\":0,\"customer_count\":0,\"boats\":[]},{\"id\":643171019,\"start_time\":1505520000,\"duration\":33338,\"availability\":0,\"customer_count\":0,\"boats\":[]}]"], ] days.each do |date, expected_response| get api_timeslots_url, params: {date: date} assert_equal(response.body, expected_response) end end def test_create assert_difference('Timeslot.count', 1) do post api_timeslots_url, params: {timeslot: {start_time: 1406052000, duration: 120}} assert_response :success expected_response = "{\"id\":980190963,\"start_time\":1406052000,\"duration\":120,\"availability\":0,\"customer_count\":0,\"boats\":[]}" assert_equal(response.body, expected_response) end end end <file_sep>/test/controllers/api/assignments_controller_test.rb require 'test_helper' class Api::AssignmentsControllerTest < ActionDispatch::IntegrationTest def create_request(timeslot_id, boat_id) post api_assignments_url, params: {assignment: {timeslot_id: timeslot_id, boat_id: boat_id}} end def test_create assert_difference('Assignment.count', 1) do timeslot = timeslots(:one) boat = boats(:rtfm) create_request(timeslot.id, boat.id) assert_response :created end end def test_create_with_invalid_association assert_difference('Assignment.count', 0) do timeslot = timeslots(:one) create_request(timeslot.id, 999) assert_response :not_found boat = boats(:rtfm) create_request(999, boat.id) assert_response :not_found end end def test_create_with_unavailable_boat assert_difference('Assignment.count', 0) do timeslot = timeslots(:before_and_after_day_one) boat = boats(:just_testing) create_request(timeslot.id, boat.id) assert_response :unprocessable_entity end end end <file_sep>/app/models/booking.rb class Booking < ApplicationRecord belongs_to :timeslot validates :timeslot, presence: true validates_numericality_of :size, only_integer: true, greater_than: 0 validate :sufficient_availability private def sufficient_availability if self.errors.empty? if self.timeslot.availability < self.size self.errors.add(:timeslot, "not enough room") end end end end <file_sep>/app/controllers/api/timeslots_controller.rb class Api::TimeslotsController < ApplicationController def index today = Date.current date_string = search_params[:date] begin @date = date_string.nil? ? today : date_string.to_date rescue ArgumentError @date = today end @timeslots = Timeslot.all_on_date(@date) render json: @timeslots, except: hidden_fields end def create @timeslot = Timeslot.new(params.require(:timeslot).permit(:start_time, :duration)) @timeslot.save render json: @timeslot, except: hidden_fields end private def hidden_fields [:created_at, :updated_at, :end_time] end def search_params params.permit(:date) end end <file_sep>/test/unit/search_test.rb require 'search' require 'test_helper' class SearchTest < ActiveSupport::TestCase class SearchSpy < SearchAvailability def initialize(boat_sizes, booking_sizes) @count = 0 super(boat_sizes, booking_sizes) end def accept? result = super @count += 1 if result result end def count @count end end def test_availability_search boat_sizes = [1, 3, 5] booking_sizes = [3, 2, 1] expected = { quality: 3, solution: [{ index: 0, booking: 1 }, { index: 2, booking: 2 }, { index: 1, booking: 3 }] } obj = SearchSpy.new(boat_sizes, booking_sizes) assert_equal(expected, obj.depth_first_search) # optimal solution is the second of the 7 it would check in exhaustive search assert_equal(2, obj.count) end end <file_sep>/test/models/timeslot_test.rb require 'test_helper' class TimeslotTest < ActiveSupport::TestCase def setup @timeslot = Timeslot.new(start_time: 1_000_000, duration: 20) end def test_valid_timeslot assert @timeslot.valid? end def test_validates_start_time_is_integer [10.5, "foo", nil].each do |val| @timeslot.start_time = val assert @timeslot.invalid? end end def test_validates_duration_is_positive_integer [10.5, "foo", nil, -10].each do |val| @timeslot.duration = val assert @timeslot.invalid? end end def test_duration assert_equal(20, @timeslot.duration) end def test_availability assert_equal(999_989, timeslots(:one).availability) end def test_customer_count assert_equal(11, timeslots(:one).customer_count) end # boat is assi def test_availability_with_conflicting_assignments t1 = Timeslot.create(start_time: 1_000_000, duration: 20) t2 = Timeslot.create(start_time: 1_000_000, duration: 20) Assignment.create(boat: boats(:rtfm), timeslot: t1) Assignment.create(boat: boats(:rtfm), timeslot: t2) Assignment.create(boat: boats(:nonsense), timeslot: t2) assert_equal(40, t1.availability) assert_equal(40, t2.availability) booking = Booking.create(size: 20, timeslot: t1) assert_equal(20, t1.availability) assert_equal(15, t2.availability) booking.size = 10 booking.timeslot = t2 booking.save t1.bookings.delete_all assert_equal(40, t2.availability) assert_equal(0, t1.reload.availability) end end <file_sep>/db/migrate/20170923201407_replace_duration_with_end_time.rb class ReplaceDurationWithEndTime < ActiveRecord::Migration[5.1] def change change_table :timeslots do |t| t.integer :end_time, null: false, default: -1 t.index :end_time t.change_default :start_time, from: nil, to: 0 t.index :start_time end change_column_null :timeslots, :start_time, from: true, to: false remove_column :timeslots, :duration, :integer, null: false, default: 0 end end <file_sep>/test/models/boat_test.rb require 'test_helper' class BoatTest < ActiveSupport::TestCase def setup @boat = Boat.new(name: "Pangolin", capacity: 6) end def test_valid_boat assert @boat.valid? end def test_boat_requires_name ["", nil].each do |val| @boat.name = val assert @boat.invalid? end end def test_capacity_requires_positive_integer ["foo", nil, 10.5, 0, -10].each do |val| @boat.capacity = val assert @boat.invalid? end end end <file_sep>/config/routes.rb Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html namespace :api do defaults format: :json do resources :boats, only: [:index, :create] resources :timeslots, only: [:index, :create] resources :assignments, only: [:create] resources :bookings, only: [:create] end end end <file_sep>/test/controllers/api/boats_controller_test.rb require 'test_helper' class Api::BoatsControllerTest < ActionDispatch::IntegrationTest def test_gets_index get api_boats_url assert_response :success expected_response = "[{\"id\":476007621,\"name\":\"Funny, It Worked Last Time...\",\"capacity\":1000000},{\"id\":642448160,\"name\":\"Another Fine Product From The Nonsense Factory\",\"capacity\":15},{\"id\":858695237,\"name\":\"Just Read The Instructions\",\"capacity\":40},{\"id\":1015256526,\"name\":\"Pelagian\",\"capacity\":2},{\"id\":1064137960,\"name\":\"Just Testing\",\"capacity\":10}]" assert_equal(response.body, expected_response) end def test_create assert_difference('Boat.count', 1) do post api_boats_url, params: {boat: {name: "Zodiac", capacity: "2"}} assert_response :success expected_response = "{\"id\":1064137961,\"name\":\"Zodiac\",\"capacity\":2}" assert_equal(response.body, expected_response) end end end <file_sep>/README.md # About An API for a hypothetical river tour company, written as a coding challenge. ## Setup This is a Rails app with nothing extra. [Railsbridge](http://docs.railsbridge.org/installfest/) should have all the setup information you need. ## Complexity etc. The spec does not require a booking to be tied to an individual boat, but a booking may not be split between multiple boats. When a new booking is added to a timeslot, reshuffling pre-existing bookings to other boats can allow for a larger maximum availability. Therefore a timeslot's availability must be recalculated from scratch after any event that could change it. Finding the configuration which permits the largest possible new booking is a combinatorial problem that I suspect is NP-complete. So it probably cannot be done with complexity better than exponential in the number of bookings in the timeslot. With a large enough operation, this could be a problem and we could do some combination of the following: * Adding an `availability` column to the `timeslots` table and recalculating availability only when a new booking or boat is assigned to the timeslot. This way, while `create` actions might still be slow, `index` need not be. * Accepting inexact answers: while it's almost certainly not OK to create bookings that can't be accommodated, occasional false negatives may not be a big problem. There are polynomial-time techniques that will usually give a reasonable lower bound on availability. Here, I use a branch-and-bound approach: modified depth-first search over booking-to-boat assignments. Within a given branch, bookings are added but not removed, so availability can never increase. This lets many branches be ruled out early, saving substantial time over an exhaustive search. ## Conflicting assignments While the spec requires conflicting assignments to be allowed, it does not mention the creation of new conflicting assignments when there is already a booking. Allowing boats to be shuffled between timeslots similarly to how bookings are already shuffled between boats could improve availability a bit further. However this could be confusing and I don't think the benefit is compelling, so I'm not going to implement it. Before saving an assignment, or using it to determine a timeslot's availability, I validate that its boat is not committed elsewhere, ie that none of its conflicting assignments has any bookings. ## Caveats For simplicity of setup, I used the default database, SQLite3. Rails' adapter for it does not handle concurrency well, and the test cases the client provides often result in 500 errors: `ActiveRecord::StatementInvalid (SQLite3::BusyException: database is locked: commit transaction):` Usually a request will be successful if repeated a few seconds later. In production, I would use PG instead. <file_sep>/app/models/timeslot.rb class Timeslot < ApplicationRecord require 'search' has_many :assignments has_many :boats, through: :assignments has_many :bookings attr_accessor :duration validates_numericality_of [:start_time, :duration], only_integer: true, greater_than: 0 after_validation :set_end_time def duration @duration ||= (self.end_time - self.start_time) / 60 end def availability self.reload capacities = valid_boats.map { |boat| boat.capacity } booking_sizes = self.bookings.map { |booking| booking.size } best_distribution = SearchAvailability.new(capacities, booking_sizes).depth_first_search best_distribution.nil? ? 0 : best_distribution[:quality] end def customer_count self.bookings.reduce(0) {|sum, booking| sum + booking.size} end def initialize(attributes={}) self.duration = attributes[:duration] super end def as_json(options = {}) json = super(except: [:created_at, :updated_at, :end_time]) json[:duration] = self.duration.to_i json[:availability] = self.availability json[:customer_count] = self.customer_count json[:boats] = self.boats json end def Timeslot.all_on_date(date) # convert to time so #midnight considers time zone date_start = date.to_time.midnight.to_i date_end = (date + 1.day).to_time.midnight.to_i - 1 Timeslot.all_overlapping_range(date_start, date_end) end def Timeslot.all_overlapping_range(start_time, end_time) Timeslot.where("(start_time BETWEEN :start_time AND :end_time) OR (end_time BETWEEN :start_time_exclusive AND :end_time) OR (start_time < :start_time AND end_time > :end_time)", {start_time: start_time, end_time: end_time, start_time_exclusive: start_time + 1}) end private def set_end_time if (self.end_time.nil? || self.end_time < 0) && self.errors.empty? self.end_time = self.start_time + 60 * @duration.to_i end end def valid_boats valid_assignments = self.assignments.select { |a| a.valid? } valid_assignments.map { |a| a.boat } end end <file_sep>/app/models/assignment.rb class Assignment < ApplicationRecord belongs_to :boat belongs_to :timeslot validates :boat, presence: true validates :timeslot, presence: true validate :no_overlap private def no_overlap if self.errors.empty? overlapping = Timeslot.all_overlapping_range(self.timeslot.start_time, self.timeslot.end_time) .joins(:bookings) .joins(:assignments) .where(assignments: {boat_id: self.boat_id}) .where.not(assignments: {id: self.id}) if overlapping.any? errors.add(:boat, "Not available for that timeslot") end end end end <file_sep>/app/controllers/api/assignments_controller.rb class Api::AssignmentsController < ApplicationController def create boat = Boat.find_by(id: assignment_params[:boat_id]) timeslot = Timeslot.find_by(id: assignment_params[:timeslot_id]) if boat.nil? || timeslot.nil? head :not_found else @assignment = Assignment.new(boat: boat, timeslot: timeslot) if @assignment.save head :created elsif @assignment.errors[:boat].include? "Not available for that timeslot" head :unprocessable_entity end end end private def assignment_params params.require(:assignment).permit(:boat_id, :timeslot_id) end end <file_sep>/test/models/assignment_test.rb require 'test_helper' class AssignmentTest < ActiveSupport::TestCase def setup @assignment = Assignment.new(boat: boats(:nonsense), timeslot: timeslots(:one)) end def test_valid assert @assignment.valid? end def test_boat_must_exist [nil, 999, "foo"].each do |val| @assignment.boat_id = val assert @assignment.invalid? end end def test_timeslot_must_exist [nil, 999, "foo"].each do |val| @assignment.timeslot_id = val assert @assignment.invalid? end end def test_no_overlaps @assignment.save! # existing assignment already confirmed by booking fixture :one overlapping = [:extends_into_day_1, :before_and_after_day_one] overlapping.each do |name| a = Assignment.new(boat: boats(:nonsense), timeslot: timeslots(name)) assert a.invalid? end Booking.last.delete overlapping.each do |name| a = Assignment.new(boat: boats(:nonsense), timeslot: timeslots(name)) assert a.valid? end end def test_adjoining_timeslots @assignment.timeslot = timeslots(:just_before_two) @assignment.save! Booking.create!(size: 1, timeslot: timeslots(:just_before_two)) a = Assignment.new(boat: boats(:nonsense), timeslot: timeslots(:midnight_of_two)) assert a.valid? end end <file_sep>/db/migrate/20170924064823_timeslot_boat_association.rb class TimeslotBoatAssociation < ActiveRecord::Migration[5.1] def change create_join_table :timeslots, :boats, table_name: :assignments do |t| t.index :timeslot_id t.index :boat_id end end end <file_sep>/test/models/booking_test.rb require 'test_helper' class BookingTest < ActiveSupport::TestCase def setup @booking = Booking.new(size: 5, timeslot: timeslots(:one)) end def test_valid assert @booking.valid? end def test_timeslot_must_exist [nil, 999, "foo"].each do |val| @booking.timeslot_id = val assert @booking.invalid? end end def test_size_must_be_positive_integer [nil, 10.5, "foo", 0, -10].each do |val| @booking.size = val assert @booking.invalid? end end def test_timeslot_has_room @booking.timeslot = timeslots(:just_before_two) assert @booking.invalid? end end <file_sep>/app/controllers/api/boats_controller.rb class Api::BoatsController < ApplicationController def index @boats = Boat.all render json: @boats end def create @boat = Boat.new(params.require(:boat).permit(:name, :capacity)) @boat.save render json: @boat end end <file_sep>/lib/search.rb class DepthFirstSearch def initialize(all_moves) @all_moves = all_moves @last_index_tried = nil end def one_after_last @last_index_tried.nil? ? 0 : @last_index_tried + 1 end def accept? false end def upper_bound(stack) 0 end def quality(solution) 0 end def skip_move make_next_move # side effects, but ignore return value nil end def make_next_move if one_after_last < @all_moves.length @last_index_tried = one_after_last { index: @last_index_tried } end end def backtrack(stack) item = stack.pop @last_index_tried = item[:index] item end def depth_first_search stack = [] best_so_far = nil loop do if accept? q = quality(stack) if best_so_far.nil? || (q > best_so_far[:quality]) best_so_far = {quality: q, solution: Array.new(stack)} end else bound = upper_bound(stack) if best_so_far.nil? || (bound > best_so_far[:quality]) move = make_next_move if !move.nil? stack.push(move) next end else skip_move end end break if stack.empty? backtrack(stack) end best_so_far end end class SearchAvailability < DepthFirstSearch def initialize(boat_sizes, booking_sizes) super(boat_sizes) @all_moves.sort @bookings = booking_sizes end def accept? @bookings.empty? end def upper_bound(stack) quality(stack) end # could be more efficient with a heap def quality(_) @all_moves.max || 0 end def make_next_move move = super size = @bookings[-1] i = @all_moves.slice(@last_index_tried..-1).find_index { |capacity| capacity >= size } return nil if move.nil? || i.nil? @bookings.pop @all_moves[@last_index_tried + i] -= size @last_index_tried = 0 move[:index] += i move[:booking] = size move end # return item, for consistency def backtrack(stack) item = super(stack) size = item[:booking] @bookings.push(size) @all_moves[@last_index_tried] += size item end end <file_sep>/db/migrate/20170924225820_add_index_to_assignment.rb class AddIndexToAssignment < ActiveRecord::Migration[5.1] def change drop_join_table :timeslots, :boats, table_name: :assignments create_table :assignments do |t| t.integer :timeslot_id, null: false t.integer :boat_id, null: false t.index :timeslot_id t.index :boat_id end end end
17cf86b1fe61dee6c32a0c2d6e52188e6106c321
[ "Markdown", "Ruby" ]
24
Ruby
cdouglass/tour_scheduling
e81da496f59fe9ce086596f14d79efa9fd64be6a
30d6dae5aa1abdd6641f28827dfac9c0d4be910a
refs/heads/master
<repo_name>izzahd/SoalShift_modul2_C03<file_sep>/soal5/soal5b.c #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <signal.h> int main() { char *kill_argv[]={"pkill", "soal5", NULL}; execv("/usr/bin/pkill",kill_argv); } <file_sep>/soal5/soal5.c #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <time.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/home/izzah/modul2")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); while(1) { time_t raw; struct tm *timeinfo; time(&raw); timeinfo = localtime(&raw); char tanggal[40], path[80]; strftime(tanggal, sizeof(tanggal), "%d:%m:%Y-%H:%M", timeinfo); sprintf(path, "/home/izzah/modul2/log/%s/", tanggal); mkdir(path, S_IRWXU | S_IRWXO | S_IRWXG); int i = 1; for(i ; i <= 30 ; i++){ char file[50], path2[80]; strcpy(path2, path); sprintf(file, "log%d.log", i); strcat(path2, file); FILE *fwrite, *fread; fread = fopen("/var/log/syslog", "r"); fwrite = fopen(path2,"w"); char ch; if(fread != NULL && fwrite != NULL){ while ((ch = fgetc(fread)) != EOF) fputc(ch, fwrite); fclose(fwrite); } sleep(60); } } exit(EXIT_SUCCESS); } <file_sep>/soal4/soal4.c #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <time.h> #include <fcntl.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); int i=1; while(1) { struct stat sts; struct tm timesys; struct tm timeacc; char loc[100]; char loc2[100]; memset(loc, 0, sizeof(loc)); memset(loc2, 0, sizeof(loc2)); strcpy(loc, "/home/boy/Documents/makanan/makan_enak.txt"); strcpy(loc2, "/home/boy/Documents/makanan/"); stat (loc,&sts); timeacc = *localtime(&sts.st_atime); time_t T= time(NULL); timesys = *localtime(&T); if (difftime(mktime(&timesys), mktime(&timeacc)) <= 30){ strcpy(loc2+strlen(loc2),"makan_sehat"); char ctr[1000]; sprintf(ctr,"%d", i); strcpy(loc2+strlen(loc2), ctr); strcpy(loc2+strlen(loc2), ".txt"); creat(loc2, S_IRWXU | S_IRWXG | S_IRWXO ); i++; } sleep(5); } exit(EXIT_SUCCESS); } <file_sep>/soal2/soal2.c include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <pwd.h> #include <grp.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); while(1){ struct stat ss; char bro[100] = "/home/boy/hatiku/elen.ku"; stat(bro, &ss); struct passwd *pw = getpwuid(ss.st_uid); struct group *gr = getgrgid(ss.st_gid); if((strcmp(pw->pw_name, "www-data") == 0) && (strcmp(gr->gr_name, "www-data") ==0)) { remove(bro); } char mode[] = "0777"; int i; i = strtol (mode, 0, 8); chmod(bro,i); sleep(3); } exit(EXIT_SUCCESS); } <file_sep>/README.md # SoalShift_modul2_C03 ## Soal 1 Elen mempunyai pekerjaan pada studio sebagai fotografer. Suatu hari ada seorang klien yang bernama Kusuma yang meminta untuk mengubah nama file yang memiliki ekstensi .png menjadi “[namafile]_grey.png”. Karena jumlah file yang diberikan Kusuma tidak manusiawi, maka Elen meminta bantuan kalian untuk membuat suatu program C yang dapat mengubah nama secara otomatis dan diletakkan pada direktori /home/[user]/modul2/gambar. Catatan : Tidak boleh menggunakan crontab. ### Jawaban : ``` #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <dirent.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); while(1) { char nama[5000]; char namapng[5000]; char *ilangpng; char *source; char *dest; DIR *d; struct dirent *dir; d = opendir("/home/izzah/modul2"); if (d != NULL) { while ((dir = readdir(d)) != NULL) { strcpy(nama, dir->d_name); strcpy(namapng, nama); ilangpng = strrchr(nama, '.'); if (strstr(nama, ".png")) { *ilangpng = '\0'; strcat(nama, "_grey.png"); char fdest[100] = "/home/izzah/modul2/gambar/"; char fsource[100]= "/home/izzah/modul2/"; dest = strcat(fdest, nama); source = strcat(fsource, namapng);; rename(source, dest); } } closedir(d); } sleep(30); } exit(EXIT_SUCCESS); } ``` * Buka direktori tempat file png berada. * Mencari dan menyimpan nama file pada direktori tersebut yang memiliki ekstensi .png * Nama file baru ditambahkan dengan _grey.png setelah nama file lama dihapus .png nya * Menambahkan destination path pada nama file baru, juga menambahkan source path pada nama file lama * Rename source menjadi dest agar file png berpindah ke direktori tujuan dengan penambahan _grey pada nama file nya. ## Soal 2 Pada suatu hari Kusuma dicampakkan oleh Elen karena Elen dimenangkan oleh orang lain. Semua kenangan tentang Elen berada pada file bernama “elen.ku” pada direktori “hatiku”. Karena sedih berkepanjangan, tugas kalian sebagai teman Kusuma adalah membantunya untuk menghapus semua kenangan tentang Elen dengan membuat program C yang bisa mendeteksi owner dan group dan menghapus file “elen.ku” setiap 3 detik dengan syarat ketika owner dan grupnya menjadi “www-data”. Ternyata kamu memiliki kendala karena permission pada file “elen.ku”. Jadi, ubahlah permissionnya menjadi 777. Setelah kenangan tentang Elen terhapus, maka Kusuma bisa move on. Catatan: Tidak boleh menggunakan crontab ### Jawaban : ``` include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <pwd.h> #include <grp.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); while(1){ struct stat ss; char bro[100] = "/home/boy/hatiku/elen.ku"; stat(bro, &ss); struct passwd *pw = getpwuid(ss.st_uid); struct group *gr = getgrgid(ss.st_gid); if((strcmp(pw->pw_name, "www-data") == 0) && (strcmp(gr->gr_name, "www-data") ==0)) { remove(bro); } char mode[] = "0777"; int i; i = strtol (mode, 0, 8); chmod(bro,i); sleep(3); } exit(EXIT_SUCCESS); } ``` * Membuat direktori hatiku dan membuat file elen.ku dengan menggunakan touch. * Mencari tahu owner dan group dari file elen.ku. * Membuat struct dan menyimpan user id owner dan group di dalam struct tersebut. * Membandingkan user id owner dan user id group www-data. Jika sama, maka file elen.ku akan dihapus. * Untuk mengubah permission menjadi 777 (dalam oktal) maka kita perlu mengubah string "0777" ke dalam oktal menggunakan strtol. * Selanjutnya, chmod. ## Soal 3 Diberikan file campur2.zip. Di dalam file tersebut terdapat folder “campur2”. Buatlah program C yang dapat : i) mengekstrak file zip tersebut. ii) menyimpan daftar file dari folder “campur2” yang memiliki ekstensi .txt ke dalam file daftar.txt. Catatan: * Gunakan fork dan exec. * Gunakan minimal 3 proses yang diakhiri dengan exec. * Gunakan pipe * Pastikan file daftar.txt dapat diakses dari text editor ### Jawaban : ``` #include <stdlib.h> #include <sys/wait.h> #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <string.h> int main() { pid_t child_id; pid_t child_id2; pid_t child_id3; pid_t child_id4; int status; child_id = fork(); if (child_id < 0) { exit(EXIT_FAILURE); } if (child_id == 0) { char *argv[3] = {"unzip", "campur2.zip", NULL}; execv("/usr/bin/unzip", argv); } else { child_id2 = fork(); if (child_id2 < 0) { exit(EXIT_FAILURE); } if (child_id2 == 0) { char *argv[3] = {"touch", "daftar.txt", NULL}; execv("/usr/bin/touch", argv); } else { while ((wait(&status))> 0); FILE *out_file = fopen("daftar.txt","w"); char *ls[3] = {"ls", "campur2", NULL}; char *grep[3] = {"grep", ".*.txt$", NULL}; int A[2], B[2]; int output; char abcde[5000]; pipe(A); pipe(B); if (pipe(A) < 0){ exit(EXIT_FAILURE); } if (pipe(B) < 0){ exit(EXIT_FAILURE); } child_id3 = fork(); if (child_id3 < 0) { exit(EXIT_FAILURE); } if (child_id3 == 0) { dup2(A[1], 1); close(A[0]); close(A[1]); execvp ("ls", ls); } else { child_id4 = fork (); if (child_id4 == 0){ dup2(A[0], 0); dup2(B[1], 1); close(A[1]); close(A[0]); close(B[1]); close(B[0]); execvp("grep", grep); } else { close(B[1]); close(A[1]); close(A[0]); output = read(B[0], abcde, sizeof(abcde)); fprintf(out_file, "%.*s\n", output, abcde); } } fclose(out_file); } } } ``` * Buat file daftar.txt menggunakan touch. * Unzip file campur2.zip * Melihat file apa saja yang berada dalam folder campur2 menggunakan ls. * Mendapatkan file-file yang berekstensi .txt menggunakan grep. * Print hasil grep ke dalam file daftar.txt ## Soal 4 Dalam direktori /home/[user]/Documents/makanan terdapat file makan_enak.txt yang berisikan daftar makanan terkenal di Surabaya. Elen sedang melakukan diet dan seringkali tergiur untuk membaca isi makan_enak.txt karena ngidam makanan enak. Sebagai teman yang baik, Anda membantu Elen dengan membuat program C yang berjalan setiap 5 detik untuk memeriksa apakah file makan_enak.txt pernah dibuka setidaknya 30 detik yang lalu (rentang 0 - 30 detik). Jika file itu pernah dibuka, program Anda akan membuat 1 file makan_sehat#.txt di direktori /home/[user]/Documents/makanan dengan '#' berisi bilangan bulat dari 1 sampai tak hingga untuk mengingatkan Elen agar berdiet. Contoh: File makan_enak.txt terakhir dibuka pada detik ke-1 Pada detik ke-10 terdapat file makan_sehat1.txt dan makan_sehat2.txt Catatan: - dilarang menggunakan crontab - Contoh nama file : makan_sehat1.txt, makan_sehat2.txt, dst ### Jawaban : ``` #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <time.h> #include <fcntl.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); int i=1; while(1) { struct stat sts; struct tm timesys; struct tm timeacc; char loc[100]; char loc2[100]; memset(loc, 0, sizeof(loc)); memset(loc2, 0, sizeof(loc2)); strcpy(loc, "/home/boy/Documents/makanan/makan_enak.txt"); strcpy(loc2, "/home/boy/Documents/makanan/"); stat (loc,&sts); timeacc = *localtime(&sts.st_atime); time_t T= time(NULL); timesys = *localtime(&T); if (difftime(mktime(&timesys), mktime(&timeacc)) <= 30){ strcpy(loc2+strlen(loc2),"makan_sehat"); char ctr[1000]; sprintf(ctr,"%d", i); strcpy(loc2+strlen(loc2), ctr); strcpy(loc2+strlen(loc2), ".txt"); creat(loc2, S_IRWXU | S_IRWXG | S_IRWXO ); i++; } sleep(5); } exit(EXIT_SUCCESS); } ``` * Mengambil waktu akses dari file. * Mengambil waktu dari sistem kita. * Setelah mendapatkan keduanya, bandingkan selisih waktu keduanya. Jika selisihnya <= 30, maka buat sebuah file baru dengan nama makan_sehat$.txt . * $ merupakan iterasi sampai tak hingga. ## Soal 5 Kerjakan poin a dan b di bawah: ##### a. Buatlah program c untuk mencatat log setiap menit dari file log pada syslog ke /home/[user]/log/[dd:MM:yyyy-hh:mm]/log#.log Ket: - Per 30 menit membuat folder /[dd:MM:yyyy-hh:mm] - Per menit memasukkan log#.log ke dalam folder tersebut ‘#’ : increment per menit. Mulai dari 1 #### b. Buatlah program c untuk menghentikan program di atas. NB: Dilarang menggunakan crontab dan tidak memakai argumen ketika menjalankan program. ### Jawaban : ``` #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <syslog.h> #include <string.h> #include <time.h> int main() { pid_t pid, sid; pid = fork(); if (pid < 0) { exit(EXIT_FAILURE); } if (pid > 0) { exit(EXIT_SUCCESS); } umask(0); sid = setsid(); if (sid < 0) { exit(EXIT_FAILURE); } if ((chdir("/home/izzah/modul2")) < 0) { exit(EXIT_FAILURE); } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); while(1) { time_t raw; struct tm *timeinfo; time(&raw); timeinfo = localtime(&raw); char tanggal[40], path[80]; strftime(tanggal, sizeof(tanggal), "%d:%m:%Y-%H:%M", timeinfo); sprintf(path, "/home/izzah/modul2/log/%s/", tanggal); mkdir(path, S_IRWXU | S_IRWXO | S_IRWXG); int i = 1; for(i ; i <= 30 ; i++){ char file[50], path2[80]; strcpy(path2, path); sprintf(file, "log%d.log", i); strcat(path2, file); FILE *fwrite, *fread; fread = fopen("/var/log/syslog", "r"); fwrite = fopen(path2,"w"); char ch; if(fread != NULL && fwrite != NULL){ while ((ch = fgetc(fread)) != EOF) fputc(ch, fwrite); fclose(fwrite); } sleep(60); } } exit(EXIT_SUCCESS); } ``` Program yg menghentikan program soal5.c ``` #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <signal.h> int main() { char *kill_argv[]={"pkill", "soal5", NULL}; execv("/usr/bin/pkill",kill_argv); } ```
df4075deda14491c30640b7066f24ce6db3f52aa
[ "Markdown", "C" ]
5
C
izzahd/SoalShift_modul2_C03
b07358bfc3afa540b5b82126ac8c60ea738c8018
0643f175846538e8ea17172ae180aa98e5d8e3b0
refs/heads/master
<repo_name>subrat-sahu/Quora-Nightly<file_sep>/nightly.js function nightly(){ var css = document.createElement("style"); css.type = "text/css"; if(css.innerHTML != "* { background: rgba(0,0,0, 0.8)!important; color: rgba(255,255,255, 0.6)!") css.innerHTML = "* { background: rgba(0,0,0, 0.8)!important; color: rgba(255,255,255, 0.6)!important;}"; else css.innerHTML = "* { background: rgba(255,255,0, 0.8)!}" document.getElementsByTagName("head")[0].appendChild(css); } nightly(); <file_sep>/popup/popup.js let dark = true; let change = () => { if(!dark) {document.getElementById("button").innerHTML = "Lighten Up"; dark = true;} else {document.getElementById('button').innerHTML = "Darken" dark = false;} browser.tabs.executeScript(null, { file: "/nightly.js" }); } document.getElementById("button").addEventListener("click", change); <file_sep>/README.md # Quora Nightly Firefox Add-on Quora Nightly is a Firefox add-on which creates a "nightly" effect on Quora (if you're tired of the plain white background). The add-on is experimental, and can be tested via the "about:debugging" page in your browser. ### To do * Implement a disable/enable option for the add-on #### Screenshots: ![screenshot](https://github.com/TheAdnan/Quora-Nightly/blob/master/test_screenshot/Screenshot_1.jpg) ![screenshot_3](https://user-images.githubusercontent.com/8043309/31342476-e1719376-acda-11e7-8cba-b97e88b215d5.jpg) ![screenshot_4](https://user-images.githubusercontent.com/8043309/31342485-ee0bdbbe-acda-11e7-80a7-70da15459ae8.jpg) ![screenshot_5](https://user-images.githubusercontent.com/8043309/31342495-f39c5900-acda-11e7-8bd4-e06c4e432788.jpg)
0bebe1d9f375a16fd560e293ba29fcbd94c0f9db
[ "JavaScript", "Markdown" ]
3
JavaScript
subrat-sahu/Quora-Nightly
6588c947f7fd0d119e53027228c89863a41a60d6
467af6e9b8e0ccdeafb55c9dfaa683ee0576fd61
refs/heads/main
<repo_name>SergioOrenga/Modern-Exploration-and-Visualization<file_sep>/README.md # Modern-Exploration-and-Visualization Práctica del módulo Modern Exploration and Visualization <file_sep>/practica.js d3.json('practica_airbnb.json').then((featureCollection) => { drawMap(featureCollection) }) var indice = 0 //Creamos el índice que usaremos para seleccionar los datos de la gráfica.Cuando se carga la página se muestra la gráfica del barrio que está en la primera posición del json. //Creamos el elemento Tooltip var tooltip = d3 .select('#mapa') .append('div') .attr('class', 'tooltip') .style('position', 'absolute') //Para obtener la posicion correcta sobre los barrios .style('pointer-events', 'none') //Para evitar el flicker .style('visibility', 'hidden') .style('background-color', 'white') .style('border', 'solid') .style('border-width', '1px') .style('border-radius', '5px') .style('padding', 5) function drawMap(featureCollection) { console.log(featureCollection) console.log(featureCollection.features) var width = 800 var height = 800 featureCollection.features.forEach((d, i) => { d.index = i //Añadimos el índice como propiedad de cada objeto }) var svg = d3 .select('#mapa') .append('svg') .attr('width', width) .attr('height', height + 110) .attr('y', 0) .append('g') var center = d3.geoCentroid(featureCollection) //Encontrar la coordenada central del mapa (de la featureCollection) //to translate geo coordinates[long,lat] into X,Y coordinates. var projection = d3 .geoMercator() .fitSize([width, height], featureCollection) .center(center) //centrar el mapa en una long,lat determinada .translate([width / 2, height / 1.5]) //centrar el mapa en una posicion x,y determinada //Para crear paths a partir de una proyección var pathProjection = d3.geoPath().projection(projection) var features = featureCollection.features var createdPath = svg .selectAll('path') .data(features) .enter() .append('path') .attr('d', (d) => pathProjection(d)) .attr('stroke', function (d) { d.stroke = 'none' }) createdPath.on('click', function (event, d) { d.stroke = d.stroke == 'none' ? 'black' : 'none' //Marca con una linea negra de puntos el contorno del barrio sobre el que se hace clic. Cuando se vuelve a hacer cick sobre el barrio, la linea de puntos desaparece. d3.select(this) .transition() .duration(100) .delay(100) .attr('stroke', d.stroke) .attr('stroke-width', 3) .attr('stroke-dasharray', 5) indice = d.index //Asignamos el índice del barrio seleccionado para actualizar la gráfica con los datos de dicho barrio d3.select('#grafica').select('svg').remove() //Eliminamos la gráfica anterior dibujarGrafica(indice) //Dibujamos la gráfica con el barrio seleccionado con el evento click del ratón }) createdPath.on('mouseover', handleMouseOver).on('mouseout', handleMouseOut) var maximo = d3.max(features, function (d) { return d.properties.avgprice }) var minimo = d3.min(features, function (d) { return d.properties.avgprice }) var color = d3.schemeTableau10 var scaleColor = d3.scaleOrdinal(d3.schemeTableau10) createdPath.attr('fill', function (d) { //Se divide el rango de precios en tantas partes como colores tiene la paleta seleccionada y se le asigna a cada barrio un color dependiendo de su precio medio var tamanyo = (maximo + 1 - minimo) / color.length for (var i = 0; i < color.length; i++) { if (d.properties.avgprice == null) { return 'grey' //los barrios que no tienen valor en avgprice se pintan de color gris } else if ( d.properties.avgprice >= parseInt(minimo + tamanyo * i) && d.properties.avgprice < parseInt(minimo + tamanyo * (i + 1)) ) { return color[i] } } }) //Creacion de una leyenda var nblegend = color.length var widthRect = width / nblegend - 2 var heightRect = 10 //creación del título svg .append('text') .attr('x', width / 2) .attr('y', 20) .attr('text-anchor', 'middle') .style('font-size', '20px') .style('text-decoration', 'underline') .text('Mapa del precio medio del alquiler en los barrios de Madrid') svg .append('text') .attr('x', width / 2) .attr('y', 50) .attr('text-anchor', 'middle') .style('font-size', '15px') .style('font-style', 'italic') .text( 'Leyenda: codigos de colores por precio medio de alquiler por barrio. Los que no tienen precio establecido se muestran en color gris', ) var scaleLegend = d3.scaleLinear().domain([0, nblegend]).range([0, width]) var legend = svg .append('g') .selectAll('rect') .data(color) .enter() .append('rect') .attr('width', widthRect) .attr('height', heightRect) .attr('x', (d, i) => scaleLegend(i)) .attr('y', 60) .attr('fill', (d) => d) var tamanyo = (maximo + 1 - minimo) / color.length var text_legend = svg .append('g') .selectAll('text') .data(color) .enter() .append('text') .attr('x', (d, i) => scaleLegend(i)) .attr('y', heightRect * 8) .text(function (d, i) { return parseInt(minimo + tamanyo * i) + ' Eur' }) .attr('font-size', 12) } function handleMouseOver(event, d) { d3.select(this).transition().duration(1000) tooltip .transition() .duration(200) .style('visibility', 'visible') .style('left', event.pageX + 20 + 'px') .style('top', event.pageY - 30 + 'px') .text( `Barrio: ${d.properties.name}, Precio medio: ${d.properties.avgprice} Eur`, ) } function handleMouseOut(event, d) { d3.select(this).transition().duration(200) tooltip.transition().duration(200).style('visibility', 'hidden') } //Aquí empieza el código de la gráfica dibujarGrafica(indice) function dibujarGrafica(idx) { d3.json('practica_airbnb.json').then((featureCollectionTwo) => { drawGraph(featureCollectionTwo) }) function drawGraph(featureCollectionTwo) { console.log(featureCollectionTwo) console.log(featureCollectionTwo.features) var height = 500 var width = 700 var marginbottom = 100 var margintop = 80 var svg = d3 .select('#grafica') .append('svg') .attr('width', width + 50) .attr('height', height + marginbottom + margintop) .append('g') .attr('transform', 'translate(50,' + margintop + ')') var featuresGraph = featureCollectionTwo.features[idx].properties.avgbedrooms //Creacion de escalas var domainX = featuresGraph.map(function (d) { return d.bedrooms }) var xscale = d3.scaleBand().domain(domainX).range([0, width]).padding(0.1) var yscale = d3 .scaleLinear() .domain([ 0, d3.max(featuresGraph, function (d) { return d.total }), ]) .range([height, 0]) //Creación de eje X var xaxis = d3.axisBottom(xscale) var yaxis = d3.axisLeft(yscale) //Creacion de los rectangulos var rect = svg .selectAll('rect') .data(featuresGraph) .enter() .append('rect') .attr('fill', '#f28383') rect.attr('class', (d) => { if (d.total > 10) { return 'rectwarning' } }) rect .attr('x', function (d) { return xscale(d.bedrooms) }) .attr('y', (d) => { return yscale(0) }) .attr('width', xscale.bandwidth()) .attr('height', function () { return height - yscale(0) //Al cargarse los rectangulos tendran una altura de 0 }) .on('mouseover', function () { d3.select(this).attr('class', '').attr('fill', '#e3dd24') }) .on('mouseout', function () { d3.select(this) .attr('fill', '#f28383') .attr('class', (d) => { if (d.total > 10) { return 'rectwarning' } }) }) rect .transition() //transición de entrada .duration(1000) .delay(function (d, i) { return i * 300 }) .attr('y', (d) => { return yscale(d.total) }) .attr('height', function (d) { return height - yscale(d.total) //Altura real de cada rectangulo. }) //Añadimos el texto correspondiente a cada rectangulo. var text = svg .selectAll('text') .data(featuresGraph) .enter() .append('text') .text((d) => d.total) .attr('x', function (d) { return xscale(d.bedrooms) + xscale.bandwidth() / 2 }) .attr('y', (d) => { return yscale(d.total) }) .style('opacity', 0) //Transicción de entrada en el texto. text.transition().duration(500).style('opacity', 1) //Añadimos el eje X svg .append('g') .attr('transform', 'translate(0,' + height + ')') .call(xaxis) //Añadimos eje Y svg.append('g').attr('transform', 'translate(0, 0)').call(yaxis) // Titulo x axis svg .append('text') .attr( 'transform', 'translate(' + width / 2 + ' ,' + (height / 2 + 285) + ')', ) .style('text-anchor', 'middle') .text('Numero de habitaciones') // Titulo y axis svg .append('text') .attr('y', -50) .attr('x', -250) .attr('transform', 'rotate(-90)') .attr('dy', '1em') .style('text-anchor', 'middle') .text('Numero de propiedades') //creación del título svg .append('text') .attr('x', width / 2) .attr('y', -60) .attr('text-anchor', 'middle') .style('font-size', '20px') .style('text-decoration', 'underline') .text( 'Grafica del numero de propiedades del barrio ' + featureCollectionTwo.features[idx].properties.name, ) svg .append('text') .attr('x', width / 2) .attr('y', -40) .attr('text-anchor', 'middle') .style('font-size', '15px') .style('font-style', 'italic') .text( 'Agrupadas por numero de habitaciones disponibles en cada propiedad', ) } }
5c24c56699880b903cef6a051529e1af69f9699c
[ "Markdown", "JavaScript" ]
2
Markdown
SergioOrenga/Modern-Exploration-and-Visualization
6ac2c15715bf26ba7398ac78e7b4eca418a3aae7
6eedaca405387c0286871eb6a587ce0f7246ed58
refs/heads/master
<file_sep>package tornadofx.kitchensink.samples.masterdetail.simple.view import tornadofx.* class MainView : View("Person Editor") { override val root = hbox { add<PersonList>() add<PersonEditor>() } } <file_sep>package tornadofx.kitchensink.samples.masterdetail.scopewithdata.view import tornadofx.View import tornadofx.hbox class MainView : View("Person Editor - double click to edit") { override val root = hbox { add<PersonList>() } } <file_sep>## Scoped Master/Detail with ViewModel in custom scope This sample shows how to communicate between a master and a detail view using scopes. When the user double clicks an item in the TableView, a new Window is popped up to operate on the selected user. The user is made available by putting a ViewModel inside a custom scope subclass called `PersonScope`: ```kotlin class PersonScope : Scope() { val model = PersonModel() } ``` The `edit` function in the list view takes care of creating a new scope and associating the ViewModel item with the selected user before opening the editor in the context of our new scope. ```kotlin fun editPerson(person: Person) { val editScope = PersonScope() editScope.model.item = person find(PersonEditor::class, editScope).openWindow() } ``` Inside the `PersonEditor`, the ViewModel is looked up via the scope. We also make sure to cast the scope to make it easier to work with. ```kotlin // Cast scope override val scope = super.scope as PersonScope // Extract our view model from the scope val model = scope.model ``` Changes to the form inputs will be flushed back into the model when you click the save button, so you should see the table view in the background update when you hit save.<file_sep>package tornadofx.kitchensink.view import javafx.scene.control.TreeItem import tornadofx.* import tornadofx.kitchensink.controller.SampleController import tornadofx.kitchensink.model.SampleEntry import tornadofx.kitchensink.model.SampleModel class SampleTree : View() { val controller: SampleController by inject(DefaultScope) val model: SampleModel by inject() override val root = treeview<SampleEntry> { isShowRoot = false prefWidth = 200.0 bindSelected(model) runAsync { controller.root } ui { root = TreeItem(it) populate { (it.value as? SampleEntry.Category)?.samples } } } }<file_sep>package tornadofx.kitchensink.samples.masterdetail.scope.view import tornadofx.* import tornadofx.kitchensink.samples.masterdetail.scope.controller.PersonController import tornadofx.kitchensink.samples.masterdetail.scope.model.Person import tornadofx.kitchensink.samples.masterdetail.scope.model.PersonModel class PersonList : View() { private val controller : PersonController by inject() override val root = tableview(controller.persons) { prefWidth = 400.0 smartResize() column("Id", Person::idProperty) column("Name", Person::nameProperty) onUserSelect { edit(it) } } private fun edit(person: Person) { val editScope = Scope() val model = PersonModel() model.item = person setInScope(model, editScope) find(PersonEditor::class, editScope).openWindow() } }<file_sep>package tornadofx.kitchensink.app import com.jpro.JProApplication import com.jpro.WebAPI import javafx.stage.Stage import tornadofx.* import tornadofx.kitchensink.view.MainScreen class KitchenSinkApp : App(MainScreen::class, Styles::class) class JProScope(val stage: Stage) : Scope() { val webAPI: WebAPI get() = WebAPI.getWebAPI(stage) } val Component.webAPI: WebAPI get() = (scope as JProScope).webAPI class Main : JProApplication() { val app = KitchenSinkApp() override fun start(primaryStage: Stage) { app.scope = JProScope(primaryStage) app.start(primaryStage) } override fun stop() { app.stop() super.stop() } }<file_sep>@file:Suppress("UNCHECKED_CAST") package tornadofx.kitchensink.model import javafx.beans.property.SimpleStringProperty import javafx.collections.FXCollections import tornadofx.ItemViewModel import tornadofx.UIComponent import javax.json.JsonObject import kotlin.reflect.KClass sealed class SampleEntry { val name = SimpleStringProperty() override fun toString() = name.value open class Category(json: JsonObject) : SampleEntry() { val samples = FXCollections.observableArrayList<SampleEntry>() init { name.value = json.getString("name") samples.setAll(json.getJsonArray("samples").map { it as JsonObject if (it.containsKey("samples")) Category(it) else Sample(it) }) } } class Sample(json: JsonObject) : SampleEntry() { init { name.value = json.getString("name") } val entrypoint = json.getString("entrypoint") val baseURL: String get() = "https://github.com/edvin/tornadofx-kitchensink/tree/master/src/main/kotlin/${entrypoint.replace(".", "/")}" val mainViewType: KClass<UIComponent> get() = Class.forName("$entrypoint.view.MainView").kotlin as KClass<UIComponent> } } class SampleModel : ItemViewModel<SampleEntry>() { val name = bind { item?.name } }<file_sep>package tornadofx.kitchensink.view import tornadofx.* class MainScreen : View("TornadoFX Samples") { override val root = hbox { add<SampleTree>() add<SampleViewer>() } }<file_sep>package tornadofx.kitchensink.samples.masterdetail.scopewithdata.view import javafx.geometry.Pos import javafx.scene.control.TableView import tornadofx.* import tornadofx.kitchensink.samples.masterdetail.scopewithdata.model.PersonScope import tornadofx.kitchensink.samples.masterdetail.scopewithdata.model.PhoneNumber class PersonEditor : View() { override val scope = super.scope as PersonScope private val model = scope.model private var numbersTable: TableView<PhoneNumber> by singleAssign() override val root = form { fieldset("Personal Information") { field("Name") { textfield(model.name) } button("Save") { setOnAction { model.commit() } } } fieldset("Phone Numbers") { vbox(5.0) { tableview(model.phoneNumbers) { numbersTable = this prefHeight = 200.0 isEditable = true smartResize() column("Country code", PhoneNumber::countryCodeProperty).makeEditable() column("Number", PhoneNumber::numberProperty).makeEditable() } hbox { alignment = Pos.TOP_CENTER spacing = 10.0 button("Add Number").action(::addPhoneNumber) button("Delete Number") { disableWhen { numbersTable.selectionModel.selectedItemProperty().isNull } // disables when nothing is selected action(::deletePhoneNumber) } } } } } private fun addPhoneNumber() { val newNumber = PhoneNumber("", "") model.addPhoneNumber(newNumber) numbersTable.selectionModel.select(newNumber) numbersTable.edit(numbersTable.items.size - 1, numbersTable.columns.first()) } private fun deletePhoneNumber() { numbersTable.selectedItem?.let(model::removePhoneNumber) } } <file_sep>@file:Suppress("UNCHECKED_CAST") package tornadofx.kitchensink.view import javafx.scene.layout.Priority import javafx.scene.layout.StackPane import javafx.scene.web.WebView import tornadofx.* import tornadofx.kitchensink.model.SampleEntry import tornadofx.kitchensink.model.SampleModel class SampleViewer : View() { val model: SampleModel by inject() override val root = tabpane { hboxConstraints { hGrow = Priority.ALWAYS } tab("Example") { stackpane { loadCodeSampleOnChange() } } tab("Code and Description") { webview { loadReadmeOnChange() } } tabs.forEach { it.isClosable = false } } private fun WebView.loadReadmeOnChange() { model.itemProperty.onChange { if (it is SampleEntry.Sample) { engine.load(it.baseURL) } } } private fun StackPane.loadCodeSampleOnChange() { model.itemProperty.onChange { if (it is SampleEntry.Sample) { runAsync { find(it.mainViewType) } ui { children.setAll(it.root) } } } } }<file_sep>package tornadofx.kitchensink.samples.masterdetail.scopewithdata.model import javafx.beans.property.SimpleIntegerProperty import javafx.beans.property.SimpleStringProperty import javafx.collections.FXCollections import tornadofx.* class Person(id: Int, name: String, phoneNumbers: List<PhoneNumber>) { val idProperty = SimpleIntegerProperty(id) var id by idProperty val nameProperty = SimpleStringProperty(name) var name by nameProperty val phoneNumbersProperty = FXCollections.observableArrayList(phoneNumbers) } class PersonModel(person: Person? = null): ItemViewModel<Person>(person) { val id = bind(Person::idProperty) val name = bind(Person::nameProperty) val phoneNumbers = bind(Person::phoneNumbersProperty) fun addPhoneNumber(phoneNumber: PhoneNumber) { phoneNumbers.value.add(phoneNumber) } fun removePhoneNumber(phoneNumber: PhoneNumber) { phoneNumbers.value.remove(phoneNumber) } } class PersonScope : Scope() { val model = PersonModel() }<file_sep>package tornadofx.kitchensink.samples.alignment.view import javafx.geometry.Insets import javafx.geometry.Pos import javafx.scene.effect.DropShadow import javafx.scene.paint.Color import tornadofx.* /** * A sample demonstrating the use of vbox constraints and tilepane alignment * */ class MainView : View("Alignment") { override val root = anchorpane { tilepane { prefRows = 3 prefColumns = 3 padding = Insets(40.0) hgap = 20.0 vgap = 20.0 vbox { label(Pos.TOP_LEFT.toString()) { //margin = Insets(5.0) } alignment = Pos.TOP_LEFT } vbox { label(Pos.TOP_CENTER.toString()) { //margin = Insets(5.0) } alignment = Pos.TOP_CENTER } vbox { label(Pos.TOP_RIGHT.toString()) { //margin = Insets(5.0) } alignment = Pos.TOP_RIGHT } vbox { label(Pos.CENTER_LEFT.toString()) { //margin = Insets(5.0) } alignment = Pos.CENTER_LEFT } vbox { label(Pos.CENTER.toString()) { //margin = Insets(5.0) } alignment = Pos.CENTER } vbox { label(Pos.CENTER_RIGHT.toString()) { //margin = Insets(5.0) } alignment = Pos.CENTER_RIGHT } vbox { label(Pos.BOTTOM_LEFT.toString()) { //margin = Insets(5.0) } alignment = Pos.BOTTOM_LEFT } vbox { label(Pos.BOTTOM_CENTER.toString()) { //margin = Insets(5.0) } alignment = Pos.BOTTOM_CENTER } vbox { label(Pos.BOTTOM_RIGHT.toString()) { //margin = Insets(5.0) } alignment = Pos.BOTTOM_RIGHT } children.style { backgroundColor += Color.TAN effect = DropShadow() prefWidth = 150.px prefHeight = 150.px padding = box(10.px) } } } } <file_sep>## Scoped Master/Detail This sample shows how to communicate between a master and a detail view using scopes. When the user double clicks an item in the TableView, a new Window is popped up to operate on the selected user. The user is made available to the editor using injection only for that scope. The `edit` function in the list view takes care of creating a new scope and associating a viewmodel for the selected user with that scope: ```kotlin fun edit(person: Person) { val editScope = Scope() val model = PersonModel() model.item = person setInScope(model, editScope) find(PersonEditor::class, editScope).openWindow() } ``` Inside the `PersonEditor`, the ViewModel is simply injected, since the default scope for the editor will be the scope it was created with: ```kotlin // Inject the PersonModel created in the edit function val model : PersonModel by inject() ``` Changes to the form inputs will be flushed back into the model when you click the save button, so you should see the table view in the background update when you hit save.<file_sep>## Alignment Demonstrating alignment builder syntax. A `TilePane` is used to wrap 9 `VBox` instances. Each `VBox` has a different configured `alignment` for its children. The only child of each `VBox` is a `Label`, which is also configured with a `margin`. Instead of using the static JavaFX margin syntax of `VBox.setMargin(label, insets)` we use the TornadoFX Node property `margin` directly: ```kotlin label("Position") { margin = Insets(5.0) } ``` It looks like we are setting a property on the `Label` while infact the static `VBox.setMargin` call is applied for us. This makes the ui code much leaner. To apply styles to each `VBox`, the `style` helper is used so we don't need to iterate over all the children manually to apply the styles: ```kotlin children.style { backgroundColor += Color.TAN effect = DropShadow() prefWidth = 150.px prefHeight = 150.px padding = box(10.px) } ``` An alternative here would be to apply a style class to each `VBox` and configure this in a Stylesheet instead. <file_sep>package tornadofx.kitchensink.samples.masterdetail.simple.model import javafx.beans.property.SimpleStringProperty import tornadofx.* class PhoneNumber(countryCode: String, number: String) { val countryCodeProperty = SimpleStringProperty(countryCode) var countryCode by countryCodeProperty val numberProperty = SimpleStringProperty(number) var number by property(number) }<file_sep>package tornadofx.kitchensink.controller import tornadofx.Controller import tornadofx.kitchensink.model.SampleEntry import javax.json.Json class SampleController : Controller() { val root: SampleEntry.Category by lazy { SampleEntry.Category(Json.createReader(resources.url("/samples.json").openStream()).readObject()) } }<file_sep>## Scoped Master/Detail This sample shows how to communicate between a master and a detail view with shared data. When the selected item changes in the TableView, the form on the right begins to edit the item. Changes to the form inputs will be flushed back into the model when you click the save button. The phone numbers associated with a Person can be edited in an editable TableView inside the detail view. Those changes are committed when you press enter in the TextField editor for the current column. Both the master and detail View share the same PersonModel by injecting it: ```kotlin val model : PersonModel by inject() ``` Since no scope is given to the inject function, they both fetch the PersonModel from the global/default scope named `DefaultScope`. To open a new editor with a separate scope, you can find or inject a MainView (the holder for both master and detail Views) with a unique scope: ```kotlin find(MainView::class, Scope()).openModal() ``` No state is shared in the Scope for this sample, but it would be a good alternative to subclass `Scope` and put the shared view model in there instead of using injection. <file_sep># TornadoFX Kitchen Sink Samples This project contains samples and best practices for the TornadoFX project. Each sample is self contained in it's own package structure to make it easy to extract a sample for use in your own project. Every sample comes with a description to help you understand what's going on and will highlight relevant parts of the code you might want to direct special attention towards. A [runnable jar](http://tornadofx.tornado.no/kitchensink/fxlauncher.jar) is available that will launcher the kitchen sink automatically. We also have a native installer for [Windows](http://tornadofx.tornado.no/kitchensink/tornadofx-kitchensink-1.0.exe) and [Mac](http://tornadofx.tornado.no/kitchensink/tornadofx-kitchensink-1.0.dmg). ## Contributing samples - Clone the project (git clone https://github.com/edvin/tornadofx-kitchensink) - Add a package inside `tornadofx.kitchensink.samples` for your sample - Depending on your sample, add the relevant packages and files inside your sample package: - `controller` - For controllers - `view` - For views, fragments and other UI components - `model` - For model objects and view models - `README.md`- Description and helpful information about the sample - Describe your sample in the [samples.json](tree/master/src/main/resources/samples.json) descriptor - Either pick an existing category or create a new under the `samples` node. Describe your sample like this: ```json { "name": "Person Editor", "entrypoint": "tornadofx.kitchensink.samples.masterdetail.simple" } ``` The `entrypoint` should point to the sample package. This is the package where you'll add the `README.md` along with the other sub packages described above. ### Minimal requirement for new samples You must include a `view/MainView.kt` with a `MainView` class. This class must extend `View` or `Fragment`. Finally, create a PR and we'll be happy to add your sample! <file_sep>package tornadofx.kitchensink.app import tornadofx.Stylesheet import tornadofx.px class Styles : Stylesheet() { init { root { fontSize = 13.px } } }<file_sep>package tornadofx.kitchensink.samples.masterdetail.scopewithdata.view import tornadofx.* import tornadofx.kitchensink.samples.masterdetail.scopewithdata.controller.PersonController import tornadofx.kitchensink.samples.masterdetail.scopewithdata.model.Person import tornadofx.kitchensink.samples.masterdetail.scopewithdata.model.PersonScope class PersonList : View() { private val controller : PersonController by inject() override val root = tableview(controller.persons) { prefWidth = 400.0 smartResize() column("Id", Person::idProperty) column("Name", Person::nameProperty) onUserSelect { editPerson(it) } } private fun editPerson(person: Person) { val editScope = PersonScope() editScope.model.item = person find(PersonEditor::class, editScope).openWindow() } }<file_sep>package tornadofx.kitchensink.samples.masterdetail.simple.view import tornadofx.* import tornadofx.kitchensink.samples.masterdetail.simple.controller.PersonController import tornadofx.kitchensink.samples.masterdetail.simple.model.Person import tornadofx.kitchensink.samples.masterdetail.simple.model.PersonModel class PersonList : View() { private val controller : PersonController by inject() private val model : PersonModel by inject() override val root = tableview(controller.persons) { column("Id", Person::idProperty) column("Name", Person::nameProperty) bindSelected(model) smartResize() } }<file_sep>group 'no.tornado.tornadofx' version '1.0' buildscript { ext.kotlin_version = '1.2.21' ext.tornadofx_version = '1.7.15' ext.jpro_version = '0.1.9-SNAPSHOT' ext.jpro_plugin_version = ext.jpro_version ext.jpro_webapi_version = '1.0.6.9-SNAPSHOT' repositories { maven { url "http://mix-software.com:8081/nexus/content/repositories/jpro-snapshots" } maven { url "http://sandec.bintray.com/repo" } mavenCentral() jcenter() } dependencies { classpath "com.jprotechnologies.jpro:jpro-plugin-gradle:$jpro_plugin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'no.tornado:fxlauncher-gradle-plugin:1.0.15' } } repositories { jcenter() mavenLocal() } apply plugin: 'kotlin' apply plugin: 'no.tornado.fxlauncher' apply plugin: 'com.jprotechnologies.jpro' startServerCommand { jvmArgs '-Xmx2048m' //jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,address=5006,suspend=y' } compileKotlin { kotlinOptions.jvmTarget = "1.8" } fxlauncher { applicationVendor 'Tornado' applicationUrl 'http://tornadofx.tornado.no/kitchensink/' applicationMainClass 'tornadofx.kitchensink.app.KitchenSinkApp' acceptDowngrade false deployTarget 'w144768@tornadofx.tornado.no:www/kitchensink' } dependencies { //compile("com.jprotechnologies.jpro:jpro-webapi-extensions:$jpro_webapi_version") compile("no.tornado:tornadofx:$tornadofx_version") compile("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") } mainClassName = 'tornadofx.kitchensink.app.Main' jpro { port = 8080 visible = false noRenderJobs = true useJProVM = false jproVersion = "$jpro_version" }
0beea87a0f6fe05dbaf60e84d91129fbbe94ff9d
[ "Markdown", "Kotlin", "Gradle" ]
22
Kotlin
vadimpikha/tornadofx-kitchensink
b036796d036a35d0081d5badba8af7a8d36146f4
a4629e79545239c1043cc91dab395c39876f4950
refs/heads/master
<repo_name>wajihwerghi/Poc<file_sep>/SolutionTestTNR/src/main/java/config/config.properties url = https://www.linkedin.com/login?fromSignIn=true&trk=guest_homepage-basic_nav-header-signin username= <EMAIL> password= <PASSWORD> browser = chrome<file_sep>/SolutionTestTNR/src/main/java/page/HomePage.java package page; import base.BaseTest; public class HomePage extends BaseTest { } <file_sep>/SolutionTestTNR/src/test/java/testcases/LoginTest.java package testcases; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import base.BaseTest; import page.HomePage; import page.LoginPage; public class LoginTest extends BaseTest { LoginPage loginPage; HomePage homePage; public LoginTest() { super(); } @BeforeMethod public void setUp() { initialization(); loginPage= new LoginPage(); } // un cas de test 1 @Test(priority=1) public void loginPageTitleTest() { String Title = loginPage.ValidateLoginPageTitle(); Assert.assertEquals(Title, "S’identifier sur LinkedIn | LinkedIn"); } @Test(priority=2) public void loginTest() throws InterruptedException { homePage = loginPage.Login(prop.getProperty("username"), prop.getProperty("password")); } @AfterMethod public void TearDown() { driver.quit(); } } <file_sep>/SolutionTestTNR/src/main/java/base/BaseTest.java package base; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import io.github.bonigarcia.wdm.WebDriverManager; import util.TestUtil; public class BaseTest { public static WebDriver driver; public static Properties prop; public BaseTest() { try { prop = new Properties(); FileInputStream ip = new FileInputStream("\\Users\\wajih\\eclipse-workspace\\FreeCRMTest\\src\\" +"\\main\\java\\com\\E2ETest\\config\\config.properties"); prop.load(ip); }catch(FileNotFoundException e){ e.printStackTrace(); }catch(IOException e){ e.printStackTrace(); } } public void initialization () { String browserName = prop.getProperty("browser"); if (browserName.equals("Chrome")){ WebDriverManager.chromedriver().setup(); // System.setProperty("webdriver.chrome.driver", "/Users/wajih/eclipse-workspace/" // +"/FreeCRMTest/driver/chrome/chromedriver.exe"); driver= new ChromeDriver(); } else { WebDriverManager.chromedriver().setup(); // WebDriverManager.firefoxdriver().setup(); // System.setProperty("webdriver.gecho.driver", "/Users/wajih/eclipse-workspace/SolutionTestTNR/Driver/Firefox/geckodriver.exe"); // driver= new FirefoxDriver(); // System.setProperty("webdriver.chrome.driver", "/Users/wajih/eclipse-workspace/" // +"/FreeCRMTest/driver/chrome/chromedriver.exe"); driver= new ChromeDriver(); } driver.manage().window().maximize(); driver.manage().deleteAllCookies(); driver.manage().timeouts().pageLoadTimeout(TestUtil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS); driver.manage().timeouts().implicitlyWait(TestUtil.IMPLICIT_WAIT, TimeUnit.SECONDS); driver.get(prop.getProperty("url")); } public void getScreenshot(String result) throws IOException { File scrfile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(scrfile, new File("C://Users//wajih//Desktop//Nouveau dossier//" +result+"Screenshot.jpg")); } }
b9c2a8cf8f3de5ec9db98d4ec645b605c0e73853
[ "Java", "INI" ]
4
INI
wajihwerghi/Poc
bad7a95facbe56a29f4de023079af1649fe0b35a
efde1b086308f6423b33616aad5044c06d41b032
refs/heads/master
<file_sep>var gulp = require('gulp'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var cssmin = require('gulp-cssmin'); var jsFiles = ['./js/script.js', './js/main.js']; gulp.task('buildJs', function () { return gulp.src(jsFiles) .pipe(concat('all.js')) .pipe(uglify()) .pipe(gulp.dest('./dist/')); }); gulp.task('watch', function () { gulp.watch(jsFiles, ['buildJs']), gulp.watch(cssFiles, ['buildCss']); }); //task for css concatenation var cssFiles = ['./css/style.css', './css/style2.css']; gulp.task('buildCss', function () { return gulp.src(cssFiles) .pipe(concat('all.css')) .pipe(cssmin()) .pipe(gulp.dest('./dist/')); }); gulp.task('default', ['buildCss', 'buildJs']);
4c2adb1d1221e43d157b5267336edbf58e561f52
[ "JavaScript" ]
1
JavaScript
innavashchuk/js-pre-production-lesson2
5aac4a14e446a87ef794894ea38867b6f1151fb2
fadc1cba9f394c268fc2446a95a451071771fb8d
refs/heads/master
<repo_name>edu-pazmino/nucli<file_sep>/lib/common/routerInjector.js 'use strict'; var fs = require('fs'); var util = require('util'); var path = require('path'); var errors = require('./errors'); var Router = require('./web/router'); module.exports = function routerInjector(config) { validateObject(config); var files = getFiles(config.dirname); files.forEach(file => { let fileName = getFileNameWithoutExtensions(file); let inject = getInjector(config.dirname, file); let model = inject(config.globalConfig); injectRoute({ app:config.app, routerPath: (fileName === 'index') ? '/' : `/${fileName}`, router: Router({schemaConfig: model}) }); }); }; function validateObject(config) { if (!config) { throw new errors.UnexpectedArgument('Injector should be have a config'); } if (!util.isFunction(config.app) || !util.isFunction(config.app.use)) { throw new errors.UnexpectedArgument('Injector should be have a config with app express [config.app]'); } if (!util.isObject(config.globalConfig)) { throw new errors.UnexpectedArgument('Injector should be have a config with globalConfig [config.globalConfig]'); } if (!util.isString(config.dirname)) { throw new errors.UnexpectedArgument('Injector should be have a config with dirName [config.dirname]'); } } function getFiles(dirname) { return fs.readdirSync(dirname); } function getFileNameWithoutExtensions(file) { return file.replace(/\.[^/.]+$/, ''); } function getInjector(dirname, file) { return require(path.resolve(dirname, file)); } function injectRoute(config) { config.app.use(config.routerPath, config.router); } <file_sep>/lib/database/DatabaseBuilder.js /// <reference path="../typings/tsd.d.ts" /> 'use stritc'; var util = require('util'); var errors = require('../common/errors'); var Sequelize = require('sequelize'); var sequelize = Symbol(); // db password: <PASSWORD> class DatabaseBuilder { constructor(builderConfig) { validateBuilderConfig(builderConfig); this.sequelize = new Sequelize(builderConfig); } withSchema(newSchema) { } build() { } } function validateBuilderConfig(config) { if (!util.isObject(config)) { throw new errors.UnexpectedArgument('DatabaseBuilder expected a builderConfig object'); } if (!util.isString(config.host)) { throw new errors.UnexpectedArgument('DatabaseBuilder expected a builderConfig with host'); } if (!util.isString(config.databaseName)) { throw new errors.UnexpectedArgument('DatabaseBuilder expected a builderConfig with databaseName'); } if (!util.isString(config.username)) { throw new errors.UnexpectedArgument('DatabaseBuilder expected a builderConfig with username'); } if (!util.isString(config.password)) { throw new errors.UnexpectedArgument('DatabaseBuilder expected a builderConfig with password'); } } module.exports = DatabaseBuilder; <file_sep>/lib/common/database/schema.js /// <reference path="../../typings/tsd.d.ts" /> "use strict"; var util = require('util'); var errors = require('../errors'); var mongoose = require('mongoose'); var async = require('async'); module.exports = function (config) { validateSchemaConfig(config); let schema = new mongoose.Schema(config.schema); let Model = mongoose.model(config.name, schema); Model.validate = function validate(doc, callback) { async.each(getKeysFromDoc(doc), (k, next) => { let path = getSchemaPath.call(this, k); if (!path) { return next(new errors.UnexpectedArgument(`${k} is not present in User doc`)); } if (!path.options.validate.validator(doc[k])) { return next(new errors.UnexpectedArgument(`${k} is an invalid object for User doc`)); } next && next(); }, callback); }; Model.save = function save(doc, callback) { if (!doc) { return callback(new errors.UnexpectedArgument('Model doc cannot be null')); } let instance = new Model(doc); instance.validate((err) => { if (err) return callback(err); instance.save((err) => { if (err) return callback(err); callback(null, instance); }); }); }; Model.upgrade = function upgrade(filter, updateDoc, callback) { if (!updateDoc) { return callback(new errors.UnexpectedArgument('Model doc cannot be null')); } Model.validate(updateDoc, (err) => { if (err) return callback(err); Model.update(filter, updateDoc, (err, doc) => { if (err) return callback(err); callback(null, doc); }); }); }; return Model; }; function validateSchemaConfig(config) { if (!config) { throw new errors.UnexpectedArgument('Schema should have a config object'); } if (!config.name) { throw new errors.UnexpectedArgument('Schema should have a config with name model'); } if (!util.isObject(config.schema)) { throw new errors.UnexpectedArgument('Schema should have a config with schema'); } } function getKeysFromDoc(doc) { return Object.keys(doc); } function getSchemaPath(key) { return this.schema.path(key); } <file_sep>/lib/common/errors/type/UnexpectedArgument.js 'use strict'; const PREFIX_MSG = 'Unexpected Argument::'; class UnexpectedArgument extends TypeError { constructor(msg) { super(`${PREFIX_MSG} ${msg}`); } } module.exports = UnexpectedArgument; <file_sep>/lib/typings/tsd.d.ts /// <reference path="node/node.d.ts" /> /// <reference path="bluebird/bluebird.d.ts" /> /// <reference path="lodash/lodash.d.ts" /> /// <reference path="sequelize/sequelize.d.ts" /> /// <reference path="validator/validator.d.ts" /> /// <reference path="async/async.d.ts" /> <file_sep>/lib/common/errors/index.js 'use strict'; exports.UnexpectedArgument = require('./type/UnexpectedArgument'); <file_sep>/routes/users.js 'use strict'; var util = require('util'); var express = require('express'); var errors = require('../lib/common/errors'); var User = require('../lib/users/repository/User'); module.exports = function () { var router = express.Router(); router.get('/', getUsers); router.get('/:username', getUserByUsername); router.post('/', postUsers); router.put('/:username', putUser); router.delete('/:username', deleteUser); return router; }; function getUsers(req, res, next) { User.find(onUserFound.bind(this, res, next)); } function getUserByUsername(req, res, next) { User.find(getUsernameQuery(req.params), onUserFound.bind(this, res, next)); } function onUserFound(res, next, err, users) { if (handlerError(err, next)) return false; res.send(users); } function postUsers(req, res, next) { let user = new User(req.body); user.validate((err) => { if (handlerError(err, next)) return false; user.save((err) => { if (handlerError(err, next)) return false; res.status(200).send('Save'); }); }); } function putUser(req, res, next) { let userUpdateObject = getUserUpdateObject(req); User.validate(userUpdateObject, (err) => { if (handlerError(err, next)) return false; User.update(getUsernameQuery(req.params), userUpdateObject, (err, user) => { if (handlerError(err, next)) return false; res.status(200).send('Update'); }); }); } function getUserUpdateObject(req) { if (!req.body || !util.isObject(req.body) || Object.keys(req.body).length ===0) throw new errors.UnexpectedArgument('invalid user update object'); return req.body; } function getUsernameQuery(query) { if (query.username) { return { username: new RegExp(`^${query.username}`, 'g') }; } return null; } function deleteUser(req, res) { } function handlerError(err, next) { if (err) { next(err); return true; } return false; }
58571fd85b63cd2a7f52d0a2eb826e17d2c39f97
[ "JavaScript", "TypeScript" ]
7
JavaScript
edu-pazmino/nucli
284e2e43ba4eee244cf856987bdf3f7686b81308
d7503b617394ec1b0426c334f77451c65e38082f
refs/heads/master
<repo_name>dustintktran/chatterbox-client<file_sep>/client/scripts/rooms.js var Rooms = { rooms: [], currentRoom: undefined, add: function(){ var newRoom = prompt('What room name?' || 'noName'); this.rooms.push(newRoom); $('#rooms select').append(`<option value = "${newRoom}">${newRoom}</option>`) // console.log('clicked'); } };
2eea02b56c8b3cf5ad366292915158f274039986
[ "JavaScript" ]
1
JavaScript
dustintktran/chatterbox-client
c3fb2271caee6c0b493c69c0e323021d8f9267a9
efaff370d591ead0d81672e34fbe4678e2d05017
refs/heads/master
<repo_name>dgtlife/material-for-meteor<file_sep>/server/imports/api/md-utils.js /** * @file Defines MD utility functions for the server. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2015 */ import { check } from 'meteor/check'; import { stripPrefix, stripSuffix, underscoreToHyphen, addPrefix, addSuffix } from '../../../imports/api/md-utils.js'; /** * Customize the target symbol id based on properties in the config. The * config is derived from the file config when defining icon asset files. * @param {string} id - the symbol id * @param {object} config - the parsing config */ const customizeId = (id, config) => { check(id, String); check(config, Object); let _id; // Strip a prefix if required. if (config.stripPrefix) { _id = stripPrefix(id, config.stripPrefix); } // Strip a suffix if required. if (config.stripSuffix) { _id = stripSuffix(id, config.stripSuffix); } // Convert underscores to hyphens if required. if (config.hyphensOnly) { _id = underscoreToHyphen(id); } // Add a prefix if required. if (config.addPrefix) { _id = addPrefix(id, config.addPrefix); } // Add a suffix if required. if (config.addSuffix) { _id = addSuffix(id, config.addSuffix); } return _id; }; export default customizeId; <file_sep>/client/imports/ui/md-toolbar/md-toolbar.js /** * @file Defines the on-render callback for MD Toolbar * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2015 */ import { Template } from 'meteor/templating'; import { importToolbarContent } from '../../api/md-toolbar-api.js'; import './md-toolbar.jade'; // On render callback for MD Toolbar. Template.md_toolbar.onRendered(function onRenderedToolbar() { if ((!this.data.use_bar_templates) && (!this.data.content)) { // Import the content for this toolbar importToolbarContent(this.data.id); } // ToDo: Determine whether detectTabs can/should be called here. }); <file_sep>/client/imports/ui/md-dropdown-menu/md-dropdown-menu.js /** * @file Defines on-render callback for MD Dropdown Menu. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { Template } from 'meteor/templating'; import { eqS, platform } from '../../api/md-utils.js'; import './md-dropdown-menu.jade'; Template.md_dropdown_menu.onRendered( function onRenderedDropdownMenu() { const dropdownMenu = this.firstNode; /* * In Firefox, the dropdown arrow is not aligned with the right edge of the * dropdown menu element, as it is in Chrome and Safari. Since there is no * platform selectivity in CSS, this 'hack' allows us to support Firefox * (for whatever that's worth). */ if (platform.isFirefoxOnDesktop) { eqS(dropdownMenu, '[data-icon]').classList.add('on-firefox'); } } ); <file_sep>/client/imports/api/md-radio-api.js /** * @file Defines the API for MD Radio * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Meteor } from 'meteor/meteor'; import { _ } from 'meteor/underscore'; import { dqS, eqSA, getElement } from './md-utils.js'; /** * Import the radio buttons for the supplied radio group. * ToDo: Create a utility function for importing nodes. * @param {Element} groupElement - the group element */ export const importRadioButtons = (groupElement) => { // Get the group value; const group = groupElement.getAttribute('data-group'); // Look for any node containing radio buttons for this radio group. const tempButtonContainer = dqS(`[data-buttons-for="${group}"]`); if (tempButtonContainer) { const buttonNodes = Array.from(tempButtonContainer.childNodes); /* * Move each radio button node from its temporary container parent, into the * new radio group parent. */ _.each(buttonNodes, buttonNode => groupElement.appendChild(buttonNode)); // Remove the temporary container. tempButtonContainer.parentElement.removeChild(tempButtonContainer); } }; /** * Set a radio button in a radio group as 'checked'. * @param {Element} group - the radio group element * @param {string} value - the value to be assigned to the radio group */ const setCheckedButton = (group, value) => { // Get the radio buttons; const buttons = eqSA(group, '[data-radio-button]'); // Set the button with the matching value as 'checked'; clear the others. _.each(buttons, (button) => { if (button.getAttribute('data-value') === value) { button.setAttribute('data-checked', 'true'); } else { button.removeAttribute('data-checked'); } }); }; /** * Initialize the value of a radio group that has its 'data-selected' * attribute preset. It sets the button that corresponds to the 'data-selected' * value of the group as 'checked'. * @param {Element} group - the group element */ export const initializeValueOfRadioGroup = group => setCheckedButton(group, group.getAttribute('data-selected')); /** * Enable a radio button that is disabled, by removing the 'disabled' attribute. * @param {string} selector - the selector for the radio button */ export const enableRadioButton = selector => dqS(selector).removeAttribute('data-disabled'); /** * Disable a radio button that is enabled, by setting the 'disabled' attribute. * @param {string} selector - a selector for the button */ export const disableRadioButton = selector => dqS(selector).setAttribute('data-disabled', 'true'); /** * Get the value of a radio group. This is for use 'from a distance', when one * is not operating directly on the radio group element. * @param {string} selector - a selector for the radio group element */ export const getValueOfRadioGroup = selector => dqS(selector).getAttribute('data-selected'); /** * Clear the value of a radio group. * @param {string|Element} groupSpec - a selector for the group or the group * element itself */ export const clearValueOfRadioGroup = (groupSpec) => { // Get the group element. const group = getElement(groupSpec); // Remove the "data-checked" attribute from all buttons in this group. const buttons = eqSA(group, '[data-radio-button]'); _.each(buttons, button => button.removeAttribute('data-checked')); // Remove the "data-selected" attribute from the group element. group.removeAttribute('data-selected'); }; /** * Set the value of a radio group. * @param {string} selector - a selector for the radio group * @param {string} value - the value to be assigned to the radio group */ export const setValueOfRadioGroup = (selector, value) => { if (!value) { throw new Meteor.Error( `A value must be supplied; use "clearValueOfRadioGroup()" to clear a radio group, if desired.` ); } // Get the group element. const group = dqS(selector); // Clear the value of the radio group. clearValueOfRadioGroup(group); // Set the corresponding button as 'checked'. setCheckedButton(group, value); // Set the data-selected' value of the radio group element. group.setAttribute('data-selected', value); }; /** * Assign the 'data-value' of the supplied (clicked) radio button to its * radio group element. * @param {Element} button - the button element */ const assignButtonValueToGroup = (button) => { // Clear 'data-checked' from all buttons in the group. clearValueOfRadioGroup(button.parentElement); // Set the 'data-checked' value for the checked button. button.setAttribute('data-checked', 'true'); // Set the 'data-selected' attribute in the radio group element. const value = button.getAttribute('data-value'); button.parentElement.setAttribute('data-selected', value); }; /** * Handler for the click event on an MD radio button. * @param {Element} button - the button element */ export const handleClickOnRadioButton = (button) => { if (!(button.hasAttribute('data-checked') || button.hasAttribute('data-disabled'))) { /* * Set the selected value of the radio group (which includes 'checking' * the appropriate button). */ assignButtonValueToGroup(button); } }; <file_sep>/server/imports/api/md-icon-api.js /** * @file Defines the API for MD Icon on the server * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Mongo } from 'meteor/mongo'; import { check, Match } from 'meteor/check'; import { _ } from 'meteor/underscore'; import { Meteor } from 'meteor/meteor'; import customizeId from './md-utils.js'; // A collection that holds the icon metadata. export const Icons = new Mongo.Collection('icons'); /** * Parses an icon asset file, extracts the icon metadata for the specified icons * from the SVG source, and inserts a metadata document per icon into the Icons * collection. * @param {object} assetConfig - an object that defines an asset file and the * icons to be extracted from it. */ export const parseIconAssets = (assetConfig) => { const iconsDefinedByG = assetConfig.iconsDefinedByG; const iconsDefinedBySvg = assetConfig.iconsDefinedBySvg; if (iconsDefinedByG && (iconsDefinedByG.length > 0)) { // Process the icons defined by <g> tags in each specified file. _.each(iconsDefinedByG, (config) => { // Check the input before proceeding. check(config.file, String); check(config.include, Match.Optional(Match.OneOf(String, [String]))); check(config.stripPrefix, Match.Optional(String)); check(config.stripSuffix, Match.Optional(String)); check(config.addPrefix, Match.Optional(String)); check(config.addSuffix, Match.Optional(String)); check(config.hyphensOnly, Match.Optional(Boolean)); // Read the lines of the file into an array. const lines = config.file.split('\n'); // Extract only the id and raw content of each <g> element (one per line). _.each(lines, (line) => { if (line && line.match(/<\/g>/)) { // It's a line with an icon definition on it. Parse it. const _id = line.match(/<g [^>]*id="(.+?)"[^<]*>(.+?)<\/g>/)[1]; const content = line.match(/<g [^>]*id="(.+?)"[^<]*>(.+?)<\/g>/)[2]; // Customize the id, if configured. const id = customizeId(_id, config); // Apply icon selection. if (config.include === 'all') { // Insert a metadata document for this (and every) <g> element. if (!Icons.findOne({ id: id })) { Icons.insert({ id: id, content: content }); } return; } /* * Insert a metadata document for this <g> element if the '_id' is * in the 'include' list. */ if (_.contains(config.include, _id)) { if (!Icons.findOne({ id: id })) { Icons.insert({ id: id, content: content }); } } } }); }); } if (iconsDefinedBySvg && (iconsDefinedBySvg.length > 0)) { // Process the icons defined by <svg> tags in each specified file. _.each(iconsDefinedBySvg, (config) => { // Check the input before proceeding. check(config.file, String); check(config.include, Match.Optional(Match.OneOf(String, [String]))); check(config.stripPrefix, Match.Optional(String)); check(config.stripSuffix, Match.Optional(String)); check(config.addPrefix, Match.Optional(String)); check(config.addSuffix, Match.Optional(String)); check(config.hyphensOnly, Match.Optional(Boolean)); // Read the lines of the file into an array. const lines = config.file.split('\n'); // Extract only the id and content of each <svg> element (one per line). _.each(lines, (line) => { if (line && line.match(/<\/svg>/)) { // It's a line with an icon definition on it. Parse it. const _id = line.match(/<svg [^>]*id="(.+?)"[^<]*>(.+?)<\/svg>/)[1]; const content = line.match(/<svg [^>]*id="(.+?)"[^<]*>(.+?)<\/svg>/)[2]; // Customize the id, if configured. const id = customizeId(_id, config); // Apply icon selection. if (config.include === 'all') { // Insert a metadata document for this (and every) <svg> element. if (!Icons.findOne({ id: id })) { Icons.insert({ id: id, content: content }); } return; } /* * Insert a metadata document for this <svg> element if the '_id' is * in the 'include' list. */ if (_.contains(config.include, _id)) { if (!Icons.findOne({ id: id })) { Icons.insert({ id: id, content: content }); } } } }); }); } }; /** * Select icons from the (Polymer-derived) included sets to be used in the app. * @param {[object]} iconConfigs - an array of objects, each of which defines * an iconset, and the icons from the set that * are to be used in the app. */ export const selectIcons = (iconConfigs) => { check(iconConfigs, [Object]); // Process the configs. _.each(iconConfigs, (config) => { let fileSpec; // Compute the file spec. if (config.set === 'base') { fileSpec = Assets.getText('server/imports/assets/md-icon-base.svg'); } else if (config.set === 'av') { fileSpec = Assets.getText('server/imports/assets/md-icon-av.svg'); } else if (config.set === 'communication') { fileSpec = Assets.getText('server/imports/assets/md-icon-communication.svg'); } else if (config.set === 'device') { fileSpec = Assets.getText('server/imports/assets/md-icon-device.svg'); } else if (config.set === 'editor') { fileSpec = Assets.getText('server/imports/assets/md-icon-editor.svg'); } else if (config.set === 'hardware') { fileSpec = Assets.getText('server/imports/assets/md-icon-hardware.svg'); } else if (config.set === 'image') { fileSpec = Assets.getText('server/imports/assets/md-icon-image.svg'); } else if (config.set === 'maps') { fileSpec = Assets.getText('server/imports/assets/md-icon-maps.svg'); } else if (config.set === 'notification') { fileSpec = Assets.getText('server/imports/assets/md-icon-notification.svg'); } else if (config.set === 'social') { fileSpec = Assets.getText('server/imports/assets/md-icon-social.svg'); } else if (config.set === 'extras') { fileSpec = Assets.getText('server/imports/assets/md-icon-extras.svg'); } else { throw new Meteor.Error( 'The iconset specified is not included in this package.' ); } // Compose an asset config. const assetConfig = { iconsDefinedByG: [ { file: fileSpec, include: config.include, hyphensOnly: true } ] }; // Parse. parseIconAssets(assetConfig); }); }; /** * Checks a custom icon asset config, then calls the parser. * @param {object} assetConfig - an object that defines an asset file and the * icons to be extracted from it. */ export const defineIconAssets = (assetConfig) => { check(assetConfig, { iconsDefinedBySvg: Match.Optional([Object]), iconsDefinedByG: Match.Optional([Object]) }); // Parse. parseIconAssets(assetConfig); }; <file_sep>/client/imports/ui/md-underline/md-underline.js /** * @file Loads the MD Underline template file. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import './md-underline.jade'; <file_sep>/client/imports/api/md-dropdown-menu-api.js /** * @file Defines the API for MD Dropdown Menu * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { Meteor } from 'meteor/meteor'; import { dqS, eqS } from './md-utils.js'; import { setValueOfMenu, clearValueOfMenu } from './md-menu-api.js'; import { closeOpenMenus, closePopupMenu } from './md-menu-common-api.js'; import { setLabelAndUnderlineFocused, setLabelAndUnderlineUnfocused } from './md-text-input-api.js'; /** * Assign the supplied value to a dropdown menu. This involves assigning the * value to the data-selected value of the dropdown menu element, and to the * value of the embedded input element. (This is part of the chain of execution * after a user clicks a dropdown menu item.) * @param {Element} menu - the embedded menu element * @param {string} value - the value to be assigned to the dropdown menu */ export function assignValueOfDropdownMenu(menu, value) { const field = menu.parentElement.parentElement; field.setAttribute('data-selected', value); eqS(field, '[data-dropdown-input]').value = value; setLabelAndUnderlineUnfocused(field); } /** * Open a dropdown menu. * @param {Element} menu - the popup menu element embedded in the dropdown menu */ export function openDropdownMenu(menu) { // Close any open menus. closeOpenMenus(); // Get the field element. const field = menu.parentElement.parentElement; // Set the label and underline to focused style. setLabelAndUnderlineFocused(field); // Set the position of the popup menu. setPositionOfDropdownMenu(field, menu); // Set an animation attribute, if necessary. if (menu.parentElement.hasAttribute('data-opening-animation')) { const opening_animation = menu.parentElement.getAttribute( 'data-opening-animation' ); menu.setAttribute('data-opening-animation', opening_animation); } // Set the 'data-menu-open' attribute to indicate that the menu is open. menu.setAttribute('data-menu-open', 'true'); /* * Attach a listener for closing the menu with a click. * Note: This will close the menu with a click on the document, including any * item on this menu. * * Define an event handler for the click event listener */ function closeThisMenu(event) { event.preventDefault(); // Ensure that the trigger was not clicked. const target = event.target; if ( !( target.hasAttribute('data-trigger-target') && (target.getAttribute('data-trigger-target') === menu.id) ) ) { // We have not clicked the dropdown trigger of an open menu. Close menu. closePopupMenu(menu); // Reset the label and underline. setLabelAndUnderlineUnfocused(field); // Remove the event listeners. document.removeEventListener('click', closeThisMenu); } } // Attach the event listeners. Meteor.defer( () => document.addEventListener('click', closeThisMenu) ); } /** * Set the position of a dropdown menu via the style attribute. * @param {Element} field - the field element * @param {Element} menu - the embedded menu element */ export function setPositionOfDropdownMenu(field, menu) { // Get the specified position for the menu from the parent element. const position = menu.parentElement.getAttribute('data-position'); // Get the element dimensions to compute the menu position settings. const input = eqS(field, '[data-dropdown-input]'); menu.setAttribute('style', 'display: block; opacity: 0;'); const left = ((input.clientWidth - menu.clientWidth) / 2); const topMiddle = -((menu.clientHeight - 35) / 2); menu.removeAttribute('style'); // Compose the style that positions the menu. function composeStyle(spec) { if (spec === 'down') { return `top: 0; left: ${left}px; z-index: 8;`; } else if (spec === 'middle') { return `top: ${topMiddle}px; left: ${left}px; z-index: 8;`; } else if (spec === 'up') { return `bottom: 0; left: ${left}px; z-index: 8;`; } return undefined; } let style; if (position === 'dropdown-up') { style = composeStyle('up'); } else if (position === 'dropdown-middle') { style = composeStyle('middle'); } else if (position === 'dropdown-down') { style = composeStyle('down'); } else { style = composeStyle('down'); } // Set the style on the menu; it will display automatically. menu.setAttribute('style', style); } /** * Set the supplied value to a dropdown menu. This involves assigning the * value to the data-selected value of the dropdown menu element, and to the * value of the embedded input element. * @param {String} selector - a selector for the dropdown menu * @param {string} value - the value to be assigned to the dropdown menu */ export function setValueOfDropdownMenu(selector, value) { if (!value) { throw new Meteor.Error( 'missing-parameter', 'A value must be supplied; use "clearValueOfDropdownMenu()" to clear a dropdown menu, if desired.'); } setValueOfMenu(eqS(dqS(selector), '[data-dropdown-menu]'), value); } /** * Get the value of a dropdown menu. * @param {string} selector - a selector for the dropdown menu */ export function getValueOfDropdownMenu(selector) { if (selector) { return dqS(selector).getAttribute('data-selected'); } return undefined; } /** * Clear the value of a dropdown menu. * @param {string} selector - a selector for the dropdown menu */ export function clearValueOfDropdownMenu(selector) { const field = dqS(selector); // Clear the value of the input, and reset the label position. eqS(field, '[data-dropdown-input]').value = null; setLabelAndUnderlineUnfocused(field); // Clear the value of the embedded menu. clearValueOfMenu(eqS(field, '[data-dropdown-menu]')); } <file_sep>/TODO.txt ##### ToDo Items for the Package ##### ToDo: Memoize DOM queries ToDo: Remove all CoffeeScript? ToDo: Add scrolling tab bar capability. ToDo: Complete inline ToDos ;-) ToDo: Tests<file_sep>/client/imports/ui/md-menu/md-menu.js /** * @file Defines the on-render callback and event handler(s), for MD Menu. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2015 */ import { Template } from 'meteor/templating'; import { _ } from 'meteor/underscore'; import { eqS, eqSA, runScroller } from '../../api/md-utils.js'; import { handleClickOnMenuItem, importMenuItems } from '../../api/md-menu-api.js'; import './md-menu.jade'; // On-render callback for MD Menu. Template.md_menu.onRendered(function onRenderedMenu() { // Import any menu items for this menu. importMenuItems(this.data.id); // Initialize any scrollable container. const scrollableContainer = eqS(this.firstNode, '[data-scrollable]'); if (scrollableContainer) { runScroller(scrollableContainer); } // Initialize any pre-selected list item. if (this.firstNode.hasAttribute('data-list-selector')) { const selectedIndex = this.firstNode.getAttribute('data-selected'); if (selectedIndex) { // Set the item as selected. ToDo: Add a method for this to the API. const selectedItem = eqS(this.firstNode, `[data-index="${selectedIndex}"]`); const indicator = eqS(selectedItem, '[data-selection-indicator]'); selectedItem.classList.add('selected'); indicator.classList.remove('unselected'); } } }); // Event handlers for MD Menu. Template.md_menu.events({ // Selection of a menu item with a click. 'click [data-menu-item]'(event) { handleClickOnMenuItem(event.currentTarget); }, // Click an list item in List-selector mode. 'click [data-list-item]'(event) { const listItem = event.currentTarget; const indicator = eqS(listItem, '[data-selection-indicator]'); const menu = listItem.parentElement.parentElement; if (listItem.classList.contains('selected')) { // Un-select this item. listItem.classList.remove('selected'); indicator.classList.add('unselected'); menu.removeAttribute('data-selected'); } else { // Clear all items. const listItems = eqSA(listItem.parentElement, '[data-list-item]'); _.each(listItems, (_listItem) => { const _indicator = eqS(_listItem, '[data-selection-indicator]'); if (_listItem.classList.contains('selected')) { _listItem.classList.remove('selected'); _indicator.classList.add('unselected'); } }); // Select the clicked item. listItem.classList.add('selected'); indicator.classList.remove('unselected'); menu.setAttribute('data-selected', listItem.getAttribute('data-index')); } } }); <file_sep>/client/imports/ui/md-scrollable/md-scrollable.js /** * @file <describe this file> * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import './md-scrollable.jade'; <file_sep>/md-tests.js /** * @file Tests for the rendering and operation of components in the package * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2015 */ <file_sep>/client/imports/ui/md-checkbox/md-checkbox.js /** * @file Defines the API, and event handler for MD Checkbox. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Template } from 'meteor/templating'; import { setStateOfCheckbox } from '../../api/md-checkbox-api.js'; import './md-checkbox.jade'; // On-render callback for MD Checkbox. Template.md_checkbox.onRendered(function onRenderedCheckbox() { // Handle pre-checked state. if (this.data.checked || (this.data.checked === '')) { setStateOfCheckbox(this.firstNode, true); } }); // Event handlers for MD Checkbox. Template.md_checkbox.events({ // Toggle the checked state of the MD Checkbox. 'click [data-checkbox]'(event) { const checkbox = event.currentTarget; if (!checkbox.hasAttribute('data-disabled')) { if (checkbox.hasAttribute('data-checked')) { setStateOfCheckbox(checkbox, false); } else { setStateOfCheckbox(checkbox, true); } } } }); <file_sep>/client/imports/api/md-text-input-api.js /** * @file Defines the API for MD Text Input * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Meteor } from 'meteor/meteor'; import { _ } from 'meteor/underscore'; import { dqS, eqS } from './md-utils.js'; import { setStyleOfUnderlineFocused, setStyleOfUnderlineUnfocused, setStyleOfUnderlineErrored, setStyleOfUnderlineValid } from './md-underline-api.coffee'; import { setStyleOfLabelFocused, setStyleOfLabelUnfocused, setStyleOfLabelErrored, setStyleOfLabelValid } from './md-label-api.coffee'; /** * Set the label and underline of a text input field to the focused position * and appearance. * @param {Element} field - the text input field element */ export const setLabelAndUnderlineFocused = (field) => { setStyleOfLabelFocused(field); setStyleOfUnderlineFocused(field); }; /** * Set the label and underline of a text input field to the unfocused position * and appearance. * @param {Element} field - the text input field element */ export const setLabelAndUnderlineUnfocused = (field) => { setStyleOfLabelUnfocused(field); setStyleOfUnderlineUnfocused(field); }; /** * Set the label and underline of a text input field to the errored position * and appearance. * @param {Element} field - the text input field element */ export const setLabelAndUnderlineErrored = (field) => { setStyleOfLabelErrored(field); setStyleOfUnderlineErrored(field); }; /** * Set the label and underline of a text input field to the valid position * and appearance. * @param {Element} field - the text input field element */ export const setLabelAndUnderlineValid = (field) => { setStyleOfLabelValid(field); setStyleOfUnderlineValid(field); }; /** * Get the value of an MD text field. * @param {string} selector - a selector for the text field element */ export const getValueOfTextField = selector => dqS(selector).getAttribute('data-value'); /** * Set the value of an MD text field. * @param {string} selector - a selector for the text field element * @param {string} value - the value to be assigned to the text field */ export const setValueOfTextField = (selector, value) => { if (!value) { throw new Meteor.Error( `A value must be supplied; use "clearValueOfTextField()" to clear a text field, if desired.` ); } const field = dqS(selector); // Set the value on the field element. field.setAttribute('data-value', value); // Set the value on the input element. eqS(field, '[data-text-field-input]').value = value; // Reset the label position. setStyleOfLabelUnfocused(field); }; /** * Clear the value of an MD text field. * @param {string} selector - a selector for the text field element */ export const clearValueOfTextField = (selector) => { const field = dqS(selector); // Clear the value on the field element. field.removeAttribute('data-value'); // Clear the value on the input element. eqS(field, '[data-text-field-input]').value = null; // Reset the label position. const label = eqS(field, '[data-label]'); label.classList.remove('floating'); // Reset the label and underline style. setLabelAndUnderlineValid(field); }; /** * Disable an MD text field. * @param {string} selector - a selector for the text field element */ export const disableTextField = (selector) => { const field = dqS(selector); // Disable the input element. const input = eqS(field, '[data-text-field-input]'); input.setAttribute('disabled', 'true'); // Add the 'disabled' class to the underline. const underline = eqS(field, '.md-field__underline'); underline.classList.add('disabled'); }; /** * Enable an MD text field. * @param {string} selector - a selector for the text field element */ export const enableTextField = (selector) => { const field = dqS(selector); // Enable the input element. const input = eqS(field, '[data-text-field-input]'); input.removeAttribute('disabled'); // Remove the 'disabled' class from the underline. const underline = eqS(field, '.md-field__underline'); underline.classList.remove('disabled'); }; /** * Set the height of the text area based on its input. * @param {Element} field - the text area field element */ export const setHeightOfTextarea = (field) => { const input = eqS(field, '[data-text-area-input]'); const sizeDetector = eqS(field, '[data-size-detector]'); const newHeight = sizeDetector.clientHeight - 16; input.setAttribute('style', `height: ${newHeight}px`); }; /** * Get the value of an MD text area. * @param {string} selector - a selector for the text area field element */ export const getValueOfTextArea = selector => eqS(dqS(selector), '[data-text-area-input]').value; /** * Set the value of an MD text area. * @param {string} selector - a selector for the text area field element * @param {string} value - the value to be assigned to the text area */ export const setValueOfTextArea = (selector, value) => { if (!value) { throw new Meteor.Error( `A value must be supplied; use "clearValueOfTextArea()" to clear a text area, if desired.` ); } // Set the value of the text area input. const field = dqS(selector); eqS(field, '[data-text-area-input]').value = value; // Mirror the input value into the size detector. eqS(field, '[data-size-detector]').innerText = value; // Reset the label position. setStyleOfLabelUnfocused(field); // Reset the height of the text area. setHeightOfTextarea(field); }; /** * Clear the value of an MD text area. * @param {string} selector - a selector for the text area field element */ export const clearValueOfTextArea = (selector) => { const field = dqS(selector); // Clear the text area input. eqS(field, '[data-text-area-input').value = null; // Mirror the input value into the size detector. eqS(field, '[data-size-detector]').innerText = ''; // Reset the label position. setStyleOfLabelUnfocused(field); // Reset the height of the text area. setHeightOfTextarea(field); }; /** * Activate an observer that detects when the value of a field changes * programmatically and unfocuses the label. * @param {Element} field - the text field/area element */ export const unfocusLabelOnValueChange = (field) => { // Detects changes in the input value and unfocuses the label. const detectValueChange = (mutations) => { _.each(mutations, (mutation) => { if (mutation.attributeName === 'data-value') { // The value has changed; set the label style. setStyleOfLabelUnfocused(field); } }); }; /* * Activate an observer that listens for attribute changes in the field * element. */ const onAttributeChange = new MutationObserver(detectValueChange); onAttributeChange.observe(field, { attributes: true }); }; /** * Set the validation state of an MD text input field. * @param {string} selector - a selector for the text field field element * @param {string} state - ('errored'|'valid') the state to be assigned to the * text field */ export const setStateOfTextField = (selector, state) => { if (!state) { throw new Meteor.Error('A state ("errored"|"valid") must be supplied.'); } const field = dqS(selector); if (state === 'errored') { setLabelAndUnderlineErrored(field); } else if (state === 'valid') { setLabelAndUnderlineValid(field); } else { throw new Meteor.Error( 'Invalid value for state; it must be "errored" or "valid".' ); } }; /** * Set an error on an MD text input field. * @param {string} selector - a selector for the text field field element * @param {string} errorText - the error text to be displayed * @param {boolean} [showHelperText] - if TRUE, helper text will not be hidden * on error */ export const setErrorOnTextInputField = ( selector, errorText, showHelperText) => { const field = dqS(selector); // Make the label and underline red. setLabelAndUnderlineErrored(field); // Set the error text for the field. eqS(field, '[data-text-input-error-text]').innerText = errorText; // Set the 'data-errored' attribute for the field. field.setAttribute('data-errored', 'true'); // Hide the helper text, if there is any, and if hiding is required. const helperTextElement = eqS(field, '[data-text-input-helper-text]'); if (helperTextElement && !showHelperText) { helperTextElement.setAttribute('style', 'display: none;'); } }; /** * Clear an error on an MD text input field. Optionally override the original * helper text message, e.g. Valid. * @param {string} selector - a selector for the text field field element * @param {string} [validMessage] - a validation message to be displayed in * place of the original helper text */ export const clearErrorOnTextInputField = (selector, validMessage) => { const field = dqS(selector); // Reset the label and underline. setLabelAndUnderlineValid(field); // Clear the error text for the field. eqS(field, '[data-text-input-error-text]').innerText = ''; // Remove the 'data-errored' attribute. field.removeAttribute('data-errored'); // Unhide the helper text, if there is any. const helperTextElement = eqS(field, '[data-text-input-helper-text]'); if (helperTextElement) { if (validMessage) { // Optionally override the helper text, with a validation message. helperTextElement.innerText = validMessage; } // Show the helper text. helperTextElement.removeAttribute('style'); } }; /** * Reset MD text fields, i.e. clear the input value, clear any error, and * restore any helper text for each field. This is a convenience function for * use in resetting forms. * @param {Array} fields - an array of selectors for the text fields */ export const resetTextFields = (fields) => { _.each(fields, (field) => { // Clear the field. clearValueOfTextField(field); // Clear any residual error. clearErrorOnTextInputField(field); }); }; <file_sep>/README.md # Material for Meteor Material for Meteor (MFM) is a [Meteor](https://www.meteor.com/) package that implements Google's [Material Design](https://material.io) in Blaze. Users of this package can call familiar Meteor templates with parameters in order to render Material Design components, i.e. elements or groups of elements that conform, in appearance and behavior, to the Material Design specification. There may also be components and behaviors not prescribed by Material Design. ## Demo Site Demos of the available components and documentation for their use can be found at [Material for Meteor](http://mfm.dgtlife.com/). The MFM site is built using this package, and is as such a living example of how to use the package. The code for the website can be reviewed at this [repo](https://github.com/dgtlife/material-for-meteor-website). This site is hosted on a free f1-micro server on Google Compute Engine, so the site may be slow to load. ## Components The set of components is initially based on the author's needs. However, over time, and if other contributors come forward to scratch their own itch, the set of components will grow according to what is actually needed by the community. ## Usage This package is currently a 'work-in-progress' and as such is not recommended for wide public consumption in production apps. However, those willing to evaluate the package are welcome to do so with the understanding that there will be little to no support via the issue queue. Those advanced users who are comfortable with a package at this stage of its life cycle can use it, at their own risk, in any mode that they choose. ## ToDo * Complete documentation of the package on the MFM website. <file_sep>/client/imports/api/md-tabs-api.js /** * @file Defines the API for MD Toolbar * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { _ } from 'meteor/underscore'; import { dqS, eqS, eqSA, getElement, waitForElement } from './md-utils.js'; // Stores (reactively) the current tab of each rendered tab group. export const currentTab = new ReactiveDict; /** * In a tab group, set the selected tab and show/hide the relevant tab panes. * Wait for tab panes to render in the app startup case. * @param {String|Element} tabGroupSpec - a selector for the tab group or the * tab group element itself * @param {Number} selectedIndex - the (numerical) index of the selected tab * @param {Boolean} [untracked] - TRUE if 'currentTab' should not be updated (as * for resetTabGroup) */ const setSelectedTabAndPane = (tabGroupSpec, selectedIndex, untracked) => { if (_.isUndefined(selectedIndex)) { throw new Meteor.Error('A tab index must be supplied.'); } const tabGroup = getElement(tabGroupSpec); const tabGroupId = tabGroup.id; const indicator = eqS(tabGroup, '.md-tabs__indicator'); const tabs = eqSA(tabGroup, '[data-tab]'); const content = dqS('[data-content]'); /* * Generate an array of tab widths. In the same loop, set the tab with the * matching tabIndex as 'selected' and clear all others. Show the * corresponding tab pane, and hide all others. */ const widths = _.map(tabs, (tab) => { const tabIndex = parseInt(tab.getAttribute('data-tab-index'), 10); const tabName = tab.getAttribute('data-tab-name'); const tabPaneSelector = `[data-tab-pane-name="${tabName}"]`; let tabPane; // Tests a mutation object for the existence of a tab pane. function tabPaneExists(mutation) { const nodes = mutation.addedNodes; return ( (nodes.length > 0) && (nodes[0].nodeName === 'DIV') && nodes[0].classList.contains('__screen') && !!(eqS(nodes[0], tabPaneSelector)) ); } // Sets the current tab. function setCurrentTab() { if (!untracked) { currentTab.set(tabGroupId, { name: tabName, index: tabIndex }); } } // We visit each tab, so make the selection there. if (tabIndex === selectedIndex) { // This is the selected tab. tab.setAttribute('data-selected', 'true'); // Show the corresponding tab pane. if (dqS(tabPaneSelector)) { tabPane = dqS(tabPaneSelector); tabPane.classList.remove('hide'); setCurrentTab(); } else { // Wait for this pane to render. waitForElement( content, true, tabPaneSelector, tabPaneExists, (pane) => { pane.classList.remove('hide'); setCurrentTab(); }, 1 ); } } else { // This is not the selected tab. tab.removeAttribute('data-selected'); // Hide the corresponding tab pane. if (dqS(tabPaneSelector)) { tabPane = dqS(tabPaneSelector); tabPane.classList.add('hide'); } else { // Wait for this pane to render. waitForElement( content, true, tabPaneSelector, tabPaneExists, pane => pane.classList.add('hide'), 1 ); } } // Return the tab width. return tab.offsetWidth; }); /* The selection indicator will be sized based on the selected index and will * be positioned from the left edge of the tab bar to allow for any dynamic * page width changes during loading. */ // Compute the left margin for the selection indicator. const marginLeft = (_tabIndex) => { let margin = 0; _.each( widths, (width, index) => { if (index < _tabIndex) { margin += width; } } ); return margin.toString(); }; // Position the indicator by setting its left margin and width. indicator.setAttribute('style', `margin-left: ${marginLeft(selectedIndex)}px; width: ${widths[selectedIndex]}px;` ); }; /** * Set the selected tab (and show the corresponding pane). * @param {String|Element} tabGroupSpec - a selector for the tab group or the * tab group element itself * @param {Number} selectedIndex - the index of the selected tab */ export const setTabGroupSelection = (tabGroupSpec, selectedIndex) => { const tabGroup = getElement(tabGroupSpec); // Set the selected value of the tab group. tabGroup.setAttribute('data-selected', selectedIndex.toString()); // Set the selected tab (and pane). setSelectedTabAndPane(tabGroup, selectedIndex); }; /** * Get the index and label of the selected tab. * @param {String|Element} tabGroupSpec - a selector for the tab group or the * tab group element itself */ export const getTabGroupSelection = (tabGroupSpec) => { const tabGroup = getElement(tabGroupSpec); const selectedIndex = tabGroup.getAttribute('data-selected'); const selectedTab = eqS(tabGroup, `[data-tab-index="${selectedIndex}"]`); const selectedLabel = eqS(selectedTab, '.md-tab__label').innerText; return { index: selectedIndex, label: selectedLabel }; }; /** * Reset the selected tab (and show the corresponding pane). * @param {String|Element} tabGroupSpec - a selector for the tab group or the * tab group element itself */ export const resetTabGroup = (tabGroupSpec) => { const tabGroup = getElement(tabGroupSpec); // Set the selected value of the tab group back to 0; tabGroup.setAttribute('data-selected', '0'); // Set the selected tab and pane to 0. setSelectedTabAndPane(tabGroup, 0, true); }; /** * Initialize the state of an MD Tab group ('md-tabs' element) per its * 'data-selected' attribute value as preset in the rendered template. * @param {String|Element} tabGroupSpec - a selector for the tab group or the * tab group element itself */ export const initializeTabGroup = (tabGroupSpec) => { const tabGroup = getElement(tabGroupSpec); // Read the selected value from the DOM. const selectedIndex = parseInt(tabGroup.getAttribute('data-selected'), 10); // Set the selected tab to match this value. setSelectedTabAndPane(tabGroup, selectedIndex); }; /** * Restore an MD Tab group to its last/stored state as provided by currentTab. * @param {String} tabGroupId - the tab group id */ export const restoreTabGroup = (tabGroupId) => { if (currentTab.get(tabGroupId)) { // Set the selected tab to match this state. setTabGroupSelection(`#${tabGroupId}`, currentTab.get(tabGroupId).index); } else { // Initialize the tab group. initializeTabGroup(`#${tabGroupId}`); } }; /** * Handler for the click event on an MD Tab. * @param {Element} tab - the tab element */ export const handleClickOnTab = (tab) => { const tabGroup = tab.parentElement.parentElement; if (tab.hasAttribute('data-selected')) { // Do nothing. } else { // Set this tab as the selected tab in the group. const selectedIndex = parseInt(tab.getAttribute('data-tab-index'), 10); setTabGroupSelection(tabGroup, selectedIndex); } }; <file_sep>/client/imports/api/md-search-box-api.js /** * @file Defines the Search Box library module * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { ReactiveVar } from 'meteor/reactive-var'; import { dqS, eqS } from './md-utils.js'; // The Menu and Search modes and for the inside and outside worlds. export const menuMode = new ReactiveVar(null); export const inSearchMode = new ReactiveVar('false'); /** * Returns the Search Box element from the optional parameter. * @param {Element} [searchbox] - the Search Box element * @returns {Element} */ function getSearchBox(searchbox) { if (!searchbox) { return dqS('.md-search-box'); } return searchbox; } /** * Activates Search * @param {Object} event - the event associated with the Start Search button. * @param {Element} [searchbox] - the Search Box element */ export function activateSearch(event, searchbox) { const searchBox = getSearchBox(searchbox); eqS(searchBox, '.md-search-box__input').focus(); showShadow(searchBox); if (event) { event.currentTarget.classList.add('active'); } else { eqS(searchBox, '.button__start-search').classList.add('active'); } } /** * Deactivates Search * @param {Object} event - the event associated with the Start Search button. * @param {Element} [searchbox] - the Search Box element */ export function deactivateSearch(event, searchbox) { const searchBox = getSearchBox(searchbox); eqS(searchBox, '.md-search-box__input').blur(); hideMenu(searchBox); hideShadow(searchBox); if (event) { event.currentTarget.classList.remove('active'); } else { eqS(searchBox, '.button__start-search').classList.remove('active'); } } /** * Resets/clears the Search Box input. * @param {Element} searchbox - the Search Box element */ function resetInput(searchbox) { const input = eqS(searchbox, '.md-search-box__input'); input.value = null; // Explicit blur is needed for Chrome Android. input.blur(); } /** * Shows the Search Box menu. * @param {Element} searchbox - the Search Box element */ export function showMenu(searchbox) { eqS(searchbox, '.md-search-box__menu-container').classList.remove('md-hide'); } /** * Shows the Drop Shadow. * @param {Element} searchbox - the Search Box element */ export function showShadow(searchbox) { searchbox.classList.add('md-shadow--2dp'); } /** * Hides the Search Box menu. * @param {Element} searchbox - the Search Box element */ export function hideMenu(searchbox) { eqS(searchbox, '.md-search-box__menu-container').classList.add('md-hide'); } /** * Hides the Drop Shadow. * @param {Element} searchbox - the Search Box element */ export function hideShadow(searchbox) { searchbox.classList.remove('md-shadow--2dp'); } /** * Clears the current query from the Search Box. */ export function clearQuery(searchbox) { const searchBox = getSearchBox(searchbox); // Hide the menu (which collapses the search box). hideMenu(searchBox); // Hide the Clear Query button (nothing left to clear). eqS(searchBox, '.button__clear-query').classList.add('md-hide'); // Reset the input. resetInput(searchBox); } /** * Shows the Exit Search button when a menu selection is clicked. * @param searchbox */ export function showExitButton(searchbox) { const searchBox = getSearchBox(searchbox); // Replace the Start Search button by the Exit Search button. eqS(searchBox, '.button__start-search').classList.add('md-hide'); eqS(searchBox, '.button__exit-search').classList.remove('md-hide'); } /** * Exits the Search mode of the Search Box. */ export function exitSearch(searchbox) { const searchBox = getSearchBox(searchbox); // Hide the menu (which collapses the search box). hideMenu(searchBox); // Hide the Shadow to indicate Search is inactive. hideShadow(searchBox); // Reset the buttons. eqS(searchBox, '.button__exit-search').classList.add('md-hide'); eqS(searchBox, '.button__clear-query').classList.add('md-hide'); eqS(searchBox, '.button__start-search').classList.remove('md-hide', 'active'); // Reset the input. resetInput(searchBox); } /** * Enables the Search Box. * @param {Element} searchbox - the Search Box element */ export function enableSearchBox(searchbox) { const input = eqS(searchbox, '.md-search-box__input'); input.removeAttribute('disabled'); } /** * Disables the Search Box. * @param {Element} searchbox - the Search Box element */ export function disableSearchBox(searchbox) { const input = eqS(searchbox, '.md-search-box__input'); input.setAttribute('disabled', 'true'); } <file_sep>/package.js /** * @file Defines the Material package * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ Package.describe({ summary: 'A Blaze implementation of Material Design components for Meteor', version: '0.7.5', name: 'dgtlife:material', git: 'https://github.com/dgtlife/material-for-meteor.git' }); Package.onUse((api) => { api.use('ecmascript', ['client', 'server']); api.use('templating', 'client'); api.use('pacreach:jade', 'client'); api.use('stylus', 'client'); api.use('hammer:hammer', 'client'); api.use('reactive-dict', ['client', 'server']); api.use('reactive-var', 'client'); api.use('tracker', 'client'); api.use('coffeescript', ['client', 'server']); api.use('underscore', ['client', 'server']); api.use('check', ['client', 'server']); api.use('random', ['client', 'server']); api.mainModule('server/md.js', 'server'); api.addAssets('server/imports/assets/md-icon-av.svg', 'server'); api.addAssets('server/imports/assets/md-icon-base.svg', 'server'); api.addAssets('server/imports/assets/md-icon-communication.svg', 'server'); api.addAssets('server/imports/assets/md-icon-device.svg', 'server'); api.addAssets('server/imports/assets/md-icon-editor.svg', 'server'); api.addAssets('server/imports/assets/md-icon-hardware.svg', 'server'); api.addAssets('server/imports/assets/md-icon-image.svg', 'server'); api.addAssets('server/imports/assets/md-icon-maps.svg', 'server'); api.addAssets('server/imports/assets/md-icon-notification.svg', 'server'); api.addAssets('server/imports/assets/md-icon-social.svg', 'server'); api.addAssets('server/imports/assets/md-icon-extras.svg', 'server'); api.mainModule('client/md.js', 'client'); }); Package.onTest((api) => { api.use([ 'dgtlife:material', 'tinytest', 'test-helpers' ]); api.addFiles('md-tests.js', 'client'); }); <file_sep>/client/imports/ui/md-header-panel/md-header-panel.js /** * @file Defines the on-render callback for MD Header Panel * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2015 */ import { Template } from 'meteor/templating'; import { initializeHeaderPanelSystem } from '../../api/md-header-panel-api.js'; import './md-header-panel.jade'; // On render callback for MD Header Panel. Template.md_header_panel.onRendered( () => initializeHeaderPanelSystem() ); <file_sep>/client/imports/api/md-icon-api.js /** * @file Defines the API for MD Icon on the client * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Mongo } from 'meteor/mongo'; import { Meteor } from 'meteor/meteor'; import { Template } from 'meteor/templating'; const Icons = new Mongo.Collection('icons'); /** * A helper to enable convenient icon insertion. The helper passes an arbitrary * number of arguments. The first argument is expected to be the id of the icon, * and the others are ignored. */ const registerIconHelper = () => { const iconSub = Meteor.subscribe('icons'); // This helper enables direct insertion of an MD icon using an <svg> element. Template.registerHelper('md_icon__svg', (...args) => { /* * Check whether we have a null input, i.e no icon is supposed to appear, * and return early. */ if ((args[0] === null) || (args[0] === '')) { return null; } // Otherwise, the icon id is the first argument; ignore all others. const id = args[0]; // Once icon metadata is ready on the client, ... if (iconSub.ready()) { // find the icon metadata object corresponding to this id, ... const icon = Icons.findOne({ id: id }); if (!icon) { throw new Error(`The icon metadata for "${id}" was not found.`); } /* * then build the HTML for this MD Icon using an <svg> element wrapping * a <g> element. This structure enables support for composite SVGs. */ let svgIconHTML; if (id === 'super-g') { // The Google G gets special handling. svgIconHTML = `<svg id="${id}" class="md-icon__svg" viewBox="-3 -3 24 24" preserveAspectRatio="xMidYMid meet"><g>${icon.content}</g></svg>`; } else { svgIconHTML = `<svg id="${id}" class="md-icon__svg" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet"><g>${icon.content}</g></svg>`; } // eslint-disable-next-line new-cap return Spacebars.SafeString(svgIconHTML); } return null; }); }; export default registerIconHelper; <file_sep>/client/imports/api/md-image-api.js /** * @file Defines the API for MD Image * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ /** * Reserve space for the MD Image. * @param {Element} image - the MD Image element */ export const reserveImageSpace = (image) => { if (image.hasAttribute('data-height') && image.hasAttribute('data-width')) { const height = image.getAttribute('data-height'); const width = image.getAttribute('data-width'); const imageStyle = `height: ${height}px; width: ${width}px;`; image.setAttribute('style', imageStyle); } // else // throw new Meteor.Error 'The height and width of an MD Image are required.' }; /** * Set the background color of the placeholder. * @param {Element} image - the MD Image element * @param {Element} placeholder - the embedded placeholder element */ export const setPlaceholderBgColor = (image, placeholder) => { if (image.hasAttribute('data-placeholder-bg')) { const bgStyle = `background-color: ${image.getAttribute('data-placeholder-bg')}`; placeholder.setAttribute('style', bgStyle); } }; /** * Set the background image of the placeholder. * @param {Element} image - the MD Image element * @param {Element} placeholder - the embedded placeholder element */ export const setPlaceholderImage = (image, placeholder) => { if (image.hasAttribute('data-placeholder-img')) { const imageSrc = image.getAttribute('data-placeholder-img'); placeholder.setAttribute('style', `background-image: ${imageSrc};`); } }; /** * Set the size of the embedded img element. * @param {Element} image - the MD Image element * @param {Element} img - the embedded img element */ export const setImgSize = (image, img) => { const _img = img; if (image.hasAttribute('data-height') && image.hasAttribute('data-width')) { const height = image.getAttribute('data-height'); const width = image.getAttribute('data-width'); _img.height = height; _img.width = width; } }; /** * Set the image as a background image for the .md-image, and apply the sizing. * @param {Element} image - the MD Image element * @param {string} [data__template] - data from the md_image template */ export const setImageAsBackground = (image, data__template) => { let data__style; if (!data__template) { /* * The image is being re-rendered after a change in data-bg-url. Compose the * data object from the values in the changed element. */ data__style = {}; data__style.height = image.getAttribute('data-height'); data__style.width = image.getAttribute('data-width'); data__style.bg_url = image.getAttribute('data-bg-url'); data__style.sizing = image.getAttribute('data-sizing'); } else { data__style = data__template; } let bg_image; if (data__style.bg_url) { bg_image = `url(${data__style.bg_url})`; } else { bg_image = 'none'; } // Compose a style string. const imageStyle = `height: ${data__style.height}px; width: ${data__style.width}px; background-image: ${bg_image}; background-position: 50% 50%; background-repeat: no-repeat; background-size: ${data__style.sizing};`; // Set the style attribute. image.setAttribute('style', imageStyle); }; <file_sep>/client/imports/api/md-run.js /** * @file Defines the config object and related functions. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { _ } from 'meteor/underscore'; import { check, Match } from 'meteor/check'; import registerIconHelper from './md-icon-api.js'; const config = { // The elements to move with the snackbar as it is raised and lowered. elementsToMove: [] }; /** * Set the config based on the options supplied to runMD by the user. * @param {object} options - the options provided */ const setConfig = (options) => { // Update the config values. _.each(options, (value, key) => { config[key] = value; }); }; /** * Start an MD session. * @param options */ export const run = (options) => { // Configure MD, after checking the options supplied by the package user. if (options) { check(options.elementsToMove, Match.Optional([String])); setConfig(options); } // Register the icon helper. registerIconHelper(); }; /** * Retrieve the current config. */ export const getConfig = () => config; <file_sep>/client/imports/api/md-popup-menu-api.js /** * @file Defines the API for MD Popup Menu * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Meteor } from 'meteor/meteor'; import { eqS } from './md-utils.js'; import { closePopupMenu, closeOpenMenus } from './md-menu-common-api.js'; import { openDropdownMenu } from './md-dropdown-menu-api.js'; /** * Set the size and position of a popup menu via the style attribute. * @param {Element} menu - the menu element */ const setSizeAndPositionOfPopupMenu = (menu) => { /* * Get the dimensions of the menu element in order to set the size explicitly, * and to enable potential animations. */ menu.setAttribute('style', 'display: block; opacity: 0;'); const dimensions = menu.getBoundingClientRect(); menu.removeAttribute('style'); // Initialize the style that positions the menu. let style = `height: ${dimensions.height - 16}px; width: ${dimensions.width}px;`; // Get the specified position for the menu from the parent element. const position = menu.parentElement.getAttribute('data-position'); // Complete the style based on the position. if (position === 'top-left') { style += 'bottom: 0; right: 0;'; } else if (position === 'top-right') { style += 'bottom: 0; left: 0;'; } else if (position === 'bottom-left') { style += 'top: 0; right: 0;'; } else if (position === 'bottom-right') { style += 'top: 0; left: 0;'; } else { style += 'top: 0; right: 0;'; } // Set the style attribute on the menu. menu.setAttribute('style', style); }; /** * Open a popup menu. * @param {Element} menu - the menu element */ export const openPopupMenu = (menu) => { // Close any open menus. closeOpenMenus(); // Set the position of the popup menu. setSizeAndPositionOfPopupMenu(menu); // Set an animation attribute, if necessary. if (menu.parentElement.hasAttribute('data-opening-animation')) { const openingAnimation = menu.parentElement.getAttribute('data-opening-animation'); menu.setAttribute('data-opening-animation', openingAnimation); } // Show the menu by setting the 'data-menu-open' attribute. menu.setAttribute('data-menu-open', 'true'); /* * In the mouse case, this menu automatically closes on 'mouseleave'. For the * touch case, an event listener for closing the menu with a touch is used. * Note: This will close the menu with a click on the document, including an * item on this menu. * * Define the event handler for the 'touchstart' event listener. */ const closeThisMenu = (event) => { event.preventDefault(); // Close this menu. closePopupMenu(menu); // Remove the listener. document.removeEventListener('click', closeThisMenu); }; // Attach the event listener after the menu has opened. // ToDo: Consider replacing by Meteor.defer by explicit detection. Meteor.defer(() => document.addEventListener('click', closeThisMenu)); }; /** * Handle the click on a menu-trigger element. * @param {Element} trigger - the trigger element */ export const handleClickOnMenuTrigger = (trigger) => { // Get the target popup menu element. const menu = eqS(trigger.parentElement, '[data-menu]'); if (menu.hasAttribute('data-menu-open')) { // The menu is already open; do nothing. } else if (menu.hasAttribute('data-popup-menu')) { // It's a standalone popup menu. openPopupMenu(menu); } else if (menu.hasAttribute('data-dropdown-menu')) { // It's a popup menu embedded in a dropdown menu. openDropdownMenu(menu); } }; /** * Assign the supplied value to a popup menu. This involves assigning the value * to the 'data-selected' attribute of the popup menu element. This is part of * the chain of execution after a user clicks a popup menu item. * @param {Element} menu - the embedded menu element * @param {string} value - the value to be assigned to the popup menu */ export const assignValueOfPopupMenu = (menu, value) => menu.parentElement.setAttribute('data-selected', value); <file_sep>/client/imports/ui/md-radio/md-radio.js /** * @file Defines the on-render callback and event handler(s) for the * MD Radio Button and MD Radio Group. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2015 */ import { Template } from 'meteor/templating'; import { importRadioButtons, initializeValueOfRadioGroup, handleClickOnRadioButton } from '../../api/md-radio-api.js'; import './md-radio.jade'; // On-render callback for MD Radio Group. Template.md_radio_group.onRendered(function onRenderedRadio() { // Import the radio buttons for this radio group. importRadioButtons(this.lastNode); // Set the initial value of the radio group. initializeValueOfRadioGroup(this.lastNode); }); // Event handlers for MD Radio Group. Template.md_radio_group.events({ // Click on a radio button. 'click [data-radio-button]'(event) { handleClickOnRadioButton(event.currentTarget); } }); <file_sep>/client/imports/api/md-dialog-api.js /** * @file Defines the API for MD Dialog * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { _ } from 'meteor/underscore'; import { dgEBI, dqS, eqS, getElement, scrollMonitor, runScroller, insertBackdrop, removeBackdrop } from './md-utils.js'; /** * Import the content for the identified dialog. * @param {string} id - the id of the dialog */ export const importDialogContent = (id) => { const dialogContainer = eqS(dgEBI(id), '[data-dialog-container]'); // Look for any node containing content for this dialog. const tempContentContainer = dqS(`[data-content-for="${id}"]`); if (tempContentContainer) { const contentNodes = Array.from(tempContentContainer.childNodes); _.each(contentNodes, (contentNode) => { /* * Move each content node from its temporary container parent, into the * new dialog parent. */ dialogContainer.appendChild(contentNode); }); // Remove the temporary container. tempContentContainer.parentElement.removeChild(tempContentContainer); } }; /** * Compute and set the size and position of the dialog via its style attribute. * @param {Element} dialog - the dialog element */ const setDialogSizeAndPosition = (dialog) => { // Assign the dialog width. Use the specified width, if provided. let dialogWidth; if (dialog.hasAttribute('data-width')) { dialogWidth = dialog.getAttribute('data-width'); // Do not exceed maximum width. if (dialogWidth > (window.innerWidth - 80)) { dialogWidth = window.innerWidth - 80; } } else { // Default width. dialogWidth = window.innerWidth - 80; } // Assign the horizontal position. const left = (window.innerWidth - dialogWidth) / 2; // Get/assign the dialog height. let dialogHeight; let dialogStyle; if (dialog.hasAttribute('data-height')) { dialogHeight = dialog.getAttribute('data-height'); } else { dialogStyle = `opacity: 0; display: block; height: auto; width: ${dialogWidth}px;`; // Style the dialog so that it's 'natural' height can be obtained. dialog.setAttribute('style', dialogStyle); dialogHeight = dialog.getBoundingClientRect().height; } // Do not exceed maximum height. if (dialogHeight > (window.innerHeight - 48)) { dialogHeight = window.innerHeight - 48; } // Assign the vertical position. const top = (window.innerHeight - dialogHeight) / 2; // Set the final position of the dialog. dialogStyle = `height: auto; width: ${dialogWidth}px; top: ${top}px; left: ${left}px;`; dialog.setAttribute('style', dialogStyle); }; /** * Maintain the relative size and positioning of the dialog as the screen is * resized. * @param {Element} dialog - the dialog element * @param {string} state - the state (on|off) of the resize monitor */ const sizeAndPositionMonitor = (dialog, state) => { const resizeHandler = () => { if (dialog.hasAttribute('data-dialog-open')) { setDialogSizeAndPosition(dialog); } }; if (state === 'on') { window.addEventListener('resize', resizeHandler); } else { // [Currently, this technique does not remove the listener] // ToDo: try some other method of listener removal. window.removeEventListener('resize', resizeHandler); } }; /** * Close any open dialog, regardless of how it may have remained open. */ export const closeAnyOpenDialog = () => { const openDialog = dqS('[data-dialog-open]'); if (openDialog) { openDialog.removeAttribute('data-dialog-open'); openDialog.removeAttribute('style'); removeBackdrop(); sizeAndPositionMonitor(openDialog, 'off'); } }; /** * Close a dialog. * @param {(string|Element)} dialogSpec - a selector for the dialog element or * the dialog element itself */ export const closeDialog = (dialogSpec) => { const dialog = getElement(dialogSpec); if (dialog.hasAttribute('data-dialog-open')) { /* * It's open; so we can actually close it. Put all animation-independent * closing tasks in a function, so that they can be executed in either case. */ const closeThisDialog = () => { // Remove the backdrop. removeBackdrop(); // Remove the 'open' attribute. dialog.removeAttribute('data-dialog-open'); // Remove the size and position styles. dialog.removeAttribute('style'); // Turn OFF the size and position monitor. [currently ignore by ] sizeAndPositionMonitor(dialog, 'off'); // If it's a scrollable dialog turn OFF the scroll monitor. const scrollableElement = eqS(dialog, '.md-dialog__content-to-scroll'); if (scrollableElement) { scrollMonitor(scrollableElement, 'off'); } }; // Account for any animation. if (dialog.hasAttribute('data-closing-animation')) { // We are closing with animation. dialog.setAttribute('data-closing', 'true'); // The array of names for the animation-end event in browsers . const eventNames = [ 'animationend', 'webkitAnimationEnd', 'mozAnimationEnd' ]; // Continues the closing process after the animation has ended. const onAnimationEnd = () => { // Turn OFF the closing animation. dialog.removeAttribute('data-closing'); // Execute the closing tasks. closeThisDialog(); // Remove the event listener. _.each(eventNames, eventName => dialog.removeEventListener(eventName, onAnimationEnd)); }; // Set up event listeners for the end of the closing animation. _.each(eventNames, eventName => dialog.addEventListener(eventName, onAnimationEnd)); } else { // There will be no animation. Just close. closeThisDialog(); } } }; /** * Attach a listener to the backdrop to close the dialog when the former is * clicked. * @param {Element} dialog - the dialog element */ const attachAutoCloseListener = (dialog) => { // Define an event handler to close the dialog in the non-modal cases. const closeThisDialog = () => closeDialog(dialog); // Unless it's a modal, attach the 'click' listener. if (!dialog.hasAttribute('data-modal')) { dqS('[data-backdrop]').onclick = closeThisDialog; } }; /** * Open a dialog. * @param {(string|Element)} dialogSpec - a selector for the dialog element or * the dialog element itself */ export const openDialog = (dialogSpec) => { // Get the dialog element. const dialog = getElement(dialogSpec); if (dialog.hasAttribute('data-dialog-open')) { // It's already open; do nothing. } else { // Close any open dialog(s). closeAnyOpenDialog(); // Set the size and position of the dialog. setDialogSizeAndPosition(dialog); // Insert the backdrop. let backdropType = 'default'; if (dialog.hasAttribute('data-modal')) { backdropType = 'modal dialog'; } let backdropOpacity = 0; if (dialog.hasAttribute('data-backdrop-opacity')) { backdropOpacity = dialog.getAttribute('data-backdrop-opacity'); } insertBackdrop(backdropType, backdropOpacity); // Add animation attribute and post-animation handler, if necessary. if (dialog.hasAttribute('data-opening-animation')) { // We are closing with animation. dialog.setAttribute('data-opening', 'true'); // The array of names for the animation-end event in browsers. const eventNames = [ 'animationend', 'webkitAnimationEnd', 'mozAnimationEnd' ]; /* * Removes the 'data-opening' attribute after the opening animation has * ended. * @param {object} event - the animation-end event */ const onAnimationEnd = () => { // Turn OFF the opening animation. dialog.removeAttribute('data-opening'); // Remove the event listeners. _.each(eventNames, eventName => dialog.removeEventListener(eventName, onAnimationEnd)); }; // Set up event listeners for the end of the opening animation. _.each(eventNames, eventName => dialog.addEventListener(eventName, onAnimationEnd)); } else { // There will be no animation. dialog.setAttribute('data-no-opening-animation', 'true'); } /* * Show the dialog by setting the 'data-dialog-open' attribute (this is the * master switch that makes everything happen). */ dialog.setAttribute('data-dialog-open', 'true'); /* * If it's a scrollable dialog, initialize the scroller, then turn ON the * scroll monitor. */ const scrollableElement = eqS(dialog, '.md-dialog__content-to-scroll'); if (scrollableElement) { runScroller(scrollableElement); } // Turn ON the size and position monitor. sizeAndPositionMonitor(dialog, 'on'); // Attach the auto-close listener. attachAutoCloseListener(dialog); } }; /** * Reposition/refit a dialog (on demand) after its width and or height have * been altered. * @param {(string|Element)} dialogSpec - a selector for the dialog element or * the dialog element itself */ export const refitDialog = dialogSpec => setDialogSizeAndPosition(getElement(dialogSpec)); /** * Check whether a dialog is open. * @param {(string|Element)} dialogSpec - a selector for the dialog element or * the dialog element itself */ export const isDialogOpen = dialogSpec => getElement(dialogSpec).hasAttribute('data-dialog-open'); /** * Check whether a dialog is closed. * @param {(string|Element)} dialogSpec - a selector for the dialog element or * the dialog element itself */ export const isDialogClosed = dialogSpec => !getElement(dialogSpec).hasAttribute('data-dialog-open'); /** * Open the full-screen dialog (mobile only). */ export const openDialogFs = () => dqS('[data-dialog-fs]').setAttribute('data-dialog-open', 'true'); /** * Close the full-screen dialog (mobile only). */ export const closeDialogFs = () => dqS('[data-dialog-fs]').removeAttribute('data-dialog-open'); /** * Open the full-screen dialog (mobile only). */ export const isDialogFsOpen = () => dqS('[data-dialog-fs]').hasAttribute('data-dialog-open'); <file_sep>/client/imports/api/md-stepdots-api.js /** * @file Defines the API for MD Stepdots * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ /** * Generate the dots array of objects for various quantities of stepdots. * @param {String} qty - the quantity of stepdots * @returns {Array} */ const makeDots = (qty) => { const dots = []; for (let j = 1; j <= qty; j += 1) { dots.push({ i: j }); } return dots; }; export default makeDots; <file_sep>/client/imports/ui/md-dialog/md-dialog.js /** * @file API and on-render callback for the MD Dialog. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { Template } from 'meteor/templating'; import { importDialogContent, closeDialogFs } from '../../api/md-dialog-api.js'; import './md-dialog.jade'; // On render callback for MD Dialog. Template.md_dialog.onRendered( function onRenderedDialog() { // Import the content for this dialog. importDialogContent(this.data.id); } ); // Event handler for MD Dialog FS Template.md_dialog_fs.events({ 'click [data-dialog-close-button]'() { closeDialogFs(); } }); <file_sep>/client/imports/api/md-ripple-api.js /** * @file Defines the API for MD Ripple * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Meteor } from 'meteor/meteor'; /** * Compute the CSS styles for size and position of the ripple. * @param {string} origin - 'center'|'offset', i.e. where should the ripple * originate from * @param {object} container - an object that holds the dimensions of the * the ripple container * @param {Number} [eventX] - the distance (in pixels) from the left edge of * the container to the event position * @param {Number} [eventY] - the distance (in pixels) from the top edge of * the container to the event position */ const computeRippleStyle = (origin, container, eventX, eventY) => { /* * Set the width and height to be equal to 2 times the longer side of the * ripple container. */ let height; let width; if (container.width >= container.height) { height = container.width * 2; width = container.width * 2; } else { height = container.height * 2; width = container.height * 2; } // Set the position. let top; let left; if (origin === 'center') { // Center the ripple on the ripple container. top = -((height - container.height) / 2); left = -((width - container.width) / 2); } else { // Center the ripple on the click/touch position. top = -((height / 2) - eventY); left = -((width / 2) - eventX); } // Compose and return the ripple style. return ( `width: ${width}px; height: ${height}px; top: ${top}px; left: ${left}px;` ); }; /** * Set the size and position of the ripple. * @param {Element} ripple - the ripple element * @param {Number} [eventX] - the distance (in pixels) from the left edge of * the ripple container to the event position * @param {Number} [eventY] - the distance (in pixels) from the top edge of * the ripple container to the event position */ export const setRippleStyle = (ripple, eventX, eventY) => { const container = {}; container.height = ripple.parentElement.offsetHeight; container.width = ripple.parentElement.offsetWidth; // The style for this ripple is not yet set. let rippleStyle; if ( ripple && ripple.parentElement && ripple.parentElement.parentElement && ripple.parentElement.parentElement.hasAttribute('data-radio-button') ) { /* * It's an MD Radio button. Set the pre-determined size and position of its * ripple. */ rippleStyle = 'width: 3rem; height: 3rem; top: -1rem; left: -1rem;'; } else if ( ripple && ripple.parentElement && ripple.parentElement.parentElement && ripple.parentElement.parentElement.hasAttribute('data-checkbox') ) { /* * It's an MD Checkbox. Set the pre-determined size and position of its * ripple. */ rippleStyle = 'width: 3rem; height: 3rem; top: -0.75rem; left: -0.75rem;'; } else if ( ripple && ripple.parentElement && ripple.parentElement.hasAttribute('data-fab') ) { if (ripple.parentElement.getAttribute('data-fab') === 'mini') { /* * It's a mini MD FAB. Set the pre-determined size and position of its * ripple. */ rippleStyle = 'width: 2.5rem; height: 2.5rem; top: 0; left: 0;'; } else { // It's an MD FAB. Set a pre-determined size and position for its ripple. rippleStyle = 'width: 3.5rem; height: 3.5rem; top: 0; left: 0;'; } } else if ( ripple && ripple.parentElement && ripple.parentElement.hasAttribute('data-icon-button') ) { /* * It's an Icon Button. Set the pre-determined size and position of its * ripple. */ rippleStyle = 'width: 3rem; height: 3rem; top: 0; left: 0;'; } else if (ripple && ripple.hasAttribute('data-offset')) { // It's an element with an offset ripple. Compute the ripple style. rippleStyle = computeRippleStyle('offset', container, eventX, eventY); } else { /* * It's an element with the default centered ripple. Compute the ripple * style. */ rippleStyle = computeRippleStyle('center', container); } ripple.setAttribute('style', rippleStyle); }; /** * Event handler for launching the ripple. * @param {Element} ripple - the ripple element * @param {Number} eventX - the x coordinate of the mouse/touch event relative * to the ripple container * @param {Number} eventY - the y coordinate of the mouse/touch event relative * to the ripple container */ export const launchRipple = (ripple, eventX, eventY) => { // Don't ripple on a disabled element. if (ripple.parentElement.hasAttribute('disabled') || ripple.parentElement.hasAttribute('data-disabled') || ripple.parentElement.parentElement.hasAttribute('data-disabled') || ripple.parentElement.parentElement.parentElement.hasAttribute('data-disabled')) { return false; } // Set the size and position of the ripple, if necessary. if ( ripple.hasAttribute('data-offset') || (!ripple.hasAttribute('style')) ) { setRippleStyle(ripple, eventX, eventY); } // Add the class to trigger animation of the wave. ripple.classList.add('is-rippling'); Meteor.setTimeout( () => { // Remove the class after 350ms ripple.classList.remove('is-rippling'); /* * If it's an offset ripple remove the style as it's a function of the * touch coordinates. */ if (ripple.hasAttribute('data-offset')) { ripple.removeAttribute('style'); } }, 350 ); return true; }; <file_sep>/client/imports/ui/md-tabs/md-tabs.js /** * @file Defines the on-render callback and the event handler for MD Tabs. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { Template } from 'meteor/templating'; import { currentTab, initializeTabGroup, handleClickOnTab } from '../../api/md-tabs-api.js'; import './md-tabs.jade'; // On-render callback for MD Tabs. Template.md_tabs.onRendered( function onRenderedTabs() { /* * Initialize the tab group based on its template configuration, if it has * not already been initialized (e.g. by restoreTabs) */ if (!currentTab.get(this.data.id)) { initializeTabGroup(this.firstNode); } } ); // Event handler for MD Tabs. Template.md_tabs.events({ 'click .md-tab'(event) { handleClickOnTab(event.currentTarget); } }); <file_sep>/client/md.js /** * @file Main module of this package on the client. * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2017 */ import { run } from './imports/api/md-run.js'; import { enableButton, disableButton } from './imports/api/md-button-api.js'; import { collapseContent, expandContent } from './imports/api/md-collapse-api.js'; import { setStateOfCheckbox, getStateOfCheckbox } from './imports/api/md-checkbox-api.js'; import { openDialog, closeDialog, closeAnyOpenDialog, refitDialog, isDialogOpen, isDialogClosed, closeDialogFs, openDialogFs, isDialogFsOpen } from './imports/api/md-dialog-api.js'; import { dockDrawer, undockDrawer, closeDrawer, openDrawer, toggleDrawer, initializeLeftDrawerToggle, initializeRightDrawerToggle, initializeDrawerToggles, initializeDrawer } from './imports/api/md-drawer-api.js'; import { setValueOfDropdownMenu, getValueOfDropdownMenu, clearValueOfDropdownMenu } from './imports/api/md-dropdown-menu-api.js'; import { resetHeaderPanelSystem, initializeHeaderPanelSystem } from './imports/api/md-header-panel-api.js'; import { setValueOfMenu, getValueOfMenu, clearValueOfMenu } from './imports/api/md-menu-api.js'; import { enableRadioButton, disableRadioButton, setValueOfRadioGroup, getValueOfRadioGroup, clearValueOfRadioGroup } from './imports/api/md-radio-api.js'; import { inSearchMode, menuMode, clearQuery, showExitButton, exitSearch, enableSearchBox, disableSearchBox } from './imports/api/md-search-box-api.js'; import { postSnackbar } from './imports/api/md-snackbar-api.js'; import makeDots from './imports/api/md-stepdots-api.js'; import { currentTab, initializeTabGroup, setTabGroupSelection, getTabGroupSelection, resetTabGroup, restoreTabGroup } from './imports/api/md-tabs-api.js'; import { getValueOfTextField, setValueOfTextField, clearValueOfTextField, disableTextField, enableTextField, getValueOfTextArea, setValueOfTextArea, clearValueOfTextArea, setErrorOnTextInputField, clearErrorOnTextInputField } from './imports/api/md-text-input-api.js'; import { detectTabs } from './imports/api/md-toolbar-api.js'; import { dismissTooltip } from './imports/api/md-tooltip-api.js'; import { dgEBI, dqS, dqSA, eqS, eqSA, waitForElement, clearSelectedElements, handleClickOnSelectableElement, getSelectedElements } from './imports/api/md-utils.js'; import './imports/ui/md-button/md-button.js'; import './imports/ui/md-card/md-card.jade'; import './imports/ui/md-checkbox/md-checkbox.js'; import './imports/ui/md-chip/md-chip.js'; import './imports/ui/md-collapse/md-collapse.js'; import './imports/ui/md-dialog/md-dialog.js'; import './imports/ui/md-drawer/md-drawer.js'; import './imports/ui/md-dropdown-menu/md-dropdown-menu.js'; import './imports/ui/md-header-panel/md-header-panel.js'; import './imports/ui/md-icon/md-icon.jade'; import './imports/ui/md-image/md-image.coffee'; import './imports/ui/md-item/md-item.jade'; import './imports/ui/md-menu/md-menu.js'; import './imports/ui/md-popup-menu/md-popup-menu.coffee'; import './imports/ui/md-radio/md-radio.js'; import './imports/ui/md-ripple/md-ripple.js'; import './imports/ui/md-scrollable/md-scrollable.js'; import './imports/ui/md-search-box/md-search-box.js'; import './imports/ui/md-snackbar/md-snackbar.coffee'; import './imports/ui/md-spinner/md-spinner.coffee'; import './imports/ui/md-stepdots/md-stepdots.jade'; import './imports/ui/md-tabs/md-tabs.js'; import './imports/ui/md-text-input/md-text-input.coffee'; import './imports/ui/md-toolbar/md-toolbar.js'; import './imports/ui/md-tooltip/md-tooltip.js'; import './imports/md-styles.styl'; // Export these functions. This is the API on the client. export { run, // MD Button enableButton, disableButton, // MD Collapse collapseContent, expandContent, // MD Checkbox setStateOfCheckbox, getStateOfCheckbox, // MD Dialog openDialog, closeDialog, closeAnyOpenDialog, refitDialog, isDialogOpen, isDialogClosed, openDialogFs, closeDialogFs, isDialogFsOpen, // MD Drawer dockDrawer, undockDrawer, openDrawer, closeDrawer, toggleDrawer, initializeLeftDrawerToggle, initializeRightDrawerToggle, initializeDrawerToggles, initializeDrawer, // MD Dropdown Menu setValueOfDropdownMenu, getValueOfDropdownMenu, clearValueOfDropdownMenu, // MD Header Panel resetHeaderPanelSystem, initializeHeaderPanelSystem, // MD Menu setValueOfMenu, getValueOfMenu, clearValueOfMenu, // MD Radio enableRadioButton, disableRadioButton, setValueOfRadioGroup, getValueOfRadioGroup, clearValueOfRadioGroup, // MD Search Box inSearchMode, menuMode, clearQuery, showExitButton, exitSearch, enableSearchBox, disableSearchBox, // MD Snackbar postSnackbar, // MD Stepdots makeDots, // MD Tabs currentTab, initializeTabGroup, setTabGroupSelection, getTabGroupSelection, resetTabGroup, restoreTabGroup, // MD Text Input getValueOfTextField, setValueOfTextField, clearValueOfTextField, disableTextField, enableTextField, getValueOfTextArea, setValueOfTextArea, clearValueOfTextArea, setErrorOnTextInputField, clearErrorOnTextInputField, // MD Toolbar detectTabs, // MD Tooltip dismissTooltip, // MD Utils dgEBI, dqS, dqSA, eqS, eqSA, waitForElement, clearSelectedElements, handleClickOnSelectableElement, getSelectedElements }; <file_sep>/client/imports/api/md-tooltip-api.js /** * @file Defines the API for MD Tooltip * @author <NAME> <<EMAIL>> * @copyright DGTLife, LLC 2016 */ import { Meteor } from 'meteor/meteor'; import { dgEBI, dqS, waitForElement } from './md-utils.js'; const tooltipState = new ReactiveDict; /** * Register a tooltip with its target element. * @param {string} targetId - the id of the tooltip target. */ export const registerTooltip = (targetId) => { const target = dgEBI(targetId); const registerWithTarget = (_target) => { _target.setAttribute('data-has-tooltip', 'true'); }; if (target) { registerWithTarget(target); } else { waitForElement( document.body, true, `#${targetId}`, (mutation) => { const nodes = mutation.addedNodes; return ( (nodes.length > 0) && (nodes[0].nodeName !== '#text') && (nodes[0].nodeName !== 'svg') && (targetId === nodes[0].id) ); }, registerWithTarget, 0 ); } }; /** * Position a tooltip for subsequent display. * @param {Element} tooltip - the tooltip element * @param {string} id - the id of the tooltip target */ const positionTooltip = (tooltip, id) => { const target = dgEBI(id); const targetX = target.getBoundingClientRect().left; const targetY = target.getBoundingClientRect().top; const targetHeight = target.getBoundingClientRect().height; const targetWidth = target.getBoundingClientRect().width; const tooltipHeight = tooltip.getBoundingClientRect().height; const tooltipWidth = tooltip.getBoundingClientRect().width; const tooltipPosition = tooltip.getAttribute('data-position'); /* * Compute the top and left values of the tooltip for fixed positioning, * i.e. relative to the viewport origin. */ let tooltipLeft; let tooltipTop; // Computes the left value for top and bottom positions. const getTooltipLeftForVerticalAlignment = () => { if (tooltipWidth >= targetWidth) { tooltipLeft = targetX - ((tooltipWidth - targetWidth) / 2); } else { tooltipLeft = targetX + ((targetWidth - tooltipWidth) / 2); } return tooltipLeft; }; // Computes the top value for left and right positions. const getTooltipTopForHorizontalAlignment = () => { if (tooltipHeight <= targetHeight) { tooltipTop = targetY + ((targetHeight - tooltipHeight) / 2); } else { tooltipTop = targetY - ((tooltipHeight - targetHeight) / 2); } return tooltipTop; }; if ((!tooltipPosition) || (tooltipPosition === 'bottom')) { tooltipTop = targetY + targetHeight + 14; tooltipLeft = getTooltipLeftForVerticalAlignment(); } else if (tooltipPosition === 'top') { tooltipTop = targetY - 14 - tooltipHeight; tooltipLeft = getTooltipLeftForVerticalAlignment(); } else if (tooltipPosition === 'left') { tooltipTop = getTooltipTopForHorizontalAlignment(); tooltipLeft = targetX - 14 - tooltipWidth; } else if (tooltipPosition === 'right') { tooltipTop = getTooltipTopForHorizontalAlignment(); tooltipLeft = targetX + targetWidth + 14; } else { throw new Meteor.Error('Invalid or no position provided for tooltip'); } // Compose the style attribute. const tooltipStyle = `top: ${tooltipTop}px; left: ${tooltipLeft}px; position: fixed;`; // Apply the style attribute to position the tooltip. tooltip.setAttribute('style', tooltipStyle); }; /** * Show a tooltip. * @param {string} id - the id of the tooltip target. */ export const showTooltip = (id) => { // Get the tooltip. const tooltip = dqS(`[data-target=${id}]`); // Position the tooltip. positionTooltip(tooltip, id); // Engage a 'hover-intent' mechanism tooltipState.set(id, 'pending'); Meteor.setTimeout(() => { if (tooltipState.get(id) === 'pending') { // Reveal the tooltip. tooltip.classList.add('show-tooltip'); // Update the state. tooltipState.set(id, 'displayed'); } }, 300); }; /** * Hide a tooltip, if it has been displayed. * @param {string} id - the id of the tooltip target. */ export const hideTooltip = (id) => { const state = tooltipState.get(id); const tooltip = dqS(`[data-target=${id}]`); if (state === 'pending') { // Don't let it display. tooltipState.set(id, 'cancelled'); tooltip.removeAttribute('style'); delete tooltipState.keys[id]; } if (state === 'displayed') { // Hide after 1.5 seconds. Meteor.setTimeout(() => { // Clear tooltip state. delete tooltipState.keys[id]; // Hide the tooltip, if it has not been destroyed by a screen transition. if (tooltip) { tooltip.classList.remove('show-tooltip'); // Clear the style attribute, after transition delay has passed. Meteor.setTimeout(() => tooltip.removeAttribute('style'), 160); } }, 1500); } }; /** * Dismiss (hide immediately) a tooltip. * @param {String} id - the id of the tooltip target. */ export const dismissTooltip = (id) => { const tooltip = dqS(`[data-target=${id}]`); if (tooltip) { tooltip.classList.remove('show-tooltip'); } };
8c29ba065ad2a79978fc54d7b46544c6f73fa234
[ "JavaScript", "Text", "Markdown" ]
30
JavaScript
dgtlife/material-for-meteor
07cd9cd89b308fa86d6aaed07088d22f4188038a
b7c4d617b03d46632a48939de7f64f39f077caf1
refs/heads/master
<file_sep>using Xamarin.Forms; namespace APKTest { public partial class APKTestPage : ContentPage { public APKTestPage() { InitializeComponent(); } } }
99933e16074fca825c1538a130d77ccd37a57f65
[ "C#" ]
1
C#
sumit9359/APKTest
324abee27c172c2c8b46c6ea50bab7634d10fc18
1da9d6e34d0e0114a23ce0ee92a9411bcb7ad8ae
refs/heads/main
<file_sep><?php namespace App\Model; use PDO; class ProductModel { private $dbConnect; public function __construct() { $this->dbConnect = new DBConnect(); } public function getAll() { try { $sql = "SELECT * FROM `products`"; $stmt = $this->dbConnect->connect()->query($sql); $stmt->execute(); return $this->convertAllToObj($stmt->fetchAll()); } catch (\PDOException $exception) { die($exception->getMessage()); } } public function searchData($search) { try { $sql = "SELECT * FROM `products` WHERE `name` LIKE "."'%".$search."%"."'; "; // $sql="SELECT * From `products` WHERE `name` LIKE $search"; $stmt = $this->dbConnect->connect()->query($sql); $stmt->execute(); return $this->convertAllToObj($stmt->fetchAll()); }catch (\PDOException $exception){ die($exception->getMessage()); } } public function convertToObject($data) { $product = new Product($data['name'], $data['category'], $data['price'], $data['quantity'], $data['date_create'], $data['detail']); $product->setId($data['id']); return $product; } public function convertAllToObj($data) { $objs = []; foreach ($data as $item) { $objs[] = $this->convertToObject($item); } return $objs; } public function getById($id) { try { $sql = "SELECT * FROM `products` WHERE `id` = $id "; $stmt = $this->dbConnect->connect()->query($sql); $stmt->execute(); return $this->convertToObject($stmt->fetch()); } catch (\PDOException $exception) { die($exception->getMessage()); } } public function create($request) { $url = 'uploads/product/' . $_FILES['fileToUpload']['name']; try { $sql = "INSERT INTO `products`(`name`,`category`,`price`,`quantity`,`date_create`,`detail`) VALUES (?,?,?,?,?,?)"; $stmt = $this->dbConnect->connect()->prepare($sql); $stmt->bindParam(1, $request['name']); $stmt->bindParam(2, $request['category']); $stmt->bindParam(3, $request['price']); $stmt->bindParam(4, $request['quantity']); $stmt->bindParam(5, $request['date_create']); $stmt->bindParam(6, $request['detail']); $stmt->execute(); } catch (\PDOException $exception) { echo $exception->getMessage(); } } public function update($request) { $product = $this->getById($_REQUEST['id']); try { $sql = "INSERT INTO `products`(`name`,`category`,`price`,`quantity`,`date_create`,`detail`) VALUES (?,?,?,?,?,?)"; $stmt = $this->dbConnect->connect()->prepare($sql); $stmt->bindParam(1, $request['name']); $stmt->bindParam(2, $request['category']); $stmt->bindParam(3, $request['price']); $stmt->bindParam(4, $request['quantity']); $stmt->bindParam(5, $request['date_create']); $stmt->bindParam(6, $request['detail']); $stmt->execute(); } catch (\PDOException $exception) { echo $exception->getMessage(); } } public function delete($id) { $sql = "DELETE FROM `products` WHERE `id` = $id"; $stmt = $this->dbConnect->connect()->query($sql); $stmt->execute(); } }<file_sep> <!DOCTYPE html> <html lang="en"> <head> <title>PRODUCT LIST</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </head> <body> <nav class="navbar navbar-dark bg-primary vbg-danger navbar-dark"> <a class="btn btn-outline-light btn-md" href="index.php">Home</a> <form class="form-inline" method="post"> <input class="form-control mr-sm-2" type="text" name="search" placeholder="Search Phone Name"> <button class="bg-dark" type="submit" name="find" style="color: whitesmoke ">Search</button> </form> </nav> <br> <div class="container"> <h2>Smart Phone Manager</h2> <a class="btn btn-outline-success" href="index.php?page=create-product">Add New Smart Phone</a> <br> <br> <table class="table"> <thead class=""> <tr class="table-success"> <th scope="col">ID</th> <th scope="col">Name</th> <th scope="col">Category</th> <th scope="col">Price</th> <th scope="col">Quantity</th> <th scope="col">Date</th> <th scope="col">Detail</th> <th scope="col" colspan="2">Action</th> </tr> </thead> <tbody> <?php if (isset($products)) { foreach ($products as $product) :?> <tr class="table-bordered"> <th scope="row"><?php echo $product->getId() ?></th> <td><?php echo $product->getName() ?></td> <td><?php echo $product->getCategory() ?></td> <td><?php echo $product->getPrice() ?></td> <td><?php echo $product->getQuantity() ?></td> <td><?php echo $product->getDateCreate() ?></td> <td><?php echo $product->getDetail() ?></td> <td><a href="index.php?page=update-product&id=<?php echo $product->getId()?>" class="btn btn-outline-warning btn-lg">Edit</a></td> <td><a href="index.php?page=delete-product&id=<?php echo $product->getId()?>" class="btn btn-outline-danger btn-lg" onclick="return confirm('DO you want to delete this item?')">Delete</a></td> </tr> <?php endforeach; } ?> </tbody> </table> </div> </body> </html><file_sep><?php namespace App\Controller; use App\Model\ProductModel; class ProductController { protected $productModel; public function __construct() { $this->productModel = new ProductModel(); } public function showAllProduct() { $products = $this->productModel->getAll(); include_once 'app/View/list.php'; } public function createProduct() { if ($_SERVER['REQUEST_METHOD'] == 'GET') { include_once 'app/View/create.php'; } else { $this->productModel->create($_REQUEST); header('location:index.php'); } } public function deleteProduct() { $id = $_REQUEST['id']; $this->productModel->delete($id); header('location:index.php'); } public function updateProduct() { if ($_SERVER['REQUEST_METHOD'] == 'GET') { $id = $_REQUEST['id']; $product = $this->productModel->getById($id); include_once 'app/View/update.php'; } else { $this->productModel->update($_REQUEST); header('location:index.php'); } } public function search() { $search = $_REQUEST['search']; $products = $this->productModel->searchData($search); include_once "app/View/list.php"; } }<file_sep><!DOCTYPE html> <html lang="en"> <head> <title>PRODUCT LIST</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </head> <body> <nav class="navbar navbar-expand-sm bg-info navbar-dark"> <a class="btn btn-info btn-md" href="index.php">Home</a> <form class="form-inline" method="post"> </form> </nav> <div class="container"> <form method="post" enctype="multipart/form-data"> <h3>UPDATE PRODUCT</h3> <?php if(isset($product)):?> <div class="mb-3"> <label for="name" class="form-label">Name</label> <input type="text" required class="form-control" id="name" name="name" value="<?php echo $product->getName()?>"> </div> <div class="mb-3"> <label for="category" class="form-label">Category</label> <input type="text" required class="form-control" id="category" name="category" value="<?php echo $product->getCategory()?>"> </div> <div class="mb-3"> <label for="price" class="form-label">Price</label> <input type="number" required class="form-control" id="price" name="price" value="<?php echo $product->getPrice()?>"> </div> <div class="mb-3"> <label for="quantity" class="form-label">Quantity</label> <input type="number" class="form-control" id="quantity" name="quantity" value="<?php echo $product->getQuantity()?>"> </div> <div class="mb-3"> <label for="date_create" class="form-label">Date</label> <input type="date" class="form-control" id="date_create" name="date_create" value="<?php echo $product->getDateCreate()?>"> </div> <div class="mb-3"> <label for="detail" class="form-label">Detail</label> <input type="text" class="form-control" id="detail" name="detail" value="<?php echo $product->getDetail()?>"> </div> <?php endif ?> <button type="submit" class="btn btn-primary" onclick=" return confirm( 'Are you sure ?' )">UPDATE</button> <button type="submit" class="btn btn-success"><a style="color:white" href="index.php">CANCEL</a> </button> </form> </div> </body> </html><file_sep><?php require __DIR__ . '/vendor/autoload.php'; use App\Controller; $dbconnect = new \App\Model\DBConnect(); $controller = new Controller\ProductController(); if (isset($_REQUEST['find'])){ $controller->search(); } $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null; try { switch ($page){ case 'product-list': $controller->showAllProduct(); break; case 'create-product': $controller->createProduct(); break; case 'delete-product': $controller->deleteProduct(); break; case 'update-product': $controller->updateProduct(); break; default: $controller->showAllProduct(); } } catch (Exception $exception) { echo $exception->getMessage(); }<file_sep>-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 15, 2021 at 10:53 AM -- Server version: 8.0.26-0ubuntu0.20.04.2 -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!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 utf8mb4 */; -- -- Database: `examination` -- -- -------------------------------------------------------- -- -- Table structure for table `products` -- CREATE TABLE `products` ( `id` int NOT NULL, `name` varchar(20) NOT NULL, `category` varchar(20) NOT NULL, `price` int NOT NULL, `quantity` int NOT NULL, `date_create` date NOT NULL, `detail` varchar(1000) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- -- Dumping data for table `products` -- INSERT INTO `products` (`id`, `name`, `category`, `price`, `quantity`, `date_create`, `detail`) VALUES (6, 'j3', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'), (7, 'j5', 'samsung', 225, 1, '2021-09-14', 'Chiec dien thoai tuyet voi gia re va tot'), (8, 'j3', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'), (9, 'j1', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'), (10, 'j3', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'), (11, 'j3', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'), (13, 'j65', 'samsung', 422, 1, '2021-09-09', 'Chiec dien thoai tuyet voi gia re va tot'), (14, 'j3', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'), (15, 'j12', 'samsung', 23, 1, '2021-09-02', 'yeah'), (16, 'j12', 'samsung', 23, 1, '2021-09-02', 'yeah'), (17, 'j3', 'samsung', 234, 1, '2021-09-15', 'san pham tuyet voi'); -- -- Indexes for dumped tables -- -- -- Indexes for table `products` -- ALTER TABLE `products` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `products` -- ALTER TABLE `products` MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18; COMMIT; /*!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><?php namespace App\Model; class Product { private $id; private $name; private $category; private $price; private $quantity; private $date_create; private $detail; /** * Product constructor. * @param $name * @param $category * @param $price * @param $quantity * @param $date_create * @param $detail */ public function __construct($name, $category, $price, $quantity, $date_create, $detail) { $this->name = $name; $this->category = $category; $this->price = $price; $this->quantity = $quantity; $this->date_create = $date_create; $this->detail = $detail; } /** * @return mixed */ public function getId() { return $this->id; } /** * @param mixed $id */ public function setId($id) { $this->id = $id; } /** * @return mixed */ public function getName() { return $this->name; } /** * @param mixed $name */ public function setName($name) { $this->name = $name; } /** * @return mixed */ public function getCategory() { return $this->category; } /** * @param mixed $category */ public function setCategory($category) { $this->category = $category; } /** * @return mixed */ public function getPrice() { return $this->price; } /** * @param mixed $price */ public function setPrice($price) { $this->price = $price; } /** * @return mixed */ public function getQuantity() { return $this->quantity; } /** * @param mixed $quantity */ public function setQuantity($quantity) { $this->quantity = $quantity; } /** * @return mixed */ public function getDateCreate() { return $this->date_create; } /** * @param mixed $date_create */ public function setDateCreate($date_create) { $this->date_create = $date_create; } /** * @return mixed */ public function getDetail() { return $this->detail; } /** * @param mixed $detail */ public function setDetail($detail) { $this->detail = $detail; } }
34b95d0b766eab886b43e3f6490b8efc9ef6ab3a
[ "SQL", "PHP" ]
7
PHP
Kh0aiTayChien/examination_module2
80b5f6d3935fef21e15d7ac288cb583d02f36dcd
3fd3ea78a990b51f79e96dd5b1d8db4235fae454
refs/heads/master
<file_sep>import csv from LetterNN import LetterNN def getCSVResult(csvName): print('=' * 40) print(csvName) file = open(csvName, 'r', newline='') fileReader = csv.reader(file) labelLists = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ] i = 0 totalNum = 0 trueNum = 0 falseNum = 0 print('real, pred') for row in fileReader: result = letterNN.getPred([row]) real = labelLists[i] if result == real: resultMSg = 'same' trueNum += 1 else: resultMSg = 'not same' falseNum += 1 print('{}, {}...{}'.format(real, result, resultMSg)) i += 1 totalNum += 1 print('=' * 40) acc = trueNum / totalNum * 100.0 print(acc) if __name__ == '__main__': letterNN = LetterNN() # csvName = 'all_test.csv' savePath1 = "ann0508/HW3-Test2-toT-different_T.csv" savePath2 = "ann0508/HW3-Test2-toT-noise_T.csv" savePath3 = 'ann0508/HW3-Test1-toT-incomplete_T.csv' savePathLists = [ savePath1, savePath2, savePath3 ] for savePath in savePathLists: getCSVResult(savePath) # csvName = 'all_ii.csv' <file_sep># neuralNetwork 簡易英文大寫字母辨識 神經網路實做: [NeuralNetwork.py](https://github.com/frankkuo20/neuralNetwork/blob/master/neuralNetwork.py) 實做寫出神經元公式 ---- 用Tensorflow實做神經網路: [LetterNN.py](https://github.com/frankkuo20/neuralNetwork/blob/master/LetterNN.py) <file_sep>import csv import glob import re import cv2 def readFile(path): # 0 is black # 255 is white img = cv2.imread(path, 0) thresh = 127 im_bw = cv2.threshold(img, thresh, 255, cv2.THRESH_BINARY)[1] im_bw = cv2.subtract(255, im_bw) im_bw2 = cv2.divide(255, im_bw) # print(im_bw2) # cv2.imshow('image', im_bw) # cv2.waitKey(0) # cv2.destroyAllWindows() subPath = re.findall('\w.png', path)[0] subPath = subPath.split('.')[0] newPath = '{}/{}.csv'.format(DATASET_CSV_PATH, subPath) file = open(newPath, 'w', newline='') csvWriter = csv.writer(file) for line in im_bw2: csvWriter.writerows([[str(i) for i in line]]) return im_bw2 DATASET_PATH = 'dataset' DATASET_CSV_PATH = 'datasetCsv' FILE_ALL_NAME = 'all' # DATASET_PATH = 'dataset_test' # DATASET_CSV_PATH = 'datasetCsv_test' # FILE_ALL_NAME = 'all_test' if __name__ == '__main__': originPaths = glob.glob('{}/*'.format(DATASET_PATH)) fileAll = open('{}.csv'.format(FILE_ALL_NAME), 'w', newline='') fileAllWriter = csv.writer(fileAll) for originPath in originPaths: originImg = readFile(originPath) tempList = [] for row in originImg: for col in row: tempList.append(str(col)) fileAllWriter.writerows([tempList]) fileAll.close() <file_sep>import csv import pandas as pd import cv2 import numpy as np if __name__ == '__main__': path = 'all_me.csv' saveFolder = 'outputImg/me' # saveFolder = 'ann0508Img/HW3-Test1-toT-incomplete_T' # path = "ann0508/HW3-Test2-toT-different_T.csv" # path = "ann0508/HW3-Test2-toT-noise_T.csv" # path = 'ann0508/HW3-Test1-toT-incomplete_T.csv' df = pd.read_csv(path, header=None) dataList = df.iloc[:, :].values labelLists = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', # 'A2', 'B2', 'C2', 'D2', 'E2', # 'F2', 'G2', 'H2', 'I2', 'J2', # 'K2', 'L2', 'M2', 'N2', 'O2', # 'P2', 'Q2', 'R2', 'S2', 'T2', # 'U2', 'V2', 'W2', 'X2', 'Y2', 'Z2', ] for data, label in zip(dataList, labelLists): temp = data.reshape((11, 9)) # temp = 1 - temp # temp = temp*255 temp = np.array(temp) temp = temp.astype(np.uint8) print(temp) # img = cv2.imread(temp, 0) # cv2.imshow('image', img) # cv2.waitKey(0) # cv2.destroyAllWindows() # cv2.imwrite('messigray.png', img) print('{}/{}.png'.format(saveFolder, label)) cv2.imwrite('{}/{}.png'.format(saveFolder, label), temp) <file_sep>from decimal import Decimal class Neural: def __init__(self, weightList, bias, learningRate): self.weightList = weightList # 初始權重 self.bias = bias self.learningRate = learningRate self.reRun = False def passFunc(self, xList, t): ''' :param xList: [x1, x2] :param t: 標準答案 :return: ''' for index, x in enumerate(xList): print('x{} = {}, '.format(str(index+1), x), end='') print('t = {}'.format(t)) # w11 * x1 + w21 * x2 - bias netY = 0 for i in range(len(xList)): netY += xList[i] * self.weightList[i] netY -= self.bias # if net y >0 then 1 # if net y <= 0 then 0 y = 0 if netY > 0: y = 1 # 標準答案 loss = t - y if loss == 0: print('通過') print('============================================') return else: # loss != 0 deltaWeightList = [] for x in xList: dw = learningRate * loss * x deltaWeightList.append(dw) deltaBias = -1 * learningRate * loss self.weightList = [round(w + dw, 3) for w, dw in zip(self.weightList, deltaWeightList)] self.bias += deltaBias self.bias = round(self.bias, 3) for index, weight in enumerate(self.weightList): print('w{} = {}, '.format(str(index+1), weight), end='') print('bias = {}'.format(self.bias)) print('-再跑一次') self.passFunc(xList, t) self.reRun = True def getResult(self): print() print('結果為') for index, weight in enumerate(self.weightList): print('w{} = {}, '.format(str(index+1), weight), end='') print('bias = {}'.format(self.bias)) if __name__ == '__main__': # 第一題 weightList = [1.4, 1.5] # 初始權重 bias = 1.0 learningRate = 0.2 xLists = [[0, 0], [0, 1], [1, 0], [1, 1]] # 輸入值 tList = [0, 0, 0, 1] # 標準答案 # 第二題 weightList = [0.2, 0.5] # 初始權重 bias = 1.0 learningRate = 0.2 xLists = [[0, 0], [0, 1], [1, 0], [1, 1]] # 輸入值 tList = [0, 1, 1, 1] # 標準答案 # 第三題 weightList = [0.2, 0.5] # 初始權重 bias = 1.0 learningRate = 0.2 xLists = [[0, 0], [0, 1], [0, 1], [1, 1]] # 輸入值 tList = [0, 1, 1, 0] # 標準答案 # or opera # weightList = [1, 0.5] # 初始權重 # bias = 0.5 # learningRate = 0.1 # xLists = [[0, 0], [0, 1], [1, 0], [1, 1]] # 輸入值 # tList = [0, 1, 1, 1] # 標準答案 # and opera # weightList = [0.5, 0.5] # 初始權重 # bias = 1 # learningRate = 0.1 # xLists = [[0, 0], [0, 1], [1, 0], [1, 1]] # 輸入值 # tList = [0, 0, 0, 1] # 標準答案 neural = Neural(weightList, bias, learningRate) neural.reRun = True while neural.reRun: neural.reRun = False print() print('===============重新跑一次====================') for index, xList in enumerate(xLists): neural.passFunc(xList, tList[index]) neural.getResult() <file_sep>import csv import numpy as np from LetterNN import LetterNN, REAL_LABEL_LISTS def getCSVResult(csvName): print('=' * 40) print(csvName) file = open(csvName, 'r', newline='') fileReader = csv.reader(file) labelLists = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ] input_x = [] for row in fileReader: temp = [] for col in row: temp.append(float(col)) input_x.append(temp) input_x = np.array(input_x) # input_x = input_x.astype(np.uint8) # input_x = input_x.reshape() labels = np.zeros((len(labelLists), len(REAL_LABEL_LISTS))) for index, label in enumerate(labels): col = REAL_LABEL_LISTS.index(labelLists[index]) labels[index, col] = 1 input_y = labels acc = letterNN.getPredAccuracy(input_x, input_y) print(acc) if __name__ == '__main__': letterNN = LetterNN() # csvName = 'all_test.csv' savePath1 = "ann0508/HW3-Test2-toT-different_T.csv" savePath2 = "ann0508/HW3-Test2-toT-noise_T.csv" savePath3 = 'ann0508/HW3-Test1-toT-incomplete_T.csv' savePathLists = [ savePath1, savePath2, savePath3 ] for savePath in savePathLists: getCSVResult(savePath) # csvName = 'all_ii.csv' <file_sep>import csv import glob if __name__ == '__main__': DATASET_PATH = 'datasetCsv_ii' DATASET_CSV_PATH = 'datasetCsv_ii' FILE_ALL_NAME = 'all_ii' originPaths = glob.glob('{}/*'.format(DATASET_CSV_PATH)) fileAll = open('{}.csv'.format(FILE_ALL_NAME), 'w', newline='') fileAllWriter = csv.writer(fileAll) for originPath in originPaths: print(originPath) tempList = [] file = open(originPath, 'r') fileCsv = csv.reader(file) for row in fileCsv: for col in row: tempList.append(str(col)) fileAllWriter.writerows([tempList]) fileAll.close() <file_sep>import numpy as np if __name__ == '__main__': # path = 'ann0508/HW3-Test3-toT-different.csv' # path = 'ann0508/HW3-Test2-toT-noise.csv' path = 'ann0508/HW3-Test1-toT-incomplete.csv' # HW3 - Test1 - toT - incomplete.csv my_data = np.genfromtxt(path, delimiter=',') print(my_data.T) # savePath = "ann0508/HW3-Test2-toT-different_T.csv" # savePath = "ann0508/HW3-Test2-toT-noise_T.csv" savePath = 'ann0508/HW3-Test1-toT-incomplete_T.csv' np.savetxt(savePath, my_data.T, delimiter=",") # my_data.T # path = 'ann0508/HW3-Test3-toT-different.csv'<file_sep>import csv import time import tensorflow as tf import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpatches def weight_variable(shape): return tf.Variable(tf.truncated_normal(shape, stddev=0.1)) def bias_variable(shape): return tf.Variable(tf.constant(0.1, shape=shape)) INPUT_SIZE = 9 * 11 LABEL_CNT = 26 REAL_LABEL_LISTS = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ] class LetterNN: inputList_x = '' inputList_y = '' batchSize = 26 def __init__(self): x = tf.placeholder(tf.float32, [None, INPUT_SIZE]) y_ = tf.placeholder(tf.float32, [None, LABEL_CNT]) # right answer # one W_1 = weight_variable([INPUT_SIZE, INPUT_SIZE]) b_1 = bias_variable([INPUT_SIZE]) W_2 = weight_variable([INPUT_SIZE, INPUT_SIZE]) b_2 = bias_variable([INPUT_SIZE]) W_3 = weight_variable([INPUT_SIZE, LABEL_CNT]) b_3 = bias_variable([LABEL_CNT]) result_1 = tf.sigmoid(tf.matmul(x, W_1) + b_1) result_2 = tf.sigmoid(tf.matmul(result_1, W_2) + b_2) result_3 = tf.sigmoid(tf.matmul(result_2, W_3) + b_3) y = tf.nn.softmax(result_3) # y = tf.nn.softmax(tf.matmul(h_fc_drop, W_fc2) + b_fc2) cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=y, labels=y_)) # train_step = tf.train.GradientDescentOptimizer(1e-4).minimize(cross_entropy) train_step = tf.train.AdamOptimizer(1e-4).minimize(cross_entropy) correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1)) accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32)) init = tf.global_variables_initializer() self.x = x self.y = y self.y_ = y_ self.init = init self.train_step = train_step self.accuracy = accuracy def get_train_data(self, inputList_x, inputList_y): batchSize = self.batchSize totalNum = len(inputList_x) batchSizeNum = totalNum // batchSize inputList_x_batch = [] inputList_y_batch = [] for i in range(batchSizeNum): tempStart = batchSize * i tempEnd = batchSize * (i + 1) inputList_x_batch.append(inputList_x[tempStart:tempEnd]) inputList_y_batch.append(inputList_y[tempStart:tempEnd]) if totalNum % batchSize != 0: tempStart = batchSize * batchSizeNum inputList_x_batch.append(inputList_x[tempStart:]) inputList_y_batch.append(inputList_y[tempStart:]) return inputList_x_batch, inputList_y_batch def train(self): init = self.init train_step = self.train_step accuracy = self.accuracy x = self.x y_ = self.y_ inputList_x = self.inputList_x inputList_y = self.inputList_y inputList_x_batch, inputList_y_batch = self.get_train_data(inputList_x, inputList_y) save_step = 10 max_step = 10000 # 最大迭代次数 step = 0 saver = tf.train.Saver() # 用来保存模型的 epoch = 5 with tf.Session(config=tf.ConfigProto(allow_soft_placement=True, log_device_placement=True)) as sess: sess.run(init) accList = [] stepList = [] differentPath = "ann0508/HW3-Test2-toT-different_T.csv" noisePath = "ann0508/HW3-Test2-toT-noise_T.csv" incompletePath = 'ann0508/HW3-Test1-toT-incomplete_T.csv' differentList = [] noiseList = [] incompleteList = [] differentListAcc = [] noiseListAcc = [] incompleteListAcc = [] while step < max_step: for j in range(len(inputList_x_batch)): step += 1 input_x = inputList_x_batch[j] input_y = inputList_y_batch[j] # 训练。训练时dropout层要有值。 sess.run(train_step, feed_dict={x: input_x, y_: input_y}) if step % epoch == 0: # step # 输出当前batch的精度。预测时keep的取值均为1 acc = sess.run(accuracy, feed_dict={x: input_x, y_: input_y}) print('%s accuracy is %.2f' % (step, acc)) if step % 50 == 0: # step stepList.append(step) acc = sess.run(accuracy, feed_dict={x: input_x, y_: input_y}) acc = acc*100 accList.append(acc) input_x_test, input_y_test = self.readTestCsv(differentPath) acc = sess.run(accuracy, feed_dict={x: input_x_test, y_: input_y_test}) acc = acc*100 differentList.append(acc) input_x_test, input_y_test = self.readTestCsv(noisePath) acc = sess.run(accuracy, feed_dict={x: input_x_test, y_: input_y_test}) acc = acc * 100 noiseList.append(acc) input_x_test, input_y_test = self.readTestCsv(incompletePath) acc = sess.run(accuracy, feed_dict={x: input_x_test, y_: input_y_test}) acc = acc * 100 incompleteList.append(acc) if step % 1000 == 0: # step input_x_test, input_y_test = self.readTestCsv(differentPath) acc = sess.run(accuracy, feed_dict={x: input_x_test, y_: input_y_test}) acc = acc * 10000 acc = int(acc) acc = acc / 100 differentListAcc.append(acc) input_x_test, input_y_test = self.readTestCsv(noisePath) acc = sess.run(accuracy, feed_dict={x: input_x_test, y_: input_y_test}) acc = acc * 10000 acc = int(acc) acc = acc / 100 noiseListAcc.append(acc) input_x_test, input_y_test = self.readTestCsv(incompletePath) acc = sess.run(accuracy, feed_dict={x: input_x_test, y_: input_y_test}) acc = acc * 10000 acc = int(acc) acc = acc / 100 incompleteListAcc.append(acc) # if step % save_step == 0: # # 保存当前模型 # save_path = saver.save(sess, './trainModel/graph.ckpt', global_step=step) # print("save graph to %s" % save_path) saver.save(sess, './trainModel/graph.ckpt', global_step=step) red_patch = mpatches.Patch(color='blue', label='train') red_patch2 = mpatches.Patch(color='red', label='different') red_patch3 = mpatches.Patch(color='orange', label='noise') red_patch4 = mpatches.Patch(color='green', label='incomplete') plt.legend(handles=[red_patch, red_patch2, red_patch3, red_patch4]) plt.plot(stepList, accList, color='b') plt.plot(stepList, differentList, color='r') plt.plot(stepList, noiseList, color='orange') plt.plot(stepList, incompleteList, color='green') plt.ylabel('accuracy') plt.xlabel('train step') plt.show() print('='*40) print(differentListAcc) print('='*40) print(noiseListAcc) print('='*40) print(incompleteListAcc) print("training is done") def getPred(self, testinput_x): x = self.x y = self.y labelLists = REAL_LABEL_LISTS sess = tf.Session() saver = tf.train.Saver() # tf.reset_default_graph() saver.restore(sess, tf.train.latest_checkpoint('trainModel')) y = sess.run(y, feed_dict={x: testinput_x}) yNum = y.argmax() return labelLists[yNum] def getPredAccuracy(self, input_x, input_y): x = self.x y_ = self.y_ accuracy = self.accuracy sess = tf.Session() saver = tf.train.Saver() # tf.reset_default_graph() saver.restore(sess, tf.train.latest_checkpoint('trainModel')) acc = sess.run(accuracy, feed_dict={x: input_x, y_: input_y}) acc = acc*100 return acc def readTestCsv(self, csvName): file = open(csvName, 'r', newline='') fileReader = csv.reader(file) labelLists = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ] input_x = [] for row in fileReader: temp = [] for col in row: temp.append(float(col)) input_x.append(temp) input_x = np.array(input_x) labels = np.zeros((len(labelLists), len(REAL_LABEL_LISTS))) for index, label in enumerate(labels): col = REAL_LABEL_LISTS.index(labelLists[index]) labels[index, col] = 1 input_y = labels return input_x, input_y if __name__ == '__main__': df = pd.read_csv('all.csv', header=None) dataList = df.iloc[:, :].values # 真實答案 labelLists = [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ] # 假設 labels = np.zeros((len(labelLists), len(REAL_LABEL_LISTS))) for index, label in enumerate(labels): col = REAL_LABEL_LISTS.index(labelLists[index]) labels[index, col] = 1 print(len(labels)) letterNN = LetterNN() letterNN.inputList_x = dataList letterNN.inputList_y = labels start_time = time.time() letterNN.train() # letterNN.test() print("--- %s seconds ---" % (time.time() - start_time))
537a252b9cbe345e25bc29298e677e0ce03c91a1
[ "Markdown", "Python" ]
9
Python
frankkuo20/neuralNetwork
0247c14d14588fdaa3e1e108174a4001947b3f84
3923d417d0f53f181239c76a0e88113ed71f803f
refs/heads/master
<repo_name>rbpinheiro/nodejs-dojo<file_sep>/test/server.spec.js import expect from 'expect'; import { app } from '../server'; describe('server', () => { it('should have a server', () => { expect(app).toExist(); }); it('should save a todo', () => { }); });<file_sep>/README.md Comandos # Rodar o app npm start # Rodar os testes npm run test:watch WEB: https://github.com/rbpinheiro/redux-dojo
7c6446e369be558637075e5b32749194d246dd22
[ "JavaScript", "Markdown" ]
2
JavaScript
rbpinheiro/nodejs-dojo
4572ae954e45f173505c28762416623871421022
4ceb3fa8227737adb4d970e77e51170bd60d07e6
refs/heads/master
<repo_name>StanfordSNR/puffer-statistics<file_sep>/scripts/export_constants.sh #!/bin/bash -u # Don't exit or set -e, since script is sourced # Exports constants needed for initializing VM and entrance program-related scripts. # If date argument is supplied, END_DATE is exported; else, END_DATE is empty. USAGE="Usage: export_constants.sh <dir> <date>.\n\ Dir: Absolute path to directory containing statistics repo and local data.\n\ Date: Date to be analyzed as 20XX-XX-XX or \"yesterday\". Day starts at 11AM UTC.\n\ (Optional - not needed during init)\n" if [[ "$#" -ne 1 && "$#" -ne 2 ]]; then >&2 printf "$USAGE" return 1 fi if [ ! -d "$1"/puffer-statistics ]; then >&2 echo "$1 must exist and contain puffer-statistics repo." >&2 printf "$USAGE" return 1 fi # Set END_DATE if specified, formatted as 2019-07-01T11_2019-07-02T11 if [ "$#" -eq 2 ]; then if [ "$2" == "yesterday" ]; then # current day is postfix of date string; # e.g. 2019-07-01T11_2019-07-02T11 backup is at 2019-07-02 11AM UTC SECOND_DAY=$(date -I --utc) FIRST_DAY=$(date -I -d "$SECOND_DAY - 1 day") else # Check date format if ! date -I -d "$2" > /dev/null; then >&2 printf "$USAGE" return 1 fi FIRST_DAY="$2" SECOND_DAY=$(date -I -d "$FIRST_DAY + 1 day") fi fi # Export constants set -o allexport # TODO: these can't be readonly since this script needs to run multiple times # in same shell (e.g. once for each date) # Day to be analyzed (formatted as Influx backup filename) if [ "$#" -eq 2 ]; then END_DATE=${FIRST_DAY}T11_${SECOND_DAY}T11 else END_DATE="" fi # Absolute path to local dir containing each day's data LOCAL_DATA_PATH="$1"/puffer-data-release # Absolute path to local puffer-statistics repo STATS_REPO_PATH="$1"/puffer-statistics # Directory name for daily metadata, error logs # (Full path will be $LOCAL_DATA_PATH/$END_DATE/$LOGS) LOGS=logs # Experimental settings dump file EXPT="$LOGS"/expt_settings # Google Cloud Storage bucket for data DATA_BUCKET=gs://puffer-data-release # Prefix used to identify a stream stats file from any day STREAM_STATS_PREFIX=stream_stats # Postfix used to identify watch times files WATCH_TIMES_POSTFIX=watch_times.txt set +o allexport <file_sep>/submission_anon_analyze.cc #include <cstdlib> #include <stdexcept> #include <iostream> #include <vector> #include <string> #include <array> #include <tuple> #include <charconv> #include <map> #include <cstring> #include <fstream> #include <google/sparse_hash_map> #include <google/dense_hash_map> #include <boost/container_hash/hash.hpp> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <jsoncpp/json/json.h> #include <sys/time.h> #include <sys/resource.h> #include <dateutil.hh> using namespace std; using namespace std::literals; using google::sparse_hash_map; using google::dense_hash_map; /** * From stdin, parses influxDB export, which contains one line per key/value datapoint * collected at a given timestamp. Keys correspond to fields in Event, SysInfo, or VideoSent. * To stdout, outputs summary of each stream (one stream per line). * Takes experimental settings and date as arguments. */ size_t memcheck() { rusage usage{}; if (getrusage(RUSAGE_SELF, &usage) < 0) { perror("getrusage"); throw runtime_error(string("getrusage: ") + strerror(errno)); } if (usage.ru_maxrss > 36 * 1024 * 1024) { throw runtime_error("memory usage is at " + to_string(usage.ru_maxrss) + " KiB"); } return usage.ru_maxrss; } // if delimiter is at end, adds empty string to ret void split_on_char(const string_view str, const char ch_to_find, vector<string_view> & ret) { ret.clear(); bool in_double_quoted_string = false; unsigned int field_start = 0; // start of next token for (unsigned int i = 0; i < str.size(); i++) { const char ch = str[i]; if (ch == '"') { in_double_quoted_string = !in_double_quoted_string; } else if (in_double_quoted_string) { continue; } else if (ch == ch_to_find) { ret.emplace_back(str.substr(field_start, i - field_start)); field_start = i + 1; } } ret.emplace_back(str.substr(field_start)); } uint64_t to_uint64(string_view str) { uint64_t ret = -1; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { str.remove_prefix(ptr - str.data()); throw runtime_error("could not parse as integer: " + string(str)); } return ret; } float to_float(const string_view str) { /* sadly, g++ 8 doesn't seem to have floating-point C++17 from_chars() yet float ret; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { throw runtime_error("could not parse as float: " + string(str)); } return ret; */ /* apologies for this */ char * const null_byte = const_cast<char *>(str.data() + str.size()); char old_value = *null_byte; *null_byte = 0; const float ret = atof(str.data()); *null_byte = old_value; return ret; } template <typename T> T influx_integer(const string_view str) { if (str.back() != 'i') { throw runtime_error("invalid influx integer: " + string(str)); } const uint64_t ret_64 = to_uint64(str.substr(0, str.size() - 1)); if (ret_64 > numeric_limits<T>::max()) { throw runtime_error("can't convert to uint32_t: " + string(str)); } return static_cast<T>(ret_64); } constexpr uint8_t SERVER_COUNT = 255; // server_id identifies a daemon serving a given scheme uint64_t get_server_id(const vector<string_view> & fields) { uint64_t server_id = -1; for (const auto & field : fields) { if (not field.compare(0, 10, "server_id="sv)) { server_id = to_uint64(field.substr(10)) - 1; } } if (server_id >= SERVER_COUNT) { for ( const auto & x : fields ) { cerr << "field=" << x << " "; }; throw runtime_error( "Invalid or missing server id" ); } return server_id; } class string_table { uint32_t next_id_ = 0; dense_hash_map<string, uint32_t> forward_{}; dense_hash_map<uint32_t, string> reverse_{}; public: string_table() { forward_.set_empty_key({}); reverse_.set_empty_key(-1); } uint32_t forward_map_vivify(const string & name) { auto ref = forward_.find(name); if (ref == forward_.end()) { forward_[name] = next_id_; reverse_[next_id_] = name; next_id_++; ref = forward_.find(name); } return ref->second; } uint32_t forward_map(const string & name) const { auto ref = forward_.find(name); if (ref == forward_.end()) { throw runtime_error( "username " + name + " not found"); } return ref->second; } const string & reverse_map(const uint32_t id) const { auto ref = reverse_.find(id); if (ref == reverse_.end()) { throw runtime_error( "uid " + to_string(id) + " not found"); } return ref->second; } }; struct Event { struct EventType { enum class Type : uint8_t { init, startup, play, timer, rebuffer }; constexpr static array<string_view, 5> names = { "init", "startup", "play", "timer", "rebuffer" }; Type type; operator string_view() const { return names[uint8_t(type)]; } EventType(const string_view sv) : type() { if (sv == "timer"sv) { type = Type::timer; } else if (sv == "play"sv) { type = Type::play; } else if (sv == "rebuffer"sv) { type = Type::rebuffer; } else if (sv == "init"sv) { type = Type::init; } else if (sv == "startup"sv) { type = Type::startup; } else { throw runtime_error( "unknown event type: " + string(sv) ); } } operator uint8_t() const { return static_cast<uint8_t>(type); } bool operator==(const EventType other) const { return type == other.type; } bool operator==(const EventType::Type other) const { return type == other; } bool operator!=(const EventType other) const { return not operator==(other); } bool operator!=(const EventType::Type other) const { return not operator==(other); } }; /* After 11/27, all measurements are recorded with both first_init_id (identifies session) * and init_id (identifies stream). Before 11/27, only init_id is recorded. */ optional<uint32_t> first_init_id{}; // optional optional<uint32_t> init_id{}; // mandatory optional<uint32_t> expt_id{}; optional<uint32_t> user_id{}; optional<EventType> type{}; optional<float> buffer{}; optional<float> cum_rebuf{}; bool bad = false; // Event is "complete" and "good" if all mandatory fields are set exactly once bool complete() const { return init_id.has_value() and expt_id.has_value() and user_id.has_value() and type.has_value() and buffer.has_value() and cum_rebuf.has_value(); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory event value: "; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } /* Set field corresponding to key, if not yet set for this Event. * If field is already set with a different value, Event is "bad" */ void insert_unique(const string_view key, const string_view value, string_table & usernames ) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "event"sv) { set_unique( type, { value.substr(1,value.size()-2) } ); } else if (key == "buffer"sv) { set_unique( buffer, to_float(value) ); } else if (key == "cum_rebuf"sv) { set_unique( cum_rebuf, to_float(value) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const Event& s); }; std::ostream& operator<< (std::ostream& out, const Event& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", type=" << (s.type.has_value() ? int(s.type.value()) : 'x') << ", buffer=" << s.buffer.value_or(-1.0) << ", cum_rebuf=" << s.cum_rebuf.value_or(-1.0) << ", first_init_id=" << s.first_init_id.value_or(-1) << "\n"; } struct Sysinfo { optional<uint32_t> browser_id{}; optional<uint32_t> expt_id{}; optional<uint32_t> user_id{}; optional<uint32_t> first_init_id{}; // optional optional<uint32_t> init_id{}; // mandatory optional<uint32_t> os{}; optional<uint32_t> ip{}; bool bad = false; bool complete() const { return browser_id and expt_id and user_id and init_id and os and ip; } bool operator==(const Sysinfo & other) const { return browser_id == other.browser_id and expt_id == other.expt_id and user_id == other.user_id and init_id == other.init_id and os == other.os and ip == other.ip and first_init_id == first_init_id; } bool operator!=(const Sysinfo & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory sysinfo value: "; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value, string_table & usernames, string_table & browsers, string_table & ostable ) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "browser"sv) { set_unique( browser_id, browsers.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "os"sv) { string osname(value.substr(1,value.size()-2)); for (auto & x : osname) { if ( x == ' ' ) { x = '_'; } } set_unique( os, ostable.forward_map_vivify(osname) ); } else if (key == "ip"sv) { set_unique( ip, inet_addr(string(value.substr(1,value.size()-2)).c_str()) ); } else if (key == "screen_width"sv or key == "screen_height"sv) { // ignore } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const Sysinfo& s); }; std::ostream& operator<< (std::ostream& out, const Sysinfo& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", browser_id=" << (s.browser_id.value_or(-1)) << ", os=" << s.os.value_or(-1.0) << ", ip=" << s.ip.value_or(-1.0) << ", first_init_id=" << s.first_init_id.value_or(-1) << "\n"; } struct VideoSent { optional<float> ssim_index{}; optional<uint32_t> delivery_rate{}, expt_id{}, init_id{}, first_init_id{}, user_id{}, size{}; bool bad = false; bool complete() const { return ssim_index and delivery_rate and expt_id and init_id and user_id and size; } bool operator==(const VideoSent & other) const { return ssim_index == other.ssim_index and delivery_rate == other.delivery_rate and expt_id == other.expt_id and init_id == other.init_id and user_id == other.user_id and size == other.size and first_init_id == first_init_id; } bool operator!=(const VideoSent & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory videosent value: "; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value, string_table & usernames ) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "ssim_index"sv) { set_unique( ssim_index, to_float(value) ); } else if (key == "delivery_rate"sv) { set_unique( delivery_rate, influx_integer<uint32_t>( value ) ); } else if (key == "size"sv) { set_unique( size, influx_integer<uint32_t>( value ) ); } else if (key == "buffer"sv or key == "cum_rebuffer"sv or key == "cwnd"sv or key == "format"sv or key == "in_flight"sv or key == "min_rtt"sv or key == "rtt"sv or key == "video_ts"sv) { // ignore } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const VideoSent& s); }; std::ostream& operator<< (std::ostream& out, const VideoSent& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", ssim_index=" << s.ssim_index.value_or(-1) << ", delivery_rate=" << s.delivery_rate.value_or(-1) << ", size=" << s.size.value_or(-1) << ", first_init_id=" << s.first_init_id.value_or(-1) << "\n"; } struct Channel { constexpr static uint8_t COUNT = 9; enum class ID : uint8_t { cbs, nbc, abc, fox, univision, pbs, cw, ion, mnt }; constexpr static array<string_view, COUNT> names = { "cbs", "nbc", "abc", "fox", "univision", "pbs", "cw", "ion", "mnt" }; ID id; constexpr Channel(const string_view sv) : id() { if (sv == "cbs"sv) { id = ID::cbs; } else if (sv == "nbc"sv) { id = ID::nbc; } else if (sv == "abc"sv) { id = ID::abc; } else if (sv == "fox"sv) { id = ID::fox; } else if (sv == "univision"sv) { id = ID::univision; } else if (sv == "pbs"sv) { id = ID::pbs; } else if (sv == "cw"sv) { id = ID::cw; } else if (sv == "ion"sv) { id = ID::ion; } else if (sv == "mnt"sv) { id = ID::mnt; } else { throw runtime_error( "unknown channel: " + string(sv) ); } } constexpr Channel(const uint8_t id_int) : id(static_cast<ID>(id_int)) {} operator string_view() const { return names[uint8_t(id)]; } constexpr operator uint8_t() const { return static_cast<uint8_t>(id); } bool operator==(const Channel other) { return id == other.id; } bool operator!=(const Channel other) { return not operator==(other); } }; Channel get_channel(const vector<string_view> & fields) { for (const auto & field : fields) { if (not field.compare(0, 8, "channel="sv)) { return field.substr(8); } } throw runtime_error("channel missing"); } using event_table = map<uint64_t, Event>; using sysinfo_table = map<uint64_t, Sysinfo>; using video_sent_table = map<uint64_t, VideoSent>; /* Whenever a timestamp is used to represent a day, round down to Influx backup hour. * Influx records ts as nanoseconds - use nanoseconds up until writing ts to stdout. */ using Day_ns = uint64_t; /* I only want to type this once. */ #define NS_PER_SEC 1000000000UL #define MAX_SSIM 0.99999 // max acceptable raw SSIM (exclusive) // ignore SSIM ~ 1 optional<double> raw_ssim_to_db(const double raw_ssim) { if (raw_ssim > MAX_SSIM) return nullopt; return -10.0 * log10( 1 - raw_ssim ); } class Parser { private: string_table usernames{}; string_table browsers{}; string_table ostable{}; // client_buffer[server][channel] = map<ts, Event> array<array<event_table, Channel::COUNT>, SERVER_COUNT> client_buffer{}; // client_sysinfo[server] = map<ts, SysInfo> array<sysinfo_table, SERVER_COUNT> client_sysinfo{}; // video_sent[server][channel] = map<ts, VideoSent> array<array<video_sent_table, Channel::COUNT>, SERVER_COUNT> video_sent{}; // streams[stream_key] = vec<[ts, Event]> using stream_key = tuple<uint32_t, uint32_t, uint32_t, uint8_t, uint8_t>; /* init_id, uid, expt_id, server, channel */ dense_hash_map<stream_key, vector<pair<uint64_t, const Event*>>, boost::hash<stream_key>> streams; // sysinfos[sysinfo_key] = SysInfo using sysinfo_key = tuple<uint32_t, uint32_t, uint32_t>; /* init_id, uid, expt_id */ dense_hash_map<sysinfo_key, Sysinfo, boost::hash<sysinfo_key>> sysinfos; // chunks[stream_key] = vec<[ts, VideoSent]> dense_hash_map<stream_key, vector<pair<uint64_t, const VideoSent*>>, boost::hash<stream_key>> chunks; unsigned int bad_count = 0; vector<string> experiments{}; /* Timestamp range to be analyzed (influx export includes corrupt data outside the requested range). * Any ts outside this range are rejected */ pair<Day_ns, Day_ns> days{}; size_t n_bad_ts = 0; void read_experimental_settings_dump(const string & filename) { ifstream experiment_dump{ filename }; if (not experiment_dump.is_open()) { throw runtime_error( "can't open " + filename ); } string line_storage; while (true) { getline(experiment_dump, line_storage); if (not experiment_dump.good()) { break; } const string_view line{line_storage}; const size_t separator = line.find_first_of(' '); if (separator == line.npos) { throw runtime_error("can't find separator: " + line_storage); } const uint64_t experiment_id = to_uint64(line.substr(0, separator)); if (experiment_id > numeric_limits<uint16_t>::max()) { throw runtime_error("invalid expt_id: " + line_storage); } const string_view rest_of_string = line.substr(separator+1); Json::Reader reader; Json::Value doc; reader.parse(string(rest_of_string), doc); experiments.resize(experiment_id + 1); string name = doc["abr_name"].asString(); if (name.empty()) { name = doc["abr"].asString(); } // populate experiments with expt_id => abr_name/cc or abr/cc experiments.at(experiment_id) = name + "/" + doc["cc"].asString(); } } public: Parser(const string & experiment_dump_filename, Day_ns start_ts) : streams(), sysinfos(), chunks() { streams.set_empty_key({0,0,0,-1,-1}); sysinfos.set_empty_key({0,0,0}); chunks.set_empty_key({0,0,0,-1,-1}); usernames.forward_map_vivify("unknown"); browsers.forward_map_vivify("unknown"); ostable.forward_map_vivify("unknown"); read_experimental_settings_dump(experiment_dump_filename); days.first = start_ts; days.second = start_ts + 60 * 60 * 24 * NS_PER_SEC; } /* Parse lines of influxDB export, for lines measuring client_buffer, client_sysinfo, or video_sent. * Each such line contains one field in an Event, SysInfo, or VideoSent (respectively) * corresponding to a certain server, channel (for Event/VideoSent only), and timestamp. * Store that field in the appropriate Event, SysInfo, or VideoSent (which may already * be partially populated by other lines) in client_buffer, client_sysinfo, or video_sent. * Ignore data points out of the date range. */ void parse_stdin() { ios::sync_with_stdio(false); string line_storage; unsigned int line_no = 0; vector<string_view> fields, measurement_tag_set_fields, field_key_value; while (cin.good()) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } getline(cin, line_storage); line_no++; const string_view line{line_storage}; if (line.empty() or line.front() == '#') { continue; } if (line.size() > numeric_limits<uint8_t>::max()) { throw runtime_error("Line " + to_string(line_no) + " too long"); } // influxDB export line has 3 space-separated fields // e.g. client_buffer,channel=abc,server_id=1 cum_rebuf=2.183 1546379215825000000 split_on_char(line, ' ', fields); if (fields.size() != 3) { if (not line.compare(0, 15, "CREATE DATABASE"sv)) { continue; } cerr << "Ignoring line with wrong number of fields: " << string(line) << "\n"; continue; } const auto [measurement_tag_set, field_set, timestamp_str] = tie(fields[0], fields[1], fields[2]); // e.g. ["client_buffer,channel=abc,server_id=1", "cum_rebuf=2.183", "1546379215825000000"] // skip out-of-range data points const uint64_t timestamp{to_uint64(timestamp_str)}; if (timestamp < days.first or timestamp > days.second) { n_bad_ts++; continue; } split_on_char(measurement_tag_set, ',', measurement_tag_set_fields); if (measurement_tag_set_fields.empty()) { throw runtime_error("No measurement field on line " + to_string(line_no)); } const auto measurement = measurement_tag_set_fields[0]; // e.g. client_buffer split_on_char(field_set, '=', field_key_value); if (field_key_value.size() != 2) { throw runtime_error("Irregular number of fields in field set: " + string(line)); } const auto [key, value] = tie(field_key_value[0], field_key_value[1]); // e.g. [cum_rebuf, 2.183] try { if ( measurement == "client_buffer"sv ) { // Set this line's field (e.g. cum_rebuf) in the Event corresponding to this // server, channel, and ts const auto server_id = get_server_id(measurement_tag_set_fields); const auto channel = get_channel(measurement_tag_set_fields); client_buffer[server_id][channel][timestamp].insert_unique(key, value, usernames); } else if ( measurement == "active_streams"sv ) { // skip } else if ( measurement == "backlog"sv ) { // skip } else if ( measurement == "channel_status"sv ) { // skip } else if ( measurement == "client_error"sv ) { // skip } else if ( measurement == "client_sysinfo"sv ) { // some records in 2019-09-08T11_2019-09-09T11 have a crazy server_id and // seemingly the older record structure (with user= as part of the tags) optional<uint64_t> server_id; try { server_id.emplace(get_server_id(measurement_tag_set_fields)); } catch (const exception & e) { cerr << "Error with server_id: " << e.what() << "\n"; } // Set this line's field (e.g. browser) in the SysInfo corresponding to this // server and ts if (server_id.has_value()) { client_sysinfo[server_id.value()][timestamp].insert_unique(key, value, usernames, browsers, ostable); } } else if ( measurement == "decoder_info"sv ) { // skip } else if ( measurement == "server_info"sv ) { // skip } else if ( measurement == "ssim"sv ) { // skip } else if ( measurement == "video_acked"sv ) { // video_acked[get_server_id(measurement_tag_set_fields)][timestamp].insert_unique(key, value); } else if ( measurement == "video_sent"sv ) { // Set this line's field (e.g. ssim_index) in the VideoSent corresponding to this // server, channel, and ts const auto server_id = get_server_id(measurement_tag_set_fields); const auto channel = get_channel(measurement_tag_set_fields); video_sent[server_id][channel][timestamp].insert_unique(key, value, usernames); } else if ( measurement == "video_size"sv ) { // skip } else { throw runtime_error( "Can't parse: " + string(line) ); } } catch (const exception & e ) { cerr << "Failure on line: " << line << "\n"; throw; } } // Count total events /* size_t n_total_events = 0; for (uint8_t server = 0; server < client_buffer.size(); server++) { for (uint8_t channel = 0; channel < Channel::COUNT; channel++) { n_total_events += client_buffer[server][channel].size(); } } cerr << "n_total_events " << n_total_events << endl; */ } /* Group Events by stream (key is {init_id, expt_id, user_id, server, channel}) * Ignore "bad" Events (field was set multiple times), throw for "incomplete" Events (field was never set) * Store in streams, along with timestamp for each Event, ordered by increasing timestamp */ void accumulate_streams() { for (uint8_t server = 0; server < client_buffer.size(); server++) { const size_t rss = memcheck() / 1024; cerr << "stream_server " << int(server) << "/" << client_buffer.size() << ", RSS=" << rss << " MiB\n"; for (uint8_t channel = 0; channel < Channel::COUNT; channel++) { // iterates in increasing ts order for (const auto & [ts,event] : client_buffer[server][channel]) { if (event.bad) { bad_count++; cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values.\n"; continue; } if (not event.complete()) { throw runtime_error("incomplete event with timestamp " + to_string(ts)); } streams[{*event.init_id, *event.user_id, *event.expt_id, server, channel}].emplace_back(ts, &event); } } } // cerr << "n_total_streams " << sessions.size() << endl; } /* Map each SysInfo to a stream or session (in the case of older data, when sysinfo was only supplied on load). * Key is {init_id, expt_id, user_id}. * Ignore "bad" SysInfos (field was set multiple times), throw for "incomplete" SysInfos (field was never set) * Store in sysinfos. * Use init_id in the key, not first_init_id, since there may be multiple sysinfos per session. */ void accumulate_sysinfos() { for (uint8_t server = 0; server < client_buffer.size(); server++) { const size_t rss = memcheck() / 1024; cerr << "sysinfo_server " << int(server) << "/" << client_buffer.size() << ", RSS=" << rss << " MiB\n"; for (const auto & [ts,sysinfo] : client_sysinfo[server]) { if (sysinfo.bad) { bad_count++; cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values.\n"; continue; } if (not sysinfo.complete()) { throw runtime_error("incomplete sysinfo with timestamp " + to_string(ts)); } const sysinfo_key key{*sysinfo.init_id, *sysinfo.user_id, *sysinfo.expt_id}; const auto it = sysinfos.find(key); if (it == sysinfos.end()) { sysinfos[key] = sysinfo; } else { if (sysinfos[key] != sysinfo) { throw runtime_error("contradictory sysinfo for " + to_string(*sysinfo.init_id)); } } } } } /* Group VideoSents by stream (key is {init_id, expt_id, user_id, server, channel}) * Ignore "bad" VideoSents (field was set multiple times), throw for "incomplete" VideoSents (field was never set) * Store in chunks, along with timestamp for each VideoSent */ void accumulate_video_sents() { for (uint8_t server = 0; server < client_buffer.size(); server++) { const size_t rss = memcheck() / 1024; cerr << "video_sent_server " << int(server) << "/" << video_sent.size() << ", RSS=" << rss << " MiB\n"; for (uint8_t channel = 0; channel < Channel::COUNT; channel++) { for (const auto & [ts,videosent] : video_sent[server][channel]) { if (videosent.bad) { bad_count++; cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values.\n"; continue; } if (not videosent.complete()) { throw runtime_error("incomplete videosent with timestamp " + to_string(ts)); } chunks[{*videosent.init_id, *videosent.user_id, *videosent.expt_id, server, channel}].emplace_back(ts, &videosent); } } } } // print a tuple of any size, promoting uint8_t template<class Tuple, std::size_t N> struct TuplePrinter { static void print(const Tuple& t) { TuplePrinter<Tuple, N-1>::print(t); std::cout << ", " << +std::get<N-1>(t); } }; template<class Tuple> struct TuplePrinter<Tuple, 1> { static void print(const Tuple& t) { std::cout << +std::get<0>(t); } }; template<class... Args> void print(const std::tuple<Args...>& t) { std::cout << "("; TuplePrinter<decltype(t), sizeof...(Args)>::print(t); std::cout << ")\n"; } void debug_print_grouped_data() { cerr << "streams:" << endl; for ( const auto & [key, events] : streams ) { cerr << "stream key: "; print(key); for ( const auto & [ts, event] : events ) { cerr << ts << ", " << *event; } } cerr << "sysinfos:" << endl; for ( const auto & [key, sysinfo] : sysinfos ) { cerr << "sysinfo key: "; print(key); cerr << sysinfo; } cerr << "chunks:" << endl; for ( const auto & [key, stream_chunks] : chunks ) { cerr << "stream key: "; print(key); for ( const auto & [ts, videosent] : stream_chunks ) { cerr << ts << ", " << *videosent; } } } /* Corresponds to a line of analyze output; summarizes a stream */ struct EventSummary { uint64_t base_time{0}; // lowest ts in stream, in NANOseconds bool valid{false}; // good or bad bool full_extent{true}; // full or trunc float time_extent{0}; float cum_rebuf_at_startup{0}; float cum_rebuf_at_last_play{0}; float time_at_startup{0}; float time_at_last_play{0}; string scheme{}; uint32_t init_id{}; /* reason for bad OR trunc (bad_reason != "good" does not necessarily imply the stream is bad -- * it may just be trunc) */ string bad_reason{}; }; /* Output a summary of each stream */ void analyze_streams() const { float total_time_after_startup=0; float total_stall_time=0; float total_extent=0; unsigned int had_stall=0; unsigned int good_streams=0; unsigned int good_and_full=0; unsigned int missing_sysinfo = 0; unsigned int missing_video_stats = 0; size_t overall_chunks = 0, overall_high_ssim_chunks = 0, overall_ssim_1_chunks = 0; for ( auto & [key, events] : streams ) { /* Find Sysinfo corresponding to this stream. */ /* Client increments init_id with each channel change. * Before ~11/27/19: must decrement init_id until reaching the initial init_id * to find the corresponding Sysinfo. Also, sysinfo was only supplied on load. * After 11/27: Each data point is recorded with first_init_id and init_id. * Also, sysinfo is supplied on both load and channel change. */ auto sysinfo_it = sysinfos.end(); // int channel_changes = -1; // use first event to check if stream uses first_init_id optional<uint32_t> first_init_id = events.front().second->first_init_id; if (first_init_id) { /* We introduced first_init_id at the same time we started sending client_sysinfo * for every stream, so if a stream has the first_init_id field in its datapoints, * then that stream should have its own sysinfo * (so no need to decrement to find the sysinfo) */ sysinfo_it = sysinfos.find({get<0>(key), get<1>(key), get<2>(key)}); // channel_changes = get<0>(key) - first_init_id.value(); } else { for ( unsigned int decrement = 0; decrement < 1024; decrement++ ) { sysinfo_it = sysinfos.find({get<0>(key) - decrement, get<1>(key), get<2>(key)}); if (sysinfo_it == sysinfos.end()) { // loop again } else { // channel_changes = decrement; break; } } } Sysinfo sysinfo{}; sysinfo.os = 0; sysinfo.ip = 0; if (sysinfo_it == sysinfos.end()) { missing_sysinfo++; } else { sysinfo = sysinfo_it->second; } const EventSummary summary = summarize(key, events); /* find matching videosent stream */ const auto [normal_ssim_chunks, ssim_1_chunks, total_chunks, ssim_sum, mean_delivery_rate, average_bitrate, ssim_variation] = video_summarize(key); const double mean_ssim = ssim_sum == -1 ? -1 : ssim_sum / normal_ssim_chunks; const size_t high_ssim_chunks = total_chunks - normal_ssim_chunks; if (mean_delivery_rate < 0 ) { missing_video_stats++; } else { overall_chunks += total_chunks; overall_high_ssim_chunks += high_ssim_chunks; overall_ssim_1_chunks += ssim_1_chunks; } /* When changing the order/name of these fields, update pre_confinterval and confinterval * accordingly (they throw if field name mismatch). * When changing the number of fields, update constant in watchtimesutil.hh */ cout << fixed; // ts from influx export include nanoseconds -- truncate to seconds // cout all non-private values for comparison against // public version cout << "ts=" << (summary.base_time / 1000000000) << " valid=" << (summary.valid ? "good" : "bad") << " full_extent=" << (summary.full_extent ? "full" : "trunc" ) << " bad_reason=" << summary.bad_reason << " scheme=" << summary.scheme << " extent=" << summary.time_extent << " used=" << 100 * summary.time_at_last_play / summary.time_extent << "%" << " mean_ssim=" << mean_ssim << " mean_delivery_rate=" << mean_delivery_rate << " average_bitrate=" << average_bitrate << " ssim_variation_db=" << ssim_variation << " startup_delay=" << summary.cum_rebuf_at_startup << " total_after_startup=" << (summary.time_at_last_play - summary.time_at_startup) << " stall_after_startup=" << (summary.cum_rebuf_at_last_play - summary.cum_rebuf_at_startup) << "\n"; total_extent += summary.time_extent; if (summary.valid) { // valid = "good" good_streams++; total_time_after_startup += (summary.time_at_last_play - summary.time_at_startup); if (summary.cum_rebuf_at_last_play > summary.cum_rebuf_at_startup) { had_stall++; total_stall_time += (summary.cum_rebuf_at_last_play - summary.cum_rebuf_at_startup); } if (summary.full_extent) { good_and_full++; } } } // end for // mark summary lines with # so confinterval will ignore them cout << "#num_streams=" << streams.size() << " good=" << good_streams << " good_and_full=" << good_and_full << " missing_sysinfo=" << missing_sysinfo << " missing_video_stats=" << missing_video_stats << " had_stall=" << had_stall << " overall_chunks=" << overall_chunks << " overall_high_ssim_chunks=" << overall_high_ssim_chunks << " overall_ssim_1_chunks=" << overall_ssim_1_chunks << "\n"; cout << "#total_extent=" << total_extent / 3600.0 << " total_time_after_startup=" << total_time_after_startup / 3600.0 << " total_stall_time=" << total_stall_time / 3600.0 << "\n"; } /* Summarize a list of Videosents, ignoring SSIM ~ 1 */ // normal_ssim_chunks, ssim_1_chunks, total_chunks, ssim_sum, mean_delivery_rate, average_bitrate, ssim_variation] tuple<size_t, size_t, size_t, double, double, double, double> video_summarize(const stream_key & key) const { const auto videosent_it = chunks.find(key); if (videosent_it == chunks.end()) { return { -1, -1, -1, -1, -1, -1, -1 }; } const vector<pair<uint64_t, const VideoSent *>> & chunk_stream = videosent_it->second; double ssim_sum = 0; // raw index double delivery_rate_sum = 0; double bytes_sent_sum = 0; optional<double> ssim_cur_db{}; // empty if index == 1 optional<double> ssim_last_db{}; // empty if no previous, or previous had index == 1 double ssim_absolute_variation_sum = 0; size_t num_ssim_samples = chunk_stream.size(); /* variation is calculated between each consecutive pair of chunks */ size_t num_ssim_var_samples = chunk_stream.size() - 1; size_t num_ssim_1_chunks = 0; for ( const auto [ts, videosent] : chunk_stream ) { float raw_ssim = videosent->ssim_index.value(); // would've thrown by this point if not set if (raw_ssim == 1.0) { num_ssim_1_chunks++; } ssim_cur_db = raw_ssim_to_db(raw_ssim); if (ssim_cur_db.has_value()) { ssim_sum += raw_ssim; } else { num_ssim_samples--; // for ssim_mean, ignore chunk with SSIM == 1 } if (ssim_cur_db.has_value() && ssim_last_db.has_value()) { ssim_absolute_variation_sum += abs(ssim_cur_db.value() - ssim_last_db.value()); } else { num_ssim_var_samples--; // for ssim_var, ignore pair containing chunk with SSIM == 1 } ssim_last_db = ssim_cur_db; delivery_rate_sum += videosent->delivery_rate.value(); bytes_sent_sum += videosent->size.value(); } const double average_bitrate = 8 * bytes_sent_sum / (2.002 * chunk_stream.size()); double average_absolute_ssim_variation = -1; if (num_ssim_var_samples > 0) { average_absolute_ssim_variation = ssim_absolute_variation_sum / num_ssim_var_samples; } return { num_ssim_samples, num_ssim_1_chunks, chunk_stream.size(), ssim_sum, delivery_rate_sum / chunk_stream.size(), average_bitrate, average_absolute_ssim_variation }; } /* Summarize a list of events corresponding to a stream. */ EventSummary summarize(const stream_key & key, const vector<pair<uint64_t, const Event*>> & events) const { const auto & [init_id, uid, expt_id, server, channel] = key; EventSummary ret; ret.scheme = experiments.at(expt_id); ret.init_id = init_id; ret.bad_reason = "good"; const uint64_t base_time = events.front().first; ret.base_time = base_time; ret.time_extent = (events.back().first - base_time) / double(1000000000); bool started = false; bool playing = false; float last_sample = 0.0; optional<float> time_low_buffer_started; float last_buffer=0, last_cum_rebuf=0; /* Break on the first trunc or slow decoder event in the list (if any) * Return early if slow decoder, else set validity based on whether stream is * zeroplayed/never started/negative rebuffer. * Bad_reason != "good" indicates that summary is "bad" or "trunc" * (here "bad" refers to some characteristic of the stream, rather than to * contradictory data points as in an Event) */ for ( unsigned int i = 0; i < events.size(); i++ ) { if (not ret.full_extent) { break; // trunc, but not necessarily bad } const auto & [ts, event] = events[i]; const float relative_time = (ts - base_time) / 1000000000.0; if (relative_time - last_sample > 8.0) { ret.bad_reason = "event_interval>8s"; ret.full_extent = false; break; // trunc, but not necessarily bad } if (event->buffer.value() > 0.3) { time_low_buffer_started.reset(); } else { if (not time_low_buffer_started.has_value()) { time_low_buffer_started.emplace(relative_time); } } if (time_low_buffer_started.has_value()) { if (relative_time - time_low_buffer_started.value() > 20) { // very long rebuffer ret.bad_reason = "stall>20s"; ret.full_extent = false; break; // trunc, but not necessarily bad } } if (event->buffer.value() > 5 and last_buffer > 5) { if (event->cum_rebuf.value() > last_cum_rebuf + 0.15) { // stall with plenty of buffer --> slow decoder? ret.bad_reason = "stall_while_playing"; return ret; // BAD } } switch (event->type.value().type) { case Event::EventType::Type::init: break; case Event::EventType::Type::play: playing = true; ret.time_at_last_play = relative_time; ret.cum_rebuf_at_last_play = event->cum_rebuf.value(); break; case Event::EventType::Type::startup: if ( not started ) { ret.time_at_startup = relative_time; ret.cum_rebuf_at_startup = event->cum_rebuf.value(); started = true; } playing = true; ret.time_at_last_play = relative_time; ret.cum_rebuf_at_last_play = event->cum_rebuf.value(); break; case Event::EventType::Type::timer: if ( playing ) { ret.time_at_last_play = relative_time; ret.cum_rebuf_at_last_play = event->cum_rebuf.value(); } break; case Event::EventType::Type::rebuffer: playing = false; break; } last_sample = relative_time; last_buffer = event->buffer.value(); last_cum_rebuf = event->cum_rebuf.value(); } // end for // zeroplayed and neverstarted are both counted as "didn't begin playing" in paper if (ret.time_at_last_play <= ret.time_at_startup) { ret.bad_reason = "zeroplayed"; return ret; // BAD } // counted as contradictory data in paper?? if (ret.cum_rebuf_at_last_play < ret.cum_rebuf_at_startup) { ret.bad_reason = "negative_rebuffer"; return ret; // BAD } if (not started) { ret.bad_reason = "neverstarted"; return ret; // BAD } // good is set here, so validity="bad" iff return early ret.valid = true; return ret; } }; void analyze_main(const string & experiment_dump_filename, Day_ns start_ts) { Parser parser{ experiment_dump_filename, start_ts }; parser.parse_stdin(); parser.accumulate_streams(); parser.accumulate_sysinfos(); parser.accumulate_video_sents(); parser.analyze_streams(); } /* Parse date to Unix timestamp (nanoseconds) at Influx backup hour, * e.g. 2019-11-28T11_2019-11-29T11 => 1574938800000000000 (for 11AM UTC backup) */ optional<Day_ns> parse_date(const string & date) { const auto T_pos = date.find('T'); const string & start_day = date.substr(0, T_pos); struct tm day_fields{}; ostringstream strptime_str; strptime_str << start_day << " " << BACKUP_HR << ":00:00"; if (not strptime(strptime_str.str().c_str(), "%Y-%m-%d %H:%M:%S", &day_fields)) { return nullopt; } // set timezone to UTC for mktime char* tz = getenv("TZ"); setenv("TZ", "UTC", 1); tzset(); Day_ns start_ts = mktime(&day_fields) * NS_PER_SEC; tz ? setenv("TZ", tz, 1) : unsetenv("TZ"); tzset(); return start_ts; } /* Must take date as argument, to filter out extra data from influx export */ int main(int argc, char *argv[]) { try { if (argc <= 0) { abort(); } if (argc != 3) { cerr << "Usage: " << argv[0] << " expt_dump [from postgres] date [e.g. 2019-07-01T11_2019-07-02T11]\n"; return EXIT_FAILURE; } optional<Day_ns> start_ts = parse_date(argv[2]); if (not start_ts) { cerr << "Date argument could not be parsed; format as 2019-07-01T11_2019-07-02T11\n"; return EXIT_FAILURE; } analyze_main(argv[1], start_ts.value()); } catch (const exception & e) { cerr << e.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } <file_sep>/scripts/init_data_release_vm.sh #!/bin/bash -ue # Prepare a fresh VM to run the statistics programs. # Creates local data directory with watch times, in pwd. # 1. Clone puffer-statistics/data-release git clone https://github.com/StanfordSNR/puffer-statistics.git pushd puffer-statistics # 2. Install dependencies scripts/deps.sh # 3. Build ./autogen.sh ./configure make -j$(nproc) sudo make install popd # 4. Set constants and paths used below source scripts/export_constants.sh "$PWD" # 5. Create local directory for data mkdir "$LOCAL_DATA_PATH" cd "$LOCAL_DATA_PATH" # 6. Download static watch time lists from gs (to be used for all days) gsutil -q cp "$DATA_BUCKET"/*"$WATCH_TIMES_POSTFIX" . # 7. (Private only) Set up environment for Postgres connection <file_sep>/scripts/entrance.sh #!/bin/bash set -e # Usage: # ./entrance.sh <day> <mode> # day (mandatory): 2019-07-01T11_2019-07-02T11 or current # current is current day, UTC # mode (optional, defaults to public): private # For desired day: # Generate csvs and per-STREAM stats. # For desired day/week/two weeks/month (if data available on local or gs): # Generate per-SCHEME stats and plots. # (Note this introduces a dependency across days, so be careful parallelizing) # Upload public data to gs (private mode only). # Preconditions: # Dependencies installed # On data-release branch of puffer-statistics (TODO move to master) # Local_data_path already exists, but does not contain directory for desired day # Postgres key is set # Desired day's Influx data is in puffer-influxdb-analytics bucket # Static watch time lists in gs shared among all days? (TODO) # TODO: add check to confint for number of watch_times -- how many is enough? # Note: To build watch times lists: # (Input data should include at least a year or so, # since we sample from these lists to calculate confidence intervals) # watch_times_err="watch_times_err.txt" # cat ../*/*public_analyze_stats.txt | "$stats_repo_path"/pre_confinterval \ # "$watch_times_out" --build-watchtimes-list 2> "$watch_times_err" main() { # Absolute path to puffer-statistics repo stats_repo_path=~/puffer-statistics # Absolute path to local dir containing each day's data local_data_path=~/data-release-test # Experimental settings dump expt="expt_settings" # Google Cloud Storage bucket for data # TODO: remove "test" from bucket and data dir names data_bucket=gs://puffer-stanford-public/data-release-test # List of all days each scheme has run # Note: confinterval ignores days outside the desired time period, # so all time periods can use the same scheme_days_out # (time period only needs to be a subset of scheme_days_out) # P.S. Doing time period filtering in confinterval requires confinterval to read in more stats # than necessary, so if current dir has a ton of stats, # could organize into subdirectories and only input the relevant ones scheme_days_out="scheme_days_out.txt" # Readable summary of scheme_days_out scheme_days_err="scheme_days_err.txt" # List of watch times (should already be in root of local data dir) watch_times_out="watch_times_out.txt" # List of days all requested schemes were run intx_out="intx_out.txt" # Just a log intx_err="intx_err.txt" if [ "$#" -lt 1 ]; then usage="Provide date to be analyzed: e.g. 2019-07-01T11_2019-07-02T11, or \"current\"" echo $usage exit 1 fi # Get date, formatted as 2019-07-01T11_2019-07-02T11 # TODO: proper arg parsing...and error handling generally... if [ "$1" == "current" ]; then # current day is postfix of date string; # e.g. 2019-07-01T11_2019-07-02T11 backup is at 2019-07-02 11AM UTC local second_day=$(date -I --utc) local first_day=$(date -I -d "$second_day - 1 day") date=${first_day}T11_${second_day}T11 else date="$1" fi # Check for private mode private=false if [[ "$#" -eq 2 && "$2" == "private" ]]; then private=true fi # First day in desired date; e.g. 2019-07-01 for 2019-07-01T11_2019-07-02T11 date_prefix=${date:0:10} if [ -d "$local_data_path"/"$date" ]; then echo "Local directory" "$local_data_path"/"$date" "already exists" exit 1 fi # Create local directory for day's data # (corresponding gs directory is created during upload) mkdir "$local_data_path"/"$date" pushd "$local_data_path"/"$date" # Get expt settings if [ "$private" == "true" ]; then # Private: Dump to local (will be uploaded to gs with the other data) # Requires db key to be set "$stats_repo_path"/experiments/dump-puffer-experiment > "$expt" else # Public: Download settings from gs gsutil cp "$data_bucket"/"$date"/"$expt" . fi # Generate STREAM stats for desired day single_day_stats # Prerequisites for per-scheme analysis run_pre_confinterval # Generate SCHEME stats/plots for desired day, week, two weeks, month run_confinterval # Upload day's PUBLIC data to gs (private only) if [ "$private" == "true" ]; then to_upload=$(ls | grep -v *private*) gsutil cp $to_upload "$data_bucket"/"$date" # don't quote $to_upload -- need the spaces fi popd } single_day_stats() { # 1. Get anonymized csv if [ "$private" == "true" ]; then # Private: Download Influx export from gs gsutil cp gs://puffer-influxdb-analytics/"$date".tar.gz . # exits if not found tar xf "$date".tar.gz # Enter (temporary) data directory # (pwd now: "$local_data_path"/"$date"/"$date") pushd "$date" for f in *.tar.gz; do tar xf "$f"; done popd # Private: Influx export => anonymized csv (private only) # TODO: abort script if right side of pipe errors influx_inspect export -datadir "$date" -waldir /dev/null -out /dev/fd/3 3>&1 1>/dev/null | \ "$stats_repo_path"/private_analyze "$date" 2> "$date"_private_analyze_err.txt # Private: Clean up Influx data if [ "$private" == "true" ]; then rm -rf "$date" rm "$date".tar.gz fi else # Public: Download csv from gs gsutil cp "$data_bucket"/"$date"/*.csv . fi # 2. Anonymized csv => stream-by-stream stats # TODO: Do we want date in (any of) the filenames, if both local and gs have a dir for each date? cat client_buffer_"$date".csv | "$stats_repo_path"/public_analyze \ "$expt" "$date" > "$date"_public_analyze_stats.txt 2> "$date"_public_analyze_err.txt } run_pre_confinterval() { # 1. Determine which schemes ran on the desired day desired_schemes="desired_schemes.txt" # Desired day's list of schemes # pre_confinterval outputs each scheme's name as well as the days it ran # (Note this is dependent on the format of the output) cat "$date"_public_analyze_stats.txt | "$stats_repo_path"/pre_confinterval \ "$desired_schemes" --build-schemedays-list 2> "$scheme_days_err" # Convert to comma-separated list schemes=$(cat "$desired_schemes" | cut -d ' ' -f1 | tr '\n' ',') schemes=${schemes%?} # remove trailing comma # Only needed to get desired schemes rm "$desired_schemes" # 2. Build scheme schedule # (input data must include all days to be plotted) # TODO: replace all .. with enumerated filenames cat ../*/*public_analyze_stats.txt | "$stats_repo_path"/pre_confinterval \ "$scheme_days_out" --build-schemedays-list 2>> "$scheme_days_err" # append to err from build-schemedays-list above # 3. Get intersection using scheme schedule # Note: confinterval ignores a day's data if the day is not in this list # (meaning not all schemes ran that day) "$stats_repo_path"/pre_confinterval \ "$scheme_days_out" --intersect-schemes "$schemes" --intersect-out "$intx_out" 2> "$intx_err" } # Given length of period, return first day in period # formatted as 2019-07-01T11_2019-07-02T11 # e.g. date=2019-07-01T11_2019-07-02T11, length=2 => 2019-06-30T11_2019-07-01T11 # e.g. date=2019-07-01T11_2019-07-02T11, length=1 => 2019-07-01T11_2019-07-02T11 time_period_start() { let n_days_to_subtract="$1 - 1" local first_day_prefix=$(date -I -d "$date_prefix - $n_days_to_subtract days") local first_day_postfix=$(date -I -d "$first_day_prefix + 1 day") # use echo to return result, so this function should not echo anything else echo ${first_day_prefix}T11_${first_day_postfix}T11 } # $1: number of days in time period (e.g. 7 for week) # Check if all data is available (either locally or in gs) for the period. # If data is in gs but not local, download it. # TODO: check local data integrity period_avail() { local avail=true local ndays=$1 # Day before desired date forms a time period of length 2 for ((i = 2; i <= $ndays; i++)); do local past_date=$(time_period_start $i) if [ ! -d "$local_data_path"/"$past_date" ]; then # Past day not available locally => try gs # gsutil stat requires /* to be appended local avail_in_gs=$(gsutil -q stat "$data_bucket"/"$past_date"/*; echo "$?") if [ "$avail_in_gs" -eq 1 ]; then # stat returns 1 if not found avail=false break else # Past day is available in gs => download it # TODO: only need to copy stream stats, not the whole directory gsutil cp -r "$data_bucket"/"$past_date" "$local_data_path" fi fi done # use echo to return result, so this function should not echo anything else echo "$avail" } run_confinterval() { # TODO: all speeds only for now declare -A time_periods # days per period time_periods[day]=1 time_periods[week]=7 time_periods[two_weeks]=14 time_periods[month]=30 # For each time_period with enough data: Calculate confidence intervals and plot for time_period in ${!time_periods[@]}; do # Skip time period if not enough data available # (Currently confint doesn't check if input data contains full range passed to --days. # It could, but outfiles would still be created which could be confusing) local ndays=${time_periods[$time_period]} local avail=$(period_avail "$ndays") if [ "$avail" == "false" ]; then echo "Skipping time period" $time_period "with insufficient data available" continue fi local confint_out="${time_period}_confint_out.txt" local confint_err="${time_period}_confint_err.txt" local date_range=$(time_period_start "$ndays"):"$date" # OK if local has stats out of desired range (either older or newer); # confint filters on range cat ../*/*public_analyze_stats.txt | "$stats_repo_path"/confinterval \ --scheme-intersection "$intx_out" --stream-speed all \ --watch-times ../"$watch_times_out" \ --days "$date_range" > "$confint_out" 2> "$confint_err" local d2g="ssim_stall_to_gnuplot" # axes adjust automatically local plot="${time_period}_plot.svg" # TODO: title plots; make plotting script scheme-agnostic # (current version assumes Fugu/Pensieve[in-situ]/BBA) cat "$confint_out" | "$stats_repo_path"/plots/${d2g} | gnuplot > "$plot" done } main "$@" <file_sep>/dateutil.hh /* Date utilities */ #ifndef DATEUTIL_HH #define DATEUTIL_HH #include <set> #include <iostream> #include <string> #include <sstream> using std::cerr; using std::string; using Day_sec = uint64_t; /* Hour of Influx backup, e.g. 11 for 11am UTC, 23 for 11pm UTC. * TODO: can we pull this number from somewhere? "T11" maybe? */ static const unsigned BACKUP_HR = 11; /** * Given a set of Unix timestamps (seconds), prints contiguous intervals as nice strings. * E.g. given timestamps representing {Jan 15, Jan 16, Jan 17, Jan 18, Feb 1, Feb 2, Feb 3}, * print Jan 15 : Jan 18, Feb 1 : Feb 3. * Useful for (pre)confinterval. */ void print_intervals(const std::set<Day_sec> & days) { struct tm ts_fields{}; char day_str[80] = {-1}; char prev_day_str[80] = {-1}; uint64_t prev_day = -1; for (const Day_sec & day: days) { // set is ordered // swap at beginning of loop iter so day_str is the current day at loop exit std::swap(prev_day_str, day_str); time_t ts_raw = day; // gmtime assumes argument is GMT ts_fields = *gmtime(&ts_raw); strftime(day_str, sizeof(day_str), "%Y-%m-%d", &ts_fields); if (difftime(day, prev_day) > 60 * 60 * 24) { // end of previous interval if (prev_day != -1UL) { cerr << prev_day_str << "\n"; } // start of next interval cerr << day_str << " : "; } prev_day = day; } // end of last interval if (prev_day != -1UL) { cerr << day_str << "\n"; } } /* Parse date string or prefix to * Unix timestamp (seconds) at Influx backup hour, * e.g. 2019-11-28 or 2019-11-28T11_2019-11-29T11 => 1574938800 (for 11AM UTC backup) */ std::optional<Day_sec> str2Day_sec(const string & date_str) { // TODO: check format // If no T, takes entire string const auto T_pos = date_str.find('T'); const string & start_day = date_str.substr(0, T_pos); struct tm day_fields{}; std::ostringstream strptime_str; strptime_str << start_day << " " << BACKUP_HR << ":00:00"; if (not strptime(strptime_str.str().c_str(), "%Y-%m-%d %H:%M:%S", &day_fields)) { return {}; } // set timezone to UTC for mktime char* tz = getenv("TZ"); setenv("TZ", "UTC", 1); tzset(); Day_sec start_ts = mktime(&day_fields); tz ? setenv("TZ", tz, 1) : unsetenv("TZ"); tzset(); return start_ts; } /* Round down ts *in seconds* to nearest backup hour. */ Day_sec ts2Day_sec(uint64_t ts) { if (ts > 9999999999) { throw(std::logic_error("ts2Day_sec operates on seconds, not nanoseconds")); } const unsigned sec_per_hr = 60 * 60; const unsigned sec_per_day = sec_per_hr * 24; unsigned day_index = ts / sec_per_day; const unsigned sec_past_midnight = ts % sec_per_day; if (sec_past_midnight < BACKUP_HR * sec_per_hr) { /* If ts is before backup hour, it belongs to the previous day's backup * (e.g. Jan 2 1:00 am belongs to Jan 1 11:00 am backup) */ day_index--; } return day_index * sec_per_day + BACKUP_HR * sec_per_hr; } #endif <file_sep>/scripts/deps.sh #!/bin/bash # Installs dependencies for analyze, preconfinterval, and confinterval # Tested on Ubuntu 19.10 # Changes for 18.04: # jemalloc package may not have a .pc file for pkg-config # boost include: container_hash => functional # g++8 for charconv # TODO: add matplotlib, python3 # (private only) add InfluxData repo wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list # get libs sudo apt-get update libs=("jemalloc" "jsoncpp" "sparsehash" "boost-all" "crypto++") for lib in ${libs[@]}; do sudo apt-get install -y lib${lib}-dev done # (private only) for Postgres connect (note PUFFER_PORTAL_DB_KEY is also required) sudo apt-get install -y libdbd-pg-perl # get tools tools=("influxdb" "gnuplot" "pkg-config") # pkg-config needed for configure for tool in ${tools[@]}; do sudo apt-get install -y $tool done # gsutil is also required, for access to the data bucket <file_sep>/scripts/parallel_wrapper_fetch_and_analyze.sh #!/bin/bash # Run analyze in provided (nonexistent) directory; exit if dir exists if [ "$#" -lt 1 ]; then usage="Provide name of directory for results" echo $usage exit 1 fi if [ -d $1 ]; then echo "Provided directory exists" exit 1 fi mkdir $1 pushd $1 start_time=`date +%s` # parallel takes space-separated list of args to fetch_and_analyze args="" push_args() { cur_date=$1 end_date=$2 while [ "$cur_date" != "$end_date" ]; do next_date=$(date -I -d "$cur_date + 1 day") args=" $args $cur_date:$next_date" cur_date=$next_date done } # 2019-01-26T11_2019-01-27T11 : 2020-02-02T11_2020-02-03T11 (inclusive) push_args "2019-01-26" "2020-02-03" parallel ~/puffer-statistics/scripts/fetch_and_analyze.sh ::: $args end_time=`date +%s` runtime=$((end_time-start_time)) echo "wrapper runtime, min: " $(($runtime/60)) popd <file_sep>/scripts/private_data_release.sh #!/bin/bash -ue # Assumes puffer-statistics and local data live in ~ cd ~/puffer-statistics/scripts source ./export_constants.sh ~ yesterday echo "sourced" ./private_entrance.sh echo "finished private" ./public_entrance.sh echo "finished public" ./upload_public_results.sh echo "finished upload" <file_sep>/scripts/fetch_and_analyze.sh #!/bin/bash # For provided date ranges, grabs data from gs and runs analyze # Assumed to already be in desired output directory (e.g. called by parallel wrapper) # Diffs results against the submission (submission_anon_analyze is the version of # analyze used in the submission, with non-anonymous output suppressed for comparison) set -e # For now, private and public in one script # Export and analyze a single day single_day_stats() { first_day=$1 second_day=$(date -I -d "$first_day + 1 day") date=${first_day}T11_${second_day}T11 # format 2019-07-01T11_2019-07-02T11 # echo $date # echo "getting data" gsutil cp gs://puffer-influxdb-analytics/${date}.tar.gz . # untar once to get top-level date containing {manifest, meta, s*.tar} tar xf ${date}.tar.gz # untar again on s*.tar.gz to get puffer/retention32d/*/*.tsm # not all s*.tar.gz are nonempty pushd ${date} for f in *.tar.gz; do tar xf "$f"; done popd # influx_inspect export -datadir $date -waldir /dev/null -out "influx_out.txt" # useful for test # export to influxDB line protocol file # pass top-level date to influx_inspect # echo "exporting and analyzing" # Influx export => anonymized csv #echo "starting private analyze" influx_inspect export -datadir $date -waldir /dev/null -out /dev/fd/3 3>&1 1>/dev/null | \ ~/puffer-statistics/private_analyze $date 2> ${date}_private_analyze_err.txt #echo "finished private analyze for date " $date # Anonymized csv => stream-by-stream stats cat client_buffer_${date}.csv | ~/puffer-statistics/public_analyze \ ~/puffer-statistics/experiments/puffer.expt_feb4_2020 $date > ${date}_public_analyze_stats.txt \ 2> ${date}_public_analyze_err.txt #echo "finished public analyze" # Run submission version for comparison #echo "starting submission analyze" influx_inspect export -datadir $date -waldir /dev/null -out /dev/fd/3 3>&1 1>/dev/null | \ ~/puffer-statistics/submission_anon_analyze \ ~/puffer-statistics/experiments/puffer.expt_feb4_2020 $date > ${date}_submission_anon_stats.txt \ 2> ${date}_submission_anon_err.txt # clean up data, leave stats/err.txt, csvs rm -rf ${date} rm ${date}.tar.gz # rm *_${date}.csv # diff submission and new stats -- ignore tiny differences from float addition order # sort, since public analyze outputs in different order stats=(${date}_submission_anon_stats.txt ${date}_public_analyze_stats.txt) for stats in "${stats[@]}"; do sort -o $stats $stats # set up for numdiff # sed -i 's/=/= /g' $stats # sed -i 's/%//g' $stats done # numdiff doesn't work with tail # numdiff -r 0.005 ${date}_submission_anon_stats.txt ${date}_public_analyze_stats.txt >> diffs.txt diff <(tail -n +3 ${date}_submission_anon_stats.txt) <(tail -n +3 ${date}_public_analyze_stats.txt) >> diffs.txt } if [ "$#" -lt 1 ]; then usage="Provide date ranges; e.g. \`./fetch_and_plot.sh 2019-01-18:2019-08-08 2019-08-29:2019-09-12\` \ for primary study period 2019-01-18T11_2019-01-19T11 to 2019-08-07T11_2019-08-08T11 \ and 2019-08-29T11_2019-08-30T11 to 2019-09-11T11_2019-09-12T11 (inclusive)" echo $usage exit 1 fi start_time=`date +%s` for range in "$@"; do IFS=':' read -ra endpoints <<< "$range" cur_date=${endpoints[0]} end_date=${endpoints[1]} # exclude end (single_day_stats analyzes [cur, cur+1]) while [ "$cur_date" != "$end_date" ]; do single_day_stats $cur_date cur_date=$(date -I -d "$cur_date + 1 day") done done end_time=`date +%s` runtime=$((end_time-start_time)) echo "runtime, min: " $(($runtime/60)) <file_sep>/scripts/parallel_wrapper_private_date_release.sh #!/bin/bash -ue # TODO LEFT OFF: source w/ //ization? (OK if all diff shells...) cd ~/puffer-statistics/scripts start_time=`date +%s` # parallel takes space-separated list of args args="" ndays=0 push_args() { cur_date=$1 end_date=$2 while [ "$cur_date" != "$end_date" ]; do next_date=$(date -I -d "$cur_date + 1 day") args=" $args $cur_date" cur_date=$next_date done } # 2019-01-26T11_2019-01-27T11 : 2020-04-14_2020-04-15T11 (inclusive) #push_args "2019-01-26" "2020-04-15" push_args "2019-01-26" "2019-01-28" # TODO: gives 2019-01-26 2019-01-27 => goes to 2019-01-27T11_ echo "pid $$" parallel ~/puffer-statistics/scripts/parallelizable_private_data_release.sh ::: $args end_time=`date +%s` runtime=$((end_time-start_time)) echo "wrapper runtime, min: " $(($runtime/60)) <file_sep>/configure.ac # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) AC_INIT([puffer-analysis], [0.1], [<EMAIL>]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_HEADERS([config.h]) # Add picky CXXFLAGS CXX17_FLAGS="-std=c++17" PICKY_CXXFLAGS="-Wpedantic -Wall -Wextra -Weffc++ -Werror" AC_SUBST([CXX17_FLAGS]) AC_SUBST([PICKY_CXXFLAGS]) # Change default CXXflags : ${CXXFLAGS="-g -Ofast -march=native -mtune=native"} # Checks for programs. AC_PROG_CXX AC_PROG_RANLIB # Checks for libraries. PKG_CHECK_MODULES([jemalloc],[jemalloc]) PKG_CHECK_MODULES([jsoncpp], [jsoncpp]) PKG_CHECK_MODULES([CRYPTO],[libcrypto++]) # Checks for header files. AC_LANG_PUSH(C++) save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CXX17_FLAGS" AC_CHECK_HEADERS([google/dense_hash_map], [], [AC_MSG_ERROR([Missing required header file.])]) AC_CHECK_HEADERS([google/sparse_hash_map], [], [AC_MSG_ERROR([Missing required header file.])]) CPPFLAGS="$save_CPPFLAGS" AC_LANG_POP(C++) # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_CONFIG_FILES([ Makefile ]) AC_OUTPUT <file_sep>/scripts/count_streams.sh #!/bin/bash pushd ~/final_primary_period_only/ total_num_streams=0 for stats in *stats.txt; do # period is 2019-01-26T11_2019-01-27T11:2019-08-07T11_2019-08-08T11, # 2019-08-30T11_2019-08-31T11, and 2019-10-16T11_2019-10-17T11 num_streams=$(cat $stats | tail -n 2 | head -n 1 | cut -d ' ' -f1 | cut -d '=' -f2) # Count *total* streams in primary *period*, regardless of scheme/acceptability total_num_streams=$(($total_num_streams + $num_streams)) done echo "total_num_streams: " $total_num_streams popd <file_sep>/Makefile.am AM_CPPFLAGS = $(CXX17_FLAGS) $(jemalloc_CFLAGS) $(jsoncpp_CFLAGS) AM_CXXFLAGS = $(PICKY_CXXFLAGS) bin_PROGRAMS = influx_to_csv csv_to_stream_stats stream_to_scheme_stats stream_stats_to_metadata influx_to_csv_SOURCES = influx_to_csv.cc influx_to_csv_LDADD = $(jemalloc_LIBS) $(CRYPTO_LIBS) csv_to_stream_stats_SOURCES = csv_to_stream_stats.cc csv_to_stream_stats_LDADD = $(jsoncpp_LIBS) $(jemalloc_LIBS) stream_to_scheme_stats_SOURCES = stream_to_scheme_stats.cc stream_to_scheme_stats_LDADD = $(jemalloc_LIBS) stream_stats_to_metadata_SOURCES = stream_stats_to_metadata.cc <file_sep>/stream_to_scheme_stats.cc #include <cstdlib> #include <stdexcept> #include <iostream> #include <vector> #include <string> #include <array> #include <tuple> #include <charconv> #include <map> #include <cstring> #include <fstream> #include <random> #include <algorithm> #include <iomanip> #include <getopt.h> #include <cassert> #include <set> #include "dateutil.hh" #include "confintutil.hh" #include <sys/time.h> #include <sys/resource.h> using namespace std; using namespace std::literals; /** * From stdin, parses output of analyze, which contains one line per stream summary. * To stdout, outputs each scheme's mean stall ratio, SSIM, and SSIM variance, * along with confidence intervals. * Takes as mandatory arguments the file containing desired schemes and the days they intersect * (from stream_stats_to_metadata --intersect-schemes), and the name of the watch times files * (from stream_stats_to_metadata --build-watchtimes-list). * Stall ratio is calculated over simulated samples; * SSIM/SSIMvar is calculated over real samples. */ /* * Takes as optional argument a date range, restricting consideration to that range * even if scheme-intersection and/or input data contain additional days. * That is, the set of days considered from the input data is the * intersection of scheme-intersection and date range. * If no date range supplied, all days in scheme-intersection are considered. */ size_t memcheck() { rusage usage{}; if (getrusage(RUSAGE_SELF, &usage) < 0) { perror("getrusage"); throw runtime_error(string("getrusage: ") + strerror(errno)); } if (usage.ru_maxrss > 36 * 1024 * 1024) { throw runtime_error("memory usage is at " + to_string(usage.ru_maxrss) + " KiB"); } return usage.ru_maxrss; } void split_on_char(const string_view str, const char ch_to_find, vector<string_view> & ret) { ret.clear(); bool in_double_quoted_string = false; unsigned int field_start = 0; for (unsigned int i = 0; i < str.size(); i++) { const char ch = str[i]; if (ch == '"') { in_double_quoted_string = !in_double_quoted_string; } else if (in_double_quoted_string) { continue; } else if (ch == ch_to_find) { ret.emplace_back(str.substr(field_start, i - field_start)); field_start = i + 1; } } ret.emplace_back(str.substr(field_start)); } uint64_t to_uint64(string_view str) { uint64_t ret = -1; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { str.remove_prefix(ptr - str.data()); throw runtime_error("could not parse as integer: " + string(str)); } return ret; } double to_double(const string_view str) { /* sadly, g++ 8 doesn't seem to have floating-point C++17 from_chars() yet float ret; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { throw runtime_error("could not parse as float: " + string(str)); } return ret; */ /* apologies for this */ char * const null_byte = const_cast<char *>(str.data() + str.size()); char old_value = *null_byte; *null_byte = 0; const double ret = atof(str.data()); *null_byte = old_value; return ret; } double raw_ssim_to_db(const double raw_ssim) { return -10.0 * log10( 1 - raw_ssim ); } struct SchemeStats { // Stall ratio data from *real* distribution array<vector<double>, MAX_N_BINS> binned_stall_ratios{}; unsigned int samples = 0; double total_watch_time = 0; double total_stall_time = 0; // SSIM data from *real* distribution vector<pair<double,double>> ssim_samples{}; vector<double> ssim_variation_samples{}; double total_ssim_watch_time = 0; /* Given watch time in seconds, return bin index as * log(watch time), if watch time : [2^MIN_BIN, 2^MAX_BIN] (else, throw) */ static unsigned int watch_time_bin(const double raw_watch_time) { const unsigned int watch_time_bin = lrintf(floorf(log2(raw_watch_time))); if (watch_time_bin < MIN_BIN or watch_time_bin > MAX_BIN) { throw std::runtime_error("watch time bin out of range"); } return watch_time_bin; } // add stall ratio to appropriate bin void add_sample(const double watch_time, const double stall_time) { binned_stall_ratios.at(watch_time_bin(watch_time)).push_back(stall_time / watch_time); samples++; total_watch_time += watch_time; total_stall_time += stall_time; } void add_ssim_sample(const double watch_time, const double mean_ssim) { if (mean_ssim <= 0 or mean_ssim > 1) { throw runtime_error("invalid ssim: " + to_string(mean_ssim)); } total_ssim_watch_time += watch_time; ssim_samples.emplace_back(watch_time, mean_ssim); } void add_ssim_variation_sample(const double ssim_variation) { if (ssim_variation <= 0 or ssim_variation >= 1000) { throw runtime_error("invalid ssim variation: " + to_string(ssim_variation)); } ssim_variation_samples.push_back(ssim_variation); } double observed_stall_ratio() const { return total_stall_time / total_watch_time; } double mean_ssim() const { double sum = 0; for ( const auto [watch_time, ssim] : ssim_samples ) { sum += watch_time * ssim; } return sum / total_ssim_watch_time; } double stddev_ssim() const { const double mean = mean_ssim(); double ssr = 0; for ( const auto [watch_time, ssim] : ssim_samples ) { ssr += watch_time * (ssim - mean) * (ssim - mean); } const double variance = ssr / total_ssim_watch_time; return sqrt(variance); } tuple<double, double, double> sem_ssim() const { double sum_squared_weights = 0; for ( const auto [watch_time, ssim] : ssim_samples ) { sum_squared_weights += (watch_time * watch_time) / (total_ssim_watch_time * total_ssim_watch_time); } const double mean = mean_ssim(); const double stddev = stddev_ssim(); const double sem = stddev * sqrt(sum_squared_weights); return { raw_ssim_to_db( mean - 2 * sem ), raw_ssim_to_db( mean ), raw_ssim_to_db( mean + 2 * sem ) }; } double mean_ssim_variation() const { return accumulate(ssim_variation_samples.begin(), ssim_variation_samples.end(), 0.0) / ssim_variation_samples.size(); } double stddev_ssim_variation() const { const double mean = mean_ssim_variation(); double ssr = 0; cerr << "count: " << ssim_variation_samples.size() << ", mean=" << mean << "\n"; for ( const auto x : ssim_variation_samples ) { ssr += (x - mean) * (x - mean); } const double variance = (1.0 / (ssim_variation_samples.size() - 1)) * ssr; return sqrt(variance); } tuple<double, double, double> sem_ssim_variation() const { const double mean = mean_ssim_variation(); const double sem = stddev_ssim_variation() / sqrt(ssim_variation_samples.size()); return { mean - 2 * sem, mean, mean + 2 * sem }; } }; class Statistics { // list of watch times from which to sample vector<double> watch_times{}; /* Whenever a timestamp is used to represent a day, round down to Influx backup hour, * in seconds (analyze records ts as seconds) */ using Day_sec = uint64_t; /* Days listed in the intersection file */ set<Day_sec> days_from_intx{}; /* Days specified in argument to program (empty if --days not supplied) */ optional<pair<Day_sec, Day_sec>> days_from_arg{}; // real (non-simulated) stats map<string, SchemeStats> scheme_stats{}; public: Statistics (const string & intersection_filename, const string & watch_times_filename, const string & stream_speed) { vector<string> desired_schemes; /* Read file containing desired schemes, and list of days they intersect. */ read_intersection_file(intersection_filename, desired_schemes); /* Initialize scheme_stats, so parse() knows the desired schemes */ for (const string & scheme : desired_schemes) { scheme_stats[scheme] = SchemeStats{}; } /* Read file containing watch times */ read_watch_times_file(watch_times_filename, stream_speed); /* Log schemes and days for convenience */ cerr << "Schemes:\n"; for (const auto & desired_scheme : desired_schemes) { cerr << desired_scheme << " "; } cerr << "\n\nDays from scheme intersection:\n"; print_intervals(days_from_intx); } void read_intersection_file(const string & intersection_filename, vector<string> & desired_schemes) { ifstream intersection_file{intersection_filename}; if (not intersection_file.is_open()) { throw runtime_error( "can't open " + intersection_filename); } string line_storage, scheme; // read all schemes if (!getline(intersection_file, line_storage)) { throw runtime_error( "error reading schemes from " + intersection_filename); } istringstream schemes_line(line_storage); while (schemes_line >> scheme) { desired_schemes.emplace_back(scheme); } // read all days if (!getline(intersection_file, line_storage)) { throw runtime_error( "error reading dates from " + intersection_filename); } Day_sec day; istringstream days_line(line_storage); while (days_line >> day) { days_from_intx.emplace(day); } intersection_file.close(); if (intersection_file.bad()) { throw runtime_error("error reading " + intersection_filename); } } void read_watch_times_file(const string & watch_times_filename, const string & stream_speed) { string full_watch_times_filename; /* watch_times_filename may be a path, e.g ../watch_times_out.txt */ size_t slash_pos = watch_times_filename.rfind('/'); if (slash_pos != string::npos) { full_watch_times_filename = watch_times_filename.substr(0, slash_pos + 1) + stream_speed + "_" + watch_times_filename.substr(slash_pos + 1); } else { full_watch_times_filename = stream_speed + "_" + watch_times_filename; } ifstream watch_times_file{full_watch_times_filename}; if (not watch_times_file.is_open()) { throw runtime_error( "can't open " + full_watch_times_filename); } string line_storage; double watch_time; if (!getline(watch_times_file, line_storage)) { throw runtime_error("error reading " + full_watch_times_filename); } istringstream line(line_storage); while (line >> watch_time) { watch_times.emplace_back(watch_time); } watch_times_file.close(); if (watch_times_file.bad()) { throw runtime_error("error reading " + full_watch_times_filename); } // shuffle watch times before sampling random_shuffle(watch_times.begin(), watch_times.end()); } /* Indicates whether ts belongs to an "acceptable" day, * i.e. a day listed in the intersection file * and in INCLUSIVE range specified by the --days argument (if supplied) */ bool ts_is_acceptable(uint64_t ts) { Day_sec day = ts2Day_sec(ts); bool in_arg_range = true; if (days_from_arg) { // --days argument was supplied in_arg_range = day >= days_from_arg.value().first and day <= days_from_arg.value().second; } return days_from_intx.count(day) and in_arg_range; } /* Populate SchemeStats with per-scheme watch/stall/ssim, * ignoring stream if stream is bad/outside study period/short watch time. * Record all watch times independent of scheme. * Record days each scheme was run, if desired. */ void parse_stdin(const string & stream_speed) { ios::sync_with_stdio(false); string line_storage; unsigned int line_no = 0; vector<string_view> fields; vector<string_view> scratch; while (cin.good()) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } getline(cin, line_storage); line_no++; const string_view line{line_storage}; // ignore lines marked with # (by analyze) if (line.empty() or line.front() == '#') { continue; } if (line.size() > MAX_LINE_LEN) { throw runtime_error("Line " + to_string(line_no) + " too long"); } split_on_char(line, ' ', fields); if (fields.size() != N_STREAM_STATS) { throw runtime_error("Line has " + to_string(fields.size()) + " fields, expected " + to_string(N_STREAM_STATS) + ": " + line_storage); } const auto & [timestamp, goodbad, fulltrunc, badreason, scheme, extent, usedpct, mean_ssim, mean_delivery_rate, average_bitrate, ssim_variation_db, startup_delay, time_after_startup, time_stalled] = tie(fields[0], fields[1], fields[2], fields[3], fields[4], fields[5], fields[6], fields[7], fields[8], fields[9], fields[10], fields[11], fields[12], fields[13]); split_on_char(timestamp, '=', scratch); if (scratch[0] != "ts"sv) { throw runtime_error("timestamp field mismatch"); } const uint64_t ts = to_uint64(scratch[1]); if (not ts_is_acceptable(ts)) { continue; } if (stream_speed == "slow") { split_on_char(mean_delivery_rate, '=', scratch); if (scratch[0] != "mean_delivery_rate"sv) { throw runtime_error("delivery rate field mismatch"); } const double delivery_rate = to_double(scratch[1]); if (not stream_is_slow(delivery_rate)) { continue; } } split_on_char(time_after_startup, '=', scratch); if (scratch[0] != "total_after_startup"sv) { throw runtime_error("watch time field mismatch"); } const double watch_time = to_double(scratch[1]); if (watch_time < (1 << MIN_BIN)) { continue; } split_on_char(time_stalled, '=', scratch); if (scratch[0] != "stall_after_startup"sv) { throw runtime_error("stall time field mismatch"); } const double stall_time = to_double(scratch[1]); // record ssim if available split_on_char(mean_ssim, '=', scratch); if (scratch[0] != "mean_ssim"sv) { throw runtime_error("ssim field mismatch"); } const double mean_ssim_val = to_double(scratch[1]); // record ssim variation if available split_on_char(ssim_variation_db, '=', scratch); if (scratch[0] != "ssim_variation_db"sv) { throw runtime_error("ssimvar field mismatch"); } const double ssim_variation_db_val = to_double(scratch[1]); split_on_char(goodbad, '=', scratch); if (scratch[0] != "valid"sv) { throw runtime_error("validity field mismatch"); } string_view validity = scratch[1]; // EXCLUDE BAD (but not trunc) if (validity == "bad"sv) { continue; } split_on_char(scheme, '=', scratch); if (scratch[0] != "scheme"sv) { throw runtime_error("scheme field mismatch"); } string_view schemesv = scratch[1]; // Record stall ratio, ssim, ssim variation // Ignore if not one of the requested schemes SchemeStats *the_scheme = nullptr; auto found_scheme = scheme_stats.find(string(schemesv)); if (found_scheme != scheme_stats.end()) { the_scheme = &found_scheme->second; } if (the_scheme) { the_scheme->add_sample(watch_time, stall_time); if ( mean_ssim_val >= 0 ) { the_scheme->add_ssim_sample(watch_time, mean_ssim_val); } // SSIM variation = 0 over a whole stream is questionable if ( ssim_variation_db_val > 0 and ssim_variation_db_val <= 10000 ) { the_scheme->add_ssim_variation_sample(ssim_variation_db_val); } } } // end while } /* Draw from aggregate over the pair of neighbor bins nhops away from the simulated watch time on each side * (e.g. the direct left and right bins, if nhops == 1). */ static optional<double> draw_from_neighbor_bins(double simulated_watch_time, unsigned nhops, default_random_engine & prng, const SchemeStats & /* real */ scheme ) { unsigned int simulated_watch_time_binned = SchemeStats::watch_time_bin(simulated_watch_time); if (nhops > MAX_BIN - MIN_BIN) { throw logic_error("Attempted to draw from pair of bins " + to_string(nhops) + " away from bin " + to_string(simulated_watch_time_binned) + ". Valid bins (inclusive): " + to_string(MIN_BIN) + ":" + to_string(MAX_BIN)); } // unused if neighbor is out of range, since num_samples will be 0 unsigned int left_neighbor = simulated_watch_time_binned - nhops; unsigned int right_neighbor = simulated_watch_time_binned + nhops; const size_t left_num_stall_ratio_samples = simulated_watch_time_binned < MIN_BIN + nhops ? 0 : scheme.binned_stall_ratios.at(left_neighbor).size(); const size_t right_num_stall_ratio_samples = simulated_watch_time_binned > MAX_BIN - nhops ? 0 : scheme.binned_stall_ratios.at(right_neighbor).size(); if (left_num_stall_ratio_samples == 0 && right_num_stall_ratio_samples == 0) { /* Both neighbors empty. Do not throw -- caller may repeat with a larger nhops. */ return {}; } uniform_int_distribution<> agg_possible_stall_ratio_index(0, left_num_stall_ratio_samples + right_num_stall_ratio_samples - 1); const unsigned agg_stall_ratio_index = agg_possible_stall_ratio_index(prng); unsigned stall_ratio_index, selected_neighbor; // stall_ratio_index: relative to nsamples in chosen bin if (agg_stall_ratio_index >= left_num_stall_ratio_samples) { // right bin selected_neighbor = right_neighbor; stall_ratio_index = agg_stall_ratio_index - left_num_stall_ratio_samples; } else { // left bin selected_neighbor = left_neighbor; stall_ratio_index = agg_stall_ratio_index; } const double simulated_stall_time = simulated_watch_time * scheme.binned_stall_ratios.at(selected_neighbor).at(stall_ratio_index); return simulated_stall_time; } /* Simulate watch and stall time: * Draw a random watch time from all watch times; * draw a stall ratio from the bin corresponding to the simulated watch time, * in the per-scheme stall ratio distribution * representing the input to analyze. */ static pair<double, double> simulate(const vector<double> & watch_times, default_random_engine & prng, const SchemeStats & /* real */ scheme ) { /* step 1: draw a random watch time from static watch times samples */ uniform_int_distribution<> possible_watch_time_index(0, watch_times.size() - 1); const double simulated_watch_time = watch_times.at(possible_watch_time_index(prng)); /* step 2: draw a stall ratio for the scheme from a similar observed watch time */ unsigned int simulated_watch_time_binned = SchemeStats::watch_time_bin(simulated_watch_time); size_t num_stall_ratio_samples = scheme.binned_stall_ratios.at(simulated_watch_time_binned).size(); if (num_stall_ratio_samples > 0) { // scheme has nonempty bin corresponding to the simulated watch time => // draw stall ratio from that bin uniform_int_distribution<> possible_stall_ratio_index(0, num_stall_ratio_samples - 1); // multiply stall ratio by un-binned simulated watch time, since stall ratio uses un-binned real watch time const double simulated_stall_time = simulated_watch_time * scheme.binned_stall_ratios.at(simulated_watch_time_binned).at(possible_stall_ratio_index(prng)); return {simulated_watch_time, simulated_stall_time}; } else { unsigned nhops = 1; optional<double> simulated_stall_time; while (not (simulated_stall_time = draw_from_neighbor_bins(simulated_watch_time, nhops++, prng, scheme))) { /* Draw from aggregate over the pair of bins one hop away, two hops, etc until finding a non-empty bin. * Should always terminate, since at least one bin in the distribution should be non-empty * (but draw_from_neighbor_bins checks just in case) */ } return {simulated_watch_time, simulated_stall_time.value()}; } } /* For each sample in (real) scheme, take a simulated sample * Return resulting simulated total stall ratio */ static double simulate_realization( const vector<double> & watch_times, default_random_engine & prng, const SchemeStats & /* real */scheme ) { SchemeStats scheme_simulated; for ( unsigned int i = 0; i < scheme.samples; i++ ) { const auto [watch_time, stall_time] = simulate(watch_times, prng, scheme); scheme_simulated.add_sample(watch_time, stall_time); } return scheme_simulated.observed_stall_ratio(); } class Realizations { string _name; // simulated stall ratios vector<double> _stall_ratios{}; // real (non-simulated) stats SchemeStats _scheme_sample; public: Realizations( const string & name, const SchemeStats & scheme_sample ) : _name(name), _scheme_sample(scheme_sample) {} void add_realization( const vector<double> & watch_times, default_random_engine & prng ) { _stall_ratios.push_back(simulate_realization(watch_times, prng, _scheme_sample)); // pass in real stats } // mean and 95% confidence interval of *simulated* stall ratios tuple<double, double, double> stats() { sort(_stall_ratios.begin(), _stall_ratios.end()); const double lower_limit = _stall_ratios[.025 * _stall_ratios.size()]; const double upper_limit = _stall_ratios[.975 * _stall_ratios.size()]; const double total = accumulate(_stall_ratios.begin(), _stall_ratios.end(), 0.0); const double mean = total / _stall_ratios.size(); return { lower_limit, mean, upper_limit }; } void print_samplesize() const { cout << fixed << setprecision(3); cout << "#" << _name << " considered " << _scheme_sample.samples << " streams, stall/watch hours: " << _scheme_sample.total_stall_time / 3600.0 << "/" << _scheme_sample.total_watch_time / 3600.0 << "\n"; } void print_summary() { const auto [ lower_limit, mean, upper_limit ] = stats(); const auto [ lower_ssim_limit, mean_ssim, upper_ssim_limit ] = _scheme_sample.sem_ssim(); const auto [ lower_ssim_variation, mean_ssim_variation, upper_ssim_variation ] = _scheme_sample.sem_ssim_variation(); cout << fixed << setprecision(8); cout << _name << " stall ratio (95% CI): " << 100 * lower_limit << "% .. " << 100 * upper_limit << "%, mean= " << 100 * mean; cout << "; SSIM (95% CI): " << lower_ssim_limit << " .. " << upper_ssim_limit << ", mean= " << mean_ssim; cout << "; SSIMvar (95% CI): " << lower_ssim_variation << " .. " << upper_ssim_variation << ", mean= " << mean_ssim_variation; cout << "\n"; } }; /* For each scheme: simulate stall ratios, and calculate stall ratio mean/CI over simulated samples. * Calculate SSIM and SSIMvar mean/CI over real samples. */ void do_point_estimate() { random_device rd; default_random_engine prng(rd()); // initialize with real stats, from which to sample constexpr unsigned int iteration_count = 10000; vector<Realizations> realizations; for (const auto & [desired_scheme, desired_scheme_stats] : scheme_stats) { realizations.emplace_back(Realizations{desired_scheme, desired_scheme_stats}); } /* For each scheme, take 10000 simulated stall ratios */ for (unsigned int i = 0; i < iteration_count; i++) { if (i % 10 == 0) { cerr << "\rsample " << i << "/" << iteration_count << " "; } for (auto & realization : realizations) { realization.add_realization(watch_times, prng); } } cerr << "\n"; /* report statistics */ for (const auto & realization : realizations) { realization.print_samplesize(); } for (auto & realization : realizations) { realization.print_summary(); } } }; void stream_to_scheme_stats_main(const string & intersection_filename, const string & watch_times_filename, const string & stream_speed) { Statistics stats {intersection_filename, watch_times_filename, stream_speed}; stats.parse_stdin(stream_speed); stats.do_point_estimate(); } void print_usage(const string & program) { cerr << "Usage: " << program << " --scheme-intersection <intersection_filename>" " --stream-speed <stream_speed>" " --watch-times <watch_times_filename_postfix>\n" "intersection_filename: Output of stream_stats_to_metadata --intersect-schemes --intersect-outfile, " "containing desired schemes and the days they intersect.\n" "stream-speed: slow or all\n" "watch_times_filename_postfix: Output of stream_stats_to_metadata --build-watch_times-list, " "containing watch times (specified stream_speed will be prepended).\n"; } int main(int argc, char *argv[]) { try { if (argc < 1) { abort(); } const option opts[] = { {"scheme-intersection", required_argument, nullptr, 'i'}, {"stream-speed", required_argument, nullptr, 's'}, {"watch-times", required_argument, nullptr, 'w'}, {nullptr, 0, nullptr, 0} }; string intersection_filename, watch_times_filename, stream_speed; while (true) { const int opt = getopt_long(argc, argv, "i:s:w:", opts, nullptr); if (opt == -1) break; switch (opt) { case 'i': intersection_filename = optarg; break; case 's': stream_speed = optarg; if (stream_speed != "slow" and stream_speed != "all") { cerr << "Error: Stream speed must be \"slow\" or \"all\"\n\n"; print_usage(argv[0]); return EXIT_FAILURE; } break; case 'w': watch_times_filename = optarg; break; default: print_usage(argv[0]); return EXIT_FAILURE; } } if (optind != argc) { print_usage(argv[0]); return EXIT_FAILURE; } if (intersection_filename.empty() or watch_times_filename.empty() or stream_speed.empty()) { cerr << "Error: Scheme days file, watch time file, and stream speed are required\n\n"; print_usage(argv[0]); return EXIT_FAILURE; } stream_to_scheme_stats_main(intersection_filename, watch_times_filename, stream_speed); } catch (const exception & e) { cerr << e.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } <file_sep>/scripts/private_entrance.sh #!/bin/bash -ue # Generate and upload desired day's experiment settings and csvs. clean_up_err() { # Clean up any partial CSVs rm -f *.csv # Clean up Influx data rm -rf "$END_DATE" rm -f "$END_DATE".tar.gz exit 1 } # Avoid hang if logs directory not created yet mkdir -p "$LOCAL_DATA_PATH"/"$END_DATE"/"$LOGS" cd "$LOCAL_DATA_PATH"/"$END_DATE" # 1. Dump and upload expt settings (requires db key to be set) if ! "$STATS_REPO_PATH"/experiments/dump-puffer-experiment > "$EXPT"; then rm -f "$EXPT" >&2 echo "Error dumping experiment settings ($END_DATE)" exit 1 fi if ! gsutil -q cp "$EXPT" "$DATA_BUCKET"/"$END_DATE"/"$EXPT"; then # Clean up any partially uploaded file (ignore exit status) gsutil -q rm "$DATA_BUCKET"/"$END_DATE"/"$EXPT" 2> /dev/null || true >&2 echo "Error uploading experiment settings ($END_DATE)" exit 1 fi # 2. Generate and upload CSVs for desired day # Download Influx export from gs gsutil -q cp gs://puffer-influxdb-analytics/"$END_DATE".tar.gz . # no cleanup needed tar xf "$END_DATE".tar.gz # Enter (temporary) data directory # (pwd now: "$LOCAL_DATA_PATH"/"$END_DATE"/"$END_DATE") pushd "$END_DATE" > /dev/null for f in *.tar.gz; do tar xf "$f"; done popd > /dev/null # Influx export => anonymized csv # Subshell running influx_to_csv creates this file to signal failure rm -f influx_to_csv_failed readonly influx_to_csv_err="$LOGS"/influx_to_csv_err_"$END_DATE".txt # If influx_to_csv never starts, tail in subshell consumes export. # Otherwise, pipeline hangs - note both tail and parens are necessary to avoid hang influx_inspect export -datadir "$END_DATE" -waldir /dev/null -out /dev/fd/3 3>&1 1>/dev/null | \ ("$STATS_REPO_PATH"/influx_to_csv "$END_DATE" 2> "$influx_to_csv_err" || \ { tail > /dev/null; touch influx_to_csv_failed; }) if [ "${PIPESTATUS[0]}" -ne 0 ]; then >&2 echo "Error: Influx export failed ($END_DATE)" clean_up_err # exits, in case more functionality is added below fi if [ -f influx_to_csv_failed ]; then >&2 echo "Error: Private analyze exited unsuccessfully or never started ($END_DATE)" clean_up_err fi # Clean up Influx data rm -r "$END_DATE" rm "$END_DATE".tar.gz # Upload CSVs, zipped (will automatically unzip after download) if ! gsutil -q -m cp -Z *.csv "$DATA_BUCKET"/"$END_DATE"; then # Clean up any partially uploaded file (ignore exit status) gsutil -q rm "$DATA_BUCKET"/"$END_DATE"/*.csv 2> /dev/null || true >&2 echo "Error uploading CSVs ($END_DATE)" exit 1 fi <file_sep>/csv_to_stream_stats.cc #include <cstdlib> #include <stdexcept> #include <iostream> #include <vector> #include <string> #include <array> #include <tuple> #include <charconv> #include <map> #include <cstring> #include <fstream> #include <google/sparse_hash_map> #include <google/dense_hash_map> #include <boost/functional/hash.hpp> #include <cmath> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <jsoncpp/json/json.h> #include <sys/time.h> #include <sys/resource.h> #include "dateutil.hh" #include "analyzeutil.hh" using namespace std; using namespace std::literals; using google::sparse_hash_map; using google::dense_hash_map; /* * Read in anonymized data (grouped by timestamp/server/channel), into data structures * grouped by stream. * To stdout, outputs summary of each stream (one stream per line). * Takes experimental settings and date as arguments. */ using event_table = map<uint64_t, Event>; using sysinfo_table = map<uint64_t, Sysinfo>; using video_sent_table = map<uint64_t, VideoSent>; #define MAX_SSIM 0.99999 // max acceptable raw SSIM (exclusive) // ignore SSIM ~ 1 optional<double> raw_ssim_to_db(const double raw_ssim) { if (raw_ssim > MAX_SSIM) return nullopt; return -10.0 * log10( 1 - raw_ssim ); } class Parser { private: // Convert format string to uint8_t for storage string_table formats{}; // streams[public_stream_id] = vec<[ts, Event]> using stream_key = tuple<string, unsigned>; // unpack struct for hash /* session_id, index */ dense_hash_map<stream_key, vector<pair<uint64_t, Event>>, boost::hash<stream_key>> streams; // sysinfos[sysinfo_key] = SysInfo using sysinfo_key = tuple<uint32_t, uint32_t, uint32_t>; /* init_id, uid, expt_id */ dense_hash_map<sysinfo_key, Sysinfo, boost::hash<sysinfo_key>> sysinfos; // chunks[public_stream_id] = vec<[ts, VideoSent]> dense_hash_map<stream_key, vector<pair<uint64_t, const VideoSent>>, boost::hash<stream_key>> chunks; unsigned int bad_count = 0; // Used in summarizing stream, to convert numeric experiment ID to scheme string vector<string> experiments{}; void read_experimental_settings_dump(const string & filename) { ifstream experiment_dump{ filename }; if (not experiment_dump.is_open()) { throw runtime_error( "can't open " + filename ); } string line_storage; while (true) { getline(experiment_dump, line_storage); if (not experiment_dump.good()) { break; } const string_view line{line_storage}; const size_t separator = line.find_first_of(' '); if (separator == line.npos) { throw runtime_error("can't find separator: " + line_storage); } const uint64_t experiment_id = to_uint64(line.substr(0, separator)); if (experiment_id > numeric_limits<uint16_t>::max()) { throw runtime_error("invalid expt_id: " + line_storage); } const string_view rest_of_string = line.substr(separator+1); Json::Reader reader; Json::Value doc; reader.parse(string(rest_of_string), doc); experiments.resize(experiment_id + 1); string name = doc["abr_name"].asString(); if (name.empty()) { name = doc["abr"].asString(); } // populate experiments with expt_id => abr_name/cc or abr/cc experiments.at(experiment_id) = name + "/" + doc["cc"].asString(); } } public: Parser(const string & experiment_dump_filename) : streams(), sysinfos(), chunks() { // TODO: check sysinfo empty key streams.set_empty_key( {"", -1U} ); // we never insert a stream with index -1 sysinfos.set_empty_key({0,0,0}); chunks.set_empty_key( {"", -1U} ); formats.forward_map_vivify("unknown"); read_experimental_settings_dump(experiment_dump_filename); } /* Read anonymized client_buffer input file into streams map. * Each line of input is one event datapoint, recorded with its public stream ID. */ void parse_client_buffer_input(const string & date_str) { const string & client_buffer_filename = "client_buffer_" + date_str + ".csv"; ifstream client_buffer_file{client_buffer_filename}; if (not client_buffer_file.is_open()) { throw runtime_error( "can't open " + client_buffer_filename); } string line_storage; char comma; uint64_t ts; public_stream_id stream_id; // can't read directly into optional uint32_t expt_id; string channel, event_type_str; float buffer, cum_rebuf; // ignore column labels getline(client_buffer_file, line_storage); unsigned line_no = 0; while (getline(client_buffer_file, line_storage)) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } line_no++; istringstream line(line_storage); if (not (line >> ts >> comma and comma == ',' and getline(line, stream_id.session_id, ',') and line >> stream_id.index >> comma and comma == ',' and line >> expt_id >> comma and comma == ',' and getline(line, channel, ',') and getline(line, event_type_str, ',') and line >> buffer >> comma and comma == ',' and line >> cum_rebuf) ) { throw runtime_error("error reading from " + client_buffer_filename); } // no need to fill in private fields Event event{nullopt, nullopt, expt_id, nullopt, string_view(event_type_str), buffer, cum_rebuf}; // Add event to list of events corresponding to its stream streams[{stream_id.session_id, stream_id.index}].emplace_back(make_pair(ts, event)); // allocates event } client_buffer_file.close(); if (client_buffer_file.bad()) { throw runtime_error("error writing " + client_buffer_filename); } } /* Read anonymized video_sent input file into chunks map. * Each line of input is one chunk, recorded with its public stream ID. */ void parse_video_sent_input(const string & date_str) { const string & video_sent_filename = "video_sent_" + date_str + ".csv"; ifstream video_sent_file{video_sent_filename}; if (not video_sent_file.is_open()) { throw runtime_error( "can't open " + video_sent_filename); } string line_storage; char comma; uint64_t ts, video_ts; public_stream_id stream_id; // can't read directly into optional string channel, format; float ssim_index; uint32_t delivery_rate, expt_id, size, cwnd, in_flight, min_rtt, rtt; // ignore column labels getline(video_sent_file, line_storage); unsigned line_no = 0; while (getline(video_sent_file, line_storage)) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } line_no++; istringstream line(line_storage); if (not (line >> ts >> comma and comma == ',' and getline(line, stream_id.session_id, ',') and line >> stream_id.index >> comma and comma == ',' and line >> expt_id >> comma and comma == ',' and getline(line, channel, ',') and line >> video_ts >> comma and comma == ',' and getline(line, format, ',') and line >> size >> comma and comma == ',' and line >> ssim_index >> comma and comma == ',' and line >> cwnd >> comma and comma == ',' and line >> in_flight >> comma and comma == ',' and line >> min_rtt >> comma and comma == ',' and line >> rtt >> comma and comma == ',' and line >> delivery_rate) ) { throw runtime_error("error reading from " + video_sent_filename); } // leave private fields and buf/cum_rebuf blank VideoSent video_sent{ssim_index, delivery_rate, expt_id, nullopt, nullopt, nullopt, size, formats.forward_map_vivify(format), cwnd, in_flight, min_rtt, rtt, video_ts}; // Add chunk to list of chunks corresponding to its stream chunks[{stream_id.session_id, stream_id.index}].emplace_back(make_pair(ts, video_sent)); } video_sent_file.close(); if (video_sent_file.bad()) { throw runtime_error("error writing " + video_sent_filename); } } void print_grouped_data() { cerr << "streams:" << endl; for ( const auto & [stream_id, events] : streams ) { const auto & [session_id, index] = stream_id; cerr << session_id << ", " << index << endl; for ( const auto & [ts, event] : events ) { cerr << ts << ", " << event; } } // Count total events, streams size_t n_total_events = 0; for ( auto & [unpacked_stream_id, events] : streams ) { n_total_events += events.size(); } cerr << "n_total_events " << n_total_events << endl; cerr << "n_total_streams " << streams.size() << endl; cerr << "chunks:" << endl; for ( const auto & [stream_id, stream_chunks] : chunks ) { const auto & [session_id, index] = stream_id; cerr << session_id << ", " << index << endl; for ( const auto & [ts, video_sent] : stream_chunks ) { cerr << ts << ", " << video_sent; } } } /* Corresponds to a line of analyze output; summarizes a stream */ struct EventSummary { uint64_t base_time{0}; // lowest ts in stream, in NANOseconds bool valid{false}; // good or bad bool full_extent{true}; // full or trunc float time_extent{0}; float cum_rebuf_at_startup{0}; float cum_rebuf_at_last_play{0}; float time_at_startup{0}; float time_at_last_play{0}; string scheme{}; // XXX: not outputting session ID (confinterval doesn't use it) /* reason for bad OR trunc (bad_reason != "good" does not necessarily imply the stream is bad -- * it may just be trunc) */ string bad_reason{}; }; /* Output a summary of each stream */ void analyze_streams() const { float total_time_after_startup=0; float total_stall_time=0; float total_extent=0; unsigned int had_stall=0; unsigned int good_streams=0; unsigned int good_and_full=0; unsigned int missing_sysinfo = 0; unsigned int missing_video_stats = 0; size_t overall_chunks = 0, overall_high_ssim_chunks = 0, overall_ssim_1_chunks = 0; for ( auto & [unpacked_stream_id, events] : streams ) { const EventSummary summary = summarize(events); /* find matching videosent stream */ const auto [normal_ssim_chunks, ssim_1_chunks, total_chunks, ssim_sum, mean_delivery_rate, average_bitrate, ssim_variation] = video_summarize(unpacked_stream_id); const double mean_ssim = ssim_sum == -1 ? -1 : ssim_sum / normal_ssim_chunks; const size_t high_ssim_chunks = total_chunks - normal_ssim_chunks; if (mean_delivery_rate < 0 ) { missing_video_stats++; } else { overall_chunks += total_chunks; overall_high_ssim_chunks += high_ssim_chunks; overall_ssim_1_chunks += ssim_1_chunks; } cout << fixed; // ts in anonymized data include nanoseconds -- truncate to seconds cout << "ts=" << (summary.base_time / 1000000000) << " valid=" << (summary.valid ? "good" : "bad") << " full_extent=" << (summary.full_extent ? "full" : "trunc" ) << " bad_reason=" << summary.bad_reason << " scheme=" << summary.scheme << " extent=" << summary.time_extent << " used=" << 100 * summary.time_at_last_play / summary.time_extent << "%" << " mean_ssim=" << mean_ssim << " mean_delivery_rate=" << mean_delivery_rate << " average_bitrate=" << average_bitrate << " ssim_variation_db=" << ssim_variation << " startup_delay=" << summary.cum_rebuf_at_startup << " total_after_startup=" << (summary.time_at_last_play - summary.time_at_startup) << " stall_after_startup=" << (summary.cum_rebuf_at_last_play - summary.cum_rebuf_at_startup) << "\n"; total_extent += summary.time_extent; if (summary.valid) { // valid = "good" good_streams++; total_time_after_startup += (summary.time_at_last_play - summary.time_at_startup); if (summary.cum_rebuf_at_last_play > summary.cum_rebuf_at_startup) { had_stall++; total_stall_time += (summary.cum_rebuf_at_last_play - summary.cum_rebuf_at_startup); } if (summary.full_extent) { good_and_full++; } } } // end for // mark summary lines with # so confinterval will ignore them cout << "#num_streams=" << streams.size() << " good=" << good_streams << " good_and_full=" << good_and_full << " missing_sysinfo=" << missing_sysinfo << " missing_video_stats=" << missing_video_stats << " had_stall=" << had_stall << " overall_chunks=" << overall_chunks << " overall_high_ssim_chunks=" << overall_high_ssim_chunks << " overall_ssim_1_chunks=" << overall_ssim_1_chunks << "\n"; cout << "#total_extent=" << total_extent / 3600.0 << " total_time_after_startup=" << total_time_after_startup / 3600.0 << " total_stall_time=" << total_stall_time / 3600.0 << "\n"; } /* Summarize a list of Videosents, ignoring SSIM ~ 1 */ // normal_ssim_chunks, ssim_1_chunks, total_chunks, ssim_sum, mean_delivery_rate, average_bitrate, ssim_variation] tuple<size_t, size_t, size_t, double, double, double, double> video_summarize(const stream_key & key) const { const auto videosent_it = chunks.find(key); if (videosent_it == chunks.end()) { return { -1, -1, -1, -1, -1, -1, -1 }; } const vector<pair<uint64_t, const VideoSent>> & chunk_stream = videosent_it->second; double ssim_sum = 0; // raw index double delivery_rate_sum = 0; double bytes_sent_sum = 0; optional<double> ssim_cur_db{}; // empty if index == 1 optional<double> ssim_last_db{}; // empty if no previous, or previous had index == 1 double ssim_absolute_variation_sum = 0; size_t num_ssim_samples = chunk_stream.size(); /* variation is calculated between each consecutive pair of chunks */ size_t num_ssim_var_samples = chunk_stream.size() - 1; size_t num_ssim_1_chunks = 0; for ( const auto [ts, videosent] : chunk_stream ) { float raw_ssim = videosent.ssim_index.value(); // would've thrown by this point if not set if (raw_ssim == 1.0) { num_ssim_1_chunks++; } ssim_cur_db = raw_ssim_to_db(raw_ssim); if (ssim_cur_db.has_value()) { ssim_sum += raw_ssim; } else { num_ssim_samples--; // for ssim_mean, ignore chunk with SSIM == 1 } if (ssim_cur_db.has_value() && ssim_last_db.has_value()) { ssim_absolute_variation_sum += abs(ssim_cur_db.value() - ssim_last_db.value()); } else { num_ssim_var_samples--; // for ssim_var, ignore pair containing chunk with SSIM == 1 } ssim_last_db = ssim_cur_db; delivery_rate_sum += videosent.delivery_rate.value(); bytes_sent_sum += videosent.size.value(); } const double average_bitrate = 8 * bytes_sent_sum / (2.002 * chunk_stream.size()); double average_absolute_ssim_variation = -1; if (num_ssim_var_samples > 0) { average_absolute_ssim_variation = ssim_absolute_variation_sum / num_ssim_var_samples; } return { num_ssim_samples, num_ssim_1_chunks, chunk_stream.size(), ssim_sum, delivery_rate_sum / chunk_stream.size(), average_bitrate, average_absolute_ssim_variation }; } /* Summarize a list of events corresponding to a stream. */ EventSummary summarize(const vector<pair<uint64_t, Event>> & events) const { EventSummary ret; ret.scheme = experiments.at(events.front().second.expt_id.value()); // All events in stream have same expt_id ret.bad_reason = "good"; const uint64_t base_time = events.front().first; ret.base_time = base_time; ret.time_extent = (events.back().first - base_time) / double(1000000000); bool started = false; bool playing = false; float last_sample = 0.0; optional<float> time_low_buffer_started; float last_buffer=0, last_cum_rebuf=0; /* Break on the first trunc or slow decoder event in the list (if any) * Return early if slow decoder, else set validity based on whether stream is * zeroplayed/never started/negative rebuffer. * Bad_reason != "good" indicates that summary is "bad" or "trunc" * (here "bad" refers to some characteristic of the stream, rather than to * contradictory data points as in an Event) */ for ( unsigned int i = 0; i < events.size(); i++ ) { if (not ret.full_extent) { break; // trunc, but not necessarily bad } const auto & [ts, event] = events[i]; const float relative_time = (ts - base_time) / 1000000000.0; if (relative_time - last_sample > 8.0) { ret.bad_reason = "event_interval>8s"; ret.full_extent = false; break; // trunc, but not necessarily bad } if (event.buffer.value() > 0.3) { time_low_buffer_started.reset(); } else { if (not time_low_buffer_started.has_value()) { time_low_buffer_started.emplace(relative_time); } } if (time_low_buffer_started.has_value()) { if (relative_time - time_low_buffer_started.value() > 20) { // very long rebuffer ret.bad_reason = "stall>20s"; ret.full_extent = false; break; // trunc, but not necessarily bad } } if (event.buffer.value() > 5 and last_buffer > 5) { if (event.cum_rebuf.value() > last_cum_rebuf + 0.15) { // stall with plenty of buffer --> slow decoder? ret.bad_reason = "stall_while_playing"; return ret; // BAD } } switch (event.type.value().type) { case Event::EventType::Type::init: break; case Event::EventType::Type::play: playing = true; ret.time_at_last_play = relative_time; ret.cum_rebuf_at_last_play = event.cum_rebuf.value(); break; case Event::EventType::Type::startup: if ( not started ) { ret.time_at_startup = relative_time; ret.cum_rebuf_at_startup = event.cum_rebuf.value(); started = true; } playing = true; ret.time_at_last_play = relative_time; ret.cum_rebuf_at_last_play = event.cum_rebuf.value(); break; case Event::EventType::Type::timer: if ( playing ) { ret.time_at_last_play = relative_time; ret.cum_rebuf_at_last_play = event.cum_rebuf.value(); } break; case Event::EventType::Type::rebuffer: playing = false; break; } last_sample = relative_time; last_buffer = event.buffer.value(); last_cum_rebuf = event.cum_rebuf.value(); } // end for // zeroplayed and neverstarted are both counted as "didn't begin playing" in paper if (ret.time_at_last_play <= ret.time_at_startup) { ret.bad_reason = "zeroplayed"; return ret; // BAD } // counted as contradictory data in paper?? if (ret.cum_rebuf_at_last_play < ret.cum_rebuf_at_startup) { ret.bad_reason = "negative_rebuffer"; return ret; // BAD } if (not started) { ret.bad_reason = "neverstarted"; return ret; // BAD } // good is set here, so validity="bad" iff return early ret.valid = true; return ret; } }; void csv_to_stream_stats_main(const string & experiment_dump_filename, const string & date_str) { Parser parser{experiment_dump_filename}; parser.parse_client_buffer_input(date_str); parser.parse_video_sent_input(date_str); parser.analyze_streams(); } /* Date is used to name csvs. */ int main(int argc, char *argv[]) { try { if (argc <= 0) { abort(); } if (argc != 3) { cerr << "Usage: " << argv[0] << " expt_dump [from postgres] date [e.g. 2019-07-01T11_2019-07-02T11]\n"; return EXIT_FAILURE; } csv_to_stream_stats_main(argv[1], argv[2]); } catch (const exception & e) { cerr << e.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } <file_sep>/scripts/get_public_prereq_files.sh #!/bin/bash -ue # Create local directory for day's data if needed mkdir -p "$LOCAL_DATA_PATH"/"$END_DATE" cd "$LOCAL_DATA_PATH"/"$END_DATE" # Download experiment settings and CSVs from gs gsutil -q cp "$DATA_BUCKET"/"$END_DATE"/"$EXPT" "$LOGS" # (Analysis only requires client_buffer and video_sent CSVs, # so public could just download those) gsutil -q cp "$DATA_BUCKET"/"$END_DATE"/*.csv . <file_sep>/stream_stats_to_metadata.cc #include <cstdlib> #include <stdexcept> #include <iostream> #include <vector> #include <string> #include <array> #include <tuple> #include <charconv> #include <map> #include <cstring> #include <fstream> #include <random> #include <algorithm> #include <iomanip> #include <getopt.h> #include <cassert> #include <set> #include "dateutil.hh" #include "confintutil.hh" #include <sys/time.h> #include <sys/resource.h> using namespace std; using namespace std::literals; /** * From stdin, parses output of analyze, which contains one line per stream summary. * Takes *one* of the following actions: * 1. Write a list of days each scheme has run (used to find intersection) * 2. Find the intersection of multiple schemes' days (used to determine the dates to analyze) * 3. Write two lists of watchtimes (used to sample random watch times), * one for slow streams and one for all. */ enum Action {NONE, SCHEMEDAYS_LIST, INTERSECT, WATCHTIMES_LIST}; /* Whenever a timestamp is used to represent a day, round down to Influx backup hour, * in seconds (analyze records ts as seconds) */ using Day_sec = uint64_t; size_t memcheck() { rusage usage{}; if (getrusage(RUSAGE_SELF, &usage) < 0) { perror("getrusage"); throw runtime_error(string("getrusage: ") + strerror(errno)); } if (usage.ru_maxrss > 36 * 1024 * 1024) { throw runtime_error("memory usage is at " + to_string(usage.ru_maxrss) + " KiB"); } return usage.ru_maxrss; } void split_on_char(const string_view str, const char ch_to_find, vector<string_view> & ret) { ret.clear(); bool in_double_quoted_string = false; unsigned int field_start = 0; for (unsigned int i = 0; i < str.size(); i++) { const char ch = str[i]; if (ch == '"') { in_double_quoted_string = !in_double_quoted_string; } else if (in_double_quoted_string) { continue; } else if (ch == ch_to_find) { ret.emplace_back(str.substr(field_start, i - field_start)); field_start = i + 1; } } ret.emplace_back(str.substr(field_start)); } uint64_t to_uint64(string_view str) { uint64_t ret = -1; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { str.remove_prefix(ptr - str.data()); throw runtime_error("could not parse as integer: " + string(str)); } return ret; } double to_double(const string_view str) { /* sadly, g++ 8 doesn't seem to have floating-point C++17 from_chars() yet float ret; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { throw runtime_error("could not parse as float: " + string(str)); } return ret; */ /* apologies for this */ char * const null_byte = const_cast<char *>(str.data() + str.size()); char old_value = *null_byte; *null_byte = 0; const double ret = atof(str.data()); *null_byte = old_value; return ret; } class SchemeDays { /* For each scheme, records all unique days the scheme ran, * according to input data */ map<string, set<Day_sec>> scheme_days{}; /* Records all watch times, in order of input data. */ vector<double> all_watch_times{}; /* Records slow-stream watch times, in order of input data. */ vector<double> slow_watch_times{}; /* File storing scheme_days or watch_times */ string list_filename; public: // Populate scheme_days or watch_times map SchemeDays (const string & list_filename, Action action): list_filename(list_filename) { if (action == SCHEMEDAYS_LIST or action == WATCHTIMES_LIST) { // populate from stdin (i.e. analyze output) parse_stdin(action); } else if (action == INTERSECT) { // populate from input file read_scheme_days(); } } /* Populate scheme_days or watch_times map from stdin */ void parse_stdin(Action action) { ios::sync_with_stdio(false); string line_storage; unsigned int line_no = 0; vector<string_view> fields; while (cin.good()) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } getline(cin, line_storage); line_no++; const string_view line{line_storage}; // ignore lines marked with # (by analyze) if (line.empty() or line.front() == '#') { continue; } if (line.size() > MAX_LINE_LEN) { throw runtime_error("Line " + to_string(line_no) + " too long"); } split_on_char(line, ' ', fields); if (fields.size() != N_STREAM_STATS) { throw runtime_error("Line has " + to_string(fields.size()) + " fields, expected " + to_string(N_STREAM_STATS) + ": " + line_storage); } const auto & [timestamp, goodbad, fulltrunc, badreason, scheme, extent, usedpct, mean_ssim, mean_delivery_rate, average_bitrate, ssim_variation_db, startup_delay, time_after_startup, time_stalled] = tie(fields[0], fields[1], fields[2], fields[3], fields[4], fields[5], fields[6], fields[7], fields[8], fields[9], fields[10], fields[11], fields[12], fields[13]); if (action == SCHEMEDAYS_LIST) { /* Record this stream's day for the corresponding scheme, * regardless of stream characteristics */ record_scheme_day(timestamp, scheme); } else if (action == WATCHTIMES_LIST) { /* Record this stream's watch time, * regardless of stream characteristics except delivery rate */ record_watch_time(mean_delivery_rate, time_after_startup); } } } void record_watch_time(const string_view & mean_delivery_rate, const string_view & time_after_startup) { vector<string_view> scratch; split_on_char(mean_delivery_rate, '=', scratch); if (scratch[0] != "mean_delivery_rate"sv) { throw runtime_error("delivery rate field mismatch"); } const double delivery_rate = to_double(scratch[1]); split_on_char(time_after_startup, '=', scratch); if (scratch[0] != "total_after_startup"sv) { throw runtime_error("watch time field mismatch"); } const double watch_time = to_double(scratch[1]); if (watch_time < (1 << MIN_BIN) or watch_time > (1 << MAX_BIN)) { return; // TODO: check this is what we want. Also, should we ignore wt > max in confint? rn, would throw } all_watch_times.push_back(watch_time); if (stream_is_slow(delivery_rate)) { slow_watch_times.push_back(watch_time); } } /* Given the base timestamp and scheme of a stream, add * corresponding day to the set of days the scheme was run. * Does not assume input data is sorted in any way. */ void record_scheme_day(const string_view & timestamp, const string_view & scheme) { vector<string_view> scratch; split_on_char(timestamp, '=', scratch); if (scratch[0] != "ts"sv) { throw runtime_error("timestamp field mismatch"); } const uint64_t ts = to_uint64(scratch[1]); split_on_char(scheme, '=', scratch); if (scratch[0] != "scheme"sv) { throw runtime_error("scheme field mismatch"); } string_view schemesv = scratch[1]; Day_sec day = ts2Day_sec(ts); scheme_days[string(schemesv)].emplace(day); } /* Read scheme days from filename into scheme_days map */ void read_scheme_days() { ifstream list_file {list_filename}; if (not list_file.is_open()) { throw runtime_error( "can't open " + list_filename ); } string line_storage; string scheme; Day_sec day; while (getline(list_file, line_storage)) { istringstream line(line_storage); if (not (line >> scheme)) { throw runtime_error("error reading scheme from " + list_filename); } while (line >> day) { // read all days scheme_days[scheme].emplace(day); } } list_file.close(); if (list_file.bad()) { throw runtime_error("error reading " + list_filename); } } /* Write map of scheme days to file */ void write_scheme_days() { ofstream list_file {list_filename}; if (not list_file.is_open()) { throw runtime_error( "can't open " + list_filename); } // line format: // mpc/bbr 1565193009 1567206883 1567206884 1567206885 ... for (const auto & [scheme, days] : scheme_days) { list_file << scheme; for (const Day_sec & day : days) { list_file << " " << day; } list_file << "\n"; } list_file.close(); if (list_file.bad()) { throw runtime_error("error writing " + list_filename); } } /* Write map of watch times to slow and all files */ void write_watch_times() { const string & all_full_filename = "all_" + list_filename; const string & slow_full_filename = "slow_" + list_filename; ofstream all_list_file{all_full_filename}; if (not all_list_file.is_open()) { throw runtime_error( "can't open " + all_full_filename); } ofstream slow_list_file{slow_full_filename}; if (not slow_list_file.is_open()) { throw runtime_error( "can't open " + slow_full_filename); } // file is single line of space-separated times for (const double watch_time : all_watch_times) { all_list_file << watch_time << " "; } for (const double slow_watch_time : slow_watch_times) { slow_list_file << slow_watch_time << " "; } all_list_file.close(); if (all_list_file.bad()) { throw runtime_error("error writing " + all_full_filename); } slow_list_file.close(); if (slow_list_file.bad()) { throw runtime_error("error writing " + slow_full_filename); } } /* Human-readable summary of days each scheme ran * (output file is not particularly fun to read). */ void print_schemedays_summary() { cerr << "Scheme schedule:\n"; for (const auto & [scheme, days] : scheme_days) { cerr << "\n" << scheme << "\n"; print_intervals(days); } } /* Intersection of all days the requested * schemes were run, according to scheme_days */ void intersect(const string & desired_schemes_unparsed, const string & intersection_filename) { // parse list of schemes vector<string> desired_schemes{}; if (desired_schemes_unparsed == "primary") { desired_schemes = {"puffer_ttp_cl/bbr", "mpc/bbr", "robust_mpc/bbr", "pensieve/bbr", "linear_bba/bbr"}; } else if (desired_schemes_unparsed == "vintages") { desired_schemes = {"puffer_ttp_cl/bbr", "puffer_ttp_20190202/bbr", "puffer_ttp_20190302/bbr", "puffer_ttp_20190402/bbr", "puffer_ttp_20190502/bbr"}; } else { // comma-sep list vector<string_view> desired_schemes_sv{}; split_on_char(desired_schemes_unparsed, ',', desired_schemes_sv); for (const auto & desired_scheme : desired_schemes_sv) { desired_schemes.emplace_back(desired_scheme); } } // find intersection set<Day_sec> running_intx {scheme_days[desired_schemes.front()]}; set<Day_sec> cur_intx {}; for (auto it = desired_schemes.begin() + 1; it != desired_schemes.end(); it++) { if (scheme_days[*it].empty()) { throw runtime_error("requested scheme " + *it + " was not run on any days"); } set_intersection(running_intx.cbegin(), running_intx.cend(), scheme_days[*it].cbegin(), scheme_days[*it].cend(), inserter(cur_intx, cur_intx.begin())); swap(running_intx, cur_intx); cur_intx.clear(); } if (running_intx.empty()) { throw runtime_error("requested schemes were not run on any intersecting days"); } /* Write intersection to file (along with schemes, so * confinterval doesn't need to take schemes as arg) */ ofstream intersection_file; intersection_file.open(intersection_filename); if (not intersection_file.is_open()) { throw runtime_error( "can't open " + intersection_filename); } for (const auto & scheme : desired_schemes) { intersection_file << scheme << " "; } intersection_file << "\n"; // file format: // robust_mpc/bbr mpc/bbr ... // 1565193009 1567206883 1567206884 1567206885 ... for (const auto & day : running_intx) { intersection_file << day << " "; } intersection_file << "\n"; intersection_file.close(); if (intersection_file.bad()) { throw runtime_error("error writing " + intersection_filename); } } }; void stream_stats_to_metadata_main(const string & list_filename, const string & desired_schemes, const string & intersection_filename, Action action) { // Populates schemedays/watchtimes map from input data or file SchemeDays scheme_days {list_filename, action}; if (action == SCHEMEDAYS_LIST) { /* Scheme days map => scheme days file */ scheme_days.write_scheme_days(); scheme_days.print_schemedays_summary(); } else if (action == INTERSECT) { /* Desired schemes, scheme days file => intersecting days */ scheme_days.intersect(desired_schemes, intersection_filename); } else if (action == WATCHTIMES_LIST) { /* Watch times map => watch times file */ scheme_days.write_watch_times(); } } void print_usage(const string & program) { cerr << "Usage: " << program << " <list_filename> <action>\n" << "Action: One of\n" << "\t --build-schemedays-list: Read analyze output from stdin, and write to list_filename " "the list of days each scheme was run \n" << "\t --intersect-schemes <schemes> --intersect-outfile <intersection_filename>: For the given schemes " "(i.e. primary, vintages, or comma-separated list e.g. mpc/bbr,puffer_ttp_cl/bbr), " "read from list_filename, and write to intersection_filename the schemes and intersecting days\n" << "\t --build-watchtimes-list: Read analyze output from stdin, and write the watch times to " "slow_list_filename and all_list_filename (separate file for slow streams)\n"; } int main(int argc, char *argv[]) { try { if (argc < 1) { abort(); } const option actions[] = { {"build-schemedays-list", no_argument, nullptr, 'd'}, {"intersect-schemes", required_argument, nullptr, 's'}, {"intersect-outfile", required_argument, nullptr, 'o'}, {"build-watchtimes-list", no_argument, nullptr, 'w'}, {nullptr, 0, nullptr, 0} }; Action action = NONE; string desired_schemes; string intersection_filename; while (true) { const int opt = getopt_long(argc, argv, "ds:o:w", actions, nullptr); if (opt == -1) break; switch (opt) { case 'd': if (action != NONE) { cerr << "Error: Only one action can be selected\n"; print_usage(argv[0]); return EXIT_FAILURE; } action = SCHEMEDAYS_LIST; break; case 's': if (action != NONE and action != INTERSECT) { cerr << "Error: Only one action can be selected\n"; print_usage(argv[0]); return EXIT_FAILURE; } action = INTERSECT; desired_schemes = optarg; break; case 'o': if (action != NONE and action != INTERSECT) { cerr << "Error: Only one action can be selected\n"; print_usage(argv[0]); return EXIT_FAILURE; } action = INTERSECT; intersection_filename = optarg; break; case 'w': if (action != NONE) { cerr << "Error: Only one action can be selected\n"; print_usage(argv[0]); return EXIT_FAILURE; } action = WATCHTIMES_LIST; break; default: print_usage(argv[0]); return EXIT_FAILURE; } } if (optind != argc - 1 or action == NONE) { cerr << "Error: List_filename and action are required\n"; print_usage(argv[0]); return EXIT_FAILURE; } if (action == INTERSECT and (desired_schemes.empty() or intersection_filename.empty())) { cerr << "Error: Intersection requires schemes list and outfile\n"; print_usage(argv[0]); return EXIT_FAILURE; } string list_filename = argv[optind]; stream_stats_to_metadata_main(list_filename, desired_schemes, intersection_filename, action); } catch (const exception & e) { cerr << e.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } <file_sep>/scripts/public_entrance.sh #!/bin/bash -ue # For desired day: generate per-STREAM stats. # For desired day/week/two weeks/month (if prereq files and data available locally): # Generate per-SCHEME stats and plots. # (Note this introduces a dependency across days, so be careful parallelizing) main() { # List of contiguous days on which all requested schemes ran, ending in END_DATE. # Note: All time periods can use the same scheme intersection # (time period only needs to be a subset of scheme intersection). # The stream stats input to stream_to_scheme_stats contain exactly the desired time period, # so any days in scheme schedule outside the period are not considered when calculating scheme stats. readonly duration_scheme_intersection="$LOGS"/duration_scheme_intersection_"$END_DATE".txt # Avoid hang if logs directory not created yet/deleted mkdir -p "$LOCAL_DATA_PATH"/"$END_DATE"/"$LOGS" cd "$LOCAL_DATA_PATH"/"$END_DATE" readonly end_date_prefix=${END_DATE:0:10} readonly CHUNK_LEN=30 # 1. Generate STREAM stats for desired day stream_stats # 2. Prerequisites for per-scheme analysis metadata # 3. Generate SCHEME stats/plots for desired day, week, two weeks, month scheme_stats } stream_stats() { readonly csv_to_stream_stats_err="$LOGS"/csv_to_stream_stats_err_"$END_DATE".txt # Anonymized CSVs => stream-by-stream stats # csv_to_stream_stats opens the CSVs itself if ! "$STATS_REPO_PATH"/csv_to_stream_stats \ "$EXPT" "$END_DATE" \ > ${STREAM_STATS_PREFIX}_"$END_DATE".txt \ 2> "$csv_to_stream_stats_err"; then # Clean up any partial stream stats rm -f ${STREAM_STATS_PREFIX}_"$END_DATE".txt >&2 echo "Error generating stream stats from CSVs ($END_DATE)" exit 1 fi } # Return a list of filenames representing the CONTIGUOUS subset of the scheme intersection, # i.e. the subset during which all schemes that ran on the last day, ran every day. # (Period is specified by $ndays and the last day of the scheme intersection i.e. END_DATE) # List is in reverse date order. # Note this starts at the end of the intersection on every call, so will catch holes between # chunks as well as holes within a chunk (a hole results from stopping and then restarting an expt). list_contiguous_filenames() { # 1. Read scheme intersection file into convenient format unset scheme_intx_ts readarray -t -d ' ' scheme_intx_ts < <(tail "$duration_scheme_intersection" -n +2) # intersection ts are in increasing order unset scheme_intx_ts[${#scheme_intx_ts[@]}-1] # strip empty element local old_prefix=${END_DATE:14:10} # 2. Working backward from end of intersection, stop after the first non-contiguous day (if any) # (no need to check if stream stats file is available -- if it's in the intersection, it has to be) for (( i = ${#scheme_intx_ts[@]} - 1; i >= 0; i-- )) ; do local ts=${scheme_intx_ts[$i]} # 11am ts => date string e.g. 2020-02-02T11_2020-02-03T11 local intx_date_prefix=$(date -I --date=@$ts --utc) local intx_date_postfix=$(date -I -d "$intx_date_prefix + 1 day") intx_date=${intx_date_prefix}T11_${intx_date_postfix}T11 # Check contiguous if [ "$intx_date_postfix" != "$old_prefix" ]; then # Contiguous iff new postfix == old prefix (working backward) >&2 echo "$end_date_prefix discovered hole on: $intx_date" return # Not an error -- just found the end of a contiguous period fi # Date is ok -- "return" it local stream_stats_file="$LOCAL_DATA_PATH"/"$intx_date"/${STREAM_STATS_PREFIX}_"$intx_date".txt echo "$stream_stats_file" old_prefix="$intx_date_prefix" done } # Write scheme_intersection over the period of length ndays, ending in and including END_DATE. # This may involve downloading stream stats. get_period_intersection() { local ndays="$1" local schemes="$2" # 1. Download any unavailable stream stats in this chunk # Number of days already intersected before this call (period length - chunk length) let "nknown_days=ndays - CHUNK_LEN" || true local last_chunk_day=$(date -I -d "$end_date_prefix - $nknown_days days") "$STATS_REPO_PATH"/scripts/get_period_stream_stats.sh $last_chunk_day $CHUNK_LEN # 2. Get filenames of stream stats over the period # 2a. Get dates unset period_dates readarray -t period_dates < <("$STATS_REPO_PATH"/scripts/list_period_dates.sh "$END_DATE" "$ndays") if [ "${#period_dates[@]}" -ne "$ndays" ]; then >&2 echo "Error enumerating month dates while getting scheme intersection ($END_DATE, $ndays days)" exit 1 fi # 2b. Map dates to filenames, for convenience declare -a period_stream_stats_files for i in ${!period_dates[@]}; do period_date="${period_dates[$i]}" stream_stats_file="$LOCAL_DATA_PATH"/"$period_date"/${STREAM_STATS_PREFIX}_"$period_date".txt period_stream_stats_files[$i]="$stream_stats_file" done # Scheme schedule over the entire period local duration_scheme_schedule="$LOGS"/duration_scheme_schedule_"$END_DATE".txt # Readable summary of scheme schedule (and corresponding stderr) local pretty_duration_scheme_schedule="$LOGS"/pretty_duration_scheme_schedule_"$END_DATE".txt # 3. Build scheme schedule over the entire period set +o pipefail # ignore errors from missing files if ! cat "${period_stream_stats_files[@]}" 2> /dev/null | "$STATS_REPO_PATH"/stream_stats_to_metadata \ "$duration_scheme_schedule" --build-schemedays-list \ 2> "$pretty_duration_scheme_schedule"; then >&2 echo "Error building scheme schedule ($1); stream_stats_to_metadata exited unsuccessfully or never started (see $pretty_duration_scheme_schedule)" rm -f "$duration_scheme_schedule" exit 1 fi # 4. Get intersection over the entire period, using scheme schedule # Note: stream_to_scheme_stats ignores a day's data if the day is not in this list # (meaning not all schemes ran that day) local intx_err="$LOGS"/intersection_log.txt if ! "$STATS_REPO_PATH"/stream_stats_to_metadata \ "$duration_scheme_schedule" --intersect-schemes "$schemes" \ --intersect-out "$duration_scheme_intersection" \ 2> "$intx_err"; then >&2 echo "Error generating scheme intersection ($1); stream_stats_to_metadata exited unsuccessfully or never started (see $intx_err)" rm -f "$duration_scheme_intersection" exit 1 fi } metadata() { # Desired day's scheme schedule (and corresponding stderr) readonly pretty_day_scheme_schedule="$LOGS"/pretty_day_scheme_schedule_"$END_DATE".txt # Schemes that ran on desired day readonly desired_schemes="$LOGS"/desired_schemes_"$END_DATE".txt # 1. Determine which schemes ran on the desired day # stream_stats_to_metadata outputs each scheme's name as well as the days it ran # (Note this is dependent on the format of the output) if ! "$STATS_REPO_PATH"/stream_stats_to_metadata \ "$desired_schemes" --build-schemedays-list \ < ${STREAM_STATS_PREFIX}_"$END_DATE".txt 2> "$pretty_day_scheme_schedule"; then >&2 echo "Error determining day's schemes ($END_DATE); stream_stats_to_metadata exited unsuccessfully or never started (see $pretty_day_scheme_schedule)" rm -f "$desired_schemes" exit 1 fi # Convert to comma-separated list set -o pipefail local schemes # declare separately for pipefail schemes=$(cat "$desired_schemes" | cut -d ' ' -f1 | tr '\n' ',') schemes=${schemes%?} # remove trailing comma # Only needed to get desired schemes rm "$desired_schemes" # Experiment duration is unknown, so can't anticipate how many stream stats # need to be downloaded (since the stream stats are needed to determine duration). # So, download and compute intersection in 30-day chunks, stopping when a # chunk contains the beginning of the experiment. local duration_len=$CHUNK_LEN # Number of days known to be contiguous and available thus far, including END_DATE # Initialize to 0 -- e.g. if entire first chunk is good, nchunk_good_days = chunk_len - 0 local ncumulative_good_days=0 # Number of contiguous, available days in the *most recent* chunk (not cumulative) local nchunk_good_days=$CHUNK_LEN # Continue as long as entire chunk is available and intersection is contiguous while (( nchunk_good_days == CHUNK_LEN )); do # keep overwriting intersection until we reach the beginning of the experiment get_period_intersection $duration_len "$schemes" unset contiguous_filenames readarray -t contiguous_filenames < <(list_contiguous_filenames) local prev_ncumulative_good_days=$ncumulative_good_days local ncumulative_good_days=${#contiguous_filenames[@]} let "nchunk_good_days = ncumulative_good_days - prev_ncumulative_good_days" || true let "duration_len += CHUNK_LEN" done } scheme_stats() { unset contiguous_filenames readarray -t contiguous_filenames < <(list_contiguous_filenames) # Longest period to be plotted readonly expt_duration_len=${#contiguous_filenames[@]} # days per period declare -A time_periods time_periods[day]=1 time_periods[week]=7 time_periods[two_weeks]=14 time_periods[month]=30 time_periods[duration]=$expt_duration_len # For each time_period: Calculate scheme stats and plot (or skip period) for time_period in ${!time_periods[@]}; do # Order of iteration over time_periods is unpredictable -- next period may be shorter local time_period_len="${time_periods["$time_period"]}" if (( $time_period_len > $expt_duration_len )); then # Skip period if duration is shorter echo "$end_date_prefix $time_period skipped" continue fi # Earliest day in period local period_start_inclusive=$(date -I -d "${END_DATE:14:10} - $time_period_len days") speeds=("all" "slow") for speed in ${speeds[@]}; do local scheme_stats_out=${time_period}_${speed}_scheme_stats_"$END_DATE".txt local scheme_stats_err="$LOGS"/${time_period}_${speed}_scheme_stats_err_"$END_DATE".txt if ! cat "${contiguous_filenames[@]:0:$time_period_len}" | "$STATS_REPO_PATH"/stream_to_scheme_stats \ --scheme-intersection "$duration_scheme_intersection" \ --stream-speed "$speed" \ --watch-times "$LOCAL_DATA_PATH"/"$WATCH_TIMES_POSTFIX" \ > "$scheme_stats_out" 2> "$scheme_stats_err"; then >&2 echo "Error generating scheme statistics ($END_DATE); stream_to_scheme_stats exited unsuccessfully or never started (see $scheme_stats_err)" rm -f "$scheme_stats_out" exit 1 fi local plot=${time_period}_${speed}_plot_"$END_DATE".svg if [ $speed = "all" ]; then local plot_title_prefix="All stream speeds" else local plot_title_prefix="Slow streams only"; fi if [ $time_period_len -eq 1 ]; then local plot_title="$plot_title_prefix, $end_date_prefix" else local plot_title="$plot_title_prefix, $period_start_inclusive : $end_date_prefix"; fi if ! "$STATS_REPO_PATH"/plots/scheme_stats_to_plot.py \ --title "$plot_title" --input_data "$scheme_stats_out" --output_figure "$plot" \ 2> "$scheme_stats_err"; then >&2 echo "Error plotting ($END_DATE); see $scheme_stats_err" rm -f "$plot" exit 1 fi done done } main "$@" <file_sep>/scripts/upload_public_results.sh #!/bin/bash -ue # Upload day's results to gs (expt settings and CSVs were already uploaded) cd "$LOCAL_DATA_PATH"/"$END_DATE" # Upload logs except private err and expt settings # (TODO: update if private filename changes) public_logs=$(ls -d logs/* | grep -v "influx" | grep -v "$EXPT") gsutil cp $public_logs "$DATA_BUCKET"/"$END_DATE"/"$LOGS" # All private files should be cleaned up by now, # but enumerate public files just in case public_results="${STREAM_STATS_PREFIX}* *scheme_stats* *.svg" gsutil -q cp $public_results "$DATA_BUCKET"/"$END_DATE" # don't quote $public_results -- need the spaces # Delete local data now that it's in gs, except stream stats rm -r $(ls | grep -v "${STREAM_STATS_PREFIX}*") <file_sep>/parser.cc #include <cstdlib> #include <stdexcept> #include <iostream> #include <vector> #include <string> #include <array> #include <tuple> #include <charconv> #include <map> #include <cstring> #include <google/sparse_hash_map> #include <google/dense_hash_map> #include <boost/container_hash/hash.hpp> #include <sys/time.h> #include <sys/resource.h> using namespace std; using namespace std::literals; using google::sparse_hash_map; using google::dense_hash_map; size_t memcheck() { rusage usage{}; if (getrusage(RUSAGE_SELF, &usage) < 0) { perror("getrusage"); throw runtime_error(string("getrusage: ") + strerror(errno)); } if (usage.ru_maxrss > 36 * 1024 * 1024) { throw runtime_error("memory usage is at " + to_string(usage.ru_maxrss) + " KiB"); } return usage.ru_maxrss; } void split_on_char(const string_view str, const char ch_to_find, vector<string_view> & ret) { ret.clear(); bool in_double_quoted_string = false; unsigned int field_start = 0; for (unsigned int i = 0; i < str.size(); i++) { const char ch = str[i]; if (ch == '"') { in_double_quoted_string = !in_double_quoted_string; } else if (in_double_quoted_string) { continue; } else if (ch == ch_to_find) { ret.emplace_back(str.substr(field_start, i - field_start)); field_start = i + 1; } } ret.emplace_back(str.substr(field_start)); } uint64_t to_uint64(string_view str) { uint64_t ret = -1; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { str.remove_prefix(ptr - str.data()); throw runtime_error("could not parse as integer: " + string(str)); } return ret; } float to_float(const string_view str) { /* sadly, g++ 8 doesn't seem to have floating-point C++17 from_chars() yet float ret; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { throw runtime_error("could not parse as float: " + string(str)); } return ret; */ /* apologies for this */ char * const null_byte = const_cast<char *>(str.data() + str.size()); char old_value = *null_byte; *null_byte = 0; const float ret = atof(str.data()); *null_byte = old_value; return ret; } template <typename T> T influx_integer(const string_view str) { if (str.back() != 'i') { throw runtime_error("invalid influx integer: " + string(str)); } const uint64_t ret_64 = to_uint64(str.substr(0, str.size() - 1)); if (ret_64 > numeric_limits<T>::max()) { throw runtime_error("can't convert to uint32_t: " + string(str)); } return static_cast<T>(ret_64); } constexpr uint8_t SERVER_COUNT = 64; uint64_t get_server_id(const vector<string_view> & fields) { uint64_t server_id = -1; for (const auto & field : fields) { if (not field.compare(0, 10, "server_id="sv)) { server_id = to_uint64(field.substr(10)) - 1; } } if (server_id >= SERVER_COUNT) { for ( const auto & x : fields ) { cerr << "field=" << x << " "; }; throw runtime_error( "Invalid or missing server id" ); } return server_id; } class username_table { uint32_t next_id_ = 0; dense_hash_map<string, uint32_t> forward_{}; dense_hash_map<uint32_t, string> reverse_{}; public: username_table() { forward_.set_empty_key({}); reverse_.set_empty_key(-1); } uint32_t forward_map_vivify(const string & name) { auto ref = forward_.find(name); if (ref == forward_.end()) { forward_[name] = next_id_; reverse_[next_id_] = name; next_id_++; ref = forward_.find(name); } return ref->second; } uint32_t forward_map(const string & name) const { auto ref = forward_.find(name); if (ref == forward_.end()) { throw runtime_error( "username " + name + " not found"); } return ref->second; } const string & reverse_map(const uint32_t id) const { auto ref = reverse_.find(id); if (ref == reverse_.end()) { throw runtime_error( "uid " + to_string(id) + " not found"); } return ref->second; } }; struct Event { struct EventType { enum class Type : uint8_t { init, startup, play, timer, rebuffer }; Type type; EventType(const string_view sv) : type() { if (sv == "timer"sv) { type = Type::timer; } else if (sv == "play"sv) { type = Type::play; } else if (sv == "rebuffer"sv) { type = Type::rebuffer; } else if (sv == "init"sv) { type = Type::init; } else if (sv == "startup"sv) { type = Type::startup; } else { throw runtime_error( "unknown event type: " + string(sv) ); } } operator uint8_t() const { return static_cast<uint8_t>(type); } bool operator==(const EventType other) { return type == other.type; } bool operator!=(const EventType other) { return not operator==(other); } }; optional<uint32_t> init_id{}; optional<uint32_t> expt_id{}; optional<uint32_t> user_id{}; optional<EventType> type{}; optional<float> buffer{}; optional<float> cum_rebuf{}; bool bad = false; bool complete() const { return init_id.has_value() and expt_id.has_value() and user_id.has_value() and type.has_value() and buffer.has_value() and cum_rebuf.has_value(); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory value: "; cerr << "init_id=" << init_id.value_or(-1) << ", expt_id=" << expt_id.value_or(-1) << ", user_id=" << user_id.value_or(-1) << ", type=" << (type.has_value() ? int(type.value()) : 'x') << ", buffer=" << buffer.value_or(-1.0) << ", cum_rebuf=" << cum_rebuf.value_or(-1.0) << "\n"; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value, username_table & usernames ) { if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "event"sv) { set_unique( type, { value.substr(1,value.size()-2) } ); } else if (key == "buffer"sv) { set_unique( buffer, to_float(value) ); } else if (key == "cum_rebuf"sv) { set_unique( cum_rebuf, to_float(value) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } }; using key_table = map<uint64_t, Event>; struct Channel { constexpr static uint8_t COUNT = 6; enum class ID : uint8_t { cbs, nbc, abc, fox, univision, pbs }; constexpr static array<string_view, COUNT> names = { "cbs", "nbc", "abc", "fox", "univision", "pbs" }; ID id; constexpr Channel(const string_view sv) : id() { if (sv == "cbs"sv) { id = ID::cbs; } else if (sv == "nbc"sv) { id = ID::nbc; } else if (sv == "abc"sv) { id = ID::abc; } else if (sv == "fox"sv) { id = ID::fox; } else if (sv == "univision"sv) { id = ID::univision; } else if (sv == "pbs"sv) { id = ID::pbs; } else { throw runtime_error( "unknown channel: " + string(sv) ); } } constexpr Channel(const uint8_t id_int) : id(static_cast<ID>(id_int)) {} operator string_view() const { return names[uint8_t(id)]; } constexpr operator uint8_t() const { return static_cast<uint8_t>(id); } bool operator==(const Channel other) { return id == other.id; } bool operator!=(const Channel other) { return not operator==(other); } }; Channel get_channel(const vector<string_view> & fields) { for (const auto & field : fields) { if (not field.compare(0, 8, "channel="sv)) { return field.substr(8); } } throw runtime_error("channel missing"); } void parse() { ios::sync_with_stdio(false); string line_storage; username_table usernames; array<array<key_table, Channel::COUNT>, SERVER_COUNT> client_buffer; unsigned int line_no = 0; vector<string_view> fields, measurement_tag_set_fields, field_key_value; while (cin.good()) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } getline(cin, line_storage); line_no++; const string_view line{line_storage}; if (line.empty() or line.front() == '#') { continue; } if (line.size() > numeric_limits<uint8_t>::max()) { throw runtime_error("Line " + to_string(line_no) + " too long"); } split_on_char(line, ' ', fields); if (fields.size() != 3) { if (not line.compare(0, 15, "CREATE DATABASE"sv)) { continue; } cerr << "Ignoring line with wrong number of fields: " << string(line) << "\n"; continue; } const auto [measurement_tag_set, field_set, timestamp_str] = tie(fields[0], fields[1], fields[2]); const uint64_t timestamp{to_uint64(timestamp_str)}; split_on_char(measurement_tag_set, ',', measurement_tag_set_fields); if (measurement_tag_set_fields.empty()) { throw runtime_error("No measurement field on line " + to_string(line_no)); } const auto measurement = measurement_tag_set_fields[0]; split_on_char(field_set, '=', field_key_value); if (field_key_value.size() != 2) { throw runtime_error("Irregular number of fields in field set: " + string(line)); } const auto [key, value] = tie(field_key_value[0], field_key_value[1]); try { if ( measurement == "client_buffer"sv ) { client_buffer[get_server_id(measurement_tag_set_fields)][get_channel(measurement_tag_set_fields)][timestamp].insert_unique(key, value, usernames); } else if ( measurement == "active_streams"sv ) { // skip } else if ( measurement == "backlog"sv ) { // skip } else if ( measurement == "channel_status"sv ) { // skip } else if ( measurement == "client_error"sv ) { // skip } else if ( measurement == "client_sysinfo"sv ) { // client_sysinfo[timestamp].insert_unique(key, value); } else if ( measurement == "decoder_info"sv ) { // skip } else if ( measurement == "server_info"sv ) { // skip } else if ( measurement == "ssim"sv ) { // skip } else if ( measurement == "video_acked"sv ) { // video_acked[get_server_id(measurement_tag_set_fields)][timestamp].insert_unique(key, value); } else if ( measurement == "video_sent"sv ) { // video_sent[get_server_id(measurement_tag_set_fields)][timestamp].insert_unique(key, value); } else if ( measurement == "video_size"sv ) { // skip } else { throw runtime_error( "Can't parse: " + string(line) ); } } catch (const exception & e ) { cerr << "Failure on line: " << line << "\n"; throw; } } using session_key = tuple<uint32_t, uint32_t, uint32_t, uint8_t, uint8_t>; /* init_id, uid, expt_id, server, channel */ dense_hash_map<session_key, vector<pair<uint64_t, const Event*>>, boost::hash<session_key>> sessions; sessions.set_empty_key({0,0,0,-1,-1}); unsigned int bad_count = 0; for (uint8_t server = 0; server < client_buffer.size(); server++) { const size_t rss = memcheck() / 1024; cerr << "server " << int(server) << "/" << client_buffer.size() << ", RSS=" << rss << " MiB\n"; for (uint8_t channel = 0; channel < Channel::COUNT; channel++) { for (const auto & [ts,event] : client_buffer[server][channel]) { if (event.bad) { bad_count++; cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values.\n"; continue; } if (not event.complete()) { throw runtime_error("incomplete event with timestamp " + to_string(ts)); } sessions[{*event.init_id, *event.user_id, *event.expt_id, server, channel}].emplace_back(ts, &event); } } } double total_time = 0; double stalled_time = 0; unsigned int had_stall = 0; for ( const auto & [session_key, events] : sessions ) { cout << "Session: " << usernames.reverse_map(get<1>(session_key)) << " lasted " << (events.back().first - events.front().first) / double(1000000000) << " seconds and spent " << events.back().second->cum_rebuf.value() << " seconds stalled\n"; total_time += (events.back().first - events.front().first) / double(1000000000); stalled_time += events.back().second->cum_rebuf.value(); if (events.back().second->cum_rebuf.value() > 0) { had_stall++; } } cout << "Overall: " << total_time / double(3600) << " hours played, " << 100 * stalled_time / total_time << "% stalled.\n"; cout << "Out of " << sessions.size() << " sessions, " << had_stall << " had a stall, or " << 100.0 * had_stall / double(sessions.size()) << "%.\n"; cout << "Memory usage is " << memcheck() / 1024 << " MiB.\n"; cout << "Bad data points: " << bad_count << "\n"; } int main() { try { parse(); } catch (const exception & e) { cerr << e.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } <file_sep>/plots/scheme_stats_to_plot.py #!/usr/bin/env python3 import sys import argparse import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import hashlib common_schemes = { 'puffer_ttp_cl/bbr': ['Fugu', 'tab:red'], 'linear_bba/bbr': ['BBA', 'tab:green'], 'pensieve/bbr': ['Pensieve', 'tab:purple'], 'pensieve_in_situ/bbr': ['Pensieve (Puffer traces)', 'tab:pink'], 'mpc/bbr': ['MPC-HM', 'tab:blue'], 'robust_mpc/bbr': ['RobustMPC-HM', 'tab:brown'], 'puffer_ttp_20190202/bbr': ['Fugu-Feb', 'tab:orange'], 'puffer_ttp_20190302/bbr': ['Fugu-Mar', 'tab:olive'], 'puffer_ttp_20190402/bbr': ['Fugu-Apr', 'tab:cyan'], 'puffer_ttp_20190502/bbr': ['Fugu-May', 'tab:gray'], 'fugu_variant_cl/bbr': ['Memento', '#0f6c44'], 'fugu_variant_cl3/bbr': ['Memento-v3a', '#bc61f5'], 'fugu_variant_cl4/bbr': ['Memento-v3b', '#461257'], } # Keep name => color mapping consistent across experiments and runs. # No matplotlib colormaps to avoid duplicating colors. def get_color(name): # Assign static colors to the common schemes. # For others, hash the name. if name in common_schemes: return common_schemes[name][1] else: # hashlib sha is deterministic unlike hash() sha = hashlib.sha256() sha.update(name.encode()) return '#' + sha.hexdigest()[:6] def plot_data(data, output_figure, title): fig, ax = plt.subplots() ax.set_xlabel('Time spent stalled (%)') ax.set_ylabel('Average SSIM (dB)') for name in data: if name == 'nstreams' or name == 'nwatch_hours': continue x = data[name]['stall'][2] y = data[name]['ssim'][2] pretty_name = name if name not in common_schemes else common_schemes[name][0] pretty_color = get_color(name) ax.scatter(x, y, color=pretty_color, label=pretty_name) ax.errorbar(x, y, xerr=[[x - data[name]['stall'][0]], [data[name]['stall'][1] - x]], yerr=[[y - data[name]['ssim'][1]], [data[name]['ssim'][0] - y]], ecolor=pretty_color, capsize=4.0) # Labels are often very overlapping -- try legend #ax.annotate(pretty_name, (x, y), # xytext=(4,5), textcoords='offset pixels') ax.legend() subtitle = '{} streams, {:.0f} stream-hours'.format(data['nstreams'], data['nwatch_hours']) plt.title(title + '\n(' + subtitle + ')' if title else subtitle) ax.invert_xaxis() # Hide the right and top spines ax.spines['right'].set_visible(False) ax.spines['top'].set_visible(False) fig.savefig(output_figure) sys.stderr.write('Saved plot to {}\n'.format(output_figure)) def parse_data(input_data_path): data = {} with open(input_data_path) as fh: nstreams = 0 nwatch_hours = 0 for line in fh: if line[0] == '#': items = line.split() nstreams += int(items[2]) nwatch_hours += float(items[-1].split('/')[1]) continue line = line.replace(',', '').replace(';', '').replace('%', '') items = line.split() name = items[0] data[name] = {} # stall_low, stall_high, stall_mean data[name]['stall'] = [float(x) for x in items[5:11:2]] # ssim_low, ssim_high, ssim_mean data[name]['ssim'] = [float(x) for x in items[13:19:2]] data['nstreams'] = nstreams data['nwatch_hours'] = nwatch_hours return data def main(): parser = argparse.ArgumentParser() parser.add_argument('--input_data', help='input data (output of confint)', required=True) parser.add_argument('--output_figure', help='output figure', required=True) parser.add_argument('--title') args = parser.parse_args() data = parse_data(args.input_data) plot_data(data, args.output_figure, args.title) if __name__ == '__main__': main() <file_sep>/scripts/get_period_stream_stats.sh #!/bin/bash -ue # Attempts to fetch all stream statistics files for the period. # If a file is not found locally in the location expected by entrance program, # tries to download it from gs. # If gs download fails for any reason, continue to next file. # Creates local directory for a day if none exists. # Date format e.g. 2019-07-01T11_2019-07-02T11 USAGE="$0 <date> <ndays>, where period is <ndays>, ending on and including <date>" if [ "$#" -ne 2 ]; then >&2 echo $USAGE exit 1 fi unset period_dates readarray -t period_dates < <("$STATS_REPO_PATH"/scripts/list_period_dates.sh "$1" "$2") if [ "${#period_dates[@]}" -ne "$2" ]; then >&2 echo "Error enumerating dates before fetching period stream stats" exit 1 fi # Search for END_DATE stream stats as well; in the normal case we're about to generate them, # but if this is being run after they were already uploaded from another machine, # then we'd probably like to fetch them for period_date in ${period_dates[@]}; do # Create local directory for day's data if needed mkdir -p "$LOCAL_DATA_PATH"/"$period_date"/"$LOGS" cd "$LOCAL_DATA_PATH"/"$period_date" stream_stats_filename=${STREAM_STATS_PREFIX}_"$period_date".txt # could use gsutil cp -n, but would like to avoid talking to gs if not necessary if [ ! -f "$stream_stats_filename" ]; then # Past day not available locally => try gs, fail silently (not an error if file not found) if ! gsutil -q cp "$DATA_BUCKET"/"$period_date"/"$stream_stats_filename" . &> /dev/null; then # Clean up any partially copied file (stats file didn't exist before, so ok to remove) # Conditional overwrites exit status, so we'll continue to next file rm -f "$stream_stats_filename" fi fi done <file_sep>/README.md # puffer-statistics Dumps and analyzes the raw data recorded by [Puffer](https://puffer.stanford.edu/), a TV streaming website and Stanford research study. Anyone can download the daily data, build the analysis programs, and run the pipeline themselves. We encourage the public to replicate our results, posted every day on the Puffer website [Results page](https://puffer.stanford.edu/results/) along with the anonymized raw data. The [Data Description webpage](https://puffer.stanford.edu/data-description/) explains the format of these results, while this README details the analysis pipeline which produces them. ## Setup To set up a machine for the analysis, see `scripts/init_data_release_vm.sh`. This installs the dependencies listed in `scripts/deps.sh`, creates a local directory for the results, and builds the analysis programs. Note that `scripts/deps.sh` installs packages as `sudo`, so users may prefer to manage dependencies on their own. Dependencies marked as "private" in the script are not required for users. The analysis pipeline has been tested on Ubuntu 19.10 and 18.04 (the latter requires slight modifications; see `scripts/init_data_release_vm.sh`). ## Pipeline Overview Given a date, the pipeline outputs CSVs containing the day’s (anonymized) raw data, as well as stream and scheme statistics. Scheme statistics are calculated over the day as well as several time periods preceding it (week, two-week, month, and experiment duration). The full pipeline runs daily on the Puffer server, pushing the results to the [puffer-data-release bucket](https://console.cloud.google.com/storage/browser/puffer-data-release). After the results have been uploaded, those who wish to reproduce them may run the "public" portion of the pipeline, using the CSVs in the bucket as input. Users outside the Puffer organization lack the permissions to run the "private" portion of the pipeline. ## Pipeline Components As shown in the diagram below, the data pipeline has three stages, executed by `influx_to_csv`, `csv_to_stream_stats`, and `stream_to_scheme_stats`, respectively. The final stage requires two metadata files generated by `stream_stats_to_metadata`: `scheme intersection` and `watch times`, described below. ![Alt text](https://raw.githubusercontent.com/StanfordSNR/puffer-statistics/data-release/img/pipeline.svg?sanitize=true) The Puffer server runs the full pipeline via `scripts/private_data_release.sh`. This script first sets environment variables in `scripts/export_constants.sh`, then executes the "private" portion of the pipeline, namely `scripts/private_entrance.sh`. After the private program generates and uploads CSVs containing anonymized raw data, `scripts/public_entrance.sh` outputs statistics summarizing each stream, as well as each scheme's average performance over all streams. Finally, `scripts/upload_public_results.sh` uploads all non-private output to the [bucket](https://console.cloud.google.com/storage/browser/puffer-data-release). In order to reproduce the results generated by the Puffer server, members of the public may download the CSVs for the selected day from the [bucket](https://console.cloud.google.com/storage/browser/puffer-data-release), then run `source ./export_constants.sh ~ <date>` to set up, followed by `scripts/public_entrance.sh` The `<date>` to be analyzed may be either the most recent available (`yesterday`) or some past day (`YYYY-MM-DD`). For instance, if `<date>` is `2020-02-14`, then the corresponding [bucket](https://console.cloud.google.com/storage/browser/puffer-data-release) directory (from which the CSVs may be downloaded) is `2020-02-14T11_2020-02-15T11`. This directory contains data from 2020-02-14 11AM UTC to 2020-02-15 11AM UTC. ### Puffer background Loading the Puffer video player starts a new streaming "session". Each channel change starts a new "stream" within the session. Each session is randomly assigned a "scheme" on load. A scheme, e.g. `Fugu/BBR` or `Pensieve/Cubic`, is the set of adaptive bit rate and congestion control algorithms used for the duration of a session. An "experiment" is the group of schemes from which each session’s scheme is randomly chosen. This group of schemes changes over time, as new experiments are performed. See the Puffer [paper](https://puffer.stanford.edu/static/puffer/documents/puffer-paper.pdf) for further detail. ### `scheme intersection` The `scheme intersection` file (i.e. `intx_out.txt`) lists the days on which *all* schemes in the desired day’s experiment were run (see [Scheme Statistics](#scheme-statistics) for why this is necessary). To produce the intersection file, first an experiment-agnostic `scheme schedule` (i.e. `scheme_days_out.txt`) is generated. The schedule enumerates the days each scheme ran, for schemes that appeared in *any* experiment(s) in the input data. For convenience, `stream_stats_to_metadata` also outputs a more human-readable `scheme schedule` in `scheme_days_err.txt`. Given an experiment and a `scheme schedule`, `stream_stats_to_metadata` filters the `scheme schedule` to days on which *all* schemes in the experiment ran. For instance, if the `scheme schedule` is `{ Fugu/BBR => Jan 1 : Jan 4, BBA/BBR => Jan 4 : Jan 5, Pensieve/BBR => Jan 3 : Jan 5 }` and the experiment is `{ Fugu/BBR, Pensieve/BBR }`, then the `scheme intersection` is `{ Jan 3 : Jan 4 }`, since both schemes in the experiment ran on those days. As shown in the diagram above, the entrance program uses the same `scheme schedule` and `scheme intersection` for all time periods leading up to a given day. In fact, these two files can be generated from any input data range inclusive of all desired periods. Since the monthly period includes the weekly and daily periods, the files can be produced once for all periods, using the month’s data as input. For convenience, `stream_to_scheme_stats` outputs the experiment and `scheme intersection` passed to it as argument -- see `logs/*scheme_stats_err.txt`. ### `watch times` This file is a static list of stream watch times from which to sample while calculating confidence intervals. Slow streams sample from a separate watch times file. The `stream_stats_to_metadata` program can generate these files, but they also reside in the root of the [bucket](https://console.cloud.google.com/storage/browser/puffer-data-release). This avoids materializing the large amount of input data `stream_stats_to_metadata` needs to generate statistically sound watch times files. ## Results ### CSVs A set of CSVs is produced for each day, containing the data collected by Puffer. The [Data Description webpage](https://puffer.stanford.edu/data-description/) explains the format. The `influx_to_csv` program anonymizes the raw data, which contains IPs and other user information, assigning numerical identifiers to each session and stream. ### *Stream* statistics A stream statistics file is produced for each day. Each line in this file summarizes a stream’s performance during the day. Stream statistics include SSIM and stall ratio as well as several other metrics. Stream statistics are output in `*stream_stats.txt`. ### *Scheme* statistics A scheme statistics file is produced for each day, along with the week, two-week, and month period preceding each day (inclusive of the day itself). Each line in this file summarizes a scheme’s stall ratio and SSIM during the time period, as an average over each stream assigned to that scheme during the period. Averaging is performed only over days on which *all* schemes in the day’s experiment were run. This is important because network and TV station conditions change over time, so streams running on different days should not be directly compared. Scheme statistics, including 95% confidence intervals, are output in `*scheme_stats.txt` and plotted in `*plot.svg`. Note that stall ratio is calculated using random sampling, so results will differ slightly across runs. <file_sep>/scripts/parallelizable_private_data_release.sh #!/bin/bash -ue source ./export_constants.sh ~ "$1" ./private_entrance.sh ./public_entrance.sh # TODO: assumes exit after stream_stats (should take arg) ./upload_public_results.sh <file_sep>/influx_to_csv.cc #include <cstdlib> #include <stdexcept> #include <iostream> #include <vector> #include <string> #include <array> #include <tuple> #include <charconv> #include <map> #include <cstring> #include <fstream> #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/time.h> #include <sys/resource.h> #include <crypto++/base64.h> #include "dateutil.hh" #include "analyzeutil.hh" using namespace std; using namespace std::literals; /** * From stdin, parses influxDB export, which contains one line per key/value field * (e.g. cum_rebuf), along with the tags corresponding to that field * (e.g. timestamp, server, and channel). * For each measurement type (e.g. client_buffer), * outputs a csv containing one line per "datapoint", i.e. all fields recorded * with a given set of tags (e.g. a single Event). * Takes date as argument. */ #define NS_PER_SEC 1000000000UL // Bytes of random data used as public session ID after base64 encoding static constexpr unsigned BYTES_OF_ENTROPY = 32; // if delimiter is at end, adds empty string to ret void split_on_char(const string_view str, const char ch_to_find, vector<string_view> & ret) { ret.clear(); bool in_double_quoted_string = false; unsigned int field_start = 0; // start of next token for (unsigned int i = 0; i < str.size(); i++) { const char ch = str[i]; if (ch == '"') { in_double_quoted_string = !in_double_quoted_string; } else if (in_double_quoted_string) { continue; } else if (ch == ch_to_find) { ret.emplace_back(str.substr(field_start, i - field_start)); field_start = i + 1; } } ret.emplace_back(str.substr(field_start)); } constexpr uint64_t SERVER_COUNT = 255; // server_id identifies a daemon serving a given scheme uint64_t get_server_id(const vector<string_view> & fields) { uint64_t server_id = -1; for (const auto & field : fields) { if (not field.compare(0, 10, "server_id="sv)) { server_id = to_uint64(field.substr(10)) - 1; } } if (server_id >= SERVER_COUNT) { for ( const auto & x : fields ) { cerr << "field=" << x << " "; }; throw runtime_error( "Invalid or missing server id" ); } return server_id; } /* Two datapoints are considered part of the same event (i.e. same Event struct) iff they share * {timestamp, server, channel}. * Two events with the same ts may come to a given server, so use channel to help * disambiguate (see 2019-04-30:2019-05-01 1556622001697000000). */ using event_table = map<uint64_t, Event>; /* timestamp */ using sysinfo_table = map<uint64_t, Sysinfo>; /* timestamp */ using video_sent_table = map<uint64_t, VideoSent>; /* timestamp */ using video_acked_table = map<uint64_t, VideoAcked>; /* timestamp */ using video_size_table = map<uint64_t, VideoSize>; /* timestamp */ using ssim_table = map<uint64_t, SSIM>; /* timestamp */ /* Fully identifies a stream, for convenience. */ struct private_stream_key { optional<uint32_t> first_init_id; uint32_t init_id; uint32_t user_id; uint32_t expt_id; uint64_t server; uint8_t channel; }; /* Identifies a group of streams that are part of the same session. * If init_id is a first_init_id, represents a session; else represents a group of streams * with the same un-decremented init_id. * Two streams are considered part of the same session (i.e. same session_id) iff they share * {decremented init_id/first_init_id, user_id}. * Watch_times script used for submission groups session by decremented init_id and IP -- * this is the closest to that (using IP would mean that streams missing sysinfo * wouldn't be assigned a public session ID). */ struct ambiguous_stream_id { uint32_t init_id{}; // UN-decremented init_id, or first_init_id uint32_t user_id{}; bool operator<(const ambiguous_stream_id & o) const { return (tie(init_id, user_id) < tie(o.init_id, o.user_id)); } }; /* Two events are considered part of the same stream (i.e. same public_stream_id) iff they share * {ambiguous_stream_id, expt_id, server, channel}. * Server_id may change mid-session (see 2019-04-30:2019-05-01) - consider this a new stream * to match the submission. */ struct stream_id_disambiguation { uint32_t expt_id{}; uint64_t server{}; uint8_t channel{}; bool operator==(const stream_id_disambiguation & o) const { return (tie(expt_id, server, channel) == tie(o.expt_id, o.server, o.channel)); } }; /* Represents a disambiguous stream in a list of streams with the * same ambiguous stream id. */ struct stream_index { stream_id_disambiguation disambiguation{}; // index in list of streams for a session (-1 if not meaningful) int index{}; }; /* Session ID and list of *disambiguous* streams corresponding to a * given *ambiguous* stream ID. */ struct public_stream_ids_list { string session_id{}; // random string /* This vector usually has one element, but if the server_id changes mid-session, * will contain an element for each server_id. */ vector<stream_index> streams{}; }; using stream_ids_table = map<ambiguous_stream_id, public_stream_ids_list>; typedef map<ambiguous_stream_id, public_stream_ids_list>::iterator stream_ids_iterator; /* Whenever a timestamp is used to represent a day, round down to Influx backup hour. * Influx records ts as nanoseconds - use nanoseconds when writing ts to csv. */ using Day_ns = uint64_t; class Parser { private: /* Maps field value to int, for string values */ string_table usernames{}; string_table browsers{}; string_table ostable{}; string_table formats{}; string_table channels{}; /* Measurement arrays */ // Just used to reserve vectors static constexpr unsigned N_CHANNELS_ESTIMATE = 10; static constexpr unsigned N_FORMATS_ESTIMATE = 10; // Note: dump_measurement() uses the names of the measurement array members // client_buffer[server][channel] = map<ts, Event> array<vector<event_table>, SERVER_COUNT> client_buffer{}; // client_sysinfo[server] = map<ts, SysInfo> array<sysinfo_table, SERVER_COUNT> client_sysinfo{}; // video_sent[server][channel] = map<ts, VideoSent> array<vector<video_sent_table>, SERVER_COUNT> video_sent{}; // video_acked[server][channel] = map<ts, VideoAcked> array<vector<video_acked_table>, SERVER_COUNT> video_acked{}; // video_size[format][channel] = map<ts, VideoSize> // Insert the estimated number of (empty) inner vectors, so they can be reserved up front vector<vector<video_size_table>> video_size = vector<vector<video_size_table>>(N_FORMATS_ESTIMATE); // ssim[format][channel] = map<ts, SSIM> // Insert the estimated number of (empty) inner vectors, so they can be reserved up front vector<vector<ssim_table>> ssim = vector<vector<ssim_table>>(N_FORMATS_ESTIMATE); stream_ids_table stream_ids{}; unsigned int bad_count = 0; /* Timestamp range to be analyzed (influx export includes partial datapoints outside the requested range). * Any ts outside this range (inclusive) are rejected */ pair<Day_ns, Day_ns> days{}; size_t n_bad_ts = 0; /* Date to analyze, e.g. 2019-07-01T11_2019-07-02T11 */ const string date_str{}; /* Get index corresponding to the string value of a tag. * Updates the tag's string <=> index table as needed. * Useful for a field whose value is used to index into a measurement array * (e.g. format, channel). * fields: e.g. client_buffer,channel=abc,server_id=1 * tag_key: e.g. channel */ uint8_t get_tag_id(const vector<string_view> & tags, string_view tag_key, string_table& table) { string value_str; string_view tag_prefix = string(tag_key) + "="; unsigned prefix_len = tag_prefix.length(); for (const auto & tag : tags) { if (not tag.compare(0, prefix_len, tag_prefix)) { value_str = string(tag.substr(prefix_len)); } } if (value_str.empty()) { throw runtime_error(string(tag_key) + " missing"); } // Insert new value if needed return table.forward_map_vivify(value_str); } /* Get the numeric value of a dynamic "tag". * Each measurement has a pair of tags that appears on every line, * e.g. {server, channel} for client_buffer/video_sent/video_acked. * Since every line has these tags, tags can be used to disambiguate datapoints * (as opposed to the other fields e.g. cum_rebuf, which only appear on some client_buffer lines). * A dynamic tag can take any number of values (server tag is currently static). */ template<typename Vec> // Tag value represents an index into this vector uint8_t get_dynamic_tag_id(Vec & vec, vector<string_view> & tags, string_view tag_key) { if (tag_key != "channel"sv and tag_key != "format"sv) { throw runtime_error("Unknown tag key " + string(tag_key)); } string_table& table = tag_key == "channel" ? channels : formats; // updates table as needed const uint8_t tag_id = get_tag_id(tags, tag_key, table); const unsigned n_cur_tag_values = vec.size(); /* The size of the vector must be at least the highest tag_id seen by this server. * That number may increase by more than one across calls to this function with a given server_id, * since other servers also call get_tag_id() on the same tag, adding a new value to the global table. */ int n_new_tag_values = tag_id + 1 - n_cur_tag_values; if (n_new_tag_values > 0) { /* Resize will only happen a few times - we only see ~10 possible values for channel and format. * Vectors are reserved up front, so resize will likely never incur a realloc. * Default-inits any holes between previous extent and new value. */ vec.resize(n_cur_tag_values + n_new_tag_values); } return tag_id; } /* Generate random base64-encoded session ID, insert to stream_ids. */ void generate_session_id(public_stream_ids_list & public_ids_list) { uint8_t random_bytes[BYTES_OF_ENTROPY]; // avoid conflicting byte definitions int entropy_ret = getentropy(random_bytes, BYTES_OF_ENTROPY); if (entropy_ret != 0) { throw runtime_error(string("Failed to generate public session ID: ") + strerror(errno)); } // encode as base64 in-place in stream_ids CryptoPP::StringSource ss(random_bytes, BYTES_OF_ENTROPY, true, new CryptoPP::Base64Encoder( // CryptoPP takes ownership new CryptoPP::StringSink(public_ids_list.session_id), /* insertLineBreaks = */ false ) ); } /* Given private stream id, return public session ID and stream index. * Throws if public IDs not found, which represents some logic error for * client_buffer, but not for video_sent (e.g. 2019-03-30T11_2019-03-31T11 * has a video_sent with init_id 901804980 belonging to a stream with no corresponding * client_buffer.) * XXX: could still record chunks like these in csv * (by using video_sent as well as client_buffer to build stream_ids), * but a video_sent with no corresponding * client_buffer seems spurious, so ignore such chunks for now. */ public_stream_id get_anonymous_ids(const private_stream_key & stream_key) { optional<uint32_t> first_init_id = stream_key.first_init_id; // Look up anonymous session/stream ID ambiguous_stream_id private_id = {first_init_id.value_or(stream_key.init_id), stream_key.user_id}; const stream_id_disambiguation disambiguation = {stream_key.expt_id, stream_key.server, stream_key.channel}; const stream_ids_iterator found_ambiguous_stream = stream_ids.find(private_id); if (found_ambiguous_stream == stream_ids.end()) { throw runtime_error( "Failed to find anonymized session/stream ID for init_id " + to_string(stream_key.init_id) + ", user " + to_string(stream_key.user_id) + " (ambiguous stream ID not found)" ); } unsigned index; public_stream_ids_list& found_public_ids = found_ambiguous_stream->second; if (first_init_id) { // If private_stream_key has first_init_id, its session only appears once in stream_ids, // calculate index index = stream_key.init_id - *first_init_id; } else { vector<stream_index> & found_streams = found_public_ids.streams; auto found_disambiguous_stream = find_if(found_streams.begin(), found_streams.end(), [&disambiguation] (const stream_index& s) { return s.disambiguation == disambiguation; }); if (found_disambiguous_stream == found_streams.end()) { throw runtime_error( "Failed to find anonymized session/stream ID for init_id " + to_string(stream_key.init_id) + " (disambiguous stream ID not found)" ); } index = found_disambiguous_stream->index; } return {found_public_ids.session_id, index}; } /* Dump an array of measurements to csv, including session ID from stream_ids. * For events without first_init_id, stream index was also recorded in stream_ids. * For events with first_init_id, stream index is calculated as init_id - first_init_id. * meas_arr should be some container<vector<T_table>>, where T provides anon_keys/values() and * has first_init_id, init_id, user_id, expt_id as optional members */ template <typename MeasurementArray> void dump_private_measurement(const MeasurementArray & meas_arr, const string & meas_name) { const string & dump_filename = meas_name + "_" + date_str + ".csv"; ofstream dump_file{dump_filename}; if (not dump_file.is_open()) { throw runtime_error( "can't open " + dump_filename); } dump_file << "time (ns GMT),session_id,index,expt_id,channel,"; bool wrote_header = false; // Write all datapoints for (uint64_t server = 0; server < meas_arr.size(); server++) { for (uint8_t channel_id = 0; channel_id < meas_arr[server].size(); channel_id++) { for (const auto & [ts,datapoint] : meas_arr[server][channel_id]) { if (datapoint.bad) { bad_count++; cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values " "(while dumping measurements).\n"; continue; } if (not datapoint.complete()) { cerr << datapoint << endl; throw runtime_error("incomplete datapoint with timestamp " + to_string(ts)); } // Write column header using the first datapoint encountered // (note there may not be a datapoint at server=channel=0) if (not wrote_header) { dump_file << datapoint.anon_keys() << "\n"; wrote_header = true; } // Get anonymous session/stream ID for datapoint public_stream_id public_id; try { public_id = get_anonymous_ids({datapoint.first_init_id, *datapoint.init_id, *datapoint.user_id, *datapoint.expt_id, server, channel_id}); } catch (const exception & e) { /* All Events should have IDs, but the other datapoints may not -- * see comment on get_anonymous_ids */ if (meas_name == "client_buffer") { throw; } cerr << "Datapoint with timestamp " << ts << " has no corresponding event: " << e.what() << "\n"; continue; // don't dump this chunk } // video_sent requires formats table to get format string const string & anon_values = meas_name == "video_sent" ? datapoint.anon_values(formats) : datapoint.anon_values(); dump_file << ts << "," << public_id.session_id << "," << public_id.index << "," << *datapoint.expt_id << "," << channels.reverse_map(channel_id) << "," << anon_values << "\n"; } } } dump_file.close(); if (dump_file.bad()) { throw runtime_error("error writing " + dump_filename); } } /* meas_arr should be some container<vector<T_table>>, where T provides anon_keys/values(). * Separate from dump_private to allow templating * (private version requires private fields like init_id, which public measurements don't have) */ template <typename MeasurementArray> void dump_public_measurement(const MeasurementArray & meas_arr, const string & meas_name) { const string & dump_filename = meas_name + "_" + date_str + ".csv"; ofstream dump_file{dump_filename}; if (not dump_file.is_open()) { throw runtime_error( "can't open " + dump_filename); } // Write column header using any datapoint (here, the first one) // Current non-anonymous measurements of interest (video_size, ssim) have format and channel as tags dump_file << "time (ns GMT),format,channel,"; bool wrote_header = false; // Write all datapoints for (uint8_t format_id = 0; format_id < meas_arr.size(); format_id++) { for (uint8_t channel_id = 0; channel_id < meas_arr.at(format_id).size(); channel_id++) { for (const auto & [ts,datapoint] : meas_arr[format_id][channel_id]) { if (datapoint.bad) { bad_count++; cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values " "(while dumping measurements).\n"; continue; } if (not datapoint.complete()) { cerr << datapoint << endl; throw runtime_error("incomplete datapoint with timestamp " + to_string(ts)); } // Write column header using the first datapoint encountered // (note there may not be a datapoint at server=channel=0) if (not wrote_header) { dump_file << datapoint.anon_keys() << "\n"; wrote_header = true; } dump_file << ts << "," << formats.reverse_map(format_id) << "," << channels.reverse_map(channel_id) << "," << datapoint.anon_values() << "\n"; } } } dump_file.close(); if (dump_file.bad()) { throw runtime_error("error writing " + dump_filename); } } public: /* Group client_buffer by user_id and first_init_id if available, * else un-decremented init_id. * After grouping, each key in stream_ids represents * an ambiguous stream if first_init_id is available, else a session. * Record with blank session ID/stream index; will be filled in after grouping. */ void group_stream_ids() { unsigned line_no = 0; for (uint8_t server = 0; server < client_buffer.size(); server++) { for (uint8_t channel = 0; channel < client_buffer[server].size(); channel++) { for (const auto & [ts,event] : client_buffer[server][channel]) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } line_no++; if (event.bad) { // bad_count++ happens in dump(), for all datapoints cerr << "Skipping bad data point (of " << bad_count << " total) with contradictory values (while grouping stream IDs).\n"; continue; } if (not event.complete()) { cerr << event << endl; throw runtime_error("incomplete event with timestamp " + to_string(ts)); } optional<uint32_t> first_init_id = event.first_init_id; // Record with first_init_id, if available ambiguous_stream_id private_id = {first_init_id.value_or(*event.init_id), *event.user_id}; stream_id_disambiguation disambiguation = {*event.expt_id, server, channel}; stream_ids_iterator found_ambiguous_stream = stream_ids.find(private_id); if (found_ambiguous_stream != stream_ids.end() and not first_init_id) { // This stream's {init_id, user_id} has already been recorded => // add {expt_id, server, channel} if not yet recorded // (if stream has first_init_id, leave vector empty) vector<stream_index> & found_streams = found_ambiguous_stream->second.streams; auto found_disambiguous_stream = find_if(found_streams.begin(), found_streams.end(), [&disambiguation] (const stream_index& s) { return s.disambiguation == disambiguation; }); if (found_disambiguous_stream == found_streams.end()) { // Haven't recorded this {expt_id, server, channel} for this {init_id, user_id} yet => // add an entry for this {expt_id, server, channel} (regardless of first_init_id) found_streams.emplace_back(stream_index{disambiguation, -1}); } else { // Already recorded this {expt_id, server, channel} for this {init_id, user_id} => // nothing to do } } else if (found_ambiguous_stream == stream_ids.end()) { // This stream's {init_id, user_id} has not yet been recorded => // add an entry in stream_ids // with blank session ID and stream indexes (will be filled in in pass over stream_ids) // (regardless of first_init_id) /* Generate session id in-place, record with index = -1 */ public_stream_ids_list new_stream_ids_list{}; if (not first_init_id) { new_stream_ids_list.streams.emplace_back(stream_index{disambiguation, -1}); } stream_ids.emplace(make_pair(private_id, new_stream_ids_list)); } } } } } /* Assign cryptographically secure session ID to each stream, and record index of stream in session. * Session ID and index are outputted in csv; public analyze uses them as a stream ID. * Build stream_ids using client_buffer events. * When dumping data, search stream_ids for stream key corresponding to each datapoint */ void anonymize_stream_ids() { /* Pass over stream IDs; all init_ids are recorded, so it's safe to decrement to search * for previous streams in the session. * This pass is required because sometimes two events have the same timestamp and user, but * the second one has a lower init_id (e.g. see 2019-03-31, init_ids 3977886231/3977886232) * So, there's no obvious way to build client_buffer such that init_ids within a session * are sorted -- sorting by ts, server, and channel is not enough. */ for (auto & [cur_private_id, cur_public_ids_list] : stream_ids) { bool is_first_init_id = cur_public_ids_list.streams.empty(); if (is_first_init_id) { /* Streams with first_init_id are recorded with empty list of disambiguous * streams, since there's no need to calculate a stream index (can be * calculated with subtraction on dump) */ /* No need to decrement -- if stream has first_init_id, record with that */ generate_session_id(cur_public_ids_list); } else { stream_ids_iterator found_ambiguous_stream; // Searching for a *different* session than the current one => start with decrement = 1 unsigned decrement; for ( decrement = 1; decrement < 1024; decrement++ ) { found_ambiguous_stream = stream_ids.find({ cur_private_id.init_id - decrement, cur_private_id.user_id}); if (found_ambiguous_stream == stream_ids.end()) { // loop again } else { break; } } unsigned start_stream_index = 0; if (found_ambiguous_stream == stream_ids.end()) { /* This is the first stream in session -- generate session id, * fill in stream indexes starting from 0. */ generate_session_id(cur_public_ids_list); } else { /* Already recorded this session via the previous ambiguous stream * in the session => copy previous stream's session id, * fill in stream indexes starting from previous stream's last one */ public_stream_ids_list& found_public_ids = found_ambiguous_stream->second; cur_public_ids_list.session_id = found_public_ids.session_id; start_stream_index = found_public_ids.streams.back().index + 1; } // Fill in stream indexes, if no first_init_id for (auto & disambiguous_stream : cur_public_ids_list.streams) { disambiguous_stream.index = start_stream_index++; } } // end else } // end stream_ids loop } /* Useful for testing. Check that no two streams are assigned the same * {session_id, stream index} */ void check_public_stream_id_uniqueness() const { set<tuple<string, unsigned>> unique_public_stream_ids; for (const auto & [private_id, public_ids_list] : stream_ids) { for (const auto & disambiguous_stream : public_ids_list.streams) { bool duplicate = unique_public_stream_ids.count( {public_ids_list.session_id, disambiguous_stream.index}); if (duplicate) { cerr << "duplicate public ID:" << endl; cerr << "duplicate init id: " << private_id.init_id << endl; cerr << "duplicate index: " << disambiguous_stream.index << endl; throw runtime_error("public stream IDs are not unique across all streams"); } unique_public_stream_ids.insert({public_ids_list.session_id, disambiguous_stream.index}); } } } Parser(Day_ns start_ts, const string & date_str) : date_str(date_str) { usernames.forward_map_vivify("unknown"); browsers.forward_map_vivify("unknown"); ostable.forward_map_vivify("unknown"); formats.forward_map_vivify("unknown"); channels.forward_map_vivify("unknown"); days.first = start_ts; days.second = start_ts + 60 * 60 * 24 * NS_PER_SEC; // reserve vectors (will likely never need to realloc) for (auto & vec : client_buffer) vec.reserve(N_CHANNELS_ESTIMATE); for (auto & vec : video_sent) vec.reserve(N_CHANNELS_ESTIMATE); for (auto & vec : video_acked) vec.reserve(N_CHANNELS_ESTIMATE); // If data contains more formats than estimated, inner vectors beyond the estimate won't be reserved. // This should be rare. for (auto & inner_vec : video_size) inner_vec.reserve(N_CHANNELS_ESTIMATE); for (auto & inner_vec : ssim) inner_vec.reserve(N_CHANNELS_ESTIMATE); } /* To dump a new measurement: * 1) Populate measurement array during parse() (add tag key to get_dynamic_tag_id() for new tag) * 2) Define struct * 3) Call dump_*_measurement() */ void dump_all_measurements() { dump_private_measurement(client_buffer, VAR_NAME(client_buffer)); dump_private_measurement(video_sent, VAR_NAME(video_sent)); dump_private_measurement(video_acked, VAR_NAME(video_acked)); dump_public_measurement(video_size, VAR_NAME(video_size)); dump_public_measurement(ssim, VAR_NAME(ssim)); } /* Parse lines of influxDB export, for lines measuring * client_buffer, client_sysinfo, video_sent, or video_acked. * Each such line contains one field in an Event, SysInfo, VideoSent, or VideoAcked (respectively) * corresponding to a certain server, channel (unless SysInfo), and timestamp. * Store that field in the appropriate Event, SysInfo, VideoSent, or VideoAcked (which may already * be partially populated by other lines) in client_buffer, client_sysinfo, video_sent, or video_acked * data structures. * Ignore data points out of the date range. */ void parse_stdin() { ios::sync_with_stdio(false); string line_storage; unsigned int line_no = 0; vector<string_view> fields, measurement_tag_set_fields, field_key_value; while (cin.good()) { if (line_no % 1000000 == 0) { const size_t rss = memcheck() / 1024; cerr << "line " << line_no / 1000000 << "M, RSS=" << rss << " MiB\n"; } getline(cin, line_storage); line_no++; const string_view line{line_storage}; if (line.empty() or line.front() == '#') { continue; } if (line.size() > numeric_limits<uint8_t>::max()) { throw runtime_error("Line " + to_string(line_no) + " too long"); } // influxDB export line has 3 space-separated fields // e.g. client_buffer,channel=abc,server_id=1 cum_rebuf=2.183 1546379215825000000 split_on_char(line, ' ', fields); if (fields.size() != 3) { if (not line.compare(0, 15, "CREATE DATABASE"sv)) { continue; } cerr << "Ignoring line with wrong number of fields: " << string(line) << "\n"; continue; } const auto [measurement_tag_set, field_set, timestamp_str] = tie(fields[0], fields[1], fields[2]); // e.g. ["client_buffer,channel=abc,server_id=1", "cum_rebuf=2.183", "1546379215825000000"] // skip out-of-range data points const uint64_t timestamp{to_uint64(timestamp_str)}; if (timestamp < days.first or timestamp > days.second) { n_bad_ts++; continue; } split_on_char(measurement_tag_set, ',', measurement_tag_set_fields); if (measurement_tag_set_fields.empty()) { throw runtime_error("No measurement field on line " + to_string(line_no)); } const auto measurement = measurement_tag_set_fields[0]; // e.g. client_buffer split_on_char(field_set, '=', field_key_value); if (field_key_value.size() != 2) { throw runtime_error("Irregular number of fields in field set: " + string(line)); } const auto [key, value] = tie(field_key_value[0], field_key_value[1]); // e.g. [cum_rebuf, 2.183] try { if ( measurement == "client_buffer"sv ) { /* Set this line's field in the Event/VideoSent/VideoAcked corresponding to this * server, channel, and ts. * If two events share a {timestamp, server_id, channel}, * Event will become contradictory and we'll record it as "bad" later * (bad events do occur during study period, e.g. 2019-07-02) */ const uint64_t server_id = get_server_id(measurement_tag_set_fields); const uint8_t channel_id = get_dynamic_tag_id(client_buffer.at(server_id), measurement_tag_set_fields, "channel"sv); client_buffer[server_id].at(channel_id)[timestamp].insert_unique(key, value, usernames); } else if ( measurement == "active_streams"sv ) { // skip } else if ( measurement == "backlog"sv ) { // skip } else if ( measurement == "channel_status"sv ) { // skip } else if ( measurement == "client_error"sv ) { // skip } else if ( measurement == "client_sysinfo"sv ) { // some records in 2019-09-08T11_2019-09-09T11 have a crazy server_id and // seemingly the older record structure (with user= as part of the tags) optional<uint64_t> server_id; try { server_id.emplace(get_server_id(measurement_tag_set_fields)); } catch (const exception & e) { cerr << "Error with server_id: " << e.what() << "\n"; } // Set this line's field (e.g. browser) in the SysInfo corresponding to this // server and ts if (server_id.has_value()) { client_sysinfo[server_id.value()][timestamp].insert_unique(key, value, usernames, browsers, ostable); } } else if ( measurement == "decoder_info"sv ) { // skip } else if ( measurement == "server_info"sv ) { // skip } else if ( measurement == "ssim"sv ) { const uint8_t format_id = get_dynamic_tag_id(ssim, measurement_tag_set_fields, "format"sv); const uint8_t channel_id = get_dynamic_tag_id(ssim.at(format_id), measurement_tag_set_fields, "channel"sv); ssim.at(format_id).at(channel_id)[timestamp].insert_unique(key, value); } else if ( measurement == "video_acked"sv ) { const uint64_t server_id = get_server_id(measurement_tag_set_fields); const uint8_t channel_id = get_dynamic_tag_id(video_acked.at(server_id), measurement_tag_set_fields, "channel"sv); video_acked[server_id].at(channel_id)[timestamp].insert_unique(key, value, usernames); } else if ( measurement == "video_sent"sv ) { const uint64_t server_id = get_server_id(measurement_tag_set_fields); const uint8_t channel_id = get_dynamic_tag_id(video_sent.at(server_id), measurement_tag_set_fields, "channel"sv); video_sent[server_id].at(channel_id)[timestamp].insert_unique(key, value, usernames, formats); } else if ( measurement == "video_size"sv ) { const uint8_t format_id = get_dynamic_tag_id(video_size, measurement_tag_set_fields, "format"sv); const uint8_t channel_id = get_dynamic_tag_id(video_size.at(format_id), measurement_tag_set_fields, "channel"sv); video_size.at(format_id).at(channel_id)[timestamp].insert_unique(key, value); } else { throw runtime_error( "Can't parse: " + string(line) ); } } catch (const exception & e ) { cerr << "Failure on line: " << line << "\n"; throw; } } } }; // end Parser void influx_to_csv_main(const string & date_str, Day_ns start_ts) { // use date_str to name csv Parser parser{ start_ts, date_str }; parser.parse_stdin(); parser.group_stream_ids(); parser.anonymize_stream_ids(); // parser.check_public_stream_id_uniqueness(); // remove (test only) parser.dump_all_measurements(); // TODO: also dump sysinfo? } void consume_cin() { ios::sync_with_stdio(false); string line_storage; while (cin.good()) { getline(cin, line_storage); } } /* Must take date as argument, to filter out extra data from influx export */ int main(int argc, char *argv[]) { try { if (argc <= 0) { abort(); } if (argc != 2) { cerr << "Usage: " << argv[0] << " date [e.g. 2019-07-01T11_2019-07-02T11]\n"; consume_cin(); return EXIT_FAILURE; } optional<Day_sec> start_ts = str2Day_sec(argv[1]); if (not start_ts) { cerr << "Date argument could not be parsed; format as 2019-07-01T11_2019-07-02T11\n"; consume_cin(); return EXIT_FAILURE; } // convert start_ts to ns for comparison against Influx ts influx_to_csv_main(argv[1], start_ts.value() * NS_PER_SEC); } catch (const exception & e) { cerr << e.what() << "\n"; consume_cin(); return EXIT_FAILURE; } consume_cin(); return EXIT_SUCCESS; } <file_sep>/analyzeutil.hh #ifndef ANALYZEUTIL_HH #define ANALYZEUTIL_HH #include <stdexcept> #include <string> #include <cstdlib> #include <iostream> #include <array> #include <tuple> #include <charconv> #include <cstring> #include <fstream> #include <google/sparse_hash_map> #include <google/dense_hash_map> #include <sys/time.h> #include <sys/resource.h> // #include <boost/fusion/adapted/struct.hpp> // #include <boost/fusion/include/for_each.hpp> using namespace std; using namespace std::literals; using google::sparse_hash_map; using google::dense_hash_map; #define VAR_NAME(var) (#var) // Uniquely and anonymously identifies a stream struct public_stream_id { // Base64-encoded 32-byte cryptographically secure random ID string session_id{}; /* Identifies a stream within a session (unique across streams in a session). * Used to group datapoints belonging to the same stream; not particularly * meaningful otherwise. */ unsigned index{}; }; size_t memcheck() { rusage usage{}; if (getrusage(RUSAGE_SELF, &usage) < 0) { perror("getrusage"); throw std::runtime_error(std::string("getrusage: ") + strerror(errno)); } if (usage.ru_maxrss > 36 * 1024 * 1024) { throw std::runtime_error("memory usage is at " + std::to_string(usage.ru_maxrss) + " KiB"); } return usage.ru_maxrss; } uint64_t to_uint64(string_view str) { uint64_t ret = -1; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { str.remove_prefix(ptr - str.data()); throw runtime_error("could not parse as integer: " + string(str)); } return ret; } float to_float(const string_view str) { /* sadly, g++ 8 doesn't seem to have floating-point C++17 from_chars() yet float ret; const auto [ptr, ignore] = from_chars(str.data(), str.data() + str.size(), ret); if (ptr != str.data() + str.size()) { throw runtime_error("could not parse as float: " + string(str)); } return ret; */ /* apologies for this */ char * const null_byte = const_cast<char *>(str.data() + str.size()); char old_value = *null_byte; *null_byte = 0; const float ret = atof(str.data()); *null_byte = old_value; return ret; } template <typename T> T influx_integer(const string_view str) { if (str.back() != 'i') { throw runtime_error("invalid influx integer: " + string(str)); } const uint64_t ret_64 = to_uint64(str.substr(0, str.size() - 1)); if (ret_64 > numeric_limits<T>::max()) { throw runtime_error("influx integer " + string(str) + " exceeds max value " + to_string(numeric_limits<T>::max())); } return static_cast<T>(ret_64); } class string_table { uint32_t next_id_ = 0; dense_hash_map<string, uint32_t> forward_{}; dense_hash_map<uint32_t, string> reverse_{}; public: string_table() { forward_.set_empty_key({}); reverse_.set_empty_key(-1); } /* Return map[key], inserting if necessary. */ uint32_t forward_map_vivify(const string & key) { auto ref = forward_.find(key); if (ref == forward_.end()) { forward_[key] = next_id_; reverse_[next_id_] = key; next_id_++; ref = forward_.find(key); } return ref->second; } /* Return map.at(key), throwing if not found. */ uint32_t forward_map(const string & key) const { auto ref = forward_.find(key); if (ref == forward_.end()) { throw runtime_error( "key " + key + " not found"); } return ref->second; } const string & reverse_map(const uint32_t id) const { auto ref = reverse_.find(id); if (ref == reverse_.end()) { throw runtime_error( "id " + to_string(id) + " not found"); } return ref->second; } }; struct Event { struct EventType { enum class Type : uint8_t { init, startup, play, timer, rebuffer }; constexpr static array<string_view, 5> names = { "init", "startup", "play", "timer", "rebuffer" }; Type type; operator string_view() const { return names[uint8_t(type)]; } EventType(const string_view sv) : type() { if (sv == "timer"sv) { type = Type::timer; } else if (sv == "play"sv) { type = Type::play; } else if (sv == "rebuffer"sv) { type = Type::rebuffer; } else if (sv == "init"sv) { type = Type::init; } else if (sv == "startup"sv) { type = Type::startup; } else { throw runtime_error( "unknown event type: " + string(sv) ); } } operator uint8_t() const { return static_cast<uint8_t>(type); } bool operator==(const EventType other) const { return type == other.type; } bool operator==(const EventType::Type other) const { return type == other; } bool operator!=(const EventType other) const { return not operator==(other); } bool operator!=(const EventType::Type other) const { return not operator==(other); } }; /* After 11/27, all measurements are recorded with both first_init_id (identifies session) * and init_id (identifies stream). Before 11/27, only init_id is recorded. */ optional<uint32_t> first_init_id{}; // optional optional<uint32_t> init_id{}; // mandatory optional<uint32_t> expt_id{}; optional<uint32_t> user_id{}; optional<EventType> type{}; optional<float> buffer{}; optional<float> cum_rebuf{}; // Comma-separated anonymous keys and values (to be dumped). static string anon_keys() { // In CSV, type is called "event" return "event" + string(",") + VAR_NAME(buffer) + "," + VAR_NAME(cum_rebuf); } string anon_values() const { ostringstream values; values << string_view(type.value()) << "," << buffer.value() << "," << cum_rebuf.value(); return values.str(); } // Makes templatizing easier, and enforces that dump() calls the correct function // Should only be called on complete datapoints string anon_values(const string_table & formats __attribute((unused)) ) const { throw logic_error("Event does not use formats table to retrieve anonymous values"); } bool bad = false; // Event is "complete" and "good" if all mandatory fields are set exactly once bool complete() const { return init_id.has_value() and expt_id.has_value() and user_id.has_value() and type.has_value() and buffer.has_value() and cum_rebuf.has_value(); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory event value " << value << " (old value " << field.value() << ")\n"; cerr << "Contradictory event with old value:\n"; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } /* Set field corresponding to key, if not yet set for this Event. * If field is already set with a different value, Event is "bad" */ void insert_unique(const string_view key, const string_view value, string_table & usernames ) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "event"sv) { set_unique( type, { value.substr(1,value.size()-2) } ); } else if (key == "buffer"sv) { set_unique( buffer, to_float(value) ); } else if (key == "cum_rebuf"sv) { set_unique( cum_rebuf, to_float(value) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const Event& s); }; std::ostream& operator<< (std::ostream& out, const Event& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", type=" << (s.type.has_value() ? int(s.type.value()) : 'x') << ", buffer=" << s.buffer.value_or(-1.0) << ", cum_rebuf=" << s.cum_rebuf.value_or(-1.0) << ", first_init_id=" << s.first_init_id.value_or(-1) << "\n"; } /* XXX: refactor so field names are easier to update BOOST_FUSION_ADAPT_STRUCT(Event, (optional<uint32_t>, first_init_id)(optional<uint32_t>, init_id)(optional<uint32_t>, expt_id)(optional<uint32_t>, user_id)(optional<Event::EventType>, type)(optional<float>, buffer)(optional<float>, cum_rebuf)(optional<string>, channel)) */ struct Sysinfo { optional<uint32_t> browser_id{}; optional<uint32_t> expt_id{}; optional<uint32_t> user_id{}; optional<uint32_t> first_init_id{}; // optional optional<uint32_t> init_id{}; // mandatory optional<uint32_t> os{}; optional<uint32_t> ip{}; bool bad = false; bool complete() const { return browser_id and expt_id and user_id and init_id and os and ip; } bool operator==(const Sysinfo & other) const { return browser_id == other.browser_id and expt_id == other.expt_id and user_id == other.user_id and init_id == other.init_id and os == other.os and ip == other.ip and first_init_id == other.first_init_id; } bool operator!=(const Sysinfo & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory sysinfo value " << value << " (old value " << field.value() << ")\n"; cerr << "Contradictory sysinfo:\n"; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value, string_table & usernames, string_table & browsers, string_table & ostable ) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "browser"sv) { // Insert browser to string => id map; store id set_unique( browser_id, browsers.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "os"sv) { string osname(value.substr(1,value.size()-2)); for (auto & x : osname) { if ( x == ' ' ) { x = '_'; } } set_unique( os, ostable.forward_map_vivify(osname) ); } else if (key == "ip"sv) { set_unique( ip, inet_addr(string(value.substr(1,value.size()-2)).c_str()) ); } else if (key == "screen_width"sv or key == "screen_height"sv) { // ignore } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const Sysinfo& s); }; std::ostream& operator<< (std::ostream& out, const Sysinfo& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", browser_id=" << (s.browser_id.value_or(-1)) << ", os=" << s.os.value_or(-1.0) << ", ip=" << s.ip.value_or(-1.0) << ", first_init_id=" << s.first_init_id.value_or(-1) << "\n"; } struct VideoSent { optional<float> ssim_index{}; optional<uint32_t> delivery_rate{}, expt_id{}, init_id{}, first_init_id{}, user_id{}, size{}, format{}, cwnd{}, in_flight{}, min_rtt{}, rtt{}; optional<uint64_t> video_ts{}; optional<float> buffer{}, cum_rebuf{}; // Comma-separated anonymous keys and values (to be dumped). static string anon_keys() { return VAR_NAME(video_ts) + string(",") + VAR_NAME(format) + "," + VAR_NAME(size) + "," + VAR_NAME(ssim_index) + "," + VAR_NAME(cwnd) + "," + VAR_NAME(in_flight) + "," + VAR_NAME(min_rtt) + "," + VAR_NAME(rtt) + "," + VAR_NAME(delivery_rate) + "," + VAR_NAME(buffer) + "," + VAR_NAME(cum_rebuf); } // Makes templatizing easier, and enforces that dump() calls the correct function string anon_values() const { throw logic_error("VideoSent requires formats table to retrieve anonymous values"); } // Should only be called on complete datapoints string anon_values(const string_table & formats) const { ostringstream values; values << video_ts.value() << "," << formats.reverse_map(format.value()) << "," << size.value() << "," << ssim_index.value() << "," << cwnd.value() << "," << in_flight.value() << "," << min_rtt.value() << "," << rtt.value() << "," << delivery_rate.value() << "," << buffer.value() << "," << cum_rebuf.value(); return values.str(); } bool bad = false; bool complete() const { return ssim_index and delivery_rate and expt_id and init_id and user_id and size and video_ts and cwnd and in_flight and min_rtt and rtt and format and buffer and cum_rebuf; } bool operator==(const VideoSent & other) const { return ssim_index == other.ssim_index and delivery_rate == other.delivery_rate and expt_id == other.expt_id and init_id == other.init_id and user_id == other.user_id and size == other.size and first_init_id == other.first_init_id and video_ts == other.video_ts and cwnd == other.cwnd and in_flight == other.in_flight and min_rtt == other.min_rtt and rtt == other.rtt and format == other.format and buffer == other.buffer and cum_rebuf == other.cum_rebuf; } bool operator!=(const VideoSent & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory VideoSent value " << value << "(old value " << field.value() << ")\n"; cerr << "Contradictory VideoSent:\n"; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value, string_table & usernames, string_table & formats) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "ssim_index"sv) { set_unique( ssim_index, to_float(value) ); } else if (key == "delivery_rate"sv) { set_unique( delivery_rate, influx_integer<uint32_t>( value ) ); } else if (key == "size"sv) { set_unique( size, influx_integer<uint32_t>( value ) ); } else if (key == "video_ts"sv) { set_unique( video_ts, influx_integer<uint64_t>( value ) ); } else if (key == "cwnd"sv) { set_unique( cwnd, influx_integer<uint32_t>( value ) ); } else if (key == "in_flight"sv) { set_unique( in_flight, influx_integer<uint32_t>( value ) ); } else if (key == "min_rtt"sv) { set_unique( min_rtt, influx_integer<uint32_t>( value ) ); } else if (key == "rtt"sv) { set_unique( rtt, influx_integer<uint32_t>( value ) ); } else if (key == "format"sv) { set_unique( format, formats.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "buffer"sv) { set_unique( buffer, to_float(value) ); } else if (key == "cum_rebuffer"sv) { set_unique( cum_rebuf, to_float(value) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const VideoSent& s); }; std::ostream& operator<< (std::ostream& out, const VideoSent& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", ssim_index=" << s.ssim_index.value_or(-1) << ", delivery_rate=" << s.delivery_rate.value_or(-1) << ", size=" << s.size.value_or(-1) << ", first_init_id=" << s.first_init_id.value_or(-1) << ", video_ts=" << s.video_ts.value_or(-1) << ", cwnd=" << s.cwnd.value_or(-1) << ", in_flight=" << s.in_flight.value_or(-1) << ", min_rtt=" << s.min_rtt.value_or(-1) << ", rtt=" << s.rtt.value_or(-1) << ", format=" << s.format.value_or(-1) << ", buffer=" << s.buffer.value_or(-1) << ", cum_rebuf=" << s.cum_rebuf.value_or(-1) << "\n"; } struct VideoAcked { optional<uint32_t> expt_id{}, init_id{}, first_init_id{}, user_id{}; optional<uint64_t> video_ts{}; optional<float> buffer{}, cum_rebuf{}; // Comma-separated anonymous keys and values (to be dumped) static string anon_keys() { return VAR_NAME(video_ts) + string(",") + VAR_NAME(buffer) + "," + VAR_NAME(cum_rebuf); } // Should only be called on complete datapoints string anon_values() const { ostringstream values; values << video_ts.value() << "," << buffer.value() << "," << cum_rebuf.value(); return values.str(); } // Makes templatizing easier, and enforces that dump() calls the correct function string anon_values(const string_table & formats __attribute((unused)) ) const { throw logic_error("VideoAcked does not use formats table to retrieve anonymous values"); } bool bad = false; bool complete() const { return expt_id and init_id and user_id and video_ts and buffer and cum_rebuf; } bool operator==(const VideoAcked & other) const { return expt_id == other.expt_id and init_id == other.init_id and user_id == other.user_id and first_init_id == other.first_init_id and video_ts == other.video_ts and buffer == other.buffer and cum_rebuf == other.cum_rebuf; } bool operator!=(const VideoAcked & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory videoacked value " << value << "(old value " << field.value() << ")\n"; cerr << "Contradictory videoacked:\n"; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value, string_table & usernames) { if (key == "first_init_id"sv) { set_unique( first_init_id, influx_integer<uint32_t>( value ) ); } else if (key == "init_id"sv) { set_unique( init_id, influx_integer<uint32_t>( value ) ); } else if (key == "expt_id"sv) { set_unique( expt_id, influx_integer<uint32_t>( value ) ); } else if (key == "user"sv) { if (value.size() <= 2 or value.front() != '"' or value.back() != '"') { throw runtime_error("invalid username string: " + string(value)); } set_unique( user_id, usernames.forward_map_vivify(string(value.substr(1,value.size()-2))) ); } else if (key == "video_ts"sv) { set_unique( video_ts, influx_integer<uint64_t>( value ) ); } else if (key == "ssim_index"sv) { // ignore (already recorded in corresponding video_sent) } else if (key == "buffer"sv) { set_unique( buffer, to_float(value) ); } else if (key == "cum_rebuffer"sv) { set_unique( cum_rebuf, to_float(value) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const VideoAcked& s); }; std::ostream& operator<< (std::ostream& out, const VideoAcked& s) { return out << "init_id=" << s.init_id.value_or(-1) << ", expt_id=" << s.expt_id.value_or(-1) << ", user_id=" << s.user_id.value_or(-1) << ", first_init_id=" << s.first_init_id.value_or(-1) << ", video_ts=" << s.video_ts.value_or(-1) << ", buffer=" << s.buffer.value_or(-1) << ", cum_rebuf=" << s.cum_rebuf.value_or(-1) << "\n"; } struct VideoSize { optional<uint64_t> video_ts{}; optional<uint32_t> size{}; // Comma-separated anonymous keys and values (to be dumped) static string anon_keys() { return VAR_NAME(video_ts) + string(",") + VAR_NAME(size); } // Should only be called on complete datapoints string anon_values() const { ostringstream values; values << video_ts.value() << "," << size.value(); return values.str(); } // Makes templatizing easier, and enforces that dump() calls the correct function string anon_values(const string_table & formats __attribute((unused)) ) const { throw logic_error("VideoSize does not use formats table to retrieve anonymous values"); } bool bad = false; bool complete() const { return video_ts and size; } bool operator==(const VideoSize & other) const { return video_ts == other.video_ts and size == other.size; } bool operator!=(const VideoSize & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory VideoSent value " << value << "(old value " << field.value() << ")\n"; cerr << "Contradictory VideoSent:\n"; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value) { /* For video_size and ssim measurements, presentation ts is called "timestamp" * (not "video_ts" as in video_sent) */ if (key == "timestamp"sv) { set_unique( video_ts, influx_integer<uint64_t>( value ) ); } else if (key == "size"sv) { set_unique( size, influx_integer<uint32_t>( value ) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const VideoSize& s); }; std::ostream& operator<< (std::ostream& out, const VideoSize& s) { return out << "video_ts=" << s.video_ts.value_or(-1) << ", size=" << s.size.value_or(-1) << "\n"; } struct SSIM { optional<uint64_t> video_ts{}; optional<float> ssim_index{}; // Comma-separated anonymous keys and values (to be dumped) static string anon_keys() { return VAR_NAME(video_ts) + string(",") + VAR_NAME(ssim_index); } // Should only be called on complete datapoints string anon_values() const { ostringstream values; values << video_ts.value() << "," << ssim_index.value(); return values.str(); } // Makes templatizing easier, and enforces that dump() calls the correct function string anon_values(const string_table & formats __attribute((unused)) ) const { throw logic_error("SSIM does not use formats table to retrieve anonymous values"); } bool bad = false; bool complete() const { return video_ts and ssim_index; } bool operator==(const SSIM & other) const { return video_ts == other.video_ts and ssim_index == other.ssim_index; } bool operator!=(const SSIM & other) const { return not operator==(other); } template <typename T> void set_unique( optional<T> & field, const T & value ) { if (not field.has_value()) { field.emplace(value); } else { if (field.value() != value) { if (not bad) { bad = true; cerr << "error trying to set contradictory SSIM value " << value << "(old value " << field.value() << ")\n"; cerr << "Contradictory SSIM:\n"; cerr << *this; } // throw runtime_error( "contradictory values: " + to_string(field.value()) + " vs. " + to_string(value) ); } } } void insert_unique(const string_view key, const string_view value) { /* For video_size and ssim measurements, presentation ts is called "timestamp" * (not "video_ts" as in video_sent) */ if (key == "timestamp"sv) { set_unique( video_ts, influx_integer<uint64_t>( value ) ); } else if (key == "ssim_index"sv) { set_unique( ssim_index, to_float(value) ); } else { throw runtime_error( "unknown key: " + string(key) ); } } friend std::ostream& operator<<(std::ostream& out, const SSIM& s); }; std::ostream& operator<< (std::ostream& out, const SSIM& s) { return out << "video_ts=" << s.video_ts.value_or(-1) << ", ssim_index=" << s.ssim_index.value_or(-1) << "\n"; } // print a tuple of any ssim_index, promoting uint8_t template<class Tuple, std::size_t N> struct TuplePrinter { static void print(const Tuple& t) { TuplePrinter<Tuple, N-1>::print(t); std::cerr << ", " << +std::get<N-1>(t); } }; template<class Tuple> struct TuplePrinter<Tuple, 1> { static void print(const Tuple& t) { std::cerr << +std::get<0>(t); } }; template<class... Args> void print(const std::tuple<Args...>& t) { std::cerr << "("; TuplePrinter<decltype(t), sizeof...(Args)>::print(t); std::cerr << ")\n"; } #endif <file_sep>/scripts/list_period_dates.sh #!/bin/bash -ue # Output all stream statistics dates corresponding to a time period # (in decreasing order, starting with <date>). # Date format e.g. 2019-07-01T11_2019-07-02T11 USAGE="./list_period_dates.sh <date> <ndays>, where period is <ndays>, ending on and including <date>" if [ "$#" -ne 2 ]; then echo $USAGE return 1 fi readonly period_end_date=$1 readonly ndays=$2 # First day in desired date; e.g. 2019-07-01 for 2019-07-01T11_2019-07-02T11 readonly period_end_date_prefix=${period_end_date:0:10} for ((i = 0; i < $ndays; i++)); do period_day_prefix=$(date -I -d "$period_end_date_prefix - $i days") period_day_postfix=$(date -I -d "$period_day_prefix + 1 day") # use echo to return result, so this script should not echo anything else echo ${period_day_prefix}T11_${period_day_postfix}T11 done <file_sep>/confintutil.hh /* Utilities useful for confintervals and associated metadata */ #ifndef CONFINTUTIL_HH #define CONFINTUTIL_HH // Number of statistics fields output per stream constexpr static unsigned int N_STREAM_STATS = 14; // Max length of stream statistics line constexpr static unsigned int MAX_LINE_LEN = 500; // min and max acceptable watch time bin indices (inclusive) constexpr static unsigned int MIN_BIN = 2; constexpr static unsigned int MAX_BIN = 20; // Maximum number of bins (i.e. number of elements in each array used to // represent bins) constexpr static unsigned int MAX_N_BINS = 32; static_assert(MAX_BIN < MAX_N_BINS); bool stream_is_slow(double delivery_rate) { return delivery_rate <= (6000000.0/8.0); } #endif <file_sep>/scripts/post_analyze.sh #!/bin/bash # Run pre_confinterval and confinterval in provided directory containing analyze output; exit if dir does not exist set -e if [ "$#" -lt 1 ]; then usage="Provide name of directory containing analyze output" echo $usage exit 1 fi pushd $1 if [ ! -d $1 ]; then echo "Provided directory does not exist" exit 1 fi pushd $1 results_dir="results" mkdir $results_dir cd $results_dir # Output of pre_confinterval --build-schemedays-list, input of pre_confinterval --intersect scheme_days_out="scheme_days_out.txt" # Readable summary of days each scheme has run scheme_days_err="scheme_days_err.txt" # Output of pre_confinterval --build-watchtimes-list, input of confinterval watch_times_out="watch_times_out.txt" watch_times_err="watch_times_err.txt" # build scheme days list cat ../*public_analyze_stats.txt | ~/puffer-statistics/pre_confinterval $scheme_days_out --build-schemedays-list 2> $scheme_days_err echo "finished pre_confinterval --build-schemedays-list" # build watch times lists cat ../*public_analyze_stats.txt | ~/puffer-statistics/pre_confinterval $watch_times_out --build-watchtimes-list 2> $watch_times_err echo "finished pre_confinterval --build-watchtimes-list" expts=("primary" "vintages" "current") for expt in ${expts[@]}; do intx_out="${expt}_intx_out.txt" intx_err="${expt}_intx_err.txt" schemes=$expt if [ $expt = "current" ]; then schemes="pensieve/bbr,pensieve_in_situ/bbr,puffer_ttp_cl/bbr,linear_bba/bbr" fi if [ $expt = "emu" ]; then schemes="puffer_ttp_emu/bbr,mpc/bbr,robust_mpc/bbr,linear_bba/bbr,puffer_ttp_cl/bbr,pensieve/bbr" fi if [ $expt = "mle" ]; then schemes="puffer_ttp_cl_mle/bbr,puffer_ttp_cl/bbr" fi if [ $expt = "linear" ]; then schemes="puffer_ttp_linear/bbr,puffer_ttp_cl/bbr" fi # get intersection using scheme days list ~/puffer-statistics/pre_confinterval $scheme_days_out --intersect-schemes $schemes --intersect-out $intx_out 2> $intx_err echo "finished pre_confinterval --intersect" # run confint using intersection; save output speeds=("all" "slow") for speed in ${speeds[@]}; do echo $expt echo $speed confint_out="${expt}_${speed}_confint_out.txt" confint_err="${expt}_${speed}_confint_err.txt" plot="${expt}_${speed}_plot.svg" d2g="${expt}_${speed}_data-to-gnuplot" cat ../*public_analyze_stats.txt | ~/puffer-statistics/confinterval --scheme-intersection $intx_out \ --stream-speed $speed --watch-times $watch_times_out > $confint_out 2> $confint_err echo "finished confinterval" # Useful if there's a version of d2g for each expt/speed cat $confint_out | ~/puffer-statistics/plots/${d2g} | gnuplot > $plot done done popd
32822c92caddca6b5e7410d848c8766dea3a711e
[ "Markdown", "Makefile", "M4Sugar", "Python", "C++", "Shell" ]
30
Shell
StanfordSNR/puffer-statistics
c389402fea75173abf140ada4f568e017cf07e18
6c49c90a3f6365a74304a6cca488ffc001f6a2d2