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
namespace JeyDotC.JustCs.Html.Attributes { public enum TargetValues { _Blank, _Self, _Parent, _Top, Framename, } }
15.181818
41
0.532934
[ "MIT" ]
JeyDotC/JustCs
JeyDotC.JustCs/Html/Attributes/TargetValues.cs
169
C#
using Genbox.SimpleS3.Core.Abstracts; using Genbox.SimpleS3.Core.Abstracts.Request; using Genbox.SimpleS3.Core.Common.Constants; using Genbox.SimpleS3.Core.Network.Requests.Objects; namespace Genbox.SimpleS3.Core.Internals.Marshallers.Requests.Objects; internal class GetObjectAclRequestMarshal : IRequestMarshal<GetObjectAclRequest> { public Stream? MarshalRequest(GetObjectAclRequest request, SimpleS3Config config) { request.SetQueryParameter(AmzParameters.Acl, string.Empty); return null; } }
35.066667
85
0.802281
[ "MIT" ]
Genbox/SimpleS3Net
src/SimpleS3.Core/Internals/Marshallers/Requests/Objects/GetObjectAclRequestMarshal.cs
526
C#
using System; using System.Collections.Generic; using System.Linq; namespace _4.SortStudents { class SortStudents { static void Main() { List<Student> students = new List<Student>(); string line = Console.ReadLine(); while (!line.Equals("END")) { string[] names = line.Split(' '); students.Add(new Student { FirstName = names[0], LastName = names[1] }); line = Console.ReadLine(); } foreach (var item in students.OrderBy(x => x.LastName).ThenByDescending(x => x.FirstName)) { Console.WriteLine(item.FirstName + " " + item.LastName); } } } class Student { public string FirstName { get; set; } public string LastName { get; set; } } }
15.803571
102
0.506215
[ "MIT" ]
mkpetrov/CSharpAdvanced
LINQ/Sort Students/SortStudents.cs
887
C#
using System; using System.Net; using System.Net.Http; using System.Threading.Tasks; using System.Web.Http; using AttributeRouting.Web.Http; using UserManagement.Core.DataAccess; using UserManagement.Core.Search; namespace UserManagement.WebApi { public class UserController : ApiController { private readonly IUserRepository userRepository; public UserController(IUserRepository userRepository) { if (userRepository == null) { throw new ArgumentNullException("userRepository"); } this.userRepository = userRepository; } // Solution #1 - using POSTAttribute and a method name which does not start with "Get" //[POST("api/users", RouteName = "UserController.FetchUsers")] //public async Task<HttpResponseMessage> FetchUsers([FromBody] UserSearchCriteria searchCriteria) //{ // var searchResult = userRepository.Get(searchCriteria); // return await Task<HttpResponseMessage>.Factory.StartNew(() => Request.CreateResponse(HttpStatusCode.OK, searchResult)); //} // Solution #2 - using HttpRouteAttribute, HttpPostAttribute and a method name which starts with "Get" [HttpRoute("api/users", RouteName = "UserController.FetchUsers")] [HttpPost] public async Task<HttpResponseMessage> Get([FromBody] UserSearchCriteria searchCriteria) { var searchResult = userRepository.Get(searchCriteria); return await Task<HttpResponseMessage>.Factory.StartNew(() => Request.CreateResponse(HttpStatusCode.OK, searchResult)); } } }
38.534884
133
0.681352
[ "Apache-2.0" ]
satrapu/user-management
UserManagement.WebApi/UserController.cs
1,659
C#
// DocSection: cm_api_v2_put_rendition // Tip: Find more about .NET SDKs at https://kontent.ai/learn/net using Kentico.Kontent.Management; var client = new ManagementClient(new ManagementOptions { ApiKey = "<YOUR_API_KEY>", ProjectId = "<YOUR_PROJECT_ID>" }); var assetReference = Reference.ById(Guid.Parse("fcbb12e6-66a3-4672-85d9-d502d16b8d9c")); // var assetReference = Reference.ByExternalId("which-brewing-fits-you"); var renditionReference = Reference.ById(Guid.Parse("ce559491-0fc1-494b-96f3-244bc095de57")); // var renditionReference = Reference.ByExternalId("hero-image-rendition"); var identifier = new AssetRenditionIdentifier(assetReference, renditionReference); var response = await client.UpdateAssetRenditionAsync(identifier, new AssetRenditionUpdateModel() { Transformation = new RectangleResizeTransformation { CustomWidth = 120, CustomHeight = 240, X = 300, Y = 200, Width = 360, Height = 720, } }); // EndDocSection
34.2
97
0.71345
[ "MIT" ]
KenticoDocs/cloud-docs-samples
net/management-api-v2/PutRendition.cs
1,026
C#
using System; using System.Collections.Generic; namespace MahApps.Metro.IconPacks { /// ****************************************** /// This code is auto generated. Do not amend. /// ****************************************** public static class PackIconTypiconsDataFactory { public static Lazy<IDictionary<PackIconTypiconsKind, string>> DataIndex { get; } static PackIconTypiconsDataFactory() { if (DataIndex == null) { DataIndex = new Lazy<IDictionary<PackIconTypiconsKind, string>>(PackIconTypiconsDataFactory.Create); } } public static IDictionary<PackIconTypiconsKind, string> Create() { return new Dictionary<PackIconTypiconsKind, string> { {PackIconTypiconsKind.None, ""}, {PackIconTypiconsKind.AdjustBrightness, "M392 511l-42 122q-6 17 2 33.5t25 22.5q24 8 45 -9.5t11 -46.5zM58 342l123 -42l-123 -42q-17 -6 -33.5 2.5t-22.5 25.5q-8 24 9.5 45t46.5 11zM392 89l41 -122q6 -17 -2 -33.5t-25 -22.5q-24 -8 -45 9.5t-11 46.5zM781 314q8 -24 -9.5 -45t-46.5 -11l-122 42l122 42 q17 6 33.5 -2.5t22.5 -25.5zM126 506q-17 8 -22.5 25t2.5 34q13 25 40 24t39 -24l57 -116zM126 15q-25 13 -24 40t24 39l116 57l-57 -116q-8 -17 -25 -22.5t-34 2.5zM657 94q17 -8 22.5 -25t-2.5 -34q-13 -25 -40 -24t-39 24l-57 116zM657 585q25 -13 24 -40t-24 -39 l-116 -57l57 116q8 17 25 22.5t34 -2.5zM392 488q77 0 132 -55.5t55 -132.5t-55 -132.5t-132 -55.5t-132.5 55.5t-55.5 132.5t55.5 132.5t132.5 55.5z"}, {PackIconTypiconsKind.AdjustContrast, "M333 633q138 0 236 -97.5t98 -235.5t-98 -235.5t-236 -97.5t-235.5 97.5t-97.5 235.5t97.5 235.5t235.5 97.5zM333 50q103 0 176.5 73t73.5 177t-73.5 177t-176.5 73t-176.5 -73t-73.5 -177t73.5 -177t176.5 -73zM333 508q86 0 147.5 -61t61.5 -147t-61.5 -147 t-147.5 -61v416z"}, {PackIconTypiconsKind.Anchor, "M542 238q17 0 29 -12.5t12 -29.5q0 -121 -85 -206.5t-206 -85.5t-206.5 85.5t-85.5 206.5q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5q0 -75 47.5 -132.5t119.5 -71.5v308h-167q-17 0 -29 12.5t-12 29.5t12 29t29 12h167v50q-37 13 -60 45t-23 72q0 52 36.5 88.5 t88.5 36.5t88.5 -36.5t36.5 -88.5q0 -40 -23.5 -72t-60.5 -45v-50h167q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5h-167v-308q72 14 119.5 71.5t47.5 132.5q0 17 12.5 29.5t29.5 12.5zM292 592q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5t29 12.5t12 29.5 t-12 29.5t-29 12.5z"}, {PackIconTypiconsKind.AnchorOutline, "M333 550q0 42 42 42t42 -42t-42 -42t-42 42zM42 342q0 51 37 88t88 37h17q-17 38 -17 83q0 86 61 147t147 61t147 -61t61 -147q0 -45 -17 -83h17q36 0 64.5 -18t44.5 -45q16 -28 16 -62q0 -26 -8 -46q50 -37 50 -100q0 -107 -53 -192t-134 -133q-88 -50 -188 -50 q-79 0 -148 31t-117 79t-79 117t-31 148q0 63 50 100q-8 20 -8 46zM125 238q-17 0 -29.5 -12.5t-12.5 -29.5q0 -120 86 -206t206 -86t206 86t86 206q0 17 -12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5q0 -76 -48.5 -133t-117.5 -71v308h166q17 0 29.5 12.5t12.5 29.5 t-12.5 29t-29.5 12h-166v50q36 13 59.5 44t23.5 73q0 52 -36.5 88.5t-88.5 36.5t-88.5 -36.5t-36.5 -88.5q0 -41 24 -72.5t59 -44.5v-50h-166q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5h166v-308q-69 14 -117.5 71t-48.5 133q0 17 -12.5 29.5t-29.5 12.5zM180 258 q28 -25 28 -62q0 -95 84 -144v206h-112zM458 52q36 21 60 58.5t24 85.5q0 37 28 62h-112v-206zM333 550q0 42 42 42t42 -42t-42 -42t-42 42z"}, {PackIconTypiconsKind.Archive, "M458 300q9 0 15 -6t6 -15t-6 -15t-15 -6h-125q-9 0 -15 6t-6 15t6 15t15 6h125zM750 592q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-708q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h708zM667 467q17 0 29 -12.5t12 -29.5v-333q0 -52 -36.5 -88.5 t-88.5 -36.5h-375q-52 0 -88.5 36.5t-36.5 88.5v333q0 17 12.5 29.5t29.5 12.5h542zM583 50q17 0 29.5 12.5t12.5 29.5v291h-458v-291q0 -17 12 -29.5t29 -12.5h375z"}, {PackIconTypiconsKind.ArrowBack, "M292 571q16 0 28.5 -12.5t12.5 -29.5v-106q142 -16 238 -122.5t96 -250.5v-42q-64 97 -146 130.5t-188 36.5v-104q0 -17 -12.5 -29.5t-28.5 -12.5q-18 0 -30 12l-262 259l262 259q12 12 30 12z"}, {PackIconTypiconsKind.ArrowBackOutline, "M750 8q0 -17 -12 -29t-30 -12q-21 0 -34 19q-48 74 -110.5 106.5t-146.5 38.5v-60q0 -34 -25 -59q-24 -24 -59 -23.5t-58 23.5l-263 258q-12 12 -12 30t12 30l262 258q23 23 58.5 23.5t59.5 -23.5q25 -25 25 -59v-71q145 -29 239 -144t94 -264v-42zM376 216 q179 -4 282 -88q-24 101 -103 171t-185 82l-37 2v146l-232 -229l232 -229v146z"}, {PackIconTypiconsKind.ArrowDown, "M404 246q12 -12 12 -29.5t-12 -29.5l-196 -196l-196 196q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12l96 -95v316q0 17 12 29t29 12t29.5 -12t12.5 -29v-316l96 95q12 12 29 12t29 -12z"}, {PackIconTypiconsKind.ArrowDownOutline, "M333 -88l-296 297q-37 37 -37 88t37 88q34 34 84.5 35.5t86.5 -30.5v202q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-202q36 32 87 30.5t85 -35.5q37 -37 37 -88t-37 -88zM125 339q-18 0 -30 -12t-12 -29.5t12 -29.5l238 -238l238 238q12 12 12 29.5t-12 29.5 t-29.5 12t-29.5 -12l-137 -138v403q0 17 -12.5 29t-29.5 12t-29 -12t-12 -29v-403l-138 138q-12 12 -29 12z"}, {PackIconTypiconsKind.ArrowDownThick, "M559 356q25 -25 25 -59t-25 -59l-267 -267l-268 267q-25 25 -25 59t25 59t59 25t59 -25l66 -66v302q0 34 24.5 58.5t59.5 24.5q34 0 58.5 -24.5t24.5 -58.5v-302l66 66q25 25 59 25t59 -25z"}, {PackIconTypiconsKind.ArrowForward, "M333 529q0 17 12.5 29.5t29.5 12.5t29 -12l263 -259l-263 -259q-12 -12 -29 -12t-29.5 12.5t-12.5 29.5v104q-106 -3 -187.5 -36.5t-145.5 -130.5v42q0 144 95.5 250.5t237.5 122.5v106z"}, {PackIconTypiconsKind.ArrowForwardOutline, "M42 -33q-18 0 -30 12.5t-12 28.5v42q0 149 94 264t239 144v71q0 34 25 59q24 24 59.5 23.5t58.5 -23.5l262 -258q12 -12 12 -30t-12 -30l-263 -258q-23 -23 -58 -23.5t-59 23.5q-25 25 -25 59v60q-84 -6 -146.5 -38.5t-110.5 -106.5q-13 -19 -34 -19zM375 216l42 1v-146 l232 229l-232 229v-146q-16 0 -37 -2q-106 -12 -185 -82t-103 -171q103 84 283 88z"}, {PackIconTypiconsKind.ArrowLeft, "M476 342q17 0 29 -12.5t12 -29.5t-12 -29.5t-29 -12.5h-316l95 -95q12 -12 12 -29.5t-12 -29.5t-29 -12q-18 0 -30 12l-196 196l196 196q12 12 29.5 12t29.5 -12t12 -29.5t-12 -29.5l-95 -95h316z"}, {PackIconTypiconsKind.ArrowLeftOutline, "M510 50q0 -51 -37 -88t-88 -37t-88 37l-297 296l297 297q35 35 88 35t88 -35q37 -37 37 -88q0 -49 -32 -84h202q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-202q32 -35 32 -83zM118 258l238 -237q12 -12 29.5 -12t29.5 12t12 29t-12 29l-138 138h403 q17 0 29 12t12 29t-12 29.5t-29 12.5h-403l138 137q12 12 12 30q0 17 -12 29t-29.5 12t-29.5 -12z"}, {PackIconTypiconsKind.ArrowLeftThick, "M621 342q34 0 58.5 -24.5t24.5 -59.5q0 -34 -24 -58.5t-59 -24.5h-302l66 -66q25 -24 25 -58.5t-25 -59.5q-24 -24 -59 -24t-59 24l-267 267l267 268q25 25 59 25t59 -25q25 -24 25 -58.5t-25 -59.5l-66 -66h302z"}, {PackIconTypiconsKind.ArrowLoop, "M562 467q77 0 132.5 -61.5t55.5 -147.5t-61 -147t-147 -61h-334q-86 0 -147 61t-61 147t61 147.5t147 61.5q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5q-52 0 -88.5 -36.5t-36.5 -88.5t36.5 -88.5t88.5 -36.5h334q52 0 88.5 36.5t36.5 88.5t-31 88.5t-74 36.5 h-86l53 -54q12 -12 12 -29t-12 -29q-13 -13 -29 -13t-29 13l-155 154l155 154q12 12 29 12t29 -12t12 -29t-12 -29l-53 -54h86z"}, {PackIconTypiconsKind.ArrowLoopOutline, "M625 633q51 0 88 -37t37 -88v-7q90 -23 149 -102t59 -182q0 -121 -85 -206.5t-206 -85.5h-375q-121 0 -206.5 85.5t-85.5 206.5t85.5 206t206.5 85h41q49 0 83 -31l121 120q36 36 88 36zM667 8q86 0 147 61.5t61 147.5t-55 147t-132 61h-87l53 54q12 12 12 29.5t-12 29.5 t-29 12t-29 -12l-155 -155l155 -154q12 -12 29 -12t29 12t12 29.5t-12 29.5l-53 54h87q43 0 73.5 -36.5t30.5 -88.5t-36.5 -88.5t-88.5 -36.5h-375q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h41q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5h-41q-86 0 -147.5 -61 t-61.5 -147t61.5 -147.5t147.5 -61.5h375zM708 258q0 -34 -24.5 -58.5t-58.5 -24.5q-35 0 -59 24l-155 155q-9 -24 -30 -39t-48 -15h-41q-35 0 -59.5 -24.5t-24.5 -58.5q0 -35 25 -59.5t59 -24.5h375q34 0 58.5 24.5t24.5 59.5q0 30 -15 53.5t-37 28.5q10 -17 10 -41z"}, {PackIconTypiconsKind.ArrowMaximise, "M458 633h209v-208q0 -17 -12.5 -29.5t-29.5 -12.5t-29.5 12.5t-12.5 29.5v66l-137 -137q-12 -12 -29 -12q-18 0 -30 12t-12 29.5t12 29.5l137 137h-66q-17 0 -29 12.5t-12 29.5t12 29t29 12zM221 246q12 12 29 12t29 -12t12 -29.5t-12 -29.5l-137 -137h66 q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12h-166h-42v208q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-66zM125 300q-17 0 -29.5 12.5t-12.5 29.5v208h209q17 0 29 -12.5t12 -29.5t-12 -29t-29 -12h-125v-125q0 -17 -12.5 -29.5t-29.5 -12.5zM542 300q17 0 29 -12.5 t12 -29.5v-208h-208q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h125v125q0 17 12.5 29.5t29.5 12.5z"}, {PackIconTypiconsKind.ArrowMaximiseOutline, "M490 675h302v-292q0 -40 -23.5 -72t-60.5 -45v-5v-294h-291q-13 -37 -48.5 -60.5t-76.5 -23.5h-292v292q0 40 23.5 72t60.5 45l-1 5v295h290q13 37 45 60t72 23zM625 50v211q0 17 -12.5 29.5t-29.5 12.5t-29 -12.5t-12 -29.5v-128h-125q-17 0 -29.5 -12t-12.5 -29 t12.5 -29.5t29.5 -12.5h208zM167 508v-211q0 -17 12 -29t29 -12t29.5 12t12.5 29v128h128q17 0 29 12.5t12 29.5t-12 29t-29 12h-211zM708 383v209h-208q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5h66l-137 -137q-12 -12 -12 -29.5t12 -29.5t29 -12q18 0 30 12 l137 137v-66q0 -17 12.5 -29t29.5 -12t29 12t12 29zM292 -33q17 0 29 12t12 29t-12 29.5t-29 12.5h-66l137 137q12 12 12 29.5t-12 29.5t-30 12q-17 0 -29 -12l-137 -137v66q0 17 -12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5v-208h209zM333 300q34 0 59 -24.5t25 -58.5 q0 -22 -13 -43q5 1 15 1h81v86l1 9q-19 -12 -43 -12q-34 0 -58.5 25t-24.5 59q0 22 12 42l-9 -1h-86v-86l-1 -9q19 12 42 12z"}, {PackIconTypiconsKind.ArrowMinimise, "M88 258h204v-208q0 -18 -10 -30t-27 -12t-29.5 12.5t-12.5 29.5v71l-142 -142q-12 -12 -29 -12q-18 0 -30 12t-12 29.5t12 29.5l137 137h-61q-17 0 -29 12.5t-12 29.5t12 29t29 12zM125 342q-17 0 -29.5 12t-12.5 29v167h167q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29 t-29.5 -12h-83v-84q0 -17 -12.5 -29t-29.5 -12zM542 258q17 0 29 -12t12 -29v-167h-166q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h83v84q0 17 12.5 29t29.5 12zM596 621q12 12 29 12t29 -12t12 -29.5t-12 -29.5l-137 -137h66q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29 t-29.5 -12h-208v208q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-66z"}, {PackIconTypiconsKind.ArrowMinimiseOutline, "M667 675q51 0 88 -37t37 -88t-37 -88l-37 -37q32 -35 32 -83q0 -57 -45 -95q3 -13 3 -28v-252h-247q-18 0 -31 4q-38 -46 -97 -46q-50 0 -85 33l-37 -38q-37 -37 -86 -37q-51 0 -88 37t-37 88q0 52 37 89l39 39q-29 35 -29 81q0 53 41 91q-5 25 -5 31v253h253q9 0 27 -4 q38 45 95 45q50 0 84 -31l36 36q37 37 89 37zM167 508v-166q0 -17 12 -29.5t29 -12.5t29.5 12.5t12.5 29.5v83h83q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12h-166zM696 521q12 12 12 29t-12 29q-13 13 -29 13q-17 0 -30 -13l-137 -137v66q0 17 -12.5 29.5t-29.5 12.5 t-29 -12.5t-12 -29.5v-208h208q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12h-66zM375 50v208h-203q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5h61l-137 -137q-12 -12 -12 -29.5t12 -29.5t29 -12q15 0 27 12l140 142v-71q0 -17 12 -29.5t29 -12.5t29.5 12.5 t12.5 29.5zM375 300v94q-22 -11 -39 -11h-44v-41q0 -21 -12 -42h95zM417 258v-96q21 13 44 13h39v44q0 32 30 39h-113zM419 92q0 -17 12.5 -29.5t29.5 -12.5h164v167q0 17 -12.5 29t-29.5 12t-29 -12t-12 -29v-84h-81q-17 0 -29.5 -12t-12.5 -29z"}, {PackIconTypiconsKind.ArrowMove, "M630 454l154 -154l-154 -154q-13 -13 -29 -13q-17 0 -30 13q-12 12 -12 29t12 29l54 54h-191v-191l54 54q12 12 29.5 12t29.5 -12t12 -29.5t-12 -29.5l-155 -154l-154 154q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12l54 -54v191h-191l53 -54q12 -12 12 -29t-12 -29 q-13 -13 -29 -13q-17 0 -30 13l-154 154l154 154q12 12 29.5 12t29.5 -12t12 -29t-12 -29l-53 -54h191v191l-54 -54q-12 -12 -29.5 -12t-29.5 12t-12 29.5t12 29.5l154 154l155 -154q12 -12 12 -29.5t-12 -29.5t-30 -12q-17 0 -29 12l-54 54v-191h191l-54 54q-12 12 -12 29 t12 29t29.5 12t29.5 -12z"}, {PackIconTypiconsKind.ArrowMoveOutline, "M927 359q25 -24 25 -58.5t-25 -59.5l-393 -392q-25 -25 -58 -25q-34 0 -59 25l-393 392q-25 25 -25 59.5t25 58.5l393 392q25 25 59 25q33 0 58 -25zM684 133q16 0 29 13l155 154l-155 154q-13 13 -29 13q-17 0 -30 -13q-12 -12 -12 -29t12 -29l54 -54h-191v191l54 -54 q12 -12 30 -12q17 0 29 12t12 29.5t-12 29.5l-154 154l-155 -154q-12 -12 -12 -29.5t12 -29.5t30 -12q17 0 29 12l54 54v-191h-191l54 54q12 12 12 29t-12 29q-13 13 -30 13q-16 0 -29 -13l-155 -154l155 -154q13 -13 29 -13q17 0 30 13q12 12 12 29t-12 29l-54 54h191v-191 l-54 54q-12 12 -29 12q-18 0 -30 -12t-12 -29.5t12 -29.5l155 -154l154 154q12 12 12 29.5t-12 29.5t-29 12q-18 0 -30 -12l-54 -54v191h191l-54 -54q-12 -12 -12 -29t12 -29q13 -13 30 -13zM612 217h-53v-53q20 11 42 11q0 22 11 42zM339 217q12 -22 12 -42q21 0 41 -11v53 h-53zM339 383h53v53q-20 -11 -41 -11q0 -20 -12 -42zM612 383q-11 20 -11 42q-22 0 -42 11v-53h53z"}, {PackIconTypiconsKind.ArrowRepeat, "M562 508q77 0 132.5 -61t55.5 -147t-61 -147t-147 -61q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5q52 0 88.5 36.5t36.5 88.5t-31 88.5t-74 36.5h-86l53 -54q12 -12 12 -29.5t-12 -29.5t-29 -12t-29 12l-155 155l155 154q12 12 29 12t29 -12t12 -29.5t-12 -29.5 l-53 -54h86zM221 288q12 12 29 12t29 -12l155 -155l-155 -154q-12 -12 -29 -12t-29 12t-12 29.5t12 29.5l53 54h-86q-77 0 -132.5 61t-55.5 147t61 147t147 61q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5q-52 0 -88.5 -36.5t-36.5 -88.5t31 -88.5t74 -36.5h86l-53 54 q-12 12 -12 29.5t12 29.5z"}, {PackIconTypiconsKind.ArrowRepeatOutline, "M625 633q51 0 88 -37t37 -88v-7q90 -23 149 -102t59 -182q0 -121 -85 -206.5t-206 -85.5h-42q-48 0 -83 32l-120 -120q-37 -37 -89 -37q-51 0 -88 37t-37 88l1 8q-90 23 -149.5 102.5t-59.5 181.5q0 121 85.5 206t206.5 85h41q48 0 83 -32l121 121q36 36 88 36zM667 8 q86 0 147 61.5t61 147.5t-55 147t-132 61h-87l53 54q12 12 12 29.5t-12 29.5t-29 12t-29 -12l-155 -155l155 -154q12 -12 29 -12t29 12t12 29.5t-12 29.5l-53 54h87q43 0 73.5 -36.5t30.5 -88.5t-36.5 -88.5t-88.5 -36.5h-42q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5 t29.5 -12.5h42zM250 175q0 34 24.5 58.5t58.5 24.5q35 0 59 -24l155 -155q9 24 30 39t48 15h42q34 0 58.5 24.5t24.5 59.5q0 30 -15 53.5t-37 28.5q10 -17 10 -41q0 -34 -24.5 -58.5t-58.5 -24.5q-35 0 -59 24l-155 155q-9 -24 -30 -39t-48 -15h-41q-35 0 -59.5 -24.5 t-24.5 -58.5q0 -30 15 -53.5t37 -28.5q-10 17 -10 40zM375 383q0 17 -12.5 29.5t-29.5 12.5h-41q-86 0 -147.5 -61t-61.5 -147t55.5 -147.5t132.5 -61.5h87l-54 -54q-12 -12 -12 -29t12 -29q13 -13 29 -13q17 0 30 13l154 154l-154 154q-13 13 -30 13q-16 0 -29 -13 q-12 -12 -12 -29t12 -29l54 -54h-87q-43 0 -73.5 36.5t-30.5 88.5t36.5 88.5t88.5 36.5h41q17 0 29.5 12t12.5 29z"}, {PackIconTypiconsKind.ArrowRight, "M262 496q12 12 29.5 12t29.5 -12l196 -196l-196 -196q-12 -12 -29 -12q-18 0 -30 12t-12 29.5t12 29.5l96 95h-316q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h316l-96 95q-12 12 -12 29.5t12 29.5z"}, {PackIconTypiconsKind.ArrowRightOutline, "M420 -75q-51 0 -88 37t-37 88q0 9 1 16t4 15t5.5 13t9 17.5t11.5 21.5h-201q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h201q-4 9 -11 21.5t-9.5 17.5t-5.5 13.5t-4 15.5t-1 16q0 52 36 88q35 35 88.5 35t88.5 -35l297 -297l-297 -296q-37 -37 -88 -37zM125 300 q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12h402l-137 -138q-12 -12 -12 -29t12 -29t29.5 -12t29.5 12l238 237l-238 238q-12 12 -29.5 12t-29.5 -12t-12 -29q0 -18 12 -30l137 -137h-402z"}, {PackIconTypiconsKind.ArrowRightThick, "M319 526q25 25 59 25t59 -25l267 -268l-267 -267q-24 -24 -59 -24t-59 24q-25 25 -25 59.5t25 58.5l66 66h-302q-35 0 -59 24.5t-24 58.5q0 35 24.5 59.5t58.5 24.5h302l-66 66q-25 25 -25 59.5t25 58.5z"}, {PackIconTypiconsKind.ArrowShuffle, "M42 425q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h146q73 0 126 -55q-26 -28 -49 -70q-32 42 -77 42h-146zM362 295l-20 -58q-26 -80 -82 -133.5t-114 -53.5h-104q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h104q26 0 62 37t55 93l20 59q26 79 93 132.5t138 53.5 h76l-53 54q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12l154 -154l-154 -155q-12 -12 -30 -12q-17 0 -29 12t-12 29.5t12 29.5l53 54h-76q-43 0 -89 -39t-63 -91zM537 246q12 12 29.5 12t29.5 -12l154 -154l-154 -155q-12 -12 -30 -12q-17 0 -29 12t-12 29.5t12 29.5l53 54 h-97q-95 0 -157 80q28 42 45 91q11 -39 42 -63.5t70 -24.5h97l-53 54q-12 12 -12 29.5t12 29.5z"}, {PackIconTypiconsKind.ArrowSortedDown, "M500 467q17 0 29.5 -13t12.5 -29t-13 -29l-258 -263l-259 263q-12 12 -12 29t12.5 29.5t29.5 12.5h458z"}, {PackIconTypiconsKind.ArrowSortedUp, "M42 175q-17 0 -29.5 13t-12.5 29q0 17 12 29l259 262l258 -262q13 -13 13 -29t-12.5 -29t-29.5 -13h-458z"}, {PackIconTypiconsKind.ArrowSync, "M625 280q0 -129 -92 -221q-87 -87 -205 -91l56 -55q12 -12 12 -29.5t-12 -29.5t-30 -12q-17 0 -29 12l-155 154l155 155q12 12 29.5 12t29.5 -12t12 -29.5t-12 -29.5l-52 -52q83 6 143 66q67 67 67 162q0 44 -14 76.5t-48 66.5q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12 q86 -86 86 -202zM83 279q0 -44 14 -76.5t48 -66.5q12 -12 12 -29.5t-12 -29.5t-29 -12q-18 0 -30 12q-86 86 -86 202q0 129 92 221q85 85 204 91l-55 55q-12 12 -12 29t12 29t29.5 12t29.5 -12l155 -154l-155 -154q-13 -13 -29 -13q-17 0 -30 13q-12 12 -12 29t12 29l53 54 q-83 -6 -144 -67q-67 -67 -67 -162z"}, {PackIconTypiconsKind.ArrowSyncOutline, "M229 675q0 51 37 88t88 37q52 0 89 -37l193 -193q25 -9 45 -29q111 -111 111 -261q0 -164 -116 -280q-54 -53 -118 -82q4 -15 4 -35q0 -51 -36.5 -88t-87.5 -37q-52 0 -89 37l-195 195q-24 9 -43 28q-111 111 -111 261q0 164 116 280q54 54 118 82q-5 18 -5 34zM411 -32 q119 4 206 91q91 91 91 221q0 116 -86 202q-12 12 -29 12q-18 0 -30 -12t-12 -29.5t12 -29.5q34 -34 48 -66.5t14 -76.5q0 -95 -67 -162q-60 -60 -143 -66l52 52q12 12 12 29.5t-12 29.5t-29 12q-18 0 -30 -12l-154 -155l154 -154q12 -12 30 -12q17 0 29 12t12 29.5 t-12 29.5zM379 591q-119 -6 -204 -91q-92 -92 -92 -221q0 -116 86 -202q12 -12 30 -12q17 0 29 12t12 29.5t-12 29.5q-34 34 -47.5 66t-13.5 77q0 95 67 162q61 61 144 67l-53 -54q-12 -12 -12 -29t12 -29q13 -13 29 -13q17 0 30 13l154 154l-154 154q-13 13 -30 13 q-16 0 -29 -13q-12 -12 -12 -29t12 -29zM354 342q-33 0 -57 22.5t-26 54.5l-8 -7q-55 -55 -55 -133q0 -36 11 -60.5t39 -52.5q30 -30 23 -71l98 97q25 25 59 25q33 0 57 -22.5t26 -54.5l7 8q55 55 55 132q0 36 -10.5 61t-38.5 53t-23 70l-98 -98q-24 -24 -59 -24z"}, {PackIconTypiconsKind.ArrowUnsorted, "M42 342q-17 0 -29.5 12t-12.5 29t12 29l259 263l258 -263q13 -13 13 -29t-12.5 -28.5t-29.5 -12.5h-458zM500 258q17 0 29.5 -12.5t12.5 -28.5t-13 -29l-258 -263l-259 263q-12 12 -12 29q0 16 12.5 28.5t29.5 12.5h458z"}, {PackIconTypiconsKind.ArrowUp, "M208 567l196 -196q12 -12 12 -29.5t-12 -29.5t-29 -12t-29 12l-96 96v-316q0 -17 -12.5 -29.5t-29.5 -12.5t-29 12.5t-12 29.5v316l-96 -96q-12 -12 -29.5 -12t-29.5 12t-12 29.5t12 29.5z"}, {PackIconTypiconsKind.ArrowUpOutline, "M333 -75q-52 0 -88.5 36.5t-36.5 88.5v198q-36 -32 -86.5 -30.5t-84.5 35.5q-37 37 -37 88.5t37 88.5l296 297l297 -297q37 -37 37 -88.5t-37 -88.5q-34 -34 -85 -35.5t-87 30.5v-198q0 -52 -36.5 -88.5t-88.5 -36.5zM292 449v-399q0 -17 12 -29.5t29 -12.5t29.5 12.5 t12.5 29.5v399l137 -137q12 -12 29.5 -12t29.5 12t12 29.5t-12 29.5l-238 238l-238 -238q-12 -12 -12 -29.5t12 -29.5t29.5 -12t29.5 12z"}, {PackIconTypiconsKind.ArrowUpThick, "M292 668l267 -267q25 -25 25 -59t-25 -59t-59 -25t-59 25l-66 66v-302q0 -35 -24.5 -59t-58.5 -24q-35 0 -59.5 24.5t-24.5 58.5v302l-66 -66q-25 -25 -59 -25t-59 25t-25 59t25 59z"}, {PackIconTypiconsKind.At, "M333 633q138 0 236 -97.5t98 -235.5v-21q0 -52 -36.5 -88.5t-88.5 -36.5q-62 0 -100 50q-45 -50 -109 -50q-60 0 -102.5 43t-42.5 103t42.5 103t102.5 43q47 0 86 -29q10 29 39 29q17 0 29.5 -12.5t12.5 -29.5v-125q0 -17 12.5 -29t29.5 -12t29 12t12 29v21 q0 104 -73.5 177t-176.5 73t-176.5 -73t-73.5 -177t73.5 -177t176.5 -73q78 0 141 43q14 10 31 6.5t27 -17.5t6.5 -31t-17.5 -27q-83 -57 -188 -57q-138 0 -235.5 97.5t-97.5 235.5t97.5 235.5t235.5 97.5zM333 238q26 0 44.5 18.5t18.5 43.5t-18.5 43.5t-44.5 18.5 q-25 0 -43.5 -18t-18.5 -44t18.5 -44t43.5 -18z"}, {PackIconTypiconsKind.Attachment, "M228 157q-42 0 -73 30.5t-31 73.5q0 44 30 74l189 189q49 49 118 49t118 -49t49 -118t-49 -118l-295 -295q-49 -49 -117 -49q-69 0 -118 49t-49 118t49 118l33 33q0 -49 30 -88l-4 -4q-24 -24 -24 -59t24 -59t59 -24t59 24q49 49 147 147.5t147 147.5q24 24 24 59t-24 59 q-25 24 -59.5 24t-58.5 -24l-189 -189q-6 -6 -6 -15t6 -15t15 -6t15 6l147 147q25 -25 25 -59q0 -33 -25 -58l-88 -89q-30 -30 -74 -30z"}, {PackIconTypiconsKind.AttachmentOutline, "M311 282q-9 0 -14.5 6.5t-5.5 13.5q0 9 6 15l189 189q25 25 58 25q35 0 60 -25q24 -24 24 -59t-24 -59q-49 -49 -147.5 -147t-147.5 -147q-25 -25 -59 -25t-59 25q-24 24 -24 59t24 59l4 4q-29 38 -29 88l-34 -33q-49 -49 -49 -118t49 -118t118 -49t118 49l294 295 q49 49 49 117.5t-49 117.5t-118 49q-68 0 -117 -49l-189 -189q-31 -31 -31 -73q0 -43 31 -74t73 -31q43 0 74 31l89 88q24 24 24 59q0 34 -25 59l-147 -147q-6 -6 -15 -6zM544 697q104 0 177 -73t73 -177q0 -103 -73 -176l-294 -295q-73 -73 -177 -73t-177 73t-73 177 q0 103 73 176l295 295q73 73 176 73z"}, {PackIconTypiconsKind.Backspace, "M728 592q43 0 73.5 -30.5t30.5 -73.5v-417q0 -43 -30.5 -73.5t-73.5 -30.5h-417q-40 0 -82.5 22t-65.5 54l-159 222q-10 14 0 28q27 37 79.5 111t78.5 111q23 32 66 54.5t83 22.5h417zM632 184l-95 95l95 96q12 12 12 29.5t-12 29.5t-29.5 12t-29.5 -12l-95 -96l-96 96 q-12 12 -29.5 12t-29.5 -12t-12 -29.5t12 -29.5l96 -96l-96 -95q-12 -12 -12 -29.5t12 -29.5q13 -13 30 -13q16 0 29 13l96 95l95 -95q13 -13 30 -13q16 0 29 13q12 12 12 29.5t-12 29.5z"}, {PackIconTypiconsKind.BackspaceOutline, "M749 -75h-417q-45 0 -92.5 24t-73.5 61q-27 37 -79.5 111t-78.5 111q-8 11 -8 26t7 26l159 222q26 37 73.5 61.5t92.5 24.5h417q52 0 88.5 -36.5t36.5 -88.5v-417q0 -52 -36.5 -88.5t-88.5 -36.5zM92 258q28 -38 77.5 -108t64.5 -91q14 -20 44 -35.5t54 -15.5h417 q17 0 29 12.5t12 29.5v417q0 17 -12 29t-29 12h-417q-24 0 -54 -15t-44 -35q-24 -34 -71 -100t-71 -100zM528 258l111 -110q10 -10 4 -23t-19 -13q-8 0 -15 7l-110 110l-110 -110q-7 -7 -15 -7q-13 0 -19 13t4 23l110 110l-110 111q-9 9 -5 20t14.5 14t20.5 -5l110 -110 l110 110q14 14 28.5 -0.5t0.5 -28.5z"}, {PackIconTypiconsKind.BatteryCharge, "M125 383h458v-250h-458v250zM368 179l132 97l-108 -18l-49 79l-135 -97l110 18zM708 383q35 0 59.5 -24.5t24.5 -58.5v-83q0 -35 -25 -59.5t-59 -24.5q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v250q0 52 36.5 88.5t88.5 36.5h458 q52 0 88.5 -36.5t36.5 -88.5zM625 133v250q0 17 -12.5 29.5t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-250q0 -17 12.5 -29t29.5 -12h458q17 0 29.5 12t12.5 29z"}, {PackIconTypiconsKind.BatteryFull, "M292 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM167 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM542 133q-17 0 -29.5 12.5t-12.5 29.5 v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM417 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM708 383q35 0 59.5 -24.5t24.5 -58.5v-83q0 -35 -25 -59.5t-59 -24.5 q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v250q0 52 36.5 88.5t88.5 36.5h458q52 0 88.5 -36.5t36.5 -88.5zM625 133v250q0 17 -12.5 29.5t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-250q0 -17 12.5 -29t29.5 -12h458q17 0 29.5 12t12.5 29z "}, {PackIconTypiconsKind.BatteryHigh, "M292 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM167 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM417 133q-17 0 -29.5 12.5t-12.5 29.5 v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM708 383q35 0 59.5 -24.5t24.5 -58.5v-83q0 -35 -25 -59.5t-59 -24.5q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v250q0 52 36.5 88.5t88.5 36.5h458q52 0 88.5 -36.5 t36.5 -88.5zM625 133v250q0 17 -12.5 29.5t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-250q0 -17 12.5 -29t29.5 -12h458q17 0 29.5 12t12.5 29z"}, {PackIconTypiconsKind.BatteryLow, "M167 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM708 383q35 0 59.5 -24.5t24.5 -58.5v-83q0 -35 -25 -59.5t-59 -24.5q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v250 q0 52 36.5 88.5t88.5 36.5h458q52 0 88.5 -36.5t36.5 -88.5zM625 133v250q0 17 -12.5 29.5t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-250q0 -17 12.5 -29t29.5 -12h458q17 0 29.5 12t12.5 29z"}, {PackIconTypiconsKind.BatteryMid, "M292 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM167 133q-17 0 -29.5 12.5t-12.5 29.5v167q0 17 12.5 29t29.5 12t29 -12t12 -29v-167q0 -17 -12 -29.5t-29 -12.5zM708 383q35 0 59.5 -24.5t24.5 -58.5 v-83q0 -35 -25 -59.5t-59 -24.5q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v250q0 52 36.5 88.5t88.5 36.5h458q52 0 88.5 -36.5t36.5 -88.5zM625 133v250q0 17 -12.5 29.5t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-250q0 -17 12.5 -29 t29.5 -12h458q17 0 29.5 12t12.5 29z"}, {PackIconTypiconsKind.Beaker, "M625 100q15 -54 -17 -93.5t-85 -39.5h-417q-53 0 -85 39.5t-17 93.5l103 380q2 8 5 28h-48q-17 0 -29 12.5t-12 29.5t12 29.5t29 12.5h500q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-49zM428 508h-233q-1 -28 -8 -49l-43 -160l4 1h333l4 -1zM523 50 q28 0 21 28l-50 185q-7 -5 -13 -5h-333q-7 0 -14 5l-49 -185q-7 -28 21 -28h417z"}, {PackIconTypiconsKind.Beer, "M208 112q0 -8 -6 -14t-14 -6t-14.5 6t-6.5 14v250q0 8 6.5 14.5t14.5 6.5t14 -6.5t6 -14.5v-250zM292 112q0 -8 -6.5 -14t-14.5 -6t-14.5 6t-6.5 14v250q0 8 6.5 14.5t14.5 6.5t14.5 -6.5t6.5 -14.5v-250zM375 112q0 -8 -6.5 -14t-14.5 -6t-14.5 6t-6.5 14v250 q0 8 6.5 14.5t14.5 6.5t14.5 -6.5t6.5 -14.5v-250zM562 550q60 0 103 -43t43 -103v-208q0 -60 -43 -103t-103 -43h-20q0 -52 -36.5 -88.5t-88.5 -36.5h-292q-52 0 -88.5 36.5t-36.5 88.5v542q0 34 24 58.5t59 24.5h375q35 0 59.5 -24.5t24.5 -58.5v-42h20zM83 592v-63 q0 -25 18.5 -43.5t44.5 -18.5q36 0 54 32l7 13l15 -3q14 -2 27.5 5.5t18.5 21.5l5 14h185v42h-375zM458 50v458h-157q-25 -41 -72 -41q-32 -42 -83 -42q-36 0 -63 21v-396q0 -17 12.5 -29.5t29.5 -12.5h292q17 0 29 12.5t12 29.5zM625 196v208q0 26 -18.5 44.5t-44.5 18.5 h-62v-334h62q26 0 44.5 18.5t18.5 44.5z"}, {PackIconTypiconsKind.Bell, "M655 79q19 -21 7.5 -46t-37.5 -25h-131q-14 -55 -59 -90t-102 -35t-101.5 35t-58.5 90h-131q-26 0 -38 26t8 46q3 3 8 9.5t17 29.5t21.5 50.5t17.5 74t8 98.5q0 81 46.5 145.5t120.5 90.5l-1 14q0 34 24 58.5t59 24.5t59.5 -24.5t24.5 -58.5l-2 -14q74 -26 121 -90.5 t47 -145.5q0 -52 8 -98.5t17.5 -74.5t21.5 -50.5t17 -29.5t8 -10zM333 508q-69 0 -117.5 -48.5t-48.5 -117.5q0 -49 -4 -84h341q-5 43 -5 84q0 69 -49 117.5t-117 48.5zM333 -33q49 0 72 41h-143q23 -41 71 -41zM117 92h433q-25 52 -39 125h-355q-14 -73 -39 -125z"}, {PackIconTypiconsKind.Book, "M625 675q52 0 88.5 -36.5t36.5 -88.5v-417q0 -52 -30 -88.5t-74 -36.5h-28q-13 -36 -45.5 -59.5t-72.5 -23.5h-375q-52 0 -88.5 36.5t-36.5 88.5v458q0 16 12 30l125 125q12 12 30 12h458zM125 8h42v459h-84v-417q0 -17 12.5 -29.5t29.5 -12.5zM542 50v375 q0 17 -12.5 29.5t-29.5 12.5h-292v-459h292q17 0 29.5 12.5t12.5 29.5zM667 133v417q0 17 -12.5 29.5t-29.5 12.5h-441l-42 -42h358q52 0 88.5 -36.5t36.5 -88.5v-333h21q6 0 13.5 11.5t7.5 29.5z"}, {PackIconTypiconsKind.Bookmark, "M458 717q52 0 88.5 -36.5t36.5 -88.5v-584q0 -41 -19.5 -62.5t-46.5 -21.5q-34 0 -64 30l-132 133q-12 12 -29.5 12t-29.5 -12l-132 -133q-32 -31 -65.5 -30t-51.5 31q-13 23 -13 53v584q0 52 36.5 88.5t88.5 36.5h333zM125 633q-17 0 -29.5 -12t-12.5 -29v-413l102 94 q44 41 106.5 41t106.5 -41l102 -94v413q0 17 -12.5 29t-29.5 12h-333zM380 146l120 -120v96l-130 120q-32 29 -78 29t-78 -29l-131 -120v-96l120 120q36 36 89 36q52 0 88 -36z"}, {PackIconTypiconsKind.Briefcase, "M625 508q52 0 88.5 -36.5t36.5 -88.5v-291q0 -52 -36.5 -88.5t-88.5 -36.5h-500q-52 0 -88.5 36.5t-36.5 88.5v291q0 52 36.5 88.5t88.5 36.5q0 52 36.5 88.5t88.5 36.5h250q52 0 88.5 -36.5t36.5 -88.5zM250 550q-17 0 -29.5 -12.5t-12.5 -29.5h334q0 17 -12.5 29.5 t-29.5 12.5h-250zM667 92v41h-584v-41q0 -17 12.5 -29.5t29.5 -12.5h500q17 0 29.5 12.5t12.5 29.5zM83 175h584v208q0 17 -12.5 29.5t-29.5 12.5h-500q-17 0 -29.5 -12.5t-12.5 -29.5v-208zM417 300q17 0 29 -12.5t12 -29.5t-12 -29t-29 -12h-84q-17 0 -29 12t-12 29 t12 29.5t29 12.5h84z"}, {PackIconTypiconsKind.Brush, "M727 641q39 -39 19 -90q-108 -271 -390 -438q-13 -8 -23 -10q-13 -83 -75.5 -136.5t-147.5 -53.5q-19 0 -37 3l-61 9l-9 61q-16 101 44 178q54 69 144 83q4 14 8 22q167 282 438 390q15 6 31 6q35 0 59 -24zM110 -3q57 0 97 35.5t46 90.5l-43 43q-62 -7 -98.5 -55 t-26.5 -113q8 -1 25 -1zM314 184q30 17 74 49q-67 67 -68 69q-28 -39 -49 -75zM422 258q170 132 247 324q-194 -77 -325 -248z"}, {PackIconTypiconsKind.BusinessCard, "M792 -33h-667q-52 0 -88.5 36.5t-36.5 88.5v416q0 52 36.5 88.5t88.5 36.5h667q52 0 88.5 -36.5t36.5 -88.5v-416q0 -52 -36.5 -88.5t-88.5 -36.5zM125 550q-17 0 -29.5 -12.5t-12.5 -29.5v-416q0 -17 12.5 -29.5t29.5 -12.5h667q17 0 29 12.5t12 29.5v416q0 17 -12 29.5 t-29 12.5h-667zM375 175h-167q-17 0 -29 12.5t-12 29.5t12 29t29 12h167q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5zM375 342h-167q-17 0 -29 12t-12 29t12 29.5t29 12.5h167q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12zM542 362q0 84 83 84t83 -84 q0 -83 -83 -83t-83 83zM625 244q45 0 74.5 -18t29.5 -42q0 -12 -30 -21t-74 -9q-47 0 -75.5 9t-28.5 21q0 24 28.5 42t75.5 18z"}, {PackIconTypiconsKind.Calculator, "M458 -75h-333q-53 0 -89 36t-36 89v500q0 53 36 89t89 36h333q53 0 89 -36t36 -89v-500q0 -53 -36 -89t-89 -36zM125 592q-19 0 -30.5 -11.5t-11.5 -30.5v-500q0 -19 11.5 -30.5t30.5 -11.5h333q19 0 30.5 11.5t11.5 30.5v500q0 19 -11.5 30.5t-30.5 11.5h-333zM125 342 q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM250 342q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM375 342q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM125 217q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM250 217q0 41 42 41 q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM375 217q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM125 92q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM250 92q0 41 42 41q41 0 41 -41q0 -42 -41 -42q-42 0 -42 42zM375 92q0 41 42 41q41 0 41 -41 q0 -42 -41 -42q-42 0 -42 42zM417 508h-250v-41h250v41zM458 550v-125h-333v125h333z"}, {PackIconTypiconsKind.Calendar, "M667 542q37 -13 60 -45t23 -72v-375q0 -52 -36.5 -88.5t-88.5 -36.5h-500q-52 0 -88.5 36.5t-36.5 88.5v375q0 40 23 72t60 45v8q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5h84q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-8zM500 550v-83q0 -17 12.5 -29.5 t29.5 -12.5t29 12.5t12 29.5v83q0 17 -12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5zM167 550v-83q0 -17 12 -29.5t29 -12.5t29.5 12.5t12.5 29.5v83q0 17 -12.5 29.5t-29.5 12.5t-29 -12.5t-12 -29.5zM667 50v250h-584v-250q0 -17 12.5 -29.5t29.5 -12.5h500q17 0 29.5 12.5 t12.5 29.5z"}, {PackIconTypiconsKind.CalendarOutline, "M667 542q37 -13 60 -45t23 -72v-375q0 -52 -36.5 -88.5t-88.5 -36.5h-500q-52 0 -88.5 36.5t-36.5 88.5v375q0 40 23 72t60 45v8q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5h84q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-8zM500 550v-83q0 -17 12.5 -29.5 t29.5 -12.5t29 12.5t12 29.5v83q0 17 -12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5zM167 550v-83q0 -17 12 -29.5t29 -12.5t29.5 12.5t12.5 29.5v83q0 17 -12.5 29.5t-29.5 12.5t-29 -12.5t-12 -29.5zM667 50v250h-584v-250q0 -17 12.5 -29.5t29.5 -12.5h500q17 0 29.5 12.5 t12.5 29.5zM667 342v83q0 17 -12.5 29.5t-29.5 12.5q0 -35 -24.5 -59.5t-58.5 -24.5t-59 24.5t-25 59.5h-166q0 -35 -25 -59.5t-59 -24.5t-58.5 24.5t-24.5 59.5q-17 0 -29.5 -12.5t-12.5 -29.5v-83h584z"}, {PackIconTypiconsKind.Camera, "M708 550q52 0 88.5 -36.5t36.5 -88.5v-333q0 -52 -36.5 -88.5t-88.5 -36.5h-583q-52 0 -88.5 36.5t-36.5 88.5v333q0 52 36.5 88.5t88.5 36.5h66l42 42q18 18 46 29.5t54 11.5h167q26 0 54.5 -11.5t46.5 -29.5l41 -42h66zM417 133q60 0 102.5 43t42.5 103q0 61 -42 103.5 t-103 42.5t-103.5 -42.5t-42.5 -103.5q0 -60 42.5 -103t103.5 -43zM667 329q23 0 38.5 15.5t15.5 38.5t-16 39t-38 16q-23 0 -39 -16t-16 -39q0 -22 16 -38t39 -16z"}, {PackIconTypiconsKind.CameraOutline, "M708 -33h-583q-52 0 -88.5 36.5t-36.5 88.5v333q0 52 36.5 88.5t88.5 36.5h66l42 42q18 18 46 29.5t54 11.5h167q26 0 54.5 -11.5t46.5 -29.5l41 -42h66q52 0 88.5 -36.5t36.5 -88.5v-333q0 -52 -36.5 -88.5t-88.5 -36.5zM125 467q-17 0 -29.5 -12.5t-12.5 -29.5v-333 q0 -17 12.5 -29.5t29.5 -12.5h583q17 0 29.5 12.5t12.5 29.5v333q0 17 -12.5 29.5t-29.5 12.5h-83q-17 0 -29 12l-54 54q-17 17 -42 17h-167q-24 0 -41 -17l-54 -54q-12 -12 -30 -12h-83zM417 383q-43 0 -74 -30.5t-31 -73.5t31 -73.5t74 -30.5t73.5 30.5t30.5 73.5 t-30.5 73.5t-73.5 30.5zM417 425q61 0 103 -42.5t42 -103.5q0 -60 -42.5 -103t-102.5 -43q-61 0 -103.5 43t-42.5 103q0 61 42.5 103.5t103.5 42.5zM667 438q22 0 38 -16t16 -39t-15.5 -38.5t-38.5 -15.5t-39 16t-16 38q0 23 16 39t39 16z"}, {PackIconTypiconsKind.Cancel, "M333 633q138 0 236 -97.5t98 -235.5t-98 -235.5t-236 -97.5t-235.5 97.5t-97.5 235.5t97.5 235.5t235.5 97.5zM125 300q0 -86 61 -147t147 -61q50 0 96 24l-280 280q-24 -46 -24 -96zM517 204q25 48 25 96q0 86 -61.5 147t-147.5 61q-49 0 -95 -24z"}, {PackIconTypiconsKind.CancelOutline, "M354 -54q-146 0 -250 104t-104 250t104 250t250 104t250 -104t104 -250t-104 -250t-250 -104zM354 571q-112 0 -191.5 -79.5t-79.5 -191.5t79.5 -191.5t191.5 -79.5t191.5 79.5t79.5 191.5t-79.5 191.5t-191.5 79.5zM354 446q-17 0 -25 -2l169 -170q2 8 2 26 q0 60 -43 103t-103 43zM354 488q77 0 132.5 -55.5t55.5 -132.5q0 -52 -29 -99l-258 257q48 30 99 30zM211 326q-3 -12 -3 -26q0 -60 43 -103t103 -43q18 0 26 2zM196 400l258 -258q-48 -30 -100 -30q-78 0 -132.5 55t-54.5 133q0 53 29 100z"}, {PackIconTypiconsKind.ChartArea, "M708 550v-417h-666v125q0 30 18 52l167 209q21 26 54.5 30t60.5 -16l102 -76l116 145q22 27 56 31t61 -18q31 -24 31 -65zM708 8q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5h-666q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h666z"}, {PackIconTypiconsKind.ChartAreaOutline, "M625 675q52 0 88.5 -37.5t36.5 -87.5v-417q0 -17 -12.5 -29t-29.5 -12h-666q-17 0 -29.5 12t-12.5 29v125q0 45 27 78l167 209q31 38 82.5 44.5t90.5 -22.5l69 -53l92 114q38 47 97 47zM667 550q0 16 -13 29t-29 13q-20 0 -33 -16l-116 -145q-11 -14 -27 -16t-30 8 l-102 77q-13 10 -30.5 8t-27.5 -15l-167 -209q-9 -11 -9 -26v-83h584v375zM708 -75h-666q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h666q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5z"}, {PackIconTypiconsKind.ChartBar, "M417 633v-500h-167v500q0 35 24.5 59.5t58.5 24.5q35 0 59.5 -24.5t24.5 -59.5zM625 467v-334h-167v334q0 34 24.5 58.5t59.5 24.5q34 0 58.5 -24t24.5 -59zM208 342v-209h-166v209q0 34 24 58.5t59 24.5t59 -24.5t24 -58.5zM625 8q17 0 29.5 -12t12.5 -29t-12.5 -29.5 t-29.5 -12.5h-583q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h583z"}, {PackIconTypiconsKind.ChartBarOutline, "M542 592q52 0 88.5 -36.5t36.5 -88.5v-375h-667v250q0 52 36.5 88.5t88.5 36.5q47 0 83 -33v199q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-74q36 33 84 33zM333 675q-17 0 -29 -12.5t-12 -29.5v-458h83v458q0 17 -12.5 29.5t-29.5 12.5zM167 175v167 q0 17 -12.5 29t-29.5 12t-29.5 -12t-12.5 -29v-167h84zM583 175v292q0 17 -12 29t-29 12t-29.5 -12t-12.5 -29v-292h83zM625 -75h-583q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h583q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5z"}, {PackIconTypiconsKind.ChartLine, "M31 152q-27 22 -31 56t18 61l167 208q21 26 54.5 30.5t60.5 -15.5l102 -77l116 145q22 27 56 31t61 -18t31 -56t-18 -61l-166 -208q-21 -26 -54.5 -30.5t-60.5 15.5l-102 77l-117 -145q-24 -32 -65 -32q-28 0 -52 19zM42 -75q-17 0 -29.5 12.5t-12.5 29.5t12.5 29 t29.5 12h583q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5h-583z"}, {PackIconTypiconsKind.ChartLineOutline, "M125 92q-37 0 -67.5 20.5t-45 50t-12 66t26.5 66.5l167 208q31 38 82.5 45t90.5 -23l69 -52l91 113q38 47 98 47q50 0 86 -34.5t39 -79.5t-27 -89l-167 -208q-31 -38 -82 -44.5t-91 22.5l-70 52l-91 -113q-38 -47 -97 -47zM292 467q-20 0 -33 -16l-167 -208 q-16 -22 -3.5 -45t36.5 -23q20 0 33 16l141 177l134 -101q13 -10 30.5 -8t27.5 15l167 208q16 22 3.5 45t-36.5 23q-20 0 -33 -16l-141 -176l-134 100q-10 9 -25 9zM667 -75h-584q-17 0 -29 12.5t-12 29.5t12 29t29 12h584q17 0 29 -12t12 -29t-12 -29.5t-29 -12.5z"}, {PackIconTypiconsKind.ChartPie, "M359 218l234 234q82 -103 82 -235q0 -109 -58 -200q-9 -14 -25.5 -15.5t-28.5 10.5zM250 200l216 -217q-77 -58 -174 -58q-121 0 -206.5 86t-85.5 207q0 110 72 192t178 97v-307zM555 541l-222 -223v315q0 17 12.5 28t29.5 8q98 -18 177 -73q14 -10 14.5 -26.5 t-11.5 -28.5z"}, {PackIconTypiconsKind.ChartPieOutline, "M264 675q0 34 24.5 58.5t58.5 24.5h8q174 -15 311 -129q27 -23 29.5 -59.5t-23.5 -63.5l-24 -23q74 -108 74 -238q0 -147 -92 -262q-24 -29 -65 -31q-19 0 -37 9q-86 -56 -185 -56q-142 0 -242.5 101t-100.5 243q0 119 74.5 212.5t189.5 120.5v93zM343 -12q85 0 155 52 l-192 198v267q-95 -14 -159 -86.5t-64 -169.5q0 -108 76.5 -184.5t183.5 -76.5zM347 299l265 266q-116 97 -265 110v-376zM356 246l209 -211q74 93 74 210q0 118 -74 211z"}, {PackIconTypiconsKind.ChevronLeft, "M385 567q25 -25 25 -59t-25 -59l-149 -149l149 -149q25 -25 25 -59t-25 -59t-59 -25t-59 25l-267 267l267 267q24 25 59 25t59 -25z"}, {PackIconTypiconsKind.ChevronLeftOutline, "M510 92q0 -51 -37 -88t-88 -37q-52 0 -88 36l-297 297l297 297q35 35 88.5 35t88.5 -35q36 -36 36 -89q0 -52 -36 -88l-120 -120l120 -120q36 -36 36 -88zM118 300l238 -238q12 -12 29.5 -12t29.5 12t12 30q0 17 -12 29l-179 179l179 179q12 12 12 29q0 18 -12 30 t-29.5 12t-29.5 -12z"}, {PackIconTypiconsKind.ChevronRight, "M24 567q24 25 59 25t59 -25l268 -267l-268 -267q-25 -25 -59 -25t-59 25t-25 59t25 59l150 149l-150 149q-25 25 -25 59t25 59z"}, {PackIconTypiconsKind.ChevronRightOutline, "M125 -33q-51 0 -88 37t-37 88t37 88l120 120l-120 120q-37 37 -37 88q0 52 37 89q35 35 88 35t88 -35l297 -297l-297 -297q-36 -36 -88 -36zM125 550q-17 0 -29.5 -12.5t-12.5 -29.5q0 -16 13 -29l178 -179l-178 -179q-13 -13 -13 -29q0 -17 13 -30q12 -12 29 -12t29 12 l238 238l-238 238q-12 12 -29 12z"}, {PackIconTypiconsKind.Clipboard, "M542 675q52 0 88.5 -36.5t36.5 -88.5v-500q0 -52 -36.5 -88.5t-88.5 -36.5h-417q-52 0 -88.5 36.5t-36.5 88.5v500q0 52 36.5 88.5t88.5 36.5h417zM208 592v-42q0 -17 12.5 -29.5t29.5 -12.5h167q17 0 29 12.5t12 29.5v42h-250zM583 50v500q0 17 -12 29.5t-29 12.5h-42 v-42q0 -34 -24 -58.5t-59 -24.5h-167q-34 0 -58.5 24.5t-24.5 58.5v42h-42q-17 0 -29.5 -12.5t-12.5 -29.5v-500q0 -17 12.5 -29.5t29.5 -12.5h417q17 0 29 12.5t12 29.5zM500 92h-333q-21 0 -21 20q0 9 6 15t15 6h333q9 0 15 -6t6 -15q0 -20 -21 -20zM500 217h-333 q-9 0 -15 6t-6 15q0 20 21 20h333q21 0 21 -20q0 -9 -6 -15t-15 -6zM500 342h-333q-21 0 -21 20q0 9 6 15t15 6h333q9 0 15 -6t6 -15q0 -20 -21 -20z"}, {PackIconTypiconsKind.CloudStorage, "M625 425q86 0 147 -61t61 -147t-61 -147.5t-147 -61.5h-167v191l54 -53q13 -13 30 -13q16 0 29 13q12 12 12 29t-12 29l-125 125q-11 11 -29 11.5t-30 -11.5l-125 -125q-12 -12 -12 -29t12 -29q13 -13 30 -13q16 0 29 13l54 53v-191h-208q-69 0 -118 49t-49 118 q0 58 35 102.5t90 58.5v6q0 104 73.5 177t176.5 73q80 0 144.5 -46.5t90.5 -121.5z"}, {PackIconTypiconsKind.CloudStorageOutline, "M635 425q86 0 147.5 -61t61.5 -147t-61.5 -147.5t-147.5 -61.5h-458q-70 0 -123.5 49.5t-53.5 117.5q0 53 38 98t77 63v6q0 103 78 176.5t182 73.5q82 0 151.5 -47t94.5 -121zM635 92q52 0 88.5 36.5t36.5 88.5t-36 88.5t-88 36.5q-14 0 -34 -6l-45 -12l-8 45 q-11 60 -57 99.5t-107 39.5q-69 0 -117.5 -48.5t-48.5 -117.5q0 -18 3 -34l10 -50l-59 1q-32 0 -55.5 -25t-23.5 -59q0 -35 24 -59t59 -24h229v158l-89 -90q-6 -6 -15 -6q-13 0 -19 13t4 23l125 125q15 9 30 0l125 -125q10 -10 4 -23t-19 -13q-9 0 -15 6l-89 90v-158h187z "}, {PackIconTypiconsKind.Code, "M243 50q-35 0 -59 24l-184 184l184 184q25 25 59.5 25t58.5 -25q25 -25 25 -59t-25 -59l-66 -66l66 -66q25 -25 25 -59t-25 -59q-24 -24 -59 -24zM562 50q-35 0 -59 24q-25 25 -25 59t25 59l66 66l-66 66q-25 25 -25 59t25 59q24 25 58.5 25t59.5 -25l184 -184l-184 -184 q-24 -24 -59 -24z"}, {PackIconTypiconsKind.CodeOutline, "M302 8q-52 0 -89 37l-213 213l213 214q35 35 88.5 35t88.5 -35q37 -37 37 -88.5t-37 -88.5l-36 -37l36 -36q37 -37 37 -88.5t-37 -88.5t-88 -37zM118 258l154 -154q12 -12 29.5 -12t29.5 12t12 29.5t-12 29.5l-95 95l95 96q12 12 12 29.5t-12 29.5t-29.5 12t-29.5 -12z M649 8q-51 0 -88 37t-37 88.5t37 88.5l37 36l-37 37q-37 37 -37 88.5t37 88.5q35 35 88.5 35t88.5 -35l213 -214l-213 -213q-37 -37 -89 -37zM649 425q-17 0 -29 -12t-12 -29.5t12 -29.5l95 -96l-95 -95q-12 -12 -12 -29.5t12 -29.5t29.5 -12t29.5 12l154 154l-154 155 q-12 12 -30 12z"}, {PackIconTypiconsKind.Coffee, "M542 8h-500q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h500q17 0 29 -12.5t12 -29.5t-12 -29.5t-29 -12.5zM562 592q60 0 103 -43t43 -103t-43 -103t-103 -43h-20v-83q0 -35 -25 -59.5t-59 -24.5h-333q-34 0 -58.5 24.5t-24.5 59.5v375h520zM458 217v291h-333 v-291h333zM562 383q26 0 44.5 18.5t18.5 44.5q0 25 -18.5 43.5t-44.5 18.5h-62v-125h62z"}, {PackIconTypiconsKind.Cog, "M200 69q-4 16 -19 25t-32 4l-61 -18q-17 -5 -35 2.5t-26 22.5l-21 36q-8 15 -5 34t15 31l45 44q12 12 12 29t-12 29l-45 44q-13 12 -15 31t6 34l20 37q8 15 26 22t35 2l61 -17q17 -5 32 4t19 25l15 61q5 17 20 29t32 12h41q17 0 32 -12t20 -29l16 -61q5 -17 19.5 -25 t30.5 -4l61 17q17 5 35 -2t26 -22l21 -37q8 -15 5 -34t-15 -31l-45 -44q-13 -12 -12.5 -29t12.5 -29l45 -44q12 -12 15 -31t-5 -34l-21 -36q-8 -15 -26 -22.5t-35 -2.5l-61 18q-16 4 -30.5 -4t-19.5 -25l-16 -62q-5 -17 -20 -28.5t-32 -11.5h-41q-17 0 -32 11.5t-20 28.5z M288 362q-35 0 -59.5 -24.5t-24.5 -58.5t24.5 -58.5t59.5 -24.5q34 0 58.5 24t24.5 59t-24.5 59t-58.5 24z"}, {PackIconTypiconsKind.CogOutline, "M448 592h-125l-36 -143l-141 41l-63 -109l106 -102l-106 -102l63 -108l141 40l36 -142h125l35 142l142 -40l62 108l-106 102l106 102l-62 109l-142 -41zM448 675q28 0 50.5 -17.5t29.5 -45.5l15 -59l59 17q12 3 23 3q48 0 72 -42l62 -108q14 -25 10.5 -53t-24.5 -48 l-44 -43l44 -42q20 -20 24 -48t-10 -53l-62 -109q-24 -41 -72 -41q-11 0 -23 3l-59 16l-14 -59q-7 -28 -29.5 -45.5t-51.5 -17.5h-125q-29 0 -51.5 17.5t-29.5 45.5l-15 59l-58 -17q-12 -3 -23 -3q-48 0 -72 42l-63 108q-14 25 -10.5 53.5t24.5 48.5l44 42l-44 42 q-20 20 -24 48.5t10 53.5l63 108q24 42 72 42q11 0 23 -3l58 -17l15 59q7 28 29.5 45.5t51.5 17.5h125zM385 362q-35 0 -59 -24t-24 -59t24 -59t59 -24t59.5 24.5t24.5 58.5t-24.5 58.5t-59.5 24.5zM385 404q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5t-88.5 36.5 t-36.5 88.5t36.5 88.5t88.5 36.5z"}, {PackIconTypiconsKind.Compass, "M375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5zM375 675q155 0 265 -110t110 -265t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM529 480q11 3 20 -6t6 -20l-72 -248q-3 -11 -14 -14 l-248 -72h-5q-10 0 -17 8t-4 18l72 248q3 11 14 14zM246 171l201 57l-144 144z"}, {PackIconTypiconsKind.Contacts, "M667 675q52 0 88.5 -36.5t36.5 -88.5v-500q0 -52 -36.5 -88.5t-88.5 -36.5h-459q-52 0 -88.5 36.5t-36.5 88.5v42h-41q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h41v83h-41q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h41v83h-41q-17 0 -29.5 12.5t-12.5 29.5 t12.5 29t29.5 12h41v42q0 52 36.5 88.5t88.5 36.5h459zM167 550v-42h41v84q-17 0 -29 -12.5t-12 -29.5zM167 425v-83h41v83h-41zM167 258v-83h41v83h-41zM167 50q0 -17 12 -29.5t29 -12.5v84h-41v-42zM708 50v500q0 17 -12 29.5t-29 12.5h-417v-584h417q17 0 29 12.5 t12 29.5zM375 362q0 84 83 84q84 0 84 -84q0 -83 -84 -83q-83 0 -83 83zM458 244q45 0 74.5 -18t29.5 -42q0 -12 -30 -21t-74 -9q-47 0 -75.5 9t-28.5 21q0 24 28.5 42t75.5 18z"}, {PackIconTypiconsKind.CreditCard, "M583 508q52 0 88.5 -36.5t36.5 -88.5v-291q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v291q0 52 36.5 88.5t88.5 36.5h458zM625 92v166h-542v-166q0 -17 12.5 -29.5t29.5 -12.5h458q17 0 29.5 12.5t12.5 29.5zM625 342v41q0 17 -12.5 29.5 t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-41h542zM458 133q-20 0 -20 21t20 21h84q20 0 20 -21t-20 -21h-84z"}, {PackIconTypiconsKind.Css3, "M112 658h638l-58 -304q-1 -8 -54 -292l-342 -120l-296 120l29 159h125l-12 -67l179 -71l208 71l29 150h-512l25 134h512l17 87h-512z"}, {PackIconTypiconsKind.Database, "M583 434v-4v-260q0 -121 -85 -206.5t-206 -85.5t-206.5 85.5t-85.5 206.5v260l1 4q5 116 89.5 196.5t201.5 80.5t201.5 -80.5t89.5 -196.5zM292 66q68 0 124.5 37t83.5 97v16q-86 -88 -208 -88q-123 0 -209 88v-16q27 -60 84 -97t125 -37zM292 628q-86 0 -147.5 -61 t-61.5 -147t61.5 -147.5t147.5 -61.5t147 61.5t61 147.5t-61 147t-147 61zM292 -39q70 0 125 42.5t74 108.5q-81 -88 -199 -88t-199 88q19 -66 74 -108.5t125 -42.5z"}, {PackIconTypiconsKind.Delete, "M333 633q138 0 236 -97.5t98 -235.5t-98 -235.5t-236 -97.5t-235.5 97.5t-97.5 235.5t97.5 235.5t235.5 97.5zM488 204l-96 96l96 96q12 12 12 29t-12 29t-29.5 12t-29.5 -12l-96 -95l-95 95q-12 12 -29.5 12t-29.5 -12t-12 -29t12 -29l95 -96l-95 -96q-12 -12 -12 -29 t12 -29q13 -13 29 -13q17 0 30 13l95 95l96 -95q13 -13 29 -13q17 0 30 13q12 12 12 29t-12 29z"}, {PackIconTypiconsKind.DeleteOutline, "M375 675q155 0 265 -110t110 -265t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM375 8q121 0 206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5t-206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5zM404 300l111 -110q10 -10 4 -23t-19 -13q-9 0 -15 6 l-110 111l-110 -111q-6 -6 -15 -6q-13 0 -19 13t4 23l111 110l-111 110q-14 14 1 29t29 1l110 -111l110 111q14 14 29 -1t1 -29z"}, {PackIconTypiconsKind.DeviceDesktop, "M875 758q52 0 88.5 -36.5t36.5 -88.5v-458q0 -52 -36.5 -88.5t-88.5 -36.5h-250v-83h125q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-500q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h125v83h-250q-52 0 -88.5 36.5t-36.5 88.5v458q0 52 36.5 88.5 t88.5 36.5h750zM583 -33v83h-166v-83h166zM917 175v458q0 17 -12.5 29.5t-29.5 12.5h-750q-17 0 -29.5 -12.5t-12.5 -29.5v-458q0 -17 12.5 -29.5t29.5 -12.5h750q17 0 29.5 12.5t12.5 29.5zM833 633q17 0 29.5 -12t12.5 -29v-334q0 -17 -12.5 -29t-29.5 -12h-666 q-17 0 -29.5 12t-12.5 29v334q0 17 12.5 29t29.5 12h666zM833 258v334h-666v-334h666z"}, {PackIconTypiconsKind.DeviceLaptop, "M916 131q36 -8 60 -36.5t24 -65.5q0 -43 -30.5 -73.5t-73.5 -30.5h-792q-43 0 -73.5 30.5t-30.5 73.5q0 37 24 65.5t60 36.5q0 6 -0.5 21t-0.5 23v375q0 52 36.5 88.5t88.5 36.5h584q52 0 88.5 -36.5t36.5 -88.5v-375q0 -8 -0.5 -23t-0.5 -21zM167 550v-375q0 -9 0.5 -23 t0.5 -19h40v375q0 17 12.5 29.5t29.5 12.5h500q17 0 29.5 -12.5t12.5 -29.5v-375h41v42v375q0 17 -12 29.5t-29 12.5h-584q-17 0 -29 -12.5t-12 -29.5zM750 133v375h-500v-375h500zM896 8q8 0 14.5 6.5t6.5 14.5t-6.5 14.5t-14.5 6.5h-792q-8 0 -14.5 -6.5t-6.5 -14.5 t6.5 -14.5t14.5 -6.5h792z"}, {PackIconTypiconsKind.DevicePhone, "M417 675q52 0 88.5 -36.5t36.5 -88.5v-500q0 -52 -36.5 -88.5t-88.5 -36.5h-292q-52 0 -88.5 36.5t-36.5 88.5v500q0 52 36.5 88.5t88.5 36.5h292zM458 50v500q0 17 -12 29.5t-29 12.5h-292q-17 0 -29.5 -12.5t-12.5 -29.5v-500q0 -17 12.5 -29.5t29.5 -12.5h292 q17 0 29 12.5t12 29.5zM375 550q17 0 29.5 -12.5t12.5 -29.5v-375q0 -17 -12.5 -29t-29.5 -12h-63q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5h-62q-17 0 -29.5 12t-12.5 29v375q0 17 12.5 29.5t29.5 12.5h208zM375 133v375h-208v-375h208z"}, {PackIconTypiconsKind.DeviceTablet, "M542 633q17 0 29 -12t12 -29v-500q0 -17 -12 -29.5t-29 -12.5h-146q0 -17 -12.5 -29.5t-29.5 -12.5t-29.5 12.5t-12.5 29.5h-145q-17 0 -29.5 12.5t-12.5 29.5v500q0 17 12.5 29t29.5 12h375zM542 92v500h-375v-500h375zM583 758q52 0 88.5 -36.5t36.5 -88.5v-625 q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v625q0 52 36.5 88.5t88.5 36.5h458zM625 8v625q0 17 -12.5 29.5t-29.5 12.5h-458q-17 0 -29.5 -12.5t-12.5 -29.5v-625q0 -17 12.5 -29t29.5 -12h458q17 0 29.5 12t12.5 29z"}, {PackIconTypiconsKind.Directions, "M746 404l-114 -108l-3 -3q38 -43 38 -97q0 -60 -43 -103t-103 -43h-113l-33 -167h-42l-33 167h-92q-55 0 -94 39l-107 107l77 77q-38 17 -61 52.5t-23 78.5q0 60 43 103t103 43h146v21q0 25 18 43.5t44 18.5t44.5 -18.5t18.5 -43.5v-21h121q54 0 93 -37zM521 133 q25 0 43.5 18.5t18.5 44.5t-18.5 44t-43.5 18h-313q-21 0 -35 -14l-48 -48l48 -48q15 -15 35 -15h313zM574 356l51 48l-51 48q-15 15 -36 15h-392q-26 0 -44.5 -18.5t-18.5 -44.5q0 -25 18.5 -43.5t44.5 -18.5h392q22 0 36 14z"}, {PackIconTypiconsKind.Divide, "M240 550q0 94 93 94q94 0 94 -94t-94 -94q-93 0 -93 94zM240 50q0 94 93 94q94 0 94 -94t-94 -94q-93 0 -93 94zM0 300q0 34 24 58.5t59 24.5h500q35 0 59.5 -24.5t24.5 -58.5t-24.5 -58.5t-59.5 -24.5h-500q-35 0 -59 24.5t-24 58.5z"}, {PackIconTypiconsKind.DivideOutline, "M375 446q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM375 612q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM375 -96q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5 t88.5 36.5t88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM375 71q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12t29.5 12t12.5 29t-12.5 29.5t-29.5 12.5zM625 175h-500q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h500q52 0 88.5 -36.5t36.5 -88.5 t-36.5 -88.5t-88.5 -36.5zM125 342q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5h500q17 0 29.5 12.5t12.5 29.5t-12.5 29.5t-29.5 12.5h-500z"}, {PackIconTypiconsKind.Document, "M654 496q13 -13 13 -29v-417q0 -52 -36.5 -88.5t-88.5 -36.5h-417q-52 0 -88.5 36.5t-36.5 88.5v500q0 52 36.5 88.5t88.5 36.5h333q18 0 30 -12zM566 467l-108 107v-45q0 -25 18.5 -43.5t44.5 -18.5h45zM542 8q17 0 29 12.5t12 29.5v375h-62q-43 0 -73.5 30.5 t-30.5 73.5v63h-292q-17 0 -29.5 -12.5t-12.5 -29.5v-500q0 -17 12.5 -29.5t29.5 -12.5h417z"}, {PackIconTypiconsKind.DocumentAdd, "M458 300q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12h-83v-84q0 -17 -12.5 -29t-29.5 -12t-29 12t-12 29v84h-84q-17 0 -29 12t-12 29t12 29.5t29 12.5h84v83q0 17 12 29.5t29 12.5t29.5 -12.5t12.5 -29.5v-83h83zM654 496q13 -13 13 -29v-417q0 -52 -36.5 -88.5 t-88.5 -36.5h-417q-52 0 -88.5 36.5t-36.5 88.5v500q0 52 36.5 88.5t88.5 36.5h333q18 0 30 -12zM566 467l-108 107v-45q0 -25 18.5 -43.5t44.5 -18.5h45zM542 8q17 0 29 12.5t12 29.5v375h-62q-43 0 -73.5 30.5t-30.5 73.5v63h-292q-17 0 -29.5 -12.5t-12.5 -29.5v-500 q0 -17 12.5 -29.5t29.5 -12.5h417z"}, {PackIconTypiconsKind.DocumentDelete, "M654 496q13 -13 13 -29v-417q0 -52 -36.5 -88.5t-88.5 -36.5h-417q-52 0 -88.5 36.5t-36.5 88.5v500q0 52 36.5 88.5t88.5 36.5h333q18 0 30 -12zM566 467l-108 107v-45q0 -25 18.5 -43.5t44.5 -18.5h45zM542 8q17 0 29 12.5t12 29.5v375h-62q-43 0 -73.5 30.5 t-30.5 73.5v63h-292q-17 0 -29.5 -12.5t-12.5 -29.5v-500q0 -17 12.5 -29.5t29.5 -12.5h417zM458 217h-250q-17 0 -29 12t-12 29t12 29.5t29 12.5h250q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12z"}, {PackIconTypiconsKind.DocumentText, "M542 -75h-417q-52 0 -88.5 36.5t-36.5 88.5v500q0 52 36.5 88.5t88.5 36.5h417q52 0 88.5 -36.5t36.5 -88.5v-500q0 -52 -36.5 -88.5t-88.5 -36.5zM125 592q-17 0 -29.5 -12.5t-12.5 -29.5v-500q0 -17 12.5 -29.5t29.5 -12.5h417q17 0 29 12.5t12 29.5v500q0 17 -12 29.5 t-29 12.5h-417zM500 342h-333q-21 0 -21 20q0 9 6 15t15 6h333q9 0 15 -6t6 -15q0 -20 -21 -20zM500 467h-333q-9 0 -15 6t-6 15q0 20 21 20h333q21 0 21 -20q0 -9 -6 -15t-15 -6zM500 217h-333q-9 0 -15 6t-6 15q0 20 21 20h333q21 0 21 -20q0 -9 -6 -15t-15 -6zM500 92 h-333q-21 0 -21 20q0 9 6 15t15 6h333q9 0 15 -6t6 -15q0 -20 -21 -20z"}, {PackIconTypiconsKind.Download, "M571 492q12 -12 12 -29.5t-12 -29.5l-196 -195l-196 195q-12 12 -12 29.5t12 29.5t29 12q18 0 30 -12l95 -96v279q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-279l95 96q11 11 30 11q18 0 29 -11zM749 133l1 -208q0 -17 -12.5 -29.5t-29.5 -12.5h-666 q-17 0 -29.5 12.5t-12.5 29.5q0 208 1 208q0 9 1 13l84 250q10 29 39 29h9q7 -14 15 -22l62 -61h-56l-69 -209h578l-69 209h-56l62 61q8 8 15 22h9q29 0 39 -29l84 -250q1 -4 1 -13z"}, {PackIconTypiconsKind.DownloadOutline, "M749 92l1 -209q0 -17 -12.5 -29t-29.5 -12h-666q-17 0 -29.5 12t-12.5 29q0 209 1 209q0 9 1 13l84 250q10 28 39 28h23l-28 29q-37 37 -37 88t37 88q25 25 61 33t69 -3v57q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-57q33 11 69 3t61 -33q37 -37 37 -88t-37 -88 l-28 -29h23q29 0 39 -28l84 -250q1 -4 1 -13zM179 529q-12 -12 -12 -29.5t12 -29.5l196 -195l196 196q12 12 12 29t-12 29t-29.5 12t-29.5 -12l-95 -95v241q0 17 -12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5v-241l-95 95q-13 13 -30 13q-16 0 -29 -13zM155 300l-69 -208 h579l-70 208h-77l-143 -142l-143 142h-77zM667 -75v125h-584v-125h584z"}, {PackIconTypiconsKind.Dropbox, "M0 262l154 121l221 -137l-154 -129zM221 650l154 -129l-221 -138l-154 121zM750 504l-154 -121l-221 138l154 129zM375 246l221 137l154 -121l-221 -145zM375 196l154 -129l67 45v-50l-221 -133l-221 133v50l67 -45z"}, {PackIconTypiconsKind.Edit, "M773 578q19 -19 19 -44t-19 -44l-148 -148v-375q0 -17 -12.5 -29.5t-29.5 -12.5h-541q-17 0 -29.5 12.5t-12.5 29.5v541q0 17 12.5 29.5t29.5 12.5h375l148 148q19 19 44 19t44 -19zM354 189l262 262l-90 90l-262 -262zM247 244l3 -69l71 -3zM542 8v250l-133 -128 q-16 -16 -50.5 -27t-64.5 -11h-127v127q0 33 9 66t25 49l132 133h-250v-459h459zM646 480l54 54l-91 91l-54 -54z"}, {PackIconTypiconsKind.Eject, "M375 71q77 0 132 55t55 132t-55 132.5t-132 55.5q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12q112 0 191.5 -79.5t79.5 -191.5t-79.5 -191t-191.5 -79t-191.5 79t-79.5 191q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5q0 -77 55 -132t132 -55zM277 633 q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5h-135l242 -242q12 -12 12 -29.5t-12 -29.5t-30 -12q-17 0 -29 12l-242 242v-135q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v277h277v0z"}, {PackIconTypiconsKind.EjectOutline, "M500 444q91 -27 148.5 -101.5t57.5 -172.5q0 -120 -86.5 -203.5t-208.5 -83.5q-98 0 -176.5 59t-106.5 150h-45q-35 0 -59 24t-24 59v417h417q34 0 58.5 -24.5t24.5 -59.5v-64zM167 366l200 -200q12 -12 29 -12q18 0 30 12t12 29.5t-12 29.5l-200 200h135q17 0 29 12.5 t12 29.5t-12 29t-29 12h-278v-277q0 -17 12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5v135zM417 -35q86 0 147 60.5t61 146.5t-61 146t-147 60q-30 0 -69 -16l107 -107q25 -25 25 -59.5t-25 -58.5q-25 -25 -59 -25t-59 25l-120 120q-9 -25 -9 -83q0 -86 61.5 -147.5 t147.5 -61.5z"}, {PackIconTypiconsKind.Equals, "M583 508q35 0 59.5 -24.5t24.5 -58.5t-24.5 -58.5t-59.5 -24.5h-500q-35 0 -59 24t-24 59t24 59t59 24h500zM583 217q35 0 59.5 -24.5t24.5 -59.5q0 -34 -24.5 -58.5t-59.5 -24.5h-500q-35 0 -59 24t-24 59t24.5 59.5t58.5 24.5h500z"}, {PackIconTypiconsKind.EqualsOutline, "M625 300h-500q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h500q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM125 467q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5h500q17 0 29.5 12.5t12.5 29.5t-12.5 29.5t-29.5 12.5h-500zM625 8h-500 q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h500q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM125 175q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12h500q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5h-500z"}, {PackIconTypiconsKind.Export, "M167 112q0 48 7 95t25.5 95t45.5 84t71.5 58.5t100.5 22.5v125q0 17 13.5 29t33.5 12q22 0 37 -15l249 -256q-168 -169 -249 -254q-14 -16 -37 -16q-20 0 -33.5 12t-13.5 29v125q-143 -3 -250 -166v20zM42 -75q-17 0 -29.5 12.5t-12.5 29.5v583q0 17 12.5 29.5t29.5 12.5 h333v-84h-292v-500h500v125q52 54 84 86v-252q0 -17 -12.5 -29.5t-29.5 -12.5h-583z"}, {PackIconTypiconsKind.ExportOutline, "M780 392q12 -12 12 -29.5t-12 -29.5q-53 -53 -113 -114v-252q0 -17 -12.5 -29.5t-29.5 -12.5h-583q-17 0 -29.5 12.5t-12.5 29.5v583q0 17 12.5 29.5t29.5 12.5h333q0 34 26 58.5t63 24.5t66 -27q96 -102 250 -256zM470 136q205 210 221 226q-141 143 -220 228l-7 2 l-6 -2v-165h-41q-38 0 -69 -13t-52 -33t-37 -48.5t-25 -55.5t-15 -57q90 81 198 82h41v-165l6 -2zM83 8h500v185q-49 -49 -82 -85q-14 -16 -37 -16q-20 0 -33.5 12t-13.5 29v125q-143 -3 -250 -166v20q0 48 7 95t25.5 95t45.5 84t71.5 58.5t100.5 22.5v41h-334v-500z"}, {PackIconTypiconsKind.Eye, "M826 282q17 -23 0 -47q-6 -9 -27.5 -37t-71.5 -79.5t-101 -87.5q-90 -64 -209 -64q-120 0 -210 64q-51 36 -101 87.5t-71.5 79.5t-27.5 37q-17 23 0 47q5 9 27 37t72 79t101 87q91 65 210 65q118 0 209 -65q51 -36 101 -87t72 -79t27 -37zM417 112q60 0 102.5 43 t42.5 103q0 61 -42.5 103.5t-102.5 42.5q-61 0 -103.5 -42.5t-42.5 -103.5q0 -60 42.5 -103t103.5 -43zM500 258q0 -34 -24 -58.5t-59 -24.5t-59.5 24.5t-24.5 58.5t24.5 59t59.5 25q34 0 58.5 -24.5t24.5 -59.5z"}, {PackIconTypiconsKind.EyeOutline, "M375 425q-78 0 -137 -42q-62 -44 -132 -125q68 -79 132 -124q59 -42 137 -42t137 42q64 45 132 124q-70 81 -132 125q-59 42 -137 42zM375 508q106 0 185 -57q48 -34 95.5 -82.5t70.5 -79.5l24 -31q-9 -13 -25.5 -34.5t-66.5 -73t-98 -85.5q-79 -57 -185 -57 q-107 0 -186 57q-48 34 -95.5 82.5t-70.5 79.5l-23 31q9 13 25.5 34.5t66 73t97.5 85.5q79 57 186 57zM375 300q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12t-29.5 12t-12.5 29t12.5 29.5t29.5 12.5zM375 133q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5 t88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM375 342q-34 0 -58.5 -24.5t-24.5 -59.5q0 -34 24 -58.5t59 -24.5t59 24.5t24 58.5q0 35 -24.5 59.5t-58.5 24.5z"}, {PackIconTypiconsKind.Feather, "M362 758q151 -28 248.5 -145.5t97.5 -270.5q0 -144 -87 -257.5t-225 -150.5v-51q0 -17 -12.5 -29t-29.5 -12t-29.5 12t-12.5 29v51q-138 37 -225 150.5t-87 257.5q0 153 98 270.5t249 145.5l7 1zM396 21q100 35 163 120t66 192l-131 -131q-6 -6 -15 -6q-13 0 -19 12t4 23 l157 157q-9 61 -36 113l-91 -91q-6 -6 -15 -6q-13 0 -19 13t4 23l98 98q-77 109 -208 136q-131 -27 -208 -136l98 -98q10 -10 4 -23t-19 -13q-9 0 -15 6l-91 91q-27 -52 -36 -113l157 -157q10 -11 4 -23t-19 -12q-9 0 -15 6l-130 131q3 -107 65.5 -192t162.5 -120v487 q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-487z"}, {PackIconTypiconsKind.Film, "M167 467h333v-292h-333v292zM458 217v208h-250v-208h250zM542 717q52 0 88.5 -36.5t36.5 -88.5v-542q0 -52 -36.5 -88.5t-88.5 -36.5h-125v83h-167v-83h-125q-52 0 -88.5 36.5t-36.5 88.5v542q0 52 36.5 88.5t88.5 36.5h125v-84h167v84h125zM583 550v42q0 17 -12 29 t-29 12h-42v-83h-333v83h-42q-17 0 -29.5 -12t-12.5 -29v-42q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12v-42q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12v-42q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12v-42q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29 t-29.5 -12v-42q0 -17 12.5 -29.5t29.5 -12.5h42v84h333v-84h42q17 0 29 12.5t12 29.5v42q-17 0 -29 12t-12 29t12 29.5t29 12.5v42q-17 0 -29 12t-12 29t12 29.5t29 12.5v42q-17 0 -29 12t-12 29t12 29.5t29 12.5v42q-17 0 -29 12t-12 29t12 29.5t29 12.5z"}, {PackIconTypiconsKind.Filter, "M627 550q35 0 42.5 -16.5t-17.5 -41.5l-175 -175q-24 -24 -41 -60t-17 -61v-146l-167 -83v208q0 35 -16.5 76t-41.5 66l-175 175q-25 25 -17.5 41.5t42.5 16.5h583z"}, {PackIconTypiconsKind.Flag, "M512 611q20 20 45.5 8.5t25.5 -37.5v-334q0 -17 -12 -29q-64 -64 -154.5 -64t-154.5 64q-37 37 -88 40t-91 -29v-190q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v542q0 17 12 29q64 64 154.5 64t154.5 -64q40 -40 95.5 -40t95.5 40z"}, {PackIconTypiconsKind.FlagOutline, "M512 611q20 20 45.5 8.5t25.5 -37.5v-334q0 -17 -12 -29q-64 -64 -154.5 -64t-154.5 64q-37 37 -88 40t-91 -29v-190q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v542q0 17 12 29q64 64 154.5 64t154.5 -64q40 -40 95.5 -40t95.5 40zM262 552q-37 37 -88 40 t-91 -29v-95q54 26 116.5 16t106.5 -54q39 -39 94 -45t100 23v97q-58 -25 -124.5 -12.5t-113.5 59.5zM321 278q37 -37 88 -40t91 29v95q-43 -20 -83 -20q-80 0 -140 58q-39 39 -94 44.5t-100 -23.5v-96q42 17 84 17q90 0 154 -64z"}, {PackIconTypiconsKind.Flash, "M479 299q18 -10 20.5 -31t-12.5 -36l-313 -296q-11 -11 -28 -11q-22 0 -34.5 19t-4.5 39l90 216l-176 102q-17 10 -20 31t12 36l313 296q13 11 28 11q17 0 29.5 -12.5t12.5 -29.5q0 -10 -4 -18l-89 -214z"}, {PackIconTypiconsKind.FlashOutline, "M396 633zM396 633l-313 -295l209 -121l-104 -250l312 296l-208 120zM396 717q34 0 58.5 -24.5t24.5 -59.5q0 -17 -8 -35l-74 -179l145 -84q35 -20 40.5 -61.5t-25.5 -71.5l-312 -296q-25 -23 -58 -23q-45 0 -69 38t-7 78l76 182l-145 84q-35 20 -41 61t25 72l312 296 q25 23 58 23z"}, {PackIconTypiconsKind.FlowChildren, "M542 133q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5q-40 0 -72.5 23.5t-45.5 60.5h-132q-86 0 -147.5 61t-61.5 147v299q-36 13 -59.5 45.5t-23.5 72.5q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5q0 -40 -23.5 -72.5t-59.5 -45.5v-7q0 -52 36.5 -88.5 t88.5 -36.5h132q13 36 45.5 59.5t72.5 23.5q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5q-40 0 -72.5 23.5t-45.5 59.5h-132q-67 0 -125 43v-126q0 -52 36.5 -88.5t88.5 -36.5h132q13 36 45.5 59.5t72.5 23.5zM542 342q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5 t29.5 -12.5t29 12.5t12 29.5t-12 29.5t-29 12.5zM125 633q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM542 -33q17 0 29 12t12 29t-12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12z"}, {PackIconTypiconsKind.FlowMerge, "M583 126q37 -13 60.5 -45.5t23.5 -72.5q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 40 23.5 72.5t59.5 45.5v77q0 25 -18 43.5t-44 18.5q-63 0 -105 44q-42 -44 -104 -44q-25 0 -43.5 -18.5t-18.5 -43.5v-77q36 -13 59.5 -45.5t23.5 -72.5 q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 40 23.5 72.5t59.5 45.5v77q0 60 43 103t103 43q26 0 44.5 18.5t18.5 43.5v63q-37 13 -60.5 45.5t-23.5 72.5q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5q0 -40 -23.5 -72.5t-59.5 -45.5v-63q0 -25 18.5 -43.5 t44.5 -18.5q60 0 102.5 -43t42.5 -103v-77zM125 -33q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12zM333 633q-17 0 -29 -12t-12 -29t12 -29.5t29 -12.5t29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM542 -33q17 0 29 12t12 29 t-12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12z"}, {PackIconTypiconsKind.FlowParallel, "M583 126q37 -13 60.5 -45.5t23.5 -72.5q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 40 23.5 72.5t59.5 45.5v348q-36 13 -59.5 45.5t-23.5 72.5q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5q0 -40 -23.5 -72.5t-60.5 -45.5v-348zM542 633 q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29 12.5t12 29.5t-12 29t-29 12zM542 -33q17 0 29 12t12 29t-12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12zM250 592q0 -40 -23.5 -72.5t-59.5 -45.5v-348q36 -13 59.5 -45.5t23.5 -72.5 q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 40 23.5 72.5t59.5 45.5v348q-36 13 -59.5 45.5t-23.5 72.5q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5zM125 633q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5t-12.5 29t-29.5 12z M125 -33q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12z"}, {PackIconTypiconsKind.FlowSwitch, "M167 126q36 -13 59.5 -45.5t23.5 -72.5q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 40 23.5 72.5t59.5 45.5v28q0 78 61 133q39 -32 76 -48q-53 -31 -53 -85v-28zM125 -33q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29 t29.5 -12zM500 474q-36 13 -59.5 45.5t-23.5 72.5q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5q0 -40 -23.5 -72.5t-60.5 -45.5v-14q0 -84 -63 -144q-35 29 -76 45q56 35 56 99v14zM542 633q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29 12.5t12 29.5t-12 29 t-29 12zM581 126q38 -12 62 -44.5t24 -73.5q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 39 22 71t58 46q-11 57 -57.5 95t-106.5 38q-94 0 -164 62t-83 154q-38 12 -62 44.5t-24 73.5q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5q0 -39 -22 -71t-58 -46 q11 -57 57 -95t106 -38q94 0 164.5 -62.5t83.5 -153.5zM125 633q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM542 -33q17 0 29 12t12 29t-12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12z"}, {PackIconTypiconsKind.Folder, "M625 550q52 0 88.5 -36.5t36.5 -88.5v-333q0 -52 -36.5 -88.5t-88.5 -36.5h-500q-52 0 -88.5 36.5t-36.5 88.5v416q0 52 36.5 88.5t88.5 36.5h167q34 0 58.5 -24.5t24.5 -58.5h250zM125 550q-17 0 -29.5 -12.5t-12.5 -29.5v-83h584q0 17 -12.5 29.5t-29.5 12.5h-250 q-35 0 -59 24.5t-24 58.5h-167zM625 50q17 0 29.5 12.5t12.5 29.5v291h-584v-291q0 -17 12.5 -29.5t29.5 -12.5h500z"}, {PackIconTypiconsKind.FolderAdd, "M625 550q52 0 88.5 -36.5t36.5 -88.5v-333q0 -52 -36.5 -88.5t-88.5 -36.5h-500q-52 0 -88.5 36.5t-36.5 88.5v416q0 52 36.5 88.5t88.5 36.5h167q34 0 58.5 -24.5t24.5 -58.5h250zM625 50q17 0 29.5 12.5t12.5 29.5v291h-167q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5 t14.5 6.5h167q0 17 -12.5 29.5t-29.5 12.5h-250q-35 0 -59 24.5t-24 58.5h-167q-17 0 -29.5 -12.5t-12.5 -29.5v-83h167q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5h-167v-291q0 -17 12.5 -29.5t29.5 -12.5h500zM500 300q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29 t-29.5 -12h-83v-84q0 -17 -12.5 -29t-29.5 -12t-29.5 12t-12.5 29v84h-83q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h83v83q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-83h83z"}, {PackIconTypiconsKind.FolderDelete, "M625 550q52 0 88.5 -36.5t36.5 -88.5v-333q0 -52 -36.5 -88.5t-88.5 -36.5h-500q-52 0 -88.5 36.5t-36.5 88.5v416q0 52 36.5 88.5t88.5 36.5h167q34 0 58.5 -24.5t24.5 -58.5h250zM125 550q-17 0 -29.5 -12.5t-12.5 -29.5v-83h584q0 17 -12.5 29.5t-29.5 12.5h-250 q-35 0 -59 24.5t-24 58.5h-167zM625 50q17 0 29.5 12.5t12.5 29.5v291h-584v-291q0 -17 12.5 -29.5t29.5 -12.5h500zM500 217h-250q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h250q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12z"}, {PackIconTypiconsKind.FolderOpen, "M846 467q16 0 24 -11.5t5 -30.5l-92 -333q-13 -53 -58.5 -89t-99.5 -36h-500q-53 0 -89 36t-36 89v416q0 53 36 89t89 36h171q34 0 58.5 -24.5t24.5 -58.5h250q40 0 72 -22.5t45 -60.5h100zM83 508v-387l67 262q6 19 20.5 30.5t33.5 11.5h463q0 19 -11.5 30.5t-30.5 11.5 h-250q-35 0 -59 24.5t-24 58.5h-167q-19 0 -30.5 -11.5t-11.5 -30.5zM704 112l75 271h-571q-3 0 -7.5 -2.5t-4.5 -5.5l-79 -292q-3 -12 -1.5 -19.5t5.5 -10.5l4 -3h500q25 0 49 18.5t30 43.5z"}, {PackIconTypiconsKind.Gift, "M708 467q17 0 29.5 -12.5t12.5 -29.5v-167q0 -17 -12.5 -29t-29.5 -12v-209q0 -52 -36.5 -88.5t-88.5 -36.5h-416q-52 0 -88.5 36.5t-36.5 88.5v209q-17 0 -29.5 12t-12.5 29v167q0 17 12.5 29.5t29.5 12.5h98q-15 32 -15 62q0 60 43 103t103 43q62 0 104 -44 q42 44 104 44q60 0 103 -43t43 -103q0 -30 -15 -62h98zM667 300v83h-209v-83h209zM333 508v-41h84v41h-84zM417 383h-84v-83h84v83zM479 592q-20 0 -36.5 -12t-22.5 -31q16 -2 27 -13.5t11 -27.5v-37q12 -4 21 -4q26 0 44.5 18.5t18.5 43.5t-19 44t-44 19zM208 529 q0 -25 18.5 -43.5t44.5 -18.5q9 0 21 4v37q0 16 11 27.5t27 13.5q-6 19 -22.5 31t-36.5 12q-25 0 -44 -19t-19 -44zM292 383h-209v-83h209v83zM167 -33h125v291h-167v-250q0 -17 12.5 -29t29.5 -12zM333 -33h84v291h-84v-291zM583 -33q17 0 29.5 12t12.5 29v250h-167v-291 h125z"}, {PackIconTypiconsKind.Globe, "M277 -33v41q-155 0 -265 110q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12q85 -85 206 -85q122 0 207 85t85 206q0 122 -85 207l-30 29l86 85q12 12 29.5 12t29.5 -12t11.5 -29t-12.5 -29l-28 -29q82 -102 82 -234q0 -155 -110 -265q-77 -77 -181 -100v-51h166 q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-416q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h166zM27 383q0 103 73.5 176.5t176.5 73.5t176.5 -73.5t73.5 -176.5t-73.5 -176.5t-176.5 -73.5t-176.5 73.5t-73.5 176.5z"}, {PackIconTypiconsKind.GlobeOutline, "M277 550q-69 0 -117.5 -49t-48.5 -118t48.5 -117.5t117.5 -48.5t118 48.5t49 117.5t-49 118t-118 49zM277 633q103 0 176.5 -73.5t73.5 -176.5t-73.5 -176.5t-176.5 -73.5t-176.5 73.5t-73.5 176.5t73.5 176.5t176.5 73.5zM527 -33q17 0 29.5 -12.5t12.5 -29.5 t-12.5 -29.5t-29.5 -12.5h-416q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h166v41q-155 0 -265 110q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12q85 -85 206 -85q122 0 207 85t85 206q0 122 -85 207l-30 29l86 85q12 12 29.5 12t29.5 -12t11.5 -29.5t-12.5 -29.5 l-28 -28q82 -102 82 -234q0 -155 -110 -265q-77 -77 -181 -100v-51h166z"}, {PackIconTypiconsKind.Group, "M688 425q0 -86 -61.5 -147t-147.5 -61t-147 61t-61 147t61 147t147 61t147.5 -61t61.5 -147zM917 279q0 -43 -30.5 -73.5t-74.5 -30.5t-74 30.5t-30 73.5t30 73.5t74 30.5t74.5 -30.5t30.5 -73.5zM812 150q64 0 105 -27t41 -63q0 -18 -42 -32t-104 -14q-34 0 -66 5l1 -11 q0 -33 -77 -58t-191 -25q-120 0 -193.5 25t-73.5 58l1 12q-40 -6 -67 -6q-65 0 -105.5 14t-40.5 32q0 36 40 63t106 27q79 0 121 -40q79 65 212 65t212 -65q42 40 121 40zM250 279q0 -43 -30 -73.5t-74 -30.5t-74 30.5t-30 73.5t30 73.5t74 30.5q43 0 73.5 -30.5t30.5 -73.5 z"}, {PackIconTypiconsKind.GroupOutline, "M479 217q-86 0 -147 61t-61 147t61 147t147 61t147.5 -61t61.5 -147t-61.5 -147t-147.5 -61zM479 550q-52 0 -88.5 -36.5t-36.5 -88.5t36.5 -88.5t88.5 -36.5t88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5zM812 175q-44 0 -74 30.5t-30 73.5t30 73.5t74 30.5t74.5 -30.5 t30.5 -73.5t-30.5 -73.5t-74.5 -30.5zM812 342q-25 0 -43.5 -18.5t-18.5 -44.5q0 -25 18 -43.5t44 -18.5t44.5 18.5t18.5 43.5t-18.5 44t-44.5 19zM812 150q64 0 105 -27t41 -63q0 -18 -42 -32t-104 -14q-34 0 -66 5l1 -11q0 -33 -77 -58t-191 -25q-120 0 -193.5 25 t-73.5 58l1 12q-40 -6 -67 -6q-65 0 -105.5 14t-40.5 32q0 36 40 63t106 27q79 0 121 -40q79 65 212 65t212 -65q42 40 121 40zM146 56q48 0 82 9l10 14q-30 30 -92 30q-78 0 -101 -39q35 -14 101 -14zM479 8q105 0 173 24q-20 24 -65.5 42t-107.5 18q-65 0 -110 -18 t-64 -42q67 -24 174 -24zM812 56q67 0 101 15q-10 15 -36.5 26.5t-64.5 11.5q-61 0 -92 -29q4 -5 10 -15q32 -9 82 -9zM146 175q-44 0 -74 30.5t-30 73.5t30.5 73.5t73.5 30.5t73.5 -30.5t30.5 -73.5t-30 -73.5t-74 -30.5zM146 342q-26 0 -44.5 -19t-18.5 -44t18.5 -43.5 t44.5 -18.5t44 18.5t18 43.5q0 26 -18.5 44.5t-43.5 18.5z"}, {PackIconTypiconsKind.Headphones, "M750 258v-108l-1 -5q1 -10 1 -33v-83q0 -60 -43 -103t-103 -43t-103 43t-43 103v83q0 47 23 84.5t60 52.5q-3 66 -51 112.5t-115 46.5t-115 -46.5t-51 -112.5q37 -15 60 -52.5t23 -84.5v-83q0 -60 -43 -103t-103 -43t-103 43t-43 103v83q0 23 1 33l-1 5v108 q0 155 110 265t265 110t265 -110t110 -265zM83 258v-41h42q0 41 1 41q6 79 54 139l-37 37q-60 -79 -60 -176zM208 29v83q0 27 -12.5 45t-28.5 18h-79q-5 -35 -5 -63v-83q0 -25 18.5 -43.5t44.5 -18.5t44 18.5t18 43.5zM517 404q11 11 32 31.5t31 30.5l26 26q-96 96 -231 96 t-231 -96l74 -74l15 -14q58 58 142 58t142 -58zM667 29v83q0 28 -5 63h-79q-16 0 -28.5 -18t-12.5 -45v-83q0 -25 18 -43.5t44 -18.5t44.5 18.5t18.5 43.5zM667 217v41q0 97 -60 176l-37 -37q49 -62 55 -139v-41h42z"}, {PackIconTypiconsKind.Heart, "M365 368q0 76 -53.5 129t-129.5 53t-129 -53t-53 -129q0 -110 73 -183l292 -218q225 152 291 218q73 73 73 183q0 76 -53 129t-129 53t-129 -53t-53 -129v0z"}, {PackIconTypiconsKind.HeartFullOutline, "M0 408q0 93 67 159t158 66q114 0 183 -95q32 44 78.5 69.5t96.5 25.5q94 0 159.5 -65.5t65.5 -159.5q0 -129 -83 -212q-30 -31 -101.5 -85t-132.5 -96.5t-62 -43.5q-18 -9 -25 -9t-25 9q-2 2 -62.5 44.5t-132 96.5t-101.5 84q-83 83 -83 212z"}, {PackIconTypiconsKind.HeartHalfOutline, "M0 408q0 93 67 159t158 66q114 0 183 -95q32 44 78.5 69.5t96.5 25.5q94 0 159.5 -65.5t65.5 -159.5q0 -129 -83 -212q-30 -31 -101.5 -85t-132.5 -96.5t-62 -43.5q-18 -9 -25 -9t-25 9q-2 2 -62.5 44.5t-132 96.5t-101.5 84q-83 83 -83 212zM408 367v-309q60 39 145 101 t118 95q62 62 62 154q0 59 -41 100.5t-100 41.5t-100.5 -41.5t-41.5 -100.5q0 -19 -11.5 -30t-30.5 -11z"}, {PackIconTypiconsKind.HeartOutline, "M406 -33q-13 0 -23 7q-21 14 -67.5 46.5t-123.5 90t-107 87.5q-85 85 -85 211q0 93 65.5 158.5t158.5 65.5q114 0 182 -94q31 44 79.5 69t103.5 25q93 0 158 -65.5t65 -158.5q0 -126 -85 -211q-30 -30 -106 -87.5t-124 -90.5t-67 -46q-10 -7 -24 -7zM224 550 q-58 0 -99.5 -41t-41.5 -100q0 -91 61 -152q63 -63 262 -198q199 135 262 198q61 61 61 152q0 59 -41 100t-99 41q-59 0 -100 -41t-41 -100q0 -17 -12.5 -29t-29.5 -12t-29 12t-12 29q0 59 -41.5 100t-99.5 41z"}, {PackIconTypiconsKind.Home, "M417 675q257 -223 400 -343q16 -13 16 -32q0 -17 -12 -29.5t-29 -12.5h-84v-291q0 -17 -12 -29.5t-29 -12.5h-125q-17 0 -29.5 12.5t-12.5 29.5v166h-167v-166q0 -17 -12 -29.5t-29 -12.5h-125q-17 0 -29.5 12.5t-12.5 29.5v291h-83q-17 0 -29.5 12.5t-12.5 29.5t15 32z "}, {PackIconTypiconsKind.HomeOutline, "M886 364q31 -24 31 -64q0 -34 -24.5 -58.5t-59.5 -24.5h-41v-250q0 -35 -25 -59.5t-59 -24.5h-500q-34 0 -58.5 24.5t-24.5 59.5v250h-42q-35 0 -59 24.5t-24 58.5q0 37 29 63q63 53 163 139t169 145t70 60l27 23l28 -23q1 -1 69.5 -60t168.5 -145t162 -138zM542 -33v208 h-167v-208h167zM708 300h125q-185 155 -375 320q-190 -165 -375 -320h125v-333h125v250h250v-250h125v333z"}, {PackIconTypiconsKind.Html5, "M338 654v-62h-42v125h46l25 -46l29 46h42v-125h-42v62l-29 -46zM558 592h-100v125h42v-84h58v-41zM200 592v83h-38v42h117v-42h-37v-83h-42zM67 633v-41h-42v125h42v-42h37v42h42v-125h-42v41h-37zM0 550h583l-50 -600l-241 -67l-242 67zM471 358l8 71h-375l21 -221h258 l-8 -96l-83 -20l-84 20l-4 63h-75l13 -121l150 -42l150 42l20 229h-266l-8 75h283z"}, {PackIconTypiconsKind.Image, "M167 446q0 104 104 104t104 -104t-104 -104t-104 104zM583 383q33 0 62 -49q41 -74 63 -201h-583l13 42q14 43 44.5 84t67.5 41q43 0 101 -31q20 -11 45 -11q30 0 69 44q46 52 73 68q22 13 45 13zM0 592q0 34 24 58.5t59 24.5h667q34 0 58.5 -24.5t24.5 -58.5v-500 q0 -35 -24.5 -59.5t-58.5 -24.5h-667q-34 0 -58.5 24.5t-24.5 59.5v500zM750 92v500h-667v-500h667z"}, {PackIconTypiconsKind.ImageOutline, "M271 467q-25 0 -44 -18.5t-19 -44.5q0 -25 18.5 -43.5t44.5 -18.5q25 0 43.5 18t18.5 44t-18.5 44.5t-43.5 18.5zM271 508q43 0 73.5 -30t30.5 -74t-30.5 -74t-73.5 -30t-73.5 30t-30.5 74t30.5 74t73.5 30zM396 175q-39 0 -75 21t-71 21q-32 0 -67 -84h474 q-15 68 -37 116.5t-37 50.5q-27 0 -77 -56q-20 -22 -32.5 -33.5t-34 -23.5t-43.5 -12zM583 342q37 0 68 -62.5t44 -125.5l13 -62h-583q2 7 5 18t15 39.5t25 50.5t35 40t45 18q44 0 81 -20.5t65 -20.5q20 0 43.5 19.5t42 43t46 43t55.5 19.5zM833 550v-500q0 -34 -24.5 -58.5 t-58.5 -24.5h-667q-35 0 -59 24.5t-24 58.5v500q0 34 24 58.5t59 24.5h667q34 0 58.5 -24.5t24.5 -58.5zM750 50v500h-667v-500h667z"}, {PackIconTypiconsKind.Infinity, "M0 262q0 74 53 127t127 53t127 -53l58 -55l58 56q52 52 126 52q73 0 126.5 -53t53.5 -127t-53.5 -127t-126.5 -53q-74 0 -127 53l-57 55l-59 -56q-52 -52 -126 -52t-127 53t-53 127zM180 338q-31 0 -53.5 -22.5t-22.5 -53.5q0 -32 22 -54t54 -22t54 22l55 54l-55 53 q-23 23 -54 23zM603 208q22 22 22 54t-22 54t-53.5 22t-53.5 -22l-56 -54l55 -53q22 -22 54 -22.5t54 21.5z"}, {PackIconTypiconsKind.InfinityOutline, "M813 262q0 74 -53.5 127t-126.5 53q-75 0 -127 -52l-58 -56l-57 55q-53 53 -128 53q-73 0 -126.5 -53t-53.5 -127t53.5 -127t126.5 -53q75 0 127 52l58 56l57 -56q52 -52 127 -52q74 0 127.5 53.5t53.5 126.5zM633 525q109 0 186 -77t77 -186t-77 -186q-78 -78 -186 -78 q-109 0 -185 76q-76 -76 -185 -76q-108 0 -186 78q-77 77 -77 186t77 186t186 77q110 0 185 -75q75 75 185 75zM229 262q0 -14 10 -24t24 -10t24 10l26 24l-24 23q-11 11 -26 11q-14 0 -24 -10t-10 -24zM187 262q0 31 22.5 53.5t53.5 22.5q32 0 55 -23l55 -53l-56 -54 q-21 -21 -54 -21q-31 0 -53.5 22t-22.5 53zM667 262q0 14 -9.5 23.5t-24.5 9.5q-16 0 -25 -9l-25 -24l24 -23q11 -11 26 -11q14 0 24 10t10 24zM708 262q0 -31 -22 -53t-53 -22q-33 0 -55 22l-55 53l56 53q22 22 54 22q31 0 53 -22t22 -53z"}, {PackIconTypiconsKind.Info, "M160 -75q-67 0 -113.5 38t-46.5 103q0 45 28 92l246 411q50 85 136 85q85 0 135 -85l247 -411q27 -44 27 -93q0 -38 -17 -66q-43 -74 -142 -74h-500zM410 448q-27 0 -46 -19t-19 -46q0 -26 19.5 -45t45.5 -19q27 0 45.5 19t18.5 45t-19 45.5t-45 19.5zM480 95q6 7 0 12.5 t-12 2.5q-20 -8 -30 -8l-6 1q-14 6 -4 35l17 51q13 41 -3 71t-52 32q-25 1 -48 -8.5t-32.5 -18t-11.5 -11.5q-6 -7 -0.5 -13t12.5 -3q20 8 30 8l6 -1q14 -6 4 -35l-17 -51q-14 -41 2.5 -70.5t52.5 -31.5h6q24 0 45.5 9.5t30.5 17.5t10 11z"}, {PackIconTypiconsKind.InfoLarge, "M264 70q15 5 24.5 -9.5t-3.5 -26.5q-4 -4 -17.5 -13t-47 -21t-67.5 -12q-87 0 -119 63q-28 59 10 134l42 83q22 44 2 58q-4 4 -17 4q-9 0 -19.5 -2t-17.5 -4l-6 -2q-15 -5 -24.5 9t3.5 26q5 5 17.5 13.5t46 21t67.5 12.5q89 0 120 -63q28 -59 -10 -134l-42 -83 q-22 -45 -2 -59q3 -3 17 -3q9 0 19.5 2t17.5 4zM125 550q0 104 104 104t104 -104t-104 -104t-104 104z"}, {PackIconTypiconsKind.InfoLargeOutline, "M343 133q40 -5 62 -41q15 -25 10 -55t-27 -49q-74 -63 -172 -63q-128 0 -176 98q-42 87 10 190l24 46q-41 5 -63 41q-15 25 -10 55t27 49q51 43 123 57q-26 42 -26 89q0 69 49 118t118 49t117.5 -49t48.5 -118q0 -50 -27.5 -91.5t-72.5 -61.5q32 -42 35 -98.5t-27 -119.5 zM292 633q-35 0 -59.5 -24.5t-24.5 -58.5t24.5 -58.5t59.5 -24.5q34 0 58.5 24.5t24.5 58.5t-24.5 58.5t-58.5 24.5zM216 8q31 0 60.5 10.5t43.5 21.5l13 10q-26 -9 -50 -9q-37 0 -45 26.5t12 65.5l42 83q35 73 8 120t-99 47q-31 0 -60.5 -10.5t-43.5 -20.5l-14 -10 q27 9 51 9q37 0 45 -27t-12 -65l-42 -83q-35 -73 -8 -120.5t99 -47.5z"}, {PackIconTypiconsKind.InfoOutline, "M410 570q-39 0 -65 -44l-246 -411q-26 -44 -8.5 -75.5t69.5 -31.5h500q52 0 69.5 32t-9.5 76l-246 410q-26 44 -64 44zM160 -75q-67 0 -113.5 38t-46.5 102q0 45 28 93l246 411q50 85 136 85q85 0 135 -85l247 -411q51 -85 10 -159q-43 -74 -142 -74h-500zM472 102 q-4 -4 -10.5 -10t-28.5 -15.5t-45 -8.5q-31 2 -44 26.5t-1 61.5l17 51q12 36 -10 48q-8 3 -18 1.5t-18 -4.5l-8 -4q4 4 10.5 10t28.5 15.5t45 8.5q31 -2 44 -27t1 -62l-17 -51q-11 -36 10 -47q8 -3 18 -1.5t18 4.5zM355 383q0 55 55 55q54 0 54 -55q0 -54 -54 -54 q-55 0 -55 54z"}, {PackIconTypiconsKind.InputChecked, "M458 8h-333q-52 0 -88.5 36.5t-36.5 88.5v334q0 52 36.5 88.5t88.5 36.5h208q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-208q-17 0 -29.5 -12t-12.5 -29v-334q0 -17 12.5 -29t29.5 -12h333q17 0 29.5 12t12.5 29v125q0 17 12.5 29.5t29.5 12.5t29 -12.5 t12 -29.5v-125q0 -52 -36.5 -88.5t-88.5 -36.5zM340 182q-23 0 -39 16l-111 111q-16 17 -16 40t16 39t39 16t39 -16l60 -59l144 227q11 20 33.5 26.5t42.5 -4.5t26 -33.5t-5 -42.5l-180 -291q-14 -26 -49 -29z"}, {PackIconTypiconsKind.InputCheckedOutline, "M500 633q69 0 107 -60t2 -125l-26 -46v-269q0 -52 -36.5 -88.5t-88.5 -36.5h-333q-52 0 -88.5 36.5t-36.5 88.5v334q0 52 36.5 88.5t88.5 36.5h283q36 41 92 41zM464 529l-141 -243l-85 85q-12 12 -30 12q-17 0 -29 -12t-12 -29.5t12 -29.5l125 -125q12 -12 29 -12 q27 2 37 21l167 292q6 20 3 32q-5 17 -21 25.5t-36 0.5q-14 -7 -19 -17zM458 92q17 0 29.5 12t12.5 29v207l-94 -164q-20 -36 -61 -42l-12 -1q-34 0 -59 25l-125 125q-25 25 -25 59t25 59q24 24 59 24t59 -24l47 -47l90 154h-279q-17 0 -29.5 -12t-12.5 -29v-334 q0 -17 12.5 -29t29.5 -12h333z"}, {PackIconTypiconsKind.Key, "M146 342q0 86 61 147t147 61t147 -61t61 -147t-61 -147.5t-147 -61.5h-104v-83h-83v-83h-84q-20 0 -41 15.5t-32 31.5l-10 15v63l165 164q-19 41 -19 86zM354 258q34 0 59 25t25 59t-24.5 58.5t-59.5 24.5q-34 0 -58.5 -24.5t-24.5 -58.5q0 -35 24.5 -59.5t58.5 -24.5z "}, {PackIconTypiconsKind.Keyboard, "M250 258h292v-83h-292v83zM125 258h83v-83h-83v83zM125 425h83v-42h-83v42zM250 300h-125v42h125v-42zM250 425h42v-42h-42v42zM292 342h41v-42h-41v42zM333 425h42v-42h-42v42zM375 342h42v-42h-42v42zM417 425h41v-42h-41v42zM458 342h42v-42h-42v42zM500 425h42v-42 h-42v42zM542 342h41v-42h-41v42zM583 425h42v-42h-42v42zM625 300v42h42v83h41v-125h-83zM667 258v-41h41v-42h-125v42h42v41h42zM750 550q34 0 58.5 -24t24.5 -59v-334q0 -35 -24.5 -59t-58.5 -24h-667q-35 0 -59 24t-24 59v334q0 35 24 59t59 24h667zM750 133v334h-667 v-334h667z"}, {PackIconTypiconsKind.KeyOutline, "M250 -75h-250v184l158 158q-12 36 -12 75q0 104 73 177t177 73t177 -73t73 -177t-73 -177t-177 -73h-63v-84h-83v-83zM83 8h84v84h83v83h146q69 0 117.5 49t48.5 118t-48.5 117.5t-117.5 48.5t-118 -48.5t-49 -117.5q0 -36 15 -69l12 -26l-173 -173v-66zM396 383 q-17 0 -29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM396 425q34 0 58.5 -24.5t24.5 -58.5q0 -35 -24.5 -59.5t-58.5 -24.5t-59 25t-25 59t24.5 58.5t59.5 24.5z"}, {PackIconTypiconsKind.Leaf, "M708 342q0 -144 -87 -257.5t-225 -150.5v-51q0 -17 -12.5 -29t-29.5 -12t-29.5 12t-12.5 29v51q-138 37 -225 150.5t-87 257.5q0 153 98 270.5t249 145.5l7 1l8 -1q151 -28 248.5 -145.5t97.5 -270.5zM396 21q102 35 165.5 123t63.5 198q0 121 -76.5 214.5t-194.5 117.5 q-118 -24 -194.5 -117.5t-76.5 -214.5q0 -109 64 -197.5t166 -123.5v125l-182 181q-9 9 -5 20t14.5 14t20.5 -5l152 -152v150l-99 98q-9 9 -5 20t14.5 14t20.5 -5l68 -68v137q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-137l68 68q9 9 20.5 5t14.5 -14t-5 -20 l-98 -98v-150l152 152q14 14 28.5 -0.5t0.5 -28.5l-181 -181v-125z"}, {PackIconTypiconsKind.Lightbulb, "M312 571q51 0 87.5 -36.5t36.5 -87.5q0 -9 -6 -15t-15 -6t-15 6t-6 15q0 34 -24 58t-58 24q-20 0 -20 21t20 21zM312 -117q-17 0 -29 12.5t-12 29.5h-83q-17 0 -29.5 12.5t-12.5 29.5v125q0 25 -18 61t-72 114l-3 5q-53 79 -53 174q0 129 91.5 220.5t220.5 91.5 t221 -91.5t92 -220.5q0 -97 -57 -179q-54 -77 -71.5 -112.5t-17.5 -62.5v-125q0 -17 -12 -29.5t-29 -12.5h-84q0 -17 -12.5 -29.5t-29.5 -12.5zM396 8v42h-167v-42h167zM500 314q42 61 42 132q0 94 -67.5 161.5t-162.5 67.5q-94 0 -161.5 -67.5t-67.5 -161.5q0 -70 42 -131 l3 -6q82 -117 96 -176h47v84q0 17 12 29t29 12t29.5 -12t12.5 -29v-84h46q13 57 100 181z"}, {PackIconTypiconsKind.Link, "M578 537q14 -13 14 -32t-14 -33l-71 -72l12 -13q38 -38 38 -91t-38 -91l-173 -174q-38 -38 -92 -38q-53 0 -91 38l-13 13l-72 -72q-14 -14 -32 -14q-19 0 -33 14q-13 14 -13 33t13 32l72 71l-13 13q-37 37 -37 92q0 54 37 91l174 174q37 37 91.5 37t91.5 -37l13 -13 l71 72q13 13 32 13t33 -13zM455 269q10 10 10 27q0 16 -10 26l-13 13l-30 -30q-13 -13 -33 -13q-19 0 -32 13t-13 32t13 33l30 30l-13 13q-11 11 -26 11q-16 0 -27 -11l-174 -174q-11 -11 -11 -26q0 -16 11 -27l13 -13l30 30q14 14 33 14q18 0 32 -14q13 -13 13 -32t-13 -33 l-30 -30l13 -12q11 -11 26 -11q16 0 27 11z"}, {PackIconTypiconsKind.LinkOutline, "M629 550q-19 0 -32 -13l-72 -72l-13 13q-36 36 -91 36t-91 -36l-174 -174q-38 -38 -38 -92q0 -53 38 -91l12 -13l-71 -71q-13 -13 -13 -32t13 -33q14 -14 32 -14q19 0 33 14l71 72l13 -13q38 -38 92 -38q53 0 91 38l174 174q37 37 37 91t-37 91l-13 13l72 72q14 14 14 33 t-14 32q-13 13 -33 13zM129 -125q-53 0 -91 38.5t-38 90.5q0 54 38 92l20 20q-23 46 -23 96q0 89 62 151l174 174q61 61 150 61q52 0 96 -23l21 21q37 37 91 37q53 0 91 -38.5t38 -90.5q0 -55 -38 -91l-20 -20q24 -48 24 -97q0 -87 -63 -150l-173 -174q-62 -62 -151 -62 q-51 0 -97 23l-20 -20q-38 -38 -91 -38zM460 250q-34 1 -59 26t-26 59l-76 -77q34 -1 58.5 -25.5t25.5 -58.5zM421 424q15 0 26 -11l13 -13l-30 -30q-14 -14 -14 -33t14 -32q13 -13 32 -13q20 0 33 13l30 30l13 -13q11 -11 11 -26q0 -16 -11 -27l-174 -173q-11 -11 -26 -11 q-16 0 -27 11l-13 12l30 30q14 14 14 33t-14 32q-14 14 -32 14q-19 0 -33 -14l-30 -30l-13 13q-10 10 -10 26q0 17 10 27l174 174q11 11 27 11z"}, {PackIconTypiconsKind.Location, "M569 579q97 -96 97 -232t-97 -232l-236 -232l-235 232q-98 96 -98 232t98 232t236 96t235 -96zM333 238q44 0 74 30q31 31 31 73.5t-31 73.5t-74 31q-42 0 -73 -31t-31 -73.5t31 -73.5q30 -30 73 -30z"}, {PackIconTypiconsKind.LocationArrow, "M262 4l-57 171l-171 57q-22 7 -30 18t-1.5 23t27.5 21l474 221q32 14 43.5 2.5t-2.5 -43.5l-222 -474q-9 -21 -20.5 -27.5t-22.5 1.5t-18 30z"}, {PackIconTypiconsKind.LocationArrowOutline, "M333 -71q-48 0 -69 62l-51 151l-151 50q-59 19 -62 67q-3 46 54 72l474 222q33 15 58.5 10t39.5 -26q20 -33 -2 -80l-221 -474q-25 -54 -70 -54zM109 265l170 -57l57 -171l199 427z"}, {PackIconTypiconsKind.LocationOutline, "M333 592q-103 0 -177 -72q-73 -71 -73 -173q0 -101 73 -172l177 -175l178 175q72 70 72 172q0 103 -72 173q-74 72 -178 72zM333 675q139 0 236 -96t97 -232t-97 -232l-236 -232l-235 232q-98 96 -98 232t98 232t235 96zM333 446q-42 0 -73 -31t-31 -73.5t31 -73.5 q30 -30 73 -30q44 0 74 30q31 31 31 73.5t-31 73.5t-74 31zM333 488q60 0 103 -43t43 -103t-43 -103t-103 -43t-103 43t-43 103t43 103t103 43z"}, {PackIconTypiconsKind.LockClosed, "M500 383q34 0 58.5 -24.5t24.5 -58.5v-292q0 -34 -24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5v292q0 34 24 58.5t59 24.5h42v84q0 69 49 117.5t118 48.5t117.5 -48.5t48.5 -117.5v-84h42zM292 38q22 0 38 16t16 38t-16 38t-38 16t-38 -16t-16 -38t16 -38 t38 -16zM375 342v125q0 35 -24.5 59t-58.5 24q-35 0 -59.5 -24.5t-24.5 -58.5v-125h167z"}, {PackIconTypiconsKind.LockClosedOutline, "M238 92q0 54 54 54t54 -54t-54 -54t-54 54zM292 633q68 0 117 -49t49 -117v-84h42q34 0 58.5 -24.5t24.5 -58.5v-292q0 -34 -24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5v292q0 34 24 58.5t59 24.5h42v84q0 48 23.5 85.5t59.5 58.5q38 22 84 22zM292 550 q-35 0 -59.5 -24.5t-24.5 -58.5v-125h167v125q0 35 -24.5 59t-58.5 24zM500 8v292h-417v-292h417z"}, {PackIconTypiconsKind.LockOpen, "M542 633q69 0 117.5 -48.5t48.5 -117.5v-125q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v125q0 35 -24.5 59t-58.5 24q-35 0 -59.5 -24.5t-24.5 -58.5v-84h42q34 0 58.5 -24.5t24.5 -58.5v-292q0 -34 -24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5v292 q0 34 24 58.5t59 24.5h125v-41h167v125q0 69 49 117.5t118 48.5zM292 38q22 0 38 16t16 38t-16 38t-38 16t-38 -16t-16 -38t16 -38t38 -16z"}, {PackIconTypiconsKind.LockOpenOutline, "M238 92q0 54 54 54t54 -54t-54 -54t-54 54zM0 300q0 34 24 58.5t59 24.5h125v-41h167v125q0 55 28.5 94.5t73.5 58.5q30 13 65 13q68 0 117 -49t49 -117v-125q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v125q0 35 -24.5 59t-58.5 24q-35 0 -59.5 -24.5 t-24.5 -58.5v-84h42q34 0 58.5 -24.5t24.5 -58.5v-292q0 -34 -24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5v292zM500 8v292h-417v-292h417z"}, {PackIconTypiconsKind.Mail, "M667 508q35 0 59 -24t24 -59v-375q0 -34 -24 -58.5t-59 -24.5h-584q-35 0 -59 24.5t-24 58.5v375q0 35 24 59t59 24h584zM330 145l-65 57l-152 -152h524l-152 152l-65 -57q-19 -16 -45 -16t-45 16zM83 79l150 151l-150 131v-282zM517 230l150 -150v281zM667 425h-584v-9 l274 -240q7 -6 18 -6t18 6l274 240v9z"}, {PackIconTypiconsKind.Map, "M42 -33q-18 0 -30 12.5t-12 28.5v417q0 17 12 29l188 188q11 11 27 12t28 -9l179 -143l162 161q20 20 45.5 8t25.5 -38v-416q0 -17 -13 -30l-187 -187q-11 -11 -27.5 -12t-28.5 9l-179 143l-161 -161q-12 -12 -29 -12zM83 109q122 120 125 122v302l-125 -125v-299z M255 228l162 -129v311l-167 132v-311zM583 234v299q-122 -121 -125 -123v-301z"}, {PackIconTypiconsKind.MediaEject, "M500 133q34 0 58.5 -24.5t24.5 -58.5t-24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5t24 58.5t59 24.5h417zM560 358q23 -23 23 -58q0 -34 -24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5t24 58l268 275q161 -165 268 -275z"}, {PackIconTypiconsKind.MediaEjectOutline, "M458 -75h-333q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h333q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM125 92q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5h333q17 0 29.5 12.5t12.5 29.5t-12.5 29.5t-29.5 12.5h-333zM292 514l-205 -211 l-4 -3h417q-34 36 -104 107t-104 107zM292 633q161 -165 268 -275q23 -23 23 -58q0 -34 -24.5 -58.5t-58.5 -24.5h-417q-35 0 -59 24.5t-24 58.5t24 58z"}, {PackIconTypiconsKind.MediaFastForward, "M502 512l248 -241q-149 -145 -248 -241q-22 -22 -52 -22q-31 0 -53 22t-22 53v375q0 31 22 53t53 22q29 0 52 -21zM127 512l248 -241q-149 -145 -248 -241q-22 -22 -52 -22q-31 0 -53 22t-22 53v375q0 31 22 53t53 22q29 0 52 -21z"}, {PackIconTypiconsKind.MediaFastForwardOutline, "M458 438v-335l173 168zM450 533q29 0 52 -21l248 -241q-149 -145 -248 -241q-22 -22 -52 -22q-31 0 -53 22t-22 53v375q0 31 22 53t53 22zM83 438v-335l173 168zM75 533q29 0 52 -21l248 -241q-149 -145 -248 -241q-22 -22 -52 -22q-31 0 -53 22t-22 53v375q0 31 22 53 t53 22z"}, {PackIconTypiconsKind.MediaPause, "M83 550q35 0 59.5 -24.5t24.5 -58.5v-334q0 -34 -24.5 -58.5t-59.5 -24.5t-59 24t-24 59v334q0 35 24 59t59 24zM375 550q35 0 59 -24t24 -59v-334q0 -35 -24 -59t-59 -24t-59 24t-24 59v334q0 35 24 59t59 24z"}, {PackIconTypiconsKind.MediaPauseOutline, "M125 -33q-52 0 -88.5 36.5t-36.5 88.5v375q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-375q0 -52 -36.5 -88.5t-88.5 -36.5zM125 508q-17 0 -29.5 -12t-12.5 -29v-375q0 -17 12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5v375q0 17 -12.5 29t-29.5 12zM417 -33 q-52 0 -88.5 36.5t-36.5 88.5v375q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-375q0 -52 -36.5 -88.5t-88.5 -36.5zM417 508q-17 0 -29.5 -12t-12.5 -29v-375q0 -17 12.5 -29.5t29.5 -12.5t29 12.5t12 29.5v375q0 17 -12 29t-29 12z"}, {PackIconTypiconsKind.MediaPlay, "M142 32q-24 -24 -59 -24q-34 0 -58.5 24.5t-24.5 59.5v416q0 35 24.5 59.5t58.5 24.5q35 0 59 -24l275 -268q-165 -161 -275 -268z"}, {PackIconTypiconsKind.MediaPlayOutline, "M83 508v-416q35 35 106.5 104t107.5 104l-210 205zM83 592q35 0 59 -24l275 -268q-166 -161 -276 -268q-24 -24 -58 -24t-58.5 24.5t-24.5 59.5v416q0 35 24.5 59.5t58.5 24.5z"}, {PackIconTypiconsKind.MediaPlayReverse, "M333 8q-33 0 -58 25l-275 267q167 163 275 267q25 25 58 25q35 0 59.5 -25t24.5 -59v-416q0 -34 -24.5 -59t-59.5 -25z"}, {PackIconTypiconsKind.MediaPlayReverseOutline, "M333 508l-212 -208l212 -208v416zM275 567q25 25 58 25q35 0 59.5 -25t24.5 -59v-416q0 -34 -24.5 -59t-59.5 -25q-33 0 -58 25l-275 267q167 163 275 267z"}, {PackIconTypiconsKind.MediaRecord, "M250 550q104 0 177 -73t73 -177t-73 -177t-177 -73t-177 73t-73 177t73 177t177 73z"}, {PackIconTypiconsKind.MediaRecordOutline, "M250 467q-69 0 -118 -49t-49 -118t49 -118t118 -49t118 49t49 118t-49 118t-118 49zM250 550q104 0 177 -73t73 -177t-73 -177t-177 -73t-177 73t-73 177t73 177t177 73z"}, {PackIconTypiconsKind.MediaRewind, "M300 533q31 0 53 -22t22 -53v-375q0 -31 -22 -53t-53 -22q-28 0 -52 22l-248 241q149 145 248 241q21 21 52 21zM675 533q31 0 53 -22t22 -53v-375q0 -31 -22 -53t-53 -22q-28 0 -52 22l-248 241q149 145 248 241q21 21 52 21z"}, {PackIconTypiconsKind.MediaRewindOutline, "M292 438l-173 -167l173 -168v335zM300 533q31 0 53 -22t22 -53v-375q0 -31 -22 -53t-53 -22q-28 0 -52 22l-248 241q149 145 248 241q21 21 52 21zM667 438l-173 -167l173 -168v335zM675 533q31 0 53 -22t22 -53v-375q0 -31 -22 -53t-53 -22q-28 0 -52 22l-248 241 q149 145 248 241q21 21 52 21z"}, {PackIconTypiconsKind.MediaStop, "M417 550q35 0 59 -24t24 -59v-334q0 -35 -24 -59t-59 -24h-334q-35 0 -59 24t-24 59v334q0 35 24 59t59 24h334z"}, {PackIconTypiconsKind.MediaStopOutline, "M417 467h-334v-334h334v334zM417 550q35 0 59 -24t24 -59v-334q0 -35 -24 -59t-59 -24h-334q-35 0 -59 24t-24 59v334q0 35 24 59t59 24h334z"}, {PackIconTypiconsKind.Message, "M625 508h-500q-17 0 -29.5 -12t-12.5 -29v-292q0 -17 12.5 -29.5t29.5 -12.5h125v-7l7 7h368q17 0 29.5 12.5t12.5 29.5v292q0 17 -12.5 29t-29.5 12zM625 592q52 0 88.5 -36.5t36.5 -88.5v-292q0 -52 -36.5 -88.5t-88.5 -36.5h-333l-125 -125v125h-42q-52 0 -88.5 36.5 t-36.5 88.5v292q0 52 36.5 88.5t88.5 36.5h500z"}, {PackIconTypiconsKind.Messages, "M875 508q52 0 88.5 -36.5t36.5 -88.5v-291q0 -52 -36.5 -88.5t-88.5 -36.5h-42v-125l-125 125h-333q-52 0 -88.5 36.5t-36.5 88.5l-125 -125v125q-52 0 -88.5 36.5t-36.5 88.5v291q0 52 36.5 88.5t88.5 36.5h500q52 0 88.5 -36.5t36.5 -88.5h125zM125 175h167v187 q0 43 30.5 74t73.5 31h271v41q0 17 -12.5 29.5t-29.5 12.5h-500q-17 0 -29.5 -12.5t-12.5 -29.5v-291q0 -17 12.5 -29.5t29.5 -12.5zM917 92v291q0 17 -12.5 29.5t-29.5 12.5h-479q-26 0 -44.5 -18.5t-18.5 -44.5v-270q0 -17 12.5 -29.5t29.5 -12.5h500q17 0 29.5 12.5 t12.5 29.5z"}, {PackIconTypiconsKind.MessageTyping, "M667 550q52 0 88.5 -36.5t36.5 -88.5v-292q0 -52 -36.5 -88.5t-88.5 -36.5h-375l-125 -125v125h-42q-52 0 -88.5 36.5t-36.5 88.5v292q0 52 36.5 88.5t88.5 36.5h542zM708 133v292q0 17 -12 29.5t-29 12.5h-542q-17 0 -29.5 -12.5t-12.5 -29.5v-292q0 -17 12.5 -29 t29.5 -12h542q17 0 29 12t12 29zM208 196q-34 0 -58.5 24t-24.5 59t24.5 59t58.5 24q35 0 59.5 -24.5t24.5 -58.5t-24.5 -58.5t-59.5 -24.5zM208 321q-17 0 -29 -12.5t-12 -29.5t12 -29t29 -12t29.5 12t12.5 29t-12.5 29.5t-29.5 12.5zM396 196q-35 0 -59.5 24.5t-24.5 58.5 t24.5 58.5t59.5 24.5q34 0 58.5 -24t24.5 -59t-24.5 -59t-58.5 -24zM396 321q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12t29.5 12t12.5 29t-12.5 29.5t-29.5 12.5zM583 196q-35 0 -59 24t-24 59t24 59t59 24t59.5 -24.5t24.5 -58.5t-24.5 -58.5t-59.5 -24.5zM583 321 q-17 0 -29 -12.5t-12 -29.5t12 -29t29 -12t29.5 12t12.5 29t-12.5 29.5t-29.5 12.5z"}, {PackIconTypiconsKind.Microphone, "M292 133q-69 0 -118 49t-49 118v250q0 69 49 118t118 49t117.5 -49t48.5 -118v-250q0 -69 -48.5 -118t-117.5 -49zM583 300q0 -109 -71.5 -191t-178.5 -97v-45h125q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-333q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5 t29.5 12.5h125v45q-107 15 -178.5 97t-71.5 191v83q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-83q0 -86 61.5 -147t147.5 -61t147 61t61 147v83q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-83z"}, {PackIconTypiconsKind.MicrophoneOutline, "M292 133q-69 0 -118 49t-49 118v250q0 69 49 118t118 49t117.5 -49t48.5 -118v-250q0 -69 -48.5 -118t-117.5 -49zM292 633q-35 0 -59.5 -24.5t-24.5 -58.5v-250q0 -34 24.5 -58.5t59.5 -24.5q34 0 58.5 24.5t24.5 58.5v250q0 34 -24.5 58.5t-58.5 24.5zM583 300 q0 -109 -71.5 -191t-178.5 -97v-45h125q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-333q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h125v45q-107 15 -178.5 97t-71.5 191v83q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-83q0 -86 61.5 -147t147.5 -61 t147 61t61 147v83q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-83z"}, {PackIconTypiconsKind.Minus, "M583 342q35 0 59.5 -25t24.5 -59t-24.5 -58.5t-59.5 -24.5h-500q-35 0 -59 24.5t-24 58.5q0 35 24.5 59.5t58.5 24.5h500z"}, {PackIconTypiconsKind.MinusOutline, "M625 133h-500q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h500q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5zM125 300q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12h500q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5h-500z"}, {PackIconTypiconsKind.MortarBoard, "M771 471q55 -25 62 -79q0 -66 -54 -96l-46 -25q17 -67 17 -113q0 -88 -94 -148t-231 -60q-172 0 -267 88q-3 -1 -8.5 -2t-23.5 -3.5t-34 0.5q-32 3 -62 36.5t-30 76.5q0 87 12 137l13 63q-8 17 -8 50q0 24 18 47t44 36q225 113 279 138q42 21 65.5 20.5t59.5 -20.5z M429 38q102 0 172 36.5t70 87.5l-17 117l-179 -87q-49 -20 -92 0l-175 87l-20 -117q0 -53 70 -88.5t171 -35.5zM733 375q13 6 13 14.5t-13 14.5q-262 134 -279 142q-27 13 -54 0l-279 -142q-13 -6 -13 -14.5t13 -14.5l8 -4q-13 -33 -25 -92q-12 -62 -12 -129q0 -15 10 -24 t23 -9h4q29 0 29 33q0 6 -4 46.5t-4 74.5q0 52 12 83l238 -121q29 -14 58 0z"}, {PackIconTypiconsKind.News, "M833 633q35 0 59.5 -24.5t24.5 -58.5v-500q0 -34 -24.5 -58.5t-59.5 -24.5h-750q-35 0 -59 24.5t-24 58.5v500q0 34 24 58.5t59 24.5h750zM83 550v-500h334v500h-334zM833 50v500h-375v-500h375zM792 238v-126q0 -8 -6.5 -14t-14.5 -6h-42q-8 0 -14.5 6t-6.5 14v126 q0 8 6.5 14t14.5 6h42q8 0 14.5 -6t6.5 -14zM667 488v-209q0 -8 -6.5 -14.5t-14.5 -6.5h-125q-8 0 -14.5 6.5t-6.5 14.5v209q0 8 6.5 14t14.5 6h125q8 0 14.5 -6t6.5 -14zM729 383q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h42q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5 t-14.5 -6.5h-42zM729 300q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h42q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5h-42zM521 175q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h125q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5h-125zM646 133q8 0 14.5 -6.5 t6.5 -14.5t-6.5 -14t-14.5 -6h-125q-8 0 -14.5 6t-6.5 14t6.5 14.5t14.5 6.5h125zM729 467q-8 0 -14.5 6.5t-6.5 14.5t6.5 14t14.5 6h42q8 0 14.5 -6t6.5 -14t-6.5 -14.5t-14.5 -6.5h-42zM375 488v-126q0 -8 -6.5 -14t-14.5 -6h-208q-8 0 -14.5 6t-6.5 14v126q0 8 6.5 14 t14.5 6h208q8 0 14.5 -6t6.5 -14zM354 217q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5h-208q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h208zM354 300q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5h-208q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h208zM354 133 q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14t-14.5 -6h-208q-8 0 -14.5 6t-6.5 14t6.5 14.5t14.5 6.5h208z"}, {PackIconTypiconsKind.Notes, "M602 636q9 1 16 -5.5t7 -15.5v-503q0 -43 -36.5 -73.5t-88.5 -30.5t-88.5 30.5t-36.5 73.5t36.5 74t88.5 31v155l-250 -26v-317q0 -43 -36.5 -73.5t-88.5 -30.5t-88.5 30.5t-36.5 73.5t36.5 73.5t88.5 30.5v430q0 8 5.5 14t12.5 7z"}, {PackIconTypiconsKind.NotesOutline, "M583 639q34 0 59 -24.5t25 -58.5v-423q0 -69 -55.5 -117.5t-132.5 -48.5q-74 0 -127 45q-24 -40 -68 -63.5t-96 -23.5q-77 0 -132.5 49t-55.5 118q0 53 35 96.5t90 60.5v254q0 32 21 55.5t52 27.5l375 52zM333 133q0 47 35.5 82t89.5 42v72l-125 -18v-178zM583 133v423 l-375 -53v-330q-14 2 -20 2q-44 0 -74.5 -24.5t-30.5 -58.5q0 -35 31 -59.5t74 -24.5t73.5 24.5t30.5 59.5v255l208 31v-163q-14 2 -21 2q-43 0 -73.5 -24.5t-30.5 -59.5t30.5 -59t73.5 -24t73.5 24t30.5 59z"}, {PackIconTypiconsKind.Pen, "M604 689q77 0 133 -56t56 -133q0 -22 -7 -50q20 -62 -25 -107l-187 -188q-30 -30 -74 -30h-3l-90 -90q-25 -25 -63 -40q-10 -4 -289 -97q-8 -2 -13 -2q-21 0 -34 17t-6 37q93 279 97 289q15 38 41 64q331 330 332 331q57 55 132 55zM299 67l-127 127q-2 -6 -12 -35 t-17 -50l71 -71q35 11 85 29zM128 65l-21 -62l63 21zM449 195q-12 18 -10.5 40t17.5 38l154 154l-114 114l-297 -298l-8 -9l147 -147l10 7zM702 402q14 14 -0.5 28.5t-28.5 0.5l-188 -187q-10 -10 -4 -23t19 -13q9 0 15 6zM639 456q31 31 68 19q3 12 3 25q0 43 -31 74 q-33 31 -77.5 29.5t-76.5 -33.5z"}, {PackIconTypiconsKind.Pencil, "M750 513q18 -18 18 -44t-18 -44l-456 -456q-17 -17 -47.5 -30.5t-58.5 -13.5h-188v187q0 28 13.5 59t30.5 48l456 456q18 18 44 18t44 -18zM115 172l52 -51l345 346l-51 51zM188 8q11 0 26 7q-8 8 -21 20.5t-40 40t-45 44.5l-18 18q-7 -17 -7 -26v-62l42 -42h63zM247 40 l346 346l-51 51l-346 -345zM622 415l54 54l-132 132l-54 -53z"}, {PackIconTypiconsKind.Phone, "M453 505l-18 18q-18 18 -18 44t18 44l66 67q18 18 44 18t44 -18l19 -19zM173 261l18 -18l-154 -155l-19 18q-18 18 -18 45q0 26 18 44l66 66q18 18 44.5 18t44.5 -18zM664 603q8 -8 18 -22t21 -56.5t5 -90.5t-48 -123t-121 -154q-171 -171 -319 -171q-81 0 -127 46 l-15 14l155 155l27 -27q14 -14 29 0l233 233q6 6 6 14q0 9 -6 15l-27 27l154 155z"}, {PackIconTypiconsKind.PhoneOutline, "M771 647q25 -25 42 -59.5t21.5 -87t-9.5 -109.5t-59.5 -131t-119.5 -148q-189 -189 -363 -189q-107 0 -172 65l-74 74q-37 37 -37 88.5t37 88.5l66 66q37 37 88 37t88 -37l58 -57l174 173l-58 58q-37 37 -37 88.5t37 88.5l66 66q36 36 89 36q52 0 88 -36zM512 597 q-12 -12 -12 -29.5t12 -29.5l45 -45l125 125l-45 45q-12 12 -29 12q-18 0 -30 -12zM95 121l46 -45l125 125l-46 45q-12 12 -29 12t-29 -12l-67 -66q-12 -12 -12 -29.5t12 -29.5zM587 171q65 65 104 127t51 106.5t9 84t-13.5 62t-25.5 37.5l-125 -125l12 -12q12 -12 12 -29.5 t-12 -29.5l-233 -233q-12 -12 -29 -12q-18 0 -30 12l-12 13l-125 -126q40 -40 113 -40q139 0 304 165z"}, {PackIconTypiconsKind.Pi, "M571 444q12 -12 12 -29.5t-12 -29.5q-46 -46 -113 -59v-234q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v234q-67 13 -113 59q-24 24 -54 33v-326q0 -17 -12 -29.5t-29 -12.5t-29.5 12.5t-12.5 29.5v326q-30 -9 -54 -33q-12 -12 -29.5 -12t-29.5 12t-12 29.5 t12 29.5q64 64 154.5 64t154.5 -64q40 -40 95.5 -40t95.5 40q12 12 29.5 12t29.5 -12z"}, {PackIconTypiconsKind.Pin, "M458 50q0 -18 -11.5 -30t-29.5 -12q-17 0 -30 13l-135 135l-252 -189l189 252l-135 135q-19 19 -9 45q11 26 38 26q126 0 216 45q72 36 121 137q7 19 29 25.5t40 -10.5l166 -167q17 -18 11 -40t-25 -29q-102 -50 -138 -121q-45 -88 -45 -215z"}, {PackIconTypiconsKind.PinOutline, "M685 484q24 -24 24 -58.5t-24 -59.5q-13 -13 -29 -19q-85 -41 -115 -100q-41 -82 -41 -197q0 -36 -23.5 -59.5t-59.5 -23.5q-38 0 -60 24l-134 135l-223 -159l159 223l-135 134q-16 15 -21.5 39.5t3.5 51.5q22 52 77 52q117 0 197 40l9 5q55 30 94 113q6 16 17 27 q24 24 59.5 23.5t58.5 -24.5zM466 284q43 86 157 140l-164 169q-55 -117 -141 -160l-10 -5q-96 -45 -225 -45l333 -333q0 134 50 234z"}, {PackIconTypiconsKind.PiOutline, "M625 540q51 0 88 -37t37 -88q0 -52 -37 -89q-38 -39 -88 -61v-173q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5v198q-51 0 -88 37t-37 88t37 88q89 89 213 89t213 -89q15 -15 37 -15t37 15q37 37 88 37z M654 385q12 12 12 29.5t-12 29.5q-13 13 -29 13t-29 -13q-39 -39 -96 -39t-96 39q-64 64 -154 64t-154 -64q-12 -12 -12 -29.5t12 -29.5t29 -12t29 12q24 24 54 33v-326q0 -17 12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5v326q30 -9 54 -33q46 -46 112 -59v-234 q0 -17 12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5v234q66 13 112 59z"}, {PackIconTypiconsKind.Pipette, "M718 627q47 -47 47.5 -122.5t-50.5 -116.5q-42 -33 -152 -74l67 -67q12 -12 12 -29.5t-12 -29.5t-29 -12q-18 0 -30 12l-12 12l-218 -218q-25 -25 -63 -40q-1 -1 -23.5 -8.5t-62 -16t-72.5 -8.5q-62 0 -91 29q-19 19 -25.5 51.5t-3 64.5t11.5 63.5t13.5 48.5t7.5 20 q15 38 41 64l218 218l-13 12q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12l68 -68q42 112 73 152q41 52 118 52q73 0 121 -48zM88 -3q19 -16 108 6l-101 101q-22 -89 -7 -107zM241 17q27 10 41 24l218 218l-149 149l-218 -218q-14 -14 -24 -40z"}, {PackIconTypiconsKind.Plane, "M646 237q28 -16 19 -47t-40 -31l-11 2l-218 62v-185l68 -54q23 -20 12.5 -47.5t-38.5 -27.5q-8 0 -16 3l-89 36l-88 -36q-14 -6 -29 -1t-23 19q-8 13 -5 28.5t15 25.5l68 54v185l-218 -62q-15 -4 -29.5 3t-20.5 21t-1 29t19 23l250 143v248q0 26 18.5 44.5t43.5 18.5 t44 -18.5t19 -44.5v-248zM333 618q9 0 15 6t6 15q0 20 -21 20q-20 0 -20 -20q0 -21 20 -21z"}, {PackIconTypiconsKind.PlaneOutline, "M770 284q41 -23 57 -68.5t-3 -89.5q-19 -43 -61.5 -63.5t-88.5 -7.5l-112 32v-35l37 -29q37 -30 45 -77.5t-18 -87.5q-26 -41 -72 -54t-89 9l-48 8q-12 0 -24.5 -2t-18.5 -4l-6 -2q-43 -22 -89 -9t-72 54q-26 40 -18 87.5t45 77.5l37 29v35l-112 -32q-46 -13 -88 7.5 t-61 63.5t-3.5 89t56.5 69l208 118v200q0 60 43 103t103 43t102.5 -43t42.5 -103v-200zM747 159q6 14 1 29t-19 23l-250 143v248q0 26 -18.5 44.5t-43.5 18.5t-44 -18.5t-19 -44.5v-248l-250 -143q-13 -7 -18 -22.5t1 -29.5t20 -21t29 -3l218 62v-185l-68 -54 q-13 -10 -15 -26.5t6 -29.5t24 -17t30 3q35 16 86 16q23 0 44 -4t31 -8l10 -4q14 -8 30 -3.5t24 17.5t6 29.5t-15 26.5l-68 54v185l218 -62q15 -4 29.5 3t20.5 21zM396 612q0 21 21 21q20 0 20 -21q0 -20 -20 -20q-21 0 -21 20z"}, {PackIconTypiconsKind.Plug, "M542 550q19 0 30 -11.5t11 -30.5v-175q-9 -78 -53 -139.5t-113 -93.5v-133q0 -35 -24.5 -59.5t-59.5 -24.5h-83q-34 0 -58.5 24.5t-24.5 59.5v133q-70 32 -115.5 94t-51.5 139v175q0 19 11.5 30.5t30.5 11.5h41v125q0 19 11.5 30.5t30.5 11.5h83q19 0 30.5 -11.5 t11.5 -30.5v-125h83v125q0 19 11.5 30.5t30.5 11.5h83q19 0 30.5 -11.5t11.5 -30.5v-125h42zM375 675v-125h83v125h-83zM125 675v-125h83v125h-83zM333 -33v83h-83v-83h83zM292 154q68 0 123 41t77 105h-396q19 -63 73.5 -104.5t122.5 -41.5zM500 362v105h-417v-105 q0 -10 5 -20h408q4 8 4 20z"}, {PackIconTypiconsKind.Plus, "M583 383q35 0 59.5 -24.5t24.5 -58.5t-24.5 -58.5t-59.5 -24.5l-166 3v-170q0 -34 -24.5 -58.5t-59.5 -24.5t-59 24.5t-24 58.5l3 170l-170 -3q-35 0 -59 24.5t-24 58.5t24 58.5t59 24.5h170l-3 167q0 34 24 58.5t59 24.5t59.5 -24.5t24.5 -58.5v-167h166z"}, {PackIconTypiconsKind.PlusOutline, "M375 -75q-52 0 -88.5 36.5t-36.5 88.5l2 127l-126 -2q-52 0 -89 36.5t-37 88.5t36.5 88.5t88.5 36.5l127 2l-2 122q0 52 36.5 89t88.5 37t88.5 -36.5t36.5 -88.5l2 -123l124 -2q51 0 87.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5l-123 2l-2 -128q0 -51 -36.5 -87.5 t-88.5 -36.5zM333 258v-209q0 -17 12.5 -29t29.5 -12t29.5 12.5t12.5 29.5v208h209q17 0 29 12.5t12 29.5t-12.5 29.5t-29.5 12.5h-208v208q0 18 -12.5 30t-29.5 12t-29.5 -12.5t-12.5 -29.5v-208h-208q-18 0 -30 -12.5t-12 -29.5t12.5 -29.5t29.5 -12.5h208z"}, {PackIconTypiconsKind.PointOfInterest, "M521 342h-63v-84h63q60 0 103 -43t43 -103t-43 -102.5t-103 -42.5t-103 42.5t-43 102.5v63h-83v-63q0 -60 -43 -102.5t-103 -42.5t-103 42.5t-43 102.5t43 103t103 43h62v84h-62q-60 0 -103 43t-43 103t43 102.5t103 42.5t103 -42.5t43 -102.5v-63h83v63q0 60 43 102.5 t103 42.5t103 -42.5t43 -102.5t-43 -103t-103 -43zM458 488v-63h63q25 0 43.5 18.5t18.5 44.5t-18.5 44t-43.5 18q-26 0 -44.5 -18.5t-18.5 -43.5zM208 112v63h-62q-26 0 -44.5 -18.5t-18.5 -44.5q0 -25 18.5 -43.5t44.5 -18.5t44 18t18 44zM208 425v63q0 26 -18 44t-44 18 t-44.5 -18.5t-18.5 -43.5q0 -26 18.5 -44.5t44.5 -18.5h62zM375 258v84h-83v-84h83zM521 175h-63v-63q0 -25 18.5 -43.5t44.5 -18.5q25 0 43.5 18t18.5 44t-18.5 44.5t-43.5 18.5z"}, {PackIconTypiconsKind.PointOfInterestOutline, "M604 633q-60 0 -103 -42.5t-43 -102.5v-63h-83v63q0 60 -43 102.5t-103 42.5t-103 -42.5t-43 -102.5t43 -103t103 -43h63v-84h-63q-60 0 -103 -43t-43 -103t43 -102.5t103 -42.5t103 42.5t43 102.5v63h83v-63q0 -60 43 -102.5t103 -42.5t103 42.5t43 102.5t-43 103 t-103 43h-62v84h62q60 0 103 43t43 103t-43 102.5t-103 42.5zM542 425v63q0 26 18 44t44 18t44.5 -18.5t18.5 -43.5q0 -26 -18.5 -44.5t-44.5 -18.5h-62zM229 425q-25 0 -43.5 18.5t-18.5 44.5t18.5 44t43.5 18q26 0 44.5 -18.5t18.5 -43.5v-63h-63zM604 50q-26 0 -44 18 t-18 44v63h62q26 0 44.5 -18.5t18.5 -44.5q0 -25 -18.5 -43.5t-44.5 -18.5zM229 50q-25 0 -43.5 18t-18.5 44t18.5 44.5t43.5 18.5h63v-63q0 -25 -18.5 -43.5t-44.5 -18.5zM604 717q94 0 161.5 -67.5t67.5 -161.5q0 -57 -26 -106.5t-71 -81.5q45 -32 71 -81.5t26 -106.5 q0 -94 -67.5 -161.5t-161.5 -67.5q-57 0 -106 26.5t-81 71.5q-32 -45 -81.5 -71.5t-106.5 -26.5q-95 0 -162 67.5t-67 161.5q0 57 26.5 106.5t71.5 81.5q-45 32 -71.5 81.5t-26.5 106.5q0 94 67 161.5t162 67.5q57 0 106.5 -26.5t81.5 -71.5q32 45 81 71.5t106 26.5z M458 342v-84h-83v84h83z"}, {PackIconTypiconsKind.Power, "M271 109q76 0 131.5 55.5t55.5 132.5q0 78 -55 133q-12 12 -12 29t12 29t29.5 12t29.5 -12q80 -80 80 -191q0 -112 -80 -192q-79 -79 -191 -79q-113 0 -192 79t-79 192q0 112 79 191q12 12 29.5 12t29.5 -12t12 -29t-12 -29q-55 -55 -55 -133q0 -77 55.5 -132.5 t132.5 -55.5zM271 342q-17 0 -29.5 12t-12.5 29v209q0 17 12.5 29t29.5 12t29 -12t12 -29v-209q0 -17 -12 -29t-29 -12z"}, {PackIconTypiconsKind.PowerOutline, "M605 547q103 -103 103 -250q0 -148 -103 -251t-251 -103q-147 0 -250 103q-104 104 -104 251q0 146 104 250q53 53 125 31v14q0 52 36.5 88.5t88.5 36.5t88.5 -36.5t36.5 -88.5v-14q32 10 66.5 2t59.5 -33zM312 592v-209q0 -17 12.5 -29t29.5 -12t29.5 12t12.5 29v209 q0 17 -12.5 29t-29.5 12t-29.5 -12t-12.5 -29zM271 433q-7 -19 -20 -33q-43 -43 -43 -103t43 -103q41 -41 103 -41t103 41q43 43 43 103t-43 103q-12 12 -19 33v-50q0 -34 -24.5 -58.5t-59.5 -24.5q-34 0 -58.5 24t-24.5 59v50zM354 109q-76 0 -131.5 55.5t-55.5 132.5 q0 78 55 133q12 12 12 29t-12 29t-29.5 12t-29.5 -12q-80 -80 -80 -191q0 -112 80 -192q79 -79 191 -79q113 0 192 79t79 192q0 112 -79 191q-12 12 -29.5 12t-29.5 -12t-12 -29t12 -29q55 -55 55 -133q0 -77 -56 -132.5t-132 -55.5z"}, {PackIconTypiconsKind.Printer, "M583 592q52 0 88.5 -36.5t36.5 -88.5v-417q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v417q0 52 36.5 88.5t88.5 36.5v83q0 17 12.5 29.5t29.5 12.5h375q17 0 29 -12.5t12 -29.5v-83zM208 633v-208h292v208h-292zM125 508q-17 0 -29.5 -12 t-12.5 -29v-105q0 -25 18.5 -43.5t44.5 -18.5h416q26 0 44.5 18.5t18.5 43.5v105q0 17 -12.5 29t-29.5 12v-125q0 -17 -12 -29t-29 -12h-375q-17 0 -29.5 12t-12.5 29v125zM583 8q17 0 29.5 12.5t12.5 29.5v230q-29 -22 -63 -22h-416q-34 0 -63 22v-230q0 -17 12.5 -29.5 t29.5 -12.5h458zM438 508q20 0 20 -20q0 -21 -20 -21h-167q-9 0 -15 6t-6 15q0 20 21 20h167zM500 133q9 0 15 -6t6 -15q0 -20 -21 -20h-292q-20 0 -20 20q0 21 20 21h292zM438 592q20 0 20 -21t-20 -21h-167q-9 0 -15 6t-6 15t6 15t15 6h167z"}, {PackIconTypiconsKind.Puzzle, "M469 331q-30 0 -51.5 -27t-21.5 -66t21.5 -66.5t51.5 -27.5q17 0 34 10q21 14 30 9.5t9 -19.5v-115q0 -25 -18.5 -43.5t-44.5 -18.5h-114q-13 0 -19 7.5t2 24.5q17 20 17 41q0 30 -27.5 51t-66.5 21t-66.5 -21t-27.5 -51q0 -18 10 -35q14 -21 9.5 -29.5t-19.5 -8.5h-115 q-26 0 -44 18.5t-18 43.5v115q0 13 7.5 18.5t24.5 -2.5q19 -16 41 -16q30 0 51.5 27.5t21.5 66.5t-21.5 66t-51.5 27q-17 0 -34 -10q-21 -14 -30 -9.5t-9 19.5v73q0 26 18.5 44.5t43.5 18.5h115q15 0 19.5 8.5t-8.5 29.5q-11 16 -11 35q0 30 27.5 51t66.5 21t66.5 -21 t27.5 -51q0 -21 -17 -41q-8 -17 -2 -24.5t19 -7.5h114q25 0 44 -18.5t19 -44.5v-73q0 -13 -7.5 -18.5t-24.5 2.5q-19 16 -41 16z"}, {PackIconTypiconsKind.PuzzleOutline, "M0 144q0 65 54 94q-54 28 -54 93v73q0 60 43 103t103 43h31q5 62 55.5 104t121.5 42t121.5 -42t55.5 -104h31q60 0 103 -43t43 -103v-73q0 -65 -54 -94q54 -28 54 -93v-115q0 -60 -43 -103t-103 -43h-114q-65 0 -94 54q-28 -54 -94 -54h-114q-60 0 -103 43t-43 103v115z M625 29v115q0 20 -15 20q-10 0 -24 -10t-34 -10q-30 0 -51.5 27.5t-21.5 66.5t21.5 66t51.5 27q22 0 41 -16q7 -5 16 -5q16 0 16 21v73q0 26 -18.5 44.5t-44.5 18.5h-114q-13 0 -18.5 7.5t2.5 24.5q16 19 16 41q0 30 -27.5 51t-66.5 21t-66.5 -21t-27.5 -51q0 -17 11 -35 q14 -21 9 -29.5t-20 -8.5h-114q-26 0 -44.5 -18.5t-18.5 -44.5v-73q0 -21 16 -21q7 0 23 11q14 10 34 10q30 0 51.5 -27t21.5 -66t-21.5 -66.5t-51.5 -27.5q-22 0 -41 16q-8 5 -16 5q-16 0 -16 -21v-115q0 -25 18.5 -43.5t44.5 -18.5h114q15 0 19.5 8.5t-8.5 29.5 q-11 16 -11 35q0 30 27.5 51t66.5 21t66.5 -21t27.5 -51q0 -22 -16 -41q-8 -17 -2.5 -24.5t18.5 -7.5h114q26 0 44.5 18.5t18.5 43.5zM83 271v-66q5 2 16 2q23 0 44 -16q6 -6 13 -6q12 0 21.5 15.5t9.5 37.5t-9.5 37t-21.5 15q-6 0 -14 -6q-23 -15 -44 -15q-5 0 -15 2z M610 206q5 0 15 -2v66q-5 -2 -16 -2q-22 0 -43 16q-6 6 -14 6q-12 0 -21.5 -15t-9.5 -37t9.5 -37.5t21.5 -15.5q6 0 14 6q22 15 44 15zM320 -33h67q-8 31 13 59q6 6 6 14q0 12 -15 21.5t-37 9.5t-37 -9.5t-15 -21.5q0 -7 6 -15q20 -29 12 -58z"}, {PackIconTypiconsKind.Radar, "M292 -33q-121 0 -206.5 85t-85.5 206t85.5 206.5t206.5 85.5t206 -85.5t85 -206.5t-85 -206t-206 -85zM250 462q-62 -13 -105.5 -56.5t-56.5 -105.5h79q17 0 29 -12.5t12 -29.5t-12 -29t-29 -12h-79q13 -62 57 -106t105 -57v79q0 17 12.5 29.5t29.5 12.5t29 -12.5 t12 -29.5v-79q61 13 105.5 57t57.5 106h-79q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h79q-13 61 -57 105t-106 57v-79q0 -17 -12 -29t-29 -12t-29.5 12t-12.5 29v79z"}, {PackIconTypiconsKind.RadarOutline, "M354 612q146 0 250 -104t104 -250t-104 -250t-250 -104t-250 104t-104 250t104 250t250 104zM354 -12q112 0 191.5 79t79.5 191t-79.5 191.5t-191.5 79.5t-191.5 -79.5t-79.5 -191.5t79.5 -191t191.5 -79zM500 300q-42 -9 -42 -42q0 -32 42 -41h37q-12 -53 -50.5 -91 t-90.5 -50v36q-9 42 -42 42t-42 -42v-36q-52 12 -90 50t-50 91h36q42 9 42 41q0 33 -42 42h-36q12 53 50 91t90 50v-37q9 -42 42 -42q17 0 29.5 12.5t12.5 29.5v37q52 -12 90.5 -50.5t50.5 -90.5h-37zM475 179q-26 8 -42 30t-16 49t16 49t42 30q-17 25 -42 42 q-8 -26 -30 -42t-49 -16t-49 16t-30 42q-25 -17 -42 -42q26 -8 42.5 -30t16.5 -49t-16.5 -49t-42.5 -30q15 -24 42 -41q8 26 30 42t49 16t49 -16t30 -42q27 17 42 41z"}, {PackIconTypiconsKind.Refresh, "M97 250q0 -59 43 -102t102 -43q37 0 70 18.5t52 48.5q10 16 30.5 20.5t36.5 -6.5q17 -11 21 -30t-6 -36q-14 -22 -33 -41q-71 -71 -171 -71t-171 71t-71 171t71 171t171 71q84 0 149 -51l48 48q25 25 43 17.5t18 -42.5v-214h-214q-35 0 -42.5 18t17.5 43l61 61 q-35 23 -80 23q-59 0 -102 -43t-43 -102z"}, {PackIconTypiconsKind.RefreshOutline, "M557 592q43 0 76 -33t34 -95v-206q0 -144 -98 -238.5t-236 -94.5t-235.5 97.5t-97.5 235.5t97.5 236t235.5 98q74 0 143 -32q39 32 81 32zM180 251q0 59 43 102t102 43q46 0 80 -22l-61 -59q-25 -25 -17 -41t43 -16h213v206q0 44 -26 44q-16 0 -35 -19l-48 -48 q-65 51 -149 51q-100 0 -171 -71q-70 -70 -70 -171t70 -171q71 -71 171 -71t171 71q20 20 33 40q15 23 1.5 49t-42.5 26q-26 0 -40 -22q-19 -29 -52.5 -48t-70.5 -19q-59 0 -102 43.5t-43 102.5zM222 251q0 -43 30 -73t73 -30q42 0 73 31q8 8 14.5 17.5t9.5 15.5l2 5h-54 q-65 0 -82 39q-16 38 27 81l10 5q-48 0 -73 -25q-30 -29 -30 -66z"}, {PackIconTypiconsKind.Rss, "M83 133q35 0 59.5 -24.5t24.5 -58.5t-24.5 -58.5t-59.5 -24.5t-59 24.5t-24 58.5t24 58.5t59 24.5zM83 633q158 0 292.5 -78t213 -212.5t78.5 -292.5q0 -34 -24.5 -58.5t-59.5 -24.5t-59 24.5t-24 58.5q0 172 -122 294.5t-295 122.5q-35 0 -59 24.5t-24 58.5t24 58.5 t59 24.5zM83 383q138 0 236 -97.5t98 -235.5q0 -34 -24.5 -58.5t-59.5 -24.5t-59 24.5t-24 58.5q0 69 -49 118t-118 49q-35 0 -59 24.5t-24 58.5t24 58.5t59 24.5z"}, {PackIconTypiconsKind.RssOutline, "M125 592q110 0 210.5 -43t173 -115.5t115.5 -173t43 -210.5q0 -52 -36.5 -88.5t-88.5 -36.5h-375q-69 0 -118 49t-49 118v375q0 52 36.5 88.5t88.5 36.5zM167 8q34 0 58.5 24.5t24.5 59.5q0 34 -24 58.5t-59 24.5t-59 -24.5t-24 -58.5q0 -35 24.5 -59.5t58.5 -24.5z M355 8q26 0 44 18.5t18 44.5q0 112 -79.5 191.5t-191.5 79.5q-26 0 -44 -18.5t-18 -44.5t18 -44t44 -18q60 0 103 -43t43 -103q0 -26 18.5 -44.5t44.5 -18.5zM521 8q26 0 44.5 18.5t18.5 44.5q0 118 -59 219t-159.5 159.5t-219.5 58.5q-26 0 -44 -18t-18 -44t18 -44.5 t44 -18.5q129 0 221 -91.5t92 -220.5q0 -26 18 -44.5t44 -18.5z"}, {PackIconTypiconsKind.Scissors, "M698 570q10 -12 0 -25t-24 -7q-37 17 -61 4q23 -34 23 -74q0 -55 -38.5 -93.5t-93.5 -38.5q-49 0 -87 33l-27 -49q45 -51 61 -72.5t52 -79.5l14 -22q48 -66 -33 -185l-1 -2q-7 -9 -18.5 -8.5t-16.5 10.5l-130 238l-130 -238q-6 -11 -18 -11q-10 0 -17 9q-3 4 -10 15 t-18 33.5t-17.5 45t-4.5 49t17 46.5q75 112 126 171l-27 50q-38 -33 -87 -33q-55 0 -93.5 38.5t-38.5 93.5t38.5 93.5t93.5 38.5q66 0 110 -59q16 -24 38 -69t38 -68q16 23 38 68t38 69l2 2q40 57 108 57h3l8 5q45 28 99 19.5t84 -54.5zM131 425q17 0 29 12.5t12 29.5 t-12 29t-29 12t-29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5zM318 284q9 0 15 6t6 14q0 9 -6 15t-15 6t-15 -6t-6 -15q0 -8 6 -14t15 -6zM506 425q17 0 29 12.5t12 29.5t-12 29t-29 12t-29.5 -12t-12.5 -29t12.5 -29.5t29.5 -12.5z"}, {PackIconTypiconsKind.ScissorsOutline, "M694 580q-29 0 -48 -11q-20 -10 -30 -16l-8 1q-59 0 -92 -50q-12 -18 -51 -85.5t-63 -95.5q-24 28 -64 96t-51 85q-33 50 -92 50q-46 0 -79 -33t-33 -79t33 -78.5t79 -32.5q58 0 91 48l69 -109q-32 -36 -65.5 -81t-51.5 -73l-17 -27q-18 -32 -11 -69t25 -66l18 -30 l148 272l148 -272q3 4 8 11.5t15.5 29t16.5 41t5.5 43t-12.5 40.5q-63 101 -134 181l69 109q33 -48 91 -48q46 0 78.5 32.5t32.5 78.5q0 44 -30 76q11 13 22 18q2 0 6 2.5t6 2.5l13 2h6q15 0 44 -12q-14 19 -18 22q-20 20 -63 27h-11zM608 398q-23 0 -36 19t-5 41l10 16 q13 13 31 13q19 0 32 -13t13 -31.5t-13 -31.5t-32 -13zM194 398q-18 0 -31 13t-13 31.5t13 31.5t31 13q19 0 32 -13l10 -16q8 -22 -5.5 -41t-36.5 -19zM401 241q-7 0 -11.5 5t-4.5 12q0 16 16 16q7 0 12 -4.5t5 -11.5t-5 -12t-12 -5zM694 664l19 -1q88 -10 138 -80 q18 -23 18.5 -50.5t-16.5 -50.5q-20 -26 -50 -32v-7q0 -80 -57.5 -137.5t-137.5 -57.5q-14 0 -38 4q50 -66 82 -117q25 -36 27.5 -79t-12.5 -82t-26.5 -60.5t-23.5 -38.5q-25 -34 -68 -34q-50 2 -73 43l-75 138l-74 -138q-23 -41 -74 -43q-42 0 -67 34q-12 17 -23.5 38.5 t-26.5 60.5t-12.5 82t27.5 79q38 59 81 117q-24 -4 -38 -4q-80 0 -137 57.5t-57 137.5t57 137t137 57q47 0 89 -21.5t70 -60.5q12 -17 48 -79q32 55 49 79q53 75 144 81l12 7q39 21 88 21z"}, {PackIconTypiconsKind.ShoppingBag, "M542 633q52 0 88.5 -36.5t36.5 -88.5v-458q0 -52 -36.5 -88.5t-88.5 -36.5h-417q-52 0 -88.5 36.5t-36.5 88.5v458q0 52 36.5 88.5t88.5 36.5h417zM583 50v303q-19 -11 -41 -11h-63q0 -60 -43 -103t-103 -43t-102.5 43t-42.5 103h-63q-23 0 -42 11v-303q0 -17 12.5 -29.5 t29.5 -12.5h417q17 0 29 12.5t12 29.5zM229 342q0 -43 30.5 -73.5t73.5 -30.5t74 30.5t31 73.5h-209zM583 425v83q0 17 -12 29.5t-29 12.5h-417q-17 0 -29.5 -12.5t-12.5 -29.5v-83q0 -17 12.5 -29.5t29.5 -12.5h417q17 0 29 12.5t12 29.5z"}, {PackIconTypiconsKind.ShoppingCart, "M760 592q18 0 31.5 -15t10.5 -33l-42 -292q-2 -15 -13.5 -25t-27.5 -10h-472l7 -42h423q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12h-458q-20 0 -37 23q0 2 -1.5 5.5t-2.5 5.5l-78 466h-58q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h93q15 0 27 -10t14 -25 l9 -48h575zM712 508h-160v-83h148zM510 508h-125v-83h125v83zM510 383h-125v-83h125v83zM344 508h-146l15 -84l6 1h125v83zM219 383l14 -83h111v83h-125zM552 300h131l11 83h-142v-83zM219 -12q0 62 62 62q63 0 63 -62q0 -63 -63 -63q-62 0 -62 63zM594 -12q0 62 62 62 q63 0 63 -62q0 -63 -63 -63q-62 0 -62 63z"}, {PackIconTypiconsKind.SocialAtCircular, "M368 488q77 0 130 -55t53 -133v-10q0 -31 -19 -52t-49 -21q-28 0 -50 25q-23 -25 -60 -25q-35 0 -59 24.5t-24 58.5q0 35 24 59t58 24q22 0 42 -12q5 12 17 12q16 0 16 -21v-72q0 -13 9 -22.5t22 -9.5t22 9.5t9 22.5v10q0 60 -40.5 103t-100.5 43q-59 0 -99.5 -42.5 t-40.5 -103.5q0 -60 43 -103t103 -43q44 0 82 25q10 7 20 1t11 -16.5t-9 -18.5q-49 -33 -106 -33q-77 0 -132.5 55.5t-55.5 132.5q0 78 53.5 133t130.5 55zM374 258q17 0 29 12.5t12 29.5t-12 29.5t-29 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5zM375 -75 q-155 0 -265 110t-110 265t110 265t265 110t265 -110t110 -265t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5z"}, {PackIconTypiconsKind.SocialDribbble, "M375 675q155 0 265 -110t110 -265t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM665 330q-11 106 -87 179q-65 -85 -154 -136l24 -54q107 29 217 11zM547 535q-78 57 -172 57q-43 0 -87 -13q66 -76 117 -169q85 49 142 125zM248 562q-62 -30 -104.5 -85.5 t-55.5 -123.5q148 -24 280 37q-51 94 -120 172zM83 300q0 -108 71 -190q95 140 254 197q-11 24 -22 47q-106 -50 -218 -50q-39 0 -84 8zM183 81q83 -73 192 -73q51 0 102 19q-10 120 -54 241q-150 -53 -240 -187zM517 45q65 36 105.5 101t43.5 142q-104 18 -203 -8 q42 -112 54 -235z"}, {PackIconTypiconsKind.SocialDribbbleCircular, "M375 -75q-155 0 -265 110t-110 265t110 265t265 110t265 -110t110 -265t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5zM375 529q95 0 162 -67.5t67 -161.5t-67 -161.5 t-162 -67.5t-162 67.5t-67 161.5t67 161.5t162 67.5zM562 304q-2 72 -51 125q-37 -50 -96 -86q15 -32 18 -41q64 14 129 2zM479 456q-48 32 -104 32q-17 0 -49 -8q40 -46 70 -100q48 28 83 76zM285 464q-73 -40 -92 -122q83 -16 166 19q-32 57 -74 103zM188 300 q0 -73 50 -126q59 81 155 116q-2 5 -4.5 10.5t-5.5 12t-5 10.5q-65 -28 -132 -28q-25 0 -58 5zM269 146q49 -34 106 -34q27 0 57 10q-4 62 -25 129q-87 -31 -138 -105zM472 140q70 43 87 122q-60 11 -112 1q19 -65 25 -123z"}, {PackIconTypiconsKind.SocialFacebook, "M250 383h125v-125h-125v-291h-125v291h-125v125h125v53q0 40 12.5 81t34.5 65q46 51 116 51h87v-125h-87q-16 0 -27 -10.5t-11 -26.5v-88z"}, {PackIconTypiconsKind.SocialFacebookCircular, "M640 566q110 -110 110 -266q0 -155 -110 -265t-265 -110q-156 0 -266 110q-109 109 -109 265q0 157 109 266q108 109 266 109q156 0 265 -109zM333 349q0 49 31 83.5t78 34.5h58v-84h-58q-10 0 -17.5 -7.5t-7.5 -17.5v-58h83v-83h-83v-206q93 12 164 83q86 86 86 206 q0 122 -86 207t-206 85q-122 0 -207 -85t-85 -207q0 -120 85 -206q71 -71 165 -83v206h-83v83h83v49z"}, {PackIconTypiconsKind.SocialFlickr, "M167 133q-69 0 -118 49t-49 118t49 118t118 49t117.5 -49t48.5 -118t-48.5 -118t-117.5 -49zM167 383q-35 0 -59.5 -24.5t-24.5 -58.5t24.5 -58.5t59.5 -24.5t59 24.5t24 58.5t-24 58.5t-59 24.5zM542 467q69 0 117.5 -49t48.5 -118t-48.5 -118t-117.5 -49t-118 49 t-49 118t49 118t118 49z"}, {PackIconTypiconsKind.SocialFlickrCircular, "M375 -75q-156 0 -266 110q-109 109 -109 265q0 157 109 266q108 109 266 109q156 0 265 -109q110 -110 110 -266q0 -155 -110 -265t-265 -110zM375 592q-122 0 -207 -85t-85 -207q0 -120 85 -206t207 -86q120 0 206 86t86 206q0 122 -86 207t-206 85zM250 196 q-43 0 -73.5 30.5t-30.5 73.5t30.5 73.5t73.5 30.5t73.5 -30.5t30.5 -73.5t-30.5 -73.5t-73.5 -30.5zM250 362q-26 0 -44 -18t-18 -44t18 -44t44 -18t44 18t18 44t-18 44t-44 18zM500 196q-43 0 -73.5 30.5t-30.5 73.5t30.5 73.5t73.5 30.5t73.5 -30.5t30.5 -73.5 t-30.5 -73.5t-73.5 -30.5z"}, {PackIconTypiconsKind.SocialGithub, "M351 202q0 22 11.5 39.5t30.5 17.5q18 0 29.5 -17.5t11.5 -39.5t-11.5 -39.5t-29.5 -17.5q-19 0 -30.5 17.5t-11.5 39.5zM536 408q47 -52 47 -123q0 -129 -78 -187q-52 -39 -130 -43l-29 -1l-23 -1h-31h-32l-23 1l-28 1q-100 5 -154.5 64.5t-54.5 165.5q0 71 47 123 q-4 3 0 50q5 52 20 89q58 -6 145 -66q30 8 80 8q51 0 80 -8q37 26 75 43q37 17 53 20l16 3q16 -40 21 -89q4 -46 -1 -50zM293 82q106 0 159 25q54 25 54 104q0 34 -22 63t-54 34q-14 2 -75 -1t-62 -3q-17 0 -49.5 2t-52 2.5t-42.5 -4.5t-37 -17q-33 -30 -33 -76 q0 -79 53 -104q51 -25 158 -25h3zM192 259q18 0 29 -17.5t11 -39.5t-11 -39.5t-29 -17.5q-19 0 -31 17.5t-12 39.5t12 39.5t31 17.5v0z"}, {PackIconTypiconsKind.SocialGithubCircular, "M375 -75q-155 0 -265 110t-110 265t110 265t265 110t265 -110t110 -265t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5zM413 237q0 14 7.5 25.5t19.5 11.5q11 0 18.5 -11.5 t7.5 -25.5t-7 -25t-19 -11t-19.5 11t-7.5 25zM532 369q30 -33 30 -79q0 -69 -34.5 -107t-99.5 -41h-18l-15 -1h-20h-20l-15 1h-18q-65 3 -99.5 41.5t-34.5 106.5q0 46 30 79q-4 2 -1 33q3 30 14 57q40 -5 93 -42q20 5 51 5q33 0 51 -5q50 35 83 40l10 2q11 -27 14 -57 q3 -31 -1 -33zM376 160q69 0 102 16q35 17 35 67q0 22 -14 40t-35 22q-9 1 -47.5 -1t-40.5 -2q-8 0 -36 2l-32 2q-32 1 -51 -16.5t-19 -46.5q0 -51 34 -67q33 -16 102 -16h2zM311 274q11 0 18.5 -11.5t7.5 -25.5t-7.5 -25t-18.5 -11q-12 0 -19.5 11t-7.5 25t7.5 25.5 t19.5 11.5v0z"}, {PackIconTypiconsKind.SocialGooglePlus, "M321 238q21 -18 28 -25t20.5 -22.5t18 -31t4.5 -34.5q0 -61 -58.5 -107.5t-158.5 -46.5q-84 0 -129.5 33.5t-45.5 83.5q0 64 62 100q47 25 159 37q-25 25 -25 54q0 13 8 29h-25q-62 0 -99.5 40t-37.5 90q0 64 50 108q56 46 146 46h170l-50 -30h-50q59 -48 59 -112 q0 -29 -12 -53t-24.5 -35.5t-34.5 -28.5q-25 -25 -25 -41q0 -13 21 -34zM217 329q13 0 29 8.5t25 20.5q21 17 21 59q0 51 -29 100.5t-75 49.5q-16 0 -33 -8t-26 -21q-17 -30 -17 -63q0 -49 28.5 -97.5t76.5 -48.5zM217 0q57 0 89 24.5t32 63.5q0 29 -17.5 49t-70.5 59h-21 q-51 0 -87 -13q-23 -5 -47 -25t-24 -58q0 -44 40.5 -72t105.5 -28zM492 300h-84v42h84v79l41 4v-83h84v-42h-84v-83h-41v83z"}, {PackIconTypiconsKind.SocialGooglePlusCircular, "M408 254q3 -3 9 -8.5t8.5 -8.5t7.5 -8.5t7.5 -9t5 -9t3.5 -11t1 -11.5q0 -37 -35 -64.5t-94 -27.5q-51 0 -77.5 20.5t-26.5 50.5q0 36 37 58q41 21 96 21q-17 17 -17 33q0 12 5 17h-17q-38 0 -60.5 24t-22.5 55q0 40 33 67q35 25 87 25h100l-29 -17h-29q33 -33 33 -67 q0 -18 -6.5 -32t-13.5 -21t-21 -18l-13 -24q0 -8 13 -21zM342 308q20 0 33 13t13 37q0 33 -17 62.5t-46 29.5q-16 0 -33 -17q-6 -6 -13 -37q0 -30 17 -59t46 -29zM346 112q34 0 52.5 14t18.5 36q0 18 -12.5 32.5t-42.5 34.5h-12q-29 0 -50 -8l-4 -2l-6 -3t-6.5 -4t-7.5 -5.5 t-6.5 -6.5t-6 -8t-4 -9.5t-1.5 -11.5q0 -25 24 -42t64 -17zM500 300h-42v42h42v41h42v-41h41v-42h-41v-42h-42v42zM375 -75q-156 0 -265.5 109.5t-109.5 265.5t109.5 265.5t265.5 109.5t265.5 -109.5t109.5 -265.5t-109.5 -265.5t-265.5 -109.5zM375 592q-121 0 -206.5 -85 t-85.5 -207t85.5 -207t206.5 -85t206.5 85t85.5 207t-85.5 207t-206.5 85z"}, {PackIconTypiconsKind.SocialInstagram, "M625 675q53 0 89 -36t36 -89v-500q0 -53 -36 -89t-89 -36h-500q-53 0 -89 36t-36 89v500q0 53 36 89t89 36h500zM375 425q-53 0 -89 -36t-36 -89t36 -89t89 -36t89 36t36 89t-36 89t-89 36zM533 508q0 -22 14 -36t36 -14q21 0 35.5 15.5t14.5 34.5t-15.5 34.5t-34.5 15.5 t-34.5 -14.5t-15.5 -35.5zM625 8q19 0 30.5 11.5t11.5 30.5v250h-84q0 -88 -60 -148t-148 -60t-148 60t-60 148h-84v-250q0 -19 11.5 -30.5t30.5 -11.5h500z"}, {PackIconTypiconsKind.SocialInstagramCircular, "M375 675q156 0 265.5 -109.5t109.5 -265.5t-109.5 -265.5t-265.5 -109.5t-265.5 109.5t-109.5 265.5t109.5 265.5t265.5 109.5zM375 383q-35 0 -59 -24.5t-24 -58.5t24 -58.5t59 -24.5t59 24.5t24 58.5t-24 58.5t-59 24.5zM492 467q0 -22 14 -36t36 -14q21 0 35.5 15.5 t14.5 34.5t-15.5 34.5t-34.5 15.5t-34.5 -14.5t-15.5 -35.5zM375 8q121 0 206.5 85t85.5 207h-125q0 -69 -49 -118t-118 -49t-118 49t-49 118h-125q0 -122 85.5 -207t206.5 -85z"}, {PackIconTypiconsKind.SocialLastFm, "M477 126q148 0 148 99q0 81 -94 103l-47 10q-39 10 -39 42q0 37 49 37q54 0 57 -42l72 8q-7 91 -124 91q-126 0 -126 -104q0 -74 82 -94l49 -9q50 -12 50 -45q0 -39 -77 -39q-94 0 -124 91l-24 72q-22 71 -56 100q-32 28 -105 28q-67 0 -117 -49q-51 -49 -51 -131 q0 -77 48 -122q47 -46 115 -46q66 0 106 32l-22 62q-35 -35 -81 -35q-42 0 -69.5 32.5t-27.5 78.5q0 62 31 90q32 29 70 29q42 0 61 -22q17 -22 33 -70l23 -71q39 -126 190 -126v0z"}, {PackIconTypiconsKind.SocialLastFmCircular, "M375 -75q-156 0 -266 110q-109 109 -109 265q0 157 109 266q108 109 266 109q156 0 265 -109q110 -110 110 -266q0 -155 -110 -265t-265 -110zM375 592q-122 0 -207 -85t-85 -207q0 -120 85 -206t207 -86q120 0 206 86t86 206q0 122 -86 207t-206 85zM467 203q83 0 83 55 q0 47 -53 59l-26 5q-22 6 -22 24q0 21 27 21q30 0 32 -24l41 4q-5 52 -70 52q-71 0 -71 -59q0 -43 46 -53l28 -5q28 -8 28 -25q0 -22 -43 -22q-53 0 -70 51l-14 40q-12 40 -30 56.5t-60 16.5q-40 0 -67 -30t-27 -72q0 -40 26 -67t65 -27q38 0 60 18l-12 35q-20 -20 -46 -20 q-24 0 -39.5 18.5t-15.5 44.5q0 30 15 48t42 18q17 0 27.5 -7.5t15 -16t10.5 -27.5l13 -40q23 -71 107 -71v0z"}, {PackIconTypiconsKind.SocialLinkedin, "M127 8h-125v417h125v-417zM442 412q70 0 106.5 -45t36.5 -123v-236h-125v223q0 87 -61 87q-49 0 -64 -49v-261h-125q2 375 0 417h99l8 -83h2q43 70 123 70zM0 529q0 63 65 63q64 0 64 -63q0 -62 -64 -62q-65 0 -65 62z"}, {PackIconTypiconsKind.SocialLinkedinCircular, "M293 162h-67v217h67v-217zM224 440q0 14 10.5 24t25.5 10q36 0 36 -34q0 -33 -36 -33t-36 33zM462 385q38 0 58 -26t20 -69v-128h-68v121q0 48 -33 48q-17 0 -27.5 -11.5t-10.5 -31.5v-126h-68v148q0 56 -1 69h58l4 -29q23 35 68 35zM375 -75q-155 0 -265 110t-110 265 t110 265t265 110t265 -110t110 -265t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5z"}, {PackIconTypiconsKind.SocialPinterest, "M265 601q103 0 169 -63t66 -149q0 -111 -56 -183t-144 -72q-29 0 -55 14t-36 33q-21 -86 -26 -102q-16 -58 -67 -122q-6 -6 -8 2q-12 85 1 141l47 203q-12 23 -12 58q0 41 21 68.5t51 27.5q24 0 37 -15.5t13 -39.5q0 -15 -5.5 -36.5t-14.5 -50t-13 -45.5q-7 -29 11 -50.5 t48 -21.5q51 0 84 58t33 140q0 63 -40.5 102.5t-113.5 39.5q-82 0 -132.5 -52.5t-50.5 -125.5q0 -43 25 -73q8 -10 5 -20l-7 -30q-4 -16 -19 -9q-76 31 -76 141q0 88 71 160t194 72z"}, {PackIconTypiconsKind.SocialPinterestCircular, "M375 -75q-155 0 -265 110t-110 265t110 265t265 110t265 -110t110 -265t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5zM389 467q60 0 98.5 -37t38.5 -87q0 -64 -32.5 -106.5 t-84.5 -42.5q-17 0 -32 8t-21 19q-1 1 -1.5 -2t-1.5 -9.5t-3 -15.5t-5.5 -21.5t-9 -25t-14 -27.5t-19.5 -29q-2 -2 -3.5 -1.5t-1.5 2.5q-9 38 1 83l27 117q-7 15 -7 35q0 24 12.5 40t29.5 16q29 0 29 -33q0 -12 -8.5 -41t-10.5 -36q-4 -17 6.5 -29t27.5 -12q30 0 49.5 33.5 t19.5 81.5q0 36 -24 59.5t-66 23.5q-48 0 -77.5 -30.5t-29.5 -73.5q0 -25 15 -42q4 -5 3 -12l-5 -18q-2 -8 -10 -5q-45 18 -45 83q0 51 41.5 93t113.5 42z"}, {PackIconTypiconsKind.SocialSkype, "M736 245q14 -42 14 -83q0 -103 -71 -176q-72 -74 -173 -74q-46 0 -90 18q-15 -2 -37 -2q-150 0 -257 108q-106 109 -106 261q0 23 3 45q-19 44 -19 98q0 102 70 174q72 74 174 74q54 0 101 -22q11 1 34 1q150 0 256 -109q105 -110 105 -261q0 -16 -4 -52zM378 101 q71 0 116.5 31.5t45.5 91.5q0 55 -42 85q-25 15 -48 23q-5 1 -83 21l-17 4q-28 9 -38 23q-7 7 -7 16q0 18 20.5 29t45.5 11q53 0 71 -43q8 -13 10.5 -17t11 -9t19.5 -5q16 0 28 12.5t12 28.5q0 32 -35 63q-42 33 -112 33q-66 0 -110 -27.5t-44 -82.5q0 -34 18.5 -58 t46.5 -35q32 -14 74 -23q13 -3 18 -4l19 -5l14 -3q40 -15 40 -45q0 -24 -23 -37t-54 -13q-45 0 -63 25q-13 25 -17 29q-11 34 -41 34q-17 0 -28.5 -11t-11.5 -27q0 -28 19 -53.5t44 -39.5q42 -22 101 -22z"}, {PackIconTypiconsKind.SocialSkypeOutline, "M506 -17q66 0 113.5 49.5t47.5 116.5q0 36 -17 75q6 31 6 61q0 119 -81 203q-80 83 -196 83q-25 0 -48 -5q-40 26 -87 26q-67 0 -114 -48.5t-47 -116.5q0 -47 23 -85q-6 -30 -6 -57q0 -118 82 -203q81 -84 197 -84q14 0 51 5q34 -20 76 -20zM214 204q0 16 11.5 27 t28.5 11q29 0 41 -35q4 -4 17 -29q18 -25 63 -25q31 0 54 13t23 38q0 29 -40 44l-14 3l-19 5q-16 5 -18 5q-42 9 -74 23q-27 11 -46 34.5t-19 57.5q0 55 44 82.5t110 27.5q70 0 112 -33q35 -33 35 -63q0 -16 -12 -28.5t-28 -12.5q-11 0 -19 5t-11.5 9.5t-10.5 16.5 q-18 43 -71 43q-26 0 -46 -10.5t-20 -28.5q0 -16 12 -24.5t33 -15.5l17 -4q78 -19 83 -21q60 -21 80 -57q10 -21 10 -51q0 -60 -45.5 -91.5t-116.5 -31.5q-104 0 -146 64q-18 28 -18 52zM244 675q54 0 101 -22q22 2 34 2q150 0 256 -109q105 -110 105 -261q0 -16 -4 -52 q14 -42 14 -84q0 -102 -71 -175q-72 -74 -173 -74q-49 0 -90 17q-15 -2 -37 -2q-150 0 -257 109q-106 109 -106 261q0 21 3 44q-19 44 -19 98q0 102 70 174q72 74 174 74z"}, {PackIconTypiconsKind.SocialTumbler, "M330 53v86q-41 -28 -81 -28q-17 0 -36 9.5t-22 23.5q-8 14 -8 61v137h125v83h-125v140h-74q-10 -52 -19 -73t-36 -43q-27 -23 -54 -31v-76h58v-189q0 -60 37 -93q15 -15 47 -28q38 -9 65 -9q68 0 123 30v0z"}, {PackIconTypiconsKind.SocialTumblerCircular, "M474 150v52q-26 -17 -49 -17q-10 0 -21.5 6t-12.5 14q-4 8 -4 36v82h76v51h-76v82h-45q-6 -31 -11.5 -43.5t-21.5 -25.5q-17 -13 -32 -19v-45h35v-113q0 -53 50 -72q22 -6 38 -6q40 0 74 18v0zM375 -75q-155 0 -265 110t-110 265t110 265t265 110t265 -110t110 -265 t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5z"}, {PackIconTypiconsKind.SocialTwitter, "M365 451q0 64 45.5 108.5t109.5 44.5q68 0 111 -47q48 10 98 36q-16 -54 -67 -85q43 6 88 25q-31 -47 -77 -81v-19q0 -109 -48 -204q-48 -97 -152 -165t-237 -68q-130 0 -236 69q16 -2 38 -2q107 0 190 65q-52 1 -90.5 32t-52.5 76q10 -4 28 -4t40 5q-52 11 -87 53 t-35 100q29 -16 69 -19q-69 48 -69 129q0 38 21 76q126 -153 318 -159q-5 17 -5 34z"}, {PackIconTypiconsKind.SocialTwitterCircular, "M380 346q0 28 20 48t49 20t49 -21q22 5 43 16q-8 -24 -29 -37q24 3 39 11q-13 -19 -35 -36v-9q0 -106 -89 -164q-45 -30 -105 -30q-57 0 -105 31q3 -1 17 -1q47 0 85 29q-23 1 -40.5 14.5t-23.5 33.5q4 -2 12 -2q12 0 18 2q-23 5 -38.5 23.5t-15.5 44.5q11 -6 31 -8 q-31 22 -31 57q0 16 10 34q55 -68 141 -71q-2 8 -2 15zM375 -75q-156 0 -266 110q-109 109 -109 265q0 157 109 266q108 109 266 109q156 0 265 -109q110 -110 110 -266q0 -155 -110 -265t-265 -110zM375 592q-122 0 -207 -85t-85 -207q0 -120 85 -206t207 -86q120 0 206 86 t86 206q0 122 -86 207t-206 85z"}, {PackIconTypiconsKind.SocialVimeo, "M580 434q-21 -122 -110 -228q-88 -105 -160 -154q-42 -21 -74 -1q-31 19 -49 55q-10 19 -49.5 154.5t-47.5 145.5q-7 13 -32.5 1t-34.5 -21l-23 30l26 31q31 33 73 65.5t75 39.5q44 9 65 -43q13 -30 25 -108q2 -15 11 -51q29 -121 46 -121q25 0 82 108q26 49 3 81t-72 1 q8 50 43 85q65 69 141 51q80 -15 62 -121z"}, {PackIconTypiconsKind.SocialVimeoCircular, "M394 343q5 29 30.5 52.5t53.5 23.5q62 0 50 -67q-10 -63 -60 -124q-46 -55 -86 -83q-12 -6 -23 -6q-27 0 -44 35q-4 8 -26.5 83t-25.5 79q-2 4 -6 4q-20 -4 -31 -15l-12 17l14 17q47 52 88 57q14 0 23 -13.5t12 -29.5t6 -37.5t5 -29.5q15 -65 26 -65q14 0 44 58 q10 17 6 35t-21 18q-7 0 -23 -9zM375 -75q-155 0 -265 110t-110 265t110 265t265 110t265 -110t110 -265t-110 -265t-265 -110zM375 592q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5t-85.5 206.5t-206.5 85.5z"}, {PackIconTypiconsKind.SocialYoutube, "M908 442q9 -70 9 -142t-9 -142q-7 -55 -15.5 -84t-25.5 -41q-30 -25 -409 -25q-378 0 -408 25q-28 19 -42 125q-8 62 -8 142t8 142q14 106 42 125q30 25 408 25q379 0 409 -25q17 -12 25.5 -41t15.5 -84zM375 150l250 150l-250 150v-300z"}, {PackIconTypiconsKind.SocialYoutubeCircular, "M188 252v26h90v-26h-30v-150h-30v150h-30zM342 133v99h26v-130h-26v14q-8 -9 -19 -13.5t-20 0.5t-9 20v109h26v-100q2 -11 9 -8.5t13 9.5zM438 233q24 0 24 -32v-72q0 -13 -6.5 -21t-17.5 -8q-7 0 -13.5 3t-8.5 6l-3 3v-10h-26v176h26v-56q10 11 25 11zM435 132v68 q0 11 -8 13t-14 -5v-81q4 -4 9 -5.5t9 1t4 9.5zM519 235q16 0 26.5 -10.5t10.5 -27.5v-33h-50v-25q0 -11 6 -15.5t12.5 0.5t6.5 15v6h25v-6q0 -25 -19 -35t-38 0t-19 35v58q0 17 11 27.5t28 10.5zM506 197v-13h25v13q0 15 -13 15q-12 0 -12 -15zM375 675q155 0 265 -110 t110 -265t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM463 386q16 0 32 14v-12h33v147h-33v-110q-9 -9 -16 -9q-5 0 -5 7v112h-33v-122q0 -27 22 -27zM335 496v-71q0 -17 12 -29.5t29 -12.5t29.5 12.5t12.5 29.5v71q0 17 -12.5 29.5t-29.5 12.5t-29 -12.5 t-12 -29.5zM248 585h-38l40 -115v-82h37v82l39 115h-38l-20 -73zM577 63q10 9 15.5 40.5t5.5 58.5l1 26q0 104 -22 126q-10 9 -60 14.5t-95 5.5l-46 1q-180 0 -201 -21q-9 -9 -14.5 -40.5t-6.5 -58.5l-1 -27q0 -103 22 -125q10 -9 60 -14.5t95 -6.5h46q180 0 201 21z M375 410q-10 0 -10 11v79q0 10 11 10q10 0 10 -10v-79q0 -11 -11 -11z"}, {PackIconTypiconsKind.SortAlphabetically, "M412 110q10 -20 -1.5 -40t-35.5 -20q-26 0 -37 23l-30 60h-199l-30 -60q-7 -16 -23.5 -21.5t-32.5 2.5q-16 7 -21.5 23.5t2.5 32.5l167 334q11 21 38 21t37 -21zM151 217h115l-58 115zM875 50h-250q-24 0 -36.5 22t3.5 45l200 266h-167q-17 0 -29.5 12.5t-12.5 29.5 t12.5 29.5t29.5 12.5h250q24 0 36.5 -22.5t-3.5 -44.5l-200 -267h167q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5zM542 217h-84q-17 0 -29 12t-12 29t12 29.5t29 12.5h84q17 0 29 -12.5t12 -29.5t-12 -29t-29 -12z"}, {PackIconTypiconsKind.SortAlphabeticallyOutline, "M234 217l58 115l57 -115h-115zM542 -1q-36 -32 -84 -32q-36 0 -65.5 18.5t-45.5 50.5l-8 14h-95l-7 -14q-16 -32 -46 -50.5t-66 -18.5q-44 0 -75.5 24t-43.5 61q-17 49 7 96l167 333q16 31 46 49t66 18t66 -18t46 -49l75 -151q21 12 42 12h11q-32 35 -32 83 q0 52 36.5 88.5t88.5 36.5h250q36 0 66 -18.5t46 -50.5q34 -70 -12 -131l-100 -133q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-250q-48 0 -83 32zM458 50q24 0 36 20t2 40l-167 334q-11 21 -37 21t-37 -21l-167 -334q-10 -20 1.5 -40t35.5 -20q26 0 37 23l31 60 h198l30 -60q11 -23 37 -23zM521 217h42q17 0 29 12t12 29t-12 29.5t-29 12.5h-42q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12zM875 50q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12h-167l200 267q16 22 3.5 44.5t-36.5 22.5h-250q-17 0 -29.5 -12.5t-12.5 -29.5 t12.5 -29.5t29.5 -12.5h167l-200 -266q-16 -23 -3.5 -45t36.5 -22h250z"}, {PackIconTypiconsKind.SortNumerically, "M125 50q-17 0 -29.5 12.5t-12.5 29.5v266l-23 -12q-16 -8 -32.5 -2.5t-23.5 21.5q-8 16 -2.5 32.5t21.5 23.5l83 41q22 11 41.5 -2.5t19.5 -34.5v-333q0 -17 -12.5 -29.5t-29.5 -12.5zM500 50h-208q-26 0 -38 25.5t8 45.5l167 167q16 16 16 39q0 24 -16 40t-39.5 16 t-39.5 -16q-17 -15 -17 -40q0 -17 -12 -29t-29 -12t-29.5 12t-12.5 29q0 58 41 99q40 40 98.5 40t98.5 -40q41 -41 41 -99q0 -57 -41 -98l-96 -96h108q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5zM831 284q44 -41 44 -99q0 -56 -39.5 -95.5t-95.5 -39.5t-96 39.5 t-40 95.5q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5q0 -22 15 -37t37 -15t37 15t15 37t-15 37.5t-37 15.5q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5q13 0 22 9t9 22t-9 22t-22 9q-20 0 -28 -17q-8 -15 -24.5 -20t-31.5 3t-20.5 24.5t2.5 31.5q33 62 102 62 q47 0 80.5 -34t33.5 -81q0 -37 -23 -68z"}, {PackIconTypiconsKind.SortNumericallyOutline, "M183 550q37 0 67.5 -19t46.5 -46q66 64 157 64q94 0 158 -64l2 -3q59 68 149 68q82 0 140 -58t58 -140q0 -30 -9 -58q30 -52 30 -109q0 -91 -64 -154.5t-155 -63.5q-62 0 -114 33q-36 -33 -84 -33h-208q-49 0 -84 32q-35 -32 -83 -32q-52 0 -88.5 36.5t-36.5 88.5v194 q-36 20 -52 53q-23 47 -6.5 95.5t61.5 71.5l58 31q25 13 57 13zM232 425q0 16 -15.5 29t-33.5 13q-9 0 -19 -5l-57 -30q-16 -7 -21.5 -23.5t2.5 -32.5q11 -23 41 -23q9 0 19 5v-266q0 -17 12.5 -29.5t29.5 -12.5t29.5 12.5t12.5 29.5v333zM454 383q23 0 39.5 -16.5 t16.5 -39.5t-16 -39l-167 -167q-20 -20 -8 -45.5t38 -25.5h208q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12h-108l96 96q41 41 41 98q0 58 -41 99q-39 39 -99 39q-59 0 -98 -39q-41 -41 -41 -99q0 -17 12.5 -29t29.5 -12t29 12t12 29q0 23 16.5 39.5t39.5 16.5zM763 50 q56 0 95.5 39.5t39.5 95.5q0 59 -43 99q23 31 23 68q0 47 -34 81t-81 34q-69 0 -102 -62q-10 -20 1.5 -40.5t35.5 -20.5q26 0 37 22q9 17 28 17q13 0 22 -9t9 -22t-9 -22t-22 -9q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12q22 0 37 -15.5t15 -37.5t-15 -37t-37 -15 t-37 15t-15 37q0 17 -12.5 29.5t-29.5 12.5t-29 -12.5t-12 -29.5q0 -56 39.5 -95.5t95.5 -39.5z"}, {PackIconTypiconsKind.Spanner, "M643 518q24 -7 24 -72q0 -86 -61.5 -147t-147.5 -61q-22 0 -42 4q-25 -31 -72 -93t-87 -109q-44 -52 -111 -52q-60 0 -103 42.5t-43 102.5q0 67 51 112q47 40 110 86.5t94 72.5q-5 25 -5 42q0 86 61 147t147 61q31 0 62 -10q11 -3 14.5 -14.5t-5.5 -20.5l-111 -108 l16 -79l80 -16l109 106q9 9 20 6zM146 92q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12z"}, {PackIconTypiconsKind.SpannerOutline, "M167 133q0 42 41 42q42 0 42 -42q0 -41 -42 -41q-41 0 -41 41zM739 606q53 -73 53 -160q0 -112 -80 -192q-79 -79 -191 -79l-16 1q-110 -144 -138 -177q-61 -74 -159 -74q-86 0 -147 61t-61 147q0 94 74 159q86 73 177 138l-1 16q0 112 79 191q80 80 192 80q87 0 160 -53 q12 -12 12 -29t-12 -29q12 12 29 12t29 -12zM83 133q0 -51 37 -88t88 -37q58 0 95 45q41 47 96 121q52 69 72 92q29 -8 50 -8q77 0 132 55.5t55 132.5q0 22 -8 52l-117 -115l-104 21l-21 104l119 116q-30 9 -56 9q-77 0 -132.5 -55t-55.5 -132q0 -21 8 -50q-27 -22 -93 -72 q-60 -45 -120 -95q-45 -39 -45 -96zM683 539q-23 40 -66 66l-113 -111l11 -54l55 -12z"}, {PackIconTypiconsKind.Spiral, "M379 308q29 15 26.5 47t-26.5 53q-35 27 -77.5 16.5t-64.5 -49.5q-28 -52 -14 -98t59 -77t97 -29q82 6 127.5 75.5t26.5 149.5q-21 92 -105.5 135.5t-173.5 14.5q-80 -24 -126.5 -98t-40.5 -160q9 -93 73.5 -161.5t155.5 -84.5q88 -16 170.5 21t129.5 112q50 79 50 158 q0 16 14 28.5t32 9.5q23 0 32 -18.5t6 -40.5q-13 -148 -126 -253t-262 -105q-72 0 -139 29t-114.5 77.5t-78 112t-30.5 133t29 140.5q38 82 113 133t156 60t160.5 -27t124.5 -116q47 -77 37.5 -170.5t-74.5 -158.5q-63 -63 -154 -72t-167 43q-71 51 -86 139t40 161 q35 47 92.5 64.5t113.5 -2t86 -71.5q17 -29 17.5 -66.5t-13 -69.5t-43 -52t-66.5 -16q-52 0 -83.5 44t-3.5 89q20 27 51 23.5t45 -27.5q4 -15 5 -26.5t0 -15.5z"}, {PackIconTypiconsKind.Star, "M238 418l91 202q5 12 19 12t19 -12l91 -202q131 -14 219 -24q12 -2 17 -14t-5 -22l-163 -149l44 -216q2 -12 -8 -20.5t-22 -1.5l-192 109q-115 -65 -192 -109q-12 -7 -22.5 1.5t-8.5 20.5l45 216q-98 89 -163 149q-10 9 -5 21.5t17 14.5z"}, {PackIconTypiconsKind.Starburst, "M690 379l92 -62q10 -7 10 -17t-10 -17l-92 -62l49 -99q6 -11 -0.5 -20t-16.5 -10l-111 -8l-7 -110q-1 -10 -10 -16.5t-20 -1.5l-99 50l-62 -93q-6 -9 -17 -9t-17 9l-62 93l-99 -50q-11 -5 -20 1.5t-10 16.5l-8 111l-110 7q-10 1 -17 10.5t-1 19.5l50 99l-93 62 q-9 6 -9 17t9 17l93 62l-50 99q-6 10 1 19.5t17 10.5l110 7l8 111q1 10 10 16.5t20 0.5l99 -49l62 93q6 9 17 9t17 -9l62 -93l99 49q11 6 20 -0.5t10 -16.5l7 -111l111 -7q10 -1 16.5 -10t0.5 -20z"}, {PackIconTypiconsKind.StarburstOutline, "M815 335q18 -12 18 -35t-18 -35l-77 -51l41 -83q11 -21 -2 -39.5t-33 -20.5l-92 -6l-6 -93q-2 -20 -20 -32.5t-40 -1.5l-83 41l-52 -77q-13 -19 -34 -19q-22 0 -35 19l-51 77l-83 -41q-21 -11 -39.5 1.5t-20.5 32.5l-6 93l-93 6q-20 2 -32.5 20t-1.5 40l41 83l-77 51 q-19 13 -19 35t19 35l77 51l-41 83q-11 22 1.5 40t32.5 20l93 6l6 92q2 20 20.5 33t39.5 2l83 -41l51 77q11 17 34.5 17t34.5 -17l52 -77l83 41q21 11 40 -2t20 -33l6 -92l92 -6q20 -2 33 -20t2 -40l-41 -83zM647 210q-7 14 -3 29t17 24l56 37l-56 37q-29 21 -14 53l30 60 l-67 4q-16 1 -27 12t-12 27l-4 67l-60 -30q-32 -15 -53 14l-37 56l-37 -56q-21 -29 -53 -14l-60 30l-4 -67q-1 -16 -12 -27t-27 -12l-67 -4l30 -60q7 -14 2.5 -29t-17.5 -24l-55 -37l55 -37q13 -9 17.5 -24t-2.5 -29l-30 -60l67 -4q16 -1 26.5 -12t11.5 -27l5 -67l60 30 q8 4 18 4q23 0 35 -18l37 -56l37 55q9 13 24 17.5t29 -2.5l60 -30l4 67q1 16 12 27t27 12l66 4z"}, {PackIconTypiconsKind.StarFullOutline, "M18 329q-23 23 -16 67q6 16 20 27.5t30 14.5h4l196 20l79 180l4 4q19 33 54 33q17 0 30 -10.5t16 -31.5l4 -4l79 -179l196 -21h4q34 -6 49.5 -40t-11.5 -64q-12 -11 -26 -23.5t-31.5 -28t-26.5 -23.5q-52 -52 -66 -62l41 -192q7 -45 -25 -63q-25 -18 -62 -4l-4 4l-171 96 l-171 -96l-4 -4q-8 -4 -25 -4q-20 0 -33 13q-32 18 -25 62l41 192z"}, {PackIconTypiconsKind.StarHalf, "M327 621q12 12 21 12v-554q-117 -66 -192 -108q-14 -7 -25 4q-8 4 -8 21l45 216q-95 92 -162 150q-10 10 -4 21q0 3 5 8t11 5l217 25q54 121 92 200z"}, {PackIconTypiconsKind.StarHalfOutline, "M18 329q-23 23 -16 67q6 16 20 27.5t30 14.5h4l196 20l79 180l4 4q19 33 54 33q17 0 30 -10.5t16 -31.5l4 -4l79 -179l196 -21h4q34 -6 49.5 -40t-11.5 -64q-12 -11 -26 -23.5t-31.5 -28t-26.5 -23.5q-52 -52 -66 -62l41 -192q7 -45 -25 -63q-25 -18 -62 -4l-4 4l-171 96 l-171 -96l-4 -4q-8 -4 -25 -4q-20 0 -33 13q-32 18 -25 62l41 192zM389 121q12 0 21 -9l150 -87q-5 34 -13.5 75.5t-14 67t-5.5 28.5q-7 29 12 42l129 116l-175 21q-28 9 -33 25l-71 158v-437z"}, {PackIconTypiconsKind.StarOutline, "M592 -74q-11 0 -31 9l-171 97l-172 -97q-38 -18 -67 3q-33 23 -25 63l40 194q-24 22 -73 66t-73 66q-28 30 -17 66q12 36 53 43l195 21l82 180q21 37 57 37q37 0 57 -37l81 -180l196 -22q40 -6 52 -42q12 -37 -17 -66l-146 -133l40 -193q5 -28 -13 -51.5t-48 -23.5z M252 200q-1 -3 -6 -28.5t-13.5 -67.5t-15.5 -74l152 86q21 11 41 0l152 -86l-35 171q-5 23 13 39l129 118l-174 19q-24 3 -33 24l-72 159l-72 -159q-10 -21 -34 -24l-173 -19l129 -118q17 -15 12 -40z"}, {PackIconTypiconsKind.Stopwatch, "M684 429q66 -94 66 -212q0 -155 -110 -265t-265 -110t-265 110t-110 265q0 144 96 250.5t238 121.5l-1 3v41h-41q-17 0 -29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5h166q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-41v-41l-1 -3q125 -14 216 -100l5 7l21 21 q12 12 29.5 12t29.5 -12t12 -29.5t-12 -29.5l-21 -21q-4 -4 -12 -8zM375 -75q121 0 206.5 85.5t85.5 206.5t-85.5 206t-206.5 85t-206.5 -85t-85.5 -206t85.5 -206.5t206.5 -85.5zM417 258h83q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5h-125q-17 0 -29.5 12.5 t-12.5 29.5v125q0 17 12.5 29t29.5 12t29.5 -12t12.5 -29v-84zM375 467q103 0 176.5 -73.5t73.5 -176.5t-73.5 -176.5t-176.5 -73.5t-176.5 73.5t-73.5 176.5t73.5 176.5t176.5 73.5zM375 8q86 0 147 61.5t61 147.5t-61 147t-147 61t-147 -61t-61 -147t61 -147.5t147 -61.5z "}, {PackIconTypiconsKind.Support, "M354 654q146 0 250 -104t104 -250t-104 -250t-250 -104t-250 104t-104 250t104 250t250 104zM625 300q0 65 -30 123l-80 -80q6 -21 6 -43t-6 -43l80 -80q30 58 30 123zM83 300q0 -65 30 -123l81 81q-6 21 -6 42q0 22 6 43l-81 80q-30 -58 -30 -123zM211 384q22 37 59 59 l-74 74l-59 -59zM270 157q-36 20 -59 59l-74 -74l59 -59zM295 241q24 -24 59.5 -24t58.5 24q25 25 25 59t-24.5 58.5t-59.5 24.5q-34 0 -58.5 -24.5t-24.5 -58.5q0 -35 24 -59zM571 458l-59 59l-74 -74q37 -22 59 -59zM497 216q-23 -39 -59 -59l74 -74l59 59zM477 541 q-58 30 -123 30t-123 -30l81 -81q24 7 42 7t43 -7zM231 59q58 -30 123 -30t123 30l-80 81q-25 -7 -43 -7t-42 7z"}, {PackIconTypiconsKind.TabsOutline, "M625 633q35 0 59 -24.5t24 -58.5v-417q0 -35 -24 -59t-59 -24h-83v-42q0 -34 -24.5 -58.5t-59.5 -24.5h-375q-35 0 -59 24.5t-24 58.5v375q0 35 24.5 59.5t58.5 24.5h42v83q0 34 24.5 58.5t58.5 24.5h417zM83 8h375v354q0 8 -6 14.5t-14 6.5h-355v-375zM625 133v417h-417 v-125h230q25 0 43.5 -18.5t18.5 -44.5v-229h125z"}, {PackIconTypiconsKind.Tag, "M292 633q-87 0 -148 -61t-61 -147t61 -147l127 -124l229 -229l292 292q-295 295 -353 355q-61 61 -147 61zM292 717q121 0 207 -86q87 -90 352 -355q24 -25 24 -59t-24 -59l-292 -292q-24 -24 -59 -24t-59 24l-216 216q-7 5 -15 12l-125 125q-85 85 -85 206t85 206 q86 86 207 86zM292 488q-26 0 -44.5 -18.5t-18.5 -44.5t18.5 -44t44.5 -18t44 18t18 44t-18 44.5t-44 18.5zM292 529q43 0 73.5 -30.5t30.5 -73.5t-30.5 -73.5t-73.5 -30.5t-73.5 30.5t-30.5 73.5t30.5 73.5t73.5 30.5z"}, {PackIconTypiconsKind.Tags, "M809 400q24 -25 24 -59t-24 -58l-45 -45l4 -4q24 -25 23.5 -59.5t-24.5 -58.5l-291 -292q-24 -24 -59 -24t-59 24q-181 181 -273 270q-85 85 -85 206q0 82 43 151q-6 132 84 222q85 85 206 85q122 0 207 -85zM417 -117l291 292l-269 272q-61 61 -147 61q-87 0 -148 -61 t-61 -147t61 -147q92 -89 273 -270zM498 506l207 -209l45 45l-269 272q-61 61 -148 61q-86 0 -147 -61q-28 -28 -43 -63q69 41 149 41q120 0 206 -86zM292 363q-26 0 -44.5 -18.5t-18.5 -44.5t18.5 -44t44.5 -18t44 18t18 44t-18 44.5t-44 18.5zM292 404q43 0 73.5 -30.5 t30.5 -73.5t-30.5 -73.5t-73.5 -30.5t-73.5 30.5t-30.5 73.5t30.5 73.5t73.5 30.5z"}, {PackIconTypiconsKind.Thermometer, "M229 172q27 -7 45 -29t18 -51q0 -34 -25 -59t-59 -25t-58.5 24.5t-24.5 59.5q0 29 18 51t45 29v232q0 8 6 14.5t14 6.5t14.5 -6.5t6.5 -14.5v-232zM354 239q63 -63 63 -147q0 -86 -61.5 -147.5t-147.5 -61.5t-147 61.5t-61 147.5q0 85 62 147v332q0 60 43 103t103 43 t103 -43t43 -103v-332zM208 -33q52 0 88.5 36.5t36.5 88.5q0 70 -62 107v372q0 25 -18.5 43.5t-44.5 18.5t-44 -18.5t-18 -43.5v-372q-63 -37 -63 -107q0 -52 36.5 -88.5t88.5 -36.5z"}, {PackIconTypiconsKind.ThLarge, "M0 550q0 52 36.5 88.5t88.5 36.5h83q52 0 88.5 -36.5t36.5 -88.5v-83q0 -52 -36.5 -88.5t-88.5 -36.5h-83q-52 0 -88.5 36.5t-36.5 88.5v83zM417 550q0 52 36.5 88.5t88.5 36.5h83q52 0 88.5 -36.5t36.5 -88.5v-83q0 -52 -36.5 -88.5t-88.5 -36.5h-83q-52 0 -88.5 36.5 t-36.5 88.5v83zM0 133q0 52 36.5 88.5t88.5 36.5h83q52 0 88.5 -36.5t36.5 -88.5v-83q0 -52 -36.5 -88.5t-88.5 -36.5h-83q-52 0 -88.5 36.5t-36.5 88.5v83zM417 133q0 52 36.5 88.5t88.5 36.5h83q52 0 88.5 -36.5t36.5 -88.5v-83q0 -52 -36.5 -88.5t-88.5 -36.5h-83 q-52 0 -88.5 36.5t-36.5 88.5v83z"}, {PackIconTypiconsKind.ThLargeOutline, "M292 717q34 0 58.5 -24.5t24.5 -59.5v-208q0 -35 -24.5 -59t-58.5 -24h-209q-35 0 -59 24t-24 59v208q0 35 24.5 59.5t58.5 24.5h209zM292 425v208h-209v-208h209zM750 717q34 0 58.5 -24.5t24.5 -59.5v-208q0 -35 -24.5 -59t-58.5 -24h-208q-35 0 -59.5 24.5t-24.5 58.5 v208q0 35 25 59.5t59 24.5h208zM750 425v208h-208v-208h208zM292 258q34 0 58.5 -24t24.5 -59v-208q0 -35 -24.5 -59.5t-58.5 -24.5h-209q-34 0 -58.5 24.5t-24.5 59.5v208q0 35 24 59t59 24h209zM292 -33v208h-209v-208h209zM750 258q34 0 58.5 -24t24.5 -59v-208 q0 -35 -24.5 -59.5t-58.5 -24.5h-208q-34 0 -59 24.5t-25 59.5v208q0 34 24.5 58.5t59.5 24.5h208zM750 -33v208h-208v-208h208z"}, {PackIconTypiconsKind.ThList, "M688 92q34 0 58.5 -24.5t24.5 -59.5q0 -34 -24.5 -58.5t-58.5 -24.5h-292q-35 0 -59.5 24.5t-24.5 58.5t25 59t59 25h292zM688 383q34 0 58.5 -24.5t24.5 -58.5t-24.5 -58.5t-58.5 -24.5h-292q-35 0 -59.5 24.5t-24.5 58.5t24.5 58.5t59.5 24.5h292zM688 675 q34 0 58.5 -24.5t24.5 -58.5q0 -35 -24.5 -59.5t-58.5 -24.5h-292q-34 0 -59 25t-25 59t24.5 58.5t59.5 24.5h292zM0 8q0 104 104 104t104 -104t-104 -104t-104 104zM0 300q0 104 104 104t104 -104t-104 -104t-104 104zM0 592q0 104 104 104t104 -104t-104 -104t-104 104z "}, {PackIconTypiconsKind.ThListOutline, "M708 50h-291q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12h291q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5zM708 133q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-291q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h291zM708 342h-291 q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5h291q17 0 29.5 12.5t12.5 29.5t-12.5 29.5t-29.5 12.5zM708 425q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-291q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h291zM708 633h-291q-17 0 -29.5 -12 t-12.5 -29t12.5 -29.5t29.5 -12.5h291q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM708 717q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-291q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h291zM167 133q35 0 59 -24.5t24 -58.5v-83q0 -35 -24.5 -59.5 t-58.5 -24.5h-84q-34 0 -58.5 24.5t-24.5 59.5v83q0 34 24 58.5t59 24.5h84zM167 -33v83h-84v-83h84zM167 425q35 0 59 -24.5t24 -58.5v-84q0 -34 -24 -58.5t-59 -24.5h-84q-35 0 -59 24.5t-24 58.5v84q0 34 24 58.5t59 24.5h84zM167 258v84h-84v-84h84zM167 717 q34 0 58.5 -24.5t24.5 -59.5v-83q0 -34 -24 -58.5t-59 -24.5h-84q-35 0 -59 24.5t-24 58.5v83q0 35 24.5 59.5t58.5 24.5h84zM167 550v83h-84v-83h84z"}, {PackIconTypiconsKind.ThMenu, "M667 92q34 0 58.5 -24.5t24.5 -59.5q0 -34 -24 -58.5t-59 -24.5h-584q-35 0 -59 24.5t-24 58.5q0 35 24.5 59.5t58.5 24.5h584zM667 383q35 0 59 -24.5t24 -58.5t-24 -58.5t-59 -24.5h-584q-35 0 -59 24.5t-24 58.5t24 58.5t59 24.5h584zM667 675q35 0 59 -24.5t24 -58.5 q0 -35 -24.5 -59.5t-58.5 -24.5h-584q-34 0 -58.5 24.5t-24.5 59.5q0 34 24 58.5t59 24.5h584z"}, {PackIconTypiconsKind.ThMenuOutline, "M708 50h-583q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12h583q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5zM708 133q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-583q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h583zM708 342h-583 q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5h583q17 0 29.5 12.5t12.5 29.5t-12.5 29.5t-29.5 12.5zM708 425q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-583q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h583zM708 633h-583q-17 0 -29.5 -12 t-12.5 -29t12.5 -29.5t29.5 -12.5h583q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12zM708 717q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-583q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h583z"}, {PackIconTypiconsKind.ThSmall, "M0 8q0 104 104 104t104 -104t-104 -104t-104 104zM0 300q0 104 104 104t104 -104t-104 -104t-104 104zM0 592q0 104 104 104t104 -104t-104 -104t-104 104zM292 8q0 104 104 104t104 -104t-104 -104t-104 104zM292 300q0 104 104 104t104 -104t-104 -104t-104 104z M292 592q0 104 104 104t104 -104t-104 -104t-104 104zM583 8q0 104 105 104q104 0 104 -104t-104 -104q-105 0 -105 104zM583 300q0 104 105 104q104 0 104 -104t-104 -104q-105 0 -105 104zM583 592q0 104 105 104q104 0 104 -104t-104 -104q-105 0 -105 104z"}, {PackIconTypiconsKind.ThSmallOutline, "M167 133q35 0 59 -24.5t24 -58.5v-83q0 -35 -24.5 -59.5t-58.5 -24.5h-84q-34 0 -58.5 24.5t-24.5 59.5v83q0 34 24 58.5t59 24.5h84zM167 -33v83h-84v-83h84zM167 425q35 0 59 -24.5t24 -58.5v-84q0 -34 -24 -58.5t-59 -24.5h-84q-35 0 -59 24.5t-24 58.5v84 q0 34 24 58.5t59 24.5h84zM167 258v84h-84v-84h84zM167 717q34 0 58.5 -24.5t24.5 -59.5v-83q0 -34 -24 -58.5t-59 -24.5h-84q-35 0 -59 24.5t-24 58.5v83q0 35 24.5 59.5t58.5 24.5h84zM167 550v83h-84v-83h84zM458 133q35 0 59.5 -24.5t24.5 -58.5v-83q0 -35 -25 -59.5 t-59 -24.5h-83q-34 0 -58.5 24.5t-24.5 59.5v83q0 34 24 58.5t59 24.5h83zM458 -33v83h-83v-83h83zM458 425q35 0 59.5 -24.5t24.5 -58.5v-84q0 -34 -24.5 -58.5t-59.5 -24.5h-83q-35 0 -59 24.5t-24 58.5v84q0 34 24 58.5t59 24.5h83zM458 258v84h-83v-84h83zM458 717 q34 0 59 -24.5t25 -59.5v-83q0 -34 -24.5 -58.5t-59.5 -24.5h-83q-35 0 -59 24.5t-24 58.5v83q0 35 24.5 59.5t58.5 24.5h83zM458 550v83h-83v-83h83zM750 133q34 0 58.5 -24.5t24.5 -58.5v-83q0 -35 -24.5 -59.5t-58.5 -24.5h-83q-35 0 -59.5 24.5t-24.5 59.5v83 q0 34 24.5 58.5t59.5 24.5h83zM750 -33v83h-83v-83h83zM750 425q34 0 58.5 -24.5t24.5 -58.5v-84q0 -34 -24.5 -58.5t-58.5 -24.5h-83q-35 0 -59.5 24.5t-24.5 58.5v84q0 34 24.5 58.5t59.5 24.5h83zM750 258v84h-83v-84h83zM750 717q34 0 58.5 -24.5t24.5 -59.5v-83 q0 -34 -24.5 -58.5t-58.5 -24.5h-83q-35 0 -59.5 24.5t-24.5 58.5v83q0 35 24.5 59.5t59.5 24.5h83zM750 550v83h-83v-83h83z"}, {PackIconTypiconsKind.ThumbsDown, "M583 592q52 0 88.5 -36.5t36.5 -88.5v-250q0 -52 -36.5 -88.5t-88.5 -36.5q-61 0 -99 50q-34 -34 -50.5 -67.5t-16.5 -87.5q0 -43 -30.5 -73.5t-73.5 -30.5t-74 30.5t-31 73.5q0 76 13 151q-139 15 -161 23q-30 11 -47 41.5t-12 62.5l28 249q5 30 25.5 55.5t46.5 35.5 l13 5q56 23 136 23q66 0 139.5 -20.5t104.5 -44.5l7 -8q37 32 82 32zM333 -12q0 43 8.5 78t26 62.5t29 41t32.5 34.5q29 29 29 55v208q0 9 -5 20t-10 15q-19 14 -79 31t-114 17q-61 0 -104 -17l-16 -6q-5 -2 -11.5 -10t-7.5 -15l-27 -249q-2 -10 4 -13q12 -3 86 -12t95 -11 l55 8l-12 -59q-20 -98 -20 -178q0 -8 6 -14.5t14 -6.5t14.5 6.5t6.5 14.5zM625 217v250q0 17 -12.5 29t-29.5 12t-29 -12t-12 -29v-250q0 -17 12 -29.5t29 -12.5t29.5 12.5t12.5 29.5z"}, {PackIconTypiconsKind.ThumbsOk, "M712 312q45 -68 -25 -154q-44 -58 -154 -87q-16 -4 -34.5 -13.5t-29.5 -17t-27 -19.5t-17 -13q4 -9 8.5 -23.5t0.5 -51t-30 -62.5q-25 -27 -59 -36t-62.5 -1.5t-45.5 24.5l-208 209q-58 67 -4 133q122 142 154 196q8 13 13 40.5t10.5 68.5t9.5 62q5 28 26 48.5t40 27.5 l18 7l54 50q19 5 37.5 6t28.5 0l9 -2q35 63 96 63q55 0 92.5 -50t7.5 -109l-34 -75l71 -37q55 -55 67 -104q8 -37 -13 -80zM283 -71q21 -20 46 -8t25 37q0 17 -13 30l-204 204l-29 -30q-12 -12 -12 -29t12 -29zM616 342q16 0 26 11t4 26q-21 36 -46 54q-43 29 -88 25 q-28 0 -71 -29q-10 -5 -10 1q1 2 2 3q100 163 117 200q6 16 -3.5 31t-25.5 15q-21 0 -38 -25q-5 -9 -38.5 -69t-48.5 -89l20 100q3 15 -6 24t-23 9q-6 0 -14 -6t-11 -15l-16 -54q-3 6 -12 11.5t-18 5.5q-20 0 -25 -21l-29 -162q-6 -37 -75 -121l192 -192q24 24 75 54 q29 18 74.5 25.5t71.5 24.5q50 34 50 71q0 33 -29 33q-8 0 -14 -4t-16.5 -13.5t-19.5 -15.5q-25 -12 -55 -12q-31 0 -50.5 23.5t-19.5 55.5q0 54 41 71q22 9 46.5 6.5t37.5 -15.5q5 -5 13.5 -16t15.5 -16t16 -5zM608 312q-28 0 -37 13q-19 29 -46 29q-21 0 -33.5 -11.5 t-12.5 -30.5t12.5 -32t33.5 -13q27 0 46 29q11 16 37 16z"}, {PackIconTypiconsKind.ThumbsUp, "M649 438q30 -11 46.5 -41t11.5 -62l-28 -249q-5 -31 -25.5 -56t-46.5 -35l-13 -5q-56 -23 -136 -23q-66 0 -139 20.5t-104 44.5l-8 8q-37 -32 -82 -32q-52 0 -88.5 36.5t-36.5 88.5v250q0 52 36.5 88.5t88.5 36.5q61 0 99 -50q35 35 51.5 67.5t16.5 86.5q0 43 30.5 74 t73.5 31t73.5 -31t30.5 -74q0 -75 -13 -150q136 -14 162 -24zM125 92q17 0 29.5 12t12.5 29v250q0 17 -12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5v-250q0 -17 12.5 -29t29.5 -12zM597 98l28 249q2 10 -5 13q-12 3 -86 12t-95 11l-55 -8l13 59q20 93 20 178 q0 8 -6.5 14.5t-14.5 6.5t-14.5 -6.5t-6.5 -14.5q0 -43 -8.5 -78t-26 -62.5t-29 -41t-32.5 -34.5q-29 -29 -29 -55v-208q0 -24 15 -35q19 -14 79 -31t114 -17q62 0 105 17l15 6q5 2 11.5 10t7.5 15z"}, {PackIconTypiconsKind.Tick, "M499 540q30 -16 39.5 -50t-7.5 -64l-208 -375q-20 -36 -61 -42l-12 -1q-34 0 -59 25l-167 166q-25 25 -25 59t25 59t59 25t59 -25l89 -88l154 278q16 30 50 40t64 -7z"}, {PackIconTypiconsKind.Ticket, "M819 464q36 -36 35.5 -88.5t-36.5 -88.5l-381 -375q-38 -36 -88 -36q-52 0 -89 37l-224 223q-36 36 -35.5 88.5t36.5 88.5l381 375q35 35 88.5 34.5t88.5 -35.5zM760 347q12 12 12 29t-12 29l-53 53q-25 -23 -58 -22.5t-57 24.5t-24.5 57t22.5 58l-54 53q-12 12 -30 12 q-17 0 -29 -12l-381 -375q-12 -12 -12.5 -29t11.5 -29l53 -53q25 23 58 22.5t57 -24.5q23 -24 24 -57t-21 -58l53 -53q12 -12 30 -12.5t30 11.5zM407 90l-194 194l235 226l194 -194zM272 283l136 -135l175 169l-135 135z"}, {PackIconTypiconsKind.TickOutline, "M292 -33q-53 0 -89 36l-166 167q-37 37 -37 88q0 52 37 89q35 35 88 35t88 -35l50 -50l128 230q16 30 45.5 47.5t63.5 17.5q70 0 107.5 -60.5t1.5 -125.5l-208 -375q-35 -64 -109 -64zM125 300q-17 0 -29.5 -12.5t-12.5 -29.5q0 -16 13 -29l166 -167q15 -15 35.5 -12 t30.5 21l208 375q9 18 3.5 34t-19.5 23q-15 8 -31.5 3t-24.5 -19l-182 -327l-128 128q-12 12 -29 12z"}, {PackIconTypiconsKind.Time, "M542 258q0 -17 -12.5 -29t-29.5 -12h-125q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h125q17 0 29.5 -12.5t12.5 -29.5zM375 550q-121 0 -206.5 -85.5t-85.5 -206.5t85.5 -206t206.5 -85t206.5 85t85.5 206t-85.5 206.5t-206.5 85.5zM375 633q155 0 265 -110t110 -265 t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM417 383q0 17 -12.5 29.5t-29.5 12.5t-29.5 -12.5t-12.5 -29.5v-125q0 -17 12.5 -29t29.5 -12t29.5 12t12.5 29v125zM375 467q-86 0 -147 -61.5t-61 -147.5t61 -147t147 -61t147 61t61 147t-61 147.5t-147 61.5z M375 508q103 0 176.5 -73t73.5 -177t-73.5 -177t-176.5 -73t-176.5 73t-73.5 177t73.5 177t176.5 73z"}, {PackIconTypiconsKind.Times, "M476 526q25 -25 25 -59t-25 -59l-108 -108l108 -108q25 -25 25 -59t-25 -59q-24 -24 -59 -24t-59 24l-108 108l-108 -108q-24 -24 -59 -24t-59 24q-25 25 -25 59t25 59l108 108l-108 108q-25 25 -25 59t25 59q24 25 59 25t59 -25l108 -108l108 108q24 25 59 25t59 -25z "}, {PackIconTypiconsKind.TimesOutline, "M583 133q0 -51 -37 -88t-88 -37t-88 37l-78 78l-79 -78q-35 -35 -88 -35t-88 35q-37 37 -37 88q0 52 37 89l78 78l-78 78q-37 37 -37 89q0 51 37 88q35 35 88 35t88 -35l79 -78l78 78q35 35 88.5 35t88.5 -35q36 -36 36 -88q0 -53 -36 -89l-79 -78l79 -78q36 -36 36 -89z M292 241l137 -137q12 -12 29.5 -12t29.5 12t12 29q0 18 -12 30l-137 137l137 137q12 12 12 30q0 17 -12 29t-29.5 12t-29.5 -12l-137 -137l-138 137q-12 12 -29 12t-29 -12q-13 -13 -13 -29q0 -17 13 -30l137 -137l-137 -137q-13 -13 -13 -30q0 -16 13 -29q12 -12 29 -12 t29 12z"}, {PackIconTypiconsKind.Trash, "M583 508q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5v-333q0 -69 -48.5 -118t-117.5 -49h-209q-69 0 -117.5 49t-48.5 118v333q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h41v42q0 34 24.5 58.5t59.5 24.5h291q35 0 59.5 -24.5t24.5 -58.5v-42h41zM167 550v-42 h291v42h-291zM500 92v333h-375v-333q0 -35 24.5 -59.5t58.5 -24.5h209q34 0 58.5 24.5t24.5 59.5zM188 362q8 0 14 -6t6 -14v-250q0 -8 -6 -14.5t-14 -6.5t-14.5 6.5t-6.5 14.5v250q0 8 6.5 14t14.5 6zM271 362q8 0 14.5 -6t6.5 -14v-250q0 -8 -6.5 -14.5t-14.5 -6.5 t-14.5 6.5t-6.5 14.5v250q0 8 6.5 14t14.5 6zM354 362q8 0 14.5 -6t6.5 -14v-250q0 -8 -6.5 -14.5t-14.5 -6.5t-14.5 6.5t-6.5 14.5v250q0 8 6.5 14t14.5 6zM438 362q8 0 14 -6t6 -14v-250q0 -8 -6 -14.5t-14 -6.5t-14.5 6.5t-6.5 14.5v250q0 8 6.5 14t14.5 6z"}, {PackIconTypiconsKind.Tree, "M741 76q17 -22 4 -45t-37 -23h-291v-125q0 -17 -12.5 -29t-29.5 -12t-29.5 12t-12.5 29v125h-291q-24 0 -37 23t4 45l113 141h-39q-23 0 -36 21t2 44q292 417 293 418q12 16 33 16.5t34 -17.5l292 -417q14 -23 1.5 -44t-35.5 -21h-39zM417 92h205l-113 140q-17 22 -4 45 t37 23h45l-212 302l-212 -302h45q24 0 37 -23t-4 -45l-113 -140h205v208q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-208z"}, {PackIconTypiconsKind.Upload, "M749 133l1 -208q0 -17 -12.5 -29.5t-29.5 -12.5h-666q-17 0 -29.5 12.5t-12.5 29.5q0 208 1 208q0 9 1 13l84 250q10 29 39 29h167v-83h-137l-69 -209h578l-69 209h-137v83h167q29 0 39 -29l84 -250q1 -4 1 -13zM542 471q-19 0 -30 11l-95 96v-278q0 -17 -12.5 -29.5 t-29.5 -12.5t-29.5 12.5t-12.5 29.5v278l-95 -96q-11 -11 -30 -11q-18 0 -29 11q-12 12 -12 29.5t12 29.5l196 197l196 -197q12 -12 12 -29.5t-12 -29.5q-11 -11 -29 -11z"}, {PackIconTypiconsKind.UploadOutline, "M749 92l1 -209q0 -17 -12.5 -29t-29.5 -12h-666q-17 0 -29.5 12t-12.5 29v209q0 5 2 13l83 250q6 17 24 25q-28 37 -25 83.5t36 79.5l255 255l255 -255q33 -33 36 -79.5t-25 -83.5q17 -8 23 -25l84 -250q1 -4 1 -13zM179 484q-12 -12 -12 -29.5t12 -29.5t29.5 -12 t29.5 12l95 95v-241q0 -17 12.5 -29t29.5 -12t29.5 12t12.5 29v241l95 -95q12 -12 29.5 -12t29.5 12t12 29.5t-12 29.5l-196 196zM155 300l-69 -208h578l-69 208h-95v-21q0 -52 -36.5 -88.5t-88.5 -36.5t-88.5 36.5t-36.5 88.5v21h-95zM83 -75h584v125h-584v-125z"}, {PackIconTypiconsKind.User, "M250 633q86 0 147 -61t61 -147t-61 -147t-147 -61t-147 61t-61 147t61 147t147 61zM0 8q0 66 69 116.5t181 50.5q109 0 179.5 -50.5t70.5 -116.5q0 -33 -71.5 -58t-178.5 -25q-112 0 -181 25t-69 58z"}, {PackIconTypiconsKind.UserAdd, "M458 425q0 -86 -61 -147t-147 -61t-147 61t-61 147t61 147t147 61t147 -61t61 -147zM250 -75q-112 0 -181 25t-69 58q0 66 69 116.5t181 50.5q109 0 179.5 -50.5t70.5 -116.5q0 -33 -71.5 -58t-178.5 -25zM750 300q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12h-83 v-84q0 -17 -12.5 -29t-29.5 -12t-29.5 12t-12.5 29v84h-83q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h83v83q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-83h83z"}, {PackIconTypiconsKind.UserAddOutline, "M750 217h-250q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h250q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12zM625 92q-17 0 -29.5 12t-12.5 29v250q0 17 12.5 29.5t29.5 12.5t29.5 -12.5t12.5 -29.5v-250q0 -17 -12.5 -29t-29.5 -12zM250 550q-52 0 -88.5 -36.5 t-36.5 -88.5t36.5 -88.5t88.5 -36.5t88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5zM250 633q86 0 147 -61t61 -147t-61 -147t-147 -61t-147 61t-61 147t61 147t147 61zM250 92q-59 0 -101 -18t-58 -43q60 -23 159 -23t158 23q-17 24 -58.5 42.5t-99.5 18.5zM250 175 q109 0 179.5 -50.5t70.5 -116.5q0 -33 -71.5 -58t-178.5 -25q-112 0 -181 25t-69 58q0 66 69 116.5t181 50.5z"}, {PackIconTypiconsKind.UserDelete, "M750 217h-250q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h250q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12zM250 633q86 0 147 -61t61 -147t-61 -147t-147 -61t-147 61t-61 147t61 147t147 61zM250 175q109 0 179.5 -50.5t70.5 -116.5q0 -33 -71.5 -58 t-178.5 -25q-112 0 -181 25t-69 58q0 66 69 116.5t181 50.5z"}, {PackIconTypiconsKind.UserDeleteOutline, "M750 217h-250q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h250q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29t-29.5 -12zM250 550q-52 0 -88.5 -36.5t-36.5 -88.5t36.5 -88.5t88.5 -36.5t88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5zM250 633q86 0 147 -61t61 -147t-61 -147 t-147 -61t-147 61t-61 147t61 147t147 61zM250 92q-59 0 -101 -18t-58 -43q60 -23 159 -23t158 23q-17 24 -58.5 42.5t-99.5 18.5zM250 175q109 0 179.5 -50.5t70.5 -116.5q0 -33 -71.5 -58t-178.5 -25q-112 0 -181 25t-69 58q0 66 69 116.5t181 50.5z"}, {PackIconTypiconsKind.UserOutline, "M250 550q-52 0 -88.5 -36.5t-36.5 -88.5t36.5 -88.5t88.5 -36.5t88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5zM250 633q86 0 147 -61t61 -147t-61 -147t-147 -61t-147 61t-61 147t61 147t147 61zM250 92q-59 0 -101 -18t-58 -43q60 -23 159 -23t158 23q-17 24 -58.5 42.5 t-99.5 18.5zM250 175q109 0 179.5 -50.5t70.5 -116.5q0 -33 -71.5 -58t-178.5 -25q-112 0 -181 25t-69 58q0 66 69 116.5t181 50.5z"}, {PackIconTypiconsKind.VendorAndroid, "M238 617q-20 20 -38 54l-4 4q-8 8 0 8q0 8 8 0l4 -4l38 -50h4q45 17 67 17q53 0 100 -17q0 -3 2 -1l2 1l37 54q9 9 13 5q7 -6 0 -13q-1 -1 -38 -54l-4 -4l17 -9q59 -37 79 -83q11 -24 17 -54q0 -4 -4 -4h-409q-4 0 -4 4q6 56 46 96q27 33 62 50h5zM425 583 q-13 0 -22.5 -10.5t-6.5 -22.5q0 -15 10 -24t23 -9q12 0 20.5 10t8.5 23q0 15 -10 24t-23 9zM246 583q-13 0 -23.5 -10t-10.5 -23t11 -23t27 -10q12 0 20.5 10t8.5 23q0 15 -10 24t-23 9zM42 425q16 0 28.5 -13t12.5 -29v-208q0 -16 -12.5 -29t-28.5 -13t-29 13t-13 29v208 q0 16 13 29t29 13zM625 425q16 0 29 -13t13 -29v-208q0 -16 -13 -29t-29 -13t-29 13t-13 29v208q0 16 13 29t29 13zM125 92v333h417v-333q0 -16 -13 -29t-29 -13h-42v-125q0 -16 -12.5 -29t-28.5 -13t-29 13t-13 29v125h-83v-125q0 -16 -13 -29t-29 -13t-29 13t-13 29v125 h-41q-16 0 -29 13t-13 29z"}, {PackIconTypiconsKind.VendorApple, "M323 525q-4 67 38 125l116 67q5 -67 -37 -125zM548 292q0 -56 31 -100t82 -63q-7 -30 -46 -96q-29 -41 -42 -54q-46 -62 -112 -50q-17 2 -47.5 21t-44.5 21q-30 6 -54 0q-17 -4 -52.5 -24t-47.5 -22q-7 0 -18 2t-15 2q-55 27 -88 71q-20 30 -42 75q-31 60 -41 108 q-15 58 -9 134q3 36 19 72.5t36 56.5q29 36 66 50q29 12 88 12q15 -2 57 -19.5t72 -17.5q26 0 75.5 18.5t78.5 18.5q49 0 100 -29l38 -37q-38 -25 -61 -65t-23 -85z"}, {PackIconTypiconsKind.VendorMicrosoft, "M292 279v-246q0 -6 -6 -11t-15 -5l-250 29q-21 7 -21 25v208q0 9 6 15t15 6h250q9 0 15 -6t6 -15zM354 300l375 -4q9 0 15 -6t6 -15v-292q0 -6 -6 -11t-15 -5l-375 41q-21 7 -21 25v246q0 9 6 15t15 6zM292 604v-242q0 -20 -21 -20h-250q-21 0 -21 20v209q0 9 6 15t15 6 l250 29q9 3 15 -2.5t6 -14.5zM354 629l375 38q9 3 15 -2.5t6 -14.5v-292q0 -20 -21 -20h-375q-21 0 -21 20v246q0 9 6 17t15 8z"}, {PackIconTypiconsKind.Video, "M833 508q18 0 30 -12t12 -29v-334q0 -17 -12 -29t-30 -12q-10 0 -18 4l-107 53v-16q0 -52 -36.5 -88.5t-88.5 -36.5h-458q-52 0 -88.5 36.5t-36.5 88.5v334q0 52 36.5 88.5t88.5 36.5h458q52 0 88.5 -36.5t36.5 -88.5v-16l107 53q8 4 18 4zM208 238q26 0 44.5 18t18.5 44 t-18.5 44t-44.5 18t-44 -18t-18 -44t18 -44t44 -18z"}, {PackIconTypiconsKind.VideoOutline, "M167 342q0 41 41 41q42 0 42 -41q0 -42 -42 -42q-41 0 -41 42zM583 592q48 0 83.5 -32t40.5 -77l71 23q20 7 37.5 -6t17.5 -33v-250q0 -20 -17 -33.5t-38 -6.5l-71 24q-6 -45 -41 -77t-83 -32h-83v-43q0 -50 -37 -87t-88 -37t-85.5 34.5t-39.5 85.5v47h-125q-51 0 -88 37 t-37 88v250q0 51 37 88t88 37h458zM375 8q16 0 29 12.5t13 28.5v84h-84v-84q2 -17 13.5 -29t28.5 -12zM583 175q18 0 30 12t12 30v250q0 17 -12.5 29t-29.5 12h-458q-17 0 -29.5 -12t-12.5 -29v-250q0 -17 12.5 -29.5t29.5 -12.5h458zM750 275v134l-83 -25v-84q5 0 83 -25z "}, {PackIconTypiconsKind.Volume, "M422 557q31 0 54.5 -23.5t23.5 -66.5v-417q0 -43 -23.5 -67t-54.5 -24q-28 0 -56 19l-111 74q-23 16 -62.5 28t-67.5 12q-52 0 -88.5 36.5t-36.5 88.5v83q0 52 36.5 88.5t88.5 36.5q29 0 68 11.5t62 27.5l111 74q28 19 56 19zM292 127v262q-35 -20 -82.5 -33.5 t-84.5 -13.5q-17 0 -29.5 -12.5t-12.5 -29.5v-83q0 -17 12.5 -29.5t29.5 -12.5q37 0 84.5 -14t82.5 -34zM417 50v417l-1 5q-14 -9 -41.5 -27.5t-41.5 -27.5v-317l79 -52l4 -3z"}, {PackIconTypiconsKind.VolumeDown, "M422 557q31 0 54.5 -23.5t23.5 -66.5v-417q0 -43 -23.5 -67t-54.5 -24q-28 0 -56 19l-111 74q-23 16 -62.5 28t-67.5 12q-52 0 -88.5 36.5t-36.5 88.5v83q0 52 36.5 88.5t88.5 36.5q29 0 68 11.5t62 27.5l111 74q28 19 56 19zM125 175q37 0 84.5 -14t82.5 -34v262 q-35 -20 -82.5 -33.5t-84.5 -13.5q-17 0 -29.5 -12.5t-12.5 -29.5v-83q0 -17 12.5 -29.5t29.5 -12.5zM417 50v417l-1 5q-14 -9 -41.5 -27.5t-41.5 -27.5v-317l79 -52l4 -3zM554 371q12 12 29.5 12t29.5 -12q47 -47 47 -113q0 -65 -47 -112q-13 -13 -30 -13q-16 0 -29 13 q-12 12 -12 29t12 29q22 22 22 54t-22 54q-12 12 -12 29.5t12 29.5z"}, {PackIconTypiconsKind.VolumeMute, "M613 579q12 -12 12 -29t-12 -29l-113 -113v-358q0 -43 -23.5 -67t-54.5 -24q-28 0 -56 19l-111 74q-29 20 -79 32l-105 -105q-12 -12 -29 -12q-18 0 -30 12t-12 29.5t12 29.5l64 64q-34 14 -55 45.5t-21 69.5v83q0 52 36.5 88.5t88.5 36.5q29 0 68 11.5t62 27.5l111 74 q28 19 56 19q47 0 67 -42l65 64q12 12 29.5 12t29.5 -12zM416 472q-14 -9 -41.5 -27.5t-41.5 -27.5v-88l84 84v54zM83 300v-83q0 -17 12.5 -29.5t29.5 -12.5q21 0 49 -5l118 118v101q-35 -20 -82.5 -33.5t-84.5 -13.5q-17 0 -29.5 -12.5t-12.5 -29.5zM221 158q40 -12 71 -31 v102zM416 45l1 5v304l-84 -83v-171l79 -52z"}, {PackIconTypiconsKind.VolumeUp, "M613 371q47 -47 47 -113q0 -65 -47 -112q-13 -13 -30 -13q-16 0 -29 13q-12 12 -12 29t12 29q22 22 22 54t-22 54q-12 12 -12 29.5t12 29.5t29.5 12t29.5 -12zM696 454q81 -81 81 -195q0 -116 -81 -197q-12 -12 -29 -12q-18 0 -30 12t-12 29.5t12 29.5q56 56 56 137.5 t-56 137.5q-12 12 -12 29t12 29t29.5 12t29.5 -12zM779 538q116 -114 116 -279q0 -164 -116 -280q-12 -12 -29 -12t-29 12t-12 29.5t12 29.5q91 91 91 221q0 129 -91 220q-12 12 -12.5 29.5t11.5 29.5t29.5 12t29.5 -12zM422 557q31 0 54.5 -23.5t23.5 -66.5v-417 q0 -43 -23.5 -67t-54.5 -24q-28 0 -56 19l-111 74q-23 16 -62.5 28t-67.5 12q-52 0 -88.5 36.5t-36.5 88.5v83q0 52 36.5 88.5t88.5 36.5q29 0 68 11.5t62 27.5l111 74q28 19 56 19zM125 175q37 0 84.5 -14t82.5 -34v262q-35 -20 -82.5 -33.5t-84.5 -13.5q-17 0 -29.5 -12.5 t-12.5 -29.5v-83q0 -17 12.5 -29.5t29.5 -12.5zM417 50v417l-1 5q-14 -9 -41.5 -27.5t-41.5 -27.5v-317l79 -52l4 -3z"}, {PackIconTypiconsKind.Warning, "M792 158q51 -85 9 -159q-41 -74 -141 -74h-500q-101 0 -142 74q-42 74 9 159l247 411q50 85 136 85q85 0 135 -85zM410 69q27 0 45.5 18.5t18.5 45.5t-18.5 46t-45.5 19t-46 -19t-19 -46t19 -45.5t46 -18.5zM478 378q4 11 4 26q0 30 -21 51.5t-51 21.5t-51.5 -21.5 t-21.5 -51.5q0 -14 5 -27l58 -143q4 -7 10 -7t9 7q59 143 59 144z"}, {PackIconTypiconsKind.WarningOutline, "M410 570q-39 0 -65 -44l-246 -410q-26 -44 -8.5 -76t69.5 -32h500q52 0 69 32t-9 76l-246 410q-26 44 -64 44zM410 654q85 0 135 -85l247 -411q50 -84 9 -159q-41 -74 -141 -74h-500q-99 0 -142 74q-42 74 9 159l247 411q50 85 136 85zM355 133q0 55 55 55q54 0 54 -55 q0 -54 -54 -54q-55 0 -55 54zM472 383q0 -11 -5 -23l-57 -143q-35 86 -58 143q-5 12 -5 23q0 26 18.5 44.5t44.5 18.5t44 -18.5t18 -44.5z"}, {PackIconTypiconsKind.Watch, "M292 258q-17 0 -29.5 12.5t-12.5 29.5v83q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-41h42q17 0 29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5h-83zM500 504q83 -85 83 -204t-83 -204v-88q0 -52 -36.5 -88.5t-88.5 -36.5h-167q-52 0 -88.5 36.5t-36.5 88.5v88 q-83 85 -83 204t83 204v88q0 52 36.5 88.5t88.5 36.5h167q52 0 88.5 -36.5t36.5 -88.5v-88zM167 592v-76q60 34 125 34t125 -34v76q0 17 -12.5 29t-29.5 12h-167q-17 0 -29 -12t-12 -29zM417 8v76q-60 -34 -125 -34t-125 34v-76q0 -17 12 -29t29 -12h167q17 0 29.5 12 t12.5 29zM292 92q86 0 147 61t61 147t-61 147t-147 61t-147.5 -61t-61.5 -147t61.5 -147t147.5 -61z"}, {PackIconTypiconsKind.Waves, "M417 8q-91 0 -155 64q-40 40 -95.5 40t-95.5 -40q-12 -12 -29.5 -12t-29.5 12t-12 29.5t12 29.5q64 64 154.5 64t154.5 -64q40 -40 95.5 -40t95.5 40q12 12 29.5 12t29.5 -12t12 -29.5t-12 -29.5q-64 -64 -154 -64zM417 175q-91 0 -155 64q-40 40 -95.5 40t-95.5 -40 q-12 -12 -29.5 -12t-29.5 12t-12 29.5t12 29.5q64 64 154.5 64t154.5 -64q40 -40 95.5 -40t95.5 40q12 12 29.5 12t29.5 -12t12 -29.5t-12 -29.5q-64 -64 -154 -64zM417 342q-91 0 -155 64q-40 40 -95.5 40t-95.5 -40q-12 -12 -29.5 -12t-29.5 12t-12 29t12 29 q64 64 154.5 64t154.5 -64q40 -40 95.5 -40t95.5 40q12 12 29.5 12t29.5 -12t12 -29t-12 -29q-64 -64 -154 -64z"}, {PackIconTypiconsKind.WavesOutline, "M625 560q51 0 88 -37t37 -88q0 -48 -32 -83q32 -35 32 -84q0 -48 -32 -83q32 -35 32 -83q0 -52 -37 -89q-88 -88 -213 -88t-213 88q-15 15 -37 15t-37 -15q-36 -36 -88 -36q-51 0 -88 37t-37 88q0 48 32 83q-32 35 -32 83q0 49 32 84q-32 35 -32 83q0 51 37 88 q89 89 213 89t213 -89q15 -15 37 -15t37 15q37 37 88 37zM654 72q12 12 12 29.5t-12 29.5t-29 12t-29 -12q-39 -39 -96 -39t-96 39q-64 64 -154 64t-154 -64q-12 -12 -12 -29.5t12 -29.5t29 -12t29 12q40 40 96 40t96 -40q64 -64 154 -64t154 64zM96 464q-12 -12 -12 -29 t12 -29q13 -13 29 -13t29 13q39 39 96 39t96 -39q64 -64 154 -64t154 64q12 12 12 29t-12 29q-13 13 -29 13t-29 -13q-39 -39 -96 -39t-96 39q-64 64 -154 64t-154 -64zM654 239q12 12 12 29.5t-12 29.5t-29 12t-29 -12q-40 -40 -96 -40t-96 40q-64 64 -154 64t-154 -64 q-12 -12 -12 -29.5t12 -29.5t29 -12t29 12q39 39 96 39t96 -39q64 -64 154 -64t154 64z"}, {PackIconTypiconsKind.WeatherCloudy, "M625 8h-458q-69 0 -118 49t-49 118q0 58 35 102.5t90 58.5v6q0 104 73.5 177t176.5 73q80 0 144.5 -46.5t90.5 -121.5q92 7 157.5 -54.5t65.5 -152.5q0 -86 -61 -147.5t-147 -61.5zM163 259q-32 0 -56 -25t-24 -59t24.5 -58.5t59.5 -24.5h458q52 0 88.5 36.5t36.5 88.5 t-36.5 88.5t-88.5 36.5q-15 0 -34 -6l-45 -13l-7 46q-11 60 -57 99.5t-107 39.5q-69 0 -118 -48.5t-49 -117.5q0 -12 4 -34l10 -50z"}, {PackIconTypiconsKind.WeatherDownpour, "M542 -117q-17 0 -29.5 12.5t-12.5 29.5v250q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-250q0 -17 -12 -29.5t-29 -12.5zM292 -117q-17 0 -29.5 12.5t-12.5 29.5v250q0 17 12.5 29.5t29.5 12.5t29 -12.5t12 -29.5v-250q0 -17 -12 -29.5t-29 -12.5zM417 -200 q-17 0 -29.5 12.5t-12.5 29.5v250q0 17 12.5 29t29.5 12t29 -12t12 -29v-250q0 -17 -12 -29.5t-29 -12.5zM167 50q-69 0 -118 49t-49 118q0 58 35 102.5t90 58.5v5q0 103 73.5 176.5t176.5 73.5q81 0 145 -46t90 -121q91 7 157 -55t66 -153q0 -70 -42.5 -125.5t-109.5 -74.5 q-17 -5 -32.5 4t-19.5 25q-5 17 4 32t25 19q41 11 66.5 44.5t25.5 75.5q0 52 -36.5 88.5t-88.5 36.5q-18 0 -34 -5l-45 -13l-7 46q-11 60 -57 99.5t-107 39.5q-69 0 -118 -49t-49 -118q0 -11 4 -33l10 -50h-59q-32 0 -56 -24.5t-24 -58.5q0 -35 24.5 -59.5t59.5 -24.5 q17 0 29 -12t12 -29t-12 -29.5t-29 -12.5z"}, {PackIconTypiconsKind.WeatherNight, "M160 -33q-54 0 -105 18l-55 21l37 45q81 99 81 228t-81 228l-37 46l55 20q54 19 105 19q129 0 221 -92t92 -221t-92 -220.5t-221 -91.5zM139 51q7 -1 21 -1q94 0 161.5 67t67.5 162t-67.5 162t-161.5 67q-14 0 -21 -1q63 -106 63 -228t-63 -228z"}, {PackIconTypiconsKind.WeatherPartlySunny, "M562 675l-41 -125l-42 125q-6 17 2.5 33.5t25.5 22.5q23 8 43.5 -10t11.5 -46zM786 548l-118 -59l59 118q8 16 25.5 21.5t33.5 -2.5q25 -13 24 -39.5t-24 -38.5zM854 300l-125 42l125 41q17 6 33.5 -2t22.5 -25q8 -23 -10 -44t-46 -12zM315 607l59 -118l-118 59 q-17 8 -22.5 25t2.5 34q13 25 40 24t39 -24zM699 286q60 -23 97 -75.5t37 -118.5q0 -86 -61 -147.5t-147 -61.5h-458q-69 0 -118 49t-49 118q0 58 35 102.5t90 58.5v6q0 50 18 94q-24 22 -7 53t53 19q76 84 186 84l6 -1q55 63 140 63q77 0 132 -55t55 -132q0 -29 -9 -56z M521 446q-44 0 -76 -34q88 -31 123 -121q21 6 47 8q10 22 10 43q0 43 -30.5 73.5t-73.5 30.5zM625 -33q52 0 88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5q-15 0 -34 -6l-12 -1q-33 0 -41 38q-11 58 -56 96t-104 40l-3 -1q-69 0 -118 -48.5t-49 -117.5q0 -12 4 -34l10 -50 l-59 1q-32 0 -56 -25t-24 -59t24.5 -58.5t59.5 -24.5h458z"}, {PackIconTypiconsKind.WeatherShower, "M625 50q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12q52 0 88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5q-18 0 -34 -5l-45 -13l-7 46q-11 60 -57 99.5t-107 39.5q-69 0 -118 -49t-49 -118q0 -11 4 -33l10 -50h-59q-32 0 -56 -24.5t-24 -58.5q0 -35 24.5 -59.5 t59.5 -24.5q17 0 29 -12t12 -29t-12 -29.5t-29 -12.5q-69 0 -118 49t-49 118q0 58 35 102.5t90 58.5v5q0 103 73.5 176.5t176.5 73.5q81 0 145 -46t90 -121q91 7 157 -55t66 -153q0 -86 -61 -147t-147 -61zM354 50l42 125l42 -125q6 -17 -2.5 -33.5t-25.5 -22.5 q-23 -8 -44 10t-12 46zM479 -33l42 125l41 -125q6 -17 -2 -33.5t-25 -22.5q-23 -8 -44 10t-12 46zM229 -33l42 125l41 -125q6 -17 -2 -33.5t-25 -22.5q-23 -8 -44 10t-12 46z"}, {PackIconTypiconsKind.WeatherSnow, "M654 169q18 -4 28 -18.5t6 -32.5q-5 -26 -32 -33.5t-44 12.5l-69 78l17 -61q4 -16 -4.5 -31t-25.5 -20l-11 -2q-14 0 -25 8.5t-15 22.5l-17 63q-26 -21 -51 -30l46 -46q12 -12 12 -29t-12 -29q-13 -13 -29 -13q-17 0 -30 13l-29 29h-10l27 -83q6 -17 -2.5 -33.5 t-25.5 -22.5q-23 -8 -43.5 10t-11.5 46l28 83h-11l-29 -29q-12 -12 -29.5 -12t-29.5 12t-12 29t12 29l46 46q-25 9 -51 30l-17 -63q-4 -14 -15 -22.5t-25 -8.5l-11 2q-16 4 -25 19t-4 32l16 62l-69 -79q-12 -13 -30.5 -14t-31.5 11q-14 12 -15 30t11 32q10 10 24 13l102 21 l-61 17q-17 5 -25.5 20t-4.5 31t19 25t32 4l63 -16q-3 15 -3 29t3 29l-63 -16l-11 -2q-14 0 -25 8.5t-15 22.5q-4 16 4.5 31t25.5 20l61 17l-102 21q-18 4 -28 18.5t-6 32.5q5 26 32 33.5t44 -12.5l69 -79l-16 62q-5 17 4 32t25 19q17 5 32 -4t19 -25l17 -63q26 21 51 30 l-46 46q-12 12 -12 29t12 29t29.5 12t29.5 -12l45 -45l-33 99q-6 17 2.5 33.5t25.5 22.5q23 8 43.5 -10t11.5 -46l-33 -99l45 45q12 12 29.5 12t29.5 -12t12 -29t-12 -29l-46 -46q25 -9 51 -30l17 63q4 16 19 25t32 4t25.5 -20t4.5 -31l-17 -61l69 78q12 13 30.5 14 t31.5 -11q14 -12 15 -30t-11 -32q-10 -10 -24 -13l-102 -21l62 -17q16 -4 25 -19t4 -32q-4 -14 -15 -22.5t-25 -8.5l-11 2l-63 16q3 -15 3 -29t-3 -29l63 16q17 5 32 -4t19 -25q5 -17 -4 -32t-25 -19l-62 -17zM345 196q43 0 73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-74 -30.5t-31 -73.5t31 -73.5t74 -30.5z"}, {PackIconTypiconsKind.WeatherStormy, "M625 50q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12q52 0 88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5q-18 0 -34 -5l-45 -13l-7 46q-11 60 -57 99.5t-107 39.5q-69 0 -118 -49t-49 -118q0 -11 4 -33l11 -52l-60 2q-32 0 -56 -24.5t-24 -58.5q0 -35 24.5 -59.5 t59.5 -24.5q17 0 29 -12t12 -29t-12 -29.5t-29 -12.5q-69 0 -118 49t-49 118q0 58 35 102.5t90 58.5v5q0 103 73.5 176.5t176.5 73.5q81 0 145 -46t90 -121q91 7 157 -55t66 -153q0 -86 -61 -147t-147 -61zM443 217l-62 -146l125 -61l-188 -168l63 146l-125 60z"}, {PackIconTypiconsKind.WeatherSunny, "M433 633l-41 -122l-42 122q-6 17 2 33.5t25 22.5q24 8 45 -9.5t11 -46.5zM58 342l122 -42l-122 -42q-17 -6 -33.5 2.5t-22.5 25.5q-8 24 9.5 45t46.5 11zM350 -33l42 122l41 -122q6 -17 -2 -33.5t-25 -22.5q-24 -8 -45 9.5t-11 46.5zM725 258l-122 42l122 42 q17 6 33.5 -2.5t22.5 -25.5q8 -24 -9.5 -45t-46.5 -11zM185 565l57 -116l-116 57q-17 8 -22.5 25t2.5 34q13 25 40 24t39 -24zM126 94l116 57l-57 -116q-8 -17 -25 -22.5t-34 2.5q-25 13 -24 40t24 39zM598 35l-57 116l116 -57q17 -8 22.5 -25t-2.5 -34q-13 -25 -40 -24 t-39 24zM657 506l-116 -57l57 116q8 17 25 22.5t34 -2.5q25 -13 24 -40t-24 -39zM392 112q-77 0 -132.5 55.5t-55.5 132.5t55.5 132.5t132.5 55.5t132 -55.5t55 -132.5t-55 -132.5t-132 -55.5zM392 404q-43 0 -74 -30.5t-31 -73.5t31 -73.5t74 -30.5t73.5 30.5t30.5 73.5 t-30.5 73.5t-73.5 30.5z"}, {PackIconTypiconsKind.WeatherWindy, "M600 592q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-91q8 -21 8 -42q0 -52 -36.5 -88.5t-88.5 -36.5h-267q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29t29.5 -12t29.5 -12.5t12.5 -29.5t-12.5 -29.5t-29.5 -12.5q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5 t88.5 36.5h267q17 0 29 12.5t12 29.5t-12 29.5t-29 12.5h-250q-17 0 -29.5 12t-12.5 29t12.5 29.5t29.5 12.5h458q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12t-29.5 12.5t-12.5 29.5t12.5 29.5t29.5 12.5z"}, {PackIconTypiconsKind.WeatherWindyCloudy, "M117 144q-9 0 -17 3q-46 20 -73 61.5t-27 91.5q0 58 35 102.5t90 58.5v6q0 103 73.5 176.5t176.5 73.5q92 0 161.5 -59t84.5 -150q3 -17 -7 -31t-27 -17q-17 -2 -31 7.5t-17 26.5q-11 60 -57 99.5t-107 39.5q-69 0 -118 -48.5t-49 -117.5q0 -12 4 -34l10 -53l-59 4 q-32 0 -56 -25t-24 -59q0 -25 13.5 -45.5t36.5 -30.5q20 -9 24 -28.5t-7.5 -35.5t-32.5 -16zM708 508q52 0 88.5 -36.5t36.5 -88.5t-36.5 -88.5t-88.5 -36.5h-91q8 -21 8 -41q0 -52 -36.5 -88.5t-88.5 -36.5h-208q-17 0 -29.5 -12.5t-12.5 -29.5t12.5 -29.5t29.5 -12.5 t29 -12t12 -29t-12 -29.5t-29 -12.5q-52 0 -88.5 36.5t-36.5 88.5t36.5 88.5t88.5 36.5h208q17 0 29.5 12.5t12.5 29.5t-12.5 29t-29.5 12h-192q-17 0 -29 12.5t-12 29.5t12 29.5t29 12.5h400q17 0 29.5 12t12.5 29t-12.5 29.5t-29.5 12.5t-29 12.5t-12 29.5t12 29t29 12z "}, {PackIconTypiconsKind.WiFi, "M496 -9q-24 -25 -58.5 -24.5t-59.5 24.5t-25 58.5t25 59.5q24 25 58.5 25t59.5 -25q25 -24 25 -59t-25 -59zM790 320q-33 0 -58 25q-122 121 -295 121t-295 -121q-25 -25 -59 -24.5t-59 24.5q-25 25 -25 58.5t25 58.5q112 112 262 151.5t300.5 0t262.5 -151.5 q25 -25 25 -58.5t-25 -58.5t-59 -25zM260 143q-34 0 -59 25t-25 59t25 59q64 64 150 86.5t172 0t150 -86.5q25 -25 25 -59t-25 -59t-59 -25t-59 25q-49 49 -118 49t-118 -49q-25 -25 -59 -25z"}, {PackIconTypiconsKind.WiFiOutline, "M763 352q0 -64 -44 -108l-232 -236q-24 -25 -47.5 -33t-57.5 -8q-65 0 -110 50l-240 241q-13 13 -22.5 39t-9.5 51q0 48 29 87q23 25 31 31q139 117 321.5 117t321.5 -117q13 -10 22 -20q38 -36 38 -94zM382 50q26 0 44 18t18 44t-18 44.5t-44 18.5t-44.5 -18.5 t-18.5 -44.5t18.5 -44t44.5 -18zM544 186q18 18 18 44.5t-18 44.5q-67 67 -162.5 67t-162.5 -67q-18 -18 -18 -44.5t18 -44.5t44.5 -18t44.5 18q31 31 73.5 31t73.5 -31q18 -18 44 -18q27 0 45 18zM661 304q18 18 18 44.5t-18 44.5q-115 115 -279 115t-280 -115 q-18 -18 -18 -44.5t18 -44.5t44 -18t44 18q80 80 192 80t191 -80q18 -18 44 -18t44 18z"}, {PackIconTypiconsKind.Wine, "M464 407q0 -85 -54.5 -149.5t-136.5 -78.5l1 -4v-167h41q17 0 29.5 -12t12.5 -29t-12.5 -29.5t-29.5 -12.5h-166q-17 0 -29.5 12.5t-12.5 29.5t12.5 29t29.5 12h41v167l1 4q-82 14 -136.5 78.5t-54.5 149.5q0 47 10 106.5t18 92t11 39.5q4 13 15 21.5t25 8.5h306 q14 0 25 -8.5t15 -21.5q3 -7 11 -39.5t18 -92t10 -106.5zM232 258q55 0 96.5 35.5t49.5 89.5h-292q8 -54 49.5 -89.5t96.5 -35.5zM84 425h296q-4 79 -27 167h-242q-23 -88 -27 -167z"}, {PackIconTypiconsKind.World, "M375 717q155 0 265 -110t110 -265t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM458 633v31q-42 11 -83 11q-75 0 -140.5 -31t-112.5 -86l-22 -28l-15 -24l123 -123q0 5 1 12t11.5 18.5t29.5 11.5v-83l83 -84v-83q39 0 56 -0.5t36.5 -4.5t26 -13t6.5 -24 q26 13 35.5 18t22.5 16.5t15.5 17.5t6.5 26t4 36v53l41 42l-41 41v-83h-42q0 -17 -12.5 -29.5t-29.5 -12.5t-29 12.5t-12 29.5t12 29.5t29 12.5v125q0 17 -12 29t-29 12t-29.5 -12t-12.5 -29q0 -35 -4.5 -60.5t-10.5 -37.5t-12 -18.5t-10 -7.5l-5 -1v125q0 34 16.5 58.5 t46.5 24.5t46 24.5t16 58.5z"}, {PackIconTypiconsKind.WorldOutline, "M375 717q155 0 265 -110t110 -265t-110 -265t-265 -110t-265 110t-110 265t110 265t265 110zM375 467q0 -35 -4.5 -60.5t-10.5 -37.5t-12 -18.5t-10 -7.5l-5 -1v125q0 34 16.5 58.5t46.5 24.5q27 0 43 20.5t19 50.5q-39 12 -83 12q-84 0 -153 -42.5t-106 -114.5 q16 -15 46.5 -46t45.5 -47q0 5 1 12t11.5 18.5t29.5 11.5v-83l83 -84v-83q39 0 56 -0.5t36.5 -4.5t26 -13t6.5 -24q26 13 35.5 18t22.5 16.5t15.5 17.5t6.5 26t4 36v53l41 42l-41 41v-83h-42q0 -17 -12.5 -29.5t-29.5 -12.5t-29 12.5t-12 29.5t12 29.5t29 12.5v125 q0 17 -12 29t-29 12t-29.5 -12t-12.5 -29zM500 383q0 16 12 29t30 13q17 0 29 -12l42 -42q12 -12 12 -29.5t-12 -29.5l-30 -29q-1 -90 -17.5 -120.5t-88.5 -66.5q-8 -4 -18 -4q-17 0 -28.5 11t-13.5 27q-11 3 -84 3q-17 0 -29 12.5t-12 29.5v66l-193 193q-16 -46 -16 -92 q0 -121 85.5 -206.5t206.5 -85.5t206.5 85.5t85.5 206.5q0 87 -46.5 158t-122.5 106q-8 -44 -35 -70q37 -25 37 -69v-84z"}, {PackIconTypiconsKind.Zoom, "M409 633q121 0 206 -85t85 -206t-85 -206.5t-206 -85.5q-43 0 -91 15l-97 -97q-40 -35 -91 -35q-54 0 -92 38.5t-38 92.5t37 91q42 43 63 64l32 32q-15 48 -15 91q0 121 85.5 206t206.5 85zM409 133q86 0 147 61.5t61 147.5t-61 147t-147 61t-147.5 -61t-61.5 -147 t61.5 -147.5t147.5 -61.5zM409 508q69 0 117.5 -48.5t48.5 -117.5t-48.5 -118t-117.5 -49t-118 49t-49 118t49 117.5t118 48.5zM409 217q52 0 88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5t-88.5 -36.5t-36.5 -88.5t36.5 -88.5t88.5 -36.5z"}, {PackIconTypiconsKind.ZoomIn, "M396 342q9 0 15 -6t6 -15t-6 -15t-15 -6h-84v-83q0 -21 -20 -21q-9 0 -15 6t-6 15v83h-84q-20 0 -20 21t20 21h84v83q0 9 6 15t15 6q20 0 20 -21v-83h84zM600 199q10 -10 30.5 -31.5t31.5 -32.5q38 -38 38 -92t-38 -92.5t-92 -38.5q-55 0 -93 38l-94 94q-48 -15 -91 -15 q-121 0 -206.5 85.5t-85.5 206.5t85.5 206t206.5 85t206 -85t85 -206q0 -46 -14 -91zM83 321q0 -86 61.5 -147.5t147.5 -61.5t147 61.5t61 147.5t-61 147t-147 61t-147.5 -61t-61.5 -147z"}, {PackIconTypiconsKind.ZoomInOutline, "M396 342q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5h-84v-83q0 -8 -6 -14.5t-14 -6.5t-14.5 6.5t-6.5 14.5v83h-83q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h83v83q0 8 6.5 14.5t14.5 6.5t14 -6.5t6 -14.5v-83h84zM662 135q38 -38 38 -92t-38 -92.5t-92 -38.5 q-49 0 -88 33l-100 99q-48 -15 -90 -15q-121 0 -206.5 85.5t-85.5 206.5t85.5 206t206.5 85t206 -85t85 -206q0 -43 -15 -91zM499 181q-27 -41 -68 -68l105 -104q15 -13 34 -13q20 0 33.5 14t13.5 33q0 21 -14 33zM83 321q0 -86 61.5 -147.5t147.5 -61.5t147 61.5t61 147.5 t-61 147t-147 61t-147.5 -61t-61.5 -147z"}, {PackIconTypiconsKind.ZoomOut, "M396 342q9 0 15 -6t6 -15t-6 -15t-15 -6h-208q-9 0 -15 6t-6 15t6 15t15 6h208zM662 135q38 -38 38 -92t-38 -92.5t-92 -38.5q-57 0 -93 38l-94 94q-48 -15 -91 -15q-121 0 -206.5 85.5t-85.5 206.5t85.5 206t206.5 85t206 -85t85 -206q0 -46 -14 -91q9 -9 26.5 -27 t26.5 -27zM83 321q0 -86 61.5 -147.5t147.5 -61.5t147 61.5t61 147.5t-61 147t-147 61t-147.5 -61t-61.5 -147z"}, {PackIconTypiconsKind.ZoomOutline, "M409 467q-52 0 -88.5 -36.5t-36.5 -88.5t36.5 -88.5t88.5 -36.5t88.5 36.5t36.5 88.5t-36.5 88.5t-88.5 36.5zM409 508q69 0 117.5 -48.5t48.5 -117.5t-48.5 -118t-117.5 -49t-118 49t-49 118t49 117.5t118 48.5zM0 64q0 54 38 92l94 95q-15 43 -15 91q0 121 85.5 206 t206.5 85t206 -85t85 -206t-85 -206.5t-206 -85.5q-43 0 -91 15l-100 -99q-39 -33 -88 -33q-54 0 -92 38.5t-38 92.5zM269 134q-41 27 -68 68l-104 -105q-14 -12 -14 -33q0 -20 14 -34t33 -14q18 0 34 14zM409 133q86 0 147 61.5t61 147.5t-61 147t-147 61t-147.5 -61 t-61.5 -147t61.5 -147.5t147.5 -61.5z"}, {PackIconTypiconsKind.ZoomOutOutline, "M396 300h-208q-8 0 -14.5 6.5t-6.5 14.5t6.5 14.5t14.5 6.5h208q8 0 14.5 -6.5t6.5 -14.5t-6.5 -14.5t-14.5 -6.5zM662 135q38 -38 38 -92t-38 -92.5t-92 -38.5q-49 0 -88 33l-100 99q-48 -15 -90 -15q-121 0 -206.5 85.5t-85.5 206.5t85.5 206t206.5 85t206 -85t85 -206 q0 -47 -15 -91zM499 181q-27 -41 -68 -68l105 -104q15 -13 34 -13q20 0 33.5 14t13.5 33q0 21 -14 33zM83 321q0 -86 61.5 -147.5t147.5 -61.5t147 61.5t61 147.5t-61 147t-147 61t-147.5 -61t-61.5 -147z"}, }; } } }
498.385246
1,418
0.657775
[ "MIT" ]
GerHobbelt/MahApps.Metro.IconPacks
src/MahApps.Metro.IconPacks/PackIconTypiconsDataFactory.cs
182,411
C#
using OpenProtocolInterpreter.Messages; namespace OpenProtocolInterpreter.Job.Advanced { internal class AdvancedJobMessages : IMessagesTemplate { private readonly IMid _templates; public AdvancedJobMessages() { _templates = new Mid0121(new Mid0122(new Mid0123(new Mid0124(new Mid0125(new Mid0126(new Mid0127(new Mid0128(new Mid0129( new Mid0130(new Mid0131(new Mid0132(new Mid0133(new Mid0120(new Mid0140(null))))))))))))))); } public AdvancedJobMessages(System.Collections.Generic.IEnumerable<Mid> selectedMids) { _templates = MessageTemplateFactory.BuildChainOfMids(selectedMids); } public Mid ProcessPackage(string package) => _templates.Parse(package); public Mid ProcessPackage(byte[] package) => _templates.Parse(package); } }
35.04
133
0.679224
[ "MIT" ]
HelloWorldAgainAndAgain/OpenProtocolInterpreter
src/OpenProtocolInterpreter/Job/Advanced/AdvancedJobMessages.cs
878
C#
using System; using System.Collections.Generic; using System.IO; using System.Runtime.CompilerServices; using Microsoft.Diagnostics.Tracing.Parsers; using Microsoft.Diagnostics.Tracing.Parsers.Kernel; using Microsoft.Diagnostics.Tracing.Session; namespace Pri.Diligent { class Program { private static TextWriter Out; static void Main(string[] args) { Out = Console.Out; Out.WriteLine("Hello World!"); using (var session = new TraceEventSession("pri")) { void ConsoleOnCancelKeyPress(object sender, ConsoleCancelEventArgs e) { Console.CancelKeyPress -= ConsoleOnCancelKeyPress; session?.Dispose(); } Console.CancelKeyPress += ConsoleOnCancelKeyPress; session.EnableKernelProvider(KernelTraceEventParser.Keywords.Registry); session.Source.Kernel.RegistryCreate += KernelParser_RegistryCreate; session.Source.Kernel.RegistrySetValue += KernelParser_RegistrySetValue; session.Source.Kernel.RegistryDeleteValue += KernelParser_RegistryDeleteValue; session.Source.Kernel.RegistryDelete += KernelParser_RegistryDelete; session.Source.Kernel.RegistryKCBCreate += KernelParser_RegistryKCBCreate; session.Source.Kernel.RegistryKCBDelete += KernelParser_RegistryKCBDelete; session.Source.Kernel.RegistryKCBRundownBegin += Kernel_RegistryKCBRundownBegin; session.Source.Kernel.RegistryKCBRundownEnd += Kernel_RegistryKCBRundownEnd; Out.WriteLine("Collecting events"); session.Source.Process(); Out.WriteLine("Stopping collection of events"); } } private static void Kernel_RegistryKCBRundownBegin(RegistryTraceData obj) { Out.WriteLine($"RundownBegin {obj.KeyHandle}, {obj.KeyName}"); kcbDictionary.TryAdd(obj.KeyHandle, obj.KeyName); } private static void Kernel_RegistryKCBRundownEnd(RegistryTraceData obj) { Out.WriteLine($"RundownEnd {obj.KeyHandle}, {obj.KeyName}"); if (kcbDictionary.ContainsKey(obj.KeyHandle)) kcbDictionary.Remove(obj.KeyHandle); } static Dictionary<ulong, string> kcbDictionary = new Dictionary<ulong, string>(); private static void Dump(RegistryTraceData registryTraceData, [CallerMemberName] string memberName = null) { string fullKeyName; if (registryTraceData.KeyHandle == 0) { fullKeyName = registryTraceData.KeyName; } else { if (kcbDictionary.TryGetValue(registryTraceData.KeyHandle, out var baseKeyName)) fullKeyName = $"{baseKeyName}\\{registryTraceData.KeyName}"; else fullKeyName = $"...\\{registryTraceData.KeyName}"; } if(!string.IsNullOrWhiteSpace(memberName)) Console.WriteLine($"{memberName} {{"); Out.WriteLine($"\tProcess: {registryTraceData.ProcessName}, Key Name: {fullKeyName}, Value Name: {registryTraceData.ValueName}"); //Console.WriteLine($"\t{registryTraceData.Dump()}"); if (!string.IsNullOrWhiteSpace(memberName)) Console.WriteLine("}"); } private static void KernelParser_RegistryKCBDelete(RegistryTraceData obj) { if(kcbDictionary.ContainsKey(obj.KeyHandle)) kcbDictionary.Remove(obj.KeyHandle); } private static void KernelParser_RegistryKCBCreate(RegistryTraceData obj) { kcbDictionary.TryAdd(obj.KeyHandle, obj.KeyName); } private static void KernelParser_RegistryDelete(RegistryTraceData obj) { Dump(obj); } private static void KernelParser_RegistryDeleteValue(RegistryTraceData obj) { Dump(obj); } private static void KernelParser_RegistryCreate(RegistryTraceData obj) { Dump(obj); } private static void KernelParser_RegistrySetValue(RegistryTraceData obj) { Dump(obj); } } }
32.288288
132
0.758929
[ "MIT" ]
peteraritchie/Diligent
src/Program.cs
3,586
C#
//*********************************************************// // Copyright (c) Microsoft. All rights reserved. // // Apache 2.0 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 System; using System.Collections.Generic; using System.Text.RegularExpressions; using EnvDTE; using Microsoft.VisualStudio.TemplateWizard; namespace Microsoft.NodejsTools.ProjectWizard { class NodejsPackageParametersExtension : IWizard { public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) { var projectName = replacementsDictionary["$projectname$"]; replacementsDictionary.Add("$npmsafeprojectname$", NormalizeNpmPackageName(projectName)); } public void ProjectFinishedGenerating(EnvDTE.Project project) { return; } public void ProjectItemFinishedGenerating(ProjectItem projectItem) { return; } public bool ShouldAddProjectItem(string filePath) { return true; } public void BeforeOpeningFile(ProjectItem projectItem) { return; } public void RunFinished() { return; } private const int NpmPackageNameMaxLength = 214; /// <summary> /// Normalize a project name to be a valid Npm package name: https://docs.npmjs.com/files/package.json#name /// </summary> /// <param name="projectName">Name of a VS project.</param> private static string NormalizeNpmPackageName(string projectName) { // Remove all leading url-invalid, underscore, and period characters var npmProjectNameTransform = Regex.Replace(projectName, "^[^a-zA-Z0-9-~]*", string.Empty); // Replace all invalid characters with a dash npmProjectNameTransform = Regex.Replace(npmProjectNameTransform, "[^a-zA-Z0-9-_~.]", "-"); // Insert hyphens between camelcased sections. npmProjectNameTransform = Regex.Replace(npmProjectNameTransform, "([a-z0-9])([A-Z])", "$1-$2").ToLowerInvariant(); return npmProjectNameTransform.Substring(0, Math.Min(npmProjectNameTransform.Length, NpmPackageNameMaxLength)); } } }
40.414286
155
0.624249
[ "Apache-2.0" ]
Weflac/nodejstools
Nodejs/Product/ProjectWizard/NodejsPackageParametersExtension.cs
2,762
C#
namespace InteriorDesign.Services.Contracts { using System.Threading.Tasks; using Microsoft.AspNetCore.Http; public interface ICloudinaryService { Task<string> UploadProjectFileAsync(IFormFile projectFile, string fileName); Task DeleteImage(string url); } }
21.285714
84
0.724832
[ "MIT" ]
vanya-ant/InteriorDesign
InteriorDesign/Services/InteriorDesign.Services/Contracts/ICloudinaryService.cs
300
C#
// // Copyright (c) 2008-2011, Kenneth Bell // // 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. // namespace DiscUtils.BootConfig { /// <summary> /// The known formats used to store BCD values. /// </summary> public enum ElementFormat { /// <summary> /// Unknown format. /// </summary> None = 0, /// <summary> /// A block device, or partition. /// </summary> Device = 1, /// <summary> /// A unicode string. /// </summary> String = 2, /// <summary> /// A Globally Unique Identifier (GUID). /// </summary> Guid = 3, /// <summary> /// A GUID list. /// </summary> GuidList = 4, /// <summary> /// An integer. /// </summary> Integer = 5, /// <summary> /// A boolean. /// </summary> Boolean = 6, /// <summary> /// An integer list. /// </summary> IntegerList = 7 } }
30.140845
79
0.582243
[ "MIT" ]
ChaplinMarchais/DiscUtils
src/BootConfig/ElementFormat.cs
2,140
C#
// Copyright (c) SimpleIdServer. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. using SimpleIdServer.OAuth.Domains; using SimpleIdServer.OpenID.DTOs; using System.Collections.Generic; using System.Linq; using System.Security.Claims; namespace SimpleIdServer.OpenID.Extensions { public static class OAuthUserExtensions { private static Dictionary<string, string> CLAIM_MAPPINGS = new Dictionary<string, string> { { Jwt.Constants.UserClaims.Subject, ClaimTypes.NameIdentifier }, { Jwt.Constants.UserClaims.Name, ClaimTypes.Name }, { Jwt.Constants.UserClaims.Email, ClaimTypes.Email } }; public static bool HasOpenIDConsent(this OAuthUser user, string clientId, IEnumerable<string> scopes, IEnumerable<AuthorizationRequestClaimParameter> claims, AuthorizationRequestClaimTypes claimType = AuthorizationRequestClaimTypes.IdToken) { return user.GetConsent(clientId, scopes, claims, claimType) != null; } public static OAuthConsent GetConsent(this OAuthUser user, string clientId, IEnumerable<string> scopes, IEnumerable<AuthorizationRequestClaimParameter> claims, AuthorizationRequestClaimTypes claimType = AuthorizationRequestClaimTypes.IdToken) { return user.Consents.FirstOrDefault(c => c.ClientId == clientId && (scopes == null || (scopes.Where(s => s != SIDOpenIdConstants.StandardScopes.OpenIdScope.Name).All(s => c.Scopes.Any(sc => sc.Name == s)))) && (claims == null || (claims.Where(cl => cl.Type == claimType && cl.IsEssential && Jwt.Constants.USER_CLAIMS.Contains(cl.Name)) .All(cl => c.Claims.Any(scl => scl == cl.Name))))); } public static List<Claim> ToClaims(this OAuthUser oauthUser) { var claims = new List<Claim>(); foreach (var cl in oauthUser.Claims) { if (!CLAIM_MAPPINGS.ContainsKey(cl.Key)) { continue; } claims.Add(new Claim(CLAIM_MAPPINGS[cl.Key], cl.Value)); } return claims; } } }
46.020408
250
0.653659
[ "Apache-2.0" ]
RichardPilkington/SimpleIdServer
src/OpenID/SimpleIdServer.OpenID/Extensions/OAuthUserExtensions.cs
2,257
C#
using System.Runtime.InteropServices; namespace Gamer.Format.Cry.Core.Components { [StructLayout(LayoutKind.Explicit)] public struct ByteArray { [FieldOffset(0)] public byte byte1; [FieldOffset(1)] public byte byte2; [FieldOffset(2)] public byte byte3; [FieldOffset(3)] public byte byte4; [FieldOffset(0)] public uint uint1; [FieldOffset(0)] public int int1; [FieldOffset(0)] public float float1; } }
28.882353
46
0.631365
[ "MIT" ]
WildGenie/game-estates
src/Formats/Cry/src/Gamer.Format.Cry/Core/Components/ByteArray.cs
493
C#
using System; using System.Reflection; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; // 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("AWSSDK.Polly")] #if BCL35 [assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (3.5) - Amazon Polly. Amazon Polly is a service that turns text into lifelike speech, making it easy to develop applications that use high-quality speech to increase engagement and accessibility.")] #elif BCL45 [assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (4.5) - Amazon Polly. Amazon Polly is a service that turns text into lifelike speech, making it easy to develop applications that use high-quality speech to increase engagement and accessibility.")] #elif PCL [assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (PCL) - Amazon Polly. Amazon Polly is a service that turns text into lifelike speech, making it easy to develop applications that use high-quality speech to increase engagement and accessibility.")] #elif UNITY [assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (Unity) - Amazon Polly. Amazon Polly is a service that turns text into lifelike speech, making it easy to develop applications that use high-quality speech to increase engagement and accessibility.")] #elif NETSTANDARD13 [assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (NetStandard 1.3)- Amazon Polly. Amazon Polly is a service that turns text into lifelike speech, making it easy to develop applications that use high-quality speech to increase engagement and accessibility.")] #elif NETSTANDARD20 [assembly: AssemblyDescription("The Amazon Web Services SDK for .NET (NetStandard 2.0)- Amazon Polly. Amazon Polly is a service that turns text into lifelike speech, making it easy to develop applications that use high-quality speech to increase engagement and accessibility.")] #else #error Unknown platform constant - unable to set correct AssemblyDescription #endif [assembly: AssemblyConfiguration("")] [assembly: AssemblyProduct("Amazon Web Services SDK for .NET")] [assembly: AssemblyCompany("Amazon.com, Inc")] [assembly: AssemblyCopyright("Copyright 2009-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.")] [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)] // 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("3.3")] [assembly: AssemblyFileVersion("3.3.103.39")] #if WINDOWS_PHONE || UNITY [assembly: System.CLSCompliant(false)] # else [assembly: System.CLSCompliant(true)] #endif #if BCL [assembly: System.Security.AllowPartiallyTrustedCallers] #endif
56.322034
278
0.779416
[ "Apache-2.0" ]
dorki/aws-sdk-net
sdk/src/Services/Polly/Properties/AssemblyInfo.cs
3,323
C#
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Backend_ApiNetCore3_1.Domain.Models; namespace Backend_ApiNetCore3_1.Infra.Data.Mappings { public class PositionMap : IEntityTypeConfiguration<Position> { public void Configure(EntityTypeBuilder<Position> builder) { builder.ToTable("Position"); #region Keys builder.HasKey(p => p.Id); #endregion #region Properties builder.Property(p => p.Id) .HasColumnName("PositionId") .IsRequired(); #endregion #region Relations #endregion } } }
23.032258
66
0.603641
[ "MIT" ]
cristoffersantoro/Backend_ApiNetCore3_1
src/Backend_ApiNetCore3_1.Infra.Data/Mappings/PositionMap.cs
714
C#
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.ContractsLight; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using BuildXL.Cache.ContentStore.Exceptions; using BuildXL.Cache.ContentStore.Interfaces.Extensions; using BuildXL.Cache.ContentStore.Interfaces.FileSystem; using BuildXL.Cache.ContentStore.Interfaces.Results; using BuildXL.Cache.ContentStore.Interfaces.Stores; using BuildXL.Cache.ContentStore.Interfaces.Tracing; using BuildXL.Cache.ContentStore.Tracing; using BuildXL.Cache.ContentStore.Tracing.Internal; using BuildXL.Cache.ContentStore.Utils; using BuildXL.Utilities.Tracing; #nullable enable namespace BuildXL.Cache.ContentStore.Stores { /// <nodoc /> public enum QuotaKeeperCounters { /// <nodoc /> [CounterType(CounterType.Stopwatch)] PurgeCall = 1, /// <nodoc /> [CounterType(CounterType.Stopwatch)] ProcessQuotaRequest, } /// <summary> /// Quota rules use this to evict content. /// </summary> public delegate Task<EvictResult> EvictAsync(Context context, ContentHashWithLastAccessTimeAndReplicaCount contentHashInfo, bool onlyUnlinked); /// <summary> /// The entity that maintains and enforces the content quota. /// </summary> public sealed class QuotaKeeper : StartupShutdownBase { /// <summary> /// Public name for monitoring use. /// </summary> public const string Component = "QuotaKeeper"; private readonly ContentStoreInternalTracer _contentStoreTracer; private readonly Tracer _tracer; private readonly CancellationToken _token; private readonly IContentStoreInternal _store; private readonly BlockingCollection<QuotaRequest> _reserveQueue; private readonly ConcurrentQueue<ReserveSpaceRequest> _evictionQueue; private long _evictionQueueSize; private readonly object _evictionLock = new object(); private readonly List<IQuotaRule> _rules; /// <summary> /// The size of the entire content on disk. /// </summary> private long _allContentSize; /// <summary> /// The size of requested content (incremented at <see cref="ReserveAsync(long)"/> and decremented when the transaction is committed). /// </summary> private long _requestedSize; /// <summary> /// The size of the reserved content (incremented in <see cref="OnContentEvicted"/> and decremented when the transaction returned from <see cref="ReserveAsync(long)"/> is committed). /// This size is used for completing reservation requests that wait for a free space as soon as enough content is evicted. /// </summary> private long _reservedSize; /// <summary> /// Global long-running task to process all incoming requests. /// </summary> private Task? _processReserveRequestsTask; private readonly DistributedEvictionSettings _distributedEvictionSettings; private static readonly Task<PurgeResult> CompletedPurgeTask = Task.FromResult(new PurgeResult(reserveSize: 0, hashesToPurgeCount: 0, quotaDescription: null)); private Task<PurgeResult> _purgeTask = CompletedPurgeTask; private readonly object _purgeTaskLock = new object(); /// <inheritdoc /> protected override Tracer Tracer => _tracer; /// <summary> /// Gets performances counters for a current instance. /// </summary> public CounterCollection<QuotaKeeperCounters> Counters { get; } /// <nodoc /> public QuotaKeeper( IAbsFileSystem fileSystem, ContentStoreInternalTracer tracer, QuotaKeeperConfiguration configuration, CancellationToken token, IContentStoreInternal store) { _contentStoreTracer = tracer; _tracer = new Tracer(name: Component); _allContentSize = configuration.ContentDirectorySize; _token = token; _store = store; _reserveQueue = new BlockingCollection<QuotaRequest>(); _evictionQueue = new ConcurrentQueue<ReserveSpaceRequest>(); _distributedEvictionSettings = configuration.DistributedEvictionSettings; _rules = CreateRules(fileSystem, configuration, store); Counters = new CounterCollection<QuotaKeeperCounters>(); } /// <nodoc /> public static QuotaKeeper Create( IAbsFileSystem fileSystem, ContentStoreInternalTracer tracer, CancellationToken token, IContentStoreInternal store, QuotaKeeperConfiguration configuration) { Contract.RequiresNotNull(fileSystem); Contract.RequiresNotNull(tracer); Contract.RequiresNotNull(configuration); return new QuotaKeeper(fileSystem, tracer, configuration, token, store); } /// <inheritdoc /> protected override async Task<BoolResult> StartupCoreAsync(OperationContext context) { // Potential error is already traced by Calibrate method. Ignore the result to avoid double reporting. await CalibrateAllAsync(context).IgnoreFailure(); // Processing requests is a long running operation. Scheduling it into a dedicated thread to avoid thread pool exhaustion. _processReserveRequestsTask = Task.Factory.StartNew( () => ProcessReserveRequestsAsync(context.CreateNested()), TaskCreationOptions.LongRunning).Unwrap(); // Start purging immediately on startup to clear out residual content in the cache // over the cache quota if configured. const string Operation = "PurgeRequest"; SendPurgeRequest(context, "Startup").FireAndForget(context, Operation); return BoolResult.Success; } /// <inheritdoc /> protected override async Task<BoolResult> ShutdownCoreAsync(OperationContext context) { // Need to notify the requests queue that there would be no more new requests. _reserveQueue.CompleteAdding(); if (_processReserveRequestsTask != null) { context.TraceDebug($"{_tracer.Name}: waiting for pending reservation requests."); await _processReserveRequestsTask; } if (!_purgeTask.IsCompleted) { context.TraceDebug($"{_tracer.Name}: waiting for purge task."); return await _purgeTask; } return BoolResult.Success; } /// <summary> /// Forces all the existing rules to calibrate themselves. /// </summary> public void Calibrate() { if (_rules.Any(r => r.CanBeCalibrated)) { var request = QuotaRequest.Calibrate(); _reserveQueue.Add(request); } } /// <inheritdoc /> protected override void DisposeCore() { base.DisposeCore(); _reserveQueue.Dispose(); } /// <summary> /// Completes all the pending operations (like reservation and/or calibration requests). /// </summary> public Task SyncAsync(Context context, bool purge) { var operationContext = new OperationContext(context); return operationContext.PerformOperationAsync( _tracer, () => syncCoreAsync()); async Task<BoolResult> syncCoreAsync() { await _purgeTask.ThrowIfFailure(); // Ensure there are no pending requests. await SendSyncRequest(operationContext, purge).ThrowIfFailure(); await _purgeTask.ThrowIfFailure(); return BoolResult.Success; } } private List<IQuotaRule> CreateRules( IAbsFileSystem fileSystem, QuotaKeeperConfiguration configuration, IContentStoreInternal store) { var rules = new List<IQuotaRule>(); var distributedEvictionSettings = configuration.DistributedEvictionSettings; if (configuration.EnableElasticity) { var elasticSizeRule = new ElasticSizeRule( configuration.HistoryWindowSize, configuration.InitialElasticSize, EvictContentAsync, () => CurrentSize, store.ReadPinSizeHistory, fileSystem, store.RootPath, distributedEvictionSettings: distributedEvictionSettings); rules.Add(elasticSizeRule); } else { if (configuration.MaxSizeQuota != null) { rules.Add(new MaxSizeRule(configuration.MaxSizeQuota, EvictContentAsync, () => CurrentSize, distributedEvictionSettings)); } if (configuration.DiskFreePercentQuota != null) { rules.Add(new DiskFreePercentRule(configuration.DiskFreePercentQuota, EvictContentAsync, fileSystem, store.RootPath, distributedEvictionSettings)); } } if (!rules.Any()) { throw new CacheException("At least one quota rule must be defined"); } return rules; } private Task<BoolResult> SendPurgeRequest(OperationContext context, string reason) { return context.PerformOperationAsync( _tracer, () => { var emptyRequest = QuotaRequest.Purge(); _reserveQueue.Add(emptyRequest); return emptyRequest.CompletionAsync(); }, traceErrorsOnly: true); } private Task<BoolResult> SendSyncRequest(OperationContext context, bool purge) { if (purge) { return SendPurgeRequest(context, "Sync"); } return context.PerformOperationAsync( _tracer, () => { var emptyRequest = QuotaRequest.Synchronize(); _reserveQueue.Add(emptyRequest); return emptyRequest.CompletionAsync(); }); } /// <summary> /// Reserve room for specified content size. /// </summary> /// <exception cref="CacheException">The exception is thrown if the reservation fails.</exception> public async Task<ReserveTransaction> ReserveAsync(long contentSize) { Contract.Assert(contentSize >= 0); ShutdownStartedCancellationToken.ThrowIfCancellationRequested(); var reserveRequest = QuotaRequest.Reserve(contentSize); // To avoid potential race condition need to increase size first and only after that to add the request into the queue. IncreaseSize(ref _requestedSize, reserveRequest.ReserveSize); _reserveQueue.Add(reserveRequest); BoolResult result = await reserveRequest.CompletionAsync(); if (!result) { throw new CacheException($"Failed to reserve space for content size=[{contentSize}], result=[{result}]"); } return new ReserveTransaction(reserveRequest, OnReservationCommitted); } /// <nodoc /> internal async Task<EvictResult> EvictContentAsync(Context context, ContentHashWithLastAccessTimeAndReplicaCount contentHashInfo, bool onlyUnlinked) { var evictResult = await _store.EvictAsync(context, contentHashInfo, onlyUnlinked, evicted: null); if (evictResult.SuccessfullyEvictedHash) { OnContentEvicted(evictResult.EvictedSize); } return evictResult; } private async Task<BoolResult> CalibrateAllAsync(Context context) { BoolResult result = BoolResult.Success; foreach (var rule in _rules.Where(r => r.CanBeCalibrated)) { var calibrationResult = await CalibrateAsync(context, rule); if (!calibrationResult) { result &= calibrationResult; } } return result; } private Task<CalibrateResult> CalibrateAsync(Context context, IQuotaRule rule) { var operationContext = new OperationContext(context, _token); return operationContext.PerformOperationAsync( _tracer, async () => { if (!rule.CanBeCalibrated) { return CalibrateResult.CannotCalibrate; } if (ShouldAbortOperation(context, "Calibrate", out var reason)) { return new CalibrateResult(reason); } return await rule.CalibrateAsync(); }); } private bool ShouldAbortOperation(Context context, string operation, [NotNullWhen(true)]out string? reason) { reason = null; if (_token.IsCancellationRequested) { reason = $"{operation} exiting due to shutdown."; _tracer.Debug(context, reason); } return reason != null; } /// <summary> /// Gets the current number of content bytes. /// </summary> public long CurrentSize => Thread.VolatileRead(ref _allContentSize); /// <summary> /// Helper method for handling <see cref="QuotaRequest"/> /// </summary> private async Task<BoolResult> ProcessQuotaRequestAsync(Context context, QuotaRequest request) { if (request is CalibrateQuotaRequest) { return await CalibrateAllAsync(context); } if (request is SynchronizationRequest) { // Do nothing for synchronization. return BoolResult.Success; } var reserveQuota = request as ReserveSpaceRequest; Contract.AssertNotNull(reserveQuota); // Here is a reservation logic // 1. If above hard limit // "wait" for eviction to free enough space to fit new content // Complete the request if eviction is successful // 2. If above soft limit // Start the eviction if needed (and print message why the eviction should start) // Compete the request // 3. Below soft limit // Complete the request var reserveSize = reserveQuota.ReserveSize; if (IsAboveHardLimit(reserveSize, out var exceedReason)) { // Now we should wait for eviction until enough space is freed. var evictionResult = await EvictUntilTheHardLimitAsync(context, reserveSize, exceedReason); if (evictionResult) { // Eviction was successful, need to track it to reduce the reserved size that was increased by eviction. reserveQuota.IsReservedFromEviction = true; } else { _tracer.Debug(context, $"{Component}: EvictUntilTheHardLimitAsync failed with " + evictionResult); // Eviction may fail, but this could be fine if all the rules that above the hard limit can be calibrated. return SuccessIfOnlyCalibrateableRulesAboveHardLimit(context, reserveSize); } return evictionResult; } if (IsAboveSoftLimit(reserveSize, out exceedReason)) { StartPurgeIfNeeded(context, reason: $"soft limit surpassed. {exceedReason}"); } return BoolResult.Success; } private BoolResult SuccessIfOnlyCalibrateableRulesAboveHardLimit(Context context, long reserveSize) { var rulesNotInsideHardLimit = _rules.Where(rule => !rule.IsInsideHardLimit(reserveSize).Succeeded).ToList(); var rulesCannotBeCalibratedResults = rulesNotInsideHardLimit.Where(rule => !rule.CanBeCalibrated) .Select(rule => rule.IsInsideHardLimit(reserveSize)) .ToList(); if (rulesCannotBeCalibratedResults.Any()) { // Some rule has reached its hard limit, and its quota cannot be calibrated. var sb = new StringBuilder(); sb.AppendLine("Error: Failed to make space.") .AppendLine($"Current size={CurrentSize}."); foreach (var ruleResult in rulesCannotBeCalibratedResults) { sb.AppendLine($"Hard limit surpassed. {ruleResult.ErrorMessage}"); } return new BoolResult(sb.ToString()); } // All rules that reached their hard limits can be calibrated. We will disable such rules temporarily until calibration. foreach (var rule in rulesNotInsideHardLimit.Where(rule => rule.CanBeCalibrated)) { _tracer.Debug(context, $"Disabling rule '{rule}'."); rule.IsEnabled = false; } return BoolResult.Success; } private bool IsAboveSoftLimit(long size, [NotNullWhen(true)]out string? exceedReason) { foreach (var rule in _rules) { var checkResult = rule.IsInsideSoftLimit(size); if (!checkResult) { exceedReason = checkResult.ErrorMessage; return true; } } exceedReason = null; return false; } private bool IsAboveHardLimit(long size, [NotNullWhen(true)]out string? exceedReason) { foreach (var rule in _rules) { var checkResult = rule.IsInsideHardLimit(size); if (!checkResult) { exceedReason = checkResult.ErrorMessage; return true; } } exceedReason = null; return false; } /// <summary> /// Returns true if the purge process should be stopped. /// </summary> internal bool StopPurging([NotNullWhen(true)]out string? stopReason, [NotNullWhen(true)]out IQuotaRule? activeRule) { activeRule = null; var reserveSize = _requestedSize; if (_token.IsCancellationRequested) { stopReason = "cancellation requested"; return true; } foreach (var rule in _rules) { var isInsideTargetLimit = rule.IsInsideTargetLimit(reserveSize); if (!isInsideTargetLimit) { activeRule = rule; stopReason = null; return false; } } stopReason = "inside target limit"; return true; } private void StartPurgeIfNeeded(Context context, string reason) { if (_purgeTask.IsCompleted) { lock (_purgeTaskLock) { if (_purgeTask.IsCompleted) { _tracer.Debug(context, $"{Component}: Purge stated because {reason}. Current Size={CurrentSize}"); _purgeTask = Task.Run(() => PurgeAsync(context)); } } } } /// <summary> /// Notifies the keeper that content of a given size is evicted. /// </summary> public void OnContentEvicted(long size) { DecreaseSize(ref _allContentSize, size); lock (_evictionLock) { // Track freed space to unblock reservations which could fit in evicted space. while (_evictionQueue.TryPeek(out var evictionRequest)) { IncreaseSize(ref _reservedSize, evictionRequest.ReserveSize); // Tracking reserved size to prevent the following race: // Hard Limit = 100, Current Size = 93, Eviction Requests: 9 and 9 // Evicted 3 bytes // Current Size = 90, Evicted Size = 3, evictionRequest.ReserveSize = 9 // We should complete only the first request and keep the second one until the next eviction. // To achieve this, we track the reserved size bytes inside (in _reservedSize) that is increased here // and decreased once reservation transaction is committed. if (IsAboveHardLimit(_reservedSize, out _)) { // There is not enough content evicted. None of the requests can be completed. Need to wait for another eviction. return; } if (_evictionQueue.TryDequeue(out _)) { Interlocked.Decrement(ref _evictionQueueSize); } // Finishing eviction request to unblock the reservation request. evictionRequest.Success(); } } } private Task<BoolResult> EvictUntilTheHardLimitAsync(Context context, long reserveSize, string purgeReason) { // Hard limit surpassed. // Need to create eviction request first and then start purging if needed. // The order matters to avoid subtle race condition: purger needs to see the new request. var evictionRequest = QuotaRequest.Reserve(reserveSize); _evictionQueue.Enqueue(evictionRequest); Interlocked.Increment(ref _evictionQueueSize); StartPurgeIfNeeded(context, reason: $"hard limit surpassed. {purgeReason}"); return evictionRequest.CompletionAsync(); } private async Task<PurgeResult> PurgeAsync(Context context) { var operationContext = new OperationContext(context); var operationResult = await operationContext.PerformOperationAsync( _tracer, async () => { var finalPurgeResult = new PurgeResult(); PurgeResult? purgeResult = null; do { purgeResult = await PurgeCoreAsync(operationContext); if (purgeResult) { finalPurgeResult.Merge(purgeResult); } } while (ContinuePurging(purgeResult)); // Saving current content size for tracing purposes. finalPurgeResult.CurrentContentSize = CurrentSize; return finalPurgeResult; }, Counters[QuotaKeeperCounters.PurgeCall], traceErrorsOnly: true); // the results are traced explicitely by contentStoreTracer // Tests rely on the PurgeCount to be non-0. _contentStoreTracer.PurgeStop(context, operationResult); return operationResult; } private Task<PurgeResult> PurgeCoreAsync(OperationContext context) { // This operation must be exception safe, because otherwise QuotaKeeper will keep // unprocessed requests that may cause ShutdownAsync operation to hang forever. return context.PerformOperationAsync( Tracer, async () => { // Check for cancellation token and other reasons why to immediately stop the purge. if (ShouldAbortOperation(context, "Purge", out var message)) { // Error will force the purge loop to stop. return new PurgeResult(message); } else { // Trying to purge the content var contentHashesWithInfo = await _store.GetLruOrderedContentListWithTimeAsync(); var purger = CreatePurger(context, contentHashesWithInfo); return await purger.PurgeAsync(); } }, traceErrorsOnly: true); } private Purger CreatePurger(Context context, IReadOnlyList<ContentHashWithLastAccessTimeAndReplicaCount> contentHashesWithInfo) { long reserveSize = Interlocked.Read(ref _requestedSize); var purger = new Purger( context, this, _distributedEvictionSettings, contentHashesWithInfo, new PurgeResult(reserveSize, contentHashesWithInfo.Count, $"[{string.Join(", ", _rules.Select(r => r.Quota))}]"), _token); return purger; } private bool ContinuePurging(PurgeResult purgeResult) { lock (_purgeTaskLock) { if (purgeResult.EvictedFiles == 0) { // Need to terminate all the eviction requests. while (_evictionQueue.TryDequeue(out var request)) { request.Failure($"Failed to free space. Eviction result: {purgeResult}."); } } if (_evictionQueue.IsEmpty) { _purgeTask = CompletedPurgeTask; return false; } } return true; } private async Task ProcessReserveRequestsAsync(Context context) { context.Debug($"{Component}: Starting reservation processing loop. Current content size={CurrentSize}"); var operationContext = new OperationContext(context); long requestCount = 0; foreach (var request in _reserveQueue.GetConsumingEnumerable()) { requestCount++; try { // To avoid too many trace messages, we trace only every 1 request out of 1000 bool traceRequest = (requestCount % 1000) == 0; var result = await operationContext.PerformOperationAsync( _tracer, () => ProcessQuotaRequestAsync(context, request), extraEndMessage: r => $"Request='{request}'. CurrentContentSize={CurrentSize}. Request#={requestCount}", caller: nameof(ProcessQuotaRequestAsync), counter: Counters[QuotaKeeperCounters.ProcessQuotaRequest], traceOperationStarted: false, traceOperationFinished: traceRequest); if (result) { if (request is ReserveSpaceRequest reserveRequest) { // When the reservation succeeds, the reserved size should fit under the hard limit (unless sensitive sessions are presented). if (IsAboveHardLimit(reserveRequest.ReserveSize, out var message)) { Contract.Assert(false, $"Reservation request is successful but still below hard quota. {message}"); } } // The order matters here: we need to change the instance state first before completing the request. request.Success(); } else { request.Failure(result.ToString()); } } catch (Exception e) { _tracer.Error(context, $"{Component}: Purge loop failed for '{request}' with unexpected error: {e}"); } } } private void OnReservationCommitted(ReserveSpaceRequest reserveSpaceRequest) { // TODO: check that reservation was never called with -1 sizes. // TODO: add a comment that the order matters. IncreaseSize(ref _allContentSize, reserveSpaceRequest.ReserveSize); DecreaseSize(ref _requestedSize, reserveSpaceRequest.ReserveSize); if (reserveSpaceRequest.IsReservedFromEviction) { // If the request was completed because of eviction, then we should reduce the reserved size to // allow other requests to be completed during eviction. DecreaseSize(ref _reservedSize, reserveSpaceRequest.ReserveSize); } } private void DecreaseSize(ref long size, long delta) { Contract.Assert(delta >= 0); long newSize = Interlocked.Add(ref size, -1 * delta); Contract.Assert(newSize >= 0); } private void IncreaseSize(ref long size, long delta) { Contract.Assert(delta >= 0); Interlocked.Add(ref size, delta); } } }
39.226986
191
0.550808
[ "MIT" ]
dmgonch/BuildXL
Public/Src/Cache/ContentStore/Library/Stores/QuotaManagement/QuotaKeeper.cs
31,107
C#
namespace T3DSharpFramework.Generated.Enums.Global { /// public enum VPathObjectOrientationType { FREE = 0, INTERPOLATE = 1, TOPATH = 2, TOOBJECT = 3, TOPOINT = 4 } /// public enum VPathNodeOrientationType { FREE = 0, TOPOINT = 1 } /// public enum VPathEditorMode { GIZMO = 0, ADDNODE = 1, DELETENODE = 2 } /// public enum VPathType { BEZIER = 1, LINEAR = 0 } /// public enum VScriptEventCommandType { EXPRESSION = 0, METHOD = 1 } /// public enum VDataTableDataType { EXPRESSION = 0, STATIC = 1, VARIABLE = 2 } /// public enum VActionToggle { ON = 0, OFF = 1 } /// <description> /// The method used to include water surfaces in the NavMesh. /// </description> public enum NavMeshWaterMethod { Ignore = 0, Solid = 1, Impassable = 2 } /// <description> /// The size of a cover point. /// </description> public enum CoverPointSize { Prone = 0, Crouch = 1, Stand = 2 } /// <description> /// Possible wave operation types. /// </description> public enum afxXM_WaveOpType { Add = 0, Multiply = 1, Replace = 2, Mult = 1 } /// <description> /// Possible wave parameter types. /// </description> public enum afxXM_WaveParamType { None = 0, Pos = 1, Pos_x = 2, Pos_y = 3, Pos_z = 4, Ori = 5, Pos2 = 6, Pos2_x = 7, Pos2_y = 8, Pos2_z = 9, Scale = 10, Scale_x = 11, Scale_y = 12, Scale_z = 13, Color = 14, Color_red = 15, Color_green = 16, Color_blue = 17, Color_alpha = 18, Vis = 19, Position = 1, Position_x = 2, Position_y = 3, Position_z = 4, Orientation = 5, Position2 = 6, Position2_x = 7, Position2_y = 8, Position2_z = 9, Color_r = 15, Color_g = 16, Color_b = 17, Color_a = 18, Visibility = 19 } /// <description> /// Possible waveform types. /// </description> public enum afxXM_WaveFormType { None = 0, Sine = 1, Square = 2, Triangle = 3, Sawtooth = 4, Noise = 5, One = 6 } /// <description> /// Possible box conform alignment types. /// </description> public enum afxXM_BoxConformType { Plusx = 0, Minusx = 1, Plusy = 2, Minusy = 3, Plusz = 4, Minusz = 5, X = 0, Y = 2, Z = 4 } /// <description> /// Possible loop types for an afxPath. /// </description> public enum afxPath3DLoopType { Constant = 0, Cycle = 1, Oscillate = 2 } /// <description> /// Possible particle pool types. /// </description> public enum afxParticlePool_PoolType { Normal = 0, Twominuspass = 1, Twopass = 1 } /// <description> /// Possible RPG spell target types. /// </description> public enum afxRPGMagicSpell_TargetType { Nothing = 0, Self = 1, Friend = 2, Enemy = 3, Corpse = 4, Free = 5 } /// <description> /// Possible zodiac plane facing types. /// </description> public enum afxZodiacPlane_FacingType { Up = 0, Down = 1, Forward = 2, Backward = 3, Right = 4, Left = 5, Front = 2, Back = 3 } /// <description> /// Possible zodiac blend types. /// </description> public enum afxZodiacPlane_BlendType { Normal = 0, Additive = 1, Subtractive = 2 } /// <description> /// Possible zodiac blend types. /// </description> public enum afxZodiac_BlendType { Normal = 0, Additive = 1, Subtractive = 2 } /// <description> /// Possible projectile launch direction types. /// </description> public enum afxProjectile_LaunchDirType { TowardPos2Constraint = 0, OrientConstraint = 1, LaunchDirField = 2 } /// <description> /// Possible player movement operation types. /// </description> public enum afxPlayerMovement_OpType { Add = 0, Multiply = 1, Replace = 2, Mult = 1 } /// <description> /// Possible phrase effect types. /// </description> public enum afxPhraseEffect_PhraseType { Triggered = 0, Continuous = 1 } /// <description> /// Possible phrase effect state types. /// </description> public enum afxPhraseEffect_StateType { On = 1, Off = 2, Both = 3 } /// <description> /// Possible phrase effect match types. /// </description> public enum afxPhraseEffect_MatchType { Any = 0, All = 1 } /// <description> /// Possible particle emitter path origin types. /// </description> public enum afxParticleEmitterPath_OriginType { Origin = 0, Point = 1, Vector = 2, Tangent = 3 } /// <description> /// Possible texture function types. /// </description> public enum afxBillboard_TexFuncType { Replace = 0, Modulate = 1, Add = 2 } /// <description> /// Possible blending types. /// </description> public enum afxBillboard_BlendStyle { NORMAL = 1, ADDITIVE = 2, SUBTRACTIVE = 3, PREMULTALPHA = 4 } /// <description> /// An enumeration of battery levels of a joystick. /// </description> public enum SDLPowerEnum { Unknown = -1, Empty = 0, Low = 1, Medium = 2, Full = 3, Wired = 4, Max = 5 } /// <description> /// The type of device connected. /// </description> public enum SDLJoystickType { Unknown = 0, Game_Controller = 1, Wheel = 2, Arcade_Stick = 3, Flight_Stick = 4, Dance_Pad = 5, Guitar = 6, Drum_Kit = 7, Arcade_Pad = 8, Throttle = 9 } /// <description> /// GuiSeparatorCtrl orientations /// </description> public enum GuiSeparatorType { Vertical = 0, Horizontal = 1 } /// public enum GuiParticleGraphType { Bar = 3, Filled = 2, Point = 0, Polyline = 1 } /// <description> /// The charting style of a single plotting curve in a GuiGraphCtrl. /// </description> public enum GuiGraphType { Bar = 3, Filled = 2, Point = 0, PolyLine = 1 } /// <description> /// Active brush mode type. /// </description> public enum ForestBrushMode { Paint = 0, Erase = 1, EraseSelected = 2 } /// <description> /// How to snap when snapping is enabled. /// </description> public enum WorldEditorAlignmentType { None = 0, PlusX = 1, PlusY = 2, PlusZ = 3, MinusX = 4, MinusY = 5, MinusZ = 6 } /// <description> /// How to drop objects when placed or dropped in the world. /// </description> public enum WorldEditorDropType { AtOrigin = 0, AtCamera = 1, AtCameraRot = 2, BelowCamera = 3, ScreenCenter = 4, AtCentroid = 5, ToTerrain = 6, BelowSelection = 7, AtGizmo = 8 } /// public enum GizmoMode { None = 0, Move = 1, Rotate = 2, Scale = 3 } /// <description> /// Whether the gizmo should be aligned with the world, or with the object. /// </description> public enum GizmoAlignment { World = 0, Object = 1 } /// <description> /// Routine to use for converting Theora's Y'CbCr pixel format to RGB color space. /// </description> public enum GuiTheoraTranscoder { Auto = 0, Generic = 1, SSE2420RGBA = 2 } /// public enum ShadowType { Spot = 0, PSSM = 1, DualParaboloidSinglePass = 3, DualParaboloid = 4, CubeMap = 5 } /// <description> /// The shadow filtering modes for Advanced Lighting shadows. /// </description> public enum ShadowFilterMode { None = 0, SoftShadow = 1, SoftShadowHighQuality = 2 } /// public enum _TamlFormatMode { Xml = 1, Binary = 2 } /// <description> /// Type of mesh data available in a shape. /// </description> public enum ImageAssetType { Albedo = 0, Normal = 1, PBRConfig = 2, GUI = 3, Roughness = 4, AO = 5, Metalness = 6, Glow = 7, Particle = 8, Decal = 9, Cubemap = 10 } /// <description> /// Type of mesh data available in a shape. /// </description> public enum ReflectionModeEnum { No_Reflections = 0, Static_Cubemap = 1, Baked_Cubemap = 2, Dynamic_Cubemap = 5 } /// <description> /// Type of mesh data available in a shape. /// </description> public enum ReflectProbeType { Sphere = 1, Box = 0 } /// <summary>How the weapons are linked to triggers for this TurretShape.</summary> /// <description> /// /// </description> public enum TurretShapeFireLinkType { FireTogether = 0, GroupedFire = 1, IndividualFire = 2 } /// <description> /// How to handle the physics simulation with the client's and server. /// </description> public enum PhysicsSimType { ClientOnly = 0, ServerOnly = 1, ClientServer = 2 } /// <description> /// The type of visual blending style to apply to the particles. /// </description> public enum ParticleBlendStyle { NORMAL = 1, ADDITIVE = 2, SUBTRACTIVE = 3, PREMULTALPHA = 4 } /// <description> /// Type of mesh data available in a shape. /// </description> public enum TSMeshType { None = 0, Bounds = 1, Collision_Mesh = 2, Visible_Mesh = 3 } /// <summary>The type of light to attach to this ShapeBaseImage.</summary> /// <description> /// /// </description> public enum ShapeBaseImageLightType { NoLight = 0, ConstantLight = 1, SpotLight = 2, PulsingLight = 3, WeaponFireLight = 4 } /// <summary>What kind of recoil this ShapeBaseImage should emit when fired.</summary> /// <description> /// /// </description> public enum ShapeBaseImageRecoilState { NoRecoil = 0, LightRecoil = 1, MediumRecoil = 2, HeavyRecoil = 3 } /// <summary>How the spin animation should be played.</summary> /// <description> /// /// </description> public enum ShapeBaseImageSpinState { Ignore = 0, Stop = 1, SpinUp = 2, SpinDown = 3, FullSpeed = 4 } /// <summary>The loaded state of this ShapeBaseImage.</summary> /// <description> /// /// </description> public enum ShapeBaseImageLoadedState { Ignore = 0, Loaded = 1, Empty = 2 } /// <summary>The pose of the Player.</summary> /// <description> /// /// </description> public enum PlayerPose { Stand = 0, Sprint = 1, Crouch = 2, Prone = 3, Swim = 4 } /// <description> /// Possible physical zone force types. /// </description> public enum PhysicalZone_ForceType { Vector = 0, Spherical = 1, Cylindrical = 2, Sphere = 1, Cylinder = 2 } /// <summary>The type of light the Item has</summary> /// <description> /// /// </description> public enum ItemLightType { NoLight = 0, ConstantLight = 1, PulsingLight = 2 } /// <description> /// Movement behavior type for Camera. /// </description> public enum CameraMotionMode { Stationary = 0, FreeRotate = 1, Fly = 2, OrbitObject = 3, OrbitPoint = 4, TrackObject = 5, Overhead = 6, EditOrbit = 7 } /// <description> /// Specifies how the viewport should be set up for a PostEffect's target. /// </description> /// <remarks> Applies to both the diffuse target and the depth target (if defined). /// </remarks> public enum PFXTargetViewport { PFXTargetViewport_TargetSize = 0, PFXTargetViewport_GFXViewport = 1, PFXTargetViewport_NamedInTexture0 = 2 } /// <description> /// Describes when the target texture should be cleared /// </description> public enum PFXTargetClear { PFXTargetClear_None = 0, PFXTargetClear_OnCreate = 1, PFXTargetClear_OnDraw = 2 } /// <description> /// When to process this effect during the frame. /// </description> public enum PFXRenderTime { PFXBeforeBin = 0, PFXAfterBin = 1, PFXAfterDiffuse = 2, PFXEndOfFrame = 3, PFXTexGenOnDemand = 4 } /// <description> /// Style of rendering for a GuiTSCtrl. /// </description> public enum GuiTSRenderStyles { Standard = 0, Stereo_side_by_side = 1, Stereo_separate = 2 } /// public enum TSShapeConstructorAnimType { Frames = 0, Seconds = 1, Milliseconds = 1000 } /// public enum TSShapeConstructorLodType { DetectDTS = 0, SingleSize = 1, TrailingNumber = 2 } /// <description> /// Axis to use for upwards direction when importing from Collada. /// </description> public enum TSShapeConstructorUpAxis { X_AXIS = 0, Y_AXIS = 1, Z_AXIS = 2, DEFAULT = 3 } /// <description> /// Description /// </description> public enum baseTexFormat { NONE = 0, DDS = 1, PNG = 2 } /// <description> /// The type of knot that this marker will be. /// </description> public enum MarkerKnotType { Normal = 0, Position_Only = 1, Kink = 2 } /// <description> /// The type of smoothing this marker will have for pathed objects. /// </description> public enum MarkerSmoothingType { Spline = 1, Linear = 0 } /// <description> /// What size to render the target texture. Sizes are based on the Window the render is occuring in. /// </description> public enum RenderTexTargetSize { Windowsize = 0, Windowsizescaled = 1, Fixedsize = 2 } /// <description> /// When using the Wave material animation, one of these Wave Types will be used to determine the type of wave to display. /// </description> public enum MaterialWaveType { Sin = 0, Triangle = 1, Square = 2 } /// <description> /// The type of graphical blending operation to apply to this material /// </description> public enum MaterialBlendOp { None = 0, Mul = 1, PreMul = 2, Add = 3, AddAlpha = 4, Sub = 5, LerpAlpha = 6 } /// <description> /// The type of animation effect to apply to this material. /// </description> public enum MaterialAnimType { Scroll = 1, Rotate = 2, Wave = 4, Scale = 8, Sequence = 16 } /// public enum GuiFontCharset { ANSI = 0, SYMBOL = 1, SHIFTJIS = 2, HANGEUL = 3, HANGUL = 4, GB2312 = 5, CHINESEBIG5 = 6, OEM = 7, JOHAB = 8, HEBREW = 9, ARABIC = 10, GREEK = 11, TURKISH = 12, VIETNAMESE = 13, THAI = 14, EASTEUROPE = 15, RUSSIAN = 16, MAC = 17, BALTIC = 18 } /// public enum GuiAlignmentType { Left = 0, Center = 2, Right = 1, Top = 3, Bottom = 4 } /// <description> /// Vertical sizing behavior of a GuiControl. /// </description> public enum GuiVerticalSizing { Bottom = 0, Height = 1, Top = 2, Center = 3, Relative = 4, AspectTop = 5, AspectBottom = 6, AspectCenter = 7, WindowRelative = 8 } /// <description> /// Horizontal sizing behavior of a GuiControl. /// </description> public enum GuiHorizontalSizing { Right = 0, Width = 1, Left = 2, Center = 3, Relative = 4, AspectLeft = 5, AspectRight = 6, AspectCenter = 7, WindowRelative = 8 } /// public enum GuiGradientPickMode { HorizColor = 0, HorizAlpha = 1 } /// public enum GuiColorPickMode { Pallete = 0, HorizColor = 1, VertColor = 2, HorizBrightnessColor = 3, VertBrightnessColor = 4, BlendColor = 5, HorizAlpha = 6, VertAlpha = 7, Dropper = 8 } /// <description> /// Where the control should put the tab headers for selecting individual pages. /// </description> public enum GuiTabPosition { Top = 0, Bottom = 1 } /// <description> /// Determines how child controls are stacked vertically. /// </description> public enum GuiVerticalStackingType { Top_to_Bottom = 0, Bottom_to_Top = 1 } /// <description> /// Determines how child controls are stacked horizontally. /// </description> public enum GuiHorizontalStackingType { Left_to_Right = 0, Right_to_Left = 1 } /// <description> /// Stacking method used to position child controls. /// </description> public enum GuiStackingType { Vertical = 0, Horizontal = 1, Dynamic = 2 } /// <description> /// Which side of the splitter to keep at a fixed size (if any). /// </description> public enum GuiSplitFixedPanel { None = 0, FirstPanel = 1, SecondPanel = 2 } /// <description> /// Axis along which to divide the container's space. /// </description> public enum GuiSplitOrientation { Vertical = 0, Horizontal = 1 } /// <description> /// Display behavior of a scroll bar. Determines when a scrollbar will be visible. /// </description> public enum GuiScrollBarBehavior { AlwaysOn = 0, AlwaysOff = 1, Dynamic = 2 } /// public enum GuiFrameState { AlwaysOn = 0, AlwaysOff = 1, Dynamic = 2 } /// public enum GuiDockingType { None = 1, Client = 2, Top = 4, Bottom = 8, Left = 16, Right = 32 } /// <description> /// Direction in which to scroll the child control. /// </description> public enum GuiAutoScrollDirection { Up = 0, Down = 1, Left = 2, Right = 3 } /// public enum GuiIconButtonIconLocation { None = 0, Left = 1, Right = 2, Center = 3 } /// public enum GuiIconButtonTextLocation { None = 0, Bottom = 1, Right = 2, Top = 3, Left = 4, Center = 5 } /// <description> /// Type of button control. /// </description> public enum GuiButtonType { PushButton = 0, ToggleButton = 1, RadioButton = 2 } /// <description> /// Rendering behavior when placing bitmaps in controls. /// </description> public enum GuiBitmapMode { Stretched = 0, Centered = 1 } /// <description> /// The blend operators. /// </description> public enum GFXBlendOp { GFXBlendOpAdd = 0, GFXBlendOpSubtract = 1, GFXBlendOpRevSubtract = 2, GFXBlendOpMin = 3, GFXBlendOpMax = 4 } /// <description> /// The stencil operators. /// </description> public enum GFXStencilOp { GFXStencilOpKeep = 0, GFXStencilOpZero = 1, GFXStencilOpReplace = 2, GFXStencilOpIncrSat = 3, GFXStencilOpDecrSat = 4, GFXStencilOpInvert = 5, GFXStencilOpIncr = 6, GFXStencilOpDecr = 7 } /// <description> /// The render cull modes. /// </description> public enum GFXCullMode { GFXCullNone = 0, GFXCullCW = 1, GFXCullCCW = 2 } /// <description> /// The texture formats. /// </description> /// <remarks> Not all formats are supported on all platforms. /// </remarks> public enum GFXFormat { GFXFormatR8G8B8 = 10, GFXFormatR8G8B8A8 = 12, GFXFormatR8G8B8A8_SRGB = 15, GFXFormatR8G8B8X8 = 13, GFXFormatR32F = 16, GFXFormatR5G6B5 = 3, GFXFormatR5G5B5A1 = 4, GFXFormatR5G5B5X1 = 5, GFXFormatA4L4 = 2, GFXFormatA8L8 = 6, GFXFormatA8 = 0, GFXFormatL8 = 1, GFXFormatBC1 = 29, GFXFormatBC2 = 30, GFXFormatBC3 = 31, GFXFormatBC4 = 32, GFXFormatBC5 = 33, GFXFormatD32 = 21, GFXFormatD24X8 = 22, GFXFormatD24S8 = 23, GFXFormatD24FS8 = 24, GFXFormatD16 = 9, GFXFormatR32G32B32A32F = 28, GFXFormatR16G16B16A16F = 27, GFXFormatL16 = 7, GFXFormatR16G16B16A16 = 26, GFXFormatR16G16 = 17, GFXFormatR16F = 8, GFXFormatR16G16F = 18, GFXFormatR10G10B10A2 = 19 } /// <description> /// The texture transform state flags. /// </description> public enum GFXTextureTransformFlags { GFXTTFDisable = 0, GFXTTFFCoord1D = 1, GFXTTFFCoord2D = 2, GFXTTFFCoord3D = 3, GFXTTFFCoord4D = 4, GFXTTFProjected = 256 } /// <description> /// The texture arguments. /// </description> public enum GFXTextureArgument { GFXTADiffuse = 0, GFXTACurrent = 1, GFXTATexture = 2, GFXTATFactor = 3, GFXTASpecular = 4, GFXTATemp = 5, GFXTAConstant = 6, OneMinus = 16, AlphaReplicate = 32 } /// <description> /// The texture operators. /// </description> public enum GFXTextureOp { GFXTOPDisable = 0, GFXTOPSelectARG1 = 1, GFXTOPSelectARG2 = 2, GFXTOPModulate = 3, GFXTOPModulate2X = 4, GFXTOPModulate4X = 5, GFXTOPAdd = 6, GFXTOPAddSigned = 7, GFXTOPAddSigned2X = 8, GFXTOPSubtract = 9, GFXTOPAddSmooth = 10, GFXTOPBlendDiffuseAlpha = 11, GFXTOPBlendTextureAlpha = 12, GFXTOPBlendFactorAlpha = 13, GFXTOPBlendTextureAlphaPM = 14, GFXTOPBlendCURRENTALPHA = 15, GFXTOPPreModulate = 16, GFXTOPModulateAlphaAddColor = 17, GFXTOPModulateColorAddAlpha = 18, GFXTOPModulateInvAlphaAddColor = 19, GFXTOPModulateInvColorAddAlpha = 20, GFXTOPBumpEnvMap = 21, GFXTOPBumpEnvMapLuminance = 22, GFXTOPDotProduct3 = 23, GFXTOPLERP = 24 } /// <description> /// The texture filter types. /// </description> public enum GFXTextureFilterType { GFXTextureFilterNone = 0, GFXTextureFilterPoint = 1, GFXTextureFilterLinear = 2, GFXTextureFilterAnisotropic = 3, GFXTextureFilterPyramidalQuad = 4, GFXTextureFilterGaussianQuad = 5 } /// <description> /// The texture address modes. /// </description> public enum GFXTextureAddressMode { GFXAddressWrap = 0, GFXAddressMirror = 1, GFXAddressClamp = 2, GFXAddressBorder = 3, GFXAddressMirrorOnce = 4 } /// <description> /// The supported comparison functions. /// </description> public enum GFXCmpFunc { GFXCmpNever = 0, GFXCmpLess = 1, GFXCmpEqual = 2, GFXCmpLessEqual = 3, GFXCmpGreater = 4, GFXCmpNotEqual = 5, GFXCmpGreaterEqual = 6, GFXCmpAlways = 7 } /// <description> /// The supported blend modes. /// </description> public enum GFXBlend { GFXBlendZero = 0, GFXBlendOne = 1, GFXBlendSrcColor = 2, GFXBlendInvSrcColor = 3, GFXBlendSrcAlpha = 4, GFXBlendInvSrcAlpha = 5, GFXBlendDestAlpha = 6, GFXBlendInvDestAlpha = 7, GFXBlendDestColor = 8, GFXBlendInvDestColor = 9, GFXBlendSrcAlphaSat = 10 } /// <description> /// Back-end graphics API used by the GFX subsystem. /// </description> public enum GFXAdapterType { OpenGL = 0, D3D11 = 1, NullDevice = 2 } /// <description> /// Return value for messageBox() indicating which button was pressed by the user. /// </description> public enum MBReturnVal { OK = 1, Cancelled = 2, Retry = 3, DontSave = 4 } /// <description> /// What icon to show on a message box. /// </description> public enum MBIcons { Information = 1, Warning = 0, Stop = 3, Question = 2 } /// <description> /// Which buttons to display on a message box. /// </description> public enum MBButtons { Ok = 0, OkCancel = 1, RetryCancel = 2, SaveDontSave = 3, SaveDontSaveCancel = 4 } /// <summary>Priority levels for logging entries</summary> /// <description> /// /// </description> public enum LogLevel { Normal = 0, Warning = 1, Error = 2 } /// <description> /// Channels are individual properties of sound sources that may be animated over time. /// </description> /// <see cref="SFXParameter" /> public enum SFXChannel { Volume = 0, Pitch = 1, Priority = 2, PositionX = 3, PositionY = 4, PositionZ = 5, RotationX = 6, RotationY = 7, RotationZ = 8, VelocityX = 9, VelocityY = 10, VelocityZ = 11, ReferenceDistance = 12, MaxDistance = 13, ConeInsideAngle = 14, ConeOutsideAngle = 15, ConeOutsideVolume = 16, Cursor = 17, Status = 18, User0 = 19, User1 = 20, User2 = 21, User3 = 22 } /// <description> /// Type of volume distance attenuation curve. /// The distance model determines the falloff curve applied to the volume of 3D sounds over distance. /// </description> public enum SFXDistanceModel { Linear = 0, Logarithmic = 1, Exponential = 2 } /// <description> /// Playback status of sound source. /// </description> public enum SFXStatus { Playing = 1, Stopped = 2, Paused = 3 } /// <description> /// Reaction behavior when a state is changed incompatibly on a slot that has already started playing. /// </description> /// <see cref="SFXPlayList::stateMode" /> public enum SFXPlayListStateMode { StopWhenDeactivated = 0, PauseWhenDeactivated = 1, IgnoreWhenDeactivated = 2 } /// <description> /// Behavior when hitting the play stage of a slot that is still playing from a previous cycle. /// </description> /// <see cref="SFXPlayList::replay" /> public enum SFXPlayListReplayMode { IgnorePlaying = 0, RestartPlaying = 1, KeepPlaying = 2, StartNew = 3, SkipIfPlaying = 4 } /// <description> /// Playlist behavior when transitioning in and out of invididual slots. /// /// Transition behaviors apply when the playback controller starts processing a playlist slot and when it ends processing a slot. Using transition behaviors, playback can be synchronized. /// </description> /// <see cref="SFXPlayList::transitionIn" /> /// <see cref="SFXPlayList::transitionOut" /> public enum SFXPlayListTransitionMode { None = 0, Wait = 1, WaitAll = 2, Stop = 3, StopAll = 4 } /// <description> /// Randomization pattern to apply to playlist slot playback order. /// </description> /// <see cref="SFXPlayList::random" /> public enum SFXPlayListRandomMode { NotRandom = 0, StrictRandom = 1, OrderedRandom = 2 } /// <description> /// Playlist behavior when description is set to loop. /// </description> /// <see cref="SFXDescription::isLooping" /> /// <see cref="SFXPlayList::loopMode" /> public enum SFXPlayListLoopMode { All = 0, Single = 1 } }
23.857937
192
0.524367
[ "MIT" ]
lukaspj/T3DSharp-Sample
t3dsharp/T3DSharpFramework/Generated/Enums/Global.cs
30,061
C#
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; namespace ApiWithBackgroundTask { public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } private static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }); } }
26.074074
71
0.650568
[ "MIT" ]
FrankWendel/webapi-with-background-task
Program.cs
704
C#
using Jellyfin.ApiClient.Model; using Jellyfin.ApiClient.Model.Dto; using Jellyfin.ApiClient.Model.Notifications; using Jellyfin.ApiClient.Model.Querying; using Jellyfin.ApiClient.Net; using Jellyfin.ApiClient.Extensions; using MediaBrowser.Model.Channels; using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Devices; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Events; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Net; using MediaBrowser.Model.Playlists; using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Querying; using MediaBrowser.Model.Search; using MediaBrowser.Model.Session; using MediaBrowser.Model.System; using MediaBrowser.Model.Tasks; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Threading; using System.Threading.Tasks; using System.Web; using System.Diagnostics; namespace Jellyfin.ApiClient { /// <summary> /// Provides api methods centered around an HttpClient /// </summary> public partial class ApiClient : BaseApiClient, IApiClient { public event EventHandler<GenericEventArgs<RemoteLogoutReason>> RemoteLoggedOut; public event EventHandler<GenericEventArgs<AuthenticationResult>> Authenticated; protected IAsyncHttpClient HttpClient { get; private set; } internal ServerInfo ServerInfo { get; set; } private INetworkConnection NetworkConnection { get; set; } private readonly SemaphoreSlim _validateConnectionSemaphore = new SemaphoreSlim(1, 1); private DateTime _lastConnectionValidationTime = DateTime.MinValue; public ApiClient(ILogger logger, Uri serverAddress, string accessToken) : base(logger, new NewtonsoftJsonSerializer(), serverAddress, accessToken) { CreateHttpClient(logger); ResetHttpHeaders(); } public ApiClient(ILogger logger, Uri serverAddress, string clientName, IDevice device, string applicationVersion) : base(logger, new NewtonsoftJsonSerializer(), serverAddress, clientName, device, applicationVersion) { CreateHttpClient(logger); ResetHttpHeaders(); } private void CreateHttpClient(ILogger logger) { HttpClient = AsyncHttpClientFactory.Create(logger); HttpClient.HttpResponseReceived += HttpClient_HttpResponseReceived; } #region validated /// <summary> /// Queries for items /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> /// <exception cref="System.ArgumentNullException">query</exception> public async Task<QueryResult<BaseItemDto>> GetItemsAsync(ItemQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var url = GetItemListUrl(query); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { using (var reader = new StreamReader(stream)) { Debug.WriteLine(reader.ReadToEnd()); } return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } #endregion private void HttpClient_HttpResponseReceived(object sender, HttpWebResponse e) { if (e.StatusCode == HttpStatusCode.Unauthorized) { RemoteLoggedOut?.Invoke(this, new GenericEventArgs<RemoteLogoutReason>()); } } private async Task<Stream> SendAsync(HttpRequest request, bool enableFailover = true) { // If not using automatic connection, execute the request directly if (NetworkConnection == null || !enableFailover) { return await HttpClient.SendAsync(request).ConfigureAwait(false); } var originalRequestTime = DateTime.UtcNow; Exception timeoutException; try { return await HttpClient.SendAsync(request).ConfigureAwait(false); } catch (HttpException ex) { if (!ex.IsTimedOut) { throw; } timeoutException = ex; } try { await ValidateConnection(originalRequestTime, request.CancellationToken).ConfigureAwait(false); } catch { // Unable to re-establish connection with the server. // Throw the original exception throw timeoutException; } request.Url = ReplaceServerAddress(request.Url); return await HttpClient.SendAsync(request).ConfigureAwait(false); } private async Task ValidateConnection(DateTime originalRequestTime, CancellationToken cancellationToken) { await _validateConnectionSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false); try { if (originalRequestTime > _lastConnectionValidationTime) { await ValidateConnectionInternal(cancellationToken).ConfigureAwait(false); } } finally { _validateConnectionSemaphore.Release(); } } private async Task ValidateConnectionInternal(CancellationToken cancellationToken) { Logger.LogDebug("Connection to server dropped. Attempting to reconnect."); const int maxWaitMs = 10000; const int waitIntervalMs = 100; var totalWaitMs = 0; var networkStatus = NetworkConnection.GetNetworkStatus(); while (!networkStatus.IsNetworkAvailable) { if (totalWaitMs >= maxWaitMs) { throw new Exception("Network unavailable."); } await Task.Delay(waitIntervalMs, cancellationToken).ConfigureAwait(false); totalWaitMs += waitIntervalMs; networkStatus = NetworkConnection.GetNetworkStatus(); } var urlList = new List<Uri> { ServerInfo.Address, }; if (!networkStatus.GetIsAnyLocalNetworkAvailable()) { urlList.Reverse(); } if (ServerInfo.Address != null) { urlList.Insert(0, ServerInfo.Address); } foreach (var url in urlList) { var connected = await TryConnect(url, cancellationToken).ConfigureAwait(false); if (connected) { break; } } _lastConnectionValidationTime = DateTime.UtcNow; } private async Task<bool> TryConnect(Uri baseUrl, CancellationToken cancellationToken) { var fullUrl = new Uri(baseUrl, new Uri("/system/info/public", UriKind.Relative)); fullUrl = AddDataFormat(fullUrl); var request = new HttpRequest { Url = fullUrl, RequestHeaders = HttpHeaders, CancellationToken = cancellationToken, Method = "GET" }; try { using (var stream = await HttpClient.SendAsync(request).ConfigureAwait(false)) { return true; } } catch (Exception) { return false; } } private Uri ReplaceServerAddress(Uri url) { var baseUrl = ServerInfo.Address; var index = url.ToString().IndexOf("/mediabrowser", StringComparison.OrdinalIgnoreCase); if (index != -1) { return new Uri(baseUrl, url.ToString().Substring(index)); } return url; } public void EnableAutomaticNetworking(ServerInfo info, INetworkConnection networkConnection) { NetworkConnection = networkConnection; ServerInfo = info; ServerAddress = info.Address; } public Task<Stream> GetStream(Uri url, CancellationToken cancellationToken = default) { return SendAsync(new HttpRequest { CancellationToken = cancellationToken, Method = "GET", RequestHeaders = HttpHeaders, Url = url }); } public Task<HttpWebResponse> GetResponse(Uri url, CancellationToken cancellationToken = default) { return HttpClient.GetResponse(new HttpRequest { CancellationToken = cancellationToken, Method = "GET", RequestHeaders = HttpHeaders, Url = url }); } /// <summary> /// Gets an image stream based on a url /// </summary> /// <param name="url">The URL.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{Stream}.</returns> /// <exception cref="System.ArgumentNullException">url</exception> public Task<Stream> GetImageStreamAsync(Uri url, CancellationToken cancellationToken = default) { if (url == null) { throw new ArgumentNullException("url"); } return GetStream(url, cancellationToken); } /// <summary> /// Gets a BaseItem /// </summary> /// <param name="id">The id.</param> /// <param name="userId">The user id.</param> /// <returns>Task{BaseItemDto}.</returns> /// <exception cref="System.ArgumentNullException">id</exception> public async Task<BaseItemDto> GetItemAsync(string id, string userId) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Items/" + id, UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto>(stream); } } /// <summary> /// Gets the intros async. /// </summary> /// <param name="itemId">The item id.</param> /// <param name="userId">The user id.</param> /// <returns>Task{System.String[]}.</returns> /// <exception cref="System.ArgumentNullException">id</exception> public async Task<QueryResult<BaseItemDto>> GetIntrosAsync(string itemId, string userId) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Items/" + itemId + "/Intros", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Gets the item counts async. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemCounts}.</returns> /// <exception cref="System.ArgumentNullException">query</exception> public async Task<ItemCounts> GetItemCountsAsync(ItemCountsQuery query) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId); dict.AddIfNotNull("IsFavorite", query.IsFavorite); var url = GetApiUrl(new Uri("Items/Counts", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<ItemCounts>(stream); } } /// <summary> /// Gets a BaseItem /// </summary> /// <param name="userId">The user id.</param> /// <returns>Task{BaseItemDto}.</returns> /// <exception cref="System.ArgumentNullException">userId</exception> public async Task<BaseItemDto> GetRootFolderAsync(string userId) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Items/Root", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto>(stream); } } /// <summary> /// Gets the users async. /// </summary> /// <returns>Task{UserDto[]}.</returns> public async Task<UserDto[]> GetUsersAsync(UserQuery query) { var queryString = new NameValueCollection(); queryString.AddIfNotNull("IsDisabled", query.IsDisabled); queryString.AddIfNotNull("IsHidden", query.IsHidden); var url = GetApiUrl(new Uri("Users", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<UserDto[]>(stream); } } public async Task<UserDto[]> GetPublicUsersAsync(CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("Users/Public", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<UserDto[]>(stream); } } /// <summary> /// Gets active client sessions. /// </summary> /// <returns>Task{SessionInfoDto[]}.</returns> public async Task<SessionInfoDto[]> GetClientSessionsAsync(SessionQuery query) { var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("ControllableByUserId", query.ControllableByUserId); var url = GetApiUrl(new Uri("Sessions", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<SessionInfoDto[]>(stream); } } /// <summary> /// Gets the next up async. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> /// <exception cref="System.ArgumentNullException">query</exception> public async Task<QueryResult<BaseItemDto>> GetNextUpEpisodesAsync(NextUpQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var url = GetNextUpUrl(query); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetUpcomingEpisodesAsync(UpcomingEpisodesQuery query) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); if (query.Fields != null) { dict.Add("fields", query.Fields.Select(f => f.ToString())); } dict.Add("ParentId", query.ParentId); dict.AddIfNotNull("Limit", query.Limit); dict.AddIfNotNull("StartIndex", query.StartIndex); dict.Add("UserId", query.UserId); dict.AddIfNotNull("EnableImages", query.EnableImages); if (query.EnableImageTypes != null) { dict.Add("EnableImageTypes", query.EnableImageTypes.Select(f => f.ToString())); } dict.AddIfNotNull("ImageTypeLimit", query.ImageTypeLimit); var url = GetApiUrl(new Uri("Shows/Upcoming", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetEpisodesAsync(EpisodeQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNull("StartIndex", query.StartIndex); dict.AddIfNotNull("Limit", query.Limit); dict.AddIfNotNullOrEmpty("StartItemId", query.StartItemId); dict.AddIfNotNull("Season", query.SeasonNumber); dict.AddIfNotNullOrEmpty("UserId", query.UserId); dict.AddIfNotNullOrEmpty("SeasonId", query.SeasonId); if (query.Fields != null) { dict.Add("Fields", query.Fields.Select(f => f.ToString())); } dict.AddIfNotNull("IsMissing", query.IsMissing); dict.AddIfNotNull("IsVirtualUnaired", query.IsVirtualUnaired); var url = GetApiUrl(new Uri("Shows/" + query.SeriesId + "/Episodes", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetSeasonsAsync(SeasonQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId); if (query.Fields != null) { dict.Add("Fields", query.Fields.Select(f => f.ToString())); } dict.AddIfNotNull("IsMissing", query.IsMissing); dict.AddIfNotNull("IsVirtualUnaired", query.IsVirtualUnaired); dict.AddIfNotNull("IsSpecialSeason", query.IsSpecialSeason); var url = GetApiUrl(new Uri("Shows/" + query.SeriesId + "/Seasons", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Gets the people async. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> /// <exception cref="System.ArgumentNullException">userId</exception> public async Task<QueryResult<BaseItemDto>> GetPeopleAsync(PersonsQuery query, CancellationToken cancellationToken = default) { var url = GetItemByNameListUrl("Persons", query); if (query.PersonTypes != null && query.PersonTypes.Length > 0) { var uriBuilder = new UriBuilder(url); var uriQuery = HttpUtility.ParseQueryString(uriBuilder.Query); uriQuery["PersonTypes"] = string.Join(",", query.PersonTypes); uriBuilder.Query = uriQuery.ToQueryString(); url = uriBuilder.Uri; } using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Gets the genres async. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> public async Task<QueryResult<BaseItemDto>> GetGenresAsync(ItemsByNameQuery query) { var url = GetItemByNameListUrl("Genres", query); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Gets the studios async. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> public async Task<QueryResult<BaseItemDto>> GetStudiosAsync(ItemsByNameQuery query) { var url = GetItemByNameListUrl("Studios", query); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Gets the artists. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> /// <exception cref="System.ArgumentNullException">userId</exception> public async Task<QueryResult<BaseItemDto>> GetArtistsAsync(ArtistsQuery query) { var url = GetItemByNameListUrl("Artists", query); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Gets the artists. /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> /// <exception cref="System.ArgumentNullException">userId</exception> public async Task<QueryResult<BaseItemDto>> GetAlbumArtistsAsync(ArtistsQuery query) { var url = GetItemByNameListUrl("Artists/AlbumArtists", query); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } /// <summary> /// Restarts the server async. /// </summary> /// <returns>Task.</returns> public Task RestartServerAsync() { var url = GetApiUrl(new Uri("System/Restart", UriKind.Relative)); return PostAsync<EmptyRequestResult>(url, new NameValueCollection(), CancellationToken.None); } /// <summary> /// Gets the system status async. /// </summary> /// <returns>Task{SystemInfo}.</returns> public async Task<SystemInfo> GetSystemInfoAsync(CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("System/Info", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<SystemInfo>(stream); } } /// <summary> /// get public system information as an asynchronous operation. /// </summary> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task&lt;PublicSystemInfo&gt;.</returns> public async Task<PublicSystemInfo> GetPublicSystemInfoAsync(CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("System/Info/Public", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<PublicSystemInfo>(stream); } } /// <summary> /// Gets a list of plugins installed on the server /// </summary> /// <returns>Task{PluginInfo[]}.</returns> public async Task<PluginInfo[]> GetInstalledPluginsAsync() { var url = GetApiUrl(new Uri("Plugins", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<PluginInfo[]>(stream); } } /// <summary> /// Gets the current server configuration /// </summary> /// <returns>Task{ServerConfiguration}.</returns> public async Task<ServerConfiguration> GetServerConfigurationAsync() { var url = GetApiUrl(new Uri("System/Configuration", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<ServerConfiguration>(stream); } } /// <summary> /// Gets the scheduled tasks. /// </summary> /// <returns>Task{TaskInfo[]}.</returns> public async Task<TaskInfo[]> GetScheduledTasksAsync() { var url = GetApiUrl(new Uri("ScheduledTasks", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<TaskInfo[]>(stream); } } /// <summary> /// Gets the scheduled task async. /// </summary> /// <param name="id">The id.</param> /// <returns>Task{TaskInfo}.</returns> /// <exception cref="System.ArgumentNullException">id</exception> public async Task<TaskInfo> GetScheduledTaskAsync(string id) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var url = GetApiUrl(new Uri("ScheduledTasks/" + id, UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<TaskInfo>(stream); } } /// <summary> /// Gets a user by id /// </summary> /// <param name="id">The id.</param> /// <returns>Task{UserDto}.</returns> /// <exception cref="System.ArgumentNullException">id</exception> public async Task<UserDto> GetUserAsync(string id) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var url = GetApiUrl(new Uri("Users/" + id, UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<UserDto>(stream); } } /// <summary> /// Gets the parental ratings async. /// </summary> /// <returns>Task{List{ParentalRating}}.</returns> public async Task<List<ParentalRating>> GetParentalRatingsAsync() { var url = GetApiUrl(new Uri("Localization/ParentalRatings", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<List<ParentalRating>>(stream); } } /// <summary> /// Gets local trailers for an item /// </summary> /// <param name="userId">The user id.</param> /// <param name="itemId">The item id.</param> /// <returns>Task{ItemsResult}.</returns> /// <exception cref="System.ArgumentNullException">query</exception> public async Task<BaseItemDto[]> GetLocalTrailersAsync(string userId, string itemId) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Items/" + itemId + "/LocalTrailers", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto[]>(stream); } } /// <summary> /// Gets special features for an item /// </summary> /// <param name="userId">The user id.</param> /// <param name="itemId">The item id.</param> /// <returns>Task{BaseItemDto[]}.</returns> /// <exception cref="System.ArgumentNullException">userId</exception> public async Task<BaseItemDto[]> GetSpecialFeaturesAsync(string userId, string itemId) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Items/" + itemId + "/SpecialFeatures", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto[]>(stream); } } /// <summary> /// Gets the cultures async. /// </summary> /// <returns>Task{CultureDto[]}.</returns> public async Task<CultureDto[]> GetCulturesAsync() { var url = GetApiUrl(new Uri("Localization/Cultures", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<CultureDto[]>(stream); } } /// <summary> /// Gets the countries async. /// </summary> /// <returns>Task{CountryInfo[]}.</returns> public async Task<CountryInfo[]> GetCountriesAsync() { var url = GetApiUrl(new Uri("Localization/Countries", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<CountryInfo[]>(stream); } } public Task<UserItemDataDto> MarkPlayedAsync(string itemId, string userId, DateTime? datePlayed) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var dict = new NameValueCollection(); if (datePlayed.HasValue) { dict.Add("DatePlayed", datePlayed.Value.ToString("yyyyMMddHHmmss", CultureInfo.InvariantCulture)); } var url = GetApiUrl(new Uri("Users/" + userId + "/PlayedItems/" + itemId, UriKind.Relative), dict); return PostAsync<UserItemDataDto>(url, new NameValueCollection(), CancellationToken.None); } /// <summary> /// Marks the unplayed async. /// </summary> /// <param name="itemId">The item id.</param> /// <param name="userId">The user id.</param> /// <returns>Task{UserItemDataDto}.</returns> /// <exception cref="System.ArgumentNullException"> /// itemId /// or /// userId /// </exception> public Task<UserItemDataDto> MarkUnplayedAsync(string itemId, string userId) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/PlayedItems/" + itemId, UriKind.Relative)); return DeleteAsync<UserItemDataDto>(url, CancellationToken.None); } /// <summary> /// Updates the favorite status async. /// </summary> /// <param name="itemId">The item id.</param> /// <param name="userId">The user id.</param> /// <param name="isFavorite">if set to <c>true</c> [is favorite].</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException">itemId</exception> public Task<UserItemDataDto> UpdateFavoriteStatusAsync(string itemId, string userId, bool isFavorite) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/FavoriteItems/" + itemId, UriKind.Relative)); if (isFavorite) { return PostAsync<UserItemDataDto>(url, new NameValueCollection(), CancellationToken.None); } return DeleteAsync<UserItemDataDto>(url, CancellationToken.None); } /// <summary> /// Reports to the server that the user has begun playing an item /// </summary> /// <param name="info">The information.</param> /// <returns>Task{UserItemDataDto}.</returns> /// <exception cref="System.ArgumentNullException">itemId</exception> public Task ReportPlaybackStartAsync(PlaybackStartInfo info) { if (info == null) { throw new ArgumentNullException("info"); } Logger.LogDebug("ReportPlaybackStart: Item {0}", info.ItemId); var url = GetApiUrl(new Uri("Sessions/Playing", UriKind.Relative)); return PostAsync<PlaybackStartInfo, EmptyRequestResult>(url, info, CancellationToken.None); } /// <summary> /// Reports playback progress to the server /// </summary> /// <param name="info">The information.</param> /// <returns>Task{UserItemDataDto}.</returns> /// <exception cref="System.ArgumentNullException">itemId</exception> public Task ReportPlaybackProgressAsync(PlaybackProgressInfo info) { if (info == null) { throw new ArgumentNullException("info"); } if (IsWebSocketConnected) { return SendWebSocketMessage("ReportPlaybackProgress", JsonSerializer.SerializeToString(info)); } var url = GetApiUrl(new Uri("Sessions/Playing/Progress", UriKind.Relative)); return PostAsync<PlaybackProgressInfo, EmptyRequestResult>(url, info, CancellationToken.None); } /// <summary> /// Reports to the server that the user has stopped playing an item /// </summary> /// <param name="info">The information.</param> /// <returns>Task{UserItemDataDto}.</returns> /// <exception cref="System.ArgumentNullException">itemId</exception> public Task ReportPlaybackStoppedAsync(PlaybackStopInfo info) { if (info == null) { throw new ArgumentNullException("info"); } var url = GetApiUrl(new Uri("Sessions/Playing/Stopped", UriKind.Relative)); return PostAsync<PlaybackStopInfo, EmptyRequestResult>(url, info, CancellationToken.None); } /// <summary> /// Instructs antoher client to browse to a library item. /// </summary> /// <param name="sessionId">The session id.</param> /// <param name="itemId">The id of the item to browse to.</param> /// <param name="itemName">The name of the item to browse to.</param> /// <param name="itemType">The type of the item to browse to.</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException">sessionId /// or /// itemId /// or /// itemName /// or /// itemType</exception> public Task SendBrowseCommandAsync(string sessionId, string itemId, string itemName, string itemType) { var cmd = new GeneralCommand { Name = "DisplayContent" }; cmd.Arguments["ItemType"] = itemType; cmd.Arguments["ItemId"] = itemId; cmd.Arguments["ItemName"] = itemName; return SendCommandAsync(sessionId, cmd); } /// <summary> /// Sends the play command async. /// </summary> /// <param name="sessionId">The session id.</param> /// <param name="request">The request.</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException">sessionId /// or /// request</exception> public Task SendPlayCommandAsync(string sessionId, PlayRequest request) { if (string.IsNullOrEmpty(sessionId)) { throw new ArgumentNullException("sessionId"); } if (request == null) { throw new ArgumentNullException("request"); } var dict = new NameValueCollection { { "ItemIds", request.ItemIds.Select(o => o.ToString("N", CultureInfo.InvariantCulture)).ToList() }, { "PlayCommand", request.PlayCommand.ToString() } }; dict.AddIfNotNull("StartPositionTicks", request.StartPositionTicks); var url = GetApiUrl(new Uri("Sessions/" + sessionId + "/Playing", UriKind.Relative), dict); return PostAsync<EmptyRequestResult>(url, new NameValueCollection(), CancellationToken.None); } public Task SendMessageCommandAsync(string sessionId, MessageCommand command) { var cmd = new GeneralCommand { Name = "DisplayMessage" }; cmd.Arguments["Header"] = command.Header; cmd.Arguments["Text"] = command.Text; if (command.TimeoutMs.HasValue) { cmd.Arguments["Timeout"] = command.TimeoutMs.Value.ToString(CultureInfo.InvariantCulture); } return SendCommandAsync(sessionId, cmd); } /// <summary> /// Sends the system command async. /// </summary> /// <param name="sessionId">The session id.</param> /// <param name="command">The command.</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException">sessionId</exception> public Task SendCommandAsync(string sessionId, GeneralCommand command) { if (string.IsNullOrEmpty(sessionId)) { throw new ArgumentNullException("sessionId"); } var url = GetApiUrl(new Uri("Sessions/" + sessionId + "/Command", UriKind.Relative)); return PostAsync<GeneralCommand, EmptyRequestResult>(url, command, CancellationToken.None); } /// <summary> /// Sends the playstate command async. /// </summary> /// <param name="sessionId">The session id.</param> /// <param name="request">The request.</param> /// <returns>Task.</returns> public Task SendPlaystateCommandAsync(string sessionId, PlaystateRequest request) { var dict = new NameValueCollection(); dict.AddIfNotNull("SeekPositionTicks", request.SeekPositionTicks); var url = GetApiUrl(new Uri("Sessions/" + sessionId + "/Playing/" + request.Command.ToString(), UriKind.Relative), dict); return PostAsync<EmptyRequestResult>(url, new NameValueCollection(), CancellationToken.None); } /// <summary> /// Clears a user's rating for an item /// </summary> /// <param name="itemId">The item id.</param> /// <param name="userId">The user id.</param> /// <returns>Task{UserItemDataDto}.</returns> /// <exception cref="System.ArgumentNullException">itemId</exception> public Task<UserItemDataDto> ClearUserItemRatingAsync(string itemId, string userId) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Items/" + itemId + "/Rating", UriKind.Relative)); return DeleteAsync<UserItemDataDto>(url, CancellationToken.None); } /// <summary> /// Updates a user's rating for an item, based on likes or dislikes /// </summary> /// <param name="itemId">The item id.</param> /// <param name="userId">The user id.</param> /// <param name="likes">if set to <c>true</c> [likes].</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException">itemId</exception> public Task<UserItemDataDto> UpdateUserItemRatingAsync(string itemId, string userId, bool likes) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var dict = new NameValueCollection(); dict.Add("likes", likes); var url = GetApiUrl(new Uri("Users/" + userId + "/Items/" + itemId + "/Rating", UriKind.Relative), dict); return PostAsync<UserItemDataDto>(url, new NameValueCollection(), CancellationToken.None); } /// <summary> /// Authenticates a user and returns the result /// </summary> /// <param name="username">The username.</param> /// <param name="password">The password.</param> /// <returns>Task.</returns> /// <exception cref="ArgumentNullException">username</exception> /// <exception cref="System.ArgumentNullException">userId</exception> public async Task<AuthenticationResult> AuthenticateUserAsync(string username, string password) { if (string.IsNullOrWhiteSpace(username)) { throw new ArgumentNullException("username"); } var url = GetApiUrl(new Uri("Users/AuthenticateByName", UriKind.Relative)); var authRequest = new AuthenticationRequest { Username = username, Pw = password }; var result = await PostAsync<AuthenticationRequest,AuthenticationResult>(url, authRequest, CancellationToken.None); SetAuthenticationInfo(result.AccessToken, result.User.Id); Authenticated?.Invoke(this, new GenericEventArgs<AuthenticationResult>(result)); return result; } /// <summary> /// Updates the server configuration async. /// </summary> /// <param name="configuration">The configuration.</param> /// <returns>Task.</returns> /// <exception cref="System.ArgumentNullException">configuration</exception> public Task UpdateServerConfigurationAsync(ServerConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } var url = GetApiUrl(new Uri("System/Configuration", UriKind.Relative)); return PostAsync<ServerConfiguration, EmptyRequestResult>(url, configuration, CancellationToken.None); } /// <summary> /// Updates the scheduled task triggers. /// </summary> /// <param name="id">The id.</param> /// <param name="triggers">The triggers.</param> /// <returns>Task{RequestResult}.</returns> /// <exception cref="System.ArgumentNullException">id</exception> public Task UpdateScheduledTaskTriggersAsync(string id, TaskTriggerInfo[] triggers) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } if (triggers == null) { throw new ArgumentNullException("triggers"); } var url = GetApiUrl(new Uri("ScheduledTasks/" + id + "/Triggers", UriKind.Relative)); return PostAsync<TaskTriggerInfo[], EmptyRequestResult>(url, triggers, CancellationToken.None); } /// <summary> /// Gets the display preferences. /// </summary> /// <param name="id">The id.</param> /// <param name="userId">The user id.</param> /// <param name="client">The client.</param> /// <returns>Task{BaseItemDto}.</returns> public async Task<DisplayPreferences> GetDisplayPreferencesAsync(string id, string userId, string client, CancellationToken cancellationToken = default) { var dict = new NameValueCollection { { "userId", userId }, { "client", client } }; var url = GetApiUrl(new Uri("DisplayPreferences/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<DisplayPreferences>(stream); } } /// <summary> /// Updates display preferences for a user /// </summary> /// <param name="displayPreferences">The display preferences.</param> /// <returns>Task{DisplayPreferences}.</returns> /// <exception cref="System.ArgumentNullException">userId</exception> public Task UpdateDisplayPreferencesAsync(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken = default) { if (displayPreferences == null) { throw new ArgumentNullException("displayPreferences"); } var dict = new NameValueCollection { { "userId", userId }, { "client", client } }; var url = GetApiUrl(new Uri("DisplayPreferences/" + displayPreferences.Id, UriKind.Relative), dict); return PostAsync<DisplayPreferences, EmptyRequestResult>(url, displayPreferences, cancellationToken); } /// <summary> /// Posts a set of data to a url, and deserializes the return stream into T /// </summary> /// <typeparam name="T"></typeparam> /// <param name="url">The URL.</param> /// <param name="args">The args.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{``0}.</returns> public async Task<T> PostAsync<T>(Uri url, NameValueCollection query, CancellationToken cancellationToken = default) where T : class { url = AddDataFormat(url); // Create the post body var postContent = query.ToQueryString(); const string contentType = "application/x-www-form-urlencoded"; using (var stream = await SendAsync(new HttpRequest { Url = url, CancellationToken = cancellationToken, RequestHeaders = HttpHeaders, Method = "POST", RequestContentType = contentType, RequestContent = postContent }).ConfigureAwait(false)) { return DeserializeFromStream<T>(stream); } } /// <summary> /// Deletes the async. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="url">The URL.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{``0}.</returns> private async Task<T> DeleteAsync<T>(Uri url, CancellationToken cancellationToken = default) where T : class { url = AddDataFormat(url); using (var stream = await SendAsync(new HttpRequest { Url = url, CancellationToken = cancellationToken, RequestHeaders = HttpHeaders, Method = "DELETE" }).ConfigureAwait(false)) { return DeserializeFromStream<T>(stream); } } /// <summary> /// Posts an object of type TInputType to a given url, and deserializes the response into an object of type TOutputType /// </summary> /// <typeparam name="TInputType">The type of the T input type.</typeparam> /// <typeparam name="TOutputType">The type of the T output type.</typeparam> /// <param name="url">The URL.</param> /// <param name="obj">The obj.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{``1}.</returns> private async Task<TOutputType> PostAsync<TInputType, TOutputType>(Uri url, TInputType obj, CancellationToken cancellationToken = default) where TOutputType : class { url = AddDataFormat(url); const string contentType = "application/json"; var postContent = SerializeToJson(obj); using (var stream = await SendAsync(new HttpRequest { Url = url, CancellationToken = cancellationToken, RequestHeaders = HttpHeaders, Method = "POST", RequestContentType = contentType, RequestContent = postContent }).ConfigureAwait(false)) { return DeserializeFromStream<TOutputType>(stream); } } /// <summary> /// This is a helper around getting a stream from the server that contains serialized data /// </summary> /// <param name="url">The URL.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{Stream}.</returns> public Task<Stream> GetSerializedStreamAsync(Uri url, CancellationToken cancellationToken) { url = AddDataFormat(url); return GetStream(url, cancellationToken); } public Task<Stream> GetSerializedStreamAsync(Uri url) { return GetSerializedStreamAsync(url, CancellationToken.None); } public async Task<NotificationsSummary> GetNotificationsSummary(string userId) { var url = GetApiUrl(new Uri("Notifications/" + userId + "/Summary", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<NotificationsSummary>(stream); } } public Task MarkNotificationsRead(string userId, IEnumerable<string> notificationIdList, bool isRead) { Uri url = new Uri("Notifications/" + userId, UriKind.Relative); url = new Uri(url, isRead ? "/Read" : "/Unread"); var dict = new NameValueCollection(); var ids = notificationIdList.ToArray(); dict.Add("Ids", string.Join(",", ids)); url = GetApiUrl(url, dict); return PostAsync<EmptyRequestResult>(url, new NameValueCollection(), CancellationToken.None); } public async Task<NotificationResult> GetNotificationsAsync(NotificationQuery query) { var url = new Uri("Notifications/" + query.UserId, UriKind.Relative); var dict = new NameValueCollection(); dict.AddIfNotNull("ItemIds", query.IsRead); dict.AddIfNotNull("StartIndex", query.StartIndex); dict.AddIfNotNull("Limit", query.Limit); url = GetApiUrl(url, dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<NotificationResult>(stream); } } public async Task<AllThemeMediaResult> GetAllThemeMediaAsync(string userId, string itemId, bool inheritFromParent, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection { { "InheritFromParent", inheritFromParent } }; queryString.AddIfNotNullOrEmpty("UserId", userId); var url = GetApiUrl(new Uri("Items/" + itemId + "/ThemeMedia", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<AllThemeMediaResult>(stream); } } public async Task<SearchHintResult> GetSearchHintsAsync(SearchQuery query) { if (query == null || string.IsNullOrEmpty(query.SearchTerm)) { throw new ArgumentNullException("query"); } var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("SearchTerm", query.SearchTerm); queryString.AddIfNotNullOrEmpty("UserId", query.UserId.ToString("N", CultureInfo.InvariantCulture)); queryString.AddIfNotNullOrEmpty("ParentId", query.ParentId); queryString.AddIfNotNull("StartIndex", query.StartIndex); queryString.AddIfNotNull("Limit", query.Limit); queryString.Add("IncludeArtists", query.IncludeArtists); queryString.Add("IncludeGenres", query.IncludeGenres); queryString.Add("IncludeMedia", query.IncludeMedia); queryString.Add("IncludePeople", query.IncludePeople); queryString.Add("IncludeStudios", query.IncludeStudios); queryString.AddIfNotNull("ExcludeItemTypes", query.ExcludeItemTypes); queryString.AddIfNotNull("IncludeItemTypes", query.IncludeItemTypes); queryString.AddIfNotNull("IsKids", query.IsKids); queryString.AddIfNotNull("IsMovie", query.IsMovie); queryString.AddIfNotNull("IsNews", query.IsNews); queryString.AddIfNotNull("IsSeries", query.IsSeries); queryString.AddIfNotNull("IsSports", query.IsSports); queryString.AddIfNotNull("MediaTypes", query.MediaTypes); var url = GetApiUrl(new Uri("Search/Hints", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<SearchHintResult>(stream); } } public async Task<ThemeMediaResult> GetThemeSongsAsync(string userId, string itemId, bool inheritFromParent, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection { { "InheritFromParent", inheritFromParent } }; queryString.AddIfNotNullOrEmpty("UserId", userId); var url = GetApiUrl(new Uri("Items/" + itemId + "/ThemeSongs", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<ThemeMediaResult>(stream); } } public async Task<ThemeMediaResult> GetThemeVideosAsync(string userId, string itemId, bool inheritFromParent, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection { { "InheritFromParent", inheritFromParent } }; queryString.AddIfNotNullOrEmpty("UserId", userId); var url = GetApiUrl(new Uri("Items/" + itemId + "/ThemeVideos", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<ThemeMediaResult>(stream); } } /// <summary> /// Gets the critic reviews. /// </summary> /// <param name="itemId">The item id.</param> /// <param name="startIndex">The start index.</param> /// <param name="limit">The limit.</param> /// <returns>Task{ItemReviewsResult}.</returns> /// <exception cref="System.ArgumentNullException"> /// id /// or /// userId /// </exception> public async Task<QueryResult<ItemReview>> GetCriticReviews(string itemId, CancellationToken cancellationToken = default, int? startIndex = null, int? limit = null) { if (string.IsNullOrEmpty(itemId)) { throw new ArgumentNullException("itemId"); } var queryString = new NameValueCollection(); queryString.AddIfNotNull("startIndex", startIndex); queryString.AddIfNotNull("limit", limit); var url = GetApiUrl(new Uri("Items/" + itemId + "/CriticReviews", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<ItemReview>>(stream); } } public async Task<T> GetAsync<T>(Uri url, CancellationToken cancellationToken = default) where T : class { using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<T>(stream); } } /// <summary> /// Gets the index of the game player. /// </summary> /// <param name="userId">The user id.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{List{ItemIndex}}.</returns> public async Task<List<ItemIndex>> GetGamePlayerIndex(string userId, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("UserId", userId); var url = GetApiUrl(new Uri("Games/PlayerIndex", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<List<ItemIndex>>(stream); } } /// <summary> /// Gets the index of the year. /// </summary> /// <param name="userId">The user id.</param> /// <param name="includeItemTypes">The include item types.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <returns>Task{List{ItemIndex}}.</returns> public async Task<List<ItemIndex>> GetYearIndex(string userId, string[] includeItemTypes, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("UserId", userId); queryString.AddIfNotNull("IncludeItemTypes", includeItemTypes); var url = GetApiUrl(new Uri("Items/YearIndex", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<List<ItemIndex>>(stream); } } public Task ReportCapabilities(ClientCapabilities capabilities, CancellationToken cancellationToken = default) { if (capabilities == null) { throw new ArgumentNullException("capabilities"); } var url = GetApiUrl(new Uri("Sessions/Capabilities/Full", UriKind.Relative)); return PostAsync<ClientCapabilities, EmptyRequestResult>(url, capabilities, cancellationToken); } public async Task<LiveTvInfo> GetLiveTvInfoAsync(CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("LiveTv/Info", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<LiveTvInfo>(stream); } } public async Task<QueryResult<BaseItemDto>> GetLiveTvRecordingGroupsAsync(RecordingGroupQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId); var url = GetApiUrl(new Uri("LiveTv/Recordings/Groups", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetLiveTvRecordingsAsync(RecordingQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId.ToString("N", CultureInfo.InvariantCulture)); dict.AddIfNotNullOrEmpty("ChannelId", query.ChannelId); dict.AddIfNotNullOrEmpty("Id", query.Id); dict.AddIfNotNullOrEmpty("SeriesTimerId", query.SeriesTimerId); dict.AddIfNotNull("IsInProgress", query.IsInProgress); dict.AddIfNotNull("StartIndex", query.StartIndex); dict.AddIfNotNull("Limit", query.Limit); if (!query.EnableTotalRecordCount) { dict.Add("EnableTotalRecordCount", query.EnableTotalRecordCount); } var url = GetApiUrl(new Uri("LiveTv/Recordings", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<ChannelInfoDto>> GetLiveTvChannelsAsync(LiveTvChannelQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId.ToString("N", CultureInfo.InvariantCulture)); dict.AddIfNotNull("StartIndex", query.StartIndex); dict.AddIfNotNull("Limit", query.Limit); dict.AddIfNotNull("IsFavorite", query.IsFavorite); dict.AddIfNotNull("IsLiked", query.IsLiked); dict.AddIfNotNull("IsDisliked", query.IsDisliked); dict.AddIfNotNull("EnableFavoriteSorting", query.EnableFavoriteSorting); if (query.ChannelType.HasValue) { dict.Add("ChannelType", query.ChannelType.Value.ToString()); } var url = GetApiUrl(new Uri("LiveTv/Channels", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<ChannelInfoDto>>(stream); } } public Task CancelLiveTvSeriesTimerAsync(string id, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); var url = GetApiUrl(new Uri("LiveTv/SeriesTimers/" + id, UriKind.Relative), dict); return SendAsync(new HttpRequest { Url = url, CancellationToken = cancellationToken, RequestHeaders = HttpHeaders, Method = "DELETE" }); } public Task CancelLiveTvTimerAsync(string id, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); var url = GetApiUrl(new Uri("LiveTv/Timers/" + id, UriKind.Relative), dict); return SendAsync(new HttpRequest { Url = url, CancellationToken = cancellationToken, RequestHeaders = HttpHeaders, Method = "DELETE" }); } public async Task<ChannelInfoDto> GetLiveTvChannelAsync(string id, string userId, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("userId", userId); var url = GetApiUrl(new Uri("LiveTv/Channels/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<ChannelInfoDto>(stream); } } public async Task<BaseItemDto> GetLiveTvRecordingAsync(string id, string userId, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("userId", userId); var url = GetApiUrl(new Uri("LiveTv/Recordings/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto>(stream); } } public async Task<BaseItemDto> GetLiveTvRecordingGroupAsync(string id, string userId, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("userId", userId); var url = GetApiUrl(new Uri("LiveTv/Recordings/Groups/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto>(stream); } } public async Task<SeriesTimerInfoDto> GetLiveTvSeriesTimerAsync(string id, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); var url = GetApiUrl(new Uri("LiveTv/SeriesTimers/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<SeriesTimerInfoDto>(stream); } } public async Task<QueryResult<SeriesTimerInfoDto>> GetLiveTvSeriesTimersAsync(SeriesTimerQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("SortBy", query.SortBy); dict.Add("SortOrder", query.SortOrder.ToString()); var url = GetApiUrl(new Uri("LiveTv/SeriesTimers", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<SeriesTimerInfoDto>>(stream); } } public async Task<TimerInfoDto> GetLiveTvTimerAsync(string id, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); var url = GetApiUrl(new Uri("LiveTv/Timers/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<TimerInfoDto>(stream); } } public async Task<QueryResult<TimerInfoDto>> GetLiveTvTimersAsync(TimerQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("ChannelId", query.ChannelId); dict.AddIfNotNullOrEmpty("SeriesTimerId", query.SeriesTimerId); var url = GetApiUrl(new Uri("LiveTv/Timers", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<TimerInfoDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetLiveTvProgramsAsync(ProgramQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); const string isoDateFormat = "o"; if (query.MaxEndDate.HasValue) { dict.Add("MaxEndDate", query.MaxEndDate.Value.ToUniversalTime().ToString(isoDateFormat, CultureInfo.InvariantCulture)); } if (query.MaxStartDate.HasValue) { dict.Add("MaxStartDate", query.MaxStartDate.Value.ToUniversalTime().ToString(isoDateFormat, CultureInfo.InvariantCulture)); } if (query.MinEndDate.HasValue) { dict.Add("MinEndDate", query.MinEndDate.Value.ToUniversalTime().ToString(isoDateFormat, CultureInfo.InvariantCulture)); } if (query.MinStartDate.HasValue) { dict.Add("MinStartDate", query.MinStartDate.Value.ToUniversalTime().ToString(isoDateFormat, CultureInfo.InvariantCulture)); } dict.AddIfNotNullOrEmpty("UserId", query.UserId); if (!query.EnableTotalRecordCount) { dict.Add("EnableTotalRecordCount", query.EnableTotalRecordCount); } if (query.ChannelIds != null) { dict.Add("ChannelIds", string.Join(",", query.ChannelIds)); } // TODO: This endpoint supports POST if the query string is too long var url = GetApiUrl(new Uri("LiveTv/Programs", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetRecommendedLiveTvProgramsAsync(RecommendedProgramQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId); dict.AddIfNotNull("Limit", query.Limit); dict.AddIfNotNull("HasAired", query.HasAired); dict.AddIfNotNull("IsAiring", query.IsAiring); if (!query.EnableTotalRecordCount) { dict.Add("EnableTotalRecordCount", query.EnableTotalRecordCount); } var url = GetApiUrl(new Uri("LiveTv/Programs/Recommended", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public Task CreateLiveTvSeriesTimerAsync(SeriesTimerInfoDto timer, CancellationToken cancellationToken = default) { if (timer == null) { throw new ArgumentNullException("timer"); } var url = GetApiUrl(new Uri("LiveTv/SeriesTimers", UriKind.Relative)); return PostAsync<SeriesTimerInfoDto, EmptyRequestResult>(url, timer, cancellationToken); } public Task CreateLiveTvTimerAsync(BaseTimerInfoDto timer, CancellationToken cancellationToken = default) { if (timer == null) { throw new ArgumentNullException("timer"); } var url = GetApiUrl(new Uri("LiveTv/Timers", UriKind.Relative)); return PostAsync<BaseTimerInfoDto, EmptyRequestResult>(url, timer, cancellationToken); } public async Task<SeriesTimerInfoDto> GetDefaultLiveTvTimerInfo(string programId, CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(programId)) { throw new ArgumentNullException("programId"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("programId", programId); var url = GetApiUrl(new Uri("LiveTv/Timers/Defaults", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<SeriesTimerInfoDto>(stream); } } public async Task<SeriesTimerInfoDto> GetDefaultLiveTvTimerInfo(CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("LiveTv/Timers/Defaults", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<SeriesTimerInfoDto>(stream); } } public async Task<GuideInfo> GetLiveTvGuideInfo(CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("LiveTv/GuideInfo", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<GuideInfo>(stream); } } public async Task<BaseItemDto> GetLiveTvProgramAsync(string id, string userId, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("userId", userId); var url = GetApiUrl(new Uri("LiveTv/Programs/" + id, UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto>(stream); } } public Task UpdateLiveTvSeriesTimerAsync(SeriesTimerInfoDto timer, CancellationToken cancellationToken = default) { if (timer == null) { throw new ArgumentNullException("timer"); } var url = GetApiUrl(new Uri("LiveTv/SeriesTimers/" + timer.Id, UriKind.Relative)); return PostAsync<SeriesTimerInfoDto, EmptyRequestResult>(url, timer, cancellationToken); } public Task UpdateLiveTvTimerAsync(TimerInfoDto timer, CancellationToken cancellationToken = default) { if (timer == null) { throw new ArgumentNullException("timer"); } var url = GetApiUrl(new Uri("LiveTv/Timers/" + timer.Id, UriKind.Relative)); return PostAsync<TimerInfoDto, EmptyRequestResult>(url, timer, cancellationToken); } public Task SendString(string sessionId, string text) { var cmd = new GeneralCommand { Name = "SendString" }; cmd.Arguments["String"] = text; return SendCommandAsync(sessionId, cmd); } public Task SetAudioStreamIndex(string sessionId, int index) { var cmd = new GeneralCommand { Name = "SetAudioStreamIndex" }; cmd.Arguments["Index"] = index.ToString(CultureInfo.InvariantCulture); return SendCommandAsync(sessionId, cmd); } public Task SetSubtitleStreamIndex(string sessionId, int? index) { var cmd = new GeneralCommand { Name = "SetSubtitleStreamIndex" }; cmd.Arguments["Index"] = (index ?? -1).ToString(CultureInfo.InvariantCulture); return SendCommandAsync(sessionId, cmd); } public Task SetVolume(string sessionId, int volume) { var cmd = new GeneralCommand { Name = "SetVolume" }; cmd.Arguments["Volume"] = volume.ToString(CultureInfo.InvariantCulture); return SendCommandAsync(sessionId, cmd); } public async Task<QueryResult<BaseItemDto>> GetAdditionalParts(string itemId, string userId) { var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("UserId", userId); var url = GetApiUrl(new Uri("Videos/" + itemId + "/AdditionalParts", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, CancellationToken.None).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<ChannelFeatures> GetChannelFeatures(string channelId, CancellationToken cancellationToken = default) { var url = GetApiUrl(new Uri("Channels/" + channelId + "/Features", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<ChannelFeatures>(stream); } } public async Task<QueryResult<BaseItemDto>> GetChannelItems(ChannelItemQuery query, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("UserId", query.UserId); queryString.AddIfNotNull("StartIndex", query.StartIndex); queryString.AddIfNotNull("Limit", query.Limit); queryString.AddIfNotNullOrEmpty("FolderId", query.FolderId); if (query.Fields != null) { queryString.Add("fields", query.Fields.Select(f => f.ToString())); } if (query.Filters != null) { queryString.Add("Filters", query.Filters.Select(f => f.ToString())); } var sortBy = new List<string>(); var sortOrder = new List<string>(); foreach (var order in query.OrderBy) { sortBy.Add(order.Item1); sortOrder.Add(order.Item2.ToString()); } queryString.AddIfNotNull("SortBy", sortBy); queryString.AddIfNotNull("SortOrder", sortOrder); var url = GetApiUrl(new Uri("Channels/" + query.ChannelId + "/Items", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken = default) { var queryString = new NameValueCollection(); queryString.AddIfNotNullOrEmpty("UserId", query.UserId.ToString("N", CultureInfo.InvariantCulture)); queryString.AddIfNotNull("SupportsLatestItems", query.SupportsLatestItems); queryString.AddIfNotNull("StartIndex", query.StartIndex); queryString.AddIfNotNull("Limit", query.Limit); queryString.AddIfNotNull("IsFavorite", query.IsFavorite); var url = GetApiUrl(new Uri("Channels", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<SessionInfoDto> GetCurrentSessionAsync(CancellationToken cancellationToken = default) { var queryString = new NameValueCollection { { "DeviceId", DeviceId } }; var url = GetApiUrl(new Uri("Sessions", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { var sessions = DeserializeFromStream<SessionInfoDto[]>(stream); return sessions.FirstOrDefault(); } } public Task StopTranscodingProcesses(string deviceId, string playSessionId) { var queryString = new NameValueCollection { { "DeviceId", DeviceId } }; queryString.AddIfNotNullOrEmpty("PlaySessionId", playSessionId); Uri url = GetApiUrl(new Uri("Videos/ActiveEncodings", UriKind.Relative), queryString); return SendAsync(new HttpRequest { Url = url, RequestHeaders = HttpHeaders, Method = "DELETE" }); } public async Task<QueryResult<BaseItemDto>> GetLatestChannelItems(AllChannelMediaQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } if (string.IsNullOrEmpty(query.UserId)) { throw new ArgumentNullException("userId"); } var queryString = new NameValueCollection { { "UserId", query.UserId } }; queryString.AddIfNotNull("StartIndex", query.StartIndex); queryString.AddIfNotNull("Limit", query.Limit); if (query.Filters != null) { queryString.Add("Filters", query.Filters.Select(f => f.ToString())); } if (query.Fields != null) { queryString.Add("Fields", query.Fields.Select(f => f.ToString())); } queryString.AddIfNotNull("ChannelIds", query.ChannelIds); var url = GetApiUrl(new Uri("Channels/Items/Latest", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, CancellationToken.None).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task Logout() { try { var url = GetApiUrl(new Uri("Sessions/Logout", UriKind.Relative)); await PostAsync<EmptyRequestResult>(url, new NameValueCollection(), CancellationToken.None); } catch (Exception ex) { Logger.LogError(ex, "Error logging out"); } ClearAuthenticationInfo(); } public async Task<QueryResult<BaseItemDto>> GetUserViews(string userId, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException("userId"); } var url = GetApiUrl(new Uri($"Users/{userId}/Views", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { var result = DeserializeFromStream<QueryResult<BaseItemDto>>(stream); var serverInfo = ServerInfo; return result; } } public async Task<BaseItemDto[]> GetLatestItems(LatestItemsQuery query) { if (query == null) { throw new ArgumentNullException("query"); } if (string.IsNullOrEmpty(query.UserId.ToString("N", CultureInfo.InvariantCulture))) { throw new ArgumentNullException("userId"); } var queryString = new NameValueCollection(); queryString.AddIfNotNull("GroupItems", query.GroupItems); queryString.AddIfNotNull("IncludeItemTypes", query.IncludeItemTypes); queryString.AddIfNotNullOrEmpty("ParentId", query.ParentId.ToString("N", CultureInfo.InvariantCulture)); queryString.AddIfNotNull("IsPlayed", query.IsPlayed); queryString.AddIfNotNull("StartIndex", query.StartIndex); queryString.AddIfNotNull("Limit", query.Limit); if (query.Fields != null) { queryString.Add("fields", query.Fields.Select(f => f.ToString())); } var url = GetApiUrl(new Uri("Users/" + query.UserId + "/Items/Latest", UriKind.Relative), queryString); using (var stream = await GetSerializedStreamAsync(url, CancellationToken.None).ConfigureAwait(false)) { return DeserializeFromStream<BaseItemDto[]>(stream); } } public Task AddToPlaylist(string playlistId, IEnumerable<string> itemIds, string userId) { if (playlistId == null) { throw new ArgumentNullException("playlistId"); } if (itemIds == null) { throw new ArgumentNullException("itemIds"); } var dict = new NameValueCollection(); dict.AddIfNotNull("Ids", itemIds); var url = GetApiUrl(new Uri(string.Format("Playlists/{0}/Items", playlistId), UriKind.Relative), dict); return PostAsync<EmptyRequestResult>(url, new NameValueCollection(), CancellationToken.None); } public async Task<PlaylistCreationResult> CreatePlaylist(PlaylistCreationRequest request) { if (string.IsNullOrEmpty(request.UserId.ToString("N", CultureInfo.InvariantCulture))) { throw new ArgumentNullException("userId"); } if (string.IsNullOrEmpty(request.MediaType) && (request.ItemIdList == null || !request.ItemIdList.Any())) { throw new ArgumentNullException("must provide either MediaType or Ids"); } var queryString = new NameValueCollection { { "UserId", request.UserId.ToString("N", CultureInfo.InvariantCulture) }, { "Name", request.Name } }; if (!string.IsNullOrEmpty(request.MediaType)) queryString.Add("MediaType", request.MediaType); if (request.ItemIdList != null && request.ItemIdList.Any()) queryString.Add("Ids", request.ItemIdList.Select(o => o.ToString("N", CultureInfo.InvariantCulture)).ToList()); var url = GetApiUrl(new Uri("Playlists/", UriKind.Relative), queryString); return await PostAsync<PlaylistCreationResult>(url, new NameValueCollection(), CancellationToken.None); } public async Task<QueryResult<BaseItemDto>> GetPlaylistItems(PlaylistItemQuery query) { if (query == null) { throw new ArgumentNullException("query"); } var dict = new NameValueCollection(); dict.AddIfNotNull("StartIndex", query.StartIndex); dict.AddIfNotNull("Limit", query.Limit); dict.Add("UserId", query.UserId); if (query.Fields != null) { dict.Add("fields", query.Fields.Select(f => f.ToString())); } var url = GetApiUrl(new Uri("Playlists/" + query.Id + "/Items", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public Task RemoveFromPlaylist(string playlistId, IEnumerable<string> entryIds) { if (playlistId == null) { throw new ArgumentNullException("playlistId"); } if (entryIds == null) { throw new ArgumentNullException("entryIds"); } var dict = new NameValueCollection(); dict.AddIfNotNull("EntryIds", entryIds); var url = GetApiUrl(new Uri(string.Format("Playlists/{0}/Items", playlistId), UriKind.Relative), dict); return DeleteAsync<EmptyRequestResult>(url, CancellationToken.None); } public async Task<ContentUploadHistory> GetContentUploadHistory(string deviceId) { var dict = new NameValueCollection(); dict.Add("DeviceId", deviceId); var url = GetApiUrl(new Uri("Devices/CameraUploads", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<ContentUploadHistory>(stream); } } public async Task UploadFile(Stream stream, LocalFileInfo file, CancellationToken cancellationToken = default) { var dict = new NameValueCollection(); dict.Add("DeviceId", DeviceId); dict.Add("Name", file.Name); dict.Add("Id", file.Id); dict.AddIfNotNullOrEmpty("Album", file.Album); var url = GetApiUrl(new Uri("Devices/CameraUploads", UriKind.Relative), dict); using (stream) { await SendAsync(new HttpRequest { CancellationToken = cancellationToken, Method = "POST", RequestHeaders = HttpHeaders, Url = url, RequestContentType = file.MimeType, RequestStream = stream }, false).ConfigureAwait(false); } } public async Task<DevicesOptions> GetDevicesOptions() { var dict = new NameValueCollection(); var url = GetApiUrl(new Uri("System/Configuration/devices", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<DevicesOptions>(stream); } } public async Task<PlaybackInfoResponse> GetPlaybackInfo(PlaybackInfoRequest request) { var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", request.UserId.ToString("N", CultureInfo.InvariantCulture)); var url = GetApiUrl(new Uri("Items/" + request.Id + "/PlaybackInfo", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<PlaybackInfoResponse>(stream); } } public Task<QueryFilters> GetFilters(string userId, string parentId, string[] mediaTypes, string[] itemTypes) { throw new NotImplementedException(); } public Task UpdateItem(BaseItemDto item) { throw new NotImplementedException(); } public Task UpdateUserConfiguration(string userId, UserConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } var url = GetApiUrl(new Uri("Users/" + userId + "/Configuration", UriKind.Relative)); return PostAsync<UserConfiguration, EmptyRequestResult>(url, configuration, CancellationToken.None); } public async Task<UserDto> GetOfflineUserAsync(string id) { if (string.IsNullOrEmpty(id)) { throw new ArgumentNullException("id"); } var url = GetApiUrl(new Uri("Users/" + id + "/Offline", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<UserDto>(stream); } } public async Task<List<RecommendationDto>> GetMovieRecommendations(MovieRecommendationQuery query) { var dict = new NameValueCollection(); dict.AddIfNotNullOrEmpty("UserId", query.UserId); dict.AddIfNotNullOrEmpty("ParentId", query.ParentId); dict.AddIfNotNull("ItemLimit", query.ItemLimit); dict.AddIfNotNull("CategoryLimit", query.CategoryLimit); if (query.Fields != null) { dict.Add("fields", query.Fields.Select(f => f.ToString())); } var url = GetApiUrl(new Uri("Movies/Recommendations", UriKind.Relative), dict); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<List<RecommendationDto>>(stream); } } public Task<LiveStreamResponse> OpenLiveStream(LiveStreamRequest request, CancellationToken cancellationToken) { var url = GetApiUrl(new Uri("LiveStreams/Open", UriKind.Relative)); return PostAsync<LiveStreamRequest, LiveStreamResponse>(url, request, cancellationToken); } public Task<int> DetectMaxBitrate(CancellationToken cancellationToken) { throw new NotImplementedException(); } public async Task<EndPointInfo> GetEndPointInfo(CancellationToken cancellationToken) { var url = GetApiUrl(new Uri("System/Endpoint", UriKind.Relative)); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<EndPointInfo>(stream); } } public async Task<QueryResult<BaseItemDto>> GetInstantMixFromItemAsync(SimilarItemsQuery query) { if (query == null) { throw new ArgumentNullException("query"); } var url = GetInstantMixUrl(query, "Items"); using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } public async Task<QueryResult<BaseItemDto>> GetSimilarItemsAsync(SimilarItemsQuery query, CancellationToken cancellationToken = default) { if (query == null) { throw new ArgumentNullException("query"); } var url = GetSimilarItemListUrl(query, "Items"); using (var stream = await GetSerializedStreamAsync(url, cancellationToken).ConfigureAwait(false)) { return DeserializeFromStream<QueryResult<BaseItemDto>>(stream); } } } }
37.567506
172
0.585531
[ "MIT" ]
villagra/jellyfin-apiclient-dotnet
Src/Jellyfin.ApiClient.Legacy/ApiClient.cs
98,504
C#
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. namespace IdentityServer4.Quickstart.UI { public static class AccountOptions { private static bool showLogoutPrompt = true; public static bool ShowLogoutPrompt { get => showLogoutPrompt; set => showLogoutPrompt = value; } public static bool AutomaticRedirectAfterSignOut { get => automaticRedirectAfterSignOut; set => automaticRedirectAfterSignOut = value; } private static bool automaticRedirectAfterSignOut; } }
42.466667
144
0.744113
[ "MIT" ]
Djangoum/HouseToolBox
HouseToolBox.Sso/Quickstart/Account/AccountOptions.cs
639
C#
/* * Copyright (c) 2012-2021 Snowflake Computing Inc. All rights reserved. */ using System.Data; using System.Data.Common; using System; using System.Threading; using System.Threading.Tasks; namespace Snowflake.Data.Tests { using NUnit.Framework; using Snowflake.Data.Client; using Snowflake.Data.Configuration; using System.Diagnostics; [TestFixture] class SFDbCommandITAsync : SFBaseTestAsync { [Test] public void TestExecAsyncAPI() { using (DbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; Task connectTask = conn.OpenAsync(CancellationToken.None); Assert.AreEqual(ConnectionState.Connecting, conn.State); connectTask.Wait(); Assert.AreEqual(ConnectionState.Open, conn.State); using (DbCommand cmd = conn.CreateCommand()) { int queryResult = 0; cmd.CommandText = "select count(seq4()) from table(generator(timelimit => 3)) v"; Task<DbDataReader> execution = cmd.ExecuteReaderAsync(); Task readCallback = execution.ContinueWith((t) => { using (DbDataReader reader = t.Result) { Assert.IsTrue(reader.Read()); queryResult = reader.GetInt32(0); Assert.IsFalse(reader.Read()); } }); // query is not finished yet, result is still 0; Assert.AreEqual(0, queryResult); // block till query finished readCallback.Wait(); // queryResult should be updated by callback Assert.AreNotEqual(0, queryResult); } conn.Close(); } } [Test] public void TestCancelExecuteAsync() { CancellationTokenSource externalCancel = new CancellationTokenSource(TimeSpan.FromSeconds(8)); using (DbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); DbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select count(seq4()) from table(generator(timelimit => 20)) v"; // external cancellation should be triggered before timeout cmd.CommandTimeout = 10; try { Task<object> t = cmd.ExecuteScalarAsync(externalCancel.Token); t.Wait(); Assert.Fail(); } catch { // assert that cancel is not triggered by timeout, but external cancellation Assert.IsTrue(externalCancel.IsCancellationRequested); } Thread.Sleep(2000); conn.Close(); } } } [TestFixture] class SFDbCommandITSlow : SFBaseTest { [Test] public void TestLongRunningQuery() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select count(seq4()) from table(generator(timelimit => 60)) v order by 1"; IDataReader reader = cmd.ExecuteReader(); // only one result is returned Assert.IsTrue(reader.Read()); conn.Close(); } } [Test] public void TestRowsAffectedOverflowInt() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); using (IDbCommand command = conn.CreateCommand()) { command.CommandText = "create or replace table test_rows_affected_overflow(c1 number)"; command.ExecuteNonQuery(); command.CommandText = "insert into test_rows_affected_overflow select seq4() from table(generator(rowcount=>2147484000))"; int affected = command.ExecuteNonQuery(); Assert.AreEqual(-1, affected); command.CommandText = "drop table if exists test_rows_affected_overflow"; command.ExecuteNonQuery(); } conn.Close(); } } } [TestFixture] class SFDbCommandIT : SFBaseTest { [Test] public void TestSimpleCommand() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select 1"; // command type can only be text, stored procedure are not supported. Assert.AreEqual(CommandType.Text, cmd.CommandType); try { cmd.CommandType = CommandType.StoredProcedure; Assert.Fail(); } catch(SnowflakeDbException e) { Assert.AreEqual(270009, e.ErrorCode); } Assert.AreEqual(UpdateRowSource.None, cmd.UpdatedRowSource); try { cmd.UpdatedRowSource = UpdateRowSource.FirstReturnedRecord; Assert.Fail(); } catch(SnowflakeDbException e) { Assert.AreEqual(270009, e.ErrorCode); } Assert.AreSame(conn, cmd.Connection); try { cmd.Connection = null; Assert.Fail(); } catch(SnowflakeDbException e) { Assert.AreEqual(270009, e.ErrorCode); } Assert.IsFalse(((SnowflakeDbCommand)cmd).DesignTimeVisible); try { ((SnowflakeDbCommand)cmd).DesignTimeVisible = true; Assert.Fail(); } catch(SnowflakeDbException e) { Assert.AreEqual(270009, e.ErrorCode); } object val = cmd.ExecuteScalar(); Assert.AreEqual(1L, (long)val); conn.Close(); } } [Test] // Skip SimpleLargeResultSet test on GCP as it will fail // on row 8192 consistently on Appveyor. [IgnoreOnEnvIs("snowflake_cloud_env", new string[] {"GCP" })] public void TestSimpleLargeResultSet() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select seq4(), uniform(1, 10, 42) from table(generator(rowcount => 1000000)) v order by 1"; IDataReader reader = cmd.ExecuteReader(); int counter = 0; while (reader.Read()) { Assert.AreEqual(counter.ToString(), reader.GetString(0)); counter++; } conn.Close(); } } /* * Disabled to make sure that configuration changes does not cause problems with appveyor * [Test] public void TestUseV1ResultParser() { SFConfiguration.Instance().UseV2JsonParser = false; using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select seq4(), uniform(1, 10, 42) from table(generator(rowcount => 200000)) v order by 1"; IDataReader reader = cmd.ExecuteReader(); int counter = 0; while (reader.Read()) { Assert.AreEqual(counter.ToString(), reader.GetString(0)); counter++; } conn.Close(); } SFConfiguration.Instance().UseV2JsonParser = true; } [Test] public void TestUseV2ChunkDownloader() { SFConfiguration.Instance().UseV2ChunkDownloader = true; using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select seq4(), uniform(1, 10, 42) from table(generator(rowcount => 200000)) v order by 1"; IDataReader reader = cmd.ExecuteReader(); int counter = 0; while (reader.Read()) { Assert.AreEqual(counter.ToString(), reader.GetString(0)); counter++; } conn.Close(); } SFConfiguration.Instance().UseV2ChunkDownloader = false; } */ [Test] public void TestDataSourceError() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select * from table_not_exists"; try { IDataReader reader = cmd.ExecuteReader(); Assert.Fail(); } catch (SnowflakeDbException e) { Assert.AreEqual(2003, e.ErrorCode); Assert.AreNotEqual("", e.QueryId); } conn.Close(); } } [Test] public void TestCancelQuery() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); cmd.CommandText = "select count(seq4()) from table(generator(timelimit => 20)) v"; Task executionThread = Task.Run(() => { try { cmd.ExecuteScalar(); Assert.Fail(); } catch(SnowflakeDbException e) { // 604 is error code from server meaning query has been canceled if (604 != e.ErrorCode) { Assert.Fail($"Unexpected error code {e.ErrorCode} for {e.Message}"); } } }); Thread.Sleep(8000); cmd.Cancel(); try { executionThread.Wait(); } catch (AggregateException e) { if (e.InnerException.GetType() != typeof(NUnit.Framework.AssertionException)) { Assert.AreEqual( "System.Threading.Tasks.TaskCanceledException", e.InnerException.GetType().ToString()); } else { // Unexpected exception throw; } } conn.Close(); } } [Test] public void TestQueryTimeout() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); IDbCommand cmd = conn.CreateCommand(); // timelimit = 17min cmd.CommandText = "select count(seq4()) from table(generator(timelimit => 1020)) v"; // timeout = 16min - Using a timeout > default Rest timeout of 15min cmd.CommandTimeout = 16*60; try { Stopwatch stopwatch = Stopwatch.StartNew(); cmd.ExecuteScalar(); stopwatch.Stop(); //Should timeout before the query time limit of 17min Assert.Less(stopwatch.ElapsedMilliseconds, 17 * 60 * 1000); // Should timeout after the defined query timeout of 16min Assert.GreaterOrEqual(stopwatch.ElapsedMilliseconds, 16 * 60 * 1000); Assert.Fail(); } catch(SnowflakeDbException e) { // 604 is error code from server meaning query has been canceled Assert.AreEqual(e.ErrorCode, 604); } conn.Close(); } } [Test] public void TestTransaction() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); try { conn.BeginTransaction(IsolationLevel.ReadUncommitted); Assert.Fail(); } catch (SnowflakeDbException e) { Assert.AreEqual(270009, e.ErrorCode); } IDbTransaction tran = conn.BeginTransaction(IsolationLevel.ReadCommitted); IDbCommand command = conn.CreateCommand(); command.Transaction = tran; command.CommandText = "create or replace table testtransaction(cola string)"; command.ExecuteNonQuery(); command.Transaction.Commit(); command.CommandText = "show tables like 'testtransaction'"; IDataReader reader = command.ExecuteReader(); Assert.IsTrue(reader.Read()); Assert.IsFalse(reader.Read()); // start another transaction to test rollback tran = conn.BeginTransaction(IsolationLevel.ReadCommitted); command.Transaction = tran; command.CommandText = "insert into testtransaction values('test')"; command.ExecuteNonQuery(); command.CommandText = "select * from testtransaction"; reader = command.ExecuteReader(); Assert.IsTrue(reader.Read()); Assert.AreEqual("test", reader.GetString(0)); command.Transaction.Rollback(); // no value will be in table since it has been rollbacked command.CommandText = "select * from testtransaction"; reader = command.ExecuteReader(); Assert.IsFalse(reader.Read()); conn.Close(); } } [Test] public void TestRowsAffected() { String[] testCommands = { "create or replace table test_rows_affected(cola int, colb string)", "insert into test_rows_affected values(1, 'a'),(2, 'b')", "merge into test_rows_affected using (select 1 as cola, 'c' as colb) m on " + "test_rows_affected.cola = m.cola when matched then update set test_rows_affected.colb='update' " + "when not matched then insert (cola, colb) values (3, 'd')", "drop table if exists test_rows_affected" }; int[] expectedResult = { 0, 2, 1, 0 }; using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); using (IDbCommand command = conn.CreateCommand()) { int rowsAffected = -1; for (int i=0; i<testCommands.Length; i++) { command.CommandText = testCommands[i]; rowsAffected = command.ExecuteNonQuery(); Assert.AreEqual(expectedResult[i], rowsAffected); } } conn.Close(); } } [Test] public void TestExecuteScalarNull() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); using (IDbCommand command = conn.CreateCommand()) { command.CommandText = "select 1 where 2 > 3"; object val = command.ExecuteScalar(); Assert.AreEqual(DBNull.Value, val); } conn.Close(); } } [Test] public void TestCreateCommandBeforeOpeningConnection() { using(var conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; using(var command = conn.CreateCommand()) { conn.Open(); command.CommandText = "select 1"; Assert.DoesNotThrow(() => command.ExecuteNonQuery()); } } } [Test] public void TestRowsAffectedUnload() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; conn.Open(); using (IDbCommand command = conn.CreateCommand()) { command.CommandText = "create or replace table test_rows_affected_unload(c1 number)"; command.ExecuteNonQuery(); command.CommandText = "insert into test_rows_affected_unload values(1), (2), (3), (4), (5), (6)"; command.ExecuteNonQuery(); command.CommandText = "drop stage if exists my_unload_stage"; command.ExecuteNonQuery(); command.CommandText = "create stage if not exists my_unload_stage"; command.ExecuteNonQuery(); command.CommandText = "copy into @my_unload_stage/unload/ from test_rows_affected_unload;"; int affected = command.ExecuteNonQuery(); Assert.AreEqual(6, affected); command.CommandText = "drop stage if exists my_unload_stage"; command.ExecuteNonQuery(); command.CommandText = "drop table if exists test_rows_affected_unload"; command.ExecuteNonQuery(); } conn.Close(); } } } }
35.384348
143
0.468642
[ "Apache-2.0" ]
Christian-Oleson/snowflake-connector-net
Snowflake.Data.Tests/SFDbCommandIT.cs
20,348
C#
using System; using System.IO; using System.Net; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; namespace GeocodeSharp.Google { /// <summary> /// Encapsulates methods for executing geocode requests. /// </summary> public class GeocodeClient : IGeocodeClient { private readonly UsageMode _mode; private const string _domain = "https://maps.googleapis.com"; private const string _apiPath = "/maps/api/geocode/json?"; private readonly string _clientId; private readonly string _cryptoKey; private readonly string _clientKey; private IGeocodeProxyProvider _proxyProvider; /// <summary> /// Initialize GeocodeClient without a Google API key and use default anonymous access. /// NOTE: Throttling may apply. /// </summary> public GeocodeClient() { _mode = UsageMode.Free; _proxyProvider = new DefaultGeocodeProxyProvider(); } public GeocodeClient(IGeocodeProxyProvider proxyProvider): this() { _proxyProvider = proxyProvider; } /// <summary> /// Initialize GeocodeClient with your Google API key to utilize it in the requests to Google and bypass the default anonymous throttling. /// </summary> /// <param name="apiKey">Google Maps API Key</param> public GeocodeClient(string apiKey): this() { _clientKey = apiKey; _mode = UsageMode.ClientKey; } public GeocodeClient(IGeocodeProxyProvider proxyProvider, string apiKey): this(apiKey) { _proxyProvider = proxyProvider; } /// <summary> /// Initialize GeocodeClient with your Google API key to utilize it in the requests to Google and bypass the default anonymous throttling. /// </summary> /// <param name="clientId">The client ID. Applicable when using Maps API for Work.</param> /// <param name="cryptoKey">The base64 encoded crypto key. Applicable when using Maps API for Work.</param> /// <remarks> /// See - https://developers.google.com/maps/documentation/business/webservices/#client_id /// </remarks> public GeocodeClient(string clientId, string cryptoKey): this() { _clientId = clientId; _cryptoKey = cryptoKey; _mode = UsageMode.ApiForWork; } public GeocodeClient(IGeocodeProxyProvider proxyProvider, string clientId, string cryptoKey): this(clientId, cryptoKey) { _proxyProvider = proxyProvider; } /// <summary> /// Calls Google's geocode API with the specified address and optional region. /// https://developers.google.com/maps/documentation/geocoding/#GeocodingRequests /// </summary> /// <param name="address">The street address that you want to geocode, in the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided.</param> /// <param name="region">The region code, specified as a ccTLD ("top-level domain") two-character value. This parameter will only influence, not fully restrict, results from the geocoder.</param> /// <param name="language"> The language in which to return results. Address components will all be returned in the same language, which is chosen from the first component. Should names not be available in the preferred language, the closest match will be used.</param> /// <param name="filter">A component filter for which you wish to obtain a geocode. The component filter swill fully restrict the results from the geocoder. Only the results that match all the filters will be returned. Each address component can only be specified either in the address parameter or as a component filter, but not both. Doing so may result in ZERO_RESULTS.</param> /// <returns>The geocode response.</returns> public async Task<GeocodeResponse> GeocodeAddress(string address, string region = null, ComponentFilter filter = null, string language = null) { var request = BuildRequest(address, region, language, filter); var response = await DoRequestAsync(request); return JsonConvert.DeserializeObject<GeocodeResponse>(response); } /// <summary> /// Calls Google's geocode API with the specified address and optional region. /// https://developers.google.com/maps/documentation/geocoding/#GeocodingRequests /// </summary> /// <param name="address">The street address that you want to geocode, in the format used by the national postal service of the country concerned. Additional address elements such as business names and unit, suite or floor numbers should be avoided.</param> /// <param name="region">The region code, specified as a ccTLD ("top-level domain") two-character value. This parameter will only influence, not fully restrict, results from the geocoder.</param> /// <param name="language"> The language in which to return results. Address components will all be returned in the same language, which is chosen from the first component. Should names not be available in the preferred language, the closest match will be used.</param> /// <param name="filter">A component filter for which you wish to obtain a geocode. The component filter swill fully restrict the results from the geocoder. Only the results that match all the filters will be returned. Each address component can only be specified either in the address parameter or as a component filter, but not both. Doing so may result in ZERO_RESULTS.</param> /// <returns>The geocode response.</returns> public async Task<string> GeocodeAddressJson(string address, string region = null, ComponentFilter filter = null, string language = null) { var request = BuildRequest(address, region, language, filter); return await DoRequestAsync(request); } /// <summary> /// Calls Google's geocode API with the specified address and optional region. /// https://developers.google.com/maps/documentation/geocoding/#GeocodingRequests /// </summary> /// <param name="filter">A component filter for which you wish to obtain a geocode. The component filter swill fully restrict the results from the geocoder. Only the results that match all the filters will be returned. Each address component can only be specified either in the address parameter or as a component filter, but not both. Doing so may result in ZERO_RESULTS.</param> /// <param name="region">The region code, specified as a ccTLD ("top-level domain") two-character value. This parameter will only influence, not fully restrict, results from the geocoder.</param> /// <returns>The geocode response.</returns> public async Task<GeocodeResponse> GeocodeComponentFilter(ComponentFilter filter, string region = null) { var request = BuildRequest(filter, region); var response = await DoRequestAsync(request); return JsonConvert.DeserializeObject<GeocodeResponse>(response); } /// <summary> /// Calls Google's geocode API with the specified address and optional region. /// https://developers.google.com/maps/documentation/geocoding/#GeocodingRequests /// </summary> /// <param name="filter">A component filter for which you wish to obtain a geocode. The component filter swill fully restrict the results from the geocoder. Only the results that match all the filters will be returned. Each address component can only be specified either in the address parameter or as a component filter, but not both. Doing so may result in ZERO_RESULTS.</param> /// <param name="region">The region code, specified as a ccTLD ("top-level domain") two-character value. This parameter will only influence, not fully restrict, results from the geocoder.</param> /// <returns>The geocode response.</returns> public async Task<string> GeocodeComponentFilterJson(ComponentFilter filter, string region = null) { var request = BuildRequest(filter, region); return await DoRequestAsync(request); } private async Task<string> DoRequestAsync(HttpWebRequest request) { string json; using (var ms = new MemoryStream()) { using (var response = await request.GetResponseAsync()) using (var body = response.GetResponseStream()) { if (body != null) await body.CopyToAsync(ms); } json = Encoding.UTF8.GetString(ms.ToArray()); } return json; } private HttpWebRequest BuildRequest(ComponentFilter filter, string region) { if (filter == null) throw new ArgumentNullException("filter"); var addressPortion = BuildAddressPortion(filter, region); var authPortion = BuildAuthPortion(addressPortion); return _proxyProvider.CreateRequest(string.Format("{0}{1}{2}{3}", _domain, _apiPath, addressPortion, authPortion)); } private HttpWebRequest BuildRequest(string address, string region, string language, ComponentFilter filter) { if (string.IsNullOrWhiteSpace(address)) throw new ArgumentNullException("address"); var addressPortion = BuildAddressPortion(address, region, language, filter); var authPortion = BuildAuthPortion(addressPortion); return _proxyProvider.CreateRequest(string.Format("{0}{1}{2}{3}", _domain, _apiPath, addressPortion, authPortion)); } private string BuildAuthPortion(string addressPortion) { switch (_mode) { case UsageMode.Free: return string.Empty; case UsageMode.ClientKey: return string.Format("&key={0}", _clientKey); case UsageMode.ApiForWork: return BuildApiForWorkUrl(addressPortion); default: return string.Empty; } } private string BuildAddressPortion(ComponentFilter filter, string region) { var filterString = filter.ToUrlParameters(); if(string.IsNullOrWhiteSpace(filterString)) throw new ArgumentException("Component filter doesn't contain any component", "filter"); var addressPortion = string.Format("components={0}", filterString); if (!string.IsNullOrWhiteSpace(region)) { addressPortion += string.Format("&region={0}", Uri.EscapeDataString(region)); } return addressPortion; } private string BuildAddressPortion(string address, string region, string language, ComponentFilter filter) { var addressPortion = string.Format("address={0}", Uri.EscapeDataString(address)); if (!string.IsNullOrWhiteSpace(region)) { addressPortion += string.Format("&region={0}", Uri.EscapeDataString(region)); } if (!string.IsNullOrWhiteSpace(language)) { addressPortion += string.Format("&language={0}", Uri.EscapeDataString(language)); } if (filter != null) { var filterString = filter.ToUrlParameters(); if (!string.IsNullOrWhiteSpace(filterString)) { addressPortion += string.Format("&components={0}", filterString); } } return addressPortion; } private string BuildApiForWorkUrl(string addressPortion) { var cryptoBytes = Convert.FromBase64String(_cryptoKey.Replace("-", "+").Replace("_", "/")); var hashThis = string.Format("{0}{1}&client={2}", _apiPath, addressPortion, _clientId); var hashThisBytes = Encoding.ASCII.GetBytes(hashThis); using (var sha1 = new HMACSHA1(cryptoBytes)) { var hash = sha1.ComputeHash(hashThisBytes); var signature = Convert.ToBase64String(hash).Replace("+", "-").Replace("/", "_"); return string.Format("&client={0}&signature={1}", _clientId, signature); } } } }
54.801688
389
0.637127
[ "Apache-2.0" ]
bcuff/GeocodeSharp
src/GeocodeSharp/Google/GeocodeClient.cs
12,990
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using EmbyStat.Common.Models.Entities; using EmbyStat.Repositories; using EmbyStat.Repositories.Interfaces; using EmbyStat.Services; using FluentAssertions; using Moq; using Xunit; namespace Tests.Unit.Services { [Collection("Mapper collection")] public class LanguageServiceTests { private readonly List<Language> _languages; private readonly LanguageService _languageService; private readonly Mock<ILanguageRepository> _languageRepositoryMock; public LanguageServiceTests() { _languages = new List<Language> { new Language{ Name = "Nederlands", Code = "nl-BE", Id = "100" }, new Language{ Name = "English", Code = "en-US", Id = "101" } }; _languageRepositoryMock = new Mock<ILanguageRepository>(); _languageRepositoryMock.Setup(x => x.GetLanguages()).Returns(_languages); _languageService = new LanguageService(_languageRepositoryMock.Object); } [Fact] public void GetLanguages() { var languages = _languageService.GetLanguages().ToList(); languages.Should().NotBeNull(); languages.Count.Should().Be(_languages.Count); languages[0].Name.Should().Be("Nederlands"); languages[0].Code.Should().Be("nl-BE"); languages[0].Id.Should().Be("100"); languages[1].Name.Should().Be("English"); languages[1].Code.Should().Be("en-US"); languages[1].Id.Should().Be("101"); _languageRepositoryMock.Verify(x => x.GetLanguages(), Times.Exactly(1)); } } }
31.285714
85
0.623858
[ "MIT" ]
trizzone52/EmbyStat
Tests.Unit/Services/LanguageServiceTests.cs
1,754
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 mediapackage-2017-10-12.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.MediaPackage.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.MediaPackage.Model.Internal.MarshallTransformations { /// <summary> /// ListOriginEndpoints Request Marshaller /// </summary> public class ListOriginEndpointsRequestMarshaller : IMarshaller<IRequest, ListOriginEndpointsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((ListOriginEndpointsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(ListOriginEndpointsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.MediaPackage"); request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2017-10-12"; request.HttpMethod = "GET"; if (publicRequest.IsSetChannelId()) request.Parameters.Add("channelId", StringUtils.FromString(publicRequest.ChannelId)); if (publicRequest.IsSetMaxResults()) request.Parameters.Add("maxResults", StringUtils.FromInt(publicRequest.MaxResults)); if (publicRequest.IsSetNextToken()) request.Parameters.Add("nextToken", StringUtils.FromString(publicRequest.NextToken)); request.ResourcePath = "/origin_endpoints"; request.MarshallerVersion = 2; request.UseQueryString = true; return request; } private static ListOriginEndpointsRequestMarshaller _instance = new ListOriginEndpointsRequestMarshaller(); internal static ListOriginEndpointsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static ListOriginEndpointsRequestMarshaller Instance { get { return _instance; } } } }
36.473684
154
0.634921
[ "Apache-2.0" ]
philasmar/aws-sdk-net
sdk/src/Services/MediaPackage/Generated/Model/Internal/MarshallTransformations/ListOriginEndpointsRequestMarshaller.cs
3,465
C#
using System; using System.Collections.Generic; using System.Text; using System.Threading.Tasks; using Xamarin.Essentials; using Xunit; namespace DeviceTests { // TEST NOTES: // - a human needs to close the browser window public class Launcher_Tests { [Theory] [InlineData("http://www.example.com")] [InlineData("http://example.com/?query=blah")] [InlineData("https://example.com/?query=blah")] [InlineData("mailto://someone@microsoft.com")] [InlineData("mailto://someone@microsoft.com?subject=test")] [InlineData("tel:+1 555 010 9999")] [InlineData("sms:5550109999")] [Trait(Traits.InteractionType, Traits.InteractionTypes.Human)] public Task Open(string uri) { return Utils.OnMainThread(() => Launcher.OpenAsync(uri)); } [Theory] [InlineData("http://www.example.com")] [InlineData("http://example.com/?query=blah")] [InlineData("https://example.com/?query=blah")] [InlineData("mailto://someone@microsoft.com")] [InlineData("mailto://someone@microsoft.com?subject=test")] [InlineData("tel:+1 555 010 9999")] [InlineData("sms:5550109999")] public async Task CanOpen(string uri) { #if __IOS__ if (DeviceInfo.DeviceType == DeviceType.Virtual && (uri.Contains("tel:") || uri.Contains("mailto:"))) { Assert.False(await Launcher.CanOpenAsync(uri)); return; } #endif Assert.True(await Launcher.CanOpenAsync(uri)); } [Theory] [InlineData("http://www.example.com")] [InlineData("http://example.com/?query=blah")] [InlineData("https://example.com/?query=blah")] [InlineData("mailto://someone@microsoft.com")] [InlineData("mailto://someone@microsoft.com?subject=test")] [InlineData("tel:+1 555 010 9999")] [InlineData("sms:5550109999")] public async Task CanOpenUri(string uri) { #if __IOS__ if (DeviceInfo.DeviceType == DeviceType.Virtual && (uri.Contains("tel:") || uri.Contains("mailto:"))) { Assert.False(await Launcher.CanOpenAsync(new Uri(uri))); return; } #endif Assert.True(await Launcher.CanOpenAsync(new Uri(uri))); } #if __IOS__ [Theory] [InlineData("https://maps.apple.com/maps?q=Ole Vigs Gate 8B", "https://maps.apple.com/maps?q=Ole%20Vigs%20Gate%208B")] [InlineData("https://maps.apple.com", "https://maps.apple.com")] public void GetNativeUrl(string uri, string expected) { var url = Launcher.GetNativeUrl(new Uri(uri)); Assert.Equal(expected, url.AbsoluteString); } #endif [Theory] [InlineData("Not Valid Uri")] public async Task InvalidUri(string uri) { await Assert.ThrowsAsync<UriFormatException>(() => Launcher.CanOpenAsync(uri)); } [Theory] [InlineData("ms-invalidurifortest:abc")] public async Task CanNotOpenUri(string uri) { Assert.False(await Launcher.CanOpenAsync(new Uri(uri))); } [Theory] [InlineData("ms-invalidurifortest:abc")] public async Task CanNotOpen(string uri) { Assert.False(await Launcher.CanOpenAsync(uri)); } [Theory] [InlineData("http://www.example.com")] [InlineData("http://example.com/?query=blah")] [InlineData("https://example.com/?query=blah")] [InlineData("mailto://someone@microsoft.com")] [InlineData("mailto://someone@microsoft.com?subject=test")] [InlineData("tel:+1 555 010 9999")] [InlineData("sms:5550109999")] [Trait(Traits.InteractionType, Traits.InteractionTypes.Human)] public async Task TryOpen(string uri) { #if __IOS__ if (DeviceInfo.DeviceType == DeviceType.Virtual && (uri.Contains("tel:") || uri.Contains("mailto:"))) { Assert.False(await Launcher.TryOpenAsync(uri)); return; } #endif Assert.True(await Launcher.TryOpenAsync(uri)); } [Theory] [InlineData("ms-invalidurifortest:abc")] [Trait(Traits.InteractionType, Traits.InteractionTypes.Human)] public async Task CanNotTryOpen(string uri) { Assert.False(await Launcher.TryOpenAsync(new Uri(uri))); } } }
34.007463
126
0.589642
[ "MIT" ]
Akinnagbe/XamarinEssentials
DeviceTests/DeviceTests.Shared/Launcher_Tests.cs
4,559
C#
using System; using System.Collections.Generic; using System.Linq; namespace PaulasCadenza.Utilities { public static class Base36 { private const string CharList = "0123456789abcdefghijklmnopqrstuvwxyz"; public static string Encode(long input) { if (input < 0) { throw new ArgumentOutOfRangeException("input", input, "input cannot be negative"); } var result = new Stack<char>(); while (input != 0) { result.Push(CharList[(int)(input % 36)]); input /= 36; } return new string(result.ToArray()); } public static long Decode(string input) { var reversed = input.ToLower().Reverse(); var result = 0L; var pos = 0; foreach (var c in reversed) { result += CharList.IndexOf(c) * (long)Math.Pow(36, pos); ++pos; } return result; } } }
19.428571
86
0.647059
[ "MIT" ]
sonicmouse/PaulasCadenza
PaulasCadenza.Utilities/Base36.cs
818
C#
using Destiny.Core.Flow.Entity; using System; using System.ComponentModel; namespace Destiny.Core.Flow.IdentityServer.Entities { /// <summary> /// 持久化授权 /// </summary> [DisplayName("持久化授权")] public abstract class PersistedGrantBase : IEntity<Guid> { public Guid Id { get; set; } /// <summary> /// 键 /// </summary> [DisplayName("键")] public string Key { get; set; } /// <summary> /// 类型 /// </summary> [DisplayName("类型")] public string Type { get; set; } /// <summary> /// 主题id /// </summary> [DisplayName("主题id")] public string SubjectId { get; set; } /// <summary> /// 会话id /// </summary> [DisplayName("会话id")] public string SessionId { get; set; } /// <summary> /// 客户端id /// </summary> [DisplayName("客户端id")] public string ClientId { get; set; } /// <summary> /// 描述 /// </summary> [DisplayName("描述")] public string Description { get; set; } /// <summary> /// 过期时间 /// </summary> [DisplayName("过期时间")] public DateTime? Expiration { get; set; } /// <summary> /// 消费时间 /// </summary> [DisplayName("消费时间")] public DateTime? ConsumedTime { get; set; } /// <summary> /// 数据 /// </summary> [DisplayName("数据")] public string Data { get; set; } } }
22.157143
60
0.468085
[ "MIT" ]
dotNetTreasury/Destiny.Core.Flow
src/Destiny.Core.Flow.IdentityServer.Entities/Grants/PersistedGrantBase.cs
1,661
C#
using SPICA.Math3D; using System; using System.Globalization; using System.Numerics; namespace SPICA.Formats.Generic.COLLADA { static class DAEUtils { private const float RadToDegConstant = (float)((1 / Math.PI) * 180); private const string Matrix3x4Format = "{0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} 0 0 0 1"; public static float RadToDeg(float Radians) { return Radians * RadToDegConstant; } public static string RadToDegStr(float Radians) { return RadToDeg(Radians).ToString(CultureInfo.InvariantCulture); } public static string VectorStr(Vector2 v) { return FormattableString.Invariant($"{v.X} {v.Y}"); } public static string VectorStr(Vector3 v) { return FormattableString.Invariant($"{v.X} {v.Y} {v.Z}"); } public static string VectorStr(Vector4 v) { return FormattableString.Invariant($"{v.X} {v.Y} {v.Z} {v.W}"); } public static string Vector2Str(Vector4 v) { return FormattableString.Invariant($"{v.X} {v.Y}"); } public static string Vector3Str(Vector4 v) { return FormattableString.Invariant($"{v.X} {v.Y} {v.Z}"); } public static string Vector4Str(Vector4 v) { return VectorStr(v); } public static string Vector2l1Str(Vector4 v) { return FormattableString.Invariant($"{v.W} {0}"); } public static string MatrixStr(Matrix3x4 m) { return string.Format(CultureInfo.InvariantCulture, Matrix3x4Format, m.M11, m.M21, m.M31, m.M41, m.M12, m.M22, m.M32, m.M42, m.M13, m.M23, m.M33, m.M43); } } }
26.927536
107
0.549516
[ "Unlicense" ]
EddyK28/SPICA
SPICA/Formats/Generic/COLLADA/DAEUtils.cs
1,860
C#
using System; using System.Linq; using System.Threading; using Autofac.Extras.FakeItEasy; using Elasticsearch.Net.Connection; using Elasticsearch.Net.ConnectionPool; using Elasticsearch.Net.Tests.Unit.Stubs; using FluentAssertions; using NUnit.Framework; namespace Elasticsearch.Net.Tests.Unit.Failover.Concurrent { [TestFixture] public class ConcurrencyTests { private static Uri[] _uris = new[] { new Uri("http://localhost:9200"), new Uri("http://localhost:9201"), new Uri("http://localhost:9202"), new Uri("http://localhost:9203"), }; private readonly StaticConnectionPool _connectionPool; private readonly ConnectionConfiguration _config; public ConcurrencyTests() { _connectionPool = new SniffingConnectionPool(_uris); _config = new ConnectionConfiguration(_connectionPool) .SniffOnConnectionFault() .SniffOnStartup() .MaximumRetries(5); } /// <summary> /// This test calls a cluster which is configured to throw randomly but never on node 9202 /// We use 4 threads to do concurrent calls on a single client instance /// Failover should always discover the live node 9202 and none of our calls should throw an exception. /// </summary> [Test] public void ClusterWithOnlyOneGoodNode_MustWithstandThousandsOfConcurrentCalls() { using (var fake = new AutoFake(callsDoNothing: true)) { //set up connection configuration that holds a connection pool //with '_uris' (see the constructor) fake.Provide<IConnectionConfigurationValues>(_config); //we want to use our special concurrencytestconnection //this randonly throws on any node but 9200 and sniffing will represent a different //view of the cluster each time but always holding node 9200 fake.Provide<IConnection>(new ConcurrencyTestConnection(this._config)); //prove a real Transport with its unspecified dependencies //as fakes FakeCalls.ProvideDefaultTransport(fake); //create a real ElasticsearchClient with it unspecified dependencies as fakes var client = fake.Resolve<ElasticsearchClient>(); int seen = 0; //We'll call Info() 10.000 times on 4 threads //This should not throw any exceptions even if connections sometime fail at a node level //because node 9200 is always up and running Assert.DoesNotThrow(()=> { Action a = () => { for(var i=0;i<10000;i++) { client.Info<VoidResponse>(); Interlocked.Increment(ref seen); } }; var thread1 = new Thread(()=>a()); var thread2 = new Thread(()=>a()); var thread3 = new Thread(()=>a()); var thread4 = new Thread(()=>a()); thread1.Start(); thread2.Start(); thread3.Start(); thread4.Start(); thread1.Join(); thread2.Join(); thread3.Join(); thread4.Join(); }); //we should have seen 40.000 increments //Sadly we can't use FakeItEasy's to ensure get is called 40.000 times //because it internally uses fixed arrays that will overflow :) seen.Should().Be(40000); } } } }
31.875
105
0.696405
[ "Apache-2.0" ]
Entroper/elasticsearch-net
src/Tests/Elasticsearch.Net.Tests.Unit/Failover/Concurrent/ConcurrencyTests.cs
3,062
C#
using KerbalKonstructs.Core; using KerbalKonstructs.Modules; using KerbalKonstructs.Utilities; using System; using UnityEngine; using KodeUI; namespace KerbalKonstructs.UI { public class StaffGUI : VerticalLayout { public static float fXP; public static GUIStyle LabelInfo; public static GUIStyle BoxInfo; public static GUIStyle ButtonSmallText; public static Vector2 scrollPos; public static Texture tKerbal = GameDatabase.Instance.GetTexture("KerbalKonstructs/Assets/billeted", false); public static Texture tNoKerbal = GameDatabase.Instance.GetTexture("KerbalKonstructs/Assets/unbilleted", false); public static Texture tXPGained = GameDatabase.Instance.GetTexture("KerbalKonstructs/Assets/xpgained", false); public static Texture tXPUngained = GameDatabase.Instance.GetTexture("KerbalKonstructs/Assets/xpungained", false); ListView staffList; StaffItem.List staffItems; VerticalLayout barracksGroup; VerticalLayout nonbarracksGroup; InfoLine assignedStaff; InfoLine staff; InfoLine unassignedStaff; InfoLine hireTip; InfoLine fireTipCost; InfoLine fireTipRep; UIText noStaffRequired; IBarracks barracks; IProduction production; int maxStaff; int currentStaff; const float fireRefund = 2500; const float fireRepCost = 1; public override void CreateUI() { base.CreateUI(); this.ChildForceExpand(true, false) .Add<ListView>(out staffList) .PreferredHeight(58) .Finish() .Add<VerticalLayout>(out barracksGroup) .Add<InfoLine>(out staff) .Label(KKLocalization.Staff) .Finish() .Add<InfoLine>(out unassignedStaff) .Label(KKLocalization.StaffUnassigned) .Finish() .Add<HorizontalLayout>() .Add<UIButton>() .Text(KKLocalization.StaffHire) .OnClick(HireStaff) .Finish() .Add<UIButton>() .Text(KKLocalization.StaffFire) .OnClick(FireStaff) .Finish() .Finish() .Add<FixedSpace>() .Size(2) .Finish() .Add<InfoLine>(out hireTip) .Label(KKLocalization.StaffCostToHire) .Finish() .Add<InfoLine>(out fireTipCost) .Label(KKLocalization.StaffRefundForFiring) .Finish() .Add<InfoLine>(out fireTipRep) .Label(KKLocalization.StaffReputationLost) .Finish() .Finish() .Add<VerticalLayout>(out nonbarracksGroup) .Add<InfoLine>(out assignedStaff) .Label(KKLocalization.StaffAssigned) .Finish() .Add<HorizontalLayout>() .Add<UIButton>() .Text(KKLocalization.StaffAssign) .OnClick(AssignStaff) .FlexibleLayout(true, false) .Finish() .Add<UIButton>() .Text(KKLocalization.StaffUnassign) .OnClick(UnassignStaff) .FlexibleLayout(true, false) .Finish() .Finish() .Finish() .Add<FixedSpace>() .Size(5) .Finish() .Add<UIText>(out noStaffRequired) .Text(KKLocalization.StaffNoStaffRequired) .Finish() ; staffItems = new StaffItem.List(staffList.Group); staffItems.Content = staffList.Content; } void HireStaff() { if (currentStaff == maxStaff) { MiscUtils.HUDMessage(KKLocalization.StaffFacilityIsFull, 10, 3); } else { double currentfunds = Funding.Instance.Funds; if (Barracks.hireFundCost > currentfunds) { MiscUtils.HUDMessage(KKLocalization.StaffInsufficientFunds, 10, 3); } else { barracks.HireStaff(); UpdateUI(); } } } void FireStaff() { if (currentStaff < 2) { MiscUtils.HUDMessage(KKLocalization.StaffMustHaveCaretaker, 10, 3); } else { if (barracks.StaffAvailable < 1) { MiscUtils.HUDMessage(KKLocalization.StaffAllStaffAssigned, 10, 3); } else { barracks.FireStaff(); UpdateUI(); } } } void AssignStaff() { //FIXME this should be in IProduction if (currentStaff == maxStaff) { MiscUtils.HUDMessage(KKLocalization.StaffFullyStaffed, 10, 3); } else { float fAvailable = TotalBarracksPool(production.StaticInstance); if (fAvailable < 1) { MiscUtils.HUDMessage(KKLocalization.StaffNoUnassignedStaffAvailable, 10, 3); } else { StaticInstance nearestBarracks = NearestBarracks(production.StaticInstance); if (nearestBarracks != null) { DrawFromBarracks(nearestBarracks); production.AssignStaff(); } else { MiscUtils.HUDMessage(KKLocalization.StaffNoFacilityWithStaff, 10, 3); } UpdateUI(); } } } void UnassignStaff() { //FIXME this should be in IProduction if (currentStaff < 2) { MiscUtils.HUDMessage(KKLocalization.StaffMustHaveCaretaker, 10, 3); } else { StaticInstance availableSpace = NearestBarracks(production.StaticInstance, false); if (availableSpace != null) { UnassignToBarracks(availableSpace); production.UnassignStaff(); UpdateUI(); } else { MiscUtils.HUDMessage(KKLocalization.StaffNoRoom, 10, 3); } } } public static float TotalBarracksPool(StaticInstance staticInstance) { float fKerbals = 0f; foreach (StaticInstance instance in StaticDatabase.GetAllStatics()) { //if ((string)obj.model.getSetting("DefaultFacilityType") == "None") continue; if (instance.FacilityType != "Barracks") { if (instance.model.DefaultFacilityType != "Barracks") continue; } var dist = Vector3.Distance(staticInstance.position, instance.position); if (dist > 5000f) continue; Barracks foundBarracks = instance.gameObject.GetComponent<Barracks>(); fKerbals = fKerbals + foundBarracks.StaffAvailable; } return fKerbals; } public static StaticInstance NearestBarracks(StaticInstance staticInstance, bool bUnassigned = true) { StaticInstance soNearest = null; float fKerbals = 0f; foreach (StaticInstance instance in StaticDatabase.GetAllStatics()) { //if ((string)obj.model.getSetting("DefaultFacilityType") == "None") continue; if (instance.FacilityType != "Barracks") { if (instance.model.DefaultFacilityType != "Barracks") continue; } if (instance.CelestialBody.name == FlightGlobals.currentMainBody.name) { var dist = Vector3.Distance(staticInstance.position, instance.position); if (dist > 5000f) continue; } else continue; Barracks foundBarracks = instance.gameObject.GetComponent<Barracks>(); if (bUnassigned) { fKerbals = foundBarracks.StaffAvailable; if (fKerbals < 1) continue; else { soNearest = instance; break; } } else { if (foundBarracks.StaffCurrent == 1) continue; if ((foundBarracks.StaffCurrent - 1f) == foundBarracks.StaffAvailable) continue; else { soNearest = instance; break; } } } return soNearest; } public static void DrawFromBarracks(StaticInstance staticInstance) { IBarracks foundBarracks = staticInstance.gameObject.GetComponent<IBarracks>(); foundBarracks.DrawStaff(); } public static void UnassignToBarracks(StaticInstance staticInstance) { IBarracks foundBarracks = staticInstance.gameObject.GetComponent<IBarracks>(); foundBarracks.ReturnStaff(); } void BuildStaffList(int currentStaff, int maxStaff) { int empty = maxStaff - currentStaff; staffItems.Clear(); while (currentStaff-- > 0) { staffItems.Add(new StaffItem (true)); } while (empty-- > 0) { staffItems.Add(new StaffItem (false)); } staffList.Items(staffItems); } void UpdateUI() { // assume we don't have any staffing maxStaff = 0; currentStaff = 0; // check if we can access the staffing variables if (barracks != null) { currentStaff = barracks.StaffCurrent; maxStaff = barracks.StaffMax; } else if (production != null) { currentStaff = production.StaffCurrent; maxStaff = production.StaffMax; } /* FIXME this should be moved into barracks/production loading if (maxStaff < 1) { maxStaff = staticInstance.model.DefaultStaffMax; if (maxStaff < 1) { barracks.StaffMax = 0; } else { barracks.StaffMax = maxStaff; } } */ if (maxStaff > 0) { float CountEmpty = maxStaff - currentStaff; BuildStaffList(currentStaff, maxStaff); staffList.SetActive(true); noStaffRequired.SetActive(false); barracksGroup.SetActive(barracks != null); nonbarracksGroup.SetActive(barracks == null); if (barracks != null) { staff.Info($"{currentStaff} / {maxStaff}"); unassignedStaff.Info($"{barracks.StaffAvailable} / {currentStaff}"); hireTip.Info($"{Barracks.hireFundCost:F0}"); fireTipCost.Info($"{Barracks.fireRefund:F0}"); fireTipRep.Info($"{Barracks.fireRepCost:F0}"); } else { assignedStaff.Info($"{currentStaff} / {maxStaff}"); } } else { staffList.SetActive(false); noStaffRequired.SetActive(true); barracksGroup.SetActive(false); nonbarracksGroup.SetActive(false); } } public void UpdateUI(StaticInstance staticInstance) { barracks = staticInstance.myFacilities[0] as IBarracks; production = staticInstance.myFacilities[0] as IProduction; UpdateUI(); } } }
29.41954
122
0.611741
[ "MIT", "Unlicense" ]
GER-Space/Kerbal-Konstructs
src/Facilities/StaffGUI.cs
10,240
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AzureNative.Network.V20191101 { public static class GetApplicationSecurityGroup { /// <summary> /// An application security group in a resource group. /// </summary> public static Task<GetApplicationSecurityGroupResult> InvokeAsync(GetApplicationSecurityGroupArgs args, InvokeOptions? options = null) => Pulumi.Deployment.Instance.InvokeAsync<GetApplicationSecurityGroupResult>("azure-native:network/v20191101:getApplicationSecurityGroup", args ?? new GetApplicationSecurityGroupArgs(), options.WithVersion()); } public sealed class GetApplicationSecurityGroupArgs : Pulumi.InvokeArgs { /// <summary> /// The name of the application security group. /// </summary> [Input("applicationSecurityGroupName", required: true)] public string ApplicationSecurityGroupName { get; set; } = null!; /// <summary> /// The name of the resource group. /// </summary> [Input("resourceGroupName", required: true)] public string ResourceGroupName { get; set; } = null!; public GetApplicationSecurityGroupArgs() { } } [OutputType] public sealed class GetApplicationSecurityGroupResult { /// <summary> /// A unique read-only string that changes whenever the resource is updated. /// </summary> public readonly string Etag; /// <summary> /// Resource ID. /// </summary> public readonly string? Id; /// <summary> /// Resource location. /// </summary> public readonly string? Location; /// <summary> /// Resource name. /// </summary> public readonly string Name; /// <summary> /// The provisioning state of the application security group resource. /// </summary> public readonly string ProvisioningState; /// <summary> /// The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups. /// </summary> public readonly string ResourceGuid; /// <summary> /// Resource tags. /// </summary> public readonly ImmutableDictionary<string, string>? Tags; /// <summary> /// Resource type. /// </summary> public readonly string Type; [OutputConstructor] private GetApplicationSecurityGroupResult( string etag, string? id, string? location, string name, string provisioningState, string resourceGuid, ImmutableDictionary<string, string>? tags, string type) { Etag = etag; Id = id; Location = location; Name = name; ProvisioningState = provisioningState; ResourceGuid = resourceGuid; Tags = tags; Type = type; } } }
31.943925
221
0.60825
[ "Apache-2.0" ]
polivbr/pulumi-azure-native
sdk/dotnet/Network/V20191101/GetApplicationSecurityGroup.cs
3,418
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AwsNative.Kendra.Outputs { [OutputType] public sealed class DataSourceConfluenceAttachmentConfiguration { public readonly ImmutableArray<Outputs.DataSourceConfluenceAttachmentToIndexFieldMapping> AttachmentFieldMappings; public readonly bool? CrawlAttachments; [OutputConstructor] private DataSourceConfluenceAttachmentConfiguration( ImmutableArray<Outputs.DataSourceConfluenceAttachmentToIndexFieldMapping> attachmentFieldMappings, bool? crawlAttachments) { AttachmentFieldMappings = attachmentFieldMappings; CrawlAttachments = crawlAttachments; } } }
32.8
122
0.742886
[ "Apache-2.0" ]
AaronFriel/pulumi-aws-native
sdk/dotnet/Kendra/Outputs/DataSourceConfluenceAttachmentConfiguration.cs
984
C#
#region BSD License /* * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE.md file or at * https://github.com/Wagnerp/Krypton-Toolkit-Suite-Extended-NET-5.452/blob/master/LICENSE * */ #endregion namespace ExtendedControls.Base.Code.ScrollBar.CustomScrollBar { /// <summary> /// The scrollbar states. /// </summary> internal enum ScrollBarState { /// <summary> /// Indicates a normal scrollbar state. /// </summary> NORMAL, /// <summary> /// Indicates a hot scrollbar state. /// </summary> HOT, /// <summary> /// Indicates an active scrollbar state. /// </summary> ACTIVE, /// <summary> /// Indicates a pressed scrollbar state. /// </summary> PRESSED, /// <summary> /// Indicates a disabled scrollbar state. /// </summary> DISABLED } }
23.166667
90
0.561151
[ "BSD-3-Clause" ]
Wagnerp/Krypton-Toolkit-Suite-Extended-NET-5.452
Source/Krypton Toolkit Suite Extended/Full Toolkit/Extended Controls/Base/Code/ScrollBar/CustomScrollBar/ScrollBarState.cs
975
C#
using System; using System.Diagnostics; using Newtonsoft.Json; namespace NuGetUtils.Model { [DebuggerDisplay("Version: {this.Version}")] public class VersionSummary { [JsonProperty("version")] public string Version { get; set; } [JsonProperty("downloads")] public long Downloads { get; set; } [JsonProperty("@id")] public Uri Url { get; set; } } }
20.8
48
0.615385
[ "MIT" ]
rockfordlhotka/NuGetUtils
NuGetUtils/Model/VersionSummary.cs
418
C#
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Collections.Generic; using Aliyun.Acs.Core; namespace Aliyun.Acs.VoiceNavigator.Model.V20180612 { public class ModifyCategoryResponse : AcsResponse { private string requestId; public string RequestId { get { return requestId; } set { requestId = value; } } } }
26.186047
63
0.730018
[ "Apache-2.0" ]
chys0404/aliyun-openapi-net-sdk
aliyun-net-sdk-voicenavigator/VoiceNavigator/Model/V20180612/ModifyCategoryResponse.cs
1,126
C#
/** * Copyright 2015 Canada Health Infoway, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Author: $LastChangedBy: tmcgrady $ * Last modified: $LastChangedDate: 2011-05-04 15:47:15 -0400 (Wed, 04 May 2011) $ * Revision: $LastChangedRevision: 2623 $ */ /* This class was auto-generated by the message builder generator tools. */ using Ca.Infoway.Messagebuilder; namespace Ca.Infoway.Messagebuilder.Model.Ab_r02_04_03_imm.Domainvalue { public interface ActSpecimenLabelCode : Code { } }
37.821429
83
0.712937
[ "ECL-2.0", "Apache-2.0" ]
CanadaHealthInfoway/message-builder-dotnet
message-builder-release-ab-r02_04_03_imm/Main/Ca/Infoway/Messagebuilder/Model/Ab_r02_04_03_imm/Domainvalue/ActSpecimenLabelCode.cs
1,059
C#
using System; using UniRx; using UnityEngine; namespace GameplayElements.ShootingStrategies { public class BurstShot : ShootingStrategy { public BurstShot() { base.name = "Burst"; } public override void Shoot(Transform shooter) { var shotDelay = 0.05f; var rotation = shooter.rotation; var position = shooter.position; pool.Acquire(position, rotation, type); disposable = Observable.Timer(TimeSpan.FromSeconds(shotDelay)) .Do(_ => pool.Acquire(position, rotation, type)) .Delay(TimeSpan.FromSeconds(shotDelay)) .Do(_ => pool.Acquire(position, rotation, type)) .Subscribe(); } } }
27.821429
74
0.571245
[ "MIT" ]
kev-miles/TwinStickShooter_R
Assets/Scripts/GameplayElements/ShootingStrategies/BurstShot.cs
781
C#
using System; using System.Collections.Generic; using System.Data; namespace AdventureWorks.Common.Extensions { public class EnumerableExtensions { public static DataTable CreateDataTable<T>(IEnumerable<T> list) { var type = typeof(T); var properties = type.GetProperties(); var dataTable = new DataTable(); foreach (var info in properties) dataTable.Columns.Add(new DataColumn(info.Name, Nullable.GetUnderlyingType(info.PropertyType) ?? info.PropertyType)); foreach (var entity in list) { var values = new object[properties.Length]; for (var i = 0; i < properties.Length; i++) values[i] = properties[i].GetValue(entity); dataTable.Rows.Add(values); } return dataTable; } } }
29.866667
103
0.580357
[ "Unlicense" ]
CodeSwifterGit/adventure-works
src/AdventureWorks.Common/Extensions/EnumerableExtensions.cs
896
C#
// <auto-generated /> using System; using API.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace API.Migrations { [DbContext(typeof(StoreContext))] [Migration("20220518174535_OrderEntityAdded2")] partial class OrderEntityAdded2 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "5.0.15"); modelBuilder.Entity("API.Entities.Basket", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("BuyerId") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Baskets"); }); modelBuilder.Entity("API.Entities.BasketItem", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<int>("BasketId") .HasColumnType("INTEGER"); b.Property<int>("ProductId") .HasColumnType("INTEGER"); b.Property<int>("Quantity") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("BasketId"); b.HasIndex("ProductId"); b.ToTable("BasketItems"); }); modelBuilder.Entity("API.Entities.OrderAggregate.Order", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("BuyerId") .HasColumnType("TEXT"); b.Property<long>("DeliveryFee") .HasColumnType("INTEGER"); b.Property<DateTime>("OrderDate") .HasColumnType("TEXT"); b.Property<int>("OrderStatus") .HasColumnType("INTEGER"); b.Property<long>("Subtotal") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Orders"); }); modelBuilder.Entity("API.Entities.OrderAggregate.OrderItem", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("Name") .HasColumnType("TEXT"); b.Property<int?>("OrderId") .HasColumnType("INTEGER"); b.Property<long>("Price") .HasColumnType("INTEGER"); b.Property<int>("Quantity") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("OrderId"); b.ToTable("OrderItem"); }); modelBuilder.Entity("API.Entities.Product", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("Brand") .HasColumnType("TEXT"); b.Property<string>("Description") .HasColumnType("TEXT"); b.Property<string>("Name") .HasColumnType("TEXT"); b.Property<string>("PictureUrl") .HasColumnType("TEXT"); b.Property<long>("Price") .HasColumnType("INTEGER"); b.Property<int>("QuantityInStock") .HasColumnType("INTEGER"); b.Property<string>("Type") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Products"); }); modelBuilder.Entity("API.Entities.Role", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property<string>("Name") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property<string>("NormalizedName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles"); b.HasData( new { Id = 1, ConcurrencyStamp = "33c7b040-8885-493f-8dff-b1908a17ae4f", Name = "Member", NormalizedName = "MEMBER" }, new { Id = 2, ConcurrencyStamp = "a7148d63-b7d6-43c4-83f6-3ecb210a24f7", Name = "Admin", NormalizedName = "ADMIN" }); }); modelBuilder.Entity("API.Entities.User", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<int>("AccessFailedCount") .HasColumnType("INTEGER"); b.Property<string>("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("TEXT"); b.Property<string>("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property<bool>("EmailConfirmed") .HasColumnType("INTEGER"); b.Property<bool>("LockoutEnabled") .HasColumnType("INTEGER"); b.Property<DateTimeOffset?>("LockoutEnd") .HasColumnType("TEXT"); b.Property<string>("NormalizedEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property<string>("NormalizedUserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property<string>("PasswordHash") .HasColumnType("TEXT"); b.Property<string>("PhoneNumber") .HasColumnType("TEXT"); b.Property<bool>("PhoneNumberConfirmed") .HasColumnType("INTEGER"); b.Property<string>("SecurityStamp") .HasColumnType("TEXT"); b.Property<bool>("TwoFactorEnabled") .HasColumnType("INTEGER"); b.Property<string>("UserName") .HasMaxLength(256) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers"); }); modelBuilder.Entity("API.Entities.UserAddress", b => { b.Property<int>("Id") .HasColumnType("INTEGER"); b.Property<string>("Address1") .HasColumnType("TEXT"); b.Property<string>("Address2") .HasColumnType("TEXT"); b.Property<string>("City") .HasColumnType("TEXT"); b.Property<string>("Country") .HasColumnType("TEXT"); b.Property<string>("FullName") .HasColumnType("TEXT"); b.Property<string>("State") .HasColumnType("TEXT"); b.Property<string>("Zip") .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("UserAddress"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("ClaimType") .HasColumnType("TEXT"); b.Property<string>("ClaimValue") .HasColumnType("TEXT"); b.Property<int>("RoleId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property<string>("ClaimType") .HasColumnType("TEXT"); b.Property<string>("ClaimValue") .HasColumnType("TEXT"); b.Property<int>("UserId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b => { b.Property<string>("LoginProvider") .HasColumnType("TEXT"); b.Property<string>("ProviderKey") .HasColumnType("TEXT"); b.Property<string>("ProviderDisplayName") .HasColumnType("TEXT"); b.Property<int>("UserId") .HasColumnType("INTEGER"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b => { b.Property<int>("UserId") .HasColumnType("INTEGER"); b.Property<int>("RoleId") .HasColumnType("INTEGER"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b => { b.Property<int>("UserId") .HasColumnType("INTEGER"); b.Property<string>("LoginProvider") .HasColumnType("TEXT"); b.Property<string>("Name") .HasColumnType("TEXT"); b.Property<string>("Value") .HasColumnType("TEXT"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens"); }); modelBuilder.Entity("API.Entities.BasketItem", b => { b.HasOne("API.Entities.Basket", "Basket") .WithMany("Items") .HasForeignKey("BasketId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("API.Entities.Product", "Product") .WithMany() .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Basket"); b.Navigation("Product"); }); modelBuilder.Entity("API.Entities.OrderAggregate.Order", b => { b.OwnsOne("API.Entities.OrderAggregate.ShippingAddress", "ShippingAddress", b1 => { b1.Property<int>("OrderId") .HasColumnType("INTEGER"); b1.Property<string>("Address1") .HasColumnType("TEXT"); b1.Property<string>("Address2") .HasColumnType("TEXT"); b1.Property<string>("City") .HasColumnType("TEXT"); b1.Property<string>("Country") .HasColumnType("TEXT"); b1.Property<string>("FullName") .HasColumnType("TEXT"); b1.Property<string>("State") .HasColumnType("TEXT"); b1.Property<string>("Zip") .HasColumnType("TEXT"); b1.HasKey("OrderId"); b1.ToTable("Orders"); b1.WithOwner() .HasForeignKey("OrderId"); }); b.Navigation("ShippingAddress"); }); modelBuilder.Entity("API.Entities.OrderAggregate.OrderItem", b => { b.HasOne("API.Entities.OrderAggregate.Order", null) .WithMany("OrderItems") .HasForeignKey("OrderId"); b.OwnsOne("API.Entities.OrderAggregate.ProductItemOrdered", "ItemOrdered", b1 => { b1.Property<int>("OrderItemId") .HasColumnType("INTEGER"); b1.Property<string>("Name") .HasColumnType("TEXT"); b1.Property<int>("ProductId") .HasColumnType("INTEGER"); b1.Property<string>("ProductUrl") .HasColumnType("TEXT"); b1.HasKey("OrderItemId"); b1.ToTable("OrderItem"); b1.WithOwner() .HasForeignKey("OrderItemId"); }); b.Navigation("ItemOrdered"); }); modelBuilder.Entity("API.Entities.UserAddress", b => { b.HasOne("API.Entities.User", null) .WithOne("Address") .HasForeignKey("API.Entities.UserAddress", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<int>", b => { b.HasOne("API.Entities.Role", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<int>", b => { b.HasOne("API.Entities.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<int>", b => { b.HasOne("API.Entities.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<int>", b => { b.HasOne("API.Entities.Role", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("API.Entities.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<int>", b => { b.HasOne("API.Entities.User", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("API.Entities.Basket", b => { b.Navigation("Items"); }); modelBuilder.Entity("API.Entities.OrderAggregate.Order", b => { b.Navigation("OrderItems"); }); modelBuilder.Entity("API.Entities.User", b => { b.Navigation("Address"); }); #pragma warning restore 612, 618 } } }
34.193784
101
0.40756
[ "MIT" ]
szerem/learn-to-build-an-e-commerce-store-with-dotnet-react-redux
ReStore/API/Migrations/20220518174535_OrderEntityAdded2.Designer.cs
18,706
C#
// <auto-generated /> using System; using LearningAbp.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace LearningAbp.Migrations { [DbContext(typeof(LearningAbpDbContext))] [Migration("20181013103914_Upgraded_To_Abp_v3_9_0")] partial class Upgraded_To_Abp_v3_9_0 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "2.1.4-rtm-31024") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Abp.Application.Editions.Edition", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<string>("DisplayName") .IsRequired() .HasMaxLength(64); b.Property<bool>("IsDeleted"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<string>("Name") .IsRequired() .HasMaxLength(32); b.HasKey("Id"); b.ToTable("AbpEditions"); }); modelBuilder.Entity("Abp.Application.Features.FeatureSetting", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<string>("Discriminator") .IsRequired(); b.Property<string>("Name") .IsRequired() .HasMaxLength(128); b.Property<int?>("TenantId"); b.Property<string>("Value") .IsRequired() .HasMaxLength(2000); b.HasKey("Id"); b.ToTable("AbpFeatures"); b.HasDiscriminator<string>("Discriminator").HasValue("FeatureSetting"); }); modelBuilder.Entity("Abp.Auditing.AuditLog", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("BrowserInfo") .HasMaxLength(512); b.Property<string>("ClientIpAddress") .HasMaxLength(64); b.Property<string>("ClientName") .HasMaxLength(128); b.Property<string>("CustomData") .HasMaxLength(2000); b.Property<string>("Exception") .HasMaxLength(2000); b.Property<int>("ExecutionDuration"); b.Property<DateTime>("ExecutionTime"); b.Property<int?>("ImpersonatorTenantId"); b.Property<long?>("ImpersonatorUserId"); b.Property<string>("MethodName") .HasMaxLength(256); b.Property<string>("Parameters") .HasMaxLength(1024); b.Property<string>("ServiceName") .HasMaxLength(256); b.Property<int?>("TenantId"); b.Property<long?>("UserId"); b.HasKey("Id"); b.HasIndex("TenantId", "ExecutionDuration"); b.HasIndex("TenantId", "ExecutionTime"); b.HasIndex("TenantId", "UserId"); b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Abp.Authorization.PermissionSetting", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<string>("Discriminator") .IsRequired(); b.Property<bool>("IsGranted"); b.Property<string>("Name") .IsRequired() .HasMaxLength(128); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name"); b.ToTable("AbpPermissions"); b.HasDiscriminator<string>("Discriminator").HasValue("PermissionSetting"); }); modelBuilder.Entity("Abp.Authorization.Roles.RoleClaim", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("ClaimType") .HasMaxLength(256); b.Property<string>("ClaimValue"); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<int>("RoleId"); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("RoleId"); b.HasIndex("TenantId", "ClaimType"); b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Abp.Authorization.Users.UserAccount", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<string>("EmailAddress") .HasMaxLength(256); b.Property<bool>("IsDeleted"); b.Property<DateTime?>("LastLoginTime"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.Property<long?>("UserLinkId"); b.Property<string>("UserName") .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("EmailAddress"); b.HasIndex("UserName"); b.HasIndex("TenantId", "EmailAddress"); b.HasIndex("TenantId", "UserId"); b.HasIndex("TenantId", "UserName"); b.ToTable("AbpUserAccounts"); }); modelBuilder.Entity("Abp.Authorization.Users.UserClaim", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("ClaimType") .HasMaxLength(256); b.Property<string>("ClaimValue"); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.HasKey("Id"); b.HasIndex("UserId"); b.HasIndex("TenantId", "ClaimType"); b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Abp.Authorization.Users.UserLogin", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("LoginProvider") .IsRequired() .HasMaxLength(128); b.Property<string>("ProviderKey") .IsRequired() .HasMaxLength(256); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.HasKey("Id"); b.HasIndex("UserId"); b.HasIndex("TenantId", "UserId"); b.HasIndex("TenantId", "LoginProvider", "ProviderKey"); b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Abp.Authorization.Users.UserLoginAttempt", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("BrowserInfo") .HasMaxLength(512); b.Property<string>("ClientIpAddress") .HasMaxLength(64); b.Property<string>("ClientName") .HasMaxLength(128); b.Property<DateTime>("CreationTime"); b.Property<byte>("Result"); b.Property<string>("TenancyName") .HasMaxLength(64); b.Property<int?>("TenantId"); b.Property<long?>("UserId"); b.Property<string>("UserNameOrEmailAddress") .HasMaxLength(255); b.HasKey("Id"); b.HasIndex("UserId", "TenantId"); b.HasIndex("TenancyName", "UserNameOrEmailAddress", "Result"); b.ToTable("AbpUserLoginAttempts"); }); modelBuilder.Entity("Abp.Authorization.Users.UserOrganizationUnit", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<bool>("IsDeleted"); b.Property<long>("OrganizationUnitId"); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.HasKey("Id"); b.HasIndex("TenantId", "OrganizationUnitId"); b.HasIndex("TenantId", "UserId"); b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Abp.Authorization.Users.UserRole", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<int>("RoleId"); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.HasKey("Id"); b.HasIndex("UserId"); b.HasIndex("TenantId", "RoleId"); b.HasIndex("TenantId", "UserId"); b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Abp.Authorization.Users.UserToken", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime?>("ExpireDate"); b.Property<string>("LoginProvider") .HasMaxLength(128); b.Property<string>("Name") .HasMaxLength(128); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.Property<string>("Value") .HasMaxLength(512); b.HasKey("Id"); b.HasIndex("UserId"); b.HasIndex("TenantId", "UserId"); b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Abp.BackgroundJobs.BackgroundJobInfo", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<bool>("IsAbandoned"); b.Property<string>("JobArgs") .IsRequired() .HasMaxLength(1048576); b.Property<string>("JobType") .IsRequired() .HasMaxLength(512); b.Property<DateTime?>("LastTryTime"); b.Property<DateTime>("NextTryTime"); b.Property<byte>("Priority"); b.Property<short>("TryCount"); b.HasKey("Id"); b.HasIndex("IsAbandoned", "NextTryTime"); b.ToTable("AbpBackgroundJobs"); }); modelBuilder.Entity("Abp.Configuration.Setting", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<string>("Name") .IsRequired() .HasMaxLength(256); b.Property<int?>("TenantId"); b.Property<long?>("UserId"); b.Property<string>("Value") .HasMaxLength(2000); b.HasKey("Id"); b.HasIndex("UserId"); b.HasIndex("TenantId", "Name"); b.ToTable("AbpSettings"); }); modelBuilder.Entity("Abp.EntityHistory.EntityChange", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("ChangeTime"); b.Property<byte>("ChangeType"); b.Property<long>("EntityChangeSetId"); b.Property<string>("EntityId") .HasMaxLength(48); b.Property<string>("EntityTypeFullName") .HasMaxLength(192); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("EntityChangeSetId"); b.HasIndex("EntityTypeFullName", "EntityId"); b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Abp.EntityHistory.EntityChangeSet", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("BrowserInfo") .HasMaxLength(512); b.Property<string>("ClientIpAddress") .HasMaxLength(64); b.Property<string>("ClientName") .HasMaxLength(128); b.Property<DateTime>("CreationTime"); b.Property<string>("ExtensionData"); b.Property<int?>("ImpersonatorTenantId"); b.Property<long?>("ImpersonatorUserId"); b.Property<string>("Reason") .HasMaxLength(256); b.Property<int?>("TenantId"); b.Property<long?>("UserId"); b.HasKey("Id"); b.HasIndex("TenantId", "CreationTime"); b.HasIndex("TenantId", "Reason"); b.HasIndex("TenantId", "UserId"); b.ToTable("AbpEntityChangeSets"); }); modelBuilder.Entity("Abp.EntityHistory.EntityPropertyChange", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<long>("EntityChangeId"); b.Property<string>("NewValue") .HasMaxLength(512); b.Property<string>("OriginalValue") .HasMaxLength(512); b.Property<string>("PropertyName") .HasMaxLength(96); b.Property<string>("PropertyTypeFullName") .HasMaxLength(192); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("EntityChangeId"); b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Abp.Localization.ApplicationLanguage", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<string>("DisplayName") .IsRequired() .HasMaxLength(64); b.Property<string>("Icon") .HasMaxLength(128); b.Property<bool>("IsDeleted"); b.Property<bool>("IsDisabled"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<string>("Name") .IsRequired() .HasMaxLength(10); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId", "Name"); b.ToTable("AbpLanguages"); }); modelBuilder.Entity("Abp.Localization.ApplicationLanguageText", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<string>("Key") .IsRequired() .HasMaxLength(256); b.Property<string>("LanguageName") .IsRequired() .HasMaxLength(10); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<string>("Source") .IsRequired() .HasMaxLength(128); b.Property<int?>("TenantId"); b.Property<string>("Value") .IsRequired() .HasMaxLength(67108864); b.HasKey("Id"); b.HasIndex("TenantId", "Source", "LanguageName", "Key"); b.ToTable("AbpLanguageTexts"); }); modelBuilder.Entity("Abp.Notifications.NotificationInfo", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<string>("Data") .HasMaxLength(1048576); b.Property<string>("DataTypeName") .HasMaxLength(512); b.Property<string>("EntityId") .HasMaxLength(96); b.Property<string>("EntityTypeAssemblyQualifiedName") .HasMaxLength(512); b.Property<string>("EntityTypeName") .HasMaxLength(250); b.Property<string>("ExcludedUserIds") .HasMaxLength(131072); b.Property<string>("NotificationName") .IsRequired() .HasMaxLength(96); b.Property<byte>("Severity"); b.Property<string>("TenantIds") .HasMaxLength(131072); b.Property<string>("UserIds") .HasMaxLength(131072); b.HasKey("Id"); b.ToTable("AbpNotifications"); }); modelBuilder.Entity("Abp.Notifications.NotificationSubscriptionInfo", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<string>("EntityId") .HasMaxLength(96); b.Property<string>("EntityTypeAssemblyQualifiedName") .HasMaxLength(512); b.Property<string>("EntityTypeName") .HasMaxLength(250); b.Property<string>("NotificationName") .HasMaxLength(96); b.Property<int?>("TenantId"); b.Property<long>("UserId"); b.HasKey("Id"); b.HasIndex("NotificationName", "EntityTypeName", "EntityId", "UserId"); b.HasIndex("TenantId", "NotificationName", "EntityTypeName", "EntityId", "UserId"); b.ToTable("AbpNotificationSubscriptions"); }); modelBuilder.Entity("Abp.Notifications.TenantNotificationInfo", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<string>("Data") .HasMaxLength(1048576); b.Property<string>("DataTypeName") .HasMaxLength(512); b.Property<string>("EntityId") .HasMaxLength(96); b.Property<string>("EntityTypeAssemblyQualifiedName") .HasMaxLength(512); b.Property<string>("EntityTypeName") .HasMaxLength(250); b.Property<string>("NotificationName") .IsRequired() .HasMaxLength(96); b.Property<byte>("Severity"); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("TenantId"); b.ToTable("AbpTenantNotifications"); }); modelBuilder.Entity("Abp.Notifications.UserNotificationInfo", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd(); b.Property<DateTime>("CreationTime"); b.Property<int>("State"); b.Property<int?>("TenantId"); b.Property<Guid>("TenantNotificationId"); b.Property<long>("UserId"); b.HasKey("Id"); b.HasIndex("UserId", "State", "CreationTime"); b.ToTable("AbpUserNotifications"); }); modelBuilder.Entity("Abp.Organizations.OrganizationUnit", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("Code") .IsRequired() .HasMaxLength(95); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<string>("DisplayName") .IsRequired() .HasMaxLength(128); b.Property<bool>("IsDeleted"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<long?>("ParentId"); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("ParentId"); b.HasIndex("TenantId", "Code"); b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("LearningAbp.Authorization.Roles.Role", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(128); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<string>("Description") .HasMaxLength(5000); b.Property<string>("DisplayName") .IsRequired() .HasMaxLength(64); b.Property<bool>("IsDefault"); b.Property<bool>("IsDeleted"); b.Property<bool>("IsStatic"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<string>("Name") .IsRequired() .HasMaxLength(32); b.Property<string>("NormalizedName") .IsRequired() .HasMaxLength(32); b.Property<int?>("TenantId"); b.HasKey("Id"); b.HasIndex("CreatorUserId"); b.HasIndex("DeleterUserId"); b.HasIndex("LastModifierUserId"); b.HasIndex("TenantId", "NormalizedName"); b.ToTable("AbpRoles"); }); modelBuilder.Entity("LearningAbp.Authorization.Users.User", b => { b.Property<long>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<int>("AccessFailedCount"); b.Property<string>("AuthenticationSource") .HasMaxLength(64); b.Property<string>("ConcurrencyStamp") .IsConcurrencyToken() .HasMaxLength(128); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<string>("EmailAddress") .IsRequired() .HasMaxLength(256); b.Property<string>("EmailConfirmationCode") .HasMaxLength(328); b.Property<bool>("IsActive"); b.Property<bool>("IsDeleted"); b.Property<bool>("IsEmailConfirmed"); b.Property<bool>("IsLockoutEnabled"); b.Property<bool>("IsPhoneNumberConfirmed"); b.Property<bool>("IsTwoFactorEnabled"); b.Property<DateTime?>("LastLoginTime"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<DateTime?>("LockoutEndDateUtc"); b.Property<string>("Name") .IsRequired() .HasMaxLength(64); b.Property<string>("NormalizedEmailAddress") .IsRequired() .HasMaxLength(256); b.Property<string>("NormalizedUserName") .IsRequired() .HasMaxLength(256); b.Property<string>("Password") .IsRequired() .HasMaxLength(128); b.Property<string>("PasswordResetCode") .HasMaxLength(328); b.Property<string>("PhoneNumber") .HasMaxLength(32); b.Property<string>("SecurityStamp") .HasMaxLength(128); b.Property<string>("Surname") .IsRequired() .HasMaxLength(64); b.Property<int?>("TenantId"); b.Property<string>("UserName") .IsRequired() .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("CreatorUserId"); b.HasIndex("DeleterUserId"); b.HasIndex("LastModifierUserId"); b.HasIndex("TenantId", "NormalizedEmailAddress"); b.HasIndex("TenantId", "NormalizedUserName"); b.ToTable("AbpUsers"); }); modelBuilder.Entity("LearningAbp.MultiTenancy.Tenant", b => { b.Property<int>("Id") .ValueGeneratedOnAdd() .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property<string>("ConnectionString") .HasMaxLength(1024); b.Property<DateTime>("CreationTime"); b.Property<long?>("CreatorUserId"); b.Property<long?>("DeleterUserId"); b.Property<DateTime?>("DeletionTime"); b.Property<int?>("EditionId"); b.Property<bool>("IsActive"); b.Property<bool>("IsDeleted"); b.Property<DateTime?>("LastModificationTime"); b.Property<long?>("LastModifierUserId"); b.Property<string>("Name") .IsRequired() .HasMaxLength(128); b.Property<string>("TenancyName") .IsRequired() .HasMaxLength(64); b.HasKey("Id"); b.HasIndex("CreatorUserId"); b.HasIndex("DeleterUserId"); b.HasIndex("EditionId"); b.HasIndex("LastModifierUserId"); b.HasIndex("TenancyName"); b.ToTable("AbpTenants"); }); modelBuilder.Entity("Abp.Application.Features.EditionFeatureSetting", b => { b.HasBaseType("Abp.Application.Features.FeatureSetting"); b.Property<int>("EditionId"); b.HasIndex("EditionId", "Name"); b.ToTable("AbpFeatures"); b.HasDiscriminator().HasValue("EditionFeatureSetting"); }); modelBuilder.Entity("Abp.MultiTenancy.TenantFeatureSetting", b => { b.HasBaseType("Abp.Application.Features.FeatureSetting"); b.HasIndex("TenantId", "Name"); b.ToTable("AbpFeatures"); b.HasDiscriminator().HasValue("TenantFeatureSetting"); }); modelBuilder.Entity("Abp.Authorization.Roles.RolePermissionSetting", b => { b.HasBaseType("Abp.Authorization.PermissionSetting"); b.Property<int>("RoleId"); b.HasIndex("RoleId"); b.ToTable("AbpPermissions"); b.HasDiscriminator().HasValue("RolePermissionSetting"); }); modelBuilder.Entity("Abp.Authorization.Users.UserPermissionSetting", b => { b.HasBaseType("Abp.Authorization.PermissionSetting"); b.Property<long>("UserId"); b.HasIndex("UserId"); b.ToTable("AbpPermissions"); b.HasDiscriminator().HasValue("UserPermissionSetting"); }); modelBuilder.Entity("Abp.Authorization.Roles.RoleClaim", b => { b.HasOne("LearningAbp.Authorization.Roles.Role") .WithMany("Claims") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Authorization.Users.UserClaim", b => { b.HasOne("LearningAbp.Authorization.Users.User") .WithMany("Claims") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Authorization.Users.UserLogin", b => { b.HasOne("LearningAbp.Authorization.Users.User") .WithMany("Logins") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Authorization.Users.UserRole", b => { b.HasOne("LearningAbp.Authorization.Users.User") .WithMany("Roles") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Authorization.Users.UserToken", b => { b.HasOne("LearningAbp.Authorization.Users.User") .WithMany("Tokens") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Configuration.Setting", b => { b.HasOne("LearningAbp.Authorization.Users.User") .WithMany("Settings") .HasForeignKey("UserId"); }); modelBuilder.Entity("Abp.EntityHistory.EntityChange", b => { b.HasOne("Abp.EntityHistory.EntityChangeSet") .WithMany("EntityChanges") .HasForeignKey("EntityChangeSetId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.EntityHistory.EntityPropertyChange", b => { b.HasOne("Abp.EntityHistory.EntityChange") .WithMany("PropertyChanges") .HasForeignKey("EntityChangeId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Organizations.OrganizationUnit", b => { b.HasOne("Abp.Organizations.OrganizationUnit", "Parent") .WithMany("Children") .HasForeignKey("ParentId"); }); modelBuilder.Entity("LearningAbp.Authorization.Roles.Role", b => { b.HasOne("LearningAbp.Authorization.Users.User", "CreatorUser") .WithMany() .HasForeignKey("CreatorUserId"); b.HasOne("LearningAbp.Authorization.Users.User", "DeleterUser") .WithMany() .HasForeignKey("DeleterUserId"); b.HasOne("LearningAbp.Authorization.Users.User", "LastModifierUser") .WithMany() .HasForeignKey("LastModifierUserId"); }); modelBuilder.Entity("LearningAbp.Authorization.Users.User", b => { b.HasOne("LearningAbp.Authorization.Users.User", "CreatorUser") .WithMany() .HasForeignKey("CreatorUserId"); b.HasOne("LearningAbp.Authorization.Users.User", "DeleterUser") .WithMany() .HasForeignKey("DeleterUserId"); b.HasOne("LearningAbp.Authorization.Users.User", "LastModifierUser") .WithMany() .HasForeignKey("LastModifierUserId"); }); modelBuilder.Entity("LearningAbp.MultiTenancy.Tenant", b => { b.HasOne("LearningAbp.Authorization.Users.User", "CreatorUser") .WithMany() .HasForeignKey("CreatorUserId"); b.HasOne("LearningAbp.Authorization.Users.User", "DeleterUser") .WithMany() .HasForeignKey("DeleterUserId"); b.HasOne("Abp.Application.Editions.Edition", "Edition") .WithMany() .HasForeignKey("EditionId"); b.HasOne("LearningAbp.Authorization.Users.User", "LastModifierUser") .WithMany() .HasForeignKey("LastModifierUserId"); }); modelBuilder.Entity("Abp.Application.Features.EditionFeatureSetting", b => { b.HasOne("Abp.Application.Editions.Edition", "Edition") .WithMany() .HasForeignKey("EditionId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Authorization.Roles.RolePermissionSetting", b => { b.HasOne("LearningAbp.Authorization.Roles.Role") .WithMany("Permissions") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("Abp.Authorization.Users.UserPermissionSetting", b => { b.HasOne("LearningAbp.Authorization.Users.User") .WithMany("Permissions") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 } } }
33.624603
125
0.460807
[ "MIT" ]
IAmWhoAmI007/LearningAbp
aspnet-core/src/LearningAbp.EntityFrameworkCore/Migrations/20181013103914_Upgraded_To_Abp_v3_9_0.Designer.cs
42,369
C#
using System.Threading.Tasks; using OcspResponder.Core; namespace OcspResponder.Responder.Services; public interface IOcspResponderEx { Task<OcspHttpResponse> Respond(OcspHttpRequest httpRequest, RequestMetadata metadata); }
21.181818
90
0.828326
[ "BSD-2-Clause" ]
drivenet/ocsp-responder
OcspResponder/Responder/Services/IOcspResponderEx.cs
235
C#
// Spritedow Animation Plugin by Elendow // http://elendow.com namespace Elendow.SpritedowAnimator { /// <summary> /// Struct used on the events dictionary to store animation and frame. /// </summary> public struct SpriteAnimatorEventInfo { public string animation; public int frame; public SpriteAnimatorEventInfo(string animation, int frame) { this.animation = animation; this.frame = frame; } } }
24.5
74
0.626531
[ "MIT" ]
squagonal/Rocketskates
Assets/SpritedowAnimator/Source/SpriteAnimatorEventInfo.cs
492
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("01.NestedLoops")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("01.NestedLoops")] [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)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("d2703c43-074a-4658-acd6-74d26950caf3")] // 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")]
37.864865
84
0.744468
[ "MIT" ]
vassildinev/Data-Structures-and-Algorithms
07.RecursionHomework/Recursion/01.NestedLoops/Properties/AssemblyInfo.cs
1,404
C#
using ReactiveMachine; using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.Threading.Tasks; namespace Counter.Tests { [DataContract] public class TestForks : TestTemplate { protected override async Task Run(IOrchestrationContext context) { await context.Finish(); context.ForkUpdate(new IncrementThenRead() { CounterId = 0 }); await context.Finish(); context.ForkUpdate(new IncrementThenRead() { CounterId = 1 }); context.ForkUpdate(new IncrementThenRead() { CounterId = 2 }); await context.Finish(); for (uint i = 0; i < 100; i++) context.ForkUpdate(new IncrementThenRead() { CounterId = 100 + i }); var f1 = context.Finish(); for (uint i = 0; i < 100; i++) context.ForkUpdate(new IncrementThenRead() { CounterId = 200 + i }); var f2 = context.Finish(); for (uint i = 0; i < 100; i++) context.ForkUpdate(new IncrementThenRead() { CounterId = 300 + i }); await Task.WhenAll(f1,f2); await context.Finish(); } } }
27.590909
84
0.575783
[ "MIT" ]
Bhaskers-Blu-Org2/ReactiveMachine
Applications/Counter.Tests/TestForks.cs
1,216
C#
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. 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. * 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 TencentCloud.Iotcloud.V20180614.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class DeleteTopicRuleRequest : AbstractModel { /// <summary> /// 规则名 /// </summary> [JsonProperty("RuleName")] public string RuleName{ get; set; } /// <summary> /// For internal usage only. DO NOT USE IT. /// </summary> public override void ToMap(Dictionary<string, string> map, string prefix) { this.SetParamSimple(map, prefix + "RuleName", this.RuleName); } } }
29.363636
81
0.657895
[ "Apache-2.0" ]
TencentCloud/tencentcloud-sdk-dotnet
TencentCloud/Iotcloud/V20180614/Models/DeleteTopicRuleRequest.cs
1,298
C#
namespace Thor.Core.Transmission.EventHub { /// <summary> /// A concrete configuration for <c>Azure EventHub</c> transmission. /// </summary> public class EventHubConfiguration { /// <summary> /// Gets or sets the <c>Azure EventHub</c> connection string. /// </summary> public string ConnectionString { get; set; } } }
28.846154
72
0.605333
[ "MIT" ]
glucaci/thor-client
src/Core/Transmission.EventHub/EventHubConfiguration.cs
377
C#
using System.Collections.Generic; using System.Linq; using Keeper.Core.Database.Models; namespace Keeper.Api.Models; public class CalculatedKickingStatistics { private CalculatedKickingStatistics(ICollection<NflKickingStatistics> kickingStats) { PatMade = CalculatedStatistics.Calculate(kickingStats.Select(x => x.PatMade)); FieldGoal0To19Yards = CalculatedStatistics.Calculate(kickingStats.Select(x => x.FieldGoal0To19Yards)); FieldGoal20To29Yards = CalculatedStatistics.Calculate(kickingStats.Select(x => x.FieldGoal20To29Yards)); FieldGoal30To39Yards = CalculatedStatistics.Calculate(kickingStats.Select(x => x.FieldGoal30To39Yards)); FieldGoal40To49Yards = CalculatedStatistics.Calculate(kickingStats.Select(x => x.FieldGoal40To49Yards)); FieldGoal50PlusYards = CalculatedStatistics.Calculate(kickingStats.Select(x => x.FieldGoal50PlusYards)); } public static CalculatedKickingStatistics Calculate(ICollection<NflKickingStatistics> kickingStats) { if (kickingStats == null) { return null; } var calculatedStats = new CalculatedKickingStatistics(kickingStats); var properties = new[] { calculatedStats.PatMade, calculatedStats.FieldGoal0To19Yards, calculatedStats.FieldGoal20To29Yards, calculatedStats.FieldGoal30To39Yards, calculatedStats.FieldGoal40To49Yards, calculatedStats.FieldGoal50PlusYards, }; return properties.Any(x => x != null) ? calculatedStats : null; } public CalculatedStatistics PatMade { get; } public CalculatedStatistics FieldGoal0To19Yards { get; } public CalculatedStatistics FieldGoal20To29Yards { get; } public CalculatedStatistics FieldGoal30To39Yards { get; } public CalculatedStatistics FieldGoal40To49Yards { get; } public CalculatedStatistics FieldGoal50PlusYards { get; } }
38.519231
112
0.715427
[ "MIT" ]
hanhossain/keeper
src/Keeper.Api/Models/CalculatedKickingStatistics.cs
2,003
C#
using FluentAssertions; using Monai.Deploy.Messaging.Events; using Monai.Deploy.WorkflowManager.Contracts.Models; using Monai.Deploy.WorkflowManager.IntegrationTests.Models; using Monai.Deploy.WorkloadManager.Contracts.Models; namespace Monai.Deploy.WorkflowManager.IntegrationTests.Support { public class Assertions { public void AssertWorkflowInstanceMatchesExpectedWorkflow(WorkflowInstance workflowInstance, WorkflowRevision workflowRevision, WorkflowRequestMessage workflowRequestMessage) { workflowInstance.PayloadId.Should().Match(workflowRequestMessage.PayloadId.ToString()); workflowInstance.WorkflowId.Should().Match(workflowRevision.WorkflowId); workflowInstance.AeTitle.Should().Match(workflowRevision.Workflow.InformaticsGateway.AeTitle); workflowInstance.Tasks.Count.Should().Be(workflowRevision.Workflow.Tasks.Length); foreach (var task in workflowInstance.Tasks) { var workflowTask = workflowRevision.Workflow.Tasks.FirstOrDefault(x => x.Id.Equals(task.TaskId)); if (workflowTask != null) { task.TaskId.Should().Match(workflowTask.Id); task.TaskType.Should().Match(workflowTask.Type); } else { throw new Exception($"Workflow Revision Task or {task.TaskId} not found!"); } } } public void AssertTaskDispatchEvent(TaskDispatchEvent taskDispatchEvent, WorkflowInstance workflowInstance, WorkflowRevision workflowRevision, WorkflowRequestMessage workflowRequestMessage = null, TaskUpdateEvent taskUpdateEvent = null) { var taskDetails = workflowInstance.Tasks.FirstOrDefault(c => c.TaskId.Equals(taskDispatchEvent.TaskId)); if (workflowRequestMessage != null) { taskDispatchEvent.CorrelationId.Should().Match(workflowRequestMessage.CorrelationId); } else { taskDispatchEvent.CorrelationId.Should().Match(taskUpdateEvent.CorrelationId); } taskDispatchEvent.WorkflowInstanceId.Should().Match(workflowInstance.Id); if (taskUpdateEvent == null) { taskDispatchEvent.TaskId.Should().Match(workflowRevision.Workflow.Tasks[0].Id); } else { taskDispatchEvent.TaskId.Should().Match(taskDetails.TaskId); } taskDetails.Status.Should().Be(TaskExecutionStatus.Dispatched); } public void AssertWorkflowIstanceMatchesExpectedTaskStatusUpdate(WorkflowInstance updatedWorkflowInstance, TaskExecutionStatus taskExecutionStatus) { updatedWorkflowInstance.Tasks[0].Status.Should().Be(taskExecutionStatus); } public void WorkflowInstanceIncludesTaskDetails(List<TaskDispatchEvent> taskDispatchEvents, WorkflowInstance workflowInstance, WorkflowRevision workflowRevision) { foreach (var taskDispatchEvent in taskDispatchEvents) { var workflowInstanceTaskDetails = workflowInstance.Tasks.FirstOrDefault(c => c.TaskId.Equals(taskDispatchEvent.TaskId)); var workflowTaskDetails = workflowRevision.Workflow.Tasks.FirstOrDefault(c => c.Id.Equals(taskDispatchEvent.TaskId)); workflowInstanceTaskDetails.ExecutionId.Should().Be(taskDispatchEvent.ExecutionId); workflowInstanceTaskDetails.Status.Should().Be(TaskExecutionStatus.Dispatched); workflowInstanceTaskDetails.TaskType.Should().Be(workflowTaskDetails.Type); } } public void WorkflowInstanceStatus(string status, WorkflowInstance workflowInstance) { workflowInstance.Status.Should().Be((Status)Enum.Parse(typeof(Status), status)); } } }
47.698795
244
0.676433
[ "Apache-2.0" ]
Project-MONAI/monai-deploy-workflow-manager
tests/IntegrationTests/WorkflowManager.IntegrationTests/Support/Assertions.cs
3,961
C#
using SanAndreasUnity.Behaviours.Vehicles; using System; using UnityEngine; public class VehicleBlinker : MonoBehaviour { #region "Fields" #region "Public Fields" public float repeatInterval = .5f; #endregion "Public Fields" #region "Init private fields" private VehicleLight lightType; private Transform parent; private Vehicle vehicle; #endregion "Init private fields" #region "Ordinary private fields" private bool _blinkerSwitch; private MeshRenderer blinkerRenderer; private float defaultIntensity; #endregion "Ordinary private fields" #endregion "Fields" public static VehicleBlinker Init(Transform blinker, VehicleLight light, Vehicle vh) { VehicleBlinker vehicleBlinker = blinker.gameObject.AddComponent<VehicleBlinker>(); vehicleBlinker.parent = blinker; vehicleBlinker.lightType = light; vehicleBlinker.vehicle = vh; return vehicleBlinker; } private bool IsLeftSide { get { return VehicleAPI.IsLeftLight(lightType); } } private bool ShouldBePowered { get { return (IsLeftSide && vehicle.blinkerMode == VehicleBlinkerMode.Left || !IsLeftSide && vehicle.blinkerMode == VehicleBlinkerMode.Right) || vehicle.blinkerMode == VehicleBlinkerMode.Emergency; } } private bool blinkerSwitch { get { return _blinkerSwitch; } set { _blinkerSwitch = value; ToggleBlinker(_blinkerSwitch); } } // Use this for initialization private void Start() { if (!VehicleAPI.IsValidIndividualLight(lightType)) throw new Exception("Light sides need to have a valid value, revise your code."); GameObject obj = GameObject.CreatePrimitive(PrimitiveType.Capsule); //If you uncomment this wheels won't steer //Destroy(obj.GetComponent<CapsuleCollider>()); obj.name = string.Format("Blinker ({0})", lightType.ToString()); obj.transform.parent = parent; obj.transform.position = parent.position + Vector3.right * (IsLeftSide ? -1 : 1) * .2f; //obj.transform.localRotation = Quaternion.Euler(new Vector3(0, 30 * (IsLeftSide ? -1 : 1), 0)); obj.transform.localScale = Vector3.one * .2f; blinkerRenderer = obj.GetComponent<MeshRenderer>(); blinkerRenderer.material = Resources.Load<Material>("Materials/Blinker"); defaultIntensity = blinkerRenderer.material.GetFloat("_MKGlowPower"); blinkerSwitch = false; InvokeRepeating("Cycle", 0, repeatInterval); } // Update is called once per frame private void Update() { // Must review if (vehicle.HasDriverSeat && !ShouldBePowered && blinkerSwitch) { //Debug.Log("Turning off blinkers!"); blinkerSwitch = false; } } private void Cycle() { if (!(vehicle.HasDriverSeat && ShouldBePowered)) return; blinkerSwitch = !blinkerSwitch; } private void ToggleBlinker(bool active) { blinkerRenderer.material.SetFloat("_MKGlowPower", active ? defaultIntensity : 0); } }
26.569106
203
0.638005
[ "MIT" ]
Almahmudrony/SanAndreasUnity
Assets/Scripts/Behaviours/Vehicles/VehicleBlinker.cs
3,270
C#
namespace Framework.GUI.Forms.Conversations { partial class ImportForm { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.finishImportButton = new System.Windows.Forms.Button(); this.hostPanel = new System.Windows.Forms.Panel(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.SuspendLayout(); // // splitContainer1 // this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; this.splitContainer1.IsSplitterFixed = true; this.splitContainer1.Location = new System.Drawing.Point(0, 0); this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // // splitContainer1.Panel1 // this.splitContainer1.Panel1.Controls.Add(this.hostPanel); // // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.finishImportButton); this.splitContainer1.Size = new System.Drawing.Size(632, 453); this.splitContainer1.SplitterDistance = 419; this.splitContainer1.TabIndex = 0; this.splitContainer1.TabStop = false; // // finishImportButton // this.finishImportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.finishImportButton.Location = new System.Drawing.Point(554, 3); this.finishImportButton.Name = "finishImportButton"; this.finishImportButton.Size = new System.Drawing.Size(75, 23); this.finishImportButton.TabIndex = 0; this.finishImportButton.Text = "Finish import"; this.finishImportButton.UseVisualStyleBackColor = true; // // hostPanel // this.hostPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.hostPanel.Location = new System.Drawing.Point(0, 0); this.hostPanel.Name = "hostPanel"; this.hostPanel.Size = new System.Drawing.Size(630, 417); this.hostPanel.TabIndex = 0; // // Import // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(632, 453); this.Controls.Add(this.splitContainer1); this.MinimumSize = new System.Drawing.Size(640, 480); this.Name = "Import"; this.Text = "Import"; this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.ResumeLayout(false); } #endregion private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.Button finishImportButton; private System.Windows.Forms.Panel hostPanel; } }
45.097087
167
0.596125
[ "MIT" ]
adrianlulea/ConversationsManager
Framework/Framework/GUI/Forms/Conversations/ImportForm.Designer.cs
4,647
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; public class SerialIK : MonoBehaviour { public bool AutoUpdate = true; public int Iterations = 10; public Transform EndEffector; public Transform Target; public Vector3 TargetPosition; public Quaternion TargetRotation; public bool SolvePosition = true; public bool SolveRotation = true; private Transform[] Joints; void Start() { Initialise(); } void LateUpdate() { if(AutoUpdate) { Solve(); } } public void Initialise() { if(EndEffector == null) { Debug.Log("No end effector specified."); } else { Joints = null; List<Transform> chain = new List<Transform>(); Transform joint = EndEffector; while(true) { joint = joint.parent; if(joint == null) { Debug.Log("No valid chain found."); return; } chain.Add(joint); if(joint == transform) { break; } } chain.Reverse(); Joints = chain.ToArray(); } } public void Solve() { if(Target != null) { TargetPosition = Target.position; TargetRotation = Target.rotation; } for(int k=0; k<Iterations; k++) { for(int i=0; i<Joints.Length; i++) { if(SolveRotation) { Joints[i].rotation = Quaternion.Slerp( Joints[i].rotation, Quaternion.Inverse(EndEffector.rotation) * TargetRotation * Joints[i].rotation, (float)(i+1)/(float)Joints.Length ); } if(SolvePosition) { Joints[i].rotation = Quaternion.Slerp( Joints[i].rotation, Quaternion.FromToRotation(EndEffector.position - Joints[i].position, TargetPosition - Joints[i].position) * Joints[i].rotation, (float)(i+1)/(float)Joints.Length ); } } if(SolveRotation) { EndEffector.rotation = TargetRotation; } } } }
20.505747
133
0.6463
[ "Apache-2.0" ]
YuZhang10/MANN-test
MANN/Unity/Assets/Scripts/IK/SerialIK.cs
1,786
C#
using IdentityModel; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.DependencyInjection; using Microsoft.IdentityModel.Tokens; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Web.Jwt { public static class JwtExtension { public static void ConfigureJwt(this IServiceCollection services, JwtConfig jwtConfig) { #region jwt配置 //认证 services.AddAuthentication(x => { // 认证middleware配置 x.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; x.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; }) .AddJwtBearer(o => { //jwt token参数设置 o.TokenValidationParameters = new TokenValidationParameters { NameClaimType = JwtClaimTypes.Name, RoleClaimType = JwtClaimTypes.Role, // 将下面两个参数设置为false,可以不验证Issuer和Audience,但是不建议这样做。 ValidateIssuer = true, // //Token颁发机构 发行人验证,这里要和token类中Claim类型的发行人保持一致 ValidIssuer = jwtConfig.Issuer,//发行人 ValidateAudience = false, // 接收人验证 ValidAudience = jwtConfig.Audience,//订阅人 //颁发给谁 ValidateIssuerSigningKey = true,// 是否开启签名认证 //这里的key要进行加密 IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(jwtConfig.SecretKey)), /***********************************TokenValidationParameters的参数默认值***********************************/ // RequireSignedTokens = true, // SaveSigninToken = false, // ValidateActor = false, // 将下面两个参数设置为false,可以不验证Issuer和Audience,但是不建议这样做。 // ValidateAudience = true, // ValidateIssuer = true, // ValidateIssuerSigningKey = false, // 是否要求Token的Claims中必须包含Expires // RequireExpirationTime = true, // 允许的服务器时间偏移量 // ClockSkew = TimeSpan.FromSeconds(300), // 是否验证Token有效期,使用当前时间与Token的Claims中的NotBefore和Expires对比 // ValidateLifetime = true }; }); #endregion //#region 授权 //services.AddAuthorization(options => //{ // options.AddPolicy("RequireClient", policy => policy.RequireRole("Client").Build()); // options.AddPolicy("RequireAdmin", policy => policy.RequireRole("Admin").Build()); // options.AddPolicy("RequireAdminOrClient", policy => policy.RequireRole("Admin,Client").Build()); //}); //#endregion } } }
44.434783
127
0.526419
[ "Apache-2.0" ]
lqh-xiaoemo/HaolaoshiApi
Web/Jwt/JwtExtension.cs
3,414
C#
using Newtonsoft.Json.Linq; using TechSpace.Reddit.Exceptions; namespace TechSpace.Reddit.Models { public class RedditGeneric { public Kind Kind { get; set; } public JObject Data { get; set; } public Listing ToListing() { if (Kind != Kind.Listing) throw new RedditGenericUnexpectedKindException(); return Data.ToObject<Listing>(); } public Post ToPost() { if (Kind != Kind.Link) throw new RedditGenericUnexpectedKindException(); return Data.ToObject<Post>(); } } }
23.185185
65
0.565495
[ "MIT" ]
LukeBillo/tech-space
TechSpace.Reddit/Models/RedditGeneric.cs
628
C#
using Alex.Graphics.Models.Entity; namespace Alex.Entities { public class PlayerSkinFlags { public static PlayerSkinFlags Default => new PlayerSkinFlags() { Value = byte.MaxValue }; public byte Value { get; set; } = 0; public bool CapeEnabled { get => Value.IsBitSet(0x01); set => Value = Value.SetBit(0x01, value); } public bool JacketEnabled { get => Value.IsBitSet(0x02); set => Value = Value.SetBit(0x02, value); } public bool LeftSleeveEnabled { get => Value.IsBitSet(0x04); set => Value = Value.SetBit(0x04, value); } public bool RightSleeveEnabled { get => Value.IsBitSet(0x08); set => Value = Value.SetBit(0x08, value); } public bool LeftPantsEnabled { get => Value.IsBitSet(0x10); set => Value = Value.SetBit(0x10, value); } public bool RightPantsEnabled { get => Value.IsBitSet(0x20); set => Value = Value.SetBit(0x20, value); } public bool HatEnabled { get => Value.IsBitSet(0x40); set => Value = Value.SetBit(0x40, value); } public void ApplyTo(ModelRenderer renderer) { Set(renderer, "cape", CapeEnabled); Set(renderer, "jacket", JacketEnabled); Set(renderer, "leftSleeve", LeftSleeveEnabled); Set(renderer, "rightSleeve", RightSleeveEnabled); Set(renderer, "leftPants", LeftPantsEnabled); Set(renderer, "rightPants", RightPantsEnabled); Set(renderer, "hat", HatEnabled); } private void Set(ModelRenderer renderer, string bone, bool value) { renderer.SetVisibility(bone, value); } } }
21.444444
67
0.666451
[ "MPL-2.0", "MPL-2.0-no-copyleft-exception" ]
codingwatching/Alex
src/Alex/Entities/PlayerSkinFlags.cs
1,544
C#
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. namespace Management.DeploymentManager.Tests { using System; using System.Linq; using Microsoft.Azure.Management.Authorization; using Microsoft.Azure.Management.ManagedServiceIdentity; using Microsoft.Azure.Management.Resources; using Microsoft.Azure.Management.Resources.Models; using Microsoft.Azure.Management.Storage; using Microsoft.Azure.Test.HttpRecorder; using Microsoft.Rest.ClientRuntime.Azure.TestFramework; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; using Xunit; public class DeploymentManagerClientHelper { private ResourceManagementClient resourceManagementClient; private StorageManagementClient storageManagementClient; private ManagedServiceIdentityClient managedServiceIdentityClient; private AuthorizationManagementClient authorizationClient; private MockContext _context; private TestBase _testBase; public DeploymentManagerClientHelper(TestBase testBase, MockContext context) : this( testBase, context, new RecordedDelegatingHandler() { StatusCodeToReturn = System.Net.HttpStatusCode.OK }) { this.ResourceGroupName = TestUtilities.GenerateName("admsdknet"); } public DeploymentManagerClientHelper(TestBase testBase, MockContext context, RecordedDelegatingHandler handler) { _testBase = testBase; _context = context; resourceManagementClient = DeploymentManagerTestUtilities.GetResourceManagementClient(context, handler); storageManagementClient = DeploymentManagerTestUtilities.GetStorageManagementClient(context, handler); managedServiceIdentityClient = DeploymentManagerTestUtilities.GetManagedServiceIdentityClient(context, handler); authorizationClient = DeploymentManagerTestUtilities.GetAuthorizationManagementClient(context, handler); } public string ResourceGroupName { get; private set; } public void TryCreateResourceGroup(string location) { ResourceGroup result = resourceManagementClient.ResourceGroups.CreateOrUpdate(this.ResourceGroupName, new ResourceGroup { Location = location }); var newlyCreatedGroup = resourceManagementClient.ResourceGroups.Get(this.ResourceGroupName); ThrowIfTrue(newlyCreatedGroup == null, "_client.ResourceGroups.Get returned null."); ThrowIfTrue(!this.ResourceGroupName.Equals(newlyCreatedGroup.Name), string.Format("resourceGroupName is not equal to {0}", this.ResourceGroupName)); } public string GetProviderLocation(string providerName, string resourceType) { string defaultLocation = "Central US"; string location = defaultLocation; if (HttpMockServer.Mode == HttpRecorderMode.Record) { var providerType = resourceManagementClient.Providers.Get(providerName).ResourceTypes.ToList() .FirstOrDefault(t => t.ResourceType.Equals(resourceType, StringComparison.OrdinalIgnoreCase)); location = providerType?.Locations?.FirstOrDefault() ?? defaultLocation; } return location; } public void DeleteResourceGroup(string resourceGroupName = null) { if (string.IsNullOrEmpty(resourceGroupName)) { resourceManagementClient.ResourceGroups.Delete(this.ResourceGroupName); } else { resourceManagementClient.ResourceGroups.Delete(resourceGroupName); } } public string CreateManagedIdentity( string subscriptionId, string identityName) { if (HttpMockServer.Mode == HttpRecorderMode.Record) { var parameters = new Microsoft.Azure.Management.ManagedServiceIdentity.Models.Identity() { Location = this.GetProviderLocation("Microsoft.ManagedIdentity", "userAssignedIdentities") }; var identity = this.managedServiceIdentityClient.UserAssignedIdentities.CreateOrUpdate( this.ResourceGroupName, identityName, parameters); Assert.NotNull(identity); // Give a couple minutes for the MSI to propagate. Observed failures of principalId not being found in the tenant // when there is no wait time between MSI creation and role assignment. DeploymentManagerTestUtilities.Sleep(TimeSpan.FromMinutes(2)); var scope = "/subscriptions/" + subscriptionId; var roleDefinitionList = this.authorizationClient.RoleDefinitions.List( scope, new Microsoft.Rest.Azure.OData.ODataQuery<Microsoft.Azure.Management.Authorization.Models.RoleDefinitionFilter>("roleName eq 'Contributor'")); var roleAssignmentName = Guid.NewGuid().ToString(); var roleAssignmentParameters = new Microsoft.Azure.Management.Authorization.Models.RoleAssignmentCreateParameters() { PrincipalId = identity.PrincipalId.ToString(), RoleDefinitionId = roleDefinitionList.First().Id, CanDelegate = false }; var roleAssignment = this.authorizationClient.RoleAssignments.Create( scope, roleAssignmentName, roleAssignmentParameters); Assert.NotNull(roleAssignment); // Add additional wait time after role assignment to propagate permissions. Observed // no permissions to modify resource group errors without wait time. DeploymentManagerTestUtilities.Sleep(TimeSpan.FromMinutes(1)); roleAssignment = this.authorizationClient.RoleAssignments.Get( scope, roleAssignmentName); Assert.NotNull(roleAssignment); return identity.Id; } return "dummyIdentity"; } public void CreateStorageAccount(string storageAccountName) { if (HttpMockServer.Mode == HttpRecorderMode.Record) { var parameters = new Microsoft.Azure.Management.Storage.Models.StorageAccountCreateParameters() { Location = this.GetProviderLocation("Microsoft.Storage", "storageAccounts"), AccountType = Microsoft.Azure.Management.Storage.Models.AccountType.StandardLRS }; var storageAccount = this.storageManagementClient.StorageAccounts.Create( this.ResourceGroupName, storageAccountName, parameters); } } public void UploadBlob( string storageAccountName, string containerName, string filePath, string blobName) { if (HttpMockServer.Mode == HttpRecorderMode.Record) { var accountKeyResult = this.storageManagementClient.StorageAccounts.ListKeysWithHttpMessagesAsync( this.ResourceGroupName, storageAccountName).Result; var storageAccount = new CloudStorageAccount( new StorageCredentials( storageAccountName, accountKeyResult.Body.Key1), useHttps: true); var blobClient = storageAccount.CreateCloudBlobClient(); var container = blobClient.GetContainerReference(containerName); container.CreateIfNotExistsAsync().Wait(); var blob = container.GetBlockBlobReference(blobName); blob.UploadFromFileAsync(filePath).Wait(); } } public string GetBlobContainerSasUri(string resourceGroupName, string storageAccountName, string containerName) { string sasUri = "foobar"; if (HttpMockServer.Mode == HttpRecorderMode.Record) { var accountKeyResult = this.storageManagementClient.StorageAccounts.ListKeysWithHttpMessagesAsync( resourceGroupName, storageAccountName).Result; var storageAccount = new CloudStorageAccount( new StorageCredentials( storageAccountName, accountKeyResult.Body.Key1), useHttps: true); var blobClient = storageAccount.CreateCloudBlobClient(); var container = blobClient.GetContainerReference(containerName); container.CreateIfNotExistsAsync(); sasUri = this.GetContainerSasUri(container); } return sasUri; } private string GetContainerSasUri(CloudBlobContainer container) { var sasConstraints = new SharedAccessBlobPolicy(); sasConstraints.SharedAccessStartTime = DateTime.UtcNow.AddDays(-1); sasConstraints.SharedAccessExpiryTime = DateTime.UtcNow.AddDays(2); sasConstraints.Permissions = SharedAccessBlobPermissions.Read | SharedAccessBlobPermissions.List; // Generate the shared access signature on the blob, setting the constraints directly on the signature. string sasContainerToken = container.GetSharedAccessSignature(sasConstraints); // Return the URI string for the container, including the SAS token. return container.Uri + sasContainerToken; } private void ThrowIfTrue(bool condition, string message) { if (condition) { throw new Exception(message); } } } }
43.863248
162
0.636107
[ "MIT" ]
0rland0Wats0n/azure-sdk-for-net
sdk/deploymentmanager/Microsoft.Azure.Management.DeploymentManager/tests/Helpers/DeploymentManagerClientHelper.cs
10,266
C#
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Threading; using System.Net; using System.Net.Http; using System.IO; using System.Reflection; using System.Diagnostics; using SharpCompress.Archives; namespace RainbowMage.OverlayPlugin.Updater { public class Installer { const uint FILE_OVERWRITE_RETRIES = 10; const int FILE_OVERWRITE_WAIT = 300; ProgressDisplay _display; public string TempDir { get; private set; } string _destDir = null; CancellationToken _token = CancellationToken.None; public ProgressDisplay Display => _display; public Installer(string dest, string tmpName) { _display = new ProgressDisplay(); _display.Show(); _destDir = dest; // Make sure our temporary directory is on the same drive as the destination. TempDir = Path.Combine(Path.GetDirectoryName(dest), tmpName); } public static async Task<bool> Run(string url, string destDir, string tmpName, int stripDirs = 0, bool overwrite = false) { var inst = new Installer(destDir, tmpName); return await Task.Run(() => { var scVersion = Assembly.Load("SharpCompress").GetName().Version; if (scVersion < Version.Parse("0.24.0")) { inst._display.Log(Resources.SharpCompressOutdatedError); inst._display.UpdateStatus(0, Resources.StatusError); return false; } var result = false; var archivePath = Path.Combine(inst.TempDir, "update.file"); var dlResult = true; // Only try to download URLs. We can skip this step for local files. if (File.Exists(url)) { archivePath = url; } else { dlResult = inst.Download(url, archivePath); } if (dlResult && inst.Extract(archivePath, stripDirs)) { result = overwrite ? inst.InstallOverwrite() : inst.InstallReplace(); inst.Cleanup(); if (result) { inst.Display.Close(); } } return result; }); } public bool Download(string url, string dest, bool useHttpClient = false) { try { if (Directory.Exists(TempDir)) { Directory.Delete(TempDir, true); } Directory.CreateDirectory(TempDir); } catch (Exception ex) { _display.Log(string.Format(Resources.CreatingTempDirFailed, TempDir, ex)); return false; } _display.UpdateStatus(0, string.Format(Resources.StatusDownloadStarted, 1, 2)); // Avoid confusing users with the DO_NOT_DOWNLOAD extension. Users aren't supposed to manually download // these files from the GH releases page so I added that extension and didn't expect people to pay // attention to the download URL in the updater log. _display.Log(string.Format(Resources.LogDownloading, url.Replace(".DO_NOT_DOWNLOAD", ""), dest)); var success = false; var cancel = _display.GetCancelToken(); _token = cancel; try { var retries = 10; while (retries > 0 && !cancel.IsCancellationRequested) { try { if (useHttpClient) { HttpClientWrapper.Get(url, new Dictionary<string, string>(), dest, DlProgressCallback, true); } else { CurlWrapper.Get(url, new Dictionary<string, string>(), dest, DlProgressCallback, true); } success = true; break; } catch (Exception ex) { _display.Log(string.Format(Resources.LogDownloadInterrupted, ex)); if (retries > 0 && !cancel.IsCancellationRequested) { // If this is a curl exception, it's most likely network related. Wait a second // before trying again. We don't want to spam the other side with download requests. if (ex.GetType() == typeof(CurlException)) { if (!((CurlException) ex).Retry) { // Retrying won't fix this kind of error. Abort. success = false; break; } Thread.Sleep(1000); } _display.Log(Resources.LogResumingDownload); success = false; continue; } } } if (cancel.IsCancellationRequested || !success) { _display.UpdateStatus(0, Resources.StatusCancelling); File.Delete(dest); if (!cancel.IsCancellationRequested) { _display.UpdateStatus(0, Resources.OutOfRetries); _display.Log(Resources.OutOfRetries); } else { _display.UpdateStatus(0, Resources.StatusCancelled); _display.Log(Resources.LogAbortedByUser); } return false; } } catch (Exception ex) { if (cancel.IsCancellationRequested) { _display.UpdateStatus(1, Resources.StatusCancelled); _display.Log(Resources.LogAbortedByUser); return false; } _display.Log(string.Format(Resources.Exception, ex)); return false; } finally { _display.DisposeCancelSource(); if (!success) Cleanup(); } return true; } private bool DlProgressCallback(long resumed, long dltotal, long dlnow, long ultotal, long ulnow) { var status = string.Format(Resources.StatusDownloadStarted, 1, 2); if (dltotal > 0) _display.UpdateStatus(((float)resumed + dlnow) / ((float)resumed + dltotal), status); return _token.IsCancellationRequested; } public bool Extract(string archivePath, int stripDirs = 0) { var success = false; var cancel = _display.GetCancelToken(); try { _display.UpdateStatus(0, string.Format(Resources.StatusPreparingExtraction, 2, 2)); _display.Log(Resources.LogOpeningArchive); var contentsPath = Path.Combine(TempDir, "contents"); Directory.CreateDirectory(contentsPath); using (var archive = ArchiveFactory.Open(archivePath)) { var total = 0d; var done = 0d; foreach (var entry in archive.Entries) { total += entry.Size; } // Make sure we never divide by zero. if (total == 0d) total = 1d; using (var reader = archive.ExtractAllEntries()) { reader.EntryExtractionProgress += (sender, e) => { var percent = (float)(done + e.ReaderProgress.BytesTransferred) / total; _display.UpdateStatus(Math.Min(percent, 1), $"[2/2]: {reader.Entry.Key}"); }; cancel = _display.GetCancelToken(); _display.Log(Resources.LogExtractingFiles); while (reader.MoveToNextEntry()) { if (cancel.IsCancellationRequested) { break; } var outPath = reader.Entry.Key; if (stripDirs > 0) { var parts = outPath.Split('/'); if (parts.Length < stripDirs + 1) { continue; } else { outPath = string.Join("" + Path.DirectorySeparatorChar, parts.ToList().GetRange(stripDirs, parts.Length - stripDirs)); } } outPath = Path.Combine(contentsPath, outPath); if (reader.Entry.IsDirectory) { Directory.CreateDirectory(outPath); } else { Directory.CreateDirectory(Path.GetDirectoryName(outPath)); using (var writer = File.OpenWrite(outPath)) { reader.WriteEntryTo(writer); } } done += reader.Entry.Size; } } } if (cancel.IsCancellationRequested) { _display.UpdateStatus(1, Resources.StatusCancelled); _display.Log(Resources.LogExtractionAbortedByUser); return false; } success = true; } catch(Exception ex) { if (cancel.IsCancellationRequested) { _display.UpdateStatus(1, Resources.StatusCancelled); _display.Log(Resources.LogAbortedByUser); return false; } _display.Log(string.Format(Resources.Exception, ex)); return false; } finally { _display.DisposeCancelSource(); if (!success) Cleanup(); } _display.UpdateStatus(1, string.Format(Resources.StatusDone, 2, 2)); _display.Log(Resources.LogDone); return success; } public bool InstallReplace() { try { string backup = null; var parent = Path.GetDirectoryName(_destDir); if (!Directory.Exists(parent)) Directory.CreateDirectory(parent); if (Directory.Exists(_destDir)) { _display.Log(Resources.LogBackingUpOldFiles); backup = _destDir + ".bak"; if (Directory.Exists(backup)) Directory.Delete(backup, true); Directory.Move(_destDir, backup); } try { _display.Log(Resources.LogMovingDirectory); Directory.Move(Path.Combine(TempDir, "contents"), _destDir); } catch (Exception e) { _display.Log(string.Format(Resources.LogFailedReplaceDirectory, e)); _display.Log(Resources.LogCleaningUp); if (Directory.Exists(_destDir)) { Directory.Delete(_destDir, true); } if (backup != null) { _display.Log(Resources.LogRestoringBackup); Directory.Move(backup, _destDir); } _display.Log(Resources.LogDone); return false; } if (backup != null) { _display.Log(Resources.LogRemovingOldBackup); Directory.Delete(backup, true); } return true; } catch (Exception e) { _display.Log(string.Format(Resources.Exception, e)); return false; } } public bool InstallOverwrite() { try { try { _display.Log(Resources.LogOverwritingOldFiles); var prefix = Path.Combine(TempDir, "contents"); var queue = new List<DirectoryInfo>() { new DirectoryInfo(prefix) }; while (queue.Count() > 0) { var info = queue[0]; queue.RemoveAt(0); var sub = info.FullName.Substring(prefix.Length).TrimStart('\\', '/'); var sub_destDir = Path.Combine(_destDir, sub); if (!Directory.Exists(sub_destDir)) { Directory.CreateDirectory(sub_destDir); } foreach (var item in info.EnumerateDirectories()) { queue.Add(item); } foreach (var item in info.EnumerateFiles()) { bool done = false; for (int i = 0; i < FILE_OVERWRITE_RETRIES; i++) { try { File.Delete(Path.Combine(sub_destDir, item.Name)); File.Move(item.FullName, Path.Combine(sub_destDir, item.Name)); done = true; break; } catch (Exception e) { _display.Log(string.Format(Resources.LogOverwriteRetry, item.Name, e)); Thread.Sleep(FILE_OVERWRITE_WAIT); } } if (!done) { throw new Exception(Resources.LogOverwriteFailed); } } } } catch (Exception e) { _display.Log(string.Format(Resources.LogOverwritingOldFilesFailed, e)); return false; } return true; } catch (Exception e) { _display.Log(string.Format(Resources.Exception, e)); return false; } } public void Cleanup() { if (Directory.Exists(TempDir)) { _display.Log(Resources.LogDeletingTempFiles); var retries = 10; while (retries > 0) { retries--; try { Directory.Delete(TempDir, true); _display.Log(Resources.LogDone); break; } catch (Exception ex) { _display.Log(string.Format(Resources.LogFailedToDelete, TempDir, ex)); Thread.Sleep(300); } } } } } }
35.488273
154
0.422915
[ "MIT" ]
Bluefissure/OverlayPlugin
OverlayPlugin.Updater/Installer.cs
16,646
C#
using System; using System.IO; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using BizHawk.Common.BufferExtensions; using BizHawk.Client.Common; using BizHawk.Emulation.Cores.PCEngine; using BizHawk.Emulation.Common.Components; using BizHawk.Emulation.Common; using ICSharpCode.SharpZipLib.Zip; namespace BizHawk.Client.EmuHawk { public partial class PCESoundDebugger : Form, IToolFormAutoConfig { [RequiredService] private PCEngine _pce { get; set; } public PCESoundDebugger() { InitializeComponent(); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.OptimizedDoubleBuffer, true); } byte[] waveformTemp = new byte[32 * 2]; protected override void OnShown(EventArgs e) { for (int i = 0; i < lvChEn.Items.Count; i++) lvChEn.Items[i].Checked = true; base.OnShown(e); } public void NewUpdate(ToolFormUpdateType type) { } public void UpdateValues() { foreach (var entry in PSGEntries) { entry.wasactive = entry.active; entry.active = false; } bool sync = false; lvPsgWaveforms.BeginUpdate(); lvChannels.BeginUpdate(); for (int i = 0; i < 6; i++) { var ch = _pce.PSG.Channels[i]; //these conditions mean a sample isnt playing if (!ch.Enabled) { lvChannels.Items[i].SubItems[1].Text = "-"; lvChannels.Items[i].SubItems[2].Text = "-"; lvChannels.Items[i].SubItems[3].Text = "(disabled)"; goto DEAD; } if (ch.DDA) { lvChannels.Items[i].SubItems[1].Text = "-"; lvChannels.Items[i].SubItems[2].Text = "-"; lvChannels.Items[i].SubItems[3].Text = "(DDA)"; goto DEAD; } lvChannels.Items[i].SubItems[1].Text = ch.Volume.ToString(); lvChannels.Items[i].SubItems[2].Text = ch.Frequency.ToString(); if (ch.NoiseChannel) { lvChannels.Items[i].SubItems[3].Text = "(noise)"; goto DEAD; } if (ch.Volume == 0) goto DEAD; lvChannels.Items[i].SubItems[3].Text = "-"; //ok, a sample is playing. copy out the waveform short[] waveform = (short[])ch.Wave.Clone(); //hash it var ms = new MemoryStream(waveformTemp); var bw = new BinaryWriter(ms); foreach (var s in waveform) bw.Write(s); bw.Flush(); string md5 = waveformTemp.HashMD5(); if (!PSGEntryTable.ContainsKey(md5)) { var entry = new PSGEntry() { hash = md5, name = md5, waveform = waveform, active = true, hitcount = 1, index = PSGEntries.Count }; PSGEntries.Add(entry); PSGEntryTable[md5] = entry; sync = true; LastSamples[i] = entry; } else { PSGEntry entry = PSGEntryTable[md5]; entry.active = true; //are we playing the same sample as before? if (LastSamples[i] == entry) { } else //if (!entry.wasactive) { LastSamples[i] = entry; entry.hitcount++; if (entry.index < lvPsgWaveforms.Items.Count) lvPsgWaveforms.Items[entry.index].SubItems[1].Text = entry.hitcount.ToString(); else sync = true; } } lvChannels.Items[i].SubItems[3].Text = PSGEntryTable[md5].name; continue; DEAD: LastSamples[i] = null; } if (sync) SyncLists(); lvPsgWaveforms.EndUpdate(); lvChannels.EndUpdate(); } public void FastUpdate() { // Todo } class PSGEntry { public int index; public bool active, wasactive; public int hitcount; public string hash; public string name; public short[] waveform; } PSGEntry[] LastSamples = new PSGEntry[8]; List<PSGEntry> PSGEntries = new List<PSGEntry>(); Dictionary<string, PSGEntry> PSGEntryTable = new Dictionary<string, PSGEntry>(); public void Restart() { } public bool AskSaveChanges() { return true; } public bool UpdateBefore { get { return false; } } //32*16 samples, 16bit, mono, 8khz (but we'll change the sample rate) static readonly byte[] emptyWav = new byte[] { 0x52, 0x49, 0x46, 0x46, 0x24, 0x04, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45, 0x66, 0x6D, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0xE0, 0x2E, 0x00, 0x00, 0xC0, 0x5D, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x04, 0x00, 0x00, }; private void btnExport_Click(object sender, EventArgs e) { string tmpf = Path.GetTempFileName() + ".zip"; using (var stream = new FileStream(tmpf, FileMode.Create, FileAccess.Write, FileShare.Read)) { var zip = new ZipOutputStream(stream) { IsStreamOwner = false, UseZip64 = UseZip64.Off }; foreach (var entry in PSGEntries) { var ze = new ZipEntry(entry.name + ".wav") { CompressionMethod = CompressionMethod.Deflated }; zip.PutNextEntry(ze); var ms = new MemoryStream(); var bw = new BinaryWriter(ms); bw.Write(emptyWav, 0, emptyWav.Length); ms.Position = 0x18; //samplerate and avgbytespersecond bw.Write(20000); bw.Write(20000 * 2); bw.Flush(); ms.Position = 0x2C; for (int i = 0; i < 32; i++) for (int j = 0; j < 16; j++) bw.Write(entry.waveform[i]); bw.Flush(); var buf = ms.GetBuffer(); zip.Write(buf, 0, (int)ms.Length); zip.Flush(); zip.CloseEntry(); } zip.Close(); stream.Flush(); } System.Diagnostics.Process.Start(tmpf); } class ZipDataSource : IStaticDataSource { public ZipDataSource(byte[] data) { this.data = data; } byte[] data; public Stream GetSource() { return new MemoryStream(data); } } private void btnReset_Click(object sender, EventArgs e) { PSGEntryTable.Clear(); PSGEntries.Clear(); for (int i = 0; i < 8; i++) LastSamples[i] = null; SyncLists(); } void SyncLists() { lvPsgWaveforms.Items.Clear(); foreach (var entry in PSGEntries) { var lvi = new ListViewItem(entry.name); lvi.SubItems.Add(entry.hitcount.ToString()); lvPsgWaveforms.Items.Add(lvi); } } private void lvPsgWaveforms_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.F2 && lvPsgWaveforms.SelectedItems.Count > 0) { lvPsgWaveforms.SelectedItems[0].BeginEdit(); } } private void lvPsgWaveforms_ItemActivate(object sender, EventArgs e) { } private void lvPsgWaveforms_AfterLabelEdit(object sender, LabelEditEventArgs e) { var entry = PSGEntries[e.Item]; entry.name = e.Label; } private void lvChEn_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) { } private void lvChEn_ItemChecked(object sender, ItemCheckedEventArgs e) { for (int i = 0; i < 6; i++) _pce.PSG.UserMute[i] = !lvChEn.Items[i].Checked; } } }
23.940559
99
0.642471
[ "MIT" ]
CognitiaAI/StreetFighterRL
emulator/Bizhawk/BizHawk-master/BizHawk.Client.EmuHawk/tools/PCE/PCESoundDebugger.cs
6,849
C#
using System; using System.Collections.Generic; using WDE.Common.CoreVersion; using WDE.Common.Database; using WDE.Module.Attributes; namespace WDE.Trinity { [AutoRegister] [SingleInstance] public class TrinityCataclysmVersion : ICoreVersion, IDatabaseFeatures, ISmartScriptFeatures, IConditionFeatures { public string Tag => "TrinityCata"; public string FriendlyName => "The Cataclysm Preservation Project"; public IDatabaseFeatures DatabaseFeatures => this; public ISmartScriptFeatures SmartScriptFeatures => this; public IConditionFeatures ConditionFeatures => this; public ISet<Type> UnsupportedTables { get; } = new HashSet<Type>{typeof(IAreaTriggerTemplate), typeof(IConversationTemplate), typeof(ICreatureClassLevelStat)}; public bool AlternativeTrinityDatabase => false; public ISet<SmartScriptType> SupportedTypes { get; } = new HashSet<SmartScriptType> { SmartScriptType.Creature, SmartScriptType.GameObject, SmartScriptType.AreaTrigger, SmartScriptType.TimedActionList, }; public string TableName => "smart_scripts"; public string ConditionsFile => "SmartData/conditions.json"; public string ConditionGroupsFile => "SmartData/conditions_groups.json"; public string ConditionSourcesFile => "SmartData/condition_sources.json"; } }
40.685714
167
0.718399
[ "MIT" ]
DeKaDeNcE/WoWDatabaseEditor
WDE.Trinity/TrinityCataclysmVersion.cs
1,426
C#
namespace BizHawk.Client.Common { public interface ISQLiteApi : IExternalApi { string CreateDatabase(string name); string OpenDatabase(string name); string WriteCommand(string query = ""); object ReadCommand(string query = ""); } }
22.181818
43
0.737705
[ "MIT" ]
CartoonFan/BizHawk
src/BizHawk.Client.Common/Api/Interfaces/ISQLiteApi.cs
246
C#
// ----------------------------------------------------------------------- // <copyright file="TrackerService.cs" company="Petabridge, LLC"> // Copyright (C) 2018 - 2018 Petabridge, LLC <https://petabridge.com> // </copyright> // ----------------------------------------------------------------------- using System.Threading.Tasks; using Akka.Actor; using Akka.Bootstrap.Docker; using WebCrawler.Shared.Config; using WebCrawler.TrackerService.Actors; using WebCrawler.TrackerService.Actors.Tracking; namespace WebCrawler.TrackerService { public class TrackerService { protected IActorRef ApiMaster; protected ActorSystem ClusterSystem; protected IActorRef DownloadMaster; public Task WhenTerminated => ClusterSystem.WhenTerminated; public bool Start() { var config = HoconLoader.ParseConfig("tracker.hocon"); ClusterSystem = ActorSystem.Create("webcrawler", config.BootstrapFromDocker()); ApiMaster = ClusterSystem.ActorOf(Props.Create(() => new ApiMaster()), "api"); DownloadMaster = ClusterSystem.ActorOf(Props.Create(() => new DownloadsMaster()), "downloads"); return true; } public Task Stop() { return CoordinatedShutdown.Get(ClusterSystem).Run(); } } }
34.205128
107
0.595202
[ "Apache-2.0" ]
Azmitrok/akkadotnet-code-samples
Cluster.WebCrawler/src/WebCrawler.TrackerService/TrackerService.cs
1,336
C#
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; [ExecuteInEditMode()] public class ProgressBar : MonoBehaviour { public int minimum, maximum, current; public Image mask, fill; public Color color; // Update is called once per frame void Update() { GetCurrentFill(); } void GetCurrentFill() { float currentOffset = current - minimum; float maximumOffset = maximum - minimum; float fillAmount = currentOffset / maximumOffset; mask.fillAmount = fillAmount; fill.color = color; } }
20.8
57
0.661859
[ "MIT" ]
DournauxNathan/Just-Served
Projet_ETPA_004/Assets/Scripts/ProgressBar.cs
626
C#
/** * Copyright (c) 2001-2019 Mathew A. Nelson and Robocode contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * https://robocode.sourceforge.io/license/epl-v10.html */ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by jni4net. See http://jni4net.sourceforge.net/ // Runtime Version:2.0.50727.8669 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace net.sf.robocode.serialization { #region Component Designer generated code [global::net.sf.jni4net.attributes.JavaInterfaceAttribute()] public partial interface ISerializableHelper { [global::net.sf.jni4net.attributes.JavaMethodAttribute("(Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;Ljava/lang/Obje" + "ct;)V")] void serialize(global::net.sf.robocode.serialization.RbSerializer par0, global::java.nio.ByteBuffer par1, global::java.lang.Object par2); [global::net.sf.jni4net.attributes.JavaMethodAttribute("(Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;)Ljava/lang/Obj" + "ect;")] global::java.lang.Object deserialize(global::net.sf.robocode.serialization.RbSerializer par0, global::java.nio.ByteBuffer par1); [global::net.sf.jni4net.attributes.JavaMethodAttribute("(Lnet/sf/robocode/serialization/RbSerializer;Ljava/lang/Object;)I")] int sizeOf(global::net.sf.robocode.serialization.RbSerializer par0, global::java.lang.Object par1); } #endregion #region Component Designer generated code public partial class ISerializableHelper_ { public static global::java.lang.Class _class { get { return global::net.sf.robocode.serialization.@__ISerializableHelper.staticClass; } } } #endregion #region Component Designer generated code [global::net.sf.jni4net.attributes.JavaProxyAttribute(typeof(global::net.sf.robocode.serialization.ISerializableHelper), typeof(global::net.sf.robocode.serialization.ISerializableHelper_))] [global::net.sf.jni4net.attributes.ClrWrapperAttribute(typeof(global::net.sf.robocode.serialization.ISerializableHelper), typeof(global::net.sf.robocode.serialization.ISerializableHelper_))] internal sealed partial class @__ISerializableHelper : global::java.lang.Object, global::net.sf.robocode.serialization.ISerializableHelper { internal new static global::java.lang.Class staticClass; internal static global::net.sf.jni4net.jni.MethodId j4n_serialize0; internal static global::net.sf.jni4net.jni.MethodId j4n_deserialize1; internal static global::net.sf.jni4net.jni.MethodId j4n_sizeOf2; private @__ISerializableHelper(global::net.sf.jni4net.jni.JNIEnv @__env) : base(@__env) { } private static void InitJNI(global::net.sf.jni4net.jni.JNIEnv @__env, java.lang.Class @__class) { global::net.sf.robocode.serialization.@__ISerializableHelper.staticClass = @__class; global::net.sf.robocode.serialization.@__ISerializableHelper.j4n_serialize0 = @__env.GetMethodID(global::net.sf.robocode.serialization.@__ISerializableHelper.staticClass, "serialize", "(Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;Ljava/lang/Obje" + "ct;)V"); global::net.sf.robocode.serialization.@__ISerializableHelper.j4n_deserialize1 = @__env.GetMethodID(global::net.sf.robocode.serialization.@__ISerializableHelper.staticClass, "deserialize", "(Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;)Ljava/lang/Obj" + "ect;"); global::net.sf.robocode.serialization.@__ISerializableHelper.j4n_sizeOf2 = @__env.GetMethodID(global::net.sf.robocode.serialization.@__ISerializableHelper.staticClass, "sizeOf", "(Lnet/sf/robocode/serialization/RbSerializer;Ljava/lang/Object;)I"); } public void serialize(global::net.sf.robocode.serialization.RbSerializer par0, global::java.nio.ByteBuffer par1, global::java.lang.Object par2) { global::net.sf.jni4net.jni.JNIEnv @__env = this.Env; using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 16)){ @__env.CallVoidMethod(this, global::net.sf.robocode.serialization.@__ISerializableHelper.j4n_serialize0, global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par0), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par1), global::net.sf.jni4net.utils.Convertor.ParFullC2J<global::java.lang.Object>(@__env, par2)); } } public global::java.lang.Object deserialize(global::net.sf.robocode.serialization.RbSerializer par0, global::java.nio.ByteBuffer par1) { global::net.sf.jni4net.jni.JNIEnv @__env = this.Env; using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 14)){ return global::net.sf.jni4net.utils.Convertor.FullJ2C<global::java.lang.Object>(@__env, @__env.CallObjectMethodPtr(this, global::net.sf.robocode.serialization.@__ISerializableHelper.j4n_deserialize1, global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par0), global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par1))); } } public int sizeOf(global::net.sf.robocode.serialization.RbSerializer par0, global::java.lang.Object par1) { global::net.sf.jni4net.jni.JNIEnv @__env = this.Env; using(new global::net.sf.jni4net.jni.LocalFrame(@__env, 14)){ return ((int)(@__env.CallIntMethod(this, global::net.sf.robocode.serialization.@__ISerializableHelper.j4n_sizeOf2, global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par0), global::net.sf.jni4net.utils.Convertor.ParFullC2J<global::java.lang.Object>(@__env, par1)))); } } private static global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod> @__Init(global::net.sf.jni4net.jni.JNIEnv @__env, global::java.lang.Class @__class) { global::System.Type @__type = typeof(__ISerializableHelper); global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod> methods = new global::System.Collections.Generic.List<global::net.sf.jni4net.jni.JNINativeMethod>(); methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "serialize", "serialize0", "(Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;Ljava/lang/Obje" + "ct;)V")); methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "deserialize", "deserialize1", "(Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;)Ljava/lang/Obj" + "ect;")); methods.Add(global::net.sf.jni4net.jni.JNINativeMethod.Create(@__type, "sizeOf", "sizeOf2", "(Lnet/sf/robocode/serialization/RbSerializer;Ljava/lang/Object;)I")); return methods; } private static void serialize0(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle par0, global::net.sf.jni4net.utils.JniLocalHandle par1, global::net.sf.jni4net.utils.JniLocalHandle par2) { // (Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;Ljava/lang/Object;)V // (Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;Ljava/lang/Object;)V global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp); try { global::net.sf.robocode.serialization.ISerializableHelper @__real = global::net.sf.jni4net.utils.Convertor.FullJ2C<global::net.sf.robocode.serialization.ISerializableHelper>(@__env, @__obj); @__real.serialize(global::net.sf.jni4net.utils.Convertor.StrongJ2Cp<global::net.sf.robocode.serialization.RbSerializer>(@__env, par0), global::net.sf.jni4net.utils.Convertor.StrongJ2Cp<global::java.nio.ByteBuffer>(@__env, par1), global::net.sf.jni4net.utils.Convertor.FullJ2C<global::java.lang.Object>(@__env, par2)); }catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);} } private static global::net.sf.jni4net.utils.JniHandle deserialize1(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle par0, global::net.sf.jni4net.utils.JniLocalHandle par1) { // (Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;)Ljava/lang/Object; // (Lnet/sf/robocode/serialization/RbSerializer;Ljava/nio/ByteBuffer;)Ljava/lang/Object; global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp); global::net.sf.jni4net.utils.JniHandle @__return = default(global::net.sf.jni4net.utils.JniHandle); try { global::net.sf.robocode.serialization.ISerializableHelper @__real = global::net.sf.jni4net.utils.Convertor.FullJ2C<global::net.sf.robocode.serialization.ISerializableHelper>(@__env, @__obj); @__return = global::net.sf.jni4net.utils.Convertor.FullC2J<global::java.lang.Object>(@__env, @__real.deserialize(global::net.sf.jni4net.utils.Convertor.StrongJ2Cp<global::net.sf.robocode.serialization.RbSerializer>(@__env, par0), global::net.sf.jni4net.utils.Convertor.StrongJ2Cp<global::java.nio.ByteBuffer>(@__env, par1))); }catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);} return @__return; } private static int sizeOf2(global::System.IntPtr @__envp, global::net.sf.jni4net.utils.JniLocalHandle @__obj, global::net.sf.jni4net.utils.JniLocalHandle par0, global::net.sf.jni4net.utils.JniLocalHandle par1) { // (Lnet/sf/robocode/serialization/RbSerializer;Ljava/lang/Object;)I // (Lnet/sf/robocode/serialization/RbSerializer;Ljava/lang/Object;)I global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.Wrap(@__envp); int @__return = default(int); try { global::net.sf.robocode.serialization.ISerializableHelper @__real = global::net.sf.jni4net.utils.Convertor.FullJ2C<global::net.sf.robocode.serialization.ISerializableHelper>(@__env, @__obj); @__return = ((int)(@__real.sizeOf(global::net.sf.jni4net.utils.Convertor.StrongJ2Cp<global::net.sf.robocode.serialization.RbSerializer>(@__env, par0), global::net.sf.jni4net.utils.Convertor.FullJ2C<global::java.lang.Object>(@__env, par1)))); }catch (global::System.Exception __ex){@__env.ThrowExisting(__ex);} return @__return; } new internal sealed class ContructionHelper : global::net.sf.jni4net.utils.IConstructionHelper { public global::net.sf.jni4net.jni.IJvmProxy CreateProxy(global::net.sf.jni4net.jni.JNIEnv @__env) { return new global::net.sf.robocode.serialization.@__ISerializableHelper(@__env); } } } #endregion }
77.766667
338
0.687184
[ "Apache-2.0" ]
Delawen/robocode
plugins/dotnet/robocode.dotnet.nhost/src/generated/net/sf/robocode/serialization/ISerializableHelper.generated.cs
11,665
C#
using System; using Epinova.ElasticSearch.Core.Models.Properties; using Newtonsoft.Json; namespace Epinova.ElasticSearch.Core.Models.Converters { public class GeoPointConverter : JsonConverter { public override bool CanConvert(Type objectType) => objectType == typeof(GeoPoint); public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) => GeoPoint.Parse(reader.Value as string); public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { var geoPoint = value as GeoPoint; if(geoPoint == null) { return; } writer.WriteStartObject(); writer.WritePropertyName(JsonNames.Lat); writer.WriteValue(geoPoint.Lat); writer.WritePropertyName(JsonNames.Lon); writer.WriteValue(geoPoint.Lon); writer.WriteEnd(); } } }
31.75
124
0.637795
[ "MIT" ]
2644783865/Epinova.Elasticsearch
src/Epinova.ElasticSearch.Core/Models/Converters/GeoPointConverter.cs
1,018
C#
using GetReady.Data.Models.QuestionModels; using GetReady.Services.Mapping.Contracts; namespace GetReady.Services.Models.QuestionSsheetModels { public class QuestionSheetGet: IMapFrom<QuestionSheet> { public int Id { get; set; } public string Name { get; set; } public string Description { get; set; } ///Should be between 1 and 10 public int? Difficulty { get; set; } ///Should be between 1 and 10 public int Importance { get; set; } } }
24.428571
58
0.649123
[ "MIT" ]
Nikismyname/GetReady-Angular-Backend
src/GetReady.Services.Models/QuestionSsheetModels/QuestionSheetGet.cs
515
C#
using System.Linq; using AzureEventGridSimulator.Infrastructure.Settings; using Newtonsoft.Json; using Shouldly; using Xunit; namespace AzureEventGridSimulator.Tests.Unit { [Trait("Category","unit")] public class ConfigurationLoadingTests { [Fact] public void TestConfigurationLoad() { const string json = @" { ""topics"": [{ ""name"": ""MyAwesomeTopic"", ""port"": 60101, ""key"": ""TheLocal+DevelopmentKey="", ""subscribers"": [{ ""name"": ""LocalAzureFunctionSubscription"", ""endpoint"":""http://localhost:7071/runtime/webhooks/EventGrid?functionName=PersistEventToDb"", ""filter"": { ""includedEventTypes"":[""some.special.event.type""], ""subjectBeginsWith"":""MySubject"", ""subjectEndsWith"":""_success"", ""isSubjectCaseSensitive"":true, ""advancedFilters"": [{ ""operatorType"":""NumberGreaterThanOrEquals"", ""key"":""Data.Key1"", ""value"":5 }, { ""operatorType"":""StringContains"", ""key"":""Subject"", ""values"":[""container1"",""container2"" ]} ]} }] }, { ""name"":""ATopicWithNoSubscribers"", ""port"":60102, ""key"":""TheLocal+DevelopmentKey="", ""subscribers"":[] }] }"; var settings = JsonConvert.DeserializeObject<SimulatorSettings>(json); settings.ShouldNotBeNull(); settings.Topics.ShouldNotBeNull(); settings.Topics.ShouldAllBe(t => t.Subscribers.All(s => s.Filter != null) && t.Subscribers.All(s => s.Filter.AdvancedFilters != null) ); Should.NotThrow(() => { settings.Validate(); }); } } }
32.587302
108
0.482221
[ "MIT" ]
wgebczyk/eventgrite
src/AzureEventGridSimulator.Tests/UnitTests/ConfigurationLoadingTests.cs
2,055
C#
using System; namespace Plugin.Media.Abstractions { /// <summary> /// Media Options /// </summary> public class StoreMediaOptions { /// <summary> /// /// </summary> protected StoreMediaOptions() { } /// <summary> /// Directory name /// </summary> public string Directory { get; set; } /// <summary> /// File name /// </summary> public string Name { get; set; } } /// <summary> /// Camera device /// </summary> public enum CameraDevice { /// <summary> /// Back of device /// </summary> Rear, /// <summary> /// Front facing of device /// </summary> Front } /// <summary> /// Specifies the media picker's modal presentation style. /// Only applies to iOS. /// </summary> public enum MediaPickerModalPresentationStyle { /// <summary> /// This is the equivalent of presenting the media picker with UIKit.UIModalPresentationStyle.FullScreen style. /// Will remove the views of the underlying view controller when presenting the media picker. /// Only applies to iOS. /// </summary> FullScreen, /// <summary> /// This is the equivalent of presenting the media picker with UIKit.UIModalPresentationStyle.OverFullScreen style. /// Will keep the views of the underlying view controller when presenting the media picker. /// Only applies to iOS. /// </summary> OverFullScreen } /// <summary> /// /// </summary> public class PickMediaOptions { /// <summary> /// Gets or sets the the max width or height of the image. /// The image will aspect resize to the MaxWidthHeight as the max size of the image height or width. /// This value is only used if PhotoSize is PhotoSize.MaxWidthHeight /// </summary> /// <value>The max width or height of the image.</value> public int? MaxWidthHeight { get; set; } /// <summary> /// Gets or sets the size of the photo. /// </summary> /// <value>The size of the photo.</value> public PhotoSize PhotoSize { get; set; } = PhotoSize.Full; int customPhotoSize = 100; /// <summary> /// The custom photo size to use, 100 full size (same as Full), /// and 1 being smallest size at 1% of original /// Default is 100 /// </summary> public int CustomPhotoSize { get { return customPhotoSize; } set { if (value > 100) customPhotoSize = 100; else if (value < 1) customPhotoSize = 1; else customPhotoSize = value; } } int quality = 100; /// <summary> /// The compression quality to use, 0 is the maximum compression (worse quality), /// and 100 minimum compression (best quality) /// Default is 100 /// </summary> public int CompressionQuality { get { return quality; } set { if (value > 100) quality = 100; else if (value < 0) quality = 0; else quality = value; } } bool rotateImage = true; /// <summary> /// Should the library rotate image according to received exif orientation. /// Set to true by default. /// </summary> public bool RotateImage { get { return rotateImage; } set { rotateImage = value;} } bool saveMetaData = true; /// <summary> /// Saves metadate/exif data from the original file. /// </summary> public bool SaveMetaData { get { return saveMetaData; } set { saveMetaData = value; } } /// <summary> /// Specifies the media picker's modal presentation style. /// Only applies to iOS. /// Defaults to FullScreen, which is the equivalent of using UIKit.UIModalPresentationStyle.FullScreen. /// </summary> public MediaPickerModalPresentationStyle ModalPresentationStyle { get; set; } = MediaPickerModalPresentationStyle.FullScreen; } public class StorePickerMediaOptions : StoreMediaOptions { /// <summary> /// Enable multi picker /// </summary> public bool MultiPicker { get; set; } } /// <summary> /// /// </summary> public class StoreCameraMediaOptions : StoreMediaOptions { /// <summary> /// Allow cropping on photos and trimming on videos /// If null will use default /// Photo: UWP cropping can only be disabled on full size /// Video: UWP trimming when disabled won't allow time limit to be set /// </summary> public bool? AllowCropping { get; set; } = null; /// <summary> /// Default camera /// Should work on iOS and Windows, but not guaranteed on Android as not every camera implements it /// </summary> public CameraDevice DefaultCamera { get; set; } /// <summary> /// Gets or sets the the max width or height of the image. /// The image will aspect resize to the MaxWidthHeight as the max size of the image height or width. /// This value is only used if PhotoSize is PhotoSize.MaxWidthHeight /// </summary> /// <value>The max width or height of the image.</value> public int? MaxWidthHeight { get; set; } /// <summary> /// Get or set for an OverlayViewProvider /// </summary> public Func<Object> OverlayViewProvider { get; set; } /// <summary> // Get or set if the image should be stored public /// </summary> public bool SaveToAlbum { get; set; } /// <summary> /// Gets or sets the size of the photo. /// </summary> /// <value>The size of the photo.</value> public PhotoSize PhotoSize { get; set; } = PhotoSize.Full; int customPhotoSize = 100; /// <summary> /// The custom photo size to use, 100 full size (same as Full), /// and 1 being smallest size at 1% of original /// Default is 100 /// </summary> public int CustomPhotoSize { get { return customPhotoSize; } set { if (value > 100) customPhotoSize = 100; else if (value < 1) customPhotoSize = 1; else customPhotoSize = value; } } int quality = 100; /// <summary> /// The compression quality to use, 0 is the maximum compression (worse quality), /// and 100 minimum compression (best quality) /// Default is 100 /// </summary> public int CompressionQuality { get { return quality; } set { if (value > 100) quality = 100; else if (value < 0) quality = 0; else quality = value; } } /// <summary> /// Store provided location /// </summary> public Location Location { get; set; } bool rotateImage = true; /// <summary> /// Should the library rotate image according to received exif orientation. /// Set to true by default. /// </summary> public bool RotateImage { get { return rotateImage; } set { rotateImage = value; } } bool saveMetaData = true; /// <summary> /// Saves metadate/exif data from the original file. /// </summary> public bool SaveMetaData { get { return saveMetaData; } set { saveMetaData = value; } } /// <summary> /// Specifies the media picker's modal presentation style. /// Only applies to iOS. /// Defaults to FullScreen, which is the equivalent of using UIKit.UIModalPresentationStyle.FullScreen. /// </summary> public MediaPickerModalPresentationStyle ModalPresentationStyle { get; set; } = MediaPickerModalPresentationStyle.FullScreen; } /// <summary> /// Photo size enum. /// </summary> public enum PhotoSize { /// <summary> /// 25% of original /// </summary> Small, /// <summary> /// 50% of the original /// </summary> Medium, /// <summary> /// 75% of the original /// </summary> Large, /// <summary> /// Untouched /// </summary> Full, /// <summary> /// Custom size between 1-100 /// Must set the CustomPhotoSize value /// Only applies to iOS and Android /// Windows will auto configure back to small, medium, large, and full /// </summary> Custom, /// <summary> /// Use the Max Width or Height photo size. /// The property ManualSize must be set to a value. The MaxWidthHeight will be the max width or height of the image /// Currently this works on iOS and Android only. /// On Windows the PhotoSize will fall back to Full /// </summary> MaxWidthHeight } public enum MultiPickerBarStyle { Default = 0, Black = 1, BlackOpaque = 1, BlackTranslucent = 2 } /// <summary> /// UI options for iOS multi image picker /// </summary> public class MultiPickerOptions { // TODO: This only affects iOS since Android uses native public int MaximumImagesCount { get; set; } = 10; public MultiPickerBarStyle BarStyle { get; set; } = MultiPickerBarStyle.Default; public string PathToOverlay { get; set; } public string AlbumSelectTitle { get; set; } public string PhotoSelectTitle { get; set; } public string BackButtonTitle { get; set; } public string DoneButtonTitle { get; set; } public string LoadingTitle { get; set; } } /// <summary> /// Video quality /// </summary> public enum VideoQuality { /// <summary> /// Low /// </summary> Low = 0, /// <summary> /// Medium /// </summary> Medium = 1, /// <summary> /// High /// </summary> High = 2, } /// <summary> /// Store Video options /// </summary> public class StoreVideoOptions : StoreCameraMediaOptions { /// <summary> /// Constructor /// </summary> public StoreVideoOptions() { Quality = VideoQuality.High; DesiredLength = TimeSpan.FromMinutes(10); } /// <summary> /// Desired Length /// </summary> public TimeSpan DesiredLength { get; set; } /// <summary> /// Desired Quality /// </summary> public VideoQuality Quality { get; set; } /// <summary> /// Desired Video Size /// Only available on Android - Set the desired file size in bytes. /// Eg. 1000000 = 1MB /// </summary> public long DesiredSize { get; set; } } }
27.17096
130
0.529564
[ "MIT" ]
AsimKhan2019/Media-Plugin
src/Media.Plugin/Shared/MediaStoreOptions.cs
11,604
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 pinpoint-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.Pinpoint.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.Pinpoint.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateApp operation /// </summary> public class CreateAppResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAppResponse response = new CreateAppResponse(); var unmarshaller = ApplicationResponseUnmarshaller.Instance; response.ApplicationResponse = unmarshaller.Unmarshall(context); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException")) { return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException")) { return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InternalServerErrorException")) { return InternalServerErrorExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("MethodNotAllowedException")) { return MethodNotAllowedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException")) { return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("PayloadTooLargeException")) { return PayloadTooLargeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException")) { return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonPinpointException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAppResponseUnmarshaller _instance = new CreateAppResponseUnmarshaller(); internal static CreateAppResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppResponseUnmarshaller Instance { get { return _instance; } } } }
41.464
191
0.648466
[ "Apache-2.0" ]
ChristopherButtars/aws-sdk-net
sdk/src/Services/Pinpoint/Generated/Model/Internal/MarshallTransformations/CreateAppResponseUnmarshaller.cs
5,183
C#
 using UnityEngine; namespace TensorFlowLite { public class SSD : BaseImagePredictor<sbyte> { public struct Result { public int classID; public float score; public Rect rect; } // https://www.tensorflow.org/lite/models/object_detection/overview float[,] outputs0 = new float[10, 4]; // [top, left, bottom, right] * 10 float[] outputs1 = new float[10]; // Classes float[] outputs2 = new float[10]; // Scores Result[] results = new Result[10]; public SSD(string modelPath) : base(modelPath, true) { } public override void Invoke(Texture inputTex) { ToTensor(inputTex, input0); // ToTensor(inputTex, ref input); interpreter.SetInputTensorData(0, input0); interpreter.Invoke(); interpreter.GetOutputTensorData(0, outputs0); interpreter.GetOutputTensorData(1, outputs1); interpreter.GetOutputTensorData(2, outputs2); } public Result[] GetResults() { for (int i = 0; i < 10; i++) { // Invert Y to adapt Unity UI space float top = 1f - outputs0[i, 0]; float left = outputs0[i, 1]; float bottom = 1f - outputs0[i, 2]; float right = outputs0[i, 3]; results[i] = new Result() { classID = (int)outputs1[i], score = outputs2[i], rect = new Rect(left, top, right - left, top - bottom), }; } return results; } } }
28.566667
80
0.501167
[ "MIT" ]
shibuiwilliam/AR-AI
AR-AI/Assets/SSD.cs
1,716
C#
using Android.App; using Android.Content; using Android.Graphics.Drawables; using Android.OS; using Android.Util; using Android.Views; using System.ComponentModel; using Xamarin.Forms; using Xamarin.Forms.Platform.Android; using XF.Material.Droid.Renderers; using XF.Material.Forms.UI; using static Android.Views.View; [assembly: ExportRenderer(typeof(MaterialCard), typeof(MaterialCardRenderer))] namespace XF.Material.Droid.Renderers { public class MaterialCardRenderer : Xamarin.Forms.Platform.Android.AppCompat.FrameRenderer, IOnTouchListener { private MaterialCard _materialCard; public MaterialCardRenderer(Context context) : base(context) { } public bool OnTouch(Android.Views.View v, MotionEvent e) { if (this._materialCard.GestureRecognizers.Count > 0 && this.Control.Foreground != null) { if (e.Action == MotionEventActions.Down) { this.Control.Foreground.SetHotspot(e.GetX(), e.GetY()); this.Control.Pressed = true; } else if (e.Action == MotionEventActions.Up || e.Action == MotionEventActions.Cancel || e.Action == MotionEventActions.Outside) { this.Control.Pressed = false; } } return false; } protected override void OnElementChanged(ElementChangedEventArgs<Frame> e) { base.OnElementChanged(e); if (e?.NewElement != null) { _materialCard = this.Element as MaterialCard; this.UpdateStrokeColor(); this.Control.Elevate(_materialCard.Elevation); this.SetClickable(); this.Control.SetOnTouchListener(this); } } protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); if (e?.PropertyName == nameof(MaterialCard.Elevation)) { this.Control.Elevate(_materialCard.Elevation); } if (e?.PropertyName == nameof(MaterialCard.IsClickable)) { this.SetClickable(); } if (e?.PropertyName == nameof(Frame.BackgroundColor)) { this.UpdateStrokeColor(); } } protected void SetClickable() { bool clickable = _materialCard.IsClickable; if (clickable && this.Control.Foreground == null) { TypedValue outValue = new TypedValue(); this.Context.Theme.ResolveAttribute( Resource.Attribute.selectableItemBackground, outValue, true); this.Control.Foreground = this.Context.GetDrawable(outValue.ResourceId); } this.Control.Focusable = clickable; this.Control.Clickable = clickable; } private void UpdateStrokeColor() { var drawable = (GradientDrawable)this.Control.Background; drawable.SetStroke(0, _materialCard.BackgroundColor.ToAndroid()); } } }
32.633663
112
0.581007
[ "MIT" ]
rotsen24154/XF-Material-Library-PEMEX
XF.Material/XF.Material.Droid/Renderers/MaterialCardRenderer.cs
3,298
C#
namespace ClassLib120 { public class Class001 { public static string Property => "ClassLib120" + " " + ClassLib021.Class001.Property + " " + ClassLib049.Class001.Property + " " + ClassLib085.Class001.Property + " " + ClassLib003.Class001.Property + " " + ClassLib051.Class001.Property + " " + ClassLib063.Class001.Property + " " + ClassLib052.Class001.Property + " " + ClassLib027.Class001.Property + " " + ClassLib015.Class001.Property; } }
57.75
397
0.690476
[ "MIT" ]
333fred/performance
src/scenarios/weblarge2.0/src/ClassLib120/Class001.cs
462
C#
/* * Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) * See https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers * for more information concerning the license and the contributors participating to this project. */ namespace AspNet.Security.OAuth.AdobeIO; public class AdobeIOTests : OAuthTests<AdobeIOAuthenticationOptions> { public AdobeIOTests(ITestOutputHelper outputHelper) { OutputHelper = outputHelper; } public override string DefaultScheme => AdobeIOAuthenticationDefaults.AuthenticationScheme; protected internal override void RegisterAuthentication(AuthenticationBuilder builder) { builder.AddAdobeIO(options => { ConfigureDefaults(builder, options); }); } [Theory] [InlineData(ClaimTypes.NameIdentifier, "B0DC108C5CD449CA0A494133@c62f24cc5b5b7e0e0a494004")] [InlineData(ClaimTypes.Name, "John Sample")] [InlineData(ClaimTypes.Email, "jsample@email.com")] [InlineData(ClaimTypes.GivenName, "John")] [InlineData(ClaimTypes.Surname, "Sample")] [InlineData(ClaimTypes.Country, "US")] [InlineData("urn:adobeio:account_type", "ent")] [InlineData("urn:adobeio:email_verified", "True")] public async Task Can_Sign_In_Using_AdobeIO(string claimType, string claimValue) { // Arrange using var server = CreateTestServer(); // Act var claims = await AuthenticateUserAsync(server); // Assert AssertClaim(claims, claimType, claimValue); } }
33.489362
98
0.710292
[ "Apache-2.0" ]
AnthonyYates/AspNet.Security.OAuth.Providers
test/AspNet.Security.OAuth.Providers.Tests/AdobeIO/AdobeIOTests.cs
1,576
C#
using System; using System.Globalization; using System.Windows; using System.Windows.Data; namespace Bootstrapper.UI.MVVM.Converters { public class BooleanToVisibilityConverter : IValueConverter { public bool HiddenInsteadOfCollapsed { get; set; } public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { Visibility result = Visibility.Visible; if (value is bool b) { result = b ? Visibility.Visible : HiddenInsteadOfCollapsed ? Visibility.Hidden : Visibility.Collapsed; } return result; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { bool result = false; if (value is Visibility v) { result = v == Visibility.Visible; } return result; } } }
26.638889
118
0.601668
[ "MIT" ]
middas/WixCustomUI
Bootstrapper.UI/MVVM/Converters/BooleanToVisibilityConverter.cs
961
C#
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace CssUnitTest.TestData.CSS.Input.Replacements { 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 ValueReplacement { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal ValueReplacement() { } /// <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("CssUnitTest.TestData.CSS.Input.Replacements.ValueReplacement", typeof(ValueReplacement).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 string similar to #f90. /// </summary> internal static string BackgroundColor1 { get { return ResourceManager.GetString("BackgroundColor1", resourceCulture); } } /// <summary> /// Looks up a localized string similar to #ffc. /// </summary> internal static string BackgroundColor2 { get { return ResourceManager.GetString("BackgroundColor2", resourceCulture); } } /// <summary> /// Looks up a localized string similar to white. /// </summary> internal static string TextColor1 { get { return ResourceManager.GetString("TextColor1", resourceCulture); } } } }
40.835165
212
0.59338
[ "MPL-2.0", "MPL-2.0-no-copyleft-exception" ]
KavWick/thebuggenie-prod
vendor/tubalmartin/cssmin/tests/microsoft-ajaxmin/Input/Replacements/ValueReplacement.Designer.cs
3,718
C#
// TypeParameterNode.cs // Script#/Core/ScriptSharp // This source code is subject to terms and conditions of the Apache License, Version 2.0. // using System; using System.Collections; using System.Diagnostics; namespace ScriptSharp.CodeModel { // NOTE: Ignored in conversion internal sealed class TypeParameterNode : ParseNode { private ParseNodeList _attributes; private AtomicNameNode _name; public TypeParameterNode(ParseNodeList attributes, AtomicNameNode name) : base(ParseNodeType.TypeParameter, name.token) { _attributes = attributes; _name = name; } } }
25.96
90
0.696456
[ "Apache-2.0" ]
mobilligy/scriptsharp
src/Core/Compiler/CodeModel/Types/TypeParameterNode.cs
649
C#
using System; namespace Vita.Entities.Services { public interface IServiceContainer : IServiceProvider { void RegisterService<T>(T service) where T: class; } /// <summary>An optional interface to initialize/shutdown a non-module service added to Services collection of EntityApp. /// Module-based services - when an EntityModule implements a service - are initialized through overridable Init method. /// </summary> public interface IEntityServiceBase { /// <summary>Notifies that entity app is inititalizing. </summary> /// <param name="app">Entity app.</param> /// <remarks>This method is invoked very early in application initialization. All services must be registered at this point. /// The service can use this method to link to other services. /// </remarks> void Init(EntityApp app); void Shutdown(); } }
34.84
129
0.717566
[ "MIT" ]
rivantsov/vita
src/1.Framework/Vita/1.AppModel/Services/_ServiceInterfaces.cs
873
C#
using EngineeringUnits.Units; using System.Collections.Generic; using System.Diagnostics; using System.Text; namespace EngineeringUnits.Units { public class MassMomentOfInertiaUnit : Enumeration { public static readonly MassMomentOfInertiaUnit SI = new(MassUnit.SI, AreaUnit.SI); public static readonly MassMomentOfInertiaUnit KilogramSquareMeter = new(MassUnit.Kilogram, AreaUnit.SquareMeter); public static readonly MassMomentOfInertiaUnit GramSquareCentimeter = new(MassUnit.Gram, AreaUnit.SquareCentimeter); public static readonly MassMomentOfInertiaUnit GramSquareDecimeter = new(MassUnit.Gram, AreaUnit.SquareDecimeter); public static readonly MassMomentOfInertiaUnit GramSquareMeter = new(MassUnit.Gram, AreaUnit.SquareMeter); public static readonly MassMomentOfInertiaUnit GramSquareMillimeter = new(MassUnit.Gram, AreaUnit.SquareMillimeter); public static readonly MassMomentOfInertiaUnit KilogramSquareCentimeter = new(MassUnit.Kilogram, AreaUnit.SquareCentimeter); public static readonly MassMomentOfInertiaUnit KilogramSquareDecimeter = new(MassUnit.Kilogram, AreaUnit.SquareDecimeter); public static readonly MassMomentOfInertiaUnit KilogramSquareMillimeter = new(MassUnit.Kilogram, AreaUnit.SquareMillimeter); public static readonly MassMomentOfInertiaUnit KilotonneSquareCentimeter = new(MassUnit.Kilotonne, AreaUnit.SquareCentimeter); public static readonly MassMomentOfInertiaUnit KilotonneSquareDecimeter = new(MassUnit.Kilotonne, AreaUnit.SquareDecimeter); public static readonly MassMomentOfInertiaUnit KilotonneSquareMeter = new(MassUnit.Kilotonne, AreaUnit.SquareMeter); public static readonly MassMomentOfInertiaUnit KilotonneSquareMilimeter = new(MassUnit.Kilotonne, AreaUnit.SquareMillimeter); public static readonly MassMomentOfInertiaUnit MegatonneSquareCentimeter = new(MassUnit.Megatonne, AreaUnit.SquareCentimeter); public static readonly MassMomentOfInertiaUnit MegatonneSquareDecimeter = new(MassUnit.Megatonne, AreaUnit.SquareDecimeter); public static readonly MassMomentOfInertiaUnit MegatonneSquareMeter = new(MassUnit.Megatonne, AreaUnit.SquareMeter); public static readonly MassMomentOfInertiaUnit MegatonneSquareMilimeter = new(MassUnit.Megatonne, AreaUnit.SquareMillimeter); public static readonly MassMomentOfInertiaUnit MilligramSquareCentimeter = new(MassUnit.Milligram, AreaUnit.SquareCentimeter); public static readonly MassMomentOfInertiaUnit MilligramSquareDecimeter = new(MassUnit.Milligram, AreaUnit.SquareDecimeter); public static readonly MassMomentOfInertiaUnit MilligramSquareMeter = new(MassUnit.Milligram, AreaUnit.SquareMeter); public static readonly MassMomentOfInertiaUnit MilligramSquareMillimeter = new(MassUnit.Milligram, AreaUnit.SquareMillimeter); public static readonly MassMomentOfInertiaUnit PoundSquareFoot = new(MassUnit.Pound, AreaUnit.SquareFoot); public static readonly MassMomentOfInertiaUnit PoundSquareInch = new(MassUnit.Pound, AreaUnit.SquareInch); public static readonly MassMomentOfInertiaUnit SlugSquareFoot = new(MassUnit.Slug, AreaUnit.SquareFoot); public static readonly MassMomentOfInertiaUnit SlugSquareInch = new(MassUnit.Slug, AreaUnit.SquareInch); public static readonly MassMomentOfInertiaUnit TonneSquareCentimeter = new(MassUnit.Tonne, AreaUnit.SquareCentimeter); public static readonly MassMomentOfInertiaUnit TonneSquareDecimeter = new(MassUnit.Tonne, AreaUnit.SquareDecimeter); public static readonly MassMomentOfInertiaUnit TonneSquareMeter = new(MassUnit.Tonne, AreaUnit.SquareMeter); public static readonly MassMomentOfInertiaUnit TonneSquareMilimeter = new(MassUnit.Tonne, AreaUnit.SquareMillimeter); public MassMomentOfInertiaUnit(MassUnit mass, AreaUnit area, string NewSymbol = "Empty", decimal correction = 1) { Unit = mass * area; SetCombined(correction); SetNewSymbol(NewSymbol); } } }
61.58209
134
0.794232
[ "MIT" ]
MadsKirkFoged/EngineeringUnits
EngineeringUnits/CombinedUnits/MassMomentOfInertia/MassMomentOfInertiaEnum.cs
4,128
C#
namespace MyServer.ViewComponents.ImageGallery.Components.ImageList.Controllers { using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Localization; using MyServer.Common; using MyServer.Services.ImageGallery; using MyServer.Services.Mappings; using MyServer.ViewComponents.ImageGallery.Components.ImageList.Models; using MyServer.ViewComponents.ImageGallery.Resources; using MyServer.ViewComponents.ImageGallery._Common.Models; public class ImageListViewComponent : ViewComponent { private readonly IAlbumService albumService; private readonly IImageService imageService; private readonly IStringLocalizer<ViewComponentResources> localizer; public ImageListViewComponent( IAlbumService albumService, IImageService imageService, IStringLocalizer<ViewComponentResources> localizer) { this.albumService = albumService; this.imageService = imageService; this.localizer = localizer; MappingFunctions.LoadResource(this.localizer); } public IViewComponentResult Invoke(ImageListType type, string caption, object data) { this.ViewBag.Caption = caption; List<ImageListViewModel> images = null; if (type == ImageListType.Album) { var id = data.ToString(); images = this.imageService.GetAllFromAlbumAsync(id).GetAwaiter().GetResult().To<ImageListViewModel>() .OrderBy(x => x.DateTaken).ToList(); } else if (type == ImageListType.Date) { var date = (data as DateTime?).Value.Date; images = this.imageService.GetAllAsync().GetAwaiter().GetResult() .Where(x => x.DateTaken != null && x.DateTaken.Value.Date == date).To<ImageListViewModel>() .OrderByDescending(x => x.DateTaken).ToList(); } else if (type == ImageListType.Location) { //var location = data as string; //images = this.imageService.GetAllReqursive() // .Where(x => x.ImageGpsData != null && x.ImageGpsData.LocationName == location) // .To<ImageListViewModel>().OrderByDescending(x => x.DateTaken).ToList(); } return this.View(images); } } }
37.042857
117
0.615889
[ "MIT" ]
atanas-georgiev/MyServerAzure
src/AppServices/MyServer/Components/MyServer.ViewComponents.ImageGallery/Components/ImageList/Controllers/ImageListViewComponent.cs
2,595
C#
using PasswordHelper.Characters; namespace PasswordHelper.Tests.TestObjects { public class TheCharacterN : RandomCharacters { public TheCharacterN() : base("N") { } } }
19.1
49
0.691099
[ "MIT" ]
ZavixDragon/PasswordHelper
PasswordHelper/PasswordHelper/Tests/TestObjects/TheCharcterN.cs
193
C#
namespace Nest { public interface ICreateAutoFollowPatternResponse : IAcknowledgedResponse { } public class CreateAutoFollowPatternResponse : AcknowledgedResponseBase, ICreateAutoFollowPatternResponse { } }
30.142857
110
0.848341
[ "Apache-2.0" ]
Henr1k80/elasticsearch-net
src/Nest/XPack/CrossClusterReplication/AutoFollow/CreateAutoFollowPattern/CreateAutoFollowPatternResponse.cs
213
C#
using System; using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; using Serilog; namespace Mamesaver.Configuration { /// <summary> /// Provides persistence and retrieval of settings to disk as XML files inside /// <see cref="Environment.SpecialFolder.LocalApplicationData"/>. Each implementation /// of this store is responsible for managing a single setting file type. /// </summary> /// <remarks> /// For convenience, the store manages a lazily-loaded instance of its settings. /// </remarks> /// <typeparam name="T">Settings model type</typeparam> public abstract class SettingsStore<T> where T : class, new() { /// <summary> /// Setting file name. /// </summary> public abstract string Filename { get; } private Lazy<T> _settings; private readonly XmlSerializer _serializer = new XmlSerializer(typeof(T)); protected SettingsStore() => Reload(); /// <summary> /// Returns settings, loading from disk if not in memory. /// </summary> /// <para name="forceReload">if settings should always be reloaded from disk</para> public T Get(bool forceReload = false) { if (forceReload) Reload(); return _settings.Value; } /// <summary> /// Serializes externally-managed settings to disk. /// </summary> public void Save(T settings) { var settingsFile = GetSettingsFile(); using (var stream = new FileStream(settingsFile, FileMode.Create)) using (var writer = new XmlTextWriter(stream, Encoding.UTF8) { Formatting = Formatting.Indented }) { _serializer.Serialize(writer, settings); } Log.Information("{store} settings saved", GetType().Name); } /// <summary> /// Serializes store-managed settings to disk. /// </summary> public void Save() => Save(_settings.Value); /// <summary> /// Reads settings from disk. If no settings are available or if the file cannot be read, /// a new instance of <see cref="T"/> is returned. /// </summary> private T Load() { var settingsFile = GetSettingsFile(); if (!File.Exists(settingsFile)) return new T(); using (var stream = new FileStream(settingsFile, FileMode.Open)) using (var reader = new XmlTextReader(stream)) { try { return _serializer.Deserialize(reader) as T; } catch (Exception e) { Log.Error(e, "Unable to read settings file {filename}", Filename); return new T(); } } } /// <summary> /// Returns an absolute path to the settings file managed by the store. /// </summary> public string GetSettingsFile() { var applicationFolder = GetApplicationFolder(); return Path.Combine(applicationFolder, Filename); } /// <summary> /// Returns and optionally creates folder for Mamesaver inside /// <see cref="Environment.SpecialFolder.LocalApplicationData"/> where all settings files are stored. /// </summary> private static string GetApplicationFolder() { var applicationData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var applicationFolder = Path.Combine(applicationData, "Mamesaver"); if (!Directory.Exists(applicationFolder)) Directory.CreateDirectory(applicationFolder); return applicationFolder; } /// <summary> /// Reloads settings from disk. /// </summary> private void Reload() => _settings = new Lazy<T>(Load); } }
35.743363
113
0.572914
[ "MIT" ]
chrisrpatterson/mamesaver
Mamesaver/Configuration/SettingsStore.cs
4,041
C#
using UnityEngine; using System.Collections; public class RespawnPoint : MonoBehaviour { public GameObject platform; private GameObject newPlatform; public void WakeUp() { StopAllCoroutines(); if (newPlatform != null) Destroy(newPlatform); StartCoroutine(Co_RespawnPlatform()); } private IEnumerator Co_RespawnPlatform() { newPlatform = GameObject.Instantiate(platform, new Vector2(transform.position.x, transform.position.y), Quaternion.identity) as GameObject; SpriteRenderer sr = newPlatform.GetComponent<SpriteRenderer>(); Color initialColor = sr.color; Color endColor = new Color(initialColor.r, initialColor.g, initialColor.b, 0); for (int i = 0; i < 20; i++) { sr.color = Color.Lerp(initialColor, endColor, i * 0.05f); yield return new WaitForSeconds(0.05f); } Destroy(newPlatform); } }
29
147
0.646813
[ "Apache-2.0" ]
Bodzounet/StepUp
Assets/Scripts/Referee/RespawnPoint.cs
959
C#
// <copyright file="Factorial.cs" company="Math.NET"> // Math.NET Numerics, part of the Math.NET Project // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics // http://mathnetnumerics.codeplex.com // Copyright (c) 2009-2010 Math.NET // 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> using System; using MathNet.Numerics; namespace Examples.SpecialFunctionsExamples { /// <summary> /// Special Functions: Factorial /// </summary> /// <seealso cref="http://reference.wolfram.com/mathematica/ref/Factorial.html"/> /// <seealso cref="http://reference.wolfram.com/mathematica/ref/Binomial.html"/> /// <seealso cref="http://reference.wolfram.com/mathematica/ref/Multinomial.html"/> public class Factorial : IExample { /// <summary> /// Gets the name of this example /// </summary> public string Name { get { return "Special Functions: Factorial"; } } /// <summary> /// Gets the description of this example /// </summary> public string Description { get { return "Factorial, Binomial, Multinomial"; } } /// <summary> /// Run example /// </summary> /// <seealso cref="http://en.wikipedia.org/wiki/Factorial">Factorial</seealso> /// <seealso cref="http://en.wikipedia.org/wiki/Binomial_coefficient">Binomial coefficient</seealso> /// <seealso cref="http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients">Multinomial coefficients</seealso> public void Run() { // 1. Compute the factorial of 5 Console.WriteLine(@"1. Compute the factorial of 5"); Console.WriteLine(SpecialFunctions.Factorial(5).ToString("N")); Console.WriteLine(); // 2. Compute the logarithm of the factorial of 5 Console.WriteLine(@"2. Compute the logarithm of the factorial of 5"); Console.WriteLine(SpecialFunctions.FactorialLn(5).ToString("N")); Console.WriteLine(); // 3. Compute the binomial coefficient: 10 choose 8 Console.WriteLine(@"3. Compute the binomial coefficient: 10 choose 8"); Console.WriteLine(SpecialFunctions.Binomial(10, 8).ToString("N")); Console.WriteLine(); // 4. Compute the logarithm of the binomial coefficient: 10 choose 8 Console.WriteLine(@"4. Compute the logarithm of the binomial coefficient: 10 choose 8"); Console.WriteLine(SpecialFunctions.BinomialLn(10, 8).ToString("N")); Console.WriteLine(); // 5. Compute the multinomial coefficient: 10 choose 2, 3, 5 Console.WriteLine(@"5. Compute the multinomial coefficient: 10 choose 2, 3, 5"); Console.WriteLine(SpecialFunctions.Multinomial(10, new[] { 2, 3, 5 }).ToString("N")); Console.WriteLine(); } } }
42.154639
136
0.646613
[ "MIT" ]
ABarnabyC/mathnet-numerics
examples/examples-csharp/SpecialFunctions/Factorial.cs
4,091
C#
namespace _05.Football_Team_Generator.Commands { using System; using System.Collections.Generic; using System.Linq; using _05.Football_Team_Generator.Contracts.Core; using _05.Football_Team_Generator.Contracts.Entities; using _05.Football_Team_Generator.Entities; using _05.Football_Team_Generator.Exceptions; using _05.Football_Team_Generator.Utilities; public class Add : Command { public Add(IFootballTeamCollection footballTeamCollection, string[] commandTokens) : base(footballTeamCollection, commandTokens) { } public override string Execute() { string toReturn = default(string); try { IFootballTeam team = this.FootballTeamCollection.Teams.FirstOrDefault(n => n.Name == this.CommandTokens[0]); if (team == null) { throw new MissingTeamException(this.CommandTokens[0]); } string playerName = this.CommandTokens[1]; // Create all stats IList<IStats> stats = new List<IStats>(); for (int i = 2, j = 0; i < this.CommandTokens.Length; i++, j++) { IStats stat = new Stats(Constants.Stats[j], int.Parse(this.CommandTokens[i])); stats.Add(stat); } // Create player IPlayer player = new Player(playerName, stats); // Add to team team.Players.Add(player); } catch (Exception e) { toReturn = e.Message; } return toReturn; } } }
30.767857
136
0.550784
[ "MIT" ]
HristoSpasov/Databases-Advanced-Entity-Framework-Core
03. Inheritance and Generics/Exercises/05.Football Team Generator/Commands/Add.cs
1,725
C#
using System.Windows.Forms; namespace ExtractionViewer { partial class GridPanel { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.SuspendLayout(); // // GridPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Name = "GridPanel"; this.Size = new System.Drawing.Size(783, 337); this.ResumeLayout(false); this.dataGridView1 = new System.Windows.Forms.DataGridView(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToDeleteRows = false; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; var headerstyle = new DataGridViewCellStyle(); headerstyle.Alignment = DataGridViewContentAlignment.BottomCenter; this.dataGridView1.ColumnHeadersDefaultCellStyle = headerstyle; this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.ReadOnly = true; this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.TabIndex = 0; this.Controls.Add(this.dataGridView1); } #endregion private System.Windows.Forms.DataGridView dataGridView1; } }
36.892308
131
0.612594
[ "Apache-2.0" ]
RockNHawk/Toxy.NetCore
Toxy.Tools/ExtractionViewer/GridPanel.Designer.cs
2,400
C#
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="PhotonNetwork.cs" company="Exit Games GmbH"> // Part of: Photon Unity Networking // </copyright> // -------------------------------------------------------------------------------------------------------------------- using System.Diagnostics; using UnityEngine; using System; using System.Collections.Generic; using ExitGames.Client.Photon; using UnityEngine.SceneManagement; using Debug = UnityEngine.Debug; using Hashtable = ExitGames.Client.Photon.Hashtable; #if UNITY_EDITOR using UnityEditor; using System.IO; #endif /// <summary> /// The main class to use the PhotonNetwork plugin. /// This class is static. /// </summary> /// \ingroup publicApi public static class PhotonNetwork { /// <summary>Version number of PUN. Also used in GameVersion to separate client version from each other.</summary> public const string versionPUN = "1.90"; /// <summary>Version string for your this build. Can be used to separate incompatible clients. Sent during connect.</summary> /// <remarks>This is only sent when you connect so that is also the place you set it usually (e.g. in ConnectUsingSettings).</remarks> public static string gameVersion { get; set; } /// <summary> /// This Monobehaviour allows Photon to run an Update loop. /// </summary> internal static readonly PhotonHandler photonMono; /// <summary> /// Photon peer class that implements LoadBalancing in PUN. /// Primary use is internal (by PUN itself). /// </summary> internal static NetworkingPeer networkingPeer; /// <summary> /// The maximum number of assigned PhotonViews <i>per player</i> (or scene). See the [General Documentation](@ref general) topic "Limitations" on how to raise this limitation. /// </summary> public static readonly int MAX_VIEW_IDS = 1000; // VIEW & PLAYER LIMIT CAN BE EASILY CHANGED, SEE DOCS /// <summary>Name of the PhotonServerSettings file (used to load and by PhotonEditor to save new files).</summary> internal const string serverSettingsAssetFile = "PhotonServerSettings"; /// <summary>Serialized server settings, written by the Setup Wizard for use in ConnectUsingSettings.</summary> public static ServerSettings PhotonServerSettings = (ServerSettings)Resources.Load(PhotonNetwork.serverSettingsAssetFile, typeof(ServerSettings)); /// <summary>Currently used server address (no matter if master or game server).</summary> public static string ServerAddress { get { return (networkingPeer != null) ? networkingPeer.ServerAddress : "<not connected>"; } } /// <summary>Currently used Cloud Region (if any). As long as the client is not on a Master Server or Game Server, the region is not yet defined.</summary> public static CloudRegionCode CloudRegion { get { return (networkingPeer != null && connected && Server!=ServerConnection.NameServer) ? networkingPeer.CloudRegion : CloudRegionCode.none; } } /// <summary> /// False until you connected to Photon initially. True in offline mode, while connected to any server and even while switching servers. /// </summary> public static bool connected { get { if (offlineMode) { return true; } if (networkingPeer == null) { return false; } return !networkingPeer.IsInitialConnect && networkingPeer.State != ClientState.PeerCreated && networkingPeer.State != ClientState.Disconnected && networkingPeer.State != ClientState.Disconnecting && networkingPeer.State != ClientState.ConnectingToNameServer; } } /// <summary> /// True when you called ConnectUsingSettings (or similar) until the low level connection to Photon gets established. /// </summary> public static bool connecting { get { return networkingPeer.IsInitialConnect && !offlineMode; } } /// <summary> /// A refined version of connected which is true only if your connection to the server is ready to accept operations like join, leave, etc. /// </summary> public static bool connectedAndReady { get { // connected property will check offlineMode and networkingPeer being null if (!connected) { return false; } if (offlineMode) { return true; } switch (connectionStateDetailed) { case ClientState.PeerCreated: case ClientState.Disconnected: case ClientState.Disconnecting: case ClientState.Authenticating: case ClientState.ConnectingToGameserver: case ClientState.ConnectingToMasterserver: case ClientState.ConnectingToNameServer: case ClientState.Joining: return false; // we are not ready to execute any operations } return true; } } /// <summary> /// Simplified connection state /// </summary> public static ConnectionState connectionState { get { if (offlineMode) { return ConnectionState.Connected; } if (networkingPeer == null) { return ConnectionState.Disconnected; } switch (networkingPeer.PeerState) { case PeerStateValue.Disconnected: return ConnectionState.Disconnected; case PeerStateValue.Connecting: return ConnectionState.Connecting; case PeerStateValue.Connected: return ConnectionState.Connected; case PeerStateValue.Disconnecting: return ConnectionState.Disconnecting; case PeerStateValue.InitializingApplication: return ConnectionState.InitializingApplication; } return ConnectionState.Disconnected; } } /// <summary> /// Detailed connection state (ignorant of PUN, so it can be "disconnected" while switching servers). /// </summary> /// <remarks> /// In OfflineMode, this is ClientState.Joined (after create/join) or it is ConnectedToMaster in all other cases. /// </remarks> public static ClientState connectionStateDetailed { get { if (offlineMode) { return (offlineModeRoom != null) ? ClientState.Joined : ClientState.ConnectedToMaster; } if (networkingPeer == null) { return ClientState.Disconnected; } return networkingPeer.State; } } /// <summary>The server (type) this client is currently connected or connecting to.</summary> /// <remarks>Photon uses 3 different roles of servers: Name Server, Master Server and Game Server.</remarks> public static ServerConnection Server { get { return (PhotonNetwork.networkingPeer != null) ? PhotonNetwork.networkingPeer.Server : ServerConnection.NameServer; } } /// <summary> /// A user's authentication values used during connect. /// </summary> /// <remarks> /// Set these before calling Connect if you want custom authentication. /// These values set the userId, if and how that userId gets verified (server-side), etc.. /// /// If authentication fails for any values, PUN will call your implementation of OnCustomAuthenticationFailed(string debugMsg). /// See: PhotonNetworkingMessage.OnCustomAuthenticationFailed /// </remarks> public static AuthenticationValues AuthValues { get { return (networkingPeer != null) ? networkingPeer.AuthValues : null; } set { if (networkingPeer != null) networkingPeer.AuthValues = value; } } /// <summary> /// Get the room we're currently in. Null if we aren't in any room. /// </summary> public static Room room { get { if (isOfflineMode) { return offlineModeRoom; } return networkingPeer.CurrentRoom; } } /// <summary>If true, Instantiate methods will check if you are in a room and fail if you are not.</summary> /// <remarks> /// Instantiating anything outside of a specific room is very likely to break things. /// Turn this off only if you know what you do.</remarks> public static bool InstantiateInRoomOnly = true; /// <summary> /// Network log level. Controls how verbose PUN is. /// </summary> public static PhotonLogLevel logLevel = PhotonLogLevel.ErrorsOnly; /// <summary> /// The local PhotonPlayer. Always available and represents this player. /// CustomProperties can be set before entering a room and will be synced as well. /// </summary> public static PhotonPlayer player { get { if (networkingPeer == null) { return null; // Surpress ExitApplication errors } return networkingPeer.LocalPlayer; } } /// <summary> /// The Master Client of the current room or null (outside of rooms). /// </summary> /// <remarks> /// Can be used as "authoritative" client/player to make descisions, run AI or other. /// /// If the current Master Client leaves the room (leave/disconnect), the server will quickly assign someone else. /// If the current Master Client times out (closed app, lost connection, etc), messages sent to this client are /// effectively lost for the others! A timeout can take 10 seconds in which no Master Client is active. /// /// Implement the method IPunCallbacks.OnMasterClientSwitched to be called when the Master Client switched. /// /// Use PhotonNetwork.SetMasterClient, to switch manually to some other player / client. /// /// With offlineMode == true, this always returns the PhotonNetwork.player. /// </remarks> public static PhotonPlayer masterClient { get { if (offlineMode) { return PhotonNetwork.player; } if (networkingPeer == null) { return null; } return networkingPeer.GetPlayerWithId(networkingPeer.mMasterClientId); } } /// <summary> /// Set to synchronize the player's nickname with everyone in the room(s) you enter. This sets PhotonNetwork.player.NickName. /// </summary> /// <remarks> /// The playerName is just a nickname and does not have to be unique or backed up with some account.<br/> /// Set the value any time (e.g. before you connect) and it will be available to everyone you play with.<br/> /// Access the names of players by: PhotonPlayer.NickName. <br/> /// PhotonNetwork.otherPlayers is a list of other players - each contains the playerName the remote player set. /// </remarks> public static string playerName { get { return networkingPeer.PlayerName; } set { networkingPeer.PlayerName = value; } } /// <summary>The list of players in the current room, including the local player.</summary> /// <remarks> /// This list is only valid, while the client is in a room. /// It automatically gets updated when someone joins or leaves. /// /// This can be used to list all players in a room. /// Each player's PhotonPlayer.customProperties are accessible (set and synchronized via /// PhotonPlayer.SetCustomProperties). /// /// You can use a PhotonPlayer.TagObject to store an arbitrary object for reference. /// That is not synchronized via the network. /// </remarks> public static PhotonPlayer[] playerList { get { if (networkingPeer == null) return new PhotonPlayer[0]; return networkingPeer.mPlayerListCopy; } } /// <summary>The list of players in the current room, excluding the local player.</summary> /// <remarks> /// This list is only valid, while the client is in a room. /// It automatically gets updated when someone joins or leaves. /// /// This can be used to list all other players in a room. /// Each player's PhotonPlayer.customProperties are accessible (set and synchronized via /// PhotonPlayer.SetCustomProperties). /// /// You can use a PhotonPlayer.TagObject to store an arbitrary object for reference. /// That is not synchronized via the network. /// </remarks> public static PhotonPlayer[] otherPlayers { get { if (networkingPeer == null) return new PhotonPlayer[0]; return networkingPeer.mOtherPlayerListCopy; } } /// <summary> /// Read-only list of friends, their online status and the room they are in. Null until initialized by a FindFriends call. /// </summary> /// <remarks> /// Do not modify this list! /// It is internally handled by FindFriends and only available to read the values. /// The value of FriendListAge tells you how old the data is in milliseconds. /// /// Don't get this list more often than useful (> 10 seconds). In best case, keep the list you fetch really short. /// You could (e.g.) get the full list only once, then request a few updates only for friends who are online. /// After a while (e.g. 1 minute), you can get the full list again (to update online states). /// </remarks> public static List<FriendInfo> Friends { get; internal set; } /// <summary> /// Age of friend list info (in milliseconds). It's 0 until a friend list is fetched. /// </summary> public static int FriendsListAge { get { return (networkingPeer != null) ? networkingPeer.FriendListAge : 0; } } /// <summary> /// The minimum difference that a Vector2 or Vector3(e.g. a transforms rotation) needs to change before we send it via a PhotonView's OnSerialize/ObservingComponent. /// </summary> /// <remarks> /// Note that this is the sqrMagnitude. E.g. to send only after a 0.01 change on the Y-axix, we use 0.01f*0.01f=0.0001f. As a remedy against float inaccuracy we use 0.000099f instead of 0.0001f. /// </remarks> public static float precisionForVectorSynchronization = 0.000099f; /// <summary> /// The minimum angle that a rotation needs to change before we send it via a PhotonView's OnSerialize/ObservingComponent. /// </summary> public static float precisionForQuaternionSynchronization = 1.0f; /// <summary> /// The minimum difference between floats before we send it via a PhotonView's OnSerialize/ObservingComponent. /// </summary> public static float precisionForFloatSynchronization = 0.01f; /// <summary> /// While enabled, the MonoBehaviours on which we call RPCs are cached, avoiding costly GetComponents<MonoBehaviour>() calls. /// </summary> /// <remarks> /// RPCs are called on the MonoBehaviours of a target PhotonView. Those have to be found via GetComponents. /// /// When set this to true, the list of MonoBehaviours gets cached in each PhotonView. /// You can use photonView.RefreshRpcMonoBehaviourCache() to manually refresh a PhotonView's /// list of MonoBehaviours on demand (when a new MonoBehaviour gets added to a networked GameObject, e.g.). /// </remarks> public static bool UseRpcMonoBehaviourCache; /// <summary> /// While enabled (true), Instantiate uses PhotonNetwork.PrefabCache to keep game objects in memory (improving instantiation of the same prefab). /// </summary> /// <remarks> /// Setting UsePrefabCache to false during runtime will not clear PrefabCache but will ignore it right away. /// You could clean and modify the cache yourself. Read its comments. /// </remarks> public static bool UsePrefabCache = true; /// <summary> /// An Object Pool can be used to keep and reuse instantiated object instances. It replaced Unity's default Instantiate and Destroy methods. /// </summary> /// <remarks> /// To use a GameObject pool, implement IPunPrefabPool and assign it here. /// Prefabs are identified by name. /// </remarks> public static IPunPrefabPool PrefabPool { get { return networkingPeer.ObjectPool; } set { networkingPeer.ObjectPool = value; }} /// <summary> /// Keeps references to GameObjects for frequent instantiation (out of memory instead of loading the Resources). /// </summary> /// <remarks> /// You should be able to modify the cache anytime you like, except while Instantiate is used. Best do it only in the main-Thread. /// </remarks> public static Dictionary<string, GameObject> PrefabCache = new Dictionary<string, GameObject>(); /// <summary> /// If not null, this is the (exclusive) list of GameObjects that get called by PUN SendMonoMessage(). /// </summary> /// <remarks> /// For all callbacks defined in PhotonNetworkingMessage, PUN will use SendMonoMessage and /// call FindObjectsOfType() to find all scripts and GameObjects that might want a callback by PUN. /// /// PUN callbacks are not very frequent (in-game, property updates are most frequent) but /// FindObjectsOfType is time consuming and with a large number of GameObjects, performance might /// suffer. /// /// Optionally, SendMonoMessageTargets can be used to supply a list of target GameObjects. This /// skips the FindObjectsOfType() but any GameObject that needs callbacks will have to Add itself /// to this list. /// /// If null, the default behaviour is to do a SendMessage on each GameObject with a MonoBehaviour. /// </remarks> public static HashSet<GameObject> SendMonoMessageTargets; /// <summary> /// Defines which classes can contain PUN Callback implementations. /// </summary> /// <remarks> /// This provides the option to optimize your runtime for speed.<br/> /// The more specific this Type is, the fewer classes will be checked with reflection for callback methods. /// </remarks> public static Type SendMonoMessageTargetType = typeof(MonoBehaviour); /// <summary> /// Can be used to skip starting RPCs as Coroutine, which can be a performance issue. /// </summary> public static bool StartRpcsAsCoroutine = true; /// <summary> /// Offline mode can be set to re-use your multiplayer code in singleplayer game modes. /// When this is on PhotonNetwork will not create any connections and there is near to /// no overhead. Mostly usefull for reusing RPC's and PhotonNetwork.Instantiate /// </summary> public static bool offlineMode { get { return isOfflineMode; } set { if (value == isOfflineMode) { return; } if (value && connected) { Debug.LogError("Can't start OFFLINE mode while connected!"); return; } if (networkingPeer.PeerState != PeerStateValue.Disconnected) { networkingPeer.Disconnect(); // Cleanup (also calls OnLeftRoom to reset stuff) } isOfflineMode = value; if (isOfflineMode) { networkingPeer.ChangeLocalID(-1); NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnConnectedToMaster); } else { offlineModeRoom = null; networkingPeer.ChangeLocalID(-1); } } } private static bool isOfflineMode = false; private static Room offlineModeRoom = null; /// <summary>Only used in Unity Networking. In PUN, set the number of players in PhotonNetwork.CreateRoom.</summary> [Obsolete("Used for compatibility with Unity networking only.")] public static int maxConnections; /// <summary>Defines if all clients in a room should load the same level as the Master Client (if that used PhotonNetwork.LoadLevel).</summary> /// <remarks> /// To synchronize the loaded level, the Master Client should use PhotonNetwork.LoadLevel. /// All clients will load the new scene when they get the update or when they join. /// /// Internally, a Custom Room Property is set for the loaded scene. When a client reads that /// and is not in the same scene yet, it will immediately pause the Message Queue /// (PhotonNetwork.isMessageQueueRunning = false) and load. When the scene finished loading, /// PUN will automatically re-enable the Message Queue. /// </remarks> public static bool automaticallySyncScene { get { return _mAutomaticallySyncScene; } set { _mAutomaticallySyncScene = value; if (_mAutomaticallySyncScene && room != null) { networkingPeer.LoadLevelIfSynced(); } } } private static bool _mAutomaticallySyncScene = false; /// <summary> /// This setting defines per room, if network-instantiated GameObjects (with PhotonView) get cleaned up when the creator of it leaves. /// </summary> /// <remarks> /// This setting is done per room. It can't be changed in the room and it will override the settings of individual clients. /// /// If room.AutoCleanUp is enabled in a room, the PUN clients will destroy a player's GameObjects on leave. /// This includes GameObjects manually instantiated (via RPCs, e.g.). /// When enabled, the server will clean RPCs, instantiated GameObjects and PhotonViews of the leaving player, too. and /// Players who join after someone left, won't get the events of that player anymore. /// /// Under the hood, this setting is stored as a Custom Room Property. /// Enabled by default. /// </remarks> public static bool autoCleanUpPlayerObjects { get { return m_autoCleanUpPlayerObjects; } set { if (room != null) Debug.LogError("Setting autoCleanUpPlayerObjects while in a room is not supported."); else m_autoCleanUpPlayerObjects = value; } } private static bool m_autoCleanUpPlayerObjects = true; /// <summary> /// Set in PhotonServerSettings asset. Defines if the PhotonNetwork should join the "lobby" when connected to the Master server. /// </summary> /// <remarks> /// If this is false, OnConnectedToMaster() will be called when connection to the Master is available. /// OnJoinedLobby() will NOT be called if this is false. /// /// Enabled by default. /// /// The room listing will not become available. /// Rooms can be created and joined (randomly) without joining the lobby (and getting sent the room list). /// </remarks> public static bool autoJoinLobby { get { return PhotonNetwork.PhotonServerSettings.JoinLobby; } set { PhotonNetwork.PhotonServerSettings.JoinLobby = value; } } /// <summary> /// Set in PhotonServerSettings asset. Enable to get a list of active lobbies from the Master Server. /// </summary> /// <remarks> /// Lobby Statistics can be useful if a game uses multiple lobbies and you want /// to show activity of each to players. /// /// This value is stored in PhotonServerSettings. /// /// PhotonNetwork.LobbyStatistics is updated when you connect to the Master Server. /// There is also a callback PunBehaviour. /// </remarks> public static bool EnableLobbyStatistics { get { return PhotonNetwork.PhotonServerSettings.EnableLobbyStatistics; } set { PhotonNetwork.PhotonServerSettings.EnableLobbyStatistics = value; } } /// <summary> /// If turned on, the Master Server will provide information about active lobbies for this application. /// </summary> /// <remarks> /// Lobby Statistics can be useful if a game uses multiple lobbies and you want /// to show activity of each to players. Per lobby, you get: name, type, room- and player-count. /// /// PhotonNetwork.LobbyStatistics is updated when you connect to the Master Server. /// There is also a callback PunBehaviour.OnLobbyStatisticsUpdate, which you should implement /// to update your UI (e.g.). /// /// Lobby Statistics are not turned on by default. /// Enable them in the PhotonServerSettings file of the project. /// </remarks> public static List<TypedLobbyInfo> LobbyStatistics { get { return PhotonNetwork.networkingPeer.LobbyStatistics; } // only available to reset the state conveniently. done by state updates of PUN private set { PhotonNetwork.networkingPeer.LobbyStatistics = value; } } /// <summary>True while this client is in a lobby.</summary> /// <remarks> /// Implement IPunCallbacks.OnReceivedRoomListUpdate() for a notification when the list of rooms /// becomes available or updated. /// /// You are automatically leaving any lobby when you join a room! /// Lobbies only exist on the Master Server (whereas rooms are handled by Game Servers). /// </remarks> public static bool insideLobby { get { return networkingPeer.insideLobby; } } /// <summary> /// The lobby that will be used when PUN joins a lobby or creates a game. /// </summary> /// <remarks> /// The default lobby uses an empty string as name. /// PUN will enter a lobby on the Master Server if autoJoinLobby is set to true. /// So when you connect or leave a room, PUN automatically gets you into a lobby again. /// /// Check PhotonNetwork.insideLobby if the client is in a lobby. /// (@ref masterServerAndLobby) /// </remarks> public static TypedLobby lobby { get { return networkingPeer.lobby; } set { networkingPeer.lobby = value; } } /// <summary> /// Defines how many times per second PhotonNetwork should send a package. If you change /// this, do not forget to also change 'sendRateOnSerialize'. /// </summary> /// <remarks> /// Less packages are less overhead but more delay. /// Setting the sendRate to 50 will create up to 50 packages per second (which is a lot!). /// Keep your target platform in mind: mobile networks are slower and less reliable. /// </remarks> public static int sendRate { get { return 1000 / sendInterval; } set { sendInterval = 1000 / value; if (photonMono != null) { photonMono.updateInterval = sendInterval; } if (value < sendRateOnSerialize) { // sendRateOnSerialize needs to be <= sendRate sendRateOnSerialize = value; } } } /// <summary> /// Defines how many times per second OnPhotonSerialize should be called on PhotonViews. /// </summary> /// <remarks> /// Choose this value in relation to PhotonNetwork.sendRate. OnPhotonSerialize will create updates and messages to be sent.<br/> /// A lower rate takes up less performance but will cause more lag. /// </remarks> public static int sendRateOnSerialize { get { return 1000 / sendIntervalOnSerialize; } set { if (value > sendRate) { Debug.LogError("Error: Can not set the OnSerialize rate higher than the overall SendRate."); value = sendRate; } sendIntervalOnSerialize = 1000 / value; if (photonMono != null) { photonMono.updateIntervalOnSerialize = sendIntervalOnSerialize; } } } private static int sendInterval = 50; // in miliseconds. private static int sendIntervalOnSerialize = 100; // in miliseconds. I.e. 100 = 100ms which makes 10 times/second /// <summary> /// Can be used to pause dispatching of incoming evtents (RPCs, Instantiates and anything else incoming). /// </summary> /// <remarks> /// While IsMessageQueueRunning == false, the OnPhotonSerializeView calls are not done and nothing is sent by /// a client. Also, incoming messages will be queued until you re-activate the message queue. /// /// This can be useful if you first want to load a level, then go on receiving data of PhotonViews and RPCs. /// The client will go on receiving and sending acknowledgements for incoming packages and your RPCs/Events. /// This adds "lag" and can cause issues when the pause is longer, as all incoming messages are just queued. /// </remarks> public static bool isMessageQueueRunning { get { return m_isMessageQueueRunning; } set { if (value) PhotonHandler.StartFallbackSendAckThread(); networkingPeer.IsSendingOnlyAcks = !value; m_isMessageQueueRunning = value; } } /// <summary>Backup for property isMessageQueueRunning.</summary> private static bool m_isMessageQueueRunning = true; /// <summary> /// Used once per dispatch to limit unreliable commands per channel (so after a pause, many channels can still cause a lot of unreliable commands) /// </summary> public static int unreliableCommandsLimit { get { return networkingPeer.LimitOfUnreliableCommands; } set { networkingPeer.LimitOfUnreliableCommands = value; } } /// <summary> /// Photon network time, synched with the server. /// </summary> /// <remarks> /// v1.55<br/> /// This time value depends on the server's Environment.TickCount. It is different per server /// but inside a Room, all clients should have the same value (Rooms are on one server only).<br/> /// This is not a DateTime!<br/> /// /// Use this value with care: <br/> /// It can start with any positive value.<br/> /// It will "wrap around" from 4294967.295 to 0! /// </remarks> public static double time { get { uint u = (uint)ServerTimestamp; double t = u; return t / 1000; } } /// <summary> /// The current server's millisecond timestamp. /// </summary> /// <remarks> /// This can be useful to sync actions and events on all clients in one room. /// The timestamp is based on the server's Environment.TickCount. /// /// It will overflow from a positive to a negative value every so often, so /// be careful to use only time-differences to check the time delta when things /// happen. /// /// This is the basis for PhotonNetwork.time. /// </remarks> public static int ServerTimestamp { get { if (offlineMode) { if (UsePreciseTimer && startupStopwatch != null && startupStopwatch.IsRunning) { return (int)startupStopwatch.ElapsedMilliseconds; } return Environment.TickCount; } return networkingPeer.ServerTimeInMilliSeconds; } } /// <summary>If true, PUN will use a Stopwatch to measure time since start/connect. This is more precise than the Environment.TickCount used by default.</summary> private static bool UsePreciseTimer = false; static Stopwatch startupStopwatch; /// <summary> /// Defines how many seconds PUN keeps the connection, after Unity's OnApplicationPause(true) call. Default: 60 seconds. /// </summary> /// <remarks> /// It's best practice to disconnect inactive apps/connections after a while but to also allow users to take calls, etc.. /// We think a reasonable backgroung timeout is 60 seconds. /// /// To handle the timeout, implement: OnDisconnectedFromPhoton(), as usual. /// Your application will "notice" the background disconnect when it becomes active again (running the Update() loop). /// /// If you need to separate this case from others, you need to track if the app was in the background /// (there is no special callback by PUN). /// /// A value below 0.1 seconds will disable this timeout (careful: connections can be kept indefinitely). /// /// /// Info: /// PUN is running a "fallback thread" to send ACKs to the server, even when Unity is not calling Update() regularly. /// This helps keeping the connection while loading scenes and assets and when the app is in the background. /// /// Note: /// Some platforms (e.g. iOS) don't allow to keep a connection while the app is in background. /// In those cases, this value does not change anything, the app immediately loses connection in background. /// /// Unity's OnApplicationPause() callback is broken in some exports (Android) of some Unity versions. /// Make sure OnApplicationPause() gets the callbacks you'd expect on the platform you target! /// Check PhotonHandler.OnApplicationPause(bool pause), to see the implementation. /// </remarks> public static float BackgroundTimeout = 60.0f; /// <summary> /// Are we the master client? /// </summary> public static bool isMasterClient { get { if (offlineMode) { return true; } else { return networkingPeer.mMasterClientId == player.ID; } } } /// <summary>Is true while being in a room (connectionStateDetailed == ClientState.Joined).</summary> /// <remarks> /// Many actions can only be executed in a room, like Instantiate or Leave, etc. /// You can join a room in offline mode, too. /// </remarks> public static bool inRoom { get { // in offline mode, you can be in a room too and connectionStateDetailed then returns Joined like on online mode! return connectionStateDetailed == ClientState.Joined; } } /// <summary> /// True if we are in a room (client) and NOT the room's masterclient /// </summary> public static bool isNonMasterClientInRoom { get { return !isMasterClient && room != null; } } /// <summary> /// The count of players currently looking for a room (available on MasterServer in 5sec intervals). /// </summary> public static int countOfPlayersOnMaster { get { return networkingPeer.PlayersOnMasterCount; } } /// <summary> /// Count of users currently playing your app in some room (sent every 5sec by Master Server). /// Use PhotonNetwork.playerList.Length or PhotonNetwork.room.PlayerCount to get the count of players in the room you're in! /// </summary> public static int countOfPlayersInRooms { get { return networkingPeer.PlayersInRoomsCount; } } /// <summary> /// The count of players currently using this application (available on MasterServer in 5sec intervals). /// </summary> public static int countOfPlayers { get { return networkingPeer.PlayersInRoomsCount + networkingPeer.PlayersOnMasterCount; } } /// <summary> /// The count of rooms currently in use (available on MasterServer in 5sec intervals). /// </summary> /// <remarks> /// While inside the lobby you can also check the count of listed rooms as: PhotonNetwork.GetRoomList().Length. /// Since PUN v1.25 this is only based on the statistic event Photon sends (counting all rooms). /// </remarks> public static int countOfRooms { get { return networkingPeer.RoomsCount; } } /// <summary> /// Enables or disables the collection of statistics about this client's traffic. /// </summary> /// <remarks> /// If you encounter issues with clients, the traffic stats are a good starting point to find solutions. /// Only with enabled stats, you can use GetVitalStats /// </remarks> public static bool NetworkStatisticsEnabled { get { return networkingPeer.TrafficStatsEnabled; } set { networkingPeer.TrafficStatsEnabled = value; } } /// <summary> /// Count of commands that got repeated (due to local repeat-timing before an ACK was received). /// </summary> /// <remarks> /// If this value increases a lot, there is a good chance that a timeout disconnect will happen due to bad conditions. /// </remarks> public static int ResentReliableCommands { get { return networkingPeer.ResentReliableCommands; } } /// <summary>Crc checks can be useful to detect and avoid issues with broken datagrams. Can be enabled while not connected.</summary> public static bool CrcCheckEnabled { get { return networkingPeer.CrcEnabled; } set { if (!connected && !connecting) { networkingPeer.CrcEnabled = value; } else { Debug.Log("Can't change CrcCheckEnabled while being connected. CrcCheckEnabled stays " + networkingPeer.CrcEnabled); } } } /// <summary>If CrcCheckEnabled, this counts the incoming packages that don't have a valid CRC checksum and got rejected.</summary> public static int PacketLossByCrcCheck { get { return networkingPeer.PacketLossByCrc; } } /// <summary>Defines the number of times a reliable message can be resent before not getting an ACK for it will trigger a disconnect. Default: 5.</summary> /// <remarks>Less resends mean quicker disconnects, while more can lead to much more lag without helping. Min: 3. Max: 10.</remarks> public static int MaxResendsBeforeDisconnect { get { return networkingPeer.SentCountAllowance; } set { if (value < 3) value = 3; if (value > 10) value = 10; networkingPeer.SentCountAllowance = value; } } /// <summary>In case of network loss, reliable messages can be repeated quickly up to 3 times.</summary> /// <remarks> /// When reliable messages get lost more than once, subsequent repeats are delayed a bit /// to allow the network to recover.<br/> /// With this option, the repeats 2 and 3 can be sped up. This can help avoid timeouts but /// also it increases the speed in which gaps are closed.<br/> /// When you set this, increase PhotonNetwork.MaxResendsBeforeDisconnect to 6 or 7. /// </remarks> public static int QuickResends { get { return networkingPeer.QuickResendAttempts; } set { if (value < 0) value = 0; if (value > 3) value = 3; networkingPeer.QuickResendAttempts = (byte)value; } } /// <summary>Switch to alternative ports for a UDP connection to the Public Cloud.</summary> /// <remarks> /// This should be used when a customer has issues with connection stability. Some players /// reported better connectivity for Steam games. The effect might vary, which is why the /// alternative ports are not the new default. /// /// The alternative (server) ports are 27000 up to 27003. /// /// The values are appplied by replacing any incoming server-address string accordingly. /// You only need to set this to true though. /// /// This value does not affect TCP or WebSocket connections. /// </remarks> public static bool UseAlternativeUdpPorts { get; set; } /// <summary> /// Defines the delegate usable in OnEventCall. /// </summary> /// <remarks>Any eventCode &lt; 200 will be forwarded to your delegate(s).</remarks> /// <param name="eventCode">The code assigend to the incoming event.</param> /// <param name="content">The content the sender put into the event.</param> /// <param name="senderId">The ID of the player who sent the event. It might be 0, if the "room" sent the event.</param> public delegate void EventCallback(byte eventCode, object content, int senderId); /// <summary>Register your RaiseEvent handling methods here by using "+=".</summary> /// <remarks>Any eventCode &lt; 200 will be forwarded to your delegate(s).</remarks> /// <see cref="RaiseEvent"/> public static EventCallback OnEventCall; internal static int lastUsedViewSubId = 0; // each player only needs to remember it's own (!) last used subId to speed up assignment internal static int lastUsedViewSubIdStatic = 0; // per room, the master is able to instantiate GOs. the subId for this must be unique too internal static List<int> manuallyAllocatedViewIds = new List<int>(); /// <summary> /// Static constructor used for basic setup. /// </summary> static PhotonNetwork() { #if UNITY_EDITOR if (PhotonServerSettings == null) { // create PhotonServerSettings CreateSettings(); } if (!EditorApplication.isPlaying && !EditorApplication.isPlayingOrWillChangePlaymode) { //Debug.Log(string.Format("PhotonNetwork.ctor() Not playing {0} {1}", UnityEditor.EditorApplication.isPlaying, UnityEditor.EditorApplication.isPlayingOrWillChangePlaymode)); return; } // This can happen when you recompile a script IN play made // This helps to surpress some errors, but will not fix breaking PhotonHandler[] photonHandlers = GameObject.FindObjectsOfType(typeof(PhotonHandler)) as PhotonHandler[]; if (photonHandlers != null && photonHandlers.Length > 0) { Debug.LogWarning("Unity recompiled. Connection gets closed and replaced. You can connect as 'new' client."); foreach (PhotonHandler photonHandler in photonHandlers) { //Debug.Log("Handler: " + photonHandler + " photonHandler.gameObject: " + photonHandler.gameObject); photonHandler.gameObject.hideFlags = 0; GameObject.DestroyImmediate(photonHandler.gameObject); Component.DestroyImmediate(photonHandler); } } #endif if (PhotonServerSettings != null) { Application.runInBackground = PhotonServerSettings.RunInBackground; } // Set up a MonoBehaviour to run Photon, and hide it GameObject photonGO = new GameObject(); photonMono = (PhotonHandler)photonGO.AddComponent<PhotonHandler>(); photonGO.name = "PhotonMono"; photonGO.hideFlags = HideFlags.HideInHierarchy; // Set up the NetworkingPeer and use protocol of PhotonServerSettings ConnectionProtocol protocol = PhotonNetwork.PhotonServerSettings.Protocol; networkingPeer = new NetworkingPeer(string.Empty, protocol); networkingPeer.QuickResendAttempts = 2; networkingPeer.SentCountAllowance = 7; #if !UNITY_EDITOR && UNITY_XBOXONE networkingPeer.AuthMode = AuthModeOption.Auth; #endif if (UsePreciseTimer) { Debug.Log("Using Stopwatch as precision timer for PUN."); startupStopwatch = new Stopwatch(); startupStopwatch.Start(); networkingPeer.LocalMsTimestampDelegate = () => (int)startupStopwatch.ElapsedMilliseconds; } // Local player CustomTypes.Register(); } /// <summary> /// While offline, the network protocol can be switched (which affects the ports you can use to connect). /// </summary> /// <remarks> /// When you switch the protocol, make sure to also switch the port for the master server. Default ports are: /// TCP: 4530 /// UDP: 5055 /// /// This could look like this:<br/> /// Connect(serverAddress, <udpport|tcpport>, appID, gameVersion) /// /// Or when you use ConnectUsingSettings(), the PORT in the settings can be switched like so:<br/> /// PhotonNetwork.PhotonServerSettings.ServerPort = 4530; /// /// The current protocol can be read this way:<br/> /// PhotonNetwork.networkingPeer.UsedProtocol /// /// This does not work with the native socket plugin of PUN+ on mobile! /// </remarks> /// <param name="cp">Network protocol to use as low level connection. UDP is default. TCP is not available on all platforms (see remarks).</param> public static void SwitchToProtocol(ConnectionProtocol cp) { // Debug.Log("SwitchToProtocol: " + cp + " PhotonNetwork.connected: " + PhotonNetwork.connected); networkingPeer.TransportProtocol = cp; } /// <summary>Connect to Photon as configured in the editor (saved in PhotonServerSettings file).</summary> /// <remarks> /// This method will disable offlineMode (which won't destroy any instantiated GOs) and it /// will set isMessageQueueRunning to true. /// /// Your server configuration is created by the PUN Wizard and contains the AppId and /// region for Photon Cloud games and the server address if you host Photon yourself. /// These settings usually don't change often. /// /// To ignore the config file and connect anywhere call: PhotonNetwork.ConnectToMaster. /// /// To connect to the Photon Cloud, a valid AppId must be in the settings file (shown in the Photon Cloud Dashboard). /// https://www.photonengine.com/dashboard /// /// Connecting to the Photon Cloud might fail due to: /// - Invalid AppId (calls: OnFailedToConnectToPhoton(). check exact AppId value) /// - Network issues (calls: OnFailedToConnectToPhoton()) /// - Invalid region (calls: OnConnectionFail() with DisconnectCause.InvalidRegion) /// - Subscription CCU limit reached (calls: OnConnectionFail() with DisconnectCause.MaxCcuReached. also calls: OnPhotonMaxCccuReached()) /// /// </remarks> /// <param name="gameVersion">This client's version number. Users are separated from each other by gameversion (which allows you to make breaking changes).</param> public static bool ConnectUsingSettings(string gameVersion) { if (networkingPeer.PeerState != PeerStateValue.Disconnected) { Debug.LogWarning("ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: " + networkingPeer.PeerState); return false; } if (PhotonServerSettings == null) { Debug.LogError("Can't connect: Loading settings failed. ServerSettings asset must be in any 'Resources' folder as: " + serverSettingsAssetFile); return false; } if (PhotonServerSettings.HostType == ServerSettings.HostingOption.NotSet) { Debug.LogError("You did not select a Hosting Type in your PhotonServerSettings. Please set it up or don't use ConnectUsingSettings()."); return false; } // only apply Settings if logLevel is default ( see ServerSettings.cs), else it means it's been set programmatically if (PhotonNetwork.logLevel == PhotonLogLevel.ErrorsOnly) { PhotonNetwork.logLevel = PhotonServerSettings.PunLogging; } // only apply Settings if logLevel is default ( see ServerSettings.cs), else it means it's been set programmatically if (PhotonNetwork.networkingPeer.DebugOut == DebugLevel.ERROR) { PhotonNetwork.networkingPeer.DebugOut = PhotonServerSettings.NetworkLogging; } SwitchToProtocol(PhotonServerSettings.Protocol); networkingPeer.SetApp(PhotonServerSettings.AppID, gameVersion); if (PhotonServerSettings.HostType == ServerSettings.HostingOption.OfflineMode) { offlineMode = true; return true; } if (offlineMode) { // someone can set offlineMode in code and then call ConnectUsingSettings() with non-offline settings. Warning for that case: Debug.LogWarning("ConnectUsingSettings() disabled the offline mode. No longer offline."); } offlineMode = false; // Cleanup offline mode isMessageQueueRunning = true; networkingPeer.IsInitialConnect = true; if (PhotonServerSettings.HostType == ServerSettings.HostingOption.SelfHosted) { networkingPeer.IsUsingNameServer = false; networkingPeer.MasterServerAddress = (PhotonServerSettings.ServerPort == 0) ? PhotonServerSettings.ServerAddress : PhotonServerSettings.ServerAddress + ":" + PhotonServerSettings.ServerPort; return networkingPeer.Connect(networkingPeer.MasterServerAddress, ServerConnection.MasterServer); } if (PhotonServerSettings.HostType == ServerSettings.HostingOption.BestRegion) { return ConnectToBestCloudServer(gameVersion); } return networkingPeer.ConnectToRegionMaster(PhotonServerSettings.PreferredRegion); } /// <summary>Connect to a Photon Master Server by address, port, appID and game(client) version.</summary> /// <remarks> /// To connect to the Photon Cloud, a valid AppId must be in the settings file (shown in the Photon Cloud Dashboard). /// https://www.photonengine.com/dashboard /// /// Connecting to the Photon Cloud might fail due to: /// - Invalid AppId (calls: OnFailedToConnectToPhoton(). check exact AppId value) /// - Network issues (calls: OnFailedToConnectToPhoton()) /// - Invalid region (calls: OnConnectionFail() with DisconnectCause.InvalidRegion) /// - Subscription CCU limit reached (calls: OnConnectionFail() with DisconnectCause.MaxCcuReached. also calls: OnPhotonMaxCccuReached()) /// /// </remarks> /// <param name="masterServerAddress">The server's address (either your own or Photon Cloud address).</param> /// <param name="port">The server's port to connect to.</param> /// <param name="appID">Your application ID (Photon Cloud provides you with a GUID for your game).</param> /// <param name="gameVersion">This client's version number. Users are separated by gameversion (which allows you to make breaking changes).</param> public static bool ConnectToMaster(string masterServerAddress, int port, string appID, string gameVersion) { if (networkingPeer.PeerState != PeerStateValue.Disconnected) { Debug.LogWarning("ConnectToMaster() failed. Can only connect while in state 'Disconnected'. Current state: " + networkingPeer.PeerState); return false; } if (offlineMode) { offlineMode = false; // Cleanup offline mode Debug.LogWarning("ConnectToMaster() disabled the offline mode. No longer offline."); } if (!isMessageQueueRunning) { isMessageQueueRunning = true; Debug.LogWarning("ConnectToMaster() enabled isMessageQueueRunning. Needs to be able to dispatch incoming messages."); } networkingPeer.SetApp(appID, gameVersion); networkingPeer.IsUsingNameServer = false; networkingPeer.IsInitialConnect = true; networkingPeer.MasterServerAddress = (port == 0) ? masterServerAddress : masterServerAddress + ":" + port; return networkingPeer.Connect(networkingPeer.MasterServerAddress, ServerConnection.MasterServer); } /// <summary>Can be used to reconnect to the master server after a disconnect.</summary> /// <remarks> /// After losing connection, you can use this to connect a client to the region Master Server again. /// Cache the room name you're in and use ReJoin(roomname) to return to a game. /// Common use case: Press the Lock Button on a iOS device and you get disconnected immediately. /// </remarks> public static bool Reconnect() { if (string.IsNullOrEmpty(networkingPeer.MasterServerAddress)) { Debug.LogWarning("Reconnect() failed. It seems the client wasn't connected before?! Current state: " + networkingPeer.PeerState); return false; } if (networkingPeer.PeerState != PeerStateValue.Disconnected) { Debug.LogWarning("Reconnect() failed. Can only connect while in state 'Disconnected'. Current state: " + networkingPeer.PeerState); return false; } if (offlineMode) { offlineMode = false; // Cleanup offline mode Debug.LogWarning("Reconnect() disabled the offline mode. No longer offline."); } if (!isMessageQueueRunning) { isMessageQueueRunning = true; Debug.LogWarning("Reconnect() enabled isMessageQueueRunning. Needs to be able to dispatch incoming messages."); } networkingPeer.IsUsingNameServer = false; networkingPeer.IsInitialConnect = false; return networkingPeer.ReconnectToMaster(); } /// <summary>When the client lost connection during gameplay, this method attempts to reconnect and rejoin the room.</summary> /// <remarks> /// This method re-connects directly to the game server which was hosting the room PUN was in before. /// If the room was shut down in the meantime, PUN will call OnPhotonJoinRoomFailed and return this client to the Master Server. /// /// Check the return value, if this client will attempt a reconnect and rejoin (if the conditions are met). /// If ReconnectAndRejoin returns false, you can still attempt a Reconnect and ReJoin. /// /// Similar to PhotonNetwork.ReJoin, this requires you to use unique IDs per player (the UserID). /// </remarks> /// <returns>False, if there is no known room or game server to return to. Then, this client does not attempt the ReconnectAndRejoin.</returns> public static bool ReconnectAndRejoin() { if (networkingPeer.PeerState != PeerStateValue.Disconnected) { Debug.LogWarning("ReconnectAndRejoin() failed. Can only connect while in state 'Disconnected'. Current state: " + networkingPeer.PeerState); return false; } if (offlineMode) { offlineMode = false; // Cleanup offline mode Debug.LogWarning("ReconnectAndRejoin() disabled the offline mode. No longer offline."); } if (string.IsNullOrEmpty(networkingPeer.GameServerAddress)) { Debug.LogWarning("ReconnectAndRejoin() failed. It seems the client wasn't connected to a game server before (no address)."); return false; } if (networkingPeer.enterRoomParamsCache == null) { Debug.LogWarning("ReconnectAndRejoin() failed. It seems the client doesn't have any previous room to re-join."); return false; } if (!isMessageQueueRunning) { isMessageQueueRunning = true; Debug.LogWarning("ReconnectAndRejoin() enabled isMessageQueueRunning. Needs to be able to dispatch incoming messages."); } networkingPeer.IsUsingNameServer = false; networkingPeer.IsInitialConnect = false; return networkingPeer.ReconnectAndRejoin(); } /// <summary> /// Connect to the Photon Cloud region with the lowest ping (on platforms that support Unity's Ping). /// </summary> /// <remarks> /// Will save the result of pinging all cloud servers in PlayerPrefs. Calling this the first time can take +-2 seconds. /// The ping result can be overridden via PhotonNetwork.OverrideBestCloudServer(..) /// This call can take up to 2 seconds if it is the first time you are using this, all cloud servers will be pinged to check for the best region. /// /// The PUN Setup Wizard stores your appID in a settings file and applies a server address/port. /// To connect to the Photon Cloud, a valid AppId must be in the settings file (shown in the Photon Cloud Dashboard). /// https://www.photonengine.com/dashboard /// /// Connecting to the Photon Cloud might fail due to: /// - Invalid AppId (calls: OnFailedToConnectToPhoton(). check exact AppId value) /// - Network issues (calls: OnFailedToConnectToPhoton()) /// - Invalid region (calls: OnConnectionFail() with DisconnectCause.InvalidRegion) /// - Subscription CCU limit reached (calls: OnConnectionFail() with DisconnectCause.MaxCcuReached. also calls: OnPhotonMaxCccuReached()) /// /// </remarks> /// <param name="gameVersion">This client's version number. Users are separated from each other by gameversion (which allows you to make breaking changes).</param> /// <returns>If this client is going to connect to cloud server based on ping. Even if true, this does not guarantee a connection but the attempt is being made.</returns> public static bool ConnectToBestCloudServer(string gameVersion) { if (networkingPeer.PeerState != PeerStateValue.Disconnected) { Debug.LogWarning("ConnectToBestCloudServer() failed. Can only connect while in state 'Disconnected'. Current state: " + networkingPeer.PeerState); return false; } if (PhotonServerSettings == null) { Debug.LogError("Can't connect: Loading settings failed. ServerSettings asset must be in any 'Resources' folder as: " + PhotonNetwork.serverSettingsAssetFile); return false; } if (PhotonServerSettings.HostType == ServerSettings.HostingOption.OfflineMode) { return PhotonNetwork.ConnectUsingSettings(gameVersion); } networkingPeer.IsInitialConnect = true; networkingPeer.SetApp(PhotonServerSettings.AppID, gameVersion); bool couldConnect = PhotonNetwork.networkingPeer.ConnectToNameServer(); return couldConnect; } /// <summary> /// Connects to the Photon Cloud region of choice. /// </summary> public static bool ConnectToRegion(CloudRegionCode region, string gameVersion) { if (networkingPeer.PeerState != PeerStateValue.Disconnected) { Debug.LogWarning("ConnectToRegion() failed. Can only connect while in state 'Disconnected'. Current state: " + networkingPeer.PeerState); return false; } if (PhotonServerSettings == null) { Debug.LogError("Can't connect: ServerSettings asset must be in any 'Resources' folder as: " + PhotonNetwork.serverSettingsAssetFile); return false; } if (PhotonServerSettings.HostType == ServerSettings.HostingOption.OfflineMode) { return PhotonNetwork.ConnectUsingSettings(gameVersion); } networkingPeer.IsInitialConnect = true; networkingPeer.SetApp(PhotonServerSettings.AppID, gameVersion); if (region != CloudRegionCode.none) { Debug.Log("ConnectToRegion: " + region); return networkingPeer.ConnectToRegionMaster(region); } return false; } /// <summary>Overwrites the region that is used for ConnectToBestCloudServer(string gameVersion).</summary> /// <remarks> /// This will overwrite the result of pinging all cloud servers.<br/> /// Use this to allow your users to save a manually selected region in the player preferences.<br/> /// Note: You can also use PhotonNetwork.ConnectToRegion to (temporarily) connect to a specific region. /// </remarks> public static void OverrideBestCloudServer(CloudRegionCode region) { PhotonHandler.BestRegionCodeInPreferences = region; } /// <summary>Pings all cloud servers again to find the one with best ping (currently).</summary> public static void RefreshCloudServerRating() { throw new NotImplementedException("not available at the moment"); } /// <summary> /// Resets the traffic stats and re-enables them. /// </summary> public static void NetworkStatisticsReset() { networkingPeer.TrafficStatsReset(); } /// <summary> /// Only available when NetworkStatisticsEnabled was used to gather some stats. /// </summary> /// <returns>A string with vital networking statistics.</returns> public static string NetworkStatisticsToString() { if (networkingPeer == null || offlineMode) { return "Offline or in OfflineMode. No VitalStats available."; } return networkingPeer.VitalStatsToString(false); } /// <summary> /// Used for compatibility with Unity networking only. Encryption is automatically initialized while connecting. /// </summary> [Obsolete("Used for compatibility with Unity networking only. Encryption is automatically initialized while connecting.")] public static void InitializeSecurity() { return; } /// <summary> /// Helper function which is called inside this class to erify if certain functions can be used (e.g. RPC when not connected) /// </summary> /// <returns></returns> private static bool VerifyCanUseNetwork() { if (connected) { return true; } Debug.LogError("Cannot send messages when not connected. Either connect to Photon OR use offline mode!"); return false; } /// <summary> /// Makes this client disconnect from the photon server, a process that leaves any room and calls OnDisconnectedFromPhoton on completion. /// </summary> /// <remarks> /// When you disconnect, the client will send a "disconnecting" message to the server. This speeds up leave/disconnect /// messages for players in the same room as you (otherwise the server would timeout this client's connection). /// When used in offlineMode, the state-change and event-call OnDisconnectedFromPhoton are immediate. /// Offline mode is set to false as well. /// Once disconnected, the client can connect again. Use ConnectUsingSettings. /// </remarks> public static void Disconnect() { if (offlineMode) { offlineMode = false; offlineModeRoom = null; networkingPeer.State = ClientState.Disconnecting; networkingPeer.OnStatusChanged(StatusCode.Disconnect); return; } if (networkingPeer == null) { return; // Surpress error when quitting playmode in the editor } networkingPeer.Disconnect(); } /// <summary> /// Requests the rooms and online status for a list of friends and saves the result in PhotonNetwork.Friends. /// </summary> /// <remarks> /// Works only on Master Server to find the rooms played by a selected list of users. /// /// The result will be stored in PhotonNetwork.Friends when available. /// That list is initialized on first use of OpFindFriends (before that, it is null). /// To refresh the list, call FindFriends again (in 5 seconds or 10 or 20). /// /// Users identify themselves by setting a unique userId in the PhotonNetwork.AuthValues. /// See remarks of AuthenticationValues for info about how this is set and used. /// /// The list of friends must be fetched from some other source (not provided by Photon). /// /// /// Internal: /// The server response includes 2 arrays of info (each index matching a friend from the request): /// ParameterCode.FindFriendsResponseOnlineList = bool[] of online states /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room) /// </remarks> /// <param name="friendsToFind">Array of friend (make sure to use unique playerName or AuthValues).</param> /// <returns>If the operation could be sent (requires connection, only one request is allowed at any time). Always false in offline mode.</returns> public static bool FindFriends(string[] friendsToFind) { if (networkingPeer == null || isOfflineMode) { return false; } return networkingPeer.OpFindFriends(friendsToFind); } /// <summary> /// Creates a room with given name but fails if this room(name) is existing already. Creates random name for roomName null. /// </summary> /// <remarks> /// If you don't want to create a unique room-name, pass null or "" as name and the server will assign a roomName (a GUID as string). /// /// The created room is automatically placed in the currently used lobby (if any) or the default-lobby if you didn't explicitly join one. /// /// Call this only on the master server. /// Internally, the master will respond with a server-address (and roomName, if needed). Both are used internally /// to switch to the assigned game server and roomName. /// /// PhotonNetwork.autoCleanUpPlayerObjects will become this room's AutoCleanUp property and that's used by all clients that join this room. /// </remarks> /// <param name="roomName">Unique name of the room to create.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool CreateRoom(string roomName) { return CreateRoom(roomName, null, null, null); } /// <summary> /// Creates a room but fails if this room is existing already. Can only be called on Master Server. /// </summary> /// <remarks> /// When successful, this calls the callbacks OnCreatedRoom and OnJoinedRoom (the latter, cause you join as first player). /// If the room can't be created (because it exists already), OnPhotonCreateRoomFailed gets called. /// /// If you don't want to create a unique room-name, pass null or "" as name and the server will assign a roomName (a GUID as string). /// /// Rooms can be created in any number of lobbies. Those don't have to exist before you create a room in them (they get /// auto-created on demand). Lobbies can be useful to split room lists on the server-side already. That can help keep the room /// lists short and manageable. /// If you set a typedLobby parameter, the room will be created in that lobby (no matter if you are active in any). /// If you don't set a typedLobby, the room is automatically placed in the currently active lobby (if any) or the /// default-lobby. /// /// Call this only on the master server. /// Internally, the master will respond with a server-address (and roomName, if needed). Both are used internally /// to switch to the assigned game server and roomName. /// /// PhotonNetwork.autoCleanUpPlayerObjects will become this room's autoCleanUp property and that's used by all clients that join this room. /// </remarks> /// <param name="roomName">Unique name of the room to create. Pass null or "" to make the server generate a name.</param> /// <param name="roomOptions">Common options for the room like MaxPlayers, initial custom room properties and similar. See RoomOptions type..</param> /// <param name="typedLobby">If null, the room is automatically created in the currently used lobby (which is "default" when you didn't join one explicitly).</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool CreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby) { return CreateRoom(roomName, roomOptions, typedLobby, null); } /// <summary> /// Creates a room but fails if this room is existing already. Can only be called on Master Server. /// </summary> /// <remarks> /// When successful, this calls the callbacks OnCreatedRoom and OnJoinedRoom (the latter, cause you join as first player). /// If the room can't be created (because it exists already), OnPhotonCreateRoomFailed gets called. /// /// If you don't want to create a unique room-name, pass null or "" as name and the server will assign a roomName (a GUID as string). /// /// Rooms can be created in any number of lobbies. Those don't have to exist before you create a room in them (they get /// auto-created on demand). Lobbies can be useful to split room lists on the server-side already. That can help keep the room /// lists short and manageable. /// If you set a typedLobby parameter, the room will be created in that lobby (no matter if you are active in any). /// If you don't set a typedLobby, the room is automatically placed in the currently active lobby (if any) or the /// default-lobby. /// /// Call this only on the master server. /// Internally, the master will respond with a server-address (and roomName, if needed). Both are used internally /// to switch to the assigned game server and roomName. /// /// PhotonNetwork.autoCleanUpPlayerObjects will become this room's autoCleanUp property and that's used by all clients that join this room. /// /// You can define an array of expectedUsers, to block player slots in the room for these users. /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. /// </remarks> /// <param name="roomName">Unique name of the room to create. Pass null or "" to make the server generate a name.</param> /// <param name="roomOptions">Common options for the room like MaxPlayers, initial custom room properties and similar. See RoomOptions type..</param> /// <param name="typedLobby">If null, the room is automatically created in the currently used lobby (which is "default" when you didn't join one explicitly).</param> /// <param name="expectedUsers">Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool CreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby, string[] expectedUsers) { if (offlineMode) { if (offlineModeRoom != null) { Debug.LogError("CreateRoom failed. In offline mode you still have to leave a room to enter another."); return false; } EnterOfflineRoom(roomName, roomOptions, true); return true; } if (networkingPeer.Server != ServerConnection.MasterServer || !connectedAndReady) { Debug.LogError("CreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster."); return false; } typedLobby = typedLobby ?? ((networkingPeer.insideLobby) ? networkingPeer.lobby : null); // use given lobby, or active lobby (if any active) or none EnterRoomParams opParams = new EnterRoomParams(); opParams.RoomName = roomName; opParams.RoomOptions = roomOptions; opParams.Lobby = typedLobby; opParams.ExpectedUsers = expectedUsers; return networkingPeer.OpCreateGame(opParams); } /// <summary>Join room by roomname and on success calls OnJoinedRoom(). This is not affected by lobbies.</summary> /// <remarks> /// On success, the method OnJoinedRoom() is called on any script. You can implement it to react to joining a room. /// /// JoinRoom fails if the room is either full or no longer available (it might become empty while you attempt to join). /// Implement OnPhotonJoinRoomFailed() to get a callback in error case. /// /// To join a room from the lobby's listing, use RoomInfo.Name as roomName here. /// Despite using multiple lobbies, a roomName is always "global" for your application and so you don't /// have to specify which lobby it's in. The Master Server will find the room. /// In the Photon Cloud, an application is defined by AppId, Game- and PUN-version. /// </remarks> /// <see cref="PhotonNetworkingMessage.OnPhotonJoinRoomFailed"/> /// <see cref="PhotonNetworkingMessage.OnJoinedRoom"/> /// <param name="roomName">Unique name of the room to join.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool JoinRoom(string roomName) { return JoinRoom(roomName, null); } /// <summary>Join room by roomname and on success calls OnJoinedRoom(). This is not affected by lobbies.</summary> /// <remarks> /// On success, the method OnJoinedRoom() is called on any script. You can implement it to react to joining a room. /// /// JoinRoom fails if the room is either full or no longer available (it might become empty while you attempt to join). /// Implement OnPhotonJoinRoomFailed() to get a callback in error case. /// /// To join a room from the lobby's listing, use RoomInfo.Name as roomName here. /// Despite using multiple lobbies, a roomName is always "global" for your application and so you don't /// have to specify which lobby it's in. The Master Server will find the room. /// In the Photon Cloud, an application is defined by AppId, Game- and PUN-version. /// /// You can define an array of expectedUsers, to block player slots in the room for these users. /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. /// </remarks> /// <see cref="PhotonNetworkingMessage.OnPhotonJoinRoomFailed"/> /// <see cref="PhotonNetworkingMessage.OnJoinedRoom"/> /// <param name="roomName">Unique name of the room to join.</param> /// <param name="expectedUsers">Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool JoinRoom(string roomName, string[] expectedUsers) { if (offlineMode) { if (offlineModeRoom != null) { Debug.LogError("JoinRoom failed. In offline mode you still have to leave a room to enter another."); return false; } EnterOfflineRoom(roomName, null, true); return true; } if (networkingPeer.Server != ServerConnection.MasterServer || !connectedAndReady) { Debug.LogError("JoinRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster."); return false; } if (string.IsNullOrEmpty(roomName)) { Debug.LogError("JoinRoom failed. A roomname is required. If you don't know one, how will you join?"); return false; } EnterRoomParams opParams = new EnterRoomParams(); opParams.RoomName = roomName; opParams.ExpectedUsers = expectedUsers; return networkingPeer.OpJoinRoom(opParams); } /// <summary>Lets you either join a named room or create it on the fly - you don't have to know if someone created the room already.</summary> /// <remarks> /// This makes it easier for groups of players to get into the same room. Once the group /// exchanged a roomName, any player can call JoinOrCreateRoom and it doesn't matter who /// actually joins or creates the room. /// /// The parameters roomOptions and typedLobby are only used when the room actually gets created by this client. /// You know if this client created a room, if you get a callback OnCreatedRoom (before OnJoinedRoom gets called as well). /// </remarks> /// <param name="roomName">Name of the room to join. Must be non null.</param> /// <param name="roomOptions">Options for the room, in case it does not exist yet. Else these values are ignored.</param> /// <param name="typedLobby">Lobby you want a new room to be listed in. Ignored if the room was existing and got joined.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool JoinOrCreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby) { return JoinOrCreateRoom(roomName, roomOptions, typedLobby, null); } /// <summary>Lets you either join a named room or create it on the fly - you don't have to know if someone created the room already.</summary> /// <remarks> /// This makes it easier for groups of players to get into the same room. Once the group /// exchanged a roomName, any player can call JoinOrCreateRoom and it doesn't matter who /// actually joins or creates the room. /// /// The parameters roomOptions and typedLobby are only used when the room actually gets created by this client. /// You know if this client created a room, if you get a callback OnCreatedRoom (before OnJoinedRoom gets called as well). /// /// You can define an array of expectedUsers, to block player slots in the room for these users. /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. /// </remarks> /// <param name="roomName">Name of the room to join. Must be non null.</param> /// <param name="roomOptions">Options for the room, in case it does not exist yet. Else these values are ignored.</param> /// <param name="typedLobby">Lobby you want a new room to be listed in. Ignored if the room was existing and got joined.</param> /// <param name="expectedUsers">Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool JoinOrCreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby, string[] expectedUsers) { if (offlineMode) { if (offlineModeRoom != null) { Debug.LogError("JoinOrCreateRoom failed. In offline mode you still have to leave a room to enter another."); return false; } EnterOfflineRoom(roomName, roomOptions, true); // in offline mode, JoinOrCreateRoom assumes you create the room return true; } if (networkingPeer.Server != ServerConnection.MasterServer || !connectedAndReady) { Debug.LogError("JoinOrCreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster."); return false; } if (string.IsNullOrEmpty(roomName)) { Debug.LogError("JoinOrCreateRoom failed. A roomname is required. If you don't know one, how will you join?"); return false; } typedLobby = typedLobby ?? ((networkingPeer.insideLobby) ? networkingPeer.lobby : null); // use given lobby, or active lobby (if any active) or none EnterRoomParams opParams = new EnterRoomParams(); opParams.RoomName = roomName; opParams.RoomOptions = roomOptions; opParams.Lobby = typedLobby; opParams.CreateIfNotExists = true; opParams.PlayerProperties = player.CustomProperties; opParams.ExpectedUsers = expectedUsers; return networkingPeer.OpJoinRoom(opParams); } /// <summary> /// Joins any available room of the currently used lobby and fails if none is available. /// </summary> /// <remarks> /// Rooms can be created in arbitrary lobbies which get created on demand. /// You can join rooms from any lobby without actually joining the lobby. /// Use the JoinRandomRoom overload with TypedLobby parameter. /// /// This method will only match rooms attached to one lobby! If you use many lobbies, you /// might have to repeat JoinRandomRoom, to find some fitting room. /// This method looks up a room in the currently active lobby or (if no lobby is joined) /// in the default lobby. /// /// If this fails, you can still create a room (and make this available for the next who uses JoinRandomRoom). /// Alternatively, try again in a moment. /// </remarks> public static bool JoinRandomRoom() { return JoinRandomRoom(null, 0, MatchmakingMode.FillRoom, null, null); } /// <summary> /// Attempts to join an open room with fitting, custom properties but fails if none is currently available. /// </summary> /// <remarks> /// Rooms can be created in arbitrary lobbies which get created on demand. /// You can join rooms from any lobby without actually joining the lobby. /// Use the JoinRandomRoom overload with TypedLobby parameter. /// /// This method will only match rooms attached to one lobby! If you use many lobbies, you /// might have to repeat JoinRandomRoom, to find some fitting room. /// This method looks up a room in the currently active lobby or (if no lobby is joined) /// in the default lobby. /// /// If this fails, you can still create a room (and make this available for the next who uses JoinRandomRoom). /// Alternatively, try again in a moment. /// </remarks> /// <param name="expectedCustomRoomProperties">Filters for rooms that match these custom properties (string keys and values). To ignore, pass null.</param> /// <param name="expectedMaxPlayers">Filters for a particular maxplayer setting. Use 0 to accept any maxPlayer value.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool JoinRandomRoom(Hashtable expectedCustomRoomProperties, byte expectedMaxPlayers) { return JoinRandomRoom(expectedCustomRoomProperties, expectedMaxPlayers, MatchmakingMode.FillRoom, null, null); } /// <summary> /// Attempts to join an open room with fitting, custom properties but fails if none is currently available. /// </summary> /// <remarks> /// Rooms can be created in arbitrary lobbies which get created on demand. /// You can join rooms from any lobby without actually joining the lobby with this overload. /// /// This method will only match rooms attached to one lobby! If you use many lobbies, you /// might have to repeat JoinRandomRoom, to find some fitting room. /// This method looks up a room in the specified lobby or the currently active lobby (if none specified) /// or in the default lobby (if none active). /// /// If this fails, you can still create a room (and make this available for the next who uses JoinRandomRoom). /// Alternatively, try again in a moment. /// /// In offlineMode, a room will be created but no properties will be set and all parameters of this /// JoinRandomRoom call are ignored. The event/callback OnJoinedRoom gets called (see enum PhotonNetworkingMessage). /// /// You can define an array of expectedUsers, to block player slots in the room for these users. /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. /// </remarks> /// <param name="expectedCustomRoomProperties">Filters for rooms that match these custom properties (string keys and values). To ignore, pass null.</param> /// <param name="expectedMaxPlayers">Filters for a particular maxplayer setting. Use 0 to accept any maxPlayer value.</param> /// <param name="matchingType">Selects one of the available matchmaking algorithms. See MatchmakingMode enum for options.</param> /// <param name="typedLobby">The lobby in which you want to lookup a room. Pass null, to use the default lobby. This does not join that lobby and neither sets the lobby property.</param> /// <param name="sqlLobbyFilter">A filter-string for SQL-typed lobbies.</param> /// <param name="expectedUsers">Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for.</param> /// <returns>If the operation got queued and will be sent.</returns> public static bool JoinRandomRoom(Hashtable expectedCustomRoomProperties, byte expectedMaxPlayers, MatchmakingMode matchingType, TypedLobby typedLobby, string sqlLobbyFilter, string[] expectedUsers = null) { if (offlineMode) { if (offlineModeRoom != null) { Debug.LogError("JoinRandomRoom failed. In offline mode you still have to leave a room to enter another."); return false; } EnterOfflineRoom("offline room", null, true); return true; } if (networkingPeer.Server != ServerConnection.MasterServer || !connectedAndReady) { Debug.LogError("JoinRandomRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster."); return false; } typedLobby = typedLobby ?? ((networkingPeer.insideLobby) ? networkingPeer.lobby : null); // use given lobby, or active lobby (if any active) or none OpJoinRandomRoomParams opParams = new OpJoinRandomRoomParams(); opParams.ExpectedCustomRoomProperties = expectedCustomRoomProperties; opParams.ExpectedMaxPlayers = expectedMaxPlayers; opParams.MatchingType = matchingType; opParams.TypedLobby = typedLobby; opParams.SqlLobbyFilter = sqlLobbyFilter; opParams.ExpectedUsers = expectedUsers; return networkingPeer.OpJoinRandomRoom(opParams); } /// <summary>Can be used to return to a room after a disconnect and reconnect.</summary> /// <remarks> /// After losing connection, you might be able to return to a room and continue playing, /// if the client is reconnecting fast enough. Use Reconnect() and this method. /// Cache the room name you're in and use ReJoin(roomname) to return to a game. /// /// Note: To be able to ReJoin any room, you need to use UserIDs! /// You also need to set RoomOptions.PlayerTtl. /// /// <b>Important: Instantiate() and use of RPCs is not yet supported.</b> /// The ownership rules of PhotonViews prevent a seamless return to a game. /// Use Custom Properties and RaiseEvent with event caching instead. /// /// Common use case: Press the Lock Button on a iOS device and you get disconnected immediately. /// </remarks> public static bool ReJoinRoom(string roomName) { if (offlineMode) { Debug.LogError("ReJoinRoom failed due to offline mode."); return false; } if (networkingPeer.Server != ServerConnection.MasterServer || !connectedAndReady) { Debug.LogError("ReJoinRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster."); return false; } if (string.IsNullOrEmpty(roomName)) { Debug.LogError("ReJoinRoom failed. A roomname is required. If you don't know one, how will you join?"); return false; } EnterRoomParams opParams = new EnterRoomParams(); opParams.RoomName = roomName; opParams.RejoinOnly = true; opParams.PlayerProperties = player.CustomProperties; return networkingPeer.OpJoinRoom(opParams); } /// <summary> /// Internally used helper-method to setup an offline room, the numbers for actor and master-client and to do the callbacks. /// </summary> private static void EnterOfflineRoom(string roomName, RoomOptions roomOptions, bool createdRoom) { offlineModeRoom = new Room(roomName, roomOptions); networkingPeer.ChangeLocalID(1); networkingPeer.State = ClientState.ConnectingToGameserver; networkingPeer.OnStatusChanged(StatusCode.Connect); offlineModeRoom.MasterClientId = 1; if (createdRoom) { NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnCreatedRoom); } NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnJoinedRoom); } /// <summary>On MasterServer this joins the default lobby which list rooms currently in use.</summary> /// <remarks> /// The room list is sent and refreshed by the server. You can access this cached list by /// PhotonNetwork.GetRoomList(). /// /// Per room you should check if it's full or not before joining. Photon also lists rooms that are /// full, unless you close and hide them (room.open = false and room.visible = false). /// /// In best case, you make your clients join random games, as described here: /// https://doc.photonengine.com/en-us/pun/current/lobby-and-matchmaking/matchmaking-and-lobby /// /// You can show your current players and room count without joining a lobby (but you must /// be on the master server). Use: countOfPlayers, countOfPlayersOnMaster, countOfPlayersInRooms and /// countOfRooms. /// /// You can use more than one lobby to keep the room lists shorter. See JoinLobby(TypedLobby lobby). /// When creating new rooms, they will be "attached" to the currently used lobby or the default lobby. /// /// You can use JoinRandomRoom without being in a lobby! /// Set autoJoinLobby = false before you connect, to not join a lobby. In that case, the /// connect-workflow will call OnConnectedToMaster (if you implement it) when it's done. /// </remarks> public static bool JoinLobby() { return JoinLobby(null); } /// <summary>On a Master Server you can join a lobby to get lists of available rooms.</summary> /// <remarks> /// The room list is sent and refreshed by the server. You can access this cached list by /// PhotonNetwork.GetRoomList(). /// /// Any client can "make up" any lobby on the fly. Splitting rooms into multiple lobbies will /// keep each list shorter. However, having too many lists might ruin the matchmaking experience. /// /// In best case, you create a limited number of lobbies. For example, create a lobby per /// game-mode: "koth" for king of the hill and "ffa" for free for all, etc. /// /// There is no listing of lobbies at the moment. /// /// Sql-typed lobbies offer a different filtering model for random matchmaking. This might be more /// suited for skillbased-games. However, you will also need to follow the conventions for naming /// filterable properties in sql-lobbies! Both is explained in the matchmaking doc linked below. /// /// In best case, you make your clients join random games, as described here: /// http://confluence.exitgames.com/display/PTN/Op+JoinRandomGame /// /// /// Per room you should check if it's full or not before joining. Photon does list rooms that are /// full, unless you close and hide them (room.open = false and room.visible = false). /// /// You can show your games current players and room count without joining a lobby (but you must /// be on the master server). Use: countOfPlayers, countOfPlayersOnMaster, countOfPlayersInRooms and /// countOfRooms. /// /// When creating new rooms, they will be "attached" to the currently used lobby or the default lobby. /// /// You can use JoinRandomRoom without being in a lobby! /// Set autoJoinLobby = false before you connect, to not join a lobby. In that case, the /// connect-workflow will call OnConnectedToMaster (if you implement it) when it's done. /// </remarks> /// <param name="typedLobby">A typed lobby to join (must have name and type).</param> public static bool JoinLobby(TypedLobby typedLobby) { if (PhotonNetwork.connected && PhotonNetwork.Server == ServerConnection.MasterServer) { if (typedLobby == null) { typedLobby = TypedLobby.Default; } bool sending = networkingPeer.OpJoinLobby(typedLobby); if (sending) { networkingPeer.lobby = typedLobby; } return sending; } return false; } /// <summary>Leave a lobby to stop getting updates about available rooms.</summary> /// <remarks> /// This does not reset PhotonNetwork.lobby! This allows you to join this particular lobby later /// easily. /// /// The values countOfPlayers, countOfPlayersOnMaster, countOfPlayersInRooms and countOfRooms /// are received even without being in a lobby. /// /// You can use JoinRandomRoom without being in a lobby. /// Use autoJoinLobby to not join a lobby when you connect. /// </remarks> public static bool LeaveLobby() { if (PhotonNetwork.connected && PhotonNetwork.Server == ServerConnection.MasterServer) { return networkingPeer.OpLeaveLobby(); } return false; } /// <summary>Leave the current room and return to the Master Server where you can join or create rooms (see remarks).</summary> /// <remarks> /// This will clean up all (network) GameObjects with a PhotonView, unless you changed autoCleanUp to false. /// Returns to the Master Server. /// /// In OfflineMode, the local "fake" room gets cleaned up and OnLeftRoom gets called immediately. /// /// In a room with playerTTL &lt; 0, LeaveRoom just turns a client inactive. The player stays in the room's player list /// and can return later on. Setting becomeInactive to false deliberately, means to "abandon" the room, despite the /// playerTTL allowing you to come back. /// /// In a room with playerTTL == 0, become inactive has no effect (clients are removed from the room right away). /// </remarks> /// <param name="becomeInactive">If this client becomes inactive in a room with playerTTL &lt; 0. Defaults to true.</param> public static bool LeaveRoom(bool becomeInactive = true) { if (offlineMode) { offlineModeRoom = null; NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnLeftRoom); } else { if (room == null) { Debug.LogWarning("PhotonNetwork.room is null. You don't have to call LeaveRoom() when you're not in one. State: " + PhotonNetwork.connectionStateDetailed); } else { becomeInactive = becomeInactive && room.PlayerTtl != 0; // in a room with playerTTL == 0, the operation "leave" will never turn a client inactive } return networkingPeer.OpLeaveRoom(becomeInactive); } return true; } /// <summary>Fetches a custom list of games from the server, matching a SQL-like "where" clause, then triggers OnReceivedRoomListUpdate callback.</summary> /// <remarks> /// Operation is only available for lobbies of type SqlLobby. Note: You don't have to join that lobby. /// This is an async request. /// /// When done, OnReceivedRoomListUpdate gets called. Use GetRoomList() to access it. /// </remarks> /// <see cref="https://doc.photonengine.com/en-us/pun/current/lobby-and-matchmaking/matchmaking-and-lobby#sql_lobby_type"/> /// <param name="typedLobby">The lobby to query. Has to be of type SqlLobby.</param> /// <param name="sqlLobbyFilter">The sql query statement.</param> /// <returns>If the operation could be sent (has to be connected).</returns> public static bool GetCustomRoomList(TypedLobby typedLobby, string sqlLobbyFilter) { return networkingPeer.OpGetGameList(typedLobby, sqlLobbyFilter); } /// <summary> /// Gets currently cached rooms of the last rooms list sent by the server as RoomInfo array. /// This list is either available and updated automatically and periodically while in a lobby (check insideLobby) or /// received as a response to PhotonNetwork.GetCustomRoomList(). /// </summary> /// <remarks> /// This list is a cached copy of the internal rooms list so it can be accessed each frame if needed. /// Per RoomInfo you can check if the room is full by comparing playerCount and MaxPlayers before you allow a join. /// /// The name of a room must be used to join it (via JoinRoom). /// /// Closed rooms are also listed by lobbies but they can't be joined. While in a room, any player can set /// Room.visible and Room.open to hide rooms from matchmaking and close them. /// </remarks> /// <returns>Cached RoomInfo[] of last room list sent by the server.</returns> public static RoomInfo[] GetRoomList() { if (offlineMode || networkingPeer == null) { return new RoomInfo[0]; } return networkingPeer.mGameListCopy; } /// <summary> /// Sets this (local) player's properties and synchronizes them to the other players (don't modify them directly). /// </summary> /// <remarks> /// While in a room, your properties are synced with the other players. /// CreateRoom, JoinRoom and JoinRandomRoom will all apply your player's custom properties when you enter the room. /// The whole Hashtable will get sent. Minimize the traffic by setting only updated key/values. /// /// If the Hashtable is null, the custom properties will be cleared. /// Custom properties are never cleared automatically, so they carry over to the next room, if you don't change them. /// /// Don't set properties by modifying PhotonNetwork.player.customProperties! /// </remarks> /// <param name="customProperties">Only string-typed keys will be used from this hashtable. If null, custom properties are all deleted.</param> public static void SetPlayerCustomProperties(Hashtable customProperties) { if (customProperties == null) { customProperties = new Hashtable(); foreach (object k in player.CustomProperties.Keys) { customProperties[(string)k] = null; } } if (room != null && room.IsLocalClientInside) { player.SetCustomProperties(customProperties); } else { player.InternalCacheProperties(customProperties); } } /// <summary> /// Locally removes Custom Properties of "this" player. Important: This does not synchronize the change! Useful when you switch rooms. /// </summary> /// <remarks> /// Use this method with care. It can create inconsistencies of state between players! /// This only changes the player.customProperties locally. This can be useful to clear your /// Custom Properties between games (let's say they store which turn you made, kills, etc). /// /// SetPlayerCustomProperties() syncs and can be used to set values to null while in a room. /// That can be considered "removed" while in a room. /// /// If customPropertiesToDelete is null or has 0 entries, all Custom Properties are deleted (replaced with a new Hashtable). /// If you specify keys to remove, those will be removed from the Hashtable but other keys are unaffected. /// </remarks> /// <param name="customPropertiesToDelete">List of Custom Property keys to remove. See remarks.</param> public static void RemovePlayerCustomProperties(string[] customPropertiesToDelete) { if (customPropertiesToDelete == null || customPropertiesToDelete.Length == 0 || player.CustomProperties == null) { player.CustomProperties = new Hashtable(); return; } // if a specific list of props should be deleted, we do that here for (int i = 0; i < customPropertiesToDelete.Length; i++) { string key = customPropertiesToDelete[i]; if (player.CustomProperties.ContainsKey(key)) { player.CustomProperties.Remove(key); } } } /// <summary> /// Sends fully customizable events in a room. Events consist of at least an EventCode (0..199) and can have content. /// </summary> /// <remarks> /// To receive the events someone sends, register your handling method in PhotonNetwork.OnEventCall. /// /// Example: /// private void OnEventHandler(byte eventCode, object content, int senderId) /// { Debug.Log("OnEventHandler"); } /// /// PhotonNetwork.OnEventCall += this.OnEventHandler; /// /// With the senderId, you can look up the PhotonPlayer who sent the event. /// It is best practice to assign a eventCode for each different type of content and action. You have to cast the content. /// /// The eventContent is optional. To be able to send something, it must be a "serializable type", something that /// the client can turn into a byte[] basically. Most basic types and arrays of them are supported, including /// Unity's Vector2, Vector3, Quaternion. Transforms or classes some project defines are NOT supported! /// You can make your own class a "serializable type" by following the example in CustomTypes.cs. /// /// /// The RaiseEventOptions have some (less intuitive) combination rules: /// If you set targetActors (an array of PhotonPlayer.ID values), the receivers parameter gets ignored. /// When using event caching, the targetActors, receivers and interestGroup can't be used. Buffered events go to all. /// When using cachingOption removeFromRoomCache, the eventCode and content are actually not sent but used as filter. /// </remarks> /// <param name="eventCode">A byte identifying the type of event. You might want to use a code per action or to signal which content can be expected. Allowed: 0..199.</param> /// <param name="eventContent">Some serializable object like string, byte, integer, float (etc) and arrays of those. Hashtables with byte keys are good to send variable content.</param> /// <param name="sendReliable">Makes sure this event reaches all players. It gets acknowledged, which requires bandwidth and it can't be skipped (might add lag in case of loss).</param> /// <param name="options">Allows more complex usage of events. If null, RaiseEventOptions.Default will be used (which is fine).</param> /// <returns>False if event could not be sent</returns> public static bool RaiseEvent(byte eventCode, object eventContent, bool sendReliable, RaiseEventOptions options) { if (!inRoom || eventCode >= 200) { Debug.LogWarning("RaiseEvent() failed. Your event is not being sent! Check if your are in a Room and the eventCode must be less than 200 (0..199)."); return false; } return networkingPeer.OpRaiseEvent(eventCode, eventContent, sendReliable, options); } #if PHOTON_LIB_MIN_4_1_2 public static bool RaiseEvent(byte eventCode, object eventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions) { if (!inRoom || eventCode >= 200) { Debug.LogWarning("RaiseEvent() failed. Your event is not being sent! Check if your are in a Room and the eventCode must be less than 200 (0..199)."); return false; } return networkingPeer.OpRaiseEvent(eventCode, eventContent, raiseEventOptions, sendOptions); } #endif /// <summary> /// Allocates a viewID that's valid for the current/local player. /// </summary> /// <returns>A viewID that can be used for a new PhotonView.</returns> public static int AllocateViewID() { int manualId = AllocateViewID(player.ID); manuallyAllocatedViewIds.Add(manualId); return manualId; } /// <summary> /// Enables the Master Client to allocate a viewID that is valid for scene objects. /// </summary> /// <returns>A viewID that can be used for a new PhotonView or -1 in case of an error.</returns> public static int AllocateSceneViewID() { if (!PhotonNetwork.isMasterClient) { Debug.LogError("Only the Master Client can AllocateSceneViewID(). Check PhotonNetwork.isMasterClient!"); return -1; } int manualId = AllocateViewID(0); manuallyAllocatedViewIds.Add(manualId); return manualId; } // use 0 for scene-targetPhotonView-ids // returns viewID (combined owner and sub id) private static int AllocateViewID(int ownerId) { if (ownerId == 0) { // we look up a fresh subId for the owner "room" (mind the "sub" in subId) int newSubId = lastUsedViewSubIdStatic; int newViewId; int ownerIdOffset = ownerId * MAX_VIEW_IDS; for (int i = 1; i < MAX_VIEW_IDS; i++) { newSubId = (newSubId + 1) % MAX_VIEW_IDS; if (newSubId == 0) { continue; // avoid using subID 0 } newViewId = newSubId + ownerIdOffset; if (!networkingPeer.photonViewList.ContainsKey(newViewId)) { lastUsedViewSubIdStatic = newSubId; return newViewId; } } // this is the error case: we didn't find any (!) free subId for this user throw new Exception(string.Format("AllocateViewID() failed. Room (user {0}) is out of 'scene' viewIDs. It seems all available are in use.", ownerId)); } else { // we look up a fresh SUBid for the owner int newSubId = lastUsedViewSubId; int newViewId; int ownerIdOffset = ownerId * MAX_VIEW_IDS; for (int i = 1; i < MAX_VIEW_IDS; i++) { newSubId = (newSubId + 1) % MAX_VIEW_IDS; if (newSubId == 0) { continue; // avoid using subID 0 } newViewId = newSubId + ownerIdOffset; if (!networkingPeer.photonViewList.ContainsKey(newViewId) && !manuallyAllocatedViewIds.Contains(newViewId)) { lastUsedViewSubId = newSubId; return newViewId; } } throw new Exception(string.Format("AllocateViewID() failed. User {0} is out of subIds, as all viewIDs are used.", ownerId)); } } private static int[] AllocateSceneViewIDs(int countOfNewViews) { int[] viewIDs = new int[countOfNewViews]; for (int view = 0; view < countOfNewViews; view++) { viewIDs[view] = AllocateViewID(0); } return viewIDs; } /// <summary> /// Unregister a viewID (of manually instantiated and destroyed networked objects). /// </summary> /// <param name="viewID">A viewID manually allocated by this player.</param> public static void UnAllocateViewID(int viewID) { manuallyAllocatedViewIds.Remove(viewID); if (networkingPeer.photonViewList.ContainsKey(viewID)) { Debug.LogWarning(string.Format("UnAllocateViewID() should be called after the PhotonView was destroyed (GameObject.Destroy()). ViewID: {0} still found in: {1}", viewID, networkingPeer.photonViewList[viewID])); } } /// <summary> /// Instantiate a prefab over the network. This prefab needs to be located in the root of a "Resources" folder. /// </summary> /// <remarks> /// Instead of using prefabs in the Resources folder, you can manually Instantiate and assign PhotonViews. See doc. /// </remarks> /// <param name="prefabName">Name of the prefab to instantiate.</param> /// <param name="position">Position Vector3 to apply on instantiation.</param> /// <param name="rotation">Rotation Quaternion to apply on instantiation.</param> /// <param name="group">The group for this PhotonView.</param> /// <returns>The new instance of a GameObject with initialized PhotonView.</returns> public static GameObject Instantiate(string prefabName, Vector3 position, Quaternion rotation, byte group) { return Instantiate(prefabName, position, rotation, group, null); } /// <summary> /// Instantiate a prefab over the network. This prefab needs to be located in the root of a "Resources" folder. /// </summary> /// <remarks>Instead of using prefabs in the Resources folder, you can manually Instantiate and assign PhotonViews. See doc.</remarks> /// <param name="prefabName">Name of the prefab to instantiate.</param> /// <param name="position">Position Vector3 to apply on instantiation.</param> /// <param name="rotation">Rotation Quaternion to apply on instantiation.</param> /// <param name="group">The group for this PhotonView.</param> /// <param name="data">Optional instantiation data. This will be saved to it's PhotonView.instantiationData.</param> /// <returns>The new instance of a GameObject with initialized PhotonView.</returns> public static GameObject Instantiate(string prefabName, Vector3 position, Quaternion rotation, byte group, object[] data) { if (!connected || (InstantiateInRoomOnly && !inRoom)) { Debug.LogError("Failed to Instantiate prefab: " + prefabName + ". Client should be in a room. Current connectionStateDetailed: " + PhotonNetwork.connectionStateDetailed); return null; } GameObject prefabGo; if (!UsePrefabCache || !PrefabCache.TryGetValue(prefabName, out prefabGo)) { prefabGo = (GameObject)Resources.Load(prefabName, typeof(GameObject)); if (UsePrefabCache) { PrefabCache.Add(prefabName, prefabGo); } } if (prefabGo == null) { Debug.LogError("Failed to Instantiate prefab: " + prefabName + ". Verify the Prefab is in a Resources folder (and not in a subfolder)"); return null; } // a scene object instantiated with network visibility has to contain a PhotonView if (prefabGo.GetComponent<PhotonView>() == null) { Debug.LogError("Failed to Instantiate prefab:" + prefabName + ". Prefab must have a PhotonView component."); return null; } Component[] views = (Component[])prefabGo.GetPhotonViewsInChildren(); int[] viewIDs = new int[views.Length]; for (int i = 0; i < viewIDs.Length; i++) { //Debug.Log("Instantiate prefabName: " + prefabName + " player.ID: " + player.ID); viewIDs[i] = AllocateViewID(player.ID); } // Send to others, create info Hashtable instantiateEvent = networkingPeer.SendInstantiate(prefabName, position, rotation, group, viewIDs, data, false); // Instantiate the GO locally (but the same way as if it was done via event). This will also cache the instantiationId return networkingPeer.DoInstantiate(instantiateEvent, networkingPeer.LocalPlayer, prefabGo); } /// <summary> /// Instantiate a scene-owned prefab over the network. The PhotonViews will be controllable by the MasterClient. This prefab needs to be located in the root of a "Resources" folder. /// </summary> /// <remarks> /// Only the master client can Instantiate scene objects. /// Instead of using prefabs in the Resources folder, you can manually Instantiate and assign PhotonViews. See doc. /// </remarks> /// <param name="prefabName">Name of the prefab to instantiate.</param> /// <param name="position">Position Vector3 to apply on instantiation.</param> /// <param name="rotation">Rotation Quaternion to apply on instantiation.</param> /// <param name="group">The group for this PhotonView.</param> /// <param name="data">Optional instantiation data. This will be saved to it's PhotonView.instantiationData.</param> /// <returns>The new instance of a GameObject with initialized PhotonView.</returns> public static GameObject InstantiateSceneObject(string prefabName, Vector3 position, Quaternion rotation, byte group, object[] data) { if (!connected || (InstantiateInRoomOnly && !inRoom)) { Debug.LogError("Failed to InstantiateSceneObject prefab: " + prefabName + ". Client should be in a room. Current connectionStateDetailed: " + PhotonNetwork.connectionStateDetailed); return null; } if (!isMasterClient) { Debug.LogError("Failed to InstantiateSceneObject prefab: " + prefabName + ". Client is not the MasterClient in this room."); return null; } GameObject prefabGo; if (!UsePrefabCache || !PrefabCache.TryGetValue(prefabName, out prefabGo)) { prefabGo = (GameObject)Resources.Load(prefabName, typeof(GameObject)); if (UsePrefabCache) { PrefabCache.Add(prefabName, prefabGo); } } if (prefabGo == null) { Debug.LogError("Failed to InstantiateSceneObject prefab: " + prefabName + ". Verify the Prefab is in a Resources folder (and not in a subfolder)"); return null; } // a scene object instantiated with network visibility has to contain a PhotonView if (prefabGo.GetComponent<PhotonView>() == null) { Debug.LogError("Failed to InstantiateSceneObject prefab:" + prefabName + ". Prefab must have a PhotonView component."); return null; } Component[] views = (Component[])prefabGo.GetPhotonViewsInChildren(); int[] viewIDs = AllocateSceneViewIDs(views.Length); if (viewIDs == null) { Debug.LogError("Failed to InstantiateSceneObject prefab: " + prefabName + ". No ViewIDs are free to use. Max is: " + MAX_VIEW_IDS); return null; } // Send to others, create info Hashtable instantiateEvent = networkingPeer.SendInstantiate(prefabName, position, rotation, group, viewIDs, data, true); // Instantiate the GO locally (but the same way as if it was done via event). This will also cache the instantiationId return networkingPeer.DoInstantiate(instantiateEvent, networkingPeer.LocalPlayer, prefabGo); } /// <summary> /// The current roundtrip time to the photon server. /// </summary> /// <returns>Roundtrip time (to server and back).</returns> public static int GetPing() { return networkingPeer.RoundTripTime; } /// <summary>Refreshes the server timestamp (async operation, takes a roundtrip).</summary> /// <remarks>Can be useful if a bad connection made the timestamp unusable or imprecise.</remarks> public static void FetchServerTimestamp() { if (networkingPeer != null) { networkingPeer.FetchServerTimestamp(); } } /// <summary> /// Can be used to immediately send the RPCs and Instantiates just called, so they are on their way to the other players. /// </summary> /// <remarks> /// This could be useful if you do a RPC to load a level and then load it yourself. /// While loading, no RPCs are sent to others, so this would delay the "load" RPC. /// You can send the RPC to "others", use this method, disable the message queue /// (by isMessageQueueRunning) and then load. /// </remarks> public static void SendOutgoingCommands() { if (!VerifyCanUseNetwork()) { return; } while (networkingPeer.SendOutgoingCommands()) { } } /// <summary>Request a client to disconnect (KICK). Only the master client can do this</summary> /// <remarks>Only the target player gets this event. That player will disconnect automatically, which is what the others will notice, too.</remarks> /// <param name="kickPlayer">The PhotonPlayer to kick.</param> public static bool CloseConnection(PhotonPlayer kickPlayer) { if (!VerifyCanUseNetwork()) { return false; } if (!player.IsMasterClient) { Debug.LogError("CloseConnection: Only the masterclient can kick another player."); return false; } if (kickPlayer == null) { Debug.LogError("CloseConnection: No such player connected!"); return false; } RaiseEventOptions options = new RaiseEventOptions() { TargetActors = new int[] { kickPlayer.ID } }; return networkingPeer.OpRaiseEvent(PunEvent.CloseConnection, null, true, options); } /// <summary> /// Asks the server to assign another player as Master Client of your current room. /// </summary> /// <remarks> /// RPCs and RaiseEvent have the option to send messages only to the Master Client of a room. /// SetMasterClient affects which client gets those messages. /// /// This method calls an operation on the server to set a new Master Client, which takes a roundtrip. /// In case of success, this client and the others get the new Master Client from the server. /// /// SetMasterClient tells the server which current Master Client should be replaced with the new one. /// It will fail, if anything switches the Master Client moments earlier. There is no callback for this /// error. All clients should get the new Master Client assigned by the server anyways. /// /// See also: PhotonNetwork.masterClient /// /// On v3 servers: /// The ReceiverGroup.MasterClient (usable in RPCs) is not affected by this (still points to lowest player.ID in room). /// Avoid using this enum value (and send to a specific player instead). /// /// If the current Master Client leaves, PUN will detect a new one by "lowest player ID". Implement OnMasterClientSwitched /// to get a callback in this case. The PUN-selected Master Client might assign a new one. /// /// Make sure you don't create an endless loop of Master-assigning! When selecting a custom Master Client, all clients /// should point to the same player, no matter who actually assigns this player. /// /// Locally the Master Client is immediately switched, while remote clients get an event. This means the game /// is tempoarily without Master Client like when a current Master Client leaves. /// /// When switching the Master Client manually, keep in mind that this user might leave and not do it's work, just like /// any Master Client. /// /// </remarks> /// <param name="masterClientPlayer">The player to become the next Master Client.</param> /// <returns>False when this operation couldn't be done. Must be in a room (not in offlineMode).</returns> public static bool SetMasterClient(PhotonPlayer masterClientPlayer) { if (!inRoom || !VerifyCanUseNetwork() || offlineMode) { if (logLevel == PhotonLogLevel.Informational) Debug.Log("Can not SetMasterClient(). Not in room or in offlineMode."); return false; } if (room.serverSideMasterClient) { Hashtable newProps = new Hashtable() { { GamePropertyKey.MasterClientId, masterClientPlayer.ID } }; Hashtable prevProps = new Hashtable() { { GamePropertyKey.MasterClientId, networkingPeer.mMasterClientId } }; return networkingPeer.OpSetPropertiesOfRoom(newProps, expectedProperties: prevProps, webForward: false); } else { if (!isMasterClient) { return false; } return networkingPeer.SetMasterClient(masterClientPlayer.ID, true); } } /// <summary> /// Network-Destroy the GameObject associated with the PhotonView, unless the PhotonView is static or not under this client's control. /// </summary> /// <remarks> /// Destroying a networked GameObject while in a Room includes: /// - Removal of the Instantiate call from the server's room buffer. /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. /// - Sending a message to other clients to remove the GameObject also (affected by network lag). /// /// Usually, when you leave a room, the GOs get destroyed automatically. /// If you have to destroy a GO while not in a room, the Destroy is only done locally. /// /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. /// /// The GameObject must be under this client's control: /// - Instantiated and owned by this client. /// - Instantiated objects of players who left the room are controlled by the Master Client. /// - Scene-owned game objects are controlled by the Master Client. /// - GameObject can be destroyed while client is not in a room. /// </remarks> /// <returns>Nothing. Check error debug log for any issues.</returns> public static void Destroy(PhotonView targetView) { if (targetView != null) { networkingPeer.RemoveInstantiatedGO(targetView.gameObject, !inRoom); } else { Debug.LogError("Destroy(targetPhotonView) failed, cause targetPhotonView is null."); } } /// <summary> /// Network-Destroy the GameObject, unless it is static or not under this client's control. /// </summary> /// <remarks> /// Destroying a networked GameObject includes: /// - Removal of the Instantiate call from the server's room buffer. /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. /// - Sending a message to other clients to remove the GameObject also (affected by network lag). /// /// Usually, when you leave a room, the GOs get destroyed automatically. /// If you have to destroy a GO while not in a room, the Destroy is only done locally. /// /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. /// /// The GameObject must be under this client's control: /// - Instantiated and owned by this client. /// - Instantiated objects of players who left the room are controlled by the Master Client. /// - Scene-owned game objects are controlled by the Master Client. /// - GameObject can be destroyed while client is not in a room. /// </remarks> /// <returns>Nothing. Check error debug log for any issues.</returns> public static void Destroy(GameObject targetGo) { networkingPeer.RemoveInstantiatedGO(targetGo, !inRoom); } /// <summary> /// Network-Destroy all GameObjects, PhotonViews and their RPCs of targetPlayer. Can only be called on local player (for "self") or Master Client (for anyone). /// </summary> /// <remarks> /// Destroying a networked GameObject includes: /// - Removal of the Instantiate call from the server's room buffer. /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. /// - Sending a message to other clients to remove the GameObject also (affected by network lag). /// /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. /// </remarks> /// <returns>Nothing. Check error debug log for any issues.</returns> public static void DestroyPlayerObjects(PhotonPlayer targetPlayer) { if (player == null) { Debug.LogError("DestroyPlayerObjects() failed, cause parameter 'targetPlayer' was null."); } DestroyPlayerObjects(targetPlayer.ID); } /// <summary> /// Network-Destroy all GameObjects, PhotonViews and their RPCs of this player (by ID). Can only be called on local player (for "self") or Master Client (for anyone). /// </summary> /// <remarks> /// Destroying a networked GameObject includes: /// - Removal of the Instantiate call from the server's room buffer. /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. /// - Sending a message to other clients to remove the GameObject also (affected by network lag). /// /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. /// </remarks> /// <returns>Nothing. Check error debug log for any issues.</returns> public static void DestroyPlayerObjects(int targetPlayerId) { if (!VerifyCanUseNetwork()) { return; } if (player.IsMasterClient || targetPlayerId == player.ID) { networkingPeer.DestroyPlayerObjects(targetPlayerId, false); } else { Debug.LogError("DestroyPlayerObjects() failed, cause players can only destroy their own GameObjects. A Master Client can destroy anyone's. This is master: " + PhotonNetwork.isMasterClient); } } /// <summary> /// Network-Destroy all GameObjects, PhotonViews and their RPCs in the room. Removes anything buffered from the server. Can only be called by Master Client (for anyone). /// </summary> /// <remarks> /// Can only be called by Master Client (for anyone). /// Unlike the Destroy methods, this will remove anything from the server's room buffer. If your game /// buffers anything beyond Instantiate and RPC calls, that will be cleaned as well from server. /// /// Destroying all includes: /// - Remove anything from the server's room buffer (Instantiate, RPCs, anything buffered). /// - Sending a message to other clients to destroy everything locally, too (affected by network lag). /// /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. /// </remarks> /// <returns>Nothing. Check error debug log for any issues.</returns> public static void DestroyAll() { if (isMasterClient) { networkingPeer.DestroyAll(false); } else { Debug.LogError("Couldn't call DestroyAll() as only the master client is allowed to call this."); } } /// <summary> /// Remove all buffered RPCs from server that were sent by targetPlayer. Can only be called on local player (for "self") or Master Client (for anyone). /// </summary> /// <remarks> /// This method requires either: /// - This is the targetPlayer's client. /// - This client is the Master Client (can remove any PhotonPlayer's RPCs). /// /// If the targetPlayer calls RPCs at the same time that this is called, /// network lag will determine if those get buffered or cleared like the rest. /// </remarks> /// <param name="targetPlayer">This player's buffered RPCs get removed from server buffer.</param> public static void RemoveRPCs(PhotonPlayer targetPlayer) { if (!VerifyCanUseNetwork()) { return; } if (!targetPlayer.IsLocal && !isMasterClient) { Debug.LogError("Error; Only the MasterClient can call RemoveRPCs for other players."); return; } networkingPeer.OpCleanRpcBuffer(targetPlayer.ID); } /// <summary> /// Remove all buffered RPCs from server that were sent via targetPhotonView. The Master Client and the owner of the targetPhotonView may call this. /// </summary> /// <remarks> /// This method requires either: /// - The targetPhotonView is owned by this client (Instantiated by it). /// - This client is the Master Client (can remove any PhotonView's RPCs). /// </remarks> /// <param name="targetPhotonView">RPCs buffered for this PhotonView get removed from server buffer.</param> public static void RemoveRPCs(PhotonView targetPhotonView) { if (!VerifyCanUseNetwork()) { return; } networkingPeer.CleanRpcBufferIfMine(targetPhotonView); } /// <summary> /// Remove all buffered RPCs from server that were sent in the targetGroup, if this is the Master Client or if this controls the individual PhotonView. /// </summary> /// <remarks> /// This method requires either: /// - This client is the Master Client (can remove any RPCs per group). /// - Any other client: each PhotonView is checked if it is under this client's control. Only those RPCs are removed. /// </remarks> /// <param name="targetGroup">Interest group that gets all RPCs removed.</param> public static void RemoveRPCsInGroup(int targetGroup) { if (!VerifyCanUseNetwork()) { return; } networkingPeer.RemoveRPCsInGroup(targetGroup); } /// <summary> /// Internal to send an RPC on given PhotonView. Do not call this directly but use: PhotonView.RPC! /// </summary> internal static void RPC(PhotonView view, string methodName, PhotonTargets target, bool encrypt, params object[] parameters) { if (!VerifyCanUseNetwork()) { return; } if (room == null) { Debug.LogWarning("RPCs can only be sent in rooms. Call of \"" + methodName + "\" gets executed locally only, if at all."); return; } if (networkingPeer != null) { if (PhotonNetwork.room.serverSideMasterClient) { networkingPeer.RPC(view, methodName, target, null, encrypt, parameters); } else { if (PhotonNetwork.networkingPeer.hasSwitchedMC && target == PhotonTargets.MasterClient) { networkingPeer.RPC(view, methodName, PhotonTargets.Others, PhotonNetwork.masterClient, encrypt, parameters); } else { networkingPeer.RPC(view, methodName, target, null, encrypt, parameters); } } } else { Debug.LogWarning("Could not execute RPC " + methodName + ". Possible scene loading in progress?"); } } /// <summary> /// Internal to send an RPC on given PhotonView. Do not call this directly but use: PhotonView.RPC! /// </summary> internal static void RPC(PhotonView view, string methodName, PhotonPlayer targetPlayer, bool encrpyt, params object[] parameters) { if (!VerifyCanUseNetwork()) { return; } if (room == null) { Debug.LogWarning("RPCs can only be sent in rooms. Call of \"" + methodName + "\" gets executed locally only, if at all."); return; } if (player == null) { Debug.LogError("RPC can't be sent to target PhotonPlayer being null! Did not send \"" + methodName + "\" call."); } if (networkingPeer != null) { networkingPeer.RPC(view, methodName, PhotonTargets.Others, targetPlayer, encrpyt, parameters); } else { Debug.LogWarning("Could not execute RPC " + methodName + ". Possible scene loading in progress?"); } } /// <summary> /// Populates SendMonoMessageTargets with currently existing GameObjects that have a Component of type. /// </summary> /// <param name="type">If null, this will use SendMonoMessageTargets as component-type (MonoBehaviour by default).</param> public static void CacheSendMonoMessageTargets(Type type) { if (type == null) type = SendMonoMessageTargetType; PhotonNetwork.SendMonoMessageTargets = FindGameObjectsWithComponent(type); } /// <summary>Finds the GameObjects with Components of a specific type (using FindObjectsOfType).</summary> /// <param name="type">Type must be a Component</param> /// <returns>HashSet with GameObjects that have a specific type of Component.</returns> public static HashSet<GameObject> FindGameObjectsWithComponent(Type type) { HashSet<GameObject> objectsWithComponent = new HashSet<GameObject>(); Component[] targetComponents = (Component[]) GameObject.FindObjectsOfType(type); for (int index = 0; index < targetComponents.Length; index++) { if (targetComponents[index] != null) { objectsWithComponent.Add(targetComponents[index].gameObject); } } return objectsWithComponent; } [Obsolete("Use SetInterestGroups(byte group, bool enabled) instead.")] public static void SetReceivingEnabled(int group, bool enabled) { if (!VerifyCanUseNetwork()) { return; } SetInterestGroups((byte)group, enabled); } /// <summary>Enable/disable receiving events from a given Interest Group.</summary> /// <remarks> /// A client can tell the server which Interest Groups it's interested in. /// The server will only forward events for those Interest Groups to that client (saving bandwidth and performance). /// /// See: https://doc.photonengine.com/en-us/pun/current/gameplay/interestgroups /// /// See: https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/package-demos/culling-demo /// </remarks> /// <param name="group">The interest group to affect.</param> /// <param name="enabled">Sets if receiving from group to enabled (or not).</param> public static void SetInterestGroups(byte group, bool enabled) { if (!VerifyCanUseNetwork()) { return; } if (enabled) { byte[] groups = new byte[1] { (byte)group }; networkingPeer.SetInterestGroups(null, groups); } else { byte[] groups = new byte[1] { (byte)group }; networkingPeer.SetInterestGroups(groups, null); } } [Obsolete("Use SetInterestGroups(byte[] disableGroups, byte[] enableGroups) instead. Mind the parameter order!")] public static void SetReceivingEnabled(int[] enableGroups, int[] disableGroups) { if (!VerifyCanUseNetwork()) { return; } byte[] disableByteGroups = null; byte[] enableByteGroups = null; if (enableGroups != null) { enableByteGroups = new byte[enableGroups.Length]; Array.Copy(enableGroups, enableByteGroups, enableGroups.Length); } if (disableGroups != null) { disableByteGroups = new byte[disableGroups.Length]; Array.Copy(disableGroups, disableByteGroups, disableGroups.Length); } networkingPeer.SetInterestGroups(disableByteGroups, enableByteGroups); } /// <summary>Enable/disable receiving on given Interest Groups (applied to PhotonViews).</summary> /// <remarks> /// A client can tell the server which Interest Groups it's interested in. /// The server will only forward events for those Interest Groups to that client (saving bandwidth and performance). /// /// See: https://doc.photonengine.com/en-us/pun/current/gameplay/interestgroups /// /// See: https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/package-demos/culling-demo /// </remarks> /// <param name="disableGroups">The interest groups to disable (or null).</param> /// <param name="enableGroups">The interest groups to enable (or null).</param> public static void SetInterestGroups(byte[] disableGroups, byte[] enableGroups) { if (!VerifyCanUseNetwork()) { return; } networkingPeer.SetInterestGroups(disableGroups, enableGroups); } [Obsolete("Use SetSendingEnabled(byte group, bool enabled). Interest Groups have a byte-typed ID. Mind the parameter order.")] public static void SetSendingEnabled(int group, bool enabled) { SetSendingEnabled((byte)group, enabled); } /// <summary>Enable/disable sending on given group (applied to PhotonViews)</summary> /// <remarks> /// This does not interact with the Photon server-side. /// It's just a client-side setting to suppress updates, should they be sent to one of the blocked groups. /// /// This setting is not particularly useful, as it means that updates literally never reach the server or anyone else. /// Use with care. /// </remarks> /// <param name="group">The interest group to affect.</param> /// <param name="enabled">Sets if sending to group is enabled (or not).</param> public static void SetSendingEnabled(byte group, bool enabled) { if (!VerifyCanUseNetwork()) { return; } networkingPeer.SetSendingEnabled(group, enabled); } [Obsolete("Use SetSendingEnabled(byte group, bool enabled). Interest Groups have a byte-typed ID. Mind the parameter order.")] public static void SetSendingEnabled(int[] enableGroups, int[] disableGroups) { byte[] disableByteGroups = null; byte[] enableByteGroups = null; if (enableGroups != null) { enableByteGroups = new byte[enableGroups.Length]; Array.Copy(enableGroups, enableByteGroups, enableGroups.Length); } if (disableGroups != null) { disableByteGroups = new byte[disableGroups.Length]; Array.Copy(disableGroups, disableByteGroups, disableGroups.Length); } SetSendingEnabled(disableByteGroups, enableByteGroups); } /// <summary>Enable/disable sending on given groups (applied to PhotonViews)</summary> /// <remarks> /// This does not interact with the Photon server-side. /// It's just a client-side setting to suppress updates, should they be sent to one of the blocked groups. /// /// This setting is not particularly useful, as it means that updates literally never reach the server or anyone else. /// Use with care. /// <param name="enableGroups">The interest groups to enable sending on (or null).</param> /// <param name="disableGroups">The interest groups to disable sending on (or null).</param> public static void SetSendingEnabled(byte[] disableGroups, byte[] enableGroups) { if (!VerifyCanUseNetwork()) { return; } networkingPeer.SetSendingEnabled(disableGroups, enableGroups); } /// <summary> /// Sets level prefix for PhotonViews instantiated later on. Don't set it if you need only one! /// </summary> /// <remarks> /// Important: If you don't use multiple level prefixes, simply don't set this value. The /// default value is optimized out of the traffic. /// /// This won't affect existing PhotonViews (they can't be changed yet for existing PhotonViews). /// /// Messages sent with a different level prefix will be received but not executed. This affects /// RPCs, Instantiates and synchronization. /// /// Be aware that PUN never resets this value, you'll have to do so yourself. /// </remarks> /// <param name="prefix">Max value is short.MaxValue = 32767</param> public static void SetLevelPrefix(short prefix) { if (!VerifyCanUseNetwork()) { return; } networkingPeer.SetLevelPrefix(prefix); } /// <summary>Wraps loading a level to pause the network message-queue. Optionally syncs the loaded level in a room.</summary> /// <remarks> /// To sync the loaded level in a room, set PhotonNetwork.automaticallySyncScene to true. /// The Master Client of a room will then sync the loaded level with every other player in the room. /// /// While loading levels, it makes sense to not dispatch messages received by other players. /// This method takes care of that by setting PhotonNetwork.isMessageQueueRunning = false and enabling /// the queue when the level was loaded. /// /// You should make sure you don't fire RPCs before you load another scene (which doesn't contain /// the same GameObjects and PhotonViews). You can call this in OnJoinedRoom. /// /// This uses Application.LoadLevel in Unity version not yet featuring the SceneManager API. /// </remarks> /// <param name='levelNumber'> /// Number of the level to load. When using level numbers, make sure they are identical on all clients. /// </param> public static void LoadLevel(int levelNumber) { if (PhotonNetwork.automaticallySyncScene) { networkingPeer.SetLevelInPropsIfSynced (levelNumber); } PhotonNetwork.isMessageQueueRunning = false; networkingPeer.loadingLevelAndPausedNetwork = true; SceneManager.LoadScene(levelNumber); } /// <summary>Wraps single asynchronous loading of a level to pause the network message-queue. Optionally syncs the loaded level in a room.</summary> /// <remarks> /// To sync the loaded level in a room, set PhotonNetwork.automaticallySyncScene to true. /// The Master Client of a room will then sync the loaded level with every other player in the room. /// /// While loading levels, it makes sense to not dispatch messages received by other players. /// This method takes care of that by setting PhotonNetwork.isMessageQueueRunning = false and enabling /// the queue when the level was loaded. /// /// You should make sure you don't fire RPCs before you load another scene (which doesn't contain /// the same GameObjects and PhotonViews). You can call this in OnJoinedRoom. /// /// This uses Application.LoadLevel in Unity version not yet featuring the SceneManager API. /// </remarks> /// <returns>The async operation.</returns> /// <param name='levelNumber'> /// Number of the level to load. When using level numbers, make sure they are identical on all clients. /// </param> public static AsyncOperation LoadLevelAsync(int levelNumber) { if (PhotonNetwork.automaticallySyncScene) { networkingPeer.SetLevelInPropsIfSynced (levelNumber,true); } PhotonNetwork.isMessageQueueRunning = false; networkingPeer.loadingLevelAndPausedNetwork = true; return SceneManager.LoadSceneAsync(levelNumber,LoadSceneMode.Single); } /// <summary>Wraps loading a level to pause the network message-queue. Optionally syncs the loaded level in a room.</summary> /// <remarks> /// While loading levels, it makes sense to not dispatch messages received by other players. /// This method takes care of that by setting PhotonNetwork.isMessageQueueRunning = false and enabling /// the queue when the level was loaded. /// /// To sync the loaded level in a room, set PhotonNetwork.automaticallySyncScene to true. /// The Master Client of a room will then sync the loaded level with every other player in the room. /// /// You should make sure you don't fire RPCs before you load another scene (which doesn't contain /// the same GameObjects and PhotonViews). You can call this in OnJoinedRoom. /// /// This uses Application.LoadLevel in Unity version not yet featuring the SceneManager API. /// </remarks> /// <param name='levelName'> /// Name of the level to load. Make sure it's available to all clients in the same room. /// </param> public static void LoadLevel(string levelName) { if (PhotonNetwork.automaticallySyncScene) { networkingPeer.SetLevelInPropsIfSynced ("newcastle"); } PhotonNetwork.isMessageQueueRunning = false; networkingPeer.loadingLevelAndPausedNetwork = true; SceneManager.LoadScene("newcastle"); } /// <summary>Wraps single asynchronous loading of a level to pause the network message-queue. Optionally syncs the loaded level in a room.</summary> /// <remarks> /// While loading levels, it makes sense to not dispatch messages received by other players. /// This method takes care of that by setting PhotonNetwork.isMessageQueueRunning = false and enabling /// the queue when the level was loaded. /// /// To sync the loaded level in a room, set PhotonNetwork.automaticallySyncScene to true. /// The Master Client of a room will then sync the loaded level with every other player in the room. /// /// You should make sure you don't fire RPCs before you load another scene (which doesn't contain /// the same GameObjects and PhotonViews). You can call this in OnJoinedRoom. /// /// This uses Application.LoadLevel in Unity version not yet featuring the SceneManager API. /// </remarks> /// <returns>The async operation.</returns> /// <param name='levelName'> /// Name of the level to load. Make sure it's available to all clients in the same room. /// </param> /// <param name="mode">LoadSceneMode either single or additive</param> public static AsyncOperation LoadLevelAsync(string levelName) { if (PhotonNetwork.automaticallySyncScene) { networkingPeer.SetLevelInPropsIfSynced (levelName,true); } PhotonNetwork.isMessageQueueRunning = false; networkingPeer.loadingLevelAndPausedNetwork = true; return SceneManager.LoadSceneAsync(levelName,LoadSceneMode.Single); } /// <summary> /// This operation makes Photon call your custom web-service by name (path) with the given parameters. /// </summary> /// <remarks> /// This is a server-side feature which must be setup in the Photon Cloud Dashboard prior to use. /// <see cref="https://doc.photonengine.com/en-us/pun/current/gameplay/web-extensions/webrpc"/> /// The Parameters will be converted into JSon format, so make sure your parameters are compatible. /// /// See PhotonNetworkingMessage.OnWebRpcResponse on how to get a response. /// /// It's important to understand that the OperationResponse only tells if the WebRPC could be called. /// The content of the response contains any values your web-service sent and the error/success code. /// In case the web-service failed, an error code and a debug message are usually inside the /// OperationResponse. /// /// The class WebRpcResponse is a helper-class that extracts the most valuable content from the WebRPC /// response. /// </remarks> /// <example> /// Example callback implementation:<pre> /// /// public void OnWebRpcResponse(OperationResponse response) /// { /// WebRpcResponse webResponse = new WebRpcResponse(operationResponse); /// if (webResponse.ReturnCode != 0) { //... /// } /// /// switch (webResponse.Name) { //... /// } /// // and so on /// }</pre> /// </example> public static bool WebRpc(string name, object parameters) { return networkingPeer.WebRpc(name, parameters); } #if UNITY_EDITOR /// <summary> /// Finds the asset path base on its name or search query: https://docs.unity3d.com/ScriptReference/AssetDatabase.FindAssets.html /// </summary> /// <returns>The asset path.</returns> /// <param name="asset">Asset.</param> public static string FindAssetPath(string asset) { string[] guids = AssetDatabase.FindAssets (asset, null); if (guids.Length != 1) { return string.Empty; } else { return AssetDatabase.GUIDToAssetPath (guids [0]); } } /// <summary> /// Finds the pun asset folder. Something like Assets/Photon Unity Networking/Resources/ /// </summary> /// <returns>The pun asset folder.</returns> public static string FindPunAssetFolder() { string _thisPath = FindAssetPath("PhotonClasses"); string _PunFolderPath = string.Empty; _PunFolderPath = GetParent(_thisPath,"Photon Unity Networking"); if (_PunFolderPath != null) { return "Assets" + _PunFolderPath.Substring(Application.dataPath.Length)+"/"; } return "Assets/Photon Unity Networking/"; } /// <summary> /// Gets the parent directory of a path. Recursive Function, will return null if parentName not found /// </summary> /// <returns>The parent directory</returns> /// <param name="path">Path.</param> /// <param name="parentName">Parent name.</param> public static string GetParent(string path, string parentName) { var dir = new DirectoryInfo(path); if (dir.Parent == null) { return null; } if (string.IsNullOrEmpty(parentName)) { return dir.Parent.FullName; } if (dir.Parent.Name == parentName) { return dir.Parent.FullName; } return GetParent(dir.Parent.FullName, parentName); } [Conditional("UNITY_EDITOR")] public static void CreateSettings() { PhotonNetwork.PhotonServerSettings = (ServerSettings)Resources.Load(PhotonNetwork.serverSettingsAssetFile, typeof(ServerSettings)); if (PhotonNetwork.PhotonServerSettings != null) { return; } // find out if ServerSettings can be instantiated (existing script check) ScriptableObject serverSettingTest = ScriptableObject.CreateInstance("ServerSettings"); if (serverSettingTest == null) { Debug.LogError("missing settings script"); return; } UnityEngine.Object.DestroyImmediate(serverSettingTest); // if still not loaded, create one if (PhotonNetwork.PhotonServerSettings == null) { string _PunResourcesPath = PhotonNetwork.FindPunAssetFolder(); _PunResourcesPath += "Resources/"; string serverSettingsAssetPath = _PunResourcesPath+ PhotonNetwork.serverSettingsAssetFile + ".asset"; string settingsPath = Path.GetDirectoryName(serverSettingsAssetPath); if (!Directory.Exists(settingsPath)) { Directory.CreateDirectory(settingsPath); AssetDatabase.ImportAsset(settingsPath); } PhotonNetwork.PhotonServerSettings = (ServerSettings)ScriptableObject.CreateInstance("ServerSettings"); if (PhotonNetwork.PhotonServerSettings != null) { AssetDatabase.CreateAsset(PhotonNetwork.PhotonServerSettings, serverSettingsAssetPath); } else { Debug.LogError("PUN failed creating a settings file. ScriptableObject.CreateInstance(\"ServerSettings\") returned null. Will try again later."); } } } /// <summary> /// Internally used by Editor scripts, called on Hierarchy change (includes scene save) to remove surplus hidden PhotonHandlers. /// </summary> public static void InternalCleanPhotonMonoFromSceneIfStuck() { PhotonHandler[] photonHandlers = GameObject.FindObjectsOfType(typeof(PhotonHandler)) as PhotonHandler[]; if (photonHandlers != null && photonHandlers.Length > 0) { Debug.Log("Cleaning up hidden PhotonHandler instances in scene. Please save it. This is not an issue."); foreach (PhotonHandler photonHandler in photonHandlers) { // Debug.Log("Removing Handler: " + photonHandler + " photonHandler.gameObject: " + photonHandler.gameObject); photonHandler.gameObject.hideFlags = 0; if (photonHandler.gameObject != null && photonHandler.gameObject.name == "PhotonMono") { GameObject.DestroyImmediate(photonHandler.gameObject); } Component.DestroyImmediate(photonHandler); } } } #endif }
43.661438
270
0.657362
[ "MIT" ]
amancheung/castlevr
sig18_mini/Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs
153,077
C#
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.Text; namespace SimpleREPL.Simple3 { [Serializable] public class TypeMismatchException : Exception{ // // For guidelines regarding the creation of new exception types, see // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp // and // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp // public TypeMismatchException(){ } public TypeMismatchException(string message) : base(message){ } public TypeMismatchException(string message, Exception inner) : base(message, inner){ } protected TypeMismatchException( SerializationInfo info, StreamingContext context) : base(info, context){ } } }
31.53125
133
0.649158
[ "Apache-2.0" ]
dolan/simple3-interpreter
bsn.Simple3/Simple2REPL/Simple3/TypeMismatchException.cs
1,011
C#
/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. 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. * 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 TencentCloud.As.V20180419.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class AttachInstancesRequest : AbstractModel { /// <summary> /// 伸缩组ID /// </summary> [JsonProperty("AutoScalingGroupId")] public string AutoScalingGroupId{ get; set; } /// <summary> /// CVM实例ID列表 /// </summary> [JsonProperty("InstanceIds")] public string[] InstanceIds{ get; set; } /// <summary> /// For internal usage only. DO NOT USE IT. /// </summary> public override void ToMap(Dictionary<string, string> map, string prefix) { this.SetParamSimple(map, prefix + "AutoScalingGroupId", this.AutoScalingGroupId); this.SetParamArraySimple(map, prefix + "InstanceIds.", this.InstanceIds); } } }
30.764706
93
0.649458
[ "Apache-2.0" ]
TencentCloud/tencentcloud-sdk-dotnet
TencentCloud/As/V20180419/Models/AttachInstancesRequest.cs
1,583
C#
//---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. // All rights reserved. // // This code is licensed under the MIT License. // // 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 Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.OAuth2; using System; namespace Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Platform { internal class PlatformInformation : PlatformInformationBase { public override void AddPromptBehaviorQueryParameter(IPlatformParameters parameters, DictionaryRequestParameters authorizationRequestParameters) { PlatformParameters authorizationParameters = (parameters as PlatformParameters); if (authorizationParameters == null) { throw new ArgumentException("parameters should be of type PlatformParameters", "parameters"); } PromptBehavior promptBehavior = authorizationParameters.PromptBehavior; // ADFS currently ignores the parameter for now. switch (promptBehavior) { case PromptBehavior.Always: authorizationRequestParameters[OAuthParameter.Prompt] = PromptValue.Login; break; case PromptBehavior.SelectAccount: authorizationRequestParameters[OAuthParameter.Prompt] = PromptValue.SelectAccount; break; case PromptBehavior.RefreshSession: authorizationRequestParameters[OAuthParameter.Prompt] = PromptValue.RefreshSession; break; case PromptBehavior.Never: //TODO: needs testing authorizationRequestParameters[OAuthParameter.Prompt] = PromptValue.AttemptNone; break; } } } }
45.923077
152
0.661642
[ "MIT" ]
stefangossner/azure-activedirectory-library-for-dotnet
src/Microsoft.IdentityModel.Clients.ActiveDirectory/Platforms/netstandard1.3/PlatformInformation.cs
2,987
C#
#region Information // Solution: Spark // Spark.Engine // File: IndexEntry.cs // // Created: 07/12/2017 : 10:35 AM // // Modified By: Howard Edidin // Modified: 08/20/2017 : 2:01 PM #endregion namespace FhirOnAzure.Engine.Model { using System.Collections.Generic; using System.Linq; using FhirOnAzure.Search; public class IndexValue : ValueExpression { private readonly List<Expression> _values; public IndexValue() { _values = new List<Expression>(); } public IndexValue(string name) : this() { Name = name; } public IndexValue(string name, List<Expression> values) : this(name) { Values = values; } public IndexValue(string name, params Expression[] values) : this(name) { Values = values.ToList(); } public string Name { get; set; } public List<Expression> Values { get => _values; set => _values.AddRange(value); } public void AddValue(Expression value) { _values.Add(value); } } public static class IndexValueExtensions { public static IEnumerable<IndexValue> IndexValues(this IndexValue root) { return root.Values.OfType<IndexValue>(); } } }
21.246154
79
0.562636
[ "MIT" ]
HowardEdidin/HL7-FHIR-ON-AZURE
Samples and SDK/Server/FhirOnAzureServer/Spark.Engine/Model/IndexEntry.cs
1,383
C#
 namespace TP_01_FacundoFalcone { partial class FormCalculadora { /// <summary> /// Variable del diseñador necesaria. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Limpiar los recursos que se estén usando. /// </summary> /// <param name="disposing">true si los recursos administrados se deben desechar; false en caso contrario.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Código generado por el Diseñador de Windows Forms /// <summary> /// Método necesario para admitir el Diseñador. No se puede modificar /// el contenido de este método con el editor de código. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormCalculadora)); this.grpLogo = new System.Windows.Forms.GroupBox(); this.grpOperadores = new System.Windows.Forms.GroupBox(); this.btnCerrar = new System.Windows.Forms.Button(); this.btnLimpiar = new System.Windows.Forms.Button(); this.btnOperar = new System.Windows.Forms.Button(); this.cmbOperador = new System.Windows.Forms.ComboBox(); this.txtNumero2 = new System.Windows.Forms.TextBox(); this.txtNumero1 = new System.Windows.Forms.TextBox(); this.grpConvert = new System.Windows.Forms.GroupBox(); this.grpLogoEsferas = new System.Windows.Forms.GroupBox(); this.btnConvertirABinario = new System.Windows.Forms.Button(); this.btnConvertirADecimal = new System.Windows.Forms.Button(); this.grpResultado = new System.Windows.Forms.GroupBox(); this.lblResultado = new System.Windows.Forms.Label(); this.lblVersionApp = new System.Windows.Forms.Label(); this.btnPlayPause = new System.Windows.Forms.Button(); this.playerControlIcons = new System.Windows.Forms.ImageList(this.components); this.grpPlayer = new System.Windows.Forms.GroupBox(); this.grpOperadores.SuspendLayout(); this.grpConvert.SuspendLayout(); this.grpResultado.SuspendLayout(); this.grpPlayer.SuspendLayout(); this.SuspendLayout(); // // grpLogo // this.grpLogo.BackColor = System.Drawing.Color.Transparent; this.grpLogo.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("grpLogo.BackgroundImage"))); this.grpLogo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; this.grpLogo.ForeColor = System.Drawing.Color.OrangeRed; this.grpLogo.Location = new System.Drawing.Point(14, 12); this.grpLogo.Name = "grpLogo"; this.grpLogo.Size = new System.Drawing.Size(250, 85); this.grpLogo.TabIndex = 0; this.grpLogo.TabStop = false; this.grpLogo.Text = "Logo"; // // grpOperadores // this.grpOperadores.BackColor = System.Drawing.Color.Transparent; this.grpOperadores.Controls.Add(this.btnCerrar); this.grpOperadores.Controls.Add(this.btnLimpiar); this.grpOperadores.Controls.Add(this.btnOperar); this.grpOperadores.Controls.Add(this.cmbOperador); this.grpOperadores.Controls.Add(this.txtNumero2); this.grpOperadores.Controls.Add(this.txtNumero1); this.grpOperadores.ForeColor = System.Drawing.Color.OrangeRed; this.grpOperadores.Location = new System.Drawing.Point(15, 169); this.grpOperadores.Name = "grpOperadores"; this.grpOperadores.Size = new System.Drawing.Size(605, 154); this.grpOperadores.TabIndex = 0; this.grpOperadores.TabStop = false; this.grpOperadores.Text = "Main Buttons"; // // btnCerrar // this.btnCerrar.BackColor = System.Drawing.Color.OrangeRed; this.btnCerrar.Font = new System.Drawing.Font("Ink Free", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnCerrar.ForeColor = System.Drawing.Color.DarkBlue; this.btnCerrar.Image = ((System.Drawing.Image)(resources.GetObject("btnCerrar.Image"))); this.btnCerrar.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnCerrar.Location = new System.Drawing.Point(233, 105); this.btnCerrar.Name = "btnCerrar"; this.btnCerrar.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnCerrar.Size = new System.Drawing.Size(134, 42); this.btnCerrar.TabIndex = 4; this.btnCerrar.Text = "Cerrar"; this.btnCerrar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.btnCerrar.UseVisualStyleBackColor = false; this.btnCerrar.Click += new System.EventHandler(this.btnCerrar_Click); // // btnLimpiar // this.btnLimpiar.BackColor = System.Drawing.Color.OrangeRed; this.btnLimpiar.Font = new System.Drawing.Font("Ink Free", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnLimpiar.ForeColor = System.Drawing.Color.DarkBlue; this.btnLimpiar.Image = ((System.Drawing.Image)(resources.GetObject("btnLimpiar.Image"))); this.btnLimpiar.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnLimpiar.Location = new System.Drawing.Point(465, 104); this.btnLimpiar.Margin = new System.Windows.Forms.Padding(12); this.btnLimpiar.Name = "btnLimpiar"; this.btnLimpiar.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnLimpiar.Size = new System.Drawing.Size(134, 42); this.btnLimpiar.TabIndex = 5; this.btnLimpiar.Text = "Limpiar"; this.btnLimpiar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.btnLimpiar.UseVisualStyleBackColor = false; this.btnLimpiar.Click += new System.EventHandler(this.btnLimpiar_Click); // // btnOperar // this.btnOperar.BackColor = System.Drawing.Color.OrangeRed; this.btnOperar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.btnOperar.Font = new System.Drawing.Font("Ink Free", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnOperar.ForeColor = System.Drawing.Color.DarkBlue; this.btnOperar.Image = ((System.Drawing.Image)(resources.GetObject("btnOperar.Image"))); this.btnOperar.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnOperar.Location = new System.Drawing.Point(6, 104); this.btnOperar.Name = "btnOperar"; this.btnOperar.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.btnOperar.Size = new System.Drawing.Size(134, 42); this.btnOperar.TabIndex = 3; this.btnOperar.Text = "Operar"; this.btnOperar.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.btnOperar.UseVisualStyleBackColor = false; this.btnOperar.Click += new System.EventHandler(this.btnOperar_Click); // // cmbOperador // this.cmbOperador.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; this.cmbOperador.BackColor = System.Drawing.Color.DarkBlue; this.cmbOperador.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmbOperador.ForeColor = System.Drawing.Color.OrangeRed; this.cmbOperador.FormattingEnabled = true; this.cmbOperador.Items.AddRange(new object[] { "-", "*", "/", "+"}); this.cmbOperador.Location = new System.Drawing.Point(246, 30); this.cmbOperador.Name = "cmbOperador"; this.cmbOperador.Size = new System.Drawing.Size(110, 63); this.cmbOperador.Sorted = true; this.cmbOperador.TabIndex = 1; this.cmbOperador.Text = "-"; // // txtNumero2 // this.txtNumero2.BackColor = System.Drawing.Color.DarkBlue; this.txtNumero2.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtNumero2.ForeColor = System.Drawing.Color.OrangeRed; this.txtNumero2.Location = new System.Drawing.Point(502, 30); this.txtNumero2.Name = "txtNumero2"; this.txtNumero2.Size = new System.Drawing.Size(97, 62); this.txtNumero2.TabIndex = 2; // // txtNumero1 // this.txtNumero1.BackColor = System.Drawing.Color.DarkBlue; this.txtNumero1.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtNumero1.ForeColor = System.Drawing.Color.OrangeRed; this.txtNumero1.Location = new System.Drawing.Point(6, 30); this.txtNumero1.Name = "txtNumero1"; this.txtNumero1.Size = new System.Drawing.Size(97, 62); this.txtNumero1.TabIndex = 0; // // grpConvert // this.grpConvert.BackColor = System.Drawing.Color.Transparent; this.grpConvert.Controls.Add(this.grpLogoEsferas); this.grpConvert.Controls.Add(this.btnConvertirABinario); this.grpConvert.Controls.Add(this.btnConvertirADecimal); this.grpConvert.ForeColor = System.Drawing.Color.OrangeRed; this.grpConvert.Location = new System.Drawing.Point(15, 326); this.grpConvert.Name = "grpConvert"; this.grpConvert.Size = new System.Drawing.Size(605, 119); this.grpConvert.TabIndex = 0; this.grpConvert.TabStop = false; this.grpConvert.Text = "Convert Buttons"; // // grpLogoEsferas // this.grpLogoEsferas.BackColor = System.Drawing.Color.Transparent; this.grpLogoEsferas.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("grpLogoEsferas.BackgroundImage"))); this.grpLogoEsferas.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.grpLogoEsferas.ForeColor = System.Drawing.Color.DarkBlue; this.grpLogoEsferas.Location = new System.Drawing.Point(225, 19); this.grpLogoEsferas.Name = "grpLogoEsferas"; this.grpLogoEsferas.Size = new System.Drawing.Size(158, 94); this.grpLogoEsferas.TabIndex = 0; this.grpLogoEsferas.TabStop = false; // // btnConvertirABinario // this.btnConvertirABinario.BackColor = System.Drawing.Color.DarkBlue; this.btnConvertirABinario.Font = new System.Drawing.Font("Ink Free", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnConvertirABinario.ForeColor = System.Drawing.Color.OrangeRed; this.btnConvertirABinario.Image = ((System.Drawing.Image)(resources.GetObject("btnConvertirABinario.Image"))); this.btnConvertirABinario.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.btnConvertirABinario.Location = new System.Drawing.Point(7, 19); this.btnConvertirABinario.Name = "btnConvertirABinario"; this.btnConvertirABinario.Size = new System.Drawing.Size(196, 94); this.btnConvertirABinario.TabIndex = 6; this.btnConvertirABinario.Text = "Convertir a Binario"; this.btnConvertirABinario.UseVisualStyleBackColor = false; this.btnConvertirABinario.Click += new System.EventHandler(this.btnConvertirABinario_Click); // // btnConvertirADecimal // this.btnConvertirADecimal.BackColor = System.Drawing.Color.OrangeRed; this.btnConvertirADecimal.Font = new System.Drawing.Font("Ink Free", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnConvertirADecimal.ForeColor = System.Drawing.Color.DarkBlue; this.btnConvertirADecimal.Image = ((System.Drawing.Image)(resources.GetObject("btnConvertirADecimal.Image"))); this.btnConvertirADecimal.ImageAlign = System.Drawing.ContentAlignment.BottomCenter; this.btnConvertirADecimal.Location = new System.Drawing.Point(403, 19); this.btnConvertirADecimal.Name = "btnConvertirADecimal"; this.btnConvertirADecimal.Size = new System.Drawing.Size(196, 94); this.btnConvertirADecimal.TabIndex = 7; this.btnConvertirADecimal.Text = "Convertir a Decimal"; this.btnConvertirADecimal.UseVisualStyleBackColor = false; this.btnConvertirADecimal.Click += new System.EventHandler(this.btnConvertirADecimal_Click); // // grpResultado // this.grpResultado.BackColor = System.Drawing.Color.Transparent; this.grpResultado.Controls.Add(this.lblResultado); this.grpResultado.ForeColor = System.Drawing.Color.OrangeRed; this.grpResultado.Location = new System.Drawing.Point(270, 12); this.grpResultado.Name = "grpResultado"; this.grpResultado.Size = new System.Drawing.Size(350, 85); this.grpResultado.TabIndex = 0; this.grpResultado.TabStop = false; this.grpResultado.Text = "Display"; // // lblResultado // this.lblResultado.BackColor = System.Drawing.Color.OrangeRed; this.lblResultado.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.lblResultado.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.lblResultado.Font = new System.Drawing.Font("Ink Free", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblResultado.ForeColor = System.Drawing.Color.DarkBlue; this.lblResultado.Location = new System.Drawing.Point(6, 28); this.lblResultado.Name = "lblResultado"; this.lblResultado.RightToLeft = System.Windows.Forms.RightToLeft.No; this.lblResultado.Size = new System.Drawing.Size(330, 37); this.lblResultado.TabIndex = 0; this.lblResultado.Text = "Become a Hero!"; this.lblResultado.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // lblVersionApp // this.lblVersionApp.BackColor = System.Drawing.Color.OrangeRed; this.lblVersionApp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblVersionApp.ForeColor = System.Drawing.Color.DarkBlue; this.lblVersionApp.Image = ((System.Drawing.Image)(resources.GetObject("lblVersionApp.Image"))); this.lblVersionApp.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.lblVersionApp.Location = new System.Drawing.Point(432, 444); this.lblVersionApp.Name = "lblVersionApp"; this.lblVersionApp.RightToLeft = System.Windows.Forms.RightToLeft.No; this.lblVersionApp.Size = new System.Drawing.Size(161, 30); this.lblVersionApp.TabIndex = 8; this.lblVersionApp.Text = "Version: 2.5.0.2"; this.lblVersionApp.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // // btnPlayPause // this.btnPlayPause.AutoSize = true; this.btnPlayPause.BackColor = System.Drawing.Color.OrangeRed; this.btnPlayPause.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnPlayPause.ImageKey = "pause_icon.png"; this.btnPlayPause.ImageList = this.playerControlIcons; this.btnPlayPause.Location = new System.Drawing.Point(16, 14); this.btnPlayPause.Margin = new System.Windows.Forms.Padding(0); this.btnPlayPause.Name = "btnPlayPause"; this.btnPlayPause.Size = new System.Drawing.Size(40, 40); this.btnPlayPause.TabIndex = 0; this.btnPlayPause.TabStop = false; this.btnPlayPause.UseVisualStyleBackColor = false; this.btnPlayPause.Click += new System.EventHandler(this.btnPlayPause_Click); // // playerControlIcons // this.playerControlIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("playerControlIcons.ImageStream"))); this.playerControlIcons.TransparentColor = System.Drawing.Color.Transparent; this.playerControlIcons.Images.SetKeyName(0, "pause_icon.png"); this.playerControlIcons.Images.SetKeyName(1, "play_icon.png"); // // grpPlayer // this.grpPlayer.BackColor = System.Drawing.Color.Transparent; this.grpPlayer.Controls.Add(this.btnPlayPause); this.grpPlayer.ForeColor = System.Drawing.Color.OrangeRed; this.grpPlayer.Location = new System.Drawing.Point(15, 103); this.grpPlayer.Name = "grpPlayer"; this.grpPlayer.Size = new System.Drawing.Size(73, 63); this.grpPlayer.TabIndex = 9; this.grpPlayer.TabStop = false; this.grpPlayer.Text = "Mini Player"; // // FormCalculadora // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.WindowText; this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.ClientSize = new System.Drawing.Size(632, 475); this.Controls.Add(this.grpPlayer); this.Controls.Add(this.grpResultado); this.Controls.Add(this.grpConvert); this.Controls.Add(this.grpOperadores); this.Controls.Add(this.grpLogo); this.Controls.Add(this.lblVersionApp); this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FormCalculadora"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Calculadora de Facu Falcone - 2°D"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormCalculadora_FormClosing); this.Load += new System.EventHandler(this.FormCalculadora_Load); this.grpOperadores.ResumeLayout(false); this.grpOperadores.PerformLayout(); this.grpConvert.ResumeLayout(false); this.grpResultado.ResumeLayout(false); this.grpPlayer.ResumeLayout(false); this.grpPlayer.PerformLayout(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.GroupBox grpLogo; private System.Windows.Forms.GroupBox grpOperadores; private System.Windows.Forms.GroupBox grpConvert; private System.Windows.Forms.Button btnCerrar; private System.Windows.Forms.Button btnLimpiar; private System.Windows.Forms.ComboBox cmbOperador; private System.Windows.Forms.TextBox txtNumero2; private System.Windows.Forms.TextBox txtNumero1; private System.Windows.Forms.Button btnConvertirABinario; private System.Windows.Forms.Button btnConvertirADecimal; private System.Windows.Forms.GroupBox grpResultado; private System.Windows.Forms.Button btnOperar; private System.Windows.Forms.Label lblVersionApp; private System.Windows.Forms.Label lblResultado; private System.Windows.Forms.Button btnPlayPause; private System.Windows.Forms.ImageList playerControlIcons; private System.Windows.Forms.GroupBox grpPlayer; private System.Windows.Forms.GroupBox grpLogoEsferas; } }
57.921622
171
0.643087
[ "MIT" ]
caidevOficial/CSharp_UTN_LaboII
4_Trabajos_Practicos/TP_01_FacundoFalcone/TP_01_FacundoFalcone/FormCalculadora.Designer.cs
21,442
C#
using Kartverket.Register.Models; namespace Kartverket.Register.Services.Search { public interface ISearchService { SearchResult Search(SearchParameters parameters); Models.Register Search(Models.Register register, string text); } }
22
70
0.738636
[ "MIT" ]
kartverket/Geonorge.Register
Kartverket.Register/Services/Search/ISearchService.cs
266
C#
// Copyright (c) Martin Costello, 2017. All rights reserved. // Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information. using System.Net.Mime; using System.Text.Json; namespace MartinCostello.LondonTravel.Site; public static class HttpResponseMessageExtensions { public static async Task<JsonDocument> ReadAsJsonDocumentAsync(this HttpResponseMessage response) { response.Content.ShouldNotBeNull(); response.Content!.Headers.ContentType?.MediaType.ShouldBe(MediaTypeNames.Application.Json); response.Content.Headers.ContentLength.HasValue.ShouldBeTrue(); response.Content.Headers.ContentLength.Value.ShouldBeGreaterThan(0); var stream = await response.Content.ReadAsStreamAsync(); return await JsonDocument.ParseAsync(stream); } }
38.590909
112
0.767962
[ "Apache-2.0" ]
martincostello/alexa-london-travel-site
tests/LondonTravel.Site.Tests/HttpResponseMessageExtensions.cs
849
C#
using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.Text; namespace WcfServiceLibrary { // UWAGA: możesz użyć polecenia „Zmień nazwę” w menu „Refaktoryzuj”, aby zmienić nazwę interfejsu „IService1” w kodzie i pliku konfiguracji. [ServiceContract] public interface IService1 { [OperationContract] string GetData(int value); [OperationContract] CompositeType GetDataUsingDataContract(CompositeType composite); // TODO: dodaj tutaj operacje usługi } // Użyj kontraktu danych, jak pokazano w poniższym przykładzie, aby dodać typy złożone do operacji usługi. // Możesz dodać pliki XSD do projektu. Po skompilowaniu projektu możesz bezpośrednio użyć zdefiniowanych w nim typów danych w przestrzeni nazw „WcfServiceLibrary.ContractType”. [DataContract] public class CompositeType { bool boolValue = true; string stringValue = "Hello "; [DataMember] public bool BoolValue { get { return boolValue; } set { boolValue = value; } } [DataMember] public string StringValue { get { return stringValue; } set { stringValue = value; } } } [DataContract] public class LiczbaZ { string opis = "Liczba zespolona"; [DataMember] public double czescR; [DataMember] public double czescU; [DataMember] public string Opis { get { return opis; } set { opis = value; } } public LiczbaZ(double czesc_rz, double czesc_ur) { this.czescR = czesc_rz; this.czescU = czesc_ur; } } [ServiceContract] public interface IKalkulatorLZ { [OperationContract] LiczbaZ DodajLZ(LiczbaZ n1, LiczbaZ n2); } [ServiceContract] public interface IOWSerwis { [OperationContract(IsOneWay = true)] void Funkcja1(String s1); [OperationContract] void Funkcja2(String s2); } }
24.761364
180
0.615879
[ "MIT" ]
vkavetskyy/RSI
Lab_4/WcfServiceLibrary/IService1.cs
2,219
C#
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Collections.Generic; using Aliyun.Acs.Core; using Aliyun.Acs.Core.Http; using Aliyun.Acs.Core.Transform; using Aliyun.Acs.Core.Utils; using Aliyun.Acs.Iot.Transform; using Aliyun.Acs.Iot.Transform.V20180120; namespace Aliyun.Acs.Iot.Model.V20180120 { public class RRpcRequest : RpcAcsRequest<RRpcResponse> { public RRpcRequest() : base("Iot", "2018-01-20", "RRpc", "iot", "openAPI") { if (this.GetType().GetProperty("ProductEndpointMap") != null && this.GetType().GetProperty("ProductEndpointType") != null) { this.GetType().GetProperty("ProductEndpointMap").SetValue(this, Aliyun.Acs.Iot.Endpoint.endpointMap, null); this.GetType().GetProperty("ProductEndpointType").SetValue(this, Aliyun.Acs.Iot.Endpoint.endpointRegionalType, null); } Method = MethodType.POST; } private int? timeout; private string iotInstanceId; private string requestBase64Byte; private string productKey; private string topic; private string deviceName; public int? Timeout { get { return timeout; } set { timeout = value; DictionaryUtil.Add(QueryParameters, "Timeout", value.ToString()); } } public string IotInstanceId { get { return iotInstanceId; } set { iotInstanceId = value; DictionaryUtil.Add(QueryParameters, "IotInstanceId", value); } } public string RequestBase64Byte { get { return requestBase64Byte; } set { requestBase64Byte = value; DictionaryUtil.Add(QueryParameters, "RequestBase64Byte", value); } } public string ProductKey { get { return productKey; } set { productKey = value; DictionaryUtil.Add(QueryParameters, "ProductKey", value); } } public string Topic { get { return topic; } set { topic = value; DictionaryUtil.Add(QueryParameters, "Topic", value); } } public string DeviceName { get { return deviceName; } set { deviceName = value; DictionaryUtil.Add(QueryParameters, "DeviceName", value); } } public override RRpcResponse GetResponse(UnmarshallerContext unmarshallerContext) { return RRpcResponseUnmarshaller.Unmarshall(unmarshallerContext); } } }
23.52518
134
0.651376
[ "Apache-2.0" ]
AxiosCros/aliyun-openapi-net-sdk
aliyun-net-sdk-iot/Iot/Model/V20180120/RRpcRequest.cs
3,270
C#
using System.Text.RegularExpressions; namespace System { public static class ObjectExtensions { /// <summary> /// 安全获取值,当值为null时,不会抛出异常 /// </summary> /// <param name="value">可空值</param> //public static T SafeValue<T>(this T? value) where T : struct //{ // return value ?? default; //} /// <summary> /// 转换为字符串 /// </summary> /// <param name="obj"></param> /// <param name="removeQuote">是否删除首尾双引号</param> /// <returns></returns> public static string ToStr(this object obj, bool removeQuote = false) { if (obj == null || obj.Equals(null)) return string.Empty; if (!removeQuote) return obj.ToString(); var s = obj.ToString(); if (s.StartsWith("\"") && s.EndsWith("\"")) { s = s.Substring(1, s.Length - 2); return s; } if (s.StartsWith("\"")) { s = s.Substring(1); return s; } if (s.EndsWith("\"")) s = s.Substring(0, s.Length - 1); return s; } /// <summary> /// 转换为整型 /// </summary> /// <param name="obj"></param> /// <param name="defaultValue">转化失败的时候的默认值,默认为0</param> /// <param name="isRound">是否支持四舍五入,默认不支持</param> /// <returns></returns> public static int ToInt(this object obj, int defaultValue = 0, bool isRound = false) { int r; var s = obj.ToStr(); r = int.TryParse(s, out r) ? r : defaultValue; if (r == 0) return isRound ? Convert.ToInt32(s.ToFloat()) : (int)s.ToFloat(); //解决符合小数格式的字符串或者数值型错误转换为0 return r; } /// <summary> /// 转换为长整型 /// </summary> /// <param name="obj"></param> /// <param name="defaultValue">转化失败的时候的默认值,默认为0</param> /// <param name="isRound">是否支持四舍五入,默认不支持</param> /// <returns></returns> public static long ToInt64(this object obj, long defaultValue = 0, bool isRound = false) { long r; var s = obj.ToStr(); r = long.TryParse(s, out r) ? r : defaultValue; if (r == 0) return isRound ? Convert.ToInt64(s.ToFloat()) : (long)s.ToFloat(); //解决符合小数格式的字符串或者数值型错误转换为0 return r; } /// <summary> /// 转换为浮点数 /// </summary> /// <param name="obj"></param> /// <param name="defaultValue"></param> /// <returns></returns> public static float ToFloat(this object obj, float defaultValue = 0) { float r; return float.TryParse(obj.ToStr(), out r) ? r : defaultValue; } /// <summary> /// 转换为双精度型 /// </summary> /// <param name="obj"></param> /// <param name="defaultValue"></param> /// <returns></returns> public static double ToDouble(this object obj, double defaultValue = 0) { double r; return double.TryParse(obj.ToStr(), out r) ? r : defaultValue; } /// <summary> /// 转换为Decimal /// </summary> /// <param name="obj"></param> /// <param name="defaultValue"></param> /// <returns></returns> public static decimal ToDecimal(this object obj, decimal defaultValue = 0) { decimal r; return decimal.TryParse(obj.ToStr(), out r) ? r : defaultValue; } /// <summary> /// 转换为DateTime /// </summary> /// <param name="obj"></param> /// <returns></returns> public static DateTime ToDateTime(this object obj) { var r = obj.ToDateTime(new DateTime(1970, 1, 1)); if (r.HasValue) return (DateTime)r; return new DateTime(1970, 1, 1); } /// <summary> /// 转换为DateTime /// </summary> /// <param name="obj"></param> /// <param name="defaultValue"></param> /// <returns></returns> public static DateTime? ToDateTime(this object obj, DateTime? defaultValue) { if (obj == DBNull.Value || obj == null || obj.Equals("")) return defaultValue; var r = new DateTime(1970, 1, 1); if (obj is string) { string str = obj.ToString(); int len = str.Length; if (len < 8) return r; if (len == 8) { string y = str.Substring(0, 4); string m = Regex.Replace(str.Substring(4, 2), @"\D*", ""); string d = Regex.Replace(str.Substring(6, 2), @"\D*", ""); str = y + "-" + m + "-" + d; return DateTime.TryParse(str, out r) ? r : defaultValue; } } try { //return DateTime.TryParse(obj.ToString(), out r) ? r : defaultValue; 取消直接 .ToString(),会忽略掉毫秒 return Convert.ToDateTime(obj); } catch { return defaultValue; } } /// <summary> /// 转换为Boolean /// </summary> /// <param name="obj"></param> /// <param name="defaultValue"></param> /// <returns></returns> public static bool ToBoolean(this object obj, bool defaultValue = false) { string str = obj.ToStr(); if (str == "1" || str.ToLower() == "true") return true; bool r; return bool.TryParse(str, out r) ? r : defaultValue; } /// <summary> /// 转换为Guid /// </summary> /// <param name="obj">输入值</param> public static Guid ToGuid(this object obj) { var r = Guid.TryParse(obj.ToStr(), out var result) ? (Guid?)result : null; return r ?? Guid.Empty; } /// <summary> /// 将字符串转换成指定类型 /// </summary> /// <param name="str"></param> /// <param name="typeName"></param> /// <returns></returns> public static object ToObject(this string str, string typeName) { if (typeName.IsEmpty()) return ""; typeName = typeName.ToLower(); switch (typeName) { case "int": return str.ToInt(); case "long": return str.ToInt64(); case "double": return str.ToDouble(); case "float": return str.ToFloat(); case "decimal": return str.ToDecimal(); case "bool": return str.ToBoolean(); case "datetime": return str.ToDateTime(); default: return str.SafeTrim(); } } /// <summary> /// 将任意类型转换成Object /// </summary> /// <param name="obj"></param> /// <returns></returns> public static object ToObject(this object obj) { return (object)obj; } } }
32.042918
111
0.449237
[ "MIT" ]
mrh520/Orleans.Im
Orleans.Im.Common/Utils/ObjectExtensions.cs
7,886
C#
/* Company : Nequeo Pty Ltd, http://www.nequeo.com.au/ * Copyright : Copyright © Nequeo Pty Ltd 2012 http://www.nequeo.com.au/ * * File : * Purpose : * */ #region Nequeo Pty Ltd License /* 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. */ #endregion namespace Nequeo.Net.Core.Messaging { using System; /// <summary> /// Implemented by messages that have explicit recipients /// (direct requests and all indirect messages). /// </summary> public interface IDirectedProtocolMessage : IProtocolMessage { /// <summary> /// Gets the preferred method of transport for the message. /// </summary> /// <remarks> /// For indirect messages this will likely be GET+POST, which both can be simulated in the user agent: /// the GET with a simple 301 Redirect, and the POST with an HTML form in the response with javascript /// to automate submission. /// </remarks> HttpDeliveryMethods HttpMethods { get; } /// <summary> /// Gets the URL of the intended receiver of this message. /// </summary> Uri Recipient { get; } } }
35.583333
104
0.708197
[ "MIT" ]
nequeo/sockets
Nequeo.Net.Core/Nequeo.Net.Core/Core/Messaging/IDirectedProtocolMessage.cs
2,138
C#
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; namespace Pulumi.AzureNextGen.Insights.Inputs { /// <summary> /// The condition that results in the Log Search rule. /// </summary> public sealed class TriggerConditionArgs : Pulumi.ResourceArgs { /// <summary> /// Trigger condition for metric query rule /// </summary> [Input("metricTrigger")] public Input<Inputs.LogMetricTriggerArgs>? MetricTrigger { get; set; } /// <summary> /// Result or count threshold based on which rule should be triggered. /// </summary> [Input("threshold", required: true)] public Input<double> Threshold { get; set; } = null!; /// <summary> /// Evaluation operation for rule - 'GreaterThan' or 'LessThan. /// </summary> [Input("thresholdOperator", required: true)] public InputUnion<string, Pulumi.AzureNextGen.Insights.ConditionalOperator> ThresholdOperator { get; set; } = null!; public TriggerConditionArgs() { } } }
32.219512
124
0.63891
[ "Apache-2.0" ]
pulumi/pulumi-azure-nextgen
sdk/dotnet/Insights/Inputs/TriggerConditionArgs.cs
1,321
C#
using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.Wechat.Ads.Models { /// <summary> /// <para>表示 [GET] /targeting_tags/get 接口的请求。</para> /// </summary> public class TargetingTagsGetRequest : WechatAdsRequest { /// <summary> /// 获取或设置标签类型。 /// </summary> [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] public string TagType { get; set; } = string.Empty; } }
25.578947
59
0.621399
[ "MIT" ]
KimMeng2015/DotNetCore.SKIT.FlurlHttpClient.Wechat
src/SKIT.FlurlHttpClient.Wechat.Ads/Models/TargetingTags/TargetingTagsGetRequest.cs
524
C#
using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace iRocks.DataLayer { public interface IPostUrlRepository { IEnumerable<PostUrl> Select(object criteria = null, SQLKeyWord ConditionalKeyWord = null); void Insert(PostUrl obj); void Update(PostUrl obj); void Delete(PostUrl obj); } }
23.388889
98
0.714964
[ "MIT" ]
pyDez/SocialFootprintAPI
Data/iRocks.DataLayer/RepositoryInterfaces/IPostUrlRepository.cs
423
C#
using System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using UnityEngine; using UnityEngine.UIElements; namespace UnityEditor.Searcher { public enum ItemExpanderState { Hidden, Collapsed, Expanded } [PublicAPI] public interface ISearcherAdapter { VisualElement MakeItem(); VisualElement Bind(VisualElement target, SearcherItem item, ItemExpanderState expanderState, string text); string Title { get; } bool HasDetailsPanel { get; } bool AddAllChildResults { get; } bool MultiSelectEnabled { get; } float InitialSplitterDetailRatio { get; } void OnSelectionChanged(IEnumerable<SearcherItem> items); SearcherItem OnSearchResultsFilter(IEnumerable<SearcherItem> searchResults, string searchQuery); void InitDetailsPanel(VisualElement detailsPanel); } [PublicAPI] public class SearcherAdapter : ISearcherAdapter { const string k_EntryName = "smartSearchItem"; const int k_IndentDepthFactor = 15; readonly VisualTreeAsset m_DefaultItemTemplate; public virtual string Title { get; } public virtual bool HasDetailsPanel => true; public virtual bool AddAllChildResults => true; public virtual bool MultiSelectEnabled => false; Label m_DetailsLabel; public virtual float InitialSplitterDetailRatio => 1.0f; public SearcherAdapter(string title) { Title = title; m_DefaultItemTemplate = Resources.Load<VisualTreeAsset>("SearcherItem"); } public virtual VisualElement MakeItem() { // Create a visual element hierarchy for this search result. var item = m_DefaultItemTemplate.CloneTree(); return item; } public virtual VisualElement Bind(VisualElement element, SearcherItem item, ItemExpanderState expanderState, string query) { var indent = element.Q<VisualElement>("itemIndent"); indent.style.width = item.Depth * k_IndentDepthFactor; var expander = element.Q<VisualElement>("itemChildExpander"); var icon = expander.Query("expanderIcon").First(); icon.ClearClassList(); switch (expanderState) { case ItemExpanderState.Expanded: icon.AddToClassList("Expanded"); break; case ItemExpanderState.Collapsed: icon.AddToClassList("Collapsed"); break; } var nameLabelsContainer = element.Q<VisualElement>("labelsContainer"); nameLabelsContainer.Clear(); var iconElement = element.Q<VisualElement>("itemIconVisualElement"); iconElement.style.backgroundImage = item.Icon; if (item.Icon == null && item.CollapseEmptyIcon) { iconElement.style.display = DisplayStyle.None; } else { iconElement.style.display = DisplayStyle.Flex; } if (string.IsNullOrWhiteSpace(query)) nameLabelsContainer.Add(new Label(item.Name)); else SearcherHighlighter.HighlightTextBasedOnQuery(nameLabelsContainer, item.Name, query); element.userData = item; element.name = k_EntryName; return expander; } public virtual void InitDetailsPanel(VisualElement detailsPanel) { m_DetailsLabel = new Label(); detailsPanel.Add(m_DetailsLabel); } public virtual void OnSelectionChanged(IEnumerable<SearcherItem> items) { if (m_DetailsLabel != null) { var itemsList = items.ToList(); m_DetailsLabel.text = itemsList.Any() ? itemsList[0].Help : "No results"; } } // How to handle filtering and prioritization of search results is specific to clients of the searcher window // This callback is meant to be implemented by child classes of SearcherAdapter as they need public virtual SearcherItem OnSearchResultsFilter(IEnumerable<SearcherItem> searchResults, string searchQuery) { return new SearcherItem(""); } } }
34.162791
130
0.622192
[ "MIT" ]
PULSAR2105/Boids-Bug
Library/PackageCache/com.unity.searcher@4.9.1/Editor/Searcher/SearcherAdapter.cs
4,407
C#