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 (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Processing.Processors.Filters
{
/// <summary>
/// Applies a lightness filter matrix using the given amount.
/// </summary>
public sealed class LightnessProcessor : FilterProcessor
{
/// <summary>
/// Initializes a new instance of the <see cref="LightnessProcessor"/> class.
/// </summary>
/// <remarks>
/// A value of <value>0</value> will create an image that is completely black. A value of <value>1</value> leaves the input unchanged.
/// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing lighter results.
/// </remarks>
/// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param>
public LightnessProcessor(float amount)
: base(KnownFilterMatrices.CreateLightnessFilter(amount))
{
this.Amount = amount;
}
/// <summary>
/// Gets the proportion of the conversion
/// </summary>
public float Amount { get; }
}
}
| 38.83871 | 142 | 0.63289 | [
"Apache-2.0"
] | GyleIverson/ImageSharp | src/ImageSharp/Processing/Processors/Filters/LightnessProcessor.cs | 1,204 | C# |
namespace DigitalLearningSolutions.Data.DataServices
{
using System.Data;
using Dapper;
public interface ISessionDataService
{
int StartOrRestartDelegateSession(int candidateId, int customisationId);
void StopDelegateSession(int candidateId);
void UpdateDelegateSessionDuration(int sessionId);
int StartAdminSession(int adminId);
}
public class SessionDataService : ISessionDataService
{
private const string stopSessionsSql =
@"UPDATE Sessions SET Active = 0
WHERE CandidateId = @candidateId;";
private readonly IDbConnection connection;
public SessionDataService(IDbConnection connection)
{
this.connection = connection;
}
public int StartOrRestartDelegateSession(int candidateId, int customisationId)
{
return connection.QueryFirst<int>(
stopSessionsSql +
@"INSERT INTO Sessions (CandidateID, CustomisationID, LoginTime, Duration, Active)
VALUES (@candidateId, @customisationId, GetUTCDate(), 0, 1);
SELECT SCOPE_IDENTITY();",
new { candidateId, customisationId }
);
}
public void StopDelegateSession(int candidateId)
{
connection.Query(stopSessionsSql, new { candidateId });
}
public void UpdateDelegateSessionDuration(int sessionId)
{
connection.Query(
@"UPDATE Sessions SET Duration = DATEDIFF(minute, LoginTime, GetUTCDate())
WHERE [SessionID] = @sessionId AND Active = 1;",
new { sessionId }
);
}
public int StartAdminSession(int adminId)
{
return connection.QueryFirst<int>(
@"INSERT INTO AdminSessions (AdminID, LoginTime, Duration, Active)
VALUES (@adminId, GetUTCDate(), 0, 0);
SELECT SCOPE_IDENTITY();",
new { adminId });
}
}
}
| 31.8 | 98 | 0.594582 | [
"MIT"
] | TechnologyEnhancedLearning/DLSV2 | DigitalLearningSolutions.Data/DataServices/SessionDataService.cs | 2,069 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using FluentNest.Tests.Model;
using Nest;
using NFluent;
using Tests;
using Xunit;
using User = FluentNest.Tests.Model.User;
namespace FluentNest.Tests
{
public class GroupByTests : TestsBase
{
public string AddSimpleTestData()
{
var indexName = "index_" + Guid.NewGuid();
Client.CreateIndex(indexName, x => x.Mappings(
m => m.Map<Car>(t => t
.Properties(prop => prop.Keyword(str => str.Name(s => s.EngineType)))
.Properties(prop => prop.Text(str => str.Name(s => s.CarType).Fielddata()))
)));
for (int i = 0; i < 10; i++)
{
var car = new Car
{
Id = Guid.NewGuid(),
Timestamp = new DateTime(2010, i + 1, 1),
Name = "Car" + i,
Price = 10,
Sold = i % 2 == 0,
CarType = "Type" + i % 3,
Length = i,
EngineType = i % 2 == 0 ? EngineType.Diesel : EngineType.Standard,
Weight = 5,
ConditionalRanking = i % 2 == 0 ? null : (int?)i,
Description = "Desc" + i,
};
Client.Index(car, ind => ind.Index(indexName));
}
Client.Flush(indexName);
return indexName;
}
[Fact]
public void NestedGroupBy()
{
var index = AddSimpleTestData();
// The standard NEST way without FluentNest
var result = Client.Search<Car>(s => s.Index(index)
.Aggregations(fstAgg => fstAgg
.Terms("firstLevel", f => f
.Field(z => z.CarType)
.Aggregations(sndLevel => sndLevel
.Terms("secondLevel", f2 => f2.Field(f3 => f3.EngineType)
.Aggregations(sums => sums
.Sum("priceSum", son => son
.Field(f4 => f4.Price))
)
)
)
)
)
);
var carTypesAgg = result.Aggs.Terms("firstLevel");
foreach (var carType in carTypesAgg.Buckets)
{
var engineTypes = carType.Terms("secondLevel");
foreach (var engineType in engineTypes.Buckets)
{
var priceSum = (decimal)engineType.Sum("priceSum").Value;
Check.That(priceSum).IsPositive();
}
}
// Now with FluentNest
result =Client.Search<Car>(search => search.Index(index).Aggregations(agg => agg
.SumBy(s => s.Price)
.GroupBy(s => s.EngineType)
.GroupBy(b => b.CarType)
));
var aggsContainer = result.Aggs.AsContainer<Car>();
var carTypes = aggsContainer.GetGroupBy(x => x.CarType).ToList();
Check.That(carTypes).HasSize(3);
foreach (var carType in carTypes)
{
var container = carType.AsContainer<Car>();
var engineTypes = container.GetGroupBy(x => x.EngineType, k => new CarType
{
Type = k.Key,
Price = k.GetSum<Car, decimal>(x => x.Price)
}).ToList();
Check.That(engineTypes).HasSize(2);
Check.That(engineTypes.First().Price).Equals(20m);
}
Client.DeleteIndex(index);
}
[Fact]
public void GetDictionaryFromGroupBy()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(sc => sc.Index(index).Aggregations(agg => agg
.SumBy(s => s.Price)
.GroupBy(s => s.EngineType))
);
var aggsContainer = result.Aggs.AsContainer<Car>();
var carTypesList = result.Aggs.GetGroupBy<Car>(x => x.EngineType);
var carTypesDictionary = aggsContainer.GetDictionary(x => x.EngineType);
Check.That(carTypesDictionary).HasSize(2);
Check.That(carTypesList).HasSize(2);
Check.That(carTypesDictionary.Keys).ContainsExactly(EngineType.Diesel, EngineType.Standard);
Client.DeleteIndex(index);
}
[Fact]
public void GetDictionaryWithDecimalKeysFromGroupBy()
{
var index = AddSimpleTestData();
var result =
Client.Search<Car>(search => search.Index(index).Aggregations(x => x.GroupBy(s => s.Price)));
var aggsContainer = result.Aggs.AsContainer<Car>();
var carTypes = aggsContainer.GetDictionary(x => x.Price);
Check.That(carTypes).HasSize(1);
Check.That(carTypes.Keys).ContainsExactly(10m);
Client.DeleteIndex(index);
}
[Fact]
public void GroupByStringKeys()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index).Aggregations(agg => agg
.SumBy(s => s.Price)
.GroupBy("engineType")
));
var engineTypes = result.Aggs.GetGroupBy("engineType");
Check.That(engineTypes).HasSize(2);
Client.DeleteIndex(index);
}
[Fact]
public void DynamicGroupByListOfKeys()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index).Aggregations(agg => agg
.SumBy(s => s.Price)
.GroupBy(new List<string> { "engineType", "carType" })
));
var engineTypes = result.Aggs.GetGroupBy("engineType").ToList();
Check.That(engineTypes).HasSize(2);
foreach (var engineType in engineTypes)
{
var carTypes = engineType.GetGroupBy("carType");
Check.That(carTypes).HasSize(3);
}
Client.DeleteIndex(index);
}
[Fact]
public void Distinct_Test()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index).Aggregations(agg => agg
.DistinctBy(x => x.CarType)
.DistinctBy(x => x.EngineType)
));
var engineTypes = result.Aggs.GetDistinct<Car, EngineType>(x => x.EngineType).ToList();
var container = result.Aggs.AsContainer<Car>();
var distinctCarTypes = container.GetDistinct(x => x.CarType).ToList();
Check.That(distinctCarTypes).IsNotNull();
Check.That(distinctCarTypes).HasSize(3);
Check.That(distinctCarTypes).ContainsExactly("type0", "type1", "type2");
Check.That(engineTypes).IsNotNull();
Check.That(engineTypes).HasSize(2);
Check.That(engineTypes).ContainsExactly(EngineType.Diesel, EngineType.Standard);
Client.DeleteIndex(index);
}
[Fact]
public void Simple_Filtered_Distinct_Test()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index)
.FilterOn(f=> f.CarType == "type0")
.Aggregations(agg => agg
.DistinctBy(x => x.CarType)
.DistinctBy(x => x.EngineType)
)
);
var distinctCarTypes = result.Aggs.GetDistinct<Car, string>(x => x.CarType).ToList();
var engineTypes = result.Aggs.GetDistinct<Car, EngineType>(x => x.EngineType).ToList();
Check.That(distinctCarTypes).IsNotNull();
Check.That(distinctCarTypes).HasSize(1);
Check.That(distinctCarTypes).ContainsExactly("type0");
Check.That(engineTypes).IsNotNull();
Check.That(engineTypes).HasSize(2);
Check.That(engineTypes).ContainsExactly(EngineType.Diesel, EngineType.Standard);
Client.DeleteIndex(index);
}
[Fact]
public void Distinct_Time_And_Term_Filter_Test()
{
var index = AddSimpleTestData();
var filter = Filters.CreateFilter<Car>(x => x.Timestamp > new DateTime(2010,2,1) && x.Timestamp < new DateTime(2010, 8, 1))
.AndFilteredOn<Car>(x => x.CarType == "type0");
var result = Client.Search<Car>(sc => sc.Index(index).FilterOn(filter).Aggregations(agg => agg
.DistinctBy(x => x.CarType)
.DistinctBy(x => x.EngineType)
));
var distinctCarTypes = result.Aggs.GetDistinct<Car, string>(x => x.CarType).ToList();
var engineTypes = result.Aggs.GetDistinct<Car, EngineType>(x => x.EngineType).ToList();
Check.That(distinctCarTypes).IsNotNull();
Check.That(distinctCarTypes).HasSize(1);
Check.That(distinctCarTypes).ContainsExactly("type0");
Check.That(engineTypes).IsNotNull();
Check.That(engineTypes).HasSize(2);
Check.That(engineTypes).ContainsExactly(EngineType.Diesel, EngineType.Standard);
Client.DeleteIndex(index);
}
[Fact]
public void Terms_Aggregation_Big_Size()
{
var index = CreateUsersIndex(200, 20);
var result = Client.Search<User>(sc => sc.Index(index).Aggregations(agg => agg.DistinctBy(x=>x.Nationality)));
var nationalities = result.Aggs.GetDistinct<User, string>(x => x.Nationality).ToList();
Check.That(nationalities).IsNotNull();
Check.That(nationalities).HasSize(20);
}
[Fact]
public void GroupBy_With_TopHits_Specifying_Properties_To_Fetch()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index).Aggregations(agg => agg
//get name and weight for each retrived document
.TopHits(3, x => x.Name, x => x.Weight)
.GroupBy(b => b.CarType)
));
var carTypes = result.Aggs.GetGroupBy<Car>(x => x.CarType).ToList();
Check.That(carTypes).HasSize(3);
foreach (var carType in carTypes)
{
var hits = carType.GetTopHits<Car>().ToList();
Check.That(hits).HasSize(3);
// we have asked only for name and weights
Check.That(hits[0].Name).IsNotNull();
Check.That(hits[0].Weight).IsNotNull();
// description must be null
Check.That(hits[0].Description).IsNull();
}
Client.DeleteIndex(index);
}
[Fact]
public void GroupBy_With_TopHits_NoProperties_GetsWholeSource()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index).Aggregations(x => x
.TopHits(3)
.GroupBy(b => b.CarType))
);
var carTypes = result.Aggs.GetGroupBy<Car>(x => x.CarType).ToList();
Check.That(carTypes).HasSize(3);
foreach (var carType in carTypes)
{
var hits = carType.GetTopHits<Car>().ToList();
Check.That(hits).HasSize(3);
Check.That(hits[0].Name).IsNotNull();
Check.That(hits[0].Weight).IsNotNull();
Check.That(hits[0].Description).IsNotNull();
}
Client.DeleteIndex(index);
}
[Fact]
public void TopHits_In_Double_GroupBy()
{
var indexName = CreateUsersIndex(250, 2);
var result = Client.Search<User>(search => search.Index(indexName).Aggregations(agg => agg
.TopHits(40, x => x.Name)
.GroupBy(b => b.Active)
.GroupBy(b => b.Nationality))
);
var userByNationality = result.Aggs.GetGroupBy<User>(x => x.Nationality).ToList();
Check.That(userByNationality).HasSize(2);
foreach (var nationality in userByNationality)
{
var byActive = nationality.GetGroupBy<User>(x => x.Active).ToList();
var activeUsers = byActive[0];
var inactiveUser = byActive[1];
var hits = activeUsers.GetTopHits<User>().ToList();
Check.That(hits).HasSize(40);
Check.That(hits[0].Name).IsNotNull();
hits = inactiveUser.GetTopHits<User>().ToList();
Check.That(hits).HasSize(40);
Check.That(hits[0].Name).IsNotNull();
}
}
private string CreateUsersIndex(int size, int nationalitiesCount)
{
var indexName = "index_" + Guid.NewGuid();
Client.CreateIndex(indexName, x => x.Mappings(
m => m.Map<User>(t => t
.Properties(prop => prop.Text(str => str.Name(s => s.Nationality).Fielddata()))
.Properties(prop => prop.Text(str => str.Name(s => s.Name).Fielddata()))
.Properties(prop => prop.Text(str => str.Name(s => s.Email).Fielddata()))
)));
var users = new List<User>();
for (int i = 0; i < size; i++)
{
var user = new User
{
Id = Guid.NewGuid(),
Name = "User" + i,
Nationality = "Nationality" + i % nationalitiesCount,
Active = i%3 == 0,
Age = (i + 1) % 10
};
users.Add(user);
}
Client.Bulk(x => x.CreateMany(users).Index(indexName));
Client.Flush(indexName);
return indexName;
}
[Fact]
public void TopHits_Sorted_SettingSize()
{
var index = CreateUsersIndex(100, 10);
var result = Client.Search<User>(search => search.Index(index).Aggregations(agg => agg
// get 40 first users, sort by name. for each user retrieve name and email
.SortedTopHits(40, x=>x.Name, SortType.Ascending, x => x.Name, y=>y.Email)
.SortedTopHits(40, x=>x.Name, SortType.Descending, x=>x.Name, y=>y.Email)
.SumBy(x=>x.Age)
.GroupBy(b => b.Nationality))
);
var userByNationality = result.Aggs.GetGroupBy<User>(x => x.Nationality).ToList();
Check.That(userByNationality).HasSize(10);
var firstNotionality = userByNationality.Single(x => x.Key == "nationality0");
var ascendingHits = firstNotionality.GetSortedTopHits<User>(x => x.Name, SortType.Ascending).ToList();
Check.That(ascendingHits).HasSize(10);
Check.That(ascendingHits[0].Name).IsNotNull();
Check.That(firstNotionality.GetSum<User, int>(x => x.Age)).Equals(10);
Check.That(ascendingHits[0].Name).Equals("User0");
Check.That(ascendingHits[1].Name).Equals("User10");
Check.That(ascendingHits[2].Name).Equals("User20");
Check.That(ascendingHits[3].Name).Equals("User30");
var descendingHits = firstNotionality.GetSortedTopHits<User>(x => x.Name, SortType.Descending).ToList();
Check.That(descendingHits).HasSize(10);
Check.That(descendingHits[0].Name).IsNotNull();
Check.That(descendingHits[0].Name).Equals("User90");
Check.That(descendingHits[1].Name).Equals("User80");
Check.That(descendingHits[2].Name).Equals("User70");
Check.That(descendingHits[3].Name).Equals("User60");
}
[Fact]
public void GettingNonExistingGroup_Test()
{
var index = AddSimpleTestData();
var result = Client.Search<Car>(search => search.Index(index).Aggregations(agg => agg
.GroupBy(b => b.Emissions)
));
var exception = Record.Exception(() => result.Aggs.GetGroupBy<Car>(x => x.CarType));
Assert.NotNull(exception);
Assert.IsType<InvalidOperationException>(exception);
Check.That(exception.Message).Contains("Available aggregations: GroupByEmissions");
}
[Fact]
public void NoAggregations_On_The_Result_Test()
{
// no data - no aggregations on the result
var result = Client.Search<Car>(search => search.Aggregations(agg => agg
.GroupBy(b => b.Emissions)
));
var exception = Record.Exception(() => result.Aggs.GetGroupBy<Car>(x => x.CarType));
Assert.NotNull(exception);
Assert.IsType<InvalidOperationException>(exception);
Check.That(exception.Message).Contains("No aggregations");
}
}
}
| 38.964045 | 135 | 0.528173 | [
"MIT"
] | forki/fluentnest | FluentNest.Tests/GroupByTests.cs | 17,341 | C# |
using System;
using System.Collections.Generic;
/// <summary>
/// This corresponds roughly to figure 1 of the paper, and is separate from
/// the other examples so we can use 'using static' in the driver without
/// polluting A and B with each other's monoids.
/// </summary>
namespace MonoidExamples
{
using static Monoid;
concept Monoid<A>
{
A BinaryOp(A x, A y);
A Identity();
}
// Scala:
// trait Monoid[A] {
// def binary_op (x: A, y: A) : A
// def identity : A
// }
static class Monoid
{
public static A Acc<A, implicit M>(List<A> l) where M : Monoid<A>
{
// We don't have left folds!
A result = M.Identity();
foreach (A a in l)
{
result = M.BinaryOp(result, a);
}
return result;
}
// Scala:
// def acc[A] (l: List[A]) (implicit m: Monoid[A]) : A =
// l.foldLeft (m.identity) ((x, y) => m.binary_op (x, y))
}
static class A
{
public instance SumMonoid : Monoid<int>
{
int BinaryOp(int x, int y) => x + y;
int Identity() => 0;
}
public static int Sum(List<int> l) => Acc(l);
}
// Scala:
// object A {
// implicit object SumMonoid extends Monoid[Int] {
// def binary_op (x: Int, y: Int) = x + y
// def Identity() => 0
// }
// def sum (l: List[Int]) : Int = acc(l)
// }
static class B
{
public instance ProdMonoid : Monoid<int>
{
int BinaryOp(int x, int y) => x * y;
int Identity() => 1;
}
public static int Product(List<int> l) => Acc(l);
}
// Scala:
// object B {
// implicit object ProdMonoid extends Monoid[Int] {
// def binary_op (x: Int, y: Int) = x * y
// def Identity() => 1
// }
// def product (l: List[Int]) : Int = acc(l)
// }
}
/// <summary>
/// C# encoding of examples from section 3 of d. S. Oliviera et al.
/// </summary>
namespace TCOIExamples
{
// For Acc.
using static MonoidExamples.Monoid;
// This is as close as we get to Scala's import keyword.
using static MonoidExamples.A;
using static MonoidExamples.B;
static class Section3
{
public static void Examples()
{
// Figure 1: Locally scoped implicits.
//
// This is less compelling than Scala because we don't have Scala's
// import method. We have 'using static', but we have to do
// namespace-fu to allow the monoid instances to be public while not
// importing each other by accident.
Console.Out.WriteLine("> l = List(1, 2, 3, 4, 5)");
var l = new List<int> { 1, 2, 3, 4, 5 };
Console.Out.WriteLine($"> Sum(l) = {Sum(l)}");
Console.Out.WriteLine($"> Product(l) = {Product(l)}");
Console.Out.WriteLine($"> Acc(ProdMonoid) (l) = {Acc<int, ProdMonoid>(l)}");
}
}
} | 27.26087 | 88 | 0.507177 | [
"Apache-2.0"
] | ElanHasson/roslyn | concepts/code/TCOIExamples/Section3.cs | 3,137 | C# |
using Eddi;
using EddiCore;
using EddiDataDefinitions;
using EddiDataProviderService;
using EddiEvents;
using EddiStarMapService;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Threading;
using Utilities;
namespace EddiMissionMonitor
{
/**
* Monitor missions for the commander
*/
public class MissionMonitor : EDDIMonitor
{
// Keep track of status
private bool running;
// Observable collection for us to handle changes
public ObservableCollection<Mission> missions { get; private set; }
private DateTime updateDat;
public int goalsCount;
public int missionsCount;
public int? missionWarning;
public string missionsRouteList;
public decimal missionsRouteDistance;
private readonly IEdsmService edsmService;
private readonly DataProviderService dataProviderService;
private static readonly object missionsLock = new object();
public event EventHandler MissionUpdatedEvent;
public string MonitorName()
{
return "Mission monitor";
}
public string LocalizedMonitorName()
{
return Properties.MissionMonitor.mission_monitor_name;
}
public string MonitorDescription()
{
return Properties.MissionMonitor.mission_monitor_desc;
}
public bool IsRequired()
{
return true;
}
public MissionMonitor() : this(null)
{ }
public MissionMonitor(IEdsmService edsmService)
{
this.edsmService = edsmService ?? new StarMapService();
dataProviderService = new DataProviderService(edsmService);
missions = new ObservableCollection<Mission>();
BindingOperations.CollectionRegistering += Missions_CollectionRegistering;
initializeMissionMonitor();
}
public void initializeMissionMonitor(MissionMonitorConfiguration configuration = null)
{
readMissions(configuration);
Logging.Info($"Initialized {MonitorName()}");
}
private void Missions_CollectionRegistering(object sender, CollectionRegisteringEventArgs e)
{
if (Application.Current != null)
{
// Synchronize this collection between threads
BindingOperations.EnableCollectionSynchronization(missions, missionsLock);
}
else
{
// If started from VoiceAttack, the dispatcher is on a different thread. Invoke synchronization there.
Dispatcher.CurrentDispatcher.Invoke(() => { BindingOperations.EnableCollectionSynchronization(missions, missionsLock); });
}
}
public bool NeedsStart()
{
return true;
}
public void Start()
{
_start();
}
public void Stop()
{
running = false;
}
public void Reload()
{
readMissions();
Logging.Info($"Reloaded {MonitorName()}");
}
public void _start()
{
running = true;
while (running)
{
List<Mission> missionsList;
lock (missionsLock)
{
missionsList = missions.ToList();
}
foreach (Mission mission in missionsList)
{
if (mission.expiry != null && mission.statusEDName == "Active")
{
// Generate 'Expired' and 'Warning' events when conditions met
if (mission.expiry < DateTime.UtcNow)
{
if (mission.communal)
{
if (mission.reward is null)
{
RemoveMission(mission);
}
else
{
mission.statusDef = MissionStatus.FromEDName("Claim");
}
}
else
{
EDDI.Instance.enqueueEvent(new MissionExpiredEvent(DateTime.UtcNow, mission.missionid, mission.name));
}
}
else if (mission.expiry < DateTime.UtcNow.AddMinutes(missionWarning ?? Constants.missionWarningDefault))
{
if (!mission.expiring && mission.timeRemaining != null)
{
mission.expiring = true;
EDDI.Instance.enqueueEvent(new MissionWarningEvent(DateTime.UtcNow, mission.missionid, mission.name, (int)((TimeSpan)mission.timeRemaining).TotalMinutes));
}
}
else if (mission.expiring)
{
mission.expiring = false;
}
}
mission.UpdateTimeRemaining();
}
Thread.Sleep(5000);
}
}
public UserControl ConfigurationTabItem()
{
return new ConfigurationWindow();
}
public void EnableConfigBinding(MainWindow configWindow)
{
configWindow.Dispatcher.Invoke(() => { BindingOperations.EnableCollectionSynchronization(missions, missionsLock); });
}
public void DisableConfigBinding(MainWindow configWindow)
{
configWindow.Dispatcher.Invoke(() => { BindingOperations.DisableCollectionSynchronization(missions); });
}
public void HandleProfile(JObject profile)
{
}
public void PostHandle(Event @event)
{
// Use the post-handler to remove missions from the missions list only after we have reacted to them.
if (@event is MissionAbandonedEvent)
{
postHandleMissionAbandonedEvent((MissionAbandonedEvent)@event);
}
else if (@event is MissionCompletedEvent)
{
postHandleMissionCompletedEvent((MissionCompletedEvent)@event);
}
else if (@event is MissionFailedEvent)
{
postHandleMissionFailedEvent((MissionFailedEvent)@event);
}
}
public void PreHandle(Event @event)
{
Logging.Debug("Received pre-event " + JsonConvert.SerializeObject(@event));
// Handle the events that we care about
if (@event is DataScannedEvent)
{
handleDataScannedEvent((DataScannedEvent)@event);
}
else if (@event is PassengersEvent)
{
handlePassengersEvent((PassengersEvent)@event);
}
else if (@event is MissionsEvent)
{
handleMissionsEvent((MissionsEvent)@event);
}
else if (@event is CommunityGoalsEvent)
{
handleCommunityGoalsEvent((CommunityGoalsEvent)@event);
}
else if (@event is CargoDepotEvent)
{
handleCargoDepotEvent((CargoDepotEvent)@event);
}
else if (@event is MissionAcceptedEvent)
{
handleMissionAcceptedEvent((MissionAcceptedEvent)@event);
}
else if (@event is MissionRedirectedEvent)
{
handleMissionRedirectedEvent((MissionRedirectedEvent)@event);
}
else if (@event is MissionExpiredEvent)
{
handleMissionExpiredEvent((MissionExpiredEvent)@event);
}
// Change the mission status here, remove the missions after the events resolve using the post-handler
if (@event is MissionAbandonedEvent)
{
handleMissionAbandonedEvent((MissionAbandonedEvent)@event);
}
else if (@event is MissionCompletedEvent)
{
handleMissionCompletedEvent((MissionCompletedEvent)@event);
}
else if (@event is MissionFailedEvent)
{
handleMissionFailedEvent((MissionFailedEvent)@event);
}
}
private void handleDataScannedEvent(DataScannedEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_handleDataScannedEvent(@event))
{
writeMissions();
}
}
}
public bool _handleDataScannedEvent(DataScannedEvent @event)
{
bool update = false;
string datalinktypeEDName = DataScan.FromName(@event.datalinktype).edname;
if (datalinktypeEDName == "TouristBeacon")
{
foreach (Mission mission in missions.ToList())
{
foreach (var type in mission.edTags)
{
var exitLoop = false;
switch (type)
{
// A `MissionRedirected` journal event isn't written for each waypoint in multi-destination passenger missions, so we handle those here.
case "sightseeing":
{
DestinationSystem system = mission.destinationsystems
.FirstOrDefault(s => s.name == EDDI.Instance?.CurrentStarSystem?.systemname);
if (system != null)
{
system.visited = true;
string waypointSystemName = mission.destinationsystems?
.FirstOrDefault(s => s.visited == false)?.name;
if (!string.IsNullOrEmpty(waypointSystemName))
{
// Set destination system to next in chain & trigger a 'Mission redirected' event
EDDI.Instance.enqueueEvent(new MissionRedirectedEvent(DateTime.UtcNow,
mission.missionid, mission.name, null, null, waypointSystemName,
EDDI.Instance?.CurrentStarSystem?.systemname));
}
update = true;
exitLoop = true;
}
break;
}
}
if (exitLoop) { break; }
}
}
}
return update;
}
private void handleMissionsEvent(MissionsEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_handleMissionsEvent(@event))
{
writeMissions();
}
}
}
public bool _handleMissionsEvent(MissionsEvent @event)
{
bool update = false;
foreach (Mission mission in @event.missions)
{
Mission missionEntry = missions.FirstOrDefault(m => m.missionid == mission.missionid);
// If the mission exists in the log, update status
if (missionEntry != null)
{
switch (mission.statusEDName)
{
case "Active":
{
if (missionEntry.statusEDName == "Failed" || missionEntry.statusEDName == "Claim")
{
if (mission.expiry > missionEntry.expiry)
{
// Fix status if erroneously reported as failed
missionEntry.expiry = mission.expiry;
missionEntry.statusDef = MissionStatus.FromEDName("Active");
update = true;
}
}
else if (missionEntry.statusEDName == "Active")
{
// Update status on a missed 'redirect'
update = UpdateRedirectStatus(missionEntry);
}
}
break;
default:
{
if (missionEntry.statusDef != mission.statusDef)
{
missionEntry.statusDef = mission.statusDef;
update = true;
}
}
break;
}
//If placeholder from 'Passengers' event, add 'Missions' parameters
if (missionEntry.name.Contains("None"))
{
missionEntry.name = mission.name;
missionEntry.expiry = mission.expiry;
update = true;
}
// Add our destination for origin return missions
if (mission.originreturn && string.IsNullOrEmpty(mission.destinationsystem))
{
mission.destinationsystem = mission.originsystem;
mission.destinationstation = mission.originstation;
}
}
// Add missions to mission log
else
{
// Starter zone missions have no consistent 'accepted' or 'completed' events, so exclude them from the mission log
if (!mission.edTags.Contains("StartZone"))
{
AddMission(mission);
update = true;
}
}
}
// Remove strays from the mission log
foreach (Mission missionEntry in missions.ToList())
{
// Community goals aren't written by the `Missions` event so we exclude them from pruning
if (missionEntry.communal) { continue; }
Mission mission = @event.missions.FirstOrDefault(m => m.missionid == missionEntry.missionid);
if (mission == null || mission.name.Contains("StartZone"))
{
// Strip out stray and 'StartZone' missions from the log
RemoveMissionWithMissionId(missionEntry.missionid);
update = true;
}
}
return update;
}
private void handlePassengersEvent(PassengersEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
_handlePassengersEvent(@event);
writeMissions();
}
}
public void _handlePassengersEvent(PassengersEvent @event)
{
Mission mission = new Mission();
foreach (Passenger passenger in @event.passengers)
{
mission = missions.FirstOrDefault(m => m.missionid == passenger.missionid);
if (mission != null)
{
mission.passengertypeEDName = passenger.type;
mission.passengervips = passenger.vip;
mission.passengerwanted = passenger.wanted;
mission.amount = passenger.amount;
}
else
{
// Dummy mission to populate 'Passengers' parameters
// 'Missions' event will populate 'name', 'status', 'type' & 'expiry'
MissionStatus status = MissionStatus.FromEDName("Active");
mission = new Mission(passenger.missionid, "Mission_None", DateTime.UtcNow.AddDays(1), status)
{
passengertypeEDName = passenger.type,
passengervips = passenger.vip,
passengerwanted = passenger.wanted,
amount = passenger.amount
};
AddMission(mission);
}
}
}
private void handleCommunityGoalsEvent(CommunityGoalsEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
_handleCommunityGoalsEvent(@event);
writeMissions();
}
}
public void _handleCommunityGoalsEvent(CommunityGoalsEvent @event)
{
// Prune community goals not reported from the CommunityGoalsEvent.
foreach (var cgMissionID in missions.Where(m => m.communal).Select(m => m.missionid))
{
if (!@event.goals.Select(cg => (long)cg.cgid).Contains(cgMissionID))
{
RemoveMissionWithMissionId(cgMissionID);
}
}
// Update missions status
foreach (var goal in @event.goals)
{
// Find or create our mission (excluding completed goals without contributions)
Mission mission = missions.FirstOrDefault(m => m.missionid == goal.cgid);
if (mission == null && (!goal.iscomplete || goal.iscomplete && goal.contribution > 0))
{
mission = new Mission(goal.cgid, "MISSION_CommunityGoal", goal.expiryDateTime, MissionStatus.FromEDName("Active"));
AddMission(mission);
}
if (!@event.fromLoad && mission != null)
{
// Raise events for the notable changes in community goal status.
var cgUpdates = new List<CGUpdate>();
if (mission.communalTier < goal.tier)
{
// Did the goal's current tier change?
cgUpdates.Add(new CGUpdate("Tier", "Increase"));
}
if (goal.contribution > 0)
{
// Smaller percentile bands are better, larger percentile bands are worse
if (mission.communalPercentileBand > goal.percentileband)
{
// Did the player's percentile band increase (reach a smaller value)?
cgUpdates.Add(new CGUpdate("Percentile", "Increase"));
}
if (mission.communalPercentileBand < goal.percentileband)
{
// Did the player's percentile band decrease (reach a larger value)?
cgUpdates.Add(new CGUpdate("Percentile", "Decrease"));
}
}
if (cgUpdates.Any())
{
EDDI.Instance.enqueueEvent(new CommunityGoalEvent(DateTime.UtcNow, cgUpdates, goal));
}
// Update our mission records
mission.localisedname = goal.name;
mission.originsystem = goal.system;
mission.originstation = goal.station;
mission.destinationsystem = goal.system;
mission.destinationstation = goal.station;
mission.reward = goal.tierreward;
mission.communal = true;
mission.communalPercentileBand = goal.percentileband;
mission.communalTier = goal.tier;
mission.expiry = goal.expiryDateTime;
if (goal.iscomplete)
{
if (goal.contribution > 0)
{
mission.statusDef = MissionStatus.FromEDName("Claim");
}
else
{
RemoveMissionWithMissionId(mission.missionid);
}
}
}
}
}
private void handleCargoDepotEvent(CargoDepotEvent @event)
{
if (@event.timestamp >= updateDat)
{
_handleCargoDepotEvent(@event);
updateDat = @event.timestamp;
writeMissions();
}
}
public void _handleCargoDepotEvent(CargoDepotEvent @event)
{
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
int amountRemaining = @event.totaltodeliver - @event.delivered;
if (@event.updatetype == "Collect")
{
if (mission == null)
{
// Add shared mission not previously instantiated
MissionStatus status = MissionStatus.FromEDName("Active");
mission = new Mission(@event.missionid ?? 0, "MISSION_DeliveryWing", null, status, true)
{
amount = @event.totaltodeliver,
commodity = @event.commodity,
originsystem = EDDI.Instance?.CurrentStarSystem?.systemname,
originstation = EDDI.Instance?.CurrentStation?.name
};
AddMission(mission);
}
else if (mission.shared)
{
// Update shared mission previously instantiated
mission.commodity = @event.commodity;
mission.originsystem = EDDI.Instance?.CurrentStarSystem?.systemname;
mission.originstation = EDDI.Instance?.CurrentStation?.name;
}
}
else // Update type is 'WingUpdate' or 'Deliver'
{
if (mission == null)
{
if (amountRemaining > 0)
{
// If requirements not yet satisfied, add shared mission not previously instantiated
MissionStatus status = MissionStatus.FromEDName("Active");
string type = @event.startmarketid == 0 ? "MISSION_CollectWing" : "MISSION_DeliveryWing";
mission = new Mission(@event.missionid ?? 0, type, null, status, true)
{
amount = @event.totaltodeliver,
commodity = @event.commodity,
originsystem = @event.startmarketid == 0 && @event.updatetype == "Deliver" ? EDDI.Instance?.CurrentStarSystem?.systemname : null,
originstation = @event.startmarketid == 0 && @event.updatetype == "Deliver" ? EDDI.Instance?.CurrentStarSystem?.systemname : null
};
AddMission(mission);
}
}
else if (mission.shared)
{
if (amountRemaining > 0)
{
// If requirements not yet satisfied, update shared mission previously instantiated
if (@event.updatetype == "Deliver")
{
mission.commodity = @event.commodity;
mission.originsystem = EDDI.Instance?.CurrentStarSystem?.systemname;
mission.originstation = EDDI.Instance?.CurrentStation?.name;
}
}
else
{
// Otherwise, remove shared mission
RemoveMission(mission);
}
}
else if (amountRemaining == 0)
{
// Update 'owned' mission status to 'Claim'
MissionStatus status = MissionStatus.FromEDName("Claim");
mission.statusDef = status;
}
}
}
}
public void handleMissionAbandonedEvent(MissionAbandonedEvent @event)
{
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
mission.statusDef = MissionStatus.FromEDName("Failed");
}
}
}
private void postHandleMissionAbandonedEvent(MissionAbandonedEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_postHandleMissionAbandonedEvent(@event))
{
writeMissions();
}
}
}
public bool _postHandleMissionAbandonedEvent(MissionAbandonedEvent @event)
{
bool update = false;
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
RemoveMissionWithMissionId(@event.missionid ?? 0);
update = true;
}
}
return update;
}
private void handleMissionAcceptedEvent(MissionAcceptedEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_handleMissionAcceptedEvent(@event))
{
writeMissions();
}
}
}
public bool _handleMissionAcceptedEvent(MissionAcceptedEvent @event)
{
bool update = false;
// Protect against duplicates and empty strings
bool exists = missions?.Any(m => m.missionid == @event.missionid) ?? false;
bool valid = !string.IsNullOrEmpty(@event.name) && !@event.name.Contains("StartZone");
if (!exists && valid)
{
MissionStatus status = MissionStatus.FromEDName("Active");
Mission mission = new Mission(@event.missionid ?? 0, @event.name, @event.expiry, status)
{
// Common parameters
localisedname = @event.localisedname,
amount = @event.amount ?? 0,
influence = @event.influence,
reputation = @event.reputation,
reward = @event.reward ?? 0,
communal = @event.communal,
// Get the minor faction stuff
faction = @event.faction,
factionstate = FactionState.FromEDName("None").localizedName,
// Set mission origin to to the current system & station
originsystem = @event.communal ? @event.destinationsystem : EDDI.Instance?.CurrentStarSystem?.systemname,
originstation = @event.communal ? null : EDDI.Instance?.CurrentStation?.name,
// Missions with commodities
commodity = @event.commodity,
// Missions with targets
targetTypeEDName = @event.targettype?.Split('_').ElementAtOrDefault(2),
target = @event.target,
targetfaction = @event.targetfaction,
// Missions with passengers
passengertypeEDName = @event.passengertype,
passengervips = @event.passengervips,
passengerwanted = @event.passengerwanted
};
// Get the faction state (Boom, Bust, Civil War, etc), if available
for (int i = 2; i < mission.name.Split('_').Count(); i++)
{
string element = mission.name.Split('_')
.ElementAtOrDefault(i)?
.ToLowerInvariant();
// Might be a faction state
FactionState factionState = FactionState
.AllOfThem
.Find(s => s.edname.ToLowerInvariant() == element);
if (factionState != null)
{
mission.factionstate = factionState.localizedName;
break;
}
}
// Missions with multiple destinations
if (@event.destinationsystem != null && @event.destinationsystem.Contains("$MISSIONUTIL_MULTIPLE"))
{
// If 'chained' mission, get the destination systems
string[] systems = @event.destinationsystem
.Replace("$MISSIONUTIL_MULTIPLE_INNER_SEPARATOR;", "#")
.Replace("$MISSIONUTIL_MULTIPLE_FINAL_SEPARATOR;", "#")
.Split('#');
foreach (string system in systems)
{
mission.destinationsystems.Add(new DestinationSystem(system));
}
// Load the first destination system.
mission.destinationsystem = mission.destinationsystems.ElementAtOrDefault(0).name;
}
else
{
// Populate destination system and station, depending on mission type
foreach (var type in mission.edTags)
{
bool exitLoop;
switch (type)
{
case "altruism":
case "altruismcredits":
{
mission.destinationsystem = mission.originsystem;
mission.destinationstation = mission.originstation;
exitLoop = true;
break;
}
default:
{
mission.destinationsystem = @event.destinationsystem;
mission.destinationstation = @event.destinationstation;
exitLoop = true;
break;
}
}
if (exitLoop) { break; }
}
}
AddMission(mission);
update = true;
}
return update;
}
public void handleMissionCompletedEvent(MissionCompletedEvent @event)
{
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
mission.statusDef = MissionStatus.FromEDName("Complete");
}
}
}
private void postHandleMissionCompletedEvent(MissionCompletedEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_postHandleMissionCompletedEvent(@event))
{
writeMissions();
}
}
}
public bool _postHandleMissionCompletedEvent(MissionCompletedEvent @event)
{
bool update = false;
try
{
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
RemoveMissionWithMissionId(@event.missionid ?? 0);
update = true;
}
}
}
catch (Exception e)
{
Logging.Error(e.Message, e);
throw;
}
return update;
}
private void handleMissionExpiredEvent(MissionExpiredEvent @event)
{
// 'Expired' is a non-journal event and not subject to 'LogLoad'
updateDat = @event.timestamp;
if (_handleMissionExpiredEvent(@event))
{
writeMissions();
}
}
public bool _handleMissionExpiredEvent(MissionExpiredEvent @event)
{
bool update = false;
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
if (mission.communal && mission.communalPercentileBand != 100)
{
mission.statusDef = MissionStatus.FromEDName("Claim");
update = true;
}
else
{
mission.statusDef = MissionStatus.FromEDName("Failed");
update = true;
}
}
}
return update;
}
public void handleMissionFailedEvent(MissionFailedEvent @event)
{
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
mission.statusDef = MissionStatus.FromEDName("Failed");
}
}
}
private void postHandleMissionFailedEvent(MissionFailedEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_postHandleMissionFailedEvent(@event))
{
writeMissions();
}
}
}
public bool _postHandleMissionFailedEvent(MissionFailedEvent @event)
{
bool update = false;
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
RemoveMissionWithMissionId(@event.missionid ?? 0);
update = true;
}
}
return update;
}
private void handleMissionRedirectedEvent(MissionRedirectedEvent @event)
{
if (@event.timestamp >= updateDat)
{
updateDat = @event.timestamp;
if (_handleMissionRedirectedEvent(@event))
{
writeMissions();
}
}
}
public bool _handleMissionRedirectedEvent(MissionRedirectedEvent @event)
{
bool update = false;
if (@event.missionid != null)
{
Mission mission = missions.FirstOrDefault(m => m.missionid == @event.missionid);
if (mission != null)
{
mission.destinationsystem = @event.newdestinationsystem;
mission.destinationstation = @event.newdestinationstation;
update = UpdateRedirectStatus(mission);
}
}
return update;
}
public IDictionary<string, object> GetVariables()
{
IDictionary<string, object> variables = new Dictionary<string, object>
{
["goalsCount"] = goalsCount,
["missions"] = new List<Mission>(missions),
["missionsCount"] = missionsCount,
["missionWarning"] = missionWarning,
["routeList"] = missionsRouteList,
["routeDistance"] = missionsRouteDistance
};
return variables;
}
public void writeMissions()
{
lock (missionsLock)
{
// Write missions configuration with current missions log
goalsCount = missions.Count(m => m.communal);
missionsCount = missions.Count(m => !m.shared && !m.communal);
MissionMonitorConfiguration configuration = new MissionMonitorConfiguration
{
updatedat = updateDat,
missions = missions,
goalsCount = goalsCount,
missionsCount = missionsCount,
missionWarning = missionWarning,
missionsRouteList = missionsRouteList,
missionsRouteDistance = missionsRouteDistance
};
configuration.ToFile();
}
// Make sure the UI is up to date
RaiseOnUIThread(MissionUpdatedEvent, missions);
}
private void readMissions(MissionMonitorConfiguration configuration = null)
{
lock (missionsLock)
{
// Obtain current missions inventory from configuration
configuration = configuration ?? MissionMonitorConfiguration.FromFile();
missionsCount = configuration.missionsCount;
missionWarning = configuration.missionWarning ?? Constants.missionWarningDefault;
missionsRouteList = configuration.missionsRouteList;
missionsRouteDistance = configuration.missionsRouteDistance;
updateDat = configuration.updatedat;
// Build a new missions log
List<Mission> newMissions = new List<Mission>();
// Start with the missions we have in the log
foreach (Mission mission in configuration.missions)
{
newMissions.Add(mission);
}
// Now order the list by mission id
newMissions = newMissions.OrderBy(m => m.missionid).ToList();
// Update the missions log
missions.Clear();
foreach (Mission mission in newMissions)
{
missions.Add(mission);
}
}
}
public Mission GetMissionWithMissionId(long missionid)
{
return missions.FirstOrDefault(m => m.missionid == missionid);
}
public List<long> GetSystemMissionIds(string system)
{
List<long> missionids = new List<long>(); // List of mission IDs for the system
if (system != null)
{
// Get mission IDs associated with the system
foreach (Mission mission in missions.Where(m => m.destinationsystem == system
|| (m.originreturn && m.originsystem == system)).ToList())
{
missionids.Add(mission.missionid);
}
}
return missionids;
}
private void AddMission(Mission mission)
{
if (mission == null)
{
return;
}
lock (missionsLock)
{
missions.Add(mission);
}
}
private void RemoveMission(Mission mission)
{
RemoveMissionWithMissionId(mission.missionid);
}
private void RemoveMissionWithMissionId(long missionid)
{
lock (missionsLock)
{
for (int i = 0; i < missions.Count; i++)
{
if (missions[i].missionid == missionid)
{
missions.RemoveAt(i);
break;
}
}
}
}
public void CancelRoute()
{
// Clear route and destination variables
missionsRouteList = null;
missionsRouteDistance = 0;
string destination = EDDI.Instance?.DestinationStarSystem?.systemname;
UpdateDestinationData(null, null, 0);
EDDI.Instance?.enqueueEvent(new RouteDetailsEvent(DateTime.UtcNow, "cancel", destination, null, null, 0, 0, 0, null));
}
public string GetMissionsRoute(string homeSystem = null)
{
string nextSystem = null;
decimal nextDistance = 0;
int routeCount = 0;
List<string> systems = new List<string>(); // List of eligible mission destintaion systems
List<long> missionids = new List<long>(); // List of mission IDs for the next system
if (missions.Count > 0)
{
// Add current star system first
string currentSystem = EDDI.Instance?.CurrentStarSystem?.systemname;
systems.Add(currentSystem);
// Add origin systems for 'return to origin' missions to the 'systems' list
foreach (Mission mission in missions.Where(m => m.statusEDName != "Failed").ToList())
{
if (mission.originreturn && !systems.Contains(mission.originsystem))
{
systems.Add(mission.originsystem);
}
}
// Add destination systems for applicable mission types to the 'systems' list
foreach (Mission mission in missions.Where(m => m.statusEDName == "Active").ToList())
{
foreach (var type in mission.edTags)
{
var exitLoop = false;
switch (type)
{
case "assassinate":
case "courier":
case "delivery":
case "disable":
case "hack":
case "massacre":
case "passengerbulk":
case "passengervip":
case "rescue":
case "salvage":
case "scan":
case "sightseeing":
case "smuggle":
{
if (!(mission.destinationsystems?.Any() ?? false))
{
if (!systems.Contains(mission.destinationsystem))
{
systems.Add(mission.destinationsystem);
}
}
else
{
foreach (DestinationSystem system in mission.destinationsystems)
{
if (!systems.Contains(system.name))
{
systems.Add(system.name);
}
}
}
exitLoop = true;
break;
}
}
if (exitLoop) { break; }
}
}
// Calculate the missions route using the 'Repetitive Nearest Neighbor' Algorithim (RNNA)
if (CalculateRNNA(systems, homeSystem))
{
nextSystem = missionsRouteList?.Split('_')[0];
nextDistance = CalculateDistance(currentSystem, nextSystem) ?? 0;
routeCount = missionsRouteList.Split('_').Count();
Logging.Debug("Calculated Route Selected = " + missionsRouteList + ", Total Distance = " + missionsRouteDistance);
writeMissions();
// Get mission IDs for 'next' system
missionids = GetSystemMissionIds(nextSystem);
}
else
{
Logging.Debug("Unable to meet missions route calculation criteria");
}
}
EDDI.Instance?.enqueueEvent(new RouteDetailsEvent(DateTime.UtcNow, "route", nextSystem, null, missionsRouteList, routeCount, nextDistance, missionsRouteDistance, missionids));
return nextSystem;
}
public bool CalculateRNNA(List<string> systems, string homeSystem)
{
// Clear route list & distance
missionsRouteList = null;
missionsRouteDistance = 0;
bool found = false;
int numSystems = systems.Count();
if (numSystems > 1)
{
List<string> bestRoute = new List<string>();
decimal bestDistance = 0;
// Pre-load all system distances
if (homeSystem != null)
{
systems.Add(homeSystem);
}
List<StarSystem> starsystems = dataProviderService.GetSystemsData(systems.ToArray(), true, false, false, false, false);
decimal[][] distMatrix = new decimal[systems.Count][];
for (int i = 0; i < systems.Count; i++)
{
distMatrix[i] = new decimal[systems.Count];
}
for (int i = 0; i < systems.Count - 1; i++)
{
StarSystem curr = starsystems.Find(s => s.systemname == systems[i]);
for (int j = i + 1; j < systems.Count; j++)
{
StarSystem dest = starsystems.Find(s => s.systemname == systems[j]);
decimal? distance = CalculateDistance(curr, dest) ?? 0;
distMatrix[i][j] = (decimal)distance;
distMatrix[j][i] = (decimal)distance;
}
}
// Repetitive Nearest Neighbor Algorithm (RNNA)
// Iterate through all possible routes by changing the starting system
for (int i = 0; i < numSystems; i++)
{
// If starting system is a destination for a 'return to origin' mission, then not a viable route
if (DestinationOriginReturn(systems[i])) { continue; }
List<string> route = new List<string>();
decimal totalDistance = 0;
int currIndex = i;
// Repeat until all systems (except starting system) are in the route
while (route.Count() < numSystems - 1)
{
SortedList<decimal, int> nearestList = new SortedList<decimal, int>();
// Iterate through the remaining systems to find nearest neighbor
for (int j = 1; j < numSystems; j++)
{
// Wrap around the list
int destIndex = i + j < numSystems ? i + j : i + j - numSystems;
if (homeSystem != null && destIndex == 0) { destIndex = numSystems; }
// Check if destination system previously added to the route
if (route.IndexOf(systems[destIndex]) == -1)
{
decimal distance = distMatrix[currIndex][destIndex];
if (!nearestList.ContainsKey(distance))
{
nearestList.Add(distance, destIndex);
}
}
}
// Set the 'Nearest' system as the new 'current' system
currIndex = nearestList.Values.FirstOrDefault();
// Add 'nearest' system to the route list and add its distance to total distance traveled
route.Add(systems[currIndex]);
totalDistance += nearestList.Keys.FirstOrDefault();
}
// Add 'starting system' to complete the route & add its distance to total distance traveled
int startIndex = homeSystem != null && i == 0 ? numSystems : i;
route.Add(systems[startIndex]);
if (currIndex == numSystems) { currIndex = 0; }
totalDistance += distMatrix[currIndex][startIndex];
Logging.Debug("Build Route Iteration #" + i + " - Route = " + string.Join("_", route) + ", Total Distance = " + totalDistance);
// Use this route if total distance traveled is less than previous iterations
if (bestDistance == 0 || totalDistance < bestDistance)
{
bestRoute.Clear();
int homeIndex = route.IndexOf(systems[homeSystem != null ? numSystems : 0]);
if (homeIndex < route.Count - 1)
{
// Rotate list to place homesystem at the end
bestRoute = route.Skip(homeIndex + 1)
.Concat(route.Take(homeIndex + 1))
.ToList();
}
else
{
bestRoute = route.ToList();
}
bestDistance = totalDistance;
}
}
if (bestRoute.Count == numSystems)
{
missionsRouteList = string.Join("_", bestRoute);
missionsRouteDistance = bestDistance;
found = true;
}
}
return found;
}
public string SetNextInRoute()
{
string nextSystem = missionsRouteList?.Split('_')[0];
decimal? nextDistance = 0;
int count = 0;
List<long> missionids = new List<long>(); // List of mission IDs for the next system
if (nextSystem != null)
{
StarSystem curr = EDDI.Instance?.CurrentStarSystem;
StarSystem dest = StarSystemSqLiteRepository.Instance.GetOrFetchStarSystem(nextSystem, true);
nextDistance = CalculateDistance(curr, dest);
count = missionsRouteList.Split('_').Count();
// Get mission IDs for 'next' system
missionids = GetSystemMissionIds(nextSystem);
// Set destination variables
UpdateDestinationData(nextSystem, null, nextDistance ?? 0);
}
EDDI.Instance?.enqueueEvent(new RouteDetailsEvent(DateTime.UtcNow, "set", nextSystem, null, missionsRouteList, count, nextDistance ?? 0, missionsRouteDistance, missionids));
return nextSystem;
}
public string UpdateRoute(string updateSystem = null)
{
bool update;
string nextSystem = null;
decimal nextDistance = 0;
List<long> missionids = new List<long>(); // List of mission IDs for the next system
string currentSystem = EDDI.Instance?.CurrentStarSystem?.systemname;
List<string> route = missionsRouteList?.Split('_').ToList() ?? new List<string>();
if (route.Count == 0) { update = false; }
else if (updateSystem == null)
{
updateSystem = route[0];
// Determine if the 'update' system in the missions route list is the current system & has no pending missions
update = currentSystem == updateSystem ? !SystemPendingMissions(updateSystem) : false;
}
else { update = route.Contains(updateSystem); }
// Remove 'update' system from the missions route list
if (update)
{
if (RemoveSystemFromRoute(updateSystem))
{
nextSystem = missionsRouteList?.Split('_')[0];
if (nextSystem != null)
{
nextDistance = CalculateDistance(currentSystem, nextSystem) ?? 0;
// Get mission IDs for 'next' system
missionids = GetSystemMissionIds(nextSystem);
}
Logging.Debug("Route Updated = " + missionsRouteList + ", Total Distance = " + missionsRouteDistance);
writeMissions();
// Set destination variables
UpdateDestinationData(nextSystem, null, nextDistance);
}
}
EDDI.Instance?.enqueueEvent(new RouteDetailsEvent(DateTime.UtcNow, "update", nextSystem, null, missionsRouteList, route.Count, nextDistance, missionsRouteDistance, missionids));
return nextSystem;
}
private bool RemoveSystemFromRoute(string system)
{
List<string> route = missionsRouteList?.Split('_').ToList();
if (route is null || route.Count == 0) { return false; }
int index = route.IndexOf(system);
if (index > -1)
{
// Do not remove the 'home' system unless last in list
if (route.Count > 1 && index == route.Count - 1) { return false; }
route.RemoveAt(index);
if (route.Count > 0)
{
// If other than 'next' system removed, recalculate the route
if (route.Count > 2 && index > 0)
{
// Use copy to keep the original intact.
List<string> systems = new List<string>(route);
// Build systems list
string homeSystem = systems.Last();
systems.RemoveAt(systems.Count - 1);
systems.Insert(0, EDDI.Instance?.CurrentStarSystem?.systemname);
if (CalculateRNNA(systems, homeSystem)) { return true; }
}
missionsRouteList = string.Join("_", route);
missionsRouteDistance = CalculateRouteDistance();
}
else
{
missionsRouteList = null;
missionsRouteDistance = 0;
}
return true;
}
return false;
}
public decimal? CalculateDistance(string currentSystem, string destinationSystem)
{
StarSystem curr = StarSystemSqLiteRepository.Instance.GetOrFetchStarSystem(currentSystem, true);
StarSystem dest = StarSystemSqLiteRepository.Instance.GetOrFetchStarSystem(destinationSystem, true);
return CalculateDistance(curr, dest);
}
public decimal? CalculateDistance(StarSystem curr, StarSystem dest)
{
return Functions.DistanceFromCoordinates(curr.x, curr.y, curr.z, dest.x, dest.y, dest.z);
}
private decimal CalculateRouteDistance()
{
List<string> route = missionsRouteList?.Split('_').ToList();
decimal distance = 0;
if (route?.Count > 0)
{
StarSystem curr = EDDI.Instance?.CurrentStarSystem;
// Get all the route coordinates from EDSM in one request
List<StarSystem> starsystems = dataProviderService.GetSystemsData(route.ToArray(), true, false, false, false, false);
// Get distance to the next system
StarSystem dest = starsystems.Find(s => s.systemname == route[0]);
distance = CalculateDistance(curr, dest) ?? 0;
// Calculate remaining route distance
for (int i = 0; i < route.Count() - 1; i++)
{
curr = starsystems.Find(s => s.systemname == route[i]);
dest = starsystems.Find(s => s.systemname == route[i + 1]);
distance += CalculateDistance(curr, dest) ?? 0;
}
}
return distance;
}
private bool DestinationOriginReturn(string destination)
{
foreach (Mission mission in missions.Where(m => m.originreturn).ToList())
{
if (mission.destinationsystems == null)
{
if (mission.destinationsystem == destination)
{
return true;
}
}
else
{
DestinationSystem system = mission.destinationsystems.FirstOrDefault(ds => ds.name == destination);
if (system != null)
{
return true;
}
}
}
return false;
}
public void SetMissionsRouteData(string list, decimal distance)
{
missionsRouteList = list;
missionsRouteDistance = distance;
writeMissions();
}
private bool SystemPendingMissions(string system)
{
foreach (Mission mission in missions.Where(m => m.statusEDName != "Fail").ToList())
{
foreach (var type in mission.edTags)
{
var exitLoop = false;
switch (type)
{
case "assassinate":
case "courier":
case "delivery":
case "disable":
case "hack":
case "massacre":
case "passengerbulk":
case "passengervip":
case "rescue":
case "salvage":
case "scan":
case "sightseeing":
case "smuggle":
{
// Check if the system is origin system for 'Active' and 'Claim' missions
if (mission.originsystem == system) { return true; }
// Check if the system is destination system for 'Active' missions
else if (mission.statusEDName == "Active")
{
if (mission.destinationsystems?.Any() ?? false)
{
if (mission.destinationsystems.Any(d => d.name == system)) { return true; }
}
else if (mission.destinationsystem == system) { return true; }
}
exitLoop = true;
break;
}
}
if (exitLoop) { break; }
}
}
return false;
}
public bool UpdateRedirectStatus(Mission mission)
{
if (mission.originreturn && mission.originsystem == mission.destinationsystem
&& mission.originstation == mission.destinationstation)
{
foreach (var type in mission.edTags)
{
var exitLoop = false;
switch (type)
{
case "assassinate":
case "assassinatewing":
case "disable":
case "disablewing":
case "massacre":
case "massacrethargoid":
case "massacrewing":
case "hack":
case "longdistanceexpedition":
case "passengervip":
case "piracy":
case "rescue":
case "salvage":
case "scan":
case "sightseeing":
{
if (mission.statusEDName != "Claim")
{
mission.statusDef = MissionStatus.FromEDName("Claim");
return true;
}
exitLoop = true;
break;
}
}
if (exitLoop) { break; }
}
}
return false;
}
public void UpdateDestinationData(string system, string station, decimal distance)
{
EDDI.Instance.updateDestinationSystem(system);
EDDI.Instance.DestinationDistanceLy = distance;
EDDI.Instance.updateDestinationStation(station);
}
static void RaiseOnUIThread(EventHandler handler, object sender)
{
if (handler != null)
{
SynchronizationContext uiSyncContext = SynchronizationContext.Current ?? new SynchronizationContext();
if (uiSyncContext == null)
{
handler(sender, EventArgs.Empty);
}
else
{
uiSyncContext.Send(delegate { handler(sender, EventArgs.Empty); }, null);
}
}
}
}
}
| 40.627313 | 189 | 0.465388 | [
"Apache-2.0"
] | EDCD/EDDI | MissionMonitor/MissionMonitor.cs | 63,663 | C# |
using System;
namespace SampleApp.Components.ComponentHosts.Hosts.Data
{
/// <summary>
/// service model
/// </summary>
public class ServiceModel : TypeReferenceModelAbstract
{
public Type RegisteredType { get; set; }
public Type ResolvedType { get; set; }
public string Name { get; set; }
}
}
| 20.352941 | 58 | 0.627168 | [
"MIT"
] | franck-gaspoz/WPFUtilities | SampleApp/Components/ComponentHosts/Hosts/Data/ServiceModel.cs | 348 | C# |
namespace Socket.WebSocket4Net.Default {
public enum WebSocketVersion {
None = -1,
DraftHybi00 = 0,
DraftHybi10 = 8,
Rfc6455 = 13, // 0x0000000D
}
} | 21 | 40 | 0.64881 | [
"MIT"
] | EliseuPHP/MotionSensorUnity | Assets/Plugins/Socket/WebSocket4Net/Default/WebSocketVersion.cs | 168 | C# |
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// Este código fue generado por una herramienta.
// Versión de runtime:4.0.30319.42000
//
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
// se vuelve a generar el código.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("CouplesExpenses.Droid.Resource", IsApplication=true)]
namespace CouplesExpenses.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.Auth._MobileServices.Resource.Animation.slide_in_right = global::CouplesExpenses.Droid.Resource.Animation.slide_in_right;
global::Xamarin.Auth._MobileServices.Resource.Animation.slide_out_left = global::CouplesExpenses.Droid.Resource.Animation.slide_out_left;
global::Xamarin.Auth._MobileServices.Resource.Drawable.ic_arrow_back = global::CouplesExpenses.Droid.Resource.Drawable.ic_arrow_back;
global::Xamarin.Auth._MobileServices.Resource.Id.webview = global::CouplesExpenses.Droid.Resource.Id.webview;
global::Xamarin.Auth._MobileServices.Resource.Layout.activity_webview = global::CouplesExpenses.Droid.Resource.Layout.activity_webview;
global::Xamarin.Auth._MobileServices.Resource.String.ApplicationName = global::CouplesExpenses.Droid.Resource.String.ApplicationName;
global::Xamarin.Auth._MobileServices.Resource.String.Hello = global::CouplesExpenses.Droid.Resource.String.Hello;
global::Xamarin.Auth._MobileServices.Resource.String.title_activity_webview = global::CouplesExpenses.Droid.Resource.String.title_activity_webview;
global::PCLCrypto.Resource.String.ApplicationName = global::CouplesExpenses.Droid.Resource.String.ApplicationName;
global::PCLCrypto.Resource.String.Hello = global::CouplesExpenses.Droid.Resource.String.Hello;
global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::CouplesExpenses.Droid.Resource.Attribute.actionBarSize;
}
public partial class Animation
{
// aapt resource value: 0x7f040000
public const int abc_fade_in = 2130968576;
// aapt resource value: 0x7f040001
public const int abc_fade_out = 2130968577;
// aapt resource value: 0x7f040002
public const int abc_grow_fade_in_from_bottom = 2130968578;
// aapt resource value: 0x7f040003
public const int abc_popup_enter = 2130968579;
// aapt resource value: 0x7f040004
public const int abc_popup_exit = 2130968580;
// aapt resource value: 0x7f040005
public const int abc_shrink_fade_out_from_bottom = 2130968581;
// aapt resource value: 0x7f040006
public const int abc_slide_in_bottom = 2130968582;
// aapt resource value: 0x7f040007
public const int abc_slide_in_top = 2130968583;
// aapt resource value: 0x7f040008
public const int abc_slide_out_bottom = 2130968584;
// aapt resource value: 0x7f040009
public const int abc_slide_out_top = 2130968585;
// aapt resource value: 0x7f04000a
public const int design_bottom_sheet_slide_in = 2130968586;
// aapt resource value: 0x7f04000b
public const int design_bottom_sheet_slide_out = 2130968587;
// aapt resource value: 0x7f04000c
public const int design_fab_in = 2130968588;
// aapt resource value: 0x7f04000d
public const int design_fab_out = 2130968589;
// aapt resource value: 0x7f04000e
public const int design_snackbar_in = 2130968590;
// aapt resource value: 0x7f04000f
public const int design_snackbar_out = 2130968591;
// aapt resource value: 0x7f040010
public const int slide_in_right = 2130968592;
// aapt resource value: 0x7f040011
public const int slide_out_left = 2130968593;
static Animation()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animation()
{
}
}
public partial class Animator
{
// aapt resource value: 0x7f050000
public const int design_appbar_state_list_animator = 2131034112;
static Animator()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Animator()
{
}
}
public partial class Attribute
{
// aapt resource value: 0x7f01005f
public const int actionBarDivider = 2130772063;
// aapt resource value: 0x7f010060
public const int actionBarItemBackground = 2130772064;
// aapt resource value: 0x7f010059
public const int actionBarPopupTheme = 2130772057;
// aapt resource value: 0x7f01005e
public const int actionBarSize = 2130772062;
// aapt resource value: 0x7f01005b
public const int actionBarSplitStyle = 2130772059;
// aapt resource value: 0x7f01005a
public const int actionBarStyle = 2130772058;
// aapt resource value: 0x7f010055
public const int actionBarTabBarStyle = 2130772053;
// aapt resource value: 0x7f010054
public const int actionBarTabStyle = 2130772052;
// aapt resource value: 0x7f010056
public const int actionBarTabTextStyle = 2130772054;
// aapt resource value: 0x7f01005c
public const int actionBarTheme = 2130772060;
// aapt resource value: 0x7f01005d
public const int actionBarWidgetTheme = 2130772061;
// aapt resource value: 0x7f01007a
public const int actionButtonStyle = 2130772090;
// aapt resource value: 0x7f010076
public const int actionDropDownStyle = 2130772086;
// aapt resource value: 0x7f0100cc
public const int actionLayout = 2130772172;
// aapt resource value: 0x7f010061
public const int actionMenuTextAppearance = 2130772065;
// aapt resource value: 0x7f010062
public const int actionMenuTextColor = 2130772066;
// aapt resource value: 0x7f010065
public const int actionModeBackground = 2130772069;
// aapt resource value: 0x7f010064
public const int actionModeCloseButtonStyle = 2130772068;
// aapt resource value: 0x7f010067
public const int actionModeCloseDrawable = 2130772071;
// aapt resource value: 0x7f010069
public const int actionModeCopyDrawable = 2130772073;
// aapt resource value: 0x7f010068
public const int actionModeCutDrawable = 2130772072;
// aapt resource value: 0x7f01006d
public const int actionModeFindDrawable = 2130772077;
// aapt resource value: 0x7f01006a
public const int actionModePasteDrawable = 2130772074;
// aapt resource value: 0x7f01006f
public const int actionModePopupWindowStyle = 2130772079;
// aapt resource value: 0x7f01006b
public const int actionModeSelectAllDrawable = 2130772075;
// aapt resource value: 0x7f01006c
public const int actionModeShareDrawable = 2130772076;
// aapt resource value: 0x7f010066
public const int actionModeSplitBackground = 2130772070;
// aapt resource value: 0x7f010063
public const int actionModeStyle = 2130772067;
// aapt resource value: 0x7f01006e
public const int actionModeWebSearchDrawable = 2130772078;
// aapt resource value: 0x7f010057
public const int actionOverflowButtonStyle = 2130772055;
// aapt resource value: 0x7f010058
public const int actionOverflowMenuStyle = 2130772056;
// aapt resource value: 0x7f0100ce
public const int actionProviderClass = 2130772174;
// aapt resource value: 0x7f0100cd
public const int actionViewClass = 2130772173;
// aapt resource value: 0x7f010082
public const int activityChooserViewStyle = 2130772098;
// aapt resource value: 0x7f0100a7
public const int alertDialogButtonGroupStyle = 2130772135;
// aapt resource value: 0x7f0100a8
public const int alertDialogCenterButtons = 2130772136;
// aapt resource value: 0x7f0100a6
public const int alertDialogStyle = 2130772134;
// aapt resource value: 0x7f0100a9
public const int alertDialogTheme = 2130772137;
// aapt resource value: 0x7f0100bc
public const int allowStacking = 2130772156;
// aapt resource value: 0x7f0100bd
public const int alpha = 2130772157;
// aapt resource value: 0x7f0100c4
public const int arrowHeadLength = 2130772164;
// aapt resource value: 0x7f0100c5
public const int arrowShaftLength = 2130772165;
// aapt resource value: 0x7f0100ae
public const int autoCompleteTextViewStyle = 2130772142;
// aapt resource value: 0x7f010028
public const int background = 2130772008;
// aapt resource value: 0x7f01002a
public const int backgroundSplit = 2130772010;
// aapt resource value: 0x7f010029
public const int backgroundStacked = 2130772009;
// aapt resource value: 0x7f010101
public const int backgroundTint = 2130772225;
// aapt resource value: 0x7f010102
public const int backgroundTintMode = 2130772226;
// aapt resource value: 0x7f0100c6
public const int barLength = 2130772166;
// aapt resource value: 0x7f01012c
public const int behavior_autoHide = 2130772268;
// aapt resource value: 0x7f010109
public const int behavior_hideable = 2130772233;
// aapt resource value: 0x7f010135
public const int behavior_overlapTop = 2130772277;
// aapt resource value: 0x7f010108
public const int behavior_peekHeight = 2130772232;
// aapt resource value: 0x7f01010a
public const int behavior_skipCollapsed = 2130772234;
// aapt resource value: 0x7f01012a
public const int borderWidth = 2130772266;
// aapt resource value: 0x7f01007f
public const int borderlessButtonStyle = 2130772095;
// aapt resource value: 0x7f010124
public const int bottomSheetDialogTheme = 2130772260;
// aapt resource value: 0x7f010125
public const int bottomSheetStyle = 2130772261;
// aapt resource value: 0x7f01007c
public const int buttonBarButtonStyle = 2130772092;
// aapt resource value: 0x7f0100ac
public const int buttonBarNegativeButtonStyle = 2130772140;
// aapt resource value: 0x7f0100ad
public const int buttonBarNeutralButtonStyle = 2130772141;
// aapt resource value: 0x7f0100ab
public const int buttonBarPositiveButtonStyle = 2130772139;
// aapt resource value: 0x7f01007b
public const int buttonBarStyle = 2130772091;
// aapt resource value: 0x7f0100f6
public const int buttonGravity = 2130772214;
// aapt resource value: 0x7f01003d
public const int buttonPanelSideLayout = 2130772029;
// aapt resource value: 0x7f0100af
public const int buttonStyle = 2130772143;
// aapt resource value: 0x7f0100b0
public const int buttonStyleSmall = 2130772144;
// aapt resource value: 0x7f0100be
public const int buttonTint = 2130772158;
// aapt resource value: 0x7f0100bf
public const int buttonTintMode = 2130772159;
// aapt resource value: 0x7f010011
public const int cardBackgroundColor = 2130771985;
// aapt resource value: 0x7f010012
public const int cardCornerRadius = 2130771986;
// aapt resource value: 0x7f010013
public const int cardElevation = 2130771987;
// aapt resource value: 0x7f010014
public const int cardMaxElevation = 2130771988;
// aapt resource value: 0x7f010016
public const int cardPreventCornerOverlap = 2130771990;
// aapt resource value: 0x7f010015
public const int cardUseCompatPadding = 2130771989;
// aapt resource value: 0x7f0100b1
public const int checkboxStyle = 2130772145;
// aapt resource value: 0x7f0100b2
public const int checkedTextViewStyle = 2130772146;
// aapt resource value: 0x7f0100d9
public const int closeIcon = 2130772185;
// aapt resource value: 0x7f01003a
public const int closeItemLayout = 2130772026;
// aapt resource value: 0x7f0100f8
public const int collapseContentDescription = 2130772216;
// aapt resource value: 0x7f0100f7
public const int collapseIcon = 2130772215;
// aapt resource value: 0x7f010117
public const int collapsedTitleGravity = 2130772247;
// aapt resource value: 0x7f010111
public const int collapsedTitleTextAppearance = 2130772241;
// aapt resource value: 0x7f0100c0
public const int color = 2130772160;
// aapt resource value: 0x7f01009e
public const int colorAccent = 2130772126;
// aapt resource value: 0x7f0100a5
public const int colorBackgroundFloating = 2130772133;
// aapt resource value: 0x7f0100a2
public const int colorButtonNormal = 2130772130;
// aapt resource value: 0x7f0100a0
public const int colorControlActivated = 2130772128;
// aapt resource value: 0x7f0100a1
public const int colorControlHighlight = 2130772129;
// aapt resource value: 0x7f01009f
public const int colorControlNormal = 2130772127;
// aapt resource value: 0x7f01009c
public const int colorPrimary = 2130772124;
// aapt resource value: 0x7f01009d
public const int colorPrimaryDark = 2130772125;
// aapt resource value: 0x7f0100a3
public const int colorSwitchThumbNormal = 2130772131;
// aapt resource value: 0x7f0100de
public const int commitIcon = 2130772190;
// aapt resource value: 0x7f010033
public const int contentInsetEnd = 2130772019;
// aapt resource value: 0x7f010037
public const int contentInsetEndWithActions = 2130772023;
// aapt resource value: 0x7f010034
public const int contentInsetLeft = 2130772020;
// aapt resource value: 0x7f010035
public const int contentInsetRight = 2130772021;
// aapt resource value: 0x7f010032
public const int contentInsetStart = 2130772018;
// aapt resource value: 0x7f010036
public const int contentInsetStartWithNavigation = 2130772022;
// aapt resource value: 0x7f010017
public const int contentPadding = 2130771991;
// aapt resource value: 0x7f01001b
public const int contentPaddingBottom = 2130771995;
// aapt resource value: 0x7f010018
public const int contentPaddingLeft = 2130771992;
// aapt resource value: 0x7f010019
public const int contentPaddingRight = 2130771993;
// aapt resource value: 0x7f01001a
public const int contentPaddingTop = 2130771994;
// aapt resource value: 0x7f010112
public const int contentScrim = 2130772242;
// aapt resource value: 0x7f0100a4
public const int controlBackground = 2130772132;
// aapt resource value: 0x7f01014b
public const int counterEnabled = 2130772299;
// aapt resource value: 0x7f01014c
public const int counterMaxLength = 2130772300;
// aapt resource value: 0x7f01014e
public const int counterOverflowTextAppearance = 2130772302;
// aapt resource value: 0x7f01014d
public const int counterTextAppearance = 2130772301;
// aapt resource value: 0x7f01002b
public const int customNavigationLayout = 2130772011;
// aapt resource value: 0x7f0100d8
public const int defaultQueryHint = 2130772184;
// aapt resource value: 0x7f010074
public const int dialogPreferredPadding = 2130772084;
// aapt resource value: 0x7f010073
public const int dialogTheme = 2130772083;
// aapt resource value: 0x7f010021
public const int displayOptions = 2130772001;
// aapt resource value: 0x7f010027
public const int divider = 2130772007;
// aapt resource value: 0x7f010081
public const int dividerHorizontal = 2130772097;
// aapt resource value: 0x7f0100ca
public const int dividerPadding = 2130772170;
// aapt resource value: 0x7f010080
public const int dividerVertical = 2130772096;
// aapt resource value: 0x7f0100c2
public const int drawableSize = 2130772162;
// aapt resource value: 0x7f01001c
public const int drawerArrowStyle = 2130771996;
// aapt resource value: 0x7f010093
public const int dropDownListViewStyle = 2130772115;
// aapt resource value: 0x7f010077
public const int dropdownListPreferredItemHeight = 2130772087;
// aapt resource value: 0x7f010088
public const int editTextBackground = 2130772104;
// aapt resource value: 0x7f010087
public const int editTextColor = 2130772103;
// aapt resource value: 0x7f0100b3
public const int editTextStyle = 2130772147;
// aapt resource value: 0x7f010038
public const int elevation = 2130772024;
// aapt resource value: 0x7f010149
public const int errorEnabled = 2130772297;
// aapt resource value: 0x7f01014a
public const int errorTextAppearance = 2130772298;
// aapt resource value: 0x7f01003c
public const int expandActivityOverflowButtonDrawable = 2130772028;
// aapt resource value: 0x7f010103
public const int expanded = 2130772227;
// aapt resource value: 0x7f010118
public const int expandedTitleGravity = 2130772248;
// aapt resource value: 0x7f01010b
public const int expandedTitleMargin = 2130772235;
// aapt resource value: 0x7f01010f
public const int expandedTitleMarginBottom = 2130772239;
// aapt resource value: 0x7f01010e
public const int expandedTitleMarginEnd = 2130772238;
// aapt resource value: 0x7f01010c
public const int expandedTitleMarginStart = 2130772236;
// aapt resource value: 0x7f01010d
public const int expandedTitleMarginTop = 2130772237;
// aapt resource value: 0x7f010110
public const int expandedTitleTextAppearance = 2130772240;
// aapt resource value: 0x7f010010
public const int externalRouteEnabledDrawable = 2130771984;
// aapt resource value: 0x7f010128
public const int fabSize = 2130772264;
// aapt resource value: 0x7f01012d
public const int foregroundInsidePadding = 2130772269;
// aapt resource value: 0x7f0100c3
public const int gapBetweenBars = 2130772163;
// aapt resource value: 0x7f0100da
public const int goIcon = 2130772186;
// aapt resource value: 0x7f010133
public const int headerLayout = 2130772275;
// aapt resource value: 0x7f01001d
public const int height = 2130771997;
// aapt resource value: 0x7f010031
public const int hideOnContentScroll = 2130772017;
// aapt resource value: 0x7f01014f
public const int hintAnimationEnabled = 2130772303;
// aapt resource value: 0x7f010148
public const int hintEnabled = 2130772296;
// aapt resource value: 0x7f010147
public const int hintTextAppearance = 2130772295;
// aapt resource value: 0x7f010079
public const int homeAsUpIndicator = 2130772089;
// aapt resource value: 0x7f01002c
public const int homeLayout = 2130772012;
// aapt resource value: 0x7f010025
public const int icon = 2130772005;
// aapt resource value: 0x7f0100d6
public const int iconifiedByDefault = 2130772182;
// aapt resource value: 0x7f010089
public const int imageButtonStyle = 2130772105;
// aapt resource value: 0x7f01002e
public const int indeterminateProgressStyle = 2130772014;
// aapt resource value: 0x7f01003b
public const int initialActivityCount = 2130772027;
// aapt resource value: 0x7f010134
public const int insetForeground = 2130772276;
// aapt resource value: 0x7f01001e
public const int isLightTheme = 2130771998;
// aapt resource value: 0x7f010131
public const int itemBackground = 2130772273;
// aapt resource value: 0x7f01012f
public const int itemIconTint = 2130772271;
// aapt resource value: 0x7f010030
public const int itemPadding = 2130772016;
// aapt resource value: 0x7f010132
public const int itemTextAppearance = 2130772274;
// aapt resource value: 0x7f010130
public const int itemTextColor = 2130772272;
// aapt resource value: 0x7f01011c
public const int keylines = 2130772252;
// aapt resource value: 0x7f0100d5
public const int layout = 2130772181;
// aapt resource value: 0x7f010000
public const int layoutManager = 2130771968;
// aapt resource value: 0x7f01011f
public const int layout_anchor = 2130772255;
// aapt resource value: 0x7f010121
public const int layout_anchorGravity = 2130772257;
// aapt resource value: 0x7f01011e
public const int layout_behavior = 2130772254;
// aapt resource value: 0x7f01011a
public const int layout_collapseMode = 2130772250;
// aapt resource value: 0x7f01011b
public const int layout_collapseParallaxMultiplier = 2130772251;
// aapt resource value: 0x7f010123
public const int layout_dodgeInsetEdges = 2130772259;
// aapt resource value: 0x7f010122
public const int layout_insetEdge = 2130772258;
// aapt resource value: 0x7f010120
public const int layout_keyline = 2130772256;
// aapt resource value: 0x7f010106
public const int layout_scrollFlags = 2130772230;
// aapt resource value: 0x7f010107
public const int layout_scrollInterpolator = 2130772231;
// aapt resource value: 0x7f01009b
public const int listChoiceBackgroundIndicator = 2130772123;
// aapt resource value: 0x7f010075
public const int listDividerAlertDialog = 2130772085;
// aapt resource value: 0x7f010041
public const int listItemLayout = 2130772033;
// aapt resource value: 0x7f01003e
public const int listLayout = 2130772030;
// aapt resource value: 0x7f0100bb
public const int listMenuViewStyle = 2130772155;
// aapt resource value: 0x7f010094
public const int listPopupWindowStyle = 2130772116;
// aapt resource value: 0x7f01008e
public const int listPreferredItemHeight = 2130772110;
// aapt resource value: 0x7f010090
public const int listPreferredItemHeightLarge = 2130772112;
// aapt resource value: 0x7f01008f
public const int listPreferredItemHeightSmall = 2130772111;
// aapt resource value: 0x7f010091
public const int listPreferredItemPaddingLeft = 2130772113;
// aapt resource value: 0x7f010092
public const int listPreferredItemPaddingRight = 2130772114;
// aapt resource value: 0x7f010026
public const int logo = 2130772006;
// aapt resource value: 0x7f0100fb
public const int logoDescription = 2130772219;
// aapt resource value: 0x7f010136
public const int maxActionInlineWidth = 2130772278;
// aapt resource value: 0x7f0100f5
public const int maxButtonHeight = 2130772213;
// aapt resource value: 0x7f0100c8
public const int measureWithLargestChild = 2130772168;
// aapt resource value: 0x7f010004
public const int mediaRouteAudioTrackDrawable = 2130771972;
// aapt resource value: 0x7f010005
public const int mediaRouteButtonStyle = 2130771973;
// aapt resource value: 0x7f010006
public const int mediaRouteCloseDrawable = 2130771974;
// aapt resource value: 0x7f010007
public const int mediaRouteControlPanelThemeOverlay = 2130771975;
// aapt resource value: 0x7f010008
public const int mediaRouteDefaultIconDrawable = 2130771976;
// aapt resource value: 0x7f010009
public const int mediaRoutePauseDrawable = 2130771977;
// aapt resource value: 0x7f01000a
public const int mediaRoutePlayDrawable = 2130771978;
// aapt resource value: 0x7f01000b
public const int mediaRouteSpeakerGroupIconDrawable = 2130771979;
// aapt resource value: 0x7f01000c
public const int mediaRouteSpeakerIconDrawable = 2130771980;
// aapt resource value: 0x7f01000d
public const int mediaRouteStopDrawable = 2130771981;
// aapt resource value: 0x7f01000e
public const int mediaRouteTheme = 2130771982;
// aapt resource value: 0x7f01000f
public const int mediaRouteTvIconDrawable = 2130771983;
// aapt resource value: 0x7f01012e
public const int menu = 2130772270;
// aapt resource value: 0x7f01003f
public const int multiChoiceItemLayout = 2130772031;
// aapt resource value: 0x7f0100fa
public const int navigationContentDescription = 2130772218;
// aapt resource value: 0x7f0100f9
public const int navigationIcon = 2130772217;
// aapt resource value: 0x7f010020
public const int navigationMode = 2130772000;
// aapt resource value: 0x7f0100d1
public const int overlapAnchor = 2130772177;
// aapt resource value: 0x7f0100d3
public const int paddingBottomNoButtons = 2130772179;
// aapt resource value: 0x7f0100ff
public const int paddingEnd = 2130772223;
// aapt resource value: 0x7f0100fe
public const int paddingStart = 2130772222;
// aapt resource value: 0x7f0100d4
public const int paddingTopNoTitle = 2130772180;
// aapt resource value: 0x7f010098
public const int panelBackground = 2130772120;
// aapt resource value: 0x7f01009a
public const int panelMenuListTheme = 2130772122;
// aapt resource value: 0x7f010099
public const int panelMenuListWidth = 2130772121;
// aapt resource value: 0x7f010152
public const int passwordToggleContentDescription = 2130772306;
// aapt resource value: 0x7f010151
public const int passwordToggleDrawable = 2130772305;
// aapt resource value: 0x7f010150
public const int passwordToggleEnabled = 2130772304;
// aapt resource value: 0x7f010153
public const int passwordToggleTint = 2130772307;
// aapt resource value: 0x7f010154
public const int passwordToggleTintMode = 2130772308;
// aapt resource value: 0x7f010085
public const int popupMenuStyle = 2130772101;
// aapt resource value: 0x7f010039
public const int popupTheme = 2130772025;
// aapt resource value: 0x7f010086
public const int popupWindowStyle = 2130772102;
// aapt resource value: 0x7f0100cf
public const int preserveIconSpacing = 2130772175;
// aapt resource value: 0x7f010129
public const int pressedTranslationZ = 2130772265;
// aapt resource value: 0x7f01002f
public const int progressBarPadding = 2130772015;
// aapt resource value: 0x7f01002d
public const int progressBarStyle = 2130772013;
// aapt resource value: 0x7f0100e0
public const int queryBackground = 2130772192;
// aapt resource value: 0x7f0100d7
public const int queryHint = 2130772183;
// aapt resource value: 0x7f0100b4
public const int radioButtonStyle = 2130772148;
// aapt resource value: 0x7f0100b5
public const int ratingBarStyle = 2130772149;
// aapt resource value: 0x7f0100b6
public const int ratingBarStyleIndicator = 2130772150;
// aapt resource value: 0x7f0100b7
public const int ratingBarStyleSmall = 2130772151;
// aapt resource value: 0x7f010002
public const int reverseLayout = 2130771970;
// aapt resource value: 0x7f010127
public const int rippleColor = 2130772263;
// aapt resource value: 0x7f010116
public const int scrimAnimationDuration = 2130772246;
// aapt resource value: 0x7f010115
public const int scrimVisibleHeightTrigger = 2130772245;
// aapt resource value: 0x7f0100dc
public const int searchHintIcon = 2130772188;
// aapt resource value: 0x7f0100db
public const int searchIcon = 2130772187;
// aapt resource value: 0x7f01008d
public const int searchViewStyle = 2130772109;
// aapt resource value: 0x7f0100b8
public const int seekBarStyle = 2130772152;
// aapt resource value: 0x7f01007d
public const int selectableItemBackground = 2130772093;
// aapt resource value: 0x7f01007e
public const int selectableItemBackgroundBorderless = 2130772094;
// aapt resource value: 0x7f0100cb
public const int showAsAction = 2130772171;
// aapt resource value: 0x7f0100c9
public const int showDividers = 2130772169;
// aapt resource value: 0x7f0100ec
public const int showText = 2130772204;
// aapt resource value: 0x7f010042
public const int showTitle = 2130772034;
// aapt resource value: 0x7f010040
public const int singleChoiceItemLayout = 2130772032;
// aapt resource value: 0x7f010001
public const int spanCount = 2130771969;
// aapt resource value: 0x7f0100c1
public const int spinBars = 2130772161;
// aapt resource value: 0x7f010078
public const int spinnerDropDownItemStyle = 2130772088;
// aapt resource value: 0x7f0100b9
public const int spinnerStyle = 2130772153;
// aapt resource value: 0x7f0100eb
public const int splitTrack = 2130772203;
// aapt resource value: 0x7f010043
public const int srcCompat = 2130772035;
// aapt resource value: 0x7f010003
public const int stackFromEnd = 2130771971;
// aapt resource value: 0x7f0100d2
public const int state_above_anchor = 2130772178;
// aapt resource value: 0x7f010104
public const int state_collapsed = 2130772228;
// aapt resource value: 0x7f010105
public const int state_collapsible = 2130772229;
// aapt resource value: 0x7f01011d
public const int statusBarBackground = 2130772253;
// aapt resource value: 0x7f010113
public const int statusBarScrim = 2130772243;
// aapt resource value: 0x7f0100d0
public const int subMenuArrow = 2130772176;
// aapt resource value: 0x7f0100e1
public const int submitBackground = 2130772193;
// aapt resource value: 0x7f010022
public const int subtitle = 2130772002;
// aapt resource value: 0x7f0100ee
public const int subtitleTextAppearance = 2130772206;
// aapt resource value: 0x7f0100fd
public const int subtitleTextColor = 2130772221;
// aapt resource value: 0x7f010024
public const int subtitleTextStyle = 2130772004;
// aapt resource value: 0x7f0100df
public const int suggestionRowLayout = 2130772191;
// aapt resource value: 0x7f0100e9
public const int switchMinWidth = 2130772201;
// aapt resource value: 0x7f0100ea
public const int switchPadding = 2130772202;
// aapt resource value: 0x7f0100ba
public const int switchStyle = 2130772154;
// aapt resource value: 0x7f0100e8
public const int switchTextAppearance = 2130772200;
// aapt resource value: 0x7f01013a
public const int tabBackground = 2130772282;
// aapt resource value: 0x7f010139
public const int tabContentStart = 2130772281;
// aapt resource value: 0x7f01013c
public const int tabGravity = 2130772284;
// aapt resource value: 0x7f010137
public const int tabIndicatorColor = 2130772279;
// aapt resource value: 0x7f010138
public const int tabIndicatorHeight = 2130772280;
// aapt resource value: 0x7f01013e
public const int tabMaxWidth = 2130772286;
// aapt resource value: 0x7f01013d
public const int tabMinWidth = 2130772285;
// aapt resource value: 0x7f01013b
public const int tabMode = 2130772283;
// aapt resource value: 0x7f010146
public const int tabPadding = 2130772294;
// aapt resource value: 0x7f010145
public const int tabPaddingBottom = 2130772293;
// aapt resource value: 0x7f010144
public const int tabPaddingEnd = 2130772292;
// aapt resource value: 0x7f010142
public const int tabPaddingStart = 2130772290;
// aapt resource value: 0x7f010143
public const int tabPaddingTop = 2130772291;
// aapt resource value: 0x7f010141
public const int tabSelectedTextColor = 2130772289;
// aapt resource value: 0x7f01013f
public const int tabTextAppearance = 2130772287;
// aapt resource value: 0x7f010140
public const int tabTextColor = 2130772288;
// aapt resource value: 0x7f010049
public const int textAllCaps = 2130772041;
// aapt resource value: 0x7f010070
public const int textAppearanceLargePopupMenu = 2130772080;
// aapt resource value: 0x7f010095
public const int textAppearanceListItem = 2130772117;
// aapt resource value: 0x7f010096
public const int textAppearanceListItemSecondary = 2130772118;
// aapt resource value: 0x7f010097
public const int textAppearanceListItemSmall = 2130772119;
// aapt resource value: 0x7f010072
public const int textAppearancePopupMenuHeader = 2130772082;
// aapt resource value: 0x7f01008b
public const int textAppearanceSearchResultSubtitle = 2130772107;
// aapt resource value: 0x7f01008a
public const int textAppearanceSearchResultTitle = 2130772106;
// aapt resource value: 0x7f010071
public const int textAppearanceSmallPopupMenu = 2130772081;
// aapt resource value: 0x7f0100aa
public const int textColorAlertDialogListItem = 2130772138;
// aapt resource value: 0x7f010126
public const int textColorError = 2130772262;
// aapt resource value: 0x7f01008c
public const int textColorSearchUrl = 2130772108;
// aapt resource value: 0x7f010100
public const int theme = 2130772224;
// aapt resource value: 0x7f0100c7
public const int thickness = 2130772167;
// aapt resource value: 0x7f0100e7
public const int thumbTextPadding = 2130772199;
// aapt resource value: 0x7f0100e2
public const int thumbTint = 2130772194;
// aapt resource value: 0x7f0100e3
public const int thumbTintMode = 2130772195;
// aapt resource value: 0x7f010046
public const int tickMark = 2130772038;
// aapt resource value: 0x7f010047
public const int tickMarkTint = 2130772039;
// aapt resource value: 0x7f010048
public const int tickMarkTintMode = 2130772040;
// aapt resource value: 0x7f010044
public const int tint = 2130772036;
// aapt resource value: 0x7f010045
public const int tintMode = 2130772037;
// aapt resource value: 0x7f01001f
public const int title = 2130771999;
// aapt resource value: 0x7f010119
public const int titleEnabled = 2130772249;
// aapt resource value: 0x7f0100ef
public const int titleMargin = 2130772207;
// aapt resource value: 0x7f0100f3
public const int titleMarginBottom = 2130772211;
// aapt resource value: 0x7f0100f1
public const int titleMarginEnd = 2130772209;
// aapt resource value: 0x7f0100f0
public const int titleMarginStart = 2130772208;
// aapt resource value: 0x7f0100f2
public const int titleMarginTop = 2130772210;
// aapt resource value: 0x7f0100f4
public const int titleMargins = 2130772212;
// aapt resource value: 0x7f0100ed
public const int titleTextAppearance = 2130772205;
// aapt resource value: 0x7f0100fc
public const int titleTextColor = 2130772220;
// aapt resource value: 0x7f010023
public const int titleTextStyle = 2130772003;
// aapt resource value: 0x7f010114
public const int toolbarId = 2130772244;
// aapt resource value: 0x7f010084
public const int toolbarNavigationButtonStyle = 2130772100;
// aapt resource value: 0x7f010083
public const int toolbarStyle = 2130772099;
// aapt resource value: 0x7f0100e4
public const int track = 2130772196;
// aapt resource value: 0x7f0100e5
public const int trackTint = 2130772197;
// aapt resource value: 0x7f0100e6
public const int trackTintMode = 2130772198;
// aapt resource value: 0x7f01012b
public const int useCompatPadding = 2130772267;
// aapt resource value: 0x7f0100dd
public const int voiceIcon = 2130772189;
// aapt resource value: 0x7f01004a
public const int windowActionBar = 2130772042;
// aapt resource value: 0x7f01004c
public const int windowActionBarOverlay = 2130772044;
// aapt resource value: 0x7f01004d
public const int windowActionModeOverlay = 2130772045;
// aapt resource value: 0x7f010051
public const int windowFixedHeightMajor = 2130772049;
// aapt resource value: 0x7f01004f
public const int windowFixedHeightMinor = 2130772047;
// aapt resource value: 0x7f01004e
public const int windowFixedWidthMajor = 2130772046;
// aapt resource value: 0x7f010050
public const int windowFixedWidthMinor = 2130772048;
// aapt resource value: 0x7f010052
public const int windowMinWidthMajor = 2130772050;
// aapt resource value: 0x7f010053
public const int windowMinWidthMinor = 2130772051;
// aapt resource value: 0x7f01004b
public const int windowNoTitle = 2130772043;
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Boolean
{
// aapt resource value: 0x7f0d0000
public const int abc_action_bar_embed_tabs = 2131558400;
// aapt resource value: 0x7f0d0001
public const int abc_allow_stacked_button_bar = 2131558401;
// aapt resource value: 0x7f0d0002
public const int abc_config_actionMenuItemAllCaps = 2131558402;
// aapt resource value: 0x7f0d0003
public const int abc_config_closeDialogWhenTouchOutside = 2131558403;
// aapt resource value: 0x7f0d0004
public const int abc_config_showMenuShortcutsWhenKeyboardPresent = 2131558404;
static Boolean()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Boolean()
{
}
}
public partial class Color
{
// aapt resource value: 0x7f0c004a
public const int abc_background_cache_hint_selector_material_dark = 2131492938;
// aapt resource value: 0x7f0c004b
public const int abc_background_cache_hint_selector_material_light = 2131492939;
// aapt resource value: 0x7f0c004c
public const int abc_btn_colored_borderless_text_material = 2131492940;
// aapt resource value: 0x7f0c004d
public const int abc_btn_colored_text_material = 2131492941;
// aapt resource value: 0x7f0c004e
public const int abc_color_highlight_material = 2131492942;
// aapt resource value: 0x7f0c004f
public const int abc_hint_foreground_material_dark = 2131492943;
// aapt resource value: 0x7f0c0050
public const int abc_hint_foreground_material_light = 2131492944;
// aapt resource value: 0x7f0c0005
public const int abc_input_method_navigation_guard = 2131492869;
// aapt resource value: 0x7f0c0051
public const int abc_primary_text_disable_only_material_dark = 2131492945;
// aapt resource value: 0x7f0c0052
public const int abc_primary_text_disable_only_material_light = 2131492946;
// aapt resource value: 0x7f0c0053
public const int abc_primary_text_material_dark = 2131492947;
// aapt resource value: 0x7f0c0054
public const int abc_primary_text_material_light = 2131492948;
// aapt resource value: 0x7f0c0055
public const int abc_search_url_text = 2131492949;
// aapt resource value: 0x7f0c0006
public const int abc_search_url_text_normal = 2131492870;
// aapt resource value: 0x7f0c0007
public const int abc_search_url_text_pressed = 2131492871;
// aapt resource value: 0x7f0c0008
public const int abc_search_url_text_selected = 2131492872;
// aapt resource value: 0x7f0c0056
public const int abc_secondary_text_material_dark = 2131492950;
// aapt resource value: 0x7f0c0057
public const int abc_secondary_text_material_light = 2131492951;
// aapt resource value: 0x7f0c0058
public const int abc_tint_btn_checkable = 2131492952;
// aapt resource value: 0x7f0c0059
public const int abc_tint_default = 2131492953;
// aapt resource value: 0x7f0c005a
public const int abc_tint_edittext = 2131492954;
// aapt resource value: 0x7f0c005b
public const int abc_tint_seek_thumb = 2131492955;
// aapt resource value: 0x7f0c005c
public const int abc_tint_spinner = 2131492956;
// aapt resource value: 0x7f0c005d
public const int abc_tint_switch_thumb = 2131492957;
// aapt resource value: 0x7f0c005e
public const int abc_tint_switch_track = 2131492958;
// aapt resource value: 0x7f0c0009
public const int accent_material_dark = 2131492873;
// aapt resource value: 0x7f0c000a
public const int accent_material_light = 2131492874;
// aapt resource value: 0x7f0c000b
public const int background_floating_material_dark = 2131492875;
// aapt resource value: 0x7f0c000c
public const int background_floating_material_light = 2131492876;
// aapt resource value: 0x7f0c000d
public const int background_material_dark = 2131492877;
// aapt resource value: 0x7f0c000e
public const int background_material_light = 2131492878;
// aapt resource value: 0x7f0c000f
public const int bright_foreground_disabled_material_dark = 2131492879;
// aapt resource value: 0x7f0c0010
public const int bright_foreground_disabled_material_light = 2131492880;
// aapt resource value: 0x7f0c0011
public const int bright_foreground_inverse_material_dark = 2131492881;
// aapt resource value: 0x7f0c0012
public const int bright_foreground_inverse_material_light = 2131492882;
// aapt resource value: 0x7f0c0013
public const int bright_foreground_material_dark = 2131492883;
// aapt resource value: 0x7f0c0014
public const int bright_foreground_material_light = 2131492884;
// aapt resource value: 0x7f0c0015
public const int button_material_dark = 2131492885;
// aapt resource value: 0x7f0c0016
public const int button_material_light = 2131492886;
// aapt resource value: 0x7f0c0000
public const int cardview_dark_background = 2131492864;
// aapt resource value: 0x7f0c0001
public const int cardview_light_background = 2131492865;
// aapt resource value: 0x7f0c0002
public const int cardview_shadow_end_color = 2131492866;
// aapt resource value: 0x7f0c0003
public const int cardview_shadow_start_color = 2131492867;
// aapt resource value: 0x7f0c003f
public const int design_bottom_navigation_shadow_color = 2131492927;
// aapt resource value: 0x7f0c005f
public const int design_error = 2131492959;
// aapt resource value: 0x7f0c0040
public const int design_fab_shadow_end_color = 2131492928;
// aapt resource value: 0x7f0c0041
public const int design_fab_shadow_mid_color = 2131492929;
// aapt resource value: 0x7f0c0042
public const int design_fab_shadow_start_color = 2131492930;
// aapt resource value: 0x7f0c0043
public const int design_fab_stroke_end_inner_color = 2131492931;
// aapt resource value: 0x7f0c0044
public const int design_fab_stroke_end_outer_color = 2131492932;
// aapt resource value: 0x7f0c0045
public const int design_fab_stroke_top_inner_color = 2131492933;
// aapt resource value: 0x7f0c0046
public const int design_fab_stroke_top_outer_color = 2131492934;
// aapt resource value: 0x7f0c0047
public const int design_snackbar_background_color = 2131492935;
// aapt resource value: 0x7f0c0048
public const int design_textinput_error_color_dark = 2131492936;
// aapt resource value: 0x7f0c0049
public const int design_textinput_error_color_light = 2131492937;
// aapt resource value: 0x7f0c0060
public const int design_tint_password_toggle = 2131492960;
// aapt resource value: 0x7f0c0017
public const int dim_foreground_disabled_material_dark = 2131492887;
// aapt resource value: 0x7f0c0018
public const int dim_foreground_disabled_material_light = 2131492888;
// aapt resource value: 0x7f0c0019
public const int dim_foreground_material_dark = 2131492889;
// aapt resource value: 0x7f0c001a
public const int dim_foreground_material_light = 2131492890;
// aapt resource value: 0x7f0c001b
public const int foreground_material_dark = 2131492891;
// aapt resource value: 0x7f0c001c
public const int foreground_material_light = 2131492892;
// aapt resource value: 0x7f0c001d
public const int highlighted_text_material_dark = 2131492893;
// aapt resource value: 0x7f0c001e
public const int highlighted_text_material_light = 2131492894;
// aapt resource value: 0x7f0c001f
public const int material_blue_grey_800 = 2131492895;
// aapt resource value: 0x7f0c0020
public const int material_blue_grey_900 = 2131492896;
// aapt resource value: 0x7f0c0021
public const int material_blue_grey_950 = 2131492897;
// aapt resource value: 0x7f0c0022
public const int material_deep_teal_200 = 2131492898;
// aapt resource value: 0x7f0c0023
public const int material_deep_teal_500 = 2131492899;
// aapt resource value: 0x7f0c0024
public const int material_grey_100 = 2131492900;
// aapt resource value: 0x7f0c0025
public const int material_grey_300 = 2131492901;
// aapt resource value: 0x7f0c0026
public const int material_grey_50 = 2131492902;
// aapt resource value: 0x7f0c0027
public const int material_grey_600 = 2131492903;
// aapt resource value: 0x7f0c0028
public const int material_grey_800 = 2131492904;
// aapt resource value: 0x7f0c0029
public const int material_grey_850 = 2131492905;
// aapt resource value: 0x7f0c002a
public const int material_grey_900 = 2131492906;
// aapt resource value: 0x7f0c0004
public const int notification_action_color_filter = 2131492868;
// aapt resource value: 0x7f0c002b
public const int notification_icon_bg_color = 2131492907;
// aapt resource value: 0x7f0c002c
public const int notification_material_background_media_default_color = 2131492908;
// aapt resource value: 0x7f0c002d
public const int primary_dark_material_dark = 2131492909;
// aapt resource value: 0x7f0c002e
public const int primary_dark_material_light = 2131492910;
// aapt resource value: 0x7f0c002f
public const int primary_material_dark = 2131492911;
// aapt resource value: 0x7f0c0030
public const int primary_material_light = 2131492912;
// aapt resource value: 0x7f0c0031
public const int primary_text_default_material_dark = 2131492913;
// aapt resource value: 0x7f0c0032
public const int primary_text_default_material_light = 2131492914;
// aapt resource value: 0x7f0c0033
public const int primary_text_disabled_material_dark = 2131492915;
// aapt resource value: 0x7f0c0034
public const int primary_text_disabled_material_light = 2131492916;
// aapt resource value: 0x7f0c0035
public const int ripple_material_dark = 2131492917;
// aapt resource value: 0x7f0c0036
public const int ripple_material_light = 2131492918;
// aapt resource value: 0x7f0c0037
public const int secondary_text_default_material_dark = 2131492919;
// aapt resource value: 0x7f0c0038
public const int secondary_text_default_material_light = 2131492920;
// aapt resource value: 0x7f0c0039
public const int secondary_text_disabled_material_dark = 2131492921;
// aapt resource value: 0x7f0c003a
public const int secondary_text_disabled_material_light = 2131492922;
// aapt resource value: 0x7f0c003b
public const int switch_thumb_disabled_material_dark = 2131492923;
// aapt resource value: 0x7f0c003c
public const int switch_thumb_disabled_material_light = 2131492924;
// aapt resource value: 0x7f0c0061
public const int switch_thumb_material_dark = 2131492961;
// aapt resource value: 0x7f0c0062
public const int switch_thumb_material_light = 2131492962;
// aapt resource value: 0x7f0c003d
public const int switch_thumb_normal_material_dark = 2131492925;
// aapt resource value: 0x7f0c003e
public const int switch_thumb_normal_material_light = 2131492926;
static Color()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Color()
{
}
}
public partial class Dimension
{
// aapt resource value: 0x7f070018
public const int abc_action_bar_content_inset_material = 2131165208;
// aapt resource value: 0x7f070019
public const int abc_action_bar_content_inset_with_nav = 2131165209;
// aapt resource value: 0x7f07000d
public const int abc_action_bar_default_height_material = 2131165197;
// aapt resource value: 0x7f07001a
public const int abc_action_bar_default_padding_end_material = 2131165210;
// aapt resource value: 0x7f07001b
public const int abc_action_bar_default_padding_start_material = 2131165211;
// aapt resource value: 0x7f070021
public const int abc_action_bar_elevation_material = 2131165217;
// aapt resource value: 0x7f070022
public const int abc_action_bar_icon_vertical_padding_material = 2131165218;
// aapt resource value: 0x7f070023
public const int abc_action_bar_overflow_padding_end_material = 2131165219;
// aapt resource value: 0x7f070024
public const int abc_action_bar_overflow_padding_start_material = 2131165220;
// aapt resource value: 0x7f07000e
public const int abc_action_bar_progress_bar_size = 2131165198;
// aapt resource value: 0x7f070025
public const int abc_action_bar_stacked_max_height = 2131165221;
// aapt resource value: 0x7f070026
public const int abc_action_bar_stacked_tab_max_width = 2131165222;
// aapt resource value: 0x7f070027
public const int abc_action_bar_subtitle_bottom_margin_material = 2131165223;
// aapt resource value: 0x7f070028
public const int abc_action_bar_subtitle_top_margin_material = 2131165224;
// aapt resource value: 0x7f070029
public const int abc_action_button_min_height_material = 2131165225;
// aapt resource value: 0x7f07002a
public const int abc_action_button_min_width_material = 2131165226;
// aapt resource value: 0x7f07002b
public const int abc_action_button_min_width_overflow_material = 2131165227;
// aapt resource value: 0x7f07000c
public const int abc_alert_dialog_button_bar_height = 2131165196;
// aapt resource value: 0x7f07002c
public const int abc_button_inset_horizontal_material = 2131165228;
// aapt resource value: 0x7f07002d
public const int abc_button_inset_vertical_material = 2131165229;
// aapt resource value: 0x7f07002e
public const int abc_button_padding_horizontal_material = 2131165230;
// aapt resource value: 0x7f07002f
public const int abc_button_padding_vertical_material = 2131165231;
// aapt resource value: 0x7f070030
public const int abc_cascading_menus_min_smallest_width = 2131165232;
// aapt resource value: 0x7f070011
public const int abc_config_prefDialogWidth = 2131165201;
// aapt resource value: 0x7f070031
public const int abc_control_corner_material = 2131165233;
// aapt resource value: 0x7f070032
public const int abc_control_inset_material = 2131165234;
// aapt resource value: 0x7f070033
public const int abc_control_padding_material = 2131165235;
// aapt resource value: 0x7f070012
public const int abc_dialog_fixed_height_major = 2131165202;
// aapt resource value: 0x7f070013
public const int abc_dialog_fixed_height_minor = 2131165203;
// aapt resource value: 0x7f070014
public const int abc_dialog_fixed_width_major = 2131165204;
// aapt resource value: 0x7f070015
public const int abc_dialog_fixed_width_minor = 2131165205;
// aapt resource value: 0x7f070034
public const int abc_dialog_list_padding_bottom_no_buttons = 2131165236;
// aapt resource value: 0x7f070035
public const int abc_dialog_list_padding_top_no_title = 2131165237;
// aapt resource value: 0x7f070016
public const int abc_dialog_min_width_major = 2131165206;
// aapt resource value: 0x7f070017
public const int abc_dialog_min_width_minor = 2131165207;
// aapt resource value: 0x7f070036
public const int abc_dialog_padding_material = 2131165238;
// aapt resource value: 0x7f070037
public const int abc_dialog_padding_top_material = 2131165239;
// aapt resource value: 0x7f070038
public const int abc_dialog_title_divider_material = 2131165240;
// aapt resource value: 0x7f070039
public const int abc_disabled_alpha_material_dark = 2131165241;
// aapt resource value: 0x7f07003a
public const int abc_disabled_alpha_material_light = 2131165242;
// aapt resource value: 0x7f07003b
public const int abc_dropdownitem_icon_width = 2131165243;
// aapt resource value: 0x7f07003c
public const int abc_dropdownitem_text_padding_left = 2131165244;
// aapt resource value: 0x7f07003d
public const int abc_dropdownitem_text_padding_right = 2131165245;
// aapt resource value: 0x7f07003e
public const int abc_edit_text_inset_bottom_material = 2131165246;
// aapt resource value: 0x7f07003f
public const int abc_edit_text_inset_horizontal_material = 2131165247;
// aapt resource value: 0x7f070040
public const int abc_edit_text_inset_top_material = 2131165248;
// aapt resource value: 0x7f070041
public const int abc_floating_window_z = 2131165249;
// aapt resource value: 0x7f070042
public const int abc_list_item_padding_horizontal_material = 2131165250;
// aapt resource value: 0x7f070043
public const int abc_panel_menu_list_width = 2131165251;
// aapt resource value: 0x7f070044
public const int abc_progress_bar_height_material = 2131165252;
// aapt resource value: 0x7f070045
public const int abc_search_view_preferred_height = 2131165253;
// aapt resource value: 0x7f070046
public const int abc_search_view_preferred_width = 2131165254;
// aapt resource value: 0x7f070047
public const int abc_seekbar_track_background_height_material = 2131165255;
// aapt resource value: 0x7f070048
public const int abc_seekbar_track_progress_height_material = 2131165256;
// aapt resource value: 0x7f070049
public const int abc_select_dialog_padding_start_material = 2131165257;
// aapt resource value: 0x7f07001d
public const int abc_switch_padding = 2131165213;
// aapt resource value: 0x7f07004a
public const int abc_text_size_body_1_material = 2131165258;
// aapt resource value: 0x7f07004b
public const int abc_text_size_body_2_material = 2131165259;
// aapt resource value: 0x7f07004c
public const int abc_text_size_button_material = 2131165260;
// aapt resource value: 0x7f07004d
public const int abc_text_size_caption_material = 2131165261;
// aapt resource value: 0x7f07004e
public const int abc_text_size_display_1_material = 2131165262;
// aapt resource value: 0x7f07004f
public const int abc_text_size_display_2_material = 2131165263;
// aapt resource value: 0x7f070050
public const int abc_text_size_display_3_material = 2131165264;
// aapt resource value: 0x7f070051
public const int abc_text_size_display_4_material = 2131165265;
// aapt resource value: 0x7f070052
public const int abc_text_size_headline_material = 2131165266;
// aapt resource value: 0x7f070053
public const int abc_text_size_large_material = 2131165267;
// aapt resource value: 0x7f070054
public const int abc_text_size_medium_material = 2131165268;
// aapt resource value: 0x7f070055
public const int abc_text_size_menu_header_material = 2131165269;
// aapt resource value: 0x7f070056
public const int abc_text_size_menu_material = 2131165270;
// aapt resource value: 0x7f070057
public const int abc_text_size_small_material = 2131165271;
// aapt resource value: 0x7f070058
public const int abc_text_size_subhead_material = 2131165272;
// aapt resource value: 0x7f07000f
public const int abc_text_size_subtitle_material_toolbar = 2131165199;
// aapt resource value: 0x7f070059
public const int abc_text_size_title_material = 2131165273;
// aapt resource value: 0x7f070010
public const int abc_text_size_title_material_toolbar = 2131165200;
// aapt resource value: 0x7f070009
public const int cardview_compat_inset_shadow = 2131165193;
// aapt resource value: 0x7f07000a
public const int cardview_default_elevation = 2131165194;
// aapt resource value: 0x7f07000b
public const int cardview_default_radius = 2131165195;
// aapt resource value: 0x7f070076
public const int design_appbar_elevation = 2131165302;
// aapt resource value: 0x7f070077
public const int design_bottom_navigation_active_item_max_width = 2131165303;
// aapt resource value: 0x7f070078
public const int design_bottom_navigation_active_text_size = 2131165304;
// aapt resource value: 0x7f070079
public const int design_bottom_navigation_elevation = 2131165305;
// aapt resource value: 0x7f07007a
public const int design_bottom_navigation_height = 2131165306;
// aapt resource value: 0x7f07007b
public const int design_bottom_navigation_item_max_width = 2131165307;
// aapt resource value: 0x7f07007c
public const int design_bottom_navigation_item_min_width = 2131165308;
// aapt resource value: 0x7f07007d
public const int design_bottom_navigation_margin = 2131165309;
// aapt resource value: 0x7f07007e
public const int design_bottom_navigation_shadow_height = 2131165310;
// aapt resource value: 0x7f07007f
public const int design_bottom_navigation_text_size = 2131165311;
// aapt resource value: 0x7f070080
public const int design_bottom_sheet_modal_elevation = 2131165312;
// aapt resource value: 0x7f070081
public const int design_bottom_sheet_peek_height_min = 2131165313;
// aapt resource value: 0x7f070082
public const int design_fab_border_width = 2131165314;
// aapt resource value: 0x7f070083
public const int design_fab_elevation = 2131165315;
// aapt resource value: 0x7f070084
public const int design_fab_image_size = 2131165316;
// aapt resource value: 0x7f070085
public const int design_fab_size_mini = 2131165317;
// aapt resource value: 0x7f070086
public const int design_fab_size_normal = 2131165318;
// aapt resource value: 0x7f070087
public const int design_fab_translation_z_pressed = 2131165319;
// aapt resource value: 0x7f070088
public const int design_navigation_elevation = 2131165320;
// aapt resource value: 0x7f070089
public const int design_navigation_icon_padding = 2131165321;
// aapt resource value: 0x7f07008a
public const int design_navigation_icon_size = 2131165322;
// aapt resource value: 0x7f07006e
public const int design_navigation_max_width = 2131165294;
// aapt resource value: 0x7f07008b
public const int design_navigation_padding_bottom = 2131165323;
// aapt resource value: 0x7f07008c
public const int design_navigation_separator_vertical_padding = 2131165324;
// aapt resource value: 0x7f07006f
public const int design_snackbar_action_inline_max_width = 2131165295;
// aapt resource value: 0x7f070070
public const int design_snackbar_background_corner_radius = 2131165296;
// aapt resource value: 0x7f07008d
public const int design_snackbar_elevation = 2131165325;
// aapt resource value: 0x7f070071
public const int design_snackbar_extra_spacing_horizontal = 2131165297;
// aapt resource value: 0x7f070072
public const int design_snackbar_max_width = 2131165298;
// aapt resource value: 0x7f070073
public const int design_snackbar_min_width = 2131165299;
// aapt resource value: 0x7f07008e
public const int design_snackbar_padding_horizontal = 2131165326;
// aapt resource value: 0x7f07008f
public const int design_snackbar_padding_vertical = 2131165327;
// aapt resource value: 0x7f070074
public const int design_snackbar_padding_vertical_2lines = 2131165300;
// aapt resource value: 0x7f070090
public const int design_snackbar_text_size = 2131165328;
// aapt resource value: 0x7f070091
public const int design_tab_max_width = 2131165329;
// aapt resource value: 0x7f070075
public const int design_tab_scrollable_min_width = 2131165301;
// aapt resource value: 0x7f070092
public const int design_tab_text_size = 2131165330;
// aapt resource value: 0x7f070093
public const int design_tab_text_size_2line = 2131165331;
// aapt resource value: 0x7f07005a
public const int disabled_alpha_material_dark = 2131165274;
// aapt resource value: 0x7f07005b
public const int disabled_alpha_material_light = 2131165275;
// aapt resource value: 0x7f07005c
public const int highlight_alpha_material_colored = 2131165276;
// aapt resource value: 0x7f07005d
public const int highlight_alpha_material_dark = 2131165277;
// aapt resource value: 0x7f07005e
public const int highlight_alpha_material_light = 2131165278;
// aapt resource value: 0x7f07005f
public const int hint_alpha_material_dark = 2131165279;
// aapt resource value: 0x7f070060
public const int hint_alpha_material_light = 2131165280;
// aapt resource value: 0x7f070061
public const int hint_pressed_alpha_material_dark = 2131165281;
// aapt resource value: 0x7f070062
public const int hint_pressed_alpha_material_light = 2131165282;
// aapt resource value: 0x7f070000
public const int item_touch_helper_max_drag_scroll_per_frame = 2131165184;
// aapt resource value: 0x7f070001
public const int item_touch_helper_swipe_escape_max_velocity = 2131165185;
// aapt resource value: 0x7f070002
public const int item_touch_helper_swipe_escape_velocity = 2131165186;
// aapt resource value: 0x7f070003
public const int mr_controller_volume_group_list_item_height = 2131165187;
// aapt resource value: 0x7f070004
public const int mr_controller_volume_group_list_item_icon_size = 2131165188;
// aapt resource value: 0x7f070005
public const int mr_controller_volume_group_list_max_height = 2131165189;
// aapt resource value: 0x7f070008
public const int mr_controller_volume_group_list_padding_top = 2131165192;
// aapt resource value: 0x7f070006
public const int mr_dialog_fixed_width_major = 2131165190;
// aapt resource value: 0x7f070007
public const int mr_dialog_fixed_width_minor = 2131165191;
// aapt resource value: 0x7f070063
public const int notification_action_icon_size = 2131165283;
// aapt resource value: 0x7f070064
public const int notification_action_text_size = 2131165284;
// aapt resource value: 0x7f070065
public const int notification_big_circle_margin = 2131165285;
// aapt resource value: 0x7f07001e
public const int notification_content_margin_start = 2131165214;
// aapt resource value: 0x7f070066
public const int notification_large_icon_height = 2131165286;
// aapt resource value: 0x7f070067
public const int notification_large_icon_width = 2131165287;
// aapt resource value: 0x7f07001f
public const int notification_main_column_padding_top = 2131165215;
// aapt resource value: 0x7f070020
public const int notification_media_narrow_margin = 2131165216;
// aapt resource value: 0x7f070068
public const int notification_right_icon_size = 2131165288;
// aapt resource value: 0x7f07001c
public const int notification_right_side_padding_top = 2131165212;
// aapt resource value: 0x7f070069
public const int notification_small_icon_background_padding = 2131165289;
// aapt resource value: 0x7f07006a
public const int notification_small_icon_size_as_large = 2131165290;
// aapt resource value: 0x7f07006b
public const int notification_subtext_size = 2131165291;
// aapt resource value: 0x7f07006c
public const int notification_top_pad = 2131165292;
// aapt resource value: 0x7f07006d
public const int notification_top_pad_large_text = 2131165293;
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: 0x7f020110
public const int avd_hide_password_1 = 2130837776;
// aapt resource value: 0x7f020111
public const int avd_hide_password_2 = 2130837777;
// aapt resource value: 0x7f020112
public const int avd_hide_password_3 = 2130837778;
// aapt resource value: 0x7f020054
public const int avd_show_password = 2130837588;
// aapt resource value: 0x7f020113
public const int avd_show_password_1 = 2130837779;
// aapt resource value: 0x7f020114
public const int avd_show_password_2 = 2130837780;
// aapt resource value: 0x7f020115
public const int avd_show_password_3 = 2130837781;
// 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_arrow_back = 2130837595;
// aapt resource value: 0x7f02005c
public const int ic_audiotrack_dark = 2130837596;
// aapt resource value: 0x7f02005d
public const int ic_audiotrack_light = 2130837597;
// aapt resource value: 0x7f02005e
public const int ic_dialog_close_dark = 2130837598;
// aapt resource value: 0x7f02005f
public const int ic_dialog_close_light = 2130837599;
// aapt resource value: 0x7f020060
public const int ic_group_collapse_00 = 2130837600;
// aapt resource value: 0x7f020061
public const int ic_group_collapse_01 = 2130837601;
// aapt resource value: 0x7f020062
public const int ic_group_collapse_02 = 2130837602;
// aapt resource value: 0x7f020063
public const int ic_group_collapse_03 = 2130837603;
// aapt resource value: 0x7f020064
public const int ic_group_collapse_04 = 2130837604;
// aapt resource value: 0x7f020065
public const int ic_group_collapse_05 = 2130837605;
// aapt resource value: 0x7f020066
public const int ic_group_collapse_06 = 2130837606;
// aapt resource value: 0x7f020067
public const int ic_group_collapse_07 = 2130837607;
// aapt resource value: 0x7f020068
public const int ic_group_collapse_08 = 2130837608;
// aapt resource value: 0x7f020069
public const int ic_group_collapse_09 = 2130837609;
// aapt resource value: 0x7f02006a
public const int ic_group_collapse_10 = 2130837610;
// aapt resource value: 0x7f02006b
public const int ic_group_collapse_11 = 2130837611;
// aapt resource value: 0x7f02006c
public const int ic_group_collapse_12 = 2130837612;
// aapt resource value: 0x7f02006d
public const int ic_group_collapse_13 = 2130837613;
// aapt resource value: 0x7f02006e
public const int ic_group_collapse_14 = 2130837614;
// aapt resource value: 0x7f02006f
public const int ic_group_collapse_15 = 2130837615;
// aapt resource value: 0x7f020070
public const int ic_group_expand_00 = 2130837616;
// aapt resource value: 0x7f020071
public const int ic_group_expand_01 = 2130837617;
// aapt resource value: 0x7f020072
public const int ic_group_expand_02 = 2130837618;
// aapt resource value: 0x7f020073
public const int ic_group_expand_03 = 2130837619;
// aapt resource value: 0x7f020074
public const int ic_group_expand_04 = 2130837620;
// aapt resource value: 0x7f020075
public const int ic_group_expand_05 = 2130837621;
// aapt resource value: 0x7f020076
public const int ic_group_expand_06 = 2130837622;
// aapt resource value: 0x7f020077
public const int ic_group_expand_07 = 2130837623;
// aapt resource value: 0x7f020078
public const int ic_group_expand_08 = 2130837624;
// aapt resource value: 0x7f020079
public const int ic_group_expand_09 = 2130837625;
// aapt resource value: 0x7f02007a
public const int ic_group_expand_10 = 2130837626;
// aapt resource value: 0x7f02007b
public const int ic_group_expand_11 = 2130837627;
// aapt resource value: 0x7f02007c
public const int ic_group_expand_12 = 2130837628;
// aapt resource value: 0x7f02007d
public const int ic_group_expand_13 = 2130837629;
// aapt resource value: 0x7f02007e
public const int ic_group_expand_14 = 2130837630;
// aapt resource value: 0x7f02007f
public const int ic_group_expand_15 = 2130837631;
// aapt resource value: 0x7f020080
public const int ic_media_pause_dark = 2130837632;
// aapt resource value: 0x7f020081
public const int ic_media_pause_light = 2130837633;
// aapt resource value: 0x7f020082
public const int ic_media_play_dark = 2130837634;
// aapt resource value: 0x7f020083
public const int ic_media_play_light = 2130837635;
// aapt resource value: 0x7f020084
public const int ic_media_stop_dark = 2130837636;
// aapt resource value: 0x7f020085
public const int ic_media_stop_light = 2130837637;
// aapt resource value: 0x7f020086
public const int ic_mr_button_connected_00_dark = 2130837638;
// aapt resource value: 0x7f020087
public const int ic_mr_button_connected_00_light = 2130837639;
// aapt resource value: 0x7f020088
public const int ic_mr_button_connected_01_dark = 2130837640;
// aapt resource value: 0x7f020089
public const int ic_mr_button_connected_01_light = 2130837641;
// aapt resource value: 0x7f02008a
public const int ic_mr_button_connected_02_dark = 2130837642;
// aapt resource value: 0x7f02008b
public const int ic_mr_button_connected_02_light = 2130837643;
// aapt resource value: 0x7f02008c
public const int ic_mr_button_connected_03_dark = 2130837644;
// aapt resource value: 0x7f02008d
public const int ic_mr_button_connected_03_light = 2130837645;
// aapt resource value: 0x7f02008e
public const int ic_mr_button_connected_04_dark = 2130837646;
// aapt resource value: 0x7f02008f
public const int ic_mr_button_connected_04_light = 2130837647;
// aapt resource value: 0x7f020090
public const int ic_mr_button_connected_05_dark = 2130837648;
// aapt resource value: 0x7f020091
public const int ic_mr_button_connected_05_light = 2130837649;
// aapt resource value: 0x7f020092
public const int ic_mr_button_connected_06_dark = 2130837650;
// aapt resource value: 0x7f020093
public const int ic_mr_button_connected_06_light = 2130837651;
// aapt resource value: 0x7f020094
public const int ic_mr_button_connected_07_dark = 2130837652;
// aapt resource value: 0x7f020095
public const int ic_mr_button_connected_07_light = 2130837653;
// aapt resource value: 0x7f020096
public const int ic_mr_button_connected_08_dark = 2130837654;
// aapt resource value: 0x7f020097
public const int ic_mr_button_connected_08_light = 2130837655;
// aapt resource value: 0x7f020098
public const int ic_mr_button_connected_09_dark = 2130837656;
// aapt resource value: 0x7f020099
public const int ic_mr_button_connected_09_light = 2130837657;
// aapt resource value: 0x7f02009a
public const int ic_mr_button_connected_10_dark = 2130837658;
// aapt resource value: 0x7f02009b
public const int ic_mr_button_connected_10_light = 2130837659;
// aapt resource value: 0x7f02009c
public const int ic_mr_button_connected_11_dark = 2130837660;
// aapt resource value: 0x7f02009d
public const int ic_mr_button_connected_11_light = 2130837661;
// aapt resource value: 0x7f02009e
public const int ic_mr_button_connected_12_dark = 2130837662;
// aapt resource value: 0x7f02009f
public const int ic_mr_button_connected_12_light = 2130837663;
// aapt resource value: 0x7f0200a0
public const int ic_mr_button_connected_13_dark = 2130837664;
// aapt resource value: 0x7f0200a1
public const int ic_mr_button_connected_13_light = 2130837665;
// aapt resource value: 0x7f0200a2
public const int ic_mr_button_connected_14_dark = 2130837666;
// aapt resource value: 0x7f0200a3
public const int ic_mr_button_connected_14_light = 2130837667;
// aapt resource value: 0x7f0200a4
public const int ic_mr_button_connected_15_dark = 2130837668;
// aapt resource value: 0x7f0200a5
public const int ic_mr_button_connected_15_light = 2130837669;
// aapt resource value: 0x7f0200a6
public const int ic_mr_button_connected_16_dark = 2130837670;
// aapt resource value: 0x7f0200a7
public const int ic_mr_button_connected_16_light = 2130837671;
// aapt resource value: 0x7f0200a8
public const int ic_mr_button_connected_17_dark = 2130837672;
// aapt resource value: 0x7f0200a9
public const int ic_mr_button_connected_17_light = 2130837673;
// aapt resource value: 0x7f0200aa
public const int ic_mr_button_connected_18_dark = 2130837674;
// aapt resource value: 0x7f0200ab
public const int ic_mr_button_connected_18_light = 2130837675;
// aapt resource value: 0x7f0200ac
public const int ic_mr_button_connected_19_dark = 2130837676;
// aapt resource value: 0x7f0200ad
public const int ic_mr_button_connected_19_light = 2130837677;
// aapt resource value: 0x7f0200ae
public const int ic_mr_button_connected_20_dark = 2130837678;
// aapt resource value: 0x7f0200af
public const int ic_mr_button_connected_20_light = 2130837679;
// aapt resource value: 0x7f0200b0
public const int ic_mr_button_connected_21_dark = 2130837680;
// aapt resource value: 0x7f0200b1
public const int ic_mr_button_connected_21_light = 2130837681;
// aapt resource value: 0x7f0200b2
public const int ic_mr_button_connected_22_dark = 2130837682;
// aapt resource value: 0x7f0200b3
public const int ic_mr_button_connected_22_light = 2130837683;
// aapt resource value: 0x7f0200b4
public const int ic_mr_button_connecting_00_dark = 2130837684;
// aapt resource value: 0x7f0200b5
public const int ic_mr_button_connecting_00_light = 2130837685;
// aapt resource value: 0x7f0200b6
public const int ic_mr_button_connecting_01_dark = 2130837686;
// aapt resource value: 0x7f0200b7
public const int ic_mr_button_connecting_01_light = 2130837687;
// aapt resource value: 0x7f0200b8
public const int ic_mr_button_connecting_02_dark = 2130837688;
// aapt resource value: 0x7f0200b9
public const int ic_mr_button_connecting_02_light = 2130837689;
// aapt resource value: 0x7f0200ba
public const int ic_mr_button_connecting_03_dark = 2130837690;
// aapt resource value: 0x7f0200bb
public const int ic_mr_button_connecting_03_light = 2130837691;
// aapt resource value: 0x7f0200bc
public const int ic_mr_button_connecting_04_dark = 2130837692;
// aapt resource value: 0x7f0200bd
public const int ic_mr_button_connecting_04_light = 2130837693;
// aapt resource value: 0x7f0200be
public const int ic_mr_button_connecting_05_dark = 2130837694;
// aapt resource value: 0x7f0200bf
public const int ic_mr_button_connecting_05_light = 2130837695;
// aapt resource value: 0x7f0200c0
public const int ic_mr_button_connecting_06_dark = 2130837696;
// aapt resource value: 0x7f0200c1
public const int ic_mr_button_connecting_06_light = 2130837697;
// aapt resource value: 0x7f0200c2
public const int ic_mr_button_connecting_07_dark = 2130837698;
// aapt resource value: 0x7f0200c3
public const int ic_mr_button_connecting_07_light = 2130837699;
// aapt resource value: 0x7f0200c4
public const int ic_mr_button_connecting_08_dark = 2130837700;
// aapt resource value: 0x7f0200c5
public const int ic_mr_button_connecting_08_light = 2130837701;
// aapt resource value: 0x7f0200c6
public const int ic_mr_button_connecting_09_dark = 2130837702;
// aapt resource value: 0x7f0200c7
public const int ic_mr_button_connecting_09_light = 2130837703;
// aapt resource value: 0x7f0200c8
public const int ic_mr_button_connecting_10_dark = 2130837704;
// aapt resource value: 0x7f0200c9
public const int ic_mr_button_connecting_10_light = 2130837705;
// aapt resource value: 0x7f0200ca
public const int ic_mr_button_connecting_11_dark = 2130837706;
// aapt resource value: 0x7f0200cb
public const int ic_mr_button_connecting_11_light = 2130837707;
// aapt resource value: 0x7f0200cc
public const int ic_mr_button_connecting_12_dark = 2130837708;
// aapt resource value: 0x7f0200cd
public const int ic_mr_button_connecting_12_light = 2130837709;
// aapt resource value: 0x7f0200ce
public const int ic_mr_button_connecting_13_dark = 2130837710;
// aapt resource value: 0x7f0200cf
public const int ic_mr_button_connecting_13_light = 2130837711;
// aapt resource value: 0x7f0200d0
public const int ic_mr_button_connecting_14_dark = 2130837712;
// aapt resource value: 0x7f0200d1
public const int ic_mr_button_connecting_14_light = 2130837713;
// aapt resource value: 0x7f0200d2
public const int ic_mr_button_connecting_15_dark = 2130837714;
// aapt resource value: 0x7f0200d3
public const int ic_mr_button_connecting_15_light = 2130837715;
// aapt resource value: 0x7f0200d4
public const int ic_mr_button_connecting_16_dark = 2130837716;
// aapt resource value: 0x7f0200d5
public const int ic_mr_button_connecting_16_light = 2130837717;
// aapt resource value: 0x7f0200d6
public const int ic_mr_button_connecting_17_dark = 2130837718;
// aapt resource value: 0x7f0200d7
public const int ic_mr_button_connecting_17_light = 2130837719;
// aapt resource value: 0x7f0200d8
public const int ic_mr_button_connecting_18_dark = 2130837720;
// aapt resource value: 0x7f0200d9
public const int ic_mr_button_connecting_18_light = 2130837721;
// aapt resource value: 0x7f0200da
public const int ic_mr_button_connecting_19_dark = 2130837722;
// aapt resource value: 0x7f0200db
public const int ic_mr_button_connecting_19_light = 2130837723;
// aapt resource value: 0x7f0200dc
public const int ic_mr_button_connecting_20_dark = 2130837724;
// aapt resource value: 0x7f0200dd
public const int ic_mr_button_connecting_20_light = 2130837725;
// aapt resource value: 0x7f0200de
public const int ic_mr_button_connecting_21_dark = 2130837726;
// aapt resource value: 0x7f0200df
public const int ic_mr_button_connecting_21_light = 2130837727;
// aapt resource value: 0x7f0200e0
public const int ic_mr_button_connecting_22_dark = 2130837728;
// aapt resource value: 0x7f0200e1
public const int ic_mr_button_connecting_22_light = 2130837729;
// aapt resource value: 0x7f0200e2
public const int ic_mr_button_disabled_dark = 2130837730;
// aapt resource value: 0x7f0200e3
public const int ic_mr_button_disabled_light = 2130837731;
// aapt resource value: 0x7f0200e4
public const int ic_mr_button_disconnected_dark = 2130837732;
// aapt resource value: 0x7f0200e5
public const int ic_mr_button_disconnected_light = 2130837733;
// aapt resource value: 0x7f0200e6
public const int ic_mr_button_grey = 2130837734;
// aapt resource value: 0x7f0200e7
public const int ic_vol_type_speaker_dark = 2130837735;
// aapt resource value: 0x7f0200e8
public const int ic_vol_type_speaker_group_dark = 2130837736;
// aapt resource value: 0x7f0200e9
public const int ic_vol_type_speaker_group_light = 2130837737;
// aapt resource value: 0x7f0200ea
public const int ic_vol_type_speaker_light = 2130837738;
// aapt resource value: 0x7f0200eb
public const int ic_vol_type_tv_dark = 2130837739;
// aapt resource value: 0x7f0200ec
public const int ic_vol_type_tv_light = 2130837740;
// aapt resource value: 0x7f0200ed
public const int icon = 2130837741;
// aapt resource value: 0x7f0200ee
public const int mr_button_connected_dark = 2130837742;
// aapt resource value: 0x7f0200ef
public const int mr_button_connected_light = 2130837743;
// aapt resource value: 0x7f0200f0
public const int mr_button_connecting_dark = 2130837744;
// aapt resource value: 0x7f0200f1
public const int mr_button_connecting_light = 2130837745;
// aapt resource value: 0x7f0200f2
public const int mr_button_dark = 2130837746;
// aapt resource value: 0x7f0200f3
public const int mr_button_light = 2130837747;
// aapt resource value: 0x7f0200f4
public const int mr_dialog_close_dark = 2130837748;
// aapt resource value: 0x7f0200f5
public const int mr_dialog_close_light = 2130837749;
// aapt resource value: 0x7f0200f6
public const int mr_dialog_material_background_dark = 2130837750;
// aapt resource value: 0x7f0200f7
public const int mr_dialog_material_background_light = 2130837751;
// aapt resource value: 0x7f0200f8
public const int mr_group_collapse = 2130837752;
// aapt resource value: 0x7f0200f9
public const int mr_group_expand = 2130837753;
// aapt resource value: 0x7f0200fa
public const int mr_media_pause_dark = 2130837754;
// aapt resource value: 0x7f0200fb
public const int mr_media_pause_light = 2130837755;
// aapt resource value: 0x7f0200fc
public const int mr_media_play_dark = 2130837756;
// aapt resource value: 0x7f0200fd
public const int mr_media_play_light = 2130837757;
// aapt resource value: 0x7f0200fe
public const int mr_media_stop_dark = 2130837758;
// aapt resource value: 0x7f0200ff
public const int mr_media_stop_light = 2130837759;
// aapt resource value: 0x7f020100
public const int mr_vol_type_audiotrack_dark = 2130837760;
// aapt resource value: 0x7f020101
public const int mr_vol_type_audiotrack_light = 2130837761;
// aapt resource value: 0x7f020102
public const int navigation_empty_icon = 2130837762;
// aapt resource value: 0x7f020103
public const int notification_action_background = 2130837763;
// aapt resource value: 0x7f020104
public const int notification_bg = 2130837764;
// aapt resource value: 0x7f020105
public const int notification_bg_low = 2130837765;
// aapt resource value: 0x7f020106
public const int notification_bg_low_normal = 2130837766;
// aapt resource value: 0x7f020107
public const int notification_bg_low_pressed = 2130837767;
// aapt resource value: 0x7f020108
public const int notification_bg_normal = 2130837768;
// aapt resource value: 0x7f020109
public const int notification_bg_normal_pressed = 2130837769;
// aapt resource value: 0x7f02010a
public const int notification_icon_background = 2130837770;
// aapt resource value: 0x7f02010e
public const int notification_template_icon_bg = 2130837774;
// aapt resource value: 0x7f02010f
public const int notification_template_icon_low_bg = 2130837775;
// aapt resource value: 0x7f02010b
public const int notification_tile_bg = 2130837771;
// aapt resource value: 0x7f02010c
public const int notify_panel_notification_icon_bg = 2130837772;
// aapt resource value: 0x7f02010d
public const int xamarin_logo = 2130837773;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class Id
{
// aapt resource value: 0x7f08009f
public const int action0 = 2131230879;
// aapt resource value: 0x7f080064
public const int action_bar = 2131230820;
// aapt resource value: 0x7f080001
public const int action_bar_activity_content = 2131230721;
// aapt resource value: 0x7f080063
public const int action_bar_container = 2131230819;
// aapt resource value: 0x7f08005f
public const int action_bar_root = 2131230815;
// aapt resource value: 0x7f080002
public const int action_bar_spinner = 2131230722;
// aapt resource value: 0x7f080042
public const int action_bar_subtitle = 2131230786;
// aapt resource value: 0x7f080041
public const int action_bar_title = 2131230785;
// aapt resource value: 0x7f08009c
public const int action_container = 2131230876;
// aapt resource value: 0x7f080065
public const int action_context_bar = 2131230821;
// aapt resource value: 0x7f0800a3
public const int action_divider = 2131230883;
// aapt resource value: 0x7f08009d
public const int action_image = 2131230877;
// aapt resource value: 0x7f080003
public const int action_menu_divider = 2131230723;
// aapt resource value: 0x7f080004
public const int action_menu_presenter = 2131230724;
// aapt resource value: 0x7f080061
public const int action_mode_bar = 2131230817;
// aapt resource value: 0x7f080060
public const int action_mode_bar_stub = 2131230816;
// aapt resource value: 0x7f080043
public const int action_mode_close_button = 2131230787;
// aapt resource value: 0x7f08009e
public const int action_text = 2131230878;
// aapt resource value: 0x7f0800ac
public const int actions = 2131230892;
// aapt resource value: 0x7f080044
public const int activity_chooser_view_content = 2131230788;
// aapt resource value: 0x7f08001e
public const int add = 2131230750;
// aapt resource value: 0x7f080058
public const int alertTitle = 2131230808;
// aapt resource value: 0x7f08003d
public const int all = 2131230781;
// aapt resource value: 0x7f080023
public const int always = 2131230755;
// aapt resource value: 0x7f08002f
public const int auto = 2131230767;
// aapt resource value: 0x7f080020
public const int beginning = 2131230752;
// aapt resource value: 0x7f080028
public const int bottom = 2131230760;
// aapt resource value: 0x7f08004b
public const int buttonPanel = 2131230795;
// aapt resource value: 0x7f0800a0
public const int cancel_action = 2131230880;
// aapt resource value: 0x7f080030
public const int center = 2131230768;
// aapt resource value: 0x7f080031
public const int center_horizontal = 2131230769;
// aapt resource value: 0x7f080032
public const int center_vertical = 2131230770;
// aapt resource value: 0x7f08005b
public const int checkbox = 2131230811;
// aapt resource value: 0x7f0800a8
public const int chronometer = 2131230888;
// aapt resource value: 0x7f080039
public const int clip_horizontal = 2131230777;
// aapt resource value: 0x7f08003a
public const int clip_vertical = 2131230778;
// aapt resource value: 0x7f080024
public const int collapseActionView = 2131230756;
// aapt resource value: 0x7f080076
public const int container = 2131230838;
// aapt resource value: 0x7f08004e
public const int contentPanel = 2131230798;
// aapt resource value: 0x7f080077
public const int coordinator = 2131230839;
// aapt resource value: 0x7f080055
public const int custom = 2131230805;
// aapt resource value: 0x7f080054
public const int customPanel = 2131230804;
// aapt resource value: 0x7f080062
public const int decor_content_parent = 2131230818;
// aapt resource value: 0x7f080047
public const int default_activity_button = 2131230791;
// aapt resource value: 0x7f080079
public const int design_bottom_sheet = 2131230841;
// aapt resource value: 0x7f080080
public const int design_menu_item_action_area = 2131230848;
// aapt resource value: 0x7f08007f
public const int design_menu_item_action_area_stub = 2131230847;
// aapt resource value: 0x7f08007e
public const int design_menu_item_text = 2131230846;
// aapt resource value: 0x7f08007d
public const int design_navigation_view = 2131230845;
// aapt resource value: 0x7f080012
public const int disableHome = 2131230738;
// aapt resource value: 0x7f080066
public const int edit_query = 2131230822;
// aapt resource value: 0x7f080021
public const int end = 2131230753;
// aapt resource value: 0x7f0800b2
public const int end_padder = 2131230898;
// aapt resource value: 0x7f08002a
public const int enterAlways = 2131230762;
// aapt resource value: 0x7f08002b
public const int enterAlwaysCollapsed = 2131230763;
// aapt resource value: 0x7f08002c
public const int exitUntilCollapsed = 2131230764;
// aapt resource value: 0x7f080045
public const int expand_activities_button = 2131230789;
// aapt resource value: 0x7f08005a
public const int expanded_menu = 2131230810;
// aapt resource value: 0x7f08003b
public const int fill = 2131230779;
// aapt resource value: 0x7f08003c
public const int fill_horizontal = 2131230780;
// aapt resource value: 0x7f080033
public const int fill_vertical = 2131230771;
// aapt resource value: 0x7f08003f
public const int @fixed = 2131230783;
// aapt resource value: 0x7f080005
public const int home = 2131230725;
// aapt resource value: 0x7f080013
public const int homeAsUp = 2131230739;
// aapt resource value: 0x7f080049
public const int icon = 2131230793;
// aapt resource value: 0x7f0800ad
public const int icon_group = 2131230893;
// aapt resource value: 0x7f080025
public const int ifRoom = 2131230757;
// aapt resource value: 0x7f080046
public const int image = 2131230790;
// aapt resource value: 0x7f0800a9
public const int info = 2131230889;
// aapt resource value: 0x7f080000
public const int item_touch_helper_previous_elevation = 2131230720;
// aapt resource value: 0x7f080075
public const int largeLabel = 2131230837;
// aapt resource value: 0x7f080034
public const int left = 2131230772;
// aapt resource value: 0x7f0800ae
public const int line1 = 2131230894;
// aapt resource value: 0x7f0800b0
public const int line3 = 2131230896;
// aapt resource value: 0x7f08000f
public const int listMode = 2131230735;
// aapt resource value: 0x7f080048
public const int list_item = 2131230792;
// aapt resource value: 0x7f0800b6
public const int masked = 2131230902;
// aapt resource value: 0x7f0800a2
public const int media_actions = 2131230882;
// aapt resource value: 0x7f080022
public const int middle = 2131230754;
// aapt resource value: 0x7f08003e
public const int mini = 2131230782;
// aapt resource value: 0x7f08008e
public const int mr_art = 2131230862;
// aapt resource value: 0x7f080083
public const int mr_chooser_list = 2131230851;
// aapt resource value: 0x7f080086
public const int mr_chooser_route_desc = 2131230854;
// aapt resource value: 0x7f080084
public const int mr_chooser_route_icon = 2131230852;
// aapt resource value: 0x7f080085
public const int mr_chooser_route_name = 2131230853;
// aapt resource value: 0x7f080082
public const int mr_chooser_title = 2131230850;
// aapt resource value: 0x7f08008b
public const int mr_close = 2131230859;
// aapt resource value: 0x7f080091
public const int mr_control_divider = 2131230865;
// aapt resource value: 0x7f080097
public const int mr_control_playback_ctrl = 2131230871;
// aapt resource value: 0x7f08009a
public const int mr_control_subtitle = 2131230874;
// aapt resource value: 0x7f080099
public const int mr_control_title = 2131230873;
// aapt resource value: 0x7f080098
public const int mr_control_title_container = 2131230872;
// aapt resource value: 0x7f08008c
public const int mr_custom_control = 2131230860;
// aapt resource value: 0x7f08008d
public const int mr_default_control = 2131230861;
// aapt resource value: 0x7f080088
public const int mr_dialog_area = 2131230856;
// aapt resource value: 0x7f080087
public const int mr_expandable_area = 2131230855;
// aapt resource value: 0x7f08009b
public const int mr_group_expand_collapse = 2131230875;
// aapt resource value: 0x7f08008f
public const int mr_media_main_control = 2131230863;
// aapt resource value: 0x7f08008a
public const int mr_name = 2131230858;
// aapt resource value: 0x7f080090
public const int mr_playback_control = 2131230864;
// aapt resource value: 0x7f080089
public const int mr_title_bar = 2131230857;
// aapt resource value: 0x7f080092
public const int mr_volume_control = 2131230866;
// aapt resource value: 0x7f080093
public const int mr_volume_group_list = 2131230867;
// aapt resource value: 0x7f080095
public const int mr_volume_item_icon = 2131230869;
// aapt resource value: 0x7f080096
public const int mr_volume_slider = 2131230870;
// aapt resource value: 0x7f080019
public const int multiply = 2131230745;
// aapt resource value: 0x7f08007c
public const int navigation_header_container = 2131230844;
// aapt resource value: 0x7f080026
public const int never = 2131230758;
// aapt resource value: 0x7f080014
public const int none = 2131230740;
// aapt resource value: 0x7f080010
public const int normal = 2131230736;
// aapt resource value: 0x7f0800ab
public const int notification_background = 2131230891;
// aapt resource value: 0x7f0800a5
public const int notification_main_column = 2131230885;
// aapt resource value: 0x7f0800a4
public const int notification_main_column_container = 2131230884;
// aapt resource value: 0x7f080037
public const int parallax = 2131230775;
// aapt resource value: 0x7f08004d
public const int parentPanel = 2131230797;
// aapt resource value: 0x7f080038
public const int pin = 2131230776;
// aapt resource value: 0x7f080006
public const int progress_circular = 2131230726;
// aapt resource value: 0x7f080007
public const int progress_horizontal = 2131230727;
// aapt resource value: 0x7f08005d
public const int radio = 2131230813;
// aapt resource value: 0x7f080035
public const int right = 2131230773;
// aapt resource value: 0x7f0800aa
public const int right_icon = 2131230890;
// aapt resource value: 0x7f0800a6
public const int right_side = 2131230886;
// aapt resource value: 0x7f08001a
public const int screen = 2131230746;
// aapt resource value: 0x7f08002d
public const int scroll = 2131230765;
// aapt resource value: 0x7f080053
public const int scrollIndicatorDown = 2131230803;
// aapt resource value: 0x7f08004f
public const int scrollIndicatorUp = 2131230799;
// aapt resource value: 0x7f080050
public const int scrollView = 2131230800;
// aapt resource value: 0x7f080040
public const int scrollable = 2131230784;
// aapt resource value: 0x7f080068
public const int search_badge = 2131230824;
// aapt resource value: 0x7f080067
public const int search_bar = 2131230823;
// aapt resource value: 0x7f080069
public const int search_button = 2131230825;
// aapt resource value: 0x7f08006e
public const int search_close_btn = 2131230830;
// aapt resource value: 0x7f08006a
public const int search_edit_frame = 2131230826;
// aapt resource value: 0x7f080070
public const int search_go_btn = 2131230832;
// aapt resource value: 0x7f08006b
public const int search_mag_icon = 2131230827;
// aapt resource value: 0x7f08006c
public const int search_plate = 2131230828;
// aapt resource value: 0x7f08006d
public const int search_src_text = 2131230829;
// aapt resource value: 0x7f080071
public const int search_voice_btn = 2131230833;
// aapt resource value: 0x7f080072
public const int select_dialog_listview = 2131230834;
// aapt resource value: 0x7f08005c
public const int shortcut = 2131230812;
// aapt resource value: 0x7f080015
public const int showCustom = 2131230741;
// aapt resource value: 0x7f080016
public const int showHome = 2131230742;
// aapt resource value: 0x7f080017
public const int showTitle = 2131230743;
// aapt resource value: 0x7f0800b3
public const int sliding_tabs = 2131230899;
// aapt resource value: 0x7f080074
public const int smallLabel = 2131230836;
// aapt resource value: 0x7f08007b
public const int snackbar_action = 2131230843;
// aapt resource value: 0x7f08007a
public const int snackbar_text = 2131230842;
// aapt resource value: 0x7f08002e
public const int snap = 2131230766;
// aapt resource value: 0x7f08004c
public const int spacer = 2131230796;
// aapt resource value: 0x7f080008
public const int split_action_bar = 2131230728;
// aapt resource value: 0x7f08001b
public const int src_atop = 2131230747;
// aapt resource value: 0x7f08001c
public const int src_in = 2131230748;
// aapt resource value: 0x7f08001d
public const int src_over = 2131230749;
// aapt resource value: 0x7f080036
public const int start = 2131230774;
// aapt resource value: 0x7f0800a1
public const int status_bar_latest_event_content = 2131230881;
// aapt resource value: 0x7f08005e
public const int submenuarrow = 2131230814;
// aapt resource value: 0x7f08006f
public const int submit_area = 2131230831;
// aapt resource value: 0x7f080011
public const int tabMode = 2131230737;
// aapt resource value: 0x7f0800b1
public const int text = 2131230897;
// aapt resource value: 0x7f0800af
public const int text2 = 2131230895;
// aapt resource value: 0x7f080052
public const int textSpacerNoButtons = 2131230802;
// aapt resource value: 0x7f080051
public const int textSpacerNoTitle = 2131230801;
// aapt resource value: 0x7f080081
public const int text_input_password_toggle = 2131230849;
// aapt resource value: 0x7f08000c
public const int textinput_counter = 2131230732;
// aapt resource value: 0x7f08000d
public const int textinput_error = 2131230733;
// aapt resource value: 0x7f0800a7
public const int time = 2131230887;
// aapt resource value: 0x7f08004a
public const int title = 2131230794;
// aapt resource value: 0x7f080059
public const int titleDividerNoCustom = 2131230809;
// aapt resource value: 0x7f080057
public const int title_template = 2131230807;
// aapt resource value: 0x7f0800b4
public const int toolbar = 2131230900;
// aapt resource value: 0x7f080029
public const int top = 2131230761;
// aapt resource value: 0x7f080056
public const int topPanel = 2131230806;
// aapt resource value: 0x7f080078
public const int touch_outside = 2131230840;
// aapt resource value: 0x7f08000a
public const int transition_current_scene = 2131230730;
// aapt resource value: 0x7f08000b
public const int transition_scene_layoutid_cache = 2131230731;
// aapt resource value: 0x7f080009
public const int up = 2131230729;
// aapt resource value: 0x7f080018
public const int useLogo = 2131230744;
// aapt resource value: 0x7f08000e
public const int view_offset_helper = 2131230734;
// aapt resource value: 0x7f0800b5
public const int visible = 2131230901;
// aapt resource value: 0x7f080094
public const int volume_item_container = 2131230868;
// aapt resource value: 0x7f080073
public const int webview = 2131230835;
// aapt resource value: 0x7f080027
public const int withText = 2131230759;
// aapt resource value: 0x7f08001f
public const int wrap_content = 2131230751;
static Id()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Id()
{
}
}
public partial class Integer
{
// aapt resource value: 0x7f0a0003
public const int abc_config_activityDefaultDur = 2131361795;
// aapt resource value: 0x7f0a0004
public const int abc_config_activityShortDur = 2131361796;
// aapt resource value: 0x7f0a0008
public const int app_bar_elevation_anim_duration = 2131361800;
// aapt resource value: 0x7f0a0009
public const int bottom_sheet_slide_duration = 2131361801;
// aapt resource value: 0x7f0a0005
public const int cancel_button_image_alpha = 2131361797;
// aapt resource value: 0x7f0a0007
public const int design_snackbar_text_max_lines = 2131361799;
// aapt resource value: 0x7f0a000a
public const int hide_password_duration = 2131361802;
// aapt resource value: 0x7f0a0000
public const int mr_controller_volume_group_list_animation_duration_ms = 2131361792;
// aapt resource value: 0x7f0a0001
public const int mr_controller_volume_group_list_fade_in_duration_ms = 2131361793;
// aapt resource value: 0x7f0a0002
public const int mr_controller_volume_group_list_fade_out_duration_ms = 2131361794;
// aapt resource value: 0x7f0a000b
public const int show_password_duration = 2131361803;
// aapt resource value: 0x7f0a0006
public const int status_bar_notification_info_maxnum = 2131361798;
static Integer()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Integer()
{
}
}
public partial class Interpolator
{
// aapt resource value: 0x7f060000
public const int mr_fast_out_slow_in = 2131099648;
// aapt resource value: 0x7f060001
public const int mr_linear_out_slow_in = 2131099649;
static Interpolator()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Interpolator()
{
}
}
public partial class Layout
{
// aapt resource value: 0x7f030000
public const int abc_action_bar_title_item = 2130903040;
// aapt resource value: 0x7f030001
public const int abc_action_bar_up_container = 2130903041;
// aapt resource value: 0x7f030002
public const int abc_action_bar_view_list_nav_layout = 2130903042;
// aapt resource value: 0x7f030003
public const int abc_action_menu_item_layout = 2130903043;
// aapt resource value: 0x7f030004
public const int abc_action_menu_layout = 2130903044;
// aapt resource value: 0x7f030005
public const int abc_action_mode_bar = 2130903045;
// aapt resource value: 0x7f030006
public const int abc_action_mode_close_item_material = 2130903046;
// aapt resource value: 0x7f030007
public const int abc_activity_chooser_view = 2130903047;
// aapt resource value: 0x7f030008
public const int abc_activity_chooser_view_list_item = 2130903048;
// aapt resource value: 0x7f030009
public const int abc_alert_dialog_button_bar_material = 2130903049;
// aapt resource value: 0x7f03000a
public const int abc_alert_dialog_material = 2130903050;
// aapt resource value: 0x7f03000b
public const int abc_alert_dialog_title_material = 2130903051;
// aapt resource value: 0x7f03000c
public const int abc_dialog_title_material = 2130903052;
// aapt resource value: 0x7f03000d
public const int abc_expanded_menu_layout = 2130903053;
// aapt resource value: 0x7f03000e
public const int abc_list_menu_item_checkbox = 2130903054;
// aapt resource value: 0x7f03000f
public const int abc_list_menu_item_icon = 2130903055;
// aapt resource value: 0x7f030010
public const int abc_list_menu_item_layout = 2130903056;
// aapt resource value: 0x7f030011
public const int abc_list_menu_item_radio = 2130903057;
// aapt resource value: 0x7f030012
public const int abc_popup_menu_header_item_layout = 2130903058;
// aapt resource value: 0x7f030013
public const int abc_popup_menu_item_layout = 2130903059;
// aapt resource value: 0x7f030014
public const int abc_screen_content_include = 2130903060;
// aapt resource value: 0x7f030015
public const int abc_screen_simple = 2130903061;
// aapt resource value: 0x7f030016
public const int abc_screen_simple_overlay_action_mode = 2130903062;
// aapt resource value: 0x7f030017
public const int abc_screen_toolbar = 2130903063;
// aapt resource value: 0x7f030018
public const int abc_search_dropdown_item_icons_2line = 2130903064;
// aapt resource value: 0x7f030019
public const int abc_search_view = 2130903065;
// aapt resource value: 0x7f03001a
public const int abc_select_dialog_material = 2130903066;
// aapt resource value: 0x7f03001b
public const int activity_webview = 2130903067;
// aapt resource value: 0x7f03001c
public const int design_bottom_navigation_item = 2130903068;
// aapt resource value: 0x7f03001d
public const int design_bottom_sheet_dialog = 2130903069;
// aapt resource value: 0x7f03001e
public const int design_layout_snackbar = 2130903070;
// aapt resource value: 0x7f03001f
public const int design_layout_snackbar_include = 2130903071;
// aapt resource value: 0x7f030020
public const int design_layout_tab_icon = 2130903072;
// aapt resource value: 0x7f030021
public const int design_layout_tab_text = 2130903073;
// aapt resource value: 0x7f030022
public const int design_menu_item_action_area = 2130903074;
// aapt resource value: 0x7f030023
public const int design_navigation_item = 2130903075;
// aapt resource value: 0x7f030024
public const int design_navigation_item_header = 2130903076;
// aapt resource value: 0x7f030025
public const int design_navigation_item_separator = 2130903077;
// aapt resource value: 0x7f030026
public const int design_navigation_item_subheader = 2130903078;
// aapt resource value: 0x7f030027
public const int design_navigation_menu = 2130903079;
// aapt resource value: 0x7f030028
public const int design_navigation_menu_item = 2130903080;
// aapt resource value: 0x7f030029
public const int design_text_input_password_icon = 2130903081;
// aapt resource value: 0x7f03002a
public const int mr_chooser_dialog = 2130903082;
// aapt resource value: 0x7f03002b
public const int mr_chooser_list_item = 2130903083;
// aapt resource value: 0x7f03002c
public const int mr_controller_material_dialog_b = 2130903084;
// aapt resource value: 0x7f03002d
public const int mr_controller_volume_item = 2130903085;
// aapt resource value: 0x7f03002e
public const int mr_playback_control = 2130903086;
// aapt resource value: 0x7f03002f
public const int mr_volume_control = 2130903087;
// aapt resource value: 0x7f030030
public const int notification_action = 2130903088;
// aapt resource value: 0x7f030031
public const int notification_action_tombstone = 2130903089;
// aapt resource value: 0x7f030032
public const int notification_media_action = 2130903090;
// aapt resource value: 0x7f030033
public const int notification_media_cancel_action = 2130903091;
// aapt resource value: 0x7f030034
public const int notification_template_big_media = 2130903092;
// aapt resource value: 0x7f030035
public const int notification_template_big_media_custom = 2130903093;
// aapt resource value: 0x7f030036
public const int notification_template_big_media_narrow = 2130903094;
// aapt resource value: 0x7f030037
public const int notification_template_big_media_narrow_custom = 2130903095;
// aapt resource value: 0x7f030038
public const int notification_template_custom_big = 2130903096;
// aapt resource value: 0x7f030039
public const int notification_template_icon_group = 2130903097;
// aapt resource value: 0x7f03003a
public const int notification_template_lines_media = 2130903098;
// aapt resource value: 0x7f03003b
public const int notification_template_media = 2130903099;
// aapt resource value: 0x7f03003c
public const int notification_template_media_custom = 2130903100;
// aapt resource value: 0x7f03003d
public const int notification_template_part_chronometer = 2130903101;
// aapt resource value: 0x7f03003e
public const int notification_template_part_time = 2130903102;
// aapt resource value: 0x7f03003f
public const int select_dialog_item_material = 2130903103;
// aapt resource value: 0x7f030040
public const int select_dialog_multichoice_material = 2130903104;
// aapt resource value: 0x7f030041
public const int select_dialog_singlechoice_material = 2130903105;
// aapt resource value: 0x7f030042
public const int support_simple_spinner_dropdown_item = 2130903106;
// aapt resource value: 0x7f030043
public const int Tabbar = 2130903107;
// aapt resource value: 0x7f030044
public const int Toolbar = 2130903108;
static Layout()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Layout()
{
}
}
public partial class String
{
// aapt resource value: 0x7f09003f
public const int ApplicationName = 2131296319;
// aapt resource value: 0x7f09003e
public const int Hello = 2131296318;
// aapt resource value: 0x7f090015
public const int abc_action_bar_home_description = 2131296277;
// aapt resource value: 0x7f090016
public const int abc_action_bar_home_description_format = 2131296278;
// aapt resource value: 0x7f090017
public const int abc_action_bar_home_subtitle_description_format = 2131296279;
// aapt resource value: 0x7f090018
public const int abc_action_bar_up_description = 2131296280;
// aapt resource value: 0x7f090019
public const int abc_action_menu_overflow_description = 2131296281;
// aapt resource value: 0x7f09001a
public const int abc_action_mode_done = 2131296282;
// aapt resource value: 0x7f09001b
public const int abc_activity_chooser_view_see_all = 2131296283;
// aapt resource value: 0x7f09001c
public const int abc_activitychooserview_choose_application = 2131296284;
// aapt resource value: 0x7f09001d
public const int abc_capital_off = 2131296285;
// aapt resource value: 0x7f09001e
public const int abc_capital_on = 2131296286;
// aapt resource value: 0x7f09002a
public const int abc_font_family_body_1_material = 2131296298;
// aapt resource value: 0x7f09002b
public const int abc_font_family_body_2_material = 2131296299;
// aapt resource value: 0x7f09002c
public const int abc_font_family_button_material = 2131296300;
// aapt resource value: 0x7f09002d
public const int abc_font_family_caption_material = 2131296301;
// aapt resource value: 0x7f09002e
public const int abc_font_family_display_1_material = 2131296302;
// aapt resource value: 0x7f09002f
public const int abc_font_family_display_2_material = 2131296303;
// aapt resource value: 0x7f090030
public const int abc_font_family_display_3_material = 2131296304;
// aapt resource value: 0x7f090031
public const int abc_font_family_display_4_material = 2131296305;
// aapt resource value: 0x7f090032
public const int abc_font_family_headline_material = 2131296306;
// aapt resource value: 0x7f090033
public const int abc_font_family_menu_material = 2131296307;
// aapt resource value: 0x7f090034
public const int abc_font_family_subhead_material = 2131296308;
// aapt resource value: 0x7f090035
public const int abc_font_family_title_material = 2131296309;
// aapt resource value: 0x7f09001f
public const int abc_search_hint = 2131296287;
// aapt resource value: 0x7f090020
public const int abc_searchview_description_clear = 2131296288;
// aapt resource value: 0x7f090021
public const int abc_searchview_description_query = 2131296289;
// aapt resource value: 0x7f090022
public const int abc_searchview_description_search = 2131296290;
// aapt resource value: 0x7f090023
public const int abc_searchview_description_submit = 2131296291;
// aapt resource value: 0x7f090024
public const int abc_searchview_description_voice = 2131296292;
// aapt resource value: 0x7f090025
public const int abc_shareactionprovider_share_with = 2131296293;
// aapt resource value: 0x7f090026
public const int abc_shareactionprovider_share_with_application = 2131296294;
// aapt resource value: 0x7f090027
public const int abc_toolbar_collapse_description = 2131296295;
// aapt resource value: 0x7f090036
public const int appbar_scrolling_view_behavior = 2131296310;
// aapt resource value: 0x7f090037
public const int bottom_sheet_behavior = 2131296311;
// aapt resource value: 0x7f090038
public const int character_counter_pattern = 2131296312;
// aapt resource value: 0x7f090000
public const int mr_button_content_description = 2131296256;
// aapt resource value: 0x7f090001
public const int mr_cast_button_connected = 2131296257;
// aapt resource value: 0x7f090002
public const int mr_cast_button_connecting = 2131296258;
// aapt resource value: 0x7f090003
public const int mr_cast_button_disconnected = 2131296259;
// aapt resource value: 0x7f090004
public const int mr_chooser_searching = 2131296260;
// aapt resource value: 0x7f090005
public const int mr_chooser_title = 2131296261;
// aapt resource value: 0x7f090006
public const int mr_controller_album_art = 2131296262;
// aapt resource value: 0x7f090007
public const int mr_controller_casting_screen = 2131296263;
// aapt resource value: 0x7f090008
public const int mr_controller_close_description = 2131296264;
// aapt resource value: 0x7f090009
public const int mr_controller_collapse_group = 2131296265;
// aapt resource value: 0x7f09000a
public const int mr_controller_disconnect = 2131296266;
// aapt resource value: 0x7f09000b
public const int mr_controller_expand_group = 2131296267;
// aapt resource value: 0x7f09000c
public const int mr_controller_no_info_available = 2131296268;
// aapt resource value: 0x7f09000d
public const int mr_controller_no_media_selected = 2131296269;
// aapt resource value: 0x7f09000e
public const int mr_controller_pause = 2131296270;
// aapt resource value: 0x7f09000f
public const int mr_controller_play = 2131296271;
// aapt resource value: 0x7f090014
public const int mr_controller_stop = 2131296276;
// aapt resource value: 0x7f090010
public const int mr_controller_stop_casting = 2131296272;
// aapt resource value: 0x7f090011
public const int mr_controller_volume_slider = 2131296273;
// aapt resource value: 0x7f090012
public const int mr_system_route_name = 2131296274;
// aapt resource value: 0x7f090013
public const int mr_user_route_category_name = 2131296275;
// aapt resource value: 0x7f090039
public const int password_toggle_content_description = 2131296313;
// aapt resource value: 0x7f09003a
public const int path_password_eye = 2131296314;
// aapt resource value: 0x7f09003b
public const int path_password_eye_mask_strike_through = 2131296315;
// aapt resource value: 0x7f09003c
public const int path_password_eye_mask_visible = 2131296316;
// aapt resource value: 0x7f09003d
public const int path_password_strike_through = 2131296317;
// aapt resource value: 0x7f090028
public const int search_menu_title = 2131296296;
// aapt resource value: 0x7f090029
public const int status_bar_notification_info_overflow = 2131296297;
// aapt resource value: 0x7f090040
public const int title_activity_webview = 2131296320;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
public partial class Style
{
// aapt resource value: 0x7f0b00ae
public const int AlertDialog_AppCompat = 2131427502;
// aapt resource value: 0x7f0b00af
public const int AlertDialog_AppCompat_Light = 2131427503;
// aapt resource value: 0x7f0b00b0
public const int Animation_AppCompat_Dialog = 2131427504;
// aapt resource value: 0x7f0b00b1
public const int Animation_AppCompat_DropDownUp = 2131427505;
// aapt resource value: 0x7f0b0170
public const int Animation_Design_BottomSheetDialog = 2131427696;
// aapt resource value: 0x7f0b018b
public const int AppCompatDialogStyle = 2131427723;
// aapt resource value: 0x7f0b00b2
public const int Base_AlertDialog_AppCompat = 2131427506;
// aapt resource value: 0x7f0b00b3
public const int Base_AlertDialog_AppCompat_Light = 2131427507;
// aapt resource value: 0x7f0b00b4
public const int Base_Animation_AppCompat_Dialog = 2131427508;
// aapt resource value: 0x7f0b00b5
public const int Base_Animation_AppCompat_DropDownUp = 2131427509;
// aapt resource value: 0x7f0b000c
public const int Base_CardView = 2131427340;
// aapt resource value: 0x7f0b00b6
public const int Base_DialogWindowTitle_AppCompat = 2131427510;
// aapt resource value: 0x7f0b00b7
public const int Base_DialogWindowTitleBackground_AppCompat = 2131427511;
// aapt resource value: 0x7f0b004e
public const int Base_TextAppearance_AppCompat = 2131427406;
// aapt resource value: 0x7f0b004f
public const int Base_TextAppearance_AppCompat_Body1 = 2131427407;
// aapt resource value: 0x7f0b0050
public const int Base_TextAppearance_AppCompat_Body2 = 2131427408;
// aapt resource value: 0x7f0b0036
public const int Base_TextAppearance_AppCompat_Button = 2131427382;
// aapt resource value: 0x7f0b0051
public const int Base_TextAppearance_AppCompat_Caption = 2131427409;
// aapt resource value: 0x7f0b0052
public const int Base_TextAppearance_AppCompat_Display1 = 2131427410;
// aapt resource value: 0x7f0b0053
public const int Base_TextAppearance_AppCompat_Display2 = 2131427411;
// aapt resource value: 0x7f0b0054
public const int Base_TextAppearance_AppCompat_Display3 = 2131427412;
// aapt resource value: 0x7f0b0055
public const int Base_TextAppearance_AppCompat_Display4 = 2131427413;
// aapt resource value: 0x7f0b0056
public const int Base_TextAppearance_AppCompat_Headline = 2131427414;
// aapt resource value: 0x7f0b001a
public const int Base_TextAppearance_AppCompat_Inverse = 2131427354;
// aapt resource value: 0x7f0b0057
public const int Base_TextAppearance_AppCompat_Large = 2131427415;
// aapt resource value: 0x7f0b001b
public const int Base_TextAppearance_AppCompat_Large_Inverse = 2131427355;
// aapt resource value: 0x7f0b0058
public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131427416;
// aapt resource value: 0x7f0b0059
public const int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131427417;
// aapt resource value: 0x7f0b005a
public const int Base_TextAppearance_AppCompat_Medium = 2131427418;
// aapt resource value: 0x7f0b001c
public const int Base_TextAppearance_AppCompat_Medium_Inverse = 2131427356;
// aapt resource value: 0x7f0b005b
public const int Base_TextAppearance_AppCompat_Menu = 2131427419;
// aapt resource value: 0x7f0b00b8
public const int Base_TextAppearance_AppCompat_SearchResult = 2131427512;
// aapt resource value: 0x7f0b005c
public const int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 2131427420;
// aapt resource value: 0x7f0b005d
public const int Base_TextAppearance_AppCompat_SearchResult_Title = 2131427421;
// aapt resource value: 0x7f0b005e
public const int Base_TextAppearance_AppCompat_Small = 2131427422;
// aapt resource value: 0x7f0b001d
public const int Base_TextAppearance_AppCompat_Small_Inverse = 2131427357;
// aapt resource value: 0x7f0b005f
public const int Base_TextAppearance_AppCompat_Subhead = 2131427423;
// aapt resource value: 0x7f0b001e
public const int Base_TextAppearance_AppCompat_Subhead_Inverse = 2131427358;
// aapt resource value: 0x7f0b0060
public const int Base_TextAppearance_AppCompat_Title = 2131427424;
// aapt resource value: 0x7f0b001f
public const int Base_TextAppearance_AppCompat_Title_Inverse = 2131427359;
// aapt resource value: 0x7f0b00a3
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131427491;
// aapt resource value: 0x7f0b0061
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131427425;
// aapt resource value: 0x7f0b0062
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131427426;
// aapt resource value: 0x7f0b0063
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 2131427427;
// aapt resource value: 0x7f0b0064
public const int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131427428;
// aapt resource value: 0x7f0b0065
public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131427429;
// aapt resource value: 0x7f0b0066
public const int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 2131427430;
// aapt resource value: 0x7f0b0067
public const int Base_TextAppearance_AppCompat_Widget_Button = 2131427431;
// aapt resource value: 0x7f0b00aa
public const int Base_TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131427498;
// aapt resource value: 0x7f0b00ab
public const int Base_TextAppearance_AppCompat_Widget_Button_Colored = 2131427499;
// aapt resource value: 0x7f0b00a4
public const int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 2131427492;
// aapt resource value: 0x7f0b00b9
public const int Base_TextAppearance_AppCompat_Widget_DropDownItem = 2131427513;
// aapt resource value: 0x7f0b0068
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131427432;
// aapt resource value: 0x7f0b0069
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131427433;
// aapt resource value: 0x7f0b006a
public const int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131427434;
// aapt resource value: 0x7f0b006b
public const int Base_TextAppearance_AppCompat_Widget_Switch = 2131427435;
// aapt resource value: 0x7f0b006c
public const int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131427436;
// aapt resource value: 0x7f0b00ba
public const int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131427514;
// aapt resource value: 0x7f0b006d
public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131427437;
// aapt resource value: 0x7f0b006e
public const int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 2131427438;
// aapt resource value: 0x7f0b006f
public const int Base_Theme_AppCompat = 2131427439;
// aapt resource value: 0x7f0b00bb
public const int Base_Theme_AppCompat_CompactMenu = 2131427515;
// aapt resource value: 0x7f0b0020
public const int Base_Theme_AppCompat_Dialog = 2131427360;
// aapt resource value: 0x7f0b0021
public const int Base_Theme_AppCompat_Dialog_Alert = 2131427361;
// aapt resource value: 0x7f0b00bc
public const int Base_Theme_AppCompat_Dialog_FixedSize = 2131427516;
// aapt resource value: 0x7f0b0022
public const int Base_Theme_AppCompat_Dialog_MinWidth = 2131427362;
// aapt resource value: 0x7f0b0010
public const int Base_Theme_AppCompat_DialogWhenLarge = 2131427344;
// aapt resource value: 0x7f0b0070
public const int Base_Theme_AppCompat_Light = 2131427440;
// aapt resource value: 0x7f0b00bd
public const int Base_Theme_AppCompat_Light_DarkActionBar = 2131427517;
// aapt resource value: 0x7f0b0023
public const int Base_Theme_AppCompat_Light_Dialog = 2131427363;
// aapt resource value: 0x7f0b0024
public const int Base_Theme_AppCompat_Light_Dialog_Alert = 2131427364;
// aapt resource value: 0x7f0b00be
public const int Base_Theme_AppCompat_Light_Dialog_FixedSize = 2131427518;
// aapt resource value: 0x7f0b0025
public const int Base_Theme_AppCompat_Light_Dialog_MinWidth = 2131427365;
// aapt resource value: 0x7f0b0011
public const int Base_Theme_AppCompat_Light_DialogWhenLarge = 2131427345;
// aapt resource value: 0x7f0b00bf
public const int Base_ThemeOverlay_AppCompat = 2131427519;
// aapt resource value: 0x7f0b00c0
public const int Base_ThemeOverlay_AppCompat_ActionBar = 2131427520;
// aapt resource value: 0x7f0b00c1
public const int Base_ThemeOverlay_AppCompat_Dark = 2131427521;
// aapt resource value: 0x7f0b00c2
public const int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 2131427522;
// aapt resource value: 0x7f0b0026
public const int Base_ThemeOverlay_AppCompat_Dialog = 2131427366;
// aapt resource value: 0x7f0b0027
public const int Base_ThemeOverlay_AppCompat_Dialog_Alert = 2131427367;
// aapt resource value: 0x7f0b00c3
public const int Base_ThemeOverlay_AppCompat_Light = 2131427523;
// aapt resource value: 0x7f0b0028
public const int Base_V11_Theme_AppCompat_Dialog = 2131427368;
// aapt resource value: 0x7f0b0029
public const int Base_V11_Theme_AppCompat_Light_Dialog = 2131427369;
// aapt resource value: 0x7f0b002a
public const int Base_V11_ThemeOverlay_AppCompat_Dialog = 2131427370;
// aapt resource value: 0x7f0b0032
public const int Base_V12_Widget_AppCompat_AutoCompleteTextView = 2131427378;
// aapt resource value: 0x7f0b0033
public const int Base_V12_Widget_AppCompat_EditText = 2131427379;
// aapt resource value: 0x7f0b0071
public const int Base_V21_Theme_AppCompat = 2131427441;
// aapt resource value: 0x7f0b0072
public const int Base_V21_Theme_AppCompat_Dialog = 2131427442;
// aapt resource value: 0x7f0b0073
public const int Base_V21_Theme_AppCompat_Light = 2131427443;
// aapt resource value: 0x7f0b0074
public const int Base_V21_Theme_AppCompat_Light_Dialog = 2131427444;
// aapt resource value: 0x7f0b0075
public const int Base_V21_ThemeOverlay_AppCompat_Dialog = 2131427445;
// aapt resource value: 0x7f0b00a1
public const int Base_V22_Theme_AppCompat = 2131427489;
// aapt resource value: 0x7f0b00a2
public const int Base_V22_Theme_AppCompat_Light = 2131427490;
// aapt resource value: 0x7f0b00a5
public const int Base_V23_Theme_AppCompat = 2131427493;
// aapt resource value: 0x7f0b00a6
public const int Base_V23_Theme_AppCompat_Light = 2131427494;
// aapt resource value: 0x7f0b00c4
public const int Base_V7_Theme_AppCompat = 2131427524;
// aapt resource value: 0x7f0b00c5
public const int Base_V7_Theme_AppCompat_Dialog = 2131427525;
// aapt resource value: 0x7f0b00c6
public const int Base_V7_Theme_AppCompat_Light = 2131427526;
// aapt resource value: 0x7f0b00c7
public const int Base_V7_Theme_AppCompat_Light_Dialog = 2131427527;
// aapt resource value: 0x7f0b00c8
public const int Base_V7_ThemeOverlay_AppCompat_Dialog = 2131427528;
// aapt resource value: 0x7f0b00c9
public const int Base_V7_Widget_AppCompat_AutoCompleteTextView = 2131427529;
// aapt resource value: 0x7f0b00ca
public const int Base_V7_Widget_AppCompat_EditText = 2131427530;
// aapt resource value: 0x7f0b00cb
public const int Base_Widget_AppCompat_ActionBar = 2131427531;
// aapt resource value: 0x7f0b00cc
public const int Base_Widget_AppCompat_ActionBar_Solid = 2131427532;
// aapt resource value: 0x7f0b00cd
public const int Base_Widget_AppCompat_ActionBar_TabBar = 2131427533;
// aapt resource value: 0x7f0b0076
public const int Base_Widget_AppCompat_ActionBar_TabText = 2131427446;
// aapt resource value: 0x7f0b0077
public const int Base_Widget_AppCompat_ActionBar_TabView = 2131427447;
// aapt resource value: 0x7f0b0078
public const int Base_Widget_AppCompat_ActionButton = 2131427448;
// aapt resource value: 0x7f0b0079
public const int Base_Widget_AppCompat_ActionButton_CloseMode = 2131427449;
// aapt resource value: 0x7f0b007a
public const int Base_Widget_AppCompat_ActionButton_Overflow = 2131427450;
// aapt resource value: 0x7f0b00ce
public const int Base_Widget_AppCompat_ActionMode = 2131427534;
// aapt resource value: 0x7f0b00cf
public const int Base_Widget_AppCompat_ActivityChooserView = 2131427535;
// aapt resource value: 0x7f0b0034
public const int Base_Widget_AppCompat_AutoCompleteTextView = 2131427380;
// aapt resource value: 0x7f0b007b
public const int Base_Widget_AppCompat_Button = 2131427451;
// aapt resource value: 0x7f0b007c
public const int Base_Widget_AppCompat_Button_Borderless = 2131427452;
// aapt resource value: 0x7f0b007d
public const int Base_Widget_AppCompat_Button_Borderless_Colored = 2131427453;
// aapt resource value: 0x7f0b00d0
public const int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131427536;
// aapt resource value: 0x7f0b00a7
public const int Base_Widget_AppCompat_Button_Colored = 2131427495;
// aapt resource value: 0x7f0b007e
public const int Base_Widget_AppCompat_Button_Small = 2131427454;
// aapt resource value: 0x7f0b007f
public const int Base_Widget_AppCompat_ButtonBar = 2131427455;
// aapt resource value: 0x7f0b00d1
public const int Base_Widget_AppCompat_ButtonBar_AlertDialog = 2131427537;
// aapt resource value: 0x7f0b0080
public const int Base_Widget_AppCompat_CompoundButton_CheckBox = 2131427456;
// aapt resource value: 0x7f0b0081
public const int Base_Widget_AppCompat_CompoundButton_RadioButton = 2131427457;
// aapt resource value: 0x7f0b00d2
public const int Base_Widget_AppCompat_CompoundButton_Switch = 2131427538;
// aapt resource value: 0x7f0b000f
public const int Base_Widget_AppCompat_DrawerArrowToggle = 2131427343;
// aapt resource value: 0x7f0b00d3
public const int Base_Widget_AppCompat_DrawerArrowToggle_Common = 2131427539;
// aapt resource value: 0x7f0b0082
public const int Base_Widget_AppCompat_DropDownItem_Spinner = 2131427458;
// aapt resource value: 0x7f0b0035
public const int Base_Widget_AppCompat_EditText = 2131427381;
// aapt resource value: 0x7f0b0083
public const int Base_Widget_AppCompat_ImageButton = 2131427459;
// aapt resource value: 0x7f0b00d4
public const int Base_Widget_AppCompat_Light_ActionBar = 2131427540;
// aapt resource value: 0x7f0b00d5
public const int Base_Widget_AppCompat_Light_ActionBar_Solid = 2131427541;
// aapt resource value: 0x7f0b00d6
public const int Base_Widget_AppCompat_Light_ActionBar_TabBar = 2131427542;
// aapt resource value: 0x7f0b0084
public const int Base_Widget_AppCompat_Light_ActionBar_TabText = 2131427460;
// aapt resource value: 0x7f0b0085
public const int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131427461;
// aapt resource value: 0x7f0b0086
public const int Base_Widget_AppCompat_Light_ActionBar_TabView = 2131427462;
// aapt resource value: 0x7f0b0087
public const int Base_Widget_AppCompat_Light_PopupMenu = 2131427463;
// aapt resource value: 0x7f0b0088
public const int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 2131427464;
// aapt resource value: 0x7f0b00d7
public const int Base_Widget_AppCompat_ListMenuView = 2131427543;
// aapt resource value: 0x7f0b0089
public const int Base_Widget_AppCompat_ListPopupWindow = 2131427465;
// aapt resource value: 0x7f0b008a
public const int Base_Widget_AppCompat_ListView = 2131427466;
// aapt resource value: 0x7f0b008b
public const int Base_Widget_AppCompat_ListView_DropDown = 2131427467;
// aapt resource value: 0x7f0b008c
public const int Base_Widget_AppCompat_ListView_Menu = 2131427468;
// aapt resource value: 0x7f0b008d
public const int Base_Widget_AppCompat_PopupMenu = 2131427469;
// aapt resource value: 0x7f0b008e
public const int Base_Widget_AppCompat_PopupMenu_Overflow = 2131427470;
// aapt resource value: 0x7f0b00d8
public const int Base_Widget_AppCompat_PopupWindow = 2131427544;
// aapt resource value: 0x7f0b002b
public const int Base_Widget_AppCompat_ProgressBar = 2131427371;
// aapt resource value: 0x7f0b002c
public const int Base_Widget_AppCompat_ProgressBar_Horizontal = 2131427372;
// aapt resource value: 0x7f0b008f
public const int Base_Widget_AppCompat_RatingBar = 2131427471;
// aapt resource value: 0x7f0b00a8
public const int Base_Widget_AppCompat_RatingBar_Indicator = 2131427496;
// aapt resource value: 0x7f0b00a9
public const int Base_Widget_AppCompat_RatingBar_Small = 2131427497;
// aapt resource value: 0x7f0b00d9
public const int Base_Widget_AppCompat_SearchView = 2131427545;
// aapt resource value: 0x7f0b00da
public const int Base_Widget_AppCompat_SearchView_ActionBar = 2131427546;
// aapt resource value: 0x7f0b0090
public const int Base_Widget_AppCompat_SeekBar = 2131427472;
// aapt resource value: 0x7f0b00db
public const int Base_Widget_AppCompat_SeekBar_Discrete = 2131427547;
// aapt resource value: 0x7f0b0091
public const int Base_Widget_AppCompat_Spinner = 2131427473;
// aapt resource value: 0x7f0b0012
public const int Base_Widget_AppCompat_Spinner_Underlined = 2131427346;
// aapt resource value: 0x7f0b0092
public const int Base_Widget_AppCompat_TextView_SpinnerItem = 2131427474;
// aapt resource value: 0x7f0b00dc
public const int Base_Widget_AppCompat_Toolbar = 2131427548;
// aapt resource value: 0x7f0b0093
public const int Base_Widget_AppCompat_Toolbar_Button_Navigation = 2131427475;
// aapt resource value: 0x7f0b0171
public const int Base_Widget_Design_AppBarLayout = 2131427697;
// aapt resource value: 0x7f0b0172
public const int Base_Widget_Design_TabLayout = 2131427698;
// aapt resource value: 0x7f0b000b
public const int CardView = 2131427339;
// aapt resource value: 0x7f0b000d
public const int CardView_Dark = 2131427341;
// aapt resource value: 0x7f0b000e
public const int CardView_Light = 2131427342;
// aapt resource value: 0x7f0b0189
public const int MainTheme = 2131427721;
// aapt resource value: 0x7f0b018a
public const int MainTheme_Base = 2131427722;
// aapt resource value: 0x7f0b002d
public const int Platform_AppCompat = 2131427373;
// aapt resource value: 0x7f0b002e
public const int Platform_AppCompat_Light = 2131427374;
// aapt resource value: 0x7f0b0094
public const int Platform_ThemeOverlay_AppCompat = 2131427476;
// aapt resource value: 0x7f0b0095
public const int Platform_ThemeOverlay_AppCompat_Dark = 2131427477;
// aapt resource value: 0x7f0b0096
public const int Platform_ThemeOverlay_AppCompat_Light = 2131427478;
// aapt resource value: 0x7f0b002f
public const int Platform_V11_AppCompat = 2131427375;
// aapt resource value: 0x7f0b0030
public const int Platform_V11_AppCompat_Light = 2131427376;
// aapt resource value: 0x7f0b0037
public const int Platform_V14_AppCompat = 2131427383;
// aapt resource value: 0x7f0b0038
public const int Platform_V14_AppCompat_Light = 2131427384;
// aapt resource value: 0x7f0b0097
public const int Platform_V21_AppCompat = 2131427479;
// aapt resource value: 0x7f0b0098
public const int Platform_V21_AppCompat_Light = 2131427480;
// aapt resource value: 0x7f0b00ac
public const int Platform_V25_AppCompat = 2131427500;
// aapt resource value: 0x7f0b00ad
public const int Platform_V25_AppCompat_Light = 2131427501;
// aapt resource value: 0x7f0b0031
public const int Platform_Widget_AppCompat_Spinner = 2131427377;
// aapt resource value: 0x7f0b0040
public const int RtlOverlay_DialogWindowTitle_AppCompat = 2131427392;
// aapt resource value: 0x7f0b0041
public const int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 2131427393;
// aapt resource value: 0x7f0b0042
public const int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 2131427394;
// aapt resource value: 0x7f0b0043
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem = 2131427395;
// aapt resource value: 0x7f0b0044
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 2131427396;
// aapt resource value: 0x7f0b0045
public const int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 2131427397;
// aapt resource value: 0x7f0b0046
public const int RtlOverlay_Widget_AppCompat_Search_DropDown = 2131427398;
// aapt resource value: 0x7f0b0047
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 2131427399;
// aapt resource value: 0x7f0b0048
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 2131427400;
// aapt resource value: 0x7f0b0049
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 2131427401;
// aapt resource value: 0x7f0b004a
public const int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 2131427402;
// aapt resource value: 0x7f0b004b
public const int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 2131427403;
// aapt resource value: 0x7f0b004c
public const int RtlUnderlay_Widget_AppCompat_ActionButton = 2131427404;
// aapt resource value: 0x7f0b004d
public const int RtlUnderlay_Widget_AppCompat_ActionButton_Overflow = 2131427405;
// aapt resource value: 0x7f0b00dd
public const int TextAppearance_AppCompat = 2131427549;
// aapt resource value: 0x7f0b00de
public const int TextAppearance_AppCompat_Body1 = 2131427550;
// aapt resource value: 0x7f0b00df
public const int TextAppearance_AppCompat_Body2 = 2131427551;
// aapt resource value: 0x7f0b00e0
public const int TextAppearance_AppCompat_Button = 2131427552;
// aapt resource value: 0x7f0b00e1
public const int TextAppearance_AppCompat_Caption = 2131427553;
// aapt resource value: 0x7f0b00e2
public const int TextAppearance_AppCompat_Display1 = 2131427554;
// aapt resource value: 0x7f0b00e3
public const int TextAppearance_AppCompat_Display2 = 2131427555;
// aapt resource value: 0x7f0b00e4
public const int TextAppearance_AppCompat_Display3 = 2131427556;
// aapt resource value: 0x7f0b00e5
public const int TextAppearance_AppCompat_Display4 = 2131427557;
// aapt resource value: 0x7f0b00e6
public const int TextAppearance_AppCompat_Headline = 2131427558;
// aapt resource value: 0x7f0b00e7
public const int TextAppearance_AppCompat_Inverse = 2131427559;
// aapt resource value: 0x7f0b00e8
public const int TextAppearance_AppCompat_Large = 2131427560;
// aapt resource value: 0x7f0b00e9
public const int TextAppearance_AppCompat_Large_Inverse = 2131427561;
// aapt resource value: 0x7f0b00ea
public const int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 2131427562;
// aapt resource value: 0x7f0b00eb
public const int TextAppearance_AppCompat_Light_SearchResult_Title = 2131427563;
// aapt resource value: 0x7f0b00ec
public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 2131427564;
// aapt resource value: 0x7f0b00ed
public const int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 2131427565;
// aapt resource value: 0x7f0b00ee
public const int TextAppearance_AppCompat_Medium = 2131427566;
// aapt resource value: 0x7f0b00ef
public const int TextAppearance_AppCompat_Medium_Inverse = 2131427567;
// aapt resource value: 0x7f0b00f0
public const int TextAppearance_AppCompat_Menu = 2131427568;
// aapt resource value: 0x7f0b0039
public const int TextAppearance_AppCompat_Notification = 2131427385;
// aapt resource value: 0x7f0b0099
public const int TextAppearance_AppCompat_Notification_Info = 2131427481;
// aapt resource value: 0x7f0b009a
public const int TextAppearance_AppCompat_Notification_Info_Media = 2131427482;
// aapt resource value: 0x7f0b00f1
public const int TextAppearance_AppCompat_Notification_Line2 = 2131427569;
// aapt resource value: 0x7f0b00f2
public const int TextAppearance_AppCompat_Notification_Line2_Media = 2131427570;
// aapt resource value: 0x7f0b009b
public const int TextAppearance_AppCompat_Notification_Media = 2131427483;
// aapt resource value: 0x7f0b009c
public const int TextAppearance_AppCompat_Notification_Time = 2131427484;
// aapt resource value: 0x7f0b009d
public const int TextAppearance_AppCompat_Notification_Time_Media = 2131427485;
// aapt resource value: 0x7f0b003a
public const int TextAppearance_AppCompat_Notification_Title = 2131427386;
// aapt resource value: 0x7f0b009e
public const int TextAppearance_AppCompat_Notification_Title_Media = 2131427486;
// aapt resource value: 0x7f0b00f3
public const int TextAppearance_AppCompat_SearchResult_Subtitle = 2131427571;
// aapt resource value: 0x7f0b00f4
public const int TextAppearance_AppCompat_SearchResult_Title = 2131427572;
// aapt resource value: 0x7f0b00f5
public const int TextAppearance_AppCompat_Small = 2131427573;
// aapt resource value: 0x7f0b00f6
public const int TextAppearance_AppCompat_Small_Inverse = 2131427574;
// aapt resource value: 0x7f0b00f7
public const int TextAppearance_AppCompat_Subhead = 2131427575;
// aapt resource value: 0x7f0b00f8
public const int TextAppearance_AppCompat_Subhead_Inverse = 2131427576;
// aapt resource value: 0x7f0b00f9
public const int TextAppearance_AppCompat_Title = 2131427577;
// aapt resource value: 0x7f0b00fa
public const int TextAppearance_AppCompat_Title_Inverse = 2131427578;
// aapt resource value: 0x7f0b00fb
public const int TextAppearance_AppCompat_Widget_ActionBar_Menu = 2131427579;
// aapt resource value: 0x7f0b00fc
public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 2131427580;
// aapt resource value: 0x7f0b00fd
public const int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 2131427581;
// aapt resource value: 0x7f0b00fe
public const int TextAppearance_AppCompat_Widget_ActionBar_Title = 2131427582;
// aapt resource value: 0x7f0b00ff
public const int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 2131427583;
// aapt resource value: 0x7f0b0100
public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 2131427584;
// aapt resource value: 0x7f0b0101
public const int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 2131427585;
// aapt resource value: 0x7f0b0102
public const int TextAppearance_AppCompat_Widget_ActionMode_Title = 2131427586;
// aapt resource value: 0x7f0b0103
public const int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 2131427587;
// aapt resource value: 0x7f0b0104
public const int TextAppearance_AppCompat_Widget_Button = 2131427588;
// aapt resource value: 0x7f0b0105
public const int TextAppearance_AppCompat_Widget_Button_Borderless_Colored = 2131427589;
// aapt resource value: 0x7f0b0106
public const int TextAppearance_AppCompat_Widget_Button_Colored = 2131427590;
// aapt resource value: 0x7f0b0107
public const int TextAppearance_AppCompat_Widget_Button_Inverse = 2131427591;
// aapt resource value: 0x7f0b0108
public const int TextAppearance_AppCompat_Widget_DropDownItem = 2131427592;
// aapt resource value: 0x7f0b0109
public const int TextAppearance_AppCompat_Widget_PopupMenu_Header = 2131427593;
// aapt resource value: 0x7f0b010a
public const int TextAppearance_AppCompat_Widget_PopupMenu_Large = 2131427594;
// aapt resource value: 0x7f0b010b
public const int TextAppearance_AppCompat_Widget_PopupMenu_Small = 2131427595;
// aapt resource value: 0x7f0b010c
public const int TextAppearance_AppCompat_Widget_Switch = 2131427596;
// aapt resource value: 0x7f0b010d
public const int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 2131427597;
// aapt resource value: 0x7f0b0173
public const int TextAppearance_Design_CollapsingToolbar_Expanded = 2131427699;
// aapt resource value: 0x7f0b0174
public const int TextAppearance_Design_Counter = 2131427700;
// aapt resource value: 0x7f0b0175
public const int TextAppearance_Design_Counter_Overflow = 2131427701;
// aapt resource value: 0x7f0b0176
public const int TextAppearance_Design_Error = 2131427702;
// aapt resource value: 0x7f0b0177
public const int TextAppearance_Design_Hint = 2131427703;
// aapt resource value: 0x7f0b0178
public const int TextAppearance_Design_Snackbar_Message = 2131427704;
// aapt resource value: 0x7f0b0179
public const int TextAppearance_Design_Tab = 2131427705;
// aapt resource value: 0x7f0b0000
public const int TextAppearance_MediaRouter_PrimaryText = 2131427328;
// aapt resource value: 0x7f0b0001
public const int TextAppearance_MediaRouter_SecondaryText = 2131427329;
// aapt resource value: 0x7f0b0002
public const int TextAppearance_MediaRouter_Title = 2131427330;
// aapt resource value: 0x7f0b003b
public const int TextAppearance_StatusBar_EventContent = 2131427387;
// aapt resource value: 0x7f0b003c
public const int TextAppearance_StatusBar_EventContent_Info = 2131427388;
// aapt resource value: 0x7f0b003d
public const int TextAppearance_StatusBar_EventContent_Line2 = 2131427389;
// aapt resource value: 0x7f0b003e
public const int TextAppearance_StatusBar_EventContent_Time = 2131427390;
// aapt resource value: 0x7f0b003f
public const int TextAppearance_StatusBar_EventContent_Title = 2131427391;
// aapt resource value: 0x7f0b010e
public const int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 2131427598;
// aapt resource value: 0x7f0b010f
public const int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 2131427599;
// aapt resource value: 0x7f0b0110
public const int TextAppearance_Widget_AppCompat_Toolbar_Title = 2131427600;
// aapt resource value: 0x7f0b0111
public const int Theme_AppCompat = 2131427601;
// aapt resource value: 0x7f0b0112
public const int Theme_AppCompat_CompactMenu = 2131427602;
// aapt resource value: 0x7f0b0013
public const int Theme_AppCompat_DayNight = 2131427347;
// aapt resource value: 0x7f0b0014
public const int Theme_AppCompat_DayNight_DarkActionBar = 2131427348;
// aapt resource value: 0x7f0b0015
public const int Theme_AppCompat_DayNight_Dialog = 2131427349;
// aapt resource value: 0x7f0b0016
public const int Theme_AppCompat_DayNight_Dialog_Alert = 2131427350;
// aapt resource value: 0x7f0b0017
public const int Theme_AppCompat_DayNight_Dialog_MinWidth = 2131427351;
// aapt resource value: 0x7f0b0018
public const int Theme_AppCompat_DayNight_DialogWhenLarge = 2131427352;
// aapt resource value: 0x7f0b0019
public const int Theme_AppCompat_DayNight_NoActionBar = 2131427353;
// aapt resource value: 0x7f0b0113
public const int Theme_AppCompat_Dialog = 2131427603;
// aapt resource value: 0x7f0b0114
public const int Theme_AppCompat_Dialog_Alert = 2131427604;
// aapt resource value: 0x7f0b0115
public const int Theme_AppCompat_Dialog_MinWidth = 2131427605;
// aapt resource value: 0x7f0b0116
public const int Theme_AppCompat_DialogWhenLarge = 2131427606;
// aapt resource value: 0x7f0b0117
public const int Theme_AppCompat_Light = 2131427607;
// aapt resource value: 0x7f0b0118
public const int Theme_AppCompat_Light_DarkActionBar = 2131427608;
// aapt resource value: 0x7f0b0119
public const int Theme_AppCompat_Light_Dialog = 2131427609;
// aapt resource value: 0x7f0b011a
public const int Theme_AppCompat_Light_Dialog_Alert = 2131427610;
// aapt resource value: 0x7f0b011b
public const int Theme_AppCompat_Light_Dialog_MinWidth = 2131427611;
// aapt resource value: 0x7f0b011c
public const int Theme_AppCompat_Light_DialogWhenLarge = 2131427612;
// aapt resource value: 0x7f0b011d
public const int Theme_AppCompat_Light_NoActionBar = 2131427613;
// aapt resource value: 0x7f0b011e
public const int Theme_AppCompat_NoActionBar = 2131427614;
// aapt resource value: 0x7f0b017a
public const int Theme_Design = 2131427706;
// aapt resource value: 0x7f0b017b
public const int Theme_Design_BottomSheetDialog = 2131427707;
// aapt resource value: 0x7f0b017c
public const int Theme_Design_Light = 2131427708;
// aapt resource value: 0x7f0b017d
public const int Theme_Design_Light_BottomSheetDialog = 2131427709;
// aapt resource value: 0x7f0b017e
public const int Theme_Design_Light_NoActionBar = 2131427710;
// aapt resource value: 0x7f0b017f
public const int Theme_Design_NoActionBar = 2131427711;
// aapt resource value: 0x7f0b0003
public const int Theme_MediaRouter = 2131427331;
// aapt resource value: 0x7f0b0004
public const int Theme_MediaRouter_Light = 2131427332;
// aapt resource value: 0x7f0b0005
public const int Theme_MediaRouter_Light_DarkControlPanel = 2131427333;
// aapt resource value: 0x7f0b0006
public const int Theme_MediaRouter_LightControlPanel = 2131427334;
// aapt resource value: 0x7f0b011f
public const int ThemeOverlay_AppCompat = 2131427615;
// aapt resource value: 0x7f0b0120
public const int ThemeOverlay_AppCompat_ActionBar = 2131427616;
// aapt resource value: 0x7f0b0121
public const int ThemeOverlay_AppCompat_Dark = 2131427617;
// aapt resource value: 0x7f0b0122
public const int ThemeOverlay_AppCompat_Dark_ActionBar = 2131427618;
// aapt resource value: 0x7f0b0123
public const int ThemeOverlay_AppCompat_Dialog = 2131427619;
// aapt resource value: 0x7f0b0124
public const int ThemeOverlay_AppCompat_Dialog_Alert = 2131427620;
// aapt resource value: 0x7f0b0125
public const int ThemeOverlay_AppCompat_Light = 2131427621;
// aapt resource value: 0x7f0b0007
public const int ThemeOverlay_MediaRouter_Dark = 2131427335;
// aapt resource value: 0x7f0b0008
public const int ThemeOverlay_MediaRouter_Light = 2131427336;
// aapt resource value: 0x7f0b0126
public const int Widget_AppCompat_ActionBar = 2131427622;
// aapt resource value: 0x7f0b0127
public const int Widget_AppCompat_ActionBar_Solid = 2131427623;
// aapt resource value: 0x7f0b0128
public const int Widget_AppCompat_ActionBar_TabBar = 2131427624;
// aapt resource value: 0x7f0b0129
public const int Widget_AppCompat_ActionBar_TabText = 2131427625;
// aapt resource value: 0x7f0b012a
public const int Widget_AppCompat_ActionBar_TabView = 2131427626;
// aapt resource value: 0x7f0b012b
public const int Widget_AppCompat_ActionButton = 2131427627;
// aapt resource value: 0x7f0b012c
public const int Widget_AppCompat_ActionButton_CloseMode = 2131427628;
// aapt resource value: 0x7f0b012d
public const int Widget_AppCompat_ActionButton_Overflow = 2131427629;
// aapt resource value: 0x7f0b012e
public const int Widget_AppCompat_ActionMode = 2131427630;
// aapt resource value: 0x7f0b012f
public const int Widget_AppCompat_ActivityChooserView = 2131427631;
// aapt resource value: 0x7f0b0130
public const int Widget_AppCompat_AutoCompleteTextView = 2131427632;
// aapt resource value: 0x7f0b0131
public const int Widget_AppCompat_Button = 2131427633;
// aapt resource value: 0x7f0b0132
public const int Widget_AppCompat_Button_Borderless = 2131427634;
// aapt resource value: 0x7f0b0133
public const int Widget_AppCompat_Button_Borderless_Colored = 2131427635;
// aapt resource value: 0x7f0b0134
public const int Widget_AppCompat_Button_ButtonBar_AlertDialog = 2131427636;
// aapt resource value: 0x7f0b0135
public const int Widget_AppCompat_Button_Colored = 2131427637;
// aapt resource value: 0x7f0b0136
public const int Widget_AppCompat_Button_Small = 2131427638;
// aapt resource value: 0x7f0b0137
public const int Widget_AppCompat_ButtonBar = 2131427639;
// aapt resource value: 0x7f0b0138
public const int Widget_AppCompat_ButtonBar_AlertDialog = 2131427640;
// aapt resource value: 0x7f0b0139
public const int Widget_AppCompat_CompoundButton_CheckBox = 2131427641;
// aapt resource value: 0x7f0b013a
public const int Widget_AppCompat_CompoundButton_RadioButton = 2131427642;
// aapt resource value: 0x7f0b013b
public const int Widget_AppCompat_CompoundButton_Switch = 2131427643;
// aapt resource value: 0x7f0b013c
public const int Widget_AppCompat_DrawerArrowToggle = 2131427644;
// aapt resource value: 0x7f0b013d
public const int Widget_AppCompat_DropDownItem_Spinner = 2131427645;
// aapt resource value: 0x7f0b013e
public const int Widget_AppCompat_EditText = 2131427646;
// aapt resource value: 0x7f0b013f
public const int Widget_AppCompat_ImageButton = 2131427647;
// aapt resource value: 0x7f0b0140
public const int Widget_AppCompat_Light_ActionBar = 2131427648;
// aapt resource value: 0x7f0b0141
public const int Widget_AppCompat_Light_ActionBar_Solid = 2131427649;
// aapt resource value: 0x7f0b0142
public const int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 2131427650;
// aapt resource value: 0x7f0b0143
public const int Widget_AppCompat_Light_ActionBar_TabBar = 2131427651;
// aapt resource value: 0x7f0b0144
public const int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 2131427652;
// aapt resource value: 0x7f0b0145
public const int Widget_AppCompat_Light_ActionBar_TabText = 2131427653;
// aapt resource value: 0x7f0b0146
public const int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 2131427654;
// aapt resource value: 0x7f0b0147
public const int Widget_AppCompat_Light_ActionBar_TabView = 2131427655;
// aapt resource value: 0x7f0b0148
public const int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 2131427656;
// aapt resource value: 0x7f0b0149
public const int Widget_AppCompat_Light_ActionButton = 2131427657;
// aapt resource value: 0x7f0b014a
public const int Widget_AppCompat_Light_ActionButton_CloseMode = 2131427658;
// aapt resource value: 0x7f0b014b
public const int Widget_AppCompat_Light_ActionButton_Overflow = 2131427659;
// aapt resource value: 0x7f0b014c
public const int Widget_AppCompat_Light_ActionMode_Inverse = 2131427660;
// aapt resource value: 0x7f0b014d
public const int Widget_AppCompat_Light_ActivityChooserView = 2131427661;
// aapt resource value: 0x7f0b014e
public const int Widget_AppCompat_Light_AutoCompleteTextView = 2131427662;
// aapt resource value: 0x7f0b014f
public const int Widget_AppCompat_Light_DropDownItem_Spinner = 2131427663;
// aapt resource value: 0x7f0b0150
public const int Widget_AppCompat_Light_ListPopupWindow = 2131427664;
// aapt resource value: 0x7f0b0151
public const int Widget_AppCompat_Light_ListView_DropDown = 2131427665;
// aapt resource value: 0x7f0b0152
public const int Widget_AppCompat_Light_PopupMenu = 2131427666;
// aapt resource value: 0x7f0b0153
public const int Widget_AppCompat_Light_PopupMenu_Overflow = 2131427667;
// aapt resource value: 0x7f0b0154
public const int Widget_AppCompat_Light_SearchView = 2131427668;
// aapt resource value: 0x7f0b0155
public const int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 2131427669;
// aapt resource value: 0x7f0b0156
public const int Widget_AppCompat_ListMenuView = 2131427670;
// aapt resource value: 0x7f0b0157
public const int Widget_AppCompat_ListPopupWindow = 2131427671;
// aapt resource value: 0x7f0b0158
public const int Widget_AppCompat_ListView = 2131427672;
// aapt resource value: 0x7f0b0159
public const int Widget_AppCompat_ListView_DropDown = 2131427673;
// aapt resource value: 0x7f0b015a
public const int Widget_AppCompat_ListView_Menu = 2131427674;
// aapt resource value: 0x7f0b009f
public const int Widget_AppCompat_NotificationActionContainer = 2131427487;
// aapt resource value: 0x7f0b00a0
public const int Widget_AppCompat_NotificationActionText = 2131427488;
// aapt resource value: 0x7f0b015b
public const int Widget_AppCompat_PopupMenu = 2131427675;
// aapt resource value: 0x7f0b015c
public const int Widget_AppCompat_PopupMenu_Overflow = 2131427676;
// aapt resource value: 0x7f0b015d
public const int Widget_AppCompat_PopupWindow = 2131427677;
// aapt resource value: 0x7f0b015e
public const int Widget_AppCompat_ProgressBar = 2131427678;
// aapt resource value: 0x7f0b015f
public const int Widget_AppCompat_ProgressBar_Horizontal = 2131427679;
// aapt resource value: 0x7f0b0160
public const int Widget_AppCompat_RatingBar = 2131427680;
// aapt resource value: 0x7f0b0161
public const int Widget_AppCompat_RatingBar_Indicator = 2131427681;
// aapt resource value: 0x7f0b0162
public const int Widget_AppCompat_RatingBar_Small = 2131427682;
// aapt resource value: 0x7f0b0163
public const int Widget_AppCompat_SearchView = 2131427683;
// aapt resource value: 0x7f0b0164
public const int Widget_AppCompat_SearchView_ActionBar = 2131427684;
// aapt resource value: 0x7f0b0165
public const int Widget_AppCompat_SeekBar = 2131427685;
// aapt resource value: 0x7f0b0166
public const int Widget_AppCompat_SeekBar_Discrete = 2131427686;
// aapt resource value: 0x7f0b0167
public const int Widget_AppCompat_Spinner = 2131427687;
// aapt resource value: 0x7f0b0168
public const int Widget_AppCompat_Spinner_DropDown = 2131427688;
// aapt resource value: 0x7f0b0169
public const int Widget_AppCompat_Spinner_DropDown_ActionBar = 2131427689;
// aapt resource value: 0x7f0b016a
public const int Widget_AppCompat_Spinner_Underlined = 2131427690;
// aapt resource value: 0x7f0b016b
public const int Widget_AppCompat_TextView_SpinnerItem = 2131427691;
// aapt resource value: 0x7f0b016c
public const int Widget_AppCompat_Toolbar = 2131427692;
// aapt resource value: 0x7f0b016d
public const int Widget_AppCompat_Toolbar_Button_Navigation = 2131427693;
// aapt resource value: 0x7f0b016f
public const int Widget_Design_AppBarLayout = 2131427695;
// aapt resource value: 0x7f0b0180
public const int Widget_Design_BottomNavigationView = 2131427712;
// aapt resource value: 0x7f0b0181
public const int Widget_Design_BottomSheet_Modal = 2131427713;
// aapt resource value: 0x7f0b0182
public const int Widget_Design_CollapsingToolbar = 2131427714;
// aapt resource value: 0x7f0b0183
public const int Widget_Design_CoordinatorLayout = 2131427715;
// aapt resource value: 0x7f0b0184
public const int Widget_Design_FloatingActionButton = 2131427716;
// aapt resource value: 0x7f0b0185
public const int Widget_Design_NavigationView = 2131427717;
// aapt resource value: 0x7f0b0186
public const int Widget_Design_ScrimInsetsFrameLayout = 2131427718;
// aapt resource value: 0x7f0b0187
public const int Widget_Design_Snackbar = 2131427719;
// aapt resource value: 0x7f0b016e
public const int Widget_Design_TabLayout = 2131427694;
// aapt resource value: 0x7f0b0188
public const int Widget_Design_TextInputLayout = 2131427720;
// aapt resource value: 0x7f0b0009
public const int Widget_MediaRouter_Light_MediaRouteButton = 2131427337;
// aapt resource value: 0x7f0b000a
public const int Widget_MediaRouter_MediaRouteButton = 2131427338;
static Style()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Style()
{
}
}
public partial class Styleable
{
public static int[] ActionBar = new int[] {
2130771997,
2130771999,
2130772000,
2130772001,
2130772002,
2130772003,
2130772004,
2130772005,
2130772006,
2130772007,
2130772008,
2130772009,
2130772010,
2130772011,
2130772012,
2130772013,
2130772014,
2130772015,
2130772016,
2130772017,
2130772018,
2130772019,
2130772020,
2130772021,
2130772022,
2130772023,
2130772024,
2130772025,
2130772089};
// 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[] {
2130771997,
2130772003,
2130772004,
2130772008,
2130772010,
2130772026};
// 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[] {
2130772027,
2130772028};
// 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,
2130772029,
2130772030,
2130772031,
2130772032,
2130772033,
2130772034};
// 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,
2130772024,
2130772227};
// aapt resource value: 0
public const int AppBarLayout_android_background = 0;
// aapt resource value: 1
public const int AppBarLayout_elevation = 1;
// aapt resource value: 2
public const int AppBarLayout_expanded = 2;
public static int[] AppBarLayoutStates = new int[] {
2130772228,
2130772229};
// 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[] {
2130772230,
2130772231};
// 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,
2130772035,
2130772036,
2130772037};
// 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,
2130772038,
2130772039,
2130772040};
// 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,
2130772041};
// aapt resource value: 0
public const int AppCompatTextView_android_textAppearance = 0;
// aapt resource value: 1
public const int AppCompatTextView_textAllCaps = 1;
public static int[] AppCompatTheme = new int[] {
16842839,
16842926,
2130772042,
2130772043,
2130772044,
2130772045,
2130772046,
2130772047,
2130772048,
2130772049,
2130772050,
2130772051,
2130772052,
2130772053,
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};
// 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: 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: 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[] {
2130772024,
2130772270,
2130772271,
2130772272,
2130772273};
// 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[] {
2130772232,
2130772233,
2130772234};
// 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[] {
2130772156};
// aapt resource value: 0
public const int ButtonBarLayout_allowStacking = 0;
public static int[] CardView = new int[] {
16843071,
16843072,
2130771985,
2130771986,
2130771987,
2130771988,
2130771989,
2130771990,
2130771991,
2130771992,
2130771993,
2130771994,
2130771995};
// 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[] {
2130771999,
2130772235,
2130772236,
2130772237,
2130772238,
2130772239,
2130772240,
2130772241,
2130772242,
2130772243,
2130772244,
2130772245,
2130772246,
2130772247,
2130772248,
2130772249};
// 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[] {
2130772250,
2130772251};
// 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,
2130772157};
// 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,
2130772158,
2130772159};
// 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[] {
2130772252,
2130772253};
// 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,
2130772254,
2130772255,
2130772256,
2130772257,
2130772258,
2130772259};
// 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[] {
2130772260,
2130772261,
2130772262};
// 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[] {
2130772160,
2130772161,
2130772162,
2130772163,
2130772164,
2130772165,
2130772166,
2130772167};
// 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[] {
2130772024,
2130772225,
2130772226,
2130772263,
2130772264,
2130772265,
2130772266,
2130772267};
// 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[] {
2130772268};
// aapt resource value: 0
public const int FloatingActionButton_Behavior_Layout_behavior_autoHide = 0;
public static int[] ForegroundLinearLayout = new int[] {
16843017,
16843264,
2130772269};
// 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,
2130772007,
2130772168,
2130772169,
2130772170};
// 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,
2130771984,
2130772158};
// 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: 3
public const int MediaRouteButton_buttonTint = 3;
// aapt resource value: 2
public const int MediaRouteButton_externalRouteEnabledDrawable = 2;
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,
2130772171,
2130772172,
2130772173,
2130772174};
// aapt resource value: 14
public const int MenuItem_actionLayout = 14;
// aapt resource value: 16
public const int MenuItem_actionProviderClass = 16;
// aapt resource value: 15
public const int MenuItem_actionViewClass = 15;
// 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: 13
public const int MenuItem_showAsAction = 13;
public static int[] MenuView = new int[] {
16842926,
16843052,
16843053,
16843054,
16843055,
16843056,
16843057,
2130772175,
2130772176};
// 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,
2130772024,
2130772270,
2130772271,
2130772272,
2130772273,
2130772274,
2130772275};
// 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,
2130772177};
// 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[] {
2130772178};
// aapt resource value: 0
public const int PopupWindowBackgroundState_state_above_anchor = 0;
public static int[] RecycleListView = new int[] {
2130772179,
2130772180};
// 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};
// 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: 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[] {
2130772276};
// aapt resource value: 0
public const int ScrimInsetsFrameLayout_insetForeground = 0;
public static int[] ScrollingViewBehavior_Layout = new int[] {
2130772277};
// aapt resource value: 0
public const int ScrollingViewBehavior_Layout_behavior_overlapTop = 0;
public static int[] SearchView = new int[] {
16842970,
16843039,
16843296,
16843364,
2130772181,
2130772182,
2130772183,
2130772184,
2130772185,
2130772186,
2130772187,
2130772188,
2130772189,
2130772190,
2130772191,
2130772192,
2130772193};
// 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,
2130772024,
2130772278};
// 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,
2130772025};
// 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,
2130772194,
2130772195,
2130772196,
2130772197,
2130772198,
2130772199,
2130772200,
2130772201,
2130772202,
2130772203,
2130772204};
// 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[] {
2130772279,
2130772280,
2130772281,
2130772282,
2130772283,
2130772284,
2130772285,
2130772286,
2130772287,
2130772288,
2130772289,
2130772290,
2130772291,
2130772292,
2130772293,
2130772294};
// 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,
16843105,
16843106,
16843107,
16843108,
2130772041};
// aapt resource value: 5
public const int TextAppearance_android_shadowColor = 5;
// aapt resource value: 6
public const int TextAppearance_android_shadowDx = 6;
// aapt resource value: 7
public const int TextAppearance_android_shadowDy = 7;
// aapt resource value: 8
public const int TextAppearance_android_shadowRadius = 8;
// 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: 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: 9
public const int TextAppearance_textAllCaps = 9;
public static int[] TextInputLayout = new int[] {
16842906,
16843088,
2130772295,
2130772296,
2130772297,
2130772298,
2130772299,
2130772300,
2130772301,
2130772302,
2130772303,
2130772304,
2130772305,
2130772306,
2130772307,
2130772308};
// 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,
2130771999,
2130772002,
2130772006,
2130772018,
2130772019,
2130772020,
2130772021,
2130772022,
2130772023,
2130772025,
2130772205,
2130772206,
2130772207,
2130772208,
2130772209,
2130772210,
2130772211,
2130772212,
2130772213,
2130772214,
2130772215,
2130772216,
2130772217,
2130772218,
2130772219,
2130772220,
2130772221};
// 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,
2130772222,
2130772223,
2130772224};
// 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,
2130772225,
2130772226};
// 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
| 32.012782 | 150 | 0.733157 | [
"MIT"
] | AlbertoLeon/couple-expenses | src/CouplesExpenses/CouplesExpenses.Android/Resources/Resource.designer.cs | 225,407 | C# |
// <copyright file="SkippedScenarioFeature.cs" company="xBehave.net contributors">
// Copyright (c) xBehave.net contributors. All rights reserved.
// </copyright>
namespace Xbehave.Test
{
using System;
using System.Linq;
using FluentAssertions;
using Xbehave.Test.Infrastructure;
using Xunit.Abstractions;
// In order to commit largely incomplete features
// As a developer
// I want to temporarily skip an entire scenario
public class SkippedScenarioFeature : Feature
{
[Scenario]
public void SkippedScenario()
{
var feature = default(Type);
var results = default(ITestResultMessage[]);
"Given a feature with a skipped scenario"
.x(() => feature = typeof(FeatureWithASkippedScenario));
"When I run the scenarios"
.x(() => results = this.Run<ITestResultMessage>(feature));
"Then there should be one result"
.x(() => results.Count().Should().Be(1));
"And the result should be a skip result"
.x(() => results[0].Should().BeAssignableTo<ITestSkipped>(
results.ToDisplayString("the result should be a skip")));
}
private static class FeatureWithASkippedScenario
{
[Scenario(Skip = "Test")]
public static void Scenario1()
{
throw new InvalidOperationException();
}
}
}
}
| 32.125 | 84 | 0.570039 | [
"MIT"
] | biohazard999/xbehave.net | tests/Xbehave.Test/SkippedScenarioFeature.cs | 1,544 | C# |
using NUnit.Framework;
using NUnit.Framework.Interfaces;
namespace System.IO.Abstractions.TestingHelpers.Tests
{
internal sealed class WindowsOnlyAttribute : Attribute, ITestAction
{
private readonly string reason;
public WindowsOnlyAttribute(string reason)
{
this.reason = reason;
}
public ActionTargets Targets => ActionTargets.Test;
public void BeforeTest(ITest test)
{
if (!MockUnixSupport.IsWindowsPlatform())
{
Assert.Inconclusive(reason);
}
}
public void AfterTest(ITest test) { }
}
}
| 23.035714 | 71 | 0.610853 | [
"MIT"
] | BADF00D/System.IO.Abstractions | System.IO.Abstractions.TestingHelpers.Tests/WindowsOnlyAttribute.cs | 645 | C# |
using System;
namespace Millarow.Presentation.MVP
{
public interface ICommand<T> : IConditional
{
Action<T> Handler { get; set; }
}
}
| 16.5 | 48 | 0.6 | [
"MIT"
] | mcculic/millarowframework | src/Millarow.Presentation/MVP/ICommand`1.cs | 167 | C# |
// Copyright (c) Microsoft. 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.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CSharp
{
internal class SwitchExpressionBinder : Binder
{
private readonly SwitchExpressionSyntax SwitchExpressionSyntax;
private BoundExpression _inputExpression;
private DiagnosticBag _inputExpressionDiagnostics;
internal SwitchExpressionBinder(SwitchExpressionSyntax switchExpressionSyntax, Binder next)
: base(next)
{
SwitchExpressionSyntax = switchExpressionSyntax;
}
internal override BoundExpression BindSwitchExpressionCore(SwitchExpressionSyntax node, Binder originalBinder, DiagnosticBag diagnostics)
{
Debug.Assert(node == SwitchExpressionSyntax);
// Bind switch expression and set the switch governing type.
var boundInputExpression = InputExpression;
diagnostics.AddRange(InputExpressionDiagnostics);
ImmutableArray<BoundSwitchExpressionArm> switchArms = BindSwitchExpressionArms(node, originalBinder, diagnostics);
TypeSymbol naturalType = InferResultType(switchArms, diagnostics);
bool reportedNotExhaustive = CheckSwitchExpressionExhaustive(node, boundInputExpression, switchArms, out BoundDecisionDag decisionDag, out LabelSymbol defaultLabel, diagnostics);
// When the input is constant, we use that to reshape the decision dag that is returned
// so that flow analysis will see that some of the cases may be unreachable.
decisionDag = decisionDag.SimplifyDecisionDagIfConstantInput(boundInputExpression);
return new BoundUnconvertedSwitchExpression(
node, boundInputExpression, switchArms, decisionDag,
defaultLabel: defaultLabel, reportedNotExhaustive: reportedNotExhaustive, type: naturalType);
}
/// <summary>
/// Build the decision dag, giving an error if some cases are subsumed and a warning if the switch expression is not exhaustive.
/// </summary>
/// <param name="node"></param>
/// <param name="boundInputExpression"></param>
/// <param name="switchArms"></param>
/// <param name="decisionDag"></param>
/// <param name="diagnostics"></param>
/// <returns>true if there was a non-exhaustive warning reported</returns>
private bool CheckSwitchExpressionExhaustive(
SwitchExpressionSyntax node,
BoundExpression boundInputExpression,
ImmutableArray<BoundSwitchExpressionArm> switchArms,
out BoundDecisionDag decisionDag,
out LabelSymbol defaultLabel,
DiagnosticBag diagnostics)
{
defaultLabel = new GeneratedLabelSymbol("default");
decisionDag = DecisionDagBuilder.CreateDecisionDagForSwitchExpression(this.Compilation, node, boundInputExpression, switchArms, defaultLabel, diagnostics);
var reachableLabels = decisionDag.ReachableLabels;
foreach (BoundSwitchExpressionArm arm in switchArms)
{
if (!reachableLabels.Contains(arm.Label))
{
diagnostics.Add(ErrorCode.ERR_SwitchArmSubsumed, arm.Pattern.Syntax.Location);
}
}
if (!reachableLabels.Contains(defaultLabel))
{
// switch expression is exhaustive; no default label needed.
defaultLabel = null;
return false;
}
// We only report exhaustive warnings when the default label is reachable through some series of
// tests that do not include a test in which the value is known to be null. Handling paths with
// nulls is the job of the nullable walker.
foreach (var n in TopologicalSort.IterativeSort<BoundDecisionDagNode>(new[] { decisionDag.RootNode }, nonNullSuccessors))
{
if (n is BoundLeafDecisionDagNode leaf && leaf.Label == defaultLabel)
{
diagnostics.Add(ErrorCode.WRN_SwitchExpressionNotExhaustive, node.SwitchKeyword.GetLocation());
return true;
}
}
return false;
ImmutableArray<BoundDecisionDagNode> nonNullSuccessors(BoundDecisionDagNode n)
{
switch (n)
{
case BoundTestDecisionDagNode p:
switch (p.Test)
{
case BoundDagNonNullTest t: // checks that the input is not null
return ImmutableArray.Create(p.WhenTrue);
case BoundDagExplicitNullTest t: // checks that the input is null
return ImmutableArray.Create(p.WhenFalse);
default:
return BoundDecisionDag.Successors(n);
}
default:
return BoundDecisionDag.Successors(n);
}
}
}
/// <summary>
/// Infer the result type of the switch expression by looking for a common type
/// to which every arm's expression can be converted.
/// </summary>
private TypeSymbol InferResultType(ImmutableArray<BoundSwitchExpressionArm> switchCases, DiagnosticBag diagnostics)
{
var seenTypes = Symbols.SpecializedSymbolCollections.GetPooledSymbolHashSetInstance<TypeSymbol>();
var typesInOrder = ArrayBuilder<TypeSymbol>.GetInstance();
foreach (var @case in switchCases)
{
var type = @case.Value.Type;
if (type is object && seenTypes.Add(type))
{
typesInOrder.Add(type);
}
}
seenTypes.Free();
HashSet<DiagnosticInfo> useSiteDiagnostics = null;
var commonType = BestTypeInferrer.GetBestType(typesInOrder, Conversions, ref useSiteDiagnostics);
typesInOrder.Free();
// We've found a candidate common type among those arms that have a type. Also check that every arm's
// expression (even those without a type) can be converted to that type.
if (commonType is object)
{
foreach (var @case in switchCases)
{
if (!this.Conversions.ClassifyImplicitConversionFromExpression(@case.Value, commonType, ref useSiteDiagnostics).Exists)
{
commonType = null;
break;
}
}
}
diagnostics.Add(SwitchExpressionSyntax, useSiteDiagnostics);
return commonType;
}
private ImmutableArray<BoundSwitchExpressionArm> BindSwitchExpressionArms(SwitchExpressionSyntax node, Binder originalBinder, DiagnosticBag diagnostics)
{
bool hasErrors = InputExpression.HasErrors;
var builder = ArrayBuilder<BoundSwitchExpressionArm>.GetInstance();
foreach (var arm in node.Arms)
{
var armBinder = originalBinder.GetBinder(arm);
var boundArm = armBinder.BindSwitchExpressionArm(arm, diagnostics);
builder.Add(boundArm);
}
return builder.ToImmutableAndFree();
}
internal BoundExpression InputExpression
{
get
{
EnsureSwitchGoverningExpressionAndDiagnosticsBound();
Debug.Assert(_inputExpression != null);
return _inputExpression;
}
}
internal TypeSymbol SwitchGoverningType => InputExpression.Type;
internal uint SwitchGoverningValEscape => GetValEscape(InputExpression, LocalScopeDepth);
protected DiagnosticBag InputExpressionDiagnostics
{
get
{
EnsureSwitchGoverningExpressionAndDiagnosticsBound();
Debug.Assert(_inputExpressionDiagnostics != null);
return _inputExpressionDiagnostics;
}
}
private void EnsureSwitchGoverningExpressionAndDiagnosticsBound()
{
if (_inputExpression == null)
{
var switchGoverningDiagnostics = new DiagnosticBag();
var boundSwitchGoverningExpression = BindSwitchGoverningExpression(switchGoverningDiagnostics);
_inputExpressionDiagnostics = switchGoverningDiagnostics;
Interlocked.CompareExchange(ref _inputExpression, boundSwitchGoverningExpression, null);
}
}
private BoundExpression BindSwitchGoverningExpression(DiagnosticBag diagnostics)
{
var switchGoverningExpression = BindRValueWithoutTargetType(SwitchExpressionSyntax.GoverningExpression, diagnostics);
if (switchGoverningExpression.Type == (object)null || switchGoverningExpression.Type.IsVoidType())
{
diagnostics.Add(ErrorCode.ERR_BadPatternExpression, SwitchExpressionSyntax.GoverningExpression.Location, switchGoverningExpression.Display);
switchGoverningExpression = this.GenerateConversionForAssignment(CreateErrorType(), switchGoverningExpression, diagnostics);
}
return switchGoverningExpression;
}
}
}
| 45.313636 | 190 | 0.629953 | [
"Apache-2.0"
] | 20chan/roslyn | src/Compilers/CSharp/Portable/Binder/SwitchExpressionBinder.cs | 9,971 | 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 CefSharp.WinForms.Example.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CefSharp.WinForms.Example.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap chromium256 {
get {
object obj = ResourceManager.GetObject("chromium256", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap nav_left_green {
get {
object obj = ResourceManager.GetObject("nav_left_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap nav_plain_green {
get {
object obj = ResourceManager.GetObject("nav_plain_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap nav_plain_red {
get {
object obj = ResourceManager.GetObject("nav_plain_red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap nav_right_green {
get {
object obj = ResourceManager.GetObject("nav_right_green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
| 41.307018 | 191 | 0.583563 | [
"BSD-3-Clause"
] | GenesysPureConnect/CefSharp | CefSharp.WinForms.Example/Properties/Resources.Designer.cs | 4,711 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HandlebarsDotNet;
namespace YuzuDelivery.Core
{
public class ToLowerCase
{
public ToLowerCase()
{
HandlebarsDotNet.Handlebars.RegisterHelper("toLowerCase", (writer, context, parameters) =>
{
writer.WriteSafeString(parameters[0].ToString().ToLower());
});
}
}
}
| 22.52381 | 102 | 0.636364 | [
"MIT"
] | balanced-dev/yuzudelivery.core | YuzuDelivery.Core/HbsHelpers/ToLowerCase.cs | 475 | C# |
using System;
using Xunit;
using Http2;
namespace Http2Tests
{
public class FrameTests
{
[Fact]
public void FrameHeadersShouldBeDecodable()
{
var header = new byte[] { 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF };
var frame = FrameHeader.DecodeFrom(new ArraySegment<byte>(header));
Assert.Equal((1 << 24) - 1, frame.Length);
Assert.Equal(FrameType.Data, frame.Type);
Assert.Equal(0xFF, frame.Flags);
Assert.Equal(0x7FFFFFFFu, frame.StreamId);
header = new byte[] { 0x03, 0x40, 0xF1, 0xFF, 0x09, 0x1A, 0xB8, 0x34, 0x12 };
frame = FrameHeader.DecodeFrom(new ArraySegment<byte>(header));
Assert.Equal(0x0340F1, frame.Length);
Assert.Equal((FrameType)0xFF, frame.Type);
Assert.Equal(0x09, frame.Flags);
Assert.Equal(0x1AB83412u, frame.StreamId);
}
[Fact]
public void FrameHeadersShouldBeEncodeable()
{
var buf = new byte[FrameHeader.HeaderSize];
var bufView = new ArraySegment<byte>(buf);
var frame = new FrameHeader
{
Length = 0x0340F1,
Type = (FrameType)0xFF,
Flags = 0x09,
StreamId = 0x1AB83412u,
};
frame.EncodeInto(bufView);
var expected = new byte[] { 0x03, 0x40, 0xF1, 0xFF, 0x09, 0x1A, 0xB8, 0x34, 0x12 };
Assert.Equal(buf, expected);
frame = new FrameHeader
{
Length = (1 << 24) - 1,
Type = FrameType.Headers,
Flags = 0xFF,
StreamId = 0x7FFFFFFFu,
};
frame.EncodeInto(bufView);
expected = new byte[] { 0xFF, 0xFF, 0xFF, 0x01, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF };
Assert.Equal(buf, expected);
}
}
} | 34.428571 | 95 | 0.530602 | [
"MIT"
] | DotNetUz/http2dotnet | Http2Tests/FrameTests.cs | 1,928 | C# |
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace OSGeo.GDAL {
public enum Access {
GA_ReadOnly = 0,
GA_Update = 1
}
}
| 26.941176 | 83 | 0.451965 | [
"Apache-2.0"
] | speakeasy/gdal | swig/csharp/gdal/Access.cs | 458 | C# |
using System;
using System.ComponentModel.DataAnnotations;
namespace CatsCloset.Model {
public class SessionMessage {
[Key]
public string Id {
get;
set;
}
public string Content {
get;
set;
}
public DateTime LastUpdate {
get;
set;
}
}
}
| 11.458333 | 44 | 0.647273 | [
"MIT"
] | desotohs/cats-closet-point-of-sale | Model/SessionMessage.cs | 277 | C# |
//-------------------------------------------------------------------------
// Copyright © 2020 Province of British Columbia
//
// 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 Keycloak.Authorization.Representation
{
/// <summary>The decision strategy dictates how the policies associated with a given policy
/// are evaluated and how a final decision is obtained.</summary>
public enum DecisionStrategy
{
/// <summary>Defines that at least one policy must evaluate to a positive decision
/// in order to the overall decision be also positive.</summary>
Affirmative,
/// <summary>Defines that all policies must evaluate to a positive
/// decision in order to the overall decision be also positive.</summary>
Unanimous,
/// <summary>Defines that the number of positive decisions must be greater than the
/// number of negative decisions. If the number of positive and negative is the same,
/// the final decision will be negative.</summary>
Consensus,
}
} | 46.971429 | 95 | 0.648418 | [
"Apache-2.0"
] | bradhead/Keycloak-AuthZClient-DotNetCore | sdk/src/Authorization/Representations/DecisionStrategy.cs | 1,645 | C# |
using AutoMapper;
using AutoMapper.QueryableExtensions;
using Microsoft.Data.Entity;
using MvcTemplate.Components.Html;
using MvcTemplate.Components.Security;
using MvcTemplate.Data.Core;
using MvcTemplate.Objects;
using MvcTemplate.Resources;
using MvcTemplate.Resources.Privilege;
using MvcTemplate.Services;
using MvcTemplate.Tests.Data;
using NSubstitute;
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit;
namespace MvcTemplate.Tests.Unit.Services
{
public class RoleServiceTests : IDisposable
{
private IAuthorizationProvider authorizationProvider;
private TestingContext context;
private RoleService service;
private Role role;
public RoleServiceTests()
{
context = new TestingContext();
authorizationProvider = Substitute.For<IAuthorizationProvider>();
service = Substitute.ForPartsOf<RoleService>(new UnitOfWork(context), authorizationProvider);
context.DropData();
SetUpData();
}
public void Dispose()
{
context.Dispose();
service.Dispose();
}
#region Method: SeedPrivilegesTree(RoleView view)
[Fact]
public void SeedPrivilegesTree_FirstDepth()
{
RoleView view = new RoleView();
service.SeedPrivilegesTree(view);
IEnumerator<JsTreeNode> expected = CreatePrivilegesTree(role).Nodes.GetEnumerator();
IEnumerator<JsTreeNode> actual = view.PrivilegesTree.Nodes.GetEnumerator();
while (expected.MoveNext() | actual.MoveNext())
{
Assert.Equal(expected.Current.Id, actual.Current.Id);
Assert.Equal(expected.Current.Title, actual.Current.Title);
Assert.Equal(expected.Current.Nodes.Count, actual.Current.Nodes.Count);
}
}
[Fact]
public void SeedPrivilegesTree_SecondDepth()
{
RoleView view = new RoleView();
service.SeedPrivilegesTree(view);
IEnumerator<JsTreeNode> expected = CreatePrivilegesTree(role).Nodes.SelectMany(node => node.Nodes).GetEnumerator();
IEnumerator<JsTreeNode> actual = view.PrivilegesTree.Nodes.SelectMany(node => node.Nodes).GetEnumerator();
while (expected.MoveNext() | actual.MoveNext())
{
Assert.Equal(expected.Current.Id, actual.Current.Id);
Assert.Equal(expected.Current.Title, actual.Current.Title);
Assert.Equal(expected.Current.Nodes.Count, actual.Current.Nodes.Count);
}
}
[Fact]
public void SeedPrivilegesTree_ThirdDepth()
{
RoleView view = new RoleView();
service.SeedPrivilegesTree(view);
IEnumerator<JsTreeNode> expected = CreatePrivilegesTree(role).Nodes.SelectMany(node => node.Nodes).SelectMany(node => node.Nodes).GetEnumerator();
IEnumerator<JsTreeNode> actual = view.PrivilegesTree.Nodes.SelectMany(node => node.Nodes).SelectMany(node => node.Nodes).GetEnumerator();
while (expected.MoveNext() | actual.MoveNext())
{
Assert.Equal(expected.Current.Id, actual.Current.Id);
Assert.Equal(expected.Current.Title, actual.Current.Title);
Assert.Equal(expected.Current.Nodes.Count, actual.Current.Nodes.Count);
}
}
[Fact]
public void SeedPrivilegesTree_BranchesWithoutId()
{
RoleView view = new RoleView();
service.SeedPrivilegesTree(view);
IEnumerable<JsTreeNode> nodes = view.PrivilegesTree.Nodes;
IEnumerable<JsTreeNode> branches = GetAllBranchNodes(nodes);
Assert.Empty(branches.Where(branch => branch.Id != null));
}
[Fact]
public void SeedPrivilegesTree_LeafsWithId()
{
RoleView view = new RoleView();
service.SeedPrivilegesTree(view);
IEnumerable<JsTreeNode> nodes = view.PrivilegesTree.Nodes;
IEnumerable<JsTreeNode> leafs = GetAllLeafNodes(nodes);
Assert.Empty(leafs.Where(leaf => leaf.Id == null));
}
#endregion
#region Method: GetViews()
[Fact]
public void GetViews_ReturnsRoleViews()
{
IEnumerator<RoleView> actual = service.GetViews().GetEnumerator();
IEnumerator<RoleView> expected = context
.Set<Role>()
.ProjectTo<RoleView>()
.OrderByDescending(view => view.CreationDate)
.GetEnumerator();
while (expected.MoveNext() | actual.MoveNext())
{
Assert.Equal(expected.Current.PrivilegesTree.SelectedIds, actual.Current.PrivilegesTree.SelectedIds);
Assert.Equal(expected.Current.CreationDate, actual.Current.CreationDate);
Assert.Equal(expected.Current.Title, actual.Current.Title);
Assert.Equal(expected.Current.Id, actual.Current.Id);
}
}
#endregion
#region Method: GetView(String id)
[Fact]
public void GetView_NoRole_ReturnsNull()
{
Assert.Null(service.GetView(""));
}
[Fact]
public void GetView_ReturnsViewById()
{
service.When(sub => sub.SeedPrivilegesTree(Arg.Any<RoleView>())).DoNotCallBase();
RoleView expected = Mapper.Map<RoleView>(role);
RoleView actual = service.GetView(role.Id);
Assert.Equal(expected.CreationDate, actual.CreationDate);
Assert.NotEmpty(actual.PrivilegesTree.SelectedIds);
Assert.Equal(expected.Title, actual.Title);
Assert.Equal(expected.Id, actual.Id);
}
[Fact]
public void GetView_SetsSelectedIds()
{
service.When(sub => sub.SeedPrivilegesTree(Arg.Any<RoleView>())).DoNotCallBase();
IEnumerable<String> expected = role.RolePrivileges.Select(rolePrivilege => rolePrivilege.PrivilegeId);
IEnumerable<String> actual = service.GetView(role.Id).PrivilegesTree.SelectedIds;
Assert.Equal(expected, actual);
}
[Fact]
public void GetView_SeedsPrivilegesTree()
{
service.When(sub => sub.SeedPrivilegesTree(Arg.Any<RoleView>())).DoNotCallBase();
RoleView view = service.GetView(role.Id);
service.Received().SeedPrivilegesTree(view);
}
#endregion
#region Method: Create(RoleView view)
[Fact]
public void Create_Role()
{
RoleView view = ObjectFactory.CreateRoleView(2);
service.Create(view);
Role actual = context.Set<Role>().AsNoTracking().Single(role => role.Id == view.Id);
RoleView expected = view;
Assert.Equal(expected.CreationDate, actual.CreationDate);
Assert.Equal(expected.Title, actual.Title);
Assert.Equal(expected.Id, actual.Id);
}
[Fact]
public void Create_RolePrivileges()
{
RoleView view = ObjectFactory.CreateRoleView(2);
view.PrivilegesTree = CreatePrivilegesTree(role);
service.Create(view);
IEnumerable<String> expected = view.PrivilegesTree.SelectedIds.OrderBy(privilegeId => privilegeId);
IEnumerable<String> actual = context
.Set<RolePrivilege>()
.AsNoTracking()
.Where(rolePrivilege => rolePrivilege.RoleId == view.Id)
.Select(rolePrivilege => rolePrivilege.PrivilegeId)
.OrderBy(privilegeId => privilegeId);
Assert.Equal(expected, actual);
}
#endregion
#region Method: Edit(RoleView view)
[Fact]
public void Edit_Role()
{
role = context.Set<Role>().AsNoTracking().Single();
RoleView view = Mapper.Map<RoleView>(role);
view.Title = role.Title += "Test";
service.Edit(view);
Role actual = context.Set<Role>().AsNoTracking().Single();
RoleView expected = view;
Assert.Equal(expected.CreationDate, actual.CreationDate);
Assert.Equal(expected.Title, actual.Title);
Assert.Equal(expected.Id, actual.Id);
}
[Fact]
public void Edit_RolePrivileges()
{
Privilege privilege = ObjectFactory.CreatePrivilege(100);
context.Add(privilege);
context.SaveChanges();
RoleView view = ObjectFactory.CreateRoleView();
view.PrivilegesTree = CreatePrivilegesTree(role);
view.PrivilegesTree.SelectedIds.Add(privilege.Id);
view.PrivilegesTree.SelectedIds.RemoveAt(0);
service.Edit(view);
IEnumerable<String> actual = context.Set<RolePrivilege>().AsNoTracking().Select(rolePriv => rolePriv.PrivilegeId).OrderBy(privilegeId => privilegeId);
IEnumerable<String> expected = view.PrivilegesTree.SelectedIds.OrderBy(privilegeId => privilegeId);
Assert.Equal(expected, actual);
}
[Fact]
public void Edit_RefreshesAuthorization()
{
service.Edit(ObjectFactory.CreateRoleView());
authorizationProvider.Received().Refresh();
}
#endregion
#region Method: Delete(String id)
[Fact]
public void Delete_NullsAccountRoles()
{
Account account = ObjectFactory.CreateAccount();
account.RoleId = role.Id;
account.Role = null;
context.Add(account);
context.SaveChanges();
service.Delete(role.Id);
Assert.NotEmpty(context.Set<Account>().Where(model => model.Id == account.Id && model.RoleId == null));
}
[Fact]
public void Delete_Role()
{
service.Delete(role.Id);
Assert.Empty(context.Set<Role>());
}
[Fact]
public void Delete_RolePrivileges()
{
service.Delete(role.Id);
Assert.Empty(context.Set<RolePrivilege>());
}
[Fact]
public void Delete_RefreshesAuthorization()
{
service.Delete(role.Id);
authorizationProvider.Received().Refresh();
}
#endregion
#region Test helpers
private void SetUpData()
{
context.Add(role = ObjectFactory.CreateRole());
foreach (String controller in new[] { "Roles", "Profile" })
foreach (String action in new[] { "Edit", "Delete" })
{
RolePrivilege rolePrivilege = ObjectFactory.CreateRolePrivilege(role.RolePrivileges.Count + 1);
rolePrivilege.Privilege.Area = controller == "Roles" ? "Administration" : null;
rolePrivilege.Privilege.Controller = controller;
rolePrivilege.Privilege.Action = action;
rolePrivilege.RoleId = role.Id;
rolePrivilege.Role = null;
role.RolePrivileges.Add(rolePrivilege);
context.Add(rolePrivilege.Privilege);
}
context.SaveChanges();
}
private JsTree CreatePrivilegesTree(Role role)
{
JsTreeNode rootNode = new JsTreeNode(Titles.All);
JsTree expectedTree = new JsTree();
expectedTree.Nodes.Add(rootNode);
expectedTree.SelectedIds = role.RolePrivileges.Select(rolePrivilege => rolePrivilege.PrivilegeId).ToList();
IEnumerable<Privilege> privileges = role
.RolePrivileges
.Select(rolePriv => rolePriv.Privilege)
.Select(privilege => new Privilege
{
Id = privilege.Id,
Area = ResourceProvider.GetPrivilegeAreaTitle(privilege.Area),
Controller = ResourceProvider.GetPrivilegeControllerTitle(privilege.Area, privilege.Controller),
Action = ResourceProvider.GetPrivilegeActionTitle(privilege.Area, privilege.Controller, privilege.Action)
});
foreach (IGrouping<String, Privilege> area in privileges.GroupBy(privilege => privilege.Area).OrderBy(privilege => privilege.Key ?? privilege.FirstOrDefault().Controller))
{
JsTreeNode areaNode = new JsTreeNode(area.Key);
foreach (IGrouping<String, Privilege> controller in area.GroupBy(privilege => privilege.Controller).OrderBy(privilege => privilege.Key))
{
JsTreeNode controllerNode = new JsTreeNode(controller.Key);
foreach (Privilege privilege in controller.OrderBy(privilege => privilege.Action))
controllerNode.Nodes.Add(new JsTreeNode(privilege.Id, privilege.Action));
if (areaNode.Title == null)
rootNode.Nodes.Add(controllerNode);
else
areaNode.Nodes.Add(controllerNode);
}
if (areaNode.Title != null)
rootNode.Nodes.Add(areaNode);
}
return expectedTree;
}
private IEnumerable<JsTreeNode> GetAllLeafNodes(IEnumerable<JsTreeNode> nodes)
{
List<JsTreeNode> leafs = nodes.Where(node => node.Nodes.Count == 0).ToList();
IEnumerable<JsTreeNode> branches = nodes.Where(node => node.Nodes.Count > 0);
foreach (JsTreeNode branch in branches)
leafs.AddRange(GetAllLeafNodes(branch.Nodes));
return leafs;
}
private IEnumerable<JsTreeNode> GetAllBranchNodes(IEnumerable<JsTreeNode> nodes)
{
List<JsTreeNode> branches = nodes.Where(node => node.Nodes.Count > 0).ToList();
foreach (JsTreeNode branch in branches.ToArray())
branches.AddRange(GetAllBranchNodes(branch.Nodes));
return branches;
}
#endregion
}
}
| 35.326733 | 183 | 0.596973 | [
"MIT"
] | SuryaLim/MVC6.Template | test/MvcTemplate.Tests/Unit/Services/Administration/Roles/RoleServiceTests.cs | 14,274 | C# |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
namespace Microsoft.Azure.IIoT.Modules.OpcUa.Twin.v2.Models {
using Microsoft.Azure.IIoT.OpcUa.Registry.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
/// <summary>
/// Endpoint model for edgeservice api
/// </summary>
public class EndpointApiModel {
/// <summary>
/// Default constructor
/// </summary>
public EndpointApiModel() { }
/// <summary>
/// Create api model from service model
/// </summary>
/// <param name="model"></param>
public EndpointApiModel(EndpointModel model) {
if (model == null) {
throw new ArgumentNullException(nameof(model));
}
Url = model.Url;
AlternativeUrls = model.AlternativeUrls;
User = model.User == null ? null :
new CredentialApiModel(model.User);
Certificate = model.Certificate;
SecurityMode = model.SecurityMode;
SecurityPolicy = model.SecurityPolicy;
}
/// <summary>
/// Create service model from api model
/// </summary>
public EndpointModel ToServiceModel() {
return new EndpointModel {
Url = Url,
AlternativeUrls = AlternativeUrls,
User = User?.ToServiceModel(),
Certificate = Certificate,
SecurityMode = SecurityMode,
SecurityPolicy = SecurityPolicy,
};
}
/// <summary>
/// Endpoint url to use to connect with
/// </summary>
[JsonProperty(PropertyName = "Url")]
public string Url { get; set; }
/// <summary>
/// Alternative endpoint urls that can be used for
/// accessing and validating the server
/// </summary>
[JsonProperty(PropertyName = "AlternativeUrls",
NullValueHandling = NullValueHandling.Ignore)]
public HashSet<string> AlternativeUrls { get; set; }
/// <summary>
/// User Authentication
/// </summary>
[JsonProperty(PropertyName = "User",
NullValueHandling = NullValueHandling.Ignore)]
public CredentialApiModel User { get; set; }
/// <summary>
/// Security Mode to use for communication
/// default to best.
/// </summary>
[JsonProperty(PropertyName = "SecurityMode",
NullValueHandling = NullValueHandling.Ignore)]
public SecurityMode? SecurityMode { get; set; }
/// <summary>
/// Security policy uri to use for communication
/// default to best.
/// </summary>
[JsonProperty(PropertyName = "SecurityPolicy",
NullValueHandling = NullValueHandling.Ignore)]
public string SecurityPolicy { get; set; }
/// <summary>
/// Certificate to validate against or null to trust none.
/// </summary>
[JsonProperty(PropertyName = "Certificate",
NullValueHandling = NullValueHandling.Ignore)]
public byte[] Certificate { get; set; }
}
}
| 35.112245 | 99 | 0.554199 | [
"MIT"
] | TheWaywardHayward/Industrial-IoT | modules/opc-twin/src/v2/Models/EndpointApiModel.cs | 3,441 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof(MotherOut.Startup))]
namespace MotherOut
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
}
| 17.210526 | 50 | 0.669725 | [
"MIT"
] | Florida2DAM/MotherOut | BackEnd/MotherOut/MotherOut/Startup.cs | 329 | C# |
namespace FsbFontLib.Font
{
using System.IO;
using System.Text;
using FsbCommonLib;
using FsbFontLib.BMFont;
/// <summary>
/// フォント座標ヘッダー
/// </summary>
public class FsbFontHeader
{
public int GameObjectFileID { get; private set; }
public long GameObjectPathID { get; private set; }
public bool GameObjectEnables { get; private set; }
public int ScriptFileID { get; private set; }
public long ScriptPathID { get; private set; }
public string ScriptName { get; private set; }
public int MaterialFileID { get; private set; }
public long MaterialPathID { get; private set; }
public float UVRectX { get; private set; }
public float UVRectY { get; private set; }
public float UVRectWidth { get; private set; }
public float UVRectHeight { get; private set; }
public int BMFontSize { get; private set; }
public int BMFontBase { get; private set; }
public int BMFontWidth { get; private set; }
public int BMFontHeight { get; private set; }
public string SpriteName { get; private set; }
/// <summary>
/// Streamからフォント座標ヘッダーを読み込む。
/// </summary>
/// <param name="reader">Stream</param>
public void Read(BinaryReader reader)
{
this.GameObjectFileID = reader.ReadInt32();
this.GameObjectPathID = reader.ReadInt64();
this.GameObjectEnables = FsbBinUtils.ReadBoolean(reader);
this.ScriptFileID = reader.ReadInt32();
this.ScriptPathID = reader.ReadInt64();
this.ScriptName = FsbBinUtils.ReadString(reader);
this.MaterialFileID = reader.ReadInt32();
this.MaterialPathID = reader.ReadInt64();
this.UVRectX = reader.ReadSingle();
this.UVRectY = reader.ReadSingle();
this.UVRectWidth = reader.ReadSingle();
this.UVRectHeight = reader.ReadSingle();
this.BMFontSize = reader.ReadInt32();
this.BMFontBase = reader.ReadInt32();
this.BMFontWidth = reader.ReadInt32();
this.BMFontHeight = reader.ReadInt32();
this.SpriteName = FsbBinUtils.ReadString(reader);
}
/// <summary>
/// Streamへフォント座標ヘッダーを書き込む。
/// </summary>
/// <param name="writer">Stream</param>
public void Write(BinaryWriter writer)
{
//// ToDo: ファイル名や内部名の長さを求める処理を追加。
writer.Write(this.GameObjectFileID);
writer.Write(this.GameObjectPathID);
FsbBinUtils.WriteBoolean(writer, this.GameObjectEnables);
writer.Write(this.ScriptFileID);
writer.Write(this.ScriptPathID);
FsbBinUtils.WriteString(writer, this.ScriptName);
writer.Write(this.MaterialFileID);
writer.Write(this.MaterialPathID);
writer.Write(this.UVRectX);
writer.Write(this.UVRectY);
writer.Write(this.UVRectWidth);
writer.Write(this.UVRectHeight);
writer.Write(this.BMFontSize);
writer.Write(this.BMFontBase);
writer.Write(this.BMFontWidth);
writer.Write(this.BMFontHeight);
FsbBinUtils.WriteString(writer, this.SpriteName);
}
/// <summary>
/// フォント座標ヘッダーから値を設定する。
/// </summary>
/// <param name="header">フォント座標ヘッダー</param>
public void SetHeader(FsbFontHeader header)
{
this.BMFontSize = header.BMFontSize;
this.BMFontBase = header.BMFontBase;
this.BMFontWidth = header.BMFontWidth;
this.BMFontHeight = header.BMFontHeight;
this.GameObjectFileID = header.GameObjectFileID;
this.GameObjectPathID = header.GameObjectPathID;
this.GameObjectEnables = header.GameObjectEnables;
this.MaterialFileID = header.MaterialFileID;
this.MaterialPathID = header.MaterialPathID;
this.ScriptFileID = header.ScriptFileID;
this.ScriptPathID = header.ScriptPathID;
this.ScriptName = header.ScriptName;
this.SpriteName = header.SpriteName;
this.UVRectX = header.UVRectX;
this.UVRectY = header.UVRectY;
this.UVRectWidth = header.UVRectWidth;
this.UVRectHeight = header.UVRectHeight;
}
/// <summary>
/// 新しいフォントマップから変換する。
/// </summary>
/// <param name="jp">新しいフォントマップ</param>
public void Convert(FsbBMFontMap jp)
{
//// 必要最低限の情報のみ変換する。
this.BMFontSize = jp.FontSize;
this.BMFontBase = jp.FontBase;
this.BMFontWidth = jp.ImageWidth;
this.BMFontHeight = jp.ImageHeight;
////this.GameObjectFileID
////this.GameObjectPathID
////this.GameObjectEnables
////this.MaterialFileID
////this.MaterialPathID
////this.ScriptFileID
////this.ScriptPathID
////this.ScriptNameLength
////this.ScriptName
////this.SpriteNameLength
////this.SpriteName
////this.UVRectX
////this.UVRectY
////this.UVRectWidth
////this.UVRectHeight
}
/// <summary>
/// Clone
/// </summary>
/// <returns>Cloned Header</returns>
public FsbFontHeader Clone()
{
var fsbFontHeader = new FsbFontHeader();
fsbFontHeader.BMFontSize = this.BMFontWidth;
fsbFontHeader.BMFontBase = this.BMFontBase;
fsbFontHeader.BMFontWidth = this.BMFontWidth;
fsbFontHeader.BMFontHeight = this.BMFontHeight;
fsbFontHeader.GameObjectFileID = this.GameObjectFileID;
fsbFontHeader.GameObjectPathID = this.GameObjectPathID;
fsbFontHeader.GameObjectEnables = this.GameObjectEnables;
fsbFontHeader.MaterialFileID = this.MaterialFileID;
fsbFontHeader.MaterialPathID = this.MaterialPathID;
fsbFontHeader.ScriptFileID = this.ScriptFileID;
fsbFontHeader.ScriptPathID = this.ScriptPathID;
fsbFontHeader.ScriptName = this.ScriptName;
fsbFontHeader.SpriteName = this.SpriteName;
fsbFontHeader.UVRectX = this.UVRectX;
fsbFontHeader.UVRectY = this.UVRectY;
fsbFontHeader.UVRectWidth = this.UVRectWidth;
fsbFontHeader.UVRectHeight = this.UVRectHeight;
return fsbFontHeader;
}
/// <summary>
/// デバッグ用テキストを返す。
/// </summary>
/// <returns>デバッグ用テキスト</returns>
public override string ToString()
{
var buff = new StringBuilder();
buff.AppendLine(
$"GameObjectFileID({this.GameObjectFileID}) " +
$"GameObjectPathID({this.GameObjectPathID}) " +
$"Enables({this.GameObjectEnables})");
buff.AppendLine(
$" ScriptFileID({this.ScriptFileID}) " +
$"ScriptPathID({this.ScriptPathID}) " +
$"ScriptName({this.ScriptName})");
buff.AppendLine(
$" MaterialFileID({this.MaterialFileID}) " +
$"MaterialPathID({this.MaterialPathID})");
buff.AppendLine(
$" UVRectX({this.UVRectX}) " +
$"UVRectY({this.UVRectY}) " +
$"UVRectWidth({this.UVRectWidth}) " +
$"UVRectHeight({this.UVRectHeight})");
buff.AppendLine(
$" BMFontSize({this.BMFontSize}) " +
$"BMFontBase({this.BMFontBase}) " +
$"BMFontWidth({this.BMFontWidth}) " +
$"BMFontHeight({this.BMFontHeight})");
buff.AppendLine($" ScriptName({this.SpriteName})");
return buff.ToString();
}
}
}
| 34.441667 | 70 | 0.558795 | [
"MIT"
] | synctam/FssJpModAid | FsbFontLib/Font/FsbFontHeader.cs | 8,588 | C# |
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.Configurer;
using Microsoft.DotNet.Tools.Tool.Install;
using Microsoft.Extensions.EnvironmentAbstractions;
namespace Microsoft.DotNet.ToolPackage
{
internal static class ToolPackageFactory
{
public static (IToolPackageStore, IToolPackageInstaller) CreateToolPackageStoreAndInstaller(
DirectoryPath? nonGlobalLocation = null)
{
IToolPackageStore toolPackageStore = CreateToolPackageStore(nonGlobalLocation);
var toolPackageInstaller = new ToolPackageInstaller(
toolPackageStore,
new ProjectRestorer());
return (toolPackageStore, toolPackageInstaller);
}
public static IToolPackageStore CreateToolPackageStore(
DirectoryPath? nonGlobalLocation = null)
{
var toolPackageStore =
new ToolPackageStore(nonGlobalLocation.HasValue
? new DirectoryPath(ToolPackageFolderPathCalculator.GetToolPackageFolderPath(nonGlobalLocation.Value.Value))
: GetPackageLocation());
return toolPackageStore;
}
private static DirectoryPath GetPackageLocation()
{
var cliFolderPathCalculator = new CliFolderPathCalculator();
return new DirectoryPath(cliFolderPathCalculator.ToolsPackagePath);
}
}
}
| 37.642857 | 124 | 0.698292 | [
"MIT"
] | assyadh/cli | src/dotnet/ToolPackage/ToolPackageFactory.cs | 1,583 | C# |
//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.4.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using AdventureWorks.Dal.Adapter.v54.HelperClasses;
using AdventureWorks.Dal.Adapter.v54.FactoryClasses;
using AdventureWorks.Dal.Adapter.v54.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace AdventureWorks.Dal.Adapter.v54.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Entity class which represents the entity 'AddressType'.<br/><br/></summary>
[Serializable]
public partial class AddressTypeEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
private EntityCollection<BusinessEntityAddressEntity> _businessEntityAddresses;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static AddressTypeEntityStaticMetaData _staticMetaData = new AddressTypeEntityStaticMetaData();
private static AddressTypeRelations _relationsFactory = new AddressTypeRelations();
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name BusinessEntityAddresses</summary>
public static readonly string BusinessEntityAddresses = "BusinessEntityAddresses";
}
/// <summary>Static meta-data storage for navigator related information</summary>
protected class AddressTypeEntityStaticMetaData : EntityStaticMetaDataBase
{
public AddressTypeEntityStaticMetaData()
{
SetEntityCoreInfo("AddressTypeEntity", InheritanceHierarchyType.None, false, (int)AdventureWorks.Dal.Adapter.v54.EntityType.AddressTypeEntity, typeof(AddressTypeEntity), typeof(AddressTypeEntityFactory), false);
AddNavigatorMetaData<AddressTypeEntity, EntityCollection<BusinessEntityAddressEntity>>("BusinessEntityAddresses", a => a._businessEntityAddresses, (a, b) => a._businessEntityAddresses = b, a => a.BusinessEntityAddresses, () => new AddressTypeRelations().BusinessEntityAddressEntityUsingAddressTypeId, typeof(BusinessEntityAddressEntity), (int)AdventureWorks.Dal.Adapter.v54.EntityType.BusinessEntityAddressEntity);
}
}
/// <summary>Static ctor</summary>
static AddressTypeEntity()
{
}
/// <summary> CTor</summary>
public AddressTypeEntity()
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public AddressTypeEntity(IEntityFields2 fields)
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this AddressTypeEntity</param>
public AddressTypeEntity(IValidator validator)
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="addressTypeId">PK value for AddressType which data should be fetched into this AddressType object</param>
public AddressTypeEntity(System.Int32 addressTypeId) : this(addressTypeId, null)
{
}
/// <summary> CTor</summary>
/// <param name="addressTypeId">PK value for AddressType which data should be fetched into this AddressType object</param>
/// <param name="validator">The custom validator object for this AddressTypeEntity</param>
public AddressTypeEntity(System.Int32 addressTypeId, IValidator validator)
{
InitClassEmpty(validator, null);
this.AddressTypeId = addressTypeId;
}
/// <summary>Private CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected AddressTypeEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'BusinessEntityAddress' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoBusinessEntityAddresses() { return CreateRelationInfoForNavigator("BusinessEntityAddresses"); }
/// <inheritdoc/>
protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }
/// <summary>Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
/// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this AddressTypeEntity</param>
/// <param name="fields">Fields of this entity</param>
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
public static AddressTypeRelations Relations { get { return _relationsFactory; } }
/// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'BusinessEntityAddress' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathBusinessEntityAddresses { get { return _staticMetaData.GetPrefetchPathElement("BusinessEntityAddresses", CommonEntityBase.CreateEntityCollection<BusinessEntityAddressEntity>()); } }
/// <summary>The AddressTypeId property of the Entity AddressType<br/><br/></summary>
/// <remarks>Mapped on table field: "AddressType"."AddressTypeID".<br/>Table field type characteristics (type, precision, scale, length): Int, 10, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, true</remarks>
public virtual System.Int32 AddressTypeId
{
get { return (System.Int32)GetValue((int)AddressTypeFieldIndex.AddressTypeId, true); }
set { SetValue((int)AddressTypeFieldIndex.AddressTypeId, value); } }
/// <summary>The ModifiedDate property of the Entity AddressType<br/><br/></summary>
/// <remarks>Mapped on table field: "AddressType"."ModifiedDate".<br/>Table field type characteristics (type, precision, scale, length): DateTime, 0, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.DateTime ModifiedDate
{
get { return (System.DateTime)GetValue((int)AddressTypeFieldIndex.ModifiedDate, true); }
set { SetValue((int)AddressTypeFieldIndex.ModifiedDate, value); }
}
/// <summary>The Name property of the Entity AddressType<br/><br/></summary>
/// <remarks>Mapped on table field: "AddressType"."Name".<br/>Table field type characteristics (type, precision, scale, length): NVarChar, 0, 0, 50.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String Name
{
get { return (System.String)GetValue((int)AddressTypeFieldIndex.Name, true); }
set { SetValue((int)AddressTypeFieldIndex.Name, value); }
}
/// <summary>The Rowguid property of the Entity AddressType<br/><br/></summary>
/// <remarks>Mapped on table field: "AddressType"."rowguid".<br/>Table field type characteristics (type, precision, scale, length): UniqueIdentifier, 0, 0, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Guid Rowguid
{
get { return (System.Guid)GetValue((int)AddressTypeFieldIndex.Rowguid, true); }
set { SetValue((int)AddressTypeFieldIndex.Rowguid, value); }
}
/// <summary>Gets the EntityCollection with the related entities of type 'BusinessEntityAddressEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(BusinessEntityAddressEntity))]
public virtual EntityCollection<BusinessEntityAddressEntity> BusinessEntityAddresses { get { return GetOrCreateEntityCollection<BusinessEntityAddressEntity, BusinessEntityAddressEntityFactory>("AddressType", true, false, ref _businessEntityAddresses); } }
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
}
}
namespace AdventureWorks.Dal.Adapter.v54
{
public enum AddressTypeFieldIndex
{
///<summary>AddressTypeId. </summary>
AddressTypeId,
///<summary>ModifiedDate. </summary>
ModifiedDate,
///<summary>Name. </summary>
Name,
///<summary>Rowguid. </summary>
Rowguid,
/// <summary></summary>
AmountOfFields
}
}
namespace AdventureWorks.Dal.Adapter.v54.RelationClasses
{
/// <summary>Implements the relations factory for the entity: AddressType. </summary>
public partial class AddressTypeRelations: RelationFactory
{
/// <summary>Returns a new IEntityRelation object, between AddressTypeEntity and BusinessEntityAddressEntity over the 1:n relation they have, using the relation between the fields: AddressType.AddressTypeId - BusinessEntityAddress.AddressTypeId</summary>
public virtual IEntityRelation BusinessEntityAddressEntityUsingAddressTypeId
{
get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "BusinessEntityAddresses", true, new[] { AddressTypeFields.AddressTypeId, BusinessEntityAddressFields.AddressTypeId }); }
}
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticAddressTypeRelations
{
internal static readonly IEntityRelation BusinessEntityAddressEntityUsingAddressTypeIdStatic = new AddressTypeRelations().BusinessEntityAddressEntityUsingAddressTypeId;
/// <summary>CTor</summary>
static StaticAddressTypeRelations() { }
}
}
| 49.191781 | 418 | 0.76339 | [
"MIT"
] | sanekpr/RawDataAccessBencher | LLBLGen54/DatabaseGeneric/EntityClasses/AddressTypeEntity.cs | 10,775 | C# |
//
// AuthenticatedPostHandler.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2014 Xamarin Inc. (http://www.xamarin.com)
//
// 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 System.Net;
using System.Threading;
using System.Threading.Tasks;
using Xamarin.AsyncTests;
namespace Xamarin.WebTests.HttpHandlers
{
using HttpFramework;
using Server;
public class AuthenticationHandler : AbstractRedirectHandler
{
bool cloneable;
public AuthenticationHandler (AuthenticationType type, Handler target, string identifier = null)
: base (target, identifier ?? CreateIdentifier (type, target))
{
manager = new HttpAuthManager (type, target);
cloneable = true;
}
static string CreateIdentifier (AuthenticationType type, Handler target)
{
return string.Format ("Authentication({0}): {1}", type, target.Value);
}
AuthenticationHandler (HttpAuthManager manager)
: base (manager.Target, manager.Target.Value)
{
this.manager = manager;
}
public override object Clone ()
{
if (!cloneable)
throw new InternalErrorException ();
var clonedTarget = (Handler)Target.Clone ();
return new AuthenticationHandler (manager.AuthenticationType, clonedTarget, Value);
}
class HttpAuthManager : AuthenticationManager
{
public readonly Handler Target;
public HttpAuthManager (AuthenticationType type, Handler target)
: base (type)
{
Target = target;
}
protected override HttpResponse OnError (string message)
{
return HttpResponse.CreateError (message);
}
protected override HttpResponse OnUnauthenticated (HttpConnection connection, HttpRequest request, string token, bool omitBody)
{
var handler = new AuthenticationHandler (this);
if (omitBody)
handler.Flags |= RequestFlags.NoBody;
handler.Flags |= RequestFlags.Redirected;
connection.Server.RegisterHandler (request.Path, handler);
var response = new HttpResponse (HttpStatusCode.Unauthorized);
response.AddHeader ("WWW-Authenticate", token);
return response;
}
}
readonly HttpAuthManager manager;
protected internal override async Task<HttpResponse> HandleRequest (
TestContext ctx, HttpConnection connection, HttpRequest request,
RequestFlags effectiveFlags, CancellationToken cancellationToken)
{
string authHeader;
if (!request.Headers.TryGetValue ("Authorization", out authHeader))
authHeader = null;
var response = manager.HandleAuthentication (connection, request, authHeader);
if (response != null)
return response;
cancellationToken.ThrowIfCancellationRequested ();
return await Target.HandleRequest (ctx, connection, request, effectiveFlags, cancellationToken);
}
public override bool CheckResponse (TestContext ctx, Response response)
{
return Target.CheckResponse (ctx, response);
}
public override void ConfigureRequest (Request request, Uri uri)
{
base.ConfigureRequest (request, uri);
request.SetCredentials (new NetworkCredential ("xamarin", "monkey"));
}
public ICredentials GetCredentials ()
{
return new NetworkCredential ("xamarin", "monkey");
}
}
}
| 31.646617 | 130 | 0.743645 | [
"MIT"
] | stefb965/web-tests | Xamarin.WebTests.Framework/Xamarin.WebTests.HttpHandlers/AuthenticationHandler.cs | 4,211 | C# |
using System;
using System.Windows.Forms;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class DefaultGreenzoneSettings : Form
{
private TasStateManagerSettings _settings;
public DefaultGreenzoneSettings()
{
InitializeComponent();
_settings = new TasStateManagerSettings(Global.Config.DefaultTasStateManagerSettings);
SettingsPropertyGrid.SelectedObject = _settings;
}
private void OkBtn_Click(object sender, EventArgs e)
{
Global.Config.DefaultTasStateManagerSettings = _settings;
Close();
}
private void CancelBtn_Click(object sender, EventArgs e)
{
Close();
}
private void DefaultsButton_Click(object sender, EventArgs e)
{
_settings = new TasStateManagerSettings();
SettingsPropertyGrid.SelectedObject = _settings;
}
}
}
| 21.974359 | 90 | 0.729288 | [
"MIT"
] | Gorialis/BizHawk | BizHawk.Client.EmuHawk/tools/TAStudio/DefaultGreenzoneSettings.cs | 859 | C# |
using Newtonsoft.Json;
namespace Dmc.GuessWho.Web.Dtos
{
public class EmployeeDto
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("normalImageUrl")]
public string NormalImageUrl { get; set; }
[JsonProperty("funImageUrl")]
public string FunImageUrl { get; set; }
}
} | 25.071429 | 50 | 0.615385 | [
"MIT"
] | swebgit/dmc-guess-who | Dmc.GuessWho.Web/Dtos/EmployeeDto.cs | 353 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Envy.API.Extensions;
namespace Envy.API.Entities
{
public class User
{
[Required]
public Guid Id { get; set; }
[Required]
public string UserName { get; set; }
public string Email { get; set; }
[Required]
public byte[] PasswordHash { get; set; }
[Required]
public byte[] PasswordSalt { get; set; }
public string Interests { get; set; }
public string City { get; set; }
public string Country { get; set; }
public ICollection<Photo> Photos { get; set; }
public ICollection<Question> Questions { get; set; }
public ICollection<Answer> Answers { get; set; }
public DateTime BirthDate { get; set; }
[Required]
public DateTime CreatedDate { get; set; } = DateTime.Now;
[Required]
public DateTime ActiveDate { get; set; } = DateTime.Now;
public int GetAge()
{
return BirthDate.CalculateAge();
}
}
} | 22.693878 | 65 | 0.584532 | [
"Apache-2.0"
] | jokocide/envy | api/src/Entities/User.cs | 1,112 | C# |
namespace GalleryServer.Areas.Admin.Features.Category.Models
{
public class CreatePostRequestModel
{
public string Title { get; set; }
}
}
| 20 | 61 | 0.6875 | [
"MIT"
] | martin-petrov03/Gallery | GalleryServer/GalleryServer/Areas/Admin/Features/Category/Models/CreatePostRequestModel.cs | 162 | 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.IO;
using System.Linq;
using Microsoft.ML.Core.Data;
using Microsoft.ML.Data;
using Microsoft.ML.RunTests;
using Microsoft.ML.Trainers;
using Xunit;
namespace Microsoft.ML.Tests.Scenarios.Api
{
public partial class ApiScenariosTests
{
/// <summary>
/// Train, save/load model, predict:
/// Serve the scenario where training and prediction happen in different processes (or even different machines).
/// The actual test will not run in different processes, but will simulate the idea that the
/// "communication pipe" is just a serialized model of some form.
/// </summary>
[Fact]
public void TrainSaveModelAndPredict()
{
var ml = new MLContext(seed: 1, conc: 1);
var data = ml.Data.ReadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename), hasHeader: true);
// Pipeline.
var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features")
.AppendCacheCheckpoint(ml)
.Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(
new SdcaBinaryTrainer.Options { NumThreads = 1 }));
// Train.
var model = pipeline.Fit(data);
var modelPath = GetOutputPath("temp.zip");
// Save model.
using (var file = File.Create(modelPath))
model.SaveTo(ml, file);
// Load model.
ITransformer loadedModel;
using (var file = File.OpenRead(modelPath))
loadedModel = TransformerChain.LoadFrom(ml, file);
// Create prediction engine and test predictions.
var engine = loadedModel.CreatePredictionEngine<SentimentData, SentimentPrediction>(ml);
// Take a couple examples out of the test data and run predictions on top.
var testData = ml.CreateEnumerable<SentimentData>(
ml.Data.ReadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.testFilename), hasHeader: true), false);
foreach (var input in testData.Take(5))
{
var prediction = engine.Predict(input);
// Verify that predictions match and scores are separated from zero.
Assert.Equal(input.Sentiment, prediction.Sentiment);
Assert.True(input.Sentiment && prediction.Score > 1 || !input.Sentiment && prediction.Score < -1);
}
}
}
}
| 42.6875 | 131 | 0.635066 | [
"MIT"
] | cluesblues/machinelearning | test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs | 2,734 | C# |
using System;
using System.IO;
using BuzzardWPF.Management;
using BuzzardWPF.Properties;
using ReactiveUI;
namespace BuzzardWPF.Searching
{
/// <summary>
/// Class that holds the information from the user interface about how to find data files.
/// </summary>
public class SearchConfig : ReactiveObject, IStoredSettingsMonitor
{
public const int DEFAULT_MINIMUM_FILE_SIZE_KB = 100;
public const string DEFAULT_FILE_EXTENSION = ".raw";
public const SearchOption DEFAULT_SEARCH_DEPTH = SearchOption.TopDirectoryOnly;
public const bool DEFAULT_MATCH_FOLDERS = true;
/// <summary>
/// Path to the directory where the files are to be searched.
/// </summary>
private string mDirectoryPath;
private string mFileExtension;
private string mFolderNameFilter;
private string mFilenameFilter;
private SearchOption mSearchDepth;
private bool mMatchFolders;
private int mMinimumSizeKB;
private bool useDateRange = false;
private DateTime mStartDate;
private DateTime mEndDate;
// Do not save this option to the registry / settings; always keep it off when the program starts
private bool mDisableBaseFolderValidation;
/// <summary>
/// Default constructor.
/// </summary>
public SearchConfig()
{
ResetToDefaults(true);
}
public bool SettingsChanged { get; set; }
/// <summary>
/// The share name that corresponds to Directory Path. Empty string when the share is the default specified in DMS.
/// </summary>
public string ShareName { get; set; } = string.Empty;
/// <summary>
/// Any components of the searched path that are not
/// </summary>
public string BaseCaptureSubdirectory { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the path to search in.
/// </summary>
public string DirectoryPath
{
get => mDirectoryPath;
set => this.RaiseAndSetIfChangedMonitored(ref mDirectoryPath, value);
}
public bool DisableBaseFolderValidation
{
get => mDisableBaseFolderValidation;
set => this.RaiseAndSetIfChanged(ref mDisableBaseFolderValidation, value);
}
/// <summary>
/// Gets or sets the file extension to look for.
/// </summary>
public string FileExtension
{
get => mFileExtension;
set
{
// Strip any invalid characters from the provided value
var changed = false;
if (!string.IsNullOrWhiteSpace(value))
{
var value2 = string.Concat(value.Split(Path.GetInvalidFileNameChars()));
if (!value2.StartsWith("."))
{
value2 = "." + value2;
}
if (!value.Equals(value2))
{
changed = true;
value = value2;
}
}
if (!this.RaiseAndSetIfChangedMonitoredBool(ref mFileExtension, value) && changed)
{
// if we cleaned the value, we need to report that the value changed to remove the invalid characters from the TextBox.
this.RaisePropertyChanged();
}
}
}
/// <summary>
/// Gets or sets the folder name to filter on (partial match)
/// </summary>
public string FolderNameFilter
{
get => mFolderNameFilter;
set => this.RaiseAndSetIfChanged(ref mFolderNameFilter, value);
}
/// <summary>
/// Gets or sets the filename to filter on (partial match)
/// </summary>
public string FilenameFilter
{
get => mFilenameFilter;
set => this.RaiseAndSetIfChanged(ref mFilenameFilter, value);
}
/// <summary>
/// Gets or sets the way to search for files in a directory
/// </summary>
public SearchOption SearchDepth
{
get => mSearchDepth;
set => this.RaiseAndSetIfChangedMonitored(ref mSearchDepth, value);
}
/// <summary>
/// If the search will use the date range to limit results. This is not stored to the saved settings.
/// </summary>
public bool UseDateRange
{
get => useDateRange;
set => this.RaiseAndSetIfChanged(ref useDateRange, value);
}
/// <summary>
/// The start of the search range. This is not stored to the saved settings.
/// </summary>
public DateTime StartDate
{
get => mStartDate;
set => this.RaiseAndSetIfChanged(ref mStartDate, value);
}
/// <summary>
/// The end of the search range. This is not stored to the saved settings.
/// </summary>
public DateTime EndDate
{
get => mEndDate;
set => this.RaiseAndSetIfChanged(ref mEndDate, value);
}
/// <summary>
/// Set to True to allow folders to be selected as Datasets
/// </summary>
public bool MatchFolders
{
get => mMatchFolders;
set => this.RaiseAndSetIfChangedMonitored(ref mMatchFolders, value);
}
/// <summary>
/// Gets or sets the minimum file size (in KB) for permitting trigger file creation
/// Monitor: This is the minimum size for a dataset to be considered for trigger file creation
/// </summary>
public int MinimumSizeKB
{
get => mMinimumSizeKB;
set => this.RaiseAndSetIfChangedMonitored(ref mMinimumSizeKB, value);
}
public void ResetDateRange()
{
StartDate = DateTime.Now.Date.AddYears(-3);
EndDate = DateTime.Now.Date.AddDays(1).AddYears(1);
}
public void ResetToDefaults(bool resetDirectoryPath)
{
if (resetDirectoryPath)
{
DirectoryPath = @"c:\";
}
FileExtension = DEFAULT_FILE_EXTENSION;
SearchDepth = DEFAULT_SEARCH_DEPTH;
MatchFolders = DEFAULT_MATCH_FOLDERS;
MinimumSizeKB = DEFAULT_MINIMUM_FILE_SIZE_KB;
ResetDateRange();
}
public bool SaveSettings(bool force = false)
{
if (!SettingsChanged && !force)
{
return false;
}
Settings.Default.Search_MatchFolders = MatchFolders;
Settings.Default.SearchExtension = FileExtension;
Settings.Default.SearchPath = DirectoryPath;
Settings.Default.SearchDirectoryOptions = SearchDepth;
Settings.Default.SearchMinimumSizeKB = MinimumSizeKB;
SettingsChanged = false;
return true;
}
public void LoadSettings()
{
MatchFolders = Settings.Default.Search_MatchFolders;
FileExtension = Settings.Default.SearchExtension;
DirectoryPath = Settings.Default.SearchPath;
SearchDepth = Settings.Default.SearchDirectoryOptions;
MinimumSizeKB = Settings.Default.SearchMinimumSizeKB;
SettingsChanged = false;
}
}
}
| 33.995633 | 140 | 0.549647 | [
"Apache-2.0"
] | PNNL-Comp-Mass-Spec/Buzzard | BuzzardWPF/Searching/SearchConfig.cs | 7,787 | C# |
using Newtonsoft.Json;
namespace Amazon.Advertising.API.Models
{
public class SuggestedKeyword
{
/// <summary>
/// The suggested keyword
/// </summary>
[JsonProperty("keywordText")]
public string KeywordText { get; set; }
/// <summary>
/// Match type of the suggested keyword
/// </summary>
[JsonProperty("matchType")]
public string MatchType { get; set; }
}
}
| 22.8 | 47 | 0.565789 | [
"BSD-3-Clause"
] | 1992w/amazon-advertising-api-csharp | source/Amazon.Advertising.API/Models/SuggestedKeyword.cs | 458 | C# |
using System;
using System.Collections.Generic;
using System.Security;
using Moq;
using NBitcoin;
using Newtonsoft.Json;
using Stratis.Bitcoin.Base;
using Stratis.Bitcoin.Configuration;
using Stratis.Bitcoin.Features.Miner.Interfaces;
using Stratis.Bitcoin.Features.Miner.Models;
using Stratis.Bitcoin.Features.RPC;
using Stratis.Bitcoin.Features.Wallet;
using Stratis.Bitcoin.Features.Wallet.Interfaces;
using Stratis.Bitcoin.Tests.Common.Logging;
using Stratis.Bitcoin.Tests.Wallet.Common;
using Xunit;
namespace Stratis.Bitcoin.Features.Miner.Tests
{
public class MiningRPCControllerTest : LogsTestBase, IClassFixture<MiningRPCControllerFixture>
{
private MiningRPCController controller;
private Mock<IFullNode> fullNode;
private Mock<IPosMinting> posMinting;
private Mock<IWalletManager> walletManager;
private Mock<ITimeSyncBehaviorState> timeSyncBehaviorState;
private MiningRPCControllerFixture fixture;
private Mock<IPowMining> powMining;
public MiningRPCControllerTest(MiningRPCControllerFixture fixture)
{
this.fixture = fixture;
this.powMining = new Mock<IPowMining>();
this.fullNode = new Mock<IFullNode>();
this.posMinting = new Mock<IPosMinting>();
this.walletManager = new Mock<IWalletManager>();
this.timeSyncBehaviorState = new Mock<ITimeSyncBehaviorState>();
this.fullNode.Setup(f => f.NodeService<IWalletManager>(false))
.Returns(this.walletManager.Object);
this.controller = new MiningRPCController(this.powMining.Object, this.fullNode.Object, this.LoggerFactory.Object, this.walletManager.Object, this.posMinting.Object);
}
[Fact]
public void Generate_BlockCountLowerThanZero_ThrowsRPCServerException()
{
Assert.Throws<RPCServerException>(() =>
{
this.controller.Generate(-1);
});
}
[Fact]
public void Generate_NoWalletLoaded_ThrowsRPCServerException()
{
Assert.Throws<RPCServerException>(() =>
{
this.walletManager.Setup(w => w.GetWalletsNames())
.Returns(new List<string>());
this.controller.Generate(10);
});
}
[Fact]
public void Generate_WalletWithoutAccount_ThrowsRPCServerException()
{
Assert.Throws<RPCServerException>(() =>
{
this.walletManager.Setup(w => w.GetWalletsNames())
.Returns(new List<string>() {
"myWallet"
});
this.walletManager.Setup(w => w.GetAccounts("myWallet"))
.Returns(new List<HdAccount>());
this.controller.Generate(10);
});
}
[Fact]
public void Generate_UnusedAddressCanBeFoundOnWallet_GeneratesBlocksUsingAddress_ReturnsBlockHeaderHashes()
{
this.walletManager.Setup(w => w.GetWalletsNames())
.Returns(new List<string>() {
"myWallet"
});
this.walletManager.Setup(w => w.GetAccounts("myWallet"))
.Returns(new List<HdAccount>() {
WalletTestsHelpers.CreateAccount("test")
});
var address = WalletTestsHelpers.CreateAddress(false);
this.walletManager.Setup(w => w.GetUnusedAddress(It.IsAny<WalletAccountReference>()))
.Returns(address);
this.powMining.Setup(p => p.GenerateBlocks(It.Is<ReserveScript>(r => r.ReserveFullNodeScript == address.Pubkey), 1, int.MaxValue))
.Returns(new List<NBitcoin.uint256>() {
new NBitcoin.uint256(1255632623)
});
var result = this.controller.Generate(1);
Assert.NotEmpty(result);
Assert.Equal(new NBitcoin.uint256(1255632623), result[0]);
}
[Fact]
public void StartStaking_WalletNotFound_ThrowsWalletException()
{
Assert.Throws<WalletException>(() =>
{
this.walletManager.Setup(w => w.GetWallet("myWallet"))
.Throws(new WalletException("Wallet not found."));
this.controller.StartStaking("myWallet", "password");
});
}
[Fact]
public void StartStaking_InvalidWalletPassword_ThrowsSecurityException()
{
Assert.Throws<SecurityException>(() =>
{
this.walletManager.Setup(w => w.GetWallet("myWallet"))
.Returns(this.fixture.wallet);
this.controller.StartStaking("myWallet", "password");
});
}
[Fact]
public void StartStaking_InvalidTimeSyncState_ThrowsException()
{
this.walletManager.Setup(w => w.GetWallet("myWallet")).Returns(this.fixture.wallet);
this.timeSyncBehaviorState.Setup(ts => ts.IsSystemTimeOutOfSync).Returns(true);
this.fullNode.Setup(f => f.NodeFeature<MiningFeature>(true))
.Returns(new MiningFeature(Network.Main, new MinerSettings(Configuration.NodeSettings.Default()), Configuration.NodeSettings.Default(), this.LoggerFactory.Object, this.timeSyncBehaviorState.Object, this.powMining.Object, this.posMinting.Object));
var exception = Assert.Throws<ConfigurationException>(() =>
{
var result = this.controller.StartStaking("myWallet", "password1");
});
Assert.Contains("Staking cannot start", exception.Message);
this.posMinting.Verify(pm => pm.Stake(It.IsAny<PosMinting.WalletSecret>()), Times.Never);
}
[Fact]
public void StartStaking_ValidWalletAndPassword_StartsStaking_ReturnsTrue()
{
this.walletManager.Setup(w => w.GetWallet("myWallet"))
.Returns(this.fixture.wallet);
this.fullNode.Setup(f => f.NodeFeature<MiningFeature>(true))
.Returns(new MiningFeature(Network.Main, new MinerSettings(Configuration.NodeSettings.Default()), Configuration.NodeSettings.Default(), this.LoggerFactory.Object, this.timeSyncBehaviorState.Object, this.powMining.Object, this.posMinting.Object));
var result = this.controller.StartStaking("myWallet", "password1");
Assert.True(result);
this.posMinting.Verify(p => p.Stake(It.Is<PosMinting.WalletSecret>(s => s.WalletName == "myWallet" && s.WalletPassword == "password1")), Times.Exactly(1));
}
[Fact]
public void GetStakingInfo_WithoutPosMinting_ReturnsEmptyStakingInfoModel()
{
this.controller = new MiningRPCController(this.powMining.Object, this.fullNode.Object, this.LoggerFactory.Object, this.walletManager.Object, null);
var result = this.controller.GetStakingInfo(true);
Assert.Equal(JsonConvert.SerializeObject(new GetStakingInfoModel()), JsonConvert.SerializeObject(result));
}
[Fact]
public void GetStakingInfo_WithPosMinting_ReturnsPosMintingStakingInfoModel()
{
this.posMinting.Setup(p => p.GetGetStakingInfoModel())
.Returns(new GetStakingInfoModel()
{
Enabled = true,
CurrentBlockSize = 150000
}).Verifiable();
var result = this.controller.GetStakingInfo(true);
Assert.True(result.Enabled);
Assert.Equal(150000, result.CurrentBlockSize);
this.posMinting.Verify();
}
[Fact]
public void GetStakingInfo_NotJsonFormat_ThrowsNotImplementedException()
{
Assert.Throws<NotImplementedException>(() => {
this.controller.GetStakingInfo(false);
});
}
}
public class MiningRPCControllerFixture
{
public readonly Wallet.Wallet wallet;
public MiningRPCControllerFixture()
{
this.wallet = WalletTestsHelpers.GenerateBlankWallet("myWallet", "password1");
}
}
}
| 38.882629 | 262 | 0.616035 | [
"MIT"
] | BreezeHub/StratisBitcoinFullNode | src/Stratis.Bitcoin.Features.Miner.Tests/MiningRPCControllerTest.cs | 8,284 | C# |
using System;
using Xamarin.UITest;
using Query = System.Func<Xamarin.UITest.Queries.AppQuery, Xamarin.UITest.Queries.AppQuery>;
namespace MyDriving.UITests
{
public class SettingsPage : BasePage
{
readonly Func<string, Query> CheckBox;
readonly Query SettingsTab;
public SettingsPage()
: base ("Settings", "Settings")
{
if (OniOS)
{
SettingsTab = x => x.Class("UINavigationItemButtonView").Marked("Settings");
}
if (OnAndroid)
{
CheckBox = (arg) => x => x.Marked(arg).Parent(0).Sibling().Descendant().Id("checkbox");
}
}
public SettingsPage SetDistanceSetting()
{
if (OnAndroid)
{
App.Tap(CheckBox("Metric Distance"));
App.Screenshot("Using Metric Distances");
}
if (OniOS)
{
App.Tap("Distance");
App.Tap("Metric (km)");
App.Screenshot("Using Metric Distances");
App.Tap(SettingsTab);
}
return this;
}
public SettingsPage SetCapacitySetting()
{
if (OnAndroid)
{
App.Tap(CheckBox("Metric Units"));
App.Screenshot("Using Metric Capacity");
}
if (OniOS)
{
App.Tap("Capacity");
App.Tap("Metric (liters)");
App.Screenshot("Using Metric Capacity");
App.Tap(SettingsTab);
}
return this;
}
new public void NavigateTo(string marked)
{
if (OnAndroid)
base.NavigateTo(marked);
if (OniOS)
App.Tap("Back");
}
}
}
| 25.459459 | 104 | 0.463907 | [
"MIT"
] | AErmie/OpenHack-DevOps2 | MobileApps/MyDriving/MyDriving.UITests/Pages/SettingsPage.cs | 1,886 | C# |
#region Copyright
//=======================================================================================
// Microsoft
//
// This sample is supplemental to the technical guidance published on my personal
// blog at https://github.com/paolosalvatori.
//
// Author: Paolo Salvatori
//=======================================================================================
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// LICENSED UNDER THE APACHE LICENSE, VERSION 2.0 (THE "LICENSE"); YOU MAY NOT USE THESE
// FILES 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
namespace TodoApi.Models
{
/// <summary>
/// This class contains the configuration for the Notification helper
/// </summary>
public class NotificationServiceOptions
{
/// <summary>
/// Gets or sets the configuration for the ServiceBusNotificationService
/// </summary>
public ServiceBus ServiceBus { get; set; }
}
}
| 42.742857 | 94 | 0.572193 | [
"MIT"
] | paolosalvatori/azure-ad-workload-identity | src/TodoApi/Models/NotificationServiceOptions.cs | 1,498 | C# |
namespace LanguageServer
{
using Antlr4.Runtime;
using Antlr4.Runtime.Misc;
using Antlr4.Runtime.Tree;
using Domemtech.Symtab;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
public class Antlr4ParsingResults : ParsingResults
{
public Antlr4ParsingResults(Workspaces.Document doc) : base(doc)
{
// Passes executed in order for all files.
Passes.Add(() =>
{
// Create scopes for all files in workspace
// if they don't already exist.
foreach (KeyValuePair<string, HashSet<string>> dep in InverseImports)
{
string name = dep.Key;
_scopes.TryGetValue(name, out IScope file_scope);
if (file_scope != null)
{
continue;
}
_scopes[name] = new FileScope(name, null);
}
// Set up search path scopes for Imports relationship.
IScope root = _scopes[FullFileName];
foreach (string dep in Imports)
{
// Don't add if already have this search path.
IScope dep_scope = _scopes[dep];
bool found = false;
foreach (IScope scope in root.NestedScopes)
{
if (scope is SearchPathScope)
{
SearchPathScope spc = scope as SearchPathScope;
if (spc.NestedScopes.First() == dep_scope)
{
found = true;
break;
}
}
}
if (!found)
{
SearchPathScope import = new SearchPathScope(root);
import.nest(dep_scope);
root.nest(import);
}
}
root.empty();
RootScope = root;
return false;
});
Passes.Add(() =>
{
if (ParseTree == null) return false;
ParseTreeWalker.Default.Walk(new Pass2Listener(this), ParseTree);
return false;
});
Passes.Add(() =>
{
if (ParseTree == null) return false;
ParseTreeWalker.Default.Walk(new Pass3Listener(this), ParseTree);
return false;
});
}
public override List<bool> CanFindAllRefs { get; } = new List<bool>()
{
true, // nonterminal
true, // nonterminal
true, // Terminal
true, // Terminal
false, // comment
false, // keyword
true, // literal
true, // mode
true, // mode
true, // channel
true, // channel
false, // punctuation
false, // operator
};
public override List<bool> CanGotodef { get; } = new List<bool>()
{
true, // nonterminal
true, // nonterminal
true, // Terminal
true, // Terminal
false, // comment
false, // keyword
false, // literal
true, // mode
true, // mode
true, // channel
true, // channel
false, // punctuation
false, // operator
};
public override List<bool> CanGotovisitor { get; } = new List<bool>()
{
true, // nonterminal
true, // nonterminal
false, // Terminal
false, // Terminal
false, // comment
false, // keyword
false, // literal
false, // mode
false, // mode
false, // channel
false, // channel
false, // punctuation
false, // operator
};
public override bool CanNextRule
{
get
{
return true;
}
}
public override List<bool> CanRename { get; } = new List<bool>()
{
true, // nonterminal
true, // nonterminal
true, // Terminal
true, // Terminal
false, // comment
false, // keyword
false, // literal
true, // mode
true, // mode
true, // channel
true, // channel
false, // punctuation
false, // operator
};
public override bool CanReformat
{
get
{
return true;
}
}
public override Func<IParserDescription, Dictionary<IParseTree, IList<CombinedScopeSymbol>>, IParseTree, int> Classify { get; } =
(IParserDescription gd, Dictionary<IParseTree, IList<CombinedScopeSymbol>> st, IParseTree t) =>
{
TerminalNodeImpl term = t as TerminalNodeImpl;
Antlr4.Runtime.Tree.IParseTree p = term;
st.TryGetValue(p, out IList<CombinedScopeSymbol> list_value);
if (list_value != null)
{
// There's a symbol table entry for the leaf node.
// So, it is either a terminal, nonterminal,
// channel, mode.
// We don't care if it's a defining occurrence or
// applied occurrence, just what type of symbol it
// is.
foreach (CombinedScopeSymbol value in list_value)
{
if (value is RefSymbol)
{
List<ISymbol> defs = ((RefSymbol)value).Def;
foreach (var d in defs)
{
if (d is NonterminalSymbol)
{
return (int)AntlrClassifications.ClassificationNonterminalRef;
}
else if (d is TerminalSymbol)
{
return (int)AntlrClassifications.ClassificationNonterminalRef;
}
else if (d is ModeSymbol)
{
return (int)AntlrClassifications.ClassificationModeRef; ;
}
else if (d is ChannelSymbol)
{
return (int)AntlrClassifications.ClassificationChannelRef; ;
}
}
}
else if (value is NonterminalSymbol)
{
return (int)AntlrClassifications.ClassificationNonterminalDef;
}
else if (value is TerminalSymbol)
{
return (int)AntlrClassifications.ClassificationTerminalDef;
}
else if (value is ModeSymbol)
{
return (int)AntlrClassifications.ClassificationModeDef;
}
else if (value is ChannelSymbol)
{
return (int)AntlrClassifications.ClassificationChannelDef;
}
}
}
else
{
// It is either a keyword, literal, comment.
string text = term.GetText();
if (_antlr_keywords.Contains(text))
{
return (int)AntlrClassifications.ClassificationKeyword;
}
if ((term.Symbol.Type == ANTLRv4Parser.STRING_LITERAL
|| term.Symbol.Type == ANTLRv4Parser.INT
|| term.Symbol.Type == ANTLRv4Parser.LEXER_CHAR_SET))
{
return (int)AntlrClassifications.ClassificationLiteral;
}
// The token could be part of parserRuleSpec context.
//for (IRuleNode r = term.Parent; r != null; r = r.Parent)
//{
// if (r is ANTLRv4Parser.ParserRuleSpecContext ||
// r is ANTLRv4Parser.LexerRuleSpecContext)
// {
// return 4;
// }
//}
if (term.Payload.Channel == ANTLRv4Lexer.OFF_CHANNEL
|| term.Symbol.Type == ANTLRv4Lexer.DOC_COMMENT
|| term.Symbol.Type == ANTLRv4Lexer.BLOCK_COMMENT
|| term.Symbol.Type == ANTLRv4Lexer.LINE_COMMENT)
{
return (int)AntlrClassifications.ClassificationComment;
}
}
return -1;
};
public override bool DoErrorSquiggles => true;
public override string FileExtension { get; } = ".g4;.g";
public override string[] Map { get; } = new string[]
{
"Antlr - nonterminal def",
"Antlr - nonterminal ref",
"Antlr - terminal def",
"Antlr - terminal ref",
"Antlr - comment",
"Antlr - keyword",
"Antlr - literal",
"Antlr - mode def",
"Antlr - mode ref",
"Antlr - channel def",
"Antlr - channel ref",
"Antlr - punctuation",
"Antlr - operator",
};
public override string Name { get; } = "Antlr4";
public override List<Func<ParsingResults, IParseTree, string>> PopUpDefinition { get; } =
new List<Func<ParsingResults, IParseTree, string>>()
{
(ParsingResults pd, IParseTree t) => // nonterminal
{
TerminalNodeImpl term = t as TerminalNodeImpl;
if (term == null)
{
return null;
}
Antlr4.Runtime.Tree.IParseTree p = term;
string dir = System.IO.Path.GetDirectoryName(pd.Item.FullPath);
pd.Attributes.TryGetValue(p, out IList<CombinedScopeSymbol> list_value);
if (list_value == null)
{
return null;
}
bool first = true;
StringBuilder sb = new StringBuilder();
foreach (CombinedScopeSymbol value in list_value)
{
if (value == null)
{
continue;
}
ISymbol sym = value as ISymbol;
if (sym == null)
{
continue;
}
List<ISymbol> list_of_syms = new List<ISymbol>() { sym };
if (sym is RefSymbol)
{
list_of_syms = sym.resolve();
}
foreach (ISymbol s in list_of_syms)
{
if (! first)
{
sb.AppendLine();
}
first = false;
if (s is TerminalSymbol)
{
sb.Append("Terminal ");
}
else if (s is NonterminalSymbol)
{
sb.Append("Nonterminal ");
}
else
{
continue;
}
string def_file = s.file;
if (def_file == null)
{
continue;
}
var workspace = pd.Item.Workspace;
Workspaces.Document def_document = workspace.FindDocument(def_file);
if (def_document == null)
{
continue;
}
ParsingResults def_pd = ParsingResultsFactory.Create(def_document);
if (def_pd == null)
{
continue;
}
IParseTree fod = def_pd.Attributes.Where(
kvp =>
{
IParseTree key = kvp.Key;
if (!(key is TerminalNodeImpl))
return false;
TerminalNodeImpl t1 = key as TerminalNodeImpl;
IToken s1 = t1.Symbol;
if (s.Token.Contains(s1))
return true;
return false;
})
.Select(kvp => kvp.Key).FirstOrDefault();
if (fod == null)
{
continue;
}
sb.Append("defined in ");
sb.Append(s.file);
sb.AppendLine();
IParseTree node = fod;
for (; node != null; node = node.Parent)
{
if (node is ANTLRv4Parser.LexerRuleSpecContext ||
node is ANTLRv4Parser.ParserRuleSpecContext ||
node is ANTLRv4Parser.TokensSpecContext)
{
break;
}
}
if (node == null)
{
continue;
}
Reconstruct.Doit(sb, node);
}
}
return sb.ToString();
},
(ParsingResults pd, IParseTree t) => // nonterminal
{
TerminalNodeImpl term = t as TerminalNodeImpl;
if (term == null)
{
return null;
}
Antlr4.Runtime.Tree.IParseTree p = term;
string dir = System.IO.Path.GetDirectoryName(pd.Item.FullPath);
pd.Attributes.TryGetValue(p, out IList<CombinedScopeSymbol> list_value);
if (list_value == null)
{
return null;
}
bool first = true;
StringBuilder sb = new StringBuilder();
foreach (CombinedScopeSymbol value in list_value)
{
if (value == null)
{
continue;
}
ISymbol sym = value as ISymbol;
if (sym == null)
{
continue;
}
List<ISymbol> list_of_syms = new List<ISymbol>() { sym };
if (sym is RefSymbol)
{
list_of_syms = sym.resolve();
}
foreach (ISymbol s in list_of_syms)
{
if (! first)
{
sb.AppendLine();
}
first = false;
if (s is TerminalSymbol)
{
sb.Append("Terminal ");
}
else if (s is NonterminalSymbol)
{
sb.Append("Nonterminal ");
}
else
{
continue;
}
string def_file = s.file;
if (def_file == null)
{
continue;
}
var workspace = pd.Item.Workspace;
Workspaces.Document def_document = workspace.FindDocument(def_file);
if (def_document == null)
{
continue;
}
ParsingResults def_pd = ParsingResultsFactory.Create(def_document);
if (def_pd == null)
{
continue;
}
IParseTree fod = def_pd.Attributes.Where(
kvp =>
{
IParseTree key = kvp.Key;
if (!(key is TerminalNodeImpl))
return false;
TerminalNodeImpl t1 = key as TerminalNodeImpl;
IToken s1 = t1.Symbol;
if (s.Token.Contains(s1))
return true;
return false;
})
.Select(kvp => kvp.Key).FirstOrDefault();
if (fod == null)
{
continue;
}
sb.Append("defined in ");
sb.Append(s.file);
sb.AppendLine();
IParseTree node = fod;
for (; node != null; node = node.Parent)
{
if (node is ANTLRv4Parser.LexerRuleSpecContext ||
node is ANTLRv4Parser.ParserRuleSpecContext ||
node is ANTLRv4Parser.TokensSpecContext)
{
break;
}
}
if (node == null)
{
continue;
}
Reconstruct.Doit(sb, node);
}
}
return sb.ToString();
},
(ParsingResults pd, IParseTree t) => // terminal
{
TerminalNodeImpl term = t as TerminalNodeImpl;
if (term == null)
{
return null;
}
Antlr4.Runtime.Tree.IParseTree p = term;
string dir = System.IO.Path.GetDirectoryName(pd.Item.FullPath);
pd.Attributes.TryGetValue(p, out IList<CombinedScopeSymbol> list_value);
if (list_value == null)
{
return null;
}
bool first = true;
StringBuilder sb = new StringBuilder();
foreach (CombinedScopeSymbol value in list_value)
{
if (value == null)
{
continue;
}
ISymbol sym = value as ISymbol;
if (sym == null)
{
continue;
}
List<ISymbol> list_of_syms = new List<ISymbol>() { sym };
if (sym is RefSymbol)
{
list_of_syms = sym.resolve();
}
foreach (ISymbol s in list_of_syms)
{
if (! first)
{
sb.AppendLine();
}
first = false;
if (s is TerminalSymbol)
{
sb.Append("Terminal ");
}
else if (s is NonterminalSymbol)
{
sb.Append("Nonterminal ");
}
else
{
continue;
}
string def_file = s.file;
if (def_file == null)
{
continue;
}
var workspace = pd.Item.Workspace;
Workspaces.Document def_document = workspace.FindDocument(def_file);
if (def_document == null)
{
continue;
}
ParsingResults def_pd = ParsingResultsFactory.Create(def_document);
if (def_pd == null)
{
continue;
}
IParseTree fod = def_pd.Attributes.Where(
kvp =>
{
IParseTree key = kvp.Key;
if (!(key is TerminalNodeImpl))
return false;
TerminalNodeImpl t1 = key as TerminalNodeImpl;
IToken s1 = t1.Symbol;
if (s.Token.Contains(s1))
return true;
return false;
})
.Select(kvp => kvp.Key).FirstOrDefault();
if (fod == null)
{
continue;
}
sb.Append("defined in ");
sb.Append(s.file);
sb.AppendLine();
IParseTree node = fod;
for (; node != null; node = node.Parent)
{
if (node is ANTLRv4Parser.LexerRuleSpecContext ||
node is ANTLRv4Parser.ParserRuleSpecContext ||
node is ANTLRv4Parser.TokensSpecContext)
{
break;
}
}
if (node == null)
{
continue;
}
Reconstruct.Doit(sb, node);
}
}
return sb.ToString();
},
(ParsingResults pd, IParseTree t) => // terminal
{
TerminalNodeImpl term = t as TerminalNodeImpl;
if (term == null)
{
return null;
}
Antlr4.Runtime.Tree.IParseTree p = term;
string dir = System.IO.Path.GetDirectoryName(pd.Item.FullPath);
pd.Attributes.TryGetValue(p, out IList<CombinedScopeSymbol> list_value);
if (list_value == null)
{
return null;
}
bool first = true;
StringBuilder sb = new StringBuilder();
foreach (CombinedScopeSymbol value in list_value)
{
if (value == null)
{
continue;
}
ISymbol sym = value as ISymbol;
if (sym == null)
{
continue;
}
List<ISymbol> list_of_syms = new List<ISymbol>() { sym };
if (sym is RefSymbol)
{
list_of_syms = sym.resolve();
}
foreach (ISymbol s in list_of_syms)
{
if (! first)
{
sb.AppendLine();
}
first = false;
if (s is TerminalSymbol)
{
sb.Append("Terminal ");
}
else if (s is NonterminalSymbol)
{
sb.Append("Nonterminal ");
}
else
{
continue;
}
string def_file = s.file;
if (def_file == null)
{
continue;
}
var workspace = pd.Item.Workspace;
Workspaces.Document def_document = workspace.FindDocument(def_file);
if (def_document == null)
{
continue;
}
ParsingResults def_pd = ParsingResultsFactory.Create(def_document);
if (def_pd == null)
{
continue;
}
IParseTree fod = def_pd.Attributes.Where(
kvp =>
{
IParseTree key = kvp.Key;
if (!(key is TerminalNodeImpl))
return false;
TerminalNodeImpl t1 = key as TerminalNodeImpl;
IToken s1 = t1.Symbol;
if (s.Token.Contains(s1))
return true;
return false;
})
.Select(kvp => kvp.Key).FirstOrDefault();
if (fod == null)
{
continue;
}
sb.Append("defined in ");
sb.Append(s.file);
sb.AppendLine();
IParseTree node = fod;
for (; node != null; node = node.Parent)
{
if (node is ANTLRv4Parser.LexerRuleSpecContext ||
node is ANTLRv4Parser.ParserRuleSpecContext ||
node is ANTLRv4Parser.TokensSpecContext)
{
break;
}
}
if (node == null)
{
continue;
}
Reconstruct.Doit(sb, node);
}
}
return sb.ToString();
},
null, // comment
null, // keyword
null, // literal
null, // Mode
null, // Mode
null, // Channel
null, // Channel
null, // Punctuation
null, // Operator
};
public override int QuietAfter { get; set; } = 0;
public override string StartRule { get; } = "grammarSpec";
private static readonly List<string> _antlr_keywords = new List<string>()
{
"options",
"tokens",
"channels",
"import",
"fragment",
"lexer",
"parser",
"grammar",
"protected",
"public",
"returns",
"locals",
"throws",
"catch",
"finally",
"mode",
"pushMode",
"popMode",
"type",
"skip",
"channel"
};
public enum AntlrClassifications : int
{
ClassificationNonterminalDef = 0,
ClassificationNonterminalRef,
ClassificationTerminalDef,
ClassificationTerminalRef,
ClassificationComment,
ClassificationKeyword,
ClassificationLiteral,
ClassificationModeDef,
ClassificationModeRef,
ClassificationChannelDef,
ClassificationChannelRef,
ClassificationPunctuation,
ClassificationOperator,
}
public override Dictionary<IToken, int> ExtractComments(string code)
{
if (code == null) return null;
var cts = this.TokStream;
int type = (int)AntlrClassifications.ClassificationComment;
Dictionary<IToken, int> new_list = new Dictionary<IToken, int>();
for (int i = 0; i < cts.Index; ++i)
{
IList<IToken> inter = cts.GetHiddenTokensToLeft(i);
if (inter != null)
foreach (IToken token in inter)
{
if (token.Type == ANTLRv4Lexer.BLOCK_COMMENT
|| token.Type == ANTLRv4Lexer.LINE_COMMENT
|| token.Type == ANTLRv4Lexer.DOC_COMMENT)
{
new_list[token] = type;
}
}
}
return new_list;
}
public Dictionary<IParseTree, ISymbol> GetSymbolTable()
{
return new Dictionary<IParseTree, ISymbol>();
}
public override bool IsFileType(string ffn)
{
if (ffn == null)
{
return false;
}
List<string> allowable_suffices = FileExtension.Split(';').ToList<string>();
string suffix = Path.GetExtension(ffn).ToLower();
foreach (string s in allowable_suffices)
{
if (suffix == s)
{
return true;
}
}
return false;
}
public override void Parse(ParsingResults pd, bool bail)
{
string ffn = pd.FullFileName;
string code = pd.Code;
if (ffn == null) return;
if (code == null) return;
this.QuietAfter = pd.QuietAfter;
IParseTree pt = null;
// Set up Antlr to parse input grammar.
byte[] byteArray = Encoding.UTF8.GetBytes(code);
AntlrInputStream ais = new AntlrInputStream(
new StreamReader(
new MemoryStream(byteArray)).ReadToEnd())
{
name = ffn
};
ANTLRv4Lexer lexer = new ANTLRv4Lexer(ais);
CommonTokenStream cts = new CommonTokenStream(lexer);
ANTLRv4Parser parser = new ANTLRv4Parser(cts);
lexer.RemoveErrorListeners();
var lexer_error_listener = new ErrorListener<int>(parser, lexer, pd.QuietAfter);
lexer.AddErrorListener(lexer_error_listener);
parser.RemoveErrorListeners();
var parser_error_listener = new ErrorListener<IToken>(parser, lexer, pd.QuietAfter);
parser.AddErrorListener(parser_error_listener);
BailErrorHandler bail_error_handler = null;
if (bail)
{
bail_error_handler = new BailErrorHandler();
parser.ErrorHandler = bail_error_handler;
}
try
{
pt = parser.grammarSpec();
}
catch (Exception)
{
// Parsing error.
}
if (parser_error_listener.had_error || lexer_error_listener.had_error || (bail_error_handler != null && bail_error_handler.had_error))
System.Console.Error.WriteLine("Error in parse of " + ffn);
else
System.Console.Error.WriteLine("Parse completed of " + ffn);
pd.TokStream = cts;
pd.Parser = parser;
pd.Lexer = lexer;
pd.ParseTree = pt;
Stack<IParseTree> stack = new Stack<IParseTree>();
stack.Push(pt);
while (stack.Any())
{
var x = stack.Pop();
if (!(x is TerminalNodeImpl leaf))
{
var y = x as AttributedParseTreeNode;
if (Object.ReferenceEquals(y, null)) y.ParserDetails = pd;
for (int i = 0; i < x.ChildCount; ++i)
{
var c = x.GetChild(i);
if (c != null) stack.Push(c);
}
}
}
}
public override void Parse(string code,
out CommonTokenStream TokStream,
out Parser Parser,
out Lexer Lexer,
out IParseTree ParseTree)
{
IParseTree pt = null;
// Set up Antlr to parse input grammar.
byte[] byteArray = Encoding.UTF8.GetBytes(code);
AntlrInputStream ais = new AntlrInputStream(
new StreamReader(
new MemoryStream(byteArray)).ReadToEnd());
ANTLRv4Lexer lexer = new ANTLRv4Lexer(ais);
CommonTokenStream cts = new CommonTokenStream(lexer);
ANTLRv4Parser parser = new ANTLRv4Parser(cts);
lexer.RemoveErrorListeners();
var lexer_error_listener = new ErrorListener<int>(parser, lexer, this.QuietAfter);
lexer.AddErrorListener(lexer_error_listener);
parser.RemoveErrorListeners();
var parser_error_listener = new ErrorListener<IToken>(parser, lexer, this.QuietAfter);
parser.AddErrorListener(parser_error_listener);
try
{
pt = parser.grammarSpec();
}
catch (Exception)
{
// Parsing error.
}
TokStream = cts;
Parser = parser;
Lexer = lexer;
ParseTree = pt;
}
public override object Clone()
{
throw new NotImplementedException();
}
public override void GetGrammarBasics()
{
// Gather Imports from grammars.
// Gather InverseImports map.
if (!ParsingResults.InverseImports.ContainsKey(this.FullFileName))
{
ParsingResults.InverseImports.Add(this.FullFileName, new HashSet<string>());
}
if (ParseTree == null) return;
ParseTreeWalker.Default.Walk(new Pass0Listener(this), ParseTree);
var workspace = this.Item.Workspace;
foreach (KeyValuePair<string, HashSet<string>> dep in ParsingResults.InverseImports)
{
string name = dep.Key;
Workspaces.Document x = workspace.FindDocument(name);
if (x == null)
{
// Add document.
Workspaces.Container proj = Item.Parent;
Workspaces.Document new_doc = new Workspaces.Document(name);
proj.AddChild(new_doc);
}
}
}
public class Pass0Listener : ANTLRv4ParserBaseListener
{
private readonly ParsingResults _pd;
private bool saw_tokenVocab_option = false;
private enum GrammarType
{
Combined,
Parser,
Lexer
}
private GrammarType Type;
public Pass0Listener(ParsingResults pd)
{
_pd = pd;
if (!ParsingResults.InverseImports.ContainsKey(_pd.FullFileName))
{
ParsingResults.InverseImports.Add(_pd.FullFileName, new HashSet<string>());
}
}
public override void EnterGrammarType([NotNull] ANTLRv4Parser.GrammarTypeContext context)
{
if (context.GetChild(0).GetText() == "parser")
{
Type = GrammarType.Parser;
}
else if (context.GetChild(0).GetText() == "lexer")
{
Type = GrammarType.Lexer;
}
else
{
Type = GrammarType.Combined;
}
}
public override void EnterOption([NotNull] ANTLRv4Parser.OptionContext context)
{
if (context.ChildCount < 3)
{
return;
}
if (context.GetChild(0) == null)
{
return;
}
if (context.GetChild(0).GetText() != "tokenVocab")
{
return;
}
string dep_grammar = context.GetChild(2).GetText();
string file = _pd.Item.FullPath;
string dir = System.IO.Path.GetDirectoryName(file);
string dep = dir + System.IO.Path.DirectorySeparatorChar + dep_grammar + ".g4";
dep = Workspaces.Util.GetProperFilePathCapitalization(dep);
if (dep == null)
{
return;
}
_pd.Imports.Add(dep);
if (!ParsingResults.InverseImports.ContainsKey(dep))
{
ParsingResults.InverseImports.Add(dep, new HashSet<string>());
}
bool found = false;
foreach (string f in ParsingResults.InverseImports[dep])
{
if (f == file)
{
found = true;
break;
}
}
if (!found)
{
ParsingResults.InverseImports[dep].Add(file);
}
saw_tokenVocab_option = true;
}
public override void EnterDelegateGrammar([NotNull] ANTLRv4Parser.DelegateGrammarContext context)
{
if (context.ChildCount < 1)
{
return;
}
if (context.GetChild(0) == null)
{
return;
}
string dep_grammar = context.GetChild(0).GetText();
string file = _pd.Item.FullPath;
string dir = System.IO.Path.GetDirectoryName(file);
string dep = dir + System.IO.Path.DirectorySeparatorChar + dep_grammar + ".g4";
dep = Workspaces.Util.GetProperFilePathCapitalization(dep);
if (dep == null)
{
return;
}
_pd.Imports.Add(dep);
if (!ParsingResults.InverseImports.ContainsKey(dep))
{
ParsingResults.InverseImports.Add(dep, new HashSet<string>());
}
bool found = false;
foreach (string f in ParsingResults.InverseImports[dep])
{
if (f == file)
{
found = true;
break;
}
}
if (!found)
{
ParsingResults.InverseImports[dep].Add(file);
}
}
public override void EnterRules([NotNull] ANTLRv4Parser.RulesContext context)
{
if (saw_tokenVocab_option)
{
return;
}
if (Type == GrammarType.Lexer)
{
string file = _pd.Item.FullPath;
string dep = file.Replace("Lexer.g4", "Parser.g4");
if (dep == file)
{
// If the file is not named correctly so that it ends in Parser.g4,
// then it's probably a mistake. I don't know where to get the lexer
// grammar.
return;
}
if (!ParsingResults.InverseImports.ContainsKey(dep))
{
ParsingResults.InverseImports.Add(dep, new HashSet<string>());
}
bool found = false;
foreach (string f in ParsingResults.InverseImports[dep])
{
if (f == file)
{
found = true;
break;
}
}
if (!found)
{
ParsingResults.InverseImports[file].Add(dep);
}
}
if (Type == GrammarType.Parser)
{
// It's a parser grammar, but we didn't see the tokenVocab option for the lexer.
// We must assume a lexer grammar in this directory.
// BUT!!!! There could be many things wrong here, so just don't do this willy nilly.
string file = _pd.Item.FullPath;
string dep = file.Replace("Parser.g4", "Lexer.g4");
if (dep == file)
{
// If the file is not named correctly so that it ends in Parser.g4,
// then it's probably a mistake. I don't know where to get the lexer
// grammar.
return;
}
string dir = System.IO.Path.GetDirectoryName(file);
_pd.Imports.Add(dep);
if (!ParsingResults.InverseImports.ContainsKey(dep))
{
ParsingResults.InverseImports.Add(dep, new HashSet<string>());
}
bool found = false;
foreach (string f in ParsingResults.InverseImports[dep])
{
if (f == file)
{
found = true;
break;
}
}
if (!found)
{
ParsingResults.InverseImports[dep].Add(file);
}
}
}
}
public class Pass2Listener : ANTLRv4ParserBaseListener
{
private readonly ParsingResults _pd;
public Pass2Listener(ParsingResults pd)
{
_pd = pd;
}
public IParseTree NearestScope(IParseTree node)
{
for (; node != null; node = node.Parent)
{
_pd.Attributes.TryGetValue(node, out IList<CombinedScopeSymbol> list);
if (list != null)
{
if (list.Count == 1 && list[0] is IScope)
{
return node;
}
}
}
return null;
}
public IScope GetScope(IParseTree node)
{
if (node == null)
{
return null;
}
_pd.Attributes.TryGetValue(node, out IList<CombinedScopeSymbol> list);
if (list != null)
{
if (list.Count == 1 && list[0] is IScope)
{
return list[0] as IScope;
}
}
return null;
}
public override void EnterGrammarSpec([NotNull] ANTLRv4Parser.GrammarSpecContext context)
{
_pd.Attributes[context] = new List<CombinedScopeSymbol>() { (CombinedScopeSymbol)_pd.RootScope };
}
public override void EnterParserRuleSpec([NotNull] ANTLRv4Parser.ParserRuleSpecContext context)
{
int i;
for (i = 0; i < context.ChildCount; ++i)
{
if (!(context.GetChild(i) is TerminalNodeImpl))
{
continue;
}
TerminalNodeImpl c = context.GetChild(i) as TerminalNodeImpl;
if (c.Symbol.Type == ANTLRv4Lexer.RULE_REF)
{
break;
}
}
if (i == context.ChildCount)
{
return;
}
TerminalNodeImpl rule_ref = context.GetChild(i) as TerminalNodeImpl;
string id = rule_ref.GetText();
ISymbol sym = new NonterminalSymbol(id, new List<IToken>() { rule_ref.Symbol });
_pd.RootScope.define(ref sym);
CombinedScopeSymbol s = (CombinedScopeSymbol)sym;
_pd.Attributes[context] = new List<CombinedScopeSymbol>() { s };
_pd.Attributes[context.GetChild(i)] = new List<CombinedScopeSymbol>() { s };
}
public override void EnterLexerRuleSpec([NotNull] ANTLRv4Parser.LexerRuleSpecContext context)
{
int i;
for (i = 0; i < context.ChildCount; ++i)
{
if (!(context.GetChild(i) is TerminalNodeImpl))
{
continue;
}
TerminalNodeImpl c = context.GetChild(i) as TerminalNodeImpl;
if (c.Symbol.Type == ANTLRv4Lexer.TOKEN_REF)
{
break;
}
}
if (i == context.ChildCount)
{
return;
}
TerminalNodeImpl token_ref = context.GetChild(i) as TerminalNodeImpl;
string id = token_ref.GetText();
ISymbol sym = new TerminalSymbol(id, new List<IToken>() { token_ref.Symbol });
_pd.RootScope.define(ref sym);
CombinedScopeSymbol s = (CombinedScopeSymbol)sym;
_pd.Attributes[context] = new List<CombinedScopeSymbol>() { s };
_pd.Attributes[context.GetChild(i)] = new List<CombinedScopeSymbol>() { s };
}
public override void EnterIdentifier([NotNull] ANTLRv4Parser.IdentifierContext context)
{
if (context.Parent is ANTLRv4Parser.ModeSpecContext)
{
TerminalNodeImpl term = context.GetChild(0) as TerminalNodeImpl;
string id = term.GetText();
ISymbol sym = new ModeSymbol(id, new List<IToken>() { term.Symbol });
_pd.RootScope.define(ref sym);
CombinedScopeSymbol s = (CombinedScopeSymbol)sym;
_pd.Attributes[context] = new List<CombinedScopeSymbol>() { s };
_pd.Attributes[context.GetChild(0)] = new List<CombinedScopeSymbol>() { s };
}
else if (context.Parent is ANTLRv4Parser.IdListContext && context.Parent?.Parent is ANTLRv4Parser.ChannelsSpecContext)
{
TerminalNodeImpl term = context.GetChild(0) as TerminalNodeImpl;
string id = term.GetText();
ISymbol sym = new ChannelSymbol(id, new List<IToken>() { term.Symbol });
_pd.RootScope.define(ref sym);
CombinedScopeSymbol s = (CombinedScopeSymbol)sym;
_pd.Attributes[context] = new List<CombinedScopeSymbol>() { s };
_pd.Attributes[term] = new List<CombinedScopeSymbol>() { s };
}
else
{
var p = context.Parent;
var add_def = false;
for (; p != null; p = p.Parent)
{
if (p is ANTLRv4Parser.TokensSpecContext)
{
add_def = true;
break;
}
}
if (add_def)
{
TerminalNodeImpl term = context.GetChild(0) as TerminalNodeImpl;
string id = term.GetText();
ISymbol sym = new TerminalSymbol(id, new List<IToken>() { term.Symbol });
_pd.RootScope.define(ref sym);
CombinedScopeSymbol s = (CombinedScopeSymbol)sym;
_pd.Attributes[context] = new List<CombinedScopeSymbol>() { s };
_pd.Attributes[term] = new List<CombinedScopeSymbol>() { s };
}
}
}
}
public class Pass3Listener : ANTLRv4ParserBaseListener
{
private readonly ParsingResults _pd;
public Pass3Listener(ParsingResults pd)
{
_pd = pd;
}
public override void EnterTerminal([NotNull] ANTLRv4Parser.TerminalContext context)
{
if (context.TOKEN_REF() != null)
{
string id = context.TOKEN_REF().GetText();
List<ISymbol> list = _pd.RootScope.LookupType(id).ToList();
if (!list.Any())
{
ISymbol sym = new TerminalSymbol(id, new List<IToken>() { context.TOKEN_REF().Symbol });
_pd.RootScope.define(ref sym);
list = _pd.RootScope.LookupType(id).ToList();
}
List<CombinedScopeSymbol> new_attrs = new List<CombinedScopeSymbol>();
CombinedScopeSymbol s = new RefSymbol(new List<IToken>() { context.TOKEN_REF().Symbol }, list);
new_attrs.Add(s);
_pd.Attributes[context.TOKEN_REF()] = new_attrs;
}
}
public override void EnterRuleref([NotNull] ANTLRv4Parser.RulerefContext context)
{
TerminalNodeImpl first = context.RULE_REF() as TerminalNodeImpl;
string id = first.GetText();
List<ISymbol> list = _pd.RootScope.LookupType(id).ToList();
if (!list.Any())
{
ISymbol sym = new NonterminalSymbol(id, new List<IToken>() { first.Symbol });
_pd.RootScope.define(ref sym);
list = _pd.RootScope.LookupType(id).ToList();
}
List<CombinedScopeSymbol> new_attrs = new List<CombinedScopeSymbol>();
CombinedScopeSymbol s = new RefSymbol(new List<IToken>() { first.Symbol }, list);
new_attrs.Add(s);
_pd.Attributes[first] = new_attrs;
}
public override void EnterIdentifier([NotNull] ANTLRv4Parser.IdentifierContext context)
{
if (context.Parent is ANTLRv4Parser.LexerCommandExprContext && context.Parent.Parent is ANTLRv4Parser.LexerCommandContext)
{
ANTLRv4Parser.LexerCommandContext lc = context.Parent.Parent as ANTLRv4Parser.LexerCommandContext;
if (lc.GetChild(0)?.GetChild(0)?.GetText() == "pushMode")
{
TerminalNodeImpl term = context.GetChild(0) as TerminalNodeImpl;
string id = term.GetText();
List<ISymbol> sym_list = _pd.RootScope.LookupType(id).ToList();
if (!sym_list.Any())
{
ISymbol sym = new ModeSymbol(id, null);
_pd.RootScope.define(ref sym);
sym_list = _pd.RootScope.LookupType(id).ToList();
}
List<CombinedScopeSymbol> ref_list = new List<CombinedScopeSymbol>();
CombinedScopeSymbol s = new RefSymbol(new List<IToken>() { term.Symbol }, sym_list);
ref_list.Add(s);
_pd.Attributes[context] = ref_list;
_pd.Attributes[context.GetChild(0)] = ref_list;
}
else if (lc.GetChild(0)?.GetChild(0)?.GetText() == "channel")
{
TerminalNodeImpl term = context.GetChild(0) as TerminalNodeImpl;
string id = term.GetText();
List<ISymbol> sym_list = _pd.RootScope.LookupType(id).ToList();
if (!sym_list.Any())
{
ISymbol sym = new ChannelSymbol(id, null);
_pd.RootScope.define(ref sym);
sym_list = _pd.RootScope.LookupType(id).ToList();
}
List<CombinedScopeSymbol> ref_list = new List<CombinedScopeSymbol>();
CombinedScopeSymbol s = new RefSymbol(new List<IToken>() { term.Symbol }, sym_list);
ref_list.Add(s);
_pd.Attributes[context] = ref_list;
_pd.Attributes[context.GetChild(0)] = ref_list;
}
else if (lc.GetChild(0)?.GetChild(0)?.GetText() == "type")
{
TerminalNodeImpl term = context.GetChild(0) as TerminalNodeImpl;
string id = term.GetText();
List<ISymbol> sym_list = _pd.RootScope.LookupType(id).ToList();
if (!sym_list.Any())
{
ISymbol sym = new TerminalSymbol(id, null);
_pd.RootScope.define(ref sym);
sym_list = _pd.RootScope.LookupType(id).ToList();
}
List<CombinedScopeSymbol> ref_list = new List<CombinedScopeSymbol>();
CombinedScopeSymbol s = new RefSymbol(new List<IToken>() { term.Symbol }, sym_list);
ref_list.Add(s);
_pd.Attributes[context] = ref_list;
_pd.Attributes[context.GetChild(0)] = ref_list;
}
}
}
}
}
}
| 39.669744 | 146 | 0.407036 | [
"MIT"
] | kaby76/AntlrVSIX | LanguageServer/Antlr4ParsingResults.cs | 55,857 | C# |
using Microsoft.OpenApi.Any;
using Microsoft.OpenApi.Models;
using Qualm.AspNetCore.Swagger.Extensions;
using Swashbuckle.AspNetCore.SwaggerGen;
namespace Qualm.AspNetCore.Swagger
{
public class EnumParameterFilter : IParameterFilter
{
public void Apply(OpenApiParameter parameter, ParameterFilterContext context)
{
var type = context.ApiParameterDescription.Type;
if (type.IsEnum(out var enumName))
parameter.Extensions.Add("x-ms-enum", new OpenApiObject()
{
{ "name", new OpenApiString(enumName ?? type.Name) },
{ "modelAsString", new OpenApiBoolean(false) }
});
}
}
}
| 31.391304 | 85 | 0.627424 | [
"MIT"
] | Cyberkruz/qualm | src/Qualm.AspNetCore.Swagger/EnumParameterFilter.cs | 724 | C# |
using System;
using System.Collections.Generic;
using Horizon.Payment.Alipay.Domain;
using Horizon.Payment.Alipay.Response;
using Horizon.Payment.Alipay.Utility;
namespace Horizon.Payment.Alipay.Request
{
/// <summary>
/// alipay.open.agent.zhimabrief.sign
/// </summary>
public class AlipayOpenAgentZhimabriefSignRequest : IAlipayUploadRequest<AlipayOpenAgentZhimabriefSignResponse>
{
/// <summary>
/// 支付宝生活号(原服务窗)名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
/// </summary>
public string AlipayLifeName { get; set; }
/// <summary>
/// APP demo,格式为.apk;或者应用说明文档, 格式为.doc .docx .pdf格式(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
/// </summary>
public FileItem AppDemo { get; set; }
/// <summary>
/// 商户的APP应用名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
/// </summary>
public string AppName { get; set; }
/// <summary>
/// 代商户操作事务编号,通过alipay.open.isv.agent.create接口进行创建。
/// </summary>
public string BatchNo { get; set; }
/// <summary>
/// 营业执照授权函图片,个体工商户如果使用总公司或其他公司的营业执照认证需上传该授权函图片,最小5KB,图片格式必须为:png、bmp、gif、jpg、jpeg
/// </summary>
public FileItem BusinessLicenseAuthPic { get; set; }
/// <summary>
/// 营业执照号码。
/// </summary>
public string BusinessLicenseNo { get; set; }
/// <summary>
/// 营业执照图片,最小5KB,图片格式必须为:png、bmp、gif、jpg、jpeg
/// </summary>
public FileItem BusinessLicensePic { get; set; }
/// <summary>
/// 自定义使用场景描述,usage_scene选项中无符合描述,填写自定义使用场景描述(usage_scene不填写,则custom_usage_scene必填)
/// </summary>
public string CustomUsageScene { get; set; }
/// <summary>
/// 营业期限
/// </summary>
public string DateLimitation { get; set; }
/// <summary>
/// 数据反馈接口人
/// </summary>
public ContactModel DrContact { get; set; }
/// <summary>
/// 例如:浙江飞猪网络技术有限公司,企业别称请填写【飞猪】。
/// </summary>
public string EnterpriseAlias { get; set; }
/// <summary>
/// 企业LOGO-图片,最小5KB,图片格式必须为:png、bmp、gif、jpg、jpeg
/// </summary>
public FileItem EnterpriseLogo { get; set; }
/// <summary>
/// 营业期限是否长期有效
/// </summary>
public Nullable<bool> LongTerm { get; set; }
/// <summary>
/// 所属MCCCode,详情可参考 <a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1 ">商家经营类目</a> 中的“经营类目编码”
/// </summary>
public string MccCode { get; set; }
/// <summary>
/// 异议处理接口人
/// </summary>
public ContactModel OhContact { get; set; }
/// <summary>
/// 用户服务联动机制接口人
/// </summary>
public ContactModel PrContact { get; set; }
/// <summary>
/// 企业特殊资质图片,可参考 <a href="https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.59bgD2&treeId=222&articleId=105364&docType=1#s1 ">商家经营类目</a> 中的“需要的特殊资质证书”,最小5KB,图片格式必须为:png、bmp、gif、jpg、jpeg
/// </summary>
public FileItem SpecialLicensePic { get; set; }
/// <summary>
/// 使用场景描述,签约芝麻信用产品的用途,可选值:"现金放贷","其他", "消费分期(例如买房、装修等)", "融资租赁", "发放信用卡", "极速返利", "押金减免", "先用后付", "社交场景信用互查", "会员分层信用参考"
/// </summary>
public List<string> UsageScene { get; set; }
/// <summary>
/// 接入网址信息(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
/// </summary>
public List<string> WebSites { get; set; }
/// <summary>
/// 微信公众号名称(1 app_name、app_demo;2 web_sites;3 alipay_life_name;4 wechat_official_account_name。1、2、3、4至少选择一个填写)
/// </summary>
public string WechatOfficialAccountName { 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 void SetApiVersion(string apiVersion)
{
this.apiVersion = apiVersion;
}
public string GetApiVersion()
{
return apiVersion;
}
public string GetApiName()
{
return "alipay.open.agent.zhimabrief.sign";
}
public IDictionary<string, string> GetParameters()
{
var parameters = new AlipayDictionary
{
{ "alipay_life_name", AlipayLifeName },
{ "app_name", AppName },
{ "batch_no", BatchNo },
{ "business_license_no", BusinessLicenseNo },
{ "custom_usage_scene", CustomUsageScene },
{ "date_limitation", DateLimitation },
{ "dr_contact", DrContact },
{ "enterprise_alias", EnterpriseAlias },
{ "long_term", LongTerm },
{ "mcc_code", MccCode },
{ "oh_contact", OhContact },
{ "pr_contact", PrContact },
{ "usage_scene", UsageScene },
{ "web_sites", WebSites },
{ "wechat_official_account_name", WechatOfficialAccountName }
};
return parameters;
}
public AlipayObject GetBizModel()
{
return bizModel;
}
public void SetBizModel(AlipayObject bizModel)
{
this.bizModel = bizModel;
}
#endregion
#region IAlipayUploadRequest Members
public IDictionary<string, FileItem> GetFileParameters()
{
IDictionary<string, FileItem> parameters = new Dictionary<string, FileItem>
{
{ "app_demo", AppDemo },
{ "business_license_auth_pic", BusinessLicenseAuthPic },
{ "business_license_pic", BusinessLicensePic },
{ "enterprise_logo", EnterpriseLogo },
{ "special_license_pic", SpecialLicensePic }
};
return parameters;
}
#endregion
}
}
| 30.409449 | 211 | 0.561756 | [
"Apache-2.0"
] | bluexray/Horizon.Sample | Horizon.Payment.Alipay/Request/AlipayOpenAgentZhimabriefSignRequest.cs | 8,770 | C# |
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ODBII.Simulator")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ODBII.Simulator")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 39.928571 | 96 | 0.754472 | [
"MIT"
] | alex-doe/obdii-dashboard | OBDIIDashboard/ODBII.Simulator/Properties/AssemblyInfo.cs | 2,239 | C# |
using System;
using System.Net;
namespace Microsoft.VisualStudio.Services.Agent.Listener.Diagnostics
{
class DnsTest : IDiagnosticTest
{
public bool Execute(ITerminal terminal)
{
try
{
IPHostEntry host = Dns.GetHostEntry(c_hostname);
terminal.WriteLine(string.Format("GetHostEntry: {0} returns:", c_hostname));
foreach (IPAddress address in host.AddressList)
{
terminal.WriteLine($" {address}");
}
return true;
}
catch (Exception ex)
{
terminal.WriteError(ex);
return false;
}
}
private const string c_hostname = "www.bing.com";
}
}
| 25.935484 | 92 | 0.508706 | [
"MIT"
] | 50Wliu/azure-pipelines-agent | src/Agent.Listener/Diagnostics/DnsTest.cs | 806 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DotNetBay.Data.EF")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DotNetBay.Data.EF")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("95c884a6-9236-4294-9298-1df51f21b2e0")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 38.027027 | 84 | 0.744136 | [
"MIT"
] | FHNW-dnead/dotnetbay-hs18 | source/DotNetBay.Data.EF/Properties/AssemblyInfo.cs | 1,410 | C# |
// ----------------------------------------------------------------------------------
// <copyright file="DefaultLockFactory.cs" company="NMemory Team">
// Copyright (C) NMemory Team
//
// 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.
// </copyright>
// ----------------------------------------------------------------------------------
namespace NMemory.Concurrency.Locks
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class DefaultLockFactory : ILockFactory
{
public ILock CreateLock()
{
return new UncheckedReaderWriterLock();
}
}
}
| 44.425 | 87 | 0.621835 | [
"MIT"
] | CedricDumont/NMemory.Next | Main/Source/NMemory/Concurrency/Locks/DefaultLockFactory.cs | 1,779 | C# |
/********************************************************************
The Multiverse Platform is made available under the MIT License.
Copyright (c) 2012 The Multiverse Foundation
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.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AssetImporter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AssetImporter")]
[assembly: AssemblyCopyright("Copyright © 2006")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a113ee7d-d9fa-43e7-b5bb-224fa1e9a409")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("0.6.0.0")]
[assembly: AssemblyFileVersion("0.6.0.0")]
| 40.806452 | 84 | 0.73004 | [
"MIT"
] | dmacka/MultiverseClientServer | Tools/AssetImporter/Properties/AssemblyInfo.cs | 2,531 | 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.Models.Api20210210
{
using static Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Extensions;
/// <summary>Renew Certificate input properties.</summary>
public partial class RenewCertificateInputProperties
{
/// <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.Migrate.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.Migrate.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.Migrate.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.Migrate.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.Migrate.Runtime.Json.JsonObject container, ref bool returnNow);
/// <summary>
/// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IRenewCertificateInputProperties.
/// </summary>
/// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode" /> to deserialize from.</param>
/// <returns>
/// an instance of Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IRenewCertificateInputProperties.
/// </returns>
public static Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210210.IRenewCertificateInputProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode node)
{
return node is Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject json ? new RenewCertificateInputProperties(json) : null;
}
/// <summary>
/// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject into a new instance of <see cref="RenewCertificateInputProperties" />.
/// </summary>
/// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject instance to deserialize from.</param>
internal RenewCertificateInputProperties(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject json)
{
bool returnNow = false;
BeforeFromJson(json, ref returnNow);
if (returnNow)
{
return;
}
{_renewCertificateType = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString>("renewCertificateType"), out var __jsonRenewCertificateType) ? (string)__jsonRenewCertificateType : (string)RenewCertificateType;}
AfterFromJson(json);
}
/// <summary>
/// Serializes this instance of <see cref="RenewCertificateInputProperties" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode" />.
/// </summary>
/// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.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.Migrate.Runtime.SerializationMode"/>.</param>
/// <returns>
/// a serialized instance of <see cref="RenewCertificateInputProperties" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode" />.
/// </returns>
public Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.SerializationMode serializationMode)
{
container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonObject();
bool returnNow = false;
BeforeToJson(ref container, ref returnNow);
if (returnNow)
{
return container;
}
AddIf( null != (((object)this._renewCertificateType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Migrate.Runtime.Json.JsonString(this._renewCertificateType.ToString()) : null, "renewCertificateType" ,container.Add );
AfterToJson(ref container);
return container;
}
}
} | 67.773585 | 306 | 0.693207 | [
"MIT"
] | Agazoth/azure-powershell | src/Migrate/generated/api/Models/Api20210210/RenewCertificateInputProperties.json.cs | 7,079 | C# |
//
// Copyright 2018-2020 Dynatrace 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 Dynatrace.OpenKit.Protocol
{
public interface IHttpClient
{
/// <summary>
/// Sends a status request and returns a status response
/// </summary>
/// <param name="additionalParameters">
/// additional parameters that will be send with the beacon request (can be <code>null</code>.
/// </param>
/// <returns></returns>
IStatusResponse SendStatusRequest(IAdditionalQueryParameters additionalParameters);
/// <summary>
/// Sends a beacon send request and returns a status response
/// </summary>
/// <param name="clientIpAddress"></param>
/// <param name="data"></param>
/// <param name="additionalParameters">
/// additional parameters that will be send with the beacon request (can be <code>null</code>.
/// </param>
/// <returns></returns>
IStatusResponse SendBeaconRequest(string clientIpAddress, byte[] data,
IAdditionalQueryParameters additionalParameters);
/// <summary>
/// Sends a special status request for a new session.
/// </summary>
/// <param name="additionalParameters">
/// additional parameters that will be send with the beacon request (can be <code>null</code>.
/// </param>
/// <returns>Returns the status response.</returns>
IStatusResponse SendNewSessionRequest(IAdditionalQueryParameters additionalParameters);
}
}
| 40.288462 | 106 | 0.65537 | [
"Apache-2.0"
] | stefaneberl/openkit-dotnet | src/Dynatrace.OpenKit/Protocol/IHttpClient.cs | 2,097 | C# |
// Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Roslynator.CSharp.CodeFixes;
using Roslynator.Testing.CSharp;
using Xunit;
namespace Roslynator.CSharp.Analysis.Tests
{
public class RCS1143SimplifyCoalesceExpressionTests : AbstractCSharpDiagnosticVerifier<SimplifyCoalesceExpressionAnalyzer, BinaryExpressionCodeFixProvider>
{
public override DiagnosticDescriptor Descriptor { get; } = DiagnosticRules.SimplifyCoalesceExpression;
[Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.SimplifyCoalesceExpression)]
public async Task Test_DefaultOfNullableType()
{
await VerifyDiagnosticAndFixAsync(@"
class C
{
void M()
{
C x = null;
int? y = x?.M2() [|?? default(int?)|];
}
int M2() => default;
}
", @"
class C
{
void M()
{
C x = null;
int? y = x?.M2();
}
int M2() => default;
}
");
}
}
}
| 23.891304 | 160 | 0.674249 | [
"Apache-2.0"
] | JosefPihrt/Roslynator | src/Tests/Analyzers.Tests/RCS1143SimplifyCoalesceExpressionTests.cs | 1,101 | C# |
using Microsoft.EntityFrameworkCore;
using SmartSchool.WebAPI.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SmartSchool.WebAPI.Data
{
public class SmartContext : DbContext
{
public SmartContext(DbContextOptions<SmartContext> options) : base(options) { }
public DbSet<Aluno> Alunos { get; set; }
public DbSet<AlunoCurso> AlunosCursos { get; set; }
public DbSet<AlunoDisciplina> AlunosDisciplinas { get; set; }
public DbSet<Curso> Cursos { get; set; }
public DbSet<Disciplina> Disciplinas { get; set; }
public DbSet<Professor> Professores { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<AlunoDisciplina>()
.HasKey(AD => new { AD.AlunoId, AD.DisciplinaId });
modelBuilder.Entity<AlunoCurso>()
.HasKey(AD => new { AD.AlunoId, AD.CursoId });
modelBuilder.Entity<Professor>()
.HasData(new List<Professor>(){
new Professor(1, 1, "Lauro", "Oliveira"),
new Professor(2, 2, "Roberto", "Soares"),
new Professor(3, 3, "Ronaldo", "Marconi"),
new Professor(4, 4, "Rodrigo", "Carvalho"),
new Professor(5, 5, "Alexandre", "Montanha"),
});
modelBuilder.Entity<Curso>()
.HasData(new List<Curso>{
new Curso(1, "Tecnologia da Informação"),
new Curso(2, "Sistemas de Informação"),
new Curso(3, "Ciência da Computação")
});
modelBuilder.Entity<Disciplina>()
.HasData(new List<Disciplina>{
new Disciplina(1, "Matemática", 1, 1),
new Disciplina(2, "Matemática", 1, 3),
new Disciplina(3, "Física", 2, 3),
new Disciplina(4, "Português", 3, 1),
new Disciplina(5, "Inglês", 4, 1),
new Disciplina(6, "Inglês", 4, 2),
new Disciplina(7, "Inglês", 4, 3),
new Disciplina(8, "Programação", 5, 1),
new Disciplina(9, "Programação", 5, 2),
new Disciplina(10, "Programação", 5, 3)
});
modelBuilder.Entity<Aluno>()
.HasData(new List<Aluno>(){
new Aluno(1, 1, "Marta", "Kent", "33225555", DateTime.Parse("05/05/2005")),
new Aluno(2, 2, "Paula", "Isabela", "3354288", DateTime.Parse("05/05/2005")),
new Aluno(3, 3, "Laura", "Antonia", "55668899", DateTime.Parse("05/05/2005")),
new Aluno(4, 4, "Luiza", "Maria", "6565659", DateTime.Parse("05/05/2005")),
new Aluno(5, 5, "Lucas", "Machado", "565685415", DateTime.Parse("05/05/2005")),
new Aluno(6, 6, "Pedro", "Alvares", "456454545", DateTime.Parse("05/05/2005")),
new Aluno(7, 7, "Paulo", "José", "9874512", DateTime.Parse("05/05/2005"))
});
modelBuilder.Entity<AlunoDisciplina>()
.HasData(new List<AlunoDisciplina>() {
new AlunoDisciplina() {AlunoId = 1, DisciplinaId = 2 },
new AlunoDisciplina() {AlunoId = 1, DisciplinaId = 4 },
new AlunoDisciplina() {AlunoId = 1, DisciplinaId = 5 },
new AlunoDisciplina() {AlunoId = 2, DisciplinaId = 1 },
new AlunoDisciplina() {AlunoId = 2, DisciplinaId = 2 },
new AlunoDisciplina() {AlunoId = 2, DisciplinaId = 5 },
new AlunoDisciplina() {AlunoId = 3, DisciplinaId = 1 },
new AlunoDisciplina() {AlunoId = 3, DisciplinaId = 2 },
new AlunoDisciplina() {AlunoId = 3, DisciplinaId = 3 },
new AlunoDisciplina() {AlunoId = 4, DisciplinaId = 1 },
new AlunoDisciplina() {AlunoId = 4, DisciplinaId = 4 },
new AlunoDisciplina() {AlunoId = 4, DisciplinaId = 5 },
new AlunoDisciplina() {AlunoId = 5, DisciplinaId = 4 },
new AlunoDisciplina() {AlunoId = 5, DisciplinaId = 5 },
new AlunoDisciplina() {AlunoId = 6, DisciplinaId = 1 },
new AlunoDisciplina() {AlunoId = 6, DisciplinaId = 2 },
new AlunoDisciplina() {AlunoId = 6, DisciplinaId = 3 },
new AlunoDisciplina() {AlunoId = 6, DisciplinaId = 4 },
new AlunoDisciplina() {AlunoId = 7, DisciplinaId = 1 },
new AlunoDisciplina() {AlunoId = 7, DisciplinaId = 2 },
new AlunoDisciplina() {AlunoId = 7, DisciplinaId = 3 },
new AlunoDisciplina() {AlunoId = 7, DisciplinaId = 4 },
new AlunoDisciplina() {AlunoId = 7, DisciplinaId = 5 }
});
}
}
}
| 51.989796 | 99 | 0.518155 | [
"MIT"
] | cristianoandrad/SmartSchoolCode | SmartSchool.WebAPI/Data/SmartContext.cs | 5,118 | C# |
using Godot;
using System;
public class Fletcher : Building
{
static public new int GoldCost = 0;
static public new int WoodCost = 15;
static public new int PitchCost = 0;
static public new int StoneCost = 0;
static public new string Resource = "res://Scenes/Building/Military/Fletcher.tscn";
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
base._Ready();
}
// // Called every frame. 'delta' is the elapsed time since the previous frame.
// public override void _Process(float delta)
// {
//
// }
}
| 25.25 | 87 | 0.665017 | [
"MIT"
] | lordee/FreeHold | Scripts/Building/Military/Fletcher.cs | 606 | C# |
//
// System.SerializableAttribute.cs
//
// Author:
// Miguel de Icaza (miguel@ximian.com)
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// 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.Runtime.InteropServices;
namespace System
{
/// <summary>
/// Serialization Attribute for classes.
/// </summary>
/// <remarks>
/// Use SerializableAttribute to mark classes that do not implement
/// the ISerializable interface but that want to be serialized.
///
/// Failing to do so will cause the system to throw an exception.
///
/// When a class is market with the SerializableAttribute, all the
/// fields are automatically serialized with the exception of those
/// that are tagged with the NonSerializedAttribute.
///
/// SerializableAttribute should only be used for classes that contain
/// simple data types that can be serialized and deserialized by the
/// runtime (typically you would use NonSerializedAttribute on data
/// that can be reconstructed at any point: like caches or precomputed
/// tables).
/// </remarks>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct
| AttributeTargets.Enum | AttributeTargets.Delegate,
Inherited=false, AllowMultiple=false)]
[ComVisible (true)]
public sealed class SerializableAttribute : Attribute
{
}
}
| 37.384615 | 73 | 0.735391 | [
"Apache-2.0"
] | CRivlaldo/mono | mcs/class/corlib/System/SerializableAttribute.cs | 2,430 | C# |
using System;
namespace CharlieMaths.Models
{
public class Item
{
public string Id { get; set; }
public string Text { get; set; }
public string Description { get; set; }
}
} | 19.181818 | 47 | 0.587678 | [
"Apache-2.0"
] | Lamothe/CharlieMaths | CharlieMaths/CharlieMaths/Models/Item.cs | 213 | C# |
namespace Lsquared.SmartHome.Zigbee.ZDO
{
public sealed record ComplexDescriptor : IValue
{
// TODO
}
}
| 15.625 | 51 | 0.64 | [
"MIT"
] | LsquaredTechnologies/smarthome-zigbee | src/Zigbee.Abstractions/ZDO/ComplexDescriptor.cs | 127 | C# |
/*
_____ _ ____ _ _
|_ _|_ _ ___| | _| __ )| | ___ ___| | __
| |/ _` / __| |/ / _ \| |/ _ \ / __| |/ /
| | (_| \__ \ <| |_) | | (_) | (__| <
|_|\__,_|___/_|\_\____/|_|\___/ \___|_|\_\
Project started on 19/10/2014
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TaskBlock
{
public partial class aboutForm : Form
{
public aboutForm()
{
InitializeComponent();
}
private void btn_close_Click(object sender, EventArgs e)
{
this.Close();
}
private void aboutForm_Load(object sender, EventArgs e)
{
}
}
}
| 23.1 | 64 | 0.49026 | [
"MIT"
] | pedro-lb/TaskBlock | TaskBlock/aboutForm.cs | 926 | C# |
using AppDigitalCv.Repository.Infraestructure;
using AppDigitalCv.Repository.Infraestructure.Contract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AppDigitalCv.Repository
{
public class AlergiasRepository : BaseRepository<catAlergias>
{
public AlergiasRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}
| 22.894737 | 76 | 0.76092 | [
"MIT"
] | AppDigitalCVU/DigitalCv | AppDigitalCv/AppDigitalCv.Repository/AlergiasRepository.cs | 437 | C# |
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
//
// 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 System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Drawing;
using System.Windows.Forms;
using ICSharpCode.RubyBinding;
using ICSharpCode.Scripting.Tests.Utils;
using NUnit.Framework;
using RubyBinding.Tests.Utils;
namespace RubyBinding.Tests.Designer
{
[TestFixture]
public class GeneratePanelFormTestFixture
{
string generatedRubyCode;
[TestFixtureSetUp]
public void SetUpFixture()
{
using (DesignSurface designSurface = new DesignSurface(typeof(Form))) {
IDesignerHost host = (IDesignerHost)designSurface.GetService(typeof(IDesignerHost));
IEventBindingService eventBindingService = new MockEventBindingService(host);
host.AddService(typeof(IEventBindingService), eventBindingService);
Form form = (Form)host.RootComponent;
form.ClientSize = new Size(284, 264);
PropertyDescriptorCollection descriptors = TypeDescriptor.GetProperties(form);
PropertyDescriptor namePropertyDescriptor = descriptors.Find("Name", false);
namePropertyDescriptor.SetValue(form, "MainForm");
Panel panel = (Panel)host.CreateComponent(typeof(Panel), "panel1");
panel.Location = new Point(10, 15);
panel.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
panel.TabIndex = 0;
panel.Size = new Size(100, 120);
TextBox textBox = (TextBox)host.CreateComponent(typeof(TextBox), "textBox1");
textBox.Location = new Point(5, 5);
textBox.TabIndex = 0;
textBox.Size = new Size(110, 20);
panel.Controls.Add(textBox);
// Add an event handler to the panel to check that this code is generated
// before the text box is initialized.
EventDescriptorCollection events = TypeDescriptor.GetEvents(panel);
EventDescriptor clickEvent = events.Find("Click", false);
PropertyDescriptor clickEventProperty = eventBindingService.GetEventProperty(clickEvent);
clickEventProperty.SetValue(panel, "Panel1Click");
form.Controls.Add(panel);
DesignerSerializationManager serializationManager = new DesignerSerializationManager(host);
using (serializationManager.CreateSession()) {
RubyCodeDomSerializer serializer = new RubyCodeDomSerializer(" ");
generatedRubyCode = serializer.GenerateInitializeComponentMethodBody(host, serializationManager, 1);
}
}
}
[Test]
public void GeneratedCode()
{
string expectedCode =
" @panel1 = System::Windows::Forms::Panel.new()\r\n" +
" @textBox1 = System::Windows::Forms::TextBox.new()\r\n" +
" @panel1.SuspendLayout()\r\n" +
" self.SuspendLayout()\r\n" +
" # \r\n" +
" # panel1\r\n" +
" # \r\n" +
" @panel1.Anchor = System::Windows::Forms::AnchorStyles.Top | System::Windows::Forms::AnchorStyles.Bottom | System::Windows::Forms::AnchorStyles.Left | System::Windows::Forms::AnchorStyles.Right\r\n" +
" @panel1.Controls.Add(@textBox1)\r\n" +
" @panel1.Location = System::Drawing::Point.new(10, 15)\r\n" +
" @panel1.Name = \"panel1\"\r\n" +
" @panel1.Size = System::Drawing::Size.new(100, 120)\r\n" +
" @panel1.TabIndex = 0\r\n" +
" @panel1.Click { |sender, e| self.Panel1Click(sender, e) }\r\n" +
" # \r\n" +
" # textBox1\r\n" +
" # \r\n" +
" @textBox1.Location = System::Drawing::Point.new(5, 5)\r\n" +
" @textBox1.Name = \"textBox1\"\r\n" +
" @textBox1.Size = System::Drawing::Size.new(110, 20)\r\n" +
" @textBox1.TabIndex = 0\r\n" +
" # \r\n" +
" # MainForm\r\n" +
" # \r\n" +
" self.ClientSize = System::Drawing::Size.new(284, 264)\r\n" +
" self.Controls.Add(@panel1)\r\n" +
" self.Name = \"MainForm\"\r\n" +
" @panel1.ResumeLayout(false)\r\n" +
" @panel1.PerformLayout()\r\n" +
" self.ResumeLayout(false)\r\n";
Assert.AreEqual(expectedCode, generatedRubyCode, generatedRubyCode);
}
}
}
| 42.933333 | 208 | 0.692741 | [
"MIT"
] | galich/SharpDevelop | src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Designer/GeneratePanelFormTestFixture.cs | 5,154 | C# |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DocAsCode.Dfm
{
using System.Text.RegularExpressions;
using Microsoft.DocAsCode.MarkdownLite;
public class DfmVideoBlockRule : IMarkdownRule
{
private static readonly Regex _videoRegex = new Regex(@"^ *\[\!Video +(?<link>https?\:\/\/.+?) *\] *(\n|$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
public virtual string Name => "DfmVideoBlock";
public virtual Regex VideoRegex => _videoRegex;
public IMarkdownToken TryMatch(IMarkdownParser parser, IMarkdownParsingContext context)
{
var match = VideoRegex.Match(context.CurrentMarkdown);
if (match.Length == 0)
{
return null;
}
var sourceInfo = context.Consume(match.Length);
// [!Video https://]
var link = match.Groups["link"].Value;
return new DfmVideoBlockToken(this, parser.Context, link, sourceInfo);
}
}
}
| 36.225806 | 166 | 0.635797 | [
"MIT"
] | MorganOBN/KoA-Story | src/Microsoft.DocAsCode.Dfm/Rules/DfmVideoBlockRule.cs | 1,123 | C# |
using System.Threading.Tasks;
using Chat.Domain.Domains;
namespace Chat.Domain.Services.Abstractions
{
public interface IBotService
{
Task ProcessCommandAsync(Message message);
bool IsValidCommand(string content);
Task ProcessCallbackStockAsync(Stock stock);
}
}
| 23.153846 | 52 | 0.727575 | [
"MIT"
] | gomespauloho/chat | src/Chat.Domain/Services/Abstractions/IBotService.cs | 303 | C# |
using System.Collections.Generic;
using PizzaWorld.Domain.Models;
namespace PizzaWorld.Domain.Abstracts
{
public class APizzaModel : AEntity // no longr abstract bc creating a new migration expects concrete classes
{
public string Name { get; set; }
public decimal TypePrice { get; set; }
public Crust Crust { get; set; }
public Size Size { get; set; }
public List<PizzaTopping> PizzaToppings { get; set; }
protected APizzaModel()
{
AddName();
AddTypePrice();
}
public decimal GetTotalPrice()
{
return Crust.Price + Size.Price + TypePrice;
}
public void AddCrust(List<Crust> availCrusts)
{
Crust = availCrusts.Find(c => c.Name == "Regular");
}
public void AddSize(List<Size> availSizes)
{
Size = availSizes.Find(s => s.Name == "Medium");
}
public override string ToString()
{
return Name;
}
protected virtual void AddName() {}
protected virtual void AddTypePrice() {}
public virtual void AddToppings(List<Topping> availableToppings) {}
}
} | 27.613636 | 112 | 0.576132 | [
"MIT"
] | joshwingreene/project-p0 | PizzaWorld.Domain/Abstracts/APizzaModel.cs | 1,215 | C# |
using Microsoft.Maui.Animations;
using Microsoft.Maui.Controls;
namespace Microsoft.Maui.Graphics.Controls
{
public class MaterialEntryDrawable : ViewDrawable<IEntry>, IEntryDrawable
{
const string MaterialEntryIndicatorIcon = "M9.295 7.885C9.68436 8.27436 9.68436 8.90564 9.295 9.295C8.90564 9.68436 8.27436 9.68436 7.885 9.295L5 6.41L2.115 9.295C1.72564 9.68436 1.09436 9.68436 0.705 9.295C0.315639 8.90564 0.315639 8.27436 0.705 7.885L3.59 5L0.705 2.115C0.315639 1.72564 0.31564 1.09436 0.705 0.705C1.09436 0.315639 1.72564 0.315639 2.115 0.705L5 3.59L7.885 0.705C8.27436 0.315639 8.90564 0.31564 9.295 0.705C9.68436 1.09436 9.68436 1.72564 9.295 2.115L6.41 5L9.295 7.885Z";
const float FocusedPlaceholderFontSize = 12f;
const float UnfocusedPlaceholderFontSize = 16f;
const float FocusedPlaceholderPosition = 6f;
const float UnfocusedPlaceholderPosition = 22f;
RectangleF indicatorRect = new RectangleF();
public RectangleF IndicatorRect => indicatorRect;
public bool HasFocus { get; set; }
public double AnimationPercent { get; set; }
public void DrawBackground(ICanvas canvas, RectangleF dirtyRect, IEntry entry)
{
canvas.SaveState();
if (entry.Background != null)
canvas.SetFillPaint(entry.Background, dirtyRect);
else
{
if (Application.Current?.RequestedTheme == OSAppTheme.Light)
canvas.FillColor = entry.IsEnabled ? Material.Color.Light.Gray5.ToColor() : Material.Color.Light.Gray3.ToColor();
else
canvas.FillColor = entry.IsEnabled ? Material.Color.Dark.Gray5.ToColor() : Material.Color.Dark.Gray3.ToColor();
}
const float cornerRadius = 4.0f;
var x = dirtyRect.X;
var y = dirtyRect.Y;
var height = dirtyRect.Height;
var width = dirtyRect.Width;
canvas.FillRoundedRectangle(x, y, width, height, cornerRadius, cornerRadius, 0, 0);
canvas.RestoreState();
}
public void DrawBorder(ICanvas canvas, RectangleF dirtyRect, IEntry entry)
{
canvas.SaveState();
var strokeWidth = 1.0f;
canvas.FillColor = (Application.Current?.RequestedTheme == OSAppTheme.Light) ? Material.Color.Black.ToColor() : Material.Color.Light.Gray6.ToColor().WithAlpha(0.5f);
if (entry.IsEnabled && HasFocus)
{
strokeWidth = 2.0f;
canvas.FillColor = Material.Color.Blue.ToColor();
}
var x = dirtyRect.X;
var y = 53.91f;
var width = dirtyRect.Width;
var height = strokeWidth;
canvas.FillRectangle(x, y, width, height);
canvas.RestoreState();
}
public void DrawIndicator(ICanvas canvas, RectangleF dirtyRect, IEntry entry)
{
if (!string.IsNullOrEmpty(entry.Text))
{
canvas.SaveState();
float radius = 12f;
var backgroundMarginX = 24;
var backgroundMarginY = 28;
var x = dirtyRect.Width - backgroundMarginX;
var y = dirtyRect.Y + backgroundMarginY;
if (entry.FlowDirection == FlowDirection.RightToLeft)
x = backgroundMarginX;
if (entry.Background != null)
{
var background = entry.Background;
if (background is SolidPaint solidPaint)
{
var color = solidPaint.Color.Darker();
canvas.FillColor = color;
}
else
canvas.SetFillPaint(entry.Background, dirtyRect);
}
else
canvas.FillColor = Material.Color.Black.ToColor();
canvas.Alpha = 0.12f;
canvas.FillCircle(x, y, radius);
canvas.RestoreState();
indicatorRect = new RectangleF(x - radius, y - radius, radius * 2, radius * 2);
canvas.SaveState();
var iconMarginX = 29;
var iconMarginY = 23;
var tX = dirtyRect.Width - iconMarginX;
var tY = dirtyRect.Y + iconMarginY;
if (entry.FlowDirection == FlowDirection.RightToLeft)
{
iconMarginX = 19;
tX = iconMarginX;
}
canvas.Translate(tX, tY);
var vBuilder = new PathBuilder();
var path = vBuilder.BuildPath(MaterialEntryIndicatorIcon);
if (entry.Background != null)
{
var background = entry.Background;
if (background is SolidPaint solidPaint)
{
var color = solidPaint.Color.Lighter();
canvas.FillColor = color;
}
else
canvas.SetFillPaint(entry.Background, dirtyRect);
}
else
canvas.FillColor = Material.Color.Black.ToColor();
canvas.FillPath(path);
canvas.RestoreState();
}
}
public void DrawPlaceholder(ICanvas canvas, RectangleF dirtyRect, IEntry entry)
{
canvas.SaveState();
if (Application.Current?.RequestedTheme == OSAppTheme.Light)
canvas.FontColor = Material.Color.DarkBackground.ToColor();
else
canvas.FontColor = Material.Color.LightBackground.ToColor();
var materialPlaceholderFontSize = UnfocusedPlaceholderFontSize.Lerp(FocusedPlaceholderFontSize, AnimationPercent);
canvas.FontSize = materialPlaceholderFontSize;
float margin = 12f;
var horizontalAlignment = HorizontalAlignment.Left;
var x = dirtyRect.X + margin;
var height = dirtyRect.Height;
var width = dirtyRect.Width;
var materialPlaceholderPosition = UnfocusedPlaceholderPosition.Lerp(FocusedPlaceholderPosition, AnimationPercent);
canvas.DrawString(entry.Placeholder, x, materialPlaceholderPosition, width - margin, height, horizontalAlignment, VerticalAlignment.Top);
canvas.RestoreState();
}
public override Size GetDesiredSize(IView view, double widthConstraint, double heightConstraint) =>
new Size(widthConstraint, 56f);
}
}
| 35.887701 | 500 | 0.567427 | [
"MIT"
] | LowerAI/Microsoft.Maui.Graphics.Controls | src/GraphicsControls/Handlers/Entry/MaterialEntryDrawable.cs | 6,713 | C# |
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using TheAirBlow.Engine.API.Binary;
using TheAirBlow.Engine.Standalone;
namespace TheAirBlow.Engine.API.Worker
{
public class EngineGame : Game
{
private GraphicsDeviceManager graphics;
private SpriteBatch spriteBatch;
private SpriteFont font;
private Dictionary<string, Texture2D> textures = new Dictionary<string, Texture2D>();
public EngineGame()
{
Logger.Log("[GAME] Initializing...");
Exiting += ExitingEvent;
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Assets";
Window.Title = "Untitled Engine Runner";
IsMouseVisible = true;
}
private void ExitingEvent(object sender, EventArgs e)
{
Logger.Log("[GAME] Exiting...");
Loader.loaded = false;
MainWorker.loaded = false;
}
protected override void Initialize()
{
base.Initialize();
}
protected override void LoadContent()
{
Logger.Log("[GAME] Loading the game's assets...");
spriteBatch = new SpriteBatch(GraphicsDevice);
foreach (BinaryObject obj in Loader.data.objects)
if (obj.spritePath != "")
{
string path;
if (Loader.debug) path = Loader.path + "\\Assets\\Sprites\\" + obj.spritePath;
else path = Loader.path + "\\Sprites\\" + obj.spritePath;
MessageBox.Show(obj.spritePath, "Debug", new string[] { "OK" });
if (!File.Exists(path))
Throw(new Exception($"Could not load sprites: Sprite for GameObject {obj.name} does not exist."));
using (FileStream stream = File.OpenRead(path))
textures.Add(obj.name, Texture2D.FromStream(graphics.GraphicsDevice, stream));
}
font = Content.Load<SpriteFont>("main");
}
protected override void Update(GameTime gameTime)
{
graphics.PreferredBackBufferWidth = MainWorker.currentRoom.gridSize * MainWorker.currentRoom.gridWidth;
graphics.PreferredBackBufferHeight = MainWorker.currentRoom.gridSize * MainWorker.currentRoom.gridHeight;
graphics.ApplyChanges();
// TODO: Input processing
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(new Microsoft.Xna.Framework.Color(MainWorker.currentRoom.color.R, MainWorker.currentRoom.color.G, MainWorker.currentRoom.color.B));
spriteBatch.Begin();
foreach (RoomObject obj in MainWorker.currentRoom.roomObjects)
{
try
{
int posX = obj.x * MainWorker.currentRoom.gridSize;
int posY = obj.y * MainWorker.currentRoom.gridSize;
spriteBatch.Draw(textures[obj.name], new Microsoft.Xna.Framework.Rectangle(new Microsoft.Xna.Framework.Point(posX, posY),
new Microsoft.Xna.Framework.Point(MainWorker.currentRoom.gridSize, MainWorker.currentRoom.gridSize)),
Microsoft.Xna.Framework.Color.White);
}
catch { }
}
spriteBatch.End();
base.Draw(gameTime);
}
private void Throw(Exception e)
{
Logger.LogException(e);
throw e;
}
}
}
| 34.25 | 164 | 0.585766 | [
"Apache-2.0"
] | TheAirBlow/untitled-engine | TheAirBlow.Engine.API/Worker/Game.cs | 3,838 | 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: EntityCollectionRequest.cs.tt
namespace Microsoft.Graph
{
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Linq.Expressions;
/// <summary>
/// The type OfficeGraphInsightsUsedCollectionRequest.
/// </summary>
public partial class OfficeGraphInsightsUsedCollectionRequest : BaseRequest, IOfficeGraphInsightsUsedCollectionRequest
{
/// <summary>
/// Constructs a new OfficeGraphInsightsUsedCollectionRequest.
/// </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 OfficeGraphInsightsUsedCollectionRequest(
string requestUrl,
IBaseClient client,
IEnumerable<Option> options)
: base(requestUrl, client, options)
{
}
/// <summary>
/// Adds the specified UsedInsight to the collection via POST.
/// </summary>
/// <param name="usedInsight">The UsedInsight to add.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The created UsedInsight.</returns>
public System.Threading.Tasks.Task<UsedInsight> AddAsync(UsedInsight usedInsight, CancellationToken cancellationToken = default)
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.POST;
return this.SendAsync<UsedInsight>(usedInsight, cancellationToken);
}
/// <summary>
/// Adds the specified UsedInsight to the collection via POST and returns a <see cref="GraphResponse{UsedInsight}"/> object of the request.
/// </summary>
/// <param name="usedInsight">The UsedInsight to add.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The <see cref="GraphResponse{UsedInsight}"/> object of the request.</returns>
public System.Threading.Tasks.Task<GraphResponse<UsedInsight>> AddResponseAsync(UsedInsight usedInsight, CancellationToken cancellationToken = default)
{
this.ContentType = CoreConstants.MimeTypeNames.Application.Json;
this.Method = HttpMethods.POST;
return this.SendAsyncWithGraphResponse<UsedInsight>(usedInsight, cancellationToken);
}
/// <summary>
/// Gets the collection page.
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The collection page.</returns>
public async System.Threading.Tasks.Task<IOfficeGraphInsightsUsedCollectionPage> GetAsync(CancellationToken cancellationToken = default)
{
this.Method = HttpMethods.GET;
var response = await this.SendAsync<OfficeGraphInsightsUsedCollectionResponse>(null, cancellationToken).ConfigureAwait(false);
if (response?.Value?.CurrentPage != null)
{
response.Value.InitializeNextPageRequest(this.Client, response.NextLink);
// Copy the additional data collection to the page itself so that information is not lost
response.Value.AdditionalData = response.AdditionalData;
return response.Value;
}
return null;
}
/// <summary>
/// Gets the collection page and returns a <see cref="GraphResponse{OfficeGraphInsightsUsedCollectionResponse}"/> object.
/// </summary>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the request.</param>
/// <returns>The <see cref="GraphResponse{OfficeGraphInsightsUsedCollectionResponse}"/> object.</returns>
public System.Threading.Tasks.Task<GraphResponse<OfficeGraphInsightsUsedCollectionResponse>> GetResponseAsync(CancellationToken cancellationToken = default)
{
this.Method = HttpMethods.GET;
return this.SendAsyncWithGraphResponse<OfficeGraphInsightsUsedCollectionResponse>(null, cancellationToken);
}
/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
/// <param name="value">The expand value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Expand(string value)
{
this.QueryOptions.Add(new QueryOption("$expand", value));
return this;
}
/// <summary>
/// Adds the specified expand value to the request.
/// </summary>
/// <param name="expandExpression">The expression from which to calculate the expand value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Expand(Expression<Func<UsedInsight, object>> expandExpression)
{
if (expandExpression == null)
{
throw new ArgumentNullException(nameof(expandExpression));
}
string error;
string value = ExpressionExtractHelper.ExtractMembers(expandExpression, out error);
if (value == null)
{
throw new ArgumentException(error, nameof(expandExpression));
}
else
{
this.QueryOptions.Add(new QueryOption("$expand", value));
}
return this;
}
/// <summary>
/// Adds the specified select value to the request.
/// </summary>
/// <param name="value">The select value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Select(string value)
{
this.QueryOptions.Add(new QueryOption("$select", value));
return this;
}
/// <summary>
/// Adds the specified select value to the request.
/// </summary>
/// <param name="selectExpression">The expression from which to calculate the select value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Select(Expression<Func<UsedInsight, object>> selectExpression)
{
if (selectExpression == null)
{
throw new ArgumentNullException(nameof(selectExpression));
}
string error;
string value = ExpressionExtractHelper.ExtractMembers(selectExpression, out error);
if (value == null)
{
throw new ArgumentException(error, nameof(selectExpression));
}
else
{
this.QueryOptions.Add(new QueryOption("$select", value));
}
return this;
}
/// <summary>
/// Adds the specified top value to the request.
/// </summary>
/// <param name="value">The top value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Top(int value)
{
this.QueryOptions.Add(new QueryOption("$top", value.ToString()));
return this;
}
/// <summary>
/// Adds the specified filter value to the request.
/// </summary>
/// <param name="value">The filter value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Filter(string value)
{
this.QueryOptions.Add(new QueryOption("$filter", value));
return this;
}
/// <summary>
/// Adds the specified skip value to the request.
/// </summary>
/// <param name="value">The skip value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest Skip(int value)
{
this.QueryOptions.Add(new QueryOption("$skip", value.ToString()));
return this;
}
/// <summary>
/// Adds the specified orderby value to the request.
/// </summary>
/// <param name="value">The orderby value.</param>
/// <returns>The request object to send.</returns>
public IOfficeGraphInsightsUsedCollectionRequest OrderBy(string value)
{
this.QueryOptions.Add(new QueryOption("$orderby", value));
return this;
}
}
}
| 44.186603 | 164 | 0.612019 | [
"MIT"
] | Aliases/msgraph-sdk-dotnet | src/Microsoft.Graph/Generated/requests/OfficeGraphInsightsUsedCollectionRequest.cs | 9,235 | C# |
using System.IO;
using CP77.CR2W.Reflection;
using FastMember;
using static CP77.CR2W.Types.Enums;
namespace CP77.CR2W.Types
{
[REDMeta]
public class ForceVisionApperanceEvent : redEvent
{
[Ordinal(0)] [RED("apply")] public CBool Apply { get; set; }
[Ordinal(1)] [RED("forceCancel")] public CBool ForceCancel { get; set; }
[Ordinal(2)] [RED("forcedHighlight")] public CHandle<FocusForcedHighlightData> ForcedHighlight { get; set; }
[Ordinal(3)] [RED("ignoreStackEvaluation")] public CBool IgnoreStackEvaluation { get; set; }
[Ordinal(4)] [RED("responseData")] public CHandle<IScriptable> ResponseData { get; set; }
public ForceVisionApperanceEvent(CR2WFile cr2w, CVariable parent, string name) : base(cr2w, parent, name) { }
}
}
| 38.55 | 112 | 0.708171 | [
"MIT"
] | Eingin/CP77Tools | CP77.CR2W/Types/cp77/ForceVisionApperanceEvent.cs | 752 | C# |
// FILE AUTOGENERATED. DO NOT MODIFY
namespace Starfield.Core.Item.Items {
[Item("minecraft:purpur_block", 175, 64, 493)]
public class ItemPurpurBlock : BlockItem { }
} | 30.333333 | 51 | 0.697802 | [
"MIT"
] | StarfieldMC/Starfield | Starfield.Core/Item/Items/ItemPurpurBlock.cs | 182 | C# |
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
namespace FIFAConnectorClient;
internal static class MemoryManager
{
private const int ProcessAll = 0x001F0FFF;
[Flags]
private enum AllocationType
{
Commit = 0x1000,
Reserve = 0x2000,
Decommit = 0x4000,
Release = 0x8000,
Reset = 0x80000,
Physical = 0x400000,
TopDown = 0x100000,
WriteWatch = 0x200000,
LargePages = 0x20000000
}
[Flags]
private enum MemoryProtection
{
Execute = 0x10,
ExecuteRead = 0x20,
ExecuteReadWrite = 0x40,
ExecuteWriteCopy = 0x80,
NoAccess = 0x01,
ReadOnly = 0x02,
ReadWrite = 0x04,
WriteCopy = 0x08,
GuardModifierflag = 0x100,
NoCacheModifierflag = 0x200,
WriteCombineModifierflag = 0x400
}
[DllImport("kernel32.dll")]
static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, uint dwSize, AllocationType flAllocationType, MemoryProtection flProtect);
[DllImport("kernel32.dll")]
static extern bool ReadProcessMemory(int hProcess, int lpBaseAddress, byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesRead);
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, int nSize, int lpNumberOfBytesWritten);
internal static IntPtr AllocSpace(IntPtr handle, uint byteArraySize)
{
return VirtualAllocEx(handle, IntPtr.Zero, byteArraySize, AllocationType.Commit | AllocationType.Reserve, MemoryProtection.ExecuteReadWrite);
}
internal static byte[] GetByteArrayFromMemory(IntPtr handle, int address, int length)
{
int bytesRead = 0;
byte[] buffer = new byte[length];
ReadProcessMemory(handle.ToInt32(), address, buffer, buffer.Length, ref bytesRead);
return buffer;
}
internal static void WriteByteArrayFromMemory(IntPtr handle, int address, byte[] bytes)
{
WriteProcessMemory(handle, address, bytes, bytes.Length, 0);
}
internal static IntPtr GetProcHandle()
{
return OpenProcess(ProcessAll, true, Process.GetProcessesByName("fifa").FirstOrDefault()?.Id ?? 0);
}
} | 32.710526 | 149 | 0.68745 | [
"MIT"
] | Pilo11/FIFAConnector | src/FIFAConnectorClient/MemoryManager.cs | 2,486 | C# |
using System;
using System.IO;
using System.Text;
namespace WordGuess
{
public class Program
{
public static readonly string path = "../../../../../words.txt";
static readonly Random random = new Random();
/// <summary>
/// Creates words.txt with a set of default words if it doesn't already exist.
/// </summary>
public static void CreateFile()
{
if (!File.Exists(path))
{
using (StreamWriter sw = new StreamWriter(path))
{
string[] content = new string[] { "CAT", "DOG", "BEAR", "SEAL", "DREAM", "WATER", "HEIGHT", "PLAYER", "FEELING", "NEAREST" };
foreach (string line in content)
{
sw.WriteLine(line);
}
}
}
}
/// <summary>
/// Gets all of the words in words.txt.
/// </summary>
/// <returns>An array with all of the words</returns>
public static string[] ReadFile()
{
return File.ReadAllLines(path);
}
/// <summary>
/// Adds a word to words.txt.
/// </summary>
/// <param name="line">The word being added</param>
public static void UpdateFile(string line)
{
using (StreamWriter sw = File.AppendText(path))
{
sw.WriteLine(line);
}
}
/// <summary>
/// Delestes words.txt.
/// </summary>
public static void DeleteFile()
{
File.Delete(path);
}
/// <summary>
/// Displays all of the words in words.txt.
/// </summary>
static void DisplayWords()
{
Console.Clear();
Console.WriteLine("Here are the words currently in the game:");
string[] words = ReadFile();
foreach (string word in words)
{
Console.WriteLine(word);
}
PressAnyButton();
}
/// <summary>
/// Checks if a given string appears in a given array of strings.
/// </summary>
/// <param name="array">The array being searched.</param>
/// <param name="word">The string being searched for.</param>
/// <returns>True or false depending on if the word is in the array.</returns>
public static bool ArrayHasWord(string[] array, string word)
{
foreach (string element in array)
{
if (word == element) return true;
}
return false;
}
/// <summary>
/// Checks if a word contains any non-letter characters.
/// </summary>
/// <param name="word">The word being checked.</param>
/// <returns>True or false depending on if the word has symbols.</returns>
static bool WordHasSymbols(string word)
{
foreach (char c in word)
{
if (!Char.IsLetter(c)) return true;
}
return false;
}
/// <summary>
/// Adds a new word to the game from user input.
/// </summary>
static void NewWord()
{
Console.Write("Enter a new word (length: 3-16): ");
string[] allWords = ReadFile();
string newWord = Console.ReadLine().ToUpper();
if (newWord.Length <= 2) Console.WriteLine("This word is too short!");
else if (newWord.Length > 16) Console.WriteLine("This word is too long!");
else
{
if (WordHasSymbols(newWord))
{
Console.WriteLine("Words should only contain letters!");
}
else if (ArrayHasWord(allWords, newWord))
{
Console.WriteLine("This word is already in the game!");
}
else
{
UpdateFile(newWord);
Console.WriteLine("Word added successfully!");
}
}
PressAnyButton();
}
/// <summary>
/// Deletes a single word from the game.
/// </summary>
static void DeleteWord()
{
string[] words = ReadFile();
Console.Write("Word to delete: ");
string toDelete = Console.ReadLine().ToUpper();
if (!ArrayHasWord(words, toDelete))
{
Console.WriteLine("This word is not in the game!");
}
else
{
DeleteFile();
using (StreamWriter sw = new StreamWriter(path))
{
foreach (string word in words)
{
if (word != toDelete) sw.WriteLine(word);
}
}
Console.WriteLine("Word removed.");
}
PressAnyButton();
}
/// <summary>
/// Prompts the user to press a button to continue.
/// </summary>
static void PressAnyButton()
{
Console.WriteLine("Press any button to continue...");
Console.ReadKey();
}
/// <summary>
/// Handles main menu navigation.
/// </summary>
/// <returns>True unless the user chooses to quit the game.</returns>
static bool MainMenu()
{
Console.Clear();
Console.WriteLine("Welcome to WordGuess!\nPlease select an option.\n");
Console.WriteLine("1. Play Game\n2. Admin\n3. Exit\n");
Console.Write("Your choice: ");
switch (GetNumber(3))
{
case 1: Game();
return true;
case 2: while (AdminMenu()) ;
return true;
default: return false;
}
}
/// <summary>
/// Handles admin menu navigation.
/// </summary>
/// <returns>True unless the user chooses to exit the menu.</returns>
static bool AdminMenu()
{
Console.Clear();
Console.WriteLine("WordGuess Admin Menu\nPlease select an option.\n");
Console.WriteLine("1. View Words\n2. Add A Word\n3. Delete A Word\n4. Reset Words\n5. Main Menu\n");
Console.Write("Your choice: ");
switch (GetNumber(5))
{
case 1: DisplayWords();
return true;
case 2: NewWord();
return true;
case 3: DeleteWord();
return true;
case 4: Reset();
return true;
default: return false;
}
}
/// <summary>
/// Deletes words.txt and creates it again.
/// </summary>
static void Reset()
{
Console.WriteLine("WARNING: THIS WILL RESET THE GAME TO ITS DEFAULT STATE!");
string message = "Are you sure? (Y/N): ";
if (YesOrNo(message))
{
DeleteFile();
CreateFile();
Console.WriteLine("Words Reset.");
PressAnyButton();
}
}
/// <summary>
/// Gets a yes or no response from the user.
/// </summary>
/// <param name="message">The prompt given to the user.</param>
/// <returns>True or false depending on what the user chooses.</returns>
static bool YesOrNo(string message)
{
string input;
while (true)
{
Console.Write(message);
input = Console.ReadLine().ToUpper();
switch (input)
{
case "Y": return true;
case "N": return false;
default:
Console.WriteLine("Invalid Input.");
break;
}
}
}
/// <summary>
/// Gets a number in between 1 and a given maximum from the user.
/// </summary>
/// <param name="max">The maximum allowed number.</param>
/// <returns>The number entered by the user.</returns>
static int GetNumber(int max)
{
while (true)
{
try
{
int input = Convert.ToInt32(Console.ReadLine());
if (input > max || input < 1)
{
Console.WriteLine($"Invalid input. Please choose a number between 1 and {max}.");
}
else return input;
}
catch (FormatException)
{
Console.WriteLine("Invalid input. Please enter a number.");
}
}
}
/// <summary>
/// Retrieves a random word from words.txt.
/// </summary>
/// <returns>A random word.</returns>
static string RandomWord()
{
string[] words = ReadFile();
return words[random.Next(0, words.Length)];
}
/// <summary>
/// Handles the word guessing game.
/// </summary>
static void Game()
{
string word = RandomWord();
string guessed = "";
string blanked = BlankWord(word, guessed);
while (blanked.Contains("_"))
{
DisplayGame(blanked, guessed);
guessed += GetLetter(guessed);
blanked = BlankWord(word, guessed);
}
DisplayGame(blanked, guessed);
Console.WriteLine("You got it!");
PressAnyButton();
}
/// <summary>
/// Displays game information.
/// </summary>
/// <param name="blanked">The word being guessed with non-guessed letters blanked out.</param>
/// <param name="guessed">The letters already entered by the user.</param>
static void DisplayGame(string blanked, string guessed)
{
Console.Clear();
Console.WriteLine(blanked);
DisplayGuessed(guessed);
}
/// <summary>
/// Displays previous guesses.
/// </summary>
/// <param name="guessed">The letters already entered by the user.</param>
static void DisplayGuessed(string guessed)
{
Console.Write("Guessed: ");
foreach (char c in guessed)
{
Console.Write($"{c} ");
}
Console.WriteLine();
}
/// <summary>
/// Formats a word so that non-guessed characters are blanked out.
/// </summary>
/// <param name="word">The word being formatted.</param>
/// <param name="guessed">The letters already entered by the user.</param>
/// <returns>The formatted word.</returns>
public static string BlankWord(string word, string guessed)
{
string output = "";
foreach (char c in word)
{
output += $"{(guessed.Contains(c) ? c : "_"[0])} ";
}
return output.Substring(0, output.Length-1);
}
/// <summary>
/// Gets a single letter from the user.
/// </summary>
/// <param name="guessed">The letters already entered by the user.</param>
/// <returns>A letter.</returns>
static char GetLetter(string guessed)
{
string input;
while (true)
{
Console.Write("Pick a letter: ");
input = Console.ReadLine().ToUpper();
if (input.Length > 1 || WordHasSymbols(input))
{
Console.WriteLine("Invalid input. Please enter a single letter.");
}
else if (guessed.Contains(input[0]))
{
Console.WriteLine("This letter has already been guessed!");
}
else return input[0];
}
}
static void Main(string[] args)
{
CreateFile();
while (MainMenu()) ;
}
}
}
| 32.81746 | 145 | 0.465699 | [
"MIT"
] | btaylor93/Lab03-WordGuess | WordGuess/WordGuess/Program.cs | 12,407 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// La información general de un ensamblado se controla mediante el siguiente
// conjunto de atributos. Cambie estos valores de atributo para modificar la información
// asociada con un ensamblado.
[assembly: AssemblyTitle("BuildingModifierMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BuildingModifierMod")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles
// para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde
// COM, establezca el atributo ComVisible en true en este tipo.
[assembly: ComVisible(false)]
// El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM.
[assembly: Guid("ae64bd07-9b27-4e16-9767-dd7894f70806")]
// La información de versión de un ensamblado consta de los cuatro valores siguientes:
//
// Versión principal
// Versión secundaria
// Número de compilación
// Revisión
//
// Puede especificar todos los valores o usar los números de compilación y de revisión predeterminados
// mediante el carácter "*", como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 41.162162 | 102 | 0.759685 | [
"MIT"
] | Blindfold-Games/ONI-Modloader-Mods | Source/BuildingModifierMod/Properties/AssemblyInfo.cs | 1,541 | C# |
// <copyright file="PngEncoderTests.cs" company="James Jackson-South">
// Copyright (c) James Jackson-South and contributors.
// Licensed under the Apache License, Version 2.0.
// </copyright>
using ImageSharp.Formats;
namespace ImageSharp.Tests
{
using System.IO;
using System.Threading.Tasks;
using Xunit;
public class PngEncoderTests : FileTestBase
{
[Fact]
public void ImageCanSaveIndexedPng()
{
string path = CreateOutputDirectory("Png", "Indexed");
foreach (TestFile file in Files)
{
using (Image image = file.CreateImage())
{
using (FileStream output = File.OpenWrite($"{path}/{file.FileNameWithoutExtension}.png"))
{
image.MetaData.Quality = 256;
image.Save(output, new PngFormat());
}
}
}
}
[Fact]
public void ImageCanSavePngInParallel()
{
string path = this.CreateOutputDirectory("Png");
Parallel.ForEach(
Files,
file =>
{
using (Image image = file.CreateImage())
{
using (FileStream output = File.OpenWrite($"{path}/{file.FileNameWithoutExtension}.png"))
{
image.SaveAsPng(output);
}
}
});
}
}
} | 29.444444 | 117 | 0.469811 | [
"Apache-2.0"
] | ststeiger/ImageSharpTestApplication | tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs | 1,592 | C# |
using System;
using dsn.dev.csharp;
namespace dsn.example
{
public class echoServer : Serverlet<echoServer>
{
public echoServer() : base("echo") {}
~echoServer() { }
// all service handlers to be implemented further
// RPC_ECHO_ECHO_PING
private void OnpingInternal(RpcReadStream request, RpcWriteStream response)
{
string val;
try
{
request.Read(out val);
}
catch (Exception)
{
// TODO: error handling
return;
}
Onping(val, new RpcReplier<string>(response, (s, r) =>
{
s.Write(r);
s.Flush();
}));
}
protected virtual void Onping(string val, RpcReplier<string> replier)
{
Console.WriteLine("... exec RPC_ECHO_ECHO_PING ... (not implemented) ");
var resp = val;
replier.Reply(resp);
}
public void OpenService(UInt64 gpid)
{
RegisterRpcHandler(echoHelper.RPC_ECHO_ECHO_PING, "ping", this.OnpingInternal, gpid);
}
public void CloseService(UInt64 gpid)
{
UnregisterRpcHandler(echoHelper.RPC_ECHO_ECHO_PING, gpid);
}
}
} // end namespace
| 25.272727 | 97 | 0.502158 | [
"MIT"
] | Bhaskers-Blu-Org2/rDSN | src/plugins/apps.echo.csharp/echo.server.cs | 1,390 | C# |
//
// DProjectReference.cs
//
// Author:
// Alexander Bothe <info@alexanderbothe.com>
//
// Copyright (c) 2013 Alexander Bothe
//
// 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 System.Collections.Generic;
using D_Parser.Misc;
using MonoDevelop.D.Projects;
using System.ComponentModel;
using MonoDevelop.Projects;
using System.IO;
namespace MonoDevelop.D.Projects.ProjectPad
{
class DProjectReference : INotifyPropertyChanged
{
public readonly AbstractDProject OwnerProject;
public readonly ReferenceType ReferenceType;
string reference;
public string Reference
{
get{return reference;}
set{
reference = value;
PropChanged ("Reference");
}
}
public Project ReferencedProject
{
get{
if (ReferenceType != ReferenceType.Project)
return null;
foreach (var prj in Ide.IdeApp.Workspace.GetAllProjects())
if (prj.ItemId == reference)
return prj;
return new UnknownProject ();
}
}
public virtual string Name {
get{
switch (ReferenceType) {
case ReferenceType.Package:
return reference;
case ReferenceType.Project:
var prj = ReferencedProject;
return prj == null ? "<No Project specified>" : prj.Name;
default:
throw new InvalidDataException ("Invalid case");
}
}
}
public virtual bool IsValid {
get{
switch (ReferenceType) {
case ReferenceType.Package:
return Directory.Exists (reference);
case ReferenceType.Project:
var prj = ReferencedProject;
return prj != null && !(prj is UnknownProject);
default:
throw new InvalidDataException ("Invalid case");
}
}
}
public virtual string ValidationErrorMessage{
get{
switch (ReferenceType) {
case ReferenceType.Package:
return "Directory '"+reference+"' not found";
case ReferenceType.Project:
return "Invalid or unknown project";
default:
throw new InvalidDataException ("Invalid case");
}
}
}
public DProjectReference (AbstractDProject Owner, ReferenceType refType, string reference)
{
OwnerProject = Owner;
ReferenceType = refType;
this.reference = reference;
}
protected void PropChanged(string n)
{
if(PropertyChanged!=null)
PropertyChanged(this, new PropertyChangedEventArgs(n));
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
| 27.764228 | 92 | 0.714202 | [
"Apache-2.0"
] | llucenic/Mono-D | MonoDevelop.DBinding/Projects/ProjectPad/DProjectReference.cs | 3,415 | C# |
using GildedRoseCSharpCore.Entity;
using GildedRoseCSharpCore.Interfaces;
using GildedRoseCSharpCore.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
namespace GildedRoseCSharpCore
{
public class Program
{
public IList<ItemList> Items;
private IUpdateItemStrategyFactory _updateStrategy;
public Program(IUpdateItemStrategyFactory updateStrategy, List<ItemList> items)
{
_updateStrategy = updateStrategy;
Items = items;
}
static void Main(string[] args)
{
Console.WriteLine("OMGHAI!");
// register exception handler
AppDomain.CurrentDomain.UnhandledException += Helper.UnhandledExceptionTrapper;
IServiceCollection serviceCollection = new ServiceCollection();
IConfigurationRoot configuration = Helper.GetConfiguration();
List<ItemList> items = new List<ItemList>();
configuration.GetSection("Inventory").Bind(items);
serviceCollection.AddTransient<IUpdateItemStrategyFactory, UpdateItemStrategyFactory>();
var serviceProvider = serviceCollection.BuildServiceProvider();
var updateStrategy = serviceProvider.GetService<IUpdateItemStrategyFactory>();
var app = new Program(updateStrategy, items);
app.UpdateInventory();
Console.ReadKey();
app.DisposeServices(serviceCollection);
}
public void UpdateInventory()
{
foreach (var item in Items)
{
_updateStrategy.UpdateItem(item);
}
}
private void DisposeServices(IServiceCollection services)
{
foreach (var service in services)
{
if (service == null)
return;
if (service is IDisposable)
((IDisposable)service).Dispose();
}
}
}
}
| 32.439394 | 124 | 0.60439 | [
"MIT"
] | pramod-kp/GildedRoseRefactoring-Method-3 | GildedRoseCSharpCore/Program.cs | 2,143 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ClearCanvas.ImageServer.Services.ServiceLock.FilesystemFileImporter {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
internal sealed partial class DirectoryImportSettings : global::System.Configuration.ApplicationSettingsBase {
private static DirectoryImportSettings defaultInstance = ((DirectoryImportSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new DirectoryImportSettings())));
public static DirectoryImportSettings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("3")]
public int MaxConcurrency {
get {
return ((int)(this["MaxConcurrency"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int ImageDelay {
get {
return ((int)(this["ImageDelay"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("300")]
public int MaxBatchSize {
get {
return ((int)(this["MaxBatchSize"]));
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5")]
public int RecheckDelaySeconds {
get {
return ((int)(this["RecheckDelaySeconds"]));
}
}
}
}
| 42.571429 | 192 | 0.596197 | [
"Apache-2.0"
] | econmed/ImageServer20 | ImageServer/Services/ServiceLock/FilesystemFileImporter/DirectoryImportSettings.Designer.cs | 2,684 | C# |
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
public class DatabaseContext : DbContext
{
public DbSet<Karma> Karmas { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite("Data Source=blogging.db");
}
} | 28.727273 | 81 | 0.756329 | [
"MIT"
] | Amsterdam-bene/WebApi | Storage/DatabaseContext.cs | 316 | 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 rds-2014-10-31.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.RDS.Model
{
/// <summary>
/// <code>SourceDBInstanceIdentifier</code> refers to a DB instance with <code>BackupRetentionPeriod</code>
/// equal to 0.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class PointInTimeRestoreNotEnabledException : AmazonRDSException
{
/// <summary>
/// Constructs a new PointInTimeRestoreNotEnabledException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public PointInTimeRestoreNotEnabledException(string message)
: base(message) {}
/// <summary>
/// Construct instance of PointInTimeRestoreNotEnabledException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public PointInTimeRestoreNotEnabledException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of PointInTimeRestoreNotEnabledException
/// </summary>
/// <param name="innerException"></param>
public PointInTimeRestoreNotEnabledException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of PointInTimeRestoreNotEnabledException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public PointInTimeRestoreNotEnabledException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of PointInTimeRestoreNotEnabledException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public PointInTimeRestoreNotEnabledException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the PointInTimeRestoreNotEnabledException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected PointInTimeRestoreNotEnabledException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 49.424 | 180 | 0.67449 | [
"Apache-2.0"
] | philasmar/aws-sdk-net | sdk/src/Services/RDS/Generated/Model/PointInTimeRestoreNotEnabledException.cs | 6,178 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using Cethleann.Archive;
using Cethleann.ManagedFS.Options;
using Cethleann.Structure;
using DragonLib;
using DragonLib.IO;
using JetBrains.Annotations;
namespace Cethleann.ManagedFS
{
/// <summary>
/// Nioh archive_*.bin file management
/// </summary>
[PublicAPI]
public class Mitsunari : IManagedFS
{
/// <summary>
/// Loads data
/// </summary>
/// <param name="options"></param>
public Mitsunari(IManagedFSOptionsBase options)
{
if (options is IManagedFSOptions optionsLayer) GameId = optionsLayer.GameId;
}
/// <summary>
/// Underlying LINKARCHIVEs
/// </summary>
public List<(LINKARCHIVE archive, LINKNAME name, string filename)> Data { get; set; } = new List<(LINKARCHIVE, LINKNAME, string)>();
/// <summary>
/// Loaded FileList.csv
/// </summary>
public Dictionary<string, string> FileList { get; set; } = new Dictionary<string, string>();
/// <inheritdoc />
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
/// <inheritdoc />
public int EntryCount { get; private set; }
/// <inheritdoc />
public string GameId { get; private set; } = "";
/// <inheritdoc />
public Memory<byte> ReadEntry(int index)
{
if (index >= EntryCount) throw new IndexOutOfRangeException($"Index {index} does not exist!");
foreach (var (archive, _, _) in Data)
{
if (index < archive.Entries.Length) return archive.ReadEntry(archive.Entries[index]);
index -= archive.Entries.Length;
}
return Memory<byte>.Empty;
}
/// <inheritdoc />
public Dictionary<string, string> LoadFileList(string? filename = null, string? game = null)
{
FileList = ManagedFSHelper.GetNamedFileList(filename, game ?? GameId, "archive");
return FileList;
}
/// <inheritdoc />
public string GetFilename(int index, string ext = "bin", DataType dataType = DataType.None)
{
if (dataType == DataType.Compressed || dataType == DataType.CompressedChonky) ext += ".gz";
var archiveName = "ARCHIVE_00";
var linkName = default(LINKNAME);
foreach (var (linkdata, name, archiveFilename) in Data)
{
if (index >= linkdata.Entries.Length)
{
index -= linkdata.Entries.Length;
continue;
}
archiveName = archiveFilename.ToUpper();
linkName = name;
break;
}
var filename = linkName?.GetName(index) ?? index.ToString();
if (!FileList.TryGetValue($"{archiveName}_{filename}", out var path))
{
if (Path.GetFileName(filename) == filename)
{
filename = $"{index}_{filename}";
path = ext == "bin" || ext == "bin.gz" ? $"MISC/UNKNOWN/{filename}.{ext}" : $"MISC/FORMATS/{ext.ToUpper().Replace('.', '_')}/{filename}.{ext}";
}
else
{
path = filename;
}
}
else
{
path = Path.Combine(Path.GetDirectoryName(path) ?? string.Empty, Path.GetFileNameWithoutExtension(path) + $".{ext}");
}
if (ext.EndsWith(".gz") && !path.EndsWith(".gz")) path += ".gz";
return @$"{archiveName}\{path}";
}
/// <inheritdoc />
public void AddDataFS(string path)
{
GC.ReRegisterForFinalize(this);
var archives = Directory.GetFiles(path, "*.lnk");
foreach (var archive in archives)
{
Logger.Success("Mitsunari", $"Loading {Path.GetFileName(archive)}...");
var linkarchive = new LINKARCHIVE(File.OpenRead(archive));
var name = Path.GetFileNameWithoutExtension(archive);
var linkname = new LINKNAME(File.OpenRead(Path.Combine(path, "lfm_order_" + name.Substring(8) + ".bin")).ToSpan());
Data.Add((linkarchive, linkname, name.ToUpper()));
EntryCount += linkarchive.Entries.Length;
}
}
private void Dispose(bool disposing)
{
foreach (var (archive, _, _) in Data) archive.Dispose();
if (!disposing) return;
Data = new List<(LINKARCHIVE, LINKNAME, string)>();
EntryCount = 0;
}
/// <summary>
/// Cleanup
/// </summary>
~Mitsunari() => Dispose(false);
}
}
| 33.841379 | 163 | 0.524353 | [
"MIT"
] | TGEnigma/Cethleann | Cethleann/ManagedFS/Mitsunari.cs | 4,909 | C# |
namespace Silky.Identity.Domain;
public static class IdentityUserConsts
{
public static int MaxUserNameLength { get; set; } = 256;
public static int MaxRealNameLength { get; set; } = 64;
public static int MaxSurnameLength { get; set; } = 64;
public static int MaxNormalizedUserNameLength { get; set; } = MaxUserNameLength;
public static int MaxEmailLength { get; set; } = 256;
public static int MaxNormalizedEmailLength { get; set; } = MaxEmailLength;
public static int MaxPhoneNumberLength { get; set; } = 16;
public static int MaxPasswordLength { get; set; } = 128;
public static int MaxPasswordHashLength { get; set; } = 256;
public static int MaxSecurityStampLength { get; set; } = 256;
public static int MaxLoginProviderLength { get; set; } = 16;
} | 31.807692 | 84 | 0.683192 | [
"MIT"
] | DotNetExample/silky.hero | services/Silky.Identity/src/Silky.Identity.Domain/Identity/IdentityUserConsts.cs | 829 | C# |
using System;
using System.Web.Mvc;
using Microsoft.ApplicationInsights;
namespace Moovies.ErrorHandler
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = true, AllowMultiple = true)]
public class AiHandleErrorAttribute : HandleErrorAttribute
{
public override void OnException(ExceptionContext filterContext)
{
if (filterContext != null && filterContext.HttpContext != null && filterContext.Exception != null)
{
//If customError is Off, then AI HTTPModule will report the exception
if (filterContext.HttpContext.IsCustomErrorEnabled)
{
var ai = new TelemetryClient();
ai.TrackException(filterContext.Exception);
}
}
base.OnException(filterContext);
}
}
} | 882 | 882 | 0.624717 | [
"MIT"
] | claudioct/moovies | Moovies/ErrorHandler/AiHandleErrorAttribute.cs | 882 | C# |
using System.Web;
using DogeNews.Common.Enums;
namespace DogeNews.Web.Mvp.News.Edit.EventArguments
{
public class EditArticleEventArgs
{
public int Id { get; set; }
public string Title { get; set; }
public HttpPostedFile Image { get; set; }
public string FileName { get; set; }
public string Content { get; set; }
public NewsCategoryType Category { get; set; }
}
} | 20.571429 | 54 | 0.62963 | [
"MIT"
] | gbelchev/Doge-News | DogeNews/Src/Web/DogeNews.Web.Mvp/News/Edit/EventArguments/EditArticleEventArgs.cs | 434 | C# |
using System.IO;
using store.Src.Utils.Interface;
using Microsoft.Extensions.Configuration;
using Microsoft.AspNetCore.Hosting;
namespace store.Src.Utils
{
public class Config : IConfig
{
private readonly IWebHostEnvironment env;
public Config(IWebHostEnvironment env)
{
this.env = env;
}
public string getEnvByKey(string name)
{
string currentEnv = this.env.EnvironmentName.ToLower();
string envFileName = "env." + currentEnv + ".json";
string envPath = Path.Combine(Directory.GetCurrentDirectory(), "config") + "/" + envFileName;
IConfiguration configs = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile(envPath, true, true).Build();
return configs[name];
}
}
} | 30.107143 | 150 | 0.648873 | [
"MIT"
] | MonoInfinity/mono-shopping-store-be | Src/Utils/Config.cs | 843 | C# |
using Microsoft.Extensions.Configuration;
using Castle.MicroKernel.Registration;
using Abp.Events.Bus;
using Abp.Modules;
using Abp.Reflection.Extensions;
using Project1.Configuration;
using Project1.EntityFrameworkCore;
using Project1.Migrator.DependencyInjection;
namespace Project1.Migrator
{
[DependsOn(typeof(Project1EntityFrameworkModule))]
public class Project1MigratorModule : AbpModule
{
private readonly IConfigurationRoot _appConfiguration;
public Project1MigratorModule(Project1EntityFrameworkModule abpProjectNameEntityFrameworkModule)
{
abpProjectNameEntityFrameworkModule.SkipDbSeed = true;
_appConfiguration = AppConfigurations.Get(
typeof(Project1MigratorModule).GetAssembly().GetDirectoryPathOrNull()
);
}
public override void PreInitialize()
{
Configuration.DefaultNameOrConnectionString = _appConfiguration.GetConnectionString(
Project1Consts.ConnectionStringName
);
Configuration.BackgroundJobs.IsJobExecutionEnabled = false;
Configuration.ReplaceService(
typeof(IEventBus),
() => IocManager.IocContainer.Register(
Component.For<IEventBus>().Instance(NullEventBus.Instance)
)
);
}
public override void Initialize()
{
IocManager.RegisterAssemblyByConvention(typeof(Project1MigratorModule).GetAssembly());
ServiceCollectionRegistrar.Register(IocManager);
}
}
}
| 33.395833 | 104 | 0.683094 | [
"MIT"
] | buiphuocnhat/DemoBoilerPlate | aspnet-core/src/Project1.Migrator/Project1MigratorModule.cs | 1,603 | C# |
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace XamarinEvolve.Clients.UI
{
public partial class TweetCell : ContentView
{
public TweetCell()
{
InitializeComponent();
}
}
}
| 15.875 | 48 | 0.629921 | [
"MIT"
] | XpiritBV/app-evolve | src/XamarinEvolve.Clients.UI.NetStandard/Cells/TweetCell.xaml.cs | 256 | C# |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Business.Abstract;
using Entities.Concrete;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Web.Models;
namespace Web.Controllers
{
public class AdminController : Controller
{
IProductService productService;
ICategoryService categoryService;
IDiscountService discountService;
ISaleService saleService;
IVisitService visitService;
IPopupService popupService;
private UserManager<User> userManager;
private RoleManager<Role> roleManager;
private readonly IHostingEnvironment _appEnvironment;
public AdminController(IProductService productService, ICategoryService categoryService, IDiscountService discountService, ISaleService saleService, IVisitService visitService, IPopupService popupService, IHostingEnvironment appEnvironment, UserManager<User> _userManager, RoleManager<Role> _roleManager)
{
this.productService = productService;
this.categoryService = categoryService;
this.discountService = discountService;
this.saleService = saleService;
this.visitService = visitService;
this.popupService = popupService;
this._appEnvironment = appEnvironment;
this.userManager = _userManager;
this.roleManager = _roleManager;
}
[Authorize(Roles = "Admin")]
public IActionResult AddPopup()
{
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult DeletePopup(Guid id)
{
if (id != Guid.Empty)
{
try
{
var getPopup = popupService.Get(id);
popupService.Delete(id);
}
catch (Exception) { }
Response.StatusCode = 200;
return Json(new { status = "success" });
}
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult UpdatePopup(Guid id)
{
if (id != Guid.Empty)
{
try
{
var getPopup = popupService.Get(id);
if (getPopup.Status == true)
{
getPopup.Status = false;
popupService.Update(getPopup);
}
else if (getPopup.Status == false)
{
var changeStatus = popupService.GetList().Where(x => x.Status == true).ToList();
foreach (var change in changeStatus)
{
change.Status = false;
popupService.Update(change);
}
getPopup.Status = true;
popupService.Update(getPopup);
}
}
catch (Exception) { }
Response.StatusCode = 200;
return RedirectToAction("ListPopup");
}
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult ListPopup()
{
ViewData["Messages"] = popupService.GetList();
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult AddCategory()
{
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult DeleteCategory(Guid id)
{
if (id != Guid.Empty)
{
try
{
var products = productService.GetList().Where(x => x.CategoryId == id);
foreach (var product in products)
{
productService.Delete(product.Id);
}
categoryService.Delete(id);
}
catch (Exception) { }
}
return RedirectToAction("ListPopup");
}
[Authorize(Roles = "Admin")]
public IActionResult UpdateCategory(Guid id)
{
if (id != Guid.Empty)
{
Category Kategoriler;
Kategoriler = categoryService.Get(id);
CategoryViewModel model = new CategoryViewModel();
model.Name = Kategoriler.Name;
model.CategoryType = Kategoriler.CategoryType;
model.Id = Kategoriler.Id;
return View(model);
}
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult AddMerchant()
{
ViewData["Users"] = userManager.GetUsersInRoleAsync("User").Result.ToList();
return View();
}
[Authorize(Roles = "Admin")]
public IActionResult DeleteMerchant(string userName)
{
try
{
var user = userManager.Users.ToList().SingleOrDefault(x => x.UserName == userName);
userManager.RemoveFromRoleAsync(user, "Merchant").Wait();
userManager.AddToRoleAsync(user, "User").Wait();
var products = productService.GetList().Where(x => x.MerchantUserName == userName);
foreach (var product in products)
{
productService.Delete(product.Id);
}
}
catch (Exception) { }
Response.StatusCode = 200;
object obj = new
{
admins = userManager.GetUsersInRoleAsync("Admin").Result.ToList(),
users = userManager.GetUsersInRoleAsync("User").Result.ToList(),
merchants = userManager.GetUsersInRoleAsync("Merchant").Result.ToList()
};
return Json(obj);
}
[Authorize(Roles = "Admin")]
public IActionResult ListRole()
{
ViewData["userManager"] = userManager;
return View();
}
[Authorize(Roles = "Admin")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult AddPopup(PopupViewModel popupViewModel)
{
bool status = false;
var radioValue = popupViewModel.Status;
if(radioValue == 0)
{
var getTruestatus = popupService.GetList().Where(x => x.Status == true);
if (getTruestatus != null)
{
foreach (var getTrue in getTruestatus)
{
getTrue.Status = false;
popupService.Update(getTrue);
}
}
status = true;
}
Popup popup = new Popup
{
Message = popupViewModel.Message,
Status = status
};
popupService.Add(popup);
return RedirectToAction("ListPopup");
}
[Authorize(Roles = "Admin")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult AddMerchant(User user)
{
if (!roleManager.RoleExistsAsync("Merchant").Result)
{
Role role = new Role { Name = "Merchant" };
IdentityResult roleResult = roleManager.CreateAsync(role).Result;
}
var getUser = userManager.Users.ToList().SingleOrDefault(x => x.UserName == user.UserName);
userManager.RemoveFromRoleAsync(getUser, "User").Wait();
userManager.AddToRoleAsync(getUser, "Merchant").Wait();
return RedirectToAction("ListRole");
}
[Authorize(Roles = "Admin")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult AddCategory(CategoryViewModel categoryViewModel)
{
if (ModelState.IsValid)
{
Category mainCategory = categoryService.GetMainCategory(categoryViewModel.CategoryType);
Category category = new Category
{
Name = categoryViewModel.Name,
CategoryType = categoryViewModel.CategoryType,
MainCategoryId = mainCategory.Id,
};
if (categoryViewModel.File != null && categoryViewModel.File.Length > 0)
{
string fileName = "assets/img/" + DateTime.Now.ToFileTime() + "_" + categoryViewModel.File.FileName;
var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", fileName);
using (var stream = new FileStream(path, FileMode.Create))
{
categoryViewModel.File.CopyTo(stream);
}
category.ImageUrl = "/" + fileName;
}
categoryService.Add(category);
return RedirectToAction("ListCategory");
}
return View(categoryViewModel);
}
[Authorize(Roles = "Admin")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult UpdateCategory(CategoryViewModel categoryViewModel)
{
if (ModelState.IsValid)
{
Category category = categoryService.Get(categoryViewModel.Id);
Category mainCategory = categoryService.GetMainCategory(categoryViewModel.CategoryType);
category.Name = categoryViewModel.Name;
category.CategoryType = categoryViewModel.CategoryType;
category.MainCategoryId = mainCategory.Id;
if (categoryViewModel.File != null && categoryViewModel.File.Length > 0)
{
string fileName = "assets/img/" + DateTime.Now.ToFileTime() + "_" + categoryViewModel.File.FileName;
var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", fileName);
using (var stream = new FileStream(path, FileMode.Create))
{
categoryViewModel.File.CopyTo(stream);
}
category.ImageUrl = "/" + fileName;
}
categoryService.Update(category);
return RedirectToAction("ListCategory");
}
return View(categoryViewModel);
}
#region merchant
[Authorize(Roles = "Admin, Merchant")]
public IActionResult Index()
{
DashboardViewModel dashboardViewModel = new DashboardViewModel();
dashboardViewModel.MostSales = productService.GetList().OrderByDescending(x => x.SoldCount).Take(5).ToList();
dashboardViewModel.MostAddsToCart = productService.GetList().OrderByDescending(x => x.AddedToCartCount).Take(5).ToList();
dashboardViewModel.MostSalesCategories = categoryService.GetList().Where(x => x.MainCategoryId != Guid.Empty).OrderByDescending(x => x.SoldCount).Take(3).ToList();
dashboardViewModel.DailyMembers = userManager.Users.Where(x => x.RegisteredDate.Value.Day == DateTime.Now.Day).Count();
dashboardViewModel.MonthlyMembers = userManager.Users.Where(x => x.RegisteredDate.Value.Month == DateTime.Now.Month).Count();
dashboardViewModel.TotalMembers = userManager.Users.Count();
dashboardViewModel.DailyVisitor = visitService.GetList().Where(x => x.Date.Value.Day == DateTime.Now.Day).Count();
dashboardViewModel.MonthlyVisitor = visitService.GetList().Where(x => x.Date.Value.Month == DateTime.Now.Month).Count();
dashboardViewModel.TotalVisitor = visitService.GetList().Count;
var totalSales = saleService.GetList();
foreach (var sale in totalSales)
{
Product product = productService.Get(sale.ProductId);
dashboardViewModel.TotalSales += product.SoldCount;
}
var dailySales = totalSales.Where(x => x.Date.Value.Day == DateTime.Now.Day);
foreach (var sale in dailySales)
{
Product product = productService.Get(sale.ProductId);
dashboardViewModel.DailySales += product.SoldCount;
}
var weeklySales = totalSales.Where(x => x.Date.Value.Month == DateTime.Now.Month);
foreach (var sale in weeklySales)
{
Product product = productService.Get(sale.ProductId);
dashboardViewModel.MonthlySales += product.SoldCount;
}
return View(dashboardViewModel);
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult AddDiscount()
{
var getList = categoryService.GetList();
if (getList != null)
{
if (User.IsInRole("Admin"))
{
ViewData["Categories"] = getList;
}
else ViewData["MerchantProducts"] = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name).ToList();
}
return View();
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult AddProduct()
{
var getList = categoryService.GetList();
if (getList != null)
{
ViewData["Categories"] = getList;
}
return View();
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult ListProduct()
{
List<ProductViewModel> productViewModels = new List<ProductViewModel>();
List<Product> Urunler = new List<Product>();
Urunler = productService.GetList();
if (Urunler != null)
{
if (User.IsInRole("Merchant"))
Urunler = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name).ToList();
foreach (var urun in Urunler)
{
ProductViewModel model = new ProductViewModel();
model.Name = urun.Name;
model.Category = categoryService.Get(urun.CategoryId);
model.MainCategory = categoryService.GetMainCategory(model.Category.CategoryType).Name;
model.Price = urun.Price;
model.Stock = urun.Stock;
model.Id = urun.Id;
model.Discounts = urun.Discounts;
model.PriceWithDiscounts = urun.PriceWithDiscounts;
productViewModels.Add(model);
}
}
return View(productViewModels);
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult ListCategory(string categoryTypeId)
{
List<CategoryViewModel> categoryViewModels = new List<CategoryViewModel>();
List<Category> categories = new List<Category>();
List<Product> products = new List<Product>();
categories = categoryService.GetList();
if (categories != null)
{
foreach (var category in categories)
{
if (category.MainCategoryId != Guid.Empty)
{
CategoryViewModel model = new CategoryViewModel();
products = productService.GetList().Where(x => x.CategoryId == category.Id).ToList();
model.Name = category.Name;
model.CategoryType = category.CategoryType;
model.Id = category.Id;
model.ProductCount = products.Count();
categoryViewModels.Add(model);
}
}
}
return View(categoryViewModels);
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult ListDiscount()
{
List<DiscountViewModel> discountViewModels = new List<DiscountViewModel>();
List<Discount> discounts = new List<Discount>();
discounts = discountService.GetList();
if (discounts != null)
{
if (User.IsInRole("Merchant"))
discounts = discountService.GetList().Where(x => x.MerchantUserName == User.Identity.Name).ToList();
foreach (var discount in discounts)
{
DiscountViewModel model = new DiscountViewModel();
model.Id = discount.Id;
model.Percent = discount.Percent;
model.MerchantUserName = discount.MerchantUserName;
model.ProductId = discount.ProductId;
model.CategoryId = discount.CategoryId;
model.Name = discount.Name;
discountViewModels.Add(model);
}
return View(discountViewModels);
}
return View();
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult DeleteProduct(Guid id)
{
if (id != Guid.Empty)
{
try
{
productService.Delete(id);
}
catch (Exception) { }
}
Response.StatusCode = 200;
return Json(new { status = "success" });
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult DeleteDiscount(Guid id)
{
if (id != Guid.Empty)
{
try
{
var getDiscount = discountService.Get(id);
if (getDiscount.CategoryId != Guid.Empty)
{
var getCategory = categoryService.Get(getDiscount.CategoryId);
getCategory.Discounts -= getDiscount.Percent;
categoryService.Update(getCategory);
}
else if (getDiscount.ProductId != Guid.Empty)
{
var getProduct = productService.Get(getDiscount.ProductId);
getProduct.Discounts -= getDiscount.Percent;
productService.Update(getProduct);
}
discountService.Delete(id);
}
catch (Exception) { }
}
Response.StatusCode = 200;
return Json(new { status = "success" });
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult ListProductFilter(int productId)
{
List<ProductViewModel> productViewModels = new List<ProductViewModel>();
List<Product> filterProducts = new List<Product>();
if (filterProducts != null)
{
if (productId == 0)
{
productViewModels = new List<ProductViewModel>();
if (User.IsInRole("Merchant"))
filterProducts = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name && x.IsAvailable == true).ToList();
else
filterProducts = productService.GetList().Where(k => k.IsAvailable == true).ToList();
foreach (var product in filterProducts)
{
ProductViewModel model = new ProductViewModel();
model.Name = product.Name;
model.Category = categoryService.Get(product.CategoryId);
model.MainCategory = categoryService.Get(model.Category.MainCategoryId).Name;
model.Price = product.Price;
model.Stock = product.Stock;
model.IsAvailable = product.IsAvailable;
model.Id = product.Id;
model.Discounts = product.Discounts;
model.PriceWithDiscounts = product.PriceWithDiscounts;
productViewModels.Add(model);
}
}
else if (productId == 1)
{
productViewModels = new List<ProductViewModel>();
if (User.IsInRole("Merchant"))
filterProducts = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name && x.IsAvailable == false).ToList();
else
filterProducts = productService.GetList().Where(k => k.IsAvailable == false).ToList();
foreach (var product in filterProducts)
{
ProductViewModel model = new ProductViewModel();
model.Name = product.Name;
model.Category = categoryService.Get(product.CategoryId);
model.MainCategory = categoryService.Get(model.Category.MainCategoryId).Name;
model.Price = product.Price;
model.Stock = product.Stock;
model.IsAvailable = product.IsAvailable;
model.Id = product.Id;
productViewModels.Add(model);
}
}
else if (productId == 2)
{
productViewModels = new List<ProductViewModel>();
if (User.IsInRole("Merchant"))
filterProducts = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name).ToList();
else
filterProducts = productService.GetList().ToList();
foreach (var product in filterProducts)
{
ProductViewModel model = new ProductViewModel();
model.Name = product.Name;
model.Category = categoryService.Get(product.CategoryId);
model.MainCategory = categoryService.Get(model.Category.MainCategoryId).Name;
model.Price = product.Price;
model.Stock = product.Stock;
model.IsAvailable = product.IsAvailable;
model.Id = product.Id;
productViewModels.Add(model);
}
}
}
return Json(productViewModels);
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult ListCategoryFilter(int categoryId)
{
List<CategoryViewModel> categoryViewModels = new List<CategoryViewModel>();
List<Category> categories = new List<Category>();
List<Product> products = new List<Product>();
categories = categoryService.GetList();
if (categories != null)
{
if(Convert.ToInt32(categoryId) == 3)
{
categories = categoryService.GetList().Where(x => x.MainCategoryId != Guid.Empty).ToList();
foreach (var category in categories)
{
CategoryViewModel model = new CategoryViewModel();
products = productService.GetList().Where(x => x.CategoryId == category.Id).ToList();
model.Name = category.Name;
model.CategoryType = category.CategoryType;
model.Id = category.Id;
model.ProductCount = products.Count();
model.MainCategoryId = category.MainCategoryId;
categoryViewModels.Add(model);
}
}
else
{
categories = categoryService.GetList().Where(x => x.MainCategoryId != Guid.Empty && x.CategoryType == (CategoryTypes)categoryId).ToList();
foreach (var category in categories)
{
CategoryViewModel model = new CategoryViewModel();
products = productService.GetList().Where(x => x.CategoryId == category.Id).ToList();
model.Name = category.Name;
model.CategoryType = category.CategoryType;
model.Id = category.Id;
model.ProductCount = products.Count();
model.MainCategoryId = category.MainCategoryId;
categoryViewModels.Add(model);
}
}
}
return Json(categoryViewModels);
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult ListRoleFilter(int ListId)
{
if (ListId == 0)
{
return Json(userManager.GetUsersInRoleAsync("User").Result.ToList());
}
else if (ListId == 1)
{
return Json(userManager.GetUsersInRoleAsync("Merchant").Result.ToList());
}
else if (ListId == 2)
{
return Json(userManager.GetUsersInRoleAsync("Admin").Result.ToList());
}
else if (ListId == 3)
{
object obj = new
{
admins = userManager.GetUsersInRoleAsync("Admin").Result.ToList(),
users = userManager.GetUsersInRoleAsync("User").Result.ToList(),
merchants = userManager.GetUsersInRoleAsync("Merchant").Result.ToList()
};
return Json(obj);
}
return View();
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult UpdateProduct(Guid id)
{
if (id != Guid.Empty)
{
Product product;
product = productService.Get(id);
ProductViewModel model = new ProductViewModel();
model.Name = product.Name;
model.Id = product.Id;
model.Category = categoryService.Get(product.CategoryId);
model.MainCategory = categoryService.GetMainCategory(model.Category.CategoryType).Name;
model.Price = product.Price;
model.Stock = product.Stock;
model.Description = product.Description;
var getList = categoryService.GetList();
if (getList != null)
{
ViewData["Categories"] = getList;
}
return View(model);
}
return View();
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult AddProductAltKategorileriGetir(Guid KategoriID)
{
List<Category> TumAltKategoriler = new List<Category>();
TumAltKategoriler = categoryService.GetList();
List<Category> altkategoriler = TumAltKategoriler.Where(k => k.MainCategoryId == KategoriID).ToList();
return Json(altkategoriler);
}
[Authorize(Roles = "Admin, Merchant")]
public IActionResult AddDiscountAltUrunleriGetir(Guid KategoriID)
{
List<Product> TumAltUrunler = new List<Product>();
if (User.IsInRole("Merchant"))
TumAltUrunler = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name).ToList();
else
TumAltUrunler = productService.GetList();
List<Product> altkategoriler = TumAltUrunler.Where(k => k.CategoryId == KategoriID).ToList();
return Json(altkategoriler);
}
[Authorize(Roles = "Admin, Merchant")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult AddProduct(ProductViewModel productViewModel)
{
if (ModelState.IsValid)
{
Product product = new Product
{
Name = productViewModel.Name,
Price = productViewModel.Price,
Stock = productViewModel.Stock,
CategoryId = productViewModel.Category.Id,
IsAvailable = productViewModel.IsAvailable,
MerchantUserName = User.Identity.Name,
Description = productViewModel.Description
};
if (productViewModel.File != null && productViewModel.File.Length > 0)
{
string fileName = "assets/img/" + DateTime.Now.ToFileTime() + "_" + productViewModel.File.FileName;
var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", fileName);
using (var stream = new FileStream(path, FileMode.Create))
{
productViewModel.File.CopyTo(stream);
}
product.ImageUrl = "/" + fileName;
}
productService.Add(product);
return RedirectToAction("ListProduct");
}
return View(productService);
}
[Authorize(Roles = "Admin, Merchant")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult AddDiscount(DiscountViewModel discountViewModel)
{
//üründe indirim var
if (discountViewModel.ProductId != Guid.Empty)
{
Discount discount = new Discount();
Product product = productService.Get(discountViewModel.ProductId);
product.Discounts += discountViewModel.Percent;
discount.ProductId = discountViewModel.ProductId;
discount.Percent = discountViewModel.Percent;
discount.Name = product.Name;
discount.MerchantUserName = User.Identity.Name;
discountService.Add(discount);
productService.Update(product);
}
else if (discountViewModel.CategoryId != Guid.Empty) //kategoride indirim var
{
Discount discount = new Discount();
Category category = categoryService.Get(discountViewModel.CategoryId);
category.Discounts += discountViewModel.Percent;
string mainCategoryName = categoryService.Get(category.MainCategoryId).Name;
discount.CategoryId = discountViewModel.CategoryId;
discount.Percent = discountViewModel.Percent;
discount.Name = mainCategoryName + " - " + category.Name;
discount.MerchantUserName = User.Identity.Name;
discountService.Add(discount);
categoryService.Update(category);
}
else if (discountViewModel.MainCategoryId != Guid.Empty)//ana kategoride indirim var
{
List<Category> categories = categoryService.GetList().Where(x => x.MainCategoryId == discountViewModel.MainCategoryId).ToList();
foreach (Category category in categories)
{
string mainCategoryName = categoryService.Get(category.MainCategoryId).Name;
Discount discount = new Discount();
category.Discounts += discountViewModel.Percent;
discount.CategoryId = category.Id;
discount.Percent = discountViewModel.Percent;
discount.Name = mainCategoryName + " - " + category.Name;
discount.MerchantUserName = User.Identity.Name;
discountService.Add(discount);
categoryService.Update(category);
}
}
else if(User.IsInRole("Admin"))//tüm ürünlerde indirim var
{
List<Category> categories = categoryService.GetList().Where(x => x.MainCategoryId != Guid.Empty).ToList();
foreach (Category category in categories)
{
string mainCategoryName = categoryService.Get(category.MainCategoryId).Name;
Discount discount = new Discount();
category.Discounts += discountViewModel.Percent;
discount.CategoryId = category.Id;
discount.Percent = discountViewModel.Percent;
discount.Name = mainCategoryName + " - " + category.Name;
discount.MerchantUserName = User.Identity.Name;
discountService.Add(discount);
categoryService.Update(category);
}
}
else if (User.IsInRole("Merchant") && discountViewModel.ProductId == Guid.Empty)
{
var products = productService.GetList().Where(x => x.MerchantUserName == User.Identity.Name).ToList();
foreach (var item in products)
{
Discount discount = new Discount();
item.Discounts += discountViewModel.Percent;
discount.ProductId = discountViewModel.ProductId;
discount.Percent = discountViewModel.Percent;
discount.Name = item.Name;
discount.MerchantUserName = User.Identity.Name;
discountService.Add(discount);
productService.Update(item);
}
}
return RedirectToAction("ListDiscount");
}
[Authorize(Roles = "Admin, Merchant")]
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult UpdateProduct(ProductViewModel productViewModel)
{
if (ModelState.IsValid)
{
Product product = productService.Get(productViewModel.Id);
product.Name = productViewModel.Name;
product.Price = productViewModel.Price;
product.Stock = productViewModel.Stock;
product.IsAvailable = productViewModel.IsAvailable;
product.CategoryId = productViewModel.Category.Id;
product.Description = productViewModel.Description;
if (productViewModel.File != null || productViewModel.File.Length > 0)
{
string fileName = "assets/img/" + DateTime.Now.ToFileTime() + "_" + productViewModel.File.FileName;
var path = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", fileName);
using (var stream = new FileStream(path, FileMode.Create))
{
productViewModel.File.CopyTo(stream);
}
product.ImageUrl = "/" + fileName;
}
productService.Update(product);
return RedirectToAction("ListProduct");
}
return View(productViewModel);
}
#endregion
}
}
| 37.869149 | 312 | 0.524117 | [
"MIT"
] | jovasoft/HizliTicaret | HizliTicaret/Web/Controllers/AdminController.cs | 35,602 | C# |
using System.Reflection;
namespace DependencyInjector.Constants
{
public static class BuildInfo
{
#if DEBUG
public const bool IsDebug = true;
#else
public const bool IsDebug = false;
#endif
public static readonly string Version = Assembly.GetAssembly(typeof (Contract)).GetName().Version.ToString();
}
} | 21.4375 | 117 | 0.699708 | [
"MIT"
] | dependencyinjector/dependencyinjector | DependencyInjector/DependencyInjector/Constants/BuildInfo.cs | 345 | C# |
/**
* Copyright (c) 2014-present, Facebook, Inc.
* Copyright (c) 2018-present, Marius Klimantavičius
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
//https://github.com/marius-klimantavicius/yoga
namespace LayoutFarm.MariusYoga
{
public delegate YogaSize YogaMeasure(YogaNode node, float? width, YogaMeasureMode widthMode, float? height, YogaMeasureMode heightMode);
public delegate float YogaBaseline(YogaNode node, float? width, float? height);
public delegate void YogaDirtied(YogaNode node);
public delegate void YogaPrint(YogaNode node);
public delegate void YogaNodeCloned(YogaNode oldNode, YogaNode newNode, YogaNode owner, int childIndex);
}
| 40.052632 | 140 | 0.767411 | [
"MIT"
] | LayoutFarm/PixelFarm | src/Tests/Marius.Yoga/YogaDelegates.cs | 764 | C# |
using UnityEngine;
namespace SOLID.DependencyInversion
{
public class MoverGood : MonoBehaviour
{
[SerializeField] private float speed = 5f;
private IMovementInputGetter movementInputGetter = null;
private void Awake() => movementInputGetter = GetComponent<IMovementInputGetter>();
private void Update()
{
Vector3 movement = new Vector3
{
x = movementInputGetter.Horizontal,
y = 0f,
z = movementInputGetter.Vertical,
}.normalized;
movement *= speed * Time.deltaTime;
transform.Translate(movement);
}
}
}
| 23.448276 | 91 | 0.583824 | [
"MIT"
] | DapperDino/S.O.L.I.D | Assets/Scripts/DependencyInversion/MoverGood.cs | 682 | C# |
using System;
using System.Collections.Generic;
using System.Text;
using JokinsCryptor;
using Xunit;
namespace JokinsCryptor.Tests
{
public class SHA_Tests
{
[Fact(DisplayName = "SHA1 success test")]
public void SHA1_Success_Test()
{
var srcString = "sha encrypt";
//Ack
var hashed = EncryptProvider.Sha1(srcString);
//Assert
Assert.NotEmpty(hashed);
Assert.Equal("167e1772beced535bf5d1d8a14d858a68a66eb64", hashed.ToLower());
}
[Fact(DisplayName = "SHA1 fail test")]
public void SHA1_Fail_Test()
{
var srcString = string.Empty;
//Assert
Assert.Throws<ArgumentNullException>(() => EncryptProvider.Sha1(srcString));
}
[Fact(DisplayName = "SHA256 success test")]
public void SHA256_Success_Test()
{
var srcString = "sha encrypt";
//Ack
var hashed = EncryptProvider.Sha256(srcString);
//Assert
Assert.NotEmpty(hashed);
Assert.Equal("8dfdbf14004e54dfa3b7faa5f59bda6614793bc0e0896086890901c974bb2578", hashed.ToLower());
}
[Fact(DisplayName = "SHA256 fail test")]
public void SHA256_Fail_Test()
{
var srcString = string.Empty;
//Assert
Assert.Throws<ArgumentNullException>(() => EncryptProvider.Sha256(srcString));
}
[Fact(DisplayName = "SHA384 success test")]
public void SHA384_Success_Test()
{
var srcString = "sha encrypt";
//Ack
var hashed = EncryptProvider.Sha384(srcString);
//Assert
Assert.NotEmpty(hashed);
Assert.Equal("36c125449395902f5e02b6f3546877b662929470aaabf1a1f367bbb846c8a1499c7eebed3e253c05cf944ac4750653e1", hashed.ToLower());
}
[Fact(DisplayName = "SHA384 fail test")]
public void SHA384_Fail_Test()
{
var srcString = string.Empty;
//Assert
Assert.Throws<ArgumentNullException>(() => EncryptProvider.Sha384(srcString));
}
[Fact(DisplayName = "SHA512 success test")]
public void SHA512_Success_Test()
{
var srcString = "sha encrypt";
//Ack
var hashed = EncryptProvider.Sha512(srcString);
//Assert
Assert.NotEmpty(hashed);
Assert.Equal("08b90382193f2c9ea9d23d55f7416be068ffcbc8fe629f53977475c00e37c566612d7d698a00e813e3715e200a8f78c387c4059aef906ffe4db212f2fa3dea1d", hashed.ToLower());
}
[Fact(DisplayName = "SHA512 fail test")]
public void SHA512_Fail_Test()
{
var srcString = string.Empty;
//Assert
Assert.Throws<ArgumentNullException>(() => EncryptProvider.Sha512(srcString));
}
}
}
| 28.514563 | 175 | 0.590398 | [
"MIT"
] | JokinAce/JokinsCryptor | test/JokinsCryptor.Tests/SHA_Tests.cs | 2,937 | C# |
using CryptoApisLibrary.DataTypes;
using CryptoApisLibrary.ResponseTypes.Blockchains;
using System;
namespace CryptoApisSnippets.Samples.Blockchains
{
partial class BlockchainSnippets
{
public void GetXPubChangeAddressesDoge()
{
var xpub = "dgub8nixrpFXn11V8rnfHrHj9CtnUVNnvxvRcH8HFzXgp5ndWwBFrQdRhnwryvn74VHJUSj2YEvRqjGuzvoWWNByhXhCMvTGSaDnngQMXKDaiXZ";
var startIndex = 0;
var finishIndex = 3;
var manager = new CryptoManager(ApiKey);
var response = manager.Blockchains.Wallet.GetXPubChangeAddresses<GetXPubAddressesResponse>(
NetworkCoin.DogeMainNet, xpub, startIndex, finishIndex);
Console.WriteLine(string.IsNullOrEmpty(response.ErrorMessage)
? "GetXPubChangeAddressesDoge executed successfully, " +
$"\"{response.Addresses.Count}\" addresses were created "
: $"GetXPubChangeAddressesDoge error: {response.ErrorMessage}");
}
}
} | 37 | 131 | 0.756757 | [
"MIT"
] | Crypto-APIs/.NET-Library | CryptoApisSnippets/Samples/Blockchains/Wallets/GetXPubChangeAddressesDoge.cs | 927 | C# |
using System;
namespace Database.Exceptions
{
public class ClientNotInitializedException : Exception
{
public ClientNotInitializedException() :
base("Initialize elastic client before using it.")
{
}
}
} | 20.916667 | 62 | 0.645418 | [
"MIT"
] | Parsa2820/Polaris-MSSQL | Back end/Polaris/Database/Exceptions/ClientNotInitializedException.cs | 251 | C# |
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using System;
using System.Collections.Generic;
using System.IO;
using TGC.Core.BoundingVolumes;
using TGC.Core.Direct3D;
using TGC.Core.Mathematica;
using TGC.Core.SceneLoader;
using TGC.Core.Textures;
using TGC.Group.Model.CreateBufferStrategy;
using static TGC.Core.SceneLoader.TgcSceneLoader;
namespace TGC.Group.Model
{
public class MeshBuilder
{
//Constante
internal const string SEPARADOR = "\\";
//Variables
private Mesh dxMesh { get; set; }
public IMeshFactory MeshFactory { get; set; }
public ChargueBufferStrategy ChargueBufferStrategy { get; set; }
public Material[] MeshMaterials { get; set; }
private TgcTexture[] MeshTextures { get; set; }
private bool autoTransform { get; set; }
private bool enable { get; set; }
private bool hasBoundingBox { get; set; }
private List<TgcObjMaterialAux> MaterialsArray { get; set; }
public Device Device { get; set; }
public MeshBuilder()
{
MeshFactory = new DefaultMeshFactory();
ChargueBufferStrategy = new ChargueBufferColorSoloStrategy();
}
public Mesh GetInstaceDxMesh()
{
return dxMesh;
}
/// <summary>
/// Agrega El/Los materiales, cambia el tipo de VertexElement
/// </summary>
/// <param name="objMaterialLoader">Clase ObjMaterialLader</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder AddMaterials(ObjMaterialsLoader objMaterialLoader)
{
//create material
// TODO
MaterialsArray = new List<TgcObjMaterialAux>();
objMaterialLoader.ListObjMaterialMesh.ForEach((objMaterialMesh =>
{
MaterialsArray.Add(createTextureAndMaterial(objMaterialMesh, objMaterialLoader.currentDirectory));
}
));
//set nueva mesh strategy
ChargueBufferStrategy = new ChargueBufferDiffuseMapStrategy(); // TODO ver que pasa caundo viene ligthmap
return this;
}
/// <summary>
/// Agrega El/Los materiales y luego los hace el set de los atributos
/// meshMaterials y meshTextures
/// </summary>
/// <returns>MeshBuilder</returns>
public MeshBuilder ChargueMaterials()
{
//Cargar array de Materials y Texturas TODO separar la creacion del material de la textura
MeshMaterials = new Material[MaterialsArray.Count];
MeshTextures = new TgcTexture[GetTextureCount()]; //GetTextureCount()
var indexTexture = 0;
MaterialsArray.ForEach((objMaterial) =>
{
MeshMaterials[MaterialsArray.IndexOf(objMaterial)] = objMaterial.materialId;
if (objMaterial.textureFileName != null)
{
MeshTextures[indexTexture] = TgcTexture.createTexture(
D3DDevice.Instance.Device,
objMaterial.textureFileName,
objMaterial.texturePath);
indexTexture++;
}
});
return this;
}
/// <summary>
/// Obtiene la cantidad materiales que poseen textura
/// </summary>
/// <returns>int</returns>
public int GetTextureCount()
{
var count = 0;
MaterialsArray.ForEach((objMaterial) =>
{
if (objMaterial.textureFileName != null) count++;
});
return count;
}
/// <summary>
/// Cargar attributeBuffer con los id de las texturas de cada triángulo
/// </summary>
/// <param name="materialsIds">int[]</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder ChargeAttributeBuffer(int[] materialsIds)
{
var attributeBuffer = dxMesh.LockAttributeBufferArray(LockFlags.None);
Array.Copy(materialsIds, attributeBuffer, attributeBuffer.Length);
dxMesh.UnlockAttributeBuffer(attributeBuffer);
return this;
}
/// <summary>
/// Crea una instancia del mesh de DirectX
/// </summary>
/// <param name="cantFace">int</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder AddDxMesh(int cantFace)
{
this.dxMesh = new Mesh(cantFace, cantFace * 3, MeshFlags.Managed, ChargueBufferStrategy.VertexElementInstance, D3DDevice.Instance.Device);
return this;
}
/// <summary>
/// Indica al builder si el mesh posee autotransformacion
/// </summary>
/// <param name="flag">boolean</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder AddAutotransform(bool flag)
{
this.autoTransform = flag;
return this;
}
/// <summary>
/// Indica al builder si el mesh esta disponible para modificaciones
/// </summary>
/// <param name="flag">boolean</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder SetEnable(bool flag)
{
this.enable = flag;
return this;
}
/// <summary>
/// Indica al builder si se debe crear un bounding box
/// en base a los parametros de objMesh, por defecto genera uno stardar
/// </summary>
/// <param name="flag">boolean</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder SetHasBoundingBox(bool flag)
{
this.hasBoundingBox = flag;
return this;
}
/// <summary>
/// Carga el buffer del mesh de DirectX usando la estrategia correcta para s estructura
/// </summary>
/// <param name="objMeshContainer"></param>
/// <param name="index"></param>
/// <param name="objMesh">ObjMesh</param>
/// <returns>MeshBuilder</returns>
public MeshBuilder ChargeBuffer(ObjMeshContainer objMeshContainer, int index)
{
ChargueBufferStrategy.ChargeBuffer(objMeshContainer, this.dxMesh, index);
return this;
}
/// <summary>
/// Construye el mesh con los atributos que se le fueron agregando
/// </summary>
/// <param name="objMesh">ObjMesh</param>
/// <returns>MeshBuilder</returns>
public TgcMesh Build(ObjMesh objMesh)
{
TgcMesh unMesh = MeshFactory.createNewMesh(dxMesh, objMesh.Name, ChargueBufferStrategy.RenderType);
SetBoundingBox(unMesh);
unMesh.AutoTransform = autoTransform;
unMesh.Enabled = enable;
unMesh.Materials = MeshMaterials;
unMesh.DiffuseMaps = MeshTextures;
return unMesh;
}
/// <summary>
/// Cargar indexBuffer del mesh de DirectX en forma plana
/// </summary>
/// <param name="objMesh">ObjMesh</param>
/// <returns>MeshBuilder</returns>
private void SetBoundingBox(TgcMesh unMesh)
{
//Crear BoundingBox, aprovechar lo que viene del OBJ o crear uno por nuestra cuenta
if (hasBoundingBox)
{
unMesh.BoundingBox = new TgcBoundingAxisAlignBox(
new TGCVector3(1, 1, 1), //Esto es re saraza TODO hay que ver si la info del obj puede calcular los puntos minimos y maximos. o si se pueden agregar al archivo.
new TGCVector3(1, 1, 1),
unMesh.Position,
unMesh.Scale
);
}
else
{
unMesh.createBoundingBox();
}
}
/// <summary>
/// Estructura auxiliar para cargar SubMaterials y Texturas
/// </summary>
internal class TgcObjMaterialAux
{
public Material materialId;
public string textureFileName;
public string texturePath;
}
/// <summary>
/// Crea Material y Textura
/// </summary>
private TgcObjMaterialAux createTextureAndMaterial(ObjMaterialMesh objMaterialMesh, string currentDirectory)
{
var matAux = new TgcObjMaterialAux();
//Crear material
var material = new Material();
matAux.materialId = material;
material.AmbientColor = objMaterialMesh.Ka;
material.DiffuseColor = objMaterialMesh.Kd;
material.SpecularColor = objMaterialMesh.Ks;
//TODO ver que hacer con Ni, con d, con Ns, con Ke.
//guardar datos de textura
matAux.texturePath = objMaterialMesh.getTextura() ?? Path.GetFullPath(currentDirectory + SEPARADOR + objMaterialMesh.getTexturaFileName());
matAux.textureFileName = objMaterialMesh.getTexturaFileName();
return matAux;
}
/// <summary>
/// FVF para formato de malla DIFFUSE_MAP
/// </summary>
public static readonly VertexElement[] DiffuseMapVertexElements =
{
new VertexElement(0, 0, DeclarationType.Float3,
DeclarationMethod.Default,
DeclarationUsage.Position, 0),
new VertexElement(0, 12, DeclarationType.Float3,
DeclarationMethod.Default,
DeclarationUsage.Normal, 0),
new VertexElement(0, 24, DeclarationType.Color,
DeclarationMethod.Default,
DeclarationUsage.Color, 0),
new VertexElement(0, 28, DeclarationType.Float2,
DeclarationMethod.Default,
DeclarationUsage.TextureCoordinate, 0),
VertexElement.VertexDeclarationEnd
};
/// <summary>
/// FVF para formato de malla VERTEX_COLOR
/// </summary>
public static readonly VertexElement[] VertexColorVertexElements =
{
new VertexElement(0, 0, DeclarationType.Float3,
DeclarationMethod.Default,
DeclarationUsage.Position, 0),
new VertexElement(0, 12, DeclarationType.Float3,
DeclarationMethod.Default,
DeclarationUsage.Normal, 0),
new VertexElement(0, 24, DeclarationType.Color,
DeclarationMethod.Default,
DeclarationUsage.Color, 0),
VertexElement.VertexDeclarationEnd
};
}
} | 36.664384 | 182 | 0.577433 | [
"MIT"
] | MendezBruno/tgc-Objloader | TGC.Group/Model/MeshBuilder.cs | 10,709 | C# |
using System.Collections.Generic;
using Lucene.Net.Facet;
namespace Lucene.Net.Facet.Taxonomy
{
/*
* 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.
*/
using MatchingDocs = FacetsCollector.MatchingDocs;
using BinaryDocValues = Lucene.Net.Index.BinaryDocValues;
using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
using IntsRef = Lucene.Net.Util.IntsRef;
/// <summary>
/// Reads from any <seealso cref="OrdinalsReader"/>; use {@link
/// FastTaxonomyFacetCounts} if you are using the
/// default encoding from <seealso cref="BinaryDocValues"/>.
///
/// @lucene.experimental
/// </summary>
public class TaxonomyFacetCounts : IntTaxonomyFacets
{
private readonly OrdinalsReader ordinalsReader;
/// <summary>
/// Create {@code TaxonomyFacetCounts}, which also
/// counts all facet labels. Use this for a non-default
/// <seealso cref="OrdinalsReader"/>; otherwise use {@link
/// FastTaxonomyFacetCounts}.
/// </summary>
public TaxonomyFacetCounts(OrdinalsReader ordinalsReader, TaxonomyReader taxoReader, FacetsConfig config, FacetsCollector fc)
: base(ordinalsReader.IndexFieldName, taxoReader, config)
{
this.ordinalsReader = ordinalsReader;
Count(fc.GetMatchingDocs);
}
private void Count(IList<FacetsCollector.MatchingDocs> matchingDocs)
{
IntsRef scratch = new IntsRef();
foreach (FacetsCollector.MatchingDocs hits in matchingDocs)
{
OrdinalsReader.OrdinalsSegmentReader ords = ordinalsReader.GetReader(hits.context);
DocIdSetIterator docs = hits.bits.GetIterator();
int doc;
while ((doc = docs.NextDoc()) != DocIdSetIterator.NO_MORE_DOCS)
{
ords.Get(doc, scratch);
for (int i = 0; i < scratch.Length; i++)
{
values[scratch.Ints[scratch.Offset + i]]++;
}
}
}
Rollup();
}
}
} | 38.558442 | 133 | 0.627147 | [
"Apache-2.0"
] | CerebralMischief/lucenenet | src/Lucene.Net.Facet/Taxonomy/TaxonomyFacetCounts.cs | 2,971 | C# |
using Emby.Naming.Common;
using Emby.Naming.TV;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Emby.Naming.Tests.TV
{
[TestClass]
public class EpisodeNumberTests
{
[TestMethod]
public void TestEpisodeNumber1()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\S02E03 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber40()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2\02x03 - 02x04 - 02x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber41()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\01x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber42()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\S01x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber43()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\S01E02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber44()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2\Elementary - 02x03-04-15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber45()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\S01xE02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber46()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\seriesname S01E02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber47()
{
Assert.AreEqual(36, GetEpisodeNumberFromFile(@"Season 2\[HorribleSubs] Hunter X Hunter - 136 [720p].mkv"));
}
[TestMethod]
public void TestEpisodeNumber50()
{
// This convention is not currently supported, just adding in case we want to look at it in the future
Assert.AreEqual(1, GetEpisodeNumberFromFile(@"2016\Season s2016e1.mp4"));
}
[TestMethod]
public void TestEpisodeNumber51()
{
// This convention is not currently supported, just adding in case we want to look at it in the future
Assert.AreEqual(1, GetEpisodeNumberFromFile(@"2016\Season 2016x1.mp4"));
}
[TestMethod]
public void TestEpisodeNumber52()
{
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\Episode - 16.avi"));
}
[TestMethod]
public void TestEpisodeNumber53()
{
// This is not supported. Expected to fail, although it would be a good one to add support for.
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\Episode 16.avi"));
}
[TestMethod]
public void TestEpisodeNumber54()
{
// This is not supported. Expected to fail, although it would be a good one to add support for.
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\Episode 16 - Some Title.avi"));
}
[TestMethod]
public void TestEpisodeNumber55()
{
// This is not supported. Expected to fail, although it would be a good one to add support for.
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\Season 3 Episode 16.avi"));
}
[TestMethod]
public void TestEpisodeNumber56()
{
// This is not supported. Expected to fail, although it would be a good one to add support for.
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\Season 3 Episode 16 - Some Title.avi"));
}
[TestMethod]
public void TestEpisodeNumber57()
{
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\16 Some Title.avi"));
}
[TestMethod]
public void TestEpisodeNumber58()
{
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\16 - 12 Some Title.avi"));
}
[TestMethod]
public void TestEpisodeNumber59()
{
Assert.AreEqual(7, GetEpisodeNumberFromFile(@"Season 2\7 - 12 Angry Men.avi"));
}
[TestMethod]
public void TestEpisodeNumber60()
{
Assert.AreEqual(16, GetEpisodeNumberFromFile(@"Season 2\16 12 Some Title.avi"));
}
[TestMethod]
public void TestEpisodeNumber61()
{
Assert.AreEqual(7, GetEpisodeNumberFromFile(@"Season 2\7 12 Angry Men.avi"));
}
[TestMethod]
public void TestEpisodeNumber62()
{
// This is not supported. Expected to fail, although it would be a good one to add support for.
Assert.AreEqual(3, GetEpisodeNumberFromFile(@"Season 4\Uchuu.Senkan.Yamato.2199.E03.avi"));
}
[TestMethod]
public void TestEpisodeNumber63()
{
Assert.AreEqual(3, GetEpisodeNumberFromFile(@"Season 4\Uchuu.Senkan.Yamato.2199.S04E03.avi"));
}
[TestMethod]
public void TestEpisodeNumber64()
{
Assert.AreEqual(368, GetEpisodeNumberFromFile(@"Running Man\Running Man S2017E368.mkv"));
}
[TestMethod]
public void TestEpisodeNumber65()
{
// Not supported yet
Assert.AreEqual(7, GetEpisodeNumberFromFile(@"\The.Legend.of.Condor.Heroes.2017.V2.web-dl.1080p.h264.aac-hdctv\\The.Legend.of.Condor.Heroes.2017.E07.V2.web-dl.1080p.h264.aac-hdctv.mkv"));
}
[TestMethod]
public void TestEpisodeNumber30()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2\02x03 - 02x04 - 02x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber31()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\seriesname 01x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber32()
{
Assert.AreEqual(9, GetEpisodeNumberFromFile(@"Season 25\The Simpsons.S25E09.Steal this episode.mp4"));
}
[TestMethod]
public void TestEpisodeNumber33()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\seriesname S01x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber34()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2\Elementary - 02x03 - 02x04 - 02x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber35()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\seriesname S01xE02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber36()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\02x03 - x04 - x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber37()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\Elementary - 02x03 - x04 - x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber38()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\02x03x04x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber39()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\Elementary - 02x03x04x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber20()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2\02x03-04-15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber21()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\02x03-E15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber22()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 02\Elementary - 02x03-E15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber23()
{
Assert.AreEqual(23, GetEpisodeNumberFromFile(@"Season 1\Elementary - S01E23-E24-E26 - The Woman.mp4"));
}
[TestMethod]
public void TestEpisodeNumber24()
{
Assert.AreEqual(23, GetEpisodeNumberFromFile(@"Season 2009\S2009E23-E24-E26 - The Woman.mp4"));
}
[TestMethod]
public void TestEpisodeNumber25()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\2009x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber26()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\S2009x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber27()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\S2009E02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber28()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\seriesname 2009x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber29()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\Elementary - 2009x03x04x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber11()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\2009x03x04x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber12()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\Elementary - 2009x03-E15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber13()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\S2009xE02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber14()
{
Assert.AreEqual(23, GetEpisodeNumberFromFile(@"Season 2009\Elementary - S2009E23-E24-E26 - The Woman.mp4"));
}
[TestMethod]
public void TestEpisodeNumber15()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\seriesname S2009xE02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber16()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\2009x03-E15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber17()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\seriesname S2009E02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber18()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\2009x03 - 2009x04 - 2009x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber19()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\2009x03 - x04 - x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber2()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2009\seriesname S2009x02 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber3()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\Elementary - 2009x03 - 2009x04 - 2009x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber4()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\Elementary - 2009x03-04-15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber5()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\2009x03-04-15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber6()
{
Assert.AreEqual(03, GetEpisodeNumberFromFile(@"Season 2009\Elementary - 2009x03 - x04 - x15 - Ep Name.mp4"));
}
[TestMethod]
public void TestEpisodeNumber7()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\02 - blah-02 a.avi"));
}
[TestMethod]
public void TestEpisodeNumber8()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 1\02 - blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber9()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2\02 - blah 14 blah.avi"));
}
[TestMethod]
public void TestEpisodeNumber10()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2\02.avi"));
}
[TestMethod]
public void TestEpisodeNumber48()
{
Assert.AreEqual(02, GetEpisodeNumberFromFile(@"Season 2\2. Infestation.avi"));
}
[TestMethod]
public void TestEpisodeNumber49()
{
Assert.AreEqual(7, GetEpisodeNumberFromFile(@"The Wonder Years\The.Wonder.Years.S04.PDTV.x264-JCH\The Wonder Years s04e07 Christmas Party NTSC PDTV.avi"));
}
private int? GetEpisodeNumberFromFile(string path)
{
var options = new NamingOptions();
var result = new EpisodePathParser(options)
.Parse(path, false);
return result.EpisodeNumber;
}
}
}
| 32.306954 | 199 | 0.594418 | [
"MIT"
] | MediaBrowser/Emby.Naming | Emby.Naming.Tests/TV/EpisodeNumberTests.cs | 13,474 | C# |
using System;
using System.Threading.Tasks;
namespace FlickrToCloud.Contracts.Interfaces
{
public interface IAuthenticationCallbackDispatcher
{
void Register(IAuthenticationCallback callback);
void Unregister(IAuthenticationCallback callback);
Task<bool> DispatchUriCallback(Uri eventArgsUri);
}
} | 27.916667 | 58 | 0.761194 | [
"MIT"
] | havlicekp/flickr-to-cloud | src/FlickrToCloud.Contracts/Interfaces/IAuthenticationCallbackDispatcher.cs | 337 | C# |
using iot.solution.data;
using iot.solution.entity;
using iot.solution.model.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Reflection;
using Entity = iot.solution.entity;
using LogHandler = component.services.loghandler;
using Model = iot.solution.model.Models;
namespace iot.solution.model.Repository.Implementation
{
public class CompanyRepository : GenericRepository<Model.Company>, ICompanyRepository
{
private readonly LogHandler.Logger _logger;
public CompanyRepository(IUnitOfWork unitOfWork, LogHandler.Logger logger) : base(unitOfWork, logger)
{
_logger = logger;
_uow = unitOfWork;
}
public ActionStatus Manage(Entity.AddCompanyRequest request)
{
ActionStatus result = new ActionStatus(true);
try
{
_logger.InfoLog(LogHandler.Constants.ACTION_ENTRY, null, "", "", this.GetType().Name, MethodBase.GetCurrentMethod().Name);
using (var sqlDataAccess = new SqlDataAccess(ConnectionString))
{
List<DbParameter> parameters = sqlDataAccess.CreateParams(component.helper.SolutionConfiguration.CurrentUserId, component.helper.SolutionConfiguration.Version);
parameters.Add(sqlDataAccess.CreateParameter("name", request.Name, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("cpid", request.CpId, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("address", request.Address, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("countryGuid", request.CountryGuid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("stateGuid", request.StateGuid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("city", request.City, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("postalCode", request.PostalCode, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("timezoneGuid", request.TimezoneGuid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("contactNo", request.ContactNo, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("firstName", request.FirstName, DbType.String, ParameterDirection.Output));
parameters.Add(sqlDataAccess.CreateParameter("lastName", request.LastName, DbType.String, ParameterDirection.Output));
parameters.Add(sqlDataAccess.CreateParameter("userId", request.UserID, DbType.Guid, ParameterDirection.Output));//Email
parameters.Add(sqlDataAccess.CreateParameter("companyGuid", request.CompanyGuid, DbType.Guid, ParameterDirection.Output));
parameters.Add(sqlDataAccess.CreateParameter("userGuid", request.AdminUserGuid, DbType.Guid, ParameterDirection.Output));
parameters.Add(sqlDataAccess.CreateParameter("greenhouseGuid", request.GreenHouseGuid, DbType.Guid, ParameterDirection.Output));
parameters.Add(sqlDataAccess.CreateParameter("roleGuid", request.RoleGuid, DbType.Guid, ParameterDirection.Output));
parameters.Add(sqlDataAccess.CreateParameter("culture", component.helper.SolutionConfiguration.Culture, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("enableDebugInfo", component.helper.SolutionConfiguration.EnableDebugInfo, DbType.String, ParameterDirection.Input));
int intResult = sqlDataAccess.ExecuteNonQuery(sqlDataAccess.CreateCommand("[Company_AddUpdate]", CommandType.StoredProcedure, null), parameters.ToArray());
result.Data = int.Parse(parameters.Where(p => p.ParameterName.Equals("output")).FirstOrDefault().Value.ToString());
}
_logger.InfoLog(LogHandler.Constants.ACTION_EXIT, null, "", "", this.GetType().Name, MethodBase.GetCurrentMethod().Name);
}
catch (Exception ex)
{
_logger.ErrorLog(ex, this.GetType().Name, MethodBase.GetCurrentMethod().Name);
}
return result;
}
public ActionStatus UpdateDetails(Model.Company request)
{
ActionStatus result = new ActionStatus(true);
try
{
_logger.InfoLog(LogHandler.Constants.ACTION_ENTRY, null, "", "", this.GetType().Name, MethodBase.GetCurrentMethod().Name);
using (var sqlDataAccess = new SqlDataAccess(ConnectionString))
{
List<DbParameter> parameters = sqlDataAccess.CreateParams(component.helper.SolutionConfiguration.CurrentUserId, component.helper.SolutionConfiguration.Version);
parameters.Add(sqlDataAccess.CreateParameter("companyGuid", request.Guid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("name", request.Name, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("contactNo", request.ContactNo, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("address", request.Address, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("countryGuid", request.CountryGuid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("stateGuid", request.StateGuid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("city", request.City, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("postalCode", request.PostalCode, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("timezoneGuid", request.TimezoneGuid, DbType.Guid, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("culture", component.helper.SolutionConfiguration.Culture, DbType.String, ParameterDirection.Input));
parameters.Add(sqlDataAccess.CreateParameter("enableDebugInfo", component.helper.SolutionConfiguration.EnableDebugInfo, DbType.String, ParameterDirection.Input));
int intResult = sqlDataAccess.ExecuteNonQuery(sqlDataAccess.CreateCommand("[Company_UpdateDetail]", CommandType.StoredProcedure, null), parameters.ToArray());
result.Data = int.Parse(parameters.Where(p => p.ParameterName.Equals("output")).FirstOrDefault().Value.ToString());
}
_logger.InfoLog(LogHandler.Constants.ACTION_EXIT, null, "", "", this.GetType().Name, MethodBase.GetCurrentMethod().Name);
}
catch (Exception ex)
{
_logger.ErrorLog(ex, this.GetType().Name, MethodBase.GetCurrentMethod().Name);
}
return result;
}
}
}
| 78.378947 | 182 | 0.692049 | [
"MIT"
] | iotconnect-apps/AppConnect-SmartGreenHouse | iot.solution.model/Repository/Implementation/CompanyRepository.cs | 7,448 | C# |
#if NETSTANDARD
//
// System.Configuration.ConfigurationPropertyOptions.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
//
// 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.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
namespace System.Configuration
{
[Flags]
public enum ConfigurationPropertyOptions
{
None = 0,
IsDefaultCollection = 1,
IsRequired = 2,
IsKey = 4,
IsTypeStringTransformationRequired = 8,
IsAssemblyStringTransformationRequired = 16,
IsVersionCheckRequired = 32
}
}
#endif | 35.065217 | 73 | 0.728456 | [
"Apache-2.0"
] | LuciferJun1227/AntDeploy | AntDeployAgent/System.Configuration/ConfigurationPropertyOptions.cs | 1,615 | C# |
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using VocaDb.Model.Domain.Security;
namespace VocaDb.Model.Domain.Versioning
{
public interface IArchivedVersionsManager
{
IEnumerable<ArchivedObjectVersion> VersionsBase { get; }
ArchivedObjectVersion GetLatestVersion();
bool HasAny();
}
public class ArchivedVersionManager<TVersion, TField> :
IArchivedVersionsManager
where TVersion : ArchivedObjectVersion, IArchivedObjectVersionWithFields<TField>
where TField : struct, IConvertible
{
private IList<TVersion> _archivedVersions = new List<TVersion>();
public virtual IList<TVersion> Versions
{
get => _archivedVersions;
set
{
ParamIs.NotNull(() => value);
_archivedVersions = value;
}
}
public IEnumerable<ArchivedObjectVersion> VersionsBase => Versions;
public virtual TVersion Add(TVersion newVersion)
{
ParamIs.NotNull(() => newVersion);
Versions.Add(newVersion);
return newVersion;
}
public virtual void Clear()
{
Versions.Clear();
}
ArchivedObjectVersion IArchivedVersionsManager.GetLatestVersion()
{
return GetLatestVersion();
}
public virtual TVersion GetLatestVersion()
{
// Sort first by version number because it's more accurate.
// Also need to sort by creation date because version number is not available for all entry types.
return Versions
.OrderByDescending(m => m.Version)
.ThenByDescending(m => m.Created)
.FirstOrDefault();
}
/// <summary>
/// Gets the latest version containing a specified field.
/// </summary>
/// <param name="field">The specified field.</param>
/// <param name="lastVersion">Version number to be compared to. Only this version and earlier ones are considered.</param>
/// <returns>Version containing the specified field, with a version number lower than the specified version number.</returns>
/// <remarks>
/// This method can be used to construct the current state of an entry from earlier versions.
/// Not every version contains every field, so when constructing the current state of an entry,
/// the latest version containing each field must be processed.
/// </remarks>
public virtual TVersion GetLatestVersionWithField(TField field, int lastVersion)
{
return Versions
.Where(a => a.Version <= lastVersion && a.IsIncluded(field))
.OrderByDescending(m => m.Version)
.FirstOrDefault();
}
/// <summary>
/// Gets versions before the specified version.
/// </summary>
/// <param name="beforeVer">Version to be compared. Can be null in which case all versions are returned.</param>
/// <returns>Versions whose number is lower than the compared version. Cannot be null.</returns>
public virtual IEnumerable<TVersion> GetPreviousVersions(TVersion beforeVer, IUserPermissionContext permissionContext)
{
if (beforeVer == null)
return Versions;
return Versions
.Where(a => a.Version < beforeVer.Version)
.Where(v => permissionContext.HasPermission(PermissionToken.ViewHiddenRevisions) || !v.Hidden);
}
public virtual TVersion GetVersion(int ver)
{
return Versions.FirstOrDefault(v => v.Version == ver);
}
public virtual bool HasAny()
{
return Versions.Any();
}
}
}
| 30.369369 | 128 | 0.700089 | [
"MIT"
] | Pyther99/vocadb | VocaDbModel/Domain/Versioning/ArchivedVersionManager.cs | 3,371 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace Inbox.Common.Model
{
public class EmailAddress
{
public string Name { get; }
public string Address { get; }
public EmailAddress(string name, string address)
{
Name = name;
Address = address;
}
public EmailAddress(string address)
{
Name = null;
Address = address;
}
}
}
| 19.708333 | 56 | 0.549683 | [
"MIT"
] | jbatonnet/inbox | Inbox.Common/Model/EmailAddress.cs | 475 | C# |
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using SmartForm.Common.Domain.Models;
using SmartForm.Common.Repository;
namespace SmartForm.Common.Services
{
public class EntityService<T> : IEntityService<T> where T : BaseModel
{
public readonly IBaseRepository<T> _baseRepository;
public EntityService(IBaseRepository<T> baseRepository)
{
_baseRepository = baseRepository;
}
public virtual async Task AddAsync(T model)
{
await _baseRepository.AddAsync(model);
}
public bool Any(Guid id)
{
return _baseRepository.Any(id);
}
public virtual async Task<List<T>> GetAsync()
{
return await _baseRepository.GetAsync();
}
public virtual async Task<T> GetAsync(Guid id)
{
return await _baseRepository.GetAsync(id);
}
public List<T> Get(Func<T, bool> predicate = null)
{
return _baseRepository.Get(predicate);
}
public virtual async Task<T> GetAsync(string name)
{
return await _baseRepository.GetAsync(name);
}
public virtual async Task RemoveAsync(Guid id)
{
await _baseRepository.RemoveAsync(id);
}
public virtual async Task UpdateAsync(Guid id, T model)
{
await _baseRepository.UpdateAsync(id, model);
}
public virtual async Task UpdateSingleFieldAsync(Guid id, dynamic model)
{
await _baseRepository.UpdateSingleFieldAsync(id, model);
}
}
} | 26.333333 | 80 | 0.606992 | [
"MIT"
] | masoudtahmasebi93/SmartForm | src/Shared/SmartForm.Common/Services/EntityService.cs | 1,661 | C# |
using Leadersofpositvechange.Models;
using LOPC.Entities.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Leadersofpositvechange.Controllers
{
public class HomeController : Controller
{
private readonly PositiveChangeEntitiesContext db;
public HomeController()
{
db = new PositiveChangeEntitiesContext();
}
#region LeadersHomePage
/// <summary>
/// Landing page
/// </summary>
/// <returns></returns>
public ActionResult LeadersOfPositiveChange()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
#endregion
#region About us
public ActionResult AboutUs()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
#endregion
#region Our Team
public ActionResult OurTeam()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
#endregion
#region Our Projects
// GET: Projects
public ActionResult OurProjects()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
#endregion
#region Our Gallery
public ActionResult Gallery()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
[Route("Home/Gallery/Photos/{galleryId?}")] //Route: /Users/Index
public ActionResult Photos(int? galleryId)
{
var folder = "~/Photos/";
switch (galleryId)
{
case 0:
{
folder = "~/Photos/Football/";
ViewBag.Title = "Football Event Gallery";
break;
}
case 1:
{
folder = "~/Photos/Farm/";
ViewBag.Title = "Our Farm Gallery";
break;
}
case 2:
{
folder = "~/Photos/Productivity/";
ViewBag.Title = "More From Our Farm and Productivity Gallery";
break;
}
case 3:
{
folder = "~/Photos/Construction/";
ViewBag.Title = "Buildings and Shelter Gallery";
break;
}
default:
//return RedirectToAction("ActionName", "ControllerName");
return RedirectToAction(nameof(Gallery));
//throw new Exception("Unexpected Case");
}
return View(new PhotoModel(folder));
}
#endregion
#region Our Blog
public ActionResult OurBlog()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View(db.BlogPosts.ToList());
}
//GET: Blog
[Route("Home/OurBlog/BlogPost/{postId?}")] //Route: /Users/Index
public ActionResult BlogPost(int? postId)
{
var blogPost = db.BlogPosts.Find(postId);
if (blogPost == null)
{
return RedirectToAction("OurBlog");
}
//strip html from
//blogPost.Post = ;
blogPost.Post = blogPost.Post;
return View(blogPost);
}
#endregion
#region Volunteers
//////////////////////////////Volunteers//////////////////////////////////
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult Volunteer()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
// POST: Volunteers
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see https://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Volunteer([Bind(Include = "Id,Name,Phone,Email,Message")] Volunteer volunteer)
{
if (ModelState.IsValid)
{
volunteer.DateTimeMessage = DateTime.Now;
db.Volunteers.Add(volunteer);
db.SaveChanges();
return RedirectToAction("Volunteer");
}
return View(volunteer);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
#endregion
#region Contact Us
/// <summary>
/// //////////////////////////
/// </summary>
/// <returns></returns>
public ActionResult ContactUs()
{
if (User.Identity.IsAuthenticated)
{
return RedirectToAction("Dashboard", "Admin");
}
return View();
}
#endregion
}
} | 24.548523 | 111 | 0.452217 | [
"MIT"
] | Yamzz/LeadersOfPositiveChangeWebsite | LeadersOfPositiveChange/Leadersofpositvechange/Controllers/HomeController.cs | 5,820 | 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 Valve.VR
{
using System;
using UnityEngine;
public partial class SteamVR_Actions
{
private static SteamVR_Action_Boolean p_default_InteractUI;
private static SteamVR_Action_Boolean p_default_Teleport;
private static SteamVR_Action_Boolean p_default_GrabPinch;
private static SteamVR_Action_Boolean p_default_GrabGrip;
private static SteamVR_Action_Pose p_default_Pose;
private static SteamVR_Action_Skeleton p_default_SkeletonLeftHand;
private static SteamVR_Action_Skeleton p_default_SkeletonRightHand;
private static SteamVR_Action_Single p_default_Squeeze;
private static SteamVR_Action_Boolean p_default_HeadsetOnHead;
private static SteamVR_Action_Boolean p_default_Menu;
private static SteamVR_Action_Boolean p_default_TouchPad;
private static SteamVR_Action_Vector2 p_default_TouchPosition;
private static SteamVR_Action_Vibration p_default_Haptic;
private static SteamVR_Action_Vector2 p_platformer_Move;
private static SteamVR_Action_Boolean p_platformer_Jump;
private static SteamVR_Action_Vector2 p_buggy_Steering;
private static SteamVR_Action_Single p_buggy_Throttle;
private static SteamVR_Action_Boolean p_buggy_Brake;
private static SteamVR_Action_Boolean p_buggy_Reset;
private static SteamVR_Action_Pose p_mixedreality_ExternalCamera;
public static SteamVR_Action_Boolean default_InteractUI
{
get
{
return SteamVR_Actions.p_default_InteractUI.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Boolean default_Teleport
{
get
{
return SteamVR_Actions.p_default_Teleport.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Boolean default_GrabPinch
{
get
{
return SteamVR_Actions.p_default_GrabPinch.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Boolean default_GrabGrip
{
get
{
return SteamVR_Actions.p_default_GrabGrip.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Pose default_Pose
{
get
{
return SteamVR_Actions.p_default_Pose.GetCopy<SteamVR_Action_Pose>();
}
}
public static SteamVR_Action_Skeleton default_SkeletonLeftHand
{
get
{
return SteamVR_Actions.p_default_SkeletonLeftHand.GetCopy<SteamVR_Action_Skeleton>();
}
}
public static SteamVR_Action_Skeleton default_SkeletonRightHand
{
get
{
return SteamVR_Actions.p_default_SkeletonRightHand.GetCopy<SteamVR_Action_Skeleton>();
}
}
public static SteamVR_Action_Single default_Squeeze
{
get
{
return SteamVR_Actions.p_default_Squeeze.GetCopy<SteamVR_Action_Single>();
}
}
public static SteamVR_Action_Boolean default_HeadsetOnHead
{
get
{
return SteamVR_Actions.p_default_HeadsetOnHead.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Boolean default_Menu
{
get
{
return SteamVR_Actions.p_default_Menu.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Boolean default_TouchPad
{
get
{
return SteamVR_Actions.p_default_TouchPad.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Vector2 default_TouchPosition
{
get
{
return SteamVR_Actions.p_default_TouchPosition.GetCopy<SteamVR_Action_Vector2>();
}
}
public static SteamVR_Action_Vibration default_Haptic
{
get
{
return SteamVR_Actions.p_default_Haptic.GetCopy<SteamVR_Action_Vibration>();
}
}
public static SteamVR_Action_Vector2 platformer_Move
{
get
{
return SteamVR_Actions.p_platformer_Move.GetCopy<SteamVR_Action_Vector2>();
}
}
public static SteamVR_Action_Boolean platformer_Jump
{
get
{
return SteamVR_Actions.p_platformer_Jump.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Vector2 buggy_Steering
{
get
{
return SteamVR_Actions.p_buggy_Steering.GetCopy<SteamVR_Action_Vector2>();
}
}
public static SteamVR_Action_Single buggy_Throttle
{
get
{
return SteamVR_Actions.p_buggy_Throttle.GetCopy<SteamVR_Action_Single>();
}
}
public static SteamVR_Action_Boolean buggy_Brake
{
get
{
return SteamVR_Actions.p_buggy_Brake.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Boolean buggy_Reset
{
get
{
return SteamVR_Actions.p_buggy_Reset.GetCopy<SteamVR_Action_Boolean>();
}
}
public static SteamVR_Action_Pose mixedreality_ExternalCamera
{
get
{
return SteamVR_Actions.p_mixedreality_ExternalCamera.GetCopy<SteamVR_Action_Pose>();
}
}
private static void InitializeActionArrays()
{
Valve.VR.SteamVR_Input.actions = new Valve.VR.SteamVR_Action[] {
SteamVR_Actions.default_InteractUI,
SteamVR_Actions.default_Teleport,
SteamVR_Actions.default_GrabPinch,
SteamVR_Actions.default_GrabGrip,
SteamVR_Actions.default_Pose,
SteamVR_Actions.default_SkeletonLeftHand,
SteamVR_Actions.default_SkeletonRightHand,
SteamVR_Actions.default_Squeeze,
SteamVR_Actions.default_HeadsetOnHead,
SteamVR_Actions.default_Menu,
SteamVR_Actions.default_TouchPad,
SteamVR_Actions.default_TouchPosition,
SteamVR_Actions.default_Haptic,
SteamVR_Actions.platformer_Move,
SteamVR_Actions.platformer_Jump,
SteamVR_Actions.buggy_Steering,
SteamVR_Actions.buggy_Throttle,
SteamVR_Actions.buggy_Brake,
SteamVR_Actions.buggy_Reset,
SteamVR_Actions.mixedreality_ExternalCamera};
Valve.VR.SteamVR_Input.actionsIn = new Valve.VR.ISteamVR_Action_In[] {
SteamVR_Actions.default_InteractUI,
SteamVR_Actions.default_Teleport,
SteamVR_Actions.default_GrabPinch,
SteamVR_Actions.default_GrabGrip,
SteamVR_Actions.default_Pose,
SteamVR_Actions.default_SkeletonLeftHand,
SteamVR_Actions.default_SkeletonRightHand,
SteamVR_Actions.default_Squeeze,
SteamVR_Actions.default_HeadsetOnHead,
SteamVR_Actions.default_Menu,
SteamVR_Actions.default_TouchPad,
SteamVR_Actions.default_TouchPosition,
SteamVR_Actions.platformer_Move,
SteamVR_Actions.platformer_Jump,
SteamVR_Actions.buggy_Steering,
SteamVR_Actions.buggy_Throttle,
SteamVR_Actions.buggy_Brake,
SteamVR_Actions.buggy_Reset,
SteamVR_Actions.mixedreality_ExternalCamera};
Valve.VR.SteamVR_Input.actionsOut = new Valve.VR.ISteamVR_Action_Out[] {
SteamVR_Actions.default_Haptic};
Valve.VR.SteamVR_Input.actionsVibration = new Valve.VR.SteamVR_Action_Vibration[] {
SteamVR_Actions.default_Haptic};
Valve.VR.SteamVR_Input.actionsPose = new Valve.VR.SteamVR_Action_Pose[] {
SteamVR_Actions.default_Pose,
SteamVR_Actions.mixedreality_ExternalCamera};
Valve.VR.SteamVR_Input.actionsBoolean = new Valve.VR.SteamVR_Action_Boolean[] {
SteamVR_Actions.default_InteractUI,
SteamVR_Actions.default_Teleport,
SteamVR_Actions.default_GrabPinch,
SteamVR_Actions.default_GrabGrip,
SteamVR_Actions.default_HeadsetOnHead,
SteamVR_Actions.default_Menu,
SteamVR_Actions.default_TouchPad,
SteamVR_Actions.platformer_Jump,
SteamVR_Actions.buggy_Brake,
SteamVR_Actions.buggy_Reset};
Valve.VR.SteamVR_Input.actionsSingle = new Valve.VR.SteamVR_Action_Single[] {
SteamVR_Actions.default_Squeeze,
SteamVR_Actions.buggy_Throttle};
Valve.VR.SteamVR_Input.actionsVector2 = new Valve.VR.SteamVR_Action_Vector2[] {
SteamVR_Actions.default_TouchPosition,
SteamVR_Actions.platformer_Move,
SteamVR_Actions.buggy_Steering};
Valve.VR.SteamVR_Input.actionsVector3 = new Valve.VR.SteamVR_Action_Vector3[0];
Valve.VR.SteamVR_Input.actionsSkeleton = new Valve.VR.SteamVR_Action_Skeleton[] {
SteamVR_Actions.default_SkeletonLeftHand,
SteamVR_Actions.default_SkeletonRightHand};
Valve.VR.SteamVR_Input.actionsNonPoseNonSkeletonIn = new Valve.VR.ISteamVR_Action_In[] {
SteamVR_Actions.default_InteractUI,
SteamVR_Actions.default_Teleport,
SteamVR_Actions.default_GrabPinch,
SteamVR_Actions.default_GrabGrip,
SteamVR_Actions.default_Squeeze,
SteamVR_Actions.default_HeadsetOnHead,
SteamVR_Actions.default_Menu,
SteamVR_Actions.default_TouchPad,
SteamVR_Actions.default_TouchPosition,
SteamVR_Actions.platformer_Move,
SteamVR_Actions.platformer_Jump,
SteamVR_Actions.buggy_Steering,
SteamVR_Actions.buggy_Throttle,
SteamVR_Actions.buggy_Brake,
SteamVR_Actions.buggy_Reset};
}
private static void PreInitActions()
{
SteamVR_Actions.p_default_InteractUI = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/InteractUI")));
SteamVR_Actions.p_default_Teleport = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/Teleport")));
SteamVR_Actions.p_default_GrabPinch = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/GrabPinch")));
SteamVR_Actions.p_default_GrabGrip = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/GrabGrip")));
SteamVR_Actions.p_default_Pose = ((SteamVR_Action_Pose)(SteamVR_Action.Create<SteamVR_Action_Pose>("/actions/default/in/Pose")));
SteamVR_Actions.p_default_SkeletonLeftHand = ((SteamVR_Action_Skeleton)(SteamVR_Action.Create<SteamVR_Action_Skeleton>("/actions/default/in/SkeletonLeftHand")));
SteamVR_Actions.p_default_SkeletonRightHand = ((SteamVR_Action_Skeleton)(SteamVR_Action.Create<SteamVR_Action_Skeleton>("/actions/default/in/SkeletonRightHand")));
SteamVR_Actions.p_default_Squeeze = ((SteamVR_Action_Single)(SteamVR_Action.Create<SteamVR_Action_Single>("/actions/default/in/Squeeze")));
SteamVR_Actions.p_default_HeadsetOnHead = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/HeadsetOnHead")));
SteamVR_Actions.p_default_Menu = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/Menu")));
SteamVR_Actions.p_default_TouchPad = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/default/in/TouchPad")));
SteamVR_Actions.p_default_TouchPosition = ((SteamVR_Action_Vector2)(SteamVR_Action.Create<SteamVR_Action_Vector2>("/actions/default/in/TouchPosition")));
SteamVR_Actions.p_default_Haptic = ((SteamVR_Action_Vibration)(SteamVR_Action.Create<SteamVR_Action_Vibration>("/actions/default/out/Haptic")));
SteamVR_Actions.p_platformer_Move = ((SteamVR_Action_Vector2)(SteamVR_Action.Create<SteamVR_Action_Vector2>("/actions/platformer/in/Move")));
SteamVR_Actions.p_platformer_Jump = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/platformer/in/Jump")));
SteamVR_Actions.p_buggy_Steering = ((SteamVR_Action_Vector2)(SteamVR_Action.Create<SteamVR_Action_Vector2>("/actions/buggy/in/Steering")));
SteamVR_Actions.p_buggy_Throttle = ((SteamVR_Action_Single)(SteamVR_Action.Create<SteamVR_Action_Single>("/actions/buggy/in/Throttle")));
SteamVR_Actions.p_buggy_Brake = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/buggy/in/Brake")));
SteamVR_Actions.p_buggy_Reset = ((SteamVR_Action_Boolean)(SteamVR_Action.Create<SteamVR_Action_Boolean>("/actions/buggy/in/Reset")));
SteamVR_Actions.p_mixedreality_ExternalCamera = ((SteamVR_Action_Pose)(SteamVR_Action.Create<SteamVR_Action_Pose>("/actions/mixedreality/in/ExternalCamera")));
}
}
}
| 44.755224 | 175 | 0.62129 | [
"Apache-2.0"
] | kidrabit/Data-Visualization-Lab-RND | VR/dance_co/VR Dance Ver.3/Assets/SteamVR_Input/SteamVR_Input_Actions.cs | 14,993 | C# |
using SQLite;
using System;
using System.Collections.Generic;
using System.Text;
namespace Velha.Modelos
{
public class Partida
{
[PrimaryKey, AutoIncrement]
public int ID { get; set; }
public DateTime DataInicial { get; set; }
public DateTime DataFinal { get; set; }
public string NomeVencedor { get; set; }
public Partida()
{
this.DataInicial = DateTime.Now;
}
}
}
| 18.44 | 49 | 0.59436 | [
"MIT"
] | zehguilherme/mobile-senac-bauru | Velha/Velha/Velha/Modelos/Partida.cs | 463 | C# |
// Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using System.Collections.Generic;
using Markdig.Helpers;
using Markdig.Parsers;
using Markdig.Syntax;
namespace Markdig.Extensions.Tables
{
public class GridTableParser : BlockParser
{
public GridTableParser()
{
OpeningCharacters = new[] { '+' };
}
public override BlockState TryOpen(BlockProcessor processor)
{
// A grid table cannot start more than an indent
if (processor.IsCodeIndent)
{
return BlockState.None;
}
var line = processor.Line;
GridTableState? tableState = null;
// Match the first row that should be of the minimal form: +---------------
var c = line.CurrentChar;
var lineStart = line.Start;
while (c == '+')
{
var columnStart = line.Start;
line.SkipChar();
line.TrimStart();
// if we have reached the end of the line, exit
c = line.CurrentChar;
if (c == 0)
{
break;
}
// Parse a column alignment
if (!TableHelper.ParseColumnHeader(ref line, '-', out TableColumnAlign? columnAlign))
{
return BlockState.None;
}
tableState ??= new GridTableState(start: processor.Start, expectRow: true);
tableState.AddColumn(columnStart - lineStart, line.Start - lineStart, columnAlign);
c = line.CurrentChar;
}
if (c != 0 || tableState is null)
{
return BlockState.None;
}
// Store the line (if we need later to build a ParagraphBlock because the GridTable was in fact invalid)
tableState.AddLine(ref processor.Line);
var table = new Table(this);
table.SetData(typeof(GridTableState), tableState);
// Calculate the total width of all columns
int totalWidth = 0;
foreach (var columnSlice in tableState.ColumnSlices!)
{
totalWidth += columnSlice.End - columnSlice.Start - 1;
}
// Store the column width and alignment
foreach (var columnSlice in tableState.ColumnSlices)
{
var columnDefinition = new TableColumnDefinition
{
// Column width proportional to the total width
Width = (float)(columnSlice.End - columnSlice.Start - 1) * 100.0f / totalWidth,
Alignment = columnSlice.Align
};
table.ColumnDefinitions.Add(columnDefinition);
}
processor.NewBlocks.Push(table);
return BlockState.ContinueDiscard;
}
public override BlockState TryContinue(BlockProcessor processor, Block block)
{
var gridTable = (Table)block;
var tableState = (GridTableState)block.GetData(typeof(GridTableState))!;
tableState.AddLine(ref processor.Line);
if (processor.CurrentChar == '+')
{
return HandleNewRow(processor, tableState, gridTable);
}
if (processor.CurrentChar == '|')
{
return HandleContents(processor, tableState, gridTable);
}
TerminateCurrentRow(processor, tableState, gridTable, true);
// If the table is not valid we need to remove the grid table,
// and create a ParagraphBlock with the slices
if (!gridTable.IsValid())
{
Undo(processor, tableState, gridTable);
}
return BlockState.Break;
}
private BlockState HandleNewRow(BlockProcessor processor, GridTableState tableState, Table gridTable)
{
var columns = tableState.ColumnSlices!;
SetRowSpanState(columns, processor.Line, out bool isHeaderRow, out bool hasRowSpan);
SetColumnSpanState(columns, processor.Line);
TerminateCurrentRow(processor, tableState, gridTable, false);
if (isHeaderRow)
{
for (int i = 0; i < gridTable.Count; i++)
{
var row = (TableRow)gridTable[i];
row.IsHeader = true;
}
}
tableState.StartRowGroup = gridTable.Count;
if (hasRowSpan)
{
HandleContents(processor, tableState, gridTable);
}
return BlockState.ContinueDiscard;
}
private static void SetRowSpanState(List<GridTableState.ColumnSlice> columns, StringSlice line, out bool isHeaderRow, out bool hasRowSpan)
{
var lineStart = line.Start;
isHeaderRow = line.PeekChar() == '=' || line.PeekChar(2) == '=';
hasRowSpan = false;
foreach (var columnSlice in columns)
{
if (columnSlice.CurrentCell != null)
{
line.Start = lineStart + columnSlice.Start + 1;
line.End = lineStart + columnSlice.End - 1;
line.Trim();
if (line.IsEmptyOrWhitespace() || !IsRowSeperator(line))
{
hasRowSpan = true;
columnSlice.CurrentCell.RowSpan++;
columnSlice.CurrentCell.AllowClose = false;
}
else
{
columnSlice.CurrentCell.AllowClose = true;
}
}
}
}
private static bool IsRowSeperator(StringSlice slice)
{
char c = slice.CurrentChar;
do
{
if (c != '-' && c != '=' && c != ':')
{
return c == '\0';
}
c = slice.NextChar();
}
while (true);
}
private static void TerminateCurrentRow(BlockProcessor processor, GridTableState tableState, Table gridTable, bool isLastRow)
{
var columns = tableState.ColumnSlices;
TableRow? currentRow = null;
for (int i = 0; i < columns!.Count; i++)
{
var columnSlice = columns[i];
if (columnSlice.CurrentCell != null)
{
currentRow ??= new TableRow();
// If this cell does not already belong to a row
if (columnSlice.CurrentCell.Parent is null)
{
currentRow.Add(columnSlice.CurrentCell);
}
// If the cell is not going to span through to the next row
if (columnSlice.CurrentCell.AllowClose)
{
columnSlice.BlockProcessor!.Close(columnSlice.CurrentCell);
}
}
// Renew the block parser processor (or reset it for the last row)
if (columnSlice.BlockProcessor != null && (columnSlice.CurrentCell is null || columnSlice.CurrentCell.AllowClose))
{
columnSlice.BlockProcessor.ReleaseChild();
columnSlice.BlockProcessor = isLastRow ? null : processor.CreateChild();
}
// Create or erase the cell
if (isLastRow || columnSlice.CurrentColumnSpan == 0 || (columnSlice.CurrentCell != null && columnSlice.CurrentCell.AllowClose))
{
// We don't need the cell anymore if we have a last row
// Or the cell has a columnspan == 0
// And the cell does not have to be kept open to span rows
columnSlice.CurrentCell = null;
}
}
if (currentRow is { Count: > 0 })
{
gridTable.Add(currentRow);
}
}
private BlockState HandleContents(BlockProcessor processor, GridTableState tableState, Table gridTable)
{
var isRowLine = processor.CurrentChar == '+';
var columns = tableState.ColumnSlices!;
var line = processor.Line;
SetColumnSpanState(columns, line);
if (!isRowLine && !CanContinueRow(columns))
{
TerminateCurrentRow(processor, tableState, gridTable, false);
}
for (int i = 0; i < columns.Count;)
{
var columnSlice = columns[i];
var nextColumnIndex = i + columnSlice.CurrentColumnSpan;
// If the span is 0, we exit
if (nextColumnIndex == i)
{
break;
}
var nextColumn = nextColumnIndex < columns.Count ? columns[nextColumnIndex] : null;
var sliceForCell = line;
sliceForCell.Start = line.Start + columnSlice.Start + 1;
if (nextColumn != null)
{
sliceForCell.End = line.Start + nextColumn.Start - 1;
}
else
{
var columnEnd = columns[columns.Count - 1].End;
var columnEndChar = line.PeekCharExtra(columnEnd);
// If there is a `|` (or a `+` in the case that we are dealing with a row line
// with spanned contents) exactly at the expected end of the table row, we cut the line
// otherwise we allow to have the last cell of a row to be open for longer cell content
if (columnEndChar == '|' || (isRowLine && columnEndChar == '+'))
{
sliceForCell.End = line.Start + columnEnd - 1;
}
else if (line.PeekCharExtra(line.End) == '|')
{
sliceForCell.End = line.End - 1;
}
}
sliceForCell.TrimEnd();
if (!isRowLine || !IsRowSeperator(sliceForCell))
{
if (columnSlice.CurrentCell is null)
{
columnSlice.CurrentCell = new TableCell(this)
{
ColumnSpan = columnSlice.CurrentColumnSpan,
ColumnIndex = i
};
if (columnSlice.BlockProcessor is null)
{
columnSlice.BlockProcessor = processor.CreateChild();
}
// Ensure that the BlockParser is aware that the TableCell is the top-level container
columnSlice.BlockProcessor.Open(columnSlice.CurrentCell);
}
// Process the content of the cell
columnSlice.BlockProcessor!.LineIndex = processor.LineIndex;
columnSlice.BlockProcessor.ProcessLine(sliceForCell);
}
// Go to next column
i = nextColumnIndex;
}
return BlockState.ContinueDiscard;
}
private static void SetColumnSpanState(List<GridTableState.ColumnSlice> columns, StringSlice line)
{
foreach (var columnSlice in columns)
{
columnSlice.PreviousColumnSpan = columnSlice.CurrentColumnSpan;
columnSlice.CurrentColumnSpan = 0;
}
// | ------------- | ------------ | ---------------------------------------- |
// Calculate the colspan for the new row
int columnIndex = -1;
for (int i = 0; i < columns.Count; i++)
{
var columnSlice = columns[i];
var peek = line.PeekChar(columnSlice.Start);
if (peek == '|' || peek == '+')
{
columnIndex = i;
}
if (columnIndex >= 0)
{
columns[columnIndex].CurrentColumnSpan++;
}
}
}
private static bool CanContinueRow(List<GridTableState.ColumnSlice> columns)
{
foreach (var columnSlice in columns)
{
if (columnSlice.PreviousColumnSpan != columnSlice.CurrentColumnSpan)
{
return false;
}
}
return true;
}
private static void Undo(BlockProcessor processor, GridTableState tableState, Table gridTable)
{
var parser = processor.Parsers.FindExact<ParagraphBlockParser>();
// Discard the grid table
var parent = gridTable.Parent!;
processor.Discard(gridTable);
var paragraphBlock = new ParagraphBlock(parser)
{
Lines = tableState.Lines,
};
parent.Add(paragraphBlock);
processor.Open(paragraphBlock);
}
public override bool Close(BlockProcessor processor, Block block)
{
// Work only on Table, not on TableCell
var gridTable = block as Table;
if (gridTable != null)
{
var tableState = (GridTableState)block.GetData(typeof(GridTableState))!;
TerminateCurrentRow(processor, tableState, gridTable, true);
if (!gridTable.IsValid())
{
Undo(processor, tableState, gridTable);
}
}
return true;
}
}
}
| 38.840659 | 146 | 0.495473 | [
"BSD-2-Clause"
] | Acorisoft/markdig | src/Markdig/Extensions/Tables/GridTableParser.cs | 14,138 | C# |
/**
* Copyright (c) 2008-2020 Bryan Biedenkapp., All Rights Reserved.
* MIT Open Source. Use is subject to license terms.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*/
/*
* 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 System.Collections.Generic;
using TridentFramework.RPC.Utility;
namespace TridentFramework.RPC
{
/// <summary>
/// Provides access to the execution context of a service method.
/// </summary>
public class RPCContext
{
[ThreadStatic] internal static RPCContext ctxCurrent;
[ThreadStatic] internal static RPCMessage ctxMessage = null;
[ThreadStatic] internal static MessageHeaders ctxOutgoingHeaders = null;
[ThreadStatic] internal static MessageProperties ctxOutgoingProperties = null;
[ThreadStatic] internal static Type ctxIntfType = null;
[ThreadStatic] internal static Type ctxSvcType = null;
[ThreadStatic] internal static bool ctxUseMessageResponse = false;
internal List<IServiceMessageInspector> serviceMessageInspectors = new List<IServiceMessageInspector>();
internal List<IChannelMessageInspector> channelMessageInspectors = new List<IChannelMessageInspector>();
internal List<IRPCExceptionHandler> exceptionHandlers = new List<IRPCExceptionHandler>();
/*
** Properties
*/
/// <summary>
/// Gets or sets the execution context for the current thread.
/// </summary>
public static RPCContext Current
{
get { return ctxCurrent; }
set { ctxCurrent = value; }
}
/// <summary>
/// Flag indicating the context message should be used as the response message.
/// </summary>
public bool UseMessageAsResponse
{
get { return ctxUseMessageResponse; }
set { ctxUseMessageResponse = value; }
}
/// <summary>
/// Gets the incoming/outgoing message.
/// </summary>
public RPCMessage Message
{
get { return ctxMessage; }
}
/// <summary>
/// Gets the incoming message headers.
/// </summary>
public MessageHeaders IncomingMessageHeaders
{
get { return ctxMessage != null ? ctxMessage.IncomingMessageHeaders : null; }
}
/// <summary>
/// Gets the incoming message properties.
/// </summary>
public MessageProperties IncomingMessageProperties
{
get { return ctxMessage != null ? ctxMessage.IncomingMessageProperties : null; }
}
/// <summary>
/// Gets the message base URI.
/// </summary>
public Uri BaseUri
{
get { return ctxMessage != null ? ctxMessage.BaseUri : null; }
}
/// <summary>
/// Gets the message RPC request URI.
/// </summary>
public Uri RequestUri
{
get { return ctxMessage != null ? ctxMessage.RequestUri : null; }
}
/// <summary>
/// Gets the outgoing message headers.
/// </summary>
public MessageHeaders OutgoingMessageHeaders
{
get
{
if (ctxOutgoingHeaders == null)
{
RPCLogger.WriteWarning("BUGBUG: Outgoing headers were not available! This should not happen.");
return new MessageHeaders();
}
return ctxOutgoingHeaders;
}
}
/// <summary>
/// Gets the incoming message properties.
/// </summary>
public MessageProperties OutgoingMessageProperties
{
get
{
if (ctxOutgoingProperties == null)
{
RPCLogger.WriteWarning("BUGBUG: Incoming message properties were not available! This should not happen.");
return new MessageProperties();
}
return ctxOutgoingProperties;
}
}
/// <summary>
/// Gets the list of message inspectors for this <see cref="RPCContext"/>.
/// </summary>
public List<IServiceMessageInspector> MessageInspectors
{
get { return serviceMessageInspectors; }
}
/// <summary>
/// Gets the list of channel inspectors for this <see cref="RPCContext"/>.
/// </summary>
public List<IChannelMessageInspector> ChannelInspectors
{
get { return channelMessageInspectors; }
}
/// <summary>
/// Gets the list of exception handlers for this <see cref="RPCContext"/>.
/// </summary>
public List<IRPCExceptionHandler> ExceptionHandlers
{
get { return exceptionHandlers; }
}
/// <summary>
/// Gets the type of the service.
/// </summary>
public Type ServiceType
{
get { return ctxSvcType; }
}
/// <summary>
/// Gets the type of the service interface.
/// </summary>
public Type InterfaceType
{
get { return ctxIntfType; }
}
/*
** Methods
*/
/// <summary>
/// Internal helper to reset the state of the RPC context.
/// </summary>
internal void Reset()
{
ctxMessage = null;
ctxOutgoingHeaders = null;
ctxOutgoingProperties = null;
ctxIntfType = null;
ctxSvcType = null;
ctxUseMessageResponse = false;
ctxCurrent = this;
}
} // public class RPCContext
} // namespace TridentFramework.RPC
| 33.653465 | 208 | 0.594734 | [
"MIT"
] | gatekeep/Trident.RPC | RPCContext.cs | 6,800 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.