content stringlengths 5 1.04M | avg_line_length float64 1.75 12.9k | max_line_length int64 2 244k | alphanum_fraction float64 0 0.98 | licenses list | repository_name stringlengths 7 92 | path stringlengths 3 249 | size int64 5 1.04M | lang stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|
/*
* Copyright 2010-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.S3.Model.Internal.MarshallTransformations
{
/// <summary>
/// Get Bucket Logging Request Marshaller
/// </summary>
public class GetBucketLoggingRequestMarshaller : IMarshaller<IRequest, GetBucketLoggingRequest> ,IMarshaller<IRequest,Amazon.Runtime.AmazonWebServiceRequest>
{
public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input)
{
return this.Marshall((GetBucketLoggingRequest)input);
}
public IRequest Marshall(GetBucketLoggingRequest getBucketLoggingRequest)
{
IRequest request = new DefaultRequest(getBucketLoggingRequest, "AmazonS3");
request.Suppress404Exceptions = true;
request.HttpMethod = "GET";
request.ResourcePath = string.Concat("/", S3Transforms.ToStringValue(getBucketLoggingRequest.BucketName));
request.AddSubResource("logging");
request.UseQueryString = true;
return request;
}
}
}
| 35.617021 | 161 | 0.703704 | [
"Apache-2.0"
] | amazon-archives/aws-sdk-xamarin | AWS.XamarinSDK/AWSSDK_Android/Amazon.S3/Model/Internal/MarshallTransformations/GetBucketLoggingRequestMarshaller.cs | 1,674 | C# |
using UnityEngine;
using DanielOaks.RS;
public class RSManagerVerticalSlice : RSManager
{
public string MapName = "test";
public override void InitFacts() {
this.Facts.Set("map", this.MapName);
}
}
| 18.333333 | 47 | 0.686364 | [
"CC0-1.0"
] | DanielOaks/UnityResponseSystem | examples/RSManagerVerticalSlice.cs | 220 | C# |
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;
namespace ClProductImport
{
public class DataBaseCommand
{
//建立数据库连接
public static SqlConnection GetSqlconnection()
{
string value = ConfigUtility.GetConnString("conn");
SqlConnection conn = new SqlConnection(value);
conn.Open();
return conn;
}
/// <summary>
/// 保存产品信息
/// </summary>
/// <param name="model"></param>
/// <param name="conn"></param>
/// <param name="transaction"></param>
/// <returns></returns>
public static int SaveProduct(cl_Product model, SqlConnection conn, SqlTransaction transaction = null)
{
string sql = @"INSERT INTO [dbo].[cl_Product]
([ProductGUID]
,[ProductCode]
,[ProductName]
,[ProductSpec]
,[Unit]
,[Price]
,[PictureName]
,[Remarks]
,[BelongBUNameList]
,[ProductCodeFormat]
,[IsStrategy]
,[CreatedBy]
,[CreatedByGUID]
,[CreateTime]
,[LastMender]
,[LastMenderDate]
,[LastMenderGUID]
,[ProductTypeCode]
,[PutInStorageByGUID]
,[PutInStorageState]
,[QuotaAttributeNameList]
,[Source])
VALUES
(@ProductGUID
,@ProductCode
,@ProductName
,@ProductSpec
,@Unit
,@Price
,@PictureName
,@Remarks
,@BelongBUNameList
,@ProductCodeFormat
,@IsStrategy
,@CreatedBy
,@CreatedByGUID
,@CreateTime
,@LastMender
,@LastMenderDate
,@LastMenderGUID
,@ProductTypeCode
,@PutInStorageByGUID
,@PutInStorageState
,@QuotaAttributeNameList
,@Source)";
return conn.Execute(sql, model, transaction);
}
/// <summary>
/// 保存产品扩展信息
/// </summary>
/// <param name="model"></param>
/// <param name="conn"></param>
/// <param name="transaction"></param>
/// <returns></returns>
public static int SaveProductExt(cl_Product_Ext model, SqlConnection conn, SqlTransaction transaction = null)
{
string sql = @"INSERT INTO [dbo].[cl_Product_Ext]
([ID]
,[ProductGUID]
,[brandName]
,[Specifications]
,[ProductModel]
,[YBFHQ]
,[DHHQ])
VALUES
(@ID
,@ProductGUID
,@brandName
,@Specifications
,@ProductModel
,@YBFHQ
,@DHHQ)";
return conn.Execute(sql, model, transaction);
}
/// <summary>
/// 保存枚举指标属性值
/// </summary>
/// <param name="list"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static int SaveProduct2QuotaAttribute(List<p_Product2QuotaAttribute> list, SqlConnection conn, SqlTransaction transaction = null)
{
string sql = @"INSERT INTO [dbo].[p_Product2QuotaAttribute]
([Product2QuotaAttributeGUID]
,[ProductGUID]
,[ProductTypeQuotaGUID]
,[ProductTypeQuotaAttributeGUID])
VALUES
(@Product2QuotaAttributeGUID
,@ProductGUID
,@ProductTypeQuotaGUID
,@ProductTypeQuotaAttributeGUID)";
return conn.Execute(sql, list, transaction);
}
/// <summary>
/// 保存文本的指标属性值
/// </summary>
/// <param name="list"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static int SavaProductAttributeValue(List<p_ProductAttributeValue> list, SqlConnection conn, SqlTransaction transaction = null)
{
string sql = @"INSERT INTO [dbo].[p_ProductAttributeValue]
([ProductTypeQuotaAttributeExtGUID]
,[ProductGUID]
,[ProductTypeQuotaGUID]
,[ControlType]
,[QuotaAttributeValue])
VALUES
(@ProductTypeQuotaAttributeExtGUID
,@ProductGUID
,@ProductTypeQuotaGUID
,@ControlType
,@QuotaAttributeValue)";
return conn.Execute(sql, list, transaction);
}
/// <summary>
/// 产品在数据库中是否存在
/// </summary>
/// <param name="productCode"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static Guid HasProduct(string productCode, SqlConnection conn)
{
string sql = "SELECT ProductGUID FROM dbo.cl_Product WHERE ProductCode=@ProductCode";
return conn.ExecuteScalar<Guid>(sql, new { ProductCode = productCode });
}
/// <summary>
/// 根据分类名称获取分类的code
/// </summary>
/// <param name="typeName"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static ProductType GetProductTypeCode(string typeName, SqlConnection conn)
{
string sql = "SELECT ProductTypeGUID,ProductTypeCode FROM dbo.p_ProductType WHERE ProductTypeShortName = @TypeName";
return conn.QueryFirstOrDefault<ProductType>(sql, new { TypeName = typeName });
}
/// <summary>
/// 获取指标属性相关信息
/// </summary>
/// <param name="indexName"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static ProductIndex GetProductIndexEntity(string indexName, Guid refGUID, SqlConnection conn)
{
string sql = "SELECT ProductIndexGUID,ProductIndexCode,ControlType FROM p_ProductIndex WHERE RefGUID=@RefGUID AND ProductIndexShortName=@IndexName";
return conn.QueryFirstOrDefault<ProductIndex>(sql, new { IndexName = indexName, RefGUID = refGUID });
}
/// <summary>
/// 根据属性值名称获取属性值的guid
/// </summary>
/// <param name="attributeValue"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static string GetAttributeGUID(string attributeValue, Guid productTypeQuotaGUID, SqlConnection conn)
{
string sql = "SELECT ProductTypeQuotaAttributeGUID FROM p_ProductTypeQuotaAttribute WHERE ProductTypeQuotaGUID=@ProductTypeQuotaGUID AND QuotaAttributeValue=@AttributeValue";
return conn.QueryFirstOrDefault<Guid>(sql, new { AttributeValue = attributeValue, ProductTypeQuotaGUID = productTypeQuotaGUID }).ToString();
}
public static bool HasUnit(string unit, SqlConnection conn)
{
string sql = "SELECT 1 FROM dbo.cl_Product_Unit WHERE Name=@Name";
return conn.ExecuteScalar<string>(sql, new { Name = unit })?.Equals("1") ?? false;
}
public static bool UpdateCodeFormatInfo(string typeCode, Guid productGuid, SqlConnection conn, SqlTransaction sqlTransaction = null)
{
string[] info = typeCode.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries);
if (info == null || info.Length != 4)
{
throw new Exception("产品编码不标准");
}
string[] parameter = new string[3] { info[0], info[1], info[2] };
string parameterCode = String.Join(".", parameter);
string hasCodeInfo = @"SELECT 1 FROM cl_CodeFormatInfo WHERE Parameter=@Parameter";
if (conn.ExecuteScalar<string>(hasCodeInfo, new { Parameter = parameterCode }, sqlTransaction)?.Equals("1") ?? false)//判断该分类的游标记录是否存在
{
string sql = @"UPDATE dbo.cl_CodeFormatInfo
SET FullCode = @FullCode ,
SuffixCode = @SuffixCode,
SourceID = @SourceID
WHERE Parameter = @Parameter AND SuffixCode < @SuffixCode";
return conn.Execute(sql, new { SourceID = productGuid, FullCode = typeCode, SuffixCode = info[3], Parameter = parameterCode }, sqlTransaction) > 0;
}
else
{
string sql = @"INSERT INTO dbo.cl_CodeFormatInfo
( ID ,
SourceID ,
CodeType ,
FullCode ,
Parameter ,
SuffixCode
)
VALUES ( @ID,
@SourceID,
'产品编码',
@FullCode,
@Parameter,
@SuffixCode
)";
return conn.Execute(sql, new { ID = Guid.NewGuid(), SourceID = productGuid, FullCode = typeCode, SuffixCode = info[3], Parameter = parameterCode }, sqlTransaction) > 0;
}
}
/// <summary>
/// 获取产品指标属性的值是不是空的
/// </summary>
/// <param name="productGuid">产品guid</param>
/// <returns></returns>
public static string HasProductQuotaAttribute(Guid productGuid, Guid productTypeQuotaGUID, SqlConnection conn)
{
string sql = @"SELECT ISNULL(pq.QuotaAttributeValue,'!!!!!!!!')
FROM p_Product2QuotaAttribute p2q
LEFT JOIN p_ProductTypeQuotaAttribute pq ON pq.ProductTypeQuotaAttributeGUID = p2q.ProductTypeQuotaAttributeGUID
WHERE p2q.ProductGUID = @ProductGUID AND p2q.ProductTypeQuotaGUID=@ProductTypeQuotaGUID";
return conn.ExecuteScalar<string>(sql, new { ProductGUID = productGuid, ProductTypeQuotaGUID = productTypeQuotaGUID });
}
/// <summary>
///
/// </summary>
/// <param name="productGuid"></param>
/// <param name="productTypeQuotaGUID"></param>
/// <param name="productIndexShortName"></param>
/// <param name="conn"></param>
/// <returns></returns>
public static string ProductHasAttributeWenBen(Guid productGuid, Guid productTypeQuotaGUID, SqlConnection conn)
{
string sql = @"SELECT ppv.QuotaAttributeValue
FROM p_Product2QuotaAttribute p2q
INNER JOIN p_ProductIndex pindex ON p2q.ProductTypeQuotaGUID = pindex.ProductIndexGUID
LEFT JOIN p_ProductAttributeValue ppv ON p2q.ProductGUID = ppv.ProductGUID
AND ppv.ProductTypeQuotaGUID = p2q.ProductTypeQuotaGUID
WHERE pindex.ControlType = '文本' AND p2q.ProductGUID=@ProductGUID
AND pindex.ProductIndexGUID =@ProductIndexGUID";
return conn.ExecuteScalar<string>(sql, new { ProductGUID = productGuid, ProductIndexShortName = productTypeQuotaGUID,
ProductIndexGUID = productTypeQuotaGUID });
}
public static int UpdateProductAttributeWenBen(Guid productGuid, Guid productTypeQuotaGUID, string value,SqlConnection conn)
{
string sql = @"UPDATE p_ProductAttributeValue
SET QuotaAttributeValue=@QuotaAttributeValue
WHERE ProductGUID=@ProductGUID AND ProductTypeQuotaGUID=@ProductIndexGUID";
return conn.Execute(sql, new { ProductGUID = productGuid, ProductIndexShortName = productTypeQuotaGUID,
ProductIndexGUID = productTypeQuotaGUID,
QuotaAttributeValue =value});
}
/// <summary>
/// 重新挂关系
/// </summary>
/// <param name="productGuid">产品guid</param>
/// <param name="attributeValue">属性值</param>
/// <param name="conn"></param>
/// <param name="sqlTransaction"></param>
/// <returns></returns>
public static int UpdateQuotaAttribute2Product(Guid productGuid, string attributeValue, SqlConnection conn)
{
string sql = @" UPDATE p_Product2QuotaAttribute
SET ProductTypeQuotaAttributeGUID = pq.ProductTypeQuotaAttributeGUID
FROM p_Product2QuotaAttribute p2q
INNER JOIN p_ProductTypeQuotaAttribute pq ON p2q.ProductTypeQuotaGUID = pq.ProductTypeQuotaGUID
WHERE p2q.ProductGUID = @ProductGUID
AND pq.QuotaAttributeValue = @QuotaAttributeValue";
return conn.Execute(sql, new { ProductGUID = productGuid, QuotaAttributeValue = attributeValue });
}
}
}
| 50.266026 | 186 | 0.458968 | [
"MIT"
] | AlbertAY/ProductImport | src/MeiDiImport/DataBaseCommand.cs | 15,963 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Azure.AI.TextAnalytics.Models;
namespace Azure.AI.TextAnalytics
{
/// <summary>
/// A word or phrase identified as a Personally Identifiable Information
/// that can be categorized as known type in a given taxonomy.
/// The set of categories recognized by the Language service is described at
/// <see href="https://aka.ms/tanerpii"/>.
/// </summary>
public readonly struct PiiEntity
{
internal PiiEntity(Entity entity)
: this(entity.Text, entity.Category, entity.Subcategory, entity.ConfidenceScore, entity.Offset, entity.Length)
{
}
internal PiiEntity(string text, string category, string subcategory, double confidenceScore, int offset, int length)
{
Text = text;
Category = category;
SubCategory = subcategory;
ConfidenceScore = confidenceScore;
Offset = offset;
Length = length;
}
/// <summary>
/// Gets the entity text as it appears in the input document.
/// </summary>
public string Text { get; }
/// <summary>
/// Gets the PII entity category inferred by the Text Analytics service's
/// named entity recognition model, such as Financial Account
/// Identification/Social Security Number/Phone Number, etc.
/// The list of available categories is described at
/// <see href="https://aka.ms/tanerpii"/>.
/// </summary>
public PiiEntityCategory Category { get; }
/// <summary>
/// Gets the subcategory of the entity inferred by the Language service's
/// named entity recognition model. This property may not have a value if
/// a subcategory doesn't exist for this entity. The list of available categories and
/// subcategories is described at <see href="https://aka.ms/tanerpii"/>.
/// </summary>
public string SubCategory { get; }
/// <summary>
/// Gets a score between 0 and 1, indicating the confidence that the
/// text substring matches this inferred entity.
/// </summary>
public double ConfidenceScore { get; }
/// <summary>
/// Gets the starting position for the matching text in the input document.
/// </summary>
public int Offset { get; }
/// <summary>
/// Gets the length of the matching text in the input document.
/// </summary>
public int Length { get; }
}
}
| 37.442857 | 124 | 0.614269 | [
"MIT"
] | damodaravadhani/azure-sdk-for-net | sdk/textanalytics/Azure.AI.TextAnalytics/src/PiiEntity.cs | 2,623 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Sterling.Core.Exceptions;
using Sterling.Core.Serialization;
namespace Sterling.Core.Database
{
/// <summary>
/// The sterling database manager
/// </summary>
internal class SterlingDatabase : ISterlingDatabase
{
private static bool _activated;
/// <summary>
/// Master list of databases
/// </summary>
private readonly Dictionary<string,Tuple<Type,ISterlingDatabaseInstance>> _databases = new Dictionary<string,Tuple<Type,ISterlingDatabaseInstance>>();
/// <summary>
/// The main serializer
/// </summary>
private ISterlingSerializer _serializer = new AggregateSerializer();
/// <summary>
/// Logger
/// </summary>
private readonly LogManager _logManager;
internal SterlingDatabase(LogManager logger)
{
_logManager = logger;
}
/// <summary>
/// Registers a logger (multiple loggers may be registered)
/// </summary>
/// <param name="log">The call for logging</param>
/// <returns>A unique identifier for the logger</returns>
public Guid RegisterLogger(Action<SterlingLogLevel, string, Exception> log)
{
return _logManager.RegisterLogger(log);
}
/// <summary>
/// Unhooks a logging mechanism
/// </summary>
/// <param name="guid">The guid</param>
public void UnhookLogger(Guid guid)
{
_logManager.UnhookLogger(guid);
}
/// <summary>
/// Log a message
/// </summary>
/// <param name="level">The level</param>
/// <param name="message">The message data</param>
/// <param name="exception">The exception</param>
public void Log(SterlingLogLevel level, string message, Exception exception)
{
_logManager.Log(level, message, exception);
}
private static readonly Guid _databaseVersion = new Guid("da202921-e258-4de5-b9d7-5b71ac83ff72");
/// <summary>
/// Back up the database
/// </summary>
/// <typeparam name="T">The database type</typeparam>
/// <param name="writer">A writer to receive the backup</param>
public void Backup<T>(BinaryWriter writer) where T : BaseDatabaseInstance
{
_RequiresActivation();
var databaseQuery = from d in _databases where d.Value.Item1.Equals(typeof (T)) select d.Value.Item2;
if (!databaseQuery.Any())
{
throw new SterlingDatabaseNotFoundException(typeof(T).FullName);
}
var database = databaseQuery.First();
database.Flush();
// first write the version
_serializer.Serialize(_databaseVersion, writer);
var typeMaster = database.Driver.GetTypes();
// now the type master
writer.Write(typeMaster.Count);
foreach(var type in typeMaster)
{
writer.Write(type);
}
// now iterate tables
foreach(var table in ((BaseDatabaseInstance)database).TableDefinitions)
{
// get the key list
var keys = database.Driver.DeserializeKeys(table.Key, table.Value.KeyType,
table.Value.GetNewDictionary());
// reality check
if (keys == null)
{
writer.Write(0);
}
else
{
// write the count for the keys
writer.Write(keys.Count);
// for each key, serialize it out along with the object - indexes can be rebuilt on the flipside
foreach (var key in keys.Keys)
{
_serializer.Serialize(key, writer);
writer.Write((int) keys[key]);
// get the instance
using (var instance = database.Driver.Load(table.Key, (int) keys[key]))
{
var bytes = instance.ReadBytes((int) instance.BaseStream.Length);
writer.Write(bytes.Length);
writer.Write(bytes);
}
}
}
}
}
/// <summary>
/// Restore the database
/// </summary>
/// <typeparam name="T">Type of the database</typeparam>
/// <param name="reader">The reader with the backup information</param>
public void Restore<T>(BinaryReader reader) where T : BaseDatabaseInstance
{
_RequiresActivation();
var databaseQuery = from d in _databases where d.Value.Item1.Equals(typeof (T)) select d.Value.Item2;
if (!databaseQuery.Any())
{
throw new SterlingDatabaseNotFoundException(typeof (T).FullName);
}
var database = databaseQuery.First();
database.Purge();
// read the version
var version = _serializer.Deserialize<Guid>(reader);
if (!version.Equals(_databaseVersion))
{
throw new SterlingException(string.Format("Unexpected database version."));
}
var typeMaster = new List<string>();
var count = reader.ReadInt32();
for (var x = 0; x < count; x++)
{
typeMaster.Add(reader.ReadString());
}
database.Driver.DeserializeTypes(typeMaster);
foreach (var table in ((BaseDatabaseInstance) database).TableDefinitions)
{
// make the dictionary
var keyDictionary = table.Value.GetNewDictionary();
if (keyDictionary == null)
{
throw new SterlingException(string.Format("Unable to make dictionary for key type {0}",
table.Value.KeyType));
}
var keyCount = reader.ReadInt32();
for (var record = 0; record < keyCount; record++)
{
var key = _serializer.Deserialize(table.Value.KeyType, reader);
var keyIndex = reader.ReadInt32();
keyDictionary.Add(key, keyIndex);
var size = reader.ReadInt32();
var bytes = reader.ReadBytes(size);
database.Driver.Save(table.Key, keyIndex, bytes);
}
database.Driver.SerializeKeys(table.Key, table.Value.KeyType, keyDictionary);
// now refresh the table
table.Value.Refresh();
// now generate the indexes
if (table.Value.Indexes.Count <= 0) continue;
var table1 = table;
foreach (var instance in from object key in keyDictionary.Keys select Tuple.Create(key, database.Load(table1.Key, key)))
{
foreach(var index in table.Value.Indexes)
{
index.Value.AddIndex(instance.Item2, instance.Item1);
}
}
foreach (var index in table.Value.Indexes)
{
index.Value.Flush();
}
}
}
public ISterlingDatabaseInstance RegisterDatabase<T>() where T : BaseDatabaseInstance
{
return RegisterDatabase<T>(null);
}
/// <summary>
/// Register a database type with the system
/// </summary>
/// <typeparam name="T">The type of the database to register</typeparam>
/// <typeparam name="TDriver">Register with a driver</typeparam>
public ISterlingDatabaseInstance RegisterDatabase<T, TDriver>() where T : BaseDatabaseInstance where TDriver : ISterlingDriver
{
var driver = (TDriver) Activator.CreateInstance(typeof (TDriver));
return RegisterDatabase<T>(driver);
}
/// <summary>
/// Register a database type with the system
/// </summary>
/// <typeparam name="T">The type of the database to register</typeparam>
/// <typeparam name="TDriver">Register with a driver</typeparam>
public ISterlingDatabaseInstance RegisterDatabase<T, TDriver>(TDriver driver)
where T : BaseDatabaseInstance
where TDriver : ISterlingDriver
{
return RegisterDatabase<T>(driver);
}
/// <summary>
/// Register a database type with the system
/// </summary>
/// <typeparam name="T">The type of the database to register</typeparam>
public ISterlingDatabaseInstance RegisterDatabase<T>(ISterlingDriver driver) where T : BaseDatabaseInstance
{
_RequiresActivation();
_logManager.Log(SterlingLogLevel.Information,
string.Format("Sterling is registering database {0}", typeof(T)),
null);
if ((from d in _databases where d.Value.Item1.Equals(typeof(T)) select d).Count() > 0)
{
throw new SterlingDuplicateDatabaseException(typeof(T));
}
var database = (ISterlingDatabaseInstance)Activator.CreateInstance(typeof (T));
if (driver == null)
{
driver = new MemoryDriver(database.Name, _serializer, _logManager.Log);
}
else
{
driver.DatabaseName = database.Name;
driver.DatabaseSerializer = _serializer;
driver.Log = _logManager.Log;
}
((BaseDatabaseInstance) database).Serializer = _serializer;
((BaseDatabaseInstance)database).RegisterTypeResolvers();
((BaseDatabaseInstance)database).RegisterPropertyConverters();
((BaseDatabaseInstance)database).PublishTables(driver);
_databases.Add(database.Name, new Tuple<Type, ISterlingDatabaseInstance>(typeof(T),database));
return database;
}
/// <summary>
/// Unloads/flushes the database instances
/// </summary>
private void _Unload()
{
foreach (var database in
_databases.Values.Select(databaseDef => databaseDef.Item2).OfType<BaseDatabaseInstance>())
{
database.Unload();
}
}
/// <summary>
/// Retrieve the database with the name
/// </summary>
/// <param name="databaseName">The database name</param>
/// <returns>The database instance</returns>
public ISterlingDatabaseInstance GetDatabase(string databaseName)
{
if (string.IsNullOrEmpty(databaseName))
{
throw new ArgumentNullException("databaseName");
}
_RequiresActivation();
if (!_databases.ContainsKey(databaseName))
{
throw new SterlingDatabaseNotFoundException(databaseName);
}
return _databases[databaseName].Item2;
}
/// <summary>
/// Register a serializer with the system
/// </summary>
/// <typeparam name="T">The type of the serliaizer</typeparam>
public void RegisterSerializer<T>() where T : BaseSerializer
{
if (_activated)
{
throw new SterlingActivationException(string.Format("RegisterSerializer<{0}>", typeof(T).FullName));
}
((AggregateSerializer)_serializer).AddSerializer((ISterlingSerializer)Activator.CreateInstance(typeof(T)));
}
/// <summary>
/// Register a class responsible for type resolution.
/// </summary>
/// <param name="typeResolver">The typeResolver</param>
public void RegisterTypeResolver(ISterlingTypeResolver typeResolver)
{
TableTypeResolver.RegisterTypeResolver(typeResolver);
}
/// <summary>
/// Must be called to activate the engine.
/// Can only be called once.
/// </summary>
public void Activate()
{
lock(Lock)
{
if (_activated)
{
throw new SterlingActivationException("Activate()");
}
_LoadDefaultSerializers();
_activated = true;
}
}
private void _LoadDefaultSerializers()
{
// Load default serializes
RegisterSerializer<DefaultSerializer>();
RegisterSerializer<ExtendedSerializer>();
}
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Deactivate()
{
lock(Lock)
{
_activated = false;
_Unload();
_databases.Clear();
BaseDatabaseInstance.Deactivate();
_serializer = new AggregateSerializer();
}
return;
}
/// <summary>
/// Requires that sterling is activated
/// </summary>
private static void _RequiresActivation()
{
if (!_activated)
{
throw new SterlingNotReadyException();
}
}
private static readonly object _lock = new object();
public object Lock
{
get { return _lock; }
}
}
}
| 35.644279 | 158 | 0.522716 | [
"MIT"
] | JeremyLikness/sterling-net-core | sterling-core/Database/SterlingDatabase.cs | 14,331 | C# |
namespace SunLine.Community.Entities.Search
{
public class SearchResult
{
public int Page { get; set; }
public int AmountOnPage { get; set; }
public int AllResults { get; set; }
}
}
| 21.9 | 45 | 0.607306 | [
"Apache-2.0"
] | mczachurski/community | SunLine.Community.Entities/Search/SearchResult.cs | 221 | C# |
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace KachnaOnline.Data.Entities.BoardGames
{
[Table("BoardGameCategories")]
public class Category
{
[Key] public int Id { get; set; }
[Required(AllowEmptyStrings = false)]
[StringLength(64)]
public string Name { get; set; }
[Required(AllowEmptyStrings = false)]
[DefaultValue("000000")]
[RegularExpression("[0-9a-f]{6}")]
public string ColourHex { get; set; }
// Navigation properties
public virtual ICollection<BoardGame> Games { get; set; }
}
}
| 27.384615 | 65 | 0.664326 | [
"MIT"
] | Adda0/kachna-online | KachnaOnline.Data/Entities/BoardGames/Category.cs | 712 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Sdl.FileTypeSupport.Framework.Core.Settings;
namespace Sdl.Sdk.FileTypeSupport.Samples.SimpleText.WinUI
{
/// <summary>
/// Implements the user interface for the file type definition.
/// </summary>
#region "ClassDeclaration"
public partial class SettingsUIExtended : UserControl, IFileTypeSettingsAware<UserSettingsExtended>
#endregion
{
/// <summary>
/// Create a settings object based on the UserSettings class.
/// </summary>
#region "SettingsObject"
private UserSettingsExtended _userSettings;
#endregion
/// <summary>
/// Initalize the user interface control by setting it to the
/// setting value stored in the settings bundle.
/// </summary>
#region "Initialize"
public SettingsUIExtended()
{
InitializeComponent();
}
#endregion
/// <summary>
/// Reset the user interface control to its default value, which is
/// checked, i.e. the product lock option should be enabled
/// by default.
/// </summary>
#region "UpdateControl"
public void UpdateControl()
{
cb_LockPrdCodes.Checked = _userSettings.LockPrdCodes;
txt_PrdCodePrefix.Text = _userSettings.PrdCodesPrefix;
}
#endregion
/// <summary>
/// Save the settings based on the value of the the check box.
/// The setting is saved through the UserSettings class, which
/// handles the plug-in settings bundle.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
#region "SaveSetting"
private void cb_LockPrdCodes_CheckedChanged(object sender, EventArgs e)
{
_userSettings.LockPrdCodes = cb_LockPrdCodes.Checked;
if (cb_LockPrdCodes.Checked)
txt_PrdCodePrefix.Enabled = true;
else
txt_PrdCodePrefix.Enabled = false;
}
#endregion
#region "SaveTextBox"
private void txt_PrdCodePrefix_TextChanged(object sender, EventArgs e)
{
_userSettings.PrdCodesPrefix = txt_PrdCodePrefix.Text;
}
#endregion
/// <summary>
/// Implementation of <code>IFileTypeSettingsAware</code> allowing the Filter Framework
/// to pass through the user settings so that we can initialize the UI.
/// </summary>
#region "ApplySettings"
public UserSettingsExtended Settings
{
get
{
return _userSettings;
}
set
{
_userSettings = value;
UpdateControl();
}
}
#endregion
}
}
| 31.571429 | 104 | 0.576277 | [
"MIT"
] | Impertatore/trados-studio-api-samples | FileTypeSupport/Sdl.Sdk.FileTypeSupport.Samples.SimpleText.WinUI/SettingsUIExtended.cs | 3,096 | C# |
namespace Meraki.Api.Data;
[DataContract]
public enum AccessPolicyType
{
[EnumMember(Value = "Open")]
Open = 1,
[EnumMember(Value = "Custom access policy'")]
CustomAccessPolicy,
[EnumMember(Value = "MAC allow list")]
MacAllowList,
[EnumMember(Value = "Sticky MAC allow list")]
StickyMacAllowList
}
| 17.277778 | 46 | 0.723473 | [
"MIT"
] | Pituzek/Meraki.Api | Meraki.Api/Data/AccessPolicyType.cs | 313 | C# |
// Decompiled with JetBrains decompiler
// Type: STAR.Framework.Utility.EncodingTypes
// Assembly: STAR.Framework.Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=09c4f98813f6b683
// MVID: C0759794-9AB4-40FB-8B71-6E464E708E5C
// Assembly location: C:\Git\Repos\CapitalMarkets\Solutions\packages\STAR.Framework.Utility.1.0.0\lib\net40\STAR.Framework.Utility.dll
namespace STAR.Framework.Utility
{
/// <summary>Possible System.Text.Encoding class types.</summary>
/// <remarks>
/// </remarks>
public enum EncodingTypes
{
None,
ASCII,
BigEndianUnicode,
Unicode,
UTF7,
UTF8,
UTF32,
}
}
| 29.26087 | 134 | 0.683507 | [
"MIT"
] | DaveStoneDotNet/React.MegaRunbookCreator | STAR.Originations.MRC.DataAccess/NationstarNugets/Utility/EncodingTypes.cs | 675 | C# |
using System;
namespace Veldrid
{
/// <summary>
/// A device resource encapsulating a single shader module.
/// See <see cref="ShaderDescription"/>.
/// </summary>
public abstract class Shader : DeviceResource, IDisposable
{
internal Shader(ShaderStages stage, string entryPoint)
{
Stage = stage;
EntryPoint = entryPoint;
}
/// <summary>
/// The shader stage this instance can be used in.
/// </summary>
public ShaderStages Stage { get; }
/// <summary>
/// The name of the entry point function.
/// </summary>
public string EntryPoint { get; }
/// <inheritdoc/>
public abstract string? Name { get; set; }
/// <summary>
/// A bool indicating whether this instance has been disposed.
/// </summary>
public abstract bool IsDisposed { get; }
/// <summary>
/// Frees unmanaged device resources controlled by this instance.
/// </summary>
public abstract void Dispose();
}
}
| 26.731707 | 73 | 0.560219 | [
"MIT"
] | JoeTwizzle/veldrid | src/Veldrid/Shader.cs | 1,098 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using HotChocolate.Types;
namespace HotChocolate
{
internal sealed class SchemaTypes
{
private readonly Dictionary<NameString, INamedType> _types;
private readonly Dictionary<NameString, List<ObjectType>> _possibleTypes;
public SchemaTypes(SchemaTypesDefinition definition)
{
if (definition is null)
{
throw new ArgumentNullException(nameof(definition));
}
_types = definition.Types.ToDictionary(t => t.Name);
_possibleTypes = CreatePossibleTypeLookup(definition.Types);
QueryType = definition.QueryType;
MutationType = definition.MutationType;
SubscriptionType = definition.SubscriptionType;
}
public ObjectType QueryType { get; }
public ObjectType MutationType { get; }
public ObjectType SubscriptionType { get; }
public T GetType<T>(NameString typeName) where T : IType
{
if (_types.TryGetValue(typeName, out INamedType namedType)
&& namedType is T type)
{
return type;
}
// TODO : resource
throw new ArgumentException(
$"The specified type `{typeName}` does not exist or " +
$"is not of the specified kind `{typeof(T).Name}`.",
nameof(typeName));
}
public bool TryGetType<T>(NameString typeName, out T type)
where T : IType
{
if (_types.TryGetValue(typeName, out INamedType namedType)
&& namedType is T t)
{
type = t;
return true;
}
type = default;
return false;
}
public IReadOnlyCollection<INamedType> GetTypes()
{
return _types.Values;
}
public bool TryGetClrType(NameString typeName, out Type clrType)
{
if (_types.TryGetValue(typeName, out INamedType type)
&& type is IHasRuntimeType ct
&& ct.RuntimeType != typeof(object))
{
clrType = ct.RuntimeType;
return true;
}
clrType = null;
return false;
}
public bool TryGetPossibleTypes(
string abstractTypeName,
out IReadOnlyList<ObjectType> types)
{
if (_possibleTypes.TryGetValue(abstractTypeName, out List<ObjectType> pt))
{
types = pt;
return true;
}
types = null;
return false;
}
private static Dictionary<NameString, List<ObjectType>> CreatePossibleTypeLookup(
IReadOnlyCollection<INamedType> types)
{
var possibleTypes = new Dictionary<NameString, List<ObjectType>>();
foreach (ObjectType objectType in types.OfType<ObjectType>())
{
possibleTypes[objectType.Name] = new List<ObjectType> { objectType };
foreach (InterfaceType interfaceType in objectType.Implements)
{
if (!possibleTypes.TryGetValue(interfaceType.Name, out List<ObjectType> pt))
{
pt = new List<ObjectType>();
possibleTypes[interfaceType.Name] = pt;
}
pt.Add(objectType);
}
}
foreach (UnionType unionType in types.OfType<UnionType>())
{
foreach (ObjectType objectType in unionType.Types.Values)
{
if (!possibleTypes.TryGetValue(
unionType.Name, out List<ObjectType> pt))
{
pt = new List<ObjectType>();
possibleTypes[unionType.Name] = pt;
}
pt.Add(objectType);
}
}
return possibleTypes;
}
}
}
| 30.814815 | 96 | 0.519952 | [
"MIT"
] | Alxandr/hotchocolate | src/HotChocolate/Core/src/Types/SchemaTypes.cs | 4,160 | C# |
using System.Collections.Generic;
using FlixOne.BookStore.WebClient.Models;
using RestSharp;
namespace FlixOne.BookStore.WebClient.Client
{
public class RestSharpWebClient
{
private readonly RestClient _client = new RestClient("http://localhost:10065/api/");
public List<Product> GetProducts()
{
var request = new RestRequest("productlist", Method.GET);
var response = _client.Execute<List<Product>>(request);
return response.Data;
}
}
} | 28.888889 | 92 | 0.667308 | [
"MIT"
] | PacktPublishing/Building-RESTful-Web-Services-with-DOTNET-Core | Chapter10/FlixOne.BookStore.WebClient/FlixOne.BookStore.WebClient/Client/RestSharpWebClient.cs | 522 | C# |
#region LICENSE
/*
Sora - A Modular Bancho written in C#
Copyright (C) 2019 Robin A. P.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#endregion
using Sora.Attributes;
using Sora.Enums;
using Sora.EventArgs;
namespace Sora.Events.BanchoEvents.Multiplayer
{
[EventClass]
public class OnBanchoMatchLoadCompleteEvent
{
[Event(EventType.BanchoMatchLoadComplete)]
public void OnBanchoMatchLoadComplete(BanchoMatchLoadCompleteArgs args)
{
if (args.pr.JoinedRoom?.GetSlotByUserId(args.pr.User.Id) != null)
args.pr.JoinedRoom.LoadComplete();
}
}
}
| 31.5 | 79 | 0.714286 | [
"MIT"
] | Tiller431/yes | Sora/Sora/Events/BanchoEvents/Multiplayer/Match/OnBanchoMatchLoadCompleteEvent.cs | 1,260 | C# |
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Cotorra.General.Core;
using Cotorra.Schema;
namespace Cotorra.WebAPI.Controllers
{
/// <summary>
/// Cotorria Bot Service - Consultas en lenguaje natural
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class ActionController : BaseCotorraController
{
[HttpPost("DispatchAsync")]
public async Task DispatchAsync(DispatchAsyncParams parameters)
{
ActionSubscriptionDispatcher actionSubscriptionDispatcher = new ActionSubscriptionDispatcher();
actionSubscriptionDispatcher.DispatchAsync(parameters.ActionID, parameters.RegisterID);
}
}
}
| 25.892857 | 107 | 0.69931 | [
"MIT"
] | CotorraProject/Cotorra | Cotorra.WebAPI/Controllers/Action/ActionController.cs | 727 | C# |
using System;
using System.Net;
namespace Albatross.WebClient{
public class ClientException : Exception {
public ErrorMessage ErrorMessage { get; }
public ClientException(HttpStatusCode statusCode, string msg) : this(new ErrorMessage(statusCode, msg)) {
}
public ClientException(ErrorMessage err):base($"{err.StatusCode}({(int)err.StatusCode}):{err.Message}") {
ErrorMessage = err;
}
}
}
| 25.5625 | 107 | 0.733496 | [
"MIT"
] | RushuiGuan/framework | src/Albatross.WebClient/ClientException.cs | 411 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Xunit;
namespace Microsoft.EntityFrameworkCore
{
public class IntegerGeneratorEndToEndInMemoryTest
{
[ConditionalFact]
public void Can_use_sequence_end_to_end()
{
var serviceProvider = new ServiceCollection()
.AddEntityFrameworkInMemoryDatabase()
.BuildServiceProvider();
AddEntities(serviceProvider);
AddEntities(serviceProvider);
using var context = new BronieContext(serviceProvider);
var pegasuses = context.Pegasuses.ToList();
for (var i = 0; i < 50; i++)
{
Assert.True(pegasuses.All(p => p.Id > 0));
Assert.Equal(2, pegasuses.Count(p => p.Name == "Rainbow Dash " + i));
Assert.Equal(2, pegasuses.Count(p => p.Name == "Fluttershy " + i));
}
}
private static void AddEntities(IServiceProvider serviceProvider)
{
using var context = new BronieContext(serviceProvider);
for (var i = 0; i < 50; i++)
{
context.Add(new Pegasus { Name = "Rainbow Dash " + i });
context.Add(new Pegasus { Name = "Fluttershy " + i });
}
context.SaveChanges();
}
[ConditionalFact]
public async Task Can_use_sequence_end_to_end_async()
{
var serviceProvider = new ServiceCollection()
.AddEntityFrameworkInMemoryDatabase()
.BuildServiceProvider();
await AddEntitiesAsync(serviceProvider);
await AddEntitiesAsync(serviceProvider);
using var context = new BronieContext(serviceProvider);
var pegasuses = await context.Pegasuses.ToListAsync();
for (var i = 0; i < 50; i++)
{
Assert.True(pegasuses.All(p => p.Id > 0));
Assert.Equal(2, pegasuses.Count(p => p.Name == "Rainbow Dash " + i));
Assert.Equal(2, pegasuses.Count(p => p.Name == "Fluttershy " + i));
}
}
private static async Task AddEntitiesAsync(IServiceProvider serviceProvider)
{
using var context = new BronieContext(serviceProvider);
for (var i = 0; i < 50; i++)
{
context.Add(new Pegasus { Name = "Rainbow Dash " + i });
context.Add(new Pegasus { Name = "Fluttershy " + i });
}
await context.SaveChangesAsync();
}
[ConditionalFact]
public async Task Can_use_sequence_end_to_end_from_multiple_contexts_concurrently_async()
{
var serviceProvider = new ServiceCollection()
.AddEntityFrameworkInMemoryDatabase()
.BuildServiceProvider();
const int threadCount = 50;
var tests = new Func<Task>[threadCount];
for (var i = 0; i < threadCount; i++)
{
var closureProvider = serviceProvider;
tests[i] = () => AddEntitiesAsync(closureProvider);
}
var tasks = tests.Select(Task.Run).ToArray();
foreach (var t in tasks)
{
await t;
}
using var context = new BronieContext(serviceProvider);
var pegasuses = await context.Pegasuses.ToListAsync();
for (var i = 0; i < 50; i++)
{
Assert.True(pegasuses.All(p => p.Id > 0));
Assert.Equal(threadCount, pegasuses.Count(p => p.Name == "Rainbow Dash " + i));
Assert.Equal(threadCount, pegasuses.Count(p => p.Name == "Fluttershy " + i));
}
}
private class BronieContext : DbContext
{
private readonly IServiceProvider _serviceProvider;
public BronieContext(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) =>
optionsBuilder
.UseInMemoryDatabase(nameof(BronieContext))
.UseInternalServiceProvider(_serviceProvider);
public DbSet<Pegasus> Pegasuses { get; set; }
}
private class Pegasus
{
public int Id { get; set; }
public string Name { get; set; }
}
}
}
| 34.605839 | 111 | 0.556212 | [
"Apache-2.0"
] | belav/efcore | test/EFCore.InMemory.FunctionalTests/IntegerGeneratorEndToEndInMemoryTest.cs | 4,741 | C# |
/*
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
/*
* Do not modify this file. This file is generated from the elasticbeanstalk-2010-12-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.ElasticBeanstalk.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.ElasticBeanstalk.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for TooManyEnvironmentsException operation
/// </summary>
public class TooManyEnvironmentsExceptionUnmarshaller : IErrorResponseUnmarshaller<TooManyEnvironmentsException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public TooManyEnvironmentsException Unmarshall(XmlUnmarshallerContext context)
{
return this.Unmarshall(context, new ErrorResponse());
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public TooManyEnvironmentsException Unmarshall(XmlUnmarshallerContext context, ErrorResponse errorResponse)
{
TooManyEnvironmentsException response = new TooManyEnvironmentsException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static TooManyEnvironmentsExceptionUnmarshaller _instance = new TooManyEnvironmentsExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static TooManyEnvironmentsExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 36.090909 | 140 | 0.657116 | [
"Apache-2.0"
] | DetlefGolze/aws-sdk-net | sdk/src/Services/ElasticBeanstalk/Generated/Model/Internal/MarshallTransformations/TooManyEnvironmentsExceptionUnmarshaller.cs | 3,176 | C# |
namespace Tethos.Tests.Common
{
public class SystemUnderTest
{
public SystemUnderTest(IMockable mockable) => this.Mockable = mockable;
public IMockable Mockable { get; }
public int Exercise() => this.Mockable.Get();
}
}
| 21.583333 | 79 | 0.648649 | [
"MIT"
] | iamdmitrij/Tethos | test/Tethos.Tests.Common/SystemUnderTest.cs | 261 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// <auto-generated/>
// Template Source: Templates\CSharp\Requests\EntityReferenceRequest.cs.tt
namespace Microsoft.Graph
{
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
/// <summary>
/// The type CallReferenceRequest.
/// </summary>
public partial class CallReferenceRequest : BaseRequest, ICallReferenceRequest
{
/// <summary>
/// Constructs a new CallReferenceRequest.
/// </summary>
/// <param name="requestUrl">The URL for the built request.</param>
/// <param name="client">The <see cref="IBaseClient"/> for handling requests.</param>
/// <param name="options">Query and header option name value pairs for the request.</param>
public CallReferenceRequest(
string requestUrl,
IBaseClient client,
IEnumerable<Option> options)
: base(requestUrl, client, options)
{
}
/// <summary>
/// Deletes the specified Call reference.
/// </summary>
/// <returns>The task to await.</returns>
public System.Threading.Tasks.Task DeleteAsync()
{
return this.DeleteAsync(CancellationToken.None);
}
/// <summary>
/// Deletes the specified Call reference.
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task DeleteAsync(CancellationToken cancellationToken)
{
this.Method = "DELETE";
await this.SendAsync<Call>(null, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Puts the specified Call reference.
/// </summary>
/// <param name="id">The Call reference to update.</param>
/// <returns>The task to await.</returns>
public System.Threading.Tasks.Task PutAsync(string id)
{
return this.PutAsync(id, CancellationToken.None);
}
/// <summary>
/// Puts the specified Call reference.
/// </summary>
/// <param name="id">The Call reference to update.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The task to await.</returns>
public async System.Threading.Tasks.Task PutAsync(string id, CancellationToken cancellationToken)
{
var baseUrl = this.Client.BaseUrl;
var objectUri = string.Format(@"{0}/users/{1}", baseUrl, id);
var payload = new Newtonsoft.Json.Linq.JObject(
new Newtonsoft.Json.Linq.JProperty("@odata.id", objectUri));
this.Method = "PUT";
this.ContentType = "application/json";
await this.SendAsync(payload.ToString(), cancellationToken).ConfigureAwait(false);
}
}
}
| 40.855422 | 153 | 0.583899 | [
"MIT"
] | jiaomy2016/MSGraph-SDK-Code-Generator | test/Typewriter.Test/TestDataCSharp/com/Microsoft/Graph/Requests/CallReferenceRequest.cs | 3,391 | C# |
using System;
namespace XNetEx.Text
{
/// <summary>
/// 为字符串解析对象 <see cref="IStringParser{T}"/> 提供抽象基类。
/// </summary>
/// <typeparam name="T">要从字符串解析为对象的类型。</typeparam>
public abstract class StringParser<T> : IStringParser, IStringParser<T> where T : notnull
{
/// <summary>
/// 初始化 <see cref="StringParser{T}"/> 类的新实例。
/// </summary>
protected StringParser() { }
/// <summary>
/// 获取 <see cref="StringParser{T}"/> 类的默认实例。
/// </summary>
/// <returns><see cref="StringParser{T}"/> 类的默认实例。</returns>
public static StringParser<T> Default { get; } = StringParser<T>.CreateDefault();
/// <summary>
/// 创建以指定的委托定义的 <see cref="StringParser{T}"/> 类的实例。
/// </summary>
/// <param name="parser">用于解析字符串为数值的方法的
/// <see cref="Converter{TInput, TOutput}"/> 委托。</param>
/// <returns>以委托定义的指定类型的 <see cref="StringParser{T}"/> 类的实例。</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="parser"/> 为 <see langword="null"/>。</exception>
public static StringParser<T> Create(Converter<string, T> parser)
{
return new DelegateStringParser<T>(parser);
}
/// <summary>
/// 创建 <see cref="StringParser{T}"/> 类的默认实例。
/// </summary>
/// <returns><see cref="StringParser{T}"/> 类的默认实例。</returns>
private static StringParser<T> CreateDefault()
{
if (typeof(T).IsEnum)
{
return new EnumStringParser<T>();
}
else if (typeof(T) == typeof(string))
{
return (StringParser<T>)(object)new StringStringParser();
}
else if (typeof(T) == typeof(Type))
{
return (StringParser<T>)(object)new TypeStringParser();
}
else if (typeof(T) == typeof(Uri))
{
return (StringParser<T>)(object)new UriStringParser();
}
else if (ParsableStringParser<T>.CanParse)
{
return new ParsableStringParser<T>();
}
else if (ExtensionStringParser<T>.CanParse)
{
return new ExtensionStringParser<T>();
}
else
{
return new InvalidStringParser<T>();
}
}
/// <summary>
/// 将指定的字符串表示形式转换为其等效的对象。
/// </summary>
/// <param name="text">包含要转换的对象的字符串。</param>
/// <returns>与 <paramref name="text"/> 中的内容等效的对象。</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="text"/> 为 <see langword="null"/>。</exception>
/// <exception cref="ArgumentException"><paramref name="text"/> 不表示有效的值。</exception>
/// <exception cref="FormatException"><paramref name="text"/> 的格式不正确。</exception>
/// <exception cref="InvalidCastException">指定的从字符串的转换无效。</exception>
/// <exception cref="OverflowException">
/// <paramref name="text"/> 表示的值超出了 <typeparamref name="T"/> 能表示的范围。</exception>
public abstract T Parse(string text);
/// <summary>
/// 尝试将指定的字符串表示形式转换为其等效的对象,并返回转换是否成功。
/// </summary>
/// <param name="text">包含要转换的对象的字符串。</param>
/// <param name="result">与 <paramref name="text"/> 中的内容等效的对象。</param>
/// <returns>若 <paramref name="text"/> 成功转换,
/// 则为 <see langword="true"/>;否则为 <see langword="false"/>。</returns>
public bool TryParse(string text, out T? result)
{
try { result = this.Parse(text); return true; }
catch (Exception) { result = default(T); return false; }
}
/// <summary>
/// 将指定的字符串表示形式转换为其等效的对象。
/// </summary>
/// <param name="text">包含要转换的对象的字符串。</param>
/// <returns>与 <paramref name="text"/> 中的内容等效的对象。</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="text"/> 为 <see langword="null"/>。</exception>
/// <exception cref="ArgumentException"><paramref name="text"/> 不表示有效的值。</exception>
/// <exception cref="FormatException"><paramref name="text"/> 的格式不正确。</exception>
/// <exception cref="InvalidCastException">指定的从字符串的转换无效。</exception>
/// <exception cref="OverflowException">
/// <paramref name="text"/> 表示的值超出了 <typeparamref name="T"/> 能表示的范围。</exception>
object IStringParser.Parse(string text) => this.Parse(text);
}
/// <summary>
/// 提供将字符串解析为对象的方法。
/// </summary>
public static class StringParser
{
/// <summary>
/// 创建以指定的委托定义的指定类型的 <see cref="StringParser{T}"/> 类的实例。
/// </summary>
/// <typeparam name="T">要从字符串解析为对象的类型。</typeparam>
/// <param name="parser">用于解析字符串为对象的方法的
/// <see cref="Converter{TInput, TOutput}"/> 委托。</param>
/// <returns>以委托定义的指定类型的 <see cref="StringParser{T}"/> 类的实例。</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="parser"/> 为 <see langword="null"/>。</exception>
public static StringParser<T> Create<T>(Converter<string, T> parser) where T : notnull
{
return StringParser<T>.Create(parser);
}
/// <summary>
/// 将当前字符串表示形式转换为其等效的对象。
/// </summary>
/// <typeparam name="T">要从字符串解析为对象的类型。</typeparam>
/// <param name="text">包含要转换的对象的字符串。</param>
/// <returns>与 <paramref name="text"/> 中的内容等效的对象。</returns>
/// <exception cref="ArgumentNullException">
/// <paramref name="text"/> 为 <see langword="null"/>。</exception>
/// <exception cref="ArgumentException"><paramref name="text"/> 不表示有效的值。</exception>
/// <exception cref="FormatException"><paramref name="text"/> 的格式不正确。</exception>
/// <exception cref="InvalidCastException">指定的从字符串的转换无效。</exception>
/// <exception cref="OverflowException">
/// <paramref name="text"/> 表示的值超出了 <typeparamref name="T"/> 能表示的范围。</exception>
public static T ParseAs<T>(this string text) where T : notnull
{
return StringParser<T>.Default.Parse(text);
}
/// <summary>
/// 尝试将指定的字符串表示形式转换为其等效的对象,并返回转换是否成功。
/// </summary>
/// <typeparam name="T">要从字符串解析为对象的类型。</typeparam>
/// <param name="text">包含要转换的对象的字符串。</param>
/// <param name="result">与 <paramref name="text"/> 中的内容等效的对象。</param>
/// <returns>若 <paramref name="text"/> 成功转换,
/// 则为 <see langword="true"/>;否则为 <see langword="false"/>。</returns>
public static bool TryParseAs<T>(this string text, out T? result) where T : notnull
{
return StringParser<T>.Default.TryParse(text, out result);
}
}
}
| 41.829268 | 94 | 0.559767 | [
"MIT"
] | x-stars/DotNetExtensionLibrary | XNetEx.Runtime.ObjectText/Text/StringParser.cs | 8,142 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using Android.App;
using Android.Graphics;
using Android.Views;
using Android.Widget;
using SalesApp.Core.BL;
namespace SalesApp.Droid.Adapters
{
public class MessageListAdapter : BaseAdapter<NotificationListItem>
{
Activity context;
List<NotificationListItem> items;
public MessageListAdapter(Activity context, List<NotificationListItem> notificationListItems)
{
if (notificationListItems == null)
notificationListItems = new List<NotificationListItem>();
this.context = context;
items = notificationListItems;
}
public override NotificationListItem this[int position]
{
get
{
return items[position];
}
}
public override int Count
{
get { return items.Count(); }
}
public override long GetItemId(int position)
{
return position;
}
public override View GetView(int position, View convertView, ViewGroup parent)
{
try
{
View view = convertView;
var item = items[position];
if (item.ItemType == ItemType.Detail)
{
//render the message row view i.e. view represeting each message item
//verify that the convert view is not null and matches the message row type
if (view == null || view.FindViewById<TextView>(Resource.Id.messageContent) == null)
view = context.LayoutInflater.Inflate(Resource.Layout.layout_message_row, null);
view.FindViewById<TextView>(Resource.Id.messageSubject).Text = item.Message.Subject;
view.FindViewById<TextView>(Resource.Id.messageContent).Text = item.Message.Body;
view.FindViewById<TextView>(Resource.Id.messageTime).Text = item.Message.MessageDate.ToString("d MMM, HH:mm");
if (!item.Message.IsRead)
{
//view.FindViewById<View>(Resource.Id.indicatorUnread).Visibility = ViewStates.Invisible;
var messageContentView = view.FindViewById<TextView>(Resource.Id.messageContent);
view.FindViewById<TextView>(Resource.Id.messageSubject).SetTypeface(null, TypefaceStyle.Bold);
view.FindViewById<TextView>(Resource.Id.messageTime).SetTypeface(null, TypefaceStyle.Bold);
view.FindViewById<TextView>(Resource.Id.messageSubject).SetTextColor(Color.Black);
view.FindViewById<TextView>(Resource.Id.messageSubject).SetTextColor(Color.Black);
}
else
{
//view.FindViewById<View>(Resource.Id.indicatorUnread).Visibility = ViewStates.Visible;
view.FindViewById<TextView>(Resource.Id.messageSubject).SetTypeface(null, TypefaceStyle.Normal);
view.FindViewById<TextView>(Resource.Id.messageSubject).SetTextColor(Color.ParseColor("#999999")); //TODO replace with string resource @color/gray1
view.FindViewById<TextView>(Resource.Id.messageTime).SetTypeface(null, TypefaceStyle.Normal);
}
return view;
}
else
{
//render list group header view
//verify that the convert view is not null and matches the header row type
if (view == null || view.FindViewById<TextView>(Resource.Id.headerText) == null)
view = context.LayoutInflater.Inflate(Resource.Layout.layout_broadcastmessagelist_header, null);
view.FindViewById<TextView>(Resource.Id.headerText).Text = item.SectionHeader;
if (item.SectionHeader == "UNREAD")
{
view.FindViewById<ImageView>(Resource.Id.broadcastMessageSectionIcon).SetImageResource(Resource.Drawable.unreadMessage);
view.FindViewById<TextView>(Resource.Id.headerText).SetTextColor(Color.Black);
}
else
{
view.FindViewById<ImageView>(Resource.Id.broadcastMessageSectionIcon).SetImageResource(Resource.Drawable.archivedMessage);
}
return view;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
return convertView;
}
}
public void SortMessages()
{
items.Sort((x, y) => x.Compare(y,x));
}
}
public class NotificationListItem :IComparer<NotificationListItem>
{
public NotificationListItem(string header)
{
ItemType = ItemType.Header;
SectionHeader = header;
}
public NotificationListItem(Message message)
{
ItemType = ItemType.Detail;
Message = message;
SectionHeader = null;
}
public Message Message { get; set; }
public ItemType ItemType { get; set; }
public string SectionHeader { get; set; }
/// <summary>
/// Compares two notification list items to evalauate for sorting based on the date of creation
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns>0 if they are equal, 1 if x is greater than y, -1 if x is less than y</returns>
public int Compare(NotificationListItem x, NotificationListItem y)
{
const string ARCHIVED = "READ";
const string UNREAD = "UNREAD";
/*
* ORDER OF SORTING
* Unread Header Sction
* Unread Messages (sorted by date descending)
* Archived Header Section
* Archived Messages (sorted by date descending)
*/
/*
* UNREAD ARCHIVED
* ARCHIVED UNREAD
* NB mutual exclusion betweewn the two
*/
if (x.ItemType == ItemType.Header && y.ItemType == ItemType.Header)
{
if (x.SectionHeader == UNREAD)
return 1; // do y path
}
/*
* UNREAD read
* UNREAD unread
* ARCHIVED read
* ARCHIVED unread
*/
if (x.ItemType == ItemType.Header && y.ItemType == ItemType.Detail)
{
if (x.SectionHeader == UNREAD)
return 1;
if (x.SectionHeader == ARCHIVED)
{
if (y.Message.IsRead)
return 1;
return -1;
}
}
if (x.ItemType == ItemType.Detail && y.ItemType == ItemType.Detail)
{
//unread messages go up the queue
if (!x.Message.IsRead && y.Message.IsRead)
return 1;
if (!y.Message.IsRead && x.Message.IsRead)
return -1;
//if both messages are read/unread, evalauate by creation date
return x.Message.Created.CompareTo(y.Message.Created);
}
return -1 * Compare(y, x);
}
}
public enum ItemType
{
Header,
Detail
}
} | 37.07177 | 171 | 0.533686 | [
"Apache-2.0"
] | mkopadev/salesapp | SalesApp.Droid/Adapters/BroadcastMessageListAdapter.cs | 7,748 | C# |
//Copyright © 2014 Sony Computer Entertainment America LLC. See License.txt.
using System.ComponentModel.Composition;
using Sce.Atf;
using Sce.Atf.Applications;
using Sce.Atf.Dom;
namespace DomTreeEditorSample
{
/// <summary>
/// Component that populates the palette with the basic UI types</summary>
[Export(typeof(IInitializable))]
[Export(typeof(PaletteClient))]
[PartCreationPolicy(CreationPolicy.Shared)]
public class PaletteClient : IPaletteClient, IInitializable
{
/// <summary>
/// Constructor</summary>
/// <param name="paletteService">Palette service</param>
/// <param name="schemaLoader">Schema loader</param>
[ImportingConstructor]
public PaletteClient(
IPaletteService paletteService,
SchemaLoader schemaLoader)
{
m_paletteService = paletteService;
}
#region IInitializable Members
void IInitializable.Initialize()
{
// add item types to palette
string name = Localizer.Localize("UI Objects");
m_paletteService.AddItem(UISchema.UIPackageType.Type, name, this);
m_paletteService.AddItem(UISchema.UIFormType.Type, name, this);
m_paletteService.AddItem(UISchema.UIShaderType.Type, name, this);
m_paletteService.AddItem(UISchema.UITextureType.Type, name, this);
m_paletteService.AddItem(UISchema.UIFontType.Type, name, this);
m_paletteService.AddItem(UISchema.UISpriteType.Type, name, this);
m_paletteService.AddItem(UISchema.UITextItemType.Type, name, this);
m_paletteService.AddItem(UISchema.UIAnimationType.Type, name, this);
}
#endregion
#region IPaletteClient Members
/// <summary>
/// Gets display information for the item</summary>
/// <param name="item">Item</param>
/// <param name="info">Information object, which client can fill out</param>
public void GetInfo(object item, ItemInfo info)
{
DomNodeType nodeType = (DomNodeType)item;
NodeTypePaletteItem paletteItem = nodeType.GetTag<NodeTypePaletteItem>();
if (paletteItem != null)
{
info.Label = paletteItem.Name;
info.Description = paletteItem.Description;
info.ImageIndex = info.GetImageList().Images.IndexOfKey(paletteItem.ImageName);
}
}
/// <summary>
/// Converts the palette item into an object that can be inserted into an
/// IInstancingContext</summary>
/// <param name="item">Item to convert</param>
/// <returns>Object that can be inserted into an IInstancingContext</returns>
public object Convert(object item)
{
DomNodeType nodeType = (DomNodeType)item;
DomNode node = new DomNode(nodeType);
NodeTypePaletteItem paletteItem = nodeType.GetTag<NodeTypePaletteItem>();
if (paletteItem != null)
{
node.SetAttribute(nodeType.IdAttribute, paletteItem.Name);
}
return node;
}
#endregion
private IPaletteService m_paletteService;
}
}
| 38.25 | 96 | 0.612299 | [
"Apache-2.0"
] | gamebytes/ATF | Samples/DomTreeEditor/PaletteClient.cs | 3,282 | C# |
// This file was automatically generated and may be regenerated at any
// time. To ensure any changes are retained, modify the tool with any segment/component/group/field name
// or type changes.
namespace Machete.HL7Schema.V26.Maps
{
using V26;
/// <summary>
/// OPU_R25 (MessageMap) -
/// </summary>
public class OPU_R25Map :
HL7V26LayoutMap<OPU_R25>
{
public OPU_R25Map()
{
Segment(x => x.MSH, 0, x => x.Required = true);
Segment(x => x.SFT, 1);
Segment(x => x.UAC, 2);
Segment(x => x.NTE, 3);
Segment(x => x.PV1, 4, x => x.Required = true);
Segment(x => x.PV2, 5);
Segment(x => x.OBX, 6);
Segment(x => x.NTE2, 7);
Segment(x => x.ROL, 8, x => x.Required = true);
Layout(x => x.AccessionDetail, 9, x => x.Required = true);
}
}
} | 32.642857 | 105 | 0.526258 | [
"Apache-2.0"
] | AreebaAroosh/Machete | src/Machete.HL7Schema/Generated/V26/Messages/Maps/OPU_R25Map.cs | 914 | C# |
using System;
using System.Runtime.InteropServices;
using System.Threading;
namespace RemoteAgent.Service.Utility
{
public class NativeMethods
{
[DllImport("user32.dll")]
public static extern void LockWorkStation();
[DllImport("user32.dll", EntryPoint = "GetDesktopWindow")]
private static extern IntPtr GetDesktopWindow();
[DllImport("user32.dll")]
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
private const int SC_SCREENSAVE = 0xF140;
private const int WM_SYSCOMMAND = 0x0112;
public static void SetScreenSaverRunning()
{
SendMessage(GetProcessPointer(), WM_SYSCOMMAND, SC_SCREENSAVE, 1);
}
private const int APPCOMMAND_VOLUME_MUTE = 0x80000;
private const int WM_APPCOMMAND = 0x319;
[DllImport("user32.dll")]
public static extern IntPtr SendMessagePointer(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
public static void ToggleMute()
{
var intPtr = GetProcessPointer();
SendMessagePointer(intPtr, WM_APPCOMMAND, intPtr, (IntPtr)APPCOMMAND_VOLUME_MUTE);
// SendMessagePointer()
}
private static unsafe IntPtr GetProcessPointer()
{
var p = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
var intPtr = new IntPtr(p.ToPointer());
return intPtr;
}
public static class Monitor
{
[DllImport("user32.dll")]
static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
[DllImport("user32.dll")]
static extern void mouse_event(Int32 dwFlags, Int32 dx, Int32 dy, Int32 dwData, UIntPtr dwExtraInfo);
private const int WmSyscommand = 0x0112;
private const int ScMonitorpower = 0xF170;
private const int MonitorShutoff = 2;
private const int MouseeventfMove = 0x0001;
public static void Off()
{
SendMessage(GetProcessPointer(), WmSyscommand, (IntPtr)ScMonitorpower, (IntPtr)MonitorShutoff);
}
public static void On()
{
mouse_event(MouseeventfMove, 0, 1, 0, UIntPtr.Zero);
Thread.Sleep(40);
mouse_event(MouseeventfMove, 0, -1, 0, UIntPtr.Zero);
}
}
}
} | 29.338028 | 104 | 0.733077 | [
"Apache-2.0"
] | taori/PCRemoteController | src/RemoteAgent.Service/RemoteAgent.Service/Utility/NativeMethods.cs | 2,085 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
/*
* Do not modify this file. This file is generated from the elasticbeanstalk-2010-12-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ElasticBeanstalk.Model
{
/// <summary>
/// Container for the parameters to the UpdateApplication operation.
/// Updates the specified application to have the specified properties.
/// </summary>
public partial class UpdateApplicationRequest : AmazonElasticBeanstalkRequest
{
private string _applicationName;
private string _description;
/// <summary>
/// Empty constructor used to set properties independently even when a simple constructor is available
/// </summary>
public UpdateApplicationRequest() { }
/// <summary>
/// Instantiates UpdateApplicationRequest with the parameterized properties
/// </summary>
/// <param name="applicationName"> The name of the application to update. If no such application is found, <code>UpdateApplication</code> returns an <code>InvalidParameterValue</code> error. </param>
public UpdateApplicationRequest(string applicationName)
{
_applicationName = applicationName;
}
/// <summary>
/// Gets and sets the property ApplicationName.
/// <para>
/// The name of the application to update. If no such application is found, <code>UpdateApplication</code>
/// returns an <code>InvalidParameterValue</code> error.
/// </para>
/// </summary>
public string ApplicationName
{
get { return this._applicationName; }
set { this._applicationName = value; }
}
// Check to see if ApplicationName property is set
internal bool IsSetApplicationName()
{
return this._applicationName != null;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// A new description for the application.
/// </para>
///
/// <para>
/// Default: If not specified, AWS Elastic Beanstalk does not update the description.
///
/// </para>
/// </summary>
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
}
} | 34.135417 | 207 | 0.636863 | [
"Apache-2.0"
] | ermshiperete/aws-sdk-net | AWSSDK_DotNet35/Amazon.ElasticBeanstalk/Model/UpdateApplicationRequest.cs | 3,277 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Immutable;
using System.Diagnostics;
using SR = StarkPlatform.Reflection.Resources.SR;
namespace StarkPlatform.Reflection.Metadata.Ecma335
{
/// <summary>
/// Decodes signature blobs.
/// See Metadata Specification section II.23.2: Blobs and signatures.
/// </summary>
public readonly struct SignatureDecoder<TType, TGenericContext>
{
private readonly ISignatureTypeProvider<TType, TGenericContext> _provider;
private readonly MetadataReader _metadataReaderOpt;
private readonly TGenericContext _genericContext;
/// <summary>
/// Creates a new SignatureDecoder.
/// </summary>
/// <param name="provider">The provider used to obtain type symbols as the signature is decoded.</param>
/// <param name="metadataReader">
/// The metadata reader from which the signature was obtained. It may be null if the given provider allows it.
/// </param>
/// <param name="genericContext">
/// Additional context needed to resolve generic parameters.
/// </param>
public SignatureDecoder(
ISignatureTypeProvider<TType, TGenericContext> provider,
MetadataReader metadataReader,
TGenericContext genericContext)
{
if (provider == null)
{
Throw.ArgumentNull(nameof(provider));
}
_metadataReaderOpt = metadataReader;
_provider = provider;
_genericContext = genericContext;
}
/// <summary>
/// Decodes a type embedded in a signature and advances the reader past the type.
/// </summary>
/// <param name="blobReader">The blob reader positioned at the leading SignatureTypeCode</param>
/// <param name="allowTypeSpecifications">Allow a <see cref="TypeSpecificationHandle"/> to follow a (CLASS | VALUETYPE) in the signature.
/// At present, the only context where that would be valid is in a LocalConstantSig as defined by the Portable PDB specification.
/// </param>
/// <returns>The decoded type.</returns>
/// <exception cref="System.BadImageFormatException">The reader was not positioned at a valid signature type.</exception>
public TType DecodeType(ref BlobReader blobReader, bool allowTypeSpecifications = false)
{
return DecodeType(ref blobReader, allowTypeSpecifications, blobReader.ReadCompressedInteger());
}
private TType DecodeType(ref BlobReader blobReader, bool allowTypeSpecifications, int typeCode)
{
TType elementType;
int index;
switch (typeCode)
{
case (int)SignatureTypeCode.Boolean:
case (int)SignatureTypeCode.Rune:
case (int)SignatureTypeCode.SByte:
case (int)SignatureTypeCode.Byte:
case (int)SignatureTypeCode.Int16:
case (int)SignatureTypeCode.UInt16:
case (int)SignatureTypeCode.Int32:
case (int)SignatureTypeCode.UInt32:
case (int)SignatureTypeCode.Int64:
case (int)SignatureTypeCode.UInt64:
case (int)SignatureTypeCode.Single:
case (int)SignatureTypeCode.Double:
case (int)SignatureTypeCode.IntPtr:
case (int)SignatureTypeCode.UIntPtr:
case (int)SignatureTypeCode.Object:
case (int)SignatureTypeCode.String:
case (int)SignatureTypeCode.Void:
case (int)SignatureTypeCode.TypedReference:
return _provider.GetPrimitiveType((PrimitiveTypeCode)typeCode);
case (int)SignatureTypeCode.Pointer:
elementType = DecodeType(ref blobReader);
return _provider.GetPointerType(elementType);
case (int)SignatureTypeCode.ByReference:
elementType = DecodeType(ref blobReader);
return _provider.GetByReferenceType(elementType);
case (int)SignatureTypeCode.Pinned:
elementType = DecodeType(ref blobReader);
return _provider.GetPinnedType(elementType);
case (int)SignatureTypeCode.Array:
elementType = DecodeType(ref blobReader);
return _provider.GetSZArrayType(elementType);
case (int)SignatureTypeCode.FunctionPointer:
MethodSignature<TType> methodSignature = DecodeMethodSignature(ref blobReader);
return _provider.GetFunctionPointerType(methodSignature);
case (int)SignatureTypeCode.RequiredModifier:
return DecodeModifiedType(ref blobReader, isRequired: true);
case (int)SignatureTypeCode.OptionalModifier:
return DecodeModifiedType(ref blobReader, isRequired: false);
case (int)SignatureTypeCode.GenericTypeInstance:
return DecodeGenericTypeInstance(ref blobReader);
case (int)SignatureTypeCode.GenericTypeParameter:
index = blobReader.ReadCompressedInteger();
return _provider.GetGenericTypeParameter(_genericContext, index);
case (int)SignatureTypeCode.GenericMethodParameter:
index = blobReader.ReadCompressedInteger();
return _provider.GetGenericMethodParameter(_genericContext, index);
case (int)SignatureTypeKind.Class:
case (int)SignatureTypeKind.ValueType:
return DecodeTypeHandle(ref blobReader, (byte)typeCode, allowTypeSpecifications);
default:
throw new BadImageFormatException(StarkPlatform.Reflection.Resources.SR.Format(SR.UnexpectedSignatureTypeCode, typeCode));
}
}
/// <summary>
/// Decodes a list of types, with at least one instance that is preceded by its count as a compressed integer.
/// </summary>
private ImmutableArray<TType> DecodeTypeSequence(ref BlobReader blobReader)
{
int count = blobReader.ReadCompressedInteger();
if (count == 0)
{
// This method is used for Local signatures and method specs, neither of which can have
// 0 elements. Parameter sequences can have 0 elements, but they are handled separately
// to deal with the sentinel/varargs case.
throw new BadImageFormatException(SR.SignatureTypeSequenceMustHaveAtLeastOneElement);
}
var types = ImmutableArray.CreateBuilder<TType>(count);
for (int i = 0; i < count; i++)
{
types.Add(DecodeType(ref blobReader));
}
return types.MoveToImmutable();
}
/// <summary>
/// Decodes a method (definition, reference, or standalone) or property signature blob.
/// </summary>
/// <param name="blobReader">BlobReader positioned at a method signature.</param>
/// <returns>The decoded method signature.</returns>
/// <exception cref="System.BadImageFormatException">The method signature is invalid.</exception>
public MethodSignature<TType> DecodeMethodSignature(ref BlobReader blobReader)
{
SignatureHeader header = blobReader.ReadSignatureHeader();
CheckMethodOrPropertyHeader(header);
int genericParameterCount = 0;
if (header.IsGeneric)
{
genericParameterCount = blobReader.ReadCompressedInteger();
}
int parameterCount = blobReader.ReadCompressedInteger();
TType returnType = DecodeType(ref blobReader);
ImmutableArray<TType> parameterTypes;
int requiredParameterCount;
if (parameterCount == 0)
{
requiredParameterCount = 0;
parameterTypes = ImmutableArray<TType>.Empty;
}
else
{
var parameterBuilder = ImmutableArray.CreateBuilder<TType>(parameterCount);
int parameterIndex;
for (parameterIndex = 0; parameterIndex < parameterCount; parameterIndex++)
{
int typeCode = blobReader.ReadCompressedInteger();
if (typeCode == (int)SignatureTypeCode.Sentinel)
{
break;
}
parameterBuilder.Add(DecodeType(ref blobReader, allowTypeSpecifications: false, typeCode: typeCode));
}
requiredParameterCount = parameterIndex;
for (; parameterIndex < parameterCount; parameterIndex++)
{
parameterBuilder.Add(DecodeType(ref blobReader));
}
parameterTypes = parameterBuilder.MoveToImmutable();
}
return new MethodSignature<TType>(header, returnType, requiredParameterCount, genericParameterCount, parameterTypes);
}
/// <summary>
/// Decodes a method specification signature blob and advances the reader past the signature.
/// </summary>
/// <param name="blobReader">A BlobReader positioned at a valid method specification signature.</param>
/// <returns>The types used to instantiate a generic method via the method specification.</returns>
public ImmutableArray<TType> DecodeMethodSpecificationSignature(ref BlobReader blobReader)
{
SignatureHeader header = blobReader.ReadSignatureHeader();
CheckHeader(header, SignatureKind.MethodSpecification);
return DecodeTypeSequence(ref blobReader);
}
/// <summary>
/// Decodes a local variable signature blob and advances the reader past the signature.
/// </summary>
/// <param name="blobReader">The blob reader positioned at a local variable signature.</param>
/// <returns>The local variable types.</returns>
/// <exception cref="System.BadImageFormatException">The local variable signature is invalid.</exception>
public ImmutableArray<TType> DecodeLocalSignature(ref BlobReader blobReader)
{
SignatureHeader header = blobReader.ReadSignatureHeader();
CheckHeader(header, SignatureKind.LocalVariables);
return DecodeTypeSequence(ref blobReader);
}
/// <summary>
/// Decodes a field signature blob and advances the reader past the signature.
/// </summary>
/// <param name="blobReader">The blob reader positioned at a field signature.</param>
/// <returns>The decoded field type.</returns>
public TType DecodeFieldSignature(ref BlobReader blobReader)
{
SignatureHeader header = blobReader.ReadSignatureHeader();
CheckHeader(header, SignatureKind.Field);
return DecodeType(ref blobReader);
}
private TType DecodeArrayType(ref BlobReader blobReader)
{
// PERF_TODO: Cache/reuse common case of small number of all-zero lower-bounds.
TType elementType = DecodeType(ref blobReader);
int rank = blobReader.ReadCompressedInteger();
var sizes = ImmutableArray<int>.Empty;
var lowerBounds = ImmutableArray<int>.Empty;
int sizesCount = blobReader.ReadCompressedInteger();
if (sizesCount > 0)
{
var builder = ImmutableArray.CreateBuilder<int>(sizesCount);
for (int i = 0; i < sizesCount; i++)
{
builder.Add(blobReader.ReadCompressedInteger());
}
sizes = builder.MoveToImmutable();
}
int lowerBoundsCount = blobReader.ReadCompressedInteger();
if (lowerBoundsCount > 0)
{
var builder = ImmutableArray.CreateBuilder<int>(lowerBoundsCount);
for (int i = 0; i < lowerBoundsCount; i++)
{
builder.Add(blobReader.ReadCompressedSignedInteger());
}
lowerBounds = builder.MoveToImmutable();
}
var arrayShape = new ArrayShape(rank, sizes, lowerBounds);
return _provider.GetArrayType(elementType, arrayShape);
}
private TType DecodeGenericTypeInstance(ref BlobReader blobReader)
{
TType genericType = DecodeType(ref blobReader);
ImmutableArray<TType> types = DecodeTypeSequence(ref blobReader);
return _provider.GetGenericInstantiation(genericType, types);
}
private TType DecodeModifiedType(ref BlobReader blobReader, bool isRequired)
{
TType modifier = DecodeTypeHandle(ref blobReader, 0, allowTypeSpecifications: true);
TType unmodifiedType = DecodeType(ref blobReader);
return _provider.GetModifiedType(modifier, unmodifiedType, isRequired);
}
private TType DecodeTypeHandle(ref BlobReader blobReader, byte rawTypeKind, bool allowTypeSpecifications)
{
EntityHandle handle = blobReader.ReadTypeHandle();
if (!handle.IsNil)
{
switch (handle.Kind)
{
case HandleKind.TypeDefinition:
return _provider.GetTypeFromDefinition(_metadataReaderOpt, (TypeDefinitionHandle)handle, rawTypeKind);
case HandleKind.TypeReference:
return _provider.GetTypeFromReference(_metadataReaderOpt, (TypeReferenceHandle)handle, rawTypeKind);
case HandleKind.TypeSpecification:
if (!allowTypeSpecifications)
{
// To prevent cycles, the token following (CLASS | VALUETYPE) must not be a type spec.
// https://github.com/dotnet/coreclr/blob/8ff2389204d7c41b17eff0e9536267aea8d6496f/src/md/compiler/mdvalidator.cpp#L6154-L6160
throw new BadImageFormatException(SR.NotTypeDefOrRefHandle);
}
return _provider.GetTypeFromSpecification(_metadataReaderOpt, _genericContext, (TypeSpecificationHandle)handle, rawTypeKind);
default:
// indicates an error returned from ReadTypeHandle, otherwise unreachable.
Debug.Assert(handle.IsNil); // will fall through to throw in release.
break;
}
}
throw new BadImageFormatException(SR.NotTypeDefOrRefOrSpecHandle);
}
private void CheckHeader(SignatureHeader header, SignatureKind expectedKind)
{
if (header.Kind != expectedKind)
{
throw new BadImageFormatException(StarkPlatform.Reflection.Resources.SR.Format(SR.UnexpectedSignatureHeader, expectedKind, header.Kind, header.RawValue));
}
}
private void CheckMethodOrPropertyHeader(SignatureHeader header)
{
SignatureKind kind = header.Kind;
if (kind != SignatureKind.Method && kind != SignatureKind.Property)
{
throw new BadImageFormatException(StarkPlatform.Reflection.Resources.SR.Format(SR.UnexpectedSignatureHeader2, SignatureKind.Property, SignatureKind.Method, header.Kind, header.RawValue));
}
}
}
}
| 45.762178 | 203 | 0.615553 | [
"BSD-2-Clause",
"MIT"
] | encrypt0r/stark | src/compiler/StarkPlatform.Reflection.Metadata/Metadata/Ecma335/SignatureDecoder.cs | 15,971 | C# |
using UnityEngine;
using UnityEngine.UI;
namespace NomaiVR.Helpers
{
public static class MenuHelper
{
public static void AddPauseMenuAction(this PauseMenuManager pauseMenu, string name, int order, SubmitAction.SubmitActionEvent onSubmit)
{
var pauseItems = pauseMenu._pauseMenu.transform.Find("PauseMenuItemsLayout");
var buttonTemplate = pauseItems.Find("Button-Options").gameObject;
var newPauseMenuButton = Object.Instantiate(buttonTemplate);
newPauseMenuButton.transform.SetParent(pauseItems);
newPauseMenuButton.transform.SetSiblingIndex(order);
var text = newPauseMenuButton.GetComponentInChildren<Text>(true);
Object.Destroy(newPauseMenuButton.GetComponent<Menu>());
Object.Destroy(newPauseMenuButton.GetComponent<SubmitActionMenu>());
Object.Destroy(text.gameObject.GetComponent<LocalizedText>());
var submitAction = newPauseMenuButton.AddComponent<SubmitAction>();
submitAction.OnSubmitAction += onSubmit;
text.text = name;
}
}
}
| 43.153846 | 143 | 0.69697 | [
"MIT"
] | 12090113/nomai-vr | NomaiVR/Helpers/MenuHelper.cs | 1,124 | C# |
/*
* Square Connect API
*
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: developers@squareup.com
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using NUnit.Framework;
using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Square.Connect.Api;
using Square.Connect.Model;
using Square.Connect.Client;
using System.Reflection;
namespace Square.Connect.Test
{
/// <summary>
/// Class for testing ListCustomersResponse
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the model.
/// </remarks>
[TestFixture]
public class ListCustomersResponseTests
{
// TODO uncomment below to declare an instance variable for ListCustomersResponse
//private ListCustomersResponse instance;
/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of ListCustomersResponse
//instance = new ListCustomersResponse();
}
/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{
}
/// <summary>
/// Test an instance of ListCustomersResponse
/// </summary>
[Test]
public void ListCustomersResponseInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" ListCustomersResponse
//Assert.IsInstanceOfType<ListCustomersResponse> (instance, "variable 'instance' is a ListCustomersResponse");
}
/// <summary>
/// Test the property 'Errors'
/// </summary>
[Test]
public void ErrorsTest()
{
// TODO unit test for the property 'Errors'
}
/// <summary>
/// Test the property 'Customers'
/// </summary>
[Test]
public void CustomersTest()
{
// TODO unit test for the property 'Customers'
}
/// <summary>
/// Test the property 'Cursor'
/// </summary>
[Test]
public void CursorTest()
{
// TODO unit test for the property 'Cursor'
}
}
}
| 25.368421 | 122 | 0.582573 | [
"Apache-2.0"
] | NimmoJustin/connect-csharp-sdk | src/Square.Connect.Test/Model/ListCustomersResponseTests.cs | 2,410 | C# |
using System;
using HtmlAgilityPack;
namespace RohlikAPI.Model
{
public class Product
{
public string Name { get; set; }
public double Price { get; set; }
public double PricePerUnit { get; set; }
public string Unit { get; set; }
public bool IsDiscounted { get; set; }
public double? OriginalPrice { get; set; }
public DateTime? DiscountedUntil { get; set; }
public string ProductUrl { get; set; }
public string ImageUrl { get; set; }
public bool IsSoldOut { get; set; }
}
} | 29.842105 | 54 | 0.603175 | [
"MIT"
] | notdev/RohlikAPI | RohlikAPI/Model/Product.cs | 569 | C# |
/*
* Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
using Amazon;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Util;
using Amazon.S3;
using Amazon.S3.Internal;
using Amazon.S3.Model;
using Amazon.Util;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AWSSDK.UnitTests
{
[TestClass]
public class SignatureVersionTests
{
[TestMethod]
[TestCategory("S3")]
public void TestS3SignerSignatureVersion()
{
var defaultClientConfigSignatureVersion = (new AmazonS3Config{
RegionEndpoint = RegionEndpoint.USEast1
}).SignatureVersion;
var defaultAWSConfigsS3UseSignatureVersion4 = AWSConfigsS3.UseSignatureVersion4;
// customers don't control IRequest.UseSigV4 because it's in the Internal namespace
TestS3Signer(false, defaultClientConfigSignatureVersion, defaultAWSConfigsS3UseSignatureVersion4, true);
TestS3Signer(true, defaultClientConfigSignatureVersion, defaultAWSConfigsS3UseSignatureVersion4, true);
TestS3Signer(false, null, false, false);
TestS3Signer(false, null, true, true);
TestS3Signer(false, "2", false, false);
TestS3Signer(false, "2", true, false);
TestS3Signer(false, "4", false, true);
TestS3Signer(false, "4", true, true);
TestS3Signer(false, "garbage", false, false);
TestS3Signer(false, "garbage", true, true);
TestS3Signer(true, null, false, true);
TestS3Signer(true, null, true, true);
TestS3Signer(true, "2", false, true);
TestS3Signer(true, "2", true, true);
TestS3Signer(true, "4", false, true);
TestS3Signer(true, "4", true, true);
TestS3Signer(true, "garbage", false, true);
TestS3Signer(true, "garbage", true, true);
}
private void TestS3Signer(bool requestUseSigV4, string clientConfigSignatureVersion,
bool awsConfigsS3UseSignatureVersion4, bool expectSigV4)
{
var originalAWSConfigsS3UseSignatureVersion4 = AWSConfigsS3.UseSignatureVersion4;
try
{
AWSConfigsS3.UseSignatureVersion4 = awsConfigsS3UseSignatureVersion4;
var signer = new S3Signer();
var putObjectRequest = new PutObjectRequest();
var iRequest = new DefaultRequest(putObjectRequest, "s3")
{
UseSigV4 = requestUseSigV4,
Endpoint = new System.Uri("https://does_not_matter.com")
};
var config = new AmazonS3Config
{
SignatureVersion = clientConfigSignatureVersion,
RegionEndpoint = RegionEndpoint.USWest1
};
signer.Sign(iRequest, config, new RequestMetrics(), "ACCESS", "SECRET");
Assert.IsTrue(iRequest.Headers.ContainsKey(HeaderKeys.AuthorizationHeader));
Assert.AreEqual(expectSigV4, iRequest.Headers[HeaderKeys.AuthorizationHeader].Contains("aws4_request"));
}
finally
{
AWSConfigsS3.UseSignatureVersion4 = originalAWSConfigsS3UseSignatureVersion4;
}
}
}
} | 42.934783 | 120 | 0.622025 | [
"Apache-2.0"
] | Bio2hazard/aws-sdk-net | sdk/test/Services/S3/UnitTests/Custom/SignatureVersionTests.cs | 3,950 | C# |
using Checkout.ApiServices.Cards.ResponseModels;
using Checkout.ApiServices.Charges.RequestModels;
using Checkout.ApiServices.SharedModels;
using System;
using System.Collections.Generic;
using Checkout.ApiServices.RecurringPayments.RequestModels;
using Newtonsoft.Json;
namespace Checkout.ApiServices.Charges.ResponseModels
{
public class Charge : DefaultCardCharge
{
public string Id { get; set; }
public string OriginalId { get; set; }
public bool LiveMode { get; set; }
public string Created { get; set; }
public bool Used { get; set; }
public Card Card { get; set; }
public string ResponseMessage { get; set; }
public string ResponseAdvancedInfo { get; set; }
public string ResponseCode { get; set; }
public string Status { get; set; }
public bool IsCascaded { get; set; }
public string AuthCode { get; set; }
public List<CustomerPaymentPlan> CustomerPaymentPlans { get; set; }
public LocalPayment LocalPayment { get; set; }
public string Enrolled { get; set; }
public string Xid { get; set; }
public string SignatureValid { get; set; }
public string AuthenticationResponse { get; set; }
public string Eci { get; set; }
public string Cavv { get; set; }
}
}
| 38.142857 | 75 | 0.66367 | [
"MIT"
] | ioan-ghisoi-cko/checkout-net-library | Checkout.ApiClient.NetStandard/ApiServices/Charges/ResponseModels/Charge.cs | 1,335 | C# |
using System.Collections.Generic;
using Essensoft.Paylink.Alipay.Response;
namespace Essensoft.Paylink.Alipay.Request
{
/// <summary>
/// alipay.open.mini.data.visit.query
/// </summary>
public class AlipayOpenMiniDataVisitQueryRequest : IAlipayRequest<AlipayOpenMiniDataVisitQueryResponse>
{
/// <summary>
/// 小程序当日访问数据查询
/// </summary>
public string BizContent { get; set; }
#region IAlipayRequest Members
private bool needEncrypt = false;
private string apiVersion = "1.0";
private string terminalType;
private string terminalInfo;
private string prodCode;
private string notifyUrl;
private string returnUrl;
private AlipayObject bizModel;
public void SetNeedEncrypt(bool needEncrypt)
{
this.needEncrypt = needEncrypt;
}
public bool GetNeedEncrypt()
{
return needEncrypt;
}
public void SetNotifyUrl(string notifyUrl)
{
this.notifyUrl = notifyUrl;
}
public string GetNotifyUrl()
{
return notifyUrl;
}
public void SetReturnUrl(string returnUrl)
{
this.returnUrl = returnUrl;
}
public string GetReturnUrl()
{
return returnUrl;
}
public void SetTerminalType(string terminalType)
{
this.terminalType = terminalType;
}
public string GetTerminalType()
{
return terminalType;
}
public void SetTerminalInfo(string terminalInfo)
{
this.terminalInfo = terminalInfo;
}
public string GetTerminalInfo()
{
return terminalInfo;
}
public void SetProdCode(string prodCode)
{
this.prodCode = prodCode;
}
public string GetProdCode()
{
return prodCode;
}
public string GetApiName()
{
return "alipay.open.mini.data.visit.query";
}
public void SetApiVersion(string apiVersion)
{
this.apiVersion = apiVersion;
}
public string GetApiVersion()
{
return apiVersion;
}
public IDictionary<string, string> GetParameters()
{
var parameters = new AlipayDictionary
{
{ "biz_content", BizContent }
};
return parameters;
}
public AlipayObject GetBizModel()
{
return bizModel;
}
public void SetBizModel(AlipayObject bizModel)
{
this.bizModel = bizModel;
}
#endregion
}
}
| 22.556452 | 107 | 0.54487 | [
"MIT"
] | fory77/paylink | src/Essensoft.Paylink.Alipay/Request/AlipayOpenMiniDataVisitQueryRequest.cs | 2,821 | C# |
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// ----------------------------------------------------------------------------------
using AutoMapper;
using Microsoft.Azure.Commands.Network.Models;
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
using Microsoft.Azure.Management.Network;
using System;
using System.Collections.Generic;
using System.Management.Automation;
using MNM = Microsoft.Azure.Management.Network.Models;
namespace Microsoft.Azure.Commands.Network
{
[Cmdlet(VerbsCommon.Add, "AzureRmVpnClientRevokedCertificate"), OutputType(typeof(PSVpnClientRevokedCertificate))]
public class AddAzureVpnClientRevokedCertificateCommand : VirtualNetworkGatewayBaseCmdlet
{
[Alias("ResourceName")]
[Parameter(
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The vpn client revoked certificate name.")]
[ValidateNotNullOrEmpty]
public virtual string VpnClientRevokedCertificateName { get; set; }
[Parameter(
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The virtual network gateway name.")]
[ValidateNotNullOrEmpty]
public virtual string VirtualNetworkGatewayName { get; set; }
[Parameter(
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The resource group name.")]
[ResourceGroupCompleter]
[ValidateNotNullOrEmpty]
public virtual string ResourceGroupName { get; set; }
[Parameter(
Mandatory = true,
HelpMessage = "The thumbprint of the VpnClient certificate to be revoked.")]
[ValidateNotNullOrEmpty]
public string Thumbprint { get; set; }
public override void Execute()
{
base.Execute();
if (!this.IsVirtualNetworkGatewayPresent(ResourceGroupName, VirtualNetworkGatewayName))
{
throw new ArgumentException(Microsoft.Azure.Commands.Network.Properties.Resources.ResourceNotFound);
}
var vnetGateway = this.GetVirtualNetworkGateway(this.ResourceGroupName, this.VirtualNetworkGatewayName);
if (vnetGateway.VpnClientConfiguration == null)
{
vnetGateway.VpnClientConfiguration = new PSVpnClientConfiguration();
}
if (vnetGateway.VpnClientConfiguration.VpnClientRevokedCertificates == null)
{
vnetGateway.VpnClientConfiguration.VpnClientRevokedCertificates = new List<PSVpnClientRevokedCertificate>();
}
else
{
// Make sure the same vpn client certificate is not already in the Revoked certificates list on Gateway
PSVpnClientRevokedCertificate vpnClientRevokedCertificate = vnetGateway.VpnClientConfiguration.VpnClientRevokedCertificates.Find(cert => cert.Name.Equals(VpnClientRevokedCertificateName)
&& cert.Thumbprint.Equals(Thumbprint));
if (vpnClientRevokedCertificate != null)
{
throw new ArgumentException("Same vpn client certificate:" + VpnClientRevokedCertificateName + " Thumbprint:" + Thumbprint +
" is already in Revoked certificates list on Gateway! No need to revoke again!");
}
}
PSVpnClientRevokedCertificate newVpnClientCertToRevoke = new PSVpnClientRevokedCertificate()
{
Name = VpnClientRevokedCertificateName,
Thumbprint = Thumbprint
};
vnetGateway.VpnClientConfiguration.VpnClientRevokedCertificates.Add(newVpnClientCertToRevoke);
// Map to the sdk object
var virtualnetGatewayModel = NetworkResourceManagerProfile.Mapper.Map<MNM.VirtualNetworkGateway>(vnetGateway);
virtualnetGatewayModel.Tags = TagsConversionHelper.CreateTagDictionary(vnetGateway.Tag, validate: true);
this.VirtualNetworkGatewayClient.CreateOrUpdate(ResourceGroupName, VirtualNetworkGatewayName, virtualnetGatewayModel);
var getvirtualnetGateway = this.GetVirtualNetworkGateway(ResourceGroupName, VirtualNetworkGatewayName);
WriteObject(getvirtualnetGateway.VpnClientConfiguration.VpnClientRevokedCertificates, true);
}
}
}
| 46.651786 | 203 | 0.655311 | [
"MIT"
] | Andrean/azure-powershell | src/StackAdmin/Network/Commands.Network/VirtualNetworkGateway/AddAzureVpnClientRevokedCertificateCommand.cs | 5,116 | C# |
using MQTTProcessor;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace ProcessMQTT {
class Program {
static void Main(string[] args) {
MQTTProcessor.MQTTManager m2m = new MQTTProcessor.MQTTManager("gloveboxWUS.cloudapp.net", "gb/#");
m2m.OnDataEvent += m2m_OnDataEvent;
Thread.Sleep(Timeout.Infinite);
}
static void m2m_OnDataEvent(object sender, EventArgs e) {
var fact = ((MQTTManager.DataEventArgs)e).fact;
System.Console.WriteLine(string.Format("{0}, {1}, {2}, {3}",fact.Topic, fact.Dev, fact.Type, fact.Val[0]));
}
}
}
| 26.428571 | 119 | 0.641892 | [
"MIT"
] | MakerDen/IoT-Dashboard | ProcessMQTT/Program.cs | 742 | C# |
using Microsoft.Win32.SafeHandles;
using Spfx.Utilities.Runtime;
using System;
using System.Runtime.InteropServices;
using System.Threading;
namespace Spfx.Utilities
{
internal static class SafeHandleUtilities
{
private class ZeroSafeHandle : NoDisposeSafeHandle
{
public override bool IsInvalid => true;
protected override bool ReleaseHandle()
{
return true;
}
}
public static SafeHandle NullSafeHandle { get; } = new ZeroSafeHandle();
public static string SerializeHandle(SafeHandle safeHandle)
{
return SerializeHandle(safeHandle.DangerousGetHandle());
}
public static string SerializeHandle(IntPtr intPtr)
{
return intPtr.ToInt64().ToString();
}
public static IntPtr DeserializeRawHandleFromString(string str)
{
return new IntPtr(long.Parse(str));
}
public static SafeHandle DeserializeHandleFromString(string str)
{
var intptr = DeserializeRawHandleFromString(str);
return CreateSafeHandleFromIntPtr(intptr);
}
public static SafeHandle CreateSafeHandleFromIntPtr(IntPtr intptr, bool ownsHandle = true)
{
return HostFeaturesHelper.IsWindows
? new SafeWaitHandle(intptr, ownsHandle)
: throw new NotImplementedException();
}
public static WaitHandle CreateWaitHandleFromString(string str)
{
return CreateWaitHandle(DeserializeHandleFromString(str));
}
public static WaitHandle CreateWaitHandle(SafeHandle handle)
{
return new SimpleWaitHandle((SafeWaitHandle)handle);
}
private class SimpleWaitHandle : WaitHandle
{
public SimpleWaitHandle(SafeWaitHandle h)
{
SafeWaitHandle = h;
}
}
}
}
| 29.271429 | 99 | 0.597365 | [
"MIT"
] | fbrosseau/SimpleProcessFramework | SimpleProcessFramework/Utilities/SafeHandleUtilities.cs | 2,051 | C# |
using System;
using System.Collections.Generic;
using Windows.Foundation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
namespace Cloudsdale_Metro.Common {
/// <summary>
/// Wrapper for <see cref="RichTextBlock"/> that creates as many additional overflow
/// columns as needed to fit the available content.
/// </summary>
/// <example>
/// The following creates a collection of 400-pixel wide columns spaced 50 pixels apart
/// to contain arbitrary data-bound content:
/// <code>
/// <RichTextColumns>
/// <RichTextColumns.ColumnTemplate>
/// <DataTemplate>
/// <RichTextBlockOverflow Width="400" Margin="50,0,0,0"/>
/// </DataTemplate>
/// </RichTextColumns.ColumnTemplate>
///
/// <RichTextBlock Width="400">
/// <Paragraph>
/// <Run Text="{Binding Content}"/>
/// </Paragraph>
/// </RichTextBlock>
/// </RichTextColumns>
/// </code>
/// </example>
/// <remarks>Typically used in a horizontally scrolling region where an unbounded amount of
/// space allows for all needed columns to be created. When used in a vertically scrolling
/// space there will never be any additional columns.</remarks>
[Windows.UI.Xaml.Markup.ContentProperty(Name = "RichTextContent")]
public sealed class RichTextColumns : Panel {
/// <summary>
/// Identifies the <see cref="RichTextContent"/> dependency property.
/// </summary>
public static readonly DependencyProperty RichTextContentProperty =
DependencyProperty.Register("RichTextContent", typeof(RichTextBlock),
typeof(RichTextColumns), new PropertyMetadata(null, ResetOverflowLayout));
/// <summary>
/// Identifies the <see cref="ColumnTemplate"/> dependency property.
/// </summary>
public static readonly DependencyProperty ColumnTemplateProperty =
DependencyProperty.Register("ColumnTemplate", typeof(DataTemplate),
typeof(RichTextColumns), new PropertyMetadata(null, ResetOverflowLayout));
/// <summary>
/// Initializes a new instance of the <see cref="RichTextColumns"/> class.
/// </summary>
public RichTextColumns() {
HorizontalAlignment = HorizontalAlignment.Left;
}
/// <summary>
/// Gets or sets the initial rich text content to be used as the first column.
/// </summary>
public RichTextBlock RichTextContent {
get { return (RichTextBlock)GetValue(RichTextContentProperty); }
set { SetValue(RichTextContentProperty, value); }
}
/// <summary>
/// Gets or sets the template used to create additional
/// <see cref="RichTextBlockOverflow"/> instances.
/// </summary>
public DataTemplate ColumnTemplate {
get { return (DataTemplate)GetValue(ColumnTemplateProperty); }
set { SetValue(ColumnTemplateProperty, value); }
}
/// <summary>
/// Invoked when the content or overflow template is changed to recreate the column layout.
/// </summary>
/// <param name="d">Instance of <see cref="RichTextColumns"/> where the change
/// occurred.</param>
/// <param name="e">Event data describing the specific change.</param>
private static void ResetOverflowLayout(DependencyObject d, DependencyPropertyChangedEventArgs e) {
// When dramatic changes occur, rebuild the column layout from scratch
var target = d as RichTextColumns;
if (target != null) {
target._overflowColumns = null;
target.Children.Clear();
target.InvalidateMeasure();
}
}
/// <summary>
/// Lists overflow columns already created. Must maintain a 1:1 relationship with
/// instances in the <see cref="Panel.Children"/> collection following the initial
/// RichTextBlock child.
/// </summary>
private List<RichTextBlockOverflow> _overflowColumns;
/// <summary>
/// Determines whether additional overflow columns are needed and if existing columns can
/// be removed.
/// </summary>
/// <param name="availableSize">The size of the space available, used to constrain the
/// number of additional columns that can be created.</param>
/// <returns>The resulting size of the original content plus any extra columns.</returns>
protected override Size MeasureOverride(Size availableSize) {
if (RichTextContent == null) return new Size(0, 0);
// Make sure the RichTextBlock is a child, using the lack of
// a list of additional columns as a sign that this hasn't been
// done yet
if (_overflowColumns == null) {
Children.Add(RichTextContent);
_overflowColumns = new List<RichTextBlockOverflow>();
}
// Start by measuring the original RichTextBlock content
RichTextContent.Measure(availableSize);
var maxWidth = RichTextContent.DesiredSize.Width;
var maxHeight = RichTextContent.DesiredSize.Height;
var hasOverflow = RichTextContent.HasOverflowContent;
// Make sure there are enough overflow columns
int overflowIndex = 0;
while (hasOverflow && maxWidth < availableSize.Width && ColumnTemplate != null) {
// Use existing overflow columns until we run out, then create
// more from the supplied template
RichTextBlockOverflow overflow;
if (_overflowColumns.Count > overflowIndex) {
overflow = _overflowColumns[overflowIndex];
} else {
overflow = (RichTextBlockOverflow)ColumnTemplate.LoadContent();
_overflowColumns.Add(overflow);
Children.Add(overflow);
if (overflowIndex == 0) {
RichTextContent.OverflowContentTarget = overflow;
} else {
_overflowColumns[overflowIndex - 1].OverflowContentTarget = overflow;
}
}
// Measure the new column and prepare to repeat as necessary
overflow.Measure(new Size(availableSize.Width - maxWidth, availableSize.Height));
maxWidth += overflow.DesiredSize.Width;
maxHeight = Math.Max(maxHeight, overflow.DesiredSize.Height);
hasOverflow = overflow.HasOverflowContent;
overflowIndex++;
}
// Disconnect extra columns from the overflow chain, remove them from our private list
// of columns, and remove them as children
if (_overflowColumns.Count > overflowIndex) {
if (overflowIndex == 0) {
RichTextContent.OverflowContentTarget = null;
} else {
_overflowColumns[overflowIndex - 1].OverflowContentTarget = null;
}
while (_overflowColumns.Count > overflowIndex) {
_overflowColumns.RemoveAt(overflowIndex);
Children.RemoveAt(overflowIndex + 1);
}
}
// Report final determined size
return new Size(maxWidth, maxHeight);
}
/// <summary>
/// Arranges the original content and all extra columns.
/// </summary>
/// <param name="finalSize">Defines the size of the area the children must be arranged
/// within.</param>
/// <returns>The size of the area the children actually required.</returns>
protected override Size ArrangeOverride(Size finalSize) {
double maxWidth = 0;
double maxHeight = 0;
foreach (var child in Children) {
child.Arrange(new Rect(maxWidth, 0, child.DesiredSize.Width, finalSize.Height));
maxWidth += child.DesiredSize.Width;
maxHeight = Math.Max(maxHeight, child.DesiredSize.Height);
}
return new Size(maxWidth, maxHeight);
}
}
}
| 45.451087 | 107 | 0.600502 | [
"MIT"
] | cloudsdaleapp/cloudsdale-metro | Cloudsdale-Metro/Common/RichTextColumns.cs | 8,365 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Models
{
public class Session
{
#region Variable
private static Session session = new Session();
private static List<Aux> Sessiones = new List<Aux>();
#endregion
#region Propiedades
public static Session Instancia
{
get {
if (session == null) {
session = new Session();
}
return session;
}
}
#endregion
#region Constructor
protected Session() { }
#endregion
#region Metodos Publicos
#region Add New Connection
public bool addConnection(string cookie, string connectionId = "")
{
try
{
if (cookie == "" || cookie == string.Empty)
throw new Exception("The value of the cookie can not be empty.");
if (Sessiones == null)
Sessiones = new List<Aux>();
if (Sessiones.Count == 0)
{
Sessiones.Add(new Aux() { Cookie = cookie, ConnectionID = connectionId });
}
else
{
if (Sessiones.Where(x => x.Cookie == cookie).ToList().Count > 0)
throw new Exception("The cookie id is registered.");
}
}
catch (Exception ex) { throw ex; }
return true;
}
#endregion
#region Update Connection
public bool updateConnectionIdByCookie(string cookie, string connectionId)
{
try
{
if (Sessiones == null)
throw new Exception("The connection list is empty.");
Sessiones.ForEach(delegate(Aux aux)
{
if (cookie == aux.Cookie)
aux.ConnectionID = connectionId;
});
}
catch (Exception) { throw; }
return true;
}
#endregion
#region Delete Connection By Cookie
public bool DeleteConnectionIdByCookie(string cookie)
{
try
{
if (Sessiones == null)
throw new Exception("The connection list is empty.");
Sessiones = Sessiones.Where(x => x.Cookie == cookie).ToList<Aux>();
}
catch (Exception) { throw; }
return true;
}
#endregion
#region Delete Connection By Connection ID
public bool DeleteConnectionIdByConnectionID(string connectionId)
{
try
{
if (Sessiones == null)
throw new Exception("The connection list is empty.");
Sessiones = Sessiones.Where(x => x.ConnectionID == connectionId).ToList<Aux>();
}
catch (Exception) { throw; }
return true;
}
#endregion
#region Get Connection ID by Cookie
public string getConnectionIdByCookie(string cookie)
{
try
{
if (Sessiones == null)
throw new Exception("The connection list is empty.");
return ((Aux)Sessiones.Where(x => x.Cookie == cookie).Select( y => y).FirstOrDefault()).ConnectionID;
}
catch (Exception) { throw; }
}
#endregion
#region Get ConnectionId By Connection ID
public string getConnectionIdByConnectionID(string connectionId)
{
try
{
if (Sessiones == null)
throw new Exception("The connection list is empty.");
return ((Aux)Sessiones.Where(x => x.ConnectionID == connectionId).Select(y => y).FirstOrDefault()).Cookie;
}
catch (Exception) { throw; }
}
#endregion
#endregion
}
#region Clase Aux
class Aux
{
public string Cookie { get; set; }
public string ConnectionID { get; set; }
public Aux() { }
}
#endregion
} | 26.949686 | 122 | 0.484247 | [
"MIT"
] | knivek91/SignalR-Example | SignalR/Models/Session.cs | 4,287 | C# |
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("TheBestSeries.Droid.Resource", IsApplication=true)]
namespace TheBestSeries.Droid
{
[System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::TheBestSeries.Droid.Resource.Attribute.actionBarSize;
}
public partial class Animation
{
// aapt resource value: 0x7f050000
public const int abc_fade_in = 2131034112;
// aapt resource value: 0x7f050001
public const int abc_fade_out = 2131034113;
// aapt resource value: 0x7f050002
public const int abc_grow_fade_in_from_bottom = 2131034114;
// aapt resource value: 0x7f050003
public const int abc_popup_enter = 2131034115;
// aapt resource value: 0x7f050004
public const int abc_popup_exit = 2131034116;
// aapt resource value: 0x7f050005
public const int abc_shrink_fade_out_from_bottom = 2131034117;
// aapt resource value: 0x7f050006
public const int abc_slide_in_bottom = 2131034118;
// aapt resource value: 0x7f050007
public const int abc_slide_in_top = 2131034119;
// aapt resource value: 0x7f050008
public const int abc_slide_out_bottom = 2131034120;
// aapt resource value: 0x7f050009
public const int abc_slide_out_top = 2131034121;
// aapt resource value: 0x7f05000a
public const int design_bottom_sheet_slide_in = 2131034122;
// aapt resource value: 0x7f05000b
public const int design_bottom_sheet_slide_out = 2131034123;
// aapt resource value: 0x7f05000c
public const int design_snackbar_in = 2131034124;
// aapt resource value: 0x7f05000d
public const int design_snackbar_out = 2131034125;
// aapt resource value: 0x7f05000e
public const int tooltip_enter = 2131034126;
// aapt resource value: 0x7f05000f
public const int tooltip_exit = 2131034127;
static Animation()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animation()
{
}
}
public partial class Animator
{
// aapt resource value: 0x7f060000
public const int design_appbar_state_list_animator = 2131099648;
static Animator()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animator()
{
}
}
public partial class Attribute
{
// aapt resource value: 0x7f01006b
public const int actionBarDivider = 2130772075;
// aapt resource value: 0x7f01006c
public const int actionBarItemBackground = 2130772076;
// aapt resource value: 0x7f010065
public const int actionBarPopupTheme = 2130772069;
// aapt resource value: 0x7f01006a
public const int actionBarSize = 2130772074;
// aapt resource value: 0x7f010067
public const int actionBarSplitStyle = 2130772071;
// aapt resource value: 0x7f010066
public const int actionBarStyle = 2130772070;
// aapt resource value: 0x7f010061
public const int actionBarTabBarStyle = 2130772065;
// aapt resource value: 0x7f010060
public const int actionBarTabStyle = 2130772064;
// aapt resource value: 0x7f010062
public const int actionBarTabTextStyle = 2130772066;
// aapt resource value: 0x7f010068
public const int actionBarTheme = 2130772072;
// aapt resource value: 0x7f010069
public const int actionBarWidgetTheme = 2130772073;
// aapt resource value: 0x7f010086
public const int actionButtonStyle = 2130772102;
// aapt resource value: 0x7f010082
public const int actionDropDownStyle = 2130772098;
// aapt resource value: 0x7f0100dd
public const int actionLayout = 2130772189;
// aapt resource value: 0x7f01006d
public const int actionMenuTextAppearance = 2130772077;
// aapt resource value: 0x7f01006e
public const int actionMenuTextColor = 2130772078;
// aapt resource value: 0x7f010071
public const int actionModeBackground = 2130772081;
// aapt resource value: 0x7f010070
public const int actionModeCloseButtonStyle = 2130772080;
// aapt resource value: 0x7f010073
public const int actionModeCloseDrawable = 2130772083;
// aapt resource value: 0x7f010075
public const int actionModeCopyDrawable = 2130772085;
// aapt resource value: 0x7f010074
public const int actionModeCutDrawable = 2130772084;
// aapt resource value: 0x7f010079
public const int actionModeFindDrawable = 2130772089;
// aapt resource value: 0x7f010076
public const int actionModePasteDrawable = 2130772086;
// aapt resource value: 0x7f01007b
public const int actionModePopupWindowStyle = 2130772091;
// aapt resource value: 0x7f010077
public const int actionModeSelectAllDrawable = 2130772087;
// aapt resource value: 0x7f010078
public const int actionModeShareDrawable = 2130772088;
// aapt resource value: 0x7f010072
public const int actionModeSplitBackground = 2130772082;
// aapt resource value: 0x7f01006f
public const int actionModeStyle = 2130772079;
// aapt resource value: 0x7f01007a
public const int actionModeWebSearchDrawable = 2130772090;
// aapt resource value: 0x7f010063
public const int actionOverflowButtonStyle = 2130772067;
// aapt resource value: 0x7f010064
public const int actionOverflowMenuStyle = 2130772068;
// aapt resource value: 0x7f0100df
public const int actionProviderClass = 2130772191;
// aapt resource value: 0x7f0100de
public const int actionViewClass = 2130772190;
// aapt resource value: 0x7f01008e
public const int activityChooserViewStyle = 2130772110;
// aapt resource value: 0x7f0100b3
public const int alertDialogButtonGroupStyle = 2130772147;
// aapt resource value: 0x7f0100b4
public const int alertDialogCenterButtons = 2130772148;
// aapt resource value: 0x7f0100b2
public const int alertDialogStyle = 2130772146;
// aapt resource value: 0x7f0100b5
public const int alertDialogTheme = 2130772149;
// aapt resource value: 0x7f0100cb
public const int allowStacking = 2130772171;
// aapt resource value: 0x7f0100cc
public const int alpha = 2130772172;
// aapt resource value: 0x7f0100da
public const int alphabeticModifiers = 2130772186;
// aapt resource value: 0x7f0100d3
public const int arrowHeadLength = 2130772179;
// aapt resource value: 0x7f0100d4
public const int arrowShaftLength = 2130772180;
// aapt resource value: 0x7f0100ba
public const int autoCompleteTextViewStyle = 2130772154;
// aapt resource value: 0x7f010054
public const int autoSizeMaxTextSize = 2130772052;
// aapt resource value: 0x7f010053
public const int autoSizeMinTextSize = 2130772051;
// aapt resource value: 0x7f010052
public const int autoSizePresetSizes = 2130772050;
// aapt resource value: 0x7f010051
public const int autoSizeStepGranularity = 2130772049;
// aapt resource value: 0x7f010050
public const int autoSizeTextType = 2130772048;
// aapt resource value: 0x7f01002e
public const int background = 2130772014;
// aapt resource value: 0x7f010030
public const int backgroundSplit = 2130772016;
// aapt resource value: 0x7f01002f
public const int backgroundStacked = 2130772015;
// aapt resource value: 0x7f010116
public const int backgroundTint = 2130772246;
// aapt resource value: 0x7f010117
public const int backgroundTintMode = 2130772247;
// aapt resource value: 0x7f0100d5
public const int barLength = 2130772181;
// aapt resource value: 0x7f010141
public const int behavior_autoHide = 2130772289;
// aapt resource value: 0x7f01011e
public const int behavior_hideable = 2130772254;
// aapt resource value: 0x7f01014a
public const int behavior_overlapTop = 2130772298;
// aapt resource value: 0x7f01011d
public const int behavior_peekHeight = 2130772253;
// aapt resource value: 0x7f01011f
public const int behavior_skipCollapsed = 2130772255;
// aapt resource value: 0x7f01013f
public const int borderWidth = 2130772287;
// aapt resource value: 0x7f01008b
public const int borderlessButtonStyle = 2130772107;
// aapt resource value: 0x7f010139
public const int bottomSheetDialogTheme = 2130772281;
// aapt resource value: 0x7f01013a
public const int bottomSheetStyle = 2130772282;
// aapt resource value: 0x7f010088
public const int buttonBarButtonStyle = 2130772104;
// aapt resource value: 0x7f0100b8
public const int buttonBarNegativeButtonStyle = 2130772152;
// aapt resource value: 0x7f0100b9
public const int buttonBarNeutralButtonStyle = 2130772153;
// aapt resource value: 0x7f0100b7
public const int buttonBarPositiveButtonStyle = 2130772151;
// aapt resource value: 0x7f010087
public const int buttonBarStyle = 2130772103;
// aapt resource value: 0x7f01010b
public const int buttonGravity = 2130772235;
// aapt resource value: 0x7f010043
public const int buttonPanelSideLayout = 2130772035;
// aapt resource value: 0x7f0100bb
public const int buttonStyle = 2130772155;
// aapt resource value: 0x7f0100bc
public const int buttonStyleSmall = 2130772156;
// aapt resource value: 0x7f0100cd
public const int buttonTint = 2130772173;
// aapt resource value: 0x7f0100ce
public const int buttonTintMode = 2130772174;
// aapt resource value: 0x7f010017
public const int cardBackgroundColor = 2130771991;
// aapt resource value: 0x7f010018
public const int cardCornerRadius = 2130771992;
// aapt resource value: 0x7f010019
public const int cardElevation = 2130771993;
// aapt resource value: 0x7f01001a
public const int cardMaxElevation = 2130771994;
// aapt resource value: 0x7f01001c
public const int cardPreventCornerOverlap = 2130771996;
// aapt resource value: 0x7f01001b
public const int cardUseCompatPadding = 2130771995;
// aapt resource value: 0x7f0100bd
public const int checkboxStyle = 2130772157;
// aapt resource value: 0x7f0100be
public const int checkedTextViewStyle = 2130772158;
// aapt resource value: 0x7f0100ee
public const int closeIcon = 2130772206;
// aapt resource value: 0x7f010040
public const int closeItemLayout = 2130772032;
// aapt resource value: 0x7f01010d
public const int collapseContentDescription = 2130772237;
// aapt resource value: 0x7f01010c
public const int collapseIcon = 2130772236;
// aapt resource value: 0x7f01012c
public const int collapsedTitleGravity = 2130772268;
// aapt resource value: 0x7f010126
public const int collapsedTitleTextAppearance = 2130772262;
// aapt resource value: 0x7f0100cf
public const int color = 2130772175;
// aapt resource value: 0x7f0100aa
public const int colorAccent = 2130772138;
// aapt resource value: 0x7f0100b1
public const int colorBackgroundFloating = 2130772145;
// aapt resource value: 0x7f0100ae
public const int colorButtonNormal = 2130772142;
// aapt resource value: 0x7f0100ac
public const int colorControlActivated = 2130772140;
// aapt resource value: 0x7f0100ad
public const int colorControlHighlight = 2130772141;
// aapt resource value: 0x7f0100ab
public const int colorControlNormal = 2130772139;
// aapt resource value: 0x7f0100ca
public const int colorError = 2130772170;
// aapt resource value: 0x7f0100a8
public const int colorPrimary = 2130772136;
// aapt resource value: 0x7f0100a9
public const int colorPrimaryDark = 2130772137;
// aapt resource value: 0x7f0100af
public const int colorSwitchThumbNormal = 2130772143;
// aapt resource value: 0x7f0100f3
public const int commitIcon = 2130772211;
// aapt resource value: 0x7f0100e0
public const int contentDescription = 2130772192;
// aapt resource value: 0x7f010039
public const int contentInsetEnd = 2130772025;
// aapt resource value: 0x7f01003d
public const int contentInsetEndWithActions = 2130772029;
// aapt resource value: 0x7f01003a
public const int contentInsetLeft = 2130772026;
// aapt resource value: 0x7f01003b
public const int contentInsetRight = 2130772027;
// aapt resource value: 0x7f010038
public const int contentInsetStart = 2130772024;
// aapt resource value: 0x7f01003c
public const int contentInsetStartWithNavigation = 2130772028;
// aapt resource value: 0x7f01001d
public const int contentPadding = 2130771997;
// aapt resource value: 0x7f010021
public const int contentPaddingBottom = 2130772001;
// aapt resource value: 0x7f01001e
public const int contentPaddingLeft = 2130771998;
// aapt resource value: 0x7f01001f
public const int contentPaddingRight = 2130771999;
// aapt resource value: 0x7f010020
public const int contentPaddingTop = 2130772000;
// aapt resource value: 0x7f010127
public const int contentScrim = 2130772263;
// aapt resource value: 0x7f0100b0
public const int controlBackground = 2130772144;
// aapt resource value: 0x7f010160
public const int counterEnabled = 2130772320;
// aapt resource value: 0x7f010161
public const int counterMaxLength = 2130772321;
// aapt resource value: 0x7f010163
public const int counterOverflowTextAppearance = 2130772323;
// aapt resource value: 0x7f010162
public const int counterTextAppearance = 2130772322;
// aapt resource value: 0x7f010031
public const int customNavigationLayout = 2130772017;
// aapt resource value: 0x7f0100ed
public const int defaultQueryHint = 2130772205;
// aapt resource value: 0x7f010080
public const int dialogPreferredPadding = 2130772096;
// aapt resource value: 0x7f01007f
public const int dialogTheme = 2130772095;
// aapt resource value: 0x7f010027
public const int displayOptions = 2130772007;
// aapt resource value: 0x7f01002d
public const int divider = 2130772013;
// aapt resource value: 0x7f01008d
public const int dividerHorizontal = 2130772109;
// aapt resource value: 0x7f0100d9
public const int dividerPadding = 2130772185;
// aapt resource value: 0x7f01008c
public const int dividerVertical = 2130772108;
// aapt resource value: 0x7f0100d1
public const int drawableSize = 2130772177;
// aapt resource value: 0x7f010022
public const int drawerArrowStyle = 2130772002;
// aapt resource value: 0x7f01009f
public const int dropDownListViewStyle = 2130772127;
// aapt resource value: 0x7f010083
public const int dropdownListPreferredItemHeight = 2130772099;
// aapt resource value: 0x7f010094
public const int editTextBackground = 2130772116;
// aapt resource value: 0x7f010093
public const int editTextColor = 2130772115;
// aapt resource value: 0x7f0100bf
public const int editTextStyle = 2130772159;
// aapt resource value: 0x7f01003e
public const int elevation = 2130772030;
// aapt resource value: 0x7f01015e
public const int errorEnabled = 2130772318;
// aapt resource value: 0x7f01015f
public const int errorTextAppearance = 2130772319;
// aapt resource value: 0x7f010042
public const int expandActivityOverflowButtonDrawable = 2130772034;
// aapt resource value: 0x7f010118
public const int expanded = 2130772248;
// aapt resource value: 0x7f01012d
public const int expandedTitleGravity = 2130772269;
// aapt resource value: 0x7f010120
public const int expandedTitleMargin = 2130772256;
// aapt resource value: 0x7f010124
public const int expandedTitleMarginBottom = 2130772260;
// aapt resource value: 0x7f010123
public const int expandedTitleMarginEnd = 2130772259;
// aapt resource value: 0x7f010121
public const int expandedTitleMarginStart = 2130772257;
// aapt resource value: 0x7f010122
public const int expandedTitleMarginTop = 2130772258;
// aapt resource value: 0x7f010125
public const int expandedTitleTextAppearance = 2130772261;
// aapt resource value: 0x7f010015
public const int externalRouteEnabledDrawable = 2130771989;
// aapt resource value: 0x7f01013d
public const int fabSize = 2130772285;
// aapt resource value: 0x7f010004
public const int fastScrollEnabled = 2130771972;
// aapt resource value: 0x7f010007
public const int fastScrollHorizontalThumbDrawable = 2130771975;
// aapt resource value: 0x7f010008
public const int fastScrollHorizontalTrackDrawable = 2130771976;
// aapt resource value: 0x7f010005
public const int fastScrollVerticalThumbDrawable = 2130771973;
// aapt resource value: 0x7f010006
public const int fastScrollVerticalTrackDrawable = 2130771974;
// aapt resource value: 0x7f010171
public const int font = 2130772337;
// aapt resource value: 0x7f010055
public const int fontFamily = 2130772053;
// aapt resource value: 0x7f01016a
public const int fontProviderAuthority = 2130772330;
// aapt resource value: 0x7f01016d
public const int fontProviderCerts = 2130772333;
// aapt resource value: 0x7f01016e
public const int fontProviderFetchStrategy = 2130772334;
// aapt resource value: 0x7f01016f
public const int fontProviderFetchTimeout = 2130772335;
// aapt resource value: 0x7f01016b
public const int fontProviderPackage = 2130772331;
// aapt resource value: 0x7f01016c
public const int fontProviderQuery = 2130772332;
// aapt resource value: 0x7f010170
public const int fontStyle = 2130772336;
// aapt resource value: 0x7f010172
public const int fontWeight = 2130772338;
// aapt resource value: 0x7f010142
public const int foregroundInsidePadding = 2130772290;
// aapt resource value: 0x7f0100d2
public const int gapBetweenBars = 2130772178;
// aapt resource value: 0x7f0100ef
public const int goIcon = 2130772207;
// aapt resource value: 0x7f010148
public const int headerLayout = 2130772296;
// aapt resource value: 0x7f010023
public const int height = 2130772003;
// aapt resource value: 0x7f010037
public const int hideOnContentScroll = 2130772023;
// aapt resource value: 0x7f010164
public const int hintAnimationEnabled = 2130772324;
// aapt resource value: 0x7f01015d
public const int hintEnabled = 2130772317;
// aapt resource value: 0x7f01015c
public const int hintTextAppearance = 2130772316;
// aapt resource value: 0x7f010085
public const int homeAsUpIndicator = 2130772101;
// aapt resource value: 0x7f010032
public const int homeLayout = 2130772018;
// aapt resource value: 0x7f01002b
public const int icon = 2130772011;
// aapt resource value: 0x7f0100e2
public const int iconTint = 2130772194;
// aapt resource value: 0x7f0100e3
public const int iconTintMode = 2130772195;
// aapt resource value: 0x7f0100eb
public const int iconifiedByDefault = 2130772203;
// aapt resource value: 0x7f010095
public const int imageButtonStyle = 2130772117;
// aapt resource value: 0x7f010034
public const int indeterminateProgressStyle = 2130772020;
// aapt resource value: 0x7f010041
public const int initialActivityCount = 2130772033;
// aapt resource value: 0x7f010149
public const int insetForeground = 2130772297;
// aapt resource value: 0x7f010024
public const int isLightTheme = 2130772004;
// aapt resource value: 0x7f010146
public const int itemBackground = 2130772294;
// aapt resource value: 0x7f010144
public const int itemIconTint = 2130772292;
// aapt resource value: 0x7f010036
public const int itemPadding = 2130772022;
// aapt resource value: 0x7f010147
public const int itemTextAppearance = 2130772295;
// aapt resource value: 0x7f010145
public const int itemTextColor = 2130772293;
// aapt resource value: 0x7f010131
public const int keylines = 2130772273;
// aapt resource value: 0x7f0100ea
public const int layout = 2130772202;
// aapt resource value: 0x7f010000
public const int layoutManager = 2130771968;
// aapt resource value: 0x7f010134
public const int layout_anchor = 2130772276;
// aapt resource value: 0x7f010136
public const int layout_anchorGravity = 2130772278;
// aapt resource value: 0x7f010133
public const int layout_behavior = 2130772275;
// aapt resource value: 0x7f01012f
public const int layout_collapseMode = 2130772271;
// aapt resource value: 0x7f010130
public const int layout_collapseParallaxMultiplier = 2130772272;
// aapt resource value: 0x7f010138
public const int layout_dodgeInsetEdges = 2130772280;
// aapt resource value: 0x7f010137
public const int layout_insetEdge = 2130772279;
// aapt resource value: 0x7f010135
public const int layout_keyline = 2130772277;
// aapt resource value: 0x7f01011b
public const int layout_scrollFlags = 2130772251;
// aapt resource value: 0x7f01011c
public const int layout_scrollInterpolator = 2130772252;
// aapt resource value: 0x7f0100a7
public const int listChoiceBackgroundIndicator = 2130772135;
// aapt resource value: 0x7f010081
public const int listDividerAlertDialog = 2130772097;
// aapt resource value: 0x7f010047
public const int listItemLayout = 2130772039;
// aapt resource value: 0x7f010044
public const int listLayout = 2130772036;
// aapt resource value: 0x7f0100c7
public const int listMenuViewStyle = 2130772167;
// aapt resource value: 0x7f0100a0
public const int listPopupWindowStyle = 2130772128;
// aapt resource value: 0x7f01009a
public const int listPreferredItemHeight = 2130772122;
// aapt resource value: 0x7f01009c
public const int listPreferredItemHeightLarge = 2130772124;
// aapt resource value: 0x7f01009b
public const int listPreferredItemHeightSmall = 2130772123;
// aapt resource value: 0x7f01009d
public const int listPreferredItemPaddingLeft = 2130772125;
// aapt resource value: 0x7f01009e
public const int listPreferredItemPaddingRight = 2130772126;
// aapt resource value: 0x7f01002c
public const int logo = 2130772012;
// aapt resource value: 0x7f010110
public const int logoDescription = 2130772240;
// aapt resource value: 0x7f01014b
public const int maxActionInlineWidth = 2130772299;
// aapt resource value: 0x7f01010a
public const int maxButtonHeight = 2130772234;
// aapt resource value: 0x7f0100d7
public const int measureWithLargestChild = 2130772183;
// aapt resource value: 0x7f010009
public const int mediaRouteAudioTrackDrawable = 2130771977;
// aapt resource value: 0x7f01000a
public const int mediaRouteButtonStyle = 2130771978;
// aapt resource value: 0x7f010016
public const int mediaRouteButtonTint = 2130771990;
// aapt resource value: 0x7f01000b
public const int mediaRouteCloseDrawable = 2130771979;
// aapt resource value: 0x7f01000c
public const int mediaRouteControlPanelThemeOverlay = 2130771980;
// aapt resource value: 0x7f01000d
public const int mediaRouteDefaultIconDrawable = 2130771981;
// aapt resource value: 0x7f01000e
public const int mediaRoutePauseDrawable = 2130771982;
// aapt resource value: 0x7f01000f
public const int mediaRoutePlayDrawable = 2130771983;
// aapt resource value: 0x7f010010
public const int mediaRouteSpeakerGroupIconDrawable = 2130771984;
// aapt resource value: 0x7f010011
public const int mediaRouteSpeakerIconDrawable = 2130771985;
// aapt resource value: 0x7f010012
public const int mediaRouteStopDrawable = 2130771986;
// aapt resource value: 0x7f010013
public const int mediaRouteTheme = 2130771987;
// aapt resource value: 0x7f010014
public const int mediaRouteTvIconDrawable = 2130771988;
// aapt resource value: 0x7f010143
public const int menu = 2130772291;
// aapt resource value: 0x7f010045
public const int multiChoiceItemLayout = 2130772037;
// aapt resource value: 0x7f01010f
public const int navigationContentDescription = 2130772239;
// aapt resource value: 0x7f01010e
public const int navigationIcon = 2130772238;
// aapt resource value: 0x7f010026
public const int navigationMode = 2130772006;
// aapt resource value: 0x7f0100db
public const int numericModifiers = 2130772187;
// aapt resource value: 0x7f0100e6
public const int overlapAnchor = 2130772198;
// aapt resource value: 0x7f0100e8
public const int paddingBottomNoButtons = 2130772200;
// aapt resource value: 0x7f010114
public const int paddingEnd = 2130772244;
// aapt resource value: 0x7f010113
public const int paddingStart = 2130772243;
// aapt resource value: 0x7f0100e9
public const int paddingTopNoTitle = 2130772201;
// aapt resource value: 0x7f0100a4
public const int panelBackground = 2130772132;
// aapt resource value: 0x7f0100a6
public const int panelMenuListTheme = 2130772134;
// aapt resource value: 0x7f0100a5
public const int panelMenuListWidth = 2130772133;
// aapt resource value: 0x7f010167
public const int passwordToggleContentDescription = 2130772327;
// aapt resource value: 0x7f010166
public const int passwordToggleDrawable = 2130772326;
// aapt resource value: 0x7f010165
public const int passwordToggleEnabled = 2130772325;
// aapt resource value: 0x7f010168
public const int passwordToggleTint = 2130772328;
// aapt resource value: 0x7f010169
public const int passwordToggleTintMode = 2130772329;
// aapt resource value: 0x7f010091
public const int popupMenuStyle = 2130772113;
// aapt resource value: 0x7f01003f
public const int popupTheme = 2130772031;
// aapt resource value: 0x7f010092
public const int popupWindowStyle = 2130772114;
// aapt resource value: 0x7f0100e4
public const int preserveIconSpacing = 2130772196;
// aapt resource value: 0x7f01013e
public const int pressedTranslationZ = 2130772286;
// aapt resource value: 0x7f010035
public const int progressBarPadding = 2130772021;
// aapt resource value: 0x7f010033
public const int progressBarStyle = 2130772019;
// aapt resource value: 0x7f0100f5
public const int queryBackground = 2130772213;
// aapt resource value: 0x7f0100ec
public const int queryHint = 2130772204;
// aapt resource value: 0x7f0100c0
public const int radioButtonStyle = 2130772160;
// aapt resource value: 0x7f0100c1
public const int ratingBarStyle = 2130772161;
// aapt resource value: 0x7f0100c2
public const int ratingBarStyleIndicator = 2130772162;
// aapt resource value: 0x7f0100c3
public const int ratingBarStyleSmall = 2130772163;
// aapt resource value: 0x7f010002
public const int reverseLayout = 2130771970;
// aapt resource value: 0x7f01013c
public const int rippleColor = 2130772284;
// aapt resource value: 0x7f01012b
public const int scrimAnimationDuration = 2130772267;
// aapt resource value: 0x7f01012a
public const int scrimVisibleHeightTrigger = 2130772266;
// aapt resource value: 0x7f0100f1
public const int searchHintIcon = 2130772209;
// aapt resource value: 0x7f0100f0
public const int searchIcon = 2130772208;
// aapt resource value: 0x7f010099
public const int searchViewStyle = 2130772121;
// aapt resource value: 0x7f0100c4
public const int seekBarStyle = 2130772164;
// aapt resource value: 0x7f010089
public const int selectableItemBackground = 2130772105;
// aapt resource value: 0x7f01008a
public const int selectableItemBackgroundBorderless = 2130772106;
// aapt resource value: 0x7f0100dc
public const int showAsAction = 2130772188;
// aapt resource value: 0x7f0100d8
public const int showDividers = 2130772184;
// aapt resource value: 0x7f010101
public const int showText = 2130772225;
// aapt resource value: 0x7f010048
public const int showTitle = 2130772040;
// aapt resource value: 0x7f010046
public const int singleChoiceItemLayout = 2130772038;
// aapt resource value: 0x7f010001
public const int spanCount = 2130771969;
// aapt resource value: 0x7f0100d0
public const int spinBars = 2130772176;
// aapt resource value: 0x7f010084
public const int spinnerDropDownItemStyle = 2130772100;
// aapt resource value: 0x7f0100c5
public const int spinnerStyle = 2130772165;
// aapt resource value: 0x7f010100
public const int splitTrack = 2130772224;
// aapt resource value: 0x7f010049
public const int srcCompat = 2130772041;
// aapt resource value: 0x7f010003
public const int stackFromEnd = 2130771971;
// aapt resource value: 0x7f0100e7
public const int state_above_anchor = 2130772199;
// aapt resource value: 0x7f010119
public const int state_collapsed = 2130772249;
// aapt resource value: 0x7f01011a
public const int state_collapsible = 2130772250;
// aapt resource value: 0x7f010132
public const int statusBarBackground = 2130772274;
// aapt resource value: 0x7f010128
public const int statusBarScrim = 2130772264;
// aapt resource value: 0x7f0100e5
public const int subMenuArrow = 2130772197;
// aapt resource value: 0x7f0100f6
public const int submitBackground = 2130772214;
// aapt resource value: 0x7f010028
public const int subtitle = 2130772008;
// aapt resource value: 0x7f010103
public const int subtitleTextAppearance = 2130772227;
// aapt resource value: 0x7f010112
public const int subtitleTextColor = 2130772242;
// aapt resource value: 0x7f01002a
public const int subtitleTextStyle = 2130772010;
// aapt resource value: 0x7f0100f4
public const int suggestionRowLayout = 2130772212;
// aapt resource value: 0x7f0100fe
public const int switchMinWidth = 2130772222;
// aapt resource value: 0x7f0100ff
public const int switchPadding = 2130772223;
// aapt resource value: 0x7f0100c6
public const int switchStyle = 2130772166;
// aapt resource value: 0x7f0100fd
public const int switchTextAppearance = 2130772221;
// aapt resource value: 0x7f01014f
public const int tabBackground = 2130772303;
// aapt resource value: 0x7f01014e
public const int tabContentStart = 2130772302;
// aapt resource value: 0x7f010151
public const int tabGravity = 2130772305;
// aapt resource value: 0x7f01014c
public const int tabIndicatorColor = 2130772300;
// aapt resource value: 0x7f01014d
public const int tabIndicatorHeight = 2130772301;
// aapt resource value: 0x7f010153
public const int tabMaxWidth = 2130772307;
// aapt resource value: 0x7f010152
public const int tabMinWidth = 2130772306;
// aapt resource value: 0x7f010150
public const int tabMode = 2130772304;
// aapt resource value: 0x7f01015b
public const int tabPadding = 2130772315;
// aapt resource value: 0x7f01015a
public const int tabPaddingBottom = 2130772314;
// aapt resource value: 0x7f010159
public const int tabPaddingEnd = 2130772313;
// aapt resource value: 0x7f010157
public const int tabPaddingStart = 2130772311;
// aapt resource value: 0x7f010158
public const int tabPaddingTop = 2130772312;
// aapt resource value: 0x7f010156
public const int tabSelectedTextColor = 2130772310;
// aapt resource value: 0x7f010154
public const int tabTextAppearance = 2130772308;
// aapt resource value: 0x7f010155
public const int tabTextColor = 2130772309;
// aapt resource value: 0x7f01004f
public const int textAllCaps = 2130772047;
// aapt resource value: 0x7f01007c
public const int textAppearanceLargePopupMenu = 2130772092;
// aapt resource value: 0x7f0100a1
public const int textAppearanceListItem = 2130772129;
// aapt resource value: 0x7f0100a2
public const int textAppearanceListItemSecondary = 2130772130;
// aapt resource value: 0x7f0100a3
public const int textAppearanceListItemSmall = 2130772131;
// aapt resource value: 0x7f01007e
public const int textAppearancePopupMenuHeader = 2130772094;
// aapt resource value: 0x7f010097
public const int textAppearanceSearchResultSubtitle = 2130772119;
// aapt resource value: 0x7f010096
public const int textAppearanceSearchResultTitle = 2130772118;
// aapt resource value: 0x7f01007d
public const int textAppearanceSmallPopupMenu = 2130772093;
// aapt resource value: 0x7f0100b6
public const int textColorAlertDialogListItem = 2130772150;
// aapt resource value: 0x7f01013b
public const int textColorError = 2130772283;
// aapt resource value: 0x7f010098
public const int textColorSearchUrl = 2130772120;
// aapt resource value: 0x7f010115
public const int theme = 2130772245;
// aapt resource value: 0x7f0100d6
public const int thickness = 2130772182;
// aapt resource value: 0x7f0100fc
public const int thumbTextPadding = 2130772220;
// aapt resource value: 0x7f0100f7
public const int thumbTint = 2130772215;
// aapt resource value: 0x7f0100f8
public const int thumbTintMode = 2130772216;
// aapt resource value: 0x7f01004c
public const int tickMark = 2130772044;
// aapt resource value: 0x7f01004d
public const int tickMarkTint = 2130772045;
// aapt resource value: 0x7f01004e
public const int tickMarkTintMode = 2130772046;
// aapt resource value: 0x7f01004a
public const int tint = 2130772042;
// aapt resource value: 0x7f01004b
public const int tintMode = 2130772043;
// aapt resource value: 0x7f010025
public const int title = 2130772005;
// aapt resource value: 0x7f01012e
public const int titleEnabled = 2130772270;
// aapt resource value: 0x7f010104
public const int titleMargin = 2130772228;
// aapt resource value: 0x7f010108
public const int titleMarginBottom = 2130772232;
// aapt resource value: 0x7f010106
public const int titleMarginEnd = 2130772230;
// aapt resource value: 0x7f010105
public const int titleMarginStart = 2130772229;
// aapt resource value: 0x7f010107
public const int titleMarginTop = 2130772231;
// aapt resource value: 0x7f010109
public const int titleMargins = 2130772233;
// aapt resource value: 0x7f010102
public const int titleTextAppearance = 2130772226;
// aapt resource value: 0x7f010111
public const int titleTextColor = 2130772241;
// aapt resource value: 0x7f010029
public const int titleTextStyle = 2130772009;
// aapt resource value: 0x7f010129
public const int toolbarId = 2130772265;
// aapt resource value: 0x7f010090
public const int toolbarNavigationButtonStyle = 2130772112;
// aapt resource value: 0x7f01008f
public const int toolbarStyle = 2130772111;
// aapt resource value: 0x7f0100c9
public const int tooltipForegroundColor = 2130772169;
// aapt resource value: 0x7f0100c8
public const int tooltipFrameBackground = 2130772168;
// aapt resource value: 0x7f0100e1
public const int tooltipText = 2130772193;
// aapt resource value: 0x7f0100f9
public const int track = 2130772217;
// aapt resource value: 0x7f0100fa
public const int trackTint = 2130772218;
// aapt resource value: 0x7f0100fb
public const int trackTintMode = 2130772219;
// aapt resource value: 0x7f010140
public const int useCompatPadding = 2130772288;
// aapt resource value: 0x7f0100f2
public const int voiceIcon = 2130772210;
// aapt resource value: 0x7f010056
public const int windowActionBar = 2130772054;
// aapt resource value: 0x7f010058
public const int windowActionBarOverlay = 2130772056;
// aapt resource value: 0x7f010059
public const int windowActionModeOverlay = 2130772057;
// aapt resource value: 0x7f01005d
public const int windowFixedHeightMajor = 2130772061;
// aapt resource value: 0x7f01005b
public const int windowFixedHeightMinor = 2130772059;
// aapt resource value: 0x7f01005a
public const int windowFixedWidthMajor = 2130772058;
// aapt resource value: 0x7f01005c
public const int windowFixedWidthMinor = 2130772060;
// aapt resource value: 0x7f01005e
public const int windowMinWidthMajor = 2130772062;
// aapt resource value: 0x7f01005f
public const int windowMinWidthMinor = 2130772063;
// aapt resource value: 0x7f010057
public const int windowNoTitle = 2130772055;
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Boolean
{
// aapt resource value: 0x7f0e0000
public const int abc_action_bar_embed_tabs = 2131623936;
// aapt resource value: 0x7f0e0001
public const int abc_allow_stacked_button_bar = 2131623937;
// aapt resource value: 0x7f0e0002
public const int abc_config_actionMenuItemAllCaps = 2131623938;
// aapt resource value: 0x7f0e0003
public const int abc_config_closeDialogWhenTouchOutside = 2131623939;
// aapt resource value: 0x7f0e0004
public const int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131623940;
static Boolean()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Boolean()
{
}
}
public partial class Color
{
// aapt resource value: 0x7f0d004f
public const int abc_background_cache_hint_selector_material_dark = 2131558479;
// aapt resource value: 0x7f0d0050
public const int abc_background_cache_hint_selector_material_light = 2131558480;
// aapt resource value: 0x7f0d0051
public const int abc_btn_colored_borderless_text_material = 2131558481;
// aapt resource value: 0x7f0d0052
public const int abc_btn_colored_text_material = 2131558482;
// aapt resource value: 0x7f0d0053
public const int abc_color_highlight_material = 2131558483;
// aapt resource value: 0x7f0d0054
public const int abc_hint_foreground_material_dark = 2131558484;
// aapt resource value: 0x7f0d0055
public const int abc_hint_foreground_material_light = 2131558485;
// aapt resource value: 0x7f0d0004
public const int abc_input_method_navigation_guard = 2131558404;
// aapt resource value: 0x7f0d0056
public const int abc_primary_text_disable_only_material_dark = 2131558486;
// aapt resource value: 0x7f0d0057
public const int abc_primary_text_disable_only_material_light = 2131558487;
// aapt resource value: 0x7f0d0058
public const int abc_primary_text_material_dark = 2131558488;
// aapt resource value: 0x7f0d0059
public const int abc_primary_text_material_light = 2131558489;
// aapt resource value: 0x7f0d005a
public const int abc_search_url_text = 2131558490;
// aapt resource value: 0x7f0d0005
public const int abc_search_url_text_normal = 2131558405;
// aapt resource value: 0x7f0d0006
public const int abc_search_url_text_pressed = 2131558406;
// aapt resource value: 0x7f0d0007
public const int abc_search_url_text_selected = 2131558407;
// aapt resource value: 0x7f0d005b
public const int abc_secondary_text_material_dark = 2131558491;
// aapt resource value: 0x7f0d005c
public const int abc_secondary_text_material_light = 2131558492;
// aapt resource value: 0x7f0d005d
public const int abc_tint_btn_checkable = 2131558493;
// aapt resource value: 0x7f0d005e
public const int abc_tint_default = 2131558494;
// aapt resource value: 0x7f0d005f
public const int abc_tint_edittext = 2131558495;
// aapt resource value: 0x7f0d0060
public const int abc_tint_seek_thumb = 2131558496;
// aapt resource value: 0x7f0d0061
public const int abc_tint_spinner = 2131558497;
// aapt resource value: 0x7f0d0062
public const int abc_tint_switch_track = 2131558498;
// aapt resource value: 0x7f0d0008
public const int accent_material_dark = 2131558408;
// aapt resource value: 0x7f0d0009
public const int accent_material_light = 2131558409;
// aapt resource value: 0x7f0d000a
public const int background_floating_material_dark = 2131558410;
// aapt resource value: 0x7f0d000b
public const int background_floating_material_light = 2131558411;
// aapt resource value: 0x7f0d000c
public const int background_material_dark = 2131558412;
// aapt resource value: 0x7f0d000d
public const int background_material_light = 2131558413;
// aapt resource value: 0x7f0d000e
public const int bright_foreground_disabled_material_dark = 2131558414;
// aapt resource value: 0x7f0d000f
public const int bright_foreground_disabled_material_light = 2131558415;
// aapt resource value: 0x7f0d0010
public const int bright_foreground_inverse_material_dark = 2131558416;
// aapt resource value: 0x7f0d0011
public const int bright_foreground_inverse_material_light = 2131558417;
// aapt resource value: 0x7f0d0012
public const int bright_foreground_material_dark = 2131558418;
// aapt resource value: 0x7f0d0013
public const int bright_foreground_material_light = 2131558419;
// aapt resource value: 0x7f0d0014
public const int button_material_dark = 2131558420;
// aapt resource value: 0x7f0d0015
public const int button_material_light = 2131558421;
// aapt resource value: 0x7f0d0000
public const int cardview_dark_background = 2131558400;
// aapt resource value: 0x7f0d0001
public const int cardview_light_background = 2131558401;
// aapt resource value: 0x7f0d0002
public const int cardview_shadow_end_color = 2131558402;
// aapt resource value: 0x7f0d0003
public const int cardview_shadow_start_color = 2131558403;
// aapt resource value: 0x7f0d004e
public const int colorAccent = 2131558478;
// aapt resource value: 0x7f0d004c
public const int colorPrimary = 2131558476;
// aapt resource value: 0x7f0d004d
public const int colorPrimaryDark = 2131558477;
// aapt resource value: 0x7f0d0040
public const int design_bottom_navigation_shadow_color = 2131558464;
// aapt resource value: 0x7f0d0063
public const int design_error = 2131558499;
// aapt resource value: 0x7f0d0041
public const int design_fab_shadow_end_color = 2131558465;
// aapt resource value: 0x7f0d0042
public const int design_fab_shadow_mid_color = 2131558466;
// aapt resource value: 0x7f0d0043
public const int design_fab_shadow_start_color = 2131558467;
// aapt resource value: 0x7f0d0044
public const int design_fab_stroke_end_inner_color = 2131558468;
// aapt resource value: 0x7f0d0045
public const int design_fab_stroke_end_outer_color = 2131558469;
// aapt resource value: 0x7f0d0046
public const int design_fab_stroke_top_inner_color = 2131558470;
// aapt resource value: 0x7f0d0047
public const int design_fab_stroke_top_outer_color = 2131558471;
// aapt resource value: 0x7f0d0048
public const int design_snackbar_background_color = 2131558472;
// aapt resource value: 0x7f0d0064
public const int design_tint_password_toggle = 2131558500;
// aapt resource value: 0x7f0d0016
public const int dim_foreground_disabled_material_dark = 2131558422;
// aapt resource value: 0x7f0d0017
public const int dim_foreground_disabled_material_light = 2131558423;
// aapt resource value: 0x7f0d0018
public const int dim_foreground_material_dark = 2131558424;
// aapt resource value: 0x7f0d0019
public const int dim_foreground_material_light = 2131558425;
// aapt resource value: 0x7f0d001a
public const int error_color_material = 2131558426;
// aapt resource value: 0x7f0d001b
public const int foreground_material_dark = 2131558427;
// aapt resource value: 0x7f0d001c
public const int foreground_material_light = 2131558428;
// aapt resource value: 0x7f0d001d
public const int highlighted_text_material_dark = 2131558429;
// aapt resource value: 0x7f0d001e
public const int highlighted_text_material_light = 2131558430;
// aapt resource value: 0x7f0d004b
public const int launcher_background = 2131558475;
// aapt resource value: 0x7f0d001f
public const int material_blue_grey_800 = 2131558431;
// aapt resource value: 0x7f0d0020
public const int material_blue_grey_900 = 2131558432;
// aapt resource value: 0x7f0d0021
public const int material_blue_grey_950 = 2131558433;
// aapt resource value: 0x7f0d0022
public const int material_deep_teal_200 = 2131558434;
// aapt resource value: 0x7f0d0023
public const int material_deep_teal_500 = 2131558435;
// aapt resource value: 0x7f0d0024
public const int material_grey_100 = 2131558436;
// aapt resource value: 0x7f0d0025
public const int material_grey_300 = 2131558437;
// aapt resource value: 0x7f0d0026
public const int material_grey_50 = 2131558438;
// aapt resource value: 0x7f0d0027
public const int material_grey_600 = 2131558439;
// aapt resource value: 0x7f0d0028
public const int material_grey_800 = 2131558440;
// aapt resource value: 0x7f0d0029
public const int material_grey_850 = 2131558441;
// aapt resource value: 0x7f0d002a
public const int material_grey_900 = 2131558442;
// aapt resource value: 0x7f0d0049
public const int notification_action_color_filter = 2131558473;
// aapt resource value: 0x7f0d004a
public const int notification_icon_bg_color = 2131558474;
// aapt resource value: 0x7f0d003f
public const int notification_material_background_media_default_color = 2131558463;
// aapt resource value: 0x7f0d002b
public const int primary_dark_material_dark = 2131558443;
// aapt resource value: 0x7f0d002c
public const int primary_dark_material_light = 2131558444;
// aapt resource value: 0x7f0d002d
public const int primary_material_dark = 2131558445;
// aapt resource value: 0x7f0d002e
public const int primary_material_light = 2131558446;
// aapt resource value: 0x7f0d002f
public const int primary_text_default_material_dark = 2131558447;
// aapt resource value: 0x7f0d0030
public const int primary_text_default_material_light = 2131558448;
// aapt resource value: 0x7f0d0031
public const int primary_text_disabled_material_dark = 2131558449;
// aapt resource value: 0x7f0d0032
public const int primary_text_disabled_material_light = 2131558450;
// aapt resource value: 0x7f0d0033
public const int ripple_material_dark = 2131558451;
// aapt resource value: 0x7f0d0034
public const int ripple_material_light = 2131558452;
// aapt resource value: 0x7f0d0035
public const int secondary_text_default_material_dark = 2131558453;
// aapt resource value: 0x7f0d0036
public const int secondary_text_default_material_light = 2131558454;
// aapt resource value: 0x7f0d0037
public const int secondary_text_disabled_material_dark = 2131558455;
// aapt resource value: 0x7f0d0038
public const int secondary_text_disabled_material_light = 2131558456;
// aapt resource value: 0x7f0d0039
public const int switch_thumb_disabled_material_dark = 2131558457;
// aapt resource value: 0x7f0d003a
public const int switch_thumb_disabled_material_light = 2131558458;
// aapt resource value: 0x7f0d0065
public const int switch_thumb_material_dark = 2131558501;
// aapt resource value: 0x7f0d0066
public const int switch_thumb_material_light = 2131558502;
// aapt resource value: 0x7f0d003b
public const int switch_thumb_normal_material_dark = 2131558459;
// aapt resource value: 0x7f0d003c
public const int switch_thumb_normal_material_light = 2131558460;
// aapt resource value: 0x7f0d003d
public const int tooltip_background_dark = 2131558461;
// aapt resource value: 0x7f0d003e
public const int tooltip_background_light = 2131558462;
static Color()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Color()
{
}
}
public partial class Dimension
{
// aapt resource value: 0x7f08001b
public const int abc_action_bar_content_inset_material = 2131230747;
// aapt resource value: 0x7f08001c
public const int abc_action_bar_content_inset_with_nav = 2131230748;
// aapt resource value: 0x7f080010
public const int abc_action_bar_default_height_material = 2131230736;
// aapt resource value: 0x7f08001d
public const int abc_action_bar_default_padding_end_material = 2131230749;
// aapt resource value: 0x7f08001e
public const int abc_action_bar_default_padding_start_material = 2131230750;
// aapt resource value: 0x7f080020
public const int abc_action_bar_elevation_material = 2131230752;
// aapt resource value: 0x7f080021
public const int abc_action_bar_icon_vertical_padding_material = 2131230753;
// aapt resource value: 0x7f080022
public const int abc_action_bar_overflow_padding_end_material = 2131230754;
// aapt resource value: 0x7f080023
public const int abc_action_bar_overflow_padding_start_material = 2131230755;
// aapt resource value: 0x7f080011
public const int abc_action_bar_progress_bar_size = 2131230737;
// aapt resource value: 0x7f080024
public const int abc_action_bar_stacked_max_height = 2131230756;
// aapt resource value: 0x7f080025
public const int abc_action_bar_stacked_tab_max_width = 2131230757;
// aapt resource value: 0x7f080026
public const int abc_action_bar_subtitle_bottom_margin_material = 2131230758;
// aapt resource value: 0x7f080027
public const int abc_action_bar_subtitle_top_margin_material = 2131230759;
// aapt resource value: 0x7f080028
public const int abc_action_button_min_height_material = 2131230760;
// aapt resource value: 0x7f080029
public const int abc_action_button_min_width_material = 2131230761;
// aapt resource value: 0x7f08002a
public const int abc_action_button_min_width_overflow_material = 2131230762;
// aapt resource value: 0x7f08000f
public const int abc_alert_dialog_button_bar_height = 2131230735;
// aapt resource value: 0x7f08002b
public const int abc_button_inset_horizontal_material = 2131230763;
// aapt resource value: 0x7f08002c
public const int abc_button_inset_vertical_material = 2131230764;
// aapt resource value: 0x7f08002d
public const int abc_button_padding_horizontal_material = 2131230765;
// aapt resource value: 0x7f08002e
public const int abc_button_padding_vertical_material = 2131230766;
// aapt resource value: 0x7f08002f
public const int abc_cascading_menus_min_smallest_width = 2131230767;
// aapt resource value: 0x7f080014
public const int abc_config_prefDialogWidth = 2131230740;
// aapt resource value: 0x7f080030
public const int abc_control_corner_material = 2131230768;
// aapt resource value: 0x7f080031
public const int abc_control_inset_material = 2131230769;
// aapt resource value: 0x7f080032
public const int abc_control_padding_material = 2131230770;
// aapt resource value: 0x7f080015
public const int abc_dialog_fixed_height_major = 2131230741;
// aapt resource value: 0x7f080016
public const int abc_dialog_fixed_height_minor = 2131230742;
// aapt resource value: 0x7f080017
public const int abc_dialog_fixed_width_major = 2131230743;
// aapt resource value: 0x7f080018
public const int abc_dialog_fixed_width_minor = 2131230744;
// aapt resource value: 0x7f080033
public const int abc_dialog_list_padding_bottom_no_buttons = 2131230771;
// aapt resource value: 0x7f080034
public const int abc_dialog_list_padding_top_no_title = 2131230772;
// aapt resource value: 0x7f080019
public const int abc_dialog_min_width_major = 2131230745;
// aapt resource value: 0x7f08001a
public const int abc_dialog_min_width_minor = 2131230746;
// aapt resource value: 0x7f080035
public const int abc_dialog_padding_material = 2131230773;
// aapt resource value: 0x7f080036
public const int abc_dialog_padding_top_material = 2131230774;
// aapt resource value: 0x7f080037
public const int abc_dialog_title_divider_material = 2131230775;
// aapt resource value: 0x7f080038
public const int abc_disabled_alpha_material_dark = 2131230776;
// aapt resource value: 0x7f080039
public const int abc_disabled_alpha_material_light = 2131230777;
// aapt resource value: 0x7f08003a
public const int abc_dropdownitem_icon_width = 2131230778;
// aapt resource value: 0x7f08003b
public const int abc_dropdownitem_text_padding_left = 2131230779;
// aapt resource value: 0x7f08003c
public const int abc_dropdownitem_text_padding_right = 2131230780;
// aapt resource value: 0x7f08003d
public const int abc_edit_text_inset_bottom_material = 2131230781;
// aapt resource value: 0x7f08003e
public const int abc_edit_text_inset_horizontal_material = 2131230782;
// aapt resource value: 0x7f08003f
public const int abc_edit_text_inset_top_material = 2131230783;
// aapt resource value: 0x7f080040
public const int abc_floating_window_z = 2131230784;
// aapt resource value: 0x7f080041
public const int abc_list_item_padding_horizontal_material = 2131230785;
// aapt resource value: 0x7f080042
public const int abc_panel_menu_list_width = 2131230786;
// aapt resource value: 0x7f080043
public const int abc_progress_bar_height_material = 2131230787;
// aapt resource value: 0x7f080044
public const int abc_search_view_preferred_height = 2131230788;
// aapt resource value: 0x7f080045
public const int abc_search_view_preferred_width = 2131230789;
// aapt resource value: 0x7f080046
public const int abc_seekbar_track_background_height_material = 2131230790;
// aapt resource value: 0x7f080047
public const int abc_seekbar_track_progress_height_material = 2131230791;
// aapt resource value: 0x7f080048
public const int abc_select_dialog_padding_start_material = 2131230792;
// aapt resource value: 0x7f08001f
public const int abc_switch_padding = 2131230751;
// aapt resource value: 0x7f080049
public const int abc_text_size_body_1_material = 2131230793;
// aapt resource value: 0x7f08004a
public const int abc_text_size_body_2_material = 2131230794;
// aapt resource value: 0x7f08004b
public const int abc_text_size_button_material = 2131230795;
// aapt resource value: 0x7f08004c
public const int abc_text_size_caption_material = 2131230796;
// aapt resource value: 0x7f08004d
public const int abc_text_size_display_1_material = 2131230797;
// aapt resource value: 0x7f08004e
public const int abc_text_size_display_2_material = 2131230798;
// aapt resource value: 0x7f08004f
public const int abc_text_size_display_3_material = 2131230799;
// aapt resource value: 0x7f080050
public const int abc_text_size_display_4_material = 2131230800;
// aapt resource value: 0x7f080051
public const int abc_text_size_headline_material = 2131230801;
// aapt resource value: 0x7f080052
public const int abc_text_size_large_material = 2131230802;
// aapt resource value: 0x7f080053
public const int abc_text_size_medium_material = 2131230803;
// aapt resource value: 0x7f080054
public const int abc_text_size_menu_header_material = 2131230804;
// aapt resource value: 0x7f080055
public const int abc_text_size_menu_material = 2131230805;
// aapt resource value: 0x7f080056
public const int abc_text_size_small_material = 2131230806;
// aapt resource value: 0x7f080057
public const int abc_text_size_subhead_material = 2131230807;
// aapt resource value: 0x7f080012
public const int abc_text_size_subtitle_material_toolbar = 2131230738;
// aapt resource value: 0x7f080058
public const int abc_text_size_title_material = 2131230808;
// aapt resource value: 0x7f080013
public const int abc_text_size_title_material_toolbar = 2131230739;
// aapt resource value: 0x7f08000c
public const int cardview_compat_inset_shadow = 2131230732;
// aapt resource value: 0x7f08000d
public const int cardview_default_elevation = 2131230733;
// aapt resource value: 0x7f08000e
public const int cardview_default_radius = 2131230734;
// aapt resource value: 0x7f080094
public const int compat_button_inset_horizontal_material = 2131230868;
// aapt resource value: 0x7f080095
public const int compat_button_inset_vertical_material = 2131230869;
// aapt resource value: 0x7f080096
public const int compat_button_padding_horizontal_material = 2131230870;
// aapt resource value: 0x7f080097
public const int compat_button_padding_vertical_material = 2131230871;
// aapt resource value: 0x7f080098
public const int compat_control_corner_material = 2131230872;
// aapt resource value: 0x7f080072
public const int design_appbar_elevation = 2131230834;
// aapt resource value: 0x7f080073
public const int design_bottom_navigation_active_item_max_width = 2131230835;
// aapt resource value: 0x7f080074
public const int design_bottom_navigation_active_text_size = 2131230836;
// aapt resource value: 0x7f080075
public const int design_bottom_navigation_elevation = 2131230837;
// aapt resource value: 0x7f080076
public const int design_bottom_navigation_height = 2131230838;
// aapt resource value: 0x7f080077
public const int design_bottom_navigation_item_max_width = 2131230839;
// aapt resource value: 0x7f080078
public const int design_bottom_navigation_item_min_width = 2131230840;
// aapt resource value: 0x7f080079
public const int design_bottom_navigation_margin = 2131230841;
// aapt resource value: 0x7f08007a
public const int design_bottom_navigation_shadow_height = 2131230842;
// aapt resource value: 0x7f08007b
public const int design_bottom_navigation_text_size = 2131230843;
// aapt resource value: 0x7f08007c
public const int design_bottom_sheet_modal_elevation = 2131230844;
// aapt resource value: 0x7f08007d
public const int design_bottom_sheet_peek_height_min = 2131230845;
// aapt resource value: 0x7f08007e
public const int design_fab_border_width = 2131230846;
// aapt resource value: 0x7f08007f
public const int design_fab_elevation = 2131230847;
// aapt resource value: 0x7f080080
public const int design_fab_image_size = 2131230848;
// aapt resource value: 0x7f080081
public const int design_fab_size_mini = 2131230849;
// aapt resource value: 0x7f080082
public const int design_fab_size_normal = 2131230850;
// aapt resource value: 0x7f080083
public const int design_fab_translation_z_pressed = 2131230851;
// aapt resource value: 0x7f080084
public const int design_navigation_elevation = 2131230852;
// aapt resource value: 0x7f080085
public const int design_navigation_icon_padding = 2131230853;
// aapt resource value: 0x7f080086
public const int design_navigation_icon_size = 2131230854;
// aapt resource value: 0x7f08006a
public const int design_navigation_max_width = 2131230826;
// aapt resource value: 0x7f080087
public const int design_navigation_padding_bottom = 2131230855;
// aapt resource value: 0x7f080088
public const int design_navigation_separator_vertical_padding = 2131230856;
// aapt resource value: 0x7f08006b
public const int design_snackbar_action_inline_max_width = 2131230827;
// aapt resource value: 0x7f08006c
public const int design_snackbar_background_corner_radius = 2131230828;
// aapt resource value: 0x7f080089
public const int design_snackbar_elevation = 2131230857;
// aapt resource value: 0x7f08006d
public const int design_snackbar_extra_spacing_horizontal = 2131230829;
// aapt resource value: 0x7f08006e
public const int design_snackbar_max_width = 2131230830;
// aapt resource value: 0x7f08006f
public const int design_snackbar_min_width = 2131230831;
// aapt resource value: 0x7f08008a
public const int design_snackbar_padding_horizontal = 2131230858;
// aapt resource value: 0x7f08008b
public const int design_snackbar_padding_vertical = 2131230859;
// aapt resource value: 0x7f080070
public const int design_snackbar_padding_vertical_2lines = 2131230832;
// aapt resource value: 0x7f08008c
public const int design_snackbar_text_size = 2131230860;
// aapt resource value: 0x7f08008d
public const int design_tab_max_width = 2131230861;
// aapt resource value: 0x7f080071
public const int design_tab_scrollable_min_width = 2131230833;
// aapt resource value: 0x7f08008e
public const int design_tab_text_size = 2131230862;
// aapt resource value: 0x7f08008f
public const int design_tab_text_size_2line = 2131230863;
// aapt resource value: 0x7f080059
public const int disabled_alpha_material_dark = 2131230809;
// aapt resource value: 0x7f08005a
public const int disabled_alpha_material_light = 2131230810;
// aapt resource value: 0x7f080000
public const int fastscroll_default_thickness = 2131230720;
// aapt resource value: 0x7f080001
public const int fastscroll_margin = 2131230721;
// aapt resource value: 0x7f080002
public const int fastscroll_minimum_range = 2131230722;
// aapt resource value: 0x7f08005b
public const int highlight_alpha_material_colored = 2131230811;
// aapt resource value: 0x7f08005c
public const int highlight_alpha_material_dark = 2131230812;
// aapt resource value: 0x7f08005d
public const int highlight_alpha_material_light = 2131230813;
// aapt resource value: 0x7f08005e
public const int hint_alpha_material_dark = 2131230814;
// aapt resource value: 0x7f08005f
public const int hint_alpha_material_light = 2131230815;
// aapt resource value: 0x7f080060
public const int hint_pressed_alpha_material_dark = 2131230816;
// aapt resource value: 0x7f080061
public const int hint_pressed_alpha_material_light = 2131230817;
// aapt resource value: 0x7f080003
public const int item_touch_helper_max_drag_scroll_per_frame = 2131230723;
// aapt resource value: 0x7f080004
public const int item_touch_helper_swipe_escape_max_velocity = 2131230724;
// aapt resource value: 0x7f080005
public const int item_touch_helper_swipe_escape_velocity = 2131230725;
// aapt resource value: 0x7f080006
public const int mr_controller_volume_group_list_item_height = 2131230726;
// aapt resource value: 0x7f080007
public const int mr_controller_volume_group_list_item_icon_size = 2131230727;
// aapt resource value: 0x7f080008
public const int mr_controller_volume_group_list_max_height = 2131230728;
// aapt resource value: 0x7f08000b
public const int mr_controller_volume_group_list_padding_top = 2131230731;
// aapt resource value: 0x7f080009
public const int mr_dialog_fixed_width_major = 2131230729;
// aapt resource value: 0x7f08000a
public const int mr_dialog_fixed_width_minor = 2131230730;
// aapt resource value: 0x7f080099
public const int notification_action_icon_size = 2131230873;
// aapt resource value: 0x7f08009a
public const int notification_action_text_size = 2131230874;
// aapt resource value: 0x7f08009b
public const int notification_big_circle_margin = 2131230875;
// aapt resource value: 0x7f080091
public const int notification_content_margin_start = 2131230865;
// aapt resource value: 0x7f08009c
public const int notification_large_icon_height = 2131230876;
// aapt resource value: 0x7f08009d
public const int notification_large_icon_width = 2131230877;
// aapt resource value: 0x7f080092
public const int notification_main_column_padding_top = 2131230866;
// aapt resource value: 0x7f080093
public const int notification_media_narrow_margin = 2131230867;
// aapt resource value: 0x7f08009e
public const int notification_right_icon_size = 2131230878;
// aapt resource value: 0x7f080090
public const int notification_right_side_padding_top = 2131230864;
// aapt resource value: 0x7f08009f
public const int notification_small_icon_background_padding = 2131230879;
// aapt resource value: 0x7f0800a0
public const int notification_small_icon_size_as_large = 2131230880;
// aapt resource value: 0x7f0800a1
public const int notification_subtext_size = 2131230881;
// aapt resource value: 0x7f0800a2
public const int notification_top_pad = 2131230882;
// aapt resource value: 0x7f0800a3
public const int notification_top_pad_large_text = 2131230883;
// aapt resource value: 0x7f080062
public const int tooltip_corner_radius = 2131230818;
// aapt resource value: 0x7f080063
public const int tooltip_horizontal_padding = 2131230819;
// aapt resource value: 0x7f080064
public const int tooltip_margin = 2131230820;
// aapt resource value: 0x7f080065
public const int tooltip_precise_anchor_extra_offset = 2131230821;
// aapt resource value: 0x7f080066
public const int tooltip_precise_anchor_threshold = 2131230822;
// aapt resource value: 0x7f080067
public const int tooltip_vertical_padding = 2131230823;
// aapt resource value: 0x7f080068
public const int tooltip_y_offset_non_touch = 2131230824;
// aapt resource value: 0x7f080069
public const int tooltip_y_offset_touch = 2131230825;
static Dimension()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Dimension()
{
}
}
public partial class Drawable
{
// aapt resource value: 0x7f020000
public const int abc_ab_share_pack_mtrl_alpha = 2130837504;
// aapt resource value: 0x7f020001
public const int abc_action_bar_item_background_material = 2130837505;
// aapt resource value: 0x7f020002
public const int abc_btn_borderless_material = 2130837506;
// aapt resource value: 0x7f020003
public const int abc_btn_check_material = 2130837507;
// aapt resource value: 0x7f020004
public const int abc_btn_check_to_on_mtrl_000 = 2130837508;
// aapt resource value: 0x7f020005
public const int abc_btn_check_to_on_mtrl_015 = 2130837509;
// aapt resource value: 0x7f020006
public const int abc_btn_colored_material = 2130837510;
// aapt resource value: 0x7f020007
public const int abc_btn_default_mtrl_shape = 2130837511;
// aapt resource value: 0x7f020008
public const int abc_btn_radio_material = 2130837512;
// aapt resource value: 0x7f020009
public const int abc_btn_radio_to_on_mtrl_000 = 2130837513;
// aapt resource value: 0x7f02000a
public const int abc_btn_radio_to_on_mtrl_015 = 2130837514;
// aapt resource value: 0x7f02000b
public const int abc_btn_switch_to_on_mtrl_00001 = 2130837515;
// aapt resource value: 0x7f02000c
public const int abc_btn_switch_to_on_mtrl_00012 = 2130837516;
// aapt resource value: 0x7f02000d
public const int abc_cab_background_internal_bg = 2130837517;
// aapt resource value: 0x7f02000e
public const int abc_cab_background_top_material = 2130837518;
// aapt resource value: 0x7f02000f
public const int abc_cab_background_top_mtrl_alpha = 2130837519;
// aapt resource value: 0x7f020010
public const int abc_control_background_material = 2130837520;
// aapt resource value: 0x7f020011
public const int abc_dialog_material_background = 2130837521;
// aapt resource value: 0x7f020012
public const int abc_edit_text_material = 2130837522;
// aapt resource value: 0x7f020013
public const int abc_ic_ab_back_material = 2130837523;
// aapt resource value: 0x7f020014
public const int abc_ic_arrow_drop_right_black_24dp = 2130837524;
// aapt resource value: 0x7f020015
public const int abc_ic_clear_material = 2130837525;
// aapt resource value: 0x7f020016
public const int abc_ic_commit_search_api_mtrl_alpha = 2130837526;
// aapt resource value: 0x7f020017
public const int abc_ic_go_search_api_material = 2130837527;
// aapt resource value: 0x7f020018
public const int abc_ic_menu_copy_mtrl_am_alpha = 2130837528;
// aapt resource value: 0x7f020019
public const int abc_ic_menu_cut_mtrl_alpha = 2130837529;
// aapt resource value: 0x7f02001a
public const int abc_ic_menu_overflow_material = 2130837530;
// aapt resource value: 0x7f02001b
public const int abc_ic_menu_paste_mtrl_am_alpha = 2130837531;
// aapt resource value: 0x7f02001c
public const int abc_ic_menu_selectall_mtrl_alpha = 2130837532;
// aapt resource value: 0x7f02001d
public const int abc_ic_menu_share_mtrl_alpha = 2130837533;
// aapt resource value: 0x7f02001e
public const int abc_ic_search_api_material = 2130837534;
// aapt resource value: 0x7f02001f
public const int abc_ic_star_black_16dp = 2130837535;
// aapt resource value: 0x7f020020
public const int abc_ic_star_black_36dp = 2130837536;
// aapt resource value: 0x7f020021
public const int abc_ic_star_black_48dp = 2130837537;
// aapt resource value: 0x7f020022
public const int abc_ic_star_half_black_16dp = 2130837538;
// aapt resource value: 0x7f020023
public const int abc_ic_star_half_black_36dp = 2130837539;
// aapt resource value: 0x7f020024
public const int abc_ic_star_half_black_48dp = 2130837540;
// aapt resource value: 0x7f020025
public const int abc_ic_voice_search_api_material = 2130837541;
// aapt resource value: 0x7f020026
public const int abc_item_background_holo_dark = 2130837542;
// aapt resource value: 0x7f020027
public const int abc_item_background_holo_light = 2130837543;
// aapt resource value: 0x7f020028
public const int abc_list_divider_mtrl_alpha = 2130837544;
// aapt resource value: 0x7f020029
public const int abc_list_focused_holo = 2130837545;
// aapt resource value: 0x7f02002a
public const int abc_list_longpressed_holo = 2130837546;
// aapt resource value: 0x7f02002b
public const int abc_list_pressed_holo_dark = 2130837547;
// aapt resource value: 0x7f02002c
public const int abc_list_pressed_holo_light = 2130837548;
// aapt resource value: 0x7f02002d
public const int abc_list_selector_background_transition_holo_dark = 2130837549;
// aapt resource value: 0x7f02002e
public const int abc_list_selector_background_transition_holo_light = 2130837550;
// aapt resource value: 0x7f02002f
public const int abc_list_selector_disabled_holo_dark = 2130837551;
// aapt resource value: 0x7f020030
public const int abc_list_selector_disabled_holo_light = 2130837552;
// aapt resource value: 0x7f020031
public const int abc_list_selector_holo_dark = 2130837553;
// aapt resource value: 0x7f020032
public const int abc_list_selector_holo_light = 2130837554;
// aapt resource value: 0x7f020033
public const int abc_menu_hardkey_panel_mtrl_mult = 2130837555;
// aapt resource value: 0x7f020034
public const int abc_popup_background_mtrl_mult = 2130837556;
// aapt resource value: 0x7f020035
public const int abc_ratingbar_indicator_material = 2130837557;
// aapt resource value: 0x7f020036
public const int abc_ratingbar_material = 2130837558;
// aapt resource value: 0x7f020037
public const int abc_ratingbar_small_material = 2130837559;
// aapt resource value: 0x7f020038
public const int abc_scrubber_control_off_mtrl_alpha = 2130837560;
// aapt resource value: 0x7f020039
public const int abc_scrubber_control_to_pressed_mtrl_000 = 2130837561;
// aapt resource value: 0x7f02003a
public const int abc_scrubber_control_to_pressed_mtrl_005 = 2130837562;
// aapt resource value: 0x7f02003b
public const int abc_scrubber_primary_mtrl_alpha = 2130837563;
// aapt resource value: 0x7f02003c
public const int abc_scrubber_track_mtrl_alpha = 2130837564;
// aapt resource value: 0x7f02003d
public const int abc_seekbar_thumb_material = 2130837565;
// aapt resource value: 0x7f02003e
public const int abc_seekbar_tick_mark_material = 2130837566;
// aapt resource value: 0x7f02003f
public const int abc_seekbar_track_material = 2130837567;
// aapt resource value: 0x7f020040
public const int abc_spinner_mtrl_am_alpha = 2130837568;
// aapt resource value: 0x7f020041
public const int abc_spinner_textfield_background_material = 2130837569;
// aapt resource value: 0x7f020042
public const int abc_switch_thumb_material = 2130837570;
// aapt resource value: 0x7f020043
public const int abc_switch_track_mtrl_alpha = 2130837571;
// aapt resource value: 0x7f020044
public const int abc_tab_indicator_material = 2130837572;
// aapt resource value: 0x7f020045
public const int abc_tab_indicator_mtrl_alpha = 2130837573;
// aapt resource value: 0x7f020046
public const int abc_text_cursor_material = 2130837574;
// aapt resource value: 0x7f020047
public const int abc_text_select_handle_left_mtrl_dark = 2130837575;
// aapt resource value: 0x7f020048
public const int abc_text_select_handle_left_mtrl_light = 2130837576;
// aapt resource value: 0x7f020049
public const int abc_text_select_handle_middle_mtrl_dark = 2130837577;
// aapt resource value: 0x7f02004a
public const int abc_text_select_handle_middle_mtrl_light = 2130837578;
// aapt resource value: 0x7f02004b
public const int abc_text_select_handle_right_mtrl_dark = 2130837579;
// aapt resource value: 0x7f02004c
public const int abc_text_select_handle_right_mtrl_light = 2130837580;
// aapt resource value: 0x7f02004d
public const int abc_textfield_activated_mtrl_alpha = 2130837581;
// aapt resource value: 0x7f02004e
public const int abc_textfield_default_mtrl_alpha = 2130837582;
// aapt resource value: 0x7f02004f
public const int abc_textfield_search_activated_mtrl_alpha = 2130837583;
// aapt resource value: 0x7f020050
public const int abc_textfield_search_default_mtrl_alpha = 2130837584;
// aapt resource value: 0x7f020051
public const int abc_textfield_search_material = 2130837585;
// aapt resource value: 0x7f020052
public const int abc_vector_test = 2130837586;
// aapt resource value: 0x7f020053
public const int avd_hide_password = 2130837587;
// aapt resource value: 0x7f02012f
public const int avd_hide_password_1 = 2130837807;
// aapt resource value: 0x7f020130
public const int avd_hide_password_2 = 2130837808;
// aapt resource value: 0x7f020131
public const int avd_hide_password_3 = 2130837809;
// aapt resource value: 0x7f020054
public const int avd_show_password = 2130837588;
// aapt resource value: 0x7f020132
public const int avd_show_password_1 = 2130837810;
// aapt resource value: 0x7f020133
public const int avd_show_password_2 = 2130837811;
// aapt resource value: 0x7f020134
public const int avd_show_password_3 = 2130837812;
// aapt resource value: 0x7f020055
public const int design_bottom_navigation_item_background = 2130837589;
// aapt resource value: 0x7f020056
public const int design_fab_background = 2130837590;
// aapt resource value: 0x7f020057
public const int design_ic_visibility = 2130837591;
// aapt resource value: 0x7f020058
public const int design_ic_visibility_off = 2130837592;
// aapt resource value: 0x7f020059
public const int design_password_eye = 2130837593;
// aapt resource value: 0x7f02005a
public const int design_snackbar_background = 2130837594;
// aapt resource value: 0x7f02005b
public const int ic_audiotrack_dark = 2130837595;
// aapt resource value: 0x7f02005c
public const int ic_audiotrack_light = 2130837596;
// aapt resource value: 0x7f02005d
public const int ic_dialog_close_dark = 2130837597;
// aapt resource value: 0x7f02005e
public const int ic_dialog_close_light = 2130837598;
// aapt resource value: 0x7f02005f
public const int ic_group_collapse_00 = 2130837599;
// aapt resource value: 0x7f020060
public const int ic_group_collapse_01 = 2130837600;
// aapt resource value: 0x7f020061
public const int ic_group_collapse_02 = 2130837601;
// aapt resource value: 0x7f020062
public const int ic_group_collapse_03 = 2130837602;
// aapt resource value: 0x7f020063
public const int ic_group_collapse_04 = 2130837603;
// aapt resource value: 0x7f020064
public const int ic_group_collapse_05 = 2130837604;
// aapt resource value: 0x7f020065
public const int ic_group_collapse_06 = 2130837605;
// aapt resource value: 0x7f020066
public const int ic_group_collapse_07 = 2130837606;
// aapt resource value: 0x7f020067
public const int ic_group_collapse_08 = 2130837607;
// aapt resource value: 0x7f020068
public const int ic_group_collapse_09 = 2130837608;
// aapt resource value: 0x7f020069
public const int ic_group_collapse_10 = 2130837609;
// aapt resource value: 0x7f02006a
public const int ic_group_collapse_11 = 2130837610;
// aapt resource value: 0x7f02006b
public const int ic_group_collapse_12 = 2130837611;
// aapt resource value: 0x7f02006c
public const int ic_group_collapse_13 = 2130837612;
// aapt resource value: 0x7f02006d
public const int ic_group_collapse_14 = 2130837613;
// aapt resource value: 0x7f02006e
public const int ic_group_collapse_15 = 2130837614;
// aapt resource value: 0x7f02006f
public const int ic_group_expand_00 = 2130837615;
// aapt resource value: 0x7f020070
public const int ic_group_expand_01 = 2130837616;
// aapt resource value: 0x7f020071
public const int ic_group_expand_02 = 2130837617;
// aapt resource value: 0x7f020072
public const int ic_group_expand_03 = 2130837618;
// aapt resource value: 0x7f020073
public const int ic_group_expand_04 = 2130837619;
// aapt resource value: 0x7f020074
public const int ic_group_expand_05 = 2130837620;
// aapt resource value: 0x7f020075
public const int ic_group_expand_06 = 2130837621;
// aapt resource value: 0x7f020076
public const int ic_group_expand_07 = 2130837622;
// aapt resource value: 0x7f020077
public const int ic_group_expand_08 = 2130837623;
// aapt resource value: 0x7f020078
public const int ic_group_expand_09 = 2130837624;
// aapt resource value: 0x7f020079
public const int ic_group_expand_10 = 2130837625;
// aapt resource value: 0x7f02007a
public const int ic_group_expand_11 = 2130837626;
// aapt resource value: 0x7f02007b
public const int ic_group_expand_12 = 2130837627;
// aapt resource value: 0x7f02007c
public const int ic_group_expand_13 = 2130837628;
// aapt resource value: 0x7f02007d
public const int ic_group_expand_14 = 2130837629;
// aapt resource value: 0x7f02007e
public const int ic_group_expand_15 = 2130837630;
// aapt resource value: 0x7f02007f
public const int ic_media_pause_dark = 2130837631;
// aapt resource value: 0x7f020080
public const int ic_media_pause_light = 2130837632;
// aapt resource value: 0x7f020081
public const int ic_media_play_dark = 2130837633;
// aapt resource value: 0x7f020082
public const int ic_media_play_light = 2130837634;
// aapt resource value: 0x7f020083
public const int ic_media_stop_dark = 2130837635;
// aapt resource value: 0x7f020084
public const int ic_media_stop_light = 2130837636;
// aapt resource value: 0x7f020085
public const int ic_mr_button_connected_00_dark = 2130837637;
// aapt resource value: 0x7f020086
public const int ic_mr_button_connected_00_light = 2130837638;
// aapt resource value: 0x7f020087
public const int ic_mr_button_connected_01_dark = 2130837639;
// aapt resource value: 0x7f020088
public const int ic_mr_button_connected_01_light = 2130837640;
// aapt resource value: 0x7f020089
public const int ic_mr_button_connected_02_dark = 2130837641;
// aapt resource value: 0x7f02008a
public const int ic_mr_button_connected_02_light = 2130837642;
// aapt resource value: 0x7f02008b
public const int ic_mr_button_connected_03_dark = 2130837643;
// aapt resource value: 0x7f02008c
public const int ic_mr_button_connected_03_light = 2130837644;
// aapt resource value: 0x7f02008d
public const int ic_mr_button_connected_04_dark = 2130837645;
// aapt resource value: 0x7f02008e
public const int ic_mr_button_connected_04_light = 2130837646;
// aapt resource value: 0x7f02008f
public const int ic_mr_button_connected_05_dark = 2130837647;
// aapt resource value: 0x7f020090
public const int ic_mr_button_connected_05_light = 2130837648;
// aapt resource value: 0x7f020091
public const int ic_mr_button_connected_06_dark = 2130837649;
// aapt resource value: 0x7f020092
public const int ic_mr_button_connected_06_light = 2130837650;
// aapt resource value: 0x7f020093
public const int ic_mr_button_connected_07_dark = 2130837651;
// aapt resource value: 0x7f020094
public const int ic_mr_button_connected_07_light = 2130837652;
// aapt resource value: 0x7f020095
public const int ic_mr_button_connected_08_dark = 2130837653;
// aapt resource value: 0x7f020096
public const int ic_mr_button_connected_08_light = 2130837654;
// aapt resource value: 0x7f020097
public const int ic_mr_button_connected_09_dark = 2130837655;
// aapt resource value: 0x7f020098
public const int ic_mr_button_connected_09_light = 2130837656;
// aapt resource value: 0x7f020099
public const int ic_mr_button_connected_10_dark = 2130837657;
// aapt resource value: 0x7f02009a
public const int ic_mr_button_connected_10_light = 2130837658;
// aapt resource value: 0x7f02009b
public const int ic_mr_button_connected_11_dark = 2130837659;
// aapt resource value: 0x7f02009c
public const int ic_mr_button_connected_11_light = 2130837660;
// aapt resource value: 0x7f02009d
public const int ic_mr_button_connected_12_dark = 2130837661;
// aapt resource value: 0x7f02009e
public const int ic_mr_button_connected_12_light = 2130837662;
// aapt resource value: 0x7f02009f
public const int ic_mr_button_connected_13_dark = 2130837663;
// aapt resource value: 0x7f0200a0
public const int ic_mr_button_connected_13_light = 2130837664;
// aapt resource value: 0x7f0200a1
public const int ic_mr_button_connected_14_dark = 2130837665;
// aapt resource value: 0x7f0200a2
public const int ic_mr_button_connected_14_light = 2130837666;
// aapt resource value: 0x7f0200a3
public const int ic_mr_button_connected_15_dark = 2130837667;
// aapt resource value: 0x7f0200a4
public const int ic_mr_button_connected_15_light = 2130837668;
// aapt resource value: 0x7f0200a5
public const int ic_mr_button_connected_16_dark = 2130837669;
// aapt resource value: 0x7f0200a6
public const int ic_mr_button_connected_16_light = 2130837670;
// aapt resource value: 0x7f0200a7
public const int ic_mr_button_connected_17_dark = 2130837671;
// aapt resource value: 0x7f0200a8
public const int ic_mr_button_connected_17_light = 2130837672;
// aapt resource value: 0x7f0200a9
public const int ic_mr_button_connected_18_dark = 2130837673;
// aapt resource value: 0x7f0200aa
public const int ic_mr_button_connected_18_light = 2130837674;
// aapt resource value: 0x7f0200ab
public const int ic_mr_button_connected_19_dark = 2130837675;
// aapt resource value: 0x7f0200ac
public const int ic_mr_button_connected_19_light = 2130837676;
// aapt resource value: 0x7f0200ad
public const int ic_mr_button_connected_20_dark = 2130837677;
// aapt resource value: 0x7f0200ae
public const int ic_mr_button_connected_20_light = 2130837678;
// aapt resource value: 0x7f0200af
public const int ic_mr_button_connected_21_dark = 2130837679;
// aapt resource value: 0x7f0200b0
public const int ic_mr_button_connected_21_light = 2130837680;
// aapt resource value: 0x7f0200b1
public const int ic_mr_button_connected_22_dark = 2130837681;
// aapt resource value: 0x7f0200b2
public const int ic_mr_button_connected_22_light = 2130837682;
// aapt resource value: 0x7f0200b3
public const int ic_mr_button_connected_23_dark = 2130837683;
// aapt resource value: 0x7f0200b4
public const int ic_mr_button_connected_23_light = 2130837684;
// aapt resource value: 0x7f0200b5
public const int ic_mr_button_connected_24_dark = 2130837685;
// aapt resource value: 0x7f0200b6
public const int ic_mr_button_connected_24_light = 2130837686;
// aapt resource value: 0x7f0200b7
public const int ic_mr_button_connected_25_dark = 2130837687;
// aapt resource value: 0x7f0200b8
public const int ic_mr_button_connected_25_light = 2130837688;
// aapt resource value: 0x7f0200b9
public const int ic_mr_button_connected_26_dark = 2130837689;
// aapt resource value: 0x7f0200ba
public const int ic_mr_button_connected_26_light = 2130837690;
// aapt resource value: 0x7f0200bb
public const int ic_mr_button_connected_27_dark = 2130837691;
// aapt resource value: 0x7f0200bc
public const int ic_mr_button_connected_27_light = 2130837692;
// aapt resource value: 0x7f0200bd
public const int ic_mr_button_connected_28_dark = 2130837693;
// aapt resource value: 0x7f0200be
public const int ic_mr_button_connected_28_light = 2130837694;
// aapt resource value: 0x7f0200bf
public const int ic_mr_button_connected_29_dark = 2130837695;
// aapt resource value: 0x7f0200c0
public const int ic_mr_button_connected_29_light = 2130837696;
// aapt resource value: 0x7f0200c1
public const int ic_mr_button_connected_30_dark = 2130837697;
// aapt resource value: 0x7f0200c2
public const int ic_mr_button_connected_30_light = 2130837698;
// aapt resource value: 0x7f0200c3
public const int ic_mr_button_connecting_00_dark = 2130837699;
// aapt resource value: 0x7f0200c4
public const int ic_mr_button_connecting_00_light = 2130837700;
// aapt resource value: 0x7f0200c5
public const int ic_mr_button_connecting_01_dark = 2130837701;
// aapt resource value: 0x7f0200c6
public const int ic_mr_button_connecting_01_light = 2130837702;
// aapt resource value: 0x7f0200c7
public const int ic_mr_button_connecting_02_dark = 2130837703;
// aapt resource value: 0x7f0200c8
public const int ic_mr_button_connecting_02_light = 2130837704;
// aapt resource value: 0x7f0200c9
public const int ic_mr_button_connecting_03_dark = 2130837705;
// aapt resource value: 0x7f0200ca
public const int ic_mr_button_connecting_03_light = 2130837706;
// aapt resource value: 0x7f0200cb
public const int ic_mr_button_connecting_04_dark = 2130837707;
// aapt resource value: 0x7f0200cc
public const int ic_mr_button_connecting_04_light = 2130837708;
// aapt resource value: 0x7f0200cd
public const int ic_mr_button_connecting_05_dark = 2130837709;
// aapt resource value: 0x7f0200ce
public const int ic_mr_button_connecting_05_light = 2130837710;
// aapt resource value: 0x7f0200cf
public const int ic_mr_button_connecting_06_dark = 2130837711;
// aapt resource value: 0x7f0200d0
public const int ic_mr_button_connecting_06_light = 2130837712;
// aapt resource value: 0x7f0200d1
public const int ic_mr_button_connecting_07_dark = 2130837713;
// aapt resource value: 0x7f0200d2
public const int ic_mr_button_connecting_07_light = 2130837714;
// aapt resource value: 0x7f0200d3
public const int ic_mr_button_connecting_08_dark = 2130837715;
// aapt resource value: 0x7f0200d4
public const int ic_mr_button_connecting_08_light = 2130837716;
// aapt resource value: 0x7f0200d5
public const int ic_mr_button_connecting_09_dark = 2130837717;
// aapt resource value: 0x7f0200d6
public const int ic_mr_button_connecting_09_light = 2130837718;
// aapt resource value: 0x7f0200d7
public const int ic_mr_button_connecting_10_dark = 2130837719;
// aapt resource value: 0x7f0200d8
public const int ic_mr_button_connecting_10_light = 2130837720;
// aapt resource value: 0x7f0200d9
public const int ic_mr_button_connecting_11_dark = 2130837721;
// aapt resource value: 0x7f0200da
public const int ic_mr_button_connecting_11_light = 2130837722;
// aapt resource value: 0x7f0200db
public const int ic_mr_button_connecting_12_dark = 2130837723;
// aapt resource value: 0x7f0200dc
public const int ic_mr_button_connecting_12_light = 2130837724;
// aapt resource value: 0x7f0200dd
public const int ic_mr_button_connecting_13_dark = 2130837725;
// aapt resource value: 0x7f0200de
public const int ic_mr_button_connecting_13_light = 2130837726;
// aapt resource value: 0x7f0200df
public const int ic_mr_button_connecting_14_dark = 2130837727;
// aapt resource value: 0x7f0200e0
public const int ic_mr_button_connecting_14_light = 2130837728;
// aapt resource value: 0x7f0200e1
public const int ic_mr_button_connecting_15_dark = 2130837729;
// aapt resource value: 0x7f0200e2
public const int ic_mr_button_connecting_15_light = 2130837730;
// aapt resource value: 0x7f0200e3
public const int ic_mr_button_connecting_16_dark = 2130837731;
// aapt resource value: 0x7f0200e4
public const int ic_mr_button_connecting_16_light = 2130837732;
// aapt resource value: 0x7f0200e5
public const int ic_mr_button_connecting_17_dark = 2130837733;
// aapt resource value: 0x7f0200e6
public const int ic_mr_button_connecting_17_light = 2130837734;
// aapt resource value: 0x7f0200e7
public const int ic_mr_button_connecting_18_dark = 2130837735;
// aapt resource value: 0x7f0200e8
public const int ic_mr_button_connecting_18_light = 2130837736;
// aapt resource value: 0x7f0200e9
public const int ic_mr_button_connecting_19_dark = 2130837737;
// aapt resource value: 0x7f0200ea
public const int ic_mr_button_connecting_19_light = 2130837738;
// aapt resource value: 0x7f0200eb
public const int ic_mr_button_connecting_20_dark = 2130837739;
// aapt resource value: 0x7f0200ec
public const int ic_mr_button_connecting_20_light = 2130837740;
// aapt resource value: 0x7f0200ed
public const int ic_mr_button_connecting_21_dark = 2130837741;
// aapt resource value: 0x7f0200ee
public const int ic_mr_button_connecting_21_light = 2130837742;
// aapt resource value: 0x7f0200ef
public const int ic_mr_button_connecting_22_dark = 2130837743;
// aapt resource value: 0x7f0200f0
public const int ic_mr_button_connecting_22_light = 2130837744;
// aapt resource value: 0x7f0200f1
public const int ic_mr_button_connecting_23_dark = 2130837745;
// aapt resource value: 0x7f0200f2
public const int ic_mr_button_connecting_23_light = 2130837746;
// aapt resource value: 0x7f0200f3
public const int ic_mr_button_connecting_24_dark = 2130837747;
// aapt resource value: 0x7f0200f4
public const int ic_mr_button_connecting_24_light = 2130837748;
// aapt resource value: 0x7f0200f5
public const int ic_mr_button_connecting_25_dark = 2130837749;
// aapt resource value: 0x7f0200f6
public const int ic_mr_button_connecting_25_light = 2130837750;
// aapt resource value: 0x7f0200f7
public const int ic_mr_button_connecting_26_dark = 2130837751;
// aapt resource value: 0x7f0200f8
public const int ic_mr_button_connecting_26_light = 2130837752;
// aapt resource value: 0x7f0200f9
public const int ic_mr_button_connecting_27_dark = 2130837753;
// aapt resource value: 0x7f0200fa
public const int ic_mr_button_connecting_27_light = 2130837754;
// aapt resource value: 0x7f0200fb
public const int ic_mr_button_connecting_28_dark = 2130837755;
// aapt resource value: 0x7f0200fc
public const int ic_mr_button_connecting_28_light = 2130837756;
// aapt resource value: 0x7f0200fd
public const int ic_mr_button_connecting_29_dark = 2130837757;
// aapt resource value: 0x7f0200fe
public const int ic_mr_button_connecting_29_light = 2130837758;
// aapt resource value: 0x7f0200ff
public const int ic_mr_button_connecting_30_dark = 2130837759;
// aapt resource value: 0x7f020100
public const int ic_mr_button_connecting_30_light = 2130837760;
// aapt resource value: 0x7f020101
public const int ic_mr_button_disabled_dark = 2130837761;
// aapt resource value: 0x7f020102
public const int ic_mr_button_disabled_light = 2130837762;
// aapt resource value: 0x7f020103
public const int ic_mr_button_disconnected_dark = 2130837763;
// aapt resource value: 0x7f020104
public const int ic_mr_button_disconnected_light = 2130837764;
// aapt resource value: 0x7f020105
public const int ic_mr_button_grey = 2130837765;
// aapt resource value: 0x7f020106
public const int ic_vol_type_speaker_dark = 2130837766;
// aapt resource value: 0x7f020107
public const int ic_vol_type_speaker_group_dark = 2130837767;
// aapt resource value: 0x7f020108
public const int ic_vol_type_speaker_group_light = 2130837768;
// aapt resource value: 0x7f020109
public const int ic_vol_type_speaker_light = 2130837769;
// aapt resource value: 0x7f02010a
public const int ic_vol_type_tv_dark = 2130837770;
// aapt resource value: 0x7f02010b
public const int ic_vol_type_tv_light = 2130837771;
// aapt resource value: 0x7f02010c
public const int mr_button_connected_dark = 2130837772;
// aapt resource value: 0x7f02010d
public const int mr_button_connected_light = 2130837773;
// aapt resource value: 0x7f02010e
public const int mr_button_connecting_dark = 2130837774;
// aapt resource value: 0x7f02010f
public const int mr_button_connecting_light = 2130837775;
// aapt resource value: 0x7f020110
public const int mr_button_dark = 2130837776;
// aapt resource value: 0x7f020111
public const int mr_button_light = 2130837777;
// aapt resource value: 0x7f020112
public const int mr_dialog_close_dark = 2130837778;
// aapt resource value: 0x7f020113
public const int mr_dialog_close_light = 2130837779;
// aapt resource value: 0x7f020114
public const int mr_dialog_material_background_dark = 2130837780;
// aapt resource value: 0x7f020115
public const int mr_dialog_material_background_light = 2130837781;
// aapt resource value: 0x7f020116
public const int mr_group_collapse = 2130837782;
// aapt resource value: 0x7f020117
public const int mr_group_expand = 2130837783;
// aapt resource value: 0x7f020118
public const int mr_media_pause_dark = 2130837784;
// aapt resource value: 0x7f020119
public const int mr_media_pause_light = 2130837785;
// aapt resource value: 0x7f02011a
public const int mr_media_play_dark = 2130837786;
// aapt resource value: 0x7f02011b
public const int mr_media_play_light = 2130837787;
// aapt resource value: 0x7f02011c
public const int mr_media_stop_dark = 2130837788;
// aapt resource value: 0x7f02011d
public const int mr_media_stop_light = 2130837789;
// aapt resource value: 0x7f02011e
public const int mr_vol_type_audiotrack_dark = 2130837790;
// aapt resource value: 0x7f02011f
public const int mr_vol_type_audiotrack_light = 2130837791;
// aapt resource value: 0x7f020120
public const int navigation_empty_icon = 2130837792;
// aapt resource value: 0x7f020121
public const int notification_action_background = 2130837793;
// aapt resource value: 0x7f020122
public const int notification_bg = 2130837794;
// aapt resource value: 0x7f020123
public const int notification_bg_low = 2130837795;
// aapt resource value: 0x7f020124
public const int notification_bg_low_normal = 2130837796;
// aapt resource value: 0x7f020125
public const int notification_bg_low_pressed = 2130837797;
// aapt resource value: 0x7f020126
public const int notification_bg_normal = 2130837798;
// aapt resource value: 0x7f020127
public const int notification_bg_normal_pressed = 2130837799;
// aapt resource value: 0x7f020128
public const int notification_icon_background = 2130837800;
// aapt resource value: 0x7f02012d
public const int notification_template_icon_bg = 2130837805;
// aapt resource value: 0x7f02012e
public const int notification_template_icon_low_bg = 2130837806;
// aapt resource value: 0x7f020129
public const int notification_tile_bg = 2130837801;
// aapt resource value: 0x7f02012a
public const int notify_panel_notification_icon_bg = 2130837802;
// aapt resource value: 0x7f02012b
public const int tooltip_frame_dark = 2130837803;
// aapt resource value: 0x7f02012c
public const int tooltip_frame_light = 2130837804;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class Id
{
// aapt resource value: 0x7f090032
public const int ALT = 2131296306;
// aapt resource value: 0x7f090033
public const int CTRL = 2131296307;
// aapt resource value: 0x7f090034
public const int FUNCTION = 2131296308;
// aapt resource value: 0x7f090035
public const int META = 2131296309;
// aapt resource value: 0x7f090036
public const int SHIFT = 2131296310;
// aapt resource value: 0x7f090037
public const int SYM = 2131296311;
// aapt resource value: 0x7f0900b6
public const int action0 = 2131296438;
// aapt resource value: 0x7f09007c
public const int action_bar = 2131296380;
// aapt resource value: 0x7f090001
public const int action_bar_activity_content = 2131296257;
// aapt resource value: 0x7f09007b
public const int action_bar_container = 2131296379;
// aapt resource value: 0x7f090077
public const int action_bar_root = 2131296375;
// aapt resource value: 0x7f090002
public const int action_bar_spinner = 2131296258;
// aapt resource value: 0x7f09005b
public const int action_bar_subtitle = 2131296347;
// aapt resource value: 0x7f09005a
public const int action_bar_title = 2131296346;
// aapt resource value: 0x7f0900b3
public const int action_container = 2131296435;
// aapt resource value: 0x7f09007d
public const int action_context_bar = 2131296381;
// aapt resource value: 0x7f0900ba
public const int action_divider = 2131296442;
// aapt resource value: 0x7f0900b4
public const int action_image = 2131296436;
// aapt resource value: 0x7f090003
public const int action_menu_divider = 2131296259;
// aapt resource value: 0x7f090004
public const int action_menu_presenter = 2131296260;
// aapt resource value: 0x7f090079
public const int action_mode_bar = 2131296377;
// aapt resource value: 0x7f090078
public const int action_mode_bar_stub = 2131296376;
// aapt resource value: 0x7f09005c
public const int action_mode_close_button = 2131296348;
// aapt resource value: 0x7f0900b5
public const int action_text = 2131296437;
// aapt resource value: 0x7f0900c3
public const int actions = 2131296451;
// aapt resource value: 0x7f09005d
public const int activity_chooser_view_content = 2131296349;
// aapt resource value: 0x7f090027
public const int add = 2131296295;
// aapt resource value: 0x7f090070
public const int alertTitle = 2131296368;
// aapt resource value: 0x7f090052
public const int all = 2131296338;
// aapt resource value: 0x7f090038
public const int always = 2131296312;
// aapt resource value: 0x7f090056
public const int async = 2131296342;
// aapt resource value: 0x7f090044
public const int auto = 2131296324;
// aapt resource value: 0x7f09002f
public const int beginning = 2131296303;
// aapt resource value: 0x7f090057
public const int blocking = 2131296343;
// aapt resource value: 0x7f09003d
public const int bottom = 2131296317;
// aapt resource value: 0x7f090063
public const int buttonPanel = 2131296355;
// aapt resource value: 0x7f0900b7
public const int cancel_action = 2131296439;
// aapt resource value: 0x7f090045
public const int center = 2131296325;
// aapt resource value: 0x7f090046
public const int center_horizontal = 2131296326;
// aapt resource value: 0x7f090047
public const int center_vertical = 2131296327;
// aapt resource value: 0x7f090073
public const int checkbox = 2131296371;
// aapt resource value: 0x7f0900bf
public const int chronometer = 2131296447;
// aapt resource value: 0x7f09004e
public const int clip_horizontal = 2131296334;
// aapt resource value: 0x7f09004f
public const int clip_vertical = 2131296335;
// aapt resource value: 0x7f090039
public const int collapseActionView = 2131296313;
// aapt resource value: 0x7f09008d
public const int container = 2131296397;
// aapt resource value: 0x7f090066
public const int contentPanel = 2131296358;
// aapt resource value: 0x7f09008e
public const int coordinator = 2131296398;
// aapt resource value: 0x7f09006d
public const int custom = 2131296365;
// aapt resource value: 0x7f09006c
public const int customPanel = 2131296364;
// aapt resource value: 0x7f09007a
public const int decor_content_parent = 2131296378;
// aapt resource value: 0x7f090060
public const int default_activity_button = 2131296352;
// aapt resource value: 0x7f090090
public const int design_bottom_sheet = 2131296400;
// aapt resource value: 0x7f090097
public const int design_menu_item_action_area = 2131296407;
// aapt resource value: 0x7f090096
public const int design_menu_item_action_area_stub = 2131296406;
// aapt resource value: 0x7f090095
public const int design_menu_item_text = 2131296405;
// aapt resource value: 0x7f090094
public const int design_navigation_view = 2131296404;
// aapt resource value: 0x7f090020
public const int disableHome = 2131296288;
// aapt resource value: 0x7f09007e
public const int edit_query = 2131296382;
// aapt resource value: 0x7f090030
public const int end = 2131296304;
// aapt resource value: 0x7f0900c5
public const int end_padder = 2131296453;
// aapt resource value: 0x7f09003f
public const int enterAlways = 2131296319;
// aapt resource value: 0x7f090040
public const int enterAlwaysCollapsed = 2131296320;
// aapt resource value: 0x7f090041
public const int exitUntilCollapsed = 2131296321;
// aapt resource value: 0x7f09005e
public const int expand_activities_button = 2131296350;
// aapt resource value: 0x7f090072
public const int expanded_menu = 2131296370;
// aapt resource value: 0x7f090050
public const int fill = 2131296336;
// aapt resource value: 0x7f090051
public const int fill_horizontal = 2131296337;
// aapt resource value: 0x7f090048
public const int fill_vertical = 2131296328;
// aapt resource value: 0x7f090054
public const int @fixed = 2131296340;
// aapt resource value: 0x7f090058
public const int forever = 2131296344;
// aapt resource value: 0x7f09000a
public const int ghost_view = 2131296266;
// aapt resource value: 0x7f090005
public const int home = 2131296261;
// aapt resource value: 0x7f090021
public const int homeAsUp = 2131296289;
// aapt resource value: 0x7f090062
public const int icon = 2131296354;
// aapt resource value: 0x7f0900c4
public const int icon_group = 2131296452;
// aapt resource value: 0x7f09003a
public const int ifRoom = 2131296314;
// aapt resource value: 0x7f09005f
public const int image = 2131296351;
// aapt resource value: 0x7f0900c0
public const int info = 2131296448;
// aapt resource value: 0x7f090059
public const int italic = 2131296345;
// aapt resource value: 0x7f090000
public const int item_touch_helper_previous_elevation = 2131296256;
// aapt resource value: 0x7f09008c
public const int largeLabel = 2131296396;
// aapt resource value: 0x7f090049
public const int left = 2131296329;
// aapt resource value: 0x7f090017
public const int line1 = 2131296279;
// aapt resource value: 0x7f090018
public const int line3 = 2131296280;
// aapt resource value: 0x7f09001d
public const int listMode = 2131296285;
// aapt resource value: 0x7f090061
public const int list_item = 2131296353;
// aapt resource value: 0x7f0900ca
public const int masked = 2131296458;
// aapt resource value: 0x7f0900b9
public const int media_actions = 2131296441;
// aapt resource value: 0x7f0900c8
public const int message = 2131296456;
// aapt resource value: 0x7f090031
public const int middle = 2131296305;
// aapt resource value: 0x7f090053
public const int mini = 2131296339;
// aapt resource value: 0x7f0900a5
public const int mr_art = 2131296421;
// aapt resource value: 0x7f09009a
public const int mr_chooser_list = 2131296410;
// aapt resource value: 0x7f09009d
public const int mr_chooser_route_desc = 2131296413;
// aapt resource value: 0x7f09009b
public const int mr_chooser_route_icon = 2131296411;
// aapt resource value: 0x7f09009c
public const int mr_chooser_route_name = 2131296412;
// aapt resource value: 0x7f090099
public const int mr_chooser_title = 2131296409;
// aapt resource value: 0x7f0900a2
public const int mr_close = 2131296418;
// aapt resource value: 0x7f0900a8
public const int mr_control_divider = 2131296424;
// aapt resource value: 0x7f0900ae
public const int mr_control_playback_ctrl = 2131296430;
// aapt resource value: 0x7f0900b1
public const int mr_control_subtitle = 2131296433;
// aapt resource value: 0x7f0900b0
public const int mr_control_title = 2131296432;
// aapt resource value: 0x7f0900af
public const int mr_control_title_container = 2131296431;
// aapt resource value: 0x7f0900a3
public const int mr_custom_control = 2131296419;
// aapt resource value: 0x7f0900a4
public const int mr_default_control = 2131296420;
// aapt resource value: 0x7f09009f
public const int mr_dialog_area = 2131296415;
// aapt resource value: 0x7f09009e
public const int mr_expandable_area = 2131296414;
// aapt resource value: 0x7f0900b2
public const int mr_group_expand_collapse = 2131296434;
// aapt resource value: 0x7f0900a6
public const int mr_media_main_control = 2131296422;
// aapt resource value: 0x7f0900a1
public const int mr_name = 2131296417;
// aapt resource value: 0x7f0900a7
public const int mr_playback_control = 2131296423;
// aapt resource value: 0x7f0900a0
public const int mr_title_bar = 2131296416;
// aapt resource value: 0x7f0900a9
public const int mr_volume_control = 2131296425;
// aapt resource value: 0x7f0900aa
public const int mr_volume_group_list = 2131296426;
// aapt resource value: 0x7f0900ac
public const int mr_volume_item_icon = 2131296428;
// aapt resource value: 0x7f0900ad
public const int mr_volume_slider = 2131296429;
// aapt resource value: 0x7f090028
public const int multiply = 2131296296;
// aapt resource value: 0x7f090093
public const int navigation_header_container = 2131296403;
// aapt resource value: 0x7f09003b
public const int never = 2131296315;
// aapt resource value: 0x7f090022
public const int none = 2131296290;
// aapt resource value: 0x7f09001e
public const int normal = 2131296286;
// aapt resource value: 0x7f0900c2
public const int notification_background = 2131296450;
// aapt resource value: 0x7f0900bc
public const int notification_main_column = 2131296444;
// aapt resource value: 0x7f0900bb
public const int notification_main_column_container = 2131296443;
// aapt resource value: 0x7f09004c
public const int parallax = 2131296332;
// aapt resource value: 0x7f090065
public const int parentPanel = 2131296357;
// aapt resource value: 0x7f09000b
public const int parent_matrix = 2131296267;
// aapt resource value: 0x7f09004d
public const int pin = 2131296333;
// aapt resource value: 0x7f090006
public const int progress_circular = 2131296262;
// aapt resource value: 0x7f090007
public const int progress_horizontal = 2131296263;
// aapt resource value: 0x7f090075
public const int radio = 2131296373;
// aapt resource value: 0x7f09004a
public const int right = 2131296330;
// aapt resource value: 0x7f0900c1
public const int right_icon = 2131296449;
// aapt resource value: 0x7f0900bd
public const int right_side = 2131296445;
// aapt resource value: 0x7f09000c
public const int save_image_matrix = 2131296268;
// aapt resource value: 0x7f09000d
public const int save_non_transition_alpha = 2131296269;
// aapt resource value: 0x7f09000e
public const int save_scale_type = 2131296270;
// aapt resource value: 0x7f090029
public const int screen = 2131296297;
// aapt resource value: 0x7f090042
public const int scroll = 2131296322;
// aapt resource value: 0x7f09006b
public const int scrollIndicatorDown = 2131296363;
// aapt resource value: 0x7f090067
public const int scrollIndicatorUp = 2131296359;
// aapt resource value: 0x7f090068
public const int scrollView = 2131296360;
// aapt resource value: 0x7f090055
public const int scrollable = 2131296341;
// aapt resource value: 0x7f090080
public const int search_badge = 2131296384;
// aapt resource value: 0x7f09007f
public const int search_bar = 2131296383;
// aapt resource value: 0x7f090081
public const int search_button = 2131296385;
// aapt resource value: 0x7f090086
public const int search_close_btn = 2131296390;
// aapt resource value: 0x7f090082
public const int search_edit_frame = 2131296386;
// aapt resource value: 0x7f090088
public const int search_go_btn = 2131296392;
// aapt resource value: 0x7f090083
public const int search_mag_icon = 2131296387;
// aapt resource value: 0x7f090084
public const int search_plate = 2131296388;
// aapt resource value: 0x7f090085
public const int search_src_text = 2131296389;
// aapt resource value: 0x7f090089
public const int search_voice_btn = 2131296393;
// aapt resource value: 0x7f09008a
public const int select_dialog_listview = 2131296394;
// aapt resource value: 0x7f090074
public const int shortcut = 2131296372;
// aapt resource value: 0x7f090023
public const int showCustom = 2131296291;
// aapt resource value: 0x7f090024
public const int showHome = 2131296292;
// aapt resource value: 0x7f090025
public const int showTitle = 2131296293;
// aapt resource value: 0x7f0900c6
public const int sliding_tabs = 2131296454;
// aapt resource value: 0x7f09008b
public const int smallLabel = 2131296395;
// aapt resource value: 0x7f090092
public const int snackbar_action = 2131296402;
// aapt resource value: 0x7f090091
public const int snackbar_text = 2131296401;
// aapt resource value: 0x7f090043
public const int snap = 2131296323;
// aapt resource value: 0x7f090064
public const int spacer = 2131296356;
// aapt resource value: 0x7f090008
public const int split_action_bar = 2131296264;
// aapt resource value: 0x7f09002a
public const int src_atop = 2131296298;
// aapt resource value: 0x7f09002b
public const int src_in = 2131296299;
// aapt resource value: 0x7f09002c
public const int src_over = 2131296300;
// aapt resource value: 0x7f09004b
public const int start = 2131296331;
// aapt resource value: 0x7f0900b8
public const int status_bar_latest_event_content = 2131296440;
// aapt resource value: 0x7f090076
public const int submenuarrow = 2131296374;
// aapt resource value: 0x7f090087
public const int submit_area = 2131296391;
// aapt resource value: 0x7f09001f
public const int tabMode = 2131296287;
// aapt resource value: 0x7f090019
public const int tag_transition_group = 2131296281;
// aapt resource value: 0x7f09001a
public const int text = 2131296282;
// aapt resource value: 0x7f09001b
public const int text2 = 2131296283;
// aapt resource value: 0x7f09006a
public const int textSpacerNoButtons = 2131296362;
// aapt resource value: 0x7f090069
public const int textSpacerNoTitle = 2131296361;
// aapt resource value: 0x7f090098
public const int text_input_password_toggle = 2131296408;
// aapt resource value: 0x7f090014
public const int textinput_counter = 2131296276;
// aapt resource value: 0x7f090015
public const int textinput_error = 2131296277;
// aapt resource value: 0x7f0900be
public const int time = 2131296446;
// aapt resource value: 0x7f09001c
public const int title = 2131296284;
// aapt resource value: 0x7f090071
public const int titleDividerNoCustom = 2131296369;
// aapt resource value: 0x7f09006f
public const int title_template = 2131296367;
// aapt resource value: 0x7f0900c7
public const int toolbar = 2131296455;
// aapt resource value: 0x7f09003e
public const int top = 2131296318;
// aapt resource value: 0x7f09006e
public const int topPanel = 2131296366;
// aapt resource value: 0x7f09008f
public const int touch_outside = 2131296399;
// aapt resource value: 0x7f09000f
public const int transition_current_scene = 2131296271;
// aapt resource value: 0x7f090010
public const int transition_layout_save = 2131296272;
// aapt resource value: 0x7f090011
public const int transition_position = 2131296273;
// aapt resource value: 0x7f090012
public const int transition_scene_layoutid_cache = 2131296274;
// aapt resource value: 0x7f090013
public const int transition_transform = 2131296275;
// aapt resource value: 0x7f09002d
public const int uniform = 2131296301;
// aapt resource value: 0x7f090009
public const int up = 2131296265;
// aapt resource value: 0x7f090026
public const int useLogo = 2131296294;
// aapt resource value: 0x7f090016
public const int view_offset_helper = 2131296278;
// aapt resource value: 0x7f0900c9
public const int visible = 2131296457;
// aapt resource value: 0x7f0900ab
public const int volume_item_container = 2131296427;
// aapt resource value: 0x7f09003c
public const int withText = 2131296316;
// aapt resource value: 0x7f09002e
public const int wrap_content = 2131296302;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Integer
{
// aapt resource value: 0x7f0b0003
public const int abc_config_activityDefaultDur = 2131427331;
// aapt resource value: 0x7f0b0004
public const int abc_config_activityShortDur = 2131427332;
// aapt resource value: 0x7f0b0008
public const int app_bar_elevation_anim_duration = 2131427336;
// aapt resource value: 0x7f0b0009
public const int bottom_sheet_slide_duration = 2131427337;
// aapt resource value: 0x7f0b0005
public const int cancel_button_image_alpha = 2131427333;
// aapt resource value: 0x7f0b0006
public const int config_tooltipAnimTime = 2131427334;
// aapt resource value: 0x7f0b0007
public const int design_snackbar_text_max_lines = 2131427335;
// aapt resource value: 0x7f0b000a
public const int hide_password_duration = 2131427338;
// aapt resource value: 0x7f0b0000
public const int mr_controller_volume_group_list_animation_duration_ms = 2131427328;
// aapt resource value: 0x7f0b0001
public const int mr_controller_volume_group_list_fade_in_duration_ms = 2131427329;
// aapt resource value: 0x7f0b0002
public const int mr_controller_volume_group_list_fade_out_duration_ms = 2131427330;
// aapt resource value: 0x7f0b000b
public const int show_password_duration = 2131427339;
// aapt resource value: 0x7f0b000c
public const int status_bar_notification_info_maxnum = 2131427340;
static Integer()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Integer()
{
}
}
public partial class Interpolator
{
// aapt resource value: 0x7f070000
public const int mr_fast_out_slow_in = 2131165184;
// aapt resource value: 0x7f070001
public const int mr_linear_out_slow_in = 2131165185;
static Interpolator()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Interpolator()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7f040000
public const int abc_action_bar_title_item = 2130968576;
// aapt resource value: 0x7f040001
public const int abc_action_bar_up_container = 2130968577;
// aapt resource value: 0x7f040002
public const int abc_action_menu_item_layout = 2130968578;
// aapt resource value: 0x7f040003
public const int abc_action_menu_layout = 2130968579;
// aapt resource value: 0x7f040004
public const int abc_action_mode_bar = 2130968580;
// aapt resource value: 0x7f040005
public const int abc_action_mode_close_item_material = 2130968581;
// aapt resource value: 0x7f040006
public const int abc_activity_chooser_view = 2130968582;
// aapt resource value: 0x7f040007
public const int abc_activity_chooser_view_list_item = 2130968583;
// aapt resource value: 0x7f040008
public const int abc_alert_dialog_button_bar_material = 2130968584;
// aapt resource value: 0x7f040009
public const int abc_alert_dialog_material = 2130968585;
// aapt resource value: 0x7f04000a
public const int abc_alert_dialog_title_material = 2130968586;
// aapt resource value: 0x7f04000b
public const int abc_dialog_title_material = 2130968587;
// aapt resource value: 0x7f04000c
public const int abc_expanded_menu_layout = 2130968588;
// aapt resource value: 0x7f04000d
public const int abc_list_menu_item_checkbox = 2130968589;
// aapt resource value: 0x7f04000e
public const int abc_list_menu_item_icon = 2130968590;
// aapt resource value: 0x7f04000f
public const int abc_list_menu_item_layout = 2130968591;
// aapt resource value: 0x7f040010
public const int abc_list_menu_item_radio = 2130968592;
// aapt resource value: 0x7f040011
public const int abc_popup_menu_header_item_layout = 2130968593;
// aapt resource value: 0x7f040012
public const int abc_popup_menu_item_layout = 2130968594;
// aapt resource value: 0x7f040013
public const int abc_screen_content_include = 2130968595;
// aapt resource value: 0x7f040014
public const int abc_screen_simple = 2130968596;
// aapt resource value: 0x7f040015
public const int abc_screen_simple_overlay_action_mode = 2130968597;
// aapt resource value: 0x7f040016
public const int abc_screen_toolbar = 2130968598;
// aapt resource value: 0x7f040017
public const int abc_search_dropdown_item_icons_2line = 2130968599;
// aapt resource value: 0x7f040018
public const int abc_search_view = 2130968600;
// aapt resource value: 0x7f040019
public const int abc_select_dialog_material = 2130968601;
// aapt resource value: 0x7f04001a
public const int design_bottom_navigation_item = 2130968602;
// aapt resource value: 0x7f04001b
public const int design_bottom_sheet_dialog = 2130968603;
// aapt resource value: 0x7f04001c
public const int design_layout_snackbar = 2130968604;
// aapt resource value: 0x7f04001d
public const int design_layout_snackbar_include = 2130968605;
// aapt resource value: 0x7f04001e
public const int design_layout_tab_icon = 2130968606;
// aapt resource value: 0x7f04001f
public const int design_layout_tab_text = 2130968607;
// aapt resource value: 0x7f040020
public const int design_menu_item_action_area = 2130968608;
// aapt resource value: 0x7f040021
public const int design_navigation_item = 2130968609;
// aapt resource value: 0x7f040022
public const int design_navigation_item_header = 2130968610;
// aapt resource value: 0x7f040023
public const int design_navigation_item_separator = 2130968611;
// aapt resource value: 0x7f040024
public const int design_navigation_item_subheader = 2130968612;
// aapt resource value: 0x7f040025
public const int design_navigation_menu = 2130968613;
// aapt resource value: 0x7f040026
public const int design_navigation_menu_item = 2130968614;
// aapt resource value: 0x7f040027
public const int design_text_input_password_icon = 2130968615;
// aapt resource value: 0x7f040028
public const int mr_chooser_dialog = 2130968616;
// aapt resource value: 0x7f040029
public const int mr_chooser_list_item = 2130968617;
// aapt resource value: 0x7f04002a
public const int mr_controller_material_dialog_b = 2130968618;
// aapt resource value: 0x7f04002b
public const int mr_controller_volume_item = 2130968619;
// aapt resource value: 0x7f04002c
public const int mr_playback_control = 2130968620;
// aapt resource value: 0x7f04002d
public const int mr_volume_control = 2130968621;
// aapt resource value: 0x7f04002e
public const int notification_action = 2130968622;
// aapt resource value: 0x7f04002f
public const int notification_action_tombstone = 2130968623;
// aapt resource value: 0x7f040030
public const int notification_media_action = 2130968624;
// aapt resource value: 0x7f040031
public const int notification_media_cancel_action = 2130968625;
// aapt resource value: 0x7f040032
public const int notification_template_big_media = 2130968626;
// aapt resource value: 0x7f040033
public const int notification_template_big_media_custom = 2130968627;
// aapt resource value: 0x7f040034
public const int notification_template_big_media_narrow = 2130968628;
// aapt resource value: 0x7f040035
public const int notification_template_big_media_narrow_custom = 2130968629;
// aapt resource value: 0x7f040036
public const int notification_template_custom_big = 2130968630;
// aapt resource value: 0x7f040037
public const int notification_template_icon_group = 2130968631;
// aapt resource value: 0x7f040038
public const int notification_template_lines_media = 2130968632;
// aapt resource value: 0x7f040039
public const int notification_template_media = 2130968633;
// aapt resource value: 0x7f04003a
public const int notification_template_media_custom = 2130968634;
// aapt resource value: 0x7f04003b
public const int notification_template_part_chronometer = 2130968635;
// aapt resource value: 0x7f04003c
public const int notification_template_part_time = 2130968636;
// aapt resource value: 0x7f04003d
public const int select_dialog_item_material = 2130968637;
// aapt resource value: 0x7f04003e
public const int select_dialog_multichoice_material = 2130968638;
// aapt resource value: 0x7f04003f
public const int select_dialog_singlechoice_material = 2130968639;
// aapt resource value: 0x7f040040
public const int support_simple_spinner_dropdown_item = 2130968640;
// aapt resource value: 0x7f040041
public const int Tabbar = 2130968641;
// aapt resource value: 0x7f040042
public const int Toolbar = 2130968642;
// aapt resource value: 0x7f040043
public const int tooltip = 2130968643;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class Mipmap
{
// aapt resource value: 0x7f030000
public const int icon = 2130903040;
// aapt resource value: 0x7f030001
public const int icon_round = 2130903041;
// aapt resource value: 0x7f030002
public const int launcher_foreground = 2130903042;
static Mipmap()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Mipmap()
{
}
}
public partial class String
{
// aapt resource value: 0x7f0a0015
public const int abc_action_bar_home_description = 2131361813;
// aapt resource value: 0x7f0a0016
public const int abc_action_bar_up_description = 2131361814;
// aapt resource value: 0x7f0a0017
public const int abc_action_menu_overflow_description = 2131361815;
// aapt resource value: 0x7f0a0018
public const int abc_action_mode_done = 2131361816;
// aapt resource value: 0x7f0a0019
public const int abc_activity_chooser_view_see_all = 2131361817;
// aapt resource value: 0x7f0a001a
public const int abc_activitychooserview_choose_application = 2131361818;
// aapt resource value: 0x7f0a001b
public const int abc_capital_off = 2131361819;
// aapt resource value: 0x7f0a001c
public const int abc_capital_on = 2131361820;
// aapt resource value: 0x7f0a0027
public const int abc_font_family_body_1_material = 2131361831;
// aapt resource value: 0x7f0a0028
public const int abc_font_family_body_2_material = 2131361832;
// aapt resource value: 0x7f0a0029
public const int abc_font_family_button_material = 2131361833;
// aapt resource value: 0x7f0a002a
public const int abc_font_family_caption_material = 2131361834;
// aapt resource value: 0x7f0a002b
public const int abc_font_family_display_1_material = 2131361835;
// aapt resource value: 0x7f0a002c
public const int abc_font_family_display_2_material = 2131361836;
// aapt resource value: 0x7f0a002d
public const int abc_font_family_display_3_material = 2131361837;
// aapt resource value: 0x7f0a002e
public const int abc_font_family_display_4_material = 2131361838;
// aapt resource value: 0x7f0a002f
public const int abc_font_family_headline_material = 2131361839;
// aapt resource value: 0x7f0a0030
public const int abc_font_family_menu_material = 2131361840;
// aapt resource value: 0x7f0a0031
public const int abc_font_family_subhead_material = 2131361841;
// aapt resource value: 0x7f0a0032
public const int abc_font_family_title_material = 2131361842;
// aapt resource value: 0x7f0a001d
public const int abc_search_hint = 2131361821;
// aapt resource value: 0x7f0a001e
public const int abc_searchview_description_clear = 2131361822;
// aapt resource value: 0x7f0a001f
public const int abc_searchview_description_query = 2131361823;
// aapt resource value: 0x7f0a0020
public const int abc_searchview_description_search = 2131361824;
// aapt resource value: 0x7f0a0021
public const int abc_searchview_description_submit = 2131361825;
// aapt resource value: 0x7f0a0022
public const int abc_searchview_description_voice = 2131361826;
// aapt resource value: 0x7f0a0023
public const int abc_shareactionprovider_share_with = 2131361827;
// aapt resource value: 0x7f0a0024
public const int abc_shareactionprovider_share_with_application = 2131361828;
// aapt resource value: 0x7f0a0025
public const int abc_toolbar_collapse_description = 2131361829;
// aapt resource value: 0x7f0a0033
public const int appbar_scrolling_view_behavior = 2131361843;
// aapt resource value: 0x7f0a0034
public const int bottom_sheet_behavior = 2131361844;
// aapt resource value: 0x7f0a0035
public const int character_counter_pattern = 2131361845;
// aapt resource value: 0x7f0a0000
public const int mr_button_content_description = 2131361792;
// aapt resource value: 0x7f0a0001
public const int mr_cast_button_connected = 2131361793;
// aapt resource value: 0x7f0a0002
public const int mr_cast_button_connecting = 2131361794;
// aapt resource value: 0x7f0a0003
public const int mr_cast_button_disconnected = 2131361795;
// aapt resource value: 0x7f0a0004
public const int mr_chooser_searching = 2131361796;
// aapt resource value: 0x7f0a0005
public const int mr_chooser_title = 2131361797;
// aapt resource value: 0x7f0a0006
public const int mr_controller_album_art = 2131361798;
// aapt resource value: 0x7f0a0007
public const int mr_controller_casting_screen = 2131361799;
// aapt resource value: 0x7f0a0008
public const int mr_controller_close_description = 2131361800;
// aapt resource value: 0x7f0a0009
public const int mr_controller_collapse_group = 2131361801;
// aapt resource value: 0x7f0a000a
public const int mr_controller_disconnect = 2131361802;
// aapt resource value: 0x7f0a000b
public const int mr_controller_expand_group = 2131361803;
// aapt resource value: 0x7f0a000c
public const int mr_controller_no_info_available = 2131361804;
// aapt resource value: 0x7f0a000d
public const int mr_controller_no_media_selected = 2131361805;
// aapt resource value: 0x7f0a000e
public const int mr_controller_pause = 2131361806;
// aapt resource value: 0x7f0a000f
public const int mr_controller_play = 2131361807;
// aapt resource value: 0x7f0a0010
public const int mr_controller_stop = 2131361808;
// aapt resource value: 0x7f0a0011
public const int mr_controller_stop_casting = 2131361809;
// aapt resource value: 0x7f0a0012
public const int mr_controller_volume_slider = 2131361810;
// aapt resource value: 0x7f0a0013
public const int mr_system_route_name = 2131361811;
// aapt resource value: 0x7f0a0014
public const int mr_user_route_category_name = 2131361812;
// aapt resource value: 0x7f0a0036
public const int password_toggle_content_description = 2131361846;
// aapt resource value: 0x7f0a0037
public const int path_password_eye = 2131361847;
// aapt resource value: 0x7f0a0038
public const int path_password_eye_mask_strike_through = 2131361848;
// aapt resource value: 0x7f0a0039
public const int path_password_eye_mask_visible = 2131361849;
// aapt resource value: 0x7f0a003a
public const int path_password_strike_through = 2131361850;
// aapt resource value: 0x7f0a0026
public const int search_menu_title = 2131361830;
// aapt resource value: 0x7f0a003b
public const int status_bar_notification_info_overflow = 2131361851;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
public partial class Style
{
// aapt resource value: 0x7f0c00a4
public const int AlertDialog_AppCompat = 2131493028;
// aapt resource value: 0x7f0c00a5
public const int AlertDialog_AppCompat_Light = 2131493029;
// aapt resource value: 0x7f0c00a6
public const int Animation_AppCompat_Dialog = 2131493030;
// aapt resource value: 0x7f0c00a7
public const int Animation_AppCompat_DropDownUp = 2131493031;
// aapt resource value: 0x7f0c00a8
public const int Animation_AppCompat_Tooltip = 2131493032;
// aapt resource value: 0x7f0c016e
public const int Animation_Design_BottomSheetDialog = 2131493230;
// aapt resource value: 0x7f0c0191
public const int AppCompatDialogStyle = 2131493265;
// aapt resource value: 0x7f0c00a9
public const int Base_AlertDialog_AppCompat = 2131493033;
// aapt resource value: 0x7f0c00aa
public const int Base_AlertDialog_AppCompat_Light = 2131493034;
// aapt resource value: 0x7f0c00ab
public const int Base_Animation_AppCompat_Dialog = 2131493035;
// aapt resource value: 0x7f0c00ac
public const int Base_Animation_AppCompat_DropDownUp = 2131493036;
// aapt resource value: 0x7f0c00ad
public const int Base_Animation_AppCompat_Tooltip = 2131493037;
// aapt resource value: 0x7f0c000c
public const int Base_CardView = 2131492876;
// aapt resource value: 0x7f0c00ae
public const int Base_DialogWindowTitle_AppCompat = 2131493038;
// aapt resource value: 0x7f0c00af
public const int Base_DialogWindowTitleBackground_AppCompat = 2131493039;
// aapt resource value: 0x7f0c0048
public const int Base_TextAppearance_AppCompat = 2131492936;
// aapt resource value: 0x7f0c0049
public const int Base_TextAppearance_AppCompat_Body1 = 2131492937;
// aapt resource value: 0x7f0c004a
public const int Base_TextAppearance_AppCompat_Body2 = 2131492938;
// aapt resource value: 0x7f0c0036
public const int Base_TextAppearance_AppCompat_Button = 2131492918;
// aapt resource value: 0x7f0c004b
public const int Base_TextAppearance_AppCompat_Caption = 2131492939;
// aapt resource value: 0x7f0c004c
public const int Base_TextAppearance_AppCompat_Display1 = 2131492940;
// aapt resource value: 0x7f0c004d
public const int Base_TextAppearance_AppCompat_Display2 = 2131492941;
// aapt resource value: 0x7f0c004e
public const int Base_TextAppearance_AppCompat_Display3 = 2131492942;
// aapt resource value: 0x7f0c004f
public const int Base_TextAppearance_AppCompat_Display4 = 2131492943;
// aapt resource value: 0x7f0c0050
public const int Base_TextAppearance_AppCompat_Headline = 2131492944;
// aapt resource value: 0x7f0c001a
public const int Base_TextAppearance_AppCompat_Inverse = 2131492890;
// aapt resource value: 0x7f0c0051
public const int Base_TextAppearance_AppCompat_Large = 2131492945;
// aapt resource value: 0x7f0c001b
public const int Base_TextAppearance_AppCompat_Large_Inverse = 2131492891;
// aapt resource value: 0x7f0c0052
public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131492946;
// aapt resource value: 0x7f0c0053
public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131492947;
// aapt resource value: 0x7f0c0054
public const int Base_TextAppearance_AppCompat_Medium = 2131492948;
// aapt resource value: 0x7f0c001c
public const int Base_TextAppearance_AppCompat_Medium_Inverse = 2131492892;
// aapt resource value: 0x7f0c0055
public const int Base_TextAppearance_AppCompat_Menu = 2131492949;
// aapt resource value: 0x7f0c00b0
public const int Base_TextAppearance_AppCompat_SearchResult = 2131493040;
// aapt resource value: 0x7f0c0056
public const int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131492950;
// aapt resource value: 0x7f0c0057
public const int Base_TextAppearance_AppCompat_SearchResult_Title = 2131492951;
// aapt resource value: 0x7f0c0058
public const int Base_TextAppearance_AppCompat_Small = 2131492952;
// aapt resource value: 0x7f0c001d
public const int Base_TextAppearance_AppCompat_Small_Inverse = 2131492893;
// aapt resource value: 0x7f0c0059
public const int Base_TextAppearance_AppCompat_Subhead = 2131492953;
// aapt resource value: 0x7f0c001e
public const int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131492894;
// aapt resource value: 0x7f0c005a
public const int Base_TextAppearance_AppCompat_Title = 2131492954;
// aapt resource value: 0x7f0c001f
public const int Base_TextAppearance_AppCompat_Title_Inverse = 2131492895;
// aapt resource value: 0x7f0c00b1
public const int Base_TextAppearance_AppCompat_Tooltip = 2131493041;
// aapt resource value: 0x7f0c0095
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131493013;
// aapt resource value: 0x7f0c005b
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131492955;
// aapt resource value: 0x7f0c005c
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131492956;
// aapt resource value: 0x7f0c005d
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131492957;
// aapt resource value: 0x7f0c005e
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131492958;
// aapt resource value: 0x7f0c005f
public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131492959;
// aapt resource value: 0x7f0c0060
public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131492960;
// aapt resource value: 0x7f0c0061
public const int Base_TextAppearance_AppCompat_Widget_Button = 2131492961;
// aapt resource value: 0x7f0c009c
public const int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131493020;
// aapt resource value: 0x7f0c009d
public const int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131493021;
// aapt resource value: 0x7f0c0096
public const int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131493014;
// aapt resource value: 0x7f0c00b2
public const int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131493042;
// aapt resource value: 0x7f0c0062
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131492962;
// aapt resource value: 0x7f0c0063
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131492963;
// aapt resource value: 0x7f0c0064
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131492964;
// aapt resource value: 0x7f0c0065
public const int Base_TextAppearance_AppCompat_Widget_Switch = 2131492965;
// aapt resource value: 0x7f0c0066
public const int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131492966;
// aapt resource value: 0x7f0c00b3
public const int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131493043;
// aapt resource value: 0x7f0c0067
public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131492967;
// aapt resource value: 0x7f0c0068
public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131492968;
// aapt resource value: 0x7f0c0069
public const int Base_Theme_AppCompat = 2131492969;
// aapt resource value: 0x7f0c00b4
public const int Base_Theme_AppCompat_CompactMenu = 2131493044;
// aapt resource value: 0x7f0c0020
public const int Base_Theme_AppCompat_Dialog = 2131492896;
// aapt resource value: 0x7f0c0021
public const int Base_Theme_AppCompat_Dialog_Alert = 2131492897;
// aapt resource value: 0x7f0c00b5
public const int Base_Theme_AppCompat_Dialog_FixedSize = 2131493045;
// aapt resource value: 0x7f0c0022
public const int Base_Theme_AppCompat_Dialog_MinWidth = 2131492898;
// aapt resource value: 0x7f0c0010
public const int Base_Theme_AppCompat_DialogWhenLarge = 2131492880;
// aapt resource value: 0x7f0c006a
public const int Base_Theme_AppCompat_Light = 2131492970;
// aapt resource value: 0x7f0c00b6
public const int Base_Theme_AppCompat_Light_DarkActionBar = 2131493046;
// aapt resource value: 0x7f0c0023
public const int Base_Theme_AppCompat_Light_Dialog = 2131492899;
// aapt resource value: 0x7f0c0024
public const int Base_Theme_AppCompat_Light_Dialog_Alert = 2131492900;
// aapt resource value: 0x7f0c00b7
public const int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131493047;
// aapt resource value: 0x7f0c0025
public const int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131492901;
// aapt resource value: 0x7f0c0011
public const int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131492881;
// aapt resource value: 0x7f0c00b8
public const int Base_ThemeOverlay_AppCompat = 2131493048;
// aapt resource value: 0x7f0c00b9
public const int Base_ThemeOverlay_AppCompat_ActionBar = 2131493049;
// aapt resource value: 0x7f0c00ba
public const int Base_ThemeOverlay_AppCompat_Dark = 2131493050;
// aapt resource value: 0x7f0c00bb
public const int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131493051;
// aapt resource value: 0x7f0c0026
public const int Base_ThemeOverlay_AppCompat_Dialog = 2131492902;
// aapt resource value: 0x7f0c0027
public const int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131492903;
// aapt resource value: 0x7f0c00bc
public const int Base_ThemeOverlay_AppCompat_Light = 2131493052;
// aapt resource value: 0x7f0c0028
public const int Base_V11_Theme_AppCompat_Dialog = 2131492904;
// aapt resource value: 0x7f0c0029
public const int Base_V11_Theme_AppCompat_Light_Dialog = 2131492905;
// aapt resource value: 0x7f0c002a
public const int Base_V11_ThemeOverlay_AppCompat_Dialog = 2131492906;
// aapt resource value: 0x7f0c0032
public const int Base_V12_Widget_AppCompat_AutoCompleteTextView = 2131492914;
// aapt resource value: 0x7f0c0033
public const int Base_V12_Widget_AppCompat_EditText = 2131492915;
// aapt resource value: 0x7f0c016f
public const int Base_V14_Widget_Design_AppBarLayout = 2131493231;
// aapt resource value: 0x7f0c006b
public const int Base_V21_Theme_AppCompat = 2131492971;
// aapt resource value: 0x7f0c006c
public const int Base_V21_Theme_AppCompat_Dialog = 2131492972;
// aapt resource value: 0x7f0c006d
public const int Base_V21_Theme_AppCompat_Light = 2131492973;
// aapt resource value: 0x7f0c006e
public const int Base_V21_Theme_AppCompat_Light_Dialog = 2131492974;
// aapt resource value: 0x7f0c006f
public const int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131492975;
// aapt resource value: 0x7f0c016b
public const int Base_V21_Widget_Design_AppBarLayout = 2131493227;
// aapt resource value: 0x7f0c0093
public const int Base_V22_Theme_AppCompat = 2131493011;
// aapt resource value: 0x7f0c0094
public const int Base_V22_Theme_AppCompat_Light = 2131493012;
// aapt resource value: 0x7f0c0097
public const int Base_V23_Theme_AppCompat = 2131493015;
// aapt resource value: 0x7f0c0098
public const int Base_V23_Theme_AppCompat_Light = 2131493016;
// aapt resource value: 0x7f0c00a0
public const int Base_V26_Theme_AppCompat = 2131493024;
// aapt resource value: 0x7f0c00a1
public const int Base_V26_Theme_AppCompat_Light = 2131493025;
// aapt resource value: 0x7f0c00a2
public const int Base_V26_Widget_AppCompat_Toolbar = 2131493026;
// aapt resource value: 0x7f0c016d
public const int Base_V26_Widget_Design_AppBarLayout = 2131493229;
// aapt resource value: 0x7f0c00bd
public const int Base_V7_Theme_AppCompat = 2131493053;
// aapt resource value: 0x7f0c00be
public const int Base_V7_Theme_AppCompat_Dialog = 2131493054;
// aapt resource value: 0x7f0c00bf
public const int Base_V7_Theme_AppCompat_Light = 2131493055;
// aapt resource value: 0x7f0c00c0
public const int Base_V7_Theme_AppCompat_Light_Dialog = 2131493056;
// aapt resource value: 0x7f0c00c1
public const int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131493057;
// aapt resource value: 0x7f0c00c2
public const int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131493058;
// aapt resource value: 0x7f0c00c3
public const int Base_V7_Widget_AppCompat_EditText = 2131493059;
// aapt resource value: 0x7f0c00c4
public const int Base_V7_Widget_AppCompat_Toolbar = 2131493060;
// aapt resource value: 0x7f0c00c5
public const int Base_Widget_AppCompat_ActionBar = 2131493061;
// aapt resource value: 0x7f0c00c6
public const int Base_Widget_AppCompat_ActionBar_Solid = 2131493062;
// aapt resource value: 0x7f0c00c7
public const int Base_Widget_AppCompat_ActionBar_TabBar = 2131493063;
// aapt resource value: 0x7f0c0070
public const int Base_Widget_AppCompat_ActionBar_TabText = 2131492976;
// aapt resource value: 0x7f0c0071
public const int Base_Widget_AppCompat_ActionBar_TabView = 2131492977;
// aapt resource value: 0x7f0c0072
public const int Base_Widget_AppCompat_ActionButton = 2131492978;
// aapt resource value: 0x7f0c0073
public const int Base_Widget_AppCompat_ActionButton_CloseMode = 2131492979;
// aapt resource value: 0x7f0c0074
public const int Base_Widget_AppCompat_ActionButton_Overflow = 2131492980;
// aapt resource value: 0x7f0c00c8
public const int Base_Widget_AppCompat_ActionMode = 2131493064;
// aapt resource value: 0x7f0c00c9
public const int Base_Widget_AppCompat_ActivityChooserView = 2131493065;
// aapt resource value: 0x7f0c0034
public const int Base_Widget_AppCompat_AutoCompleteTextView = 2131492916;
// aapt resource value: 0x7f0c0075
public const int Base_Widget_AppCompat_Button = 2131492981;
// aapt resource value: 0x7f0c0076
public const int Base_Widget_AppCompat_Button_Borderless = 2131492982;
// aapt resource value: 0x7f0c0077
public const int Base_Widget_AppCompat_Button_Borderless_Colored = 2131492983;
// aapt resource value: 0x7f0c00ca
public const int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131493066;
// aapt resource value: 0x7f0c0099
public const int Base_Widget_AppCompat_Button_Colored = 2131493017;
// aapt resource value: 0x7f0c0078
public const int Base_Widget_AppCompat_Button_Small = 2131492984;
// aapt resource value: 0x7f0c0079
public const int Base_Widget_AppCompat_ButtonBar = 2131492985;
// aapt resource value: 0x7f0c00cb
public const int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131493067;
// aapt resource value: 0x7f0c007a
public const int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131492986;
// aapt resource value: 0x7f0c007b
public const int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131492987;
// aapt resource value: 0x7f0c00cc
public const int Base_Widget_AppCompat_CompoundButton_Switch = 2131493068;
// aapt resource value: 0x7f0c000f
public const int Base_Widget_AppCompat_DrawerArrowToggle = 2131492879;
// aapt resource value: 0x7f0c00cd
public const int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131493069;
// aapt resource value: 0x7f0c007c
public const int Base_Widget_AppCompat_DropDownItem_Spinner = 2131492988;
// aapt resource value: 0x7f0c0035
public const int Base_Widget_AppCompat_EditText = 2131492917;
// aapt resource value: 0x7f0c007d
public const int Base_Widget_AppCompat_ImageButton = 2131492989;
// aapt resource value: 0x7f0c00ce
public const int Base_Widget_AppCompat_Light_ActionBar = 2131493070;
// aapt resource value: 0x7f0c00cf
public const int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131493071;
// aapt resource value: 0x7f0c00d0
public const int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131493072;
// aapt resource value: 0x7f0c007e
public const int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131492990;
// aapt resource value: 0x7f0c007f
public const int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131492991;
// aapt resource value: 0x7f0c0080
public const int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131492992;
// aapt resource value: 0x7f0c0081
public const int Base_Widget_AppCompat_Light_PopupMenu = 2131492993;
// aapt resource value: 0x7f0c0082
public const int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131492994;
// aapt resource value: 0x7f0c00d1
public const int Base_Widget_AppCompat_ListMenuView = 2131493073;
// aapt resource value: 0x7f0c0083
public const int Base_Widget_AppCompat_ListPopupWindow = 2131492995;
// aapt resource value: 0x7f0c0084
public const int Base_Widget_AppCompat_ListView = 2131492996;
// aapt resource value: 0x7f0c0085
public const int Base_Widget_AppCompat_ListView_DropDown = 2131492997;
// aapt resource value: 0x7f0c0086
public const int Base_Widget_AppCompat_ListView_Menu = 2131492998;
// aapt resource value: 0x7f0c0087
public const int Base_Widget_AppCompat_PopupMenu = 2131492999;
// aapt resource value: 0x7f0c0088
public const int Base_Widget_AppCompat_PopupMenu_Overflow = 2131493000;
// aapt resource value: 0x7f0c00d2
public const int Base_Widget_AppCompat_PopupWindow = 2131493074;
// aapt resource value: 0x7f0c002b
public const int Base_Widget_AppCompat_ProgressBar = 2131492907;
// aapt resource value: 0x7f0c002c
public const int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131492908;
// aapt resource value: 0x7f0c0089
public const int Base_Widget_AppCompat_RatingBar = 2131493001;
// aapt resource value: 0x7f0c009a
public const int Base_Widget_AppCompat_RatingBar_Indicator = 2131493018;
// aapt resource value: 0x7f0c009b
public const int Base_Widget_AppCompat_RatingBar_Small = 2131493019;
// aapt resource value: 0x7f0c00d3
public const int Base_Widget_AppCompat_SearchView = 2131493075;
// aapt resource value: 0x7f0c00d4
public const int Base_Widget_AppCompat_SearchView_ActionBar = 2131493076;
// aapt resource value: 0x7f0c008a
public const int Base_Widget_AppCompat_SeekBar = 2131493002;
// aapt resource value: 0x7f0c00d5
public const int Base_Widget_AppCompat_SeekBar_Discrete = 2131493077;
// aapt resource value: 0x7f0c008b
public const int Base_Widget_AppCompat_Spinner = 2131493003;
// aapt resource value: 0x7f0c0012
public const int Base_Widget_AppCompat_Spinner_Underlined = 2131492882;
// aapt resource value: 0x7f0c008c
public const int Base_Widget_AppCompat_TextView_SpinnerItem = 2131493004;
// aapt resource value: 0x7f0c00a3
public const int Base_Widget_AppCompat_Toolbar = 2131493027;
// aapt resource value: 0x7f0c008d
public const int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131493005;
// aapt resource value: 0x7f0c016c
public const int Base_Widget_Design_AppBarLayout = 2131493228;
// aapt resource value: 0x7f0c0170
public const int Base_Widget_Design_TabLayout = 2131493232;
// aapt resource value: 0x7f0c000b
public const int CardView = 2131492875;
// aapt resource value: 0x7f0c000d
public const int CardView_Dark = 2131492877;
// aapt resource value: 0x7f0c000e
public const int CardView_Light = 2131492878;
// aapt resource value: 0x7f0c018f
public const int MainTheme = 2131493263;
// aapt resource value: 0x7f0c0190
public const int MainTheme_Base = 2131493264;
// aapt resource value: 0x7f0c002d
public const int Platform_AppCompat = 2131492909;
// aapt resource value: 0x7f0c002e
public const int Platform_AppCompat_Light = 2131492910;
// aapt resource value: 0x7f0c008e
public const int Platform_ThemeOverlay_AppCompat = 2131493006;
// aapt resource value: 0x7f0c008f
public const int Platform_ThemeOverlay_AppCompat_Dark = 2131493007;
// aapt resource value: 0x7f0c0090
public const int Platform_ThemeOverlay_AppCompat_Light = 2131493008;
// aapt resource value: 0x7f0c002f
public const int Platform_V11_AppCompat = 2131492911;
// aapt resource value: 0x7f0c0030
public const int Platform_V11_AppCompat_Light = 2131492912;
// aapt resource value: 0x7f0c0037
public const int Platform_V14_AppCompat = 2131492919;
// aapt resource value: 0x7f0c0038
public const int Platform_V14_AppCompat_Light = 2131492920;
// aapt resource value: 0x7f0c0091
public const int Platform_V21_AppCompat = 2131493009;
// aapt resource value: 0x7f0c0092
public const int Platform_V21_AppCompat_Light = 2131493010;
// aapt resource value: 0x7f0c009e
public const int Platform_V25_AppCompat = 2131493022;
// aapt resource value: 0x7f0c009f
public const int Platform_V25_AppCompat_Light = 2131493023;
// aapt resource value: 0x7f0c0031
public const int Platform_Widget_AppCompat_Spinner = 2131492913;
// aapt resource value: 0x7f0c003a
public const int RtlOverlay_DialogWindowTitle_AppCompat = 2131492922;
// aapt resource value: 0x7f0c003b
public const int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131492923;
// aapt resource value: 0x7f0c003c
public const int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131492924;
// aapt resource value: 0x7f0c003d
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131492925;
// aapt resource value: 0x7f0c003e
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131492926;
// aapt resource value: 0x7f0c003f
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131492927;
// aapt resource value: 0x7f0c0040
public const int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131492928;
// aapt resource value: 0x7f0c0041
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131492929;
// aapt resource value: 0x7f0c0042
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131492930;
// aapt resource value: 0x7f0c0043
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131492931;
// aapt resource value: 0x7f0c0044
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131492932;
// aapt resource value: 0x7f0c0045
public const int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131492933;
// aapt resource value: 0x7f0c0046
public const int RtlUnderlay_Widget_AppCompat_ActionButton = 2131492934;
// aapt resource value: 0x7f0c0047
public const int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131492935;
// aapt resource value: 0x7f0c00d6
public const int TextAppearance_AppCompat = 2131493078;
// aapt resource value: 0x7f0c00d7
public const int TextAppearance_AppCompat_Body1 = 2131493079;
// aapt resource value: 0x7f0c00d8
public const int TextAppearance_AppCompat_Body2 = 2131493080;
// aapt resource value: 0x7f0c00d9
public const int TextAppearance_AppCompat_Button = 2131493081;
// aapt resource value: 0x7f0c00da
public const int TextAppearance_AppCompat_Caption = 2131493082;
// aapt resource value: 0x7f0c00db
public const int TextAppearance_AppCompat_Display1 = 2131493083;
// aapt resource value: 0x7f0c00dc
public const int TextAppearance_AppCompat_Display2 = 2131493084;
// aapt resource value: 0x7f0c00dd
public const int TextAppearance_AppCompat_Display3 = 2131493085;
// aapt resource value: 0x7f0c00de
public const int TextAppearance_AppCompat_Display4 = 2131493086;
// aapt resource value: 0x7f0c00df
public const int TextAppearance_AppCompat_Headline = 2131493087;
// aapt resource value: 0x7f0c00e0
public const int TextAppearance_AppCompat_Inverse = 2131493088;
// aapt resource value: 0x7f0c00e1
public const int TextAppearance_AppCompat_Large = 2131493089;
// aapt resource value: 0x7f0c00e2
public const int TextAppearance_AppCompat_Large_Inverse = 2131493090;
// aapt resource value: 0x7f0c00e3
public const int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131493091;
// aapt resource value: 0x7f0c00e4
public const int TextAppearance_AppCompat_Light_SearchResult_Title = 2131493092;
// aapt resource value: 0x7f0c00e5
public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131493093;
// aapt resource value: 0x7f0c00e6
public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131493094;
// aapt resource value: 0x7f0c00e7
public const int TextAppearance_AppCompat_Medium = 2131493095;
// aapt resource value: 0x7f0c00e8
public const int TextAppearance_AppCompat_Medium_Inverse = 2131493096;
// aapt resource value: 0x7f0c00e9
public const int TextAppearance_AppCompat_Menu = 2131493097;
// aapt resource value: 0x7f0c00ea
public const int TextAppearance_AppCompat_SearchResult_Subtitle = 2131493098;
// aapt resource value: 0x7f0c00eb
public const int TextAppearance_AppCompat_SearchResult_Title = 2131493099;
// aapt resource value: 0x7f0c00ec
public const int TextAppearance_AppCompat_Small = 2131493100;
// aapt resource value: 0x7f0c00ed
public const int TextAppearance_AppCompat_Small_Inverse = 2131493101;
// aapt resource value: 0x7f0c00ee
public const int TextAppearance_AppCompat_Subhead = 2131493102;
// aapt resource value: 0x7f0c00ef
public const int TextAppearance_AppCompat_Subhead_Inverse = 2131493103;
// aapt resource value: 0x7f0c00f0
public const int TextAppearance_AppCompat_Title = 2131493104;
// aapt resource value: 0x7f0c00f1
public const int TextAppearance_AppCompat_Title_Inverse = 2131493105;
// aapt resource value: 0x7f0c0039
public const int TextAppearance_AppCompat_Tooltip = 2131492921;
// aapt resource value: 0x7f0c00f2
public const int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131493106;
// aapt resource value: 0x7f0c00f3
public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131493107;
// aapt resource value: 0x7f0c00f4
public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131493108;
// aapt resource value: 0x7f0c00f5
public const int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131493109;
// aapt resource value: 0x7f0c00f6
public const int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131493110;
// aapt resource value: 0x7f0c00f7
public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131493111;
// aapt resource value: 0x7f0c00f8
public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131493112;
// aapt resource value: 0x7f0c00f9
public const int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131493113;
// aapt resource value: 0x7f0c00fa
public const int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131493114;
// aapt resource value: 0x7f0c00fb
public const int TextAppearance_AppCompat_Widget_Button = 2131493115;
// aapt resource value: 0x7f0c00fc
public const int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131493116;
// aapt resource value: 0x7f0c00fd
public const int TextAppearance_AppCompat_Widget_Button_Colored = 2131493117;
// aapt resource value: 0x7f0c00fe
public const int TextAppearance_AppCompat_Widget_Button_Inverse = 2131493118;
// aapt resource value: 0x7f0c00ff
public const int TextAppearance_AppCompat_Widget_DropDownItem = 2131493119;
// aapt resource value: 0x7f0c0100
public const int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131493120;
// aapt resource value: 0x7f0c0101
public const int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131493121;
// aapt resource value: 0x7f0c0102
public const int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131493122;
// aapt resource value: 0x7f0c0103
public const int TextAppearance_AppCompat_Widget_Switch = 2131493123;
// aapt resource value: 0x7f0c0104
public const int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131493124;
// aapt resource value: 0x7f0c0188
public const int TextAppearance_Compat_Notification = 2131493256;
// aapt resource value: 0x7f0c0189
public const int TextAppearance_Compat_Notification_Info = 2131493257;
// aapt resource value: 0x7f0c0165
public const int TextAppearance_Compat_Notification_Info_Media = 2131493221;
// aapt resource value: 0x7f0c018e
public const int TextAppearance_Compat_Notification_Line2 = 2131493262;
// aapt resource value: 0x7f0c0169
public const int TextAppearance_Compat_Notification_Line2_Media = 2131493225;
// aapt resource value: 0x7f0c0166
public const int TextAppearance_Compat_Notification_Media = 2131493222;
// aapt resource value: 0x7f0c018a
public const int TextAppearance_Compat_Notification_Time = 2131493258;
// aapt resource value: 0x7f0c0167
public const int TextAppearance_Compat_Notification_Time_Media = 2131493223;
// aapt resource value: 0x7f0c018b
public const int TextAppearance_Compat_Notification_Title = 2131493259;
// aapt resource value: 0x7f0c0168
public const int TextAppearance_Compat_Notification_Title_Media = 2131493224;
// aapt resource value: 0x7f0c0171
public const int TextAppearance_Design_CollapsingToolbar_Expanded = 2131493233;
// aapt resource value: 0x7f0c0172
public const int TextAppearance_Design_Counter = 2131493234;
// aapt resource value: 0x7f0c0173
public const int TextAppearance_Design_Counter_Overflow = 2131493235;
// aapt resource value: 0x7f0c0174
public const int TextAppearance_Design_Error = 2131493236;
// aapt resource value: 0x7f0c0175
public const int TextAppearance_Design_Hint = 2131493237;
// aapt resource value: 0x7f0c0176
public const int TextAppearance_Design_Snackbar_Message = 2131493238;
// aapt resource value: 0x7f0c0177
public const int TextAppearance_Design_Tab = 2131493239;
// aapt resource value: 0x7f0c0000
public const int TextAppearance_MediaRouter_PrimaryText = 2131492864;
// aapt resource value: 0x7f0c0001
public const int TextAppearance_MediaRouter_SecondaryText = 2131492865;
// aapt resource value: 0x7f0c0002
public const int TextAppearance_MediaRouter_Title = 2131492866;
// aapt resource value: 0x7f0c0105
public const int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131493125;
// aapt resource value: 0x7f0c0106
public const int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131493126;
// aapt resource value: 0x7f0c0107
public const int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131493127;
// aapt resource value: 0x7f0c0108
public const int Theme_AppCompat = 2131493128;
// aapt resource value: 0x7f0c0109
public const int Theme_AppCompat_CompactMenu = 2131493129;
// aapt resource value: 0x7f0c0013
public const int Theme_AppCompat_DayNight = 2131492883;
// aapt resource value: 0x7f0c0014
public const int Theme_AppCompat_DayNight_DarkActionBar = 2131492884;
// aapt resource value: 0x7f0c0015
public const int Theme_AppCompat_DayNight_Dialog = 2131492885;
// aapt resource value: 0x7f0c0016
public const int Theme_AppCompat_DayNight_Dialog_Alert = 2131492886;
// aapt resource value: 0x7f0c0017
public const int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131492887;
// aapt resource value: 0x7f0c0018
public const int Theme_AppCompat_DayNight_DialogWhenLarge = 2131492888;
// aapt resource value: 0x7f0c0019
public const int Theme_AppCompat_DayNight_NoActionBar = 2131492889;
// aapt resource value: 0x7f0c010a
public const int Theme_AppCompat_Dialog = 2131493130;
// aapt resource value: 0x7f0c010b
public const int Theme_AppCompat_Dialog_Alert = 2131493131;
// aapt resource value: 0x7f0c010c
public const int Theme_AppCompat_Dialog_MinWidth = 2131493132;
// aapt resource value: 0x7f0c010d
public const int Theme_AppCompat_DialogWhenLarge = 2131493133;
// aapt resource value: 0x7f0c010e
public const int Theme_AppCompat_Light = 2131493134;
// aapt resource value: 0x7f0c010f
public const int Theme_AppCompat_Light_DarkActionBar = 2131493135;
// aapt resource value: 0x7f0c0110
public const int Theme_AppCompat_Light_Dialog = 2131493136;
// aapt resource value: 0x7f0c0111
public const int Theme_AppCompat_Light_Dialog_Alert = 2131493137;
// aapt resource value: 0x7f0c0112
public const int Theme_AppCompat_Light_Dialog_MinWidth = 2131493138;
// aapt resource value: 0x7f0c0113
public const int Theme_AppCompat_Light_DialogWhenLarge = 2131493139;
// aapt resource value: 0x7f0c0114
public const int Theme_AppCompat_Light_NoActionBar = 2131493140;
// aapt resource value: 0x7f0c0115
public const int Theme_AppCompat_NoActionBar = 2131493141;
// aapt resource value: 0x7f0c0178
public const int Theme_Design = 2131493240;
// aapt resource value: 0x7f0c0179
public const int Theme_Design_BottomSheetDialog = 2131493241;
// aapt resource value: 0x7f0c017a
public const int Theme_Design_Light = 2131493242;
// aapt resource value: 0x7f0c017b
public const int Theme_Design_Light_BottomSheetDialog = 2131493243;
// aapt resource value: 0x7f0c017c
public const int Theme_Design_Light_NoActionBar = 2131493244;
// aapt resource value: 0x7f0c017d
public const int Theme_Design_NoActionBar = 2131493245;
// aapt resource value: 0x7f0c0003
public const int Theme_MediaRouter = 2131492867;
// aapt resource value: 0x7f0c0004
public const int Theme_MediaRouter_Light = 2131492868;
// aapt resource value: 0x7f0c0005
public const int Theme_MediaRouter_Light_DarkControlPanel = 2131492869;
// aapt resource value: 0x7f0c0006
public const int Theme_MediaRouter_LightControlPanel = 2131492870;
// aapt resource value: 0x7f0c0116
public const int ThemeOverlay_AppCompat = 2131493142;
// aapt resource value: 0x7f0c0117
public const int ThemeOverlay_AppCompat_ActionBar = 2131493143;
// aapt resource value: 0x7f0c0118
public const int ThemeOverlay_AppCompat_Dark = 2131493144;
// aapt resource value: 0x7f0c0119
public const int ThemeOverlay_AppCompat_Dark_ActionBar = 2131493145;
// aapt resource value: 0x7f0c011a
public const int ThemeOverlay_AppCompat_Dialog = 2131493146;
// aapt resource value: 0x7f0c011b
public const int ThemeOverlay_AppCompat_Dialog_Alert = 2131493147;
// aapt resource value: 0x7f0c011c
public const int ThemeOverlay_AppCompat_Light = 2131493148;
// aapt resource value: 0x7f0c0007
public const int ThemeOverlay_MediaRouter_Dark = 2131492871;
// aapt resource value: 0x7f0c0008
public const int ThemeOverlay_MediaRouter_Light = 2131492872;
// aapt resource value: 0x7f0c011d
public const int Widget_AppCompat_ActionBar = 2131493149;
// aapt resource value: 0x7f0c011e
public const int Widget_AppCompat_ActionBar_Solid = 2131493150;
// aapt resource value: 0x7f0c011f
public const int Widget_AppCompat_ActionBar_TabBar = 2131493151;
// aapt resource value: 0x7f0c0120
public const int Widget_AppCompat_ActionBar_TabText = 2131493152;
// aapt resource value: 0x7f0c0121
public const int Widget_AppCompat_ActionBar_TabView = 2131493153;
// aapt resource value: 0x7f0c0122
public const int Widget_AppCompat_ActionButton = 2131493154;
// aapt resource value: 0x7f0c0123
public const int Widget_AppCompat_ActionButton_CloseMode = 2131493155;
// aapt resource value: 0x7f0c0124
public const int Widget_AppCompat_ActionButton_Overflow = 2131493156;
// aapt resource value: 0x7f0c0125
public const int Widget_AppCompat_ActionMode = 2131493157;
// aapt resource value: 0x7f0c0126
public const int Widget_AppCompat_ActivityChooserView = 2131493158;
// aapt resource value: 0x7f0c0127
public const int Widget_AppCompat_AutoCompleteTextView = 2131493159;
// aapt resource value: 0x7f0c0128
public const int Widget_AppCompat_Button = 2131493160;
// aapt resource value: 0x7f0c0129
public const int Widget_AppCompat_Button_Borderless = 2131493161;
// aapt resource value: 0x7f0c012a
public const int Widget_AppCompat_Button_Borderless_Colored = 2131493162;
// aapt resource value: 0x7f0c012b
public const int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131493163;
// aapt resource value: 0x7f0c012c
public const int Widget_AppCompat_Button_Colored = 2131493164;
// aapt resource value: 0x7f0c012d
public const int Widget_AppCompat_Button_Small = 2131493165;
// aapt resource value: 0x7f0c012e
public const int Widget_AppCompat_ButtonBar = 2131493166;
// aapt resource value: 0x7f0c012f
public const int Widget_AppCompat_ButtonBar_AlertDialog = 2131493167;
// aapt resource value: 0x7f0c0130
public const int Widget_AppCompat_CompoundButton_CheckBox = 2131493168;
// aapt resource value: 0x7f0c0131
public const int Widget_AppCompat_CompoundButton_RadioButton = 2131493169;
// aapt resource value: 0x7f0c0132
public const int Widget_AppCompat_CompoundButton_Switch = 2131493170;
// aapt resource value: 0x7f0c0133
public const int Widget_AppCompat_DrawerArrowToggle = 2131493171;
// aapt resource value: 0x7f0c0134
public const int Widget_AppCompat_DropDownItem_Spinner = 2131493172;
// aapt resource value: 0x7f0c0135
public const int Widget_AppCompat_EditText = 2131493173;
// aapt resource value: 0x7f0c0136
public const int Widget_AppCompat_ImageButton = 2131493174;
// aapt resource value: 0x7f0c0137
public const int Widget_AppCompat_Light_ActionBar = 2131493175;
// aapt resource value: 0x7f0c0138
public const int Widget_AppCompat_Light_ActionBar_Solid = 2131493176;
// aapt resource value: 0x7f0c0139
public const int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131493177;
// aapt resource value: 0x7f0c013a
public const int Widget_AppCompat_Light_ActionBar_TabBar = 2131493178;
// aapt resource value: 0x7f0c013b
public const int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131493179;
// aapt resource value: 0x7f0c013c
public const int Widget_AppCompat_Light_ActionBar_TabText = 2131493180;
// aapt resource value: 0x7f0c013d
public const int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131493181;
// aapt resource value: 0x7f0c013e
public const int Widget_AppCompat_Light_ActionBar_TabView = 2131493182;
// aapt resource value: 0x7f0c013f
public const int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131493183;
// aapt resource value: 0x7f0c0140
public const int Widget_AppCompat_Light_ActionButton = 2131493184;
// aapt resource value: 0x7f0c0141
public const int Widget_AppCompat_Light_ActionButton_CloseMode = 2131493185;
// aapt resource value: 0x7f0c0142
public const int Widget_AppCompat_Light_ActionButton_Overflow = 2131493186;
// aapt resource value: 0x7f0c0143
public const int Widget_AppCompat_Light_ActionMode_Inverse = 2131493187;
// aapt resource value: 0x7f0c0144
public const int Widget_AppCompat_Light_ActivityChooserView = 2131493188;
// aapt resource value: 0x7f0c0145
public const int Widget_AppCompat_Light_AutoCompleteTextView = 2131493189;
// aapt resource value: 0x7f0c0146
public const int Widget_AppCompat_Light_DropDownItem_Spinner = 2131493190;
// aapt resource value: 0x7f0c0147
public const int Widget_AppCompat_Light_ListPopupWindow = 2131493191;
// aapt resource value: 0x7f0c0148
public const int Widget_AppCompat_Light_ListView_DropDown = 2131493192;
// aapt resource value: 0x7f0c0149
public const int Widget_AppCompat_Light_PopupMenu = 2131493193;
// aapt resource value: 0x7f0c014a
public const int Widget_AppCompat_Light_PopupMenu_Overflow = 2131493194;
// aapt resource value: 0x7f0c014b
public const int Widget_AppCompat_Light_SearchView = 2131493195;
// aapt resource value: 0x7f0c014c
public const int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131493196;
// aapt resource value: 0x7f0c014d
public const int Widget_AppCompat_ListMenuView = 2131493197;
// aapt resource value: 0x7f0c014e
public const int Widget_AppCompat_ListPopupWindow = 2131493198;
// aapt resource value: 0x7f0c014f
public const int Widget_AppCompat_ListView = 2131493199;
// aapt resource value: 0x7f0c0150
public const int Widget_AppCompat_ListView_DropDown = 2131493200;
// aapt resource value: 0x7f0c0151
public const int Widget_AppCompat_ListView_Menu = 2131493201;
// aapt resource value: 0x7f0c0152
public const int Widget_AppCompat_PopupMenu = 2131493202;
// aapt resource value: 0x7f0c0153
public const int Widget_AppCompat_PopupMenu_Overflow = 2131493203;
// aapt resource value: 0x7f0c0154
public const int Widget_AppCompat_PopupWindow = 2131493204;
// aapt resource value: 0x7f0c0155
public const int Widget_AppCompat_ProgressBar = 2131493205;
// aapt resource value: 0x7f0c0156
public const int Widget_AppCompat_ProgressBar_Horizontal = 2131493206;
// aapt resource value: 0x7f0c0157
public const int Widget_AppCompat_RatingBar = 2131493207;
// aapt resource value: 0x7f0c0158
public const int Widget_AppCompat_RatingBar_Indicator = 2131493208;
// aapt resource value: 0x7f0c0159
public const int Widget_AppCompat_RatingBar_Small = 2131493209;
// aapt resource value: 0x7f0c015a
public const int Widget_AppCompat_SearchView = 2131493210;
// aapt resource value: 0x7f0c015b
public const int Widget_AppCompat_SearchView_ActionBar = 2131493211;
// aapt resource value: 0x7f0c015c
public const int Widget_AppCompat_SeekBar = 2131493212;
// aapt resource value: 0x7f0c015d
public const int Widget_AppCompat_SeekBar_Discrete = 2131493213;
// aapt resource value: 0x7f0c015e
public const int Widget_AppCompat_Spinner = 2131493214;
// aapt resource value: 0x7f0c015f
public const int Widget_AppCompat_Spinner_DropDown = 2131493215;
// aapt resource value: 0x7f0c0160
public const int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131493216;
// aapt resource value: 0x7f0c0161
public const int Widget_AppCompat_Spinner_Underlined = 2131493217;
// aapt resource value: 0x7f0c0162
public const int Widget_AppCompat_TextView_SpinnerItem = 2131493218;
// aapt resource value: 0x7f0c0163
public const int Widget_AppCompat_Toolbar = 2131493219;
// aapt resource value: 0x7f0c0164
public const int Widget_AppCompat_Toolbar_Button_Navigation = 2131493220;
// aapt resource value: 0x7f0c018c
public const int Widget_Compat_NotificationActionContainer = 2131493260;
// aapt resource value: 0x7f0c018d
public const int Widget_Compat_NotificationActionText = 2131493261;
// aapt resource value: 0x7f0c017e
public const int Widget_Design_AppBarLayout = 2131493246;
// aapt resource value: 0x7f0c017f
public const int Widget_Design_BottomNavigationView = 2131493247;
// aapt resource value: 0x7f0c0180
public const int Widget_Design_BottomSheet_Modal = 2131493248;
// aapt resource value: 0x7f0c0181
public const int Widget_Design_CollapsingToolbar = 2131493249;
// aapt resource value: 0x7f0c0182
public const int Widget_Design_CoordinatorLayout = 2131493250;
// aapt resource value: 0x7f0c0183
public const int Widget_Design_FloatingActionButton = 2131493251;
// aapt resource value: 0x7f0c0184
public const int Widget_Design_NavigationView = 2131493252;
// aapt resource value: 0x7f0c0185
public const int Widget_Design_ScrimInsetsFrameLayout = 2131493253;
// aapt resource value: 0x7f0c0186
public const int Widget_Design_Snackbar = 2131493254;
// aapt resource value: 0x7f0c016a
public const int Widget_Design_TabLayout = 2131493226;
// aapt resource value: 0x7f0c0187
public const int Widget_Design_TextInputLayout = 2131493255;
// aapt resource value: 0x7f0c0009
public const int Widget_MediaRouter_Light_MediaRouteButton = 2131492873;
// aapt resource value: 0x7f0c000a
public const int Widget_MediaRouter_MediaRouteButton = 2131492874;
static Style()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Style()
{
}
}
public partial class Styleable
{
public static int[] ActionBar = new int[] {
2130772003,
2130772005,
2130772006,
2130772007,
2130772008,
2130772009,
2130772010,
2130772011,
2130772012,
2130772013,
2130772014,
2130772015,
2130772016,
2130772017,
2130772018,
2130772019,
2130772020,
2130772021,
2130772022,
2130772023,
2130772024,
2130772025,
2130772026,
2130772027,
2130772028,
2130772029,
2130772030,
2130772031,
2130772101};
// aapt resource value: 10
public const int ActionBar_background = 10;
// aapt resource value: 12
public const int ActionBar_backgroundSplit = 12;
// aapt resource value: 11
public const int ActionBar_backgroundStacked = 11;
// aapt resource value: 21
public const int ActionBar_contentInsetEnd = 21;
// aapt resource value: 25
public const int ActionBar_contentInsetEndWithActions = 25;
// aapt resource value: 22
public const int ActionBar_contentInsetLeft = 22;
// aapt resource value: 23
public const int ActionBar_contentInsetRight = 23;
// aapt resource value: 20
public const int ActionBar_contentInsetStart = 20;
// aapt resource value: 24
public const int ActionBar_contentInsetStartWithNavigation = 24;
// aapt resource value: 13
public const int ActionBar_customNavigationLayout = 13;
// aapt resource value: 3
public const int ActionBar_displayOptions = 3;
// aapt resource value: 9
public const int ActionBar_divider = 9;
// aapt resource value: 26
public const int ActionBar_elevation = 26;
// aapt resource value: 0
public const int ActionBar_height = 0;
// aapt resource value: 19
public const int ActionBar_hideOnContentScroll = 19;
// aapt resource value: 28
public const int ActionBar_homeAsUpIndicator = 28;
// aapt resource value: 14
public const int ActionBar_homeLayout = 14;
// aapt resource value: 7
public const int ActionBar_icon = 7;
// aapt resource value: 16
public const int ActionBar_indeterminateProgressStyle = 16;
// aapt resource value: 18
public const int ActionBar_itemPadding = 18;
// aapt resource value: 8
public const int ActionBar_logo = 8;
// aapt resource value: 2
public const int ActionBar_navigationMode = 2;
// aapt resource value: 27
public const int ActionBar_popupTheme = 27;
// aapt resource value: 17
public const int ActionBar_progressBarPadding = 17;
// aapt resource value: 15
public const int ActionBar_progressBarStyle = 15;
// aapt resource value: 4
public const int ActionBar_subtitle = 4;
// aapt resource value: 6
public const int ActionBar_subtitleTextStyle = 6;
// aapt resource value: 1
public const int ActionBar_title = 1;
// aapt resource value: 5
public const int ActionBar_titleTextStyle = 5;
public static int[] ActionBarLayout = new int[] {
16842931};
// aapt resource value: 0
public const int ActionBarLayout_android_layout_gravity = 0;
public static int[] ActionMenuItemView = new int[] {
16843071};
// aapt resource value: 0
public const int ActionMenuItemView_android_minWidth = 0;
public static int[] ActionMenuView;
public static int[] ActionMode = new int[] {
2130772003,
2130772009,
2130772010,
2130772014,
2130772016,
2130772032};
// aapt resource value: 3
public const int ActionMode_background = 3;
// aapt resource value: 4
public const int ActionMode_backgroundSplit = 4;
// aapt resource value: 5
public const int ActionMode_closeItemLayout = 5;
// aapt resource value: 0
public const int ActionMode_height = 0;
// aapt resource value: 2
public const int ActionMode_subtitleTextStyle = 2;
// aapt resource value: 1
public const int ActionMode_titleTextStyle = 1;
public static int[] ActivityChooserView = new int[] {
2130772033,
2130772034};
// aapt resource value: 1
public const int ActivityChooserView_expandActivityOverflowButtonDrawable = 1;
// aapt resource value: 0
public const int ActivityChooserView_initialActivityCount = 0;
public static int[] AlertDialog = new int[] {
16842994,
2130772035,
2130772036,
2130772037,
2130772038,
2130772039,
2130772040};
// aapt resource value: 0
public const int AlertDialog_android_layout = 0;
// aapt resource value: 1
public const int AlertDialog_buttonPanelSideLayout = 1;
// aapt resource value: 5
public const int AlertDialog_listItemLayout = 5;
// aapt resource value: 2
public const int AlertDialog_listLayout = 2;
// aapt resource value: 3
public const int AlertDialog_multiChoiceItemLayout = 3;
// aapt resource value: 6
public const int AlertDialog_showTitle = 6;
// aapt resource value: 4
public const int AlertDialog_singleChoiceItemLayout = 4;
public static int[] AppBarLayout = new int[] {
16842964,
16843919,
16844096,
2130772030,
2130772248};
// aapt resource value: 0
public const int AppBarLayout_android_background = 0;
// aapt resource value: 2
public const int AppBarLayout_android_keyboardNavigationCluster = 2;
// aapt resource value: 1
public const int AppBarLayout_android_touchscreenBlocksFocus = 1;
// aapt resource value: 3
public const int AppBarLayout_elevation = 3;
// aapt resource value: 4
public const int AppBarLayout_expanded = 4;
public static int[] AppBarLayoutStates = new int[] {
2130772249,
2130772250};
// aapt resource value: 0
public const int AppBarLayoutStates_state_collapsed = 0;
// aapt resource value: 1
public const int AppBarLayoutStates_state_collapsible = 1;
public static int[] AppBarLayout_Layout = new int[] {
2130772251,
2130772252};
// aapt resource value: 0
public const int AppBarLayout_Layout_layout_scrollFlags = 0;
// aapt resource value: 1
public const int AppBarLayout_Layout_layout_scrollInterpolator = 1;
public static int[] AppCompatImageView = new int[] {
16843033,
2130772041,
2130772042,
2130772043};
// aapt resource value: 0
public const int AppCompatImageView_android_src = 0;
// aapt resource value: 1
public const int AppCompatImageView_srcCompat = 1;
// aapt resource value: 2
public const int AppCompatImageView_tint = 2;
// aapt resource value: 3
public const int AppCompatImageView_tintMode = 3;
public static int[] AppCompatSeekBar = new int[] {
16843074,
2130772044,
2130772045,
2130772046};
// aapt resource value: 0
public const int AppCompatSeekBar_android_thumb = 0;
// aapt resource value: 1
public const int AppCompatSeekBar_tickMark = 1;
// aapt resource value: 2
public const int AppCompatSeekBar_tickMarkTint = 2;
// aapt resource value: 3
public const int AppCompatSeekBar_tickMarkTintMode = 3;
public static int[] AppCompatTextHelper = new int[] {
16842804,
16843117,
16843118,
16843119,
16843120,
16843666,
16843667};
// aapt resource value: 2
public const int AppCompatTextHelper_android_drawableBottom = 2;
// aapt resource value: 6
public const int AppCompatTextHelper_android_drawableEnd = 6;
// aapt resource value: 3
public const int AppCompatTextHelper_android_drawableLeft = 3;
// aapt resource value: 4
public const int AppCompatTextHelper_android_drawableRight = 4;
// aapt resource value: 5
public const int AppCompatTextHelper_android_drawableStart = 5;
// aapt resource value: 1
public const int AppCompatTextHelper_android_drawableTop = 1;
// aapt resource value: 0
public const int AppCompatTextHelper_android_textAppearance = 0;
public static int[] AppCompatTextView = new int[] {
16842804,
2130772047,
2130772048,
2130772049,
2130772050,
2130772051,
2130772052,
2130772053};
// aapt resource value: 0
public const int AppCompatTextView_android_textAppearance = 0;
// aapt resource value: 6
public const int AppCompatTextView_autoSizeMaxTextSize = 6;
// aapt resource value: 5
public const int AppCompatTextView_autoSizeMinTextSize = 5;
// aapt resource value: 4
public const int AppCompatTextView_autoSizePresetSizes = 4;
// aapt resource value: 3
public const int AppCompatTextView_autoSizeStepGranularity = 3;
// aapt resource value: 2
public const int AppCompatTextView_autoSizeTextType = 2;
// aapt resource value: 7
public const int AppCompatTextView_fontFamily = 7;
// aapt resource value: 1
public const int AppCompatTextView_textAllCaps = 1;
public static int[] AppCompatTheme = new int[] {
16842839,
16842926,
2130772054,
2130772055,
2130772056,
2130772057,
2130772058,
2130772059,
2130772060,
2130772061,
2130772062,
2130772063,
2130772064,
2130772065,
2130772066,
2130772067,
2130772068,
2130772069,
2130772070,
2130772071,
2130772072,
2130772073,
2130772074,
2130772075,
2130772076,
2130772077,
2130772078,
2130772079,
2130772080,
2130772081,
2130772082,
2130772083,
2130772084,
2130772085,
2130772086,
2130772087,
2130772088,
2130772089,
2130772090,
2130772091,
2130772092,
2130772093,
2130772094,
2130772095,
2130772096,
2130772097,
2130772098,
2130772099,
2130772100,
2130772101,
2130772102,
2130772103,
2130772104,
2130772105,
2130772106,
2130772107,
2130772108,
2130772109,
2130772110,
2130772111,
2130772112,
2130772113,
2130772114,
2130772115,
2130772116,
2130772117,
2130772118,
2130772119,
2130772120,
2130772121,
2130772122,
2130772123,
2130772124,
2130772125,
2130772126,
2130772127,
2130772128,
2130772129,
2130772130,
2130772131,
2130772132,
2130772133,
2130772134,
2130772135,
2130772136,
2130772137,
2130772138,
2130772139,
2130772140,
2130772141,
2130772142,
2130772143,
2130772144,
2130772145,
2130772146,
2130772147,
2130772148,
2130772149,
2130772150,
2130772151,
2130772152,
2130772153,
2130772154,
2130772155,
2130772156,
2130772157,
2130772158,
2130772159,
2130772160,
2130772161,
2130772162,
2130772163,
2130772164,
2130772165,
2130772166,
2130772167,
2130772168,
2130772169,
2130772170};
// aapt resource value: 23
public const int AppCompatTheme_actionBarDivider = 23;
// aapt resource value: 24
public const int AppCompatTheme_actionBarItemBackground = 24;
// aapt resource value: 17
public const int AppCompatTheme_actionBarPopupTheme = 17;
// aapt resource value: 22
public const int AppCompatTheme_actionBarSize = 22;
// aapt resource value: 19
public const int AppCompatTheme_actionBarSplitStyle = 19;
// aapt resource value: 18
public const int AppCompatTheme_actionBarStyle = 18;
// aapt resource value: 13
public const int AppCompatTheme_actionBarTabBarStyle = 13;
// aapt resource value: 12
public const int AppCompatTheme_actionBarTabStyle = 12;
// aapt resource value: 14
public const int AppCompatTheme_actionBarTabTextStyle = 14;
// aapt resource value: 20
public const int AppCompatTheme_actionBarTheme = 20;
// aapt resource value: 21
public const int AppCompatTheme_actionBarWidgetTheme = 21;
// aapt resource value: 50
public const int AppCompatTheme_actionButtonStyle = 50;
// aapt resource value: 46
public const int AppCompatTheme_actionDropDownStyle = 46;
// aapt resource value: 25
public const int AppCompatTheme_actionMenuTextAppearance = 25;
// aapt resource value: 26
public const int AppCompatTheme_actionMenuTextColor = 26;
// aapt resource value: 29
public const int AppCompatTheme_actionModeBackground = 29;
// aapt resource value: 28
public const int AppCompatTheme_actionModeCloseButtonStyle = 28;
// aapt resource value: 31
public const int AppCompatTheme_actionModeCloseDrawable = 31;
// aapt resource value: 33
public const int AppCompatTheme_actionModeCopyDrawable = 33;
// aapt resource value: 32
public const int AppCompatTheme_actionModeCutDrawable = 32;
// aapt resource value: 37
public const int AppCompatTheme_actionModeFindDrawable = 37;
// aapt resource value: 34
public const int AppCompatTheme_actionModePasteDrawable = 34;
// aapt resource value: 39
public const int AppCompatTheme_actionModePopupWindowStyle = 39;
// aapt resource value: 35
public const int AppCompatTheme_actionModeSelectAllDrawable = 35;
// aapt resource value: 36
public const int AppCompatTheme_actionModeShareDrawable = 36;
// aapt resource value: 30
public const int AppCompatTheme_actionModeSplitBackground = 30;
// aapt resource value: 27
public const int AppCompatTheme_actionModeStyle = 27;
// aapt resource value: 38
public const int AppCompatTheme_actionModeWebSearchDrawable = 38;
// aapt resource value: 15
public const int AppCompatTheme_actionOverflowButtonStyle = 15;
// aapt resource value: 16
public const int AppCompatTheme_actionOverflowMenuStyle = 16;
// aapt resource value: 58
public const int AppCompatTheme_activityChooserViewStyle = 58;
// aapt resource value: 95
public const int AppCompatTheme_alertDialogButtonGroupStyle = 95;
// aapt resource value: 96
public const int AppCompatTheme_alertDialogCenterButtons = 96;
// aapt resource value: 94
public const int AppCompatTheme_alertDialogStyle = 94;
// aapt resource value: 97
public const int AppCompatTheme_alertDialogTheme = 97;
// aapt resource value: 1
public const int AppCompatTheme_android_windowAnimationStyle = 1;
// aapt resource value: 0
public const int AppCompatTheme_android_windowIsFloating = 0;
// aapt resource value: 102
public const int AppCompatTheme_autoCompleteTextViewStyle = 102;
// aapt resource value: 55
public const int AppCompatTheme_borderlessButtonStyle = 55;
// aapt resource value: 52
public const int AppCompatTheme_buttonBarButtonStyle = 52;
// aapt resource value: 100
public const int AppCompatTheme_buttonBarNegativeButtonStyle = 100;
// aapt resource value: 101
public const int AppCompatTheme_buttonBarNeutralButtonStyle = 101;
// aapt resource value: 99
public const int AppCompatTheme_buttonBarPositiveButtonStyle = 99;
// aapt resource value: 51
public const int AppCompatTheme_buttonBarStyle = 51;
// aapt resource value: 103
public const int AppCompatTheme_buttonStyle = 103;
// aapt resource value: 104
public const int AppCompatTheme_buttonStyleSmall = 104;
// aapt resource value: 105
public const int AppCompatTheme_checkboxStyle = 105;
// aapt resource value: 106
public const int AppCompatTheme_checkedTextViewStyle = 106;
// aapt resource value: 86
public const int AppCompatTheme_colorAccent = 86;
// aapt resource value: 93
public const int AppCompatTheme_colorBackgroundFloating = 93;
// aapt resource value: 90
public const int AppCompatTheme_colorButtonNormal = 90;
// aapt resource value: 88
public const int AppCompatTheme_colorControlActivated = 88;
// aapt resource value: 89
public const int AppCompatTheme_colorControlHighlight = 89;
// aapt resource value: 87
public const int AppCompatTheme_colorControlNormal = 87;
// aapt resource value: 118
public const int AppCompatTheme_colorError = 118;
// aapt resource value: 84
public const int AppCompatTheme_colorPrimary = 84;
// aapt resource value: 85
public const int AppCompatTheme_colorPrimaryDark = 85;
// aapt resource value: 91
public const int AppCompatTheme_colorSwitchThumbNormal = 91;
// aapt resource value: 92
public const int AppCompatTheme_controlBackground = 92;
// aapt resource value: 44
public const int AppCompatTheme_dialogPreferredPadding = 44;
// aapt resource value: 43
public const int AppCompatTheme_dialogTheme = 43;
// aapt resource value: 57
public const int AppCompatTheme_dividerHorizontal = 57;
// aapt resource value: 56
public const int AppCompatTheme_dividerVertical = 56;
// aapt resource value: 75
public const int AppCompatTheme_dropDownListViewStyle = 75;
// aapt resource value: 47
public const int AppCompatTheme_dropdownListPreferredItemHeight = 47;
// aapt resource value: 64
public const int AppCompatTheme_editTextBackground = 64;
// aapt resource value: 63
public const int AppCompatTheme_editTextColor = 63;
// aapt resource value: 107
public const int AppCompatTheme_editTextStyle = 107;
// aapt resource value: 49
public const int AppCompatTheme_homeAsUpIndicator = 49;
// aapt resource value: 65
public const int AppCompatTheme_imageButtonStyle = 65;
// aapt resource value: 83
public const int AppCompatTheme_listChoiceBackgroundIndicator = 83;
// aapt resource value: 45
public const int AppCompatTheme_listDividerAlertDialog = 45;
// aapt resource value: 115
public const int AppCompatTheme_listMenuViewStyle = 115;
// aapt resource value: 76
public const int AppCompatTheme_listPopupWindowStyle = 76;
// aapt resource value: 70
public const int AppCompatTheme_listPreferredItemHeight = 70;
// aapt resource value: 72
public const int AppCompatTheme_listPreferredItemHeightLarge = 72;
// aapt resource value: 71
public const int AppCompatTheme_listPreferredItemHeightSmall = 71;
// aapt resource value: 73
public const int AppCompatTheme_listPreferredItemPaddingLeft = 73;
// aapt resource value: 74
public const int AppCompatTheme_listPreferredItemPaddingRight = 74;
// aapt resource value: 80
public const int AppCompatTheme_panelBackground = 80;
// aapt resource value: 82
public const int AppCompatTheme_panelMenuListTheme = 82;
// aapt resource value: 81
public const int AppCompatTheme_panelMenuListWidth = 81;
// aapt resource value: 61
public const int AppCompatTheme_popupMenuStyle = 61;
// aapt resource value: 62
public const int AppCompatTheme_popupWindowStyle = 62;
// aapt resource value: 108
public const int AppCompatTheme_radioButtonStyle = 108;
// aapt resource value: 109
public const int AppCompatTheme_ratingBarStyle = 109;
// aapt resource value: 110
public const int AppCompatTheme_ratingBarStyleIndicator = 110;
// aapt resource value: 111
public const int AppCompatTheme_ratingBarStyleSmall = 111;
// aapt resource value: 69
public const int AppCompatTheme_searchViewStyle = 69;
// aapt resource value: 112
public const int AppCompatTheme_seekBarStyle = 112;
// aapt resource value: 53
public const int AppCompatTheme_selectableItemBackground = 53;
// aapt resource value: 54
public const int AppCompatTheme_selectableItemBackgroundBorderless = 54;
// aapt resource value: 48
public const int AppCompatTheme_spinnerDropDownItemStyle = 48;
// aapt resource value: 113
public const int AppCompatTheme_spinnerStyle = 113;
// aapt resource value: 114
public const int AppCompatTheme_switchStyle = 114;
// aapt resource value: 40
public const int AppCompatTheme_textAppearanceLargePopupMenu = 40;
// aapt resource value: 77
public const int AppCompatTheme_textAppearanceListItem = 77;
// aapt resource value: 78
public const int AppCompatTheme_textAppearanceListItemSecondary = 78;
// aapt resource value: 79
public const int AppCompatTheme_textAppearanceListItemSmall = 79;
// aapt resource value: 42
public const int AppCompatTheme_textAppearancePopupMenuHeader = 42;
// aapt resource value: 67
public const int AppCompatTheme_textAppearanceSearchResultSubtitle = 67;
// aapt resource value: 66
public const int AppCompatTheme_textAppearanceSearchResultTitle = 66;
// aapt resource value: 41
public const int AppCompatTheme_textAppearanceSmallPopupMenu = 41;
// aapt resource value: 98
public const int AppCompatTheme_textColorAlertDialogListItem = 98;
// aapt resource value: 68
public const int AppCompatTheme_textColorSearchUrl = 68;
// aapt resource value: 60
public const int AppCompatTheme_toolbarNavigationButtonStyle = 60;
// aapt resource value: 59
public const int AppCompatTheme_toolbarStyle = 59;
// aapt resource value: 117
public const int AppCompatTheme_tooltipForegroundColor = 117;
// aapt resource value: 116
public const int AppCompatTheme_tooltipFrameBackground = 116;
// aapt resource value: 2
public const int AppCompatTheme_windowActionBar = 2;
// aapt resource value: 4
public const int AppCompatTheme_windowActionBarOverlay = 4;
// aapt resource value: 5
public const int AppCompatTheme_windowActionModeOverlay = 5;
// aapt resource value: 9
public const int AppCompatTheme_windowFixedHeightMajor = 9;
// aapt resource value: 7
public const int AppCompatTheme_windowFixedHeightMinor = 7;
// aapt resource value: 6
public const int AppCompatTheme_windowFixedWidthMajor = 6;
// aapt resource value: 8
public const int AppCompatTheme_windowFixedWidthMinor = 8;
// aapt resource value: 10
public const int AppCompatTheme_windowMinWidthMajor = 10;
// aapt resource value: 11
public const int AppCompatTheme_windowMinWidthMinor = 11;
// aapt resource value: 3
public const int AppCompatTheme_windowNoTitle = 3;
public static int[] BottomNavigationView = new int[] {
2130772030,
2130772291,
2130772292,
2130772293,
2130772294};
// aapt resource value: 0
public const int BottomNavigationView_elevation = 0;
// aapt resource value: 4
public const int BottomNavigationView_itemBackground = 4;
// aapt resource value: 2
public const int BottomNavigationView_itemIconTint = 2;
// aapt resource value: 3
public const int BottomNavigationView_itemTextColor = 3;
// aapt resource value: 1
public const int BottomNavigationView_menu = 1;
public static int[] BottomSheetBehavior_Layout = new int[] {
2130772253,
2130772254,
2130772255};
// aapt resource value: 1
public const int BottomSheetBehavior_Layout_behavior_hideable = 1;
// aapt resource value: 0
public const int BottomSheetBehavior_Layout_behavior_peekHeight = 0;
// aapt resource value: 2
public const int BottomSheetBehavior_Layout_behavior_skipCollapsed = 2;
public static int[] ButtonBarLayout = new int[] {
2130772171};
// aapt resource value: 0
public const int ButtonBarLayout_allowStacking = 0;
public static int[] CardView = new int[] {
16843071,
16843072,
2130771991,
2130771992,
2130771993,
2130771994,
2130771995,
2130771996,
2130771997,
2130771998,
2130771999,
2130772000,
2130772001};
// aapt resource value: 1
public const int CardView_android_minHeight = 1;
// aapt resource value: 0
public const int CardView_android_minWidth = 0;
// aapt resource value: 2
public const int CardView_cardBackgroundColor = 2;
// aapt resource value: 3
public const int CardView_cardCornerRadius = 3;
// aapt resource value: 4
public const int CardView_cardElevation = 4;
// aapt resource value: 5
public const int CardView_cardMaxElevation = 5;
// aapt resource value: 7
public const int CardView_cardPreventCornerOverlap = 7;
// aapt resource value: 6
public const int CardView_cardUseCompatPadding = 6;
// aapt resource value: 8
public const int CardView_contentPadding = 8;
// aapt resource value: 12
public const int CardView_contentPaddingBottom = 12;
// aapt resource value: 9
public const int CardView_contentPaddingLeft = 9;
// aapt resource value: 10
public const int CardView_contentPaddingRight = 10;
// aapt resource value: 11
public const int CardView_contentPaddingTop = 11;
public static int[] CollapsingToolbarLayout = new int[] {
2130772005,
2130772256,
2130772257,
2130772258,
2130772259,
2130772260,
2130772261,
2130772262,
2130772263,
2130772264,
2130772265,
2130772266,
2130772267,
2130772268,
2130772269,
2130772270};
// aapt resource value: 13
public const int CollapsingToolbarLayout_collapsedTitleGravity = 13;
// aapt resource value: 7
public const int CollapsingToolbarLayout_collapsedTitleTextAppearance = 7;
// aapt resource value: 8
public const int CollapsingToolbarLayout_contentScrim = 8;
// aapt resource value: 14
public const int CollapsingToolbarLayout_expandedTitleGravity = 14;
// aapt resource value: 1
public const int CollapsingToolbarLayout_expandedTitleMargin = 1;
// aapt resource value: 5
public const int CollapsingToolbarLayout_expandedTitleMarginBottom = 5;
// aapt resource value: 4
public const int CollapsingToolbarLayout_expandedTitleMarginEnd = 4;
// aapt resource value: 2
public const int CollapsingToolbarLayout_expandedTitleMarginStart = 2;
// aapt resource value: 3
public const int CollapsingToolbarLayout_expandedTitleMarginTop = 3;
// aapt resource value: 6
public const int CollapsingToolbarLayout_expandedTitleTextAppearance = 6;
// aapt resource value: 12
public const int CollapsingToolbarLayout_scrimAnimationDuration = 12;
// aapt resource value: 11
public const int CollapsingToolbarLayout_scrimVisibleHeightTrigger = 11;
// aapt resource value: 9
public const int CollapsingToolbarLayout_statusBarScrim = 9;
// aapt resource value: 0
public const int CollapsingToolbarLayout_title = 0;
// aapt resource value: 15
public const int CollapsingToolbarLayout_titleEnabled = 15;
// aapt resource value: 10
public const int CollapsingToolbarLayout_toolbarId = 10;
public static int[] CollapsingToolbarLayout_Layout = new int[] {
2130772271,
2130772272};
// aapt resource value: 0
public const int CollapsingToolbarLayout_Layout_layout_collapseMode = 0;
// aapt resource value: 1
public const int CollapsingToolbarLayout_Layout_layout_collapseParallaxMultiplier = 1;
public static int[] ColorStateListItem = new int[] {
16843173,
16843551,
2130772172};
// aapt resource value: 2
public const int ColorStateListItem_alpha = 2;
// aapt resource value: 1
public const int ColorStateListItem_android_alpha = 1;
// aapt resource value: 0
public const int ColorStateListItem_android_color = 0;
public static int[] CompoundButton = new int[] {
16843015,
2130772173,
2130772174};
// aapt resource value: 0
public const int CompoundButton_android_button = 0;
// aapt resource value: 1
public const int CompoundButton_buttonTint = 1;
// aapt resource value: 2
public const int CompoundButton_buttonTintMode = 2;
public static int[] CoordinatorLayout = new int[] {
2130772273,
2130772274};
// aapt resource value: 0
public const int CoordinatorLayout_keylines = 0;
// aapt resource value: 1
public const int CoordinatorLayout_statusBarBackground = 1;
public static int[] CoordinatorLayout_Layout = new int[] {
16842931,
2130772275,
2130772276,
2130772277,
2130772278,
2130772279,
2130772280};
// aapt resource value: 0
public const int CoordinatorLayout_Layout_android_layout_gravity = 0;
// aapt resource value: 2
public const int CoordinatorLayout_Layout_layout_anchor = 2;
// aapt resource value: 4
public const int CoordinatorLayout_Layout_layout_anchorGravity = 4;
// aapt resource value: 1
public const int CoordinatorLayout_Layout_layout_behavior = 1;
// aapt resource value: 6
public const int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 6;
// aapt resource value: 5
public const int CoordinatorLayout_Layout_layout_insetEdge = 5;
// aapt resource value: 3
public const int CoordinatorLayout_Layout_layout_keyline = 3;
public static int[] DesignTheme = new int[] {
2130772281,
2130772282,
2130772283};
// aapt resource value: 0
public const int DesignTheme_bottomSheetDialogTheme = 0;
// aapt resource value: 1
public const int DesignTheme_bottomSheetStyle = 1;
// aapt resource value: 2
public const int DesignTheme_textColorError = 2;
public static int[] DrawerArrowToggle = new int[] {
2130772175,
2130772176,
2130772177,
2130772178,
2130772179,
2130772180,
2130772181,
2130772182};
// aapt resource value: 4
public const int DrawerArrowToggle_arrowHeadLength = 4;
// aapt resource value: 5
public const int DrawerArrowToggle_arrowShaftLength = 5;
// aapt resource value: 6
public const int DrawerArrowToggle_barLength = 6;
// aapt resource value: 0
public const int DrawerArrowToggle_color = 0;
// aapt resource value: 2
public const int DrawerArrowToggle_drawableSize = 2;
// aapt resource value: 3
public const int DrawerArrowToggle_gapBetweenBars = 3;
// aapt resource value: 1
public const int DrawerArrowToggle_spinBars = 1;
// aapt resource value: 7
public const int DrawerArrowToggle_thickness = 7;
public static int[] FloatingActionButton = new int[] {
2130772030,
2130772246,
2130772247,
2130772284,
2130772285,
2130772286,
2130772287,
2130772288};
// aapt resource value: 1
public const int FloatingActionButton_backgroundTint = 1;
// aapt resource value: 2
public const int FloatingActionButton_backgroundTintMode = 2;
// aapt resource value: 6
public const int FloatingActionButton_borderWidth = 6;
// aapt resource value: 0
public const int FloatingActionButton_elevation = 0;
// aapt resource value: 4
public const int FloatingActionButton_fabSize = 4;
// aapt resource value: 5
public const int FloatingActionButton_pressedTranslationZ = 5;
// aapt resource value: 3
public const int FloatingActionButton_rippleColor = 3;
// aapt resource value: 7
public const int FloatingActionButton_useCompatPadding = 7;
public static int[] FloatingActionButton_Behavior_Layout = new int[] {
2130772289};
// aapt resource value: 0
public const int FloatingActionButton_Behavior_Layout_behavior_autoHide = 0;
public static int[] FontFamily = new int[] {
2130772330,
2130772331,
2130772332,
2130772333,
2130772334,
2130772335};
// aapt resource value: 0
public const int FontFamily_fontProviderAuthority = 0;
// aapt resource value: 3
public const int FontFamily_fontProviderCerts = 3;
// aapt resource value: 4
public const int FontFamily_fontProviderFetchStrategy = 4;
// aapt resource value: 5
public const int FontFamily_fontProviderFetchTimeout = 5;
// aapt resource value: 1
public const int FontFamily_fontProviderPackage = 1;
// aapt resource value: 2
public const int FontFamily_fontProviderQuery = 2;
public static int[] FontFamilyFont = new int[] {
16844082,
16844083,
16844095,
2130772336,
2130772337,
2130772338};
// aapt resource value: 0
public const int FontFamilyFont_android_font = 0;
// aapt resource value: 2
public const int FontFamilyFont_android_fontStyle = 2;
// aapt resource value: 1
public const int FontFamilyFont_android_fontWeight = 1;
// aapt resource value: 4
public const int FontFamilyFont_font = 4;
// aapt resource value: 3
public const int FontFamilyFont_fontStyle = 3;
// aapt resource value: 5
public const int FontFamilyFont_fontWeight = 5;
public static int[] ForegroundLinearLayout = new int[] {
16843017,
16843264,
2130772290};
// aapt resource value: 0
public const int ForegroundLinearLayout_android_foreground = 0;
// aapt resource value: 1
public const int ForegroundLinearLayout_android_foregroundGravity = 1;
// aapt resource value: 2
public const int ForegroundLinearLayout_foregroundInsidePadding = 2;
public static int[] LinearLayoutCompat = new int[] {
16842927,
16842948,
16843046,
16843047,
16843048,
2130772013,
2130772183,
2130772184,
2130772185};
// aapt resource value: 2
public const int LinearLayoutCompat_android_baselineAligned = 2;
// aapt resource value: 3
public const int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
// aapt resource value: 0
public const int LinearLayoutCompat_android_gravity = 0;
// aapt resource value: 1
public const int LinearLayoutCompat_android_orientation = 1;
// aapt resource value: 4
public const int LinearLayoutCompat_android_weightSum = 4;
// aapt resource value: 5
public const int LinearLayoutCompat_divider = 5;
// aapt resource value: 8
public const int LinearLayoutCompat_dividerPadding = 8;
// aapt resource value: 6
public const int LinearLayoutCompat_measureWithLargestChild = 6;
// aapt resource value: 7
public const int LinearLayoutCompat_showDividers = 7;
public static int[] LinearLayoutCompat_Layout = new int[] {
16842931,
16842996,
16842997,
16843137};
// aapt resource value: 0
public const int LinearLayoutCompat_Layout_android_layout_gravity = 0;
// aapt resource value: 2
public const int LinearLayoutCompat_Layout_android_layout_height = 2;
// aapt resource value: 3
public const int LinearLayoutCompat_Layout_android_layout_weight = 3;
// aapt resource value: 1
public const int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int[] ListPopupWindow = new int[] {
16843436,
16843437};
// aapt resource value: 0
public const int ListPopupWindow_android_dropDownHorizontalOffset = 0;
// aapt resource value: 1
public const int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int[] MediaRouteButton = new int[] {
16843071,
16843072,
2130771989,
2130771990};
// aapt resource value: 1
public const int MediaRouteButton_android_minHeight = 1;
// aapt resource value: 0
public const int MediaRouteButton_android_minWidth = 0;
// aapt resource value: 2
public const int MediaRouteButton_externalRouteEnabledDrawable = 2;
// aapt resource value: 3
public const int MediaRouteButton_mediaRouteButtonTint = 3;
public static int[] MenuGroup = new int[] {
16842766,
16842960,
16843156,
16843230,
16843231,
16843232};
// aapt resource value: 5
public const int MenuGroup_android_checkableBehavior = 5;
// aapt resource value: 0
public const int MenuGroup_android_enabled = 0;
// aapt resource value: 1
public const int MenuGroup_android_id = 1;
// aapt resource value: 3
public const int MenuGroup_android_menuCategory = 3;
// aapt resource value: 4
public const int MenuGroup_android_orderInCategory = 4;
// aapt resource value: 2
public const int MenuGroup_android_visible = 2;
public static int[] MenuItem = new int[] {
16842754,
16842766,
16842960,
16843014,
16843156,
16843230,
16843231,
16843233,
16843234,
16843235,
16843236,
16843237,
16843375,
2130772186,
2130772187,
2130772188,
2130772189,
2130772190,
2130772191,
2130772192,
2130772193,
2130772194,
2130772195};
// aapt resource value: 16
public const int MenuItem_actionLayout = 16;
// aapt resource value: 18
public const int MenuItem_actionProviderClass = 18;
// aapt resource value: 17
public const int MenuItem_actionViewClass = 17;
// aapt resource value: 13
public const int MenuItem_alphabeticModifiers = 13;
// aapt resource value: 9
public const int MenuItem_android_alphabeticShortcut = 9;
// aapt resource value: 11
public const int MenuItem_android_checkable = 11;
// aapt resource value: 3
public const int MenuItem_android_checked = 3;
// aapt resource value: 1
public const int MenuItem_android_enabled = 1;
// aapt resource value: 0
public const int MenuItem_android_icon = 0;
// aapt resource value: 2
public const int MenuItem_android_id = 2;
// aapt resource value: 5
public const int MenuItem_android_menuCategory = 5;
// aapt resource value: 10
public const int MenuItem_android_numericShortcut = 10;
// aapt resource value: 12
public const int MenuItem_android_onClick = 12;
// aapt resource value: 6
public const int MenuItem_android_orderInCategory = 6;
// aapt resource value: 7
public const int MenuItem_android_title = 7;
// aapt resource value: 8
public const int MenuItem_android_titleCondensed = 8;
// aapt resource value: 4
public const int MenuItem_android_visible = 4;
// aapt resource value: 19
public const int MenuItem_contentDescription = 19;
// aapt resource value: 21
public const int MenuItem_iconTint = 21;
// aapt resource value: 22
public const int MenuItem_iconTintMode = 22;
// aapt resource value: 14
public const int MenuItem_numericModifiers = 14;
// aapt resource value: 15
public const int MenuItem_showAsAction = 15;
// aapt resource value: 20
public const int MenuItem_tooltipText = 20;
public static int[] MenuView = new int[] {
16842926,
16843052,
16843053,
16843054,
16843055,
16843056,
16843057,
2130772196,
2130772197};
// aapt resource value: 4
public const int MenuView_android_headerBackground = 4;
// aapt resource value: 2
public const int MenuView_android_horizontalDivider = 2;
// aapt resource value: 5
public const int MenuView_android_itemBackground = 5;
// aapt resource value: 6
public const int MenuView_android_itemIconDisabledAlpha = 6;
// aapt resource value: 1
public const int MenuView_android_itemTextAppearance = 1;
// aapt resource value: 3
public const int MenuView_android_verticalDivider = 3;
// aapt resource value: 0
public const int MenuView_android_windowAnimationStyle = 0;
// aapt resource value: 7
public const int MenuView_preserveIconSpacing = 7;
// aapt resource value: 8
public const int MenuView_subMenuArrow = 8;
public static int[] NavigationView = new int[] {
16842964,
16842973,
16843039,
2130772030,
2130772291,
2130772292,
2130772293,
2130772294,
2130772295,
2130772296};
// aapt resource value: 0
public const int NavigationView_android_background = 0;
// aapt resource value: 1
public const int NavigationView_android_fitsSystemWindows = 1;
// aapt resource value: 2
public const int NavigationView_android_maxWidth = 2;
// aapt resource value: 3
public const int NavigationView_elevation = 3;
// aapt resource value: 9
public const int NavigationView_headerLayout = 9;
// aapt resource value: 7
public const int NavigationView_itemBackground = 7;
// aapt resource value: 5
public const int NavigationView_itemIconTint = 5;
// aapt resource value: 8
public const int NavigationView_itemTextAppearance = 8;
// aapt resource value: 6
public const int NavigationView_itemTextColor = 6;
// aapt resource value: 4
public const int NavigationView_menu = 4;
public static int[] PopupWindow = new int[] {
16843126,
16843465,
2130772198};
// aapt resource value: 1
public const int PopupWindow_android_popupAnimationStyle = 1;
// aapt resource value: 0
public const int PopupWindow_android_popupBackground = 0;
// aapt resource value: 2
public const int PopupWindow_overlapAnchor = 2;
public static int[] PopupWindowBackgroundState = new int[] {
2130772199};
// aapt resource value: 0
public const int PopupWindowBackgroundState_state_above_anchor = 0;
public static int[] RecycleListView = new int[] {
2130772200,
2130772201};
// aapt resource value: 0
public const int RecycleListView_paddingBottomNoButtons = 0;
// aapt resource value: 1
public const int RecycleListView_paddingTopNoTitle = 1;
public static int[] RecyclerView = new int[] {
16842948,
16842993,
2130771968,
2130771969,
2130771970,
2130771971,
2130771972,
2130771973,
2130771974,
2130771975,
2130771976};
// aapt resource value: 1
public const int RecyclerView_android_descendantFocusability = 1;
// aapt resource value: 0
public const int RecyclerView_android_orientation = 0;
// aapt resource value: 6
public const int RecyclerView_fastScrollEnabled = 6;
// aapt resource value: 9
public const int RecyclerView_fastScrollHorizontalThumbDrawable = 9;
// aapt resource value: 10
public const int RecyclerView_fastScrollHorizontalTrackDrawable = 10;
// aapt resource value: 7
public const int RecyclerView_fastScrollVerticalThumbDrawable = 7;
// aapt resource value: 8
public const int RecyclerView_fastScrollVerticalTrackDrawable = 8;
// aapt resource value: 2
public const int RecyclerView_layoutManager = 2;
// aapt resource value: 4
public const int RecyclerView_reverseLayout = 4;
// aapt resource value: 3
public const int RecyclerView_spanCount = 3;
// aapt resource value: 5
public const int RecyclerView_stackFromEnd = 5;
public static int[] ScrimInsetsFrameLayout = new int[] {
2130772297};
// aapt resource value: 0
public const int ScrimInsetsFrameLayout_insetForeground = 0;
public static int[] ScrollingViewBehavior_Layout = new int[] {
2130772298};
// aapt resource value: 0
public const int ScrollingViewBehavior_Layout_behavior_overlapTop = 0;
public static int[] SearchView = new int[] {
16842970,
16843039,
16843296,
16843364,
2130772202,
2130772203,
2130772204,
2130772205,
2130772206,
2130772207,
2130772208,
2130772209,
2130772210,
2130772211,
2130772212,
2130772213,
2130772214};
// aapt resource value: 0
public const int SearchView_android_focusable = 0;
// aapt resource value: 3
public const int SearchView_android_imeOptions = 3;
// aapt resource value: 2
public const int SearchView_android_inputType = 2;
// aapt resource value: 1
public const int SearchView_android_maxWidth = 1;
// aapt resource value: 8
public const int SearchView_closeIcon = 8;
// aapt resource value: 13
public const int SearchView_commitIcon = 13;
// aapt resource value: 7
public const int SearchView_defaultQueryHint = 7;
// aapt resource value: 9
public const int SearchView_goIcon = 9;
// aapt resource value: 5
public const int SearchView_iconifiedByDefault = 5;
// aapt resource value: 4
public const int SearchView_layout = 4;
// aapt resource value: 15
public const int SearchView_queryBackground = 15;
// aapt resource value: 6
public const int SearchView_queryHint = 6;
// aapt resource value: 11
public const int SearchView_searchHintIcon = 11;
// aapt resource value: 10
public const int SearchView_searchIcon = 10;
// aapt resource value: 16
public const int SearchView_submitBackground = 16;
// aapt resource value: 14
public const int SearchView_suggestionRowLayout = 14;
// aapt resource value: 12
public const int SearchView_voiceIcon = 12;
public static int[] SnackbarLayout = new int[] {
16843039,
2130772030,
2130772299};
// aapt resource value: 0
public const int SnackbarLayout_android_maxWidth = 0;
// aapt resource value: 1
public const int SnackbarLayout_elevation = 1;
// aapt resource value: 2
public const int SnackbarLayout_maxActionInlineWidth = 2;
public static int[] Spinner = new int[] {
16842930,
16843126,
16843131,
16843362,
2130772031};
// aapt resource value: 3
public const int Spinner_android_dropDownWidth = 3;
// aapt resource value: 0
public const int Spinner_android_entries = 0;
// aapt resource value: 1
public const int Spinner_android_popupBackground = 1;
// aapt resource value: 2
public const int Spinner_android_prompt = 2;
// aapt resource value: 4
public const int Spinner_popupTheme = 4;
public static int[] SwitchCompat = new int[] {
16843044,
16843045,
16843074,
2130772215,
2130772216,
2130772217,
2130772218,
2130772219,
2130772220,
2130772221,
2130772222,
2130772223,
2130772224,
2130772225};
// aapt resource value: 1
public const int SwitchCompat_android_textOff = 1;
// aapt resource value: 0
public const int SwitchCompat_android_textOn = 0;
// aapt resource value: 2
public const int SwitchCompat_android_thumb = 2;
// aapt resource value: 13
public const int SwitchCompat_showText = 13;
// aapt resource value: 12
public const int SwitchCompat_splitTrack = 12;
// aapt resource value: 10
public const int SwitchCompat_switchMinWidth = 10;
// aapt resource value: 11
public const int SwitchCompat_switchPadding = 11;
// aapt resource value: 9
public const int SwitchCompat_switchTextAppearance = 9;
// aapt resource value: 8
public const int SwitchCompat_thumbTextPadding = 8;
// aapt resource value: 3
public const int SwitchCompat_thumbTint = 3;
// aapt resource value: 4
public const int SwitchCompat_thumbTintMode = 4;
// aapt resource value: 5
public const int SwitchCompat_track = 5;
// aapt resource value: 6
public const int SwitchCompat_trackTint = 6;
// aapt resource value: 7
public const int SwitchCompat_trackTintMode = 7;
public static int[] TabItem = new int[] {
16842754,
16842994,
16843087};
// aapt resource value: 0
public const int TabItem_android_icon = 0;
// aapt resource value: 1
public const int TabItem_android_layout = 1;
// aapt resource value: 2
public const int TabItem_android_text = 2;
public static int[] TabLayout = new int[] {
2130772300,
2130772301,
2130772302,
2130772303,
2130772304,
2130772305,
2130772306,
2130772307,
2130772308,
2130772309,
2130772310,
2130772311,
2130772312,
2130772313,
2130772314,
2130772315};
// aapt resource value: 3
public const int TabLayout_tabBackground = 3;
// aapt resource value: 2
public const int TabLayout_tabContentStart = 2;
// aapt resource value: 5
public const int TabLayout_tabGravity = 5;
// aapt resource value: 0
public const int TabLayout_tabIndicatorColor = 0;
// aapt resource value: 1
public const int TabLayout_tabIndicatorHeight = 1;
// aapt resource value: 7
public const int TabLayout_tabMaxWidth = 7;
// aapt resource value: 6
public const int TabLayout_tabMinWidth = 6;
// aapt resource value: 4
public const int TabLayout_tabMode = 4;
// aapt resource value: 15
public const int TabLayout_tabPadding = 15;
// aapt resource value: 14
public const int TabLayout_tabPaddingBottom = 14;
// aapt resource value: 13
public const int TabLayout_tabPaddingEnd = 13;
// aapt resource value: 11
public const int TabLayout_tabPaddingStart = 11;
// aapt resource value: 12
public const int TabLayout_tabPaddingTop = 12;
// aapt resource value: 10
public const int TabLayout_tabSelectedTextColor = 10;
// aapt resource value: 8
public const int TabLayout_tabTextAppearance = 8;
// aapt resource value: 9
public const int TabLayout_tabTextColor = 9;
public static int[] TextAppearance = new int[] {
16842901,
16842902,
16842903,
16842904,
16842906,
16842907,
16843105,
16843106,
16843107,
16843108,
16843692,
2130772047,
2130772053};
// aapt resource value: 10
public const int TextAppearance_android_fontFamily = 10;
// aapt resource value: 6
public const int TextAppearance_android_shadowColor = 6;
// aapt resource value: 7
public const int TextAppearance_android_shadowDx = 7;
// aapt resource value: 8
public const int TextAppearance_android_shadowDy = 8;
// aapt resource value: 9
public const int TextAppearance_android_shadowRadius = 9;
// aapt resource value: 3
public const int TextAppearance_android_textColor = 3;
// aapt resource value: 4
public const int TextAppearance_android_textColorHint = 4;
// aapt resource value: 5
public const int TextAppearance_android_textColorLink = 5;
// aapt resource value: 0
public const int TextAppearance_android_textSize = 0;
// aapt resource value: 2
public const int TextAppearance_android_textStyle = 2;
// aapt resource value: 1
public const int TextAppearance_android_typeface = 1;
// aapt resource value: 12
public const int TextAppearance_fontFamily = 12;
// aapt resource value: 11
public const int TextAppearance_textAllCaps = 11;
public static int[] TextInputLayout = new int[] {
16842906,
16843088,
2130772316,
2130772317,
2130772318,
2130772319,
2130772320,
2130772321,
2130772322,
2130772323,
2130772324,
2130772325,
2130772326,
2130772327,
2130772328,
2130772329};
// aapt resource value: 1
public const int TextInputLayout_android_hint = 1;
// aapt resource value: 0
public const int TextInputLayout_android_textColorHint = 0;
// aapt resource value: 6
public const int TextInputLayout_counterEnabled = 6;
// aapt resource value: 7
public const int TextInputLayout_counterMaxLength = 7;
// aapt resource value: 9
public const int TextInputLayout_counterOverflowTextAppearance = 9;
// aapt resource value: 8
public const int TextInputLayout_counterTextAppearance = 8;
// aapt resource value: 4
public const int TextInputLayout_errorEnabled = 4;
// aapt resource value: 5
public const int TextInputLayout_errorTextAppearance = 5;
// aapt resource value: 10
public const int TextInputLayout_hintAnimationEnabled = 10;
// aapt resource value: 3
public const int TextInputLayout_hintEnabled = 3;
// aapt resource value: 2
public const int TextInputLayout_hintTextAppearance = 2;
// aapt resource value: 13
public const int TextInputLayout_passwordToggleContentDescription = 13;
// aapt resource value: 12
public const int TextInputLayout_passwordToggleDrawable = 12;
// aapt resource value: 11
public const int TextInputLayout_passwordToggleEnabled = 11;
// aapt resource value: 14
public const int TextInputLayout_passwordToggleTint = 14;
// aapt resource value: 15
public const int TextInputLayout_passwordToggleTintMode = 15;
public static int[] Toolbar = new int[] {
16842927,
16843072,
2130772005,
2130772008,
2130772012,
2130772024,
2130772025,
2130772026,
2130772027,
2130772028,
2130772029,
2130772031,
2130772226,
2130772227,
2130772228,
2130772229,
2130772230,
2130772231,
2130772232,
2130772233,
2130772234,
2130772235,
2130772236,
2130772237,
2130772238,
2130772239,
2130772240,
2130772241,
2130772242};
// aapt resource value: 0
public const int Toolbar_android_gravity = 0;
// aapt resource value: 1
public const int Toolbar_android_minHeight = 1;
// aapt resource value: 21
public const int Toolbar_buttonGravity = 21;
// aapt resource value: 23
public const int Toolbar_collapseContentDescription = 23;
// aapt resource value: 22
public const int Toolbar_collapseIcon = 22;
// aapt resource value: 6
public const int Toolbar_contentInsetEnd = 6;
// aapt resource value: 10
public const int Toolbar_contentInsetEndWithActions = 10;
// aapt resource value: 7
public const int Toolbar_contentInsetLeft = 7;
// aapt resource value: 8
public const int Toolbar_contentInsetRight = 8;
// aapt resource value: 5
public const int Toolbar_contentInsetStart = 5;
// aapt resource value: 9
public const int Toolbar_contentInsetStartWithNavigation = 9;
// aapt resource value: 4
public const int Toolbar_logo = 4;
// aapt resource value: 26
public const int Toolbar_logoDescription = 26;
// aapt resource value: 20
public const int Toolbar_maxButtonHeight = 20;
// aapt resource value: 25
public const int Toolbar_navigationContentDescription = 25;
// aapt resource value: 24
public const int Toolbar_navigationIcon = 24;
// aapt resource value: 11
public const int Toolbar_popupTheme = 11;
// aapt resource value: 3
public const int Toolbar_subtitle = 3;
// aapt resource value: 13
public const int Toolbar_subtitleTextAppearance = 13;
// aapt resource value: 28
public const int Toolbar_subtitleTextColor = 28;
// aapt resource value: 2
public const int Toolbar_title = 2;
// aapt resource value: 14
public const int Toolbar_titleMargin = 14;
// aapt resource value: 18
public const int Toolbar_titleMarginBottom = 18;
// aapt resource value: 16
public const int Toolbar_titleMarginEnd = 16;
// aapt resource value: 15
public const int Toolbar_titleMarginStart = 15;
// aapt resource value: 17
public const int Toolbar_titleMarginTop = 17;
// aapt resource value: 19
public const int Toolbar_titleMargins = 19;
// aapt resource value: 12
public const int Toolbar_titleTextAppearance = 12;
// aapt resource value: 27
public const int Toolbar_titleTextColor = 27;
public static int[] View = new int[] {
16842752,
16842970,
2130772243,
2130772244,
2130772245};
// aapt resource value: 1
public const int View_android_focusable = 1;
// aapt resource value: 0
public const int View_android_theme = 0;
// aapt resource value: 3
public const int View_paddingEnd = 3;
// aapt resource value: 2
public const int View_paddingStart = 2;
// aapt resource value: 4
public const int View_theme = 4;
public static int[] ViewBackgroundHelper = new int[] {
16842964,
2130772246,
2130772247};
// aapt resource value: 0
public const int ViewBackgroundHelper_android_background = 0;
// aapt resource value: 1
public const int ViewBackgroundHelper_backgroundTint = 1;
// aapt resource value: 2
public const int ViewBackgroundHelper_backgroundTintMode = 2;
public static int[] ViewStubCompat = new int[] {
16842960,
16842994,
16842995};
// aapt resource value: 0
public const int ViewStubCompat_android_id = 0;
// aapt resource value: 2
public const int ViewStubCompat_android_inflatedId = 2;
// aapt resource value: 1
public const int ViewStubCompat_android_layout = 1;
static Styleable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Styleable()
{
}
}
}
}
#pragma warning restore 1591
| 31.78441 | 138 | 0.731905 | [
"MIT"
] | Walicen/TheBestSeriesXamarin | TheBestSeries.Android/Resources/Resource.designer.cs | 238,542 | C# |
using System.Linq;
using UnityEngine;
// ReSharper disable once CheckNamespace
namespace QFX.IFX
{
public class IFX_SimpleProjectile : MonoBehaviour
{
public ParticleSystem MovementPS;
public Collider SelfCollider;
public bool DestroyAfterCollision;
public float DestroyAfterCollisionTimeout;
public bool IsSingleCollisionMode = true;
public AudioSource AudioSource;
[HideInInspector]
public GameObject ImpactPs;
[HideInInspector]
public float Speed = 1;
[HideInInspector]
public AudioClip ImpactAudioClip;
private Transform _transform;
private bool _wasCollided;
private ParticleSystem _impactPs;
private void Awake()
{
_transform = transform;
}
private void Update()
{
if (_wasCollided)
return;
_transform.position += _transform.forward * Speed * Time.deltaTime;
}
private void OnCollisionEnter(Collision collision)
{
if (_wasCollided && IsSingleCollisionMode)
return;
if (!collision.contacts.Any())
return;
if (!_wasCollided)
{
if (DestroyAfterCollision)
Destroy(gameObject, DestroyAfterCollisionTimeout);
if (IsSingleCollisionMode)
{
SelfCollider.enabled = false;
}
var impactGo = Instantiate(ImpactPs);
var impactPs = impactGo.GetComponent<ParticleSystem>();
impactPs.transform.rotation = Quaternion.FromToRotation(impactPs.transform.up, collision.contacts[0].normal) *
impactPs.transform.rotation;
impactPs.transform.position = collision.contacts[0].point;
impactPs.Play(true);
if (AudioSource != null && ImpactAudioClip != null)
AudioSource.PlayOneShot(ImpactAudioClip);
MovementPS.Stop();
}
_wasCollided = true;
}
}
}
| 27.35 | 126 | 0.564442 | [
"MIT"
] | Darkbill/DogAndPig | MiniProject/Assets/98.Asset/Effect/QFX/Imagy VFX/Resources/Scripts/Projectile/IFX_SimpleProjectile.cs | 2,190 | C# |
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace Swagger.Trello.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class OrganizationsDesc {
/// <summary>
/// a string with a length from 0 to 16384
/// </summary>
/// <value>a string with a length from 0 to 16384</value>
[DataMember(Name="value", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "value")]
public string Value { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
var sb = new StringBuilder();
sb.Append("class OrganizationsDesc {\n");
sb.Append(" Value: ").Append(Value).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}
| 26.5 | 68 | 0.64315 | [
"MIT"
] | maglethong/TrelloHabitica | Swagger.Trello/Model/OrganizationsDesc.cs | 1,219 | C# |
/****************************************************************************
* Copyright (c) 2017 ~ 2020.10 liangxie
*
* https://qframework.cn
* https://github.com/liangxiegame/QFramework
* https://gitee.com/liangxiegame/QFramework
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
****************************************************************************/
using UnityEngine;
namespace QFramework
{
/// <summary>
/// 静态类:MonoBehaviour类的单例
/// 泛型类:Where约束表示T类型必须继承MonoSingleton<T>
/// </summary>
/// <typeparam name="T"></typeparam>
public abstract class MonoSingleton<T> : MonoBehaviour, ISingleton where T : MonoSingleton<T>
{
/// <summary>
/// 静态实例
/// </summary>
protected static T mInstance;
/// <summary>
/// 静态属性:封装相关实例对象
/// </summary>
public static T Instance
{
get
{
if (mInstance == null && !mOnApplicationQuit)
{
mInstance = SingletonCreator.CreateMonoSingleton<T>();
}
return mInstance;
}
}
/// <summary>
/// 实现接口的单例初始化
/// </summary>
public virtual void OnSingletonInit()
{
}
/// <summary>
/// 资源释放
/// </summary>
public virtual void Dispose()
{
if (SingletonCreator.IsUnitTestMode)
{
var curTrans = transform;
do
{
var parent = curTrans.parent;
DestroyImmediate(curTrans.gameObject);
curTrans = parent;
} while (curTrans != null);
mInstance = null;
}
else
{
Destroy(gameObject);
}
}
/// <summary>
/// 当前应用程序是否结束 标签
/// </summary>
protected static bool mOnApplicationQuit = false;
/// <summary>
/// 应用程序退出:释放当前对象并销毁相关GameObject
/// </summary>
protected virtual void OnApplicationQuit()
{
mOnApplicationQuit = true;
if (mInstance == null) return;
Destroy(mInstance.gameObject);
mInstance = null;
}
/// <summary>
/// 释放当前对象
/// </summary>
protected virtual void OnDestroy()
{
mInstance = null;
}
/// <summary>
/// 判断当前应用程序是否退出
/// </summary>
public static bool IsApplicationQuit
{
get { return mOnApplicationQuit; }
}
}
}
| 29.75 | 97 | 0.53646 | [
"MIT"
] | Fanka0921/QFramework | QFramework/QFramework.Unity.Runtime/Core/Singleton/MonoSingleton.cs | 3,891 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IdentityModel.Tokens.Jwt;
using System.Net.Http;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Authentication;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
namespace Microsoft.AspNetCore.Authentication.OpenIdConnect
{
/// <summary>
/// This Context can be used to be informed when an 'AuthorizationCode' is received over the OpenIdConnect protocol.
/// </summary>
public class AuthorizationCodeReceivedContext : BaseOpenIdConnectContext
{
/// <summary>
/// Creates a <see cref="AuthorizationCodeReceivedContext"/>
/// </summary>
public AuthorizationCodeReceivedContext(HttpContext context, OpenIdConnectOptions options)
: base(context, options)
{
}
public AuthenticationProperties Properties { get; set; }
/// <summary>
/// Gets or sets the <see cref="JwtSecurityToken"/> that was received in the authentication response, if any.
/// </summary>
public JwtSecurityToken JwtSecurityToken { get; set; }
/// <summary>
/// The request that will be sent to the token endpoint and is available for customization.
/// </summary>
public OpenIdConnectMessage TokenEndpointRequest { get; set; }
/// <summary>
/// The configured communication channel to the identity provider for use when making custom requests to the token endpoint.
/// </summary>
public HttpClient Backchannel { get; internal set; }
/// <summary>
/// If the developer chooses to redeem the code themselves then they can provide the resulting tokens here. This is the
/// same as calling HandleCodeRedemption. If set then the middleware will not attempt to redeem the code. An IdToken
/// is required if one had not been previously received in the authorization response. An access token is optional
/// if the middleware is to contact the user-info endpoint.
/// </summary>
public OpenIdConnectMessage TokenEndpointResponse { get; set; }
/// <summary>
/// Indicates if the developer choose to handle (or skip) the code redemption. If true then the middleware will not attempt
/// to redeem the code. See HandleCodeRedemption and TokenEndpointResponse.
/// </summary>
public bool HandledCodeRedemption => TokenEndpointResponse != null;
/// <summary>
/// Tells the middleware to skip the code redemption process. The developer may have redeemed the code themselves, or
/// decided that the redemption was not required. If tokens were retrieved that are needed for further processing then
/// call one of the overloads that allows providing tokens. An IdToken is required if one had not been previously received
/// in the authorization response. An access token can optionally be provided for the middleware to contact the
/// user-info endpoint. Calling this is the same as setting TokenEndpointResponse.
/// </summary>
public void HandleCodeRedemption()
{
TokenEndpointResponse = new OpenIdConnectMessage();
}
/// <summary>
/// Tells the middleware to skip the code redemption process. The developer may have redeemed the code themselves, or
/// decided that the redemption was not required. If tokens were retrieved that are needed for further processing then
/// call one of the overloads that allows providing tokens. An IdToken is required if one had not been previously received
/// in the authorization response. An access token can optionally be provided for the middleware to contact the
/// user-info endpoint. Calling this is the same as setting TokenEndpointResponse.
/// </summary>
public void HandleCodeRedemption(string accessToken, string idToken)
{
TokenEndpointResponse = new OpenIdConnectMessage() { AccessToken = accessToken, IdToken = idToken };
}
/// <summary>
/// Tells the middleware to skip the code redemption process. The developer may have redeemed the code themselves, or
/// decided that the redemption was not required. If tokens were retrieved that are needed for further processing then
/// call one of the overloads that allows providing tokens. An IdToken is required if one had not been previously received
/// in the authorization response. An access token can optionally be provided for the middleware to contact the
/// user-info endpoint. Calling this is the same as setting TokenEndpointResponse.
/// </summary>
public void HandleCodeRedemption(OpenIdConnectMessage tokenEndpointResponse)
{
TokenEndpointResponse = tokenEndpointResponse;
}
}
} | 54.376344 | 132 | 0.696856 | [
"Apache-2.0"
] | FastSecurity1/fast | src/Microsoft.AspNetCore.Authentication.OpenIdConnect/Events/AuthorizationCodeReceivedContext.cs | 5,057 | C# |
// Copyright (c) 2010-2013 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using SharpDX.Win32;
namespace SharpDX.WIC
{
/// <summary>
/// BitmapEncoderOptions used for encoding.
/// </summary>
public class BitmapEncoderOptions : PropertyBag
{
/// <summary>
/// Initializes a new instance of the <see cref="BitmapEncoderOptions"/> class.
/// </summary>
/// <param name="propertyBagPointer">The property bag pointer.</param>
public BitmapEncoderOptions(IntPtr propertyBagPointer)
: base(propertyBagPointer)
{
}
/// <summary>
/// Gets or sets the image quality.
/// </summary>
/// <value>
/// The image quality.
/// </value>
/// <remarks>
/// Range value: 0-1.0f
/// Applicable Codecs: JPEG, HDPhoto
/// </remarks>
public float ImageQuality
{
get { return Get(ImageQualityKey); }
set { Set(ImageQualityKey, value);}
}
private static readonly PropertyBagKey<float, float> ImageQualityKey = new PropertyBagKey<float, float>("ImageQuality");
/// <summary>
/// Gets or sets the compression quality.
/// </summary>
/// <value>
/// The compression quality.
/// </value>
/// <remarks>
/// Range value: 0-1.0f
/// Applicable Codecs: TIFF
/// </remarks>
public float CompressionQuality
{
get { return Get(CompressionQualityKey); }
set { Set(CompressionQualityKey, value); }
}
private static readonly PropertyBagKey<float, float> CompressionQualityKey = new PropertyBagKey<float, float>("CompressionQuality");
/// <summary>
/// Gets or sets a value indicating whether loss less compression is enabled.
/// </summary>
/// <value>
/// <c>true</c> if [loss less]; otherwise, <c>false</c>.
/// </value>
/// <remarks>
/// Range value: true-false
/// Applicable Codecs: HDPhoto
/// </remarks>
public bool LossLess
{
get { return Get(LosslessKey); }
set { Set(LosslessKey, value); }
}
private static readonly PropertyBagKey<bool, bool> LosslessKey = new PropertyBagKey<bool, bool>("Lossless");
/// <summary>
/// Gets or sets the bitmap transform.
/// </summary>
/// <value>
/// The bitmap transform.
/// </value>
/// <remarks>
/// Range value: <see cref="BitmapTransformOptions"/>
/// Applicable Codecs: JPEG
/// </remarks>
public BitmapTransformOptions BitmapTransform
{
get { return Get(BitmapTransformKey); }
set { Set(BitmapTransformKey, value); }
}
private static readonly PropertyBagKey<BitmapTransformOptions, byte> BitmapTransformKey = new PropertyBagKey<BitmapTransformOptions, byte>("BitmapTransform");
/// <summary>
/// Gets or sets a value indicating whether [interlace option].
/// </summary>
/// <value>
/// <c>true</c> if [interlace option]; otherwise, <c>false</c>.
/// </value>
/// <remarks>
/// Range value: true-false
/// Applicable Codecs: PNG
/// </remarks>
public bool InterlaceOption
{
get { return Get(InterlaceOptionKey); }
set { Set(InterlaceOptionKey, value); }
}
private static readonly PropertyBagKey<bool, bool> InterlaceOptionKey = new PropertyBagKey<bool, bool>("InterlaceOption");
/// <summary>
/// Gets or sets the filter option.
/// </summary>
/// <value>
/// The filter option.
/// </value>
/// <remarks>
/// Range value: <see cref="PngFilterOption"/>
/// Applicable Codecs: PNG
/// </remarks>
public PngFilterOption FilterOption
{
get { return Get(FilterOptionKey); }
set { Set(FilterOptionKey, value); }
}
private static readonly PropertyBagKey<PngFilterOption, byte> FilterOptionKey = new PropertyBagKey<PngFilterOption, byte>("FilterOption");
/// <summary>
/// Gets or sets the TIFF compression method.
/// </summary>
/// <value>
/// The TIFF compression method.
/// </value>
/// <remarks>
/// Range value: <see cref="TiffCompressionOption"/>
/// Applicable Codecs: TIFF
/// </remarks>
public TiffCompressionOption TiffCompressionMethod
{
get { return Get(TiffCompressionMethodKey); }
set { Set(TiffCompressionMethodKey, value); }
}
private static readonly PropertyBagKey<TiffCompressionOption, bool> TiffCompressionMethodKey = new PropertyBagKey<TiffCompressionOption, bool>("TiffCompressionMethod");
/// <summary>
/// Gets or sets the luminance.
/// </summary>
/// <value>
/// The luminance.
/// </value>
/// <remarks>
/// Range value: 64 Entries (DCT)
/// Applicable Codecs: JPEG
/// </remarks>
public uint[] Luminance
{
get { return Get(LuminanceKey); }
set { Set(LuminanceKey, value); }
}
private static readonly PropertyBagKey<uint[], uint[]> LuminanceKey = new PropertyBagKey<uint[], uint[]>("Luminance");
/// <summary>
/// Gets or sets the chrominance.
/// </summary>
/// <value>
/// The chrominance.
/// </value>
/// <remarks>
/// Range value: 64 Entries (DCT)
/// Applicable Codecs: JPEG
/// </remarks>
public uint[] Chrominance
{
get { return Get(ChrominanceKey); }
set { Set(ChrominanceKey, value); }
}
private static readonly PropertyBagKey<uint[], uint[]> ChrominanceKey = new PropertyBagKey<uint[], uint[]>("Chrominance");
/// <summary>
/// Gets or sets the JPEG Y Cr Cb subsampling.
/// </summary>
/// <value>
/// The JPEG Y Cr Cb subsampling.
/// </value>
/// <remarks>
/// Range value: <see cref="JpegYCrCbSubsamplingOption"/>
/// Applicable Codecs: JPEG
/// </remarks>
public JpegYCrCbSubsamplingOption JpegYCrCbSubsampling
{
get { return Get(JpegYCrCbSubsamplingKey); }
set { Set(JpegYCrCbSubsamplingKey, value); }
}
private static readonly PropertyBagKey<JpegYCrCbSubsamplingOption, byte> JpegYCrCbSubsamplingKey = new PropertyBagKey<JpegYCrCbSubsamplingOption, byte>("JpegYCrCbSubsampling");
/// <summary>
/// Gets or sets a value indicating whether [suppress app0].
/// </summary>
/// <value>
/// <c>true</c> if [suppress app0]; otherwise, <c>false</c>.
/// </value>
/// <remarks>
/// Range value: true-false
/// Applicable Codecs: JPEG
/// </remarks>
public bool SuppressApp0
{
get { return Get(SuppressApp0Key); }
set { Set(SuppressApp0Key, value); }
}
private static readonly PropertyBagKey<bool, bool> SuppressApp0Key = new PropertyBagKey<bool, bool>("SuppressApp0");
}
} | 37.59292 | 184 | 0.581803 | [
"MIT"
] | shoelzer/SharpDX | Source/SharpDX.Direct2D1/WIC/BitmapEncoderOptions.cs | 8,496 | C# |
using Inshapardaz.Domain.Helpers;
using Inshapardaz.Domain.Models.Handlers.Library;
using Inshapardaz.Domain.Repositories;
using Inshapardaz.Domain.Repositories.Library;
using Paramore.Darker;
using System.Threading;
using System.Threading.Tasks;
namespace Inshapardaz.Domain.Models.Library
{
public class GetSeriesQuery : LibraryBaseQuery<Page<SeriesModel>>
{
public GetSeriesQuery(int libraryId, int pageNumber, int pageSize)
: base(libraryId)
{
PageNumber = pageNumber;
PageSize = pageSize;
}
public int PageNumber { get; private set; }
public int PageSize { get; private set; }
public string Query { get; set; }
}
public class GetSeriesQueryHandler : QueryHandlerAsync<GetSeriesQuery, Page<SeriesModel>>
{
private readonly ISeriesRepository _seriesRepository;
private readonly IFileRepository _fileRepository;
public GetSeriesQueryHandler(ISeriesRepository seriesRepository, IFileRepository fileRepository)
{
_seriesRepository = seriesRepository;
_fileRepository = fileRepository;
}
public override async Task<Page<SeriesModel>> ExecuteAsync(GetSeriesQuery query, CancellationToken cancellationToken = new CancellationToken())
{
var series = (string.IsNullOrWhiteSpace(query.Query))
? await _seriesRepository.GetSeries(query.LibraryId, query.PageNumber, query.PageSize, cancellationToken)
: await _seriesRepository.FindSeries(query.LibraryId, query.Query, query.PageNumber, query.PageSize, cancellationToken);
foreach (var author in series.Data)
{
if (author != null && author.ImageId.HasValue)
{
author.ImageUrl = await ImageHelper.TryConvertToPublicFile(author.ImageId.Value, _fileRepository, cancellationToken);
}
}
return series;
}
}
}
| 35.785714 | 151 | 0.674152 | [
"Apache-2.0"
] | inshapardaz/api | src/Inshapardaz.Domain/Ports/Handlers/Library/GetSeriesQuery.cs | 2,006 | C# |
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Versioning;
using ParkAPI.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Threading.Tasks;
namespace ParkAPI.Controllers
{
[ApiVersion("1.0")]
[Route("api/nationalparks")]
[ApiController]
public class NationalParksV1Controller : ControllerBase
{
private ParkAPIContext _db;
public NationalParksV1Controller(ParkAPIContext db)
{
_db = db;
}
//GET api/nationalparks
[HttpGet]
public ActionResult<IEnumerable<NationalPark>> Get()
{
return _db.NationalParks.ToList();
}
//GET api/nationalParks/random
[HttpGet]
[Route("random")]
public ActionResult<NationalPark> Random()
{
Random random = new Random();
int someNationalPark = random.Next(_db.NationalParks.ToList().Count);
return _db.NationalParks.FirstOrDefault(e => e.NationalParkId == someNationalPark);
}
//POST api/nationalparks
[HttpPost]
public void Post([FromBody] NationalPark nationalPark)
{
_db.NationalParks.Add(nationalPark);
_db.SaveChanges();
}
//GET api/nationalparks/{id}
[HttpGet("{id}")]
public ActionResult<NationalPark> Get(int id)
{
return _db.NationalParks.FirstOrDefault(e => e.NationalParkId == id);
}
//PUT api/nationalparks/{id}
[HttpPut("{id}")]
public void Put(int id, [FromBody] NationalPark nationalPark)
{
nationalPark.NationalParkId = id;
_db.Entry(nationalPark).State = EntityState.Modified;
_db.SaveChanges();
}
//DELETE api/nationalparks/{id}
[HttpDelete("{id}")]
public void Delete(int id)
{
var natlParkToDelete = _db.NationalParks.FirstOrDefault(e => e.NationalParkId == id);
_db.NationalParks.Remove(natlParkToDelete);
_db.SaveChanges();
}
}
[ApiVersion("2.0")]
[Route("api/{Version:apiVersion}/nationalParks")]
[ApiController]
public class NationalParksV2Controller : ControllerBase
{
private ParkAPIContext _db;
public NationalParksV2Controller(ParkAPIContext db)
{
_db = db;
}
//GET api/2.0/nationalparks?{parameter}={query}
[HttpGet]
public ActionResult<IEnumerable<NationalPark>> Get(string name, string state)
{
var query = _db.NationalParks.AsQueryable();
if (name != null)
{
query = query.Where(e => e.Name == name);
}
if (state != null)
{
query = query.Where(e => e.State == state);
}
return query.ToList();
}
}
} | 27.431579 | 91 | 0.660015 | [
"MIT",
"Unlicense"
] | kevinkirkl3y/Parks.Solution | ParkAPI/Controllers/NationalParksController.cs | 2,606 | C# |
using System;
using System.Xml.Serialization;
using System.ComponentModel.DataAnnotations;
using BroadWorksConnector.Ocip.Validation;
using System.Collections.Generic;
namespace BroadWorksConnector.Ocip.Models
{
/// <summary>
/// The sort criteria specifies the device type as the column for
/// the sort, whether the sort is ascending or descending, and whether the
/// sort is case sensitive.
/// </summary>
[Serializable]
[XmlRoot(Namespace = "")]
[Groups(@"[{""__type"":""Sequence:#BroadWorksConnector.Ocip.Validation"",""id"":""58293b6da8bb02a6430b3eb1beb91194:245""}]")]
public class SortByDeviceType : BroadWorksConnector.Ocip.Models.SortCriteria
{
}
}
| 30.73913 | 129 | 0.721358 | [
"MIT"
] | JTOne123/broadworks-connector-net | BroadworksConnector/Ocip/Models/SortByDeviceType.cs | 707 | C# |
/*
* Copyright 2012-2021 The Pkcs11Interop Project
*
* 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.
*/
/*
* Written for the Pkcs11Interop project by:
* Jaroslav IMRICH <jimrich@jimrich.sk>
*/
using System.Runtime.InteropServices;
using NativeULong = System.UInt32;
// Note: Code in this file is generated automatically.
namespace Net.Pkcs11Interop.LowLevelAPI40
{
/// <summary>
/// Provides general information about Cryptoki
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 0, CharSet = CharSet.Unicode)]
public struct CK_INFO
{
/// <summary>
/// Cryptoki interface version number, for compatibility with future revisions of this interface.
/// </summary>
public CK_VERSION CryptokiVersion;
/// <summary>
/// ID of the Cryptoki library manufacturer. Must be padded with the blank character (‘ ‘). Should not be null-terminated.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] ManufacturerId;
/// <summary>
/// Bit flags reserved for future versions. Must be zero for this version
/// </summary>
public NativeULong Flags;
/// <summary>
/// Character-string description of the library. Must be padded with the blank character (‘ ‘). Should not be null-terminated.
/// </summary>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] LibraryDescription;
/// <summary>
/// Cryptoki library version number
/// </summary>
public CK_VERSION LibraryVersion;
}
}
| 34.174603 | 134 | 0.666976 | [
"Apache-2.0"
] | Pkcs11Interop/Pkcs11Interop | src/Pkcs11Interop/LowLevelAPI40/CK_INFO.cs | 2,163 | C# |
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
namespace FreeSql.Tests.Sqlite
{
public class SqliteUpdateTest
{
IUpdate<Topic> update => g.sqlite.Update<Topic>();
[Table(Name = "tb_topic")]
class Topic
{
[Column(IsIdentity = true, IsPrimary = true)]
public int Id { get; set; }
public int? Clicks { get; set; }
public int TypeGuid { get; set; }
public TestTypeInfo Type { get; set; }
public string Title { get; set; }
public DateTime CreateTime { get; set; }
}
[Fact]
public void Dywhere()
{
Assert.Null(g.sqlite.Update<Topic>().ToSql());
Assert.Equal("UPDATE \"tb_topic\" SET title='test' \r\nWHERE (\"Id\" = 1 OR \"Id\" = 2)", g.sqlite.Update<Topic>(new[] { 1, 2 }).SetRaw("title='test'").ToSql());
Assert.Equal("UPDATE \"tb_topic\" SET title='test1' \r\nWHERE (\"Id\" = 1)", g.sqlite.Update<Topic>(new Topic { Id = 1, Title = "test" }).SetRaw("title='test1'").ToSql());
Assert.Equal("UPDATE \"tb_topic\" SET title='test1' \r\nWHERE (\"Id\" = 1 OR \"Id\" = 2)", g.sqlite.Update<Topic>(new[] { new Topic { Id = 1, Title = "test" }, new Topic { Id = 2, Title = "test" } }).SetRaw("title='test1'").ToSql());
Assert.Equal("UPDATE \"tb_topic\" SET title='test1' \r\nWHERE (\"Id\" = 1)", g.sqlite.Update<Topic>(new { id = 1 }).SetRaw("title='test1'").ToSql());
}
[Fact]
public void SetSource()
{
var sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).IgnoreColumns(a => a.TypeGuid).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = @p_0, \"Title\" = @p_1, \"CreateTime\" = @p_2 WHERE (\"Id\" = 1)", sql);
var items = new List<Topic>();
for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
items[0].Clicks = null;
sql = update.SetSource(items).IgnoreColumns(a => a.TypeGuid).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = CASE \"Id\" WHEN 1 THEN @p_0 WHEN 2 THEN @p_1 WHEN 3 THEN @p_2 WHEN 4 THEN @p_3 WHEN 5 THEN @p_4 WHEN 6 THEN @p_5 WHEN 7 THEN @p_6 WHEN 8 THEN @p_7 WHEN 9 THEN @p_8 WHEN 10 THEN @p_9 END, \"Title\" = CASE \"Id\" WHEN 1 THEN @p_10 WHEN 2 THEN @p_11 WHEN 3 THEN @p_12 WHEN 4 THEN @p_13 WHEN 5 THEN @p_14 WHEN 6 THEN @p_15 WHEN 7 THEN @p_16 WHEN 8 THEN @p_17 WHEN 9 THEN @p_18 WHEN 10 THEN @p_19 END, \"CreateTime\" = CASE \"Id\" WHEN 1 THEN @p_20 WHEN 2 THEN @p_21 WHEN 3 THEN @p_22 WHEN 4 THEN @p_23 WHEN 5 THEN @p_24 WHEN 6 THEN @p_25 WHEN 7 THEN @p_26 WHEN 8 THEN @p_27 WHEN 9 THEN @p_28 WHEN 10 THEN @p_29 END WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
sql = update.SetSource(items).IgnoreColumns(a => new { a.Clicks, a.CreateTime, a.TypeGuid }).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = CASE \"Id\" WHEN 1 THEN @p_0 WHEN 2 THEN @p_1 WHEN 3 THEN @p_2 WHEN 4 THEN @p_3 WHEN 5 THEN @p_4 WHEN 6 THEN @p_5 WHEN 7 THEN @p_6 WHEN 8 THEN @p_7 WHEN 9 THEN @p_8 WHEN 10 THEN @p_9 END WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
sql = update.SetSource(items).IgnoreColumns(a => a.TypeGuid).Set(a => a.CreateTime, new DateTime(2020, 1, 1)).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"CreateTime\" = @p_0 WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
sql = g.sqlite.Update<ts_source_mpk>().SetSource(new[] {
new ts_source_mpk { id1 = 1, id2 = 7, xx = "a1" },
new ts_source_mpk { id1 = 1, id2 = 8, xx = "b122" }
}).NoneParameter().ToSql().Replace("\r\n", "");
}
public class ts_source_mpk
{
[Column(IsPrimary = true)]
public int id1 { get; set; }
[Column(IsPrimary = true)]
public int id2 { get; set; }
public string xx { get; set; }
}
[Fact]
public void SetSourceIgnore()
{
Assert.Equal("UPDATE \"tssi01\" SET \"tint\" = 10 WHERE (\"id\" = '00000000-0000-0000-0000-000000000000')",
g.sqlite.Update<tssi01>().NoneParameter()
.SetSourceIgnore(new tssi01 { id = Guid.Empty, tint = 10 }, col => col == null).ToSql().Replace("\r\n", ""));
}
public class tssi01
{
[Column(CanUpdate = false)]
public Guid id { get; set; }
public int tint { get; set; }
public string title { get; set; }
}
[Fact]
public void IgnoreColumns()
{
var sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).IgnoreColumns(a => new { a.Clicks, a.CreateTime, a.TypeGuid }).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).IgnoreColumns(a => new object[] { a.Clicks, a.CreateTime, a.TypeGuid }).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).IgnoreColumns(a => new[] { "Clicks", "CreateTime", "TypeGuid" }).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
var cols = new[] { "Clicks", "CreateTime", "TypeGuid" };
sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).IgnoreColumns(a => cols).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
cols = new[] { "Clicks", "CreateTime", "TypeGuid" };
sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).IgnoreColumns(cols).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
}
[Fact]
public void UpdateColumns()
{
var sql = update.SetSource(new Topic { Id = 1, Title = "newtitle" }).UpdateColumns(a => a.Title).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
}
[Fact]
public void Set()
{
var sql = update.Where(a => a.Id == 1).Set(a => a.Title, "newtitle").ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0 WHERE (\"Id\" = 1)", sql);
sql = update.Where(a => a.Id == 1).Set(a => a.Title, "newtitle").Set(a => a.CreateTime, new DateTime(2020, 1, 1)).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Title\" = @p_0, \"CreateTime\" = @p_1 WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.Clicks * 10 / 1).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = ifnull(\"Clicks\", 0) * 10 / 1 WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.Id - 10).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Id\" = (\"Id\" - 10) WHERE (\"Id\" = 1)", sql);
int incrv = 10;
sql = update.Set(a => a.Clicks * incrv / 1).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = ifnull(\"Clicks\", 0) * 10 / 1 WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.Id - incrv).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Id\" = (\"Id\" - 10) WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.CreateTime.AddYears(1)).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"CreateTime\" = datetime(\"CreateTime\",(1)||' years') WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.Clicks == a.Clicks * 10 / 1).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = \"Clicks\" * 10 / 1 WHERE (\"Id\" = 1)", sql);
var dt2000 = DateTime.Parse("2000-01-01");
sql = update.Set(a => a.Clicks == (a.CreateTime > dt2000 ? 1 : 2)).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = case when \"CreateTime\" > '2000-01-01 00:00:00' then 1 else 2 end WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.Id == 10).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Id\" = 10 WHERE (\"Id\" = 1)", sql);
sql = update.Set(a => a.Clicks == null).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = NULL WHERE (\"Id\" = 1)", sql);
}
[Fact]
public void SetRaw()
{
var sql = update.Where(a => a.Id == 1).SetRaw("clicks = clicks + :incrClick", new { incrClick = 1 }).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET clicks = clicks + :incrClick WHERE (\"Id\" = 1)", sql);
}
[Fact]
public void SetDto()
{
var sql = update.SetDto(new { clicks = 1, title = "xxx" }).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = @p_0, \"Title\" = @p_1 WHERE (\"Id\" = 1)", sql);
sql = update.NoneParameter().SetDto(new { clicks = 1, title = "xxx" }).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = 1, \"Title\" = 'xxx' WHERE (\"Id\" = 1)", sql);
sql = update.SetDto(new Dictionary<string, object> { ["clicks"] = 1, ["title"] = "xxx" }).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = @p_0, \"Title\" = @p_1 WHERE (\"Id\" = 1)", sql);
sql = update.NoneParameter().SetDto(new Dictionary<string, object> { ["clicks"] = 1, ["title"] = "xxx" }).Where(a => a.Id == 1).ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET \"Clicks\" = 1, \"Title\" = 'xxx' WHERE (\"Id\" = 1)", sql);
}
[Fact]
public void Where()
{
var sql = update.Where(a => a.Id == 1).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"Id\" = 1)", sql);
sql = update.Where("id = :id", new { id = 1 }).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (id = :id)", sql);
var item = new Topic { Id = 1, Title = "newtitle" };
sql = update.Where(item).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"Id\" = 1)", sql);
var items = new List<Topic>();
for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
sql = update.Where(items).SetRaw("title='newtitle'").ToSql().Replace("\r\n", "");
Assert.Equal("UPDATE \"tb_topic\" SET title='newtitle' WHERE (\"Id\" IN (1,2,3,4,5,6,7,8,9,10))", sql);
}
[Fact]
public void ExecuteAffrows()
{
var items = new List<Topic>();
for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
var time = DateTime.Now;
var items222 = g.sqlite.Select<Topic>().Where(a => a.CreateTime > time).Limit(10).ToList();
update.SetSource(items.First()).NoneParameter().ExecuteAffrows();
update.SetSource(items).NoneParameter().ExecuteAffrows();
}
[Fact]
public void ExecuteUpdated()
{
}
[Fact]
public void AsTable()
{
Assert.Null(g.sqlite.Update<Topic>().ToSql());
Assert.Equal("UPDATE \"tb_topicAsTable\" SET title='test' \r\nWHERE (\"Id\" = 1 OR \"Id\" = 2)", g.sqlite.Update<Topic>(new[] { 1, 2 }).SetRaw("title='test'").AsTable(a => "tb_topicAsTable").ToSql());
Assert.Equal("UPDATE \"tb_topicAsTable\" SET title='test1' \r\nWHERE (\"Id\" = 1)", g.sqlite.Update<Topic>(new Topic { Id = 1, Title = "test" }).SetRaw("title='test1'").AsTable(a => "tb_topicAsTable").ToSql());
Assert.Equal("UPDATE \"tb_topicAsTable\" SET title='test1' \r\nWHERE (\"Id\" = 1 OR \"Id\" = 2)", g.sqlite.Update<Topic>(new[] { new Topic { Id = 1, Title = "test" }, new Topic { Id = 2, Title = "test" } }).SetRaw("title='test1'").AsTable(a => "tb_topicAsTable").ToSql());
Assert.Equal("UPDATE \"tb_topicAsTable\" SET title='test1' \r\nWHERE (\"Id\" = 1)", g.sqlite.Update<Topic>(new { id = 1 }).SetRaw("title='test1'").AsTable(a => "tb_topicAsTable").ToSql());
}
}
}
| 62.962085 | 723 | 0.528039 | [
"MIT"
] | 1051324354/FreeSql | FreeSql.Tests/FreeSql.Tests/Sqlite/Curd/SqliteUpdateTest.cs | 13,285 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Explore.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
| 39.333333 | 151 | 0.580038 | [
"MIT"
] | lallousx86/WinTools | WEPExplorer/Explorer/Properties/Settings.Designer.cs | 1,064 | C# |
using CefSharp;
namespace avaness.BrowserLCD
{
public class LifespanHandler : ILifeSpanHandler
{
bool ILifeSpanHandler.OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser)
{
newBrowser = null;
return true;
}
bool ILifeSpanHandler.DoClose(IWebBrowser browserControl, IBrowser browser)
{ return false; }
void ILifeSpanHandler.OnBeforeClose(IWebBrowser browserControl, IBrowser browser) { }
void ILifeSpanHandler.OnAfterCreated(IWebBrowser browserControl, IBrowser browser) { }
}
}
| 40.142857 | 349 | 0.748517 | [
"Unlicense"
] | austinvaness/BrowserLCD | BrowserLCD/LifespanHandler.cs | 845 | C# |
namespace Logiwa.Models
{
public class CategoryRequestModel
{
public string Name { get; set; }
public CategoryRequestModel Category { get; set; }
}
}
| 20.777778 | 59 | 0.609626 | [
"MIT"
] | bhdryrdm/Logiwa | Logiwa/Models/Request/CategoryRequestModel.cs | 189 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// Pour plus d'informations sur le modèle d'élément Boîte de dialogue de contenu, consultez la page https://go.microsoft.com/fwlink/?LinkId=234238
namespace SoRaVAC.Views.Dialog
{
public sealed partial class ErrorDialog : ContentDialog
{
public ErrorDialog(string title, string content) : this()
{
Title = title;
Content = content;
}
public ErrorDialog()
{
this.InitializeComponent();
}
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
{
}
}
}
| 26.225 | 146 | 0.7102 | [
"MIT"
] | AleronWen/SoRaVAC | SoRaVAC/Views/Dialog/ErrorDialog.xaml.cs | 1,055 | C# |
using System;
using System.Security.Principal;
namespace FutureState.Security
{
public class FSIdentity : IIdentity
{
public string Name { get; }
public string AuthenticationType { get; }
public bool IsAuthenticated { get; set; }
public FSIdentity(string name, Guid userId)
{
Guard.ArgumentNotNullOrEmpty(name, nameof(name));
Name = name;
UserId = userId;
AuthenticationType = "FutureState";
}
public Guid UserId { get; }
public bool IsAnonymous => UserId == Guid.Empty;
}
} | 22.444444 | 61 | 0.59571 | [
"Apache-2.0"
] | arisanikolaou/futurestate | src/FutureState.Domain/Security/FSIdentity.cs | 608 | C# |
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Proxoft.Maps.Core;
using Proxoft.Maps.Core.Api;
using Proxoft.Maps.Core.Api.Maps;
namespace Sample.Maps.Pages
{
public sealed partial class TwoMaps : IDisposable
{
private IMap _map1;
private IMap _map2;
[Inject]
public IMapFactory MapFactory { get; set; }
ElementReference Map1Host { get; set; }
ElementReference Map2Host { get; set; }
public string Provider => this.MapFactory.Name;
private List<string> Map1Log { get; set; } = new();
private List<string> Map2Log { get; set; } = new();
protected override async Task OnAfterRenderAsync(bool firstRender)
{
await base.OnAfterRenderAsync(firstRender);
if (firstRender)
{
LatLng center = new()
{
Latitude = -34.397m,
Longitude = 150.644m
};
_map1 = await MapFactory.Initialize(new MapOptions
{
Center = center,
Zoom = 10
},
this.Map1Host);
_map1.OnCenter()
.Throttle(TimeSpan.FromMilliseconds(200))
.Subscribe(ll =>
{
this.Map1Log.Add("center changed");
this.StateHasChanged();
});
_map1.AddMarker(new MarkerOptions { Position = center, TraceJs = true });
_map2 = await MapFactory.Initialize(new MapOptions
{
Center = new LatLng
{
Latitude = 19.397m,
Longitude = 87.644m
},
Zoom = 7
},
this.Map2Host);
_map2.OnCenter()
.Throttle(TimeSpan.FromMilliseconds(200))
.Subscribe(ll =>
{
this.Map2Log.Add("center changed");
this.StateHasChanged();
});
}
}
private void PanToClick()
{
_map1.PanTo(new LatLng { Latitude = 48.15m, Longitude = 17.6m });
}
public void Dispose()
{
_map1.Dispose();
_map2.Dispose();
}
}
}
| 28.043956 | 89 | 0.469044 | [
"MIT"
] | proxoft/Maps | Source/Samples/Sample.Maps/Pages/TwoMaps.razor.cs | 2,554 | C# |
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Azure.Messaging.EventHubs;
namespace NLog.Extensions.AzureStorage
{
internal interface IEventHubService
{
string EventHubName { get; }
void Connect(string connectionString, string eventHubName, string serviceUri, string tenantIdentity, string clientIdentity, string resourceIdentity);
Task CloseAsync();
Task SendAsync(IEnumerable<EventData> eventDataBatch, string partitionKey, CancellationToken cancellationToken);
}
}
| 35.0625 | 157 | 0.771836 | [
"MIT"
] | CptButtercup/NLog.Extensions.AzureStorage | src/NLog.Extensions.AzureEventHub/IEventHubService.cs | 563 | C# |
using Microsoft.Extensions.Caching.Memory;
using Net6WebApiTemplate.Application.Common.Interfaces;
namespace Net6WebApiTemplate.Infrastructure.Cache.InMemory
{
public class CacheProvider : ICacheProvider
{
private readonly IMemoryCache _memoryCache;
public CacheProvider(IMemoryCache memoryCache)
{
_memoryCache = memoryCache;
}
public void ClearCache(string key)
{
_memoryCache.Remove(key);
}
public T GetFromCache<T>(string key) where T : class
{
_memoryCache.TryGetValue(key, out T cachedResponse);
return cachedResponse as T;
}
public void SetCache<T>(string key, T value, DateTimeOffset duration) where T : class
{
_memoryCache.Set(key, value, duration);
}
public void SetCache<T>(string key, T value, MemoryCacheEntryOptions options) where T : class
{
_memoryCache.Set(key, value, options);
}
}
} | 27.621622 | 101 | 0.629159 | [
"MIT"
] | marlonajgayle/Net6WebApiTemplate | src/Content/src/Net6WebApiTemplate.Infrastructure/Cache/InMemory/CacheProvider.cs | 1,024 | C# |
/* cplib - Coding and Parsing Library
* Copyright © 2009 Craig Oberg. All rights reserved.
*
* This work is licensed under the terms of the MIT license.
* For a copy, see <https://opensource.org/licenses/MIT>.
*/
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CJO.CpLib
{
class main
{
static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
main.Run(args);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs ue)
{
Object o = ue.ExceptionObject;
Exception e = o as Exception;
if (e != null)
{ // Report System.Exception info
Console.WriteLine("Exception = " + e.GetType());
Console.WriteLine("Message = " + e.Message);
Console.WriteLine("FullText = " + e.ToString());
}
else
{ // Report exception Object info
Console.WriteLine("Exception = " + o.GetType());
Console.WriteLine("FullText = " + o.ToString());
}
Environment.Exit(1); // Shutting down
}
public static void Run(string[] args)
{
Console.WriteLine("Parse Rules Compiler");
Console.WriteLine();
if (args.Length < 2)
{
Console.WriteLine("Usage: cprc <inputfile> <outputfile>");
return;
}
using (TextReader r = File.OpenText(args[0]))
{
RuleCompiler compiler = new RuleCompiler(r);
compiler.Compile(args[1]);
}
}
}
}
| 30.163934 | 127 | 0.55163 | [
"MIT"
] | cobergmd/cplib | cprc/main.cs | 1,843 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ABCForTravelers.EN
{
public class ReviewsEN
{
public int ID { get; set; }
public UserEN User { get; set; }
public BusinessEN Business { get; set; }
public decimal Rating { get; set; }
public string Description { get; set; }
public int Status { get; set; }
public DateTime CreatedOn { get; set; }
}
}
| 24.526316 | 48 | 0.620172 | [
"MIT"
] | irahulramachandran/abcfortravelers | Api-Admin/ABCForTravelers.EN/ReviewsEN.cs | 468 | C# |
using Extreme.Net;
using RuriLib.LS;
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Media;
namespace RuriLib
{
/// <summary>
/// A block that can execute a specific function on one or multiple inputs.
/// </summary>
public class BlockFunction : BlockBase
{
/// <summary>
/// The function name.
/// </summary>
public enum Function
{
/// <summary>Simply replaced the variables of the input.</summary>
Constant,
/// <summary>Encodes an input as a base64 string.</summary>
Base64Encode,
/// <summary>Decodes the string from a base64-encoded input.</summary>
Base64Decode,
/// <summary>Hashes an input string.</summary>
Hash,
/// <summary>Generates a HMAC for a given string.</summary>
HMAC,
/// <summary>Translates words in a given string.</summary>
Translate,
/// <summary>Converts a formatted date to a unix timestamp.</summary>
DateToUnixTime,
/// <summary>Gets the length of a string.</summary>
Length,
/// <summary>Converts all uppercase caracters in a string to lowercase.</summary>
ToLowercase,
/// <summary>Converts all lowercase characters in a string to uppercase.</summary>
ToUppercase,
/// <summary>Replaces some text with something else, with or without using regex.</summary>
Replace,
/// <summary>Gets the first match for a specific regex pattern.</summary>
RegexMatch,
/// <summary>Encodes the input to be used in a URL.</summary>
URLEncode,
/// <summary>Decodes a URL-encoded input.</summary>
URLDecode,
/// <summary>Converts a unix timestamp to a formatted date.</summary>
UnixTimeToDate,
/// <summary>Retrieves the current time as a unix timestamp.</summary>
CurrentUnixTime,
/// <summary>Converts a unix timestamp to the ISO8601 format.</summary>
UnixTimeToISO8601,
/// <summary>Generates a random integer.</summary>
RandomNum,
/// <summary>Rounds a decimal input to the upper integer.</summary>
Ceil,
/// <summary>Rounds a decimal input to the lower integer.</summary>
Floor,
/// <summary>Rounds a decimal input to the nearest integer.</summary>
Round,
/// <summary>Computes mathematical operations between decimal numbers.</summary>
Compute,
/// <summary>Counts the occurrences of a string in another string.</summary>
CountOccurrences,
/// <summary>Clears the cookie jar used for HTTP requests.</summary>
ClearCookies,
/// <summary>Encrypts a string with RSA given a Key.</summary>
RSA,
/// <summary>Waits a given amount of milliseconds.</summary>
Delay,
/// <summary>Retrieves the character at a given index in the input string.</summary>
CharAt,
/// <summary>Gets a substring of the input.</summary>
Substring,
/// <summary>Reverses the input string.</summary>
ReverseString,
/// <summary>Removes leading or trailing whitespaces from a string.</summary>
Trim,
/// <summary>Gets a valid random User-Agent header.</summary>
GetRandomUA,
/// <summary>Encrypts a string with AES.</summary>
AESEncrypt,
/// <summary>Decrypts an AES-encrypted string.</summary>
AESDecrypt
}
/// <summary>
/// The available hashing functions.
/// </summary>
public enum Hash
{
/// <summary>The MD5 hashing function (128 bits digest).</summary>
MD5,
/// <summary>The SHA-1 hashing function (160 bits digest).</summary>
SHA1,
/// <summary>The SHA-256 hashing function (256 bits digest).</summary>
SHA256,
/// <summary>The SHA-384 hashing function (384 bits digest).</summary>
SHA384,
/// <summary>The SHA-512 hashing function (512 bits digest).</summary>
SHA512,
}
#region General Properties
private string variableName = "";
/// <summary>The name of the output variable.</summary>
public string VariableName { get { return variableName; } set { variableName = value; OnPropertyChanged(); } }
private bool isCapture = false;
/// <summary>Whether the output variable should be marked for Capture.</summary>
public bool IsCapture { get { return isCapture; } set { isCapture = value; OnPropertyChanged(); } }
private string inputString = "";
/// <summary>The input string on which the function will be executed (not always needed).</summary>
public string InputString { get { return inputString; } set { inputString = value; OnPropertyChanged(); } }
private Function functionType = Function.Constant;
/// <summary>The function to execute.</summary>
public Function FunctionType { get { return functionType; } set { functionType = value; OnPropertyChanged(); } }
#endregion
#region Function Specific Properties
// -- Hash & Hmac
private Hash hashType = Hash.SHA512;
/// <summary>The hashing function to use.</summary>
public Hash HashType { get { return hashType; } set { hashType = value; OnPropertyChanged(); } }
// -- Hmac
private string hmacKey = "";
/// <summary>The key used to authenticate the message.</summary>
public string HmacKey { get { return hmacKey; } set { hmacKey = value; OnPropertyChanged(); } }
private bool hmacBase64 = false;
/// <summary>Whether to output the message as a base64-encoded string instead of a hex-encoded string.</summary>
public bool HmacBase64 { get { return hmacBase64; } set { hmacBase64 = value; OnPropertyChanged(); } }
// -- Translate
private bool stopAfterFirstMatch = true;
/// <summary>Whether to stop translating after the first match.</summary>
public bool StopAfterFirstMatch { get { return stopAfterFirstMatch; } set { stopAfterFirstMatch = value; OnPropertyChanged(); } }
/// <summary>The dictionary containing the words and their translation.</summary>
public Dictionary<string, string> TranslationDictionary { get; set; } = new Dictionary<string, string>();
// -- Date to unix
private string dateFormat = "yyyy-MM-dd:HH-mm-ss";
/// <summary>The format of the date (y = year, M = month, d = day, H = hour, m = minute, s = second).</summary>
public string DateFormat { get { return dateFormat; } set { dateFormat = value; OnPropertyChanged(); } }
// -- string replace
private string replaceWhat = "";
/// <summary>The text to replace.</summary>
public string ReplaceWhat { get { return replaceWhat; } set { replaceWhat = value; OnPropertyChanged(); } }
private string replaceWith = "";
/// <summary>The replacement text.</summary>
public string ReplaceWith { get { return replaceWith; } set { replaceWith = value; OnPropertyChanged(); } }
private bool useRegex = false;
/// <summary>Whether to use regex for replacing.</summary>
public bool UseRegex { get { return useRegex; } set { useRegex = value; OnPropertyChanged(); } }
// -- Regex Match
private string regexMatch = "";
/// <summary>The regex pattern to match.</summary>
public string RegexMatch { get { return regexMatch; } set { regexMatch = value; OnPropertyChanged(); } }
// -- Random Number
private int randomMin = 0;
/// <summary>The minimum random number that can be generated.</summary>
public int RandomMin { get { return randomMin; } set { randomMin = value; OnPropertyChanged(); } }
private int randomMax = 0;
/// <summary>The maximum random number that can be generated.</summary>
public int RandomMax { get { return randomMax; } set { randomMax = value; OnPropertyChanged(); } }
// -- CountOccurrences
private string stringToFind = "";
/// <summary>The string to count the occurrences of.</summary>
public string StringToFind { get { return stringToFind; } set { stringToFind = value; OnPropertyChanged(); } }
// -- RSA
private string rsaMod = "";
/// <summary>The modulus of the RSA key.</summary>
public string RSAMod { get { return rsaMod; } set { rsaMod = value; OnPropertyChanged(); } }
private string rsaExp = "";
/// <summary>The exponent of the RSA key.</summary>
public string RSAExp { get { return rsaExp; } set { rsaExp = value; OnPropertyChanged(); } }
// --- CharAt
private string charIndex = "0";
/// <summary>The index of the wanted character.</summary>
public string CharIndex { get { return charIndex; } set { charIndex = value; OnPropertyChanged(); } }
// -- Substring
private string substringIndex = "0";
/// <summary>The starting index for the substring.</summary>
public string SubstringIndex { get { return substringIndex; } set { substringIndex = value; OnPropertyChanged(); } }
private string substringLength = "1";
/// <summary>The length of the wanted substring.</summary>
public string SubstringLength { get { return substringLength; } set { substringLength = value; OnPropertyChanged(); } }
// -- AES
private string aesKey = "";
/// <summary>The keys used for AES encryption and decryption.</summary>
public string AesKey { get { return aesKey; } set { aesKey = value; OnPropertyChanged(); } }
#endregion
/// <summary>
/// Creates a Function block.
/// </summary>
public BlockFunction()
{
Label = "FUNCTION";
}
/// <inheritdoc />
public override BlockBase FromLS(string line)
{
// Trim the line
var input = line.Trim();
// Parse the label
if (input.StartsWith("#"))
Label = LineParser.ParseLabel(ref input);
/*
* Syntax:
* FUNCTION Name [ARGUMENTS] ["INPUT STRING"] [-> VAR/CAP "NAME"]
* */
// Parse the function
FunctionType = (Function)LineParser.ParseEnum(ref input, "Function Name", typeof(Function));
// Parse specific function parameters
switch (FunctionType)
{
case Function.Hash:
HashType = LineParser.ParseEnum(ref input, "Hash Type", typeof(Hash));
break;
case Function.HMAC:
HashType = LineParser.ParseEnum(ref input, "Hash Type", typeof(Hash));
HmacKey = LineParser.ParseLiteral(ref input, "HMAC Key");
while (LineParser.Lookahead(ref input) == TokenType.Boolean)
LineParser.SetBool(ref input, this);
break;
case Function.Translate:
if (LineParser.Lookahead(ref input) == TokenType.Boolean)
LineParser.SetBool(ref input, this);
TranslationDictionary = new Dictionary<string, string>();
while (input != "" && LineParser.Lookahead(ref input) == TokenType.Parameter)
{
LineParser.EnsureIdentifier(ref input, "KEY");
var k = LineParser.ParseLiteral(ref input, "Key");
LineParser.EnsureIdentifier(ref input, "VALUE");
var v = LineParser.ParseLiteral(ref input, "Value");
TranslationDictionary[k] = v;
}
break;
case Function.DateToUnixTime:
DateFormat = LineParser.ParseLiteral(ref input, "DATE FORMAT");
break;
case Function.Replace:
ReplaceWhat = LineParser.ParseLiteral(ref input, "What");
ReplaceWith = LineParser.ParseLiteral(ref input, "With");
if (LineParser.Lookahead(ref input) == TokenType.Boolean)
LineParser.SetBool(ref input, this);
break;
case Function.RegexMatch:
RegexMatch = LineParser.ParseLiteral(ref input, "Pattern");
break;
case Function.RandomNum:
RandomMin = LineParser.ParseInt(ref input, "Minimum");
RandomMax = LineParser.ParseInt(ref input, "Maximum");
break;
case Function.CountOccurrences:
StringToFind = LineParser.ParseLiteral(ref input, "string to find");
break;
case Function.CharAt:
CharIndex = LineParser.ParseLiteral(ref input, "Index");
break;
case Function.Substring:
SubstringIndex = LineParser.ParseLiteral(ref input, "Index");
SubstringLength = LineParser.ParseLiteral(ref input, "Length");
break;
case Function.RSA:
RSAMod = LineParser.ParseLiteral(ref input, "Modulus");
RSAExp = LineParser.ParseLiteral(ref input, "Exponent");
break;
default:
break;
}
// Try to parse the input string
if (LineParser.Lookahead(ref input) == TokenType.Literal)
InputString = LineParser.ParseLiteral(ref input, "INPUT");
// Try to parse the arrow, otherwise just return the block as is with default var name and var / cap choice
if (LineParser.ParseToken(ref input, TokenType.Arrow, false) == "")
return this;
// Parse the VAR / CAP
try
{
var varType = LineParser.ParseToken(ref input, TokenType.Parameter, true);
if (varType.ToUpper() == "VAR" || varType.ToUpper() == "CAP")
IsCapture = varType.ToUpper() == "CAP";
}
catch { throw new ArgumentException("Invalid or missing variable type"); }
// Parse the variable/capture name
try { VariableName = LineParser.ParseToken(ref input, TokenType.Literal, true); }
catch { throw new ArgumentException("Variable name not specified"); }
return this;
}
/// <inheritdoc />
public override string ToLS(bool indent = true)
{
var writer = new BlockWriter(GetType(), indent, Disabled);
writer
.Label(Label)
.Token("FUNCTION")
.Token(FunctionType);
switch (FunctionType)
{
case Function.Hash:
writer
.Token(HashType);
break;
case Function.HMAC:
writer
.Token(HashType)
.Literal(HmacKey)
.Boolean(HmacBase64, "HmacBase64");
break;
case Function.Translate:
writer
.Boolean(StopAfterFirstMatch, "StopAfterFirstMatch");
foreach (var t in TranslationDictionary)
writer
.Indent()
.Token("KEY")
.Literal(t.Key)
.Token("VALUE")
.Literal(t.Value);
writer
.Indent();
break;
case Function.DateToUnixTime:
writer
.Literal(DateFormat, "DateFormat");
break;
case Function.Replace:
writer
.Literal(ReplaceWhat)
.Literal(ReplaceWith)
.Boolean(UseRegex, "UseRegex");
break;
case Function.RegexMatch:
writer
.Literal(RegexMatch, "RegexMatch");
break;
case Function.RandomNum:
writer
.Integer(RandomMin)
.Integer(RandomMax);
break;
case Function.CountOccurrences:
writer
.Literal(StringToFind);
break;
case Function.CharAt:
writer
.Literal(CharIndex);
break;
case Function.Substring:
writer
.Literal(SubstringIndex)
.Literal(SubstringLength);
break;
case Function.RSA:
writer
.Literal(RSAMod)
.Literal(RSAExp);
break;
}
writer
.Literal(InputString, "InputString");
if (!writer.CheckDefault(VariableName, "VariableName"))
writer
.Arrow()
.Token(IsCapture ? "CAP" : "VAR")
.Literal(VariableName);
return writer.ToString();
}
/// <inheritdoc />
public override void Process(BotData data)
{
base.Process(data);
var style = NumberStyles.Number | NumberStyles.AllowCurrencySymbol;
var provider = new CultureInfo("en-US");
var localInputStrings = ReplaceValuesRecursive(inputString, data);
var outputs = new List<string>();
for(int i = 0; i < localInputStrings.Count; i++)
{
var localInputString = localInputStrings[i];
var outputString = "";
switch (FunctionType)
{
case Function.Constant:
outputString = localInputString;
break;
case Function.Base64Encode:
outputString = Base64Encode(localInputString);
break;
case Function.Base64Decode:
outputString = Base64Decode(localInputString);
break;
case Function.Hash:
outputString = GetHash(localInputString, hashType).ToLower();
break;
case Function.HMAC:
outputString = Hmac(localInputString, hashType, ReplaceValues(hmacKey, data), hmacBase64);
break;
case Function.Translate:
outputString = localInputString;
foreach (var entry in TranslationDictionary.OrderBy(e => e.Key.Length).Reverse())
{
if (outputString.Contains(entry.Key))
{
outputString = outputString.Replace(entry.Key, entry.Value);
if (StopAfterFirstMatch) break;
}
}
break;
case Function.DateToUnixTime:
outputString = (DateTime.ParseExact(localInputString, dateFormat, new CultureInfo("en-US"), DateTimeStyles.AllowWhiteSpaces)
.Subtract(new DateTime(1970, 1, 1)))
.TotalSeconds
.ToString();
break;
case Function.Length:
outputString = localInputString.Length.ToString();
break;
case Function.ToLowercase:
outputString = localInputString.ToLower();
break;
case Function.ToUppercase:
outputString = localInputString.ToUpper();
break;
case Function.Replace:
if (useRegex)
outputString = Regex.Replace(localInputString, ReplaceValues(replaceWhat, data), ReplaceValues(replaceWith, data));
else
outputString = localInputString.Replace(ReplaceValues(replaceWhat, data), ReplaceValues(replaceWith, data));
break;
case Function.RegexMatch:
outputString = Regex.Match(localInputString, ReplaceValues(regexMatch, data)).Value;
break;
case Function.URLEncode:
outputString = System.Uri.EscapeDataString(localInputString);
break;
case Function.URLDecode:
outputString = System.Uri.UnescapeDataString(localInputString);
break;
case Function.UnixTimeToDate:
try
{
var loc = localInputString;
if (localInputString.Length > 10) loc = localInputString.Substring(0, 10);
DateTime dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
dtDateTime = dtDateTime.AddSeconds(int.Parse(loc)).ToLocalTime();
outputString = dtDateTime.ToShortDateString();
}
catch { }
break;
case Function.CurrentUnixTime:
outputString = Math.Round((DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds).ToString();
break;
case Function.UnixTimeToISO8601:
var loc2 = localInputString;
if (localInputString.Length > 10) loc2 = localInputString.Substring(0, 10);
DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
dateTime = dateTime.AddSeconds(int.Parse(loc2)).ToLocalTime();
outputString = dateTime.ToString("yyyy-MM-ddTHH\\:mm\\:ss.fffZ");
break;
case Function.RandomNum:
outputString = (data.rand.Next(randomMin, randomMax)).ToString();
break;
case Function.Ceil:
outputString = Math.Ceiling(Decimal.Parse(localInputString, style, provider)).ToString();
break;
case Function.Floor:
outputString = Math.Floor(Decimal.Parse(localInputString, style, provider)).ToString();
break;
case Function.Round:
outputString = Math.Round(Decimal.Parse(localInputString, style, provider), 0, MidpointRounding.AwayFromZero).ToString();
break;
case Function.Compute:
outputString = new DataTable().Compute(localInputString.Replace(',', '.'), null).ToString();
break;
case Function.CountOccurrences:
outputString = CountStringOccurrences(localInputString, stringToFind).ToString();
break;
case Function.ClearCookies:
data.Cookies.Clear();
break;
case Function.RSA:
try
{
while (outputString.Length < 2 || outputString.Substring(outputString.Length - 2) != "==")
{
outputString = SteamRSAEncrypt(new RsaParameters { Exponent = ReplaceValues(RSAExp, data), Modulus = ReplaceValues(RSAMod, data), Password = localInputString });
}
}
catch (Exception ex) { outputString = ex.ToString(); }
break;
case Function.Delay:
try { Thread.Sleep(int.Parse(localInputString)); } catch { }
break;
case Function.CharAt:
outputString = localInputString.ToCharArray()[int.Parse(ReplaceValues(charIndex, data))].ToString();
break;
case Function.Substring:
outputString = localInputString.Substring(int.Parse(ReplaceValues(substringIndex, data)), int.Parse(ReplaceValues(substringLength,data)));
break;
case Function.ReverseString:
char[] charArray = localInputString.ToCharArray();
Array.Reverse(charArray);
outputString = new string(charArray);
break;
case Function.Trim:
outputString = localInputString.Trim();
break;
case Function.GetRandomUA:
outputString = RandomUserAgent(data.rand);
break;
case Function.AESEncrypt:
outputString = AESEncrypt(ReplaceValues(aesKey, data), localInputString);
break;
case Function.AESDecrypt:
outputString = AESDecrypt(ReplaceValues(aesKey, data), localInputString);
break;
}
data.Log(new LogEntry(string.Format("Executed function {0} on input {1} with outcome {2}", functionType, localInputString, outputString), Colors.GreenYellow));
// Add to the outputs
outputs.Add(outputString);
}
var isList = outputs.Count > 1 || InputString.Contains("[*]") || InputString.Contains("(*)") || InputString.Contains("{*}");
InsertVariables(data, isCapture, isList, outputs, variableName, "", "");
}
#region Base64
/// <summary>
/// Encodes a string to base64.
/// </summary>
/// <param name="plainText">The string to encode</param>
/// <returns>The base64-encoded string</returns>
public static string Base64Encode(string plainText)
{
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return System.Convert.ToBase64String(plainTextBytes);
}
/// <summary>
/// Decodes a base64-encoded string.
/// </summary>
/// <param name="base64EncodedData">The base64-encoded string</param>
/// <returns>The decoded string</returns>
public static string Base64Decode(string base64EncodedData)
{
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}
#endregion
#region Hash and Hmac
/// <summary>
/// Hashes a string using the specified hashing function.
/// </summary>
/// <param name="baseString">The string to hash</param>
/// <param name="type">The hashing function</param>
/// <returns>The hash digest as a hex-encoded string</returns>
public static string GetHash(string baseString, Hash type)
{
switch (type)
{
case Hash.MD5:
return MD5(baseString);
case Hash.SHA1:
return SHA1(baseString);
case Hash.SHA256:
return SHA256(baseString);
case Hash.SHA384:
return SHA384(baseString);
case Hash.SHA512:
return SHA512(baseString);
default:
return "UNRECOGNIZED HASH TYPE";
}
}
/// <summary>
/// Gets the HMAC signature of a message given a key and a hashing function.
/// </summary>
/// <param name="baseString">The message to sign</param>
/// <param name="type">The hashing function</param>
/// <param name="key">The HMAC key</param>
/// <param name="base64">Whether the output should be encrypted as a base64 string</param>
/// <returns>The HMAC signature</returns>
public static string Hmac(string baseString, Hash type, string key, bool base64)
{
switch (type)
{
case Hash.MD5:
return HMACMD5(baseString, key, base64);
case Hash.SHA1:
return HMACSHA1(baseString, key, base64);
case Hash.SHA256:
return HMACSHA256(baseString, key, base64);
case Hash.SHA384:
return HMACSHA384(baseString, key, base64);
case Hash.SHA512:
return HMACSHA512(baseString, key, base64);
default:
return "UNRECOGNIZED HASH TYPE";
}
}
private static string MD5(string input)
{
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
byte[] hash = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
foreach (byte b in hash)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
private static string HMACMD5(string input, string key, bool base64)
{
HMACMD5 hmac = new HMACMD5(System.Text.Encoding.ASCII.GetBytes(key));
var hash = hmac.ComputeHash(System.Text.Encoding.ASCII.GetBytes(input));
if (base64) { return Convert.ToBase64String(hash); }
else { return ToHex(hash); }
}
private static string SHA1(string input)
{
using (SHA1Managed sha1 = new SHA1Managed())
{
var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(input));
var sb = new StringBuilder(hash.Length * 2);
foreach (byte b in hash)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
}
private static string HMACSHA1(string input, string key, bool base64)
{
HMACSHA1 hmac = new HMACSHA1(System.Text.Encoding.ASCII.GetBytes(key));
var hash = hmac.ComputeHash(System.Text.Encoding.ASCII.GetBytes(input));
if (base64) { return Convert.ToBase64String(hash); }
else { return ToHex(hash); }
}
private static string SHA256(string input)
{
using (SHA256Managed sha256 = new SHA256Managed())
{
var hash = sha256.ComputeHash(Encoding.UTF8.GetBytes(input));
var sb = new StringBuilder(hash.Length * 2);
foreach (byte b in hash)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
}
private static string HMACSHA256(string input, string key, bool base64)
{
HMACSHA256 hmac = new HMACSHA256(System.Text.Encoding.ASCII.GetBytes(key));
var hash = hmac.ComputeHash(System.Text.Encoding.ASCII.GetBytes(input));
if (base64) { return Convert.ToBase64String(hash); }
else { return ToHex(hash); }
}
private static string SHA384(string input)
{
using (SHA384Managed sha384 = new SHA384Managed())
{
var hash = sha384.ComputeHash(Encoding.UTF8.GetBytes(input));
var sb = new StringBuilder(hash.Length * 2);
foreach (byte b in hash)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
}
private static string HMACSHA384(string input, string key, bool base64)
{
HMACSHA384 hmac = new HMACSHA384(System.Text.Encoding.ASCII.GetBytes(key));
var hash = hmac.ComputeHash(System.Text.Encoding.ASCII.GetBytes(input));
if (base64) { return Convert.ToBase64String(hash); }
else { return ToHex(hash); }
}
private static string SHA512(string input)
{
using (SHA512Managed sha512 = new SHA512Managed())
{
var hash = sha512.ComputeHash(Encoding.UTF8.GetBytes(input));
var sb = new StringBuilder(hash.Length * 2);
foreach (byte b in hash)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
}
private static string HMACSHA512(string input, string key, bool base64)
{
HMACSHA512 hmac = new HMACSHA512(System.Text.Encoding.ASCII.GetBytes(key));
var hash = hmac.ComputeHash(System.Text.Encoding.ASCII.GetBytes(input));
if (base64) { return Convert.ToBase64String(hash); }
else { return ToHex(hash); }
}
private static string ToHex(byte[] bytes)
{
var sb = new StringBuilder(bytes.Length * 2);
foreach (byte b in bytes)
sb.Append(b.ToString("X2"));
return sb.ToString();
}
#endregion
#region RSA
private string RSAEncrypt(string input, int size)
{
var data = Encoding.UTF8.GetBytes(input);
using (var rsa = new RSACryptoServiceProvider(size))
{
try
{
rsa.FromXmlString(input);
var encryptedData = rsa.Encrypt(data, true);
Console.WriteLine(Convert.ToString(encryptedData));
return Convert.ToString(encryptedData);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
return "";
}
finally
{
rsa.PersistKeyInCsp = false;
}
}
}
private string RSADecrypt(string input, int size)
{
var data = Encoding.UTF8.GetBytes(input);
using (var rsa = new RSACryptoServiceProvider(size))
{
try
{
rsa.FromXmlString(input);
var resultBytes = System.Text.Encoding.ASCII.GetBytes(input);
var decryptedBytes = rsa.Decrypt(resultBytes, true);
return Encoding.UTF8.GetString(decryptedBytes);
}
finally
{
rsa.PersistKeyInCsp = false;
}
}
}
private string SteamRSAEncrypt(RsaParameters rsaParam)
{
// Convert the public keys to BigIntegers
var modulus = CreateBigInteger(rsaParam.Modulus);
var exponent = CreateBigInteger(rsaParam.Exponent);
// (modulus.ToByteArray().Length - 1) * 8
//modulus has 256 bytes multiplied by 8 bits equals 2048
var encryptedNumber = Pkcs1Pad2(rsaParam.Password, (2048 + 7) >> 3);
// And now, the RSA encryption
encryptedNumber = System.Numerics.BigInteger.ModPow(encryptedNumber, exponent, modulus);
//Reverse number and convert to base64
var encryptedString = Convert.ToBase64String(encryptedNumber.ToByteArray().Reverse().ToArray());
return encryptedString;
}
private static System.Numerics.BigInteger CreateBigInteger(string hex)
{
return System.Numerics.BigInteger.Parse("00" + hex, NumberStyles.AllowHexSpecifier);
}
private static System.Numerics.BigInteger Pkcs1Pad2(string data, int keySize)
{
if (keySize < data.Length + 11)
return new System.Numerics.BigInteger();
var buffer = new byte[256];
var i = data.Length - 1;
while (i >= 0 && keySize > 0)
{
buffer[--keySize] = (byte)data[i--];
}
// Padding, I think
var random = new Random();
buffer[--keySize] = 0;
while (keySize > 2)
{
buffer[--keySize] = (byte)random.Next(1, 256);
//buffer[--keySize] = 5;
}
buffer[--keySize] = 2;
buffer[--keySize] = 0;
Array.Reverse(buffer);
return new System.Numerics.BigInteger(buffer);
}
#endregion
#region Translation
/// <summary>
/// Builds a string containing translation keys.
/// </summary>
/// <returns>One translation key per line, with name and value separated by a colon</returns>
public string GetDictionary()
{
StringBuilder sb = new StringBuilder();
foreach (var pair in TranslationDictionary)
{
sb.Append($"{pair.Key}: {pair.Value}");
if (!pair.Equals(TranslationDictionary.Last())) sb.Append(Environment.NewLine);
}
return sb.ToString();
}
/// <summary>
/// Sets translation keys from an array of lines.
/// </summary>
/// <param name="lines">The lines containing the colon-separated name and value of the translation keys</param>
public void SetDictionary(string[] lines)
{
TranslationDictionary.Clear();
foreach (var line in lines)
{
if (line.Contains(':'))
{
var split = line.Split(new[] { ':' }, 2);
var key = split[0];
var val = split[1].TrimStart();
TranslationDictionary[key] = val;
}
}
}
#endregion
#region Count Occurrences
/// <summary>
/// Counts how many times a string occurs inside another string.
/// </summary>
/// <param name="input">The long string</param>
/// <param name="text">The text to search</param>
/// <returns>How many times the text appears in the long string</returns>
public static int CountStringOccurrences(string input, string text)
{
// Loop through all instances of the string 'text'.
int count = 0;
int i = 0;
while ((i = input.IndexOf(text, i)) != -1)
{
i += text.Length;
count++;
}
return count;
}
#endregion
#region AES
/// <summary>
/// Encrypts a string with AES.
/// </summary>
/// <param name="key">The encryption key</param>
/// <param name="data">The data to encrypt</param>
/// <returns>The AES-encrypted string</returns>
public static string AESEncrypt(string key, string data)
{
string encData = null;
byte[][] keys = GetHashKeys(key);
try
{
encData = EncryptStringToBytes_Aes(data, keys[0], keys[1]);
}
catch (CryptographicException) { }
catch (ArgumentNullException) { }
return encData;
}
/// <summary>
/// Decrypts an AES-encrypted string.
/// </summary>
/// <param name="key">The decryption key</param>
/// <param name="data">The AES-encrypted data</param>
/// <returns>The plaintext string</returns>
public static string AESDecrypt(string key, string data)
{
string decData = null;
byte[][] keys = GetHashKeys(key);
try
{
decData = DecryptStringFromBytes_Aes(data, keys[0], keys[1]);
}
catch (CryptographicException) { }
catch (ArgumentNullException) { }
return decData;
}
private static byte[][] GetHashKeys(string key)
{
byte[][] result = new byte[2][];
Encoding enc = Encoding.UTF8;
SHA256 sha2 = new SHA256CryptoServiceProvider();
byte[] rawKey = enc.GetBytes(key);
byte[] rawIV = enc.GetBytes(key);
byte[] hashKey = sha2.ComputeHash(rawKey);
byte[] hashIV = sha2.ComputeHash(rawIV);
Array.Resize(ref hashIV, 16);
result[0] = hashKey;
result[1] = hashIV;
return result;
}
private static string EncryptStringToBytes_Aes(string plainText, byte[] Key, byte[] IV)
{
if (plainText == null || plainText.Length <= 0)
throw new ArgumentNullException("plainText");
if (Key == null || Key.Length <= 0)
throw new ArgumentNullException("Key");
if (IV == null || IV.Length <= 0)
throw new ArgumentNullException("IV");
byte[] encrypted;
using (AesManaged aesAlg = new AesManaged())
{
aesAlg.Key = Key;
aesAlg.IV = IV;
ICryptoTransform encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV);
using (MemoryStream msEncrypt = new MemoryStream())
{
using (CryptoStream csEncrypt =
new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
{
using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))
{
swEncrypt.Write(plainText);
}
encrypted = msEncrypt.ToArray();
}
}
}
return Convert.ToBase64String(encrypted);
}
private static string DecryptStringFromBytes_Aes(string cipherTextString, byte[] Key, byte[] IV)
{
byte[] cipherText = Convert.FromBase64String(cipherTextString);
if (cipherText == null || cipherText.Length <= 0)
throw new ArgumentNullException("cipherText");
if (Key == null || Key.Length <= 0)
throw new ArgumentNullException("Key");
if (IV == null || IV.Length <= 0)
throw new ArgumentNullException("IV");
string plaintext = null;
using (Aes aesAlg = Aes.Create())
{
aesAlg.Key = Key;
aesAlg.IV = IV;
ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);
using (MemoryStream msDecrypt = new MemoryStream(cipherText))
{
using (CryptoStream csDecrypt =
new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
{
using (StreamReader srDecrypt = new StreamReader(csDecrypt))
{
plaintext = srDecrypt.ReadToEnd();
}
}
}
}
return plaintext;
}
#endregion
#region RandomUA
// All credits for this method goes to the Leaf.xNet fork of Extreme.NET
// https://github.com/csharp-leaf/Leaf.xNet
/// <summary>
/// Gets a random User-Agent header.
/// </summary>
/// <param name="rand">A random number generator</param>
/// <returns>A randomly generated User-Agent header</returns>
public static string RandomUserAgent(Random rand)
{
int random = rand.Next(99) + 1;
// Chrome = 70%
if (random >= 1 && random <= 70)
return Http.ChromeUserAgent();
// Firefox = 15%
if (random > 70 && random <= 85)
return Http.FirefoxUserAgent();
// IE = 6%
if (random > 85 && random <= 91)
return Http.IEUserAgent();
// Opera 12 = 5%
if (random > 91 && random <= 96)
return Http.OperaUserAgent();
// Opera mini = 4%
return Http.OperaMiniUserAgent();
}
#endregion
}
/// <summary>
/// The RSA parameters.
/// </summary>
struct RsaParameters
{
/// <summary>The key exponent.</summary>
public string Exponent;
/// <summary>The key modulus.</summary>
public string Modulus;
/// <summary>The encryption password.</summary>
public string Password;
}
}
| 38.121488 | 193 | 0.5182 | [
"MIT"
] | IceyTroll/openbullet | RuriLib/Blocks/BlockFunction.cs | 46,129 | C# |
using Grpc.Core;
using ProtoBuf.Grpc.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Threading;
namespace ProtoBuf.Grpc.Internal
{
internal static class ProxyEmitter
{
private static readonly string ProxyIdentity = typeof(ProxyEmitter).Namespace + ".Proxies";
private static readonly ModuleBuilder s_module = AssemblyBuilder.DefineDynamicAssembly(
new AssemblyName(ProxyIdentity), AssemblyBuilderAccess.Run).DefineDynamicModule(ProxyIdentity);
private static void Ldc_I4(ILGenerator il, int value)
{
switch (value)
{
case -1: il.Emit(OpCodes.Ldc_I4_M1); break;
case 0: il.Emit(OpCodes.Ldc_I4_0); break;
case 1: il.Emit(OpCodes.Ldc_I4_1); break;
case 2: il.Emit(OpCodes.Ldc_I4_2); break;
case 3: il.Emit(OpCodes.Ldc_I4_3); break;
case 4: il.Emit(OpCodes.Ldc_I4_4); break;
case 5: il.Emit(OpCodes.Ldc_I4_5); break;
case 6: il.Emit(OpCodes.Ldc_I4_6); break;
case 7: il.Emit(OpCodes.Ldc_I4_7); break;
case 8: il.Emit(OpCodes.Ldc_I4_8); break;
case int i when (i >= -128 & i < 127): il.Emit(OpCodes.Ldc_I4_S, (sbyte)i); break;
default: il.Emit(OpCodes.Ldc_I4, value); break;
}
}
//private static void LoadDefault<T>(ILGenerator il) where T : struct
//{
// var local = il.DeclareLocal(typeof(T));
// Ldloca(il, local);
// il.Emit(OpCodes.Initobj, typeof(T));
// Ldloc(il, local);
//}
//private static void Ldloc(ILGenerator il, LocalBuilder local)
//{
// switch (local.LocalIndex)
// {
// case 0: il.Emit(OpCodes.Ldloc_0); break;
// case 1: il.Emit(OpCodes.Ldloc_1); break;
// case 2: il.Emit(OpCodes.Ldloc_2); break;
// case 3: il.Emit(OpCodes.Ldloc_3); break;
// case int i when (i >= 0 & i <= 255): il.Emit(OpCodes.Ldloc_S, (byte)i); break;
// default: il.Emit(OpCodes.Ldloc, local); break;
// }
//}
private static void Ldloca(ILGenerator il, LocalBuilder local)
{
switch (local.LocalIndex)
{
case int i when (i >= 0 & i <= 255): il.Emit(OpCodes.Ldloca_S, (byte)i); break;
default: il.Emit(OpCodes.Ldloca, local); break;
}
}
private static void Stloc(ILGenerator il, LocalBuilder local)
{
switch (local.LocalIndex)
{
case 0: il.Emit(OpCodes.Stloc_0); break;
case 1: il.Emit(OpCodes.Stloc_1); break;
case 2: il.Emit(OpCodes.Stloc_2); break;
case 3: il.Emit(OpCodes.Stloc_3); break;
case int i when (i >= 4 & i <= 255): il.Emit(OpCodes.Stloc_S, (byte)i); break;
default: il.Emit(OpCodes.Stloc, local); break;
}
}
private static void Ldarga(ILGenerator il, ushort index)
{
if (index <= 255)
{
il.Emit(OpCodes.Ldarga_S, (byte)index);
}
else
{
il.Emit(OpCodes.Ldarga, index);
}
}
private static void Ldarg(ILGenerator il, ushort index)
{
switch (index)
{
case 0: il.Emit(OpCodes.Ldarg_0); break;
case 1: il.Emit(OpCodes.Ldarg_1); break;
case 2: il.Emit(OpCodes.Ldarg_2); break;
case 3: il.Emit(OpCodes.Ldarg_3); break;
case ushort x when x <= 255: il.Emit(OpCodes.Ldarg_S, (byte)x); break;
default: il.Emit(OpCodes.Ldarg, index); break;
}
}
static int _typeIndex;
private static readonly MethodInfo s_marshallerCacheGenericMethodDef
= typeof(MarshallerCache).GetMethod(nameof(MarshallerCache.GetMarshaller), BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)!;
internal static Func<CallInvoker, TService> CreateFactory<TService>(BinderConfiguration binderConfig)
where TService : class
{
// front-load reflection discovery
if (!typeof(TService).IsInterface)
throw new InvalidOperationException("Type is not an interface: " + typeof(TService).FullName);
if (binderConfig == BinderConfiguration.Default) // only use ProxyAttribute for default binder
{
var proxy = (typeof(TService).GetCustomAttribute(typeof(ProxyAttribute)) as ProxyAttribute)?.Type;
if (proxy is object) return CreateViaActivator<TService>(proxy);
}
return EmitFactory<TService>(binderConfig);
}
[MethodImpl(MethodImplOptions.NoInlining)]
internal static Func<CallInvoker, TService> CreateViaActivator<TService>(Type type)
{
return channel => (TService)Activator.CreateInstance(
type,
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
null,
new object[] { channel },
null);
}
[MethodImpl(MethodImplOptions.NoInlining)]
internal static Func<CallInvoker, TService> EmitFactory<TService>(BinderConfiguration binderConfig)
{
Type baseType = typeof(ClientBase);
var callInvoker = baseType.GetProperty("CallInvoker", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)?.GetGetMethod(true);
if (callInvoker == null || callInvoker.ReturnType != typeof(CallInvoker) || callInvoker.GetParameters().Length != 0)
throw new ArgumentException($"The base-type {baseType} for service-proxy {typeof(TService)} lacks a suitable CallInvoker API");
lock (s_module)
{
// private sealed class IFooProxy...
var type = s_module.DefineType(ProxyIdentity + "." + baseType.Name + "." + typeof(TService).Name + "_Proxy_" + _typeIndex++,
TypeAttributes.Class | TypeAttributes.Sealed | TypeAttributes.NotPublic | TypeAttributes.BeforeFieldInit);
type.SetParent(baseType);
// public IFooProxy(CallInvoker callInvoker) : base(callInvoker) { }
var ctorCallInvoker = WritePassThruCtor<CallInvoker>(MethodAttributes.Public);
// override ToString
{
var baseToString = typeof(object).GetMethod(nameof(object.ToString))!;
var toString = type.DefineMethod(nameof(ToString), baseToString.Attributes, baseToString.CallingConvention,
typeof(string), Type.EmptyTypes);
var il = toString.GetILGenerator();
if (!binderConfig.Binder.IsServiceContract(typeof(TService), out var primaryServiceName)) primaryServiceName = typeof(TService).Name;
il.Emit(OpCodes.Ldstr, primaryServiceName + " / " + typeof(CallInvoker).Name);
il.Emit(OpCodes.Ret);
type.DefineMethodOverride(toString, baseToString);
}
const string InitMethodName = "Init";
var cctor = type.DefineMethod(InitMethodName, MethodAttributes.Static | MethodAttributes.Public).GetILGenerator();
var ops = ContractOperation.FindOperations(binderConfig, typeof(TService), null);
int marshallerIndex = 0;
Dictionary<Type, (FieldBuilder Field, string Name, object Instance)> marshallers = new Dictionary<Type, (FieldBuilder, string, object)>();
FieldBuilder Marshaller(Type forType)
{
if (marshallers.TryGetValue(forType, out var val)) return val.Field;
var instance = s_marshallerCacheGenericMethodDef.MakeGenericMethod(forType).Invoke(binderConfig.MarshallerCache, Array.Empty<object>())!;
var name = "_m" + marshallerIndex++;
var field = type.DefineField(name, typeof(Marshaller<>).MakeGenericType(forType), FieldAttributes.Static | FieldAttributes.Private); // **not** readonly, we need to set it afterwards!
marshallers.Add(forType, (field, name, instance));
return field;
}
int fieldIndex = 0;
foreach (var iType in ContractOperation.ExpandInterfaces(typeof(TService)))
{
bool isService = binderConfig.Binder.IsServiceContract(iType, out var serviceName);
// : TService
type.AddInterfaceImplementation(iType);
// add each method of the interface
foreach (var iMethod in iType.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic))
{
var pTypes = Array.ConvertAll(iMethod.GetParameters(), x => x.ParameterType);
var impl = type.DefineMethod(iType.Name + "." + iMethod.Name,
MethodAttributes.HideBySig | MethodAttributes.Final | MethodAttributes.NewSlot | MethodAttributes.Private | MethodAttributes.Virtual,
iMethod.CallingConvention, iMethod.ReturnType, pTypes);
// mark it as the interface implementation
type.DefineMethodOverride(impl, iMethod);
var il = impl.GetILGenerator();
if (!(isService && ContractOperation.TryIdentifySignature(iMethod, binderConfig, out var op, null)))
{
il.ThrowException(typeof(NotSupportedException));
continue;
}
Type[] fromTo = new Type[] { op.From, op.To };
// private static Method<from, to> s_{i}
var field = type.DefineField("s_op_" + fieldIndex++, typeof(Method<,>).MakeGenericType(fromTo),
FieldAttributes.Static | FieldAttributes.Private);
// = new Method<from, to>(methodType, serviceName, opName, requestMarshaller, responseMarshaller);
Ldc_I4(cctor, (int)op.MethodType); // methodType
cctor.Emit(OpCodes.Ldstr, serviceName); // serviceName
cctor.Emit(OpCodes.Ldstr, op.Name); // opName
cctor.Emit(OpCodes.Ldsfld, Marshaller(op.From)); // requestMarshaller
cctor.Emit(OpCodes.Ldsfld, Marshaller(op.To)); // responseMarshaller
cctor.Emit(OpCodes.Newobj, typeof(Method<,>).MakeGenericType(fromTo)
.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Single()); // new Method
cctor.Emit(OpCodes.Stsfld, field);
// implement the method
switch (op.Context)
{
case ContextKind.CallOptions:
// we only support this for signatures that match the exat google pattern, but:
// defer for now
il.ThrowException(typeof(NotImplementedException));
break;
case ContextKind.NoContext:
case ContextKind.CallContext:
case ContextKind.CancellationToken:
// typically looks something like (where this is an extension method on Reshape):
// => context.{ReshapeMethod}(CallInvoker, {method}, request, [host: null]);
var method = op.TryGetClientHelper();
if (method == null)
{
// unexpected, but...
il.ThrowException(typeof(NotSupportedException));
}
else
{
switch (op.Context)
{
case ContextKind.CallContext:
Ldarga(il, op.VoidRequest ? (ushort)1 : (ushort)2);
break;
case ContextKind.CancellationToken:
var callContext = il.DeclareLocal(typeof(CallContext));
Ldarg(il, op.VoidRequest ? (ushort)1 : (ushort)2);
il.EmitCall(OpCodes.Call, s_CallContext_FromCancellationToken, null);
Stloc(il, callContext);
Ldloca(il, callContext);
break;
case ContextKind.NoContext:
il.Emit(OpCodes.Ldsflda, s_CallContext_Default);
break;
default:
// shouldn't get here - we checked above! this is in case of code maintenance errors
throw new NotImplementedException($"Unhandled context kind: {op.Context}");
}
il.Emit(OpCodes.Ldarg_0); // this.
il.EmitCall(OpCodes.Callvirt, callInvoker, null); // get_CallInvoker
il.Emit(OpCodes.Ldsfld, field); // {method}
if (op.VoidRequest)
{
il.Emit(OpCodes.Ldsfld, s_Empty_Instance); // Empty.Instance
}
else
{
il.Emit(OpCodes.Ldarg_1); // request
}
il.Emit(OpCodes.Ldnull); // host (always null)
il.EmitCall(OpCodes.Call, method, null);
il.Emit(OpCodes.Ret); // return
}
break;
case ContextKind.ServerCallContext: // server call? we're writing a client!
default: // who knows!
il.ThrowException(typeof(NotSupportedException));
break;
}
}
}
cctor.Emit(OpCodes.Ret); // end the type initializer (after creating all the field types)
#if NETSTANDARD2_0
var finalType = type.CreateTypeInfo()!;
#else
var finalType = type.CreateType()!;
#endif
// assign the marshallers and invoke the init
foreach((var field, var name, var instance) in marshallers.Values)
{
finalType.GetField(name, BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Public)!.SetValue(null, instance);
}
finalType.GetMethod(InitMethodName, BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Public)!.Invoke(null, Array.Empty<object>());
// return the factory
var p = Expression.Parameter(typeof(CallInvoker), "channel");
return Expression.Lambda<Func<CallInvoker, TService>>(
Expression.New(finalType.GetConstructor(new[] { typeof(CallInvoker) }), p), p).Compile();
ConstructorBuilder? WritePassThruCtor<T>(MethodAttributes accessibility)
{
var signature = new[] { typeof(T) };
var baseCtor = baseType.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, signature, null);
if (baseCtor == null) return null;
var ctor = type.DefineConstructor(accessibility, CallingConventions.HasThis, signature);
var il = ctor.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldarg_1);
il.Emit(OpCodes.Call, baseCtor);
il.Emit(OpCodes.Ret);
return ctor;
}
}
}
internal static readonly FieldInfo
s_CallContext_Default = typeof(CallContext).GetField(nameof(CallContext.Default))!,
#pragma warning disable CS0618 // Empty
s_Empty_Instance = typeof(Empty).GetField(nameof(Empty.Instance))!,
s_Empty_InstaneTask= typeof(Empty).GetField(nameof(Empty.InstanceTask))!;
#pragma warning restore CS0618
internal static readonly MethodInfo s_CallContext_FromCancellationToken = typeof(CallContext).GetMethod("op_Implicit", BindingFlags.Public | BindingFlags.Static, null, new[] { typeof(CancellationToken) }, null)!;
internal const string FactoryName = "Create";
}
}
| 53.074184 | 220 | 0.529129 | [
"Apache-2.0"
] | Euan-McVie/protobuf-net.Grpc | src/protobuf-net.Grpc/Internal/ProxyEmitter.cs | 17,888 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
/*
* Do not modify this file. This file is generated from the fms-2018-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.FMS.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.FMS.Model.Internal.MarshallTransformations
{
/// <summary>
/// TagResource Request Marshaller
/// </summary>
public class TagResourceRequestMarshaller : IMarshaller<IRequest, TagResourceRequest> , IMarshaller<IRequest,AmazonWebServiceRequest>
{
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public IRequest Marshall(AmazonWebServiceRequest input)
{
return this.Marshall((TagResourceRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(TagResourceRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.FMS");
string target = "AWSFMS_20180101.TagResource";
request.Headers["X-Amz-Target"] = target;
request.Headers["Content-Type"] = "application/x-amz-json-1.1";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2018-01-01";
request.HttpMethod = "POST";
request.ResourcePath = "/";
request.MarshallerVersion = 2;
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceArn())
{
context.Writer.WritePropertyName("ResourceArn");
context.Writer.Write(publicRequest.ResourceArn);
}
if(publicRequest.IsSetTagList())
{
context.Writer.WritePropertyName("TagList");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagListListValue in publicRequest.TagList)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagListListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static TagResourceRequestMarshaller _instance = new TagResourceRequestMarshaller();
internal static TagResourceRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static TagResourceRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 36.396694 | 138 | 0.586966 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/FMS/Generated/Model/Internal/MarshallTransformations/TagResourceRequestMarshaller.cs | 4,404 | C# |
using System.Web;
using System.Web.Mvc;
namespace DailySoccerBackoffice
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
}
| 19.571429 | 80 | 0.667883 | [
"MIT"
] | teerachail/xdailysoccer | src/DailySoccerSolution/DailySoccerBackoffice/App_Start/FilterConfig.cs | 276 | C# |
using Microsoft.VisualStudio.Shell;
using System;
using System.Runtime.InteropServices;
using System.Threading;
using Task = System.Threading.Tasks.Task;
namespace RurcemleqiwaicherHereleewucawhallwur
{
/// <summary>
/// This is the class that implements the package exposed by this assembly.
/// </summary>
/// <remarks>
/// <para>
/// The minimum requirement for a class to be considered a valid package for Visual Studio
/// is to implement the IVsPackage interface and register itself with the shell.
/// This package uses the helper classes defined inside the Managed Package Framework (MPF)
/// to do it: it derives from the Package class that provides the implementation of the
/// IVsPackage interface and uses the registration attributes defined in the framework to
/// register itself and its components with the shell. These attributes tell the pkgdef creation
/// utility what data to put into .pkgdef file.
/// </para>
/// <para>
/// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file.
/// </para>
/// </remarks>
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
[Guid(RurcemleqiwaicherHereleewucawhallwurPackage.PackageGuidString)]
public sealed class RurcemleqiwaicherHereleewucawhallwurPackage : AsyncPackage
{
/// <summary>
/// RurcemleqiwaicherHereleewucawhallwurPackage GUID string.
/// </summary>
public const string PackageGuidString = "fcea98f6-d469-4bd5-94db-6c52dec395ca";
#region Package Members
/// <summary>
/// Initialization of the package; this method is called right after the package is sited, so this is the place
/// where you can put all the initialization code that rely on services provided by VisualStudio.
/// </summary>
/// <param name="cancellationToken">A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down.</param>
/// <param name="progress">A provider for progress updates.</param>
/// <returns>A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method.</returns>
protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
{
// When initialized asynchronously, the current thread may be a background thread at this point.
// Do any initialization that requires the UI thread after switching to the UI thread.
await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
}
#endregion
}
} | 50.517857 | 176 | 0.714033 | [
"MIT"
] | jianyuyanyu/lindexi_gd | RurcemleqiwaicherHereleewucawhallwur/RurcemleqiwaicherHereleewucawhallwur/RurcemleqiwaicherHereleewucawhallwurPackage.cs | 2,831 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.TestWindow.Extensibility;
using tSQLtTestAdapter.Helpers;
/*
* I *think* I need this because the tests are not in a dll or exe - to enumerate tests in a diffrent file format needs
* this, as per bruno's semi-cryptic comment on "https://blogs.msdn.microsoft.com/bhuvaneshwari/2012/03/13/authoring-a-new-visual-studio-unit-test-adapter/"
*
* BrunoLM
August 22, 2013 at 12:43 pm
For non .exe and .dll you need these interfaces as well ITestContainerDiscoverer and ITestContainer
Example
github.com/…/TSTestExtension
*/
namespace tSQLtTestAdapter
{
[Export(typeof(ITestContainerDiscoverer))]
public class tSQLtTestContainerDiscoverer : ITestContainerDiscoverer
{
public event EventHandler TestContainersUpdated;
private IServiceProvider serviceProvider;
private ILogger logger;
private ISolutionEventsListener solutionListener;
private ITestFilesUpdateWatcher testFilesUpdateWatcher;
private ITestFileAddRemoveListener testFilesAddRemoveListener;
private bool initialContainerSearch;
private readonly List<ITestContainer> cachedContainers;
protected string FileExtension { get { return Constants.FileExtension; } }
public Uri ExecutorUri { get { return new System.Uri(Constants.ExecutorUriString); } }
public IEnumerable<ITestContainer> TestContainers {get { return GetTestContainers(); } }
[ImportingConstructor]
public tSQLtTestContainerDiscoverer(
[Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider,
ILogger logger,
ISolutionEventsListener solutionListener,
ITestFilesUpdateWatcher testFilesUpdateWatcher,
ITestFileAddRemoveListener testFilesAddRemoveListener)
{
initialContainerSearch = true;
cachedContainers = new List<ITestContainer>();
this.serviceProvider = serviceProvider;
this.logger = logger;
this.solutionListener = solutionListener;
this.testFilesUpdateWatcher = testFilesUpdateWatcher;
this.testFilesAddRemoveListener = testFilesAddRemoveListener;
testFilesUpdateWatcher.FileChangedEvent += OnProjectItemChanged;
this.testFilesAddRemoveListener.TestFileChanged += OnProjectItemChanged;
this.testFilesAddRemoveListener.StartListeningForTestFileChanges();
this.solutionListener.SolutionUnloaded += SolutionListenerOnSolutionUnloaded;
this.solutionListener.SolutionProjectChanged += OnSolutionProjectChanged;
this.solutionListener.StartListeningForChanges();
}
private void OnTestContainersChanged()
{
if (TestContainersUpdated != null && !initialContainerSearch)
{
TestContainersUpdated(this, EventArgs.Empty);
}
}
private void SolutionListenerOnSolutionUnloaded(object sender, EventArgs eventArgs)
{
initialContainerSearch = true;
}
private void OnSolutionProjectChanged(object sender, SolutionEventsListenerEventArgs e)
{
if (e != null)
{
var files = FindSqlFiles(e.Project);
if (e.ChangedReason == SolutionChangedReason.Load)
{
UpdateFileWatcher(files, true);
}
else if (e.ChangedReason == SolutionChangedReason.Unload)
{
UpdateFileWatcher(files, false);
}
}
// Do not fire OnTestContainersChanged here.
// This will cause us to fire this event too early before the UTE is ready to process containers and will result in an exception.
// The UTE will query all the TestContainerDiscoverers once the solution is loaded.
}
private void UpdateFileWatcher(IEnumerable<string> files, bool isAdd)
{
foreach (var file in files)
{
if (isAdd)
{
testFilesUpdateWatcher.AddWatch(file);
AddTestContainerIfTestFile(file);
}
else
{
testFilesUpdateWatcher.RemoveWatch(file);
RemoveTestContainer(file);
}
}
}
private void OnProjectItemChanged(object sender, TestFileChangedEventArgs e)
{
if (e != null)
{
// Don't do anything for files we are sure can't be test files
if (!IsSqlFile(e.File)) return;
switch (e.ChangedReason)
{
case TestFileChangedReason.Added:
testFilesUpdateWatcher.AddWatch(e.File);
AddTestContainerIfTestFile(e.File);
break;
case TestFileChangedReason.Removed:
testFilesUpdateWatcher.RemoveWatch(e.File);
RemoveTestContainer(e.File);
break;
case TestFileChangedReason.Changed:
AddTestContainerIfTestFile(e.File);
break;
}
OnTestContainersChanged();
}
}
private void AddTestContainerIfTestFile(string file)
{
var isTestFile = IsTestFile(file);
RemoveTestContainer(file); // Remove if there is an existing container
// If this is a test file
if (isTestFile)
{
var container = new tSQLtTestContainer(this, file, ExecutorUri);
cachedContainers.Add(container);
}
}
private void RemoveTestContainer(string file)
{
var index = cachedContainers.FindIndex(x => x.Source.Equals(file, StringComparison.OrdinalIgnoreCase));
if (index >= 0)
{
cachedContainers.RemoveAt(index);
}
}
private IEnumerable<ITestContainer> GetTestContainers()
{
if (initialContainerSearch)
{
cachedContainers.Clear();
var xmlFiles = FindSqlFiles();
UpdateFileWatcher(xmlFiles, true);
initialContainerSearch = false;
}
return cachedContainers;
}
private IEnumerable<string> FindSqlFiles()
{
var solution = (IVsSolution)serviceProvider.GetService(typeof(SVsSolution));
var loadedProjects = solution.EnumerateLoadedProjects(__VSENUMPROJFLAGS.EPF_LOADEDINSOLUTION).OfType<IVsProject>();
return loadedProjects.SelectMany(FindSqlFiles).ToList();
}
private IEnumerable<string> FindSqlFiles(IVsProject project)
{
return from item in VsSolutionHelper.GetProjectItems(project)
where IsTestFile(item)
select item;
}
private static bool IsSqlFile(string path)
{
return ".sql".Equals(Path.GetExtension(path), StringComparison.OrdinalIgnoreCase);
}
private bool IsTestFile(string path)
{
try
{
if (String.IsNullOrEmpty(path))
return false;
return IsSqlFile(path);
}
catch (IOException e)
{
logger.Log(MessageLevel.Error, "IO error when detecting a test file during Test Container Discovery" + e.Message);
}
return false;
}
public void Dispose()
{
Dispose(true);
// Use SupressFinalize in case a subclass
// of this type implements a finalizer.
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
if (testFilesUpdateWatcher != null)
{
testFilesUpdateWatcher.FileChangedEvent -= OnProjectItemChanged;
((IDisposable)testFilesUpdateWatcher).Dispose();
testFilesUpdateWatcher = null;
}
if (testFilesAddRemoveListener != null)
{
testFilesAddRemoveListener.TestFileChanged -= OnProjectItemChanged;
testFilesAddRemoveListener.StopListeningForTestFileChanges();
testFilesAddRemoveListener = null;
}
if (solutionListener != null)
{
solutionListener.SolutionProjectChanged -= OnSolutionProjectChanged;
solutionListener.StopListeningForChanges();
solutionListener = null;
}
}
}
}
}
| 35.469466 | 157 | 0.586893 | [
"MIT"
] | GoEddie/tSQLt-TestAdapter | XmlTestAdapter/tSQLtTestContainerDiscoverer.cs | 9,297 | C# |
using Microsoft.Extensions.Logging;
using System.Text.RegularExpressions;
using CryptoGramBot.Helpers;
namespace CryptoGramBot.Configuration
{
public class BittrexConfig : IConfig
{
private readonly ILogger<BittrexConfig> _log;
public decimal? BagNotification { get; set; }
public bool? BuyNotifications { get; set; }
public string DailyNotifications { get; set; }
public bool? DepositNotification { get; set; }
public decimal? DustNotification { get; set; }
public bool Enabled { get; set; }
public string Key { get; set; }
public decimal? LowBtcNotification { get; set; }
public bool? OpenOrderNotification { get; set; }
public string Secret { get; set; }
public bool? SellNotifications { get; set; }
public bool? SendHourlyUpdates { get; set; }
public bool? WithdrawalNotification { get; set; }
public BittrexConfig(ILogger<BittrexConfig> log)
{
_log = log;
}
public bool IsValid()
{
bool result = true;
if (Enabled)
{
if (string.IsNullOrEmpty(Key) || (Key == Constants.ConfigDummyValue))
{
result = false;
_log.LogError($"Key is invalid or missing in Bittrex config");
}
if (string.IsNullOrEmpty(Secret) || (Secret == Constants.ConfigDummyValue))
{
result = false;
_log.LogError($"Secret is invalid or missing in Bittrex config");
}
if (!string.IsNullOrEmpty(DailyNotifications) && Regex.Matches(DailyNotifications, @"[0-9]:[0-9]").Count == 0)
{
result = false;
_log.LogError($"Invalid DailyNotifications [{DailyNotifications}] in Bittrex config - should be empty or specify a time, example 08:00");
}
}
return result;
}
}
} | 35.258621 | 157 | 0.558435 | [
"MIT"
] | gambcl/CryptoGramBot | CryptoGramBot/Configuration/BittrexConfig.cs | 2,047 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview
{
using static Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Extensions;
/// <summary>Confidential Ledger. Contains the properties of Confidential Ledger Resource.</summary>
public partial class ConfidentialLedger
{
/// <summary>
/// <c>AfterFromJson</c> will be called after the json deserialization has finished, allowing customization of the object
/// before it is returned. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json);
/// <summary>
/// <c>AfterToJson</c> will be called after the json erialization has finished, allowing customization of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"
/// /> before it is returned. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container);
/// <summary>
/// <c>BeforeFromJson</c> will be called before the json deserialization has commenced, allowing complete customization of
/// the object before it is deserialized.
/// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
/// Implement this method in a partial class to enable this behavior.
/// </summary>
/// <param name="json">The JsonNode that should be deserialized into this object.</param>
/// <param name="returnNow">Determines if the rest of the deserialization should be processed, or if the method should return
/// instantly.</param>
partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json, ref bool returnNow);
/// <summary>
/// <c>BeforeToJson</c> will be called before the json serialization has commenced, allowing complete customization of the
/// object before it is serialized.
/// If you wish to disable the default serialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
/// Implement this method in a partial class to enable this behavior.
/// </summary>
/// <param name="container">The JSON container that the serialization result will be placed in.</param>
/// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
/// instantly.</param>
partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, ref bool returnNow);
/// <summary>
/// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject into a new instance of <see cref="ConfidentialLedger" />.
/// </summary>
/// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject instance to deserialize from.</param>
internal ConfidentialLedger(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json)
{
bool returnNow = false;
BeforeFromJson(json, ref returnNow);
if (returnNow)
{
return;
}
__resource = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.Resource(json);
__resourceLocation = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.ResourceLocation(json);
__tags1 = new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.Tags1(json);
{_property = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.LedgerProperties.FromJson(__jsonProperties) : Property;}
AfterFromJson(json);
}
/// <summary>
/// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IConfidentialLedger.
/// </summary>
/// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" /> to deserialize from.</param>
/// <returns>
/// an instance of Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IConfidentialLedger.
/// </returns>
public static Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Models.Api20210513Preview.IConfidentialLedger FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject json ? new ConfidentialLedger(json) : null;
}
/// <summary>
/// Serializes this instance of <see cref="ConfidentialLedger" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />.
/// </summary>
/// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
/// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
/// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode"/>.</param>
/// <returns>
/// a serialized instance of <see cref="ConfidentialLedger" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode" />.
/// </returns>
public Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.SerializationMode serializationMode)
{
container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonObject();
bool returnNow = false;
BeforeToJson(ref container, ref returnNow);
if (returnNow)
{
return container;
}
__resource?.ToJson(container, serializationMode);
__resourceLocation?.ToJson(container, serializationMode);
__tags1?.ToJson(container, serializationMode);
AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.ConfidentialLedger.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
AfterToJson(ref container);
return container;
}
}
} | 70.919643 | 304 | 0.704897 | [
"MIT"
] | Agazoth/azure-powershell | src/ConfidentialLedger/generated/api/Models/Api20210513Preview/ConfidentialLedger.json.cs | 7,832 | C# |
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
namespace Masa.Contrib.ReadWriteSpliting.Cqrs.Commands;
public record Command : ICommand
{
private Guid _eventId;
private DateTime _creationTime;
[JsonIgnore]
public IUnitOfWork? UnitOfWork { get; set; }
public Command() : this(Guid.NewGuid(), DateTime.UtcNow) { }
public Command(Guid eventId, DateTime creationTime)
{
_eventId = eventId;
_creationTime = creationTime;
}
public Guid GetEventId() => _eventId;
public void SetEventId(Guid eventId) => _eventId = eventId;
public DateTime GetCreationTime() => _creationTime;
public void SetCreationTime(DateTime creationTime) => _creationTime = creationTime;
}
| 27.5 | 95 | 0.715152 | [
"MIT"
] | Sky-nt/MASA.Contrib | src/ReadWriteSpliting/Cqrs/Masa.Contrib.ReadWriteSpliting.Cqrs/Commands/Command.cs | 825 | C# |
//
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Amazon Software License (the "License").
// You may not use this file except in compliance with the License.
// A copy of the License is located at
//
// http://aws.amazon.com/asl/
//
// or in the "license" file accompanying this file. This file 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.
//
namespace Amazon.Kinesis.ClientLibrary
{
/// <summary>
/// Contextual information that can used to perform specialized shutdown procedures for this IRecordProcessor.
/// </summary>
public interface ShutdownInput {
/// <summary>
/// Gets the shutdown reason.
/// </summary>
/// <value>The shutdown reason.</value>
ShutdownReason Reason { get; }
/// <summary>
/// Gets the checkpointer.
/// </summary>
/// <value>The checkpointer.</value>
Checkpointer Checkpointer { get; }
}
} | 34.727273 | 114 | 0.662304 | [
"MIT"
] | ciaranodonnell/KinesisDotNet | Code/Amazon/ClientLibrary/inputs/ShutdownInput.cs | 1,146 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Oci.CloudGuard.Inputs
{
public sealed class DetectorRecipeEffectiveDetectorRuleDetailsConfigurationValueGetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// (Updatable) configuration list item type, either CUSTOM or MANAGED
/// </summary>
[Input("listType")]
public Input<string>? ListType { get; set; }
/// <summary>
/// (Updatable) type of the managed list
/// </summary>
[Input("managedListType")]
public Input<string>? ManagedListType { get; set; }
/// <summary>
/// (Updatable) configuration value
/// </summary>
[Input("value")]
public Input<string>? Value { get; set; }
public DetectorRecipeEffectiveDetectorRuleDetailsConfigurationValueGetArgs()
{
}
}
}
| 30.289474 | 113 | 0.64205 | [
"ECL-2.0",
"Apache-2.0"
] | EladGabay/pulumi-oci | sdk/dotnet/CloudGuard/Inputs/DetectorRecipeEffectiveDetectorRuleDetailsConfigurationValueGetArgs.cs | 1,151 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Cmdlets
{
using static Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Extensions;
/// <summary>Get the details of an Azure Site Recovery job.</summary>
/// <remarks>
/// [OpenAPI] Get=>GET:"/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationJobs/{jobName}"
/// </remarks>
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.InternalExport]
[global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzMigrateReplicationJob_Get")]
[global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob))]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Description(@"Get the details of an Azure Site Recovery job.")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Generated]
public partial class GetAzMigrateReplicationJob_Get : global::System.Management.Automation.PSCmdlet,
Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener
{
/// <summary>A unique id generatd for the this cmdlet when it is instantiated.</summary>
private string __correlationId = System.Guid.NewGuid().ToString();
/// <summary>A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet)</summary>
private global::System.Management.Automation.InvocationInfo __invocationInfo;
/// <summary>A unique id generatd for the this cmdlet when ProcessRecord() is called.</summary>
private string __processRecordId;
/// <summary>
/// The <see cref="global::System.Threading.CancellationTokenSource" /> for this operation.
/// </summary>
private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource();
/// <summary>Wait for .NET debugger to attach</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Runtime)]
public global::System.Management.Automation.SwitchParameter Break { get; set; }
/// <summary>The reference to the client API class.</summary>
public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Migrate Client => Microsoft.Azure.PowerShell.Cmdlets.Migrate.Module.Instance.ClientAPI;
/// <summary>
/// The credentials, account, tenant, and subscription used for communication with Azure
/// </summary>
[global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")]
[global::System.Management.Automation.ValidateNotNull]
[global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Azure)]
public global::System.Management.Automation.PSObject DefaultProfile { get; set; }
/// <summary>SendAsync Pipeline Steps to be appended to the front of the pipeline</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")]
[global::System.Management.Automation.ValidateNotNull]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Runtime)]
public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; }
/// <summary>SendAsync Pipeline Steps to be prepended to the front of the pipeline</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")]
[global::System.Management.Automation.ValidateNotNull]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Runtime)]
public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; }
/// <summary>Accessor for our copy of the InvocationInfo.</summary>
public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } }
/// <summary>Backing field for <see cref="JobName" /> property.</summary>
private string _jobName;
/// <summary>Job identifier</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Job identifier")]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"Job identifier",
SerializedName = @"jobName",
PossibleTypes = new [] { typeof(string) })]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Path)]
public string JobName { get => this._jobName; set => this._jobName = value; }
/// <summary>
/// <see cref="IEventListener" /> cancellation delegate. Stops the cmdlet when called.
/// </summary>
global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;
/// <summary><see cref="IEventListener" /> cancellation token.</summary>
global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener.Token => _cancellationTokenSource.Token;
/// <summary>
/// The instance of the <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.HttpPipeline" /> that the remote call will use.
/// </summary>
private Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.HttpPipeline Pipeline { get; set; }
/// <summary>The URI for the proxy server to use</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Runtime)]
public global::System.Uri Proxy { get; set; }
/// <summary>Credentials for a proxy server to use for the remote call</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")]
[global::System.Management.Automation.ValidateNotNull]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Runtime)]
public global::System.Management.Automation.PSCredential ProxyCredential { get; set; }
/// <summary>Use the default credentials for the proxy</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Runtime)]
public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }
/// <summary>Backing field for <see cref="ResourceGroupName" /> property.</summary>
private string _resourceGroupName;
/// <summary>The name of the resource group where the recovery services vault is present.</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group where the recovery services vault is present.")]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"The name of the resource group where the recovery services vault is present.",
SerializedName = @"resourceGroupName",
PossibleTypes = new [] { typeof(string) })]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Path)]
public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; }
/// <summary>Backing field for <see cref="ResourceName" /> property.</summary>
private string _resourceName;
/// <summary>The name of the recovery services vault.</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the recovery services vault.")]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"The name of the recovery services vault.",
SerializedName = @"resourceName",
PossibleTypes = new [] { typeof(string) })]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Path)]
public string ResourceName { get => this._resourceName; set => this._resourceName = value; }
/// <summary>Backing field for <see cref="SubscriptionId" /> property.</summary>
private string[] _subscriptionId;
/// <summary>Azure Subscription Id in which migrate project was created.</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription Id in which migrate project was created.")]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"Azure Subscription Id in which migrate project was created.",
SerializedName = @"subscriptionId",
PossibleTypes = new [] { typeof(string) })]
[Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.DefaultInfo(
Name = @"",
Description =@"",
Script = @"(Get-AzContext).Subscription.Id")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Migrate.ParameterCategory.Path)]
public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; }
/// <summary>
/// <c>overrideOnOk</c> will be called before the regular onOk has been processed, allowing customization of what happens
/// on that response. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob"
/// /> from the remote call</param>
/// <param name="returnNow">/// Determines if the rest of the onOk method should be processed, or if the method should return
/// immediately (set to true to skip further processing )</param>
partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob> response, ref global::System.Threading.Tasks.Task<bool> returnNow);
/// <summary>
/// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet)
/// </summary>
protected override void BeginProcessing()
{
Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
if (Break)
{
Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.AttachDebugger.Break();
}
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
}
/// <summary>Performs clean-up after the command execution</summary>
protected override void EndProcessing()
{
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
}
/// <summary>
/// Intializes a new instance of the <see cref="GetAzMigrateReplicationJob_Get" /> cmdlet class.
/// </summary>
public GetAzMigrateReplicationJob_Get()
{
}
/// <summary>Handles/Dispatches events during the call to the REST service.</summary>
/// <param name="id">The message id</param>
/// <param name="token">The message cancellation token. When this call is cancelled, this should be <c>true</c></param>
/// <param name="messageData">Detailed message data for the message event.</param>
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the message is completed.
/// </returns>
async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func<Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.EventData> messageData)
{
using( NoSynchronizationContext )
{
if (token.IsCancellationRequested)
{
return ;
}
switch ( id )
{
case Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.Verbose:
{
WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
return ;
}
case Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.Warning:
{
WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
return ;
}
case Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.Information:
{
var data = messageData();
WriteInformation(data, new[] { data.Message });
return ;
}
case Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.Debug:
{
WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
return ;
}
case Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.Error:
{
WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) );
return ;
}
}
await Microsoft.Azure.PowerShell.Cmdlets.Migrate.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null );
if (token.IsCancellationRequested)
{
return ;
}
WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}");
}
}
/// <summary>Performs execution of the command.</summary>
protected override void ProcessRecord()
{
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
__processRecordId = System.Guid.NewGuid().ToString();
try
{
// work
using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token) )
{
asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token);
}
}
catch (global::System.AggregateException aggregateException)
{
// unroll the inner exceptions to get the root cause
foreach( var innerException in aggregateException.Flatten().InnerExceptions )
{
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
// Write exception out to error channel.
WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) );
}
}
catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null)
{
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
// Write exception out to error channel.
WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) );
}
finally
{
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletProcessRecordEnd).Wait();
}
}
/// <summary>Performs execution of the command, working asynchronously if required.</summary>
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
/// </returns>
protected async global::System.Threading.Tasks.Task ProcessRecordAsync()
{
using( NoSynchronizationContext )
{
await ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
await ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Migrate.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName);
if (null != HttpPipelinePrepend)
{
Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
}
if (null != HttpPipelineAppend)
{
Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
}
// get the client instance
try
{
foreach( var SubscriptionId in this.SubscriptionId )
{
await ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
await this.Client.ReplicationJobsGet(ResourceName, ResourceGroupName, SubscriptionId, JobName, onOk, this, Pipeline);
await ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
}
}
catch (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.UndeclaredResponseException urexception)
{
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceName=ResourceName,ResourceGroupName=ResourceGroupName,SubscriptionId=SubscriptionId,JobName=JobName})
{
ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
});
}
finally
{
await ((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Events.CmdletProcessRecordAsyncEnd);
}
}
}
/// <summary>Interrupts currently running code within the command.</summary>
protected override void StopProcessing()
{
((Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.IEventListener)this).Cancel();
base.StopProcessing();
}
/// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
/// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
/// <param name="response">the body result as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob"
/// /> from the remote call</param>
/// <returns>
/// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
/// </returns>
private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob> response)
{
using( NoSynchronizationContext )
{
var _returnNow = global::System.Threading.Tasks.Task<bool>.FromResult(false);
overrideOnOk(responseMessage, response, ref _returnNow);
// if overrideOnOk has returned true, then return right away.
if ((null != _returnNow && await _returnNow))
{
return ;
}
// onOk - response for 200 / application/json
// (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.IJob
WriteObject((await response));
}
}
}
} | 71.835655 | 459 | 0.673349 | [
"MIT"
] | 3quanfeng/azure-powershell | src/Migrate/generated/cmdlets/GetAzMigrateReplicationJob_Get.cs | 25,431 | C# |
using System.Collections.Generic;
using System.Linq;
using CarDealer.Models.EntityModels;
using CarDealer.Models.ViewModels.Logs;
namespace CarDealer.Services
{
public class LogsService : Service
{
public AllLogsPageVm GetAllLogsPageVm(string username, int? page)
{
var currentPage = 1;
if (page != null)
{
currentPage = page.Value;
}
IEnumerable<Log> logs;
if (username != null)
{
logs = this.Context.Logs.Where(log => log.User.Username == username);
}
else
{
logs = this.Context.Logs;
}
int allLogPagesCount = logs.Count() / 20 + (logs.Count() % 20 == 0 ? 0 : 1);
int logsTotake = 20;
if (allLogPagesCount == currentPage)
{
logsTotake = logs.Count() % 20 == 0 ? 20 : logs.Count() % 20;
}
logs = logs.Skip((currentPage - 1) * 20).Take(logsTotake);
List<AllLogVm> logVms = new List<AllLogVm>();
foreach (Log log in logs)
{
logVms.Add(new AllLogVm()
{
Operation = log.Operation,
ModfiedTable = log.ModifiedTableName,
UserName = log.User.Username,
ModifiedAt = log.ModifiedAt
});
}
AllLogsPageVm pageVm = new AllLogsPageVm()
{
WantedUserName = username,
CurrentPage = currentPage,
TotalNumberOfPages = allLogPagesCount,
Logs = logVms
};
return pageVm;
}
public void DeleteAllLogs()
{
this.Context.Logs.RemoveRange(this.Context.Logs);
this.Context.SaveChanges();
}
}
}
| 28.176471 | 88 | 0.483299 | [
"MIT"
] | ivajlotokiew/CSharp_ASP.NET_MVC | Car_Dealer/CarDealer.Services/LogsService.cs | 1,918 | C# |
using System;
namespace FlickrNet
{
/// <summary>
/// Exception thrown when method requires authentication but no authentication token is supplied.
/// </summary>
[Serializable]
public class AuthenticationRequiredException : FlickrException
{
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticationRequiredException"/> class.
/// </summary>
public AuthenticationRequiredException() : base("Method requires authentication but no token supplied.")
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticationRequiredException"/> class with a specified error message.
/// </summary>
/// <param name="message"></param>
public AuthenticationRequiredException(string message)
: base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="AuthenticationRequiredException"/> class
/// with a specified error message and a reference to the inner exception that is the cause of this exception.
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public AuthenticationRequiredException(string message, Exception innerException)
: base(message, innerException)
{
}
}
}
| 34.85 | 129 | 0.629125 | [
"Unlicense"
] | jjxtra/FlickrDownloader | FlickrNet/AuthenticationRequiredException.cs | 1,394 | C# |
using ChocolArm64.Memory;
using Ryujinx.Audio;
using Ryujinx.HLE.Logging;
using Ryujinx.HLE.OsHle.Handles;
using Ryujinx.HLE.OsHle.Ipc;
using System;
using System.Collections.Generic;
namespace Ryujinx.HLE.OsHle.Services.Aud
{
class IAudioOut : IpcService, IDisposable
{
private Dictionary<int, ServiceProcessRequest> m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
private IAalOutput AudioOut;
private KEvent ReleaseEvent;
private int Track;
public IAudioOut(IAalOutput AudioOut, KEvent ReleaseEvent, int Track)
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, GetAudioOutState },
{ 1, StartAudioOut },
{ 2, StopAudioOut },
{ 3, AppendAudioOutBuffer },
{ 4, RegisterBufferEvent },
{ 5, GetReleasedAudioOutBuffer },
{ 6, ContainsAudioOutBuffer },
{ 7, AppendAudioOutBufferAuto },
{ 8, GetReleasedAudioOutBufferAuto }
};
this.AudioOut = AudioOut;
this.ReleaseEvent = ReleaseEvent;
this.Track = Track;
}
public long GetAudioOutState(ServiceCtx Context)
{
Context.ResponseData.Write((int)AudioOut.GetState(Track));
return 0;
}
public long StartAudioOut(ServiceCtx Context)
{
AudioOut.Start(Track);
return 0;
}
public long StopAudioOut(ServiceCtx Context)
{
AudioOut.Stop(Track);
return 0;
}
public long AppendAudioOutBuffer(ServiceCtx Context)
{
return AppendAudioOutBufferImpl(Context, Context.Request.SendBuff[0].Position);
}
public long RegisterBufferEvent(ServiceCtx Context)
{
int Handle = Context.Process.HandleTable.OpenHandle(ReleaseEvent);
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
return 0;
}
public long GetReleasedAudioOutBuffer(ServiceCtx Context)
{
long Position = Context.Request.ReceiveBuff[0].Position;
long Size = Context.Request.ReceiveBuff[0].Size;
return GetReleasedAudioOutBufferImpl(Context, Position, Size);
}
public long ContainsAudioOutBuffer(ServiceCtx Context)
{
long Tag = Context.RequestData.ReadInt64();
Context.ResponseData.Write(AudioOut.ContainsBuffer(Track, Tag) ? 1 : 0);
return 0;
}
public long AppendAudioOutBufferAuto(ServiceCtx Context)
{
(long Position, long Size) = Context.Request.GetBufferType0x21();
return AppendAudioOutBufferImpl(Context, Position);
}
public long AppendAudioOutBufferImpl(ServiceCtx Context, long Position)
{
long Tag = Context.RequestData.ReadInt64();
AudioOutData Data = AMemoryHelper.Read<AudioOutData>(
Context.Memory,
Position);
byte[] Buffer = Context.Memory.ReadBytes(
Data.SampleBufferPtr,
Data.SampleBufferSize);
AudioOut.AppendBuffer(Track, Tag, Buffer);
return 0;
}
public long GetReleasedAudioOutBufferAuto(ServiceCtx Context)
{
(long Position, long Size) = Context.Request.GetBufferType0x22();
return GetReleasedAudioOutBufferImpl(Context, Position, Size);
}
public long GetReleasedAudioOutBufferImpl(ServiceCtx Context, long Position, long Size)
{
uint Count = (uint)((ulong)Size >> 3);
long[] ReleasedBuffers = AudioOut.GetReleasedBuffers(Track, (int)Count);
for (uint Index = 0; Index < Count; Index++)
{
long Tag = 0;
if (Index < ReleasedBuffers.Length)
{
Tag = ReleasedBuffers[Index];
}
Context.Memory.WriteInt64(Position + Index * 8, Tag);
}
Context.ResponseData.Write(ReleasedBuffers.Length);
return 0;
}
public void Dispose()
{
Dispose(true);
}
protected virtual void Dispose(bool Disposing)
{
if (Disposing)
{
AudioOut.CloseTrack(Track);
ReleaseEvent.Dispose();
}
}
}
}
| 28.557576 | 95 | 0.561757 | [
"Unlicense"
] | DatBoiJay3/Ryujinx | Ryujinx.HLE/OsHle/Services/Aud/IAudioOut.cs | 4,712 | C# |
namespace DEVBG.Data.Seeding
{
using System;
using System.Linq;
using System.Threading.Tasks;
using DEVBG.Data.Models;
internal class SettingsSeeder : ISeeder
{
public async Task SeedAsync(ApplicationDbContext dbContext, IServiceProvider serviceProvider)
{
if (dbContext.Settings.Any())
{
return;
}
await dbContext.Settings.AddAsync(new Setting { Name = "Setting1", Value = "value1" });
}
}
}
| 23.318182 | 101 | 0.594542 | [
"MIT"
] | PhilipYordanov/useful-net-libraries | src/04.ASP.NET Core Template/Data/DEVBG.Data/Seeding/SettingsSeeder.cs | 515 | C# |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
namespace Apache.Ignite.Examples.ThinClient
{
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Cache.Query;
using Apache.Ignite.Core.Client;
using Apache.Ignite.Core.Client.Cache;
using Apache.Ignite.ExamplesDll.Binary;
using Apache.Ignite.ExamplesDll.Datagrid;
/// <summary>
/// Demonstrates Ignite.NET "thin" client cache queries.
/// <para />
/// 1) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
/// Application -> Startup object);
/// 2) Start example (F5 or Ctrl+F5).
/// <para />
/// This example must be run with standalone Apache Ignite node:
/// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
/// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
/// 2) Start example.
/// </summary>
public class ThinClientQueryExample
{
/// <summary> Cache name. </summary>
private const string CacheName = "default-cache";
[STAThread]
public static void Main()
{
var cfg = new IgniteClientConfiguration
{
Host = "127.0.0.1"
};
using (IIgniteClient igniteClient = Ignition.StartClient(cfg))
{
Console.WriteLine();
Console.WriteLine(">>> Cache query client example started.");
ICacheClient<int, Employee> cache = igniteClient.GetCache<int, Employee>(CacheName);
// Populate cache with sample data entries.
PopulateCache(cache);
// Run scan query example.
ScanQueryExample(cache);
}
Console.WriteLine();
Console.WriteLine(">>> Example finished, press any key to exit ...");
Console.ReadKey();
}
/// <summary>
/// Queries organizations of specified type.
/// </summary>
/// <param name="cache">Cache.</param>
private static void ScanQueryExample(ICacheClient<int, Employee> cache)
{
const int zip = 94109;
var qry = cache.Query(new ScanQuery<int, Employee>(new ScanQueryFilter(zip)));
Console.WriteLine();
Console.WriteLine(">>> Private organizations (scan):");
foreach (var entry in qry)
{
Console.WriteLine(">>> " + entry.Value);
}
}
/// <summary>
/// Populate cache with data for this example.
/// </summary>
/// <param name="cache">Cache.</param>
private static void PopulateCache(ICacheClient<int, Employee> cache)
{
cache.Put(1, new Employee(
"James Wilson",
12500,
new Address("1096 Eddy Street, San Francisco, CA", 94109),
new[] { "Human Resources", "Customer Service" },
1));
cache.Put(2, new Employee(
"Daniel Adams",
11000,
new Address("184 Fidler Drive, San Antonio, TX", 78130),
new[] { "Development", "QA" },
1));
cache.Put(3, new Employee(
"Cristian Moss",
12500,
new Address("667 Jerry Dove Drive, Florence, SC", 29501),
new[] { "Logistics" },
1));
cache.Put(4, new Employee(
"Allison Mathis",
25300,
new Address("2702 Freedom Lane, San Francisco, CA", 94109),
new[] { "Development" },
2));
cache.Put(5, new Employee(
"Breana Robbin",
6500,
new Address("3960 Sundown Lane, Austin, TX", 78130),
new[] { "Sales" },
2));
cache.Put(6, new Employee(
"Philip Horsley",
19800,
new Address("2803 Elsie Drive, Sioux Falls, SD", 57104),
new[] { "Sales" },
2));
cache.Put(7, new Employee(
"Brian Peters",
10600,
new Address("1407 Pearlman Avenue, Boston, MA", 12110),
new[] { "Development", "QA" },
2));
}
}
}
| 35.391892 | 151 | 0.55021 | [
"Apache-2.0"
] | ntikhonov/ignite | modules/platforms/dotnet/examples/Apache.Ignite.Examples/ThinClient/ThinClientQueryExample.cs | 5,238 | C# |
//// Licensed to the .NET Foundation under one or more agreements.
//// The .NET Foundation licenses this file to you under the MIT license.
//// See the LICENSE file in the project root for more information.
//using System.Collections.Generic;
//using System.Linq;
//using Xunit;
//namespace Collections.Pooled.Tests.PooledDictionary
//{
// /// <summary>
// /// Contains tests that ensure the correctness of the Dictionary class.
// /// </summary>
// public abstract partial class Dictionary_Generic_Tests<TKey, TValue> : IDictionary_Generic_Tests<TKey, TValue>
// {
// #region Remove(TKey)
// [Theory]
// [MemberData(nameof(ValidCollectionSizes))]
// public void Dictionary_Generic_RemoveKey_ValidKeyNotContainedInDictionary(int count)
// {
// PooledDictionary<TKey, TValue> dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// TValue value;
// TKey missingKey = GetNewKey(dictionary);
// Assert.False(dictionary.Remove(missingKey, out value));
// Assert.Equal(count, dictionary.Count);
// Assert.Equal(default(TValue), value);
// }
// [Theory]
// [MemberData(nameof(ValidCollectionSizes))]
// public void Dictionary_Generic_RemoveKey_ValidKeyContainedInDictionary(int count)
// {
// PooledDictionary<TKey, TValue> dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// TKey missingKey = GetNewKey(dictionary);
// TValue outValue;
// TValue inValue = CreateTValue(count);
// dictionary.Add(missingKey, inValue);
// Assert.True(dictionary.Remove(missingKey, out outValue));
// Assert.Equal(count, dictionary.Count);
// Assert.Equal(inValue, outValue);
// Assert.False(dictionary.TryGetValue(missingKey, out outValue));
// }
// [Theory]
// [MemberData(nameof(ValidCollectionSizes))]
// public void Dictionary_Generic_RemoveKey_DefaultKeyNotContainedInDictionary(int count)
// {
// PooledDictionary<TKey, TValue> dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// TValue outValue;
// if (DefaultValueAllowed)
// {
// TKey missingKey = default(TKey);
// while (dictionary.ContainsKey(missingKey))
// dictionary.Remove(missingKey);
// Assert.False(dictionary.Remove(missingKey, out outValue));
// Assert.Equal(default(TValue), outValue);
// }
// else
// {
// TValue initValue = CreateTValue(count);
// outValue = initValue;
// Assert.Throws<ArgumentNullException>(() => dictionary.Remove(default(TKey), out outValue));
// Assert.Equal(initValue, outValue);
// }
// }
// [Theory]
// [MemberData(nameof(ValidCollectionSizes))]
// public void Dictionary_Generic_RemoveKey_DefaultKeyContainedInDictionary(int count)
// {
// if (DefaultValueAllowed)
// {
// PooledDictionary<TKey, TValue> dictionary = (PooledDictionary<TKey, TValue>)(GenericIDictionaryFactory(count));
// TKey missingKey = default(TKey);
// TValue value;
// dictionary.TryAdd(missingKey, default(TValue));
// Assert.True(dictionary.Remove(missingKey, out value));
// }
// }
// [Fact]
// public void Dictionary_Generic_Remove_RemoveFirstEnumerationContinues()
// {
// PooledDictionary<TKey, TValue> dict = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(3);
// using (var enumerator = dict.GetEnumerator())
// {
// enumerator.MoveNext();
// TKey key = enumerator.Current.Key;
// enumerator.MoveNext();
// dict.Remove(key);
// Assert.True(enumerator.MoveNext());
// Assert.False(enumerator.MoveNext());
// }
// }
// [Fact]
// public void Dictionary_Generic_Remove_RemoveCurrentEnumerationContinues()
// {
// PooledDictionary<TKey, TValue> dict = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(3);
// using (var enumerator = dict.GetEnumerator())
// {
// enumerator.MoveNext();
// enumerator.MoveNext();
// dict.Remove(enumerator.Current.Key);
// Assert.True(enumerator.MoveNext());
// Assert.False(enumerator.MoveNext());
// }
// }
// [Fact]
// public void Dictionary_Generic_Remove_RemoveLastEnumerationFinishes()
// {
// PooledDictionary<TKey, TValue> dict = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(3);
// TKey key = default;
// using (var enumerator = dict.GetEnumerator())
// {
// while (enumerator.MoveNext())
// {
// key = enumerator.Current.Key;
// }
// }
// using (var enumerator = dict.GetEnumerator())
// {
// enumerator.MoveNext();
// enumerator.MoveNext();
// dict.Remove(key);
// Assert.False(enumerator.MoveNext());
// }
// }
// #endregion
// #region EnsureCapacity
// [Theory]
// [MemberData(nameof(ValidCollectionSizes))]
// public void EnsureCapacity_Generic_RequestingLargerCapacity_DoesInvalidateEnumeration(int count)
// {
// var dictionary = (PooledDictionary<TKey, TValue>)(GenericIDictionaryFactory(count));
// var capacity = dictionary.EnsureCapacity(0);
// var enumerator = dictionary.GetEnumerator();
// dictionary.EnsureCapacity(capacity + 1); // Verify EnsureCapacity does invalidate enumeration
// Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext());
// }
// [Fact]
// public void EnsureCapacity_Generic_NegativeCapacityRequested_Throws()
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// AssertExtensions.Throws<ArgumentOutOfRangeException>("capacity", () => dictionary.EnsureCapacity(-1));
// }
// [Fact]
// public void EnsureCapacity_Generic_DictionaryNotInitialized_RequestedZero_ReturnsZero()
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// Assert.Equal(0, dictionary.EnsureCapacity(0));
// }
// [Theory]
// [InlineData(1)]
// [InlineData(2)]
// [InlineData(3)]
// [InlineData(4)]
// public void EnsureCapacity_Generic_DictionaryNotInitialized_RequestedNonZero_CapacityIsSetToAtLeastTheRequested(int requestedCapacity)
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// Assert.InRange(dictionary.EnsureCapacity(requestedCapacity), requestedCapacity, int.MaxValue);
// }
// [Theory]
// [InlineData(3)]
// [InlineData(7)]
// public void EnsureCapacity_Generic_RequestedCapacitySmallerThanCurrent_CapacityUnchanged(int currentCapacity)
// {
// PooledDictionary<TKey, TValue> dictionary;
// // assert capacity remains the same when ensuring a capacity smaller or equal than existing
// for (int i = 0; i <= currentCapacity; i++)
// {
// dictionary = new PooledDictionary<TKey, TValue>(currentCapacity);
// Assert.Equal(currentCapacity, dictionary.EnsureCapacity(i));
// }
// }
// [Theory]
// [InlineData(7)]
// public void EnsureCapacity_Generic_ExistingCapacityRequested_SameValueReturned(int capacity)
// {
// var dictionary = new PooledDictionary<TKey, TValue>(capacity);
// Assert.Equal(capacity, dictionary.EnsureCapacity(capacity));
// dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(capacity);
// Assert.Equal(capacity, dictionary.EnsureCapacity(capacity));
// }
// [Theory]
// [InlineData(0)]
// [InlineData(1)]
// [InlineData(2)]
// [InlineData(3)]
// [InlineData(4)]
// public void EnsureCapacity_Generic_EnsureCapacityCalledTwice_ReturnsSameValue(int count)
// {
// var dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// int capacity = dictionary.EnsureCapacity(0);
// Assert.Equal(capacity, dictionary.EnsureCapacity(0));
// dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// capacity = dictionary.EnsureCapacity(count);
// Assert.Equal(capacity, dictionary.EnsureCapacity(count));
// dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// capacity = dictionary.EnsureCapacity(count + 1);
// Assert.Equal(capacity, dictionary.EnsureCapacity(count + 1));
// }
// [Theory]
// [InlineData(1)]
// [InlineData(5)]
// [InlineData(7)]
// public void EnsureCapacity_Generic_DictionaryNotEmpty_RequestedSmallerThanCount_ReturnsAtLeastSizeOfCount(int count)
// {
// var dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// Assert.InRange(dictionary.EnsureCapacity(count - 1), count, int.MaxValue);
// }
// [Theory]
// [InlineData(7)]
// [InlineData(20)]
// public void EnsureCapacity_Generic_DictionaryNotEmpty_SetsToAtLeastTheRequested(int count)
// {
// var dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// // get current capacity
// int currentCapacity = dictionary.EnsureCapacity(0);
// // assert we can update to a larger capacity
// int newCapacity = dictionary.EnsureCapacity(currentCapacity * 2);
// Assert.InRange(newCapacity, currentCapacity * 2, int.MaxValue);
// }
// [Fact]
// public void EnsureCapacity_Generic_CapacityIsSetToPrimeNumberLargerOrEqualToRequested()
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// Assert.Equal(17, dictionary.EnsureCapacity(17));
// dictionary = new PooledDictionary<TKey, TValue>();
// Assert.Equal(17, dictionary.EnsureCapacity(15));
// dictionary = new PooledDictionary<TKey, TValue>();
// Assert.Equal(17, dictionary.EnsureCapacity(13));
// }
// #endregion
// #region TrimExcess
// [Fact]
// public void TrimExcess_Generic_NegativeCapacity_Throw()
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// AssertExtensions.Throws<ArgumentOutOfRangeException>("capacity", () => dictionary.TrimExcess(-1));
// }
// [Theory]
// [InlineData(20)]
// [InlineData(23)]
// public void TrimExcess_Generic_CapacitySmallerThanCount_Throws(int suggestedCapacity)
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// dictionary.Add(GetNewKey(dictionary), CreateTValue(0));
// AssertExtensions.Throws<ArgumentOutOfRangeException>("capacity", () => dictionary.TrimExcess(0));
// dictionary = new PooledDictionary<TKey, TValue>(suggestedCapacity);
// dictionary.Add(GetNewKey(dictionary), CreateTValue(0));
// AssertExtensions.Throws<ArgumentOutOfRangeException>("capacity", () => dictionary.TrimExcess(0));
// }
// [Fact]
// public void TrimExcess_Generic_LargeInitialCapacity_TrimReducesSize()
// {
// var dictionary = new PooledDictionary<TKey, TValue>(20);
// dictionary.TrimExcess(7);
// Assert.Equal(7, dictionary.EnsureCapacity(0));
// }
// [Theory]
// [InlineData(20)]
// [InlineData(23)]
// public void TrimExcess_Generic_TrimToLargerThanExistingCapacity_DoesNothing(int suggestedCapacity)
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// int capacity = dictionary.EnsureCapacity(0);
// dictionary.TrimExcess(suggestedCapacity);
// Assert.Equal(capacity, dictionary.EnsureCapacity(0));
// dictionary = new PooledDictionary<TKey, TValue>(suggestedCapacity / 2);
// capacity = dictionary.EnsureCapacity(0);
// dictionary.TrimExcess(suggestedCapacity);
// Assert.Equal(capacity, dictionary.EnsureCapacity(0));
// }
// [Fact]
// public void TrimExcess_Generic_DictionaryNotInitialized_CapacityRemainsAsMinPossible()
// {
// var dictionary = new PooledDictionary<TKey, TValue>();
// Assert.Equal(0, dictionary.EnsureCapacity(0));
// dictionary.TrimExcess();
// Assert.Equal(0, dictionary.EnsureCapacity(0));
// }
// [Theory]
// [InlineData(1)]
// [InlineData(85)]
// [InlineData(89)]
// public void TrimExcess_Generic_ClearThenTrimNonEmptyDictionary_SetsCapacityTo3(int count)
// {
// PooledDictionary<TKey, TValue> dictionary = (PooledDictionary<TKey, TValue>)GenericIDictionaryFactory(count);
// Assert.Equal(count, dictionary.Count);
// // The smallest possible capacity size after clearing a dictionary is 3
// dictionary.Clear();
// dictionary.TrimExcess();
// Assert.Equal(3, dictionary.EnsureCapacity(0));
// }
// [Theory]
// [InlineData(85)]
// [InlineData(89)]
// public void TrimExcess_NoArguments_TrimsToAtLeastCount(int count)
// {
// var dictionary = new PooledDictionary<int, int>(20);
// for (int i = 0; i < count; i++)
// {
// dictionary.Add(i, 0);
// }
// dictionary.TrimExcess();
// Assert.InRange(dictionary.EnsureCapacity(0), count, int.MaxValue);
// }
// [Theory]
// [InlineData(85)]
// [InlineData(89)]
// public void TrimExcess_WithArguments_OnDictionaryWithManyElementsRemoved_TrimsToAtLeastRequested(int finalCount)
// {
// const int InitToFinalRatio = 10;
// int initialCount = InitToFinalRatio * finalCount;
// var dictionary = new PooledDictionary<int, int>(initialCount);
// Assert.InRange(dictionary.EnsureCapacity(0), initialCount, int.MaxValue);
// for (int i = 0; i < initialCount; i++)
// {
// dictionary.Add(i, 0);
// }
// for (int i = 0; i < initialCount - finalCount; i++)
// {
// dictionary.Remove(i);
// }
// for (int i = InitToFinalRatio; i > 0; i--)
// {
// dictionary.TrimExcess(i * finalCount);
// Assert.InRange(dictionary.EnsureCapacity(0), i * finalCount, int.MaxValue);
// }
// }
// [Theory]
// [InlineData(1000, 900, 5000, 85, 89)]
// [InlineData(1000, 400, 5000, 85, 89)]
// [InlineData(1000, 900, 500, 85, 89)]
// [InlineData(1000, 400, 500, 85, 89)]
// [InlineData(1000, 400, 500, 1, 3)]
// public void TrimExcess_NoArgument_TrimAfterEachBulkAddOrRemove_TrimsToAtLeastCount(int initialCount, int numRemove, int numAdd, int newCount, int newCapacity)
// {
// Random random = new Random(32);
// var dictionary = new PooledDictionary<int, int>();
// dictionary.TrimExcess();
// Assert.InRange(dictionary.EnsureCapacity(0), dictionary.Count, int.MaxValue);
// var initialKeys = new int[initialCount];
// for (int i = 0; i < initialCount; i++)
// {
// initialKeys[i] = i;
// }
// random.Shuffle(initialKeys);
// foreach (var key in initialKeys)
// {
// dictionary.Add(key, 0);
// }
// dictionary.TrimExcess();
// Assert.InRange(dictionary.EnsureCapacity(0), dictionary.Count, int.MaxValue);
// random.Shuffle(initialKeys);
// for (int i = 0; i < numRemove; i++)
// {
// dictionary.Remove(initialKeys[i]);
// }
// dictionary.TrimExcess();
// Assert.InRange(dictionary.EnsureCapacity(0), dictionary.Count, int.MaxValue);
// var moreKeys = new int[numAdd];
// for (int i = 0; i < numAdd; i++)
// {
// moreKeys[i] = i + initialCount;
// }
// random.Shuffle(moreKeys);
// foreach (var key in moreKeys)
// {
// dictionary.Add(key, 0);
// }
// int currentCount = dictionary.Count;
// dictionary.TrimExcess();
// Assert.InRange(dictionary.EnsureCapacity(0), currentCount, int.MaxValue);
// int[] existingKeys = new int[currentCount];
// Array.Copy(initialKeys, numRemove, existingKeys, 0, initialCount - numRemove);
// Array.Copy(moreKeys, 0, existingKeys, initialCount - numRemove, numAdd);
// random.Shuffle(existingKeys);
// for (int i = 0; i < currentCount - newCount; i++)
// {
// dictionary.Remove(existingKeys[i]);
// }
// dictionary.TrimExcess();
// int finalCapacity = dictionary.EnsureCapacity(0);
// Assert.InRange(finalCapacity, newCount, initialCount);
// Assert.Equal(newCapacity, finalCapacity);
// }
// [Fact]
// public void TrimExcess_DictionaryHasElementsChainedWithSameHashcode_Success()
// {
// var dictionary = new PooledDictionary<string, int>(7);
// for (int i = 0; i < 4; i++)
// {
// dictionary.Add(i.ToString(), 0);
// }
// var s_64bit = new string[] { "95e85f8e-67a3-4367-974f-dd24d8bb2ca2", "eb3d6fe9-de64-43a9-8f58-bddea727b1ca" };
// var s_32bit = new string[] { "25b1f130-7517-48e3-96b0-9da44e8bfe0e", "ba5a3625-bc38-4bf1-a707-a3cfe2158bae" };
// string[] chained = (Environment.Is64BitProcess ? s_64bit : s_32bit).ToArray();
// dictionary.Add(chained[0], 0);
// dictionary.Add(chained[1], 0);
// for (int i = 0; i < 4; i++)
// {
// dictionary.Remove(i.ToString());
// }
// dictionary.TrimExcess(3);
// Assert.Equal(2, dictionary.Count);
// int val;
// Assert.True(dictionary.TryGetValue(chained[0], out val));
// Assert.True(dictionary.TryGetValue(chained[1], out val));
// }
// [Fact]
// public void TrimExcess_Generic_DoesInvalidateEnumeration()
// {
// var dictionary = new PooledDictionary<TKey, TValue>(20);
// var enumerator = dictionary.GetEnumerator();
// dictionary.TrimExcess(7); // Verify TrimExcess does invalidate enumeration
// Assert.Throws<InvalidOperationException>(() => enumerator.MoveNext());
// }
// #endregion
// }
//}
| 41.676533 | 168 | 0.581342 | [
"MIT"
] | ipavel83/Collections.Pooled | Collections.Pooled.Tests/PooledDictionary/Dictionary.Generic.Tests.netcoreapp.cs | 19,715 | C# |
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
/*
* Do not modify this file. This file is generated from the batch-2016-08-10.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Batch.Model
{
/// <summary>
/// An object representing a launch template associated with a compute resource. You must
/// specify either the launch template ID or launch template name in the request, but
/// not both.
///
///
/// <para>
/// If security groups are specified using both the <code>securityGroupIds</code> parameter
/// of <code>CreateComputeEnvironment</code> and the launch template, the values in the
/// <code>securityGroupIds</code> parameter of <code>CreateComputeEnvironment</code> will
/// be used.
/// </para>
/// <note>
/// <para>
/// This object isn't applicable to jobs running on Fargate resources.
/// </para>
/// </note>
/// </summary>
public partial class LaunchTemplateSpecification
{
private string _launchTemplateId;
private string _launchTemplateName;
private string _version;
/// <summary>
/// Gets and sets the property LaunchTemplateId.
/// <para>
/// The ID of the launch template.
/// </para>
/// </summary>
public string LaunchTemplateId
{
get { return this._launchTemplateId; }
set { this._launchTemplateId = value; }
}
// Check to see if LaunchTemplateId property is set
internal bool IsSetLaunchTemplateId()
{
return this._launchTemplateId != null;
}
/// <summary>
/// Gets and sets the property LaunchTemplateName.
/// <para>
/// The name of the launch template.
/// </para>
/// </summary>
public string LaunchTemplateName
{
get { return this._launchTemplateName; }
set { this._launchTemplateName = value; }
}
// Check to see if LaunchTemplateName property is set
internal bool IsSetLaunchTemplateName()
{
return this._launchTemplateName != null;
}
/// <summary>
/// Gets and sets the property Version.
/// <para>
/// The version number of the launch template, <code>$Latest</code>, or <code>$Default</code>.
/// </para>
///
/// <para>
/// If the value is <code>$Latest</code>, the latest version of the launch template is
/// used. If the value is <code>$Default</code>, the default version of the launch template
/// is used.
/// </para>
///
/// <para>
/// Default: <code>$Default</code>.
/// </para>
/// </summary>
public string Version
{
get { return this._version; }
set { this._version = value; }
}
// Check to see if Version property is set
internal bool IsSetVersion()
{
return this._version != null;
}
}
} | 32.5 | 104 | 0.579744 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/Batch/Generated/Model/LaunchTemplateSpecification.cs | 3,900 | C# |
using Microsoft.AspNetCore.Mvc;
using Pygma.App.Filters;
namespace Pygma.App.Extensions
{
public static class MvcFiltersExtensions
{
public static void AddCoreFilters(this MvcOptions options)
{
options.Filters.Add(new UserFilter());
options.Filters.Add(new ValidateModelStateFilter());
}
}
}
| 23.6 | 66 | 0.666667 | [
"MIT"
] | CodeExcavator/project-pygma | backend/.net core-be/Pygma/Pygma.App/Extensions/MvcFiltersExtensions.cs | 356 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
// Purpose: Point and Figure chart type do not plot series data
// point directly as most of the other chart types.
// Instead it uses different calculation to create a
// new RangeColumn type series based on its data in
// the PrepareData method. All the changes in this
// method are reversed back in the UnPrepareData
// method. RangeColumn chart type is extended to
// display a column of Os or Xs.
// ---------------------------------
// Point and Figure Charts Overview:
// ---------------------------------
// :
// Point and Figure charts differ from traditional price charts in
// that they completely disregard the passage of time, and only
// display changes in prices. Rather than having price on the y-axis,
// and time on the x-axis, Point and Figure charts display price
// changes on both axes. This is similar to the Kagi, Renko, and
// Three Line Break charts.
// :
// The Point and Figure chart displays the underlying supply and
// demand as reflected in the price values. A column of Xs shows
// that demand is exceeding supply, which is known as a rally,
// a column of Os shows that supply is exceeding demand, which is
// known as a decline, and a series of short columns shows that
// supply and demand are relatively equal, which of course,
// represents a market equilibrium.
// :
// The following should be taken into account when working with
// this type of chart:
// :
// - The X values of data points are automatically indexed. For
// more information see the topic on Indexing Data Point X Values.
// :
// - There is a formula applied to the original data before it gets
// plotted. This formula changes the number of points, as well as
// their X/Y values.
// :
// - Due to the data being recalculated, we do not recommend setting
// the minimum, or maximum values for the X axis. This is because it
// cannot be determined how many data points will actually be plotted.
// However, if the axis' Maximum, or Minimum is set, then the Maximum,
// and Minimum properties will use data point index values.
// :
// - Data point anchoring, used for annotations, is not supported
// with this type of chart.
//
using System;
using System.Drawing;
using System.Globalization;
using FastReport.DataVisualization.Charting.Utilities;
namespace FastReport.DataVisualization.Charting.ChartTypes
{
/// <summary>
/// PointAndFigureChart class contains all the code necessary for calculation
/// and drawing Point and Figure chart.
/// </summary>
internal class PointAndFigureChart : RangeColumnChart
{
#region Fields
/// <summary>
/// Indicates that class subscribed fro the customize event.
/// </summary>
static private bool _customizeSubscribed = false;
#endregion // Fields
#region Methods
/// <summary>
/// Prepares PointAndFigure chart type for rendering. We hide original series
/// during rendering and only using the data for calculations. New RangeColumn
/// type series is added wich displayes the columns of Os or Xs.
/// All the changes in this method are reversed back in the UnPrepareData method.
/// </summary>
/// <param name="series">Series to be prepared.</param>
internal static void PrepareData(Series series)
{
// Check series chart type
if(String.Compare( series.ChartTypeName, ChartTypeNames.PointAndFigure, StringComparison.OrdinalIgnoreCase ) != 0 || !series.IsVisible())
{
return;
}
// Get reference to the chart control
Chart chart = series.Chart;
if(chart == null)
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureNullReference));
}
// PointAndFigure chart may not be combined with any other chart types
ChartArea area = chart.ChartAreas[series.ChartArea];
foreach (Series currentSeries in chart.Series)
{
if (currentSeries.IsVisible() && currentSeries != series && area == chart.ChartAreas[currentSeries.ChartArea])
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureCanNotCombine));
}
}
// Subscribe for customize event
if(!_customizeSubscribed)
{
_customizeSubscribed = true;
chart.Customize += new EventHandler(OnCustomize);
}
// Create a temp series which will hold original series data points
string tempSeriesName = "POINTANDFIGURE_ORIGINAL_DATA_" + series.Name;
if (chart.Series.IndexOf(tempSeriesName) != -1)
{
return; // the temp series has already been added
}
Series seriesOriginalData = new Series(tempSeriesName, series.YValuesPerPoint);
seriesOriginalData.Enabled = false;
seriesOriginalData.IsVisibleInLegend = false;
seriesOriginalData.YValuesPerPoint = series.YValuesPerPoint;
chart.Series.Add(seriesOriginalData);
foreach(DataPoint dp in series.Points)
{
seriesOriginalData.Points.Add(dp);
}
series.Points.Clear();
if(series.IsCustomPropertySet("TempDesignData"))
{
seriesOriginalData["TempDesignData"] = "true";
}
// Remember prev. series parameters
series["OldXValueIndexed"] = series.IsXValueIndexed.ToString(CultureInfo.InvariantCulture);
series["OldYValuesPerPoint"] = series.YValuesPerPoint.ToString(CultureInfo.InvariantCulture);
series.IsXValueIndexed = true;
// Calculate date-time interval for indexed series
if(series.ChartArea.Length > 0 &&
series.IsXValueDateTime())
{
// Get X axis connected to the series
Axis xAxis = area.GetAxis(AxisName.X, series.XAxisType, series.XSubAxisName);
// Change interval for auto-calculated interval only
if(xAxis.Interval == 0 && xAxis.IntervalType == DateTimeIntervalType.Auto)
{
// Check if original data has X values set to date-time values and
// calculate min/max X values.
bool nonZeroXValues = false;
double minX = double.MaxValue;
double maxX = double.MinValue;
foreach(DataPoint dp in seriesOriginalData.Points)
{
if(!dp.IsEmpty)
{
if(dp.XValue != 0.0)
{
nonZeroXValues = true;
}
if(dp.XValue > maxX)
{
maxX = dp.XValue;
}
if(dp.XValue < minX)
{
minX = dp.XValue;
}
}
}
if(nonZeroXValues)
{
// Save flag that axis interval is automatic
series["OldAutomaticXAxisInterval"] = "true";
// Calculate and set axis date-time interval
DateTimeIntervalType intervalType = DateTimeIntervalType.Auto;
xAxis.interval = xAxis.CalcInterval(minX, maxX, true, out intervalType, series.XValueType);
xAxis.intervalType = intervalType;
}
}
}
// Calculate PointAndFigure bricks data points values
FillPointAndFigureData(series, seriesOriginalData);
}
/// <summary>
/// Remove any changes done while preparing PointAndFigure chart type for rendering.
/// </summary>
/// <param name="series">Series to be un-prepared.</param>
/// <returns>True if series was removed from collection.</returns>
internal static bool UnPrepareData(Series series)
{
if(series.Name.StartsWith("POINTANDFIGURE_ORIGINAL_DATA_", StringComparison.Ordinal))
{
// Get reference to the chart control
Chart chart = series.Chart;
if(chart == null)
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureNullReference));
}
// Unsubscribe for customize event
if(_customizeSubscribed)
{
_customizeSubscribed = false;
chart.Customize -= new EventHandler(OnCustomize);
}
// Get original PointAndFigure series
Series pointAndFigureSeries = chart.Series[series.Name.Substring(29)];
Series.MovePositionMarkers(pointAndFigureSeries, series);
// Copy data back to original PointAndFigure series
pointAndFigureSeries.Points.Clear();
if(!series.IsCustomPropertySet("TempDesignData"))
{
foreach(DataPoint dp in series.Points)
{
pointAndFigureSeries.Points.Add(dp);
}
}
// Restore series properties
bool xValIndexed;
bool parseSucceed = bool.TryParse(pointAndFigureSeries["OldXValueIndexed"], out xValIndexed);
pointAndFigureSeries.IsXValueIndexed = parseSucceed && xValIndexed;
int yVals;
parseSucceed = int.TryParse(pointAndFigureSeries["OldYValuesPerPoint"], NumberStyles.Any, CultureInfo.InvariantCulture, out yVals);
if (parseSucceed)
{
pointAndFigureSeries.YValuesPerPoint = yVals;
}
pointAndFigureSeries.DeleteCustomProperty("OldXValueIndexed");
pointAndFigureSeries.DeleteCustomProperty("OldYValuesPerPoint");
pointAndFigureSeries.DeleteCustomProperty(CustomPropertyName.EmptyPointValue);
series["OldAutomaticXAxisInterval"] = "true";
if(pointAndFigureSeries.IsCustomPropertySet("OldAutomaticXAxisInterval"))
{
pointAndFigureSeries.DeleteCustomProperty("OldAutomaticXAxisInterval");
// Reset automatic interval for X axis
if(pointAndFigureSeries.ChartArea.Length > 0)
{
// Get X axis connected to the series
ChartArea area = chart.ChartAreas[pointAndFigureSeries.ChartArea];
Axis xAxis = area.GetAxis(AxisName.X, pointAndFigureSeries.XAxisType, pointAndFigureSeries.XSubAxisName);
xAxis.interval = 0.0;
xAxis.intervalType = DateTimeIntervalType.Auto;
}
}
// Remove series from the collection
chart.Series.Remove(series);
return true;
}
return false;
}
/// <summary>
/// Gets price range in the point and figure chart.
/// </summary>
/// <param name="originalData">Series with original data.</param>
/// <param name="yValueHighIndex">Index of the Y value to use as High price.</param>
/// <param name="yValueLowIndex">Index of the Y value to use as Low price.</param>
/// <param name="minPrice">Returns max price.</param>
/// <param name="maxPrice">Returns min price.</param>
private static void GetPriceRange(
Series originalData,
int yValueHighIndex,
int yValueLowIndex,
out double minPrice,
out double maxPrice)
{
// Calculate percent of the highest and lowest price difference.
maxPrice = double.MinValue;
minPrice = double.MaxValue;
foreach(DataPoint dp in originalData.Points)
{
if(!dp.IsEmpty)
{
// Check required Y values number
if(dp.YValues.Length < 2)
{
throw(new InvalidOperationException(SR.ExceptionChartTypeRequiresYValues(ChartTypeNames.PointAndFigure, ((int)(2)).ToString(CultureInfo.CurrentCulture))));
}
if(dp.YValues[yValueHighIndex] > maxPrice)
{
maxPrice = dp.YValues[yValueHighIndex];
}
else if(dp.YValues[yValueLowIndex] > maxPrice)
{
maxPrice = dp.YValues[yValueLowIndex];
}
if(dp.YValues[yValueHighIndex] < minPrice)
{
minPrice = dp.YValues[yValueHighIndex];
}
else if(dp.YValues[yValueLowIndex] < minPrice)
{
minPrice = dp.YValues[yValueLowIndex];
}
}
}
}
/// <summary>
/// Gets box size of the renko chart.
/// </summary>
/// <param name="series">Range column chart series used to dispaly the renko chart.</param>
/// <param name="minPrice">Max price.</param>
/// <param name="maxPrice">Min price.</param>
private static double GetBoxSize(
Series series,
double minPrice,
double maxPrice)
{
// Check "BoxSize" custom attribute
double boxSize = 1.0;
double percentOfPriceRange = 4.0;
bool roundBoxSize = true;
if (series.IsCustomPropertySet(CustomPropertyName.BoxSize))
{
string attrValue = series[CustomPropertyName.BoxSize].Trim();
bool usePercentage = attrValue.EndsWith("%", StringComparison.Ordinal);
if (usePercentage)
{
attrValue = attrValue.Substring(0, attrValue.Length - 1);
}
bool parseSucceed = false;
if (usePercentage)
{
double percent;
parseSucceed = double.TryParse(attrValue, NumberStyles.Any, CultureInfo.InvariantCulture, out percent);
if (parseSucceed)
{
percentOfPriceRange = percent;
roundBoxSize = false;
}
}
else
{
double b = 0;
parseSucceed = double.TryParse(attrValue, NumberStyles.Any, CultureInfo.InvariantCulture, out b);
if (parseSucceed)
{
boxSize = b;
percentOfPriceRange = 0.0;
}
}
if (!parseSucceed)
{
throw (new InvalidOperationException(SR.ExceptionRenkoBoxSizeFormatInvalid));
}
}
// Calculate box size using the percentage of price range
if(percentOfPriceRange > 0.0)
{
// Set default box size
boxSize = 1.0;
// Calculate box size as percentage of price difference
if(minPrice == maxPrice)
{
boxSize = 1.0;
}
else if( (maxPrice - minPrice) < 0.000001)
{
boxSize = 0.000001;
}
else
{
boxSize = (maxPrice - minPrice) * (percentOfPriceRange / 100.0);
}
// Round calculated value
if(roundBoxSize)
{
double[] availableBoxSizes = new double[]
{ 0.000001, 0.00001, 0.0001, 0.001, 0.01, 0.1, 0.25, 0.5, 1.0, 2.0, 2.5, 3.0, 4.0, 5.0, 7.5, 10.0, 15.0, 20.0, 25.0, 50.0, 100.0, 200.0, 500.0, 1000.0, 5000.0, 10000.0, 50000.0, 100000.0, 1000000.0, 1000000.0};
for(int index = 1; index < availableBoxSizes.Length; index ++)
{
if(boxSize > availableBoxSizes[index - 1] &&
boxSize < availableBoxSizes[index])
{
boxSize = availableBoxSizes[index];
}
}
}
}
// Save current box size as a custom attribute of the original series
series["CurrentBoxSize"] = boxSize.ToString(CultureInfo.InvariantCulture);
return boxSize;
}
/// <summary>
/// Gets reversal amount of the pointAndFigure chart.
/// </summary>
/// <param name="series">Step line chart series used to dispaly the pointAndFigure chart.</param>
private static double GetReversalAmount(
Series series)
{
// Check "ReversalAmount" custom attribute
double reversalAmount = 3.0;
if (series.IsCustomPropertySet(CustomPropertyName.ReversalAmount))
{
string attrValue = series[CustomPropertyName.ReversalAmount].Trim();
double amount;
bool parseSucceed = double.TryParse(attrValue, NumberStyles.Any, CultureInfo.InvariantCulture, out amount);
if (parseSucceed)
{
reversalAmount = amount;
}
else
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureReversalAmountInvalidFormat));
}
}
return reversalAmount;
}
/// <summary>
/// Fills step line series with data to draw the PointAndFigure chart.
/// </summary>
/// <param name="series">Step line chart series used to dispaly the PointAndFigure chart.</param>
/// <param name="originalData">Series with original data.</param>
private static void FillPointAndFigureData(Series series, Series originalData)
{
// Get index of the Y values used for High/Low
int yValueHighIndex = 0;
if(series.IsCustomPropertySet(CustomPropertyName.UsedYValueHigh))
{
try
{
yValueHighIndex = int.Parse(series[CustomPropertyName.UsedYValueHigh], CultureInfo.InvariantCulture);
}
catch
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureUsedYValueHighInvalidFormat));
}
if(yValueHighIndex >= series.YValuesPerPoint)
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureUsedYValueHighOutOfRange));
}
}
int yValueLowIndex = 1;
if(series.IsCustomPropertySet(CustomPropertyName.UsedYValueLow))
{
try
{
yValueLowIndex = int.Parse(series[CustomPropertyName.UsedYValueLow], CultureInfo.InvariantCulture);
}
catch
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureUsedYValueLowInvalidFormat));
}
if(yValueLowIndex >= series.YValuesPerPoint)
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureUsedYValueLowOutOfrange));
}
}
// Get Up Brick color
Color upPriceColor = ChartGraphics.GetGradientColor(series.Color, Color.Black, 0.5);
string upPriceColorString = series[CustomPropertyName.PriceUpColor];
if(upPriceColorString != null)
{
try
{
ColorConverter colorConverter = new ColorConverter();
upPriceColor = (Color)colorConverter.ConvertFromString(null, CultureInfo.InvariantCulture, upPriceColorString);
}
catch
{
throw (new InvalidOperationException(SR.ExceptionPointAndFigureUpBrickColorInvalidFormat));
}
}
// Get price range
double priceHigh, priceLow;
GetPriceRange(originalData, yValueHighIndex, yValueLowIndex, out priceHigh, out priceLow);
// Calculate box size
double boxSize = GetBoxSize(series, priceHigh, priceLow);
// Calculate reversal amount
double reversalAmount = GetReversalAmount(series);
// Fill points
double prevHigh = double.NaN;
double prevLow = double.NaN;
int prevDirection = 0; // 1 up; -1 down; 0 none
int pointIndex = 0;
foreach(DataPoint dataPoint in originalData.Points)
{
if(!dataPoint.IsEmpty)
{
// Indicates that all updates are already performed and no further processing required
bool doNotUpdate = false;
// Number of brciks total or added to the curent column
int numberOfBricks = 0;
// Check if previus values exists
if(double.IsNaN(prevHigh))
{
prevHigh = dataPoint.YValues[yValueHighIndex];
prevLow = dataPoint.YValues[yValueLowIndex];
++pointIndex;
continue;
}
// Check direction of the price change
int direction = 0;
if(prevDirection == 1 || prevDirection == 0)
{
if(dataPoint.YValues[yValueHighIndex] >= (prevHigh + boxSize))
{
direction = 1;
numberOfBricks = (int)Math.Floor(
(dataPoint.YValues[yValueHighIndex] - prevHigh) / boxSize);
}
else if(dataPoint.YValues[yValueLowIndex] <= (prevHigh - boxSize * reversalAmount))
{
direction = -1;
numberOfBricks = (int)Math.Floor(
(prevHigh - dataPoint.YValues[yValueLowIndex]) / boxSize);
}
// Adjust the lower part of the column while going up
else if (dataPoint.YValues[yValueHighIndex] <= (prevLow - boxSize))
{
doNotUpdate = true;
numberOfBricks = (int)Math.Floor(
(prevLow - dataPoint.YValues[yValueHighIndex]) / boxSize);
if (series.Points.Count > 0)
{
series.Points[series.Points.Count - 1].YValues[0] -= numberOfBricks * boxSize;
}
prevLow -= numberOfBricks * boxSize;
}
}
if(direction == 0 &&
(prevDirection == -1 || prevDirection == 0) )
{
if(dataPoint.YValues[yValueLowIndex] <= (prevLow - boxSize))
{
direction = -1;
numberOfBricks = (int)Math.Floor(
(prevLow - dataPoint.YValues[yValueLowIndex]) / boxSize);
}
else if(dataPoint.YValues[yValueHighIndex] >= (prevLow + boxSize * reversalAmount))
{
direction = 1;
numberOfBricks = (int)Math.Floor(
(dataPoint.YValues[yValueHighIndex] - prevLow) / boxSize);
}
// Adjust the upper part of the column while going down
else if (dataPoint.YValues[yValueLowIndex] >= (prevHigh + boxSize))
{
doNotUpdate = true;
numberOfBricks = (int)Math.Floor(
(prevHigh - dataPoint.YValues[yValueLowIndex]) / boxSize);
if (series.Points.Count > 0)
{
series.Points[series.Points.Count - 1].YValues[1] += numberOfBricks * boxSize;
}
prevHigh += numberOfBricks * boxSize;
}
}
// Check if value was changed - otherwise do nothing
if (direction != 0 && !doNotUpdate)
{
// Extend line in same direction
if(direction == prevDirection)
{
if (direction == 1)
{
series.Points[series.Points.Count - 1].YValues[1] += numberOfBricks * boxSize;
prevHigh += numberOfBricks * boxSize;
series.Points[series.Points.Count - 1]["OriginalPointIndex"] = pointIndex.ToString(CultureInfo.InvariantCulture);
}
else
{
series.Points[series.Points.Count - 1].YValues[0] -= numberOfBricks * boxSize;
prevLow -= numberOfBricks * boxSize;
series.Points[series.Points.Count - 1]["OriginalPointIndex"] = pointIndex.ToString(CultureInfo.InvariantCulture);
}
}
else
{
// Opposite direction by more than reversal amount
DataPoint newDataPoint = (DataPoint)dataPoint.Clone();
newDataPoint["OriginalPointIndex"] = pointIndex.ToString(CultureInfo.InvariantCulture);
newDataPoint.series = series;
newDataPoint.XValue = dataPoint.XValue;
if(direction == 1)
{
newDataPoint.Color = upPriceColor;
newDataPoint["PriceUpPoint"] = "true";
newDataPoint.YValues[0] = prevLow + ((prevDirection != 0) ? boxSize : 0.0);
newDataPoint.YValues[1] = newDataPoint.YValues[0] + numberOfBricks * boxSize - ((prevDirection != 0) ? boxSize : 0.0);
}
else
{
newDataPoint.YValues[1] = prevHigh - ((prevDirection != 0) ? boxSize : 0.0);
newDataPoint.YValues[0] = newDataPoint.YValues[1] - numberOfBricks * boxSize;
}
prevHigh = newDataPoint.YValues[1];
prevLow = newDataPoint.YValues[0];
// Add PointAndFigure to the range step line series
series.Points.Add(newDataPoint);
}
// Save previous close value and direction
prevDirection = direction;
}
}
++pointIndex;
}
}
/// <summary>
/// Customize chart event, used to add empty points to make point and
/// figure chart symbols look proportional.
/// </summary>
/// <param name="sender">The source Chart object of this event.</param>
/// <param name="e">The EventArgs object that contains the event data.</param>
static private void OnCustomize(Object sender, EventArgs e)
{
bool chartResized = false;
Chart chart = (Chart)sender;
// Loop through all series
foreach(Series series in chart.Series)
{
// Check for the PointAndFigure chart type
if(series.Name.StartsWith("POINTANDFIGURE_ORIGINAL_DATA_", StringComparison.Ordinal))
{
// Get original series
Series pointAndFigureSeries = chart.Series[series.Name.Substring(29)];
// Check if proportional symbol custom attribute is set
bool proportionalSymbols = true;
string attrValue = pointAndFigureSeries[CustomPropertyName.ProportionalSymbols];
if(attrValue != null && String.Compare( attrValue, "True", StringComparison.OrdinalIgnoreCase ) != 0 )
{
proportionalSymbols = false;
}
if(proportionalSymbols &&
pointAndFigureSeries.Enabled &&
pointAndFigureSeries.ChartArea.Length > 0)
{
// Resize chart
if(!chartResized)
{
chartResized = true;
chart.chartPicture.Resize(chart.chartPicture.ChartGraph, false);
}
// Find series chart area, X & Y axes
ChartArea chartArea = chart.ChartAreas[pointAndFigureSeries.ChartArea];
Axis axisX = chartArea.GetAxis(AxisName.X, pointAndFigureSeries.XAxisType, pointAndFigureSeries.XSubAxisName);
Axis axisY = chartArea.GetAxis(AxisName.Y, pointAndFigureSeries.YAxisType, pointAndFigureSeries.YSubAxisName);
// Symbols are drawn only in 2D mode
if(!chartArea.Area3DStyle.Enable3D)
{
// Get current box size
double boxSize = double.Parse(
pointAndFigureSeries["CurrentBoxSize"],
CultureInfo.InvariantCulture);
// Calculate symbol width and height
double boxYSize = Math.Abs(
axisY.GetPosition(axisY.Minimum) -
axisY.GetPosition(axisY.Minimum + boxSize) );
double boxXSize = Math.Abs(
axisX.GetPosition(1.0) -
axisX.GetPosition(0.0) );
boxXSize *= 0.8;
// Get absolute size in pixels
SizeF markSize = chart.chartPicture.ChartGraph.GetAbsoluteSize(
new SizeF((float)boxXSize, (float)boxYSize));
// Calculate number of empty points that should be added
int pointCount = 0;
if(markSize.Width > markSize.Height)
{
pointCount = (int)(pointAndFigureSeries.Points.Count * (markSize.Width / markSize.Height));
}
// Add empty points
DataPoint emptyPoint = new DataPoint(pointAndFigureSeries);
emptyPoint.IsEmpty = true;
emptyPoint.AxisLabel = " ";
while(pointAndFigureSeries.Points.Count < pointCount)
{
pointAndFigureSeries.Points.Add(emptyPoint);
}
// Always use zeros for Y values of empty points
pointAndFigureSeries[CustomPropertyName.EmptyPointValue] = "Zero";
// RecalculateAxesScale chart are data
chartArea.ReCalcInternal();
}
}
}
}
}
#endregion // Methods
#region Drawing methods
/// <summary>
/// Draws 2D column using 'X' or 'O' symbols.
/// </summary>
/// <param name="graph">Chart graphics.</param>
/// <param name="vAxis">Vertical axis.</param>
/// <param name="rectSize">Column position and size.</param>
/// <param name="point">Column data point.</param>
/// <param name="ser">Column series.</param>
protected override void DrawColumn2D(
ChartGraphics graph,
Axis vAxis,
RectangleF rectSize,
DataPoint point,
Series ser)
{
// Get box size
double boxSize = double.Parse(ser["CurrentBoxSize"], CultureInfo.InvariantCulture);
double boxSizeRel = vAxis.GetLogValue(vAxis.ViewMinimum);
boxSizeRel = vAxis.GetLinearPosition(boxSizeRel);
boxSizeRel = Math.Abs(boxSizeRel -
vAxis.GetLinearPosition(vAxis.GetLogValue(vAxis.ViewMinimum + boxSize)));
// Draw a series of Xs or Os
for(float positionY = rectSize.Y; positionY < rectSize.Bottom - (float)(boxSizeRel - boxSizeRel/4.0); positionY += (float)boxSizeRel)
{
// Get position of symbol
RectangleF position = RectangleF.Empty;
position.X = rectSize.X;
position.Y = positionY;
position.Width = rectSize.Width;
position.Height = (float)boxSizeRel;
// Get absolute position and add 1 pixel spacing
position = graph.GetAbsoluteRectangle(position);
int spacing = 1 + point.BorderWidth / 2;
position.Y += spacing;
position.Height -= 2 * spacing;
// Calculate shadow position
RectangleF shadowPosition = new RectangleF(position.Location, position.Size);
shadowPosition.Offset(ser.ShadowOffset, ser.ShadowOffset);
if(point.IsCustomPropertySet("PriceUpPoint"))
{
// Draw shadow
if(ser.ShadowOffset != 0)
{
graph.DrawLineAbs(
ser.ShadowColor,
point.BorderWidth,
ChartDashStyle.Solid,
new PointF(shadowPosition.Left, shadowPosition.Top),
new PointF(shadowPosition.Right, shadowPosition.Bottom));
graph.DrawLineAbs(
ser.ShadowColor,
point.BorderWidth,
ChartDashStyle.Solid,
new PointF(shadowPosition.Left, shadowPosition.Bottom),
new PointF(shadowPosition.Right, shadowPosition.Top));
}
// Draw 'X' symbol
graph.DrawLineAbs(
point.Color,
point.BorderWidth,
ChartDashStyle.Solid,
new PointF(position.Left, position.Top),
new PointF(position.Right, position.Bottom));
graph.DrawLineAbs(
point.Color,
point.BorderWidth,
ChartDashStyle.Solid,
new PointF(position.Left, position.Bottom),
new PointF(position.Right, position.Top));
}
else
{
// Draw circles when price is dropping
if(ser.ShadowOffset != 0)
{
graph.DrawCircleAbs(
new Pen(ser.ShadowColor, point.BorderWidth),
null,
shadowPosition,
1,
false);
}
// Draw 'O' symbol
graph.DrawCircleAbs(
new Pen(point.Color, point.BorderWidth),
null,
position,
1,
false);
}
}
}
#endregion // Drawing methods
#region IChartType interface implementation
/// <summary>
/// Chart type name
/// </summary>
override public string Name { get{ return ChartTypeNames.PointAndFigure;}}
/// <summary>
/// Gets chart type image.
/// </summary>
/// <param name="registry">Chart types registry object.</param>
/// <returns>Chart type image.</returns>
override public System.Drawing.Image GetImage(ChartTypeRegistry registry)
{
return (System.Drawing.Image)registry.ResourceManager.GetObject(this.Name + "ChartType");
}
#endregion
}
}
| 34.640091 | 216 | 0.632439 | [
"MIT"
] | FastReports/winforms-datavisualization | src/shared/ChartTypes/PointAndFigureChart.cs | 30,416 | C# |
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Taiko.Objects;
using OpenTK;
using OpenTK.Graphics;
using osu.Game.Rulesets.Taiko.Judgements;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Extensions.Color4Extensions;
using System.Linq;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Taiko.Objects.Drawables;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.UI.Scrolling;
namespace osu.Game.Rulesets.Taiko.UI
{
public class TaikoPlayfield : ScrollingPlayfield
{
/// <summary>
/// Default height of a <see cref="TaikoPlayfield"/> when inside a <see cref="TaikoRulesetContainer"/>.
/// </summary>
public const float DEFAULT_HEIGHT = 178;
/// <summary>
/// The offset from <see cref="left_area_size"/> which the center of the hit target lies at.
/// </summary>
public const float HIT_TARGET_OFFSET = 100;
/// <summary>
/// The size of the left area of the playfield. This area contains the input drum.
/// </summary>
private const float left_area_size = 240;
protected override bool UserScrollSpeedAdjustment => false;
private readonly Container<HitExplosion> hitExplosionContainer;
private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;
private readonly Container<DrawableTaikoJudgement> judgementContainer;
protected override Container<Drawable> Content => content;
private readonly Container content;
private readonly Container topLevelHitContainer;
private readonly Container barlineContainer;
private readonly Container overlayBackgroundContainer;
private readonly Container backgroundContainer;
private readonly Box overlayBackground;
private readonly Box background;
public TaikoPlayfield(ControlPointInfo controlPoints)
: base(ScrollingDirection.Left)
{
AddRangeInternal(new Drawable[]
{
backgroundContainer = new Container
{
Name = "Transparent playfield background",
RelativeSizeAxes = Axes.Both,
Masking = true,
EdgeEffect = new EdgeEffectParameters
{
Type = EdgeEffectType.Shadow,
Colour = Color4.Black.Opacity(0.2f),
Radius = 5,
},
Children = new Drawable[]
{
background = new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0.6f
},
}
},
new Container
{
Name = "Right area",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = left_area_size },
Children = new Drawable[]
{
new Container
{
Name = "Masked elements before hit objects",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET },
Masking = true,
Children = new Drawable[]
{
hitExplosionContainer = new Container<HitExplosion>
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
Blending = BlendingMode.Additive,
},
new HitTarget
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit
}
}
},
barlineContainer = new Container
{
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET }
},
content = new Container
{
Name = "Hit objects",
RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = HIT_TARGET_OFFSET },
Masking = true
},
kiaiExplosionContainer = new Container<KiaiHitExplosion>
{
Name = "Kiai hit explosions",
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
Blending = BlendingMode.Additive
},
judgementContainer = new Container<DrawableTaikoJudgement>
{
Name = "Judgements",
RelativeSizeAxes = Axes.Y,
Margin = new MarginPadding { Left = HIT_TARGET_OFFSET },
Blending = BlendingMode.Additive
},
}
},
overlayBackgroundContainer = new Container
{
Name = "Left overlay",
RelativeSizeAxes = Axes.Y,
Size = new Vector2(left_area_size, 1),
Children = new Drawable[]
{
overlayBackground = new Box
{
RelativeSizeAxes = Axes.Both,
},
new InputDrum(controlPoints)
{
Anchor = Anchor.CentreRight,
Origin = Anchor.CentreRight,
Scale = new Vector2(0.9f),
Margin = new MarginPadding { Right = 20 }
},
new Box
{
Anchor = Anchor.TopRight,
RelativeSizeAxes = Axes.Y,
Width = 10,
Colour = Framework.Graphics.Colour.ColourInfo.GradientHorizontal(Color4.Black.Opacity(0.6f), Color4.Black.Opacity(0)),
},
}
},
new Container
{
Name = "Border",
RelativeSizeAxes = Axes.Both,
Masking = true,
MaskingSmoothness = 0,
BorderThickness = 2,
AlwaysPresent = true,
Children = new[]
{
new Box
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
AlwaysPresent = true
}
}
},
topLevelHitContainer = new Container
{
Name = "Top level hit objects",
RelativeSizeAxes = Axes.Both,
}
});
VisibleTimeRange.Value = 6000;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
overlayBackgroundContainer.BorderColour = colours.Gray0;
overlayBackground.Colour = colours.Gray1;
backgroundContainer.BorderColour = colours.Gray1;
background.Colour = colours.Gray0;
}
public override void Add(DrawableHitObject h)
{
h.Depth = (float)h.HitObject.StartTime;
h.OnJudgement += OnJudgement;
base.Add(h);
var barline = h as DrawableBarLine;
if (barline != null)
barlineContainer.Add(barline.CreateProxy());
// Swells should be moved at the very top of the playfield when they reach the hit target
var swell = h as DrawableSwell;
if (swell != null)
swell.OnStart += () => topLevelHitContainer.Add(swell.CreateProxy());
}
internal void OnJudgement(DrawableHitObject judgedObject, Judgement judgement)
{
if (judgedObject.DisplayJudgement && judgementContainer.FirstOrDefault(j => j.JudgedObject == judgedObject) == null)
{
judgementContainer.Add(new DrawableTaikoJudgement(judgedObject, judgement)
{
Anchor = judgement.IsHit ? Anchor.TopLeft : Anchor.CentreLeft,
Origin = judgement.IsHit ? Anchor.BottomCentre : Anchor.Centre,
RelativePositionAxes = Axes.X,
X = judgement.IsHit ? judgedObject.Position.X : 0,
});
}
if (!judgement.IsHit)
return;
bool isRim = judgedObject.HitObject is RimHit;
if (judgement is TaikoStrongHitJudgement)
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == judgedObject)?.VisualiseSecondHit();
else
{
if (judgedObject.X >= -0.05f && judgedObject is DrawableHit)
{
// If we're far enough away from the left stage, we should bring outselves in front of it
// Todo: The following try-catch is temporary for replay rewinding support
try
{
topLevelHitContainer.Add(judgedObject.CreateProxy());
}
catch
{
}
}
hitExplosionContainer.Add(new HitExplosion(judgedObject, isRim));
if (judgedObject.HitObject.Kiai)
kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject, isRim));
}
}
}
}
| 41.349442 | 147 | 0.461746 | [
"MIT"
] | StefanYohansson/osu | osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs | 11,125 | C# |
using System.Collections.Generic;
using System.Linq;
using SocialGoal.Data;
using SocialGoal.Data.Infrastructure;
using SocialGoal.Model.Models;
using SocialGoal.Data.Repository;
using System;
namespace SocialGoal.Service
{
public interface IGroupCommentService
{
IEnumerable<GroupComment> GetComments();
IEnumerable<GroupComment> GetCommentsByUpdate(int updateid);
// IEnumerable<GroupComment> GetCommentsOfPublicGoals();
// IEnumerable<GroupComment> GetCommentsByUser(int userid);
IEnumerable<GroupComment> GetTop20CommentsOfPublicGoals(string userid, IGroupUserService groupUserService);
GroupComment GetLastComment(string userid);
GroupComment GetComment(int id);
GroupComment GEtUpdateByCommentId(int id);
int GetCommentcount(int id);
void CreateComment(GroupComment comment, string useId);
void DeleteComment(int id);
void SaveComment();
}
public class GroupCommentService : IGroupCommentService
{
private readonly IGroupCommentRepository groupCommentRepository;
private readonly IGroupCommentUserRepository groupCommentUserRepository;
private readonly IGroupUpdateRepository groupUdateRepository;
private readonly IUnitOfWork unitOfWork;
public GroupCommentService(IGroupCommentRepository groupCommentRepository,IGroupCommentUserRepository groupCommentUserRepository, IGroupUpdateRepository groupUdateRepository, IUnitOfWork unitOfWork)
{
this.groupCommentRepository = groupCommentRepository;
this.groupCommentUserRepository = groupCommentUserRepository;
this.groupUdateRepository = groupUdateRepository;
this.unitOfWork = unitOfWork;
}
#region IGroupCommentService Members
public IEnumerable<GroupComment> GetComments()
{
var comment = groupCommentRepository.GetAll();
return comment;
}
//public IEnumerable<GroupComment> GetCommentsOfPublicGoals()
//{
// var comment = groupCommentRepository.GetMany(c => c.Goal.GoalType == false).ToList();
// return comment;
//}
//public IEnumerable<GroupComment> GetCommentsByUser(int userid)
//{
// var comment = groupCommentRepository.GetMany(c => (c.UserId == userid && c.Update.Goal.GoalType == false)).OrderByDescending(c => c.CommentDate).ToList();
// return comment;
//}
public IEnumerable<GroupComment> GetTop20CommentsOfPublicGoals(string userid, IGroupUserService groupUserService)
{
var comment = from u in groupCommentRepository.GetAll() where (from g in groupUserService.GetGroupUsers() where g.UserId == userid select g.GroupId).ToList().Contains(u.GroupUpdate.GroupGoal.GroupUser.GroupId) select u;
return comment;
}
public GroupComment GetLastComment(string userid)
{
//var comments = groupCommentRepository.GetMany(c => c.UserId == userid).Last();
var comments = new GroupComment();
return comments;
}
public IEnumerable<GroupComment> GetCommentsByUpdate(int updateid)
{
var comments = groupCommentRepository.GetMany(c => c.GroupUpdateId == updateid).ToList();
return comments;
}
public GroupComment GetComment(int id)
{
var comment = groupCommentRepository.GetById(id);
return comment;
}
public GroupComment GEtUpdateByCommentId(int id)
{
var comment = groupCommentRepository.Get(u => u.GroupCommentId == id);
return comment;
}
public void CreateComment(GroupComment comment, string userId)
{
groupCommentRepository.Add(comment);
SaveComment();
var groupCommentUser = new GroupCommentUser { UserId = userId, GroupCommentId = comment.GroupCommentId };
groupCommentUserRepository.Add(groupCommentUser);
SaveComment();
}
public int GetCommentcount(int id)
{
return groupCommentRepository.GetMany(c => c.GroupUpdateId == id).Count();
}
public void DeleteComment(int id)
{
var comment = groupCommentRepository.GetById(id);
groupCommentRepository.Delete(comment);
groupCommentUserRepository.Delete(gc => gc.GroupCommentId == id);
SaveComment();
}
public void SaveComment()
{
unitOfWork.Commit();
}
#endregion
}
}
| 37.564516 | 232 | 0.662301 | [
"MIT"
] | 26596/Home | source/SocialGoal.Service/GroupCommentService.cs | 4,660 | C# |
using System;
using System.Collections.Generic;
using Orleans.Runtime;
using Orleans.Streams;
namespace Orleans.Providers.Streams.Common
{
/// <summary>
/// Cursor into a simple queue cache
/// </summary>
public class SimpleQueueCacheCursor : IQueueCacheCursor
{
private readonly IStreamIdentity streamIdentity;
private readonly SimpleQueueCache cache;
private readonly Logger logger;
private IBatchContainer current; // this is a pointer to the current element in the cache. It is what will be returned by GetCurrent().
// This is a pointer to the NEXT element in the cache.
// After the cursor is first created it should be called MoveNext before the call to GetCurrent().
// After MoveNext returns, the current points to the current element that will be returned by GetCurrent()
// and Element will point to the next element (since MoveNext actualy advanced it to the next).
internal LinkedListNode<SimpleQueueCacheItem> Element { get; private set; }
internal StreamSequenceToken SequenceToken { get; private set; }
internal bool IsSet => Element != null;
internal void Reset(StreamSequenceToken token)
{
Element = null;
SequenceToken = token;
}
internal void Set(LinkedListNode<SimpleQueueCacheItem> item)
{
Element = item;
SequenceToken = item.Value.SequenceToken;
}
/// <summary>
/// Cursor into a simple queue cache
/// </summary>
/// <param name="cache"></param>
/// <param name="streamIdentity"></param>
/// <param name="logger"></param>
public SimpleQueueCacheCursor(SimpleQueueCache cache, IStreamIdentity streamIdentity, Logger logger)
{
if (cache == null)
{
throw new ArgumentNullException("cache");
}
this.cache = cache;
this.streamIdentity = streamIdentity;
this.logger = logger;
current = null;
SimpleQueueCache.Log(logger, "SimpleQueueCacheCursor New Cursor for {0}, {1}", streamIdentity.Guid, streamIdentity.Namespace);
}
/// <summary>
/// Get the current value.
/// </summary>
/// <param name="exception"></param>
/// <returns>
/// Returns the current batch container.
/// If null then the stream has completed or there was a stream error.
/// If there was a stream error, an error exception will be provided in the output.
/// </returns>
public virtual IBatchContainer GetCurrent(out Exception exception)
{
SimpleQueueCache.Log(logger, "SimpleQueueCacheCursor.GetCurrent: {0}", current);
exception = null;
return current;
}
/// <summary>
/// Move to next message in the stream.
/// If it returns false, there are no more messages. The enumerator is still
/// valid howerver and can be called again when more data has come in on this
/// stream.
/// </summary>
/// <returns></returns>
public virtual bool MoveNext()
{
IBatchContainer next;
while (cache.TryGetNextMessage(this, out next))
{
if(IsInStream(next))
break;
}
if (!IsInStream(next))
return false;
current = next;
return true;
}
/// <summary>
/// Refresh that cache cursor. Called when new data is added into a cache.
/// </summary>
/// <returns></returns>
public virtual void Refresh()
{
if (!IsSet)
{
cache.InitializeCursor(this, SequenceToken, false);
}
}
/// <summary>
/// Record that delivery of the current event has failed
/// </summary>
public void RecordDeliveryFailure()
{
if (IsSet && current != null)
{
Element.Value.DeliveryFailure = true;
}
}
private bool IsInStream(IBatchContainer batchContainer)
{
return batchContainer != null &&
batchContainer.StreamGuid.Equals(streamIdentity.Guid) &&
string.Equals(batchContainer.StreamNamespace, streamIdentity.Namespace);
}
#region IDisposable Members
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
}
/// <summary>
/// Clean up cache data when done
/// </summary>
/// <param name="disposing"></param>
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
cache.ResetCursor(this, null);
}
}
#endregion
/// <summary>
/// Convert object to string
/// </summary>
/// <returns></returns>
public override string ToString()
{
return
$"<SimpleQueueCacheCursor: Element={Element?.Value.Batch.ToString() ?? "null"}, SequenceToken={SequenceToken?.ToString() ?? "null"}>";
}
}
}
| 33.691358 | 150 | 0.565042 | [
"MIT"
] | Invertironline/orleans | src/OrleansProviders/Streams/Common/SimpleCache/SimpleQueueCacheCursor.cs | 5,458 | C# |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net.NetworkInformation;
using System.Text.RegularExpressions;
namespace Derungsoft.WolSharp
{
public class DefaultPhysicalAddressParser : IPhysicalAddressParser
{
private readonly char[] _supportedSeparators =
{
':',
' ',
'-',
'|',
'.'
};
public bool TryParse(string s, out PhysicalAddress result)
{
try
{
result = Parse(s);
return true;
}
catch (Exception)
{
result = null;
return false;
}
}
public PhysicalAddress Parse(string macAddress)
{
var validationResult = Validate(macAddress);
if (validationResult.HasErrors)
{
throw new FormatException($"Validation for {nameof(macAddress)} failed: {string.Join(",", validationResult.ValidationErrors)}");
}
macAddress = StripPhysicalAddress(macAddress);
return PhysicalAddress.Parse(macAddress.ToUpper());
}
private string StripPhysicalAddress(string macAddress)
{
return new string(macAddress.Where(p => _supportedSeparators.All(s => s != p)).ToArray());
}
private PhysicalAddressValidationResult Validate(string physicalAddress)
{
var validationErrorMessages = new List<string>();
if (physicalAddress == null)
{
validationErrorMessages.Add($"{nameof(physicalAddress)} cannot be null");
}
if (physicalAddress == string.Empty)
{
validationErrorMessages.Add($"{nameof(physicalAddress)} cannot be empty");
}
physicalAddress = StripPhysicalAddress(physicalAddress);
if (physicalAddress.Length != 12)
{
validationErrorMessages.Add($"{nameof(physicalAddress)} must be exactly 6 bytes long");
}
var regex = new Regex("^[a-fA-F0-9]{12}$");
if (!regex.IsMatch(physicalAddress) && physicalAddress.Length == 12)
{
validationErrorMessages.Add($"{nameof(physicalAddress)} has an invalid format. " +
"Only hexadecimal characters allowed. Supported " +
$"separators are: {Environment.NewLine + string.Join(Environment.NewLine, _supportedSeparators.Select(s => $"'{s}'"))}");
}
return new PhysicalAddressValidationResult
{
HasErrors = validationErrorMessages.Any(),
ValidationErrors = validationErrorMessages
};
}
}
}
| 31.956044 | 165 | 0.544704 | [
"MIT"
] | Derungsoft/WolSharp | src/Derungsoft.WolSharp/DefaultPhysicalAddressParser.cs | 2,910 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Общие сведения об этой сборке предоставляются следующим набором
// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
// связанные со сборкой.
[assembly: AssemblyTitle("MessageForm")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MessageForm")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
[assembly: ComVisible(false)]
// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
[assembly: Guid("9b901c5d-1720-42c0-adbd-c58f19b47248")]
// Сведения о версии сборки состоят из указанных ниже четырех значений:
//
// Основной номер версии
// Дополнительный номер версии
// Номер сборки
// Редакция
//
// Можно задать все значения или принять номера сборки и редакции по умолчанию
// используя "*", как показано ниже:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.540541 | 99 | 0.762272 | [
"Apache-2.0"
] | MACE4GITHUB/PowerScheme | MessageForm/Properties/AssemblyInfo.cs | 2,005 | C# |
using System;
using System.Collections.Generic;
using Couchbase.Query;
using Couchbase.Search;
using Couchbase.Search.Queries.Simple;
using Couchbase.Search.Sort;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Xunit;
namespace Couchbase.UnitTests.Services.Search
{
public class SearchParamsTests
{
[Fact]
public void ToJson_JsonStringIsValid()
{
var searchParams = new SearchQuery().
Skip(20).
Limit(10).Explain(true).
Timeout(TimeSpan.FromMilliseconds(10000)).
#pragma warning disable 618
WithConsistency(ScanConsistency.AtPlus);
#pragma warning restore 618
//var expected = "{\"ctl\":{\"timeout\":10000,\"consistency\":{\"level\":\"at_plus\",\"vectors\":{\"customerIndex\":{\"0\":123,\"1/a0b1c2\":234}}}},\"query\":{\"query\":\"alice smith\",\"boost\": 1},\"size\": 10,\"from\":20,\"highlight\":{\"style\": null,\"fields\":null},\"fields\":[\"*\"],\"facets\":null,\"explain\":true}";
var expected = "{\"ctl\":{\"timeout\":10000,\"consistency\":{\"level\":\"at_plus\",\"vectors\":{}}},\"size\":10,\"from\":20,\"explain\":true}";
var actual = searchParams.ToJson().ToString().Replace("\r\n", "").Replace(" ", "");
Console.WriteLine(actual);
Console.WriteLine(expected);
Assert.Equal(expected, actual);
}
[Fact]
public void ToJson_WithFacets()
{
var searchParams = new SearchQuery().Facets(
new TermFacet("termfacet", "thefield", 10),
new DateRangeFacet("daterangefacet", "thefield", 10).AddRange(DateTime.Now, DateTime.Now.AddDays(1)),
new NumericRangeFacet("numericrangefacet", "thefield", 2).AddRange(2.2f, 3.5f));
Console.WriteLine(searchParams.ToJson());
}
[Fact]
public void Test_SupportsFields()
{
//will not throw ArgumentNullException
SearchQuery fc = new SearchQuery();
fc.Index = "beer-ft";
fc.Highlighting(HighLightStyle.Html);
fc.Fields("name", "style");
}
[Fact]
public void Test_Fields_WhenNull_ThrowsException()
{
SearchQuery fc = new SearchQuery();
fc.Index = "beer-ft";
fc.Highlighting(HighLightStyle.Html);
Assert.Throws<ArgumentNullException>(() => fc.Fields(null));
}
[Fact]
public void Test_Fields_WhenEmpty_ThrowsException()
{
SearchQuery fc = new SearchQuery();
fc.Index = "beer-ft";
fc.Highlighting(HighLightStyle.Html);
Assert.Throws<ArgumentNullException>(() => fc.Fields());
}
[Fact]
public void Test_HighLightStyle_Html_And_Fields_Returns_LowerCase()
{
var query = new SearchQuery
{
Index = "idx_travel",
Query = new MatchQuery("inn")
}.Highlighting(HighLightStyle.Html, "inn");
var result = query.ToJson();
var expected = JsonConvert.SerializeObject(new
{
ctl = new
{
timeout = 75000
},
highlight = new
{
style="html",
fields = new [] {"inn"}
},
query=new {match="inn", prefix_length=0, fuzziness=0}
}, Formatting.None);
Assert.Equal(expected, result);
}
[Fact]
public void Sort_Adds_FieldNames_To_Output_Json()
{
var fields = new List<string> {"name", "-age"};
var searchParams = new SearchOptions();
searchParams.Sort(fields.ToArray());
var result = searchParams.ToJson().ToString(Formatting.None);
var expected = JsonConvert.SerializeObject(new
{
ctl = new
{
timeout = 75000
},
sort = fields
}, Formatting.None);
Assert.Equal(expected, result);
}
[Fact]
public void Sort_SearchSort_To_Output_Json()
{
var searchSort = new IdSearchSort();
var searchParams = new SearchOptions();
searchParams.Sort(searchSort);
var result = searchParams.ToJson().ToString(Formatting.None);
var expected = JsonConvert.SerializeObject(new
{
ctl = new
{
timeout = 75000
},
sort = new[]
{
new
{
by = "id"
}
}
}, Formatting.None);
Assert.Equal(expected, result);
}
[Fact]
public void Sort_JObject_To_Output_Json()
{
var json = new JObject
{
new JProperty("foo", "bar")
};
var searchParams = new SearchOptions();
searchParams.Sort(json);
var result = searchParams.ToJson().ToString(Formatting.None);
var expected = JsonConvert.SerializeObject(new
{
ctl = new
{
timeout = 75000
},
sort = new []
{
new
{
foo = "bar"
}
}
}, Formatting.None);
Assert.Equal(expected, result);
}
}
}
#region [ License information ]
/* ************************************************************
*
* @author Couchbase <info@couchbase.com>
* @copyright 2015 Couchbase, Inc.
*
* 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.
*
* ************************************************************/
#endregion
| 32.029268 | 338 | 0.506244 | [
"Apache-2.0"
] | mfeerick/couchbase-net-client | tests/Couchbase.UnitTests/Services/Search/SearchParamsTests.cs | 6,568 | C# |
using Dongbo.OAuth.Core.Models;
using Microsoft.Owin.Security.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dongbo.OAuth.Core.Extensions;
using System.Security.Claims;
using Microsoft.Owin.Security;
namespace Dongbo.OAuth.Core.Providers
{
public class AccessAuthenticationTokenProvider : AuthenticationTokenProvider
{
private DongboAuthorizationServerOptions options;
public AccessAuthenticationTokenProvider(DongboAuthorizationServerOptions options)
{
if (options == null)
throw new ArgumentNullException("options");
this.options = options;
this.OnCreate = this.CreateAccessToken;
this.OnReceive = this.ReceiveAccessToken;
}
private void ReceiveAccessToken(AuthenticationTokenReceiveContext context)
{
this.options.Logger.Debug("Received access token");
AsyncHelper.RunSync(() => CreateAuthenticationTicket(context));
//if (ticket != null)
//{
// context.SetTicket(ticket);
//}
this.options.Logger.Debug("Finished processing access token");
}
private async Task CreateAuthenticationTicket(AuthenticationTokenReceiveContext context)
{
var token = await this.options.TokenManager.FindAccessTokenAsync(context.Token);
OAuthValidateTokenContext<IAccessToken> validateContext = new OAuthValidateTokenContext<IAccessToken>(
context.OwinContext, options, context, token);
await options.TokenProvider.ValidateAccessToken(validateContext);
if (validateContext.IsValidated)
{
context.DeserializeTicket(token.Ticket);
}
//var identity = await options.TokenManager.AuthenticateAccessTokenAsync(context.Token);
//if (identity.IsAuthenticated)
//{
// var props = new AuthenticationProperties
// {
// ExpiresUtc = DateTimeOffset.UtcNow.Add(this.options.AccessTokenLifetime)
// };
// if (identity.HasClaim(x => x.Type == Constants.ClaimType.Client))
// {
// props.Dictionary.Add("client_id", identity.Claims.First(x => x.Type == Constants.ClaimType.Client).Value);
// }
// return new AuthenticationTicket(identity, props);
//}
//else
//{
// return null;
//}
}
private void CreateAccessToken(AuthenticationTokenCreateContext context)
{
string accessToken;
if (context.OwinContext.GetOAuthContext().GrantType == Constants.GrantTypes.ClientCredentials)
{
this.options.Logger.DebugFormat(
"Creating access token for client '{0}' and scope '{1}'",
context.Ticket.Identity.Name,
string.Join(", ", context.OwinContext.GetOAuthContext().Scope));
accessToken = AsyncHelper.RunSync<string>(() => IssueAccessToken(context));
}
else
{
this.options.Logger.DebugFormat(
"Creating access token for user '{0}', client id '{1}' and redirect uri '{2}'",
context.Ticket.Identity.Name,
context.OwinContext.GetOAuthContext().ClientId,
context.OwinContext.GetOAuthContext().RedirectUri);
accessToken = AsyncHelper.RunSync<string>(() => IssueAccessToken(context));
}
if (!string.IsNullOrWhiteSpace(accessToken))
context.SetToken(accessToken);
this.options.Logger.Debug("Created access token");
}
private async Task<string> IssueAccessToken(AuthenticationTokenCreateContext context)
{
//var createResult = await this.options.TokenManager.CreateAccessTokenAsync(
// context.Ticket.Identity,
// this.options.AccessTokenLifetime,
// context.OwinContext.GetOAuthContext().ClientId,
// context.OwinContext.GetOAuthContext().RedirectUri,
// context.OwinContext.GetOAuthContext().Scope);
var createResult = await options.TokenProvider.CreateAccessToken(context);
// Store id token in context if scope contains openid
if (context.OwinContext.GetOAuthContext().Scope.Contains("openid"))
{
context.OwinContext.GetOAuthContext().IdToken = createResult.Entity.Ticket;
}
// Generate code
var accessToken = await this.options.TokenManager.CreateAccessTokenAsync(createResult.Entity);
if (accessToken == null)
{
return null;
}
return createResult.Token;
}
}
}
| 38.863636 | 128 | 0.591423 | [
"MIT"
] | gavin-hao/framework_aspnet | src/OAuth.Core/Providers/OAuthProviders/AccessAuthenticationTokenProvider.cs | 5,132 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MSCodeTools
{
public partial class login : Form
{
private string msg = string.Empty;
public DBTable mainForm; //获得主窗体引用,可以更新主窗体的登录标志
public login()
{
InitializeComponent();
string SQL_CONN_STR = System.Configuration.ConfigurationManager.AppSettings["ConnStr"];
if (!string.IsNullOrWhiteSpace(SQL_CONN_STR) &&SQL_CONN_STR != "XXX")
{
t_conn.Text = SQL_CONN_STR;
}
}
private void btn_conn_Click(object sender, EventArgs e)
{
string connStr = t_conn.Text == "" ? string.Format(@"Data Source={0},{1};Initial Catalog={2};User Id={3};Password={4};", t_host.Text, t_port.Text, t_db.Text, t_username.Text, t_password.Text) : t_conn.Text;
Thread thread = new Thread(Check); //执行的必须是无返回值的方法
thread.Name = "子线程";
thread.Start(connStr); //在此方法内传递参数,类型为object,发送和接收涉及到拆装箱操作
}
public void Check(object connStr)
{
msg = MSSQLHelper.CheckConn((string)connStr);
if (msg == "连接成功!")
{
//MessageBox.Show(msg);
#region 原主线程状态已弃用
//DBTable db = new DBTable((string)connStr);
//if (db.ShowDialog() == DialogResult.OK)
//{
// Application.Run(new DBTable((string)connStr));
//}
//Application.OpenForms["login"].Close();
//this.Hide();
#endregion
mainForm.isLogin = true;
mainForm.myConn = (string)connStr;
this.Invoke(new Action(this.Close)); //结束后,使用委托关闭该窗体
}
else
{
MessageBox.Show(msg);
}
}
private void cb_CheckedChanged(object sender, EventArgs e)
{
if (cb.Checked)
{
//复选框被勾选,明文显示
t_conn.PasswordChar = new char();
}
else
{
//复选框被取消勾选,密文显示
t_conn.PasswordChar = '*';
}
}
private void cb_pwd_CheckedChanged(object sender, EventArgs e)
{
if (cb_pwd.Checked)
{
//复选框被勾选,明文显示
t_password.PasswordChar = new char();
}
else
{
//复选框被取消勾选,密文显示
t_password.PasswordChar = '*';
}
}
}
}
| 31.022222 | 218 | 0.506447 | [
"Apache-2.0"
] | andyshao/CodeTools | MSCodeTools/login.cs | 3,070 | C# |
//-----------------------------------------------------------------------
// <copyright file="CacheEventHelper.cs" company="Copacetic Software">
// Copyright (c) Copacetic Software.
// <author>Philip Pittle</author>
// <date>Tuesday, May 13, 2014 4:54:11 PM</date>
// Licensed under the Apache License, Version 2.0,
// you may not use this file except in compliance with this 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.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Reflection;
using CopaceticSoftware.CodeGenerator.StarterKit.Extensions;
using CopaceticSoftware.CodeGenerator.StarterKit.Infrastructure.IO;
using log4net;
namespace CopaceticSoftware.CodeGenerator.StarterKit.Infrastructure.Caching
{
/// <summary>
/// Sits on top the <see cref="IVisualStudioEventProxy"/> and provides
/// more intelligent events for evicting cached files
/// </summary>
public interface ICacheEventHelper
{
event EventHandler<EvictFromCacheEventArgs> OnEvictFromCache;
event EventHandler<EventArgs> OnClearCache;
void EvictFromCache(object sender, FilePath filename);
}
public class EvictFromCacheEventArgs : EventArgs
{
public FilePath FileName { get; set; }
/// <summary>
/// Gets or Sets a value indicating if the file on disk
/// has changed. If this is false it generally means that only
/// the solution context surrounding this file has changed, ie, it's
/// compilation needs to be regenerated.
/// </summary>
public bool FileOnDiskHasChanged { get; set; }
public EvictFromCacheEventArgs(FilePath filename)
{
FileName = filename;
FileOnDiskHasChanged = true;
}
}
public class CacheEventHelper : ICacheEventHelper
{
private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public event EventHandler<EvictFromCacheEventArgs> OnEvictFromCache;
public event EventHandler<EventArgs> OnClearCache;
public void EvictFromCache(object sender, FilePath filename)
{
_log.InfoFormat("[{0}] requested file be evicted [{1}]",
null == sender
? "<unknown>"
: sender.GetType().Name,
filename);
OnEvictFromCache(this, new EvictFromCacheEventArgs(filename));
}
public CacheEventHelper(IVisualStudioEventProxy visualStudioEventProxy, ICodeGeneratorDependencyManager codeGeneratorDependencyManager, ISolutionContext solutionContext)
{
AddEmptyEventHandlers();
WireUpVisualStudioEvents(visualStudioEventProxy, codeGeneratorDependencyManager, solutionContext);
}
private void WireUpVisualStudioEvents(IVisualStudioEventProxy visualStudioEventProxy,
ICodeGeneratorDependencyManager codeGeneratorDependencyManager, ISolutionContext solutionContext)
{
visualStudioEventProxy.OnSolutionClosing +=
(sender, args) =>
{
_log.Info("Solution closing. Firing OnClearCache");
OnClearCache(this, new EventArgs());
};
visualStudioEventProxy.OnProjectAdded +=
(sender, args) =>
{
_log.InfoFormat("OnProjectAdded - Evict [{0}]", solutionContext.SolutionFileName);
OnEvictFromCache(this, new EvictFromCacheEventArgs(solutionContext.SolutionFileName));
};
visualStudioEventProxy.OnProjectRemoved +=
(sender, args) =>
{
_log.InfoFormat("OnProjectRemoved - Evict [{0}]", args.ProjectFullPath);
OnEvictFromCache(this, new EvictFromCacheEventArgs(args.ProjectFullPath));
_log.InfoFormat("OnProjectRemoved - Evict [{0}]", solutionContext.SolutionFileName);
OnEvictFromCache(this, new EvictFromCacheEventArgs(solutionContext.SolutionFileName));
};
visualStudioEventProxy.OnProjectReferenceAdded +=
(sender, args) =>
{
_log.InfoFormat("OnProjectReferenceAdded - Evict [{0}]", args.ProjectFullPath);
OnEvictFromCache(this, new EvictFromCacheEventArgs(args.ProjectFullPath));
//TODO - Evict Project Items - Compilation needs to be updated?
};
visualStudioEventProxy.OnProjectReferenceRemoved +=
(sender, args) =>
{
_log.InfoFormat("OnProjectReferenceRemoved - Evict [{0}]", args.ProjectFullPath);
OnEvictFromCache(this, new EvictFromCacheEventArgs(args.ProjectFullPath));
//TODO - Evict Project Items - Compilation needs to be updated?
};
visualStudioEventProxy.OnProjectItemSaved +=
(sender, args) =>
{
_log.InfoFormat("OnProjectItemSaved - Evict [{0}]", args.ClassFullPath);
OnEvictFromCache(this, new EvictFromCacheEventArgs(args.ClassFullPath));
codeGeneratorDependencyManager
.GetFilesThatDependOn(args.ClassFullPath)
.Map(f =>
{
_log.InfoFormat("OnProjectItemSaved - Evict Dependency [{0}]", f.FileName);
OnEvictFromCache(this, new EvictFromCacheEventArgs(f.FileName)
{
FileOnDiskHasChanged = false
});
});
};
visualStudioEventProxy.OnProjectItemRemoved +=
(sender, args) =>
{
_log.InfoFormat("OnProjectItemRemoved - Evict [{0}]", args.ClassFullPath);
OnEvictFromCache(this, new EvictFromCacheEventArgs(args.ClassFullPath));
};
visualStudioEventProxy.OnProjectItemRenamed +=
(sender, args) =>
{
_log.InfoFormat("OnProjectItemRemoved - Evict [{0}]", args.OldClassFileName);
OnEvictFromCache(this, new EvictFromCacheEventArgs(args.OldClassFileName));
};
}
private void AddEmptyEventHandlers()
{
OnEvictFromCache += (sender, args) => { };
OnClearCache += (sender, args) => { };
}
}
}
| 39.971751 | 177 | 0.593074 | [
"Apache-2.0"
] | ppittle/pMixins | CopaceticSoftware.CodeGenerator.StarterKit/Infrastructure/Caching/CacheEventHelper.cs | 7,077 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GameEngine
{
public static class Physics
{
public const float Gravity = -9261.38f;
}
}
| 16.692308 | 48 | 0.658986 | [
"MIT"
] | dethi/troma | src/Game/GameEngine/Physics.cs | 219 | C# |
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace Nest
{
/// <summary>
/// Reads Well-Known Text (WKT) into <see cref="IGeoShape" /> types
/// </summary>
public class GeoWKTReader
{
/// <summary>
/// Reads Well-Known Text (WKT) into a new instance of <see cref="IGeoShape" />
/// </summary>
public static IGeoShape Read(string wellKnownText)
{
using (var tokenizer = new WellKnownTextTokenizer(new StringReader(wellKnownText)))
return Read(tokenizer, null);
}
private static IGeoShape Read(WellKnownTextTokenizer tokenizer, string shapeType)
{
var token = tokenizer.NextToken();
if (token != TokenType.Word)
throw new GeoWKTException(
$"Expected word but found {tokenizer.TokenString()}", tokenizer.LineNumber, tokenizer.Position);
var type = tokenizer.TokenValue.ToUpperInvariant();
if (shapeType != null && shapeType != GeoShapeType.GeometryCollection && type != shapeType)
throw new GeoWKTException($"Expected geometry type {shapeType} but found {type}");
switch (type)
{
case GeoShapeType.Point:
var point = ParsePoint(tokenizer);
point.Format = GeoFormat.WellKnownText;
return point;
case GeoShapeType.MultiPoint:
var multiPoint = ParseMultiPoint(tokenizer);
multiPoint.Format = GeoFormat.WellKnownText;
return multiPoint;
case GeoShapeType.LineString:
var lineString = ParseLineString(tokenizer);
lineString.Format = GeoFormat.WellKnownText;
return lineString;
case GeoShapeType.MultiLineString:
var multiLineString = ParseMultiLineString(tokenizer);
multiLineString.Format = GeoFormat.WellKnownText;
return multiLineString;
case GeoShapeType.Polygon:
var polygon = ParsePolygon(tokenizer);
polygon.Format = GeoFormat.WellKnownText;
return polygon;
case GeoShapeType.MultiPolygon:
var multiPolygon = ParseMultiPolygon(tokenizer);
multiPolygon.Format = GeoFormat.WellKnownText;
return multiPolygon;
case GeoShapeType.BoundingBox:
var envelope = ParseBoundingBox(tokenizer);
envelope.Format = GeoFormat.WellKnownText;
return envelope;
case GeoShapeType.GeometryCollection:
var geometryCollection = ParseGeometryCollection(tokenizer);
geometryCollection.Format = GeoFormat.WellKnownText;
return geometryCollection;
default:
throw new GeoWKTException($"Unknown geometry type: {type}");
}
}
private static PointGeoShape ParsePoint(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var point = new PointGeoShape(ParseCoordinate(tokenizer));
NextCloser(tokenizer);
return point;
}
private static MultiPointGeoShape ParseMultiPoint(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var coordinates = ParseCoordinates(tokenizer);
return new MultiPointGeoShape(coordinates);
}
private static LineStringGeoShape ParseLineString(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var coordinates = ParseCoordinates(tokenizer);
return new LineStringGeoShape(coordinates);
}
private static MultiLineStringGeoShape ParseMultiLineString(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var coordinates = ParseCoordinateLists(tokenizer);
return new MultiLineStringGeoShape(coordinates);
}
private static PolygonGeoShape ParsePolygon(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var coordinates = ParseCoordinateLists(tokenizer);
return new PolygonGeoShape(coordinates);
}
private static MultiPolygonGeoShape ParseMultiPolygon(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var coordinates = new List<IEnumerable<IEnumerable<GeoCoordinate>>>
{
ParseCoordinateLists(tokenizer)
};
while (NextCloserOrComma(tokenizer) == TokenType.Comma)
coordinates.Add(ParseCoordinateLists(tokenizer));
return new MultiPolygonGeoShape(coordinates);
}
private static EnvelopeGeoShape ParseBoundingBox(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var minLon = NextNumber(tokenizer);
NextComma(tokenizer);
var maxLon = NextNumber(tokenizer);
NextComma(tokenizer);
var maxLat = NextNumber(tokenizer);
NextComma(tokenizer);
var minLat = NextNumber(tokenizer);
NextCloser(tokenizer);
return new EnvelopeGeoShape(new[] { new GeoCoordinate(maxLat, minLon), new GeoCoordinate(minLat, maxLon) });
}
private static GeometryCollection ParseGeometryCollection(WellKnownTextTokenizer tokenizer)
{
if (NextEmptyOrOpen(tokenizer) == TokenType.Word)
return null;
var geometries = new List<IGeoShape>
{
Read(tokenizer, GeoShapeType.GeometryCollection)
};
while (NextCloserOrComma(tokenizer) == TokenType.Comma)
geometries.Add(Read(tokenizer, null));
return new GeometryCollection { Geometries = geometries };
}
private static List<IEnumerable<GeoCoordinate>> ParseCoordinateLists(WellKnownTextTokenizer tokenizer)
{
var coordinates = new List<IEnumerable<GeoCoordinate>>();
NextEmptyOrOpen(tokenizer);
coordinates.Add(ParseCoordinates(tokenizer));
while (NextCloserOrComma(tokenizer) == TokenType.Comma)
{
NextEmptyOrOpen(tokenizer);
coordinates.Add(ParseCoordinates(tokenizer));
}
return coordinates;
}
private static List<GeoCoordinate> ParseCoordinates(WellKnownTextTokenizer tokenizer)
{
var coordinates = new List<GeoCoordinate>();
if (IsNumberNext(tokenizer) || tokenizer.NextToken() == TokenType.LParen)
coordinates.Add(ParseCoordinate(tokenizer));
while (NextCloserOrComma(tokenizer) == TokenType.Comma)
{
var isOpenParen = false;
if (IsNumberNext(tokenizer) || (isOpenParen = tokenizer.NextToken() == TokenType.LParen))
coordinates.Add(ParseCoordinate(tokenizer));
if (isOpenParen)
NextCloser(tokenizer);
}
return coordinates;
}
private static GeoCoordinate ParseCoordinate(WellKnownTextTokenizer tokenizer)
{
var lon = NextNumber(tokenizer);
var lat = NextNumber(tokenizer);
double? z = null;
if (IsNumberNext(tokenizer))
z = NextNumber(tokenizer);
return z == null
? new GeoCoordinate(lat, lon)
: new GeoCoordinate(lat, lon, z.Value);
}
internal static void NextCloser(WellKnownTextTokenizer tokenizer)
{
if (tokenizer.NextToken() != TokenType.RParen)
throw new GeoWKTException(
$"Expected {(char)WellKnownTextTokenizer.RParen} " +
$"but found: {tokenizer.TokenString()}", tokenizer.LineNumber, tokenizer.Position);
}
private static void NextComma(WellKnownTextTokenizer tokenizer)
{
if (tokenizer.NextToken() != TokenType.Comma)
throw new GeoWKTException(
$"Expected {(char)WellKnownTextTokenizer.Comma} but found: {tokenizer.TokenString()}",
tokenizer.LineNumber,
tokenizer.Position);
}
internal static TokenType NextEmptyOrOpen(WellKnownTextTokenizer tokenizer)
{
var token = tokenizer.NextToken();
if (token == TokenType.LParen ||
token == TokenType.Word && tokenizer.TokenValue.Equals(WellKnownTextTokenizer.Empty, StringComparison.OrdinalIgnoreCase))
return token;
throw new GeoWKTException(
$"Expected {WellKnownTextTokenizer.Empty} or {(char)WellKnownTextTokenizer.LParen} " +
$"but found: {tokenizer.TokenString()}", tokenizer.LineNumber, tokenizer.Position);
}
private static TokenType NextCloserOrComma(WellKnownTextTokenizer tokenizer)
{
var token = tokenizer.NextToken();
if (token == TokenType.Comma || token == TokenType.RParen)
return token;
throw new GeoWKTException(
$"Expected {(char)WellKnownTextTokenizer.Comma} or {(char)WellKnownTextTokenizer.RParen} " +
$"but found: {tokenizer.TokenString()}", tokenizer.LineNumber, tokenizer.Position);
}
internal static double NextNumber(WellKnownTextTokenizer tokenizer)
{
if (tokenizer.NextToken() == TokenType.Word)
{
if (string.Equals(tokenizer.TokenValue, WellKnownTextTokenizer.NaN, StringComparison.OrdinalIgnoreCase))
return double.NaN;
if (double.TryParse(
tokenizer.TokenValue,
NumberStyles.AllowDecimalPoint | NumberStyles.AllowLeadingSign | NumberStyles.AllowExponent,
CultureInfo.InvariantCulture, out var d))
return d;
}
throw new GeoWKTException(
$"Expected number but found: {tokenizer.TokenString()}", tokenizer.LineNumber, tokenizer.Position);
}
internal static bool IsNumberNext(WellKnownTextTokenizer tokenizer)
{
var token = tokenizer.PeekToken();
return token == TokenType.Word;
}
}
/// <summary>
/// Character types when parsing Well-Known Text
/// </summary>
internal enum CharacterType : byte
{
Whitespace,
Alpha,
Comment
}
/// <summary>
/// Well-Known Text token types
/// </summary>
internal enum TokenType : byte
{
None,
Word,
LParen,
RParen,
Comma
}
/// <summary>
/// Tokenizes a sequence of characters into Well-Known Text
/// (WKT) <see cref="TokenType" />
/// </summary>
internal class WellKnownTextTokenizer : IDisposable
{
public const int CarriageReturn = '\r';
private const int CharacterTypesLength = 256;
public const int Comma = ',';
public const int Comment = '#';
public const int Dot = '.';
public const string Empty = "EMPTY";
public const int Linefeed = '\n';
public const int LParen = '(';
public const int Minus = '-';
public const string NaN = "NAN";
private const int NeedChar = int.MaxValue;
public const int Plus = '+';
public const int RParen = ')';
private static readonly CharacterType[] CharacterTypes = new CharacterType[CharacterTypesLength];
private readonly List<char> _buffer = new List<char>();
private readonly TextReader _reader;
private int _peekChar = NeedChar;
private bool _pushed;
static WellKnownTextTokenizer()
{
// build a map of ASCII chars and their types
// Any unmapped ASCII will be considered whitespace
// and anything > 0 outside of ASCII will be considered alpha.
Chars('a', 'z', CharacterType.Alpha);
Chars('A', 'Z', CharacterType.Alpha);
Chars(128 + 32, 255, CharacterType.Alpha);
Chars('0', '9', CharacterType.Alpha);
Chars(LParen, RParen, CharacterType.Alpha);
Chars(Plus, Plus, CharacterType.Alpha);
Chars(Comma, Comma, CharacterType.Alpha);
Chars(Minus, Dot, CharacterType.Alpha);
Chars(Comment, Comment, CharacterType.Comment);
}
public WellKnownTextTokenizer(TextReader reader) =>
_reader = reader ?? throw new ArgumentNullException(nameof(reader));
/// <summary>
/// Gets the current line number
/// </summary>
public int LineNumber { get; private set; } = 1;
/// <summary>
/// Gets the current position
/// </summary>
public int Position { get; private set; }
/// <summary>
/// Gets the current token type
/// </summary>
public TokenType TokenType { get; private set; } = TokenType.None;
/// <summary>
/// Gets the current token value
/// </summary>
public string TokenValue { get; private set; }
/// <summary>
/// Disposes of the reader from which characters are read
/// </summary>
public void Dispose() => _reader?.Dispose();
private static void Chars(int low, int high, CharacterType type)
{
if (low < 0)
low = 0;
if (high >= CharacterTypesLength)
high = CharacterTypesLength - 1;
while (low <= high)
CharacterTypes[low++] = type;
}
/// <summary>
/// A user friendly string for the current token
/// </summary>
public string TokenString()
{
switch (TokenType)
{
case TokenType.Word:
return TokenValue;
case TokenType.None:
return "END-OF-STREAM";
case TokenType.LParen:
return "(";
case TokenType.RParen:
return ")";
case TokenType.Comma:
return ",";
default:
return $"\'{(char)_peekChar}\'";
}
}
private int Read()
{
Position++;
return _reader.Read();
}
/// <summary>
/// Peeks at the next token without changing the state
/// of the reader
/// </summary>
public TokenType PeekToken()
{
var position = Position;
var token = NextToken();
Position = position;
_pushed = true;
return token;
}
/// <summary>
/// Gets the next token, advancing the position
/// </summary>
public TokenType NextToken()
{
if (_pushed)
{
_pushed = false;
// Add the length of peeked token
Position += !string.IsNullOrEmpty(TokenValue)
? 1 + TokenValue.Length
: 1;
return TokenType;
}
TokenValue = null;
var c = _peekChar;
if (c < 0)
c = NeedChar;
if (c == NeedChar)
{
c = Read();
if (c < 0)
return TokenType = TokenType.None;
}
// reset the peek character for next token
_peekChar = NeedChar;
var characterType = c < CharacterTypesLength
? CharacterTypes[c]
: CharacterType.Alpha;
// consume all whitespace
while (characterType == CharacterType.Whitespace)
{
if (c == CarriageReturn)
{
LineNumber++;
Position = 0;
c = Read();
if (c == Linefeed)
c = Read();
}
else
{
if (c == Linefeed)
{
LineNumber++;
Position = 0;
}
c = Read();
}
if (c < 0)
return TokenType = TokenType.None;
characterType = c < CharacterTypesLength
? CharacterTypes[c]
: CharacterType.Alpha;
}
switch (c)
{
case LParen:
return TokenType = TokenType.LParen;
case RParen:
return TokenType = TokenType.RParen;
case Comma:
return TokenType = TokenType.Comma;
}
if (characterType == CharacterType.Alpha)
{
var i = 0;
do
{
_buffer.Insert(i++, (char)c);
c = Read();
if (c < 0)
characterType = CharacterType.Whitespace;
else if (c < CharacterTypesLength)
{
if (c == LParen || c == RParen || c == Comma)
break;
characterType = CharacterTypes[c];
}
else
characterType = CharacterType.Alpha;
} while (characterType == CharacterType.Alpha);
_peekChar = c;
TokenValue = new string(_buffer.ToArray(), 0, i);
return TokenType = TokenType.Word;
}
if (characterType == CharacterType.Comment)
{
// consume all characters on comment line
while ((c = Read()) != Linefeed && c != CarriageReturn && c >= 0) { }
_peekChar = c;
return NextToken();
}
return TokenType = TokenType.None;
}
}
}
| 26.981949 | 125 | 0.691664 | [
"Apache-2.0"
] | Jiasyuan/elasticsearch-net | src/Nest/QueryDsl/Geo/WKT/GeoWKTReader.cs | 14,948 | C# |
using System.Text;
using System;
using System.Collections;
using System.Collections.Generic;
namespace Lexico
{
public interface IBuffer
{
int CodeUnitSize { get; }
int Length { get; }
int this[int idx] { get; }
IEnumerator<int> GetCodepointEnumerator();
IEnumerator<char> GetCharEnumerator();
}
public class StringBuffer : IBuffer
{
public StringBuffer(string str)
{
this.str = str ?? throw new ArgumentNullException(nameof(str));
}
private readonly string str;
public int CodeUnitSize => 2;
public int Length => str.Length;
public int this[int idx] => str[idx];
public IEnumerator<int> GetCodepointEnumerator()
=> new CodepointEnumerator(str);
public IEnumerator<char> GetCharEnumerator()
=> str.GetEnumerator();
private class CodepointEnumerator : IEnumerator<int>
{
public CodepointEnumerator(string str)
{
this.str = str;
}
private readonly string str;
private int idx;
public int Current => Char.ConvertToUtf32(str, idx);
object IEnumerator.Current => Current;
public void Dispose() { }
public bool MoveNext()
{
idx += Char.IsSurrogatePair(str, idx) ? 2 : 1;
return idx <= str.Length;
}
public void Reset()
{
idx = 0;
}
}
}
public class UTF8Buffer : IBuffer
{
private byte[] data;
public int CodeUnitSize => 1;
public int Length => data.Length;
public int this[int idx] => data[idx];
public IEnumerator<int> GetCodepointEnumerator()
{
throw new NotImplementedException();
}
public IEnumerator<char> GetCharEnumerator()
{
throw new NotImplementedException();
}
private class CodepointEnumerator : IEnumerator<int>
{
private byte[] data;
private int idx;
public int Current
{
get
{
var b0 = data[idx];
if (b0 < 0x80)
{
return b0;
}
int result;
result = data[idx + 1] & 0x3F;
if (b0 < 0xE0)
{
return ((b0 & 0x1F) << 6) + result;
}
result <<= 6;
result += data[idx + 2] & 0x3F;
if (b0 < 0xF0)
{
return ((b0 & 0x0F) << 12) + result;
}
result <<= 6;
result += data[idx + 3] & 0x3F;
return ((b0 & 0x07) << 18) + result;
}
}
object IEnumerator.Current => Current;
public void Dispose() {}
public bool MoveNext()
{
var b0 = data[idx];
idx += b0 < 0x80 ? 1 : (b0 < 0xE0 ? 2 : (b0 < 0xF0 ? 3 : 4));
return idx <= data.Length;
}
public void Reset()
{
idx = 0;
}
}
}
} | 27.4 | 77 | 0.443504 | [
"MIT"
] | hamish-milne/Lexico | Lexico/Buffer.cs | 3,425 | C# |
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
using Dromedary.Factories;
namespace Dromedary.Acceptance.Test
{
public partial class DromedaryRouteAcceptanceTest
{
internal class FakeComponent : IDromedaryComponent
{
public TaskCompletionSource<object> CompletionSource { get; set; }
public object Object { get; set; }
public int MaxExchangeGenerated { get; set; }
public IEndpoint CreateEndpoint()
=> new FakeEndpoint(CompletionSource, Object, MaxExchangeGenerated);
public void ConfigureProperties(Action<IDromedaryComponent> config)
{
if (config == null)
{
throw new ArgumentNullException(nameof(config));
}
config(this);
}
public async Task ConfigurePropertiesAsync(Func<IDromedaryComponent, Task> config)
{
if (config == null)
{
throw new ArgumentNullException(nameof(config));
}
await config(this);
}
public void ConfigureProperties(IDictionary<string, object> config)
{
}
}
internal class FakeEndpoint : IEndpoint
{
private readonly TaskCompletionSource<object> _completionSource;
private readonly object _obj;
private readonly int _maxExchangeGenerated;
public FakeEndpoint(TaskCompletionSource<object> completionSource, object obj, int maxExchangeGenerated)
{
_completionSource = completionSource;
_obj = obj;
_maxExchangeGenerated = maxExchangeGenerated;
}
public IProducer CreateProducer()
=> new FakeProducer(_obj, _completionSource, _maxExchangeGenerated);
public IConsumer CreateConsumer()
=> new FakeConsumer(_completionSource, _obj);
}
internal class FakeProducer : IProducer
{
private readonly TaskCompletionSource<object> _completionSource;
private readonly object _obj;
private readonly int _maxExchangeGenerated;
public FakeProducer(object obj, TaskCompletionSource<object> completionSource, int maxExchangeGenerated)
{
_obj = obj;
_completionSource = completionSource;
_maxExchangeGenerated = maxExchangeGenerated;
}
public IExchangeFactory Factory { get; set; }
public async Task ExecuteAsync(ChannelWriter<IExchange> channel, CancellationToken cancellationToken = default)
{
int counter = 0;
while (_maxExchangeGenerated > counter && !cancellationToken.IsCancellationRequested)
{
_completionSource.SetResult(counter);
await channel.WriteAsync(Factory.Create(), cancellationToken);
counter++;
}
}
}
internal class FakeConsumer : IConsumer, IProcessor
{
private readonly TaskCompletionSource<object> _completionSource;
private readonly object _obj;
public FakeConsumer(TaskCompletionSource<object> completionSource, object obj)
{
_completionSource = completionSource;
_obj = obj;
}
public ValueTask ExecuteAsync(IExchange exchange, CancellationToken cancellationToken = default)
{
_completionSource.SetResult(1);
return new ValueTask();
}
public IProcessor CreateProcessor(IServiceProvider provider)
{
return this;
}
}
}
}
| 34.307692 | 123 | 0.579721 | [
"Apache-2.0"
] | lillo42/dromedary | test/Dromedary.Acceptance.Test/DromedaryRouteAcceptanceTest.Component.cs | 4,014 | C# |
using BurningKnight.assets.lighting;
using BurningKnight.assets.particle.custom;
using BurningKnight.entity.component;
using Lens.entity;
using Lens.util;
using Lens.util.camera;
using Microsoft.Xna.Framework;
namespace BurningKnight.entity.item.use {
public class AddTorchUse : ItemUse {
private bool isOut;
private float lastFlame;
public override void Pickup(Entity entity, Item item) {
isOut = true;
// new Color(1f, 0.8f, 0.4f, 1f))
item.AddComponent(new LightComponent(item, 192f, new Color(1f, 0, 0, 1f)));
Log.Error("Add light");
}
public override void Drop(Entity entity, Item item) {
isOut = false;
item.RemoveComponent<LightComponent>();
Log.Error("Remove light");
}
public override void Update(Entity entity, Item item, float dt) {
base.Update(entity, item, dt);
if (isOut) {
lastFlame += dt;
if (lastFlame >= 0.3f) {
lastFlame = 0;
entity.Area.Add(new FireParticle {
Position = entity.Center + MathUtils.CreateVector(entity.AngleTo(entity.GetComponent<AimComponent>().Aim), 13),
Depth = Layers.Wall + 1
});
}
}
}
}
} | 25.681818 | 117 | 0.682301 | [
"MIT"
] | Cuber01/BurningKnight | BurningKnight/entity/item/use/AddTorchUse.cs | 1,130 | C# |
// This file is provided under The MIT License as part of Steamworks.NET.
// Copyright (c) 2013-2019 Riley Labrecque
// Please see the included LICENSE.txt for additional information.
// This file is automatically generated.
// Changes to this file will be reverted when you update Steamworks.NET
#if UNITY_ANDROID || UNITY_IOS || UNITY_TIZEN || UNITY_TVOS || UNITY_WEBGL || UNITY_WSA || UNITY_PS4 || UNITY_WII || UNITY_XBOXONE || UNITY_SWITCH
#define DISABLESTEAMWORKS
#endif
#if !DISABLESTEAMWORKS
using System.Runtime.InteropServices;
using IntPtr = System.IntPtr;
namespace Steamworks
{
[System.Serializable]
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SteamIPAddress_t
{
private long m_ip0;
private long m_ip1;
private ESteamIPType m_eType;
public SteamIPAddress_t(System.Net.IPAddress iPAddress)
{
byte[] bytes = iPAddress.GetAddressBytes();
switch (iPAddress.AddressFamily)
{
case System.Net.Sockets.AddressFamily.InterNetwork:
{
if (bytes.Length != 4)
{
throw new System.TypeInitializationException("SteamIPAddress_t: Unexpected byte length for Ipv4." + bytes.Length, null);
}
m_ip0 = (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3];
m_ip1 = 0;
m_eType = ESteamIPType.k_ESteamIPTypeIPv4;
break;
}
case System.Net.Sockets.AddressFamily.InterNetworkV6:
{
if (bytes.Length != 16)
{
throw new System.TypeInitializationException("SteamIPAddress_t: Unexpected byte length for Ipv6: " + bytes.Length, null);
}
m_ip0 = (bytes[1] << 56) | (bytes[0] << 48) | (bytes[3] << 40) | (bytes[2] << 32) | (bytes[5] << 24) | (bytes[4] << 16) | (bytes[7] << 8) | bytes[6];
m_ip1 = (bytes[9] << 56) | (bytes[8] << 48) | (bytes[11] << 40) | (bytes[10] << 32) | (bytes[13] << 24) | (bytes[12] << 16) | (bytes[15] << 8) | bytes[14];
m_eType = ESteamIPType.k_ESteamIPTypeIPv6;
break;
}
default:
{
throw new System.TypeInitializationException("SteamIPAddress_t: Unexpected address family " + iPAddress.AddressFamily, null);
}
}
}
public System.Net.IPAddress ToIPAddress()
{
if (m_eType == ESteamIPType.k_ESteamIPTypeIPv4)
{
byte[] bytes = System.BitConverter.GetBytes(m_ip0);
return new System.Net.IPAddress(new byte[] { bytes[3], bytes[2], bytes[1], bytes[0] });
}
else
{
byte[] bytes = new byte[16];
System.BitConverter.GetBytes(m_ip0).CopyTo(bytes, 0);
System.BitConverter.GetBytes(m_ip1).CopyTo(bytes, 8);
return new System.Net.IPAddress(bytes);
}
}
public override string ToString()
{
return ToIPAddress().ToString();
}
public ESteamIPType GetIPType()
{
return m_eType;
}
public bool IsSet()
{
return m_ip0 != 0 || m_ip1 != 0;
}
}
}
#endif // !DISABLESTEAMWORKS
| 28.836735 | 160 | 0.660651 | [
"MIT"
] | 0lento/Steamworks.NET | Plugins/Steamworks.NET/types/SteamTypes/SteamIPAddress_t.cs | 2,826 | C# |
using System.Text;
using DidacticalEnigma.Core.Models.LanguageService;
using NUnit.Framework;
namespace AutomatedTests
{
[TestFixture]
class KanaPropertiesTests
{
public static readonly TestCaseData[] HiraganaConversion =
{
new TestCaseData("ドキドキ", "どきどき"),
new TestCaseData("キョウ", "きょう"),
};
public static IKanaProperties kana;
[OneTimeSetUp]
public void SetUp()
{
kana = new KanaProperties2(TestDataPaths.Kana, Encoding.UTF8);
}
[TestCaseSource(nameof(HiraganaConversion))]
public void ToHiragana(string input, string expected)
{
Assert.AreEqual(expected, kana.ToHiragana(input));
}
}
}
| 25.290323 | 75 | 0.593112 | [
"MIT"
] | DidacticalEnigma/DidacticalEnigma.Core | AutomatedTests.Common/KanaPropertiesTests.cs | 814 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace Gandalan.IDAS.WebApi.Data.DTOs.AV
{
public class AVReserviertItemDTO
{
public string Variante { get; set; }
public int Menge { get; set; }
public string Kommission { get; set; }
public string Kunde { get; set; }
public long VorgangsNummer { get; set; }
public Guid VorgangGuid { get; set; }
public long BelegNummer { get; set; }
}
}
| 25.315789 | 48 | 0.629938 | [
"MIT"
] | Saibamen/idas-client-libs | Gandalan.IDAS.WebApi.Client/DTOs/AV/AVReserviertItemDTO.cs | 483 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Demo.Web
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddHttpClient("products", c=> {
c.BaseAddress = new Uri("https://localhost:44360");
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
}
}
}
| 29.683333 | 143 | 0.606401 | [
"MIT"
] | MukeshBisht/Demo | Demo.Web/Startup.cs | 1,781 | C# |
using System;
namespace Web.AutoFiles
{
public class T6_Plan
{
public T6_Plan()
{
}
public string ID { get; set; }
public string YM { get; set; }
public string FileName { get; set; }
public string FileNameS { get; set; }
public string UploadTime { get; set; }
public bool Select(ref string sql, string where)
{
sql = ""
+ " select "
+ " T6_Plan.ID "
+ ",T6_Plan.YM "
+ ",T6_Plan.FileName "
+ ",T6_Plan.FileNameS "
+ ",T6_Plan.UploadTime "
+ " from [HLAQSC].dbo.T6_Plan "
+ " where 1=1 ";
if (String.IsNullOrEmpty(where))
{
sql += " and T6_Plan.ID = '" + ID + "' ";
}
else
{
sql += where;
}
return true;
}
public bool Insert(ref string sql)
{
sql = "";
sql += " insert into [HLAQSC].dbo.T6_Plan( ";
int count = 0;
if (!String.IsNullOrEmpty(ID))
{
count++;
sql += (count > 1 ? "," : " ") + "ID ";
}
if (!String.IsNullOrEmpty(YM))
{
count++;
sql += (count > 1 ? "," : " ") + "YM ";
}
if (!String.IsNullOrEmpty(FileName))
{
count++;
sql += (count > 1 ? "," : " ") + "FileName ";
}
if (!String.IsNullOrEmpty(FileNameS))
{
count++;
sql += (count > 1 ? "," : " ") + "FileNameS ";
}
if (!String.IsNullOrEmpty(UploadTime))
{
count++;
sql += (count > 1 ? "," : " ") + "UploadTime ";
}
sql += " ) ";
sql += " select ";
count = 0;
if (!String.IsNullOrEmpty(ID))
{
count++;
sql += (count > 1 ? "," : " ") + "'" + ID + "' ";
}
if (!String.IsNullOrEmpty(YM))
{
count++;
sql += (count > 1 ? "," : " ") + "'" + YM + "' ";
}
if (!String.IsNullOrEmpty(FileName))
{
count++;
sql += (count > 1 ? "," : " ") + "'" + FileName + "' ";
}
if (!String.IsNullOrEmpty(FileNameS))
{
count++;
sql += (count > 1 ? "," : " ") + "'" + FileNameS + "' ";
}
if (!String.IsNullOrEmpty(UploadTime))
{
count++;
sql += (count > 1 ? "," : " ") + "'" + UploadTime + "' ";
}
if (count > 0)
{
return true;
}
else
{
return false;
}
}
public bool Update(ref string sql, string where)
{
sql = ""
+ " update [HLAQSC].dbo.T6_Plan "
+ " set "
+ " T6_Plan.ID = '" + ID + "' "
+ ",T6_Plan.YM = '" + YM + "' "
+ ",T6_Plan.FileName = '" + FileName + "' "
+ ",T6_Plan.FileNameS = '" + FileNameS + "' "
+ ",T6_Plan.UploadTime = '" + UploadTime + "' "
+ " where 1=1 ";
if (String.IsNullOrEmpty(where))
{
sql += " and T6_Plan.ID = '" + ID + "' ";
}
else
{
sql += where;
}
return true;
}
public bool Update_1(ref string sql, string where)
{
sql = "";
sql += " update [HLAQSC].dbo.T6_Plan "
+ " set ";
int count = 0;
if (!String.IsNullOrEmpty(ID))
{
count++;
sql += (count > 1 ? "," : " ") + "ID = '" + ID + "' ";
}
if (!String.IsNullOrEmpty(YM))
{
count++;
sql += (count > 1 ? "," : " ") + "YM = '" + YM + "' ";
}
if (!String.IsNullOrEmpty(FileName))
{
count++;
sql += (count > 1 ? "," : " ") + "FileName = '" + FileName + "' ";
}
if (!String.IsNullOrEmpty(FileNameS))
{
count++;
sql += (count > 1 ? "," : " ") + "FileNameS = '" + FileNameS + "' ";
}
if (!String.IsNullOrEmpty(UploadTime))
{
count++;
sql += (count > 1 ? "," : " ") + "UploadTime = '" + UploadTime + "' ";
}
sql += " where 1=1 ";
if (String.IsNullOrEmpty(where))
{
sql += " and T6_Plan.ID = '" + ID + "' ";
}
else
{
sql += where;
}
return true;
}
public bool Delete(ref string sql, string where)
{
sql = ""
+ " delete [HLAQSC].dbo.T6_Plan "
+ " where 1=1 ";
if (String.IsNullOrEmpty(where))
{
sql += " and T6_Plan.ID = '" + ID + "' ";
}
else
{
sql += where;
}
return true;
}
}
} | 58.223684 | 644 | 0.40226 | [
"Apache-2.0"
] | nnugaoz/HLAQSC | Web/AutoFiles/T6_Plan.cs | 4,425 | C# |
// Copyright © 2015 - Present RealDimensions Software, LLC
//
// 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.
namespace chocolatey.package.validator.infrastructure.app.services
{
using System;
using System.Collections.Generic;
using NuGet;
using configuration;
using infrastructure.rules;
using locators;
using IPackageRule = infrastructure.rules.IPackageRule;
public class PackageValidationService : IPackageValidationService
{
private readonly ITypeLocator _typeLocator;
private readonly IConfigurationSettings _configurationSettings;
private IList<IPackageRule> _rules = new List<IPackageRule>();
public PackageValidationService(ITypeLocator typeLocator, IConfigurationSettings configurationSettings)
{
_typeLocator = typeLocator;
_configurationSettings = configurationSettings;
load_rules();
}
public void load_rules()
{
_rules.Clear();
foreach (var packageRule in _typeLocator.get_types_that_inherit_or_implement<IPackageRule>().or_empty_list_if_null())
{
var rule = Activator.CreateInstance(packageRule) as IPackageRule;
if (rule != null)
{
_rules.Add(rule);
}
}
}
public IEnumerable<IPackageRule> Rules { get { return _rules; } }
public IEnumerable<PackageValidationResult> validate_package(IPackage package)
{
IList<PackageValidationResult> results = new List<PackageValidationResult>();
if (package == null)
{
results.Add(new PackageValidationResult(false, "Something went very wrong. There is no package to validate. Please repush package. If you receive this message again, contact the site admins.", ValidationLevelType.Requirement));
}
else if (package.Id.is_equal_to("chocolatey"))
{
results.Add(new PackageValidationResult(true, "The chocolatey package skips the validation as it should be doing most things that would fail validation.", ValidationLevelType.Note));
}
else
{
foreach (var rule in Rules.or_empty_list_if_null())
{
results.Add(rule.validate(package, _configurationSettings.ProxyAddress, _configurationSettings.ProxyUserName, _configurationSettings.ProxyPassword));
}
}
return results;
}
}
}
| 39.987342 | 244 | 0.641975 | [
"Apache-2.0"
] | chocolatey/package-validator | src/chocolatey.package.validator/infrastructure.app/services/PackageValidationService.cs | 3,162 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.