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 |
|---|---|---|---|---|---|---|---|---|
// *** 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.Media.V20200501.Inputs
{
/// <summary>
/// Defines the common properties for all audio codecs.
/// </summary>
public sealed class AudioArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The bitrate, in bits per second, of the output encoded audio.
/// </summary>
[Input("bitrate")]
public Input<int>? Bitrate { get; set; }
/// <summary>
/// The number of channels in the audio.
/// </summary>
[Input("channels")]
public Input<int>? Channels { get; set; }
/// <summary>
/// An optional label for the codec. The label can be used to control muxing behavior.
/// </summary>
[Input("label")]
public Input<string>? Label { get; set; }
/// <summary>
/// The discriminator for derived types.
/// Expected value is '#Microsoft.Media.Audio'.
/// </summary>
[Input("odataType", required: true)]
public Input<string> OdataType { get; set; } = null!;
/// <summary>
/// The sampling rate to use for encoding in hertz.
/// </summary>
[Input("samplingRate")]
public Input<int>? SamplingRate { get; set; }
public AudioArgs()
{
}
}
}
| 29.703704 | 94 | 0.581671 | [
"Apache-2.0"
] | pulumi/pulumi-azure-nextgen | sdk/dotnet/Media/V20200501/Inputs/AudioArgs.cs | 1,604 | C# |
// <auto-generated />
namespace Infrastructure.DataAccess.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class AddedHelpText : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddedHelpText));
string IMigrationMetadata.Id
{
get { return "201611161337177_Added HelpText"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}
| 27.9 | 96 | 0.62724 | [
"MPL-2.0",
"MPL-2.0-no-copyleft-exception"
] | Strongminds/kitos | Infrastructure.DataAccess/Migrations/201611161337177_Added HelpText.Designer.cs | 837 | C# |
using System.IO;
using Microsoft.AspNetCore.Hosting;
namespace Contacts
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}
| 21.285714 | 64 | 0.516779 | [
"Unlicense"
] | daliaramos/Address | Program.cs | 447 | C# |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Azure.Core;
using Azure.Core.TestFramework;
using Azure.ResourceManager.Core;
using Castle.DynamicProxy;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace Azure.ResourceManager.TestFramework
{
public abstract class ManagementRecordedTestBase<TEnvironment> : RecordedTestBase<TEnvironment>
where TEnvironment: TestEnvironment, new()
{
protected ResourceGroupCleanupPolicy ResourceGroupCleanupPolicy = new ResourceGroupCleanupPolicy();
protected ResourceGroupCleanupPolicy OneTimeResourceGroupCleanupPolicy = new ResourceGroupCleanupPolicy();
protected ManagementGroupCleanupPolicy ManagementGroupCleanupPolicy = new ManagementGroupCleanupPolicy();
protected ManagementGroupCleanupPolicy OneTimeManagementGroupCleanupPolicy = new ManagementGroupCleanupPolicy();
protected ArmClient GlobalClient { get; private set; }
public TestEnvironment SessionEnvironment { get; private set; }
public TestRecording SessionRecording { get; private set; }
private ArmClient _cleanupClient;
protected ManagementRecordedTestBase(bool isAsync) : base(isAsync)
{
SessionEnvironment = new TEnvironment();
SessionEnvironment.Mode = Mode;
Initialize();
}
protected ManagementRecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode)
{
SessionEnvironment = new TEnvironment();
SessionEnvironment.Mode = Mode;
Initialize();
}
private void Initialize()
{
if (Mode == RecordedTestMode.Playback)
{
var pollField = typeof(OperationInternals).GetField("<DefaultPollingInterval>k__BackingField", BindingFlags.Static | BindingFlags.NonPublic);
pollField.SetValue(null, TimeSpan.Zero);
}
}
private ArmClient GetCleanupClient()
{
if (Mode != RecordedTestMode.Playback)
{
return new ArmClient(
TestEnvironment.SubscriptionId,
GetUri(TestEnvironment.ResourceManagerUrl),
TestEnvironment.Credential,
new ArmClientOptions());
}
return null;
}
protected TClient InstrumentClientExtension<TClient>(TClient client) => (TClient)InstrumentClient(typeof(TClient), client, new IInterceptor[] { new ManagementInterceptor(this) });
protected ArmClient GetArmClient(ArmClientOptions clientOptions = default)
{
var options = InstrumentClientOptions(clientOptions ?? new ArmClientOptions());
options.AddPolicy(ResourceGroupCleanupPolicy, HttpPipelinePosition.PerCall);
options.AddPolicy(ManagementGroupCleanupPolicy, HttpPipelinePosition.PerCall);
return CreateClient<ArmClient>(
TestEnvironment.SubscriptionId,
GetUri(TestEnvironment.ResourceManagerUrl),
TestEnvironment.Credential,
options);
}
private Uri GetUri(string endpoint)
{
return !string.IsNullOrEmpty(endpoint) ? new Uri(endpoint) : null;
}
[SetUp]
protected void CreateCleanupClient()
{
_cleanupClient ??= GetCleanupClient();
}
[TearDown]
protected void CleanupResourceGroups()
{
if (Mode != RecordedTestMode.Playback)
{
Parallel.ForEach(ResourceGroupCleanupPolicy.ResourceGroupsCreated, resourceGroup =>
{
try
{
var sub = _cleanupClient.GetSubscriptions().TryGet(TestEnvironment.SubscriptionId);
sub?.GetResourceGroups().Get(resourceGroup).Value.StartDelete();
}
catch (RequestFailedException e) when (e.Status == 404)
{
//we assume the test case cleaned it up if it no longer exists.
}
});
Parallel.ForEach(ManagementGroupCleanupPolicy.ManagementGroupsCreated, mgmtGroupId =>
{
try
{
_cleanupClient.GetManagementGroupOperations(mgmtGroupId).StartDelete();
}
catch (RequestFailedException e) when (e.Status == 404 || e.Status == 403)
{
//we assume the test case cleaned it up if it no longer exists.
}
});
}
}
private void StartSessionRecording()
{
// Only create test recordings for the latest version of the service
TestContext.TestAdapter test = TestContext.CurrentContext.Test;
if (Mode != RecordedTestMode.Live &&
test.Properties.ContainsKey("SkipRecordings"))
{
throw new IgnoreException((string)test.Properties.Get("SkipRecordings"));
}
SessionRecording = new TestRecording(Mode, GetSessionFilePath(), Sanitizer, Matcher);
SessionEnvironment.SetRecording(SessionRecording);
ValidateClientInstrumentation = SessionRecording.HasRequests;
}
protected void StopSessionRecording()
{
if (ValidateClientInstrumentation)
{
throw new InvalidOperationException("The test didn't instrument any clients but had recordings. Please call InstrumentClient for the client being recorded.");
}
SessionRecording?.Dispose(true);
GlobalClient = null;
}
[OneTimeSetUp]
public void OneTimeSetUp()
{
if (!HasOneTimeSetup())
return;
StartSessionRecording();
var options = InstrumentClientOptions(new ArmClientOptions(), SessionRecording);
options.AddPolicy(OneTimeResourceGroupCleanupPolicy, HttpPipelinePosition.PerCall);
options.AddPolicy(OneTimeManagementGroupCleanupPolicy, HttpPipelinePosition.PerCall);
GlobalClient = CreateClient<ArmClient>(
SessionEnvironment.SubscriptionId,
GetUri(SessionEnvironment.ResourceManagerUrl),
SessionEnvironment.Credential,
options);
}
private bool HasOneTimeSetup()
{
HashSet<Type> types = new HashSet<Type>();
Type type = GetType();
Type endType = typeof(ManagementRecordedTestBase<TEnvironment>);
while (type != endType)
{
types.Add(type);
type = type.BaseType;
}
var methods = GetType().GetMethods().Where(m => types.Contains(m.DeclaringType));
foreach (var method in methods)
{
foreach (var attr in method.GetCustomAttributes(false))
{
if (attr is OneTimeSetUpAttribute)
return true;
}
}
return false;
}
[OneTimeTearDown]
public void OneTimeCleanupResourceGroups()
{
if (Mode != RecordedTestMode.Playback)
{
Parallel.ForEach(OneTimeResourceGroupCleanupPolicy.ResourceGroupsCreated, resourceGroup =>
{
var sub = _cleanupClient.GetSubscriptions().TryGet(SessionEnvironment.SubscriptionId);
sub?.GetResourceGroups().Get(resourceGroup).Value.StartDelete();
});
Parallel.ForEach(OneTimeManagementGroupCleanupPolicy.ManagementGroupsCreated, mgmtGroupId =>
{
_cleanupClient.GetManagementGroupOperations(mgmtGroupId).StartDelete();
});
}
if (!(GlobalClient is null))
throw new InvalidOperationException("StopSessionRecording was never called please make sure you call that at the end of your OneTimeSetup");
}
protected override object InstrumentOperation(Type operationType, object operation)
{
return InstrumentMgmtOperation(operationType, operation, new ManagementInterceptor(this));
}
}
}
| 38.618834 | 187 | 0.602531 | [
"MIT"
] | OlhaTkachenko/azure-sdk-for-net | common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs | 8,612 | C# |
/*! \file
Copyright (C) 2016-2018 Verizon. 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.
*/
using System;
using System.Runtime.Serialization;
namespace AcUtils
{
/// <summary>
/// Exception thrown when an AccuRev command fails. The AccuRev program return value is <em>zero (0)</em> on
/// success and <em>one (1)</em> on failure unless otherwise noted in the documentation.
/// </summary>
/// <remarks>
/// When using AccuRev command processing functions [AcCommand.runAsync](@ref AcUtils#AcCommand#runAsync) and
/// [AcCommand.run](@ref AcUtils#AcCommand#run), ensure the correct logic is used to determine if an
/// AcUtilsException should be thrown based on AccuRev's program return value for the command and the version
/// of AccuRev in use. To do so, implement [ICmdValidate](@ref AcUtils#ICmdValidate) or override
/// [CmdValidate.isValid](@ref AcUtils#CmdValidate#isValid) and pass a reference to the object as the
/// [validator](@ref AcUtils#AcCommand) second function argument.
/// </remarks>
[Serializable]
public sealed class AcUtilsException : System.Exception
{
public AcUtilsException() : base()
{ }
public AcUtilsException(string command) : base(command)
{ }
public AcUtilsException(string command, Exception innerException)
: base(command, innerException)
{ }
public AcUtilsException(SerializationInfo serializationInfo, StreamingContext context)
: base(serializationInfo, context)
{ }
public override string Message
{
get { return base.Message; }
}
}
}
| 38.767857 | 114 | 0.699678 | [
"Apache-2.0"
] | Verizon/AcUtils | AcUtilsException.cs | 2,171 | C# |
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
namespace Neo
{
/// <summary>
/// Helper class for drawing text strings and sprites in one or more optimized batches.
/// </summary>
public class NeoBatch
{
readonly NeoBatcher _batcher;
Effect _effect;
Matrix _matrix;
Vector2 _texCoordTL = new Vector2(0, 0);
Vector2 _texCoordBR = new Vector2(0, 0);
Neo _neo;
GraphicsDevice _graphicsDevice;
/// <param name="graphicsDevice">The <see cref="GraphicsDevice"/>, which will be used for sprite rendering.</param>
/// <param name="capacity">The initial capacity of the internal array holding batch items (the value will be rounded to the next multiple of 64).</param>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="graphicsDevice"/> is null.</exception>
public NeoBatch(GraphicsDevice graphicsDevice, ContentManager content, Neo neo)
{
_neo = neo;
if (graphicsDevice == null)
{
throw new ArgumentNullException("graphicsDevice");
}
_graphicsDevice = graphicsDevice;
_effect = content.Load<Effect>("neo_shader");
_batcher = new NeoBatcher(graphicsDevice, _effect, 0);
CheckScreenResolution();
_graphicsDevice.BlendState = BlendState.AlphaBlend;
_graphicsDevice.DepthStencilState = DepthStencilState.None;
_graphicsDevice.RasterizerState = RasterizerState.CullNone;
_graphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;
}
float _lastScale = 0;
private Viewport _lastViewport;
private void CheckScreenResolution()
{
var vp = _graphicsDevice.Viewport;
if ((vp.Width != _lastViewport.Width) || (vp.Height != _lastViewport.Height) || _lastScale != _neo.Scale)
SetMatrix(vp);
}
public void ForceRefresh()
{
SetMatrix(_graphicsDevice.Viewport);
}
private void SetMatrix(Viewport vp)
{
Matrix.CreateOrthographicOffCenter(0, vp.Width / _neo.Scale, vp.Height / _neo.Scale, 0, 0, 1, out _matrix);
if (_graphicsDevice.UseHalfPixelOffset)
{
_matrix.M41 += -0.5f * _matrix.M11;
_matrix.M42 += -0.5f * _matrix.M22;
}
_lastViewport = vp;
_lastScale = _neo.Scale;
_effect.Parameters["MatrixTransform"].SetValue(_matrix);
}
public void DrawGlyph(Texture2D atlas, Rectangle destinationRectangle, float left, float bottom, float right, float top, Color color)
{
var ntop = atlas.Height - top;
var nbottom = atlas.Height - bottom;
NeoBatchItem item = _batcher.CreateBatchItem();
item.Texture = atlas;
_texCoordTL.X = left * (1f / (float)atlas.Width);
_texCoordTL.Y = ntop * (1f / (float)atlas.Height);
_texCoordBR.X = right * (1f / (float)atlas.Width);
_texCoordBR.Y = nbottom * (1f / (float)atlas.Height);
item.Set(destinationRectangle.X,
destinationRectangle.Y,
destinationRectangle.Width,
destinationRectangle.Height,
color,
_texCoordTL,
_texCoordBR);
item.Type = NeoBatchItem.ItemType.Glyph;
}
public void DrawString(string text, Vector2 position, float scale, Color color)
{
NeoFont font = _neo.DefaultFont;
if (text != null)
{
float advance = 0;
float row = 0;
for (var i = 0; i < text.Length; ++i)
{
char c = text[i];
if (c == ' ')
{
advance += 0.35f;
continue;
}
if (c == '\n')
{
row++;
advance = 0;
continue;
}
NeoGlyph g;
font.Glyphs.TryGetValue(c, out g);
Bounds gg = g.PlaneBounds * scale;
if (g != null)
{
DrawGlyph(font.Atlas, new Rectangle((int)(gg.Left + (advance * scale + position.X)), (int)(scale - gg.Top + position.Y + (row * 1 * scale)), (int)(gg.Right - gg.Left), (int)(gg.Top - gg.Bottom)),
g.AtlasBounds.Left, g.AtlasBounds.Bottom, g.AtlasBounds.Right, g.AtlasBounds.Top,
color);
advance += g.Advance;
}
}
}
}
public void End()
{
_batcher.DrawBatch();
}
void CheckValid(Texture2D texture)
{
if (texture == null)
throw new ArgumentNullException("texture");
}
/* void CheckValid(SpriteFont spriteFont, string text)
{
if (spriteFont == null)
throw new ArgumentNullException("spriteFont");
if (text == null)
throw new ArgumentNullException("text");
if (!_beginCalled)
throw new InvalidOperationException("DrawString was called, but Begin has not yet been called. Begin must be called successfully before you can call DrawString.");
}
void CheckValid(SpriteFont spriteFont, StringBuilder text)
{
if (spriteFont == null)
throw new ArgumentNullException("spriteFont");
if (text == null)
throw new ArgumentNullException("text");
if (!_beginCalled)
throw new InvalidOperationException("DrawString was called, but Begin has not yet been called. Begin must be called successfully before you can call DrawString.");
}*/
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="sourceRectangle">An optional region on the texture which will be rendered. If null - draws full texture.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this sprite.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="scale">A scaling of this sprite.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
/// <param name="layerDepth">A depth of the layer of this sprite.</param>
public void Draw(Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
{
CheckValid(texture);
var item = _batcher.CreateBatchItem();
item.Texture = texture;
origin = origin * scale;
float w, h;
if (sourceRectangle.HasValue)
{
var srcRect = sourceRectangle.GetValueOrDefault();
w = srcRect.Width * scale.X;
h = srcRect.Height * scale.Y;
_texCoordTL.X = srcRect.X * (1f / (float)texture.Width);
_texCoordTL.Y = srcRect.Y * (1f / (float)texture.Height);
_texCoordBR.X = (srcRect.X + srcRect.Width) * (1f / (float)texture.Width);
_texCoordBR.Y = (srcRect.Y + srcRect.Height) * (1f / (float)texture.Height);
}
else
{
w = texture.Width * scale.X;
h = texture.Height * scale.Y;
_texCoordTL = Vector2.Zero;
_texCoordBR = Vector2.One;
}
if ((effects & SpriteEffects.FlipVertically) != 0)
{
var temp = _texCoordBR.Y;
_texCoordBR.Y = _texCoordTL.Y;
_texCoordTL.Y = temp;
}
if ((effects & SpriteEffects.FlipHorizontally) != 0)
{
var temp = _texCoordBR.X;
_texCoordBR.X = _texCoordTL.X;
_texCoordTL.X = temp;
}
if (rotation == 0f)
{
item.Set(position.X - origin.X,
position.Y - origin.Y,
w,
h,
color,
_texCoordTL,
_texCoordBR);
}
else
{
item.Set(position.X,
position.Y,
-origin.X,
-origin.Y,
w,
h,
(float)Math.Sin(rotation),
(float)Math.Cos(rotation),
color,
_texCoordTL,
_texCoordBR);
}
}
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="sourceRectangle">An optional region on the texture which will be rendered. If null - draws full texture.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this sprite.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="scale">A scaling of this sprite.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
/// <param name="layerDepth">A depth of the layer of this sprite.</param>
public void Draw(Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
{
var scaleVec = new Vector2(scale, scale);
Draw(texture, position, sourceRectangle, color, rotation, origin, scaleVec, effects, layerDepth);
}
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="destinationRectangle">The drawing bounds on screen.</param>
/// <param name="sourceRectangle">An optional region on the texture which will be rendered. If null - draws full texture.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this sprite.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
public void Draw(Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects)
{
CheckValid(texture);
var item = _batcher.CreateBatchItem();
item.Texture = texture;
if (sourceRectangle.HasValue)
{
var srcRect = sourceRectangle.GetValueOrDefault();
_texCoordTL.X = srcRect.X * (1f / (float)texture.Width);
_texCoordTL.Y = srcRect.Y * (1f / (float)texture.Height);
_texCoordBR.X = (srcRect.X + srcRect.Width) * (1f / (float)texture.Width);
_texCoordBR.Y = (srcRect.Y + srcRect.Height) * (1f / (float)texture.Height);
if (srcRect.Width != 0)
origin.X = origin.X * (float)destinationRectangle.Width / (float)srcRect.Width;
else
origin.X = origin.X * (float)destinationRectangle.Width * (1f / (float)texture.Width);
if (srcRect.Height != 0)
origin.Y = origin.Y * (float)destinationRectangle.Height / (float)srcRect.Height;
else
origin.Y = origin.Y * (float)destinationRectangle.Height * (1f / (float)texture.Height);
}
else
{
_texCoordTL = Vector2.Zero;
_texCoordBR = Vector2.One;
origin.X = origin.X * (float)destinationRectangle.Width * (1f / (float)texture.Width);
origin.Y = origin.Y * (float)destinationRectangle.Height * (1f / (float)texture.Width);
}
if ((effects & SpriteEffects.FlipVertically) != 0)
{
var temp = _texCoordBR.Y;
_texCoordBR.Y = _texCoordTL.Y;
_texCoordTL.Y = temp;
}
if ((effects & SpriteEffects.FlipHorizontally) != 0)
{
var temp = _texCoordBR.X;
_texCoordBR.X = _texCoordTL.X;
_texCoordTL.X = temp;
}
if (rotation == 0f)
{
item.Set(destinationRectangle.X - origin.X,
destinationRectangle.Y - origin.Y,
destinationRectangle.Width,
destinationRectangle.Height,
color,
_texCoordTL,
_texCoordBR);
}
else
{
item.Set(destinationRectangle.X,
destinationRectangle.Y,
-origin.X,
-origin.Y,
destinationRectangle.Width,
destinationRectangle.Height,
(float)Math.Sin(rotation),
(float)Math.Cos(rotation),
color,
_texCoordTL,
_texCoordBR);
}
}
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="sourceRectangle">An optional region on the texture which will be rendered. If null - draws full texture.</param>
/// <param name="color">A color mask.</param>
public void Draw(Texture2D texture, Vector2 position, Rectangle? sourceRectangle, Color color)
{
CheckValid(texture);
var item = _batcher.CreateBatchItem();
item.Texture = texture;
Vector2 size;
if (sourceRectangle.HasValue)
{
var srcRect = sourceRectangle.GetValueOrDefault();
size = new Vector2(srcRect.Width, srcRect.Height);
_texCoordTL.X = srcRect.X * (1f / (float)texture.Width);
_texCoordTL.Y = srcRect.Y * (1f / (float)texture.Height);
_texCoordBR.X = (srcRect.X + srcRect.Width) * (1f / (float)texture.Width);
_texCoordBR.Y = (srcRect.Y + srcRect.Height) * (1f / (float)texture.Height);
}
else
{
size = new Vector2(texture.Width, texture.Height);
_texCoordTL = Vector2.Zero;
_texCoordBR = Vector2.One;
}
item.Set(position.X,
position.Y,
size.X,
size.Y,
color,
_texCoordTL,
_texCoordBR);
}
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="destinationRectangle">The drawing bounds on screen.</param>
/// <param name="sourceRectangle">An optional region on the texture which will be rendered. If null - draws full texture.</param>
/// <param name="color">A color mask.</param>
public void Draw(Texture2D texture, Rectangle destinationRectangle, Rectangle? sourceRectangle, Color color)
{
CheckValid(texture);
var item = _batcher.CreateBatchItem();
item.Texture = texture;
if (sourceRectangle.HasValue)
{
var srcRect = sourceRectangle.GetValueOrDefault();
_texCoordTL.X = srcRect.X * (1f / (float)texture.Width);
_texCoordTL.Y = srcRect.Y * (1f / (float)texture.Height);
_texCoordBR.X = (srcRect.X + srcRect.Width) * (1f / (float)texture.Width);
_texCoordBR.Y = (srcRect.Y + srcRect.Height) * (1f / (float)texture.Height);
}
else
{
_texCoordTL = Vector2.Zero;
_texCoordBR = Vector2.One;
}
item.Set(destinationRectangle.X,
destinationRectangle.Y,
destinationRectangle.Width,
destinationRectangle.Height,
color,
_texCoordTL,
_texCoordBR);
}
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
public void Draw(Texture2D texture, Vector2 position, Color color)
{
CheckValid(texture);
var item = _batcher.CreateBatchItem();
item.Texture = texture;
item.Set(position.X,
position.Y,
texture.Width,
texture.Height,
color,
Vector2.Zero,
Vector2.One);
}
/// <summary>
/// Submit a sprite for drawing in the current batch.
/// </summary>
/// <param name="texture">A texture.</param>
/// <param name="destinationRectangle">The drawing bounds on screen.</param>
/// <param name="color">A color mask.</param>
public void Draw(Texture2D texture, Rectangle destinationRectangle, Color color)
{
CheckValid(texture);
var item = _batcher.CreateBatchItem();
item.Texture = texture;
item.Set(destinationRectangle.X,
destinationRectangle.Y,
destinationRectangle.Width,
destinationRectangle.Height,
color,
Vector2.Zero,
Vector2.One);
}
/// <summary>
/// Submit a block for drawing in the current batch.
/// </summary>
public void Draw(Vector2 position, Vector2 size, Color color, float radius)
{
var item = _batcher.CreateBatchItem();
item.SetBlock(position.X,
position.Y,
size.X,
size.Y,
color,
Vector2.Zero,
Vector2.One,
radius);
}
/// <summary>
/// Submit a block for drawing in the current batch.
/// </summary>
public void Draw(Block block)
{
var item = _batcher.CreateBatchItem();
item.SetBlock(block.Position.X,
block.Position.Y,
block.Size.X,
block.Size.Y,
block.Color,
Vector2.Zero,
Vector2.One,
block.Radius);
}
/* /// <summary>
/// Submit a text string of sprites for drawing in the current batch.
/// </summary>
/// <param name="spriteFont">A font.</param>
/// <param name="text">The text which will be drawn.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
public unsafe void DrawString (SpriteFont spriteFont, string text, Vector2 position, Color color)
{
CheckValid(spriteFont, text);
// float sortKey = (_sortMode == SpriteSortMode.Texture) ? spriteFont.Texture.SortingKey : 0;
var offset = Vector2.Zero;
var firstGlyphOfLine = true;
fixed (SpriteFont.Glyph* pGlyphs = spriteFont.Glyphs)
for (var i = 0; i < text.Length; ++i)
{
var c = text[i];
if (c == '\r')
continue;
if (c == '\n')
{
offset.X = 0;
offset.Y += spriteFont.LineSpacing;
firstGlyphOfLine = true;
continue;
}
var currentGlyphIndex = spriteFont.GetGlyphIndexOrDefault(c);
var pCurrentGlyph = pGlyphs + currentGlyphIndex;
// The first character on a line might have a negative left side bearing.
// In this scenario, SpriteBatch/SpriteFont normally offset the text to the right,
// so that text does not hang off the left side of its rectangle.
if (firstGlyphOfLine)
{
offset.X = Math.Max(pCurrentGlyph->LeftSideBearing, 0);
firstGlyphOfLine = false;
}
else
{
offset.X += spriteFont.Spacing + pCurrentGlyph->LeftSideBearing;
}
var p = offset;
p.X += pCurrentGlyph->Cropping.X;
p.Y += pCurrentGlyph->Cropping.Y;
p += position;
var item = _batcher.CreateBatchItem();
item.Texture = spriteFont.Texture;
item.SortKey = sortKey;
_texCoordTL.X = pCurrentGlyph->BoundsInTexture.X * spriteFont.Texture.TexelWidth;
_texCoordTL.Y = pCurrentGlyph->BoundsInTexture.Y * spriteFont.Texture.TexelHeight;
_texCoordBR.X = (pCurrentGlyph->BoundsInTexture.X + pCurrentGlyph->BoundsInTexture.Width) * spriteFont.Texture.TexelWidth;
_texCoordBR.Y = (pCurrentGlyph->BoundsInTexture.Y + pCurrentGlyph->BoundsInTexture.Height) * spriteFont.Texture.TexelHeight;
item.Set(p.X,
p.Y,
pCurrentGlyph->BoundsInTexture.Width,
pCurrentGlyph->BoundsInTexture.Height,
color,
_texCoordTL,
_texCoordBR,
0);
offset.X += pCurrentGlyph->Width + pCurrentGlyph->RightSideBearing;
}
// We need to flush if we're using Immediate sort mode.
FlushIfNeeded();
}
/// <summary>
/// Submit a text string of sprites for drawing in the current batch.
/// </summary>
/// <param name="spriteFont">A font.</param>
/// <param name="text">The text which will be drawn.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this string.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="scale">A scaling of this string.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
/// <param name="layerDepth">A depth of the layer of this string.</param>
public void DrawString (
SpriteFont spriteFont, string text, Vector2 position, Color color,
float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
{
var scaleVec = new Vector2(scale, scale);
DrawString(spriteFont, text, position, color, rotation, origin, scaleVec, effects, layerDepth);
}
/// <summary>
/// Submit a text string of sprites for drawing in the current batch.
/// </summary>
/// <param name="spriteFont">A font.</param>
/// <param name="text">The text which will be drawn.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this string.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="scale">A scaling of this string.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
/// <param name="layerDepth">A depth of the layer of this string.</param>
public unsafe void DrawString (
SpriteFont spriteFont, string text, Vector2 position, Color color,
float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
{
CheckValid(spriteFont, text);
float sortKey = 0;
// set SortKey based on SpriteSortMode.
switch (_sortMode)
{
// Comparison of Texture objects.
case SpriteSortMode.Texture:
sortKey = spriteFont.Texture.SortingKey;
break;
// Comparison of Depth
case SpriteSortMode.FrontToBack:
sortKey = layerDepth;
break;
// Comparison of Depth in reverse
case SpriteSortMode.BackToFront:
sortKey = -layerDepth;
break;
}
var flipAdjustment = Vector2.Zero;
var flippedVert = (effects & SpriteEffects.FlipVertically) == SpriteEffects.FlipVertically;
var flippedHorz = (effects & SpriteEffects.FlipHorizontally) == SpriteEffects.FlipHorizontally;
if (flippedVert || flippedHorz)
{
Vector2 size;
var source = new SpriteFont.CharacterSource(text);
spriteFont.MeasureString(ref source, out size);
if (flippedHorz)
{
origin.X *= -1;
flipAdjustment.X = -size.X;
}
if (flippedVert)
{
origin.Y *= -1;
flipAdjustment.Y = spriteFont.LineSpacing - size.Y;
}
}
Matrix transformation = Matrix.Identity;
float cos = 0, sin = 0;
if (rotation == 0)
{
transformation.M11 = (flippedHorz ? -scale.X : scale.X);
transformation.M22 = (flippedVert ? -scale.Y : scale.Y);
transformation.M41 = ((flipAdjustment.X - origin.X) * transformation.M11) + position.X;
transformation.M42 = ((flipAdjustment.Y - origin.Y) * transformation.M22) + position.Y;
}
else
{
cos = (float)Math.Cos(rotation);
sin = (float)Math.Sin(rotation);
transformation.M11 = (flippedHorz ? -scale.X : scale.X) * cos;
transformation.M12 = (flippedHorz ? -scale.X : scale.X) * sin;
transformation.M21 = (flippedVert ? -scale.Y : scale.Y) * (-sin);
transformation.M22 = (flippedVert ? -scale.Y : scale.Y) * cos;
transformation.M41 = (((flipAdjustment.X - origin.X) * transformation.M11) + (flipAdjustment.Y - origin.Y) * transformation.M21) + position.X;
transformation.M42 = (((flipAdjustment.X - origin.X) * transformation.M12) + (flipAdjustment.Y - origin.Y) * transformation.M22) + position.Y;
}
var offset = Vector2.Zero;
var firstGlyphOfLine = true;
fixed (SpriteFont.Glyph* pGlyphs = spriteFont.Glyphs)
for (var i = 0; i < text.Length; ++i)
{
var c = text[i];
if (c == '\r')
continue;
if (c == '\n')
{
offset.X = 0;
offset.Y += spriteFont.LineSpacing;
firstGlyphOfLine = true;
continue;
}
var currentGlyphIndex = spriteFont.GetGlyphIndexOrDefault(c);
var pCurrentGlyph = pGlyphs + currentGlyphIndex;
// The first character on a line might have a negative left side bearing.
// In this scenario, SpriteBatch/SpriteFont normally offset the text to the right,
// so that text does not hang off the left side of its rectangle.
if (firstGlyphOfLine)
{
offset.X = Math.Max(pCurrentGlyph->LeftSideBearing, 0);
firstGlyphOfLine = false;
}
else
{
offset.X += spriteFont.Spacing + pCurrentGlyph->LeftSideBearing;
}
var p = offset;
if (flippedHorz)
p.X += pCurrentGlyph->BoundsInTexture.Width;
p.X += pCurrentGlyph->Cropping.X;
if (flippedVert)
p.Y += pCurrentGlyph->BoundsInTexture.Height - spriteFont.LineSpacing;
p.Y += pCurrentGlyph->Cropping.Y;
Vector2.Transform(ref p, ref transformation, out p);
var item = _batcher.CreateBatchItem();
item.Texture = spriteFont.Texture;
item.SortKey = sortKey;
_texCoordTL.X = pCurrentGlyph->BoundsInTexture.X * spriteFont.Texture.TexelWidth;
_texCoordTL.Y = pCurrentGlyph->BoundsInTexture.Y * spriteFont.Texture.TexelHeight;
_texCoordBR.X = (pCurrentGlyph->BoundsInTexture.X + pCurrentGlyph->BoundsInTexture.Width) * spriteFont.Texture.TexelWidth;
_texCoordBR.Y = (pCurrentGlyph->BoundsInTexture.Y + pCurrentGlyph->BoundsInTexture.Height) * spriteFont.Texture.TexelHeight;
if ((effects & SpriteEffects.FlipVertically) != 0)
{
var temp = _texCoordBR.Y;
_texCoordBR.Y = _texCoordTL.Y;
_texCoordTL.Y = temp;
}
if ((effects & SpriteEffects.FlipHorizontally) != 0)
{
var temp = _texCoordBR.X;
_texCoordBR.X = _texCoordTL.X;
_texCoordTL.X = temp;
}
if (rotation == 0f)
{
item.Set(p.X,
p.Y,
pCurrentGlyph->BoundsInTexture.Width * scale.X,
pCurrentGlyph->BoundsInTexture.Height * scale.Y,
color,
_texCoordTL,
_texCoordBR,
layerDepth);
}
else
{
item.Set(p.X,
p.Y,
0,
0,
pCurrentGlyph->BoundsInTexture.Width * scale.X,
pCurrentGlyph->BoundsInTexture.Height * scale.Y,
sin,
cos,
color,
_texCoordTL,
_texCoordBR,
layerDepth);
}
offset.X += pCurrentGlyph->Width + pCurrentGlyph->RightSideBearing;
}
// We need to flush if we're using Immediate sort mode.
FlushIfNeeded();
}
/// <summary>
/// Submit a text string of sprites for drawing in the current batch.
/// </summary>
/// <param name="spriteFont">A font.</param>
/// <param name="text">The text which will be drawn.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
public unsafe void DrawString (SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color)
{
CheckValid(spriteFont, text);
float sortKey = (_sortMode == SpriteSortMode.Texture) ? spriteFont.Texture.SortingKey : 0;
var offset = Vector2.Zero;
var firstGlyphOfLine = true;
fixed (SpriteFont.Glyph* pGlyphs = spriteFont.Glyphs)
for (var i = 0; i < text.Length; ++i)
{
var c = text[i];
if (c == '\r')
continue;
if (c == '\n')
{
offset.X = 0;
offset.Y += spriteFont.LineSpacing;
firstGlyphOfLine = true;
continue;
}
var currentGlyphIndex = spriteFont.GetGlyphIndexOrDefault(c);
var pCurrentGlyph = pGlyphs + currentGlyphIndex;
// The first character on a line might have a negative left side bearing.
// In this scenario, SpriteBatch/SpriteFont normally offset the text to the right,
// so that text does not hang off the left side of its rectangle.
if (firstGlyphOfLine)
{
offset.X = Math.Max(pCurrentGlyph->LeftSideBearing, 0);
firstGlyphOfLine = false;
}
else
{
offset.X += spriteFont.Spacing + pCurrentGlyph->LeftSideBearing;
}
var p = offset;
p.X += pCurrentGlyph->Cropping.X;
p.Y += pCurrentGlyph->Cropping.Y;
p += position;
var item = _batcher.CreateBatchItem();
item.Texture = spriteFont.Texture;
item.SortKey = sortKey;
_texCoordTL.X = pCurrentGlyph->BoundsInTexture.X * spriteFont.Texture.TexelWidth;
_texCoordTL.Y = pCurrentGlyph->BoundsInTexture.Y * spriteFont.Texture.TexelHeight;
_texCoordBR.X = (pCurrentGlyph->BoundsInTexture.X + pCurrentGlyph->BoundsInTexture.Width) * spriteFont.Texture.TexelWidth;
_texCoordBR.Y = (pCurrentGlyph->BoundsInTexture.Y + pCurrentGlyph->BoundsInTexture.Height) * spriteFont.Texture.TexelHeight;
item.Set(p.X,
p.Y,
pCurrentGlyph->BoundsInTexture.Width,
pCurrentGlyph->BoundsInTexture.Height,
color,
_texCoordTL,
_texCoordBR,
0);
offset.X += pCurrentGlyph->Width + pCurrentGlyph->RightSideBearing;
}
// We need to flush if we're using Immediate sort mode.
FlushIfNeeded();
}
/// <summary>
/// Submit a text string of sprites for drawing in the current batch.
/// </summary>
/// <param name="spriteFont">A font.</param>
/// <param name="text">The text which will be drawn.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this string.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="scale">A scaling of this string.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
/// <param name="layerDepth">A depth of the layer of this string.</param>
public void DrawString (
SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color,
float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
{
var scaleVec = new Vector2 (scale, scale);
DrawString(spriteFont, text, position, color, rotation, origin, scaleVec, effects, layerDepth);
}
/// <summary>
/// Submit a text string of sprites for drawing in the current batch.
/// </summary>
/// <param name="spriteFont">A font.</param>
/// <param name="text">The text which will be drawn.</param>
/// <param name="position">The drawing location on screen.</param>
/// <param name="color">A color mask.</param>
/// <param name="rotation">A rotation of this string.</param>
/// <param name="origin">Center of the rotation. 0,0 by default.</param>
/// <param name="scale">A scaling of this string.</param>
/// <param name="effects">Modificators for drawing. Can be combined.</param>
/// <param name="layerDepth">A depth of the layer of this string.</param>
public unsafe void DrawString (
SpriteFont spriteFont, StringBuilder text, Vector2 position, Color color,
float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
{
CheckValid(spriteFont, text);
float sortKey = 0;
// set SortKey based on SpriteSortMode.
switch (_sortMode)
{
// Comparison of Texture objects.
case SpriteSortMode.Texture:
sortKey = spriteFont.Texture.SortingKey;
break;
// Comparison of Depth
case SpriteSortMode.FrontToBack:
sortKey = layerDepth;
break;
// Comparison of Depth in reverse
case SpriteSortMode.BackToFront:
sortKey = -layerDepth;
break;
}
var flipAdjustment = Vector2.Zero;
var flippedVert = (effects & SpriteEffects.FlipVertically) == SpriteEffects.FlipVertically;
var flippedHorz = (effects & SpriteEffects.FlipHorizontally) == SpriteEffects.FlipHorizontally;
if (flippedVert || flippedHorz)
{
var source = new SpriteFont.CharacterSource(text);
Vector2 size;
spriteFont.MeasureString(ref source, out size);
if (flippedHorz)
{
origin.X *= -1;
flipAdjustment.X = -size.X;
}
if (flippedVert)
{
origin.Y *= -1;
flipAdjustment.Y = spriteFont.LineSpacing - size.Y;
}
}
Matrix transformation = Matrix.Identity;
float cos = 0, sin = 0;
if (rotation == 0)
{
transformation.M11 = (flippedHorz ? -scale.X : scale.X);
transformation.M22 = (flippedVert ? -scale.Y : scale.Y);
transformation.M41 = ((flipAdjustment.X - origin.X) * transformation.M11) + position.X;
transformation.M42 = ((flipAdjustment.Y - origin.Y) * transformation.M22) + position.Y;
}
else
{
cos = (float)Math.Cos(rotation);
sin = (float)Math.Sin(rotation);
transformation.M11 = (flippedHorz ? -scale.X : scale.X) * cos;
transformation.M12 = (flippedHorz ? -scale.X : scale.X) * sin;
transformation.M21 = (flippedVert ? -scale.Y : scale.Y) * (-sin);
transformation.M22 = (flippedVert ? -scale.Y : scale.Y) * cos;
transformation.M41 = (((flipAdjustment.X - origin.X) * transformation.M11) + (flipAdjustment.Y - origin.Y) * transformation.M21) + position.X;
transformation.M42 = (((flipAdjustment.X - origin.X) * transformation.M12) + (flipAdjustment.Y - origin.Y) * transformation.M22) + position.Y;
}
var offset = Vector2.Zero;
var firstGlyphOfLine = true;
fixed (SpriteFont.Glyph* pGlyphs = spriteFont.Glyphs)
for (var i = 0; i < text.Length; ++i)
{
var c = text[i];
if (c == '\r')
continue;
if (c == '\n')
{
offset.X = 0;
offset.Y += spriteFont.LineSpacing;
firstGlyphOfLine = true;
continue;
}
var currentGlyphIndex = spriteFont.GetGlyphIndexOrDefault(c);
var pCurrentGlyph = pGlyphs + currentGlyphIndex;
// The first character on a line might have a negative left side bearing.
// In this scenario, SpriteBatch/SpriteFont normally offset the text to the right,
// so that text does not hang off the left side of its rectangle.
if (firstGlyphOfLine)
{
offset.X = Math.Max(pCurrentGlyph->LeftSideBearing, 0);
firstGlyphOfLine = false;
}
else
{
offset.X += spriteFont.Spacing + pCurrentGlyph->LeftSideBearing;
}
var p = offset;
if (flippedHorz)
p.X += pCurrentGlyph->BoundsInTexture.Width;
p.X += pCurrentGlyph->Cropping.X;
if (flippedVert)
p.Y += pCurrentGlyph->BoundsInTexture.Height - spriteFont.LineSpacing;
p.Y += pCurrentGlyph->Cropping.Y;
Vector2.Transform(ref p, ref transformation, out p);
var item = _batcher.CreateBatchItem();
item.Texture = spriteFont.Texture;
item.SortKey = sortKey;
_texCoordTL.X = pCurrentGlyph->BoundsInTexture.X * (float)spriteFont.Texture.TexelWidth;
_texCoordTL.Y = pCurrentGlyph->BoundsInTexture.Y * (float)spriteFont.Texture.TexelHeight;
_texCoordBR.X = (pCurrentGlyph->BoundsInTexture.X + pCurrentGlyph->BoundsInTexture.Width) * (float)spriteFont.Texture.TexelWidth;
_texCoordBR.Y = (pCurrentGlyph->BoundsInTexture.Y + pCurrentGlyph->BoundsInTexture.Height) * (float)spriteFont.Texture.TexelHeight;
if ((effects & SpriteEffects.FlipVertically) != 0)
{
var temp = _texCoordBR.Y;
_texCoordBR.Y = _texCoordTL.Y;
_texCoordTL.Y = temp;
}
if ((effects & SpriteEffects.FlipHorizontally) != 0)
{
var temp = _texCoordBR.X;
_texCoordBR.X = _texCoordTL.X;
_texCoordTL.X = temp;
}
if (rotation == 0f)
{
item.Set(p.X,
p.Y,
pCurrentGlyph->BoundsInTexture.Width * scale.X,
pCurrentGlyph->BoundsInTexture.Height * scale.Y,
color,
_texCoordTL,
_texCoordBR,
layerDepth);
}
else
{
item.Set(p.X,
p.Y,
0,
0,
pCurrentGlyph->BoundsInTexture.Width * scale.X,
pCurrentGlyph->BoundsInTexture.Height * scale.Y,
sin,
cos,
color,
_texCoordTL,
_texCoordBR,
layerDepth);
}
offset.X += pCurrentGlyph->Width + pCurrentGlyph->RightSideBearing;
}
// We need to flush if we're using Immediate sort mode.
FlushIfNeeded();
}*/
}
}
| 45.420465 | 219 | 0.467979 | [
"MIT"
] | daglundberg/neo | Neo/NeoBatch.cs | 48,827 | C# |
using System;
namespace Lxdn.Core.Expressions.Exceptions
{
public abstract class ExpressionException : ApplicationException
{
protected ExpressionException(string message) : base(message) {}
protected ExpressionException(string message, Exception inner) : base(message, inner) { }
}
}
| 24.307692 | 97 | 0.727848 | [
"MIT"
] | lxdotnet/lxd-core | Lxdn.Core.Expressions/Exceptions/ExpressionException.cs | 316 | C# |
using System;
using System.Runtime.InteropServices;
using System.Globalization;
namespace WinSCP
{
[Guid("59B362D6-7FD3-4EF0-A3B6-E3244F793778")]
[ClassInterface(Constants.ClassInterface)]
[ComVisible(true)]
public sealed class SessionLocalException : SessionException
{
internal SessionLocalException(Session session, string message) :
base(session, message)
{
}
internal SessionLocalException(Session session, string message, Exception innerException) :
base(session, message, innerException)
{
}
internal static SessionLocalException CreateElementNotFound(Session session, string localName)
{
return new SessionLocalException(session, string.Format(CultureInfo.CurrentCulture, "Element \"{0}\" not found in the log file", localName));
}
}
}
| 31.428571 | 153 | 0.6875 | [
"Apache-2.0"
] | danelkhen/fsync | lib-src/winscp/dotnet/SessionLocalException.cs | 882 | C# |
using System;
namespace UserService.Core.Entity
{
public class ContractSettingPropperty : BaseEntity
{
public string ContractName { get; set; }
public byte Position { get; set; }
public Guid ContractSettingLineId { get; set; }
public ContractSettingLine ContractSettingLine { get; set; }
}
}
| 22.666667 | 68 | 0.667647 | [
"Apache-2.0"
] | BergenIt/user-service | UserService.Core/UserService.Core/DataPackage/Entities/ContractSettingPropperty.cs | 342 | C# |
using System;
using System.Collections.Generic;
namespace SteamLib.Models
{
public class SteamReport : ISteamReport
{
private const string EventIDPrefix = "SteamReport_";
private const string EventIDSuffix = "";
public SteamReport()
{
Sessions = new List<GamingSession>();
}
public long UserID { get; set; }
public long ID { get; set; }
public long? FilterSetID { get; set; }
public long SubscriptionID { get; set; }
public bool Enabled { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
public DateTime LastModified { get; set; }
public DateTime LastGenerated { get; set; }
public ISteamReportFilterSet FilterSet { get; set; }
public IList<GamingSession> Sessions { get; set; }
public static string GetPublicID(long id)
{
var publicID = string.Format("{0}{1}{2}", EventIDPrefix, id, EventIDSuffix);
return publicID;
}
public static long ParsePublicID(string publicID)
{
long id;
if (!long.TryParse(publicID, out id))
{
publicID = (publicID ?? "");
if (publicID.StartsWith(EventIDPrefix, StringComparison.OrdinalIgnoreCase))
publicID = publicID.Remove(0, EventIDPrefix.Length);
if (publicID.EndsWith(EventIDSuffix, StringComparison.OrdinalIgnoreCase))
publicID = publicID.Remove(publicID.Length - EventIDSuffix.Length, EventIDSuffix.Length);
if (!long.TryParse(publicID, out id))
throw new FormatException(string.Format("Invalid '{0}' id format, Input: '{1}'", typeof(SteamReport).Name, publicID));
}
return id;
}
}
}
| 34.491228 | 138 | 0.584944 | [
"MIT"
] | LazyTarget/MyLife | Libraries/Steam/SteamLib.Models/Models/SteamReport.cs | 1,968 | C# |
using System;
using System.Collections.Generic;
using Equinox.Domain.Core.Events;
namespace Equinox.Infra.EventBus.Repository
{
public interface IEventStoreRepository : IDisposable
{
void Store(StoredEvent theEvent);
IList<StoredEvent> All(string aggregateId);
}
} | 24.5 | 56 | 0.741497 | [
"MIT"
] | Godricm/EquinoxProject | Equinox.Infra.EventBus/Repository/IEventStoreRepository.cs | 296 | C# |
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Foundatio.Metrics;
using Foundatio.Utility;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
namespace Foundatio.Queues {
public class MetricsQueueBehavior<T> : QueueBehaviorBase<T> where T : class {
private readonly string _metricsPrefix;
private readonly IMetricsClient _metricsClient;
private readonly ILogger _logger;
private readonly ScheduledTimer _timer;
private readonly TimeSpan _reportInterval;
public MetricsQueueBehavior(IMetricsClient metrics, string metricsPrefix = null, TimeSpan? reportCountsInterval = null, ILoggerFactory loggerFactory = null) {
_logger = loggerFactory?.CreateLogger<MetricsQueueBehavior<T>>() ?? NullLogger<MetricsQueueBehavior<T>>.Instance;
_metricsClient = metrics ?? NullMetricsClient.Instance;
if (!reportCountsInterval.HasValue)
reportCountsInterval = TimeSpan.FromMilliseconds(500);
_reportInterval = reportCountsInterval.Value > TimeSpan.Zero ? reportCountsInterval.Value : TimeSpan.FromMilliseconds(250);
if (!String.IsNullOrEmpty(metricsPrefix) && !metricsPrefix.EndsWith("."))
metricsPrefix += ".";
metricsPrefix += typeof(T).Name.ToLowerInvariant();
_metricsPrefix = metricsPrefix;
_timer = new ScheduledTimer(ReportQueueCountAsync, loggerFactory: loggerFactory);
}
private async Task<DateTime?> ReportQueueCountAsync() {
try {
var stats = await _queue.GetQueueStatsAsync().AnyContext();
_logger.LogTrace("Reporting queue count");
_metricsClient.Gauge(GetFullMetricName("count"), stats.Queued);
_metricsClient.Gauge(GetFullMetricName("working"), stats.Working);
_metricsClient.Gauge(GetFullMetricName("deadletter"), stats.Deadletter);
} catch (Exception ex) {
_logger.LogError(ex, "Error reporting queue metrics.");
}
return null;
}
protected override Task OnEnqueued(object sender, EnqueuedEventArgs<T> enqueuedEventArgs) {
_timer.ScheduleNext(SystemClock.UtcNow.Add(_reportInterval));
string subMetricName = GetSubMetricName(enqueuedEventArgs.Entry.Value);
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Counter(GetFullMetricName(subMetricName, "enqueued"));
_metricsClient.Counter(GetFullMetricName("enqueued"));
return Task.CompletedTask;
}
protected override Task OnDequeued(object sender, DequeuedEventArgs<T> dequeuedEventArgs) {
_timer.ScheduleNext(SystemClock.UtcNow.Add(_reportInterval));
var metadata = dequeuedEventArgs.Entry as IQueueEntryMetadata;
string subMetricName = GetSubMetricName(dequeuedEventArgs.Entry.Value);
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Counter(GetFullMetricName(subMetricName, "dequeued"));
_metricsClient.Counter(GetFullMetricName("dequeued"));
if (metadata == null || metadata.EnqueuedTimeUtc == DateTime.MinValue || metadata.DequeuedTimeUtc == DateTime.MinValue)
return Task.CompletedTask;
var start = metadata.EnqueuedTimeUtc;
var end = metadata.DequeuedTimeUtc;
int time = (int)(end - start).TotalMilliseconds;
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Timer(GetFullMetricName(subMetricName, "queuetime"), time);
_metricsClient.Timer(GetFullMetricName("queuetime"), time);
return Task.CompletedTask;
}
protected override Task OnCompleted(object sender, CompletedEventArgs<T> completedEventArgs) {
_timer.ScheduleNext(SystemClock.UtcNow.Add(_reportInterval));
if (!(completedEventArgs.Entry is IQueueEntryMetadata metadata))
return Task.CompletedTask;
string subMetricName = GetSubMetricName(completedEventArgs.Entry.Value);
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Counter(GetFullMetricName(subMetricName, "completed"));
_metricsClient.Counter(GetFullMetricName("completed"));
int time = (int)metadata.ProcessingTime.TotalMilliseconds;
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Timer(GetFullMetricName(subMetricName, "processtime"), time);
_metricsClient.Timer(GetFullMetricName("processtime"), time);
return Task.CompletedTask;
}
protected override Task OnAbandoned(object sender, AbandonedEventArgs<T> abandonedEventArgs) {
_timer.ScheduleNext(SystemClock.UtcNow.Add(_reportInterval));
if (!(abandonedEventArgs.Entry is IQueueEntryMetadata metadata))
return Task.CompletedTask;
string subMetricName = GetSubMetricName(abandonedEventArgs.Entry.Value);
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Counter(GetFullMetricName(subMetricName, "abandoned"));
_metricsClient.Counter(GetFullMetricName("abandoned"));
int time = (int)metadata.ProcessingTime.TotalMilliseconds;
if (!String.IsNullOrEmpty(subMetricName))
_metricsClient.Timer(GetFullMetricName(subMetricName, "processtime"), time);
_metricsClient.Timer(GetFullMetricName("processtime"), time);
return Task.CompletedTask;
}
protected string GetSubMetricName(T data) {
var haveStatName = data as IHaveSubMetricName;
return haveStatName?.GetSubMetricName();
}
protected string GetFullMetricName(string name) {
return String.Concat(_metricsPrefix, ".", name);
}
protected string GetFullMetricName(string customMetricName, string name) {
return String.IsNullOrEmpty(customMetricName) ? GetFullMetricName(name) : String.Concat(_metricsPrefix, ".", customMetricName.ToLower(), ".", name);
}
public override void Dispose() {
_timer?.Dispose();
base.Dispose();
}
}
} | 46.49635 | 166 | 0.671115 | [
"Apache-2.0"
] | VFox-50ShadesOfMicrosoft/Foundatio | src/Foundatio/Queues/MetricsQueueBehavior.cs | 6,370 | C# |
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Mellowood.Migrations
{
public partial class addCMS : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AppContents",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
ContentId = table.Column<int>(nullable: false),
Title = table.Column<string>(maxLength: 256, nullable: false),
Description = table.Column<string>(maxLength: 65536, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AppContents", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AppContents");
}
}
}
| 35.393939 | 122 | 0.5625 | [
"MIT"
] | Carben-dev/Mellowood | src/Mellowood.EntityFrameworkCore/Migrations/20200224134938_add CMS.cs | 1,170 | C# |
using Content.Server.Body;
using Content.Server.Body.Mechanism;
using Content.Server.Body.Part;
using Content.Shared.Administration;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
namespace Content.Server.Administration.Commands
{
[AdminCommand(AdminFlags.Fun)]
public class RemoveMechanismCommand : IConsoleCommand
{
public string Command => "rmmechanism";
public string Description => "Removes a given entity from it's containing bodypart, if any.";
public string Help => "Usage: rmmechanism <uid>";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
shell.WriteError(Loc.GetString("shell-wrong-arguments-number"));
return;
}
if (!EntityUid.TryParse(args[0], out var entityUid))
{
shell.WriteError(Loc.GetString("shell-entity-uid-must-be-number"));
return;
}
var entityManager = IoCManager.Resolve<IEntityManager>();
if (!entityManager.TryGetComponent<ITransformComponent>(entityUid, out var transform)) return;
var parent = transform.ParentUid;
if (entityManager.TryGetComponent<BodyPartComponent>(parent, out var body) &&
entityManager.TryGetComponent<MechanismComponent>(entityUid, out var part))
{
body.RemoveMechanism(part);
}
else
{
shell.WriteError("Was not a mechanism, or did not have a parent.");
}
}
}
}
| 33.333333 | 106 | 0.617647 | [
"MIT"
] | Ephememory/space-station-14 | Content.Server/Administration/Commands/RemoveMechanismCommand.cs | 1,700 | C# |
using System.Threading;
using System.Threading.Tasks;
using Application.Common.Interfaces;
using Common;
using Domain.Common;
using Domain.Entities;
using IdentityServer4.EntityFramework.Options;
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
namespace Persistence
{
public class TwitterDbContext : ApiAuthorizationDbContext<AppUser>, ITwitterDbContext
{
private readonly ICurrentUserService _currentUserService;
private readonly IDateTime _dateTime;
public TwitterDbContext(DbContextOptions<TwitterDbContext> options, IOptions<OperationalStoreOptions> operationalStoreOptions)
: base(options, operationalStoreOptions)
{
}
public TwitterDbContext(DbContextOptions<TwitterDbContext> options, IOptions<OperationalStoreOptions> operationalStoreOptions, ICurrentUserService currentUserService, IDateTime dateTime)
: base(options, operationalStoreOptions)
{
_currentUserService = currentUserService;
_dateTime = dateTime;
}
public DbSet<Bookmark> Bookmarks { get; set; }
public DbSet<Chat> Chats { get; set; }
public DbSet<ChatUser> ChatUsers { get; set; }
public DbSet<LikedPost> LikedPosts { get; set; }
public DbSet<Message> Messages { get; set; }
public DbSet<Notification> Notifications { get; set; }
public DbSet<PollVote> PollVotes { get; set; }
public DbSet<Post> Posts { get; set; }
public DbSet<PostImage> PostImages { get; set; }
public DbSet<PollOption> PollOptions { get; set; }
public DbSet<Repost> Reposts { get; set; }
public DbSet<HashTag> HashTags { get; set; }
public DbSet<UserFollow> UserFollowers { get; set; }
public override Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
{
foreach (var entry in ChangeTracker.Entries<AuditableEntity>())
{
if (entry.State == EntityState.Added)
{
entry.Entity.CreatedByIp = _currentUserService.Ip;
entry.Entity.CreatedOn = _dateTime.Now;
}
}
return base.SaveChangesAsync(cancellationToken);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ApplyConfigurationsFromAssembly(typeof(TwitterDbContext).Assembly);
}
}
}
| 39.30303 | 194 | 0.675405 | [
"MIT"
] | destbg/TwitterRecreated | src/Persistence/TwitterDbContext.cs | 2,596 | C# |
using System;
using System.Collections.Generic;
using System.Text;
namespace DesignPattern.Adapter
{
public interface IUsb
{
void Request();
}
}
| 13.916667 | 33 | 0.682635 | [
"MIT"
] | ZShijun/DesignPattern | src/Patterns/7. Adapter/DesignPattern.Adapter/IUsb.cs | 169 | C# |
// Copyright (c) Microsoft and contributors. 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.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
namespace Microsoft.Azure.Batch.Protocol.Models
{
using System.Linq;
/// <summary>
/// Additional parameters for the ListNext operation.
/// </summary>
public partial class CertificateListNextOptions
{
/// <summary>
/// Initializes a new instance of the CertificateListNextOptions class.
/// </summary>
public CertificateListNextOptions() { }
/// <summary>
/// Initializes a new instance of the CertificateListNextOptions class.
/// </summary>
/// <param name="clientRequestId">The caller-generated request
/// identity, in the form of a GUID with no decoration such as curly
/// braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.</param>
/// <param name="returnClientRequestId">Whether the server should
/// return the client-request-id identifier in the response.</param>
/// <param name="ocpDate">The time the request was issued. If not
/// specified, this header will be automatically populated with the
/// current system clock time.</param>
public CertificateListNextOptions(string clientRequestId = default(string), bool? returnClientRequestId = default(bool?), System.DateTime? ocpDate = default(System.DateTime?))
{
ClientRequestId = clientRequestId;
ReturnClientRequestId = returnClientRequestId;
OcpDate = ocpDate;
}
/// <summary>
/// Gets or sets the caller-generated request identity, in the form of
/// a GUID with no decoration such as curly braces, e.g.
/// 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "")]
public string ClientRequestId { get; set; }
/// <summary>
/// Gets or sets whether the server should return the
/// client-request-id identifier in the response.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "")]
public bool? ReturnClientRequestId { get; set; }
/// <summary>
/// Gets or sets the time the request was issued. If not specified,
/// this header will be automatically populated with the current
/// system clock time.
/// </summary>
[Newtonsoft.Json.JsonConverter(typeof(Microsoft.Rest.Serialization.DateTimeRfc1123JsonConverter))]
[Newtonsoft.Json.JsonProperty(PropertyName = "")]
public System.DateTime? OcpDate { get; set; }
}
}
| 42.805195 | 183 | 0.664745 | [
"MIT"
] | dnelly/azure-sdk-for-net | src/Batch/Client/Src/GeneratedProtocol/Models/CertificateListNextOptions.cs | 3,296 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using Microsoft.AspNetCore.Components;
namespace ChartIntegration.Shared
{
public interface IDataLayer
{
Task<Country[]> FetchCountries(string sortField, bool sortDesc);
}
public class DataLayer : IDataLayer
{
public DataLayer(HttpClient httpClient)
{
this.httpClient = httpClient;
}
HttpClient httpClient;
public async Task<Country[]> FetchCountries(string sortField, bool sortDesc)
{
var url = $"http://outlier.oliversturm.com:8080/countries?sort[0][selector]={sortField}&sort[0][desc]={sortDesc}&take=10";
var data = await httpClient.GetJsonAsync<Data>(url);
return data.data;
}
}
}
| 24.34375 | 128 | 0.713736 | [
"MIT"
] | snapservices/blazor-training-samples | WebAssembly/JavaScriptInterop/final/ChartIntegration/ChartIntegration/Shared/DataLayer.cs | 781 | C# |
using System.Collections.Generic;
using System;
using Nancy;
namespace BandTracker
{
public class HomeModule : NancyModule
{
public HomeModule()
{
Get["/"] = _ => View["index.cshtml"];
Get["/bands"] = _ => {
List<Band> allBands = Band.GetAll();
return View["bands.cshtml", allBands];
};
Post["/bands"] = _ => {
Band newBand = new Band(Request.Form["band-name"]);
newBand.Save();
List<Band> allBands = Band.GetAll();
return View["bands.cshtml", allBands];
};
Get["/bands/{id}"] = parameters => {
Dictionary<string, object> model = new Dictionary<string, object>{};
Band foundBand = Band.Find(parameters.id);
model.Add("band", foundBand);
List<Venue> bandVenues = foundBand.GetVenues();
model.Add("bandVenues", bandVenues);
List<Venue> allVenues = Venue.GetAll();
model.Add("allVenues", allVenues);
return View["band.cshtml", model];
};
Post["/bands/{id}"] = parameters => {
Dictionary<string, object> model = new Dictionary<string, object>{};
Band foundBand = Band.Find(parameters.id);
model.Add("band", foundBand);
Venue addedVenue = Venue.Find(Request.Form["venue-id"]);
addedVenue.AddBand(foundBand.GetId());
List<Venue> bandVenues = foundBand.GetVenues();
model.Add("bandVenues", bandVenues);
List<Venue> allVenues = Venue.GetAll();
model.Add("allVenues", allVenues);
return View["band.cshtml", model];
};
Get["/venues"] = _ => {
List<Venue> allVenues = Venue.GetAll();
return View["venues.cshtml", allVenues];
};
Post["/venues"] = _ => {
Venue newVenue = new Venue(Request.Form["venue-name"]);
newVenue.Save();
List<Venue> allVenues = Venue.GetAll();
return View["venues.cshtml", allVenues];
};
Get["/venues/delete"] = _ => View["venues_delete.cshtml"];
Delete["/venues"] = _ => {
Venue.DeleteAll();
List<Venue> allVenues = Venue.GetAll();
return View["venues.cshtml", allVenues];
};
Get["/venues/{id}"] = parameters => {
Dictionary<string, object> model = new Dictionary<string, object>{};
Venue foundVenue = Venue.Find(parameters.id);
model.Add("venue", foundVenue);
List<Band> venueBands = foundVenue.GetBands();
model.Add("venueBands", venueBands);
List<Band> allBands = Band.GetAll();
model.Add("allBands", allBands);
return View["venue.cshtml", model];
};
Post["/venues/{id}"] = parameters => {
Dictionary<string, object> model = new Dictionary<string, object>{};
Venue foundVenue = Venue.Find(parameters.id);
foundVenue.AddBand(Request.Form["band-id"]);
model.Add("venue", foundVenue);
List<Band> venueBands = foundVenue.GetBands();
model.Add("venueBands", venueBands);
List<Band> allBands = Band.GetAll();
model.Add("allBands", allBands);
return View["venue.cshtml", model];
};
Patch["/venues/{id}"] = parameters => {
Dictionary<string, object> model = new Dictionary<string, object>{};
Venue foundVenue = Venue.Find(parameters.id);
foundVenue.Update(Request.Form["venue-name"]);
model.Add("venue", foundVenue);
List<Band> venueBands = foundVenue.GetBands();
model.Add("venueBands", venueBands);
List<Band> allBands = Band.GetAll();
model.Add("allBands", allBands);
return View["venue.cshtml", model];
};
Delete["/venues/{id}"] = parameters => {
Venue foundVenue = Venue.Find(parameters.id);
foundVenue.Delete();
List<Venue> allVenues = Venue.GetAll();
return View["venues.cshtml", allVenues];
};
}
}
}
| 38.435644 | 76 | 0.586038 | [
"Unlicense"
] | JMDelight/c-sharp-band-tracker | Modules/HomeModule.cs | 3,882 | C# |
using System;
using System.Linq;
using Obacher.RandomOrgSharp.Core.Parameter;
namespace Obacher.RandomOrgSharp.Core.Response
{
public class ResponseHandlerFactory : IResponseHandlerFactory
{
private readonly IResponseHandler[] _responseHandlers;
public ResponseHandlerFactory(params IResponseHandler[] responseHandlers)
{
_responseHandlers = responseHandlers;
}
/// <summary>
/// Handle the response handlers
/// </summary>
/// <param name="parameters">Parameters passed into <see cref="IRandomService"/></param>
/// <param name="response">Response returnred from <see cref="IRandomService"/></param>
/// <returns>True is the process should continue to the next <see cref="IResponseHandler"/> in the list, false to stop processing response handlers</returns>
public bool Execute(IParameters parameters, string response)
{
if (_responseHandlers != null)
{
foreach (IResponseHandler handlers in _responseHandlers)
{
if (!handlers.Handle(parameters, response))
return false;
}
}
return true;
}
public IResponseHandler GetHandler(Type responseHandler)
{
return _responseHandlers.FirstOrDefault(handler => handler.GetType() == responseHandler);
}
}
} | 35.487805 | 165 | 0.621306 | [
"MIT"
] | gsteinbacher/RandomOrgSharp | Obacher.RandomOrgSharp.Core/Response/ResponseHandlerFactory.cs | 1,457 | C# |
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace AuthServer.Host.EntityFrameworkCore
{
public class AuthServerDbContext : AbpDbContext<AuthServerDbContext>
{
public AuthServerDbContext(DbContextOptions<AuthServerDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureIdentity();
modelBuilder.ConfigureIdentityServer();
modelBuilder.ConfigureAuditLogging();
modelBuilder.ConfigurePermissionManagement();
modelBuilder.ConfigureSettingManagement();
modelBuilder.ConfigureTenantManagement();
modelBuilder.ConfigureFeatureManagement();
}
}
}
| 34.857143 | 82 | 0.744262 | [
"MIT"
] | 271943794/abp-samples | MicroserviceDemo/applications/AuthServer.Host/EntityFrameworkCore/AuthServerDbContext.cs | 1,222 | C# |
using System;
using System.Threading.Tasks;
using CronSchedulerApp.Jobs.Startup;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace CronSchedulerApp
{
public sealed class Program
{
public static async Task Main(string[] args)
{
// run async jobs before the IWebHost run
// AspNetCore 2.x syntax of the registration.
// var host = CreateWebHostBuilder(args).Build();
var host = CreateHostBuilder(args).Build();
await host.RunStartupJobsAync();
await host.RunAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args)
{
return Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
webBuilder.ConfigureServices(services =>
{
services.AddStartupJob<SeedDatabaseStartupJob>();
services.AddStartupJob<TestStartupJob>();
});
})
.ConfigureLogging((context, logger) =>
{
logger.AddConsole();
logger.AddDebug();
logger.AddConfiguration(context.Configuration.GetSection("Logging"));
});
}
/// <summary>
/// AspNetCore 2.x syntax of the registration.
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
public static IWebHostBuilder CreateWebHostBuilder(string[] args)
{
return WebHost.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddStartupJob<SeedDatabaseStartupJob>();
services.AddStartupJob<TestStartupJob>();
})
.ConfigureLogging((context, logger) =>
{
logger.AddConsole();
logger.AddDebug();
logger.AddConfiguration(context.Configuration.GetSection("Logging"));
})
.UseShutdownTimeout(TimeSpan.FromSeconds(10)) // default is 5 seconds.
.UseStartup<Startup>();
}
}
}
| 35.22973 | 93 | 0.527426 | [
"MIT"
] | kdcllc/CronScheduler.AspNetCore | src/CronSchedulerApp/Program.cs | 2,609 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DotNetOpenAuth.OAuth;
using DotNetOpenAuth.Messaging;
using System.ServiceModel.Channels;
using System.ServiceModel;
using DotNetOpenAuth.OAuth.ChannelElements;
using System.Configuration;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
namespace applicationGlobalcaching.Core
{
public class TokenManagerOP
{
private static string WcfTokenManagerTag = "WcfTokenManagerOP";
private static string WcfAccessTokenTag = "WcfAccessTokenOP";
private static string WcfAccessTokenSecretTag = "WcfAccessTokenSecretOP";
private static string GetConfigSetting(string setting)
{
return ConfigurationManager.AppSettings[setting];
}
public static void RequestAuthorization(System.Web.UI.Control ctrl)
{
WebConsumer consumer = CreateConsumer(ctrl);
UriBuilder callback = new UriBuilder(ctrl.Page.Request.Url.AbsoluteUri.Replace("TokenRequestOP","TokenProcessOP")); // the opencaching oauth handler will call back to this page
callback.Query = null;
var requestParams = new Dictionary<string, string> {
{ "interactivity", "confirm_user" },
};
try
{
// send initial request to and receive response from service provider
// must send consumersecret and consumerkey in this call
var response = consumer.PrepareRequestUserAuthorization(callback.Uri, requestParams, null);
// immediately send response back to service provider to request
consumer.Channel.Send(response);
}
catch(Exception e)
{
}
}
public static string CheckUserAuthorization(System.Web.UI.Control ctrl)
{
if (ctrl.Page.Session[WcfTokenManagerTag] != null && ctrl.Page.Session[WcfAccessTokenTag] == null)
{
if (ctrl.Page.Request.QueryString["oauth_verifier"] != null && ctrl.Page.Request.QueryString["oauth_token"] != null)
{
WebConsumer consumer = CreateConsumer(ctrl);
var accessTokenMessage = consumer.ProcessUserAuthorization();
if (accessTokenMessage != null && accessTokenMessage.AccessToken != null)
{
string token = accessTokenMessage.AccessToken;
string tokenSecret = (ctrl.Page.Session[WcfTokenManagerTag] as IConsumerTokenManager).GetTokenSecret(token);
ctrl.Page.Session[WcfAccessTokenTag] = token;
ctrl.Page.Session[WcfAccessTokenSecretTag] = tokenSecret;
}
}
}
return ctrl.Page.Session[WcfAccessTokenTag] as string;
}
public static string GetTokenSecret(System.Web.UI.Control ctrl)
{
return ctrl.Page.Session[WcfAccessTokenSecretTag] as string;
}
private static WebConsumer CreateConsumer(System.Web.UI.Control ctrl)
{
MessageReceivingEndpoint oauthRequestTokenEndpoint;
MessageReceivingEndpoint oauthUserAuthorizationEndpoint;
MessageReceivingEndpoint oauthAccessTokenEndpoint;
// use Post Requests and appropriate endpoints
oauthRequestTokenEndpoint = new MessageReceivingEndpoint(new Uri(GetConfigSetting("ocpl_oauth_request")), HttpDeliveryMethods.PostRequest);
oauthUserAuthorizationEndpoint = new MessageReceivingEndpoint(new Uri(GetConfigSetting("ocpl_oauth_authorize")), HttpDeliveryMethods.GetRequest);
oauthAccessTokenEndpoint = new MessageReceivingEndpoint(new Uri(GetConfigSetting("ocpl_oauth_gettoken")), HttpDeliveryMethods.PostRequest);
// in memory token manager should not be used in production. an actual database should be used instead to remember a user's tokens
var tokenManager = ctrl.Page.Session[WcfTokenManagerTag] as InMemoryTokenManager;
if (tokenManager == null)
{
tokenManager = new InMemoryTokenManager(GetConfigSetting("ocpl_consumerkey"), GetConfigSetting("ocpl_consumersecret"));
ctrl.Page.Session[WcfTokenManagerTag] = tokenManager;
}
// set up web consumer
WebConsumer consumer = new WebConsumer(
new ServiceProviderDescription
{
ProtocolVersion = DotNetOpenAuth.OAuth.ProtocolVersion.V10a,
RequestTokenEndpoint = oauthRequestTokenEndpoint,
UserAuthorizationEndpoint = oauthUserAuthorizationEndpoint,
AccessTokenEndpoint = oauthAccessTokenEndpoint,
TamperProtectionElements = new DotNetOpenAuth.Messaging.ITamperProtectionChannelBindingElement[] {
new HmacSha1SigningBindingElement(),
},
},
tokenManager);
return consumer;
}
}
} | 43.584746 | 188 | 0.65176 | [
"MIT"
] | Globalcaching/applicationGlobalcaching | applicationGlobalcaching/Core/TokenManagerOP.cs | 5,145 | C# |
using System;
using JetBrains.Annotations;
using WireMock.Matchers;
namespace WireMock.RequestBuilders
{
/// <summary>
/// The BodyRequestBuilder interface.
/// </summary>
public interface IBodyRequestBuilder
{
/// <summary>
/// WithBody: IMatcher
/// </summary>
/// <param name="matcher">The matcher.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody([NotNull] IMatcher matcher);
/// <summary>
/// WithBody: Body as string
/// </summary>
/// <param name="body">The body.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody(string body);
/// <summary>
/// WithBody: Body as byte[]
/// </summary>
/// <param name="body">The body.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody(byte[] body);
/// <summary>
/// WithBody: Body as object
/// </summary>
/// <param name="body">The body.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody(object body);
/// <summary>
///WithBody: func (string)
/// </summary>
/// <param name="func">The function.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody([NotNull] Func<string, bool> func);
/// <summary>
///WithBody: func (byte[])
/// </summary>
/// <param name="func">The function.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody([NotNull] Func<byte[], bool> func);
/// <summary>
///WithBody: func (object)
/// </summary>
/// <param name="func">The function.</param>
/// <returns>The <see cref="IRequestBuilder"/>.</returns>
IRequestBuilder WithBody([NotNull] Func<object, bool> func);
}
} | 33.459016 | 68 | 0.55904 | [
"Apache-2.0"
] | Brightspace/WireMock.Net | src/WireMock.Net/RequestBuilders/IBodyRequestBuilder.cs | 2,043 | C# |
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using RoslynPad.Roslyn;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Revit.ScriptCS.ScriptRunner
{
public class RevitRoslynHost : RoslynHost
{
public RevitRoslynHost(IEnumerable<Assembly> additionalAssemblies = null, RoslynHostReferences references = null, ImmutableArray<string>? disabledDiagnostics = null) : base(additionalAssemblies, references, disabledDiagnostics)
{
}
protected override Project CreateProject(Solution solution, DocumentCreationArgs args, CompilationOptions compilationOptions, Project previousProject = null)
{
var name = args.Name ?? "Program";
var id = ProjectId.CreateNewId(name);
var parseOptions = new CSharpParseOptions(kind: SourceCodeKind.Script, languageVersion: LanguageVersion.CSharp7_3);
compilationOptions = compilationOptions.WithScriptClassName(name);
solution = solution.AddProject(ProjectInfo.Create(
id,
VersionStamp.Create(),
name,
name,
LanguageNames.CSharp,
isSubmission: true,
parseOptions: parseOptions,
hostObjectType: typeof(ScriptGlobals),
compilationOptions: compilationOptions,
metadataReferences: previousProject != null ? ImmutableArray<MetadataReference>.Empty : DefaultReferences,
projectReferences: previousProject != null ? new[] { new ProjectReference(previousProject.Id) } : null));
var project = solution.GetProject(id);
return project;
}
}
}
| 38.354167 | 235 | 0.677892 | [
"MIT"
] | chuongmep/Revit.ScriptCS | src/Revit.ScriptCS.ScriptRunner/RevitRoslynHost.cs | 1,843 | 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.Compute.V20191101.Outputs
{
/// <summary>
/// Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey
/// </summary>
[OutputType]
public sealed class KeyVaultAndKeyReferenceResponse
{
/// <summary>
/// Url pointing to a key or secret in KeyVault
/// </summary>
public readonly string KeyUrl;
/// <summary>
/// Resource id of the KeyVault containing the key or secret
/// </summary>
public readonly Outputs.SourceVaultResponse SourceVault;
[OutputConstructor]
private KeyVaultAndKeyReferenceResponse(
string keyUrl,
Outputs.SourceVaultResponse sourceVault)
{
KeyUrl = keyUrl;
SourceVault = sourceVault;
}
}
}
| 29.846154 | 116 | 0.651203 | [
"Apache-2.0"
] | polivbr/pulumi-azure-native | sdk/dotnet/Compute/V20191101/Outputs/KeyVaultAndKeyReferenceResponse.cs | 1,164 | 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 discovery-2015-11-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.ApplicationDiscoveryService.Model
{
/// <summary>
/// This is the response object from the DeleteTags operation.
/// </summary>
public partial class DeleteTagsResponse : AmazonWebServiceResponse
{
}
} | 29.605263 | 107 | 0.736 | [
"Apache-2.0"
] | ChristopherButtars/aws-sdk-net | sdk/src/Services/ApplicationDiscoveryService/Generated/Model/DeleteTagsResponse.cs | 1,125 | C# |
using System.Threading;
using System.Threading.Tasks;
namespace ComX.Infrastructure.Distributed.Outbox
{
public interface IOutboxBrokerPublisher
{
/// <summary>
/// Method used to publish the message to an actual broker
/// </summary>
/// <typeparam name="T">The message type</typeparam>
/// <param name="message">The message payload</param>
/// <param name="cancellationToken">The cancellation token</param>
Task PublishAsync<T>(T message, CancellationToken cancellationToken = default) where T : class;
}
}
| 34.058824 | 103 | 0.670121 | [
"Apache-2.0"
] | ramihamati/distributed | ComX.Infrastructure.Distributed.Outbox/Abstractions/IOutboxBrokerPublisher.cs | 581 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace HwndExtensions.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
| 39.592593 | 151 | 0.582788 | [
"MIT"
] | slater1/HwndExtensions | HwndExtensions/Properties/Settings.Designer.cs | 1,071 | C# |
using Microsoft.SharePoint.Client;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OfficeDevPnP.Core.Enums;
using OfficeDevPnP.Core.Framework.Provisioning.Model;
using OfficeDevPnP.Core.Framework.Provisioning.ObjectHandlers;
using OfficeDevPnP.Core.Tests.Framework.Functional.Implementation;
using OfficeDevPnP.Core.Tests.Framework.Functional.Validators;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.Xml.XPath;
namespace OfficeDevPnP.Core.Tests.Framework.Functional
{
#if !SP2013 && !SP2016
/// <summary>
/// Test cases for the provisioning engine web settings functionality
/// </summary>
[TestClass]
public class LanguageNoScriptTests : FunctionalTestBase
{
#region Construction
public LanguageNoScriptTests()
{
//debugMode = true;
//centralSiteCollectionUrl = "https://bertonline.sharepoint.com/sites/TestPnPSC_12345_6963f04e-da9d-4551-a823-94482982f862";
//centralSubSiteUrl = "https://bertonline.sharepoint.com/sites/TestPnPSC_12345_6963f04e-da9d-4551-a823-94482982f862/sub";
}
#endregion
#region Test setup
[ClassInitialize()]
public static void ClassInit(TestContext context)
{
ClassInitBase(context, true);
}
[ClassCleanup()]
public static void ClassCleanup()
{
ClassCleanupBase();
}
#endregion
#region Site collection test cases
/// <summary>
/// Site LanguageSettings Test
/// </summary>
[TestMethod]
[Timeout(15 * 60 * 1000)]
public void SiteCollectionLanguageSettingsTest()
{
new LanguageImplementation().SiteCollectionLanguageSettings(centralSiteCollectionUrl);
}
#endregion
#region Web test cases
/// <summary>
/// Web WebSettings test
/// </summary>
[TestMethod]
[Timeout(15 * 60 * 1000)]
public void WebLanguageSettingsTest()
{
new LanguageImplementation().SiteCollectionLanguageSettings(centralSubSiteUrl);
}
#endregion
}
#endif
}
| 30.684932 | 136 | 0.660268 | [
"MIT"
] | CaPa-Creative-Ltd/PnP-Sites-Core | Core/OfficeDevPnP.Core.Tests/Framework/Functional/LanguageNoScriptTests.cs | 2,242 | C# |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using BasicWebSite.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Serialization;
namespace BasicWebSite.Controllers
{
public class FiltersController : Controller
{
[HttpPost]
[Consumes("application/yaml")]
[UnprocessableResultFilter]
public IActionResult AlwaysRunResultFiltersCanRunWhenResourceFilterShortCircuit([FromBody] Product product) =>
throw new Exception("Shouldn't be executed");
}
}
| 32.434783 | 118 | 0.754692 | [
"Apache-2.0"
] | aneequrrehman/Mvc | test/WebSites/BasicWebSite/Controllers/FiltersController.cs | 746 | C# |
// Copyright 2016 Google Inc. 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.
using Google.Api.Gax;
using Google.Apis.Bigquery.v2.Data;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using static System.Globalization.CultureInfo;
namespace Google.Cloud.BigQuery.V2
{
// TODO: Support struct parameters.
/// <summary>
/// A parameter within a SQL query.
/// </summary>
/// <remarks>
/// <para>
/// Each parameter has a name, type and value. Names are irrelevant for queries using
/// positional parameters. All scalar types are converted into strings
/// before being passed to the server, but the nature of the conversion depends on the specified type.
/// </para>
/// <para>
/// The following list shows the correspondence between the parameter type and valid value types.
/// All scalar types may be specified as a string value, which will not be validated or converted on the client,
/// but passed to the API as-is.
/// </para>
/// <list type="bullet">
/// <item><description><c>Bool</c>: <c>System.Boolean</c></description></item>
/// <item><description><c>Int64</c>: <c>System.Int16</c>, <c>System.Int32</c>, <c>System.Int64</c>, <c>System.UInt16</c>, <c>System.UInt32</c>,
/// <c>System.UInt64</c></description></item>
/// <item><description><c>Float64</c>: Any type valid for <c>Int64</c>, as well as <c>System.Single</c> and <c>System.Double</c></description></item>
/// <item><description><c>String</c>: <c>System.String</c></description></item>
/// <item><description><c>Bytes</c>: <c>System.Byte[]</c></description></item>
/// <item><description><c>Date</c>: <c>System.DateTime</c>, <c>System.DateTimeOffset</c></description></item>
/// <item><description><c>DateTime</c>: <c>System.DateTime</c>, <c>System.DateTimeOffset</c></description></item>
/// <item><description><c>Time</c>: <c>System.DateTime</c>, <c>System.DateTimeOffset</c>, <c>System.TimeSpan</c></description></item>
/// <item><description><c>Timestamp</c>: <c>System.DateTime</c>, <c>System.DateTimeOffset</c></description></item>
/// <item><description><c>Array</c>: An <c>IReadOnlyList<T></c> of any of the above types corresponding to the <see cref="ArrayElementType"/>,
/// which will be inferred from the value's element type if not otherwise specified.</description></item>
/// </list>
/// <para>
/// If the parameter type is null, it is inferred from the value. A <see cref="TimeSpan"/> value is
/// always assumed to be a <see cref="BigQueryDbType.Time"/>, a <see cref="DateTimeOffset"/> value is
/// always assumed to be a <see cref="BigQueryDbType.Timestamp"/>, and a <see cref="DateTime"/> value is assumed
/// to be <see cref="BigQueryDbType.DateTime"/> regardless of its <see cref="DateTime.Kind"/>.
/// </para>
/// <para>
/// If an array parameter doesn't specify the array type, the type is inferred from the type of the value.
/// </para>
/// <para>
/// Array parameters must not have a value of null, and all the elements must be non-null as well.
/// </para>
/// <para>
/// If a <see cref="DateTime"/> value is provided for a <see cref="BigQueryDbType.Timestamp"/> parameter, the
/// value must have a <see cref="DateTime.Kind"/> of <see cref="DateTimeKind.Utc"/>.
/// </para>
/// <para>
/// Struct parameters are currently not supported.
/// </para>
/// </remarks>
public sealed class BigQueryParameter
{
private static HashSet<Type> s_validSingleTypes = new HashSet<Type>
{
typeof(short), typeof(ushort),
typeof(int), typeof(uint),
typeof(long), typeof(ulong),
typeof(float), typeof(double),
typeof(bool),
typeof(string), typeof(byte[]),
typeof(DateTime), typeof(DateTimeOffset), typeof(TimeSpan)
};
private static List<TypeInfo> s_validRepeatedTypes = s_validSingleTypes
.Select(t => typeof(IReadOnlyList<>).MakeGenericType(t).GetTypeInfo())
.ToList();
/// <summary>
/// Mapping of CLR type to BigQuery parameter type for simple cases.
/// </summary>
private static Dictionary<Type, BigQueryDbType> s_typeMapping = new Dictionary<Type, BigQueryDbType>
{
{ typeof(short), BigQueryDbType.Int64 },
{ typeof(int), BigQueryDbType.Int64 },
{ typeof(long), BigQueryDbType.Int64 },
{ typeof(ushort), BigQueryDbType.Int64 },
{ typeof(uint), BigQueryDbType.Int64 },
{ typeof(ulong), BigQueryDbType.Int64 },
{ typeof(float), BigQueryDbType.Float64 },
{ typeof(double), BigQueryDbType.Float64 },
{ typeof(bool), BigQueryDbType.Bool },
{ typeof(string), BigQueryDbType.String },
{ typeof(byte[]), BigQueryDbType.Bytes },
{ typeof(DateTime), BigQueryDbType.DateTime },
{ typeof(DateTimeOffset), BigQueryDbType.Timestamp },
{ typeof(TimeSpan), BigQueryDbType.Time },
};
/// <summary>
/// The name of the parameter. This is irrelevant for positional parameters.
/// </summary>
public string Name { get; set; }
private BigQueryDbType? _type;
/// <summary>
/// The type of the parameter. If this is null, the type of the parameter is inferred from the value.
/// Otherwise, the value must be of one of the supported types for the parameter type. See the <see cref="BigQueryParameter">class documentation</see>
/// for details.
/// </summary>
public BigQueryDbType? Type
{
get { return _type; }
set { _type = value == null ? default : GaxPreconditions.CheckEnumValue(value.Value, nameof(value)); }
}
private BigQueryDbType? _arrayElementType;
/// <summary>
/// The type of the nested elements, for array parameters. If this is null, the type is inferred from the value.
/// </summary>
public BigQueryDbType? ArrayElementType
{
get { return _arrayElementType; }
set { _arrayElementType = value == null ? default : GaxPreconditions.CheckEnumValue(value.Value, nameof(value)); }
}
private object _value;
/// <summary>
/// The value of the parameter. If this is null, the type of the parameter must be specified
/// explicitly.
/// </summary>
public object Value
{
get { return _value; }
set
{
ValidateValue(value, nameof(value));
_value = value;
}
}
/// <summary>
/// Constructs a parameter with no name, initial value or type.
/// </summary>
public BigQueryParameter() : this(null, null, null)
{
}
/// <summary>
/// Constructs a parameter with no name, initial value or type.
/// </summary>
/// <param name="type">The initial type of the parameter.</param>
public BigQueryParameter(BigQueryDbType type) : this(null, type, null)
{
}
/// <summary>
/// Constructs a parameter with no name, and the specified type and value.
/// </summary>
/// <param name="type">The initial type of the parameter.</param>
/// <param name="value">The initial value of the parameter.</param>
public BigQueryParameter(BigQueryDbType? type, object value) : this(null, type, value)
{
}
/// <summary>
/// Constructs a parameter with the given name but no initial value or type.
/// </summary>
/// <param name="name">The initial name of the parameter.</param>
public BigQueryParameter(string name) : this(name, null, null)
{
}
/// <summary>
/// Constructs a parameter with the given name and type, but no initial value.
/// </summary>
/// <param name="name">The initial name of the parameter.</param>
/// <param name="type">The initial type of the parameter.</param>
public BigQueryParameter(string name, BigQueryDbType? type) : this(name, type, null)
{
}
/// <summary>
/// Constructs a parameter with the given name, type and value.
/// </summary>
/// <param name="name">The initial name of the parameter.</param>
/// <param name="type">The initial type of the parameter.</param>
/// <param name="value">The initial value of the parameter.</param>
public BigQueryParameter(string name, BigQueryDbType? type, object value)
{
Name = name;
if (type != null)
{
Type = GaxPreconditions.CheckEnumValue(type.Value, nameof(type));
}
ValidateValue(value, nameof(value)); // Proof against refactoring of parameter name...
Value = value;
}
internal QueryParameter ToQueryParameter()
{
var value = Value;
if (Type == null && value == null)
{
throw new InvalidOperationException("A null-valued parameter must have an explicitly specified type");
}
var type = Type ?? InferParameterType(value);
var parameter = new QueryParameter
{
Name = Name,
ParameterType = new QueryParameterType { Type = type.ToParameterApiType() },
};
switch (type)
{
case BigQueryDbType.Array:
return PopulateArrayParameter(parameter, value, ArrayElementType);
case BigQueryDbType.Bool:
return parameter.PopulateScalar<bool>(value, x => x ? "TRUE" : "FALSE")
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.Bytes:
return parameter.PopulateScalar<byte[]>(value, x => Convert.ToBase64String(x))
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.Date:
return parameter.PopulateScalar<DateTime>(value, x => x.AsBigQueryDate())
?? parameter.PopulateScalar<DateTimeOffset>(value, x => x.AsBigQueryDate())
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.DateTime:
return parameter.PopulateScalar<DateTime>(value, x => x.ToString("yyyy-MM-dd HH:mm:ss.FFFFFF", InvariantCulture))
?? parameter.PopulateScalar<DateTimeOffset>(value, x => x.ToString("yyyy-MM-dd HH:mm:ss.FFFFFF", InvariantCulture))
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.Float64:
return parameter.PopulateInteger(value)
?? parameter.PopulateFloatingPoint(value)
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.Int64:
return parameter.PopulateInteger(value)
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.String:
return parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.Struct: throw new NotImplementedException("Struct parameters are not yet implemented");
case BigQueryDbType.Time:
return parameter.PopulateScalar<TimeSpan>(value, FormatTimeSpan)
?? parameter.PopulateScalar<DateTimeOffset>(value, x => x.ToString("HH:mm:ss.FFFFFF", InvariantCulture))
?? parameter.PopulateScalar<DateTime>(value, x => x.ToString("HH:mm:ss.FFFFFF", InvariantCulture))
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
case BigQueryDbType.Timestamp:
return parameter.PopulateScalar<DateTime>(value, x =>
{
if (x.Kind != DateTimeKind.Utc)
{
throw new InvalidOperationException($"A DateTime with a Kind of {x.Kind} cannot be used for a Timestamp parameter");
}
return x.ToString("yyyy-MM-dd HH:mm:ss.FFFFFF+00", InvariantCulture);
})
?? parameter.PopulateScalar<DateTimeOffset>(value, x => x.ToString("yyyy-MM-dd HH:mm:ss.FFFFFFzzz", InvariantCulture))
?? parameter.PopulateScalar<string>(value, x => x)
?? parameter.UseNullScalarOrThrow(value);
default: throw new InvalidOperationException($"No conversion available for parameter type {type}");
}
}
private static string FormatTimeSpan(TimeSpan ts)
{
// Normalize to a positive value by adding days if necessary, so -2 hours => 22:00:00 etc.
if (ts.Hours < 0)
{
ts = ts.Add(TimeSpan.FromDays(1 - ts.Days));
}
return ts.ToString("hh':'mm':'ss'.'ffffff", InvariantCulture);
}
private static BigQueryDbType InferParameterType(object value)
{
BigQueryDbType type;
if (s_typeMapping.TryGetValue(value.GetType(), out type))
{
return type;
}
if (IsArrayValue(value))
{
return BigQueryDbType.Array;
}
// We should never get here, as we should have validated that the value is vaguely sensible on the Value setter.
throw new InvalidOperationException($"Unsupported value type: {value.GetType()}");
}
private static QueryParameter PopulateArrayParameter(QueryParameter parameter, object value, BigQueryDbType? arrayType)
{
if (value == null)
{
throw new InvalidOperationException("The value of an array parameter cannot be null");
}
if (!IsArrayValue(value))
{
throw new InvalidOperationException($"Invalid value for array parameter: {value.GetType()}");
}
List<object> values = ((IEnumerable)value).Cast<object>().ToList();
if (values.Any(v => v == null))
{
throw new InvalidOperationException("Array parameter values cannot contain null elements");
}
BigQueryDbType actualArrayType = arrayType ?? s_typeMapping[GetArrayElementType(value)];
parameter.ParameterType = new QueryParameterType
{
Type = BigQueryDbType.Array.ToParameterApiType(),
ArrayType = new QueryParameterType { Type = actualArrayType.ToParameterApiType() }
};
var parameterValues = values
.Select(p => new BigQueryParameter(actualArrayType, p).ToQueryParameter().ParameterValue)
.ToList();
parameter.ParameterValue = new QueryParameterValue { ArrayValues = parameterValues };
return parameter;
}
private static void ValidateValue(object value, string paramName)
{
if (value == null ||
s_validSingleTypes.Contains(value.GetType()) ||
IsArrayValue(value))
{
return;
}
throw new ArgumentException(
$"Unable to use value of type { value.GetType() } in { nameof(BigQueryParameter)}",
paramName);
}
private static bool IsArrayValue(object value) => GetArrayElementType(value) != null;
private static Type GetArrayElementType(object value)
{
var typeInfo = value.GetType().GetTypeInfo();
return s_validRepeatedTypes.FirstOrDefault(ti => ti.IsAssignableFrom(typeInfo))?.GenericTypeArguments[0];
}
}
/// <summary>
/// Extension methods on QueryParameter, just to make the above code simpler
/// </summary>
internal static class QueryParameterExtensions
{
private static readonly NumberFormatInfo s_floatingPointFormat;
static QueryParameterExtensions()
{
s_floatingPointFormat = (NumberFormatInfo)InvariantCulture.NumberFormat.Clone();
s_floatingPointFormat.PositiveInfinitySymbol = "+inf";
s_floatingPointFormat.NegativeInfinitySymbol = "-inf";
s_floatingPointFormat.NaNSymbol = "NaN";
}
/// <summary>
/// If the value is of type T, the converter is applied and the paramter value populated,
/// and the parameter is returned. Otherwise, null is returned.
/// </summary>
internal static QueryParameter PopulateScalar<T>(this QueryParameter parameter, object value, Func<T, string> converter)
{
if (value is T)
{
parameter.ParameterValue = new QueryParameterValue { Value = converter((T)value) };
return parameter;
}
return null;
}
/// <summary>
/// If the value is an integer type, the parameter value is populated and the parameter is returned.
/// Otherwise, null is returned.
/// </summary>
internal static QueryParameter PopulateInteger(this QueryParameter parameter, object value)
{
// Note: we can end up with ulong values that the server will reject here, but it's simpler than trying
// to handle everything precisely, and it only defers the error a bit.
if (value is ushort || value is short || value is int || value is uint || value is long || value is ulong)
{
IFormattable formattable = (IFormattable)value;
parameter.ParameterValue = new QueryParameterValue { Value = formattable.ToString("d", InvariantCulture) };
return parameter;
}
return null;
}
internal static QueryParameter PopulateFloatingPoint(this QueryParameter parameter, object value)
{
if (value is float || value is double)
{
IFormattable formattable = (IFormattable) value;
parameter.ParameterValue = new QueryParameterValue { Value = formattable.ToString("r", s_floatingPointFormat) };
return parameter;
}
return null;
}
/// <summary>
/// If the value is null, populate the parameter with an QueryParameterValue. Otherwise,
/// throw an exception - this is expected to be the last call in a chain, so at this point we know
/// we can't handle a value of this type.
/// </summary>
internal static QueryParameter UseNullScalarOrThrow(this QueryParameter parameter, object value)
{
if (value == null)
{
parameter.ParameterValue = new QueryParameterValue();
return parameter;
}
var clrEnum = EnumMap<BigQueryDbType>.ToValue(parameter.ParameterType.Type);
throw new InvalidOperationException($"Value of type {value.GetType()} cannot be used for a parameter of type {clrEnum}");
}
}
}
| 47.710345 | 158 | 0.589477 | [
"Apache-2.0"
] | chrisdunelm/gcloud-dotnet | apis/Google.Cloud.BigQuery.V2/Google.Cloud.BigQuery.V2/BigQueryParameter.cs | 20,756 | C# |
using Grasews.Domain.Entities;
using Grasews.Domain.Interfaces.Repositories;
using System.Linq;
namespace Grasews.Infra.Data.EF.SqlServer.Repositories
{
public class WsdlOperationRepository : BaseEntityRepository<WsdlOperation, int>, IWsdlOperationEntityRepository
{
public WsdlOperation GetWithNodePositions(int id, bool @readonly = true)
{
return @readonly
? _context.WsdlOperations.AsNoTracking()
.Include("GraphNodePosition_WsdlOperations")
.Include(nameof(WsdlOperation.Issues))
.FirstOrDefault(x => x.Id == id)
: _context.WsdlOperations
.Include("GraphNodePosition_WsdlOperations")
.Include(nameof(WsdlOperation.Issues))
.FirstOrDefault(x => x.Id == id);
}
public WsdlOperation GetWithSemanticAnnotations(int id, bool @readonly = true)
{
return @readonly
? _context.WsdlOperations.AsNoTracking()
.Include("SawsdlModelReferences")
.Include("SawsdlModelReferences.OntologyTerm")
.Include(nameof(WsdlOperation.Issues))
.FirstOrDefault(x => x.Id == id)
: _context.WsdlOperations
.Include("SawsdlModelReferences")
.Include("SawsdlModelReferences.OntologyTerm")
.Include(nameof(WsdlOperation.Issues))
.FirstOrDefault(x => x.Id == id);
}
}
} | 42.837838 | 115 | 0.578549 | [
"MIT"
] | mlcalache/grasews | Grasews.Infra.Data.EF.SqlServer/Repositories/WsdlOperationRepository.cs | 1,587 | 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 robomaker-2018-06-29.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.RoboMaker.Model
{
/// <summary>
/// This is the response object from the CreateDeploymentJob operation.
/// </summary>
public partial class CreateDeploymentJobResponse : AmazonWebServiceResponse
{
private string _arn;
private DateTime? _createdAt;
private List<DeploymentApplicationConfig> _deploymentApplicationConfigs = new List<DeploymentApplicationConfig>();
private DeploymentConfig _deploymentConfig;
private DeploymentJobErrorCode _failureCode;
private string _failureReason;
private string _fleet;
private DeploymentStatus _status;
private Dictionary<string, string> _tags = new Dictionary<string, string>();
/// <summary>
/// Gets and sets the property Arn.
/// <para>
/// The Amazon Resource Name (ARN) of the deployment job.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1224)]
public string Arn
{
get { return this._arn; }
set { this._arn = value; }
}
// Check to see if Arn property is set
internal bool IsSetArn()
{
return this._arn != null;
}
/// <summary>
/// Gets and sets the property CreatedAt.
/// <para>
/// The time, in milliseconds since the epoch, when the fleet was created.
/// </para>
/// </summary>
public DateTime CreatedAt
{
get { return this._createdAt.GetValueOrDefault(); }
set { this._createdAt = value; }
}
// Check to see if CreatedAt property is set
internal bool IsSetCreatedAt()
{
return this._createdAt.HasValue;
}
/// <summary>
/// Gets and sets the property DeploymentApplicationConfigs.
/// <para>
/// The deployment application configuration.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1)]
public List<DeploymentApplicationConfig> DeploymentApplicationConfigs
{
get { return this._deploymentApplicationConfigs; }
set { this._deploymentApplicationConfigs = value; }
}
// Check to see if DeploymentApplicationConfigs property is set
internal bool IsSetDeploymentApplicationConfigs()
{
return this._deploymentApplicationConfigs != null && this._deploymentApplicationConfigs.Count > 0;
}
/// <summary>
/// Gets and sets the property DeploymentConfig.
/// <para>
/// The deployment configuration.
/// </para>
/// </summary>
public DeploymentConfig DeploymentConfig
{
get { return this._deploymentConfig; }
set { this._deploymentConfig = value; }
}
// Check to see if DeploymentConfig property is set
internal bool IsSetDeploymentConfig()
{
return this._deploymentConfig != null;
}
/// <summary>
/// Gets and sets the property FailureCode.
/// <para>
/// The failure code of the simulation job if it failed:
/// </para>
/// <dl> <dt>BadPermissionError</dt> <dd>
/// <para>
/// AWS Greengrass requires a service-level role permission to access other services.
/// The role must include the <a href="https://console.aws.amazon.com/iam/home?#/policies/arn:aws:iam::aws:policy/service-role/AWSGreengrassResourceAccessRolePolicy$jsonEditor">
/// <code>AWSGreengrassResourceAccessRolePolicy</code> managed policy</a>.
/// </para>
/// </dd> <dt>ExtractingBundleFailure</dt> <dd>
/// <para>
/// The robot application could not be extracted from the bundle.
/// </para>
/// </dd> <dt>FailureThresholdBreached</dt> <dd>
/// <para>
/// The percentage of robots that could not be updated exceeded the percentage set for
/// the deployment.
/// </para>
/// </dd> <dt>GreengrassDeploymentFailed</dt> <dd>
/// <para>
/// The robot application could not be deployed to the robot.
/// </para>
/// </dd> <dt>GreengrassGroupVersionDoesNotExist</dt> <dd>
/// <para>
/// The AWS Greengrass group or version associated with a robot is missing.
/// </para>
/// </dd> <dt>InternalServerError</dt> <dd>
/// <para>
/// An internal error has occurred. Retry your request, but if the problem persists, contact
/// us with details.
/// </para>
/// </dd> <dt>MissingRobotApplicationArchitecture</dt> <dd>
/// <para>
/// The robot application does not have a source that matches the architecture of the
/// robot.
/// </para>
/// </dd> <dt>MissingRobotDeploymentResource</dt> <dd>
/// <para>
/// One or more of the resources specified for the robot application are missing. For
/// example, does the robot application have the correct launch package and launch file?
/// </para>
/// </dd> <dt>PostLaunchFileFailure</dt> <dd>
/// <para>
/// The post-launch script failed.
/// </para>
/// </dd> <dt>PreLaunchFileFailure</dt> <dd>
/// <para>
/// The pre-launch script failed.
/// </para>
/// </dd> <dt>ResourceNotFound</dt> <dd>
/// <para>
/// One or more deployment resources are missing. For example, do robot application source
/// bundles still exist?
/// </para>
/// </dd> <dt>RobotDeploymentNoResponse</dt> <dd>
/// <para>
/// There is no response from the robot. It might not be powered on or connected to the
/// internet.
/// </para>
/// </dd> </dl>
/// </summary>
public DeploymentJobErrorCode FailureCode
{
get { return this._failureCode; }
set { this._failureCode = value; }
}
// Check to see if FailureCode property is set
internal bool IsSetFailureCode()
{
return this._failureCode != null;
}
/// <summary>
/// Gets and sets the property FailureReason.
/// <para>
/// The failure reason of the deployment job if it failed.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string FailureReason
{
get { return this._failureReason; }
set { this._failureReason = value; }
}
// Check to see if FailureReason property is set
internal bool IsSetFailureReason()
{
return this._failureReason != null;
}
/// <summary>
/// Gets and sets the property Fleet.
/// <para>
/// The target fleet for the deployment job.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=1224)]
public string Fleet
{
get { return this._fleet; }
set { this._fleet = value; }
}
// Check to see if Fleet property is set
internal bool IsSetFleet()
{
return this._fleet != null;
}
/// <summary>
/// Gets and sets the property Status.
/// <para>
/// The status of the deployment job.
/// </para>
/// </summary>
public DeploymentStatus Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
/// <summary>
/// Gets and sets the property Tags.
/// <para>
/// The list of all tags added to the deployment job.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=50)]
public Dictionary<string, string> Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
}
} | 34.01476 | 185 | 0.566175 | [
"Apache-2.0"
] | ChristopherButtars/aws-sdk-net | sdk/src/Services/RoboMaker/Generated/Model/CreateDeploymentJobResponse.cs | 9,218 | C# |
using HttPlaceholder.Domain.Enums;
namespace HttPlaceholder.Domain;
/// <summary>
/// A class for storing whether a specific feature is enabled or not.
/// </summary>
public class FeatureResultModel
{
/// <summary>
/// Constructs a <see cref="FeatureResultModel"/> instance.
/// </summary>
/// <param name="featureFlag">The feature flag.</param>
/// <param name="enabled">Whether the feature is enabled or not.</param>
public FeatureResultModel(FeatureFlagType featureFlag, bool enabled)
{
FeatureFlag = featureFlag;
Enabled = enabled;
}
/// <summary>
/// Gets or sets the checked feature.
/// </summary>
public FeatureFlagType FeatureFlag { get; }
/// <summary>
/// Gets or sets whether the feature is enabled or not.
/// </summary>
public bool Enabled { get; }
}
| 27.419355 | 76 | 0.649412 | [
"MIT"
] | dukeofharen/placeholder | src/HttPlaceholder.Domain/FeatureResultModel.cs | 852 | C# |
using System;
using EnvDTE;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Shell.Interop;
namespace OpenPromptHere.Utils
{
public sealed class SolutionExplorer
{
public static Project GetSelectedProject()
{
return GetSelectedItem() as Project;
}
private static object GetSelectedItem()
{
var monitorSelection = (IVsMonitorSelection)Package.GetGlobalService(typeof(SVsShellMonitorSelection));
IntPtr hierarchyPointer;
IntPtr selectionContainerPointer;
IVsMultiItemSelect multiItemSelect;
uint projectItemId;
monitorSelection.GetCurrentSelection(out hierarchyPointer,
out projectItemId,
out multiItemSelect,
out selectionContainerPointer);
using (var container = TypedObjectForIUnknown<ISelectionContainer>.Attach(selectionContainerPointer))
using (var hierarchy = TypedObjectForIUnknown<IVsHierarchy>.Attach(hierarchyPointer))
{
object selection = null;
ErrorHandler.ThrowOnFailure(
hierarchy.Instance.GetProperty(
projectItemId,
(int)__VSHPROPID.VSHPROPID_ExtObject,
out selection)
);
return selection;
}
}
}
} | 32.555556 | 115 | 0.612287 | [
"Apache-2.0"
] | springcomp/OpenPromptHere | OpenPromptHere/Utils/SolutionExplorer.cs | 1,467 | C# |
using Robust.Shared.Serialization;
namespace Content.Shared.Shuttles.Events;
/// <summary>
/// Raised on the client when it's viewing a particular docking port to try and dock it automatically.
/// </summary>
[Serializable, NetSerializable]
public sealed class AutodockRequestMessage : BoundUserInterfaceMessage
{
public EntityUid Entity;
}
| 26.692308 | 102 | 0.783862 | [
"MIT"
] | EmoGarbage404/space-station-14 | Content.Shared/Shuttles/Events/AutodockRequestMessage.cs | 347 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ExcelReader.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
| 34.387097 | 151 | 0.581614 | [
"MIT"
] | TodorChapkanov/Excel-Parser | ExcelReader/Properties/Settings.Designer.cs | 1,068 | 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 Microsoft.Protocols.TestTools.StackSdk;
namespace Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Cifs
{
/// <summary>
/// Packets for SmbCreateTemporary Request
/// </summary>
public class SmbCreateTemporaryRequestPacket : SmbSingleRequestPacket
{
#region Fields
private SMB_COM_CREATE_TEMPORARY_Request_SMB_Parameters smbParameters;
private SMB_COM_CREATE_TEMPORARY_Request_SMB_Data smbData;
#endregion
#region Properties
/// <summary>
/// get or set the Smb_Parameters:SMB_COM_CREATE_TEMPORARY_Request_SMB_Parameters
/// </summary>
public SMB_COM_CREATE_TEMPORARY_Request_SMB_Parameters SmbParameters
{
get
{
return this.smbParameters;
}
set
{
this.smbParameters = value;
}
}
/// <summary>
/// get or set the Smb_Data:SMB_COM_CREATE_TEMPORARY_Request_SMB_Data
/// </summary>
public SMB_COM_CREATE_TEMPORARY_Request_SMB_Data SmbData
{
get
{
return this.smbData;
}
set
{
this.smbData = value;
}
}
#endregion
#region Constructor
/// <summary>
/// Constructor.
/// </summary>
public SmbCreateTemporaryRequestPacket()
: base()
{
this.InitDefaultValue();
}
/// <summary>
/// Constructor: Create a request directly from a buffer.
/// </summary>
public SmbCreateTemporaryRequestPacket(byte[] data)
: base(data)
{
}
/// <summary>
/// Deep copy constructor.
/// </summary>
public SmbCreateTemporaryRequestPacket(SmbCreateTemporaryRequestPacket packet)
: base(packet)
{
this.InitDefaultValue();
this.smbParameters.WordCount = packet.SmbParameters.WordCount;
this.smbParameters.FileAttributes = packet.SmbParameters.FileAttributes;
this.smbParameters.CreationTime = new UTime();
this.smbParameters.CreationTime.Time = packet.SmbParameters.CreationTime.Time;
this.smbData.ByteCount = packet.SmbData.ByteCount;
this.smbData.BufferFormat = packet.SmbData.BufferFormat;
if (packet.smbData.DirectoryName != null)
{
this.smbData.DirectoryName = new byte[packet.smbData.DirectoryName.Length];
Array.Copy(packet.smbData.DirectoryName,
this.smbData.DirectoryName, packet.smbData.DirectoryName.Length);
}
else
{
this.smbData.DirectoryName = new byte[0];
}
}
#endregion
#region override methods
/// <summary>
/// to create an instance of the StackPacket class that is identical to the current StackPacket.
/// </summary>
/// <returns>a new Packet cloned from this.</returns>
public override StackPacket Clone()
{
return new SmbCreateTemporaryRequestPacket(this);
}
/// <summary>
/// Encode the SMB_COM_CREATE_TEMPORARY_Request_SMB_Parameters struct to SmbParameters struct
/// </summary>
protected override void EncodeParameters()
{
this.smbParametersBlock = TypeMarshal.ToStruct<SmbParameters>(
CifsMessageUtils.ToBytes<SMB_COM_CREATE_TEMPORARY_Request_SMB_Parameters>(this.smbParameters));
}
/// <summary>
/// Encode the SMB_COM_CREATE_TEMPORARY_Request_SMB_Data struct to SmbData struct
/// </summary>
protected override void EncodeData()
{
this.smbDataBlock = TypeMarshal.ToStruct<SmbData>(
CifsMessageUtils.ToBytes<SMB_COM_CREATE_TEMPORARY_Request_SMB_Data>(this.SmbData));
}
/// <summary>
/// to decode the smb parameters: from the general SmbParameters to the concrete Smb Parameters.
/// </summary>
protected override void DecodeParameters()
{
this.smbParameters = TypeMarshal.ToStruct<SMB_COM_CREATE_TEMPORARY_Request_SMB_Parameters>(
TypeMarshal.ToBytes(this.smbParametersBlock));
}
/// <summary>
/// to decode the smb data: from the general SmbDada to the concrete Smb Data.
/// </summary>
protected override void DecodeData()
{
this.smbData = TypeMarshal.ToStruct<SMB_COM_CREATE_TEMPORARY_Request_SMB_Data>(
TypeMarshal.ToBytes(this.smbDataBlock));
}
#endregion
#region initialize fields with default value
/// <summary>
/// init packet, set default field data
/// </summary>
private void InitDefaultValue()
{
this.smbData.DirectoryName = new byte[0];
}
#endregion
}
}
| 29.666667 | 111 | 0.595886 | [
"MIT"
] | 0neb1n/WindowsProtocolTestSuites | ProtoSDK/MS-CIFS/Messages/Com/SmbCreateTemporaryRequestPacket.cs | 5,251 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _13.TriFunction
{
class Program
{
static void Main(string[] args)
{
Func<long, long, bool> CheckIt = (n, m) => n >= m;
var num = long.Parse(Console.ReadLine());
var line = Console.ReadLine().Split(new[] {' '}, StringSplitOptions.RemoveEmptyEntries);
foreach (var word in line)
{
if (ReturnSum(word, CheckIt, num))
{
Console.WriteLine(word);
return;
}
}
}
private static bool ReturnSum(string word, Func<long, long, bool> CheckIt, long num)
{
long sum = 0;
bool result = false;
for (int index = 0; index < word.Length; index++)
{
sum += word[index];
}
if (CheckIt(sum, num) == true)
{
result = true;
}
return result;
}
}
}
| 24.23913 | 100 | 0.468161 | [
"MIT"
] | zrusev/SoftUni_2016 | 04. C# Advanced - May 2017/07. Functional-Programming/07. Functional-Programming - Exercise/13. TriFunction/13. TriFunction/Program.cs | 1,117 | C# |
using Microsoft.Azure.Functions.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Neo4j.Driver;
[assembly: FunctionsStartup(typeof(Neo4jDriver.AzureFunction.DependencyInjection.Startup))]
namespace Neo4jDriver.AzureFunction.DependencyInjection
{
public class Startup : FunctionsStartup
{
public override void Configure(IFunctionsHostBuilder builder)
{
builder.Services.AddSingleton<IDriver>((s) =>
{
var driver = GraphDatabase.Driver("neo4j://localhost:7687", AuthTokens.Basic("neo4j", "neo"));
return driver;
});
}
}
} | 33.25 | 110 | 0.681203 | [
"MIT"
] | cskardon/Neo4jDriverWithAzureFunctionsDI | Neo4jDriver.AzureFunction.DependencyInjection/Startup.cs | 665 | C# |
//
// Author:
// Jb Evain (jbevain@gmail.com)
//
// Copyright (c) 2008 - 2015 Jb Evain
// Copyright (c) 2008 - 2011 Novell, Inc.
//
// Licensed under the MIT/X11 license.
//
using System;
using System.Collections.Generic;
using System.IO;
using Mono.Collections.Generic;
using Microsoft.Cci.Pdb;
using Mono.Cecil.Cil;
namespace Mono.Cecil.Pdb {
public class NativePdbReader : ISymbolReader {
int age;
Guid guid;
readonly Disposable<Stream> pdb_file;
readonly Dictionary<string, Document> documents = new Dictionary<string, Document> ();
readonly Dictionary<uint, PdbFunction> functions = new Dictionary<uint, PdbFunction> ();
readonly Dictionary<PdbScope, ImportDebugInformation> imports = new Dictionary<PdbScope, ImportDebugInformation> ();
internal NativePdbReader (Disposable<Stream> file)
{
this.pdb_file = file;
}
#if !READ_ONLY
public ISymbolWriterProvider GetWriterProvider ()
{
return new NativePdbWriterProvider ();
}
#endif
/*
uint Magic = 0x53445352;
Guid Signature;
uint Age;
string FileName;
*/
public bool ProcessDebugHeader (ImageDebugHeader header)
{
if (!header.HasEntries)
return false;
var entry = header.GetCodeViewEntry ();
if (entry == null)
return false;
var directory = entry.Directory;
if (directory.Type != ImageDebugType.CodeView)
return false;
var data = entry.Data;
if (data.Length < 24)
return false;
var magic = ReadInt32 (data, 0);
if (magic != 0x53445352)
return false;
var guid_bytes = new byte [16];
Buffer.BlockCopy (data, 4, guid_bytes, 0, 16);
this.guid = new Guid (guid_bytes);
this.age = ReadInt32 (data, 20);
return PopulateFunctions ();
}
static int ReadInt32 (byte [] bytes, int start)
{
return (bytes [start]
| (bytes [start + 1] << 8)
| (bytes [start + 2] << 16)
| (bytes [start + 3] << 24));
}
bool PopulateFunctions ()
{
using (pdb_file) {
Dictionary<uint, PdbTokenLine> tokenToSourceMapping;
string sourceServerData;
int age;
Guid guid;
var funcs = PdbFile.LoadFunctions (pdb_file.value, out tokenToSourceMapping, out sourceServerData, out age, out guid);
if (this.guid != guid)
return false;
foreach (PdbFunction function in funcs)
functions.Add (function.token, function);
}
return true;
}
public MethodDebugInformation Read (MethodDefinition method)
{
var method_token = method.MetadataToken;
PdbFunction function;
if (!functions.TryGetValue (method_token.ToUInt32 (), out function))
return null;
var symbol = new MethodDebugInformation (method);
ReadSequencePoints (function, symbol);
symbol.scope = !function.scopes.IsNullOrEmpty ()
? ReadScopeAndLocals (function.scopes [0], symbol)
: new ScopeDebugInformation { Start = new InstructionOffset (0), End = new InstructionOffset ((int) function.length) };
if (function.tokenOfMethodWhoseUsingInfoAppliesToThisMethod != method.MetadataToken.ToUInt32 () && function.tokenOfMethodWhoseUsingInfoAppliesToThisMethod != 0)
symbol.scope.import = GetImport (function.tokenOfMethodWhoseUsingInfoAppliesToThisMethod, method.Module);
if (function.scopes.Length > 1) {
for (int i = 1; i < function.scopes.Length; i++) {
var s = ReadScopeAndLocals (function.scopes [i], symbol);
if (!AddScope (symbol.scope.Scopes, s))
symbol.scope.Scopes.Add (s);
}
}
if (function.iteratorScopes != null) {
var state_machine = new StateMachineScopeDebugInformation ();
foreach (var iterator_scope in function.iteratorScopes) {
state_machine.Scopes.Add (new StateMachineScope ((int) iterator_scope.Offset, (int) (iterator_scope.Offset + iterator_scope.Length + 1)));
}
symbol.CustomDebugInformations.Add (state_machine);
}
if (function.synchronizationInformation != null) {
var async_debug_info = new AsyncMethodBodyDebugInformation ((int) function.synchronizationInformation.GeneratedCatchHandlerOffset);
foreach (var synchronization_point in function.synchronizationInformation.synchronizationPoints) {
async_debug_info.Yields.Add (new InstructionOffset ((int) synchronization_point.SynchronizeOffset));
async_debug_info.Resumes.Add (new InstructionOffset ((int) synchronization_point.ContinuationOffset));
async_debug_info.ResumeMethods.Add (method);
}
symbol.CustomDebugInformations.Add (async_debug_info);
symbol.StateMachineKickOffMethod = (MethodDefinition) method.Module.LookupToken ((int) function.synchronizationInformation.kickoffMethodToken);
}
return symbol;
}
Collection<ScopeDebugInformation> ReadScopeAndLocals (PdbScope [] scopes, MethodDebugInformation info)
{
var symbols = new Collection<ScopeDebugInformation> (scopes.Length);
foreach (PdbScope scope in scopes)
if (scope != null)
symbols.Add (ReadScopeAndLocals (scope, info));
return symbols;
}
ScopeDebugInformation ReadScopeAndLocals (PdbScope scope, MethodDebugInformation info)
{
var parent = new ScopeDebugInformation ();
parent.Start = new InstructionOffset ((int) scope.offset);
parent.End = new InstructionOffset ((int) (scope.offset + scope.length));
if (!scope.slots.IsNullOrEmpty ()) {
parent.variables = new Collection<VariableDebugInformation> (scope.slots.Length);
foreach (PdbSlot slot in scope.slots) {
if (slot.flags == 1) // parameter names
continue;
var index = (int) slot.slot;
var variable = new VariableDebugInformation (index, slot.name);
if (slot.flags == 4)
variable.IsDebuggerHidden = true;
parent.variables.Add (variable);
}
}
if (!scope.constants.IsNullOrEmpty ()) {
parent.constants = new Collection<ConstantDebugInformation> (scope.constants.Length);
foreach (var constant in scope.constants) {
var type = info.Method.Module.Read (constant, (c, r) => r.ReadConstantSignature (new MetadataToken (c.token)));
var value = constant.value;
// Object "null" is encoded as integer
if (type != null && !type.IsValueType && value is int && (int) value == 0)
value = null;
parent.constants.Add (new ConstantDebugInformation (constant.name, type, value));
}
}
if (!scope.usedNamespaces.IsNullOrEmpty ()) {
ImportDebugInformation import;
if (imports.TryGetValue (scope, out import)) {
parent.import = import;
} else {
import = GetImport (scope, info.Method.Module);
imports.Add (scope, import);
parent.import = import;
}
}
parent.scopes = ReadScopeAndLocals (scope.scopes, info);
return parent;
}
static bool AddScope (Collection<ScopeDebugInformation> scopes, ScopeDebugInformation scope)
{
foreach (var sub_scope in scopes) {
if (sub_scope.HasScopes && AddScope (sub_scope.Scopes, scope))
return true;
if (scope.Start.Offset >= sub_scope.Start.Offset && scope.End.Offset <= sub_scope.End.Offset) {
sub_scope.Scopes.Add (scope);
return true;
}
}
return false;
}
ImportDebugInformation GetImport (uint token, ModuleDefinition module)
{
PdbFunction function;
if (!functions.TryGetValue (token, out function))
return null;
if (function.scopes.Length != 1)
return null;
var scope = function.scopes [0];
ImportDebugInformation import;
if (imports.TryGetValue (scope, out import))
return import;
import = GetImport (scope, module);
imports.Add (scope, import);
return import;
}
static ImportDebugInformation GetImport (PdbScope scope, ModuleDefinition module)
{
if (scope.usedNamespaces.IsNullOrEmpty ())
return null;
var import = new ImportDebugInformation ();
foreach (var used_namespace in scope.usedNamespaces) {
if (string.IsNullOrEmpty (used_namespace))
continue;
ImportTarget target = null;
var value = used_namespace.Substring (1);
switch (used_namespace [0]) {
case 'U':
target = new ImportTarget (ImportTargetKind.ImportNamespace) { @namespace = value };
break;
case 'T': {
var type = TypeParser.ParseType (module, value);
if (type != null)
target = new ImportTarget (ImportTargetKind.ImportType) { type = type };
break;
}
case 'A':
var index = used_namespace.IndexOf (' ');
if (index < 0) {
target = new ImportTarget (ImportTargetKind.ImportNamespace) { @namespace = used_namespace };
break;
}
var alias_value = used_namespace.Substring (1, index - 1);
var alias_target_value = used_namespace.Substring (index + 2);
switch (used_namespace [index + 1]) {
case 'U':
target = new ImportTarget (ImportTargetKind.DefineNamespaceAlias) { alias = alias_value, @namespace = alias_target_value };
break;
case 'T':
var type = TypeParser.ParseType (module, alias_target_value);
if (type != null)
target = new ImportTarget (ImportTargetKind.DefineTypeAlias) { alias = alias_value, type = type };
break;
}
break;
case '*':
target = new ImportTarget (ImportTargetKind.ImportNamespace) { @namespace = value };
break;
case '@':
if (!value.StartsWith ("P:"))
continue;
target = new ImportTarget (ImportTargetKind.ImportNamespace) { @namespace = value.Substring (2) };
break;
}
if (target != null)
import.Targets.Add (target);
}
return import;
}
void ReadSequencePoints (PdbFunction function, MethodDebugInformation info)
{
if (function.lines == null)
return;
info.sequence_points = new Collection<SequencePoint> ();
foreach (PdbLines lines in function.lines)
ReadLines (lines, info);
}
void ReadLines (PdbLines lines, MethodDebugInformation info)
{
var document = GetDocument (lines.file);
foreach (var line in lines.lines)
ReadLine (line, document, info);
}
static void ReadLine (PdbLine line, Document document, MethodDebugInformation info)
{
var sequence_point = new SequencePoint ((int) line.offset, document);
sequence_point.StartLine = (int) line.lineBegin;
sequence_point.StartColumn = (int) line.colBegin;
sequence_point.EndLine = (int) line.lineEnd;
sequence_point.EndColumn = (int) line.colEnd;
info.sequence_points.Add (sequence_point);
}
Document GetDocument (PdbSource source)
{
string name = source.name;
Document document;
if (documents.TryGetValue (name, out document))
return document;
document = new Document (name) {
Language = source.language.ToLanguage (),
LanguageVendor = source.vendor.ToVendor (),
Type = source.doctype.ToType (),
};
documents.Add (name, document);
return document;
}
public void Dispose ()
{
pdb_file.Dispose ();
}
}
}
| 28.704 | 163 | 0.691657 | [
"MIT"
] | AlexanderTemnov/cecil | symbols/pdb/Mono.Cecil.Pdb/NativePdbReader.cs | 10,764 | C# |
using System.Web;
using System.Web.Optimization;
namespace ConvoyServer
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}
| 38.310345 | 112 | 0.578758 | [
"Apache-2.0"
] | amirton/convoy-server | ConvoyServer/App_Start/BundleConfig.cs | 1,113 | C# |
using System;
class BitShooter
{
static void Main()
{
const int BITS = 64;
ulong inputBits = ulong.Parse(Console.ReadLine());
ulong shootedBits = 0;
for (int i = 0; i < 3; i++)
{
string shoot = Console.ReadLine();
string[] shootDetails = shoot.Split(' ');
int shootCenter = int.Parse(shootDetails[0]);
int shootSize = int.Parse(shootDetails[1]);
int startBit = shootCenter - shootSize / 2;
int endBit = shootCenter + shootSize / 2;
for (int bit = startBit; bit <= endBit; bit++)
{
if (bit >= 0 && bit < BITS)
{
shootedBits = shootedBits | ((ulong)1 << bit);
}
}
}
ulong aliveBits = inputBits & (~shootedBits);
//Console.WriteLine(Convert.ToString((long)inputBits, 2).PadLeft(64,'0'));
//Console.WriteLine(Convert.ToString((long)~shootedBits, 2).PadLeft(64, '0'));
//Console.WriteLine(Convert.ToString((long)aliveBits, 2).PadLeft(64, '0'));
ulong rightBits = 0;
for (int i = 0; i < BITS / 2; i++)
{
rightBits += aliveBits & 1;
aliveBits >>= 1;
}
ulong leftBits = 0;
for (int i = 0; i < BITS / 2; i++)
{
leftBits += aliveBits & 1;
aliveBits >>= 1;
}
Console.WriteLine("left: " + leftBits);
Console.WriteLine("right: " + rightBits);
}
}
| 29.865385 | 86 | 0.484868 | [
"Apache-2.0"
] | genadi60/SoftUni | SoftUni_Exam/C# Basics Exam 14 April 2014 Morning/Problem05-Bit-Shooter/05.BitShooter-Solution.cs | 1,553 | 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.ContainerRegistry.V20201101Preview.Outputs
{
[OutputType]
public sealed class EventResponseMessageResponseResult
{
/// <summary>
/// The content of the event response message.
/// </summary>
public readonly string? Content;
/// <summary>
/// The headers of the event response message.
/// </summary>
public readonly ImmutableDictionary<string, string>? Headers;
/// <summary>
/// The reason phrase of the event response message.
/// </summary>
public readonly string? ReasonPhrase;
/// <summary>
/// The status code of the event response message.
/// </summary>
public readonly string? StatusCode;
/// <summary>
/// The HTTP message version.
/// </summary>
public readonly string? Version;
[OutputConstructor]
private EventResponseMessageResponseResult(
string? content,
ImmutableDictionary<string, string>? headers,
string? reasonPhrase,
string? statusCode,
string? version)
{
Content = content;
Headers = headers;
ReasonPhrase = reasonPhrase;
StatusCode = statusCode;
Version = version;
}
}
}
| 29.087719 | 81 | 0.604343 | [
"Apache-2.0"
] | pulumi/pulumi-azure-nextgen | sdk/dotnet/ContainerRegistry/V20201101Preview/Outputs/EventResponseMessageResponseResult.cs | 1,658 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UE4Patcher.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UE4Patcher.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
| 39.098592 | 176 | 0.603026 | [
"MIT"
] | Tonnilson/BnS-UE4Patcher | UE4Patcher/Properties/Resources.Designer.cs | 2,778 | C# |
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Cecil;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace StrongNamer
{
public class AddStrongName : Microsoft.Build.Utilities.Task
{
[Required]
public ITaskItem[] Assemblies { get; set; }
[Required]
public ITaskItem SignedAssemblyFolder { get; set; }
public ITaskItem[] CopyLocalFiles { get; set; }
[Output]
public ITaskItem[] SignedAssembliesToReference { get; set; }
[Output]
public ITaskItem[] NewCopyLocalFiles { get; set; }
[Required]
public ITaskItem KeyFile { get; set; }
public override bool Execute()
{
if (Assemblies == null || Assemblies.Length == 0)
{
return true;
}
if (SignedAssemblyFolder == null || string.IsNullOrEmpty(SignedAssemblyFolder.ItemSpec))
{
Log.LogError($"{nameof(SignedAssemblyFolder)} not specified");
return false;
}
if (KeyFile == null || string.IsNullOrEmpty(KeyFile.ItemSpec))
{
Log.LogError("KeyFile not specified");
return false;
}
if (!File.Exists(KeyFile.ItemSpec))
{
Log.LogError($"KeyFile not found: ${KeyFile.ItemSpec}");
return false;
}
StrongNameKeyPair key;
using (var keyStream = File.OpenRead(KeyFile.ItemSpec))
{
key = new StrongNameKeyPair(keyStream);
}
SignedAssembliesToReference = new ITaskItem[Assemblies.Length];
Dictionary<string, string> updatedReferencePaths = new Dictionary<string, string>();
for (int i = 0; i < Assemblies.Length; i++)
{
SignedAssembliesToReference[i] = ProcessAssembly(Assemblies[i], key);
if (SignedAssembliesToReference[i].ItemSpec != Assemblies[i].ItemSpec)
{
// Path was updated to signed version
updatedReferencePaths[Assemblies[i].ItemSpec] = SignedAssembliesToReference[i].ItemSpec;
}
}
if (CopyLocalFiles != null)
{
NewCopyLocalFiles = new ITaskItem[CopyLocalFiles.Length];
for (int i=0; i< CopyLocalFiles.Length; i++)
{
string updatedPath;
if (updatedReferencePaths.TryGetValue(CopyLocalFiles[i].ItemSpec, out updatedPath))
{
NewCopyLocalFiles[i] = new TaskItem(CopyLocalFiles[i]);
NewCopyLocalFiles[i].ItemSpec = updatedPath;
}
else
{
NewCopyLocalFiles[i] = CopyLocalFiles[i];
}
}
}
return true;
}
ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key)
{
var assembly = AssemblyDefinition.ReadAssembly(assemblyItem.ItemSpec);
if (assembly.Name.HasPublicKey)
{
Log.LogMessage(MessageImportance.Low, $"Assembly file '{assemblyItem.ItemSpec}' is already signed. Skipping.");
return assemblyItem;
}
string signedAssemblyFolder = Path.GetFullPath(SignedAssemblyFolder.ItemSpec);
if (!Directory.Exists(signedAssemblyFolder))
{
Directory.CreateDirectory(signedAssemblyFolder);
}
string assemblyOutputPath = Path.Combine(signedAssemblyFolder, Path.GetFileName(assemblyItem.ItemSpec));
var token = GetKeyTokenFromKey(key.PublicKey);
string formattedKeyToken = BitConverter.ToString(token).Replace("-", "");
Log.LogMessage(MessageImportance.Low, $"Signing assembly {assembly.FullName} with key with token {formattedKeyToken}");
assembly.Name.HashAlgorithm = AssemblyHashAlgorithm.SHA1;
assembly.Name.PublicKey = key.PublicKey;
assembly.Name.HasPublicKey = true;
assembly.Name.Attributes &= AssemblyAttributes.PublicKey;
foreach (var reference in assembly.MainModule.AssemblyReferences.Where(r => r.PublicKeyToken == null || r.PublicKeyToken.Length == 0))
{
reference.PublicKeyToken = token;
Log.LogMessage(MessageImportance.Low, $"Updating reference in assembly {assembly.FullName} to {reference.FullName} to use token {formattedKeyToken}");
}
string fullPublicKey = BitConverter.ToString(key.PublicKey).Replace("-", "");
var internalsVisibleToAttributes = assembly.CustomAttributes.Where(att => att.AttributeType.FullName == typeof(System.Runtime.CompilerServices.InternalsVisibleToAttribute).FullName).ToList();
foreach (var internalsVisibleToAttribute in internalsVisibleToAttributes)
{
string internalsVisibleToAssemblyName = (string) internalsVisibleToAttribute.ConstructorArguments[0].Value;
string newInternalsVisibleToAssemblyName = internalsVisibleToAssemblyName + ", PublicKey=" + fullPublicKey;
Log.LogMessage(MessageImportance.Low, $"Updating InternalsVisibleToAttribute in {assembly.FullName} from {internalsVisibleToAssemblyName} to {newInternalsVisibleToAssemblyName}");
internalsVisibleToAttribute.ConstructorArguments[0] = new CustomAttributeArgument(internalsVisibleToAttribute.ConstructorArguments[0].Type, newInternalsVisibleToAssemblyName);
}
assembly.Write(assemblyOutputPath, new WriterParameters()
{
StrongNameKeyPair = key
});
var ret = new TaskItem(assemblyItem);
ret.ItemSpec = assemblyOutputPath;
return ret;
}
private static byte[] GetKeyTokenFromKey(byte[] fullKey)
{
byte[] hash;
using (var sha1 = SHA1.Create())
{
hash = sha1.ComputeHash(fullKey);
}
return hash.Reverse().Take(8).ToArray();
}
}
}
| 37.396552 | 203 | 0.596742 | [
"MIT"
] | jesuissur/strongnamer | src/StrongNamer/AddStrongName.cs | 6,509 | C# |
using System;
using System.Globalization;
using System.Linq;
namespace MyLab.Search.Delegate.QueryTools
{
class RangeDateQueryExpressionFactory : IQueryExpressionFactory
{
public bool TryCreate(string literal, out IQueryExpression queryExpression)
{
queryExpression = null;
var parts = literal.Split('-');
if (parts.Length != 2) return false;
if (DateTime.TryParseExact(parts[0], DateQueryFormats.Formats.ToArray(), CultureInfo.InvariantCulture, DateTimeStyles.None, out var dt1)
&&
DateTime.TryParseExact(parts[1], DateQueryFormats.Formats.ToArray(), CultureInfo.InvariantCulture, DateTimeStyles.None, out var dt2))
{
queryExpression = new RangeDateQueryExpression(dt1, dt2);
}
return queryExpression != null;
}
}
} | 32.962963 | 149 | 0.644944 | [
"MIT"
] | mylab-search-fx/delegate | src/MyLab.Search.Delegate/QueryTools/RangeDateQueryExpressionFactory.cs | 892 | C# |
namespace RawData
{
public class Tyre
{
private double pressure;
private int age;
public Tyre(double pressure, int age)
{
this.Pressure = pressure;
this.Age = age;
}
public double Pressure
{
get { return this.pressure; }
set { this.pressure = value; }
}
public int Age
{
get { return this.age; }
set { this.age = value; }
}
}
} | 18.666667 | 45 | 0.454365 | [
"MIT"
] | TihomirIvanovIvanov/SoftUni | C#Fundamentals/C#OOP-Basics/01DefiningClasses/src/DefiningClassesExercise/RawData/Tyre.cs | 506 | C# |
/*
* Original author: Nicholas Shulman <nicksh .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2015 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using pwiz.Common.DataAnalysis;
using pwiz.Skyline.Util.Extensions;
namespace pwiz.SkylineTestA.MSstats
{
public static class MsStatsTestUtil
{
public static TextReader GetTextReaderForManifestResource(Type type, string filename)
{
var stream = type.Assembly.GetManifestResourceStream(type, filename);
Assert.IsNotNull(stream);
return new StreamReader(stream);
}
public static IList<Dictionary<string, string>> ReadCsvFile(DsvFileReader fileReader)
{
var result = new List<Dictionary<string, string>>();
while (null != fileReader.ReadLine())
{
Dictionary<string, string> row = new Dictionary<string, string>();
for (int i = 0; i < fileReader.NumberOfFields; i++)
{
var value = fileReader.GetFieldByIndex(i);
if (null != value)
{
row.Add(fileReader.FieldNames[i], value);
}
}
result.Add(row);
}
return result;
}
public static IDictionary<string, LinearFitResult> ReadExpectedResults(Type type, string resourceName)
{
var result = new Dictionary<string, LinearFitResult>();
using (var reader = GetTextReaderForManifestResource(type, resourceName))
{
var csvReader = new DsvFileReader(reader, ',');
while (null != csvReader.ReadLine())
{
string protein = csvReader.GetFieldByName("Protein");
var linearFitResult = new LinearFitResult(Convert.ToDouble(csvReader.GetFieldByName("log2FC"), CultureInfo.InvariantCulture))
.SetStandardError(Convert.ToDouble(csvReader.GetFieldByName("SE"), CultureInfo.InvariantCulture))
.SetTValue(Convert.ToDouble(csvReader.GetFieldByName("Tvalue"), CultureInfo.InvariantCulture))
.SetDegreesOfFreedom(Convert.ToInt32(csvReader.GetFieldByName("DF"), CultureInfo.InvariantCulture))
.SetPValue(Convert.ToDouble(csvReader.GetFieldByName("pvalue"), CultureInfo.InvariantCulture));
result.Add(protein, linearFitResult);
}
}
return result;
}
}
}
| 43.564103 | 146 | 0.610065 | [
"Apache-2.0"
] | shze/pwizard-deb | pwiz_tools/Skyline/TestA/MSstats/MsStatsTestUtil.cs | 3,400 | C# |
// Copyright 2014 The Rector & Visitors of the University of Virginia
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using Android.Hardware;
namespace Sensus.Shared.Android
{
interface IAndroidSensusServiceHelper
{
int WakeLockAcquisitionCount { get; }
void StopAndroidSensusService();
SensorManager GetSensorManager();
}
}
| 32.25 | 76 | 0.710963 | [
"Apache-2.0"
] | w-bonelli/sensus | Sensus.Shared.Android/IAndroidSensusServiceHelper.cs | 905 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Globalization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing.Matching;
namespace Microsoft.AspNetCore.Routing.Constraints;
/// <summary>
/// Constrains a route parameter to represent only file name values. Does not validate that
/// the route value contains valid file system characters, or that the value represents
/// an actual file on disk.
/// </summary>
/// <remarks>
/// <para>
/// This constraint can be used to disambiguate requests for static files versus dynamic
/// content served from the application.
/// </para>
/// <para>
/// This constraint determines whether a route value represents a file name by examining
/// the last URL Path segment of the value (delimited by <c>/</c>). The last segment
/// must contain the dot (<c>.</c>) character followed by one or more non-(<c>.</c>) characters.
/// </para>
/// <para>
/// If the route value does not contain a <c>/</c> then the entire value will be interpreted
/// as the last segment.
/// </para>
/// <para>
/// The <see cref="FileNameRouteConstraint"/> does not attempt to validate that the value contains
/// a legal file name for the current operating system.
/// </para>
/// <para>
/// The <see cref="FileNameRouteConstraint"/> does not attempt to validate that the value represents
/// an actual file on disk.
/// </para>
/// <para>
/// <list type="bullet">
/// <listheader>
/// <term>Examples of route values that will be matched as file names</term>
/// <description>description</description>
/// </listheader>
/// <item>
/// <term><c>/a/b/c.txt</c></term>
/// <description>Final segment contains a <c>.</c> followed by other characters.</description>
/// </item>
/// <item>
/// <term><c>/hello.world.txt</c></term>
/// <description>Final segment contains a <c>.</c> followed by other characters.</description>
/// </item>
/// <item>
/// <term><c>hello.world.txt</c></term>
/// <description>Final segment contains a <c>.</c> followed by other characters.</description>
/// </item>
/// <item>
/// <term><c>.gitignore</c></term>
/// <description>Final segment contains a <c>.</c> followed by other characters.</description>
/// </item>
/// </list>
/// <list type="bullet">
/// <listheader>
/// <term>Examples of route values that will be rejected as non-file-names</term>
/// <description>description</description>
/// </listheader>
/// <item>
/// <term><c>/a/b/c</c></term>
/// <description>Final segment does not contain a <c>.</c>.</description>
/// </item>
/// <item>
/// <term><c>/a/b.d/c</c></term>
/// <description>Final segment does not contain a <c>.</c>.</description>
/// </item>
/// <item>
/// <term><c>/a/b.d/c/</c></term>
/// <description>Final segment is empty.</description>
/// </item>
/// <item>
/// <term><c></c></term>
/// <description>Value is empty</description>
/// </item>
/// </list>
/// </para>
/// </remarks>
public class FileNameRouteConstraint : IRouteConstraint, IParameterLiteralNodeMatchingPolicy
{
/// <inheritdoc />
public bool Match(
HttpContext? httpContext,
IRouter? route,
string routeKey,
RouteValueDictionary values,
RouteDirection routeDirection)
{
if (routeKey == null)
{
throw new ArgumentNullException(nameof(routeKey));
}
if (values == null)
{
throw new ArgumentNullException(nameof(values));
}
if (values.TryGetValue(routeKey, out var obj) && obj != null)
{
var value = Convert.ToString(obj, CultureInfo.InvariantCulture);
return IsFileName(value);
}
// No value or null value.
return false;
}
// This is used both here and in NonFileNameRouteConstraint
// Any changes to this logic need to update the docs in those places.
internal static bool IsFileName(ReadOnlySpan<char> value)
{
if (value.Length == 0)
{
// Not a file name because empty.
return false;
}
var lastSlashIndex = value.LastIndexOf('/');
if (lastSlashIndex >= 0)
{
value = value.Slice(lastSlashIndex + 1);
}
var dotIndex = value.IndexOf('.');
if (dotIndex == -1)
{
// No dot.
return false;
}
for (var i = dotIndex + 1; i < value.Length; i++)
{
if (value[i] != '.')
{
return true;
}
}
return false;
}
bool IParameterLiteralNodeMatchingPolicy.MatchesLiteral(string parameterName, string literal)
{
return IsFileName(literal);
}
}
| 32.545455 | 102 | 0.590782 | [
"MIT"
] | AndrewTriesToCode/aspnetcore | src/Http/Routing/src/Constraints/FileNameRouteConstraint.cs | 5,012 | C# |
/*
* Copyright (c) 2020 Microsoft Corporation. All rights reserved.
* Modified work Copyright (c) 2008 MindTouch. 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
*/
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
| 29.421053 | 68 | 0.731664 | [
"Apache-2.0"
] | carbon/SgmlReader | SgmlReader/AssemblyInfo.cs | 559 | C# |
//
// Copyright (c) Trafikselskabet Movia. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
using System;
using System.Linq;
using ServiceStack.Countdown.TestClient.Services;
namespace ServiceStack.Countdown.TestClient
{
class Program
{
static void Main(string[] args)
{
try
{
// Set up client and get credentials.
var client = new CountdownServiceClient();
Console.Write("Enter username: ");
client.ClientCredentials.UserName.UserName = Console.ReadLine();
Console.Write("Enter password: ");
client.ClientCredentials.UserName.Password = Console.ReadLine();
Console.WriteLine();
// Test Version Method
Console.WriteLine("Getting Version ...");
var ver = client.Version();
Console.WriteLine($"Received Version '{ver}'");
Console.WriteLine();
// Test GetStopPointSet Method
Console.WriteLine("Getting Stop Points ...");
var stopPoints = client.GetStopPointSet();
Console.WriteLine($"Received {stopPoints.stopPoints.Count():n0} stop points. Displaying first 10:");
Console.WriteLine($"{"Id",5} {"Name"}");
stopPoints.stopPoints.Take(10).ToList().ForEach(x => Console.WriteLine($"{x.id,5} {x.name}"));
Console.WriteLine();
// Test PostStatusReportSet Method
Console.Write("Enter stop number: ");
var stop = Console.ReadLine();
Console.Write("Enter device number: ");
var device = Console.ReadLine();
Console.WriteLine($"Subscribing to stop point id '{stop}' to device '{device}'.");
var sub = client.PostStatusReportSet(new statusReportSet()
{
statusReports = new[] { new statusReportSet.statusReport()
{
deviceId = Int32.Parse(device),
lastUpdate = DateTime.UtcNow,
stopPointId = Int32.Parse(stop)
}
}
});
Console.WriteLine($"Received {sub}");
Console.WriteLine();
// Test GetDepartureTimeSet Method
Console.WriteLine("Getting Departure Times ...");
var dep1 = client.GetDepartureTimeSet();
Console.WriteLine($"Received departures for {dep1.stopPoints.Count():n0} stop points. Displaying first 10:");
Console.WriteLine($"{"Id",5} {"Name"}");
dep1.stopPoints.Take(10).ToList().ForEach(x => {
Console.WriteLine($"{x.id,5} {x.name}");
Console.WriteLine($" {"Line",5} {"Destination",-20} {"Time",8}");
x.lineDestinations.ToList().ForEach(y =>
{
y.departures.ToList().ForEach(lineDep => Console.WriteLine($" {y.designation,5} {y.destination,-20} {lineDep.time,8:t}"));
});
});
Console.WriteLine();
// Test GetDeviationMessageSet Method
Console.WriteLine("Getting Deviations ...");
var dev1 = client.GetDeviationMessageSet();
Console.WriteLine($"Received deviations for {dev1.stopPoints.Count():n0} stop points. Displaying first 10 stops:");
Console.WriteLine($"{"Id",5} {"Name"}");
dev1.stopPoints.Take(10).ToList().ForEach(x => {
Console.WriteLine($" {x.id,5} {x.name}");
Console.WriteLine($" {"Deviation text",5} ");
x.deviations.Take(1).ToList().ForEach(y =>
{
y.header.Take(1).ToList().ForEach(stopDev => Console.WriteLine($" {y.header,5} "));
Console.WriteLine();
});
});
Console.WriteLine();
}
catch (Exception ex)
{
while (ex != null)
{
Console.WriteLine($"Exception: {ex.Message}");
ex = ex.InnerException;
}
}
Console.WriteLine();
Console.WriteLine("Press any key to exit ...");
Console.ReadKey();
}
}
}
| 38.916667 | 157 | 0.493148 | [
"MIT"
] | movia/servicestack-countdown-testclient | src/ServiceStack.Countdown.TestClient/Program.cs | 4,672 | C# |
// Copyright 2018 by JCoder58. See License.txt for license
// Auto-generated --- Do not modify.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UE4.Core;
using UE4.CoreUObject;
using UE4.CoreUObject.Native;
using UE4.InputCore;
using UE4.Native;
namespace UE4.TimeManagement.Native {
[StructLayout( LayoutKind.Explicit, Size=64 )]
internal unsafe struct FixedFrameRateCustomTimeStep_fields {
[FieldOffset(56)] public FrameRate FixedFrameRate;
}
internal unsafe struct FixedFrameRateCustomTimeStep_methods {
}
internal unsafe struct FixedFrameRateCustomTimeStep_events {
}
}
| 28.565217 | 65 | 0.770167 | [
"MIT"
] | UE4DotNet/Plugin | DotNet/DotNet/UE4/Generated/TimeManagement/Native/FixedFrameRateCustomTimeStep.cs | 657 | C# |
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Windows.ApplicationModel.Resources;
using Windows.ApplicationModel.Resources.Core;
// Given_StorageFile2 , as Given_StorageFile is used in PR#2407
// Testing DateCreated and DateModified in one test method
namespace Uno.UI.RuntimeTests.Tests
{
[TestClass]
public class Given_StorageFile2
{
String _filename;
[TestInitialize]
public void Init()
{
_filename = DateTime.Now.ToString("yyyyMMddHHmmss") + ".txt";
}
[TestCleanup]
public void Cleanup()
{
}
[TestMethod]
public async Task When_DateCreated()
{
var folderForTestFile = Windows.Storage.ApplicationData.Current.LocalFolder;
Assert.IsNotNull(folderForTestFile, "cannot get LocalFolder - error outside tested method");
Windows.Storage.StorageFile testFile = null;
DateTimeOffset dateBeforeCreating = DateTimeOffset.Now;
try
{
testFile = await folderForTestFile.CreateFileAsync(_filename, Windows.Storage.CreationCollisionOption.FailIfExists);
Assert.IsNotNull(testFile, "cannot create file - error outside tested method");
}
catch (Exception e)
{
Assert.Fail($"CreateFile exception - error outside tested method ({e})");
}
DateTimeOffset dateAfterCreating = DateTimeOffset.Now;
// tests of DateCreated
DateTimeOffset dateOnCreating = DateTimeOffset.Now; // unneeded initialization - just to skip compiler error of using uninitialized variable
try
{
dateOnCreating = testFile.DateCreated;
}
catch (Exception e)
{
Assert.Fail($"DateCreated exception - error in tested method ({e})");
}
// while testing date, we should remember about filesystem date resolution.
// FAT: 2 seconds, but we don't have FAT
// NTFS: 100 ns
// VFAT (SD cards): can be as small as 10 ms
// ext4 (internal Android): can be below 1 ms
// APFS (since iOS 10.3): 1 ns
// HFS+ (before iOS 10.3): 1 s
// first, date should not be year 1601 or something like that...
if (dateOnCreating < dateBeforeCreating.AddSeconds(-2))
{
Assert.Fail("DateCreated: too early - method doesnt work");
}
// second, date should not be in future
if (dateOnCreating > dateAfterCreating.AddSeconds(2))
{
Assert.Fail("DateCreated: too late - method doesnt work");
}
// third, it should not be "datetime.now"
var initialTimeDiff = DateTimeOffset.Now - dateOnCreating;
int loopGuard;
for (loopGuard = 20; loopGuard > 0; loopGuard--) // wait for date change for max 5 seconds
{
await Task.Delay(250);
dateOnCreating = testFile.DateCreated;
if (DateTimeOffset.Now - dateOnCreating > initialTimeDiff)
{
break;
}
}
if (loopGuard < 1)
{
Assert.Fail("DateCreated: probably == DateTime.Now, - method doesnt work");
}
// now, test Date Modified
DateTimeOffset dateBeforeModify = DateTimeOffset.Now;
// modify file
Stream fileStream = await testFile.OpenStreamForWriteAsync();
fileStream.Seek(0, SeekOrigin.End);
StreamWriter streamWriter = new StreamWriter(fileStream);
streamWriter.Write(_filename); // anything - just write String
streamWriter.Dispose();
fileStream.Dispose();
DateTimeOffset dateAfterModify = DateTimeOffset.Now;
// get DateModified
DateTimeOffset dateModified = DateTimeOffset.Now; // unneeded initialization - just to skip compiler error of using uninitialized variable
try
{
dateModified = (await testFile.GetBasicPropertiesAsync()).DateModified;
}
catch (Exception e)
{
Assert.Fail($"DateModified exception - error in tested method ({e})");
}
// first, date should not be year 1601 or something like that...
if (dateModified < dateBeforeModify.AddSeconds(-2))
{
Assert.Fail("DateModified: too early - method doesnt work");
}
// second, date should not be in future
if (dateModified > dateAfterModify.AddSeconds(2))
{
Assert.Fail("DateCreated: too late - method doesnt work");
}
// third, it should not be "datetime.now"
initialTimeDiff = DateTimeOffset.Now - dateModified;
for (loopGuard = 20; loopGuard > 0; loopGuard--) // wait for date change for max 5 seconds
{
await Task.Delay(250);
var dateModifiedLoop = (await testFile.GetBasicPropertiesAsync()).DateModified;
if (DateTimeOffset.Now - dateModifiedLoop > initialTimeDiff)
{
break;
}
}
if (loopGuard < 1)
{
Assert.Fail("DateModified: probably == DateTime.Now, - method doesnt work");
}
// last test
if (dateModified < dateOnCreating)
{
Assert.Fail("DateModified == DateCreated, - method doesnt work");
}
}
}
}
| 28.485207 | 143 | 0.702742 | [
"Apache-2.0"
] | AbdalaMask/uno | src/Uno.UI.RuntimeTests/Tests/Windows_Storage/Given_StorageFile2.cs | 4,814 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConvertSpeedUnits
{
class Program
{
static void Main(string[] args)
{
float distanceInMeters = float.Parse(Console.ReadLine());
int hours = int.Parse(Console.ReadLine());
int minutes = int.Parse(Console.ReadLine());
int seconds = int.Parse(Console.ReadLine());
float timeInSeconds = (hours * 3600f) + (minutes * 60f) + seconds;
float timeInHours = (seconds / 3600f) + (minutes / 60f) + hours;
float speedInMetersPerSecond = distanceInMeters / timeInSeconds;
float speedInKilometersPerHour = (distanceInMeters / 1000f) / timeInHours;
float speedInMilesPerHour = (distanceInMeters / 1609f) / timeInHours;
Console.WriteLine($"{speedInMetersPerSecond}\n{speedInKilometersPerHour}\n{speedInMilesPerHour}");
}
}
}
| 33.2 | 110 | 0.646586 | [
"MIT"
] | yani-valeva/Programming-Fundamentals | DataType/ConvertSpeedUnits/Program.cs | 998 | C# |
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace GraphLite.Tests
{
[Collection(TestFixtureCollection.Name)]
public class GraphClientQueryTests
{
private readonly GraphApiClient _client;
private readonly TestClientFixture _fixture;
public GraphClientQueryTests(TestClientFixture fixture)
{
_fixture = fixture;
_client = fixture.Client;
}
[Fact]
public void TestQueryInOperator()
{
var userQuery = new ODataQuery<User>()
.WhereIn(u => u.UserPrincipalName, "another@gmail.com", "another2@gmail.com")
.Top(20)
.OrderBy(u => u.MailNickname);
var expected = "$top=20&$orderby=mailNickname&$filter=(userPrincipalName eq 'another@gmail.com' or userPrincipalName eq 'another2@gmail.com')";
var actualDecoded = System.Net.WebUtility.UrlDecode(userQuery.ToString());
Assert.Equal(expected, actualDecoded);
}
[Fact]
public void TestQueryTwoFilterClauses()
{
var userQuery = new ODataQuery<User>()
.WhereIn(u => u.UserPrincipalName, "another@gmail.com", "another2@gmail.com")
.Where(u => u.GivenName, "nikos", ODataOperator.GreaterThanEquals)
.Top(20)
.OrderBy(u => u.MailNickname);
var expected = "$top=20&$orderby=mailNickname&$filter=(userPrincipalName eq 'another@gmail.com' or userPrincipalName eq 'another2@gmail.com') and givenName ge 'nikos'";
var actualDecoded = System.Net.WebUtility.UrlDecode(userQuery.ToString());
Assert.Equal(expected, actualDecoded);
}
[SkippableFact]
public async Task TestQueryByExtensionProperty()
{
var extPropertyName = _fixture.ExtensionPropertyName;
Skip.If(string.IsNullOrEmpty(extPropertyName), "No extension property defined");
var userQuery = await _client.UserQueryCreateAsync();
userQuery
.WhereExtendedProperty(extPropertyName, "1235453", ODataOperator.Equals)
.Where(u => u.GivenName, "nikos", ODataOperator.GreaterThanEquals)
.Top(20)
.OrderBy(u => u.MailNickname);
var extApp = await _client.GetB2cExtensionsApplicationAsync();
var extAppId = extApp.AppId;
var expected = $"$top=20&$orderby=mailNickname&$filter=extension_{extAppId.Replace("-", string.Empty)}_{extPropertyName} eq '1235453' and givenName ge 'nikos'";
var actualDecoded = System.Net.WebUtility.UrlDecode(userQuery.ToString());
Assert.Equal(expected, actualDecoded);
}
[Fact]
public async Task TestFetchByUserName()
{
var signinName = _fixture.TestUser.SignInNames[0].Value;
var user = await _client.UserGetBySigninNameAsync(signinName);
Assert.Equal(_fixture.TestUserObjectId, user.ObjectId);
}
[SkippableFact]
public async Task TestFetchByExtensionProperty()
{
var extPropertyName = _fixture.ExtensionPropertyName;
Skip.If(string.IsNullOrEmpty(extPropertyName), "No extension property defined");
var userQuery = await _client.UserQueryCreateAsync();
userQuery
.WhereExtendedProperty(extPropertyName, _fixture.TestUser.GetExtendedProperties()[extPropertyName], ODataOperator.Equals);
var users = await _client.UserGetListAsync(userQuery);
Assert.NotEmpty(users.Items);
Assert.Contains(users.Items, item => item.ObjectId == _fixture.TestUserObjectId);
}
[SkippableFact]
public async Task TestFetchByExtensionPropertyGreaterThan()
{
var extPropertyName = _fixture.ExtensionPropertyName;
Skip.If(string.IsNullOrEmpty(extPropertyName), "No extension property defined");
var userQuery = await _client.UserQueryCreateAsync();
userQuery.WhereExtendedProperty(extPropertyName, "1", ODataOperator.GreaterThan);
await Assert.ThrowsAsync<GraphApiException>(() => _client.UserGetListAsync(userQuery));
}
[Fact]
public async Task TestFetchByUserNameViaStandardQuery()
{
var signinName = _fixture.TestUser.SignInNames[0].Value;
var query = new ODataQuery<User>().Where(u => u.SignInNames, sn => sn.Value, signinName, ODataOperator.Equals);
var users = await _client.UserGetListAsync(query);
Assert.Single(users.Items);
Assert.Equal(_fixture.TestUserObjectId, users.Items[0].ObjectId);
}
}
}
| 41.465517 | 180 | 0.639709 | [
"MIT"
] | JonasSyrstad/GraphLite | src/GraphLite.Tests/GraphClientQueryTests.cs | 4,812 | C# |
namespace BgPeople.Services
{
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
}
| 29.95 | 70 | 0.681135 | [
"MIT"
] | TsvetanKT/BgPeopleWebApi | BgPeopleWebApi.Services/Global.asax.cs | 601 | C# |
using System;
using Windows.Networking.PushNotifications;
using Windows.UI.Popups;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using Microsoft.WindowsAzure.MobileServices;
namespace MFAzureNotificationWin8
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
public MainPage()
{
InitializeComponent();
}
//Init Function for Registering for Push Notifications
private async void InitNotificationsAsync()
{
// Request a push notification channel.
PushNotificationChannel channel = await PushNotificationChannelManager
.CreatePushNotificationChannelForApplicationAsync();
// Register for notifications using the new channel
Exception exception = null;
try
{
await App.MobileService.GetPush().RegisterNativeAsync(channel.Uri);
}
catch (Exception ex)
{
exception = ex;
}
if (exception != null)
{
var dialog = new MessageDialog(exception.Message, "Registering Channel URI");
dialog.Commands.Add(new UICommand("OK"));
await dialog.ShowAsync();
}
else
{
TextBlock.Text = "Successfully registered for WNS";
}
}
private void UIElement_OnTapped(object sender, TappedRoutedEventArgs e)
{
InitNotificationsAsync();
}
}
} | 30.87037 | 93 | 0.580684 | [
"MIT"
] | mobernberger/netmf-ams-notifications | MFAzureNotificationWin8/MainPage.xaml.cs | 1,669 | C# |
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SendingAnEmailWithoutDI
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}
| 26.111111 | 70 | 0.651064 | [
"MIT"
] | AnzhelikaKravchuk/asp-dot-net-core-in-action-2e | Chapter10/A_SendingAnEmailWithoutDI/SendingAnEmailWithoutDI/Program.cs | 705 | C# |
// https://magi82.github.io/process-thread/
// http://www.albahari.com/threading/part2.aspx
using System;
using System.Threading;
class MainClass {
public static void Main (string[] args) {
Action<object> print = Console.WriteLine;
print("Thread Id: " + Thread.CurrentThread.ManagedThreadId);
var t = new Thread(Todo);
print("Before: " + t.ThreadState);
t.Start();
print("After: " + t.ThreadState);
// delegate void ThreadStart(); // callback을 넘김 but 안이쁘니 바로 line 13 처럼 Todo callback
// var t2 = new Thread(new ThreadStart(Todo));
// t2.Start();
t.Join(); // main thread에 합류 할 때까지 대기
// Console.ReadLine();
print("End: " + t.ThreadState);
}
static void Todo() {
Thread.Sleep(500); // 0.5s
Console.WriteLine("Todo: " + Thread.CurrentThread.ManagedThreadId);
}
} | 26 | 88 | 0.645433 | [
"MIT"
] | Bomnamul/DataStructureAlgoCSharp | Class/63-Thread-1-Introduction/main.cs | 872 | C# |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace TaskbarCustomizer.Properties {
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if ((resourceMan == null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TaskbarCustomizer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
| 43.031746 | 183 | 0.622648 | [
"MIT"
] | JustIntroverted/TaskbarCustomizer | TaskbarCustomizer/Properties/Resources.Designer.cs | 2,713 | C# |
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GameTest.Game.PickUps
{
class HealthPickup : PickUp
{
public HealthPickup(int x, int y, Game g) : base(x,y,30,30,g)
{
}
public override void draw(Graphics g)
{
g.DrawImage(Images.HealthPickup, X - Width / 2, Y - Height / 2, Width, Height);
}
public override PickUp interactWithFighter(Fighter f)
{
f.HP += 50;
return null;
}
}
}
| 21.448276 | 91 | 0.567524 | [
"BSD-3-Clause"
] | Markus-A-Huber/FightingSquares | SourceCode/GameTest/Game/PickUps/EffectPickups/HealthPickup.cs | 624 | 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("SharpSSDP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SharpSSDP")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[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("6e383de4-de89-4247-a41a-79db1dc03aaa")]
// 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.459459 | 84 | 0.746753 | [
"BSD-3-Clause"
] | rvrsh3ll/SharpSSDP | SharpSSDP/Properties/AssemblyInfo.cs | 1,389 | C# |
// Url:https://leetcode.com/problems/line-reflection
/*
356. Line Reflection
Medium
// {{ MISSING QUESTION }}
*/
using System;
namespace InterviewPreperationGuide.Core.LeetCode.problem356 {
public class Solution {
public void Init () {
}
}
} | 14.263158 | 62 | 0.660517 | [
"MIT"
] | tarunbatta/ipg | core/leetcode/356.cs | 271 | C# |
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using NBitcoin;
using NBitcoin.Policy;
using Xels.Bitcoin.Builder;
using Xels.Bitcoin.Builder.Feature;
using Xels.Bitcoin.Configuration.Logging;
using Xels.Bitcoin.Connection;
using Xels.Bitcoin.Consensus;
using Xels.Bitcoin.Features.BlockStore;
using Xels.Bitcoin.Features.MemoryPool;
using Xels.Bitcoin.Features.RPC;
using Xels.Bitcoin.Features.Wallet.Broadcasting;
using Xels.Bitcoin.Features.Wallet.Interfaces;
using Xels.Bitcoin.Features.Wallet.Services;
using Xels.Bitcoin.Interfaces;
using Xels.Bitcoin.Utilities;
namespace Xels.Bitcoin.Features.Wallet
{
/// <summary>
/// Common base class for any feature replacing the <see cref="WalletFeature" />.
/// </summary>
public abstract class BaseWalletFeature : FullNodeFeature
{
}
/// <summary>
/// Wallet feature for the full node.
/// </summary>
/// <seealso cref="FullNodeFeature" />
public class WalletFeature : BaseWalletFeature
{
private readonly IWalletSyncManager walletSyncManager;
private readonly IWalletManager walletManager;
private readonly IConnectionManager connectionManager;
private readonly IAddressBookManager addressBookManager;
private readonly BroadcasterBehavior broadcasterBehavior;
private readonly IWalletRepository walletRepository;
/// <summary>
/// Initializes a new instance of the <see cref="WalletFeature"/> class.
/// </summary>
/// <param name="walletSyncManager">The synchronization manager for the wallet, tasked with keeping the wallet synced with the network.</param>
/// <param name="walletManager">The wallet manager.</param>
/// <param name="addressBookManager">The address book manager.</param>
/// <param name="connectionManager">The connection manager.</param>
/// <param name="broadcasterBehavior">The broadcaster behavior.</param>
public WalletFeature(
IWalletSyncManager walletSyncManager,
IWalletManager walletManager,
IAddressBookManager addressBookManager,
IConnectionManager connectionManager,
BroadcasterBehavior broadcasterBehavior,
INodeStats nodeStats,
IWalletRepository walletRepository)
{
this.walletSyncManager = walletSyncManager;
this.walletManager = walletManager;
this.addressBookManager = addressBookManager;
this.connectionManager = connectionManager;
this.broadcasterBehavior = broadcasterBehavior;
this.walletRepository = walletRepository;
nodeStats.RegisterStats(this.AddComponentStats, StatsType.Component, this.GetType().Name);
nodeStats.RegisterStats(this.AddInlineStats, StatsType.Inline, this.GetType().Name, 800);
}
/// <summary>
/// Prints command-line help.
/// </summary>
/// <param name="network">The network to extract values from.</param>
public static void PrintHelp(Network network)
{
WalletSettings.PrintHelp(network);
}
/// <summary>
/// Get the default configuration.
/// </summary>
/// <param name="builder">The string builder to add the settings to.</param>
/// <param name="network">The network to base the defaults off.</param>
public static void BuildDefaultConfigurationFile(StringBuilder builder, Network network)
{
WalletSettings.BuildDefaultConfigurationFile(builder, network);
}
private void AddInlineStats(StringBuilder log)
{
if (this.walletManager.ContainsWallets)
log.AppendLine("Wallet Height".PadRight(LoggingConfiguration.ColumnLength) + $": {this.walletManager.WalletTipHeight}".PadRight(10) + $"(Hash: {this.walletManager.WalletTipHash})");
else
log.AppendLine("Wallet Height".PadRight(LoggingConfiguration.ColumnLength) + ": No Wallet");
log.AppendLine();
}
private void AddComponentStats(StringBuilder log)
{
List<string> walletNamesSQL = this.walletRepository.GetWalletNames();
List<string> watchOnlyWalletNames = this.walletManager.GetWatchOnlyWalletsNames().ToList();
if (walletNamesSQL.Any())
{
log.AppendLine(">> Wallets");
var walletManager = (WalletManager)this.walletManager;
foreach (string walletName in walletNamesSQL)
{
string watchOnly = (watchOnlyWalletNames.Contains(walletName)) ? "(W) " : "";
try
{
foreach (AccountBalance accountBalance in walletManager.GetBalances(walletName))
{
log.AppendLine($"{watchOnly}{walletName}/{accountBalance.Account.Name}".PadRight(LoggingConfiguration.ColumnLength) + $": Confirmed balance: {accountBalance.AmountConfirmed}".PadRight(LoggingConfiguration.ColumnLength + 20) + $" Unconfirmed balance: {accountBalance.AmountUnconfirmed}");
}
}
catch (WalletException)
{
log.AppendLine("Can't access wallet balances, wallet might be in a process of rewinding or deleting.");
}
}
}
}
/// <inheritdoc />
public override Task InitializeAsync()
{
this.walletManager.Start();
this.walletSyncManager.Start();
this.addressBookManager.Initialize();
this.connectionManager.Parameters.TemplateBehaviors.Add(this.broadcasterBehavior);
return Task.CompletedTask;
}
/// <inheritdoc />
public override void Dispose()
{
this.walletSyncManager.Stop();
this.walletManager.Stop();
}
}
/// <summary>
/// A class providing extension methods for <see cref="IFullNodeBuilder"/>.
/// </summary>
public static class FullNodeBuilderWalletExtension
{
public static IFullNodeBuilder UseWallet(this IFullNodeBuilder fullNodeBuilder)
{
LoggingConfiguration.RegisterFeatureNamespace<WalletFeature>("wallet");
fullNodeBuilder.ConfigureFeature(features =>
{
features
.AddFeature<WalletFeature>()
.DependOn<MempoolFeature>()
.DependOn<BlockStoreFeature>()
.DependOn<RPCFeature>()
.FeatureServices(services =>
{
services.AddSingleton<IWalletService, WalletService>();
services.AddSingleton<IWalletSyncManager, WalletSyncManager>();
services.AddSingleton<IWalletTransactionHandler, WalletTransactionHandler>();
services.AddSingleton<IWalletManager, WalletManager>();
services.AddSingleton<IWalletFeePolicy, WalletFeePolicy>();
services.AddSingleton<IBroadcasterManager, FullNodeBroadcasterManager>();
services.AddSingleton<BroadcasterBehavior>();
services.AddSingleton<WalletSettings>();
services.AddSingleton<IScriptAddressReader>(new ScriptAddressReader());
services.AddSingleton<StandardTransactionPolicy>();
services.AddSingleton<IAddressBookManager, AddressBookManager>();
services.AddSingleton<IReserveUtxoService, ReserveUtxoService>();
});
});
return fullNodeBuilder;
}
}
} | 41.0625 | 315 | 0.633435 | [
"MIT"
] | xels-io/SideChain-SmartContract | src/Xels.Bitcoin.Features.Wallet/WalletFeature.cs | 7,886 | C# |
//-----------------------------------------------------------------------------
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the Microsoft Public License.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//-----------------------------------------------------------------------------
//
// File: CvInfo.cs
//
// Generic CodeView information definitions
//
// Structures, constants, etc. for accessing and interpreting
// CodeView information.
//
// The master copy of this file resides in the langapi project (in C++).
// All Microsoft projects are required to use the master copy without
// modification. Modification of the master version or a copy
// without consultation with all parties concerned is extremely
// risky.
//
// When this file is modified, the corresponding documentation file
// omfdeb.doc in the langapi project must be updated.
//
// This is a read-only copy of the C++ file converted to C#.
//
using System;
namespace Microsoft.Cci.Pdb {
internal struct FLOAT10 {
internal byte Data_0;
internal byte Data_1;
internal byte Data_2;
internal byte Data_3;
internal byte Data_4;
internal byte Data_5;
internal byte Data_6;
internal byte Data_7;
internal byte Data_8;
internal byte Data_9;
};
internal enum CV_SIGNATURE {
C6=0, // Actual signature is >64K
C7=1, // First explicit signature
C11=2, // C11 (vc5.x) 32-bit types
C13=4, // C13 (vc7.x) zero terminated names
RESERVERD=5, // All signatures from 5 to 64K are reserved
};
// CodeView Symbol and Type OMF type information is broken up into two
// ranges. Type indices less than 0x1000 describe type information
// that is frequently used. Type indices above 0x1000 are used to
// describe more complex features such as functions, arrays and
// structures.
//
// Primitive types have predefined meaning that is encoded in the
// values of the various bit fields in the value.
//
// A CodeView primitive type is defined as:
//
// 1 1
// 1 089 7654 3 210
// r mode type r sub
//
// Where
// mode is the pointer mode
// type is a type indicator
// sub is a subtype enumeration
// r is a reserved field
//
// See Microsoft Symbol and Type OMF (Version 4.0) for more
// information.
//
// pointer mode enumeration values
internal enum CV_prmode {
CV_TM_DIRECT=0, // mode is not a pointer
CV_TM_NPTR32=4, // mode is a 32 bit near pointer
CV_TM_NPTR64=6, // mode is a 64 bit near pointer
CV_TM_NPTR128=7, // mode is a 128 bit near pointer
};
// type enumeration values
internal enum CV_type {
CV_SPECIAL=0x00, // special type size values
CV_SIGNED=0x01, // signed integral size values
CV_UNSIGNED=0x02, // unsigned integral size values
CV_BOOLEAN=0x03, // Boolean size values
CV_REAL=0x04, // real number size values
CV_COMPLEX=0x05, // complex number size values
CV_SPECIAL2=0x06, // second set of special types
CV_INT=0x07, // integral (int) values
CV_CVRESERVED=0x0f,
};
// subtype enumeration values for CV_SPECIAL
internal enum CV_special {
CV_SP_NOTYPE=0x00,
CV_SP_ABS=0x01,
CV_SP_SEGMENT=0x02,
CV_SP_VOID=0x03,
CV_SP_CURRENCY=0x04,
CV_SP_NBASICSTR=0x05,
CV_SP_FBASICSTR=0x06,
CV_SP_NOTTRANS=0x07,
CV_SP_HRESULT=0x08,
};
// subtype enumeration values for CV_SPECIAL2
internal enum CV_special2 {
CV_S2_BIT=0x00,
CV_S2_PASCHAR=0x01, // Pascal CHAR
};
// subtype enumeration values for CV_SIGNED, CV_UNSIGNED and CV_BOOLEAN
internal enum CV_integral {
CV_IN_1BYTE=0x00,
CV_IN_2BYTE=0x01,
CV_IN_4BYTE=0x02,
CV_IN_8BYTE=0x03,
CV_IN_16BYTE=0x04,
};
// subtype enumeration values for CV_REAL and CV_COMPLEX
internal enum CV_real {
CV_RC_REAL32=0x00,
CV_RC_REAL64=0x01,
CV_RC_REAL80=0x02,
CV_RC_REAL128=0x03,
};
// subtype enumeration values for CV_INT (really int)
internal enum CV_int {
CV_RI_CHAR=0x00,
CV_RI_INT1=0x00,
CV_RI_WCHAR=0x01,
CV_RI_UINT1=0x01,
CV_RI_INT2=0x02,
CV_RI_UINT2=0x03,
CV_RI_INT4=0x04,
CV_RI_UINT4=0x05,
CV_RI_INT8=0x06,
CV_RI_UINT8=0x07,
CV_RI_INT16=0x08,
CV_RI_UINT16=0x09,
};
internal struct CV_PRIMITIVE_TYPE {
const uint CV_MMASK = 0x700; // mode mask
const uint CV_TMASK = 0x0f0; // type mask
const uint CV_SMASK = 0x00f; // subtype mask
const int CV_MSHIFT = 8; // primitive mode right shift count
const int CV_TSHIFT = 4; // primitive type right shift count
const int CV_SSHIFT = 0; // primitive subtype right shift count
// function to extract primitive mode, type and size
//internal static CV_prmode CV_MODE(TYPE_ENUM typ) {
// return (CV_prmode)((((uint)typ) & CV_MMASK) >> CV_MSHIFT);
//}
//internal static CV_type CV_TYPE(TYPE_ENUM typ) {
// return (CV_type)((((uint)typ) & CV_TMASK) >> CV_TSHIFT);
//}
//internal static uint CV_SUBT(TYPE_ENUM typ) {
// return ((((uint)typ) & CV_SMASK) >> CV_SSHIFT);
//}
// functions to check the type of a primitive
//internal static bool CV_TYP_IS_DIRECT(TYPE_ENUM typ) {
// return (CV_MODE(typ) == CV_prmode.CV_TM_DIRECT);
//}
//internal static bool CV_TYP_IS_PTR(TYPE_ENUM typ) {
// return (CV_MODE(typ) != CV_prmode.CV_TM_DIRECT);
//}
//internal static bool CV_TYP_IS_SIGNED(TYPE_ENUM typ) {
// return
// (((CV_TYPE(typ) == CV_type.CV_SIGNED) && CV_TYP_IS_DIRECT(typ)) ||
// (typ == TYPE_ENUM.T_INT1) ||
// (typ == TYPE_ENUM.T_INT2) ||
// (typ == TYPE_ENUM.T_INT4) ||
// (typ == TYPE_ENUM.T_INT8) ||
// (typ == TYPE_ENUM.T_INT16) ||
// (typ == TYPE_ENUM.T_RCHAR));
//}
//internal static bool CV_TYP_IS_UNSIGNED(TYPE_ENUM typ) {
// return (((CV_TYPE(typ) == CV_type.CV_UNSIGNED) && CV_TYP_IS_DIRECT(typ)) ||
// (typ == TYPE_ENUM.T_UINT1) ||
// (typ == TYPE_ENUM.T_UINT2) ||
// (typ == TYPE_ENUM.T_UINT4) ||
// (typ == TYPE_ENUM.T_UINT8) ||
// (typ == TYPE_ENUM.T_UINT16));
//}
//internal static bool CV_TYP_IS_REAL(TYPE_ENUM typ) {
// return ((CV_TYPE(typ) == CV_type.CV_REAL) && CV_TYP_IS_DIRECT(typ));
//}
const uint CV_FIRST_NONPRIM = 0x1000;
//internal static bool CV_IS_PRIMITIVE(TYPE_ENUM typ) {
// return ((uint)(typ) < CV_FIRST_NONPRIM);
//}
//internal static bool CV_TYP_IS_COMPLEX(TYPE_ENUM typ) {
// return ((CV_TYPE(typ) == CV_type.CV_COMPLEX) && CV_TYP_IS_DIRECT(typ));
//}
//internal static bool CV_IS_INTERNAL_PTR(TYPE_ENUM typ) {
// return (CV_IS_PRIMITIVE(typ) &&
// CV_TYPE(typ) == CV_type.CV_CVRESERVED &&
// CV_TYP_IS_PTR(typ));
//}
}
// selected values for type_index - for a more complete definition, see
// Microsoft Symbol and Type OMF document
// Special Types
internal enum TYPE_ENUM {
// Special Types
T_NOTYPE=0x0000, // uncharacterized type (no type)
T_ABS=0x0001, // absolute symbol
T_SEGMENT=0x0002, // segment type
T_VOID=0x0003, // void
T_HRESULT=0x0008, // OLE/COM HRESULT
T_32PHRESULT=0x0408, // OLE/COM HRESULT __ptr32//
T_64PHRESULT=0x0608, // OLE/COM HRESULT __ptr64//
T_PVOID=0x0103, // near pointer to void
T_PFVOID=0x0203, // far pointer to void
T_PHVOID=0x0303, // huge pointer to void
T_32PVOID=0x0403, // 32 bit pointer to void
T_64PVOID=0x0603, // 64 bit pointer to void
T_CURRENCY=0x0004, // BASIC 8 byte currency value
T_NOTTRANS=0x0007, // type not translated by cvpack
T_BIT=0x0060, // bit
T_PASCHAR=0x0061, // Pascal CHAR
// Character types
T_CHAR=0x0010, // 8 bit signed
T_32PCHAR=0x0410, // 32 bit pointer to 8 bit signed
T_64PCHAR=0x0610, // 64 bit pointer to 8 bit signed
T_UCHAR=0x0020, // 8 bit unsigned
T_32PUCHAR=0x0420, // 32 bit pointer to 8 bit unsigned
T_64PUCHAR=0x0620, // 64 bit pointer to 8 bit unsigned
// really a character types
T_RCHAR=0x0070, // really a char
T_32PRCHAR=0x0470, // 32 bit pointer to a real char
T_64PRCHAR=0x0670, // 64 bit pointer to a real char
// really a wide character types
T_WCHAR=0x0071, // wide char
T_32PWCHAR=0x0471, // 32 bit pointer to a wide char
T_64PWCHAR=0x0671, // 64 bit pointer to a wide char
// 8 bit int types
T_INT1=0x0068, // 8 bit signed int
T_32PINT1=0x0468, // 32 bit pointer to 8 bit signed int
T_64PINT1=0x0668, // 64 bit pointer to 8 bit signed int
T_UINT1=0x0069, // 8 bit unsigned int
T_32PUINT1=0x0469, // 32 bit pointer to 8 bit unsigned int
T_64PUINT1=0x0669, // 64 bit pointer to 8 bit unsigned int
// 16 bit short types
T_SHORT=0x0011, // 16 bit signed
T_32PSHORT=0x0411, // 32 bit pointer to 16 bit signed
T_64PSHORT=0x0611, // 64 bit pointer to 16 bit signed
T_USHORT=0x0021, // 16 bit unsigned
T_32PUSHORT=0x0421, // 32 bit pointer to 16 bit unsigned
T_64PUSHORT=0x0621, // 64 bit pointer to 16 bit unsigned
// 16 bit int types
T_INT2=0x0072, // 16 bit signed int
T_32PINT2=0x0472, // 32 bit pointer to 16 bit signed int
T_64PINT2=0x0672, // 64 bit pointer to 16 bit signed int
T_UINT2=0x0073, // 16 bit unsigned int
T_32PUINT2=0x0473, // 32 bit pointer to 16 bit unsigned int
T_64PUINT2=0x0673, // 64 bit pointer to 16 bit unsigned int
// 32 bit long types
T_LONG=0x0012, // 32 bit signed
T_ULONG=0x0022, // 32 bit unsigned
T_32PLONG=0x0412, // 32 bit pointer to 32 bit signed
T_32PULONG=0x0422, // 32 bit pointer to 32 bit unsigned
T_64PLONG=0x0612, // 64 bit pointer to 32 bit signed
T_64PULONG=0x0622, // 64 bit pointer to 32 bit unsigned
// 32 bit int types
T_INT4=0x0074, // 32 bit signed int
T_32PINT4=0x0474, // 32 bit pointer to 32 bit signed int
T_64PINT4=0x0674, // 64 bit pointer to 32 bit signed int
T_UINT4=0x0075, // 32 bit unsigned int
T_32PUINT4=0x0475, // 32 bit pointer to 32 bit unsigned int
T_64PUINT4=0x0675, // 64 bit pointer to 32 bit unsigned int
// 64 bit quad types
T_QUAD=0x0013, // 64 bit signed
T_32PQUAD=0x0413, // 32 bit pointer to 64 bit signed
T_64PQUAD=0x0613, // 64 bit pointer to 64 bit signed
T_UQUAD=0x0023, // 64 bit unsigned
T_32PUQUAD=0x0423, // 32 bit pointer to 64 bit unsigned
T_64PUQUAD=0x0623, // 64 bit pointer to 64 bit unsigned
// 64 bit int types
T_INT8=0x0076, // 64 bit signed int
T_32PINT8=0x0476, // 32 bit pointer to 64 bit signed int
T_64PINT8=0x0676, // 64 bit pointer to 64 bit signed int
T_UINT8=0x0077, // 64 bit unsigned int
T_32PUINT8=0x0477, // 32 bit pointer to 64 bit unsigned int
T_64PUINT8=0x0677, // 64 bit pointer to 64 bit unsigned int
// 128 bit octet types
T_OCT=0x0014, // 128 bit signed
T_32POCT=0x0414, // 32 bit pointer to 128 bit signed
T_64POCT=0x0614, // 64 bit pointer to 128 bit signed
T_UOCT=0x0024, // 128 bit unsigned
T_32PUOCT=0x0424, // 32 bit pointer to 128 bit unsigned
T_64PUOCT=0x0624, // 64 bit pointer to 128 bit unsigned
// 128 bit int types
T_INT16=0x0078, // 128 bit signed int
T_32PINT16=0x0478, // 32 bit pointer to 128 bit signed int
T_64PINT16=0x0678, // 64 bit pointer to 128 bit signed int
T_UINT16=0x0079, // 128 bit unsigned int
T_32PUINT16=0x0479, // 32 bit pointer to 128 bit unsigned int
T_64PUINT16=0x0679, // 64 bit pointer to 128 bit unsigned int
// 32 bit real types
T_REAL32=0x0040, // 32 bit real
T_32PREAL32=0x0440, // 32 bit pointer to 32 bit real
T_64PREAL32=0x0640, // 64 bit pointer to 32 bit real
// 64 bit real types
T_REAL64=0x0041, // 64 bit real
T_32PREAL64=0x0441, // 32 bit pointer to 64 bit real
T_64PREAL64=0x0641, // 64 bit pointer to 64 bit real
// 80 bit real types
T_REAL80=0x0042, // 80 bit real
T_32PREAL80=0x0442, // 32 bit pointer to 80 bit real
T_64PREAL80=0x0642, // 64 bit pointer to 80 bit real
// 128 bit real types
T_REAL128=0x0043, // 128 bit real
T_32PREAL128=0x0443, // 32 bit pointer to 128 bit real
T_64PREAL128=0x0643, // 64 bit pointer to 128 bit real
// 32 bit complex types
T_CPLX32=0x0050, // 32 bit complex
T_32PCPLX32=0x0450, // 32 bit pointer to 32 bit complex
T_64PCPLX32=0x0650, // 64 bit pointer to 32 bit complex
// 64 bit complex types
T_CPLX64=0x0051, // 64 bit complex
T_32PCPLX64=0x0451, // 32 bit pointer to 64 bit complex
T_64PCPLX64=0x0651, // 64 bit pointer to 64 bit complex
// 80 bit complex types
T_CPLX80=0x0052, // 80 bit complex
T_32PCPLX80=0x0452, // 32 bit pointer to 80 bit complex
T_64PCPLX80=0x0652, // 64 bit pointer to 80 bit complex
// 128 bit complex types
T_CPLX128=0x0053, // 128 bit complex
T_32PCPLX128=0x0453, // 32 bit pointer to 128 bit complex
T_64PCPLX128=0x0653, // 64 bit pointer to 128 bit complex
// boolean types
T_BOOL08=0x0030, // 8 bit boolean
T_32PBOOL08=0x0430, // 32 bit pointer to 8 bit boolean
T_64PBOOL08=0x0630, // 64 bit pointer to 8 bit boolean
T_BOOL16=0x0031, // 16 bit boolean
T_32PBOOL16=0x0431, // 32 bit pointer to 18 bit boolean
T_64PBOOL16=0x0631, // 64 bit pointer to 18 bit boolean
T_BOOL32=0x0032, // 32 bit boolean
T_32PBOOL32=0x0432, // 32 bit pointer to 32 bit boolean
T_64PBOOL32=0x0632, // 64 bit pointer to 32 bit boolean
T_BOOL64=0x0033, // 64 bit boolean
T_32PBOOL64=0x0433, // 32 bit pointer to 64 bit boolean
T_64PBOOL64=0x0633, // 64 bit pointer to 64 bit boolean
};
// No leaf index can have a value of 0x0000. The leaf indices are
// separated into ranges depending upon the use of the type record.
// The second range is for the type records that are directly referenced
// in symbols. The first range is for type records that are not
// referenced by symbols but instead are referenced by other type
// records. All type records must have a starting leaf index in these
// first two ranges. The third range of leaf indices are used to build
// up complex lists such as the field list of a class type record. No
// type record can begin with one of the leaf indices. The fourth ranges
// of type indices are used to represent numeric data in a symbol or
// type record. These leaf indices are greater than 0x8000. At the
// point that type or symbol processor is expecting a numeric field, the
// next two bytes in the type record are examined. If the value is less
// than 0x8000, then the two bytes contain the numeric value. If the
// value is greater than 0x8000, then the data follows the leaf index in
// a format specified by the leaf index. The final range of leaf indices
// are used to force alignment of subfields within a complex type record..
//
internal enum LEAF {
// leaf indices starting records but referenced from symbol records
LF_VTSHAPE=0x000a,
LF_COBOL1=0x000c,
LF_LABEL=0x000e,
LF_NULL=0x000f,
LF_NOTTRAN=0x0010,
LF_ENDPRECOMP=0x0014, // not referenced from symbol
LF_TYPESERVER_ST=0x0016, // not referenced from symbol
// leaf indices starting records but referenced only from type records
LF_LIST=0x0203,
LF_REFSYM=0x020c,
LF_ENUMERATE_ST=0x0403,
// 32-bit type index versions of leaves, all have the 0x1000 bit set
//
LF_TI16_MAX=0x1000,
LF_MODIFIER=0x1001,
LF_POINTER=0x1002,
LF_ARRAY_ST=0x1003,
LF_CLASS_ST=0x1004,
LF_STRUCTURE_ST=0x1005,
LF_UNION_ST=0x1006,
LF_ENUM_ST=0x1007,
LF_PROCEDURE=0x1008,
LF_MFUNCTION=0x1009,
LF_COBOL0=0x100a,
LF_BARRAY=0x100b,
LF_DIMARRAY_ST=0x100c,
LF_VFTPATH=0x100d,
LF_PRECOMP_ST=0x100e, // not referenced from symbol
LF_OEM=0x100f, // oem definable type string
LF_ALIAS_ST=0x1010, // alias (typedef) type
LF_OEM2=0x1011, // oem definable type string
// leaf indices starting records but referenced only from type records
LF_SKIP=0x1200,
LF_ARGLIST=0x1201,
LF_DEFARG_ST=0x1202,
LF_FIELDLIST=0x1203,
LF_DERIVED=0x1204,
LF_BITFIELD=0x1205,
LF_METHODLIST=0x1206,
LF_DIMCONU=0x1207,
LF_DIMCONLU=0x1208,
LF_DIMVARU=0x1209,
LF_DIMVARLU=0x120a,
LF_BCLASS=0x1400,
LF_VBCLASS=0x1401,
LF_IVBCLASS=0x1402,
LF_FRIENDFCN_ST=0x1403,
LF_INDEX=0x1404,
LF_MEMBER_ST=0x1405,
LF_STMEMBER_ST=0x1406,
LF_METHOD_ST=0x1407,
LF_NESTTYPE_ST=0x1408,
LF_VFUNCTAB=0x1409,
LF_FRIENDCLS=0x140a,
LF_ONEMETHOD_ST=0x140b,
LF_VFUNCOFF=0x140c,
LF_NESTTYPEEX_ST=0x140d,
LF_MEMBERMODIFY_ST=0x140e,
LF_MANAGED_ST=0x140f,
// Types w/ SZ names
LF_ST_MAX=0x1500,
LF_TYPESERVER=0x1501, // not referenced from symbol
LF_ENUMERATE=0x1502,
LF_ARRAY=0x1503,
LF_CLASS=0x1504,
LF_STRUCTURE=0x1505,
LF_UNION=0x1506,
LF_ENUM=0x1507,
LF_DIMARRAY=0x1508,
LF_PRECOMP=0x1509, // not referenced from symbol
LF_ALIAS=0x150a, // alias (typedef) type
LF_DEFARG=0x150b,
LF_FRIENDFCN=0x150c,
LF_MEMBER=0x150d,
LF_STMEMBER=0x150e,
LF_METHOD=0x150f,
LF_NESTTYPE=0x1510,
LF_ONEMETHOD=0x1511,
LF_NESTTYPEEX=0x1512,
LF_MEMBERMODIFY=0x1513,
LF_MANAGED=0x1514,
LF_TYPESERVER2=0x1515,
LF_NUMERIC=0x8000,
LF_CHAR=0x8000,
LF_SHORT=0x8001,
LF_USHORT=0x8002,
LF_LONG=0x8003,
LF_ULONG=0x8004,
LF_REAL32=0x8005,
LF_REAL64=0x8006,
LF_REAL80=0x8007,
LF_REAL128=0x8008,
LF_QUADWORD=0x8009,
LF_UQUADWORD=0x800a,
LF_COMPLEX32=0x800c,
LF_COMPLEX64=0x800d,
LF_COMPLEX80=0x800e,
LF_COMPLEX128=0x800f,
LF_VARSTRING=0x8010,
LF_OCTWORD=0x8017,
LF_UOCTWORD=0x8018,
LF_DECIMAL=0x8019,
LF_DATE=0x801a,
LF_UTF8STRING=0x801b,
LF_PAD0=0xf0,
LF_PAD1=0xf1,
LF_PAD2=0xf2,
LF_PAD3=0xf3,
LF_PAD4=0xf4,
LF_PAD5=0xf5,
LF_PAD6=0xf6,
LF_PAD7=0xf7,
LF_PAD8=0xf8,
LF_PAD9=0xf9,
LF_PAD10=0xfa,
LF_PAD11=0xfb,
LF_PAD12=0xfc,
LF_PAD13=0xfd,
LF_PAD14=0xfe,
LF_PAD15=0xff,
};
// end of leaf indices
// Type enum for pointer records
// Pointers can be one of the following types
internal enum CV_ptrtype {
CV_PTR_BASE_SEG=0x03, // based on segment
CV_PTR_BASE_VAL=0x04, // based on value of base
CV_PTR_BASE_SEGVAL=0x05, // based on segment value of base
CV_PTR_BASE_ADDR=0x06, // based on address of base
CV_PTR_BASE_SEGADDR=0x07, // based on segment address of base
CV_PTR_BASE_TYPE=0x08, // based on type
CV_PTR_BASE_SELF=0x09, // based on self
CV_PTR_NEAR32=0x0a, // 32 bit pointer
CV_PTR_64=0x0c, // 64 bit pointer
CV_PTR_UNUSEDPTR=0x0d // first unused pointer type
};
// Mode enum for pointers
// Pointers can have one of the following modes
internal enum CV_ptrmode {
CV_PTR_MODE_PTR=0x00, // "normal" pointer
CV_PTR_MODE_REF=0x01, // reference
CV_PTR_MODE_PMEM=0x02, // pointer to data member
CV_PTR_MODE_PMFUNC=0x03, // pointer to member function
CV_PTR_MODE_RESERVED=0x04 // first unused pointer mode
};
// enumeration for pointer-to-member types
internal enum CV_pmtype {
CV_PMTYPE_Undef=0x00, // not specified (pre VC8)
CV_PMTYPE_D_Single=0x01, // member data, single inheritance
CV_PMTYPE_D_Multiple=0x02, // member data, multiple inheritance
CV_PMTYPE_D_Virtual=0x03, // member data, virtual inheritance
CV_PMTYPE_D_General=0x04, // member data, most general
CV_PMTYPE_F_Single=0x05, // member function, single inheritance
CV_PMTYPE_F_Multiple=0x06, // member function, multiple inheritance
CV_PMTYPE_F_Virtual=0x07, // member function, virtual inheritance
CV_PMTYPE_F_General=0x08, // member function, most general
};
// enumeration for method properties
internal enum CV_methodprop {
CV_MTvanilla=0x00,
CV_MTvirtual=0x01,
CV_MTstatic=0x02,
CV_MTfriend=0x03,
CV_MTintro=0x04,
CV_MTpurevirt=0x05,
CV_MTpureintro=0x06
};
// enumeration for virtual shape table entries
internal enum CV_VTS_desc {
CV_VTS_near=0x00,
CV_VTS_far=0x01,
CV_VTS_thin=0x02,
CV_VTS_outer=0x03,
CV_VTS_meta=0x04,
CV_VTS_near32=0x05,
CV_VTS_far32=0x06,
CV_VTS_unused=0x07
};
// enumeration for LF_LABEL address modes
internal enum CV_LABEL_TYPE {
CV_LABEL_NEAR=0, // near return
CV_LABEL_FAR=4 // far return
};
// enumeration for LF_MODIFIER values
[Flags]
internal enum CV_modifier : ushort {
MOD_const=0x0001,
MOD_volatile=0x0002,
MOD_unaligned=0x0004,
};
// bit field structure describing class/struct/union/enum properties
[Flags]
internal enum CV_prop : ushort {
packed=0x0001, // true if structure is packed
ctor=0x0002, // true if constructors or destructors present
ovlops=0x0004, // true if overloaded operators present
isnested=0x0008, // true if this is a nested class
cnested=0x0010, // true if this class contains nested types
opassign=0x0020, // true if overloaded assignment (=)
opcast=0x0040, // true if casting methods
fwdref=0x0080, // true if forward reference (incomplete defn)
scoped=0x0100, // scoped definition
}
// class field attribute
[Flags]
internal enum CV_fldattr {
access=0x0003, // access protection CV_access_t
mprop=0x001c, // method properties CV_methodprop_t
pseudo=0x0020, // compiler generated fcn and does not exist
noinherit=0x0040, // true if class cannot be inherited
noconstruct=0x0080, // true if class cannot be constructed
compgenx=0x0100, // compiler generated fcn and does exist
}
// Structures to access to the type records
internal struct TYPTYPE {
internal ushort len;
internal ushort leaf;
// byte data[];
// char *NextType (char * pType) {
// return (pType + ((TYPTYPE *)pType)->len + sizeof(ushort));
// }
}; // general types record
// memory representation of pointer to member. These representations are
// indexed by the enumeration above in the LF_POINTER record
// representation of a 32 bit pointer to data for a class with
// or without virtual functions and no virtual bases
internal struct CV_PDMR32_NVVFCN {
internal int mdisp; // displacement to data (NULL = 0x80000000)
};
// representation of a 32 bit pointer to data for a class
// with virtual bases
internal struct CV_PDMR32_VBASE {
internal int mdisp; // displacement to data
internal int pdisp; // this pointer displacement
internal int vdisp; // vbase table displacement
// NULL = (,,0xffffffff)
};
// representation of a 32 bit pointer to member function for a
// class with no virtual bases and a single address point
internal struct CV_PMFR32_NVSA {
internal uint off; // near address of function (NULL = 0L)
};
// representation of a 32 bit pointer to member function for a
// class with no virtual bases and multiple address points
internal struct CV_PMFR32_NVMA {
internal uint off; // near address of function (NULL = 0L,x)
internal int disp;
};
// representation of a 32 bit pointer to member function for a
// class with virtual bases
internal struct CV_PMFR32_VBASE {
internal uint off; // near address of function (NULL = 0L,x,x,x)
internal int mdisp; // displacement to data
internal int pdisp; // this pointer displacement
internal int vdisp; // vbase table displacement
};
//////////////////////////////////////////////////////////////////////////////
//
// The following type records are basically variant records of the
// above structure. The "ushort leaf" of the above structure and
// the "ushort leaf" of the following type definitions are the same
// symbol.
//
// Notes on alignment
// Alignment of the fields in most of the type records is done on the
// basis of the TYPTYPE record base. That is why in most of the lf*
// records that the type is located on what appears to
// be a offset mod 4 == 2 boundary. The exception to this rule are those
// records that are in a list (lfFieldList, lfMethodList), which are
// aligned to their own bases since they don't have the length field
//
// Type record for LF_MODIFIER
internal struct LeafModifier {
// internal ushort leaf; // LF_MODIFIER [TYPTYPE]
internal uint type; // (type index) modified type
internal CV_modifier attr; // modifier attribute modifier_t
};
// type record for LF_POINTER
[Flags]
internal enum LeafPointerAttr : uint {
ptrtype=0x0000001f, // ordinal specifying pointer type (CV_ptrtype)
ptrmode=0x000000e0, // ordinal specifying pointer mode (CV_ptrmode)
isflat32=0x00000100, // true if 0:32 pointer
isvolatile=0x00000200, // TRUE if volatile pointer
isconst=0x00000400, // TRUE if const pointer
isunaligned=0x00000800, // TRUE if unaligned pointer
isrestrict=0x00001000, // TRUE if restricted pointer (allow agressive opts)
};
internal struct LeafPointer {
internal struct LeafPointerBody {
// internal ushort leaf; // LF_POINTER [TYPTYPE]
internal uint utype; // (type index) type index of the underlying type
internal LeafPointerAttr attr;
};
#if false
union {
internal struct {
uint pmclass; // (type index) index of containing class for pointer to member
ushort pmenum; // enumeration specifying pm format (CV_pmtype)
};
ushort bseg; // base segment if PTR_BASE_SEG
byte[] Sym; // copy of base symbol record (including length)
internal struct {
uint index; // (type index) type index if CV_PTR_BASE_TYPE
string name; // name of base type
} btype;
} pbase;
#endif
}
// type record for LF_ARRAY
internal struct LeafArray {
// internal ushort leaf; // LF_ARRAY [TYPTYPE]
internal uint elemtype; // (type index) type index of element type
internal uint idxtype; // (type index) type index of indexing type
internal byte[] data; // variable length data specifying size in bytes
internal string name;
};
// type record for LF_CLASS, LF_STRUCTURE
internal struct LeafClass {
// internal ushort leaf; // LF_CLASS, LF_STRUCT [TYPTYPE]
internal ushort count; // count of number of elements in class
internal ushort property; // (CV_prop_t) property attribute field (prop_t)
internal uint field; // (type index) type index of LF_FIELD descriptor list
internal uint derived; // (type index) type index of derived from list if not zero
internal uint vshape; // (type index) type index of vshape table for this class
internal byte[] data; // data describing length of structure in bytes
internal string name;
};
// type record for LF_UNION
internal struct LeafUnion {
// internal ushort leaf; // LF_UNION [TYPTYPE]
internal ushort count; // count of number of elements in class
internal ushort property; // (CV_prop_t) property attribute field
internal uint field; // (type index) type index of LF_FIELD descriptor list
internal byte[] data; // variable length data describing length of
internal string name;
};
// type record for LF_ALIAS
internal struct LeafAlias {
// internal ushort leaf; // LF_ALIAS [TYPTYPE]
internal uint utype; // (type index) underlying type
internal string name; // alias name
};
// type record for LF_MANAGED
internal struct LeafManaged {
// internal ushort leaf; // LF_MANAGED [TYPTYPE]
internal string name; // utf8, zero terminated managed type name
};
// type record for LF_ENUM
internal struct LeafEnum {
// internal ushort leaf; // LF_ENUM [TYPTYPE]
internal ushort count; // count of number of elements in class
internal ushort property; // (CV_propt_t) property attribute field
internal uint utype; // (type index) underlying type of the enum
internal uint field; // (type index) type index of LF_FIELD descriptor list
internal string name; // length prefixed name of enum
};
// Type record for LF_PROCEDURE
internal struct LeafProc {
// internal ushort leaf; // LF_PROCEDURE [TYPTYPE]
internal uint rvtype; // (type index) type index of return value
internal byte calltype; // calling convention (CV_call_t)
internal byte reserved; // reserved for future use
internal ushort parmcount; // number of parameters
internal uint arglist; // (type index) type index of argument list
};
// Type record for member function
internal struct LeafMFunc {
// internal ushort leaf; // LF_MFUNCTION [TYPTYPE]
internal uint rvtype; // (type index) type index of return value
internal uint classtype; // (type index) type index of containing class
internal uint thistype; // (type index) type index of this pointer (model specific)
internal byte calltype; // calling convention (call_t)
internal byte reserved; // reserved for future use
internal ushort parmcount; // number of parameters
internal uint arglist; // (type index) type index of argument list
internal int thisadjust; // this adjuster (long because pad required anyway)
};
// type record for virtual function table shape
internal struct LeafVTShape {
// internal ushort leaf; // LF_VTSHAPE [TYPTYPE]
internal ushort count; // number of entries in vfunctable
internal byte[] desc; // 4 bit (CV_VTS_desc) descriptors
};
// type record for cobol0
internal struct LeafCobol0 {
// internal ushort leaf; // LF_COBOL0 [TYPTYPE]
internal uint type; // (type index) parent type record index
internal byte[] data;
};
// type record for cobol1
internal struct LeafCobol1 {
// internal ushort leaf; // LF_COBOL1 [TYPTYPE]
internal byte[] data;
};
// type record for basic array
internal struct LeafBArray {
// internal ushort leaf; // LF_BARRAY [TYPTYPE]
internal uint utype; // (type index) type index of underlying type
};
// type record for assembler labels
internal struct LeafLabel {
// internal ushort leaf; // LF_LABEL [TYPTYPE]
internal ushort mode; // addressing mode of label
};
// type record for dimensioned arrays
internal struct LeafDimArray {
// internal ushort leaf; // LF_DIMARRAY [TYPTYPE]
internal uint utype; // (type index) underlying type of the array
internal uint diminfo; // (type index) dimension information
internal string name; // length prefixed name
};
// type record describing path to virtual function table
internal struct LeafVFTPath {
// internal ushort leaf; // LF_VFTPATH [TYPTYPE]
internal uint count; // count of number of bases in path
internal uint[] bases; // (type index) bases from root to leaf
};
// type record describing inclusion of precompiled types
internal struct LeafPreComp {
// internal ushort leaf; // LF_PRECOMP [TYPTYPE]
internal uint start; // starting type index included
internal uint count; // number of types in inclusion
internal uint signature; // signature
internal string name; // length prefixed name of included type file
};
// type record describing end of precompiled types that can be
// included by another file
internal struct LeafEndPreComp {
// internal ushort leaf; // LF_ENDPRECOMP [TYPTYPE]
internal uint signature; // signature
};
// type record for OEM definable type strings
internal struct LeafOEM {
// internal ushort leaf; // LF_OEM [TYPTYPE]
internal ushort cvOEM; // MS assigned OEM identified
internal ushort recOEM; // OEM assigned type identifier
internal uint count; // count of type indices to follow
internal uint[] index; // (type index) array of type indices followed
// by OEM defined data
};
internal enum OEM_ID {
OEM_MS_FORTRAN90=0xF090,
OEM_ODI=0x0010,
OEM_THOMSON_SOFTWARE=0x5453,
OEM_ODI_REC_BASELIST=0x0000,
};
internal struct LeafOEM2 {
// internal ushort leaf; // LF_OEM2 [TYPTYPE]
internal Guid idOem; // an oem ID (Guid)
internal uint count; // count of type indices to follow
internal uint[] index; // (type index) array of type indices followed
// by OEM defined data
};
// type record describing using of a type server
internal struct LeafTypeServer {
// internal ushort leaf; // LF_TYPESERVER [TYPTYPE]
internal uint signature; // signature
internal uint age; // age of database used by this module
internal string name; // length prefixed name of PDB
};
// type record describing using of a type server with v7 (GUID) signatures
internal struct LeafTypeServer2 {
// internal ushort leaf; // LF_TYPESERVER2 [TYPTYPE]
internal Guid sig70; // guid signature
internal uint age; // age of database used by this module
internal string name; // length prefixed name of PDB
};
// description of type records that can be referenced from
// type records referenced by symbols
// type record for skip record
internal struct LeafSkip {
// internal ushort leaf; // LF_SKIP [TYPTYPE]
internal uint type; // (type index) next valid index
internal byte[] data; // pad data
};
// argument list leaf
internal struct LeafArgList {
// internal ushort leaf; // LF_ARGLIST [TYPTYPE]
internal uint count; // number of arguments
internal uint[] arg; // (type index) number of arguments
};
// derived class list leaf
internal struct LeafDerived {
// internal ushort leaf; // LF_DERIVED [TYPTYPE]
internal uint count; // number of arguments
internal uint[] drvdcls; // (type index) type indices of derived classes
};
// leaf for default arguments
internal struct LeafDefArg {
// internal ushort leaf; // LF_DEFARG [TYPTYPE]
internal uint type; // (type index) type of resulting expression
internal byte[] expr; // length prefixed expression string
};
// list leaf
// This list should no longer be used because the utilities cannot
// verify the contents of the list without knowing what type of list
// it is. New specific leaf indices should be used instead.
internal struct LeafList {
// internal ushort leaf; // LF_LIST [TYPTYPE]
internal byte[] data; // data format specified by indexing type
};
// field list leaf
// This is the header leaf for a complex list of class and structure
// subfields.
internal struct LeafFieldList {
// internal ushort leaf; // LF_FIELDLIST [TYPTYPE]
internal char[] data; // field list sub lists
};
// type record for non-static methods and friends in overloaded method list
internal struct mlMethod {
internal ushort attr; // (CV_fldattr_t) method attribute
internal ushort pad0; // internal padding, must be 0
internal uint index; // (type index) index to type record for procedure
internal uint[] vbaseoff; // offset in vfunctable if intro virtual
};
internal struct LeafMethodList {
// internal ushort leaf; // LF_METHODLIST [TYPTYPE]
internal byte[] mList; // really a mlMethod type
};
// type record for LF_BITFIELD
internal struct LeafBitfield {
// internal ushort leaf; // LF_BITFIELD [TYPTYPE]
internal uint type; // (type index) type of bitfield
internal byte length;
internal byte position;
};
// type record for dimensioned array with constant bounds
internal struct LeafDimCon {
// internal ushort leaf; // LF_DIMCONU or LF_DIMCONLU [TYPTYPE]
internal uint typ; // (type index) type of index
internal ushort rank; // number of dimensions
internal byte[] dim; // array of dimension information with
// either upper bounds or lower/upper bound
};
// type record for dimensioned array with variable bounds
internal struct LeafDimVar {
// internal ushort leaf; // LF_DIMVARU or LF_DIMVARLU [TYPTYPE]
internal uint rank; // number of dimensions
internal uint typ; // (type index) type of index
internal uint[] dim; // (type index) array of type indices for either
// variable upper bound or variable
// lower/upper bound. The count of type
// indices is rank or rank*2 depending on
// whether it is LFDIMVARU or LF_DIMVARLU.
// The referenced types must be
// LF_REFSYM or T_VOID
};
// type record for referenced symbol
internal struct LeafRefSym {
// internal ushort leaf; // LF_REFSYM [TYPTYPE]
internal byte[] Sym; // copy of referenced symbol record
// (including length)
};
// the following are numeric leaves. They are used to indicate the
// size of the following variable length data. When the numeric
// data is a single byte less than 0x8000, then the data is output
// directly. If the data is more the 0x8000 or is a negative value,
// then the data is preceeded by the proper index.
//
// signed character leaf
internal struct LeafChar {
// internal ushort leaf; // LF_CHAR [TYPTYPE]
internal sbyte val; // signed 8-bit value
};
// signed short leaf
internal struct LeafShort {
// internal ushort leaf; // LF_SHORT [TYPTYPE]
internal short val; // signed 16-bit value
};
// ushort leaf
internal struct LeafUShort {
// internal ushort leaf; // LF_ushort [TYPTYPE]
internal ushort val; // unsigned 16-bit value
};
// signed (32-bit) long leaf
internal struct LeafLong {
// internal ushort leaf; // LF_LONG [TYPTYPE]
internal int val; // signed 32-bit value
};
// uint leaf
internal struct LeafULong {
// internal ushort leaf; // LF_ULONG [TYPTYPE]
internal uint val; // unsigned 32-bit value
};
// signed quad leaf
internal struct LeafQuad {
// internal ushort leaf; // LF_QUAD [TYPTYPE]
internal long val; // signed 64-bit value
};
// unsigned quad leaf
internal struct LeafUQuad {
// internal ushort leaf; // LF_UQUAD [TYPTYPE]
internal ulong val; // unsigned 64-bit value
};
// signed int128 leaf
internal struct LeafOct {
// internal ushort leaf; // LF_OCT [TYPTYPE]
internal ulong val0;
internal ulong val1; // signed 128-bit value
};
// unsigned int128 leaf
internal struct LeafUOct {
// internal ushort leaf; // LF_UOCT [TYPTYPE]
internal ulong val0;
internal ulong val1; // unsigned 128-bit value
};
// real 32-bit leaf
internal struct LeafReal32 {
// internal ushort leaf; // LF_REAL32 [TYPTYPE]
internal float val; // 32-bit real value
};
// real 64-bit leaf
internal struct LeafReal64 {
// internal ushort leaf; // LF_REAL64 [TYPTYPE]
internal double val; // 64-bit real value
};
// real 80-bit leaf
internal struct LeafReal80 {
// internal ushort leaf; // LF_REAL80 [TYPTYPE]
internal FLOAT10 val; // real 80-bit value
};
// real 128-bit leaf
internal struct LeafReal128 {
// internal ushort leaf; // LF_REAL128 [TYPTYPE]
internal ulong val0;
internal ulong val1; // real 128-bit value
};
// complex 32-bit leaf
internal struct LeafCmplx32 {
// internal ushort leaf; // LF_COMPLEX32 [TYPTYPE]
internal float val_real; // real component
internal float val_imag; // imaginary component
};
// complex 64-bit leaf
internal struct LeafCmplx64 {
// internal ushort leaf; // LF_COMPLEX64 [TYPTYPE]
internal double val_real; // real component
internal double val_imag; // imaginary component
};
// complex 80-bit leaf
internal struct LeafCmplx80 {
// internal ushort leaf; // LF_COMPLEX80 [TYPTYPE]
internal FLOAT10 val_real; // real component
internal FLOAT10 val_imag; // imaginary component
};
// complex 128-bit leaf
internal struct LeafCmplx128 {
// internal ushort leaf; // LF_COMPLEX128 [TYPTYPE]
internal ulong val0_real;
internal ulong val1_real; // real component
internal ulong val0_imag;
internal ulong val1_imag; // imaginary component
};
// variable length numeric field
internal struct LeafVarString {
// internal ushort leaf; // LF_VARSTRING [TYPTYPE]
internal ushort len; // length of value in bytes
internal byte[] value; // value
};
// index leaf - contains type index of another leaf
// a major use of this leaf is to allow the compilers to emit a
// long complex list (LF_FIELD) in smaller pieces.
internal struct LeafIndex {
// internal ushort leaf; // LF_INDEX [TYPTYPE]
internal ushort pad0; // internal padding, must be 0
internal uint index; // (type index) type index of referenced leaf
};
// subfield record for base class field
internal struct LeafBClass {
// internal ushort leaf; // LF_BCLASS [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) attribute
internal uint index; // (type index) type index of base class
internal byte[] offset; // variable length offset of base within class
};
// subfield record for direct and indirect virtual base class field
internal struct LeafVBClass {
// internal ushort leaf; // LF_VBCLASS | LV_IVBCLASS [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) attribute
internal uint index; // (type index) type index of direct virtual base class
internal uint vbptr; // (type index) type index of virtual base pointer
internal byte[] vbpoff; // virtual base pointer offset from address point
// followed by virtual base offset from vbtable
};
// subfield record for friend class
internal struct LeafFriendCls {
// internal ushort leaf; // LF_FRIENDCLS [TYPTYPE]
internal ushort pad0; // internal padding, must be 0
internal uint index; // (type index) index to type record of friend class
};
// subfield record for friend function
internal struct LeafFriendFcn {
// internal ushort leaf; // LF_FRIENDFCN [TYPTYPE]
internal ushort pad0; // internal padding, must be 0
internal uint index; // (type index) index to type record of friend function
internal string name; // name of friend function
};
// subfield record for non-static data members
internal struct LeafMember {
// internal ushort leaf; // LF_MEMBER [TYPTYPE]
internal ushort attr; // (CV_fldattr_t)attribute mask
internal uint index; // (type index) index of type record for field
internal byte[] offset; // variable length offset of field
internal string name; // length prefixed name of field
};
// type record for static data members
internal struct LeafSTMember {
// internal ushort leaf; // LF_STMEMBER [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) attribute mask
internal uint index; // (type index) index of type record for field
internal string name; // length prefixed name of field
};
// subfield record for virtual function table pointer
internal struct LeafVFuncTab {
// internal ushort leaf; // LF_VFUNCTAB [TYPTYPE]
internal ushort pad0; // internal padding, must be 0
internal uint type; // (type index) type index of pointer
};
// subfield record for virtual function table pointer with offset
internal struct LeafVFuncOff {
// internal ushort leaf; // LF_VFUNCOFF [TYPTYPE]
internal ushort pad0; // internal padding, must be 0.
internal uint type; // (type index) type index of pointer
internal int offset; // offset of virtual function table pointer
};
// subfield record for overloaded method list
internal struct LeafMethod {
// internal ushort leaf; // LF_METHOD [TYPTYPE]
internal ushort count; // number of occurrences of function
internal uint mList; // (type index) index to LF_METHODLIST record
internal string name; // length prefixed name of method
};
// subfield record for nonoverloaded method
internal struct LeafOneMethod {
// internal ushort leaf; // LF_ONEMETHOD [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) method attribute
internal uint index; // (type index) index to type record for procedure
internal uint[] vbaseoff; // offset in vfunctable if intro virtual
internal string name;
};
// subfield record for enumerate
internal struct LeafEnumerate {
// internal ushort leaf; // LF_ENUMERATE [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) access
internal byte[] value; // variable length value field
internal string name;
};
// type record for nested (scoped) type definition
internal struct LeafNestType {
// internal ushort leaf; // LF_NESTTYPE [TYPTYPE]
internal ushort pad0; // internal padding, must be 0
internal uint index; // (type index) index of nested type definition
internal string name; // length prefixed type name
};
// type record for nested (scoped) type definition, with attributes
// new records for vC v5.0, no need to have 16-bit ti versions.
internal struct LeafNestTypeEx {
// internal ushort leaf; // LF_NESTTYPEEX [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) member access
internal uint index; // (type index) index of nested type definition
internal string name; // length prefixed type name
};
// type record for modifications to members
internal struct LeafMemberModify {
// internal ushort leaf; // LF_MEMBERMODIFY [TYPTYPE]
internal ushort attr; // (CV_fldattr_t) the new attributes
internal uint index; // (type index) index of base class type definition
internal string name; // length prefixed member name
};
// type record for pad leaf
internal struct LeafPad {
internal byte leaf;
};
// Symbol definitions
internal enum SYM {
S_END=0x0006, // Block, procedure, "with" or thunk end
S_OEM=0x0404, // OEM defined symbol
S_REGISTER_ST=0x1001, // Register variable
S_CONSTANT_ST=0x1002, // constant symbol
S_UDT_ST=0x1003, // User defined type
S_COBOLUDT_ST=0x1004, // special UDT for cobol that does not symbol pack
S_MANYREG_ST=0x1005, // multiple register variable
S_BPREL32_ST=0x1006, // BP-relative
S_LDATA32_ST=0x1007, // Module-local symbol
S_GDATA32_ST=0x1008, // Global data symbol
S_PUB32_ST=0x1009, // a internal symbol (CV internal reserved)
S_LPROC32_ST=0x100a, // Local procedure start
S_GPROC32_ST=0x100b, // Global procedure start
S_VFTABLE32=0x100c, // address of virtual function table
S_REGREL32_ST=0x100d, // register relative address
S_LTHREAD32_ST=0x100e, // local thread storage
S_GTHREAD32_ST=0x100f, // global thread storage
S_LPROCMIPS_ST=0x1010, // Local procedure start
S_GPROCMIPS_ST=0x1011, // Global procedure start
// new symbol records for edit and continue information
S_FRAMEPROC=0x1012, // extra frame and proc information
S_COMPILE2_ST=0x1013, // extended compile flags and info
// new symbols necessary for 16-bit enumerates of IA64 registers
// and IA64 specific symbols
S_MANYREG2_ST=0x1014, // multiple register variable
S_LPROCIA64_ST=0x1015, // Local procedure start (IA64)
S_GPROCIA64_ST=0x1016, // Global procedure start (IA64)
// Local symbols for IL
S_LOCALSLOT_ST=0x1017, // local IL sym with field for local slot index
S_PARAMSLOT_ST=0x1018, // local IL sym with field for parameter slot index
S_ANNOTATION=0x1019, // Annotation string literals
// symbols to support managed code debugging
S_GMANPROC_ST=0x101a, // Global proc
S_LMANPROC_ST=0x101b, // Local proc
S_RESERVED1=0x101c, // reserved
S_RESERVED2=0x101d, // reserved
S_RESERVED3=0x101e, // reserved
S_RESERVED4=0x101f, // reserved
S_LMANDATA_ST=0x1020,
S_GMANDATA_ST=0x1021,
S_MANFRAMEREL_ST=0x1022,
S_MANREGISTER_ST=0x1023,
S_MANSLOT_ST=0x1024,
S_MANMANYREG_ST=0x1025,
S_MANREGREL_ST=0x1026,
S_MANMANYREG2_ST=0x1027,
S_MANTYPREF=0x1028, // Index for type referenced by name from metadata
S_UNAMESPACE_ST=0x1029, // Using namespace
// Symbols w/ SZ name fields. All name fields contain utf8 encoded strings.
S_ST_MAX=0x1100, // starting point for SZ name symbols
S_OBJNAME=0x1101, // path to object file name
S_THUNK32=0x1102, // Thunk Start
S_BLOCK32=0x1103, // block start
S_WITH32=0x1104, // with start
S_LABEL32=0x1105, // code label
S_REGISTER=0x1106, // Register variable
S_CONSTANT=0x1107, // constant symbol
S_UDT=0x1108, // User defined type
S_COBOLUDT=0x1109, // special UDT for cobol that does not symbol pack
S_MANYREG=0x110a, // multiple register variable
S_BPREL32=0x110b, // BP-relative
S_LDATA32=0x110c, // Module-local symbol
S_GDATA32=0x110d, // Global data symbol
S_PUB32=0x110e, // a internal symbol (CV internal reserved)
S_LPROC32=0x110f, // Local procedure start
S_GPROC32=0x1110, // Global procedure start
S_REGREL32=0x1111, // register relative address
S_LTHREAD32=0x1112, // local thread storage
S_GTHREAD32=0x1113, // global thread storage
S_LPROCMIPS=0x1114, // Local procedure start
S_GPROCMIPS=0x1115, // Global procedure start
S_COMPILE2=0x1116, // extended compile flags and info
S_MANYREG2=0x1117, // multiple register variable
S_LPROCIA64=0x1118, // Local procedure start (IA64)
S_GPROCIA64=0x1119, // Global procedure start (IA64)
S_LOCALSLOT=0x111a, // local IL sym with field for local slot index
S_SLOT=S_LOCALSLOT, // alias for LOCALSLOT
S_PARAMSLOT=0x111b, // local IL sym with field for parameter slot index
// symbols to support managed code debugging
S_LMANDATA=0x111c,
S_GMANDATA=0x111d,
S_MANFRAMEREL=0x111e,
S_MANREGISTER=0x111f,
S_MANSLOT=0x1120,
S_MANMANYREG=0x1121,
S_MANREGREL=0x1122,
S_MANMANYREG2=0x1123,
S_UNAMESPACE=0x1124, // Using namespace
// ref symbols with name fields
S_PROCREF=0x1125, // Reference to a procedure
S_DATAREF=0x1126, // Reference to data
S_LPROCREF=0x1127, // Local Reference to a procedure
S_ANNOTATIONREF=0x1128, // Reference to an S_ANNOTATION symbol
S_TOKENREF=0x1129, // Reference to one of the many MANPROCSYM's
// continuation of managed symbols
S_GMANPROC=0x112a, // Global proc
S_LMANPROC=0x112b, // Local proc
// short, light-weight thunks
S_TRAMPOLINE=0x112c, // trampoline thunks
S_MANCONSTANT=0x112d, // constants with metadata type info
// native attributed local/parms
S_ATTR_FRAMEREL=0x112e, // relative to virtual frame ptr
S_ATTR_REGISTER=0x112f, // stored in a register
S_ATTR_REGREL=0x1130, // relative to register (alternate frame ptr)
S_ATTR_MANYREG=0x1131, // stored in >1 register
// Separated code (from the compiler) support
S_SEPCODE=0x1132,
S_LOCAL=0x1133, // defines a local symbol in optimized code
S_DEFRANGE=0x1134, // defines a single range of addresses in which symbol can be evaluated
S_DEFRANGE2=0x1135, // defines ranges of addresses in which symbol can be evaluated
S_SECTION=0x1136, // A COFF section in a PE executable
S_COFFGROUP=0x1137, // A COFF group
S_EXPORT=0x1138, // A export
S_CALLSITEINFO=0x1139, // Indirect call site information
S_FRAMECOOKIE=0x113a, // Security cookie information
S_DISCARDED=0x113b, // Discarded by LINK /OPT:REF (experimental, see richards)
S_RECTYPE_MAX, // one greater than last
S_RECTYPE_LAST=S_RECTYPE_MAX - 1,
};
// enum describing compile flag ambient data model
internal enum CV_CFL_DATA {
CV_CFL_DNEAR=0x00,
CV_CFL_DFAR=0x01,
CV_CFL_DHUGE=0x02
};
// enum describing compile flag ambiant code model
internal enum CV_CFL_CODE {
CV_CFL_CNEAR=0x00,
CV_CFL_CFAR=0x01,
CV_CFL_CHUGE=0x02
};
// enum describing compile flag target floating point package
internal enum CV_CFL_FPKG {
CV_CFL_NDP=0x00,
CV_CFL_EMU=0x01,
CV_CFL_ALT=0x02
};
// enum describing function return method
[Flags]
internal enum CV_PROCFLAGS : byte {
CV_PFLAG_NOFPO=0x01, // frame pointer present
CV_PFLAG_INT=0x02, // interrupt return
CV_PFLAG_FAR=0x04, // far return
CV_PFLAG_NEVER=0x08, // function does not return
CV_PFLAG_NOTREACHED=0x10, // label isn't fallen into
CV_PFLAG_CUST_CALL=0x20, // custom calling convention
CV_PFLAG_NOINLINE=0x40, // function marked as noinline
CV_PFLAG_OPTDBGINFO=0x80, // function has debug information for optimized code
};
// Extended proc flags
//
internal struct CV_EXPROCFLAGS {
internal byte flags; // (CV_PROCFLAGS)
internal byte reserved; // must be zero
};
// local variable flags
[Flags]
internal enum CV_LVARFLAGS : ushort {
fIsParam=0x0001, // variable is a parameter
fAddrTaken=0x0002, // address is taken
fCompGenx=0x0004, // variable is compiler generated
fIsAggregate=0x0008, // the symbol is splitted in temporaries,
// which are treated by compiler as
// independent entities
fIsAggregated=0x0010, // Counterpart of fIsAggregate - tells
// that it is a part of a fIsAggregate symbol
fIsAliased=0x0020, // variable has multiple simultaneous lifetimes
fIsAlias=0x0040, // represents one of the multiple simultaneous lifetimes
};
// represents an address range, used for optimized code debug info
internal struct CV_lvar_addr_range { // defines a range of addresses
internal uint offStart;
internal ushort isectStart;
internal uint cbRange;
};
// enum describing function data return method
internal enum CV_GENERIC_STYLE {
CV_GENERIC_VOID=0x00, // void return type
CV_GENERIC_REG=0x01, // return data is in registers
CV_GENERIC_ICAN=0x02, // indirect caller allocated near
CV_GENERIC_ICAF=0x03, // indirect caller allocated far
CV_GENERIC_IRAN=0x04, // indirect returnee allocated near
CV_GENERIC_IRAF=0x05, // indirect returnee allocated far
CV_GENERIC_UNUSED=0x06 // first unused
};
[Flags]
internal enum CV_GENERIC_FLAG : ushort {
cstyle=0x0001, // true push varargs right to left
rsclean=0x0002, // true if returnee stack cleanup
};
// flag bitfields for separated code attributes
[Flags]
internal enum CV_SEPCODEFLAGS : uint {
fIsLexicalScope=0x00000001, // S_SEPCODE doubles as lexical scope
fReturnsToParent=0x00000002, // code frag returns to parent
};
// Generic layout for symbol records
internal struct SYMTYPE {
internal ushort reclen; // Record length
internal ushort rectyp; // Record type
// byte data[CV_ZEROLEN];
// SYMTYPE *NextSym (SYMTYPE * pSym) {
// return (SYMTYPE *) ((char *)pSym + pSym->reclen + sizeof(ushort));
// }
};
// non-model specific symbol types
internal struct RegSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_REGISTER
internal uint typind; // (type index) Type index or Metadata token
internal ushort reg; // register enumerate
internal string name; // Length-prefixed name
};
internal struct AttrRegSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANREGISTER | S_ATTR_REGISTER
internal uint typind; // (type index) Type index or Metadata token
internal uint offCod; // first code address where var is live
internal ushort segCod;
internal ushort flags; // (CV_LVARFLAGS)local var flags
internal ushort reg; // register enumerate
internal string name; // Length-prefixed name
};
internal struct ManyRegSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANYREG
internal uint typind; // (type index) Type index or metadata token
internal byte count; // count of number of registers
internal byte[] reg; // count register enumerates, most-sig first
internal string name; // length-prefixed name.
};
internal struct ManyRegSym2 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANYREG2
internal uint typind; // (type index) Type index or metadata token
internal ushort count; // count of number of registers,
internal ushort[] reg; // count register enumerates, most-sig first
internal string name; // length-prefixed name.
};
internal struct AttrManyRegSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANMANYREG
internal uint typind; // (type index) Type index or metadata token
internal uint offCod; // first code address where var is live
internal ushort segCod;
internal ushort flags; // (CV_LVARFLAGS)local var flags
internal byte count; // count of number of registers
internal byte[] reg; // count register enumerates, most-sig first
internal string name; // utf-8 encoded zero terminate name
};
internal struct AttrManyRegSym2 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANMANYREG2 | S_ATTR_MANYREG
internal uint typind; // (type index) Type index or metadata token
internal uint offCod; // first code address where var is live
internal ushort segCod;
internal ushort flags; // (CV_LVARFLAGS)local var flags
internal ushort count; // count of number of registers
internal ushort[] reg; // count register enumerates, most-sig first
internal string name; // utf-8 encoded zero terminate name
};
internal struct ConstSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_CONSTANT or S_MANCONSTANT
internal uint typind; // (type index) Type index (containing enum if enumerate) or metadata token
internal ushort value; // numeric leaf containing value
internal string name; // Length-prefixed name
};
internal struct UdtSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_UDT | S_COBOLUDT
internal uint typind; // (type index) Type index
internal string name; // Length-prefixed name
};
internal struct ManyTypRef {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANTYPREF
internal uint typind; // (type index) Type index
};
internal struct SearchSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_SSEARCH
internal uint startsym; // offset of the procedure
internal ushort seg; // segment of symbol
};
[Flags]
internal enum CFLAGSYM_FLAGS : ushort {
pcode=0x0001, // true if pcode present
floatprec=0x0006, // floating precision
floatpkg=0x0018, // float package
ambdata=0x00e0, // ambient data model
ambcode=0x0700, // ambient code model
mode32=0x0800, // true if compiled 32 bit mode
};
internal struct CFlagSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_COMPILE
internal byte machine; // target processor
internal byte language; // language index
internal ushort flags; // (CFLAGSYM_FLAGS)
internal string ver; // Length-prefixed compiler version string
};
[Flags]
internal enum COMPILESYM_FLAGS : uint {
iLanguage=0x000000ff, // language index
fEC=0x00000100, // compiled for E/C
fNoDbgInfo=0x00000200, // not compiled with debug info
fLTCG=0x00000400, // compiled with LTCG
fNoDataAlign=0x00000800, // compiled with -Bzalign
fManagedPresent=0x00001000, // managed code/data present
fSecurityChecks=0x00002000, // compiled with /GS
fHotPatch=0x00004000, // compiled with /hotpatch
fCVTCIL=0x00008000, // converted with CVTCIL
fMSILModule=0x00010000, // MSIL netmodule
};
internal struct CompileSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_COMPILE2
internal uint flags; // (COMPILESYM_FLAGS)
internal ushort machine; // target processor
internal ushort verFEMajor; // front end major version #
internal ushort verFEMinor; // front end minor version #
internal ushort verFEBuild; // front end build version #
internal ushort verMajor; // back end major version #
internal ushort verMinor; // back end minor version #
internal ushort verBuild; // back end build version #
internal string verSt; // Length-prefixed compiler version string, followed
internal string[] verArgs; // block of zero terminated strings, ended by double-zero.
};
internal struct ObjNameSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_OBJNAME
internal uint signature; // signature
internal string name; // Length-prefixed name
};
internal struct EndArgSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_ENDARG
};
internal struct ReturnSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_RETURN
internal CV_GENERIC_FLAG flags; // flags
internal byte style; // CV_GENERIC_STYLE return style
// followed by return method data
};
internal struct EntryThisSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_ENTRYTHIS
internal byte thissym; // symbol describing this pointer on entry
};
internal struct BpRelSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_BPREL32
internal int off; // BP-relative offset
internal uint typind; // (type index) Type index or Metadata token
internal string name; // Length-prefixed name
};
internal struct FrameRelSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANFRAMEREL | S_ATTR_FRAMEREL
internal int off; // Frame relative offset
internal uint typind; // (type index) Type index or Metadata token
internal uint offCod; // first code address where var is live
internal ushort segCod;
internal ushort flags; // (CV_LVARFLAGS)local var flags
internal string name; // Length-prefixed name
};
internal struct SlotSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_LOCALSLOT or S_PARAMSLOT
internal uint index; // slot index
internal uint typind; // (type index) Type index or Metadata token
internal string name; // Length-prefixed name
};
internal struct AttrSlotSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANSLOT
internal uint index; // slot index
internal uint typind; // (type index) Type index or Metadata token
internal uint offCod; // first code address where var is live
internal ushort segCod;
internal ushort flags; // (CV_LVARFLAGS)local var flags
internal string name; // Length-prefixed name
};
internal struct AnnotationSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_ANNOTATION
internal uint off;
internal ushort seg;
internal ushort csz; // Count of zero terminated annotation strings
internal string[] rgsz; // Sequence of zero terminated annotation strings
};
internal struct DatasSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_LDATA32, S_GDATA32 or S_PUB32, S_LMANDATA, S_GMANDATA
internal uint typind; // (type index) Type index, or Metadata token if a managed symbol
internal uint off;
internal ushort seg;
internal string name; // Length-prefixed name
};
[Flags]
internal enum CV_PUBSYMFLAGS : uint {
fNone=0,
fCode=0x00000001, // set if internal symbol refers to a code address
fFunction=0x00000002, // set if internal symbol is a function
fManaged=0x00000004, // set if managed code (native or IL)
fMSIL=0x00000008, // set if managed IL code
};
internal struct PubSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_PUB32
internal uint flags; // (CV_PUBSYMFLAGS)
internal uint off;
internal ushort seg;
internal string name; // Length-prefixed name
};
internal struct ProcSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_GPROC32 or S_LPROC32
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint next; // pointer to next symbol
internal uint len; // Proc length
internal uint dbgStart; // Debug start offset
internal uint dbgEnd; // Debug end offset
internal uint typind; // (type index) Type index
internal uint off;
internal ushort seg;
internal byte flags; // (CV_PROCFLAGS) Proc flags
internal string name; // Length-prefixed name
};
internal struct ManProcSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_GMANPROC, S_LMANPROC, S_GMANPROCIA64 or S_LMANPROCIA64
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint next; // pointer to next symbol
internal uint len; // Proc length
internal uint dbgStart; // Debug start offset
internal uint dbgEnd; // Debug end offset
internal uint token; // COM+ metadata token for method
internal uint off;
internal ushort seg;
internal byte flags; // (CV_PROCFLAGS) Proc flags
internal ushort retReg; // Register return value is in (may not be used for all archs)
internal string name; // optional name field
};
internal struct ManProcSymMips {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_GMANPROCMIPS or S_LMANPROCMIPS
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint next; // pointer to next symbol
internal uint len; // Proc length
internal uint dbgStart; // Debug start offset
internal uint dbgEnd; // Debug end offset
internal uint regSave; // int register save mask
internal uint fpSave; // fp register save mask
internal uint intOff; // int register save offset
internal uint fpOff; // fp register save offset
internal uint token; // COM+ token type
internal uint off;
internal ushort seg;
internal byte retReg; // Register return value is in
internal byte frameReg; // Frame pointer register
internal string name; // optional name field
};
internal struct ThunkSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_THUNK32
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint next; // pointer to next symbol
internal uint off;
internal ushort seg;
internal ushort len; // length of thunk
internal byte ord; // THUNK_ORDINAL specifying type of thunk
internal string name; // Length-prefixed name
internal byte[] variant; // variant portion of thunk
};
internal enum TRAMP { // Trampoline subtype
trampIncremental, // incremental thunks
trampBranchIsland, // Branch island thunks
};
internal struct TrampolineSym { // Trampoline thunk symbol
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_TRAMPOLINE
internal ushort trampType; // trampoline sym subtype
internal ushort cbThunk; // size of the thunk
internal uint offThunk; // offset of the thunk
internal uint offTarget; // offset of the target of the thunk
internal ushort sectThunk; // section index of the thunk
internal ushort sectTarget; // section index of the target of the thunk
};
internal struct LabelSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_LABEL32
internal uint off;
internal ushort seg;
internal byte flags; // (CV_PROCFLAGS) flags
internal string name; // Length-prefixed name
};
internal struct BlockSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_BLOCK32
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint len; // Block length
internal uint off; // Offset in code segment
internal ushort seg; // segment of label
internal string name; // Length-prefixed name
};
internal struct WithSym32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_WITH32
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint len; // Block length
internal uint off; // Offset in code segment
internal ushort seg; // segment of label
internal string expr; // Length-prefixed expression string
};
internal struct VpathSym32 {
// internal ushort reclen; // record length
// internal ushort rectyp; // S_VFTABLE32
internal uint root; // (type index) type index of the root of path
internal uint path; // (type index) type index of the path record
internal uint off; // offset of virtual function table
internal ushort seg; // segment of virtual function table
};
internal struct RegRel32 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_REGREL32
internal uint off; // offset of symbol
internal uint typind; // (type index) Type index or metadata token
internal ushort reg; // register index for symbol
internal string name; // Length-prefixed name
};
internal struct AttrRegRel {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_MANREGREL | S_ATTR_REGREL
internal uint off; // offset of symbol
internal uint typind; // (type index) Type index or metadata token
internal ushort reg; // register index for symbol
internal uint offCod; // first code address where var is live
internal ushort segCod;
internal ushort flags; // (CV_LVARFLAGS)local var flags
internal string name; // Length-prefixed name
};
internal struct ThreadSym32 {
// internal ushort reclen; // record length
// internal ushort rectyp; // S_LTHREAD32 | S_GTHREAD32
internal uint typind; // (type index) type index
internal uint off; // offset into thread storage
internal ushort seg; // segment of thread storage
internal string name; // length prefixed name
};
internal struct Slink32 {
// internal ushort reclen; // record length
// internal ushort rectyp; // S_SLINK32
internal uint framesize; // frame size of parent procedure
internal int off; // signed offset where the static link was saved relative to the value of reg
internal ushort reg;
};
internal struct ProcSymMips {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_GPROCMIPS or S_LPROCMIPS
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint next; // pointer to next symbol
internal uint len; // Proc length
internal uint dbgStart; // Debug start offset
internal uint dbgEnd; // Debug end offset
internal uint regSave; // int register save mask
internal uint fpSave; // fp register save mask
internal uint intOff; // int register save offset
internal uint fpOff; // fp register save offset
internal uint typind; // (type index) Type index
internal uint off; // Symbol offset
internal ushort seg; // Symbol segment
internal byte retReg; // Register return value is in
internal byte frameReg; // Frame pointer register
internal string name; // Length-prefixed name
};
internal struct ProcSymIa64 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_GPROCIA64 or S_LPROCIA64
internal uint parent; // pointer to the parent
internal uint end; // pointer to this blocks end
internal uint next; // pointer to next symbol
internal uint len; // Proc length
internal uint dbgStart; // Debug start offset
internal uint dbgEnd; // Debug end offset
internal uint typind; // (type index) Type index
internal uint off; // Symbol offset
internal ushort seg; // Symbol segment
internal ushort retReg; // Register return value is in
internal byte flags; // (CV_PROCFLAGS) Proc flags
internal string name; // Length-prefixed name
};
internal struct RefSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_PROCREF_ST, S_DATAREF_ST, or S_LPROCREF_ST
internal uint sumName; // SUC of the name
internal uint ibSym; // Offset of actual symbol in $$Symbols
internal ushort imod; // Module containing the actual symbol
internal ushort usFill; // align this record
};
internal struct RefSym2 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_PROCREF, S_DATAREF, or S_LPROCREF
internal uint sumName; // SUC of the name
internal uint ibSym; // Offset of actual symbol in $$Symbols
internal ushort imod; // Module containing the actual symbol
internal string name; // hidden name made a first class member
};
internal struct AlignSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_ALIGN
};
internal struct OemSymbol {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_OEM
internal Guid idOem; // an oem ID (GUID)
internal uint typind; // (type index) Type index
internal byte[] rgl; // user data, force 4-byte alignment
};
[Flags]
internal enum FRAMEPROCSYM_FLAGS : uint {
fHasAlloca=0x00000001, // function uses _alloca()
fHasSetJmp=0x00000002, // function uses setjmp()
fHasLongJmp=0x00000004, // function uses longjmp()
fHasInlAsm=0x00000008, // function uses inline asm
fHasEH=0x00000010, // function has EH states
fInlSpec=0x00000020, // function was speced as inline
fHasSEH=0x00000040, // function has SEH
fNaked=0x00000080, // function is __declspec(naked)
fSecurityChecks=0x00000100, // function has buffer security check introduced by /GS.
fAsyncEH=0x00000200, // function compiled with /EHa
fGSNoStackOrdering=0x00000400, // function has /GS buffer checks, but stack ordering couldn't be done
fWasInlined=0x00000800, // function was inlined within another function
};
internal struct FrameProcSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_FRAMEPROC
internal uint cbFrame; // count of bytes of total frame of procedure
internal uint cbPad; // count of bytes of padding in the frame
internal uint offPad; // offset (rel to frame) to where padding starts
internal uint cbSaveRegs; // count of bytes of callee save registers
internal uint offExHdlr; // offset of exception handler
internal ushort secExHdlr; // section id of exception handler
internal uint flags; // (FRAMEPROCSYM_FLAGS)
}
internal struct UnamespaceSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_UNAMESPACE
internal string name; // name
};
internal struct SepCodSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_SEPCODE
internal uint parent; // pointer to the parent
internal uint end; // pointer to this block's end
internal uint length; // count of bytes of this block
internal uint scf; // (CV_SEPCODEFLAGS) flags
internal uint off; // sec:off of the separated code
internal uint offParent; // secParent:offParent of the enclosing scope
internal ushort sec; // (proc, block, or sepcode)
internal ushort secParent;
};
internal struct LocalSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_LOCAL
internal uint id; // id of the local
internal uint typind; // (type index) type index
internal ushort flags; // (CV_LVARFLAGS) local var flags
internal uint idParent; // This is is parent variable - fIsAggregated or fIsAlias
internal uint offParent; // Offset in parent variable - fIsAggregated
internal uint expr; // NI of expression that this temp holds
internal uint pad0; // pad, must be zero
internal uint pad1; // pad, must be zero
internal string name; // Name of this symbol.
}
internal struct DefRangeSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_DEFRANGE
internal uint id; // ID of the local symbol for which this formula holds
internal uint program; // program to evaluate the value of the symbol
internal CV_lvar_addr_range range; // Range of addresses where this program is valid
};
internal struct DefRangeSym2 {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_DEFRANGE2
internal uint id; // ID of the local symbol for which this formula holds
internal uint program; // program to evaluate the value of the symbol
internal ushort count; // count of CV_lvar_addr_range records following
internal CV_lvar_addr_range[] range;// Range of addresses where this program is valid
};
internal struct SectionSym {
// internal ushort reclen // Record length
// internal ushort rectyp; // S_SECTION
internal ushort isec; // Section number
internal byte align; // Alignment of this section (power of 2)
internal byte bReserved; // Reserved. Must be zero.
internal uint rva;
internal uint cb;
internal uint characteristics;
internal string name; // name
};
internal struct CoffGroupSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_COFFGROUP
internal uint cb;
internal uint characteristics;
internal uint off; // Symbol offset
internal ushort seg; // Symbol segment
internal string name; // name
};
[Flags]
internal enum EXPORTSYM_FLAGS : ushort {
fConstant=0x0001, // CONSTANT
fData=0x0002, // DATA
fPrivate=0x0004, // PRIVATE
fNoName=0x0008, // NONAME
fOrdinal=0x0010, // Ordinal was explicitly assigned
fForwarder=0x0020, // This is a forwarder
}
internal struct ExportSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_EXPORT
internal ushort ordinal;
internal ushort flags; // (EXPORTSYM_FLAGS)
internal string name; // name of
};
//
// Symbol for describing indirect calls when they are using
// a function pointer cast on some other type or temporary.
// Typical content will be an LF_POINTER to an LF_PROCEDURE
// type record that should mimic an actual variable with the
// function pointer type in question.
//
// Since the compiler can sometimes tail-merge a function call
// through a function pointer, there may be more than one
// S_CALLSITEINFO record at an address. This is similar to what
// you could do in your own code by:
//
// if (expr)
// pfn = &function1;
// else
// pfn = &function2;
//
// (*pfn)(arg list);
//
internal struct CallsiteInfo {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_CALLSITEINFO
internal int off; // offset of call site
internal ushort ect; // section index of call site
internal ushort pad0; // alignment padding field, must be zero
internal uint typind; // (type index) type index describing function signature
};
// Frame cookie information
internal enum CV_cookietype {
CV_COOKIETYPE_COPY=0,
CV_COOKIETYPE_XOR_SP,
CV_COOKIETYPE_XOR_BP,
CV_COOKIETYPE_XOR_R13,
};
// Symbol for describing security cookie's position and type
// (raw, xor'd with esp, xor'd with ebp).
internal struct FrameCookie {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_FRAMECOOKIE
internal int off; // Frame relative offset
internal ushort reg; // Register index
internal int cookietype; // (CV_cookietype) Type of the cookie
internal byte flags; // Flags describing this cookie
};
internal enum CV_DISCARDED : uint {
CV_DISCARDED_UNKNOWN=0,
CV_DISCARDED_NOT_SELECTED=1,
CV_DISCARDED_NOT_REFERENCED=2,
};
internal struct DiscardedSym {
// internal ushort reclen; // Record length [SYMTYPE]
// internal ushort rectyp; // S_DISCARDED
internal CV_DISCARDED iscarded;
internal uint fileid; // First FILEID if line number info present
internal uint linenum; // First line number
internal byte[] data; // Original record(s) with invalid indices
};
//
// V7 line number data types
//
internal enum DEBUG_S_SUBSECTION_TYPE : uint {
DEBUG_S_IGNORE=0x80000000, // if this bit is set in a subsection type then ignore the subsection contents
DEBUG_S_SYMBOLS=0xf1,
DEBUG_S_LINES=0xf2,
DEBUG_S_STRINGTABLE=0xf3,
DEBUG_S_FILECHKSMS=0xf4,
DEBUG_S_FRAMEDATA=0xf5,
};
//
// Line flags (data present)
//
internal enum CV_LINE_SUBSECTION_FLAGS : ushort {
CV_LINES_HAVE_COLUMNS=0x0001,
}
internal struct CV_LineSection {
internal uint off;
internal ushort sec;
internal ushort flags;
internal uint cod;
}
internal struct CV_SourceFile {
internal uint index; // Index to file in checksum section.
internal uint count; // Number of CV_Line records.
internal uint linsiz; // Size of CV_Line recods.
}
[Flags]
internal enum CV_Line_Flags : uint {
linenumStart=0x00ffffff, // line where statement/expression starts
deltaLineEnd=0x7f000000, // delta to line where statement ends (optional)
fStatement=0x80000000, // true if a statement linenumber, else an expression line num
};
internal struct CV_Line {
internal uint offset; // Offset to start of code bytes for line number
internal uint flags; // (CV_Line_Flags)
};
internal struct CV_Column {
internal ushort offColumnStart;
internal ushort offColumnEnd;
};
// File information
internal enum CV_FILE_CHECKSUM_TYPE : byte {
None=0,
MD5=1,
};
internal struct CV_FileCheckSum {
internal uint name; // Index of name in name table.
internal byte len; // Hash length
internal byte type; // Hash type
}
[Flags]
internal enum FRAMEDATA_FLAGS : uint {
fHasSEH=0x00000001,
fHasEH=0x00000002,
fIsFunctionStart=0x00000004,
};
internal struct FrameData {
internal uint ulRvaStart;
internal uint cbBlock;
internal uint cbLocals;
internal uint cbParams;
internal uint cbStkMax;
internal uint frameFunc;
internal ushort cbProlog;
internal ushort cbSavedRegs;
internal uint flags; // (FRAMEDATA_FLAGS)
};
internal struct XFixupData {
internal ushort wType;
internal ushort wExtra;
internal uint rva;
internal uint rvaTarget;
};
internal enum DEBUG_S_SUBSECTION {
SYMBOLS=0xF1,
LINES=0xF2,
STRINGTABLE=0xF3,
FILECHKSMS=0xF4,
FRAMEDATA=0xF5,
}
} | 35.899795 | 111 | 0.664135 | [
"MIT"
] | 13294029724/ET | Unity/Assets/ThirdParty/ILRuntime/Mono.Cecil/symbols/pdb/Microsoft.Cci.Pdb/CvInfo.cs | 87,416 | C# |
using System.Configuration;
using System.IO;
using System.Web.Mvc;
using Dongle.Serialization;
using Meganium.Api.Managers;
using Meganium.Api.Trash;
using Meganium.Api.ViewModels;
using Meganium.Api.Web;
using Meganium.Installer;
namespace Meganium.Site.Areas.Admin.Controllers
{
public class InstallController : BaseController
{
private readonly IManagers _managers;
public InstallController(IManagers managers)
{
_managers = managers;
}
public ActionResult ResetTheme()
{
return View();
}
[HttpPost]
public ActionResult ResetTheme(InstallResetThemeVm vm)
{
if (vm.Password != ConfigurationManager.AppSettings["MasterPassword"])
{
return null;
}
var initializer = new Initializer(_managers);
if (vm.ReinitializeDatabase)
{
initializer.ReinitializeDatabase();
}
var configExchange = LoadConfigExchange(vm);
initializer.Initialize(vm.License, configExchange);
return RedirectToAction("Index", "Post");
}
private ConfigExchange LoadConfigExchange(InstallResetThemeVm model)
{
var pathResolver = new PathResolver(_managers.License.Options);
var path = Server.MapPath(pathResolver.Licenses + model.License);
var configExchange = JsonSimpleSerializer.UnserializeFromFile<ConfigExchange>(new FileInfo(path + "\\license.json"));
return configExchange;
}
}
} | 29.236364 | 129 | 0.630597 | [
"MIT"
] | afonsof/meganium | Site/Areas/Admin/Controllers/InstallController.cs | 1,610 | C# |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Petminder_RestApi.Models
{
[Table("pets")]
public partial class Pets
{
public Pets()
{
Exercises = new HashSet<Exercises>();
Files = new HashSet<Files>();
}
[Key]
[Column("id")]
public Guid Id { get; set; }
[Required]
[Column("name")]
[StringLength(255)]
public string Name { get; set; }
[Column("weight")]
[StringLength(255)]
public string Weight { get; set; }
[Column("age")]
public int? Age { get; set; }
[Column("type")]
[StringLength(255)]
public string Type { get; set; }
[Column("breed")]
[StringLength(255)]
public string Breed { get; set; }
[Column("account_id")]
public Guid AccountId { get; set; }
[Column("gender")]
[StringLength(50)]
public string Gender { get; set; }
[ForeignKey(nameof(AccountId))]
[InverseProperty(nameof(Accounts.Pets))]
public virtual Accounts Account { get; set; }
[InverseProperty("Pet")]
public virtual ICollection<Exercises> Exercises { get; set; }
[InverseProperty("Pet")]
public virtual ICollection<Files> Files { get; set; }
}
}
| 28.68 | 69 | 0.566248 | [
"MIT"
] | bricklerjustin/Petminder-Project | Petminder-RestApi/Models/Pets.cs | 1,436 | C# |
using System;
using System.Collections;
using UnityEngine;
using Valve;
public class RayPointer : MonoBehaviour
{
#region Variables
//paint brush
A_PaintBrush paintBrush;
PaintPaletteVolume PPV;
bool palleteHover;
public GameObject objectHit;
GameObject lastObjectHit;
//raycasting pointer
public RaycastHit hit;
public bool busy;
[Tooltip("this will send clickEvent() message to all object that have a child named 'RayCollider'")]
public String OnClickBroadcastMessage = "ClickEvent";
LineRenderer lineRenderer;
public GameObject Tip;
private float lineWidth = 0.005f;
Vector3 tipStartScal;
Coroutine rayVisCoroutine;
bool OnHoverBroadcasted;
bool OnHoverExitBroadcasted;
//ray pointer global
[Tooltip("this sets the raypointer to hit other objects and not just the paint pallete")]
public bool raypointerGlobal;
//lenght of ray
public float rayLength = 0.3f;
#endregion
void Start()
{
//ray pointer
tipStartScal = Tip.transform.localScale;
objectHit = new GameObject();
objectHit.transform.parent = Tip.transform;
lastObjectHit = objectHit;
}
private void Update()
{
Vector3 fwd = transform.TransformDirection(Vector3.forward);
if (Physics.Raycast(transform.position, fwd, out hit, rayLength))
{
//---------------------------------------------------------------------
if (!raypointerGlobal)
{
//menu items
if (hit.collider.gameObject.name == "RayCollider")
{
objectHit = hit.collider.transform.parent.gameObject;
Show();
SetLength(hit.distance);
busy = true;
// print(hit.collider.gameObject.transform.parent.name);
}
// else if (hit.collider == null)
// {
// Hide();
// busy = false;
// }
}
//--------------------------------------------------------------------
else if (raypointerGlobal)
{
//global objects
if (hit.collider.transform.parent != null)
{
if (hit.collider.transform.parent.GetComponent<SelectableObject>())
{
objectHit = hit.collider.transform.parent.gameObject;
Show();
SetLength(hit.distance);
busy = true;
// print(hit.collider.gameObject.name);
}
}
//menu items
if (hit.collider.gameObject.name == "RayCollider")
{
objectHit = hit.collider.transform.parent.gameObject;
Show();
SetLength(hit.distance);
busy = true;
// print(hit.collider.gameObject.transform.parent.name);
}
}
}
//turn off rayPointer when not in use
else if (busy) { busy = false; }
else if (!busy && rayVisible) { Hide(); }
//broadcast OnHover----------------------------------------------------------------------
if (paintBrush.controller != null)
{
if (busy)
{
if (objectHit.GetComponent<SelectableItem>() && !OnHoverBroadcasted)
{
objectHit.SendMessage("OnHover", objectHit, SendMessageOptions.DontRequireReceiver);
OnHoverExitBroadcasted = false;
OnHoverBroadcasted = true;
}
else if (objectHit.GetComponent<SelectableObject>() && !OnHoverBroadcasted)
{
objectHit.GetComponent<SelectableObject>().isHovered = true;
OnHoverExitBroadcasted = false;
OnHoverBroadcasted = true;
}
}
}
//broadcast OnHoverExit-------------------------------------------------------------------------------------------------
if (busy)
{
if (!OnHoverExitBroadcasted && lastObjectHit != objectHit)
{
OnHoverBroadcasted = false;
OnHoverExitBroadcasted = true;
// print("broadcasting On Hovere Exit ");
if (lastObjectHit != null)
{
lastObjectHit.SendMessage("OnHoverExit", SendMessageOptions.DontRequireReceiver);
lastObjectHit = objectHit;
if (objectHit.GetComponent<SelectableObject>() != null) { objectHit.GetComponent<SelectableObject>().isHovered = false; }
}
}
}
//broacast clickevent----------------------------------------------------------------------------------------------------
if (paintBrush.controller != null)
{
if (busy && paintBrush.controller.GetPressDown(SteamVR_Controller.ButtonMask.Trigger))
{
if (objectHit.GetComponent<SelectableItem>())
{
objectHit.SendMessage("ClickEvent", objectHit, SendMessageOptions.DontRequireReceiver);
// print("broadcast click");
}
else if (objectHit.GetComponent<SelectableObject>())
{
objectHit.GetComponent<SelectableObject>().OnClick();
OnHoverExitBroadcasted = false;
OnHoverBroadcasted = true;
}
}
//broacast clickHold-------------------------------------------------------------------------------------------------
if (paintBrush.controller != null)
{
if (busy && paintBrush.controller.GetPress(SteamVR_Controller.ButtonMask.Trigger))
{
if (objectHit.GetComponent<SelectableItem>())
{
objectHit.SendMessage("ClickHold", objectHit, SendMessageOptions.DontRequireReceiver);
// print("broadcast click");
}
}
}
//broacast unClick
if (paintBrush.controller != null)
{
if (busy && paintBrush.controller.GetPressUp(SteamVR_Controller.ButtonMask.Trigger))
{
if (objectHit.GetComponent<SelectableItem>())
{
objectHit.SendMessage("Unclick", objectHit, SendMessageOptions.DontRequireReceiver);
// print("broadcast click");
}
}
}
}
}
public bool rayVisible { get; private set; }
public void Hide(bool rayOnly = false)
{
if (isActiveAndEnabled)
{
if (rayVisible)
{
rayVisible = false;
rayVisCoroutine = StartCoroutine(HideRay());
//this.StopCoroutine(m_RayVisibilityCoroutine);
}
}
}
public void Show(bool rayOnly = false)
{
if (isActiveAndEnabled)
{
if (!rayVisible)
{
rayVisible = true;
rayVisCoroutine = StartCoroutine(ShowRay());
this.StopCoroutine(rayVisCoroutine);
}
}
}
public void SetLength(float length)
{
if (!rayVisible)
return;
var scaledWidth = lineWidth;
var scaledLength = length;
var lineRendererTransform = lineRenderer.transform;
lineRendererTransform.localScale = Vector3.one * scaledLength;
lineRenderer.SetWidth(scaledWidth, scaledWidth * scaledLength);
Tip.transform.position = transform.position + transform.forward * length;
Tip.transform.localScale = scaledLength * tipStartScal;
}
private void Awake()
{
//get paint brush
paintBrush = this.transform.parent.GetComponent<A_PaintBrush>();
//line renderer
lineRenderer = this.transform.GetChild(0).GetComponent<LineRenderer>();
rayVisible = true;
///tip
if(Tip == null)
{
Tip = this.transform.GetChild(1).gameObject;
}
}
private IEnumerator HideRay()
{
Tip.transform.localScale = Vector3.zero;
// cache current width for smooth animation to target value without snapping
var currentWidth = lineRenderer.startWidth;
const float kTargetWidth = 0f;
const float kSmoothTime = 0.1875f;
var smoothVelocity = 0f;
var currentDuration = 0f;
while (currentDuration < kSmoothTime)
{
currentDuration += Time.unscaledDeltaTime;
currentWidth = Mathf.SmoothDamp(currentWidth, kTargetWidth, ref smoothVelocity, kSmoothTime, Mathf.Infinity, Time.unscaledDeltaTime);
lineRenderer.SetWidth(currentWidth, currentWidth);
yield return null;
}
lineRenderer.SetWidth(kTargetWidth, kTargetWidth);
rayVisCoroutine = null;
}
private IEnumerator ShowRay()
{
Tip.transform.localScale = tipStartScal;
float scaledWidth;
var currentWidth = lineRenderer.startWidth;
var smoothVelocity = 0f;
const float kSmoothTime = 0.3125f;
var currentDuration = 0f;
while (currentDuration < kSmoothTime)
{
currentDuration += Time.unscaledDeltaTime;
currentWidth = Mathf.SmoothDamp(currentWidth, lineWidth, ref smoothVelocity, kSmoothTime, Mathf.Infinity, Time.unscaledDeltaTime);
scaledWidth = currentWidth;
lineRenderer.SetWidth(scaledWidth, scaledWidth);
yield return null;
}
scaledWidth = lineWidth;
lineRenderer.SetWidth(scaledWidth, scaledWidth);
rayVisCoroutine = null;
}
}
| 33.519737 | 145 | 0.512856 | [
"MIT"
] | InsilicoStudios/Virtual-Studio | Assets/Virtual Studio/Scripts/RayPointer.cs | 10,192 | C# |
/*
* Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using System.Collections.Generic;
using Amazon.ElasticLoadBalancing.Model;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.ElasticLoadBalancing.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendServerDescription Unmarshaller
/// </summary>
internal class BackendServerDescriptionUnmarshaller : IUnmarshaller<BackendServerDescription, XmlUnmarshallerContext>, IUnmarshaller<BackendServerDescription, JsonUnmarshallerContext>
{
public BackendServerDescription Unmarshall(XmlUnmarshallerContext context)
{
BackendServerDescription backendServerDescription = new BackendServerDescription();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.Read())
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("InstancePort", targetDepth))
{
backendServerDescription.InstancePort = IntUnmarshaller.GetInstance().Unmarshall(context);
continue;
}
if (context.TestExpression("PolicyNames/member", targetDepth))
{
backendServerDescription.PolicyNames.Add(StringUnmarshaller.GetInstance().Unmarshall(context));
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return backendServerDescription;
}
}
return backendServerDescription;
}
public BackendServerDescription Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static BackendServerDescriptionUnmarshaller instance;
public static BackendServerDescriptionUnmarshaller GetInstance()
{
if (instance == null)
instance = new BackendServerDescriptionUnmarshaller();
return instance;
}
}
}
| 36.345679 | 188 | 0.605978 | [
"Apache-2.0"
] | jdluzen/aws-sdk-net-android | AWSSDK/Amazon.ElasticLoadBalancing/Model/Internal/MarshallTransformations/BackendServerDescriptionUnmarshaller.cs | 2,944 | 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.GoogleNative.Redis.V1Beta1.Outputs
{
/// <summary>
/// Maintenance policy for an instance.
/// </summary>
[OutputType]
public sealed class MaintenancePolicyResponse
{
/// <summary>
/// The time when the policy was created.
/// </summary>
public readonly string CreateTime;
/// <summary>
/// Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.
/// </summary>
public readonly string Description;
/// <summary>
/// The time when the policy was last updated.
/// </summary>
public readonly string UpdateTime;
/// <summary>
/// Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.
/// </summary>
public readonly ImmutableArray<Outputs.WeeklyMaintenanceWindowResponse> WeeklyMaintenanceWindow;
[OutputConstructor]
private MaintenancePolicyResponse(
string createTime,
string description,
string updateTime,
ImmutableArray<Outputs.WeeklyMaintenanceWindowResponse> weeklyMaintenanceWindow)
{
CreateTime = createTime;
Description = description;
UpdateTime = updateTime;
WeeklyMaintenanceWindow = weeklyMaintenanceWindow;
}
}
}
| 34.45283 | 188 | 0.657174 | [
"Apache-2.0"
] | AaronFriel/pulumi-google-native | sdk/dotnet/Redis/V1Beta1/Outputs/MaintenancePolicyResponse.cs | 1,826 | C# |
using System;
namespace MicroRabbit.Domain.Core.Events
{
public abstract class Event
{
public DateTime Timestamp { get; protected set; }
protected Event()
{
Timestamp = DateTime.Now;
}
}
}
| 17.642857 | 57 | 0.578947 | [
"MIT"
] | stanbeamish/MicroRabbit | MicroRabbit/MicroRabbit.Domain.Core/Events/Event.cs | 249 | C# |
/*
* Copyright 2019 GridGain Systems, Inc. and Contributors.
*
* Licensed under the GridGain Community Edition License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace Apache.Ignite.Core.Tests.ApiParity
{
using Apache.Ignite.Core.Configuration;
using NUnit.Framework;
/// <summary>
/// Tests that .NET <see cref="DataRegionConfiguration"/> has all properties from Java configuration APIs.
/// </summary>
[Explicit(ParityTest.IgnoreReason)]
public class DataRegionConfigurationParityTest
{
/// <summary>
/// Tests the ignite configuration parity.
/// </summary>
[Test]
public void TestRegionConfiguration()
{
ParityTest.CheckConfigurationParity(
@"modules\core\src\main\java\org\apache\ignite\configuration\DataRegionConfiguration.java",
typeof(DataRegionConfiguration));
}
}
}
| 36.05 | 110 | 0.698336 | [
"CC0-1.0"
] | ciusji/gridgain | modules/platforms/dotnet/Apache.Ignite.Core.Tests/ApiParity/DataRegionConfigurationParityTest.cs | 1,444 | C# |
using Contracts.Components;
using Contracts.Dtos;
using FluentValidation;
using MediatR;
using Shared.Exceptions;
using Shared.Models;
using Shared.Validation;
using System;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
namespace AirportService.BLL.Contexts.Airports.Queries
{
/// <summary>
/// Get the airport info by its IATA code.
/// </summary>
public class GetInfo : IRequest<(AirportInfoDto, Error)>
{
/// <summary>
/// Airport's IATA code.
/// </summary>
public string IataCode { get; set; }
}
public class GetInfoValidator : AbstractValidator<GetInfo>
{
public GetInfoValidator()
{
RuleFor(x => x.IataCode)
.Must(IataCodeValidator.IsValid)
.WithMessage("IATA code is invalid.");
}
}
/// <summary>
/// Gets the airport info by its IATA code.
/// </summary>
public class GetInfoHandler : IRequestHandler<GetInfo, (AirportInfoDto, Error)>
{
private readonly IAirportInfoDataProvider _airportInfoDataProvider;
public GetInfoHandler(IAirportInfoDataProvider airportInfoDataProvider)
{
_airportInfoDataProvider = airportInfoDataProvider ?? throw new ArgumentNullException(nameof(airportInfoDataProvider));
}
public async Task<(AirportInfoDto, Error)> Handle(GetInfo message, CancellationToken token)
{
try
{
var airportInfo =
await _airportInfoDataProvider
.GetAirportInfoAsync(message.IataCode, token)
.ConfigureAwait(false);
return (airportInfo, null);
}
catch (ArgumentException e)
{
return (null, new Error(HttpStatusCode.BadRequest, e.Message));
}
catch (EntityNotFoundException e)
{
return (null, new Error(HttpStatusCode.NotFound, e.Message));
}
}
}
} | 29.768116 | 131 | 0.604187 | [
"MIT"
] | NickMaev/MSA-Sample | Services/AirportService/AirportService.BLL/Contexts/Airports/Queries/GetInfo.cs | 2,056 | C# |
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.IO;
namespace UnrealBuildTool
{
class MacPlatformContext : UEBuildPlatformContext
{
public MacPlatformContext(FileReference InProjectFile) : base(UnrealTargetPlatform.Mac, InProjectFile)
{
}
/// <summary>
/// Modify the rules for a newly created module, in a target that's being built for this platform.
/// This is not required - but allows for hiding details of a particular platform.
/// </summary>
/// <param name="ModuleName">The name of the module</param>
/// <param name="Rules">The module rules</param>
/// <param name="Target">The target being build</param>
public override void ModifyModuleRulesForActivePlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
{
bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
if (!UEBuildConfiguration.bBuildRequiresCookedData)
{
if (ModuleName == "TargetPlatform")
{
bBuildShaderFormats = true;
}
}
// allow standalone tools to use target platform modules, without needing Engine
if (ModuleName == "TargetPlatform")
{
if (UEBuildConfiguration.bForceBuildTargetPlatforms)
{
Rules.DynamicallyLoadedModuleNames.Add("MacTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("MacNoEditorTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("MacClientTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("MacServerTargetPlatform");
Rules.DynamicallyLoadedModuleNames.Add("AllDesktopTargetPlatform");
}
if (bBuildShaderFormats)
{
// Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatD3D");
Rules.DynamicallyLoadedModuleNames.Add("ShaderFormatOpenGL");
}
}
}
public override void ResetBuildConfiguration(UnrealTargetConfiguration Configuration)
{
UEBuildConfiguration.bCompileSimplygon = false;
UEBuildConfiguration.bCompileSimplygonSSF = false;
UEBuildConfiguration.bCompileICU = true;
}
public override void ValidateBuildConfiguration(CPPTargetConfiguration Configuration, CPPTargetPlatform Platform, bool bCreateDebugInfo)
{
if (BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac)
{
// @todo: Temporarily disable precompiled header files when building remotely due to errors
BuildConfiguration.bUsePCHFiles = false;
}
BuildConfiguration.bCheckExternalHeadersForModification = BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac;
BuildConfiguration.bCheckSystemHeadersForModification = BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Mac;
BuildConfiguration.ProcessorCountMultiplier = MacToolChain.GetAdjustedProcessorCountMultiplier();
BuildConfiguration.bUseSharedPCHs = false;
BuildConfiguration.bUsePDBFiles = bCreateDebugInfo && Configuration != CPPTargetConfiguration.Debug && Platform == CPPTargetPlatform.Mac;
// we always deploy - the build machines need to be able to copy the files back, which needs the full bundle
BuildConfiguration.bDeployAfterCompile = true;
}
public override void ValidateUEBuildConfiguration()
{
if (ProjectFileGenerator.bGenerateProjectFiles && !ProjectFileGenerator.bGeneratingRocketProjectFiles)
{
// When generating non-Rocket project files we need intellisense generator to include info from all modules, including editor-only third party libs
UEBuildConfiguration.bCompileLeanAndMeanUE = false;
}
}
/// <summary>
/// Setup the target environment for building
/// </summary>
/// <param name="InBuildTarget"> The target being built</param>
public override void SetUpEnvironment(UEBuildTarget InBuildTarget)
{
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_MAC=1");
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_APPLE=1");
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_TTS=0");
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_SPEECH_RECOGNITION=0");
if (!InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Contains("WITH_DATABASE_SUPPORT=0") && !InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Contains("WITH_DATABASE_SUPPORT=1"))
{
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_DATABASE_SUPPORT=0");
}
// Needs OS X 10.11 for Metal
if (MacToolChain.MacOSSDKVersionFloat >= 10.11f && UEBuildConfiguration.bCompileAgainstEngine)
{
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("HAS_METAL=1");
InBuildTarget.ExtraModuleNames.Add("MetalRHI");
}
else
{
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("HAS_METAL=0");
}
}
/// <summary>
/// Whether this platform should create debug information or not
/// </summary>
/// <param name="Configuration"> The UnrealTargetConfiguration being built</param>
/// <returns>true if debug info should be generated, false if not</returns>
public override bool ShouldCreateDebugInfo(UnrealTargetConfiguration Configuration)
{
return true;
}
/// <summary>
/// Creates a toolchain instance for the given platform.
/// </summary>
/// <param name="Platform">The platform to create a toolchain for</param>
/// <returns>New toolchain instance.</returns>
public override UEToolChain CreateToolChain(CPPTargetPlatform Platform)
{
return new MacToolChain(ProjectFile);
}
/// <summary>
/// Create a build deployment handler
/// </summary>
/// <param name="ProjectFile">The project file of the target being deployed. Used to find any deployment specific settings.</param>
/// <param name="DeploymentHandler">The output deployment handler</param>
/// <returns>True if the platform requires a deployment handler, false otherwise</returns>
public override UEBuildDeploy CreateDeploymentHandler()
{
return new UEDeployMac();
}
}
class MacPlatform : UEBuildPlatform
{
MacPlatformSDK SDK;
public MacPlatform(MacPlatformSDK InSDK) : base(UnrealTargetPlatform.Mac, CPPTargetPlatform.Mac)
{
SDK = InSDK;
}
public override SDKStatus HasRequiredSDKsInstalled()
{
return SDK.HasRequiredSDKsInstalled();
}
public override bool CanUseXGE()
{
return false;
}
public override bool CanUseDistcc()
{
return true;
}
/// <summary>
/// Get the extension to use for the given binary type
/// </summary>
/// <param name="InBinaryType"> The binrary type being built</param>
/// <returns>string The binary extenstion (ie 'exe' or 'dll')</returns>
public override string GetBinaryExtension(UEBuildBinaryType InBinaryType)
{
switch (InBinaryType)
{
case UEBuildBinaryType.DynamicLinkLibrary:
return ".dylib";
case UEBuildBinaryType.Executable:
return "";
case UEBuildBinaryType.StaticLibrary:
return ".a";
case UEBuildBinaryType.Object:
return ".o";
case UEBuildBinaryType.PrecompiledHeader:
return ".gch";
}
return base.GetBinaryExtension(InBinaryType);
}
/// <summary>
/// Get the extension to use for debug info for the given binary type
/// </summary>
/// <param name="InBinaryType"> The binary type being built</param>
/// <returns>string The debug info extension (i.e. 'pdb')</returns>
public override string GetDebugInfoExtension(UEBuildBinaryType InBinaryType)
{
switch (InBinaryType)
{
case UEBuildBinaryType.DynamicLinkLibrary:
return BuildConfiguration.bGeneratedSYMFile || BuildConfiguration.bUsePDBFiles ? ".dSYM" : "";
case UEBuildBinaryType.Executable:
return BuildConfiguration.bGeneratedSYMFile || BuildConfiguration.bUsePDBFiles ? ".dSYM" : "";
case UEBuildBinaryType.StaticLibrary:
return "";
case UEBuildBinaryType.Object:
return "";
case UEBuildBinaryType.PrecompiledHeader:
return "";
default:
return "";
}
}
/// <summary>
/// Modify the rules for a newly created module, where the target is a different host platform.
/// This is not required - but allows for hiding details of a particular platform.
/// </summary>
/// <param name="ModuleName">The name of the module</param>
/// <param name="Rules">The module rules</param>
/// <param name="Target">The target being build</param>
public override void ModifyModuleRulesForOtherPlatform(string ModuleName, ModuleRules Rules, TargetInfo Target)
{
}
/// <summary>
/// Whether the platform requires the extra UnityCPPWriter
/// This is used to add an extra file for UBT to get the #include dependencies from
/// </summary>
/// <returns>bool true if it is required, false if not</returns>
public override bool RequiresExtraUnityCPPWriter()
{
return true;
}
/// <summary>
/// Return whether we wish to have this platform's binaries in our builds
/// </summary>
public override bool IsBuildRequired()
{
return false;
}
/// <summary>
/// Return whether we wish to have this platform's binaries in our CIS tests
/// </summary>
public override bool IsCISRequired()
{
return false;
}
/// <summary>
/// Creates a context for the given project on the current platform.
/// </summary>
/// <param name="ProjectFile">The project file for the current target</param>
/// <returns>New platform context object</returns>
public override UEBuildPlatformContext CreateContext(FileReference ProjectFile)
{
return new MacPlatformContext(ProjectFile);
}
}
class MacPlatformSDK : UEBuildPlatformSDK
{
protected override SDKStatus HasRequiredManualSDKInternal()
{
return SDKStatus.Valid;
}
}
class MacPlatformFactory : UEBuildPlatformFactory
{
protected override UnrealTargetPlatform TargetPlatform
{
get { return UnrealTargetPlatform.Mac; }
}
/// <summary>
/// Register the platform with the UEBuildPlatform class
/// </summary>
protected override void RegisterBuildPlatforms()
{
MacPlatformSDK SDK = new MacPlatformSDK();
SDK.ManageAndValidateSDK();
// Register this build platform for Mac
Log.TraceVerbose(" Registering for {0}", UnrealTargetPlatform.Mac.ToString());
UEBuildPlatform.RegisterBuildPlatform(new MacPlatform(SDK));
UEBuildPlatform.RegisterPlatformWithGroup(UnrealTargetPlatform.Mac, UnrealPlatformGroup.Unix);
UEBuildPlatform.RegisterPlatformWithGroup(UnrealTargetPlatform.Mac, UnrealPlatformGroup.Apple);
}
}
}
| 34.850498 | 200 | 0.742326 | [
"MIT"
] | armroyce/Unreal | UnrealEngine-4.11.2-release/Engine/Source/Programs/UnrealBuildTool/Mac/UEBuildMac.cs | 10,490 | C# |
#nullable enable
using System.Collections.Generic;
namespace DotVVM.Framework.Controls
{
public class PostBackHandlerCollection : List<PostBackHandler>
{
}
}
| 17.1 | 66 | 0.760234 | [
"Apache-2.0"
] | AMBULATUR/dotvvm | src/DotVVM.Framework/Controls/PostBackHandlerCollection.cs | 171 | C# |
using System;
namespace Ganss.Excel
{
/// <summary>
/// A caching factory of <see cref="TypeMapper"/> objects.
/// </summary>
public interface ITypeMapperFactory
{
/// <summary>
/// Creates a <see cref="TypeMapper"/> for the specified type.
/// </summary>
/// <param name="type">The type to create a <see cref="TypeMapper"/> object for.</param>
/// <returns>A <see cref="TypeMapper"/> for the specified type.</returns>
TypeMapper Create(Type type);
/// <summary>
/// Creates a <see cref="TypeMapper"/> for the specified object.
/// </summary>
/// <param name="o">The object to create a <see cref="TypeMapper"/> object for.</param>
/// <returns>A <see cref="TypeMapper"/> for the specified object.</returns>
TypeMapper Create(object o);
}
} | 35.916667 | 96 | 0.587007 | [
"MIT"
] | BeyondMySouls/ExcelMapper | ExcelMapper/ITypeMapperFactory.cs | 864 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Net;
using System.Globalization;
namespace Google
{
/// <summary>
/// Wrapper class for a Blog on Google Blogger
/// API reference at https://developers.google.com/blogger/
/// </summary>
class Blog
{
#region Static Members
public const string OAuthScope = "https://www.googleapis.com/auth/blogger";
const string c_BloggerEndpoint = "https://www.googleapis.com/blogger/v3";
public static Blog GetByName(string accessToken, string name)
{
var doc = ApiUtility.HttpGetJson(string.Concat(c_BloggerEndpoint, "/users/self/blogs"), accessToken);
IEnumerable<XElement> matches =
from el in doc.Element("items").Elements("item")
where el.Element("name").Value.Equals(name, StringComparison.OrdinalIgnoreCase)
select el;
if (matches.Count() == 0) return null;
if (matches.Count() != 1) throw new ApplicationException("More than one album match: " + name);
return new Blog(accessToken, matches.First());
}
#endregion
#region Construction
string m_accessToken;
XElement m_doc;
string m_name;
string m_blogId;
private Blog(string accessToken, XElement doc)
{
m_accessToken = accessToken;
m_doc = doc;
m_name = doc.Element("name").Value;
m_blogId = doc.Element("id").Value;
}
#endregion
#region Public Members
public string Name { get { return m_name; } }
public string Id { get { return m_blogId; } }
public BlogPost GetPostByTitle(string title)
{
// Compose the query
var url = string.Concat(c_BloggerEndpoint, "/blogs/", m_blogId, "/posts/search?fetchBodies=false",
"&fields=items(id,title)",
"&q=", Uri.EscapeDataString($"title: \"{title}\"") );
// Search for the blog
var matchingPosts = ApiUtility.HttpGetJson(url, m_accessToken);
var items = matchingPosts.Element("items");
if (items == null)
{
return null;
}
IEnumerable<XElement> matches =
from el in items.Elements("item")
where el.Element("title").Value.Equals(title, StringComparison.OrdinalIgnoreCase)
select el;
if (matches.Count() == 0)
{
return null;
}
return new BlogPost(m_accessToken, m_blogId, matches.First());
}
public BlogPost AddPost(string title, string bodyHtml, BlogPostMetadata metadata = null, bool isDraft = false)
{
string url = string.Concat(c_BloggerEndpoint, "/blogs/", m_blogId, "/posts/");
if (isDraft) url = string.Concat(url, "?isDraft=true");
string post = assemblePost(m_blogId, title, bodyHtml, metadata);
var doc = ApiUtility.HttpPostJson(url, post, m_accessToken);
return new BlogPost(m_accessToken, m_blogId, doc);
}
#endregion
static string assemblePost(string blogId, string title, string bodyHtml, BlogPostMetadata metadata)
{
StringBuilder sb = new StringBuilder();
sb.Append("{\"kind\":\"blogger#post\",\"blog\":{\"id\":\"");
ApiUtility.JsonEncode(sb, blogId);
sb.Append("\"},\"title\":\"");
ApiUtility.JsonEncode(sb, title);
sb.Append("\"");
if (metadata != null)
{
if (metadata.PublishedDate.Ticks != 0)
{
sb.AppendFormat(CultureInfo.InvariantCulture, ",\"published\":\"{0:s}\"", metadata.PublishedDate.ToUniversalTime());
}
if (metadata.UpdatedDate.Ticks != 0)
{
sb.AppendFormat(CultureInfo.InvariantCulture, ",\"updated\":\"{0:s}\"", metadata.UpdatedDate.ToUniversalTime());
}
if (metadata.Latitude != 0.0 && metadata.Longitude != 0.0)
{
sb.AppendFormat(CultureInfo.InvariantCulture, ",\"location\":{{\"name\":\"Click Here\",\"lat\":\"{0:F12}\",\"lng\":\"{1:F12}\"}}",
metadata.Latitude, metadata.Longitude);
}
if (metadata.Labels != null && metadata.Labels.Length != 0)
{
sb.Append(",\"labels\":[");
foreach (string label in metadata.Labels)
{
sb.Append('"');
ApiUtility.JsonEncode(sb, label);
sb.Append("\",");
}
sb.Remove(sb.Length - 1, 1); // Remove trailing comma
sb.Append(']');
}
}
sb.Append(",\"content\":\"");
ApiUtility.JsonEncode(sb, bodyHtml);
sb.Append("\"}");
return sb.ToString();
}
} // Class Blog
class BlogPostMetadata
{
public DateTime PublishedDate { get; set; }
public DateTime UpdatedDate { get; set; }
public double Latitude { get; set; }
public double Longitude { get; set; }
public string[] Labels { get; set; }
}
class BlogPost
{
string m_accessToken;
string m_blogId;
string m_postId;
public BlogPost(string accessToken, string blogId, XElement postDoc)
{
m_accessToken = accessToken;
m_blogId = blogId;
m_postId = postDoc.Element("id").Value;
}
public string Id { get { return m_postId; } }
/*
This was a temporary hack to correct some locations.
Keeping it here as sample code for future updates.
public void UpdateLocation(double latitude, double longitude)
{
if (latitude == 0.0 || longitude == 0.0) return;
if (Math.Abs(latitude - m_latitude) < 0.000001
&& Math.Abs(longitude - m_longitude) < 0.000001)
{
Console.WriteLine(" Location is correct.");
return;
}
// Assemble the post
StringBuilder sb = new StringBuilder();
sb.Append("{\"kind\":\"blogger#post\",\"blog\":{\"id\":\"");
Blog.JsonEncode(sb, m_blogId);
sb.Append("\"}");
sb.AppendFormat(CultureInfo.InvariantCulture, ",\"location\":{{\"name\":\"Click Here\",\"lat\":\"{0:F12}\",\"lng\":\"{1:F12}\"}}",
latitude, longitude);
sb.Append("}");
Console.WriteLine(sb.ToString());
//return;
byte[] postBytes = Encoding.UTF8.GetBytes(sb.ToString());
// Compose the request
string url = string.Concat(BloggerUtility.c_BloggerEndpoint, "/blogs/", m_blogId, "/posts/", m_postId);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/json";
request.Method = "PATCH";
request.Headers.Add(string.Concat("Authorization: Bearer ", m_accessToken));
request.ContentLength = postBytes.Length;
// Send the body
using (var stream = request.GetRequestStream())
{
stream.Write(postBytes, 0, postBytes.Length);
}
var doc = BloggerUtility.HttpGetJson(request);
WebAlbumUtility.DumpXml(doc, Console.Out);
Console.WriteLine(" Updated location.");
}
*/
}
}
| 34.928571 | 150 | 0.535787 | [
"MIT"
] | FileMeta/FMPostToBlogger | GoogleBlogger.cs | 7,826 | C# |
using ColossalFramework.UI;
using CSM.Commands;
using CSM.Commands.Data.Internal;
using CSM.Container;
using CSM.Helpers;
using CSM.Networking;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using ColossalFramework;
using UnityEngine;
namespace CSM.Panels
{
/// <summary>
/// Displays a chat on the users screen. Allows a user to send messages
/// to other players and view important events such as server startup and
/// connections.
/// </summary>
public class ChatLogPanel : UIPanel
{
private UILabel _messageBox;
private UILabel _title;
private UITextField _chatText;
private static UITextField _chatTextChirper;
private UIResizeHandle _resize;
private UIScrollablePanel _scrollablepanel;
private UIScrollbar _scrollbar;
private UISlicedSprite _trackingsprite;
private UISlicedSprite _trackingthumb;
private UIDragHandle _draghandle;
private readonly List<ChatCommand> _chatCommands;
private float _timeoutCounter;
private static bool UseChirper => CSM.Settings.UseChirper;
public enum MessageType
{
Normal,
Warning,
Error
}
public ChatLogPanel()
{
if (UseChirper)
{
isVisible = false;
}
_chatCommands = new List<ChatCommand>
{
new ChatCommand("help", "Displays information about which commands can be displayed.", (command) =>
{
foreach (ChatCommand c in _chatCommands)
{
PrintGameMessage($"/{c.Command} : {c.Description}");
}
}),
new ChatCommand("version", "Displays version information about the mod and game.", (command) =>
{
PrintGameMessage("Mod Version : " + Assembly.GetAssembly(typeof(CSM)).GetName().Version);
PrintGameMessage("Game Version : " + BuildConfig.applicationVersion);
}),
new ChatCommand("support", "Display support links for the mod.", (command) =>
{
PrintGameMessage("Website : https://citiesskylinesmultiplayer.com");
PrintGameMessage("GitHub : https://github.com/CitiesSkylinesMultiplayer/CSM");
PrintGameMessage("Discord : https://discord.gg/RjACPhd");
PrintGameMessage("Steam Workshop : https://steamcommunity.com/sharedfiles/filedetails/?id=1558438291");
}),
new ChatCommand("players", "Displays a list of players connected to the server", (command) =>
{
if (MultiplayerManager.Instance.CurrentRole == MultiplayerRole.None)
{
PrintGameMessage("You are not hosting or connected to any servers.");
return;
}
foreach (string player in MultiplayerManager.Instance.PlayerList)
{
PrintGameMessage(player);
}
}),
new ChatCommand("donate", "Find out how to support the mod developers", (command) =>
{
PrintGameMessage("Want to help support the mod?");
PrintGameMessage("Help develop the mod here: https://github.com/CitiesSkylinesMultiplayer/CSM");
PrintGameMessage("Donate to the developers here: https://www.patreon.com/CSM_MultiplayerMod");
}),
new ChatCommand("clear", "Clear everything from the chat log.", (command) =>
{
if (UseChirper)
{
ChirpPanel.instance.ClearMessages();
}
else
{
_messageBox.text = "";
}
}),
new ChatCommand("open-log", "Opens the multiplayer log.", (command) =>
{
Process.Start(Path.GetFullPath(".") + "/multiplayer-logs/log-current.txt");
}),
new ChatCommand("sync", "Redownloads the entire save", (command) =>
{
if (MultiplayerManager.Instance.CurrentRole == MultiplayerRole.Client)
{
if (MultiplayerManager.Instance.GameBlocked)
{
PrintGameMessage("Please wait until the currently joining player is connected!");
}
else
{
PrintGameMessage("Requesting the save game from the server");
MultiplayerManager.Instance.CurrentClient.Status =
Networking.Status.ClientStatus.Downloading;
MultiplayerManager.Instance.BlockGameReSync();
Command.SendToServer(new RequestWorldTransferCommand());
}
}
else
{
PrintGameMessage("You are the server");
}
})
};
}
public override void Update()
{
// Prevent opening the chat while typing in text fields or the pause menu is opened
bool allowOpen = !(UIView.HasModalInput() || UIView.HasInputFocus());
// Check if chat is allowed to open.
if (allowOpen && (!isVisible || !_chatText.hasFocus))
{
// On T is pressed.
if (Input.GetKeyDown(KeyCode.T))
{
// Open the chat window.
OpenChatWindow();
}
// On forward slash is pressed.
else if (Input.inputString == "/")
{
if (UseChirper)
{
// Prefix chat input.
_chatTextChirper.text = "/";
// Move the cursor to the end of field.
_chatTextChirper.MoveToEnd();
}
else
{
_chatText.text = "/";
_chatText.MoveToEnd();
}
// Open the chat window.
OpenChatWindow();
}
}
// Increment the timeout counter if panel is visible
if (isVisible && !_chatText.hasFocus) _timeoutCounter += Time.deltaTime;
// If timeout counter has timed out, hide chat.
if (_timeoutCounter > 5) {
isVisible = false;
_timeoutCounter = 0;
}
base.Update();
}
private void OpenChatWindow()
{
if (UseChirper)
{
_chatTextChirper.Show();
_chatTextChirper.Focus();
if (ChirpPanel.instance.isShowing)
{
// Don't close Chirper automatically if already open
ReflectionHelper.SetAttr(ChirpPanel.instance, "m_Timeout", 0f);
}
else
{
ChirpPanel.instance.Show(0);
Vector3 posInit = _chatTextChirper.position;
posInit.y = -45f;
_chatTextChirper.position = posInit;
ValueAnimator.Animate("ChirpPanelChatX", val =>
{
_chatTextChirper.width = val;
}, new AnimatedFloat(25, 350, ChirpPanel.instance.m_ShowHideTime, ChirpPanel.instance.m_ShowEasingType), () =>
{
if (!ChirpPanel.instance.isShowing)
return;
ValueAnimator.Animate("ChirpPanelChatY", val =>
{
Vector3 pos = _chatTextChirper.position;
pos.y = val;
_chatTextChirper.position = pos;
}, new AnimatedFloat(-45f, -155, ChirpPanel.instance.m_ShowHideTime, ChirpPanel.instance.m_ShowEasingType));
});
}
}
else
{
isVisible = true;
_chatText.Focus();
// Reset the timeout counter
_timeoutCounter = 0;
// Scroll to bottom of the panel.
_scrollablepanel.ScrollToBottom();
}
}
public override void Start()
{
// Generates the following UI:
// /NAME-----------\ <-- UIDragHandle
// |---------------|-|
// | | |<-- _messageBox, _getscrollablepanel
// | | |
// |---------------| |
// | | |<-- _chatText
// |---------------|-|
// |-|<-- _resize
// ^
// ¦-- _scrollbar, _trackingsprite, _trackingthumb
backgroundSprite = "GenericPanel";
name = "ChatLogPanel";
color = new Color32(22, 22, 22, 240);
// Activates the dragging of the window
_draghandle = AddUIComponent<UIDragHandle>();
_draghandle.name = "ChatLogPanelDragHandle";
// Grab the view for calculating width and height of game
UIView view = UIView.GetAView();
// Center this window in the game
relativePosition = new Vector3(10.0f, view.fixedHeight - 440.0f);
width = 500;
height = 310;
minimumSize = new Vector2(300, 310);
// Add resize component
_resize = AddUIComponent<UIResizeHandle>();
_resize.position = new Vector2((width - 20), (-height + 10));
_resize.width = 20f;
_resize.height = 20f;
_resize.color = new Color32(255, 255, 255, 255);
_resize.backgroundSprite = "GenericTabPressed";
_resize.name = "ChatLogPanelResize";
// Add scrollable panel component
_scrollablepanel = AddUIComponent<UIScrollablePanel>();
_scrollablepanel.width = 490;
_scrollablepanel.height = 240;
_scrollablepanel.position = new Vector2(10, -30);
_scrollablepanel.clipChildren = true;
_scrollablepanel.name = "ChatLogPanelScrollablePanel";
// Add title
_title = AddUIComponent<UILabel>();
_title.position = new Vector2(10, -5);
_title.text = "Multiplayer Chat";
_title.textScale = 0.8f;
_title.autoSize = true;
_title.name = "ChatLogPanelTitle";
// Add messagebox component
_messageBox = _scrollablepanel.AddUIComponent<UILabel>();
_messageBox.isVisible = true;
_messageBox.isEnabled = true;
_messageBox.autoSize = false;
_messageBox.autoHeight = true;
_messageBox.width = 470;
_messageBox.height = 240;
_messageBox.position = new Vector2(10, -30);
_messageBox.textScale = 0.8f;
_messageBox.wordWrap = true;
_messageBox.name = "ChatLogPanelMessageBox";
// Add scrollbar component
_scrollbar = AddUIComponent<UIScrollbar>();
_scrollbar.name = "Scrollbar";
_scrollbar.width = 20f;
_scrollbar.height = _scrollablepanel.height;
_scrollbar.orientation = UIOrientation.Vertical;
_scrollbar.pivot = UIPivotPoint.TopLeft;
_scrollbar.position = new Vector2(480, -30);
_scrollbar.minValue = 0;
_scrollbar.value = 0;
_scrollbar.incrementAmount = 50;
_scrollbar.name = "ChatLogPanelScrollBar";
// Add scrollbar background sprite component
_trackingsprite = _scrollbar.AddUIComponent<UISlicedSprite>();
_trackingsprite.position = new Vector2(0, 0);
_trackingsprite.autoSize = true;
_trackingsprite.size = _trackingsprite.parent.size;
_trackingsprite.fillDirection = UIFillDirection.Vertical;
_trackingsprite.spriteName = "ScrollbarTrack";
_trackingsprite.name = "ChatLogPanelTrack";
_scrollbar.trackObject = _trackingsprite;
_scrollbar.trackObject.height = _scrollbar.height;
// Add scrollbar thumb component
_trackingthumb = _scrollbar.AddUIComponent<UISlicedSprite>();
_trackingthumb.position = new Vector2(0, 0);
_trackingthumb.fillDirection = UIFillDirection.Vertical;
_trackingthumb.autoSize = true;
_trackingthumb.width = _trackingthumb.parent.width - 8;
_trackingthumb.spriteName = "ScrollbarThumb";
_trackingthumb.name = "ChatLogPanelThumb";
_scrollbar.thumbObject = _trackingthumb;
_scrollbar.isVisible = true;
_scrollbar.isEnabled = true;
_scrollablepanel.verticalScrollbar = _scrollbar;
// Add text field component (used for inputting)
_chatText = (UITextField)AddUIComponent(typeof(UITextField));
_chatText.width = width;
_chatText.height = 30;
_chatText.position = new Vector2(0, -280);
_chatText.atlas = UiHelpers.GetAtlas("Ingame");
_chatText.normalBgSprite = "TextFieldPanelHovered";
_chatText.builtinKeyNavigation = true;
_chatText.isInteractive = true;
_chatText.readOnly = false;
_chatText.horizontalAlignment = UIHorizontalAlignment.Left;
_chatText.eventKeyDown += OnChatKeyDown;
_chatText.textColor = new Color32(0, 0, 0, 255);
_chatText.padding = new RectOffset(6, 6, 6, 6);
_chatText.selectionSprite = "EmptySprite";
_chatText.name = "ChatLogPanelChatText";
// Add chirper input field
_chatTextChirper = (UITextField) ChirpPanel.instance.component.AddUIComponent(typeof(UITextField));
_chatTextChirper.width = 350;
_chatTextChirper.height = 30;
_chatTextChirper.position = new Vector2(15, -155);
_chatTextChirper.atlas = UiHelpers.GetAtlas("Ingame");
_chatTextChirper.normalBgSprite = "TextFieldPanelHovered";
_chatTextChirper.builtinKeyNavigation = true;
_chatTextChirper.isInteractive = true;
_chatTextChirper.readOnly = false;
_chatTextChirper.horizontalAlignment = UIHorizontalAlignment.Left;
_chatTextChirper.eventKeyDown += OnChatKeyDown;
_chatTextChirper.textColor = new Color32(0, 0, 0, 255);
_chatTextChirper.padding = new RectOffset(6, 6, 6, 6);
_chatTextChirper.selectionSprite = "EmptySprite";
_chatTextChirper.name = "ChatLogChirperChatText";
if (UseChirper)
{
_chatTextChirper.isVisible = false;
}
WelcomeChatMessage();
// Add resizable adjustments
eventSizeChanged += (component, param) =>
{
_scrollablepanel.width = (width - 30);
_scrollablepanel.height = (height - 70);
_messageBox.width = (width - 30);
_chatText.width = width;
_scrollbar.height = _scrollablepanel.height;
_trackingsprite.size = _trackingsprite.parent.size;
_chatText.position = new Vector3(0, (-height + 30));
_resize.position = new Vector2((width - 20), (-height + 10));
_scrollbar.position = new Vector2((width - 20), (-30));
};
base.Start();
}
private void OnChatKeyDown(UIComponent component, UIKeyEventParameter eventParam)
{
// Reset chat timeout
_timeoutCounter = 0;
// Run this code when the user presses the enter key
if (eventParam.keycode == KeyCode.Return || eventParam.keycode == KeyCode.KeypadEnter)
{
eventParam.Use();
string text = UseChirper ? _chatTextChirper.text : _chatText.text;
if (string.IsNullOrEmpty(text))
{
isVisible = false;
base.Update();
return;
}
if (UseChirper)
{
_chatTextChirper.text = string.Empty;
_chatTextChirper.Hide();
ReflectionHelper.SetAttr(ChirpPanel.instance, "m_Timeout", 6f);
}
else
{
_chatText.text = string.Empty;
}
SubmitText(text);
}
else if (eventParam.keycode == KeyCode.Escape)
{
eventParam.Use();
if (UseChirper)
{
_chatTextChirper.text = string.Empty;
ChirpPanel.instance.Hide();
_chatTextChirper.Hide();
}
else
{
_chatText.text = string.Empty;
isVisible = false;
}
}
base.Update();
}
private void SubmitText(string text)
{
// If a command, parse it
if (text.StartsWith("/"))
{
ChatCommand command = _chatCommands.Find(x => x.Command == text.TrimStart('/'));
if (command == null)
{
PrintGameMessage(MessageType.Warning, $"'{text.TrimStart('/')}' is not a valid command.");
return;
}
// Run the command
command.Action.Invoke(text.TrimStart('/'));
return;
}
// If not connected to a server / hosting a server, tell the user and return
//if (MultiplayerManager.Instance.CurrentRole == MultiplayerRole.None)
//{
// PrintGameMessage(MessageType.Warning, "You can only use the chat feature when hosting or connected.");
// return;
//}
// Get the player name
string playerName = "Local";
if (MultiplayerManager.Instance.CurrentRole == MultiplayerRole.Client)
{
playerName = MultiplayerManager.Instance.CurrentClient.Config.Username;
}
else if (MultiplayerManager.Instance.CurrentRole == MultiplayerRole.Server)
{
playerName = MultiplayerManager.Instance.CurrentServer.Config.Username;
}
// Build and send this message
ChatMessageCommand message = new ChatMessageCommand
{
Username = playerName,
Message = text
};
Command.SendToAll(message);
// Add the message to the chat UI
PrintChatMessage(playerName, text);
}
public void WelcomeChatMessage()
{
PrintGameMessage("Welcome to Cities: Skylines Multiplayer!");
PrintGameMessage("The chat can be opened by pressing T and closed by pressing escape.");
PrintGameMessage("Join our discord server at: https://discord.gg/RjACPhd");
PrintGameMessage("Type '/help' to see a list of commands and usage.");
PrintGameMessage("Type '/support' to find out where to report bugs and get help.");
}
/// <summary>
/// Prints a game message to the ChatLogPanel and Chirper with MessageType.NORMAL.
/// </summary>
/// <param name="msg">The message.</param>
public static void PrintGameMessage(string msg)
{
PrintGameMessage(MessageType.Normal, msg);
}
/// <summary>
/// Prints a game message to the ChatLogPanel and Chirper.
/// </summary>
/// <param name="type">The message type.</param>
/// <param name="msg">The message.</param>
public static void PrintGameMessage(MessageType type, string msg)
{
PrintMessage("CSM", msg);
}
/// <summary>
/// Prints a chat message to the ChatLogPanel and Chirper.
/// </summary>
/// <param name="username">The name of the sending user.</param>
/// <param name="msg">The message.</param>
public static void PrintChatMessage(string username, string msg)
{
PrintMessage(username, msg);
}
private static void PrintMessage(string sender, string msg)
{
try
{
SimulationManager.instance.m_ThreadingWrapper.QueueMainThread(() =>
{
if (UseChirper)
{
// Write message to Chirper panel
ChirperMessage.ChirpPanel.AddMessage(new ChirperMessage(sender, msg), true);
}
else
{
msg = $"<{sender}> {msg}";
ChatLogPanel chatPanel = UIView.GetAView().FindUIComponent<ChatLogPanel>("ChatLogPanel");
if (chatPanel != null)
{
// Reset the timeout counter when a new message is received
chatPanel._timeoutCounter = 0;
// If the panel is closed, make sure it gets shown
if (!chatPanel.isVisible)
{
chatPanel.isVisible = true;
chatPanel.Update();
}
}
UILabel messageBox = UIView.GetAView().FindUIComponent<UILabel>("ChatLogPanelMessageBox");
if (messageBox != null)
{
// Check if the thumb is at the bottom of the scrollbar for autoscrolling
UIScrollbar scrollBar =
UIView.GetAView().FindUIComponent<UIScrollbar>("ChatLogPanelScrollBar");
UISlicedSprite thumb =
UIView.GetAView().FindUIComponent<UISlicedSprite>("ChatLogPanelThumb");
float size = (thumb.relativePosition.y + thumb.size.y);
bool autoScroll = Math.Abs(size - scrollBar.height) < 0.2f;
messageBox.text += ($"{msg}\n");
if (autoScroll)
{
scrollBar.minValue = scrollBar.maxValue;
}
}
}
});
}
catch (Exception)
{
// IGNORE
}
}
public static void HideChirpText()
{
_chatTextChirper.Hide();
}
}
}
| 39.712855 | 132 | 0.507735 | [
"MIT"
] | 1000-8/CSM | src/Panels/ChatLogPanel.cs | 23,791 | C# |
using System;
using MikhailKhalizev.Processor.x86.BinToCSharp;
namespace MikhailKhalizev.Max.Program
{
public partial class RawProgram
{
[MethodInfo("0x1013_b052-b3634777")]
public void Method_1013_b052()
{
ii(0x1013_b052, 5); push(0x24); /* push 0x24 */
ii(0x1013_b057, 5); call(Definitions.sys_check_available_stack_size, 0x2_acf6);/* call 0x10165d52 */
ii(0x1013_b05c, 1); push(ebx); /* push ebx */
ii(0x1013_b05d, 1); push(ecx); /* push ecx */
ii(0x1013_b05e, 1); push(esi); /* push esi */
ii(0x1013_b05f, 1); push(edi); /* push edi */
ii(0x1013_b060, 1); push(ebp); /* push ebp */
ii(0x1013_b061, 2); mov(ebp, esp); /* mov ebp, esp */
ii(0x1013_b063, 6); sub(esp, 0xc); /* sub esp, 0xc */
ii(0x1013_b069, 3); mov(memd[ss, ebp - 8], eax); /* mov [ebp-0x8], eax */
ii(0x1013_b06c, 3); mov(memd[ss, ebp - 4], edx); /* mov [ebp-0x4], edx */
ii(0x1013_b06f, 3); mov(eax, memd[ss, ebp - 8]); /* mov eax, [ebp-0x8] */
ii(0x1013_b072, 5); mov(memw[ds, eax], 0); /* mov word [eax], 0x0 */
ii(0x1013_b077, 3); mov(eax, memd[ss, ebp - 8]); /* mov eax, [ebp-0x8] */
ii(0x1013_b07a, 6); mov(memw[ds, eax + 4], 0); /* mov word [eax+0x4], 0x0 */
ii(0x1013_b080, 3); mov(eax, memd[ss, ebp - 4]); /* mov eax, [ebp-0x4] */
ii(0x1013_b083, 3); mov(edx, memd[ss, ebp - 8]); /* mov edx, [ebp-0x8] */
ii(0x1013_b086, 4); mov(memw[ds, edx + 2], ax); /* mov [edx+0x2], ax */
ii(0x1013_b08a, 3); mov(eax, memd[ss, ebp - 8]); /* mov eax, [ebp-0x8] */
ii(0x1013_b08d, 7); mov(memd[ds, eax + 6], 0); /* mov dword [eax+0x6], 0x0 */
ii(0x1013_b094, 3); mov(eax, memd[ss, ebp - 8]); /* mov eax, [ebp-0x8] */
ii(0x1013_b097, 3); mov(memd[ss, ebp - 12], eax); /* mov [ebp-0xc], eax */
ii(0x1013_b09a, 3); mov(eax, memd[ss, ebp - 12]); /* mov eax, [ebp-0xc] */
ii(0x1013_b09d, 2); mov(esp, ebp); /* mov esp, ebp */
ii(0x1013_b09f, 1); pop(ebp); /* pop ebp */
ii(0x1013_b0a0, 1); pop(edi); /* pop edi */
ii(0x1013_b0a1, 1); pop(esi); /* pop esi */
ii(0x1013_b0a2, 1); pop(ecx); /* pop ecx */
ii(0x1013_b0a3, 1); pop(ebx); /* pop ebx */
ii(0x1013_b0a4, 1); ret(); /* ret */
}
}
}
| 69.613636 | 114 | 0.411035 | [
"Apache-2.0"
] | mikhail-khalizev/max | source/MikhailKhalizev.Max/source/Program/Auto/z-1013-b052.cs | 3,063 | C# |
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
// **NOTE** This file was generated by a tool and any changes will be overwritten.
// <auto-generated/>
// Template Source: Templates\CSharp\Requests\EntityCollectionResponse.cs.tt
namespace Microsoft.Graph
{
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
/// <summary>
/// The type DeviceAppManagementManagedEBookCategoriesCollectionResponse.
/// </summary>
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
public class DeviceAppManagementManagedEBookCategoriesCollectionResponse
{
/// <summary>
/// Gets or sets the <see cref="IDeviceAppManagementManagedEBookCategoriesCollectionPage"/> value.
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, PropertyName ="value", Required = Newtonsoft.Json.Required.Default)]
public IDeviceAppManagementManagedEBookCategoriesCollectionPage Value { get; set; }
/// <summary>
/// Gets or sets additional data.
/// </summary>
[JsonExtensionData(ReadData = true)]
public IDictionary<string, object> AdditionalData { get; set; }
}
}
| 43.735294 | 153 | 0.64156 | [
"MIT"
] | OfficeGlobal/msgraph-beta-sdk-dotnet | src/Microsoft.Graph/Requests/Generated/DeviceAppManagementManagedEBookCategoriesCollectionResponse.cs | 1,487 | C# |
using Microsoft.EntityFrameworkCore.ChangeTracking;
using SF.Core.Abstraction.Resolvers;
using SF.Entitys.Abstraction;
using System;
namespace SF.Core.Interceptors
{
/// <summary>
/// 对象编辑拦截器,拦截对象BaseEntity,处理创建日期、创建人、更新日期、更新人
/// </summary>
public class AuditableInterceptor : ChangeInterceptor<BaseEntity>
{
private readonly IUserNameResolver _userNameResolver;
public AuditableInterceptor(IUserNameResolver userNameResolver)
{
_userNameResolver = userNameResolver;
}
/// <summary>
/// 新增前
/// </summary>
/// <param name="entry"></param>
/// <param name="item"></param>
public override void OnBeforeInsert(EntityEntry entry, BaseEntity item)
{
base.OnBeforeInsert(entry, item);
var currentTime = DateTimeOffset.Now;
var currentUser = GetCurrentUserName();
item.CreatedOn = item.CreatedOn == default(DateTimeOffset) ? currentTime : item.CreatedOn;
item.CreatedBy = item.CreatedBy ?? currentUser;
item.UpdatedOn = item.UpdatedOn == default(DateTimeOffset) ? currentTime : item.CreatedOn;
item.UpdatedBy = item.UpdatedBy ?? currentUser;
}
/// <summary>
/// 更新前
/// </summary>
/// <param name="entry"></param>
/// <param name="item"></param>
public override void OnBeforeUpdate(EntityEntry entry, BaseEntity item)
{
base.OnBeforeUpdate(entry, item);
var currentTime = DateTimeOffset.Now;
item.UpdatedOn = currentTime;
item.UpdatedBy = GetCurrentUserName();
}
/// <summary>
/// 获取当前用户名
/// </summary>
/// <returns></returns>
private string GetCurrentUserName()
{
var result = _userNameResolver != null ? _userNameResolver.GetCurrentUserName() : "unknown";
return result;
}
}
}
| 33.133333 | 104 | 0.599598 | [
"Apache-2.0"
] | linrb/SF-Boilerplate | SF.Data/Interceptors/AuditableInterceptor.cs | 2,080 | C# |
using System.Collections.Generic;
namespace Orckestra.Composer.Search.ViewModels
{
public class AutoCompleteViewModel
{
public List<ProductSearchViewModel> Suggestions { get; set; }
}
} | 23 | 69 | 0.7343 | [
"MIT"
] | InnaBoitsun/BetterRetailGroceryTest | src/Orckestra.Composer.Search/ViewModels/AutoCompleteViewModel.cs | 209 | C# |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Aws.Msk.Inputs
{
public sealed class ClusterBrokerNodeGroupInfoGetArgs : Pulumi.ResourceArgs
{
/// <summary>
/// The distribution of broker nodes across availability zones ([documentation](https://docs.aws.amazon.com/msk/1.0/apireference/clusters.html#clusters-model-brokerazdistribution)). Currently the only valid value is `DEFAULT`.
/// </summary>
[Input("azDistribution")]
public Input<string>? AzDistribution { get; set; }
[Input("clientSubnets", required: true)]
private InputList<string>? _clientSubnets;
/// <summary>
/// A list of subnets to connect to in client VPC ([documentation](https://docs.aws.amazon.com/msk/1.0/apireference/clusters.html#clusters-prop-brokernodegroupinfo-clientsubnets)).
/// </summary>
public InputList<string> ClientSubnets
{
get => _clientSubnets ?? (_clientSubnets = new InputList<string>());
set => _clientSubnets = value;
}
/// <summary>
/// The size in GiB of the EBS volume for the data drive on each broker node.
/// </summary>
[Input("ebsVolumeSize", required: true)]
public Input<int> EbsVolumeSize { get; set; } = null!;
/// <summary>
/// Specify the instance type to use for the kafka brokers. e.g. kafka.m5.large. ([Pricing info](https://aws.amazon.com/msk/pricing/))
/// </summary>
[Input("instanceType", required: true)]
public Input<string> InstanceType { get; set; } = null!;
[Input("securityGroups", required: true)]
private InputList<string>? _securityGroups;
/// <summary>
/// A list of the security groups to associate with the elastic network interfaces to control who can communicate with the cluster.
/// </summary>
public InputList<string> SecurityGroups
{
get => _securityGroups ?? (_securityGroups = new InputList<string>());
set => _securityGroups = value;
}
public ClusterBrokerNodeGroupInfoGetArgs()
{
}
}
}
| 39.451613 | 234 | 0.63982 | [
"ECL-2.0",
"Apache-2.0"
] | JakeGinnivan/pulumi-aws | sdk/dotnet/Msk/Inputs/ClusterBrokerNodeGroupInfoGetArgs.cs | 2,446 | C# |
using System;
using System.Runtime.InteropServices;
using Urho.Physics;
using Urho.Navigation;
using Urho.Network;
using Urho.Urho2D;
using Urho.Gui;
using Urho.Actions;
using Urho.Audio;
using Urho.Resources;
using Urho.IO;
#pragma warning disable CS0618, CS0649
namespace Urho {
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void ObjectCallbackSignature (IntPtr data, int stringhash, IntPtr variantMap);
}
namespace Urho {
public partial struct SoundFinishedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public SoundSource SoundSource => EventData.get_SoundSource (unchecked((int)2102418282) /* SoundSource (P_SOUNDSOURCE) */);
public Sound Sound => EventData.get_Sound (unchecked((int)1814200719) /* Sound (P_SOUND) */);
} /* struct SoundFinishedEventArgs */
} /* namespace */
namespace Urho {
public partial struct FrameStartedEventArgs {
public EventDataContainer EventData;
public uint FrameNumber => EventData.get_uint (unchecked((int)3175050646) /* FrameNumber (P_FRAMENUMBER) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct FrameStartedEventArgs */
public partial class Time {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.FrameStarted += ...' instead.")]
public Subscription SubscribeToFrameStarted (Action<FrameStartedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new FrameStartedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1999508708) /* BeginFrame (E_BEGINFRAME) */);
return s;
}
static UrhoEventAdapter<FrameStartedEventArgs> eventAdapterForFrameStarted;
public event Action<FrameStartedEventArgs> FrameStarted
{
add
{
if (eventAdapterForFrameStarted == null)
eventAdapterForFrameStarted = new UrhoEventAdapter<FrameStartedEventArgs>(typeof(Time));
eventAdapterForFrameStarted.AddManagedSubscriber(handle, value, SubscribeToFrameStarted);
}
remove { eventAdapterForFrameStarted.RemoveManagedSubscriber(handle, value); }
}
} /* class Time */
} /* namespace */
namespace Urho {
public partial struct UpdateEventArgs {
public EventDataContainer EventData;
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct UpdateEventArgs */
public partial class Engine {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Update += ...' instead.")]
internal Subscription SubscribeToUpdate (Action<UpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1896309193) /* Update (E_UPDATE) */);
return s;
}
static UrhoEventAdapter<UpdateEventArgs> eventAdapterForUpdate;
public event Action<UpdateEventArgs> Update
{
add
{
if (eventAdapterForUpdate == null)
eventAdapterForUpdate = new UrhoEventAdapter<UpdateEventArgs>(typeof(Engine));
eventAdapterForUpdate.AddManagedSubscriber(handle, value, SubscribeToUpdate);
}
remove { eventAdapterForUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Engine */
} /* namespace */
namespace Urho {
public partial struct PostUpdateEventArgs {
public EventDataContainer EventData;
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct PostUpdateEventArgs */
public partial class Engine {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PostUpdate += ...' instead.")]
public Subscription SubscribeToPostUpdate (Action<PostUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PostUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2964611881) /* PostUpdate (E_POSTUPDATE) */);
return s;
}
static UrhoEventAdapter<PostUpdateEventArgs> eventAdapterForPostUpdate;
public event Action<PostUpdateEventArgs> PostUpdate
{
add
{
if (eventAdapterForPostUpdate == null)
eventAdapterForPostUpdate = new UrhoEventAdapter<PostUpdateEventArgs>(typeof(Engine));
eventAdapterForPostUpdate.AddManagedSubscriber(handle, value, SubscribeToPostUpdate);
}
remove { eventAdapterForPostUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Engine */
} /* namespace */
namespace Urho {
public partial struct RenderUpdateEventArgs {
public EventDataContainer EventData;
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct RenderUpdateEventArgs */
public partial class Engine {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.RenderUpdate += ...' instead.")]
public Subscription SubscribeToRenderUpdate (Action<RenderUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new RenderUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2090105887) /* RenderUpdate (E_RENDERUPDATE) */);
return s;
}
static UrhoEventAdapter<RenderUpdateEventArgs> eventAdapterForRenderUpdate;
public event Action<RenderUpdateEventArgs> RenderUpdate
{
add
{
if (eventAdapterForRenderUpdate == null)
eventAdapterForRenderUpdate = new UrhoEventAdapter<RenderUpdateEventArgs>(typeof(Engine));
eventAdapterForRenderUpdate.AddManagedSubscriber(handle, value, SubscribeToRenderUpdate);
}
remove { eventAdapterForRenderUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Engine */
} /* namespace */
namespace Urho {
public partial struct PostRenderUpdateEventArgs {
public EventDataContainer EventData;
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct PostRenderUpdateEventArgs */
public partial class Engine {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PostRenderUpdate += ...' instead.")]
public Subscription SubscribeToPostRenderUpdate (Action<PostRenderUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PostRenderUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3821628799) /* PostRenderUpdate (E_POSTRENDERUPDATE) */);
return s;
}
static UrhoEventAdapter<PostRenderUpdateEventArgs> eventAdapterForPostRenderUpdate;
public event Action<PostRenderUpdateEventArgs> PostRenderUpdate
{
add
{
if (eventAdapterForPostRenderUpdate == null)
eventAdapterForPostRenderUpdate = new UrhoEventAdapter<PostRenderUpdateEventArgs>(typeof(Engine));
eventAdapterForPostRenderUpdate.AddManagedSubscriber(handle, value, SubscribeToPostRenderUpdate);
}
remove { eventAdapterForPostRenderUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Engine */
} /* namespace */
namespace Urho {
public partial struct FrameEndedEventArgs {
public EventDataContainer EventData;
} /* struct FrameEndedEventArgs */
public partial class Time {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.FrameEnded += ...' instead.")]
public Subscription SubscribeToFrameEnded (Action<FrameEndedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new FrameEndedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)510216946) /* EndFrame (E_ENDFRAME) */);
return s;
}
static UrhoEventAdapter<FrameEndedEventArgs> eventAdapterForFrameEnded;
public event Action<FrameEndedEventArgs> FrameEnded
{
add
{
if (eventAdapterForFrameEnded == null)
eventAdapterForFrameEnded = new UrhoEventAdapter<FrameEndedEventArgs>(typeof(Time));
eventAdapterForFrameEnded.AddManagedSubscriber(handle, value, SubscribeToFrameEnded);
}
remove { eventAdapterForFrameEnded.RemoveManagedSubscriber(handle, value); }
}
} /* class Time */
} /* namespace */
namespace Urho {
public partial struct CheckForInputEventArgs {
public EventDataContainer EventData;
} /* struct CheckForInputEventArgs */
} /* namespace */
namespace Urho {
public partial struct WorkItemCompletedEventArgs {
public EventDataContainer EventData;
public WorkItem Item => EventData.get_WorkItem (unchecked((int)2113250867) /* Item (P_ITEM) */);
} /* struct WorkItemCompletedEventArgs */
public partial class WorkQueue {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.WorkItemCompleted += ...' instead.")]
public Subscription SubscribeToWorkItemCompleted (Action<WorkItemCompletedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new WorkItemCompletedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2125652359) /* WorkItemCompleted (E_WORKITEMCOMPLETED) */);
return s;
}
static UrhoEventAdapter<WorkItemCompletedEventArgs> eventAdapterForWorkItemCompleted;
public event Action<WorkItemCompletedEventArgs> WorkItemCompleted
{
add
{
if (eventAdapterForWorkItemCompleted == null)
eventAdapterForWorkItemCompleted = new UrhoEventAdapter<WorkItemCompletedEventArgs>(typeof(WorkQueue));
eventAdapterForWorkItemCompleted.AddManagedSubscriber(handle, value, SubscribeToWorkItemCompleted);
}
remove { eventAdapterForWorkItemCompleted.RemoveManagedSubscriber(handle, value); }
}
} /* class WorkQueue */
} /* namespace */
namespace Urho {
public partial struct ConsoleCommandEventArgs {
public EventDataContainer EventData;
public String Command => EventData.get_String (unchecked((int)2511857195) /* Command (P_COMMAND) */);
public String Id => EventData.get_String (unchecked((int)4788827) /* Id (P_ID) */);
} /* struct ConsoleCommandEventArgs */
public partial class UrhoConsole {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ConsoleCommand += ...' instead.")]
public Subscription SubscribeToConsoleCommand (Action<ConsoleCommandEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ConsoleCommandEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1043895348) /* ConsoleCommand (E_CONSOLECOMMAND) */);
return s;
}
static UrhoEventAdapter<ConsoleCommandEventArgs> eventAdapterForConsoleCommand;
public event Action<ConsoleCommandEventArgs> ConsoleCommand
{
add
{
if (eventAdapterForConsoleCommand == null)
eventAdapterForConsoleCommand = new UrhoEventAdapter<ConsoleCommandEventArgs>(typeof(UrhoConsole));
eventAdapterForConsoleCommand.AddManagedSubscriber(handle, value, SubscribeToConsoleCommand);
}
remove { eventAdapterForConsoleCommand.RemoveManagedSubscriber(handle, value); }
}
} /* class UrhoConsole */
} /* namespace */
namespace Urho {
public partial struct BoneHierarchyCreatedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
} /* struct BoneHierarchyCreatedEventArgs */
public partial class Node {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.BoneHierarchyCreated += ...' instead.")]
public Subscription SubscribeToBoneHierarchyCreated (Action<BoneHierarchyCreatedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new BoneHierarchyCreatedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)928584631) /* BoneHierarchyCreated (E_BONEHIERARCHYCREATED) */);
return s;
}
static UrhoEventAdapter<BoneHierarchyCreatedEventArgs> eventAdapterForBoneHierarchyCreated;
public event Action<BoneHierarchyCreatedEventArgs> BoneHierarchyCreated
{
add
{
if (eventAdapterForBoneHierarchyCreated == null)
eventAdapterForBoneHierarchyCreated = new UrhoEventAdapter<BoneHierarchyCreatedEventArgs>(typeof(Node));
eventAdapterForBoneHierarchyCreated.AddManagedSubscriber(handle, value, SubscribeToBoneHierarchyCreated);
}
remove { eventAdapterForBoneHierarchyCreated.RemoveManagedSubscriber(handle, value); }
}
} /* class Node */
} /* namespace */
namespace Urho {
public partial struct AnimationTriggerEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Animation Animation => EventData.get_Animation (unchecked((int)4184794788) /* Animation (P_ANIMATION) */);
public String Name => EventData.get_String (unchecked((int)1564775755) /* Name (P_NAME) */);
public float Time => EventData.get_float (unchecked((int)2019423693) /* Time (P_TIME) */);
public IntPtr Data => EventData.get_IntPtr (unchecked((int)2349297546) /* Data (P_DATA) */);
} /* struct AnimationTriggerEventArgs */
public partial class Node {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AnimationTrigger += ...' instead.")]
public Subscription SubscribeToAnimationTrigger (Action<AnimationTriggerEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AnimationTriggerEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1900106548) /* AnimationTrigger (E_ANIMATIONTRIGGER) */);
return s;
}
static UrhoEventAdapter<AnimationTriggerEventArgs> eventAdapterForAnimationTrigger;
public event Action<AnimationTriggerEventArgs> AnimationTrigger
{
add
{
if (eventAdapterForAnimationTrigger == null)
eventAdapterForAnimationTrigger = new UrhoEventAdapter<AnimationTriggerEventArgs>(typeof(Node));
eventAdapterForAnimationTrigger.AddManagedSubscriber(handle, value, SubscribeToAnimationTrigger);
}
remove { eventAdapterForAnimationTrigger.RemoveManagedSubscriber(handle, value); }
}
} /* class Node */
} /* namespace */
namespace Urho {
public partial struct AnimationFinishedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Animation Animation => EventData.get_Animation (unchecked((int)4184794788) /* Animation (P_ANIMATION) */);
public String Name => EventData.get_String (unchecked((int)1564775755) /* Name (P_NAME) */);
public bool Looped => EventData.get_bool (unchecked((int)1823110307) /* Looped (P_LOOPED) */);
} /* struct AnimationFinishedEventArgs */
} /* namespace */
namespace Urho {
public partial struct ParticleEffectFinishedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public ParticleEffect Effect => EventData.get_ParticleEffect (unchecked((int)3321525041) /* Effect (P_EFFECT) */);
} /* struct ParticleEffectFinishedEventArgs */
} /* namespace */
namespace Urho {
public partial struct TerrainCreatedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
} /* struct TerrainCreatedEventArgs */
public partial class Terrain {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TerrainCreated += ...' instead.")]
public Subscription SubscribeToTerrainCreated (Action<TerrainCreatedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TerrainCreatedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)922039347) /* TerrainCreated (E_TERRAINCREATED) */);
return s;
}
static UrhoEventAdapter<TerrainCreatedEventArgs> eventAdapterForTerrainCreated;
public event Action<TerrainCreatedEventArgs> TerrainCreated
{
add
{
if (eventAdapterForTerrainCreated == null)
eventAdapterForTerrainCreated = new UrhoEventAdapter<TerrainCreatedEventArgs>(typeof(Terrain));
eventAdapterForTerrainCreated.AddManagedSubscriber(handle, value, SubscribeToTerrainCreated);
}
remove { eventAdapterForTerrainCreated.RemoveManagedSubscriber(handle, value); }
}
} /* class Terrain */
} /* namespace */
namespace Urho {
public partial struct ScreenModeEventArgs {
public EventDataContainer EventData;
public int Width => EventData.get_int (unchecked((int)1548882694) /* Width (P_WIDTH) */);
public int Height => EventData.get_int (unchecked((int)1361627751) /* Height (P_HEIGHT) */);
public bool Fullscreen => EventData.get_bool (unchecked((int)1116940187) /* Fullscreen (P_FULLSCREEN) */);
public bool Borderless => EventData.get_bool (unchecked((int)1493286821) /* Borderless (P_BORDERLESS) */);
public bool Resizable => EventData.get_bool (unchecked((int)1914662059) /* Resizable (P_RESIZABLE) */);
public bool HighDPI => EventData.get_bool (unchecked((int)2968662107) /* HighDPI (P_HIGHDPI) */);
public int Monitor => EventData.get_int (unchecked((int)2257746458) /* Monitor (P_MONITOR) */);
public int RefreshRate => EventData.get_int (unchecked((int)2996603963) /* RefreshRate (P_REFRESHRATE) */);
} /* struct ScreenModeEventArgs */
} /* namespace */
namespace Urho {
public partial struct WindowPosEventArgs {
public EventDataContainer EventData;
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
} /* struct WindowPosEventArgs */
} /* namespace */
namespace Urho {
public partial struct RenderSurfaceUpdateEventArgs {
public EventDataContainer EventData;
} /* struct RenderSurfaceUpdateEventArgs */
public partial class Renderer {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.RenderSurfaceUpdate += ...' instead.")]
public Subscription SubscribeToRenderSurfaceUpdate (Action<RenderSurfaceUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new RenderSurfaceUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1377481536) /* RenderSurfaceUpdate (E_RENDERSURFACEUPDATE) */);
return s;
}
static UrhoEventAdapter<RenderSurfaceUpdateEventArgs> eventAdapterForRenderSurfaceUpdate;
public event Action<RenderSurfaceUpdateEventArgs> RenderSurfaceUpdate
{
add
{
if (eventAdapterForRenderSurfaceUpdate == null)
eventAdapterForRenderSurfaceUpdate = new UrhoEventAdapter<RenderSurfaceUpdateEventArgs>(typeof(Renderer));
eventAdapterForRenderSurfaceUpdate.AddManagedSubscriber(handle, value, SubscribeToRenderSurfaceUpdate);
}
remove { eventAdapterForRenderSurfaceUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Renderer */
} /* namespace */
namespace Urho {
public partial struct BeginRenderingEventArgs {
public EventDataContainer EventData;
} /* struct BeginRenderingEventArgs */
} /* namespace */
namespace Urho {
public partial struct EndRenderingEventArgs {
public EventDataContainer EventData;
} /* struct EndRenderingEventArgs */
} /* namespace */
namespace Urho {
public partial struct BeginViewUpdateEventArgs {
public EventDataContainer EventData;
public View View => EventData.get_View (unchecked((int)3580073317) /* View (P_VIEW) */);
public Texture Texture => EventData.get_Texture (unchecked((int)730526107) /* Texture (P_TEXTURE) */);
public RenderSurface Surface => EventData.get_RenderSurface (unchecked((int)2337552589) /* Surface (P_SURFACE) */);
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Camera Camera => EventData.get_Camera (unchecked((int)2344783493) /* Camera (P_CAMERA) */);
} /* struct BeginViewUpdateEventArgs */
public partial class View {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.BeginViewUpdate += ...' instead.")]
public Subscription SubscribeToBeginViewUpdate (Action<BeginViewUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new BeginViewUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1047468535) /* BeginViewUpdate (E_BEGINVIEWUPDATE) */);
return s;
}
static UrhoEventAdapter<BeginViewUpdateEventArgs> eventAdapterForBeginViewUpdate;
public event Action<BeginViewUpdateEventArgs> BeginViewUpdate
{
add
{
if (eventAdapterForBeginViewUpdate == null)
eventAdapterForBeginViewUpdate = new UrhoEventAdapter<BeginViewUpdateEventArgs>(typeof(View));
eventAdapterForBeginViewUpdate.AddManagedSubscriber(handle, value, SubscribeToBeginViewUpdate);
}
remove { eventAdapterForBeginViewUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class View */
} /* namespace */
namespace Urho {
public partial struct EndViewUpdateEventArgs {
public EventDataContainer EventData;
public View View => EventData.get_View (unchecked((int)3580073317) /* View (P_VIEW) */);
public Texture Texture => EventData.get_Texture (unchecked((int)730526107) /* Texture (P_TEXTURE) */);
public RenderSurface Surface => EventData.get_RenderSurface (unchecked((int)2337552589) /* Surface (P_SURFACE) */);
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Camera Camera => EventData.get_Camera (unchecked((int)2344783493) /* Camera (P_CAMERA) */);
} /* struct EndViewUpdateEventArgs */
public partial class View {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.EndViewUpdate += ...' instead.")]
public Subscription SubscribeToEndViewUpdate (Action<EndViewUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new EndViewUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1407497577) /* EndViewUpdate (E_ENDVIEWUPDATE) */);
return s;
}
static UrhoEventAdapter<EndViewUpdateEventArgs> eventAdapterForEndViewUpdate;
public event Action<EndViewUpdateEventArgs> EndViewUpdate
{
add
{
if (eventAdapterForEndViewUpdate == null)
eventAdapterForEndViewUpdate = new UrhoEventAdapter<EndViewUpdateEventArgs>(typeof(View));
eventAdapterForEndViewUpdate.AddManagedSubscriber(handle, value, SubscribeToEndViewUpdate);
}
remove { eventAdapterForEndViewUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class View */
} /* namespace */
namespace Urho {
public partial struct BeginViewRenderEventArgs {
public EventDataContainer EventData;
public View View => EventData.get_View (unchecked((int)3580073317) /* View (P_VIEW) */);
public Texture Texture => EventData.get_Texture (unchecked((int)730526107) /* Texture (P_TEXTURE) */);
public RenderSurface Surface => EventData.get_RenderSurface (unchecked((int)2337552589) /* Surface (P_SURFACE) */);
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Camera Camera => EventData.get_Camera (unchecked((int)2344783493) /* Camera (P_CAMERA) */);
} /* struct BeginViewRenderEventArgs */
public partial class Renderer {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.BeginViewRender += ...' instead.")]
public Subscription SubscribeToBeginViewRender (Action<BeginViewRenderEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new BeginViewRenderEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3815846788) /* BeginViewRender (E_BEGINVIEWRENDER) */);
return s;
}
static UrhoEventAdapter<BeginViewRenderEventArgs> eventAdapterForBeginViewRender;
public event Action<BeginViewRenderEventArgs> BeginViewRender
{
add
{
if (eventAdapterForBeginViewRender == null)
eventAdapterForBeginViewRender = new UrhoEventAdapter<BeginViewRenderEventArgs>(typeof(Renderer));
eventAdapterForBeginViewRender.AddManagedSubscriber(handle, value, SubscribeToBeginViewRender);
}
remove { eventAdapterForBeginViewRender.RemoveManagedSubscriber(handle, value); }
}
} /* class Renderer */
} /* namespace */
namespace Urho {
public partial struct ViewBuffersReadyEventArgs {
public EventDataContainer EventData;
public View View => EventData.get_View (unchecked((int)3580073317) /* View (P_VIEW) */);
public Texture Texture => EventData.get_Texture (unchecked((int)730526107) /* Texture (P_TEXTURE) */);
public RenderSurface Surface => EventData.get_RenderSurface (unchecked((int)2337552589) /* Surface (P_SURFACE) */);
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Camera Camera => EventData.get_Camera (unchecked((int)2344783493) /* Camera (P_CAMERA) */);
} /* struct ViewBuffersReadyEventArgs */
} /* namespace */
namespace Urho {
public partial struct ViewGlobalShaderParametersEventArgs {
public EventDataContainer EventData;
public View View => EventData.get_View (unchecked((int)3580073317) /* View (P_VIEW) */);
public Texture Texture => EventData.get_Texture (unchecked((int)730526107) /* Texture (P_TEXTURE) */);
public RenderSurface Surface => EventData.get_RenderSurface (unchecked((int)2337552589) /* Surface (P_SURFACE) */);
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Camera Camera => EventData.get_Camera (unchecked((int)2344783493) /* Camera (P_CAMERA) */);
} /* struct ViewGlobalShaderParametersEventArgs */
} /* namespace */
namespace Urho {
public partial struct EndViewRenderEventArgs {
public EventDataContainer EventData;
public View View => EventData.get_View (unchecked((int)3580073317) /* View (P_VIEW) */);
public Texture Texture => EventData.get_Texture (unchecked((int)730526107) /* Texture (P_TEXTURE) */);
public RenderSurface Surface => EventData.get_RenderSurface (unchecked((int)2337552589) /* Surface (P_SURFACE) */);
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Camera Camera => EventData.get_Camera (unchecked((int)2344783493) /* Camera (P_CAMERA) */);
} /* struct EndViewRenderEventArgs */
public partial class Renderer {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.EndViewRender += ...' instead.")]
public Subscription SubscribeToEndViewRender (Action<EndViewRenderEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new EndViewRenderEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4175875830) /* EndViewRender (E_ENDVIEWRENDER) */);
return s;
}
static UrhoEventAdapter<EndViewRenderEventArgs> eventAdapterForEndViewRender;
public event Action<EndViewRenderEventArgs> EndViewRender
{
add
{
if (eventAdapterForEndViewRender == null)
eventAdapterForEndViewRender = new UrhoEventAdapter<EndViewRenderEventArgs>(typeof(Renderer));
eventAdapterForEndViewRender.AddManagedSubscriber(handle, value, SubscribeToEndViewRender);
}
remove { eventAdapterForEndViewRender.RemoveManagedSubscriber(handle, value); }
}
} /* class Renderer */
} /* namespace */
namespace Urho {
public partial struct EndAllViewsRenderEventArgs {
public EventDataContainer EventData;
} /* struct EndAllViewsRenderEventArgs */
} /* namespace */
namespace Urho {
public partial struct RenderPathEventEventArgs {
public EventDataContainer EventData;
public String Name => EventData.get_String (unchecked((int)1564775755) /* Name (P_NAME) */);
} /* struct RenderPathEventEventArgs */
} /* namespace */
namespace Urho {
public partial struct DeviceLostEventArgs {
public EventDataContainer EventData;
} /* struct DeviceLostEventArgs */
} /* namespace */
namespace Urho {
public partial struct DeviceResetEventArgs {
public EventDataContainer EventData;
} /* struct DeviceResetEventArgs */
} /* namespace */
namespace Urho {
public partial struct IKEffectorTargetChangedEventArgs {
public EventDataContainer EventData;
public Node EffectorNode => EventData.get_Node(unchecked((int)3069607574) /* EffectorNode (P_EFFECTORNODE) */);
// TODO: perl has mangled it here - lost the P_TARGETNODE decl?
//public Node => EventData.get_Node(unchecked((int)0) /* () */);
} /* struct IKEffectorTargetChangedEventArgs */
} /* namespace */
namespace Urho.IO {
public partial struct LogMessageEventArgs {
public EventDataContainer EventData;
public String Message => EventData.get_String (unchecked((int)3293939591) /* Message (P_MESSAGE) */);
public int Level => EventData.get_int (unchecked((int)3218919012) /* Level (P_LEVEL) */);
} /* struct LogMessageEventArgs */
public partial class Log {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.LogMessage += ...' instead.")]
public Subscription SubscribeToLogMessage (Action<LogMessageEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new LogMessageEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2388596867) /* LogMessage (E_LOGMESSAGE) */);
return s;
}
static UrhoEventAdapter<LogMessageEventArgs> eventAdapterForLogMessage;
public event Action<LogMessageEventArgs> LogMessage
{
add
{
if (eventAdapterForLogMessage == null)
eventAdapterForLogMessage = new UrhoEventAdapter<LogMessageEventArgs>(typeof(Log));
eventAdapterForLogMessage.AddManagedSubscriber(handle, value, SubscribeToLogMessage);
}
remove { eventAdapterForLogMessage.RemoveManagedSubscriber(handle, value); }
}
} /* class Log */
} /* namespace */
namespace Urho.IO {
public partial struct AsyncExecFinishedEventArgs {
public EventDataContainer EventData;
public uint RequestID => EventData.get_uint (unchecked((int)2343505738) /* RequestID (P_REQUESTID) */);
public int ExitCode => EventData.get_int (unchecked((int)2609453099) /* ExitCode (P_EXITCODE) */);
} /* struct AsyncExecFinishedEventArgs */
public partial class FileSystem {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AsyncExecFinished += ...' instead.")]
public Subscription SubscribeToAsyncExecFinished (Action<AsyncExecFinishedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AsyncExecFinishedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1575598271) /* AsyncExecFinished (E_ASYNCEXECFINISHED) */);
return s;
}
static UrhoEventAdapter<AsyncExecFinishedEventArgs> eventAdapterForAsyncExecFinished;
public event Action<AsyncExecFinishedEventArgs> AsyncExecFinished
{
add
{
if (eventAdapterForAsyncExecFinished == null)
eventAdapterForAsyncExecFinished = new UrhoEventAdapter<AsyncExecFinishedEventArgs>(typeof(FileSystem));
eventAdapterForAsyncExecFinished.AddManagedSubscriber(handle, value, SubscribeToAsyncExecFinished);
}
remove { eventAdapterForAsyncExecFinished.RemoveManagedSubscriber(handle, value); }
}
} /* class FileSystem */
} /* namespace */
namespace Urho {
public partial struct MouseButtonDownEventArgs {
public EventDataContainer EventData;
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct MouseButtonDownEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MouseButtonDown += ...' instead.")]
public Subscription SubscribeToMouseButtonDown (Action<MouseButtonDownEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MouseButtonDownEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1272461849) /* MouseButtonDown (E_MOUSEBUTTONDOWN) */);
return s;
}
static UrhoEventAdapter<MouseButtonDownEventArgs> eventAdapterForMouseButtonDown;
public event Action<MouseButtonDownEventArgs> MouseButtonDown
{
add
{
if (eventAdapterForMouseButtonDown == null)
eventAdapterForMouseButtonDown = new UrhoEventAdapter<MouseButtonDownEventArgs>(typeof(Input));
eventAdapterForMouseButtonDown.AddManagedSubscriber(handle, value, SubscribeToMouseButtonDown);
}
remove { eventAdapterForMouseButtonDown.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct MouseButtonUpEventArgs {
public EventDataContainer EventData;
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct MouseButtonUpEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MouseButtonUp += ...' instead.")]
public Subscription SubscribeToMouseButtonUp (Action<MouseButtonUpEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MouseButtonUpEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)758559122) /* MouseButtonUp (E_MOUSEBUTTONUP) */);
return s;
}
static UrhoEventAdapter<MouseButtonUpEventArgs> eventAdapterForMouseButtonUp;
public event Action<MouseButtonUpEventArgs> MouseButtonUp
{
add
{
if (eventAdapterForMouseButtonUp == null)
eventAdapterForMouseButtonUp = new UrhoEventAdapter<MouseButtonUpEventArgs>(typeof(Input));
eventAdapterForMouseButtonUp.AddManagedSubscriber(handle, value, SubscribeToMouseButtonUp);
}
remove { eventAdapterForMouseButtonUp.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct MouseMovedEventArgs {
public EventDataContainer EventData;
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int DX => EventData.get_int (unchecked((int)4460820) /* DX (P_DX) */);
public int DY => EventData.get_int (unchecked((int)4460821) /* DY (P_DY) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct MouseMovedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MouseMoved += ...' instead.")]
public Subscription SubscribeToMouseMoved (Action<MouseMovedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MouseMovedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)216400790) /* MouseMove (E_MOUSEMOVE) */);
return s;
}
static UrhoEventAdapter<MouseMovedEventArgs> eventAdapterForMouseMoved;
public event Action<MouseMovedEventArgs> MouseMoved
{
add
{
if (eventAdapterForMouseMoved == null)
eventAdapterForMouseMoved = new UrhoEventAdapter<MouseMovedEventArgs>(typeof(Input));
eventAdapterForMouseMoved.AddManagedSubscriber(handle, value, SubscribeToMouseMoved);
}
remove { eventAdapterForMouseMoved.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct MouseWheelEventArgs {
public EventDataContainer EventData;
public int Wheel => EventData.get_int (unchecked((int)775573019) /* Wheel (P_WHEEL) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct MouseWheelEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MouseWheel += ...' instead.")]
public Subscription SubscribeToMouseWheel (Action<MouseWheelEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MouseWheelEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2304629654) /* MouseWheel (E_MOUSEWHEEL) */);
return s;
}
static UrhoEventAdapter<MouseWheelEventArgs> eventAdapterForMouseWheel;
public event Action<MouseWheelEventArgs> MouseWheel
{
add
{
if (eventAdapterForMouseWheel == null)
eventAdapterForMouseWheel = new UrhoEventAdapter<MouseWheelEventArgs>(typeof(Input));
eventAdapterForMouseWheel.AddManagedSubscriber(handle, value, SubscribeToMouseWheel);
}
remove { eventAdapterForMouseWheel.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct KeyDownEventArgs {
public EventDataContainer EventData;
public Key Key =>(Key) EventData.get_int (unchecked((int)626238495) /* Key (P_KEY) */);
public int Scancode => EventData.get_int (unchecked((int)2095584234) /* Scancode (P_SCANCODE) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
public bool Repeat => EventData.get_bool (unchecked((int)1938893659) /* Repeat (P_REPEAT) */);
} /* struct KeyDownEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.KeyDown += ...' instead.")]
public Subscription SubscribeToKeyDown (Action<KeyDownEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new KeyDownEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)733900417) /* KeyDown (E_KEYDOWN) */);
return s;
}
static UrhoEventAdapter<KeyDownEventArgs> eventAdapterForKeyDown;
public event Action<KeyDownEventArgs> KeyDown
{
add
{
if (eventAdapterForKeyDown == null)
eventAdapterForKeyDown = new UrhoEventAdapter<KeyDownEventArgs>(typeof(Input));
eventAdapterForKeyDown.AddManagedSubscriber(handle, value, SubscribeToKeyDown);
}
remove { eventAdapterForKeyDown.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct KeyUpEventArgs {
public EventDataContainer EventData;
public Key Key =>(Key) EventData.get_int (unchecked((int)626238495) /* Key (P_KEY) */);
public int Scancode => EventData.get_int (unchecked((int)2095584234) /* Scancode (P_SCANCODE) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct KeyUpEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.KeyUp += ...' instead.")]
public Subscription SubscribeToKeyUp (Action<KeyUpEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new KeyUpEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2103089658) /* KeyUp (E_KEYUP) */);
return s;
}
static UrhoEventAdapter<KeyUpEventArgs> eventAdapterForKeyUp;
public event Action<KeyUpEventArgs> KeyUp
{
add
{
if (eventAdapterForKeyUp == null)
eventAdapterForKeyUp = new UrhoEventAdapter<KeyUpEventArgs>(typeof(Input));
eventAdapterForKeyUp.AddManagedSubscriber(handle, value, SubscribeToKeyUp);
}
remove { eventAdapterForKeyUp.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct TextInputEventArgs {
public EventDataContainer EventData;
public String Text => EventData.get_String (unchecked((int)1987099277) /* Text (P_TEXT) */);
} /* struct TextInputEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TextInput += ...' instead.")]
public Subscription SubscribeToTextInput (Action<TextInputEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TextInputEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2660893885) /* TextInput (E_TEXTINPUT) */);
return s;
}
static UrhoEventAdapter<TextInputEventArgs> eventAdapterForTextInput;
public event Action<TextInputEventArgs> TextInput
{
add
{
if (eventAdapterForTextInput == null)
eventAdapterForTextInput = new UrhoEventAdapter<TextInputEventArgs>(typeof(Input));
eventAdapterForTextInput.AddManagedSubscriber(handle, value, SubscribeToTextInput);
}
remove { eventAdapterForTextInput.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct TextEditingEventArgs {
public EventDataContainer EventData;
public String Composition => EventData.get_String (unchecked((int)4027173610) /* Composition (P_COMPOSITION) */);
public int Cursor => EventData.get_int (unchecked((int)3384665782) /* Cursor (P_CURSOR) */);
public int SelectionLength => EventData.get_int (unchecked((int)3191166610) /* SelectionLength (P_SELECTION_LENGTH) */);
} /* struct TextEditingEventArgs */
} /* namespace */
namespace Urho {
public partial struct JoystickConnectedEventArgs {
public EventDataContainer EventData;
public int JoystickID => EventData.get_int (unchecked((int)789511895) /* JoystickID (P_JOYSTICKID) */);
} /* struct JoystickConnectedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.JoystickConnected += ...' instead.")]
public Subscription SubscribeToJoystickConnected (Action<JoystickConnectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new JoystickConnectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1316276717) /* JoystickConnected (E_JOYSTICKCONNECTED) */);
return s;
}
static UrhoEventAdapter<JoystickConnectedEventArgs> eventAdapterForJoystickConnected;
public event Action<JoystickConnectedEventArgs> JoystickConnected
{
add
{
if (eventAdapterForJoystickConnected == null)
eventAdapterForJoystickConnected = new UrhoEventAdapter<JoystickConnectedEventArgs>(typeof(Input));
eventAdapterForJoystickConnected.AddManagedSubscriber(handle, value, SubscribeToJoystickConnected);
}
remove { eventAdapterForJoystickConnected.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct JoystickDisconnectedEventArgs {
public EventDataContainer EventData;
public int JoystickID => EventData.get_int (unchecked((int)789511895) /* JoystickID (P_JOYSTICKID) */);
} /* struct JoystickDisconnectedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.JoystickDisconnected += ...' instead.")]
public Subscription SubscribeToJoystickDisconnected (Action<JoystickDisconnectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new JoystickDisconnectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3621442359) /* JoystickDisconnected (E_JOYSTICKDISCONNECTED) */);
return s;
}
static UrhoEventAdapter<JoystickDisconnectedEventArgs> eventAdapterForJoystickDisconnected;
public event Action<JoystickDisconnectedEventArgs> JoystickDisconnected
{
add
{
if (eventAdapterForJoystickDisconnected == null)
eventAdapterForJoystickDisconnected = new UrhoEventAdapter<JoystickDisconnectedEventArgs>(typeof(Input));
eventAdapterForJoystickDisconnected.AddManagedSubscriber(handle, value, SubscribeToJoystickDisconnected);
}
remove { eventAdapterForJoystickDisconnected.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct JoystickButtonDownEventArgs {
public EventDataContainer EventData;
public int JoystickID => EventData.get_int (unchecked((int)789511895) /* JoystickID (P_JOYSTICKID) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
} /* struct JoystickButtonDownEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.JoystickButtonDown += ...' instead.")]
public Subscription SubscribeToJoystickButtonDown (Action<JoystickButtonDownEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new JoystickButtonDownEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1173783152) /* JoystickButtonDown (E_JOYSTICKBUTTONDOWN) */);
return s;
}
static UrhoEventAdapter<JoystickButtonDownEventArgs> eventAdapterForJoystickButtonDown;
public event Action<JoystickButtonDownEventArgs> JoystickButtonDown
{
add
{
if (eventAdapterForJoystickButtonDown == null)
eventAdapterForJoystickButtonDown = new UrhoEventAdapter<JoystickButtonDownEventArgs>(typeof(Input));
eventAdapterForJoystickButtonDown.AddManagedSubscriber(handle, value, SubscribeToJoystickButtonDown);
}
remove { eventAdapterForJoystickButtonDown.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct JoystickButtonUpEventArgs {
public EventDataContainer EventData;
public int JoystickID => EventData.get_int (unchecked((int)789511895) /* JoystickID (P_JOYSTICKID) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
} /* struct JoystickButtonUpEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.JoystickButtonUp += ...' instead.")]
public Subscription SubscribeToJoystickButtonUp (Action<JoystickButtonUpEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new JoystickButtonUpEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4020729193) /* JoystickButtonUp (E_JOYSTICKBUTTONUP) */);
return s;
}
static UrhoEventAdapter<JoystickButtonUpEventArgs> eventAdapterForJoystickButtonUp;
public event Action<JoystickButtonUpEventArgs> JoystickButtonUp
{
add
{
if (eventAdapterForJoystickButtonUp == null)
eventAdapterForJoystickButtonUp = new UrhoEventAdapter<JoystickButtonUpEventArgs>(typeof(Input));
eventAdapterForJoystickButtonUp.AddManagedSubscriber(handle, value, SubscribeToJoystickButtonUp);
}
remove { eventAdapterForJoystickButtonUp.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct JoystickAxisMoveEventArgs {
public EventDataContainer EventData;
public int JoystickID => EventData.get_int (unchecked((int)789511895) /* JoystickID (P_JOYSTICKID) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_AXIS) */);
public float Position => EventData.get_float (unchecked((int)3980503689) /* Position (P_POSITION) */);
} /* struct JoystickAxisMoveEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.JoystickAxisMove += ...' instead.")]
public Subscription SubscribeToJoystickAxisMove (Action<JoystickAxisMoveEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new JoystickAxisMoveEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1777950894) /* JoystickAxisMove (E_JOYSTICKAXISMOVE) */);
return s;
}
static UrhoEventAdapter<JoystickAxisMoveEventArgs> eventAdapterForJoystickAxisMove;
public event Action<JoystickAxisMoveEventArgs> JoystickAxisMove
{
add
{
if (eventAdapterForJoystickAxisMove == null)
eventAdapterForJoystickAxisMove = new UrhoEventAdapter<JoystickAxisMoveEventArgs>(typeof(Input));
eventAdapterForJoystickAxisMove.AddManagedSubscriber(handle, value, SubscribeToJoystickAxisMove);
}
remove { eventAdapterForJoystickAxisMove.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct JoystickHatMoveEventArgs {
public EventDataContainer EventData;
public int JoystickID => EventData.get_int (unchecked((int)789511895) /* JoystickID (P_JOYSTICKID) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_HAT) */);
public int Position => EventData.get_int (unchecked((int)3980503689) /* Position (P_POSITION) */);
} /* struct JoystickHatMoveEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.JoystickHatMove += ...' instead.")]
public Subscription SubscribeToJoystickHatMove (Action<JoystickHatMoveEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new JoystickHatMoveEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)869724112) /* JoystickHatMove (E_JOYSTICKHATMOVE) */);
return s;
}
static UrhoEventAdapter<JoystickHatMoveEventArgs> eventAdapterForJoystickHatMove;
public event Action<JoystickHatMoveEventArgs> JoystickHatMove
{
add
{
if (eventAdapterForJoystickHatMove == null)
eventAdapterForJoystickHatMove = new UrhoEventAdapter<JoystickHatMoveEventArgs>(typeof(Input));
eventAdapterForJoystickHatMove.AddManagedSubscriber(handle, value, SubscribeToJoystickHatMove);
}
remove { eventAdapterForJoystickHatMove.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct TouchBeginEventArgs {
public EventDataContainer EventData;
public int TouchID => EventData.get_int (unchecked((int)536735898) /* TouchID (P_TOUCHID) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public float Pressure => EventData.get_float (unchecked((int)3086337189) /* Pressure (P_PRESSURE) */);
} /* struct TouchBeginEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TouchBegin += ...' instead.")]
public Subscription SubscribeToTouchBegin (Action<TouchBeginEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TouchBeginEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)630933930) /* TouchBegin (E_TOUCHBEGIN) */);
return s;
}
static UrhoEventAdapter<TouchBeginEventArgs> eventAdapterForTouchBegin;
public event Action<TouchBeginEventArgs> TouchBegin
{
add
{
if (eventAdapterForTouchBegin == null)
eventAdapterForTouchBegin = new UrhoEventAdapter<TouchBeginEventArgs>(typeof(Input));
eventAdapterForTouchBegin.AddManagedSubscriber(handle, value, SubscribeToTouchBegin);
}
remove { eventAdapterForTouchBegin.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct TouchEndEventArgs {
public EventDataContainer EventData;
public int TouchID => EventData.get_int (unchecked((int)536735898) /* TouchID (P_TOUCHID) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
} /* struct TouchEndEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TouchEnd += ...' instead.")]
public Subscription SubscribeToTouchEnd (Action<TouchEndEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TouchEndEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3460956828) /* TouchEnd (E_TOUCHEND) */);
return s;
}
static UrhoEventAdapter<TouchEndEventArgs> eventAdapterForTouchEnd;
public event Action<TouchEndEventArgs> TouchEnd
{
add
{
if (eventAdapterForTouchEnd == null)
eventAdapterForTouchEnd = new UrhoEventAdapter<TouchEndEventArgs>(typeof(Input));
eventAdapterForTouchEnd.AddManagedSubscriber(handle, value, SubscribeToTouchEnd);
}
remove { eventAdapterForTouchEnd.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct TouchMoveEventArgs {
public EventDataContainer EventData;
public int TouchID => EventData.get_int (unchecked((int)536735898) /* TouchID (P_TOUCHID) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int DX => EventData.get_int (unchecked((int)4460820) /* DX (P_DX) */);
public int DY => EventData.get_int (unchecked((int)4460821) /* DY (P_DY) */);
public float Pressure => EventData.get_float (unchecked((int)3086337189) /* Pressure (P_PRESSURE) */);
} /* struct TouchMoveEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TouchMove += ...' instead.")]
public Subscription SubscribeToTouchMove (Action<TouchMoveEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TouchMoveEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)999898800) /* TouchMove (E_TOUCHMOVE) */);
return s;
}
static UrhoEventAdapter<TouchMoveEventArgs> eventAdapterForTouchMove;
public event Action<TouchMoveEventArgs> TouchMove
{
add
{
if (eventAdapterForTouchMove == null)
eventAdapterForTouchMove = new UrhoEventAdapter<TouchMoveEventArgs>(typeof(Input));
eventAdapterForTouchMove.AddManagedSubscriber(handle, value, SubscribeToTouchMove);
}
remove { eventAdapterForTouchMove.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct GestureRecordedEventArgs {
public EventDataContainer EventData;
public uint GestureID => EventData.get_uint (unchecked((int)412719044) /* GestureID (P_GESTUREID) */);
} /* struct GestureRecordedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.GestureRecorded += ...' instead.")]
public Subscription SubscribeToGestureRecorded (Action<GestureRecordedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new GestureRecordedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)908106137) /* GestureRecorded (E_GESTURERECORDED) */);
return s;
}
static UrhoEventAdapter<GestureRecordedEventArgs> eventAdapterForGestureRecorded;
public event Action<GestureRecordedEventArgs> GestureRecorded
{
add
{
if (eventAdapterForGestureRecorded == null)
eventAdapterForGestureRecorded = new UrhoEventAdapter<GestureRecordedEventArgs>(typeof(Input));
eventAdapterForGestureRecorded.AddManagedSubscriber(handle, value, SubscribeToGestureRecorded);
}
remove { eventAdapterForGestureRecorded.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct GestureInputEventArgs {
public EventDataContainer EventData;
public uint GestureID => EventData.get_uint (unchecked((int)412719044) /* GestureID (P_GESTUREID) */);
public int CenterX => EventData.get_int (unchecked((int)1133800675) /* CenterX (P_CENTERX) */);
public int CenterY => EventData.get_int (unchecked((int)1133800676) /* CenterY (P_CENTERY) */);
public int NumFingers => EventData.get_int (unchecked((int)3014252484) /* NumFingers (P_NUMFINGERS) */);
public float Error => EventData.get_float (unchecked((int)1062245256) /* Error (P_ERROR) */);
} /* struct GestureInputEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.GestureInput += ...' instead.")]
public Subscription SubscribeToGestureInput (Action<GestureInputEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new GestureInputEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2822348865) /* GestureInput (E_GESTUREINPUT) */);
return s;
}
static UrhoEventAdapter<GestureInputEventArgs> eventAdapterForGestureInput;
public event Action<GestureInputEventArgs> GestureInput
{
add
{
if (eventAdapterForGestureInput == null)
eventAdapterForGestureInput = new UrhoEventAdapter<GestureInputEventArgs>(typeof(Input));
eventAdapterForGestureInput.AddManagedSubscriber(handle, value, SubscribeToGestureInput);
}
remove { eventAdapterForGestureInput.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct MultiGestureEventArgs {
public EventDataContainer EventData;
public int CenterX => EventData.get_int (unchecked((int)1133800675) /* CenterX (P_CENTERX) */);
public int CenterY => EventData.get_int (unchecked((int)1133800676) /* CenterY (P_CENTERY) */);
public int NumFingers => EventData.get_int (unchecked((int)3014252484) /* NumFingers (P_NUMFINGERS) */);
public float DTheta => EventData.get_float (unchecked((int)1179519354) /* DTheta (P_DTHETA) */);
public float DDist => EventData.get_float (unchecked((int)2596284330) /* DDist (P_DDIST) */);
} /* struct MultiGestureEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MultiGesture += ...' instead.")]
public Subscription SubscribeToMultiGesture (Action<MultiGestureEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MultiGestureEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)660995024) /* MultiGesture (E_MULTIGESTURE) */);
return s;
}
static UrhoEventAdapter<MultiGestureEventArgs> eventAdapterForMultiGesture;
public event Action<MultiGestureEventArgs> MultiGesture
{
add
{
if (eventAdapterForMultiGesture == null)
eventAdapterForMultiGesture = new UrhoEventAdapter<MultiGestureEventArgs>(typeof(Input));
eventAdapterForMultiGesture.AddManagedSubscriber(handle, value, SubscribeToMultiGesture);
}
remove { eventAdapterForMultiGesture.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct DropFileEventArgs {
public EventDataContainer EventData;
public String FileName => EventData.get_String (unchecked((int)4071720039) /* FileName (P_FILENAME) */);
} /* struct DropFileEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DropFile += ...' instead.")]
public Subscription SubscribeToDropFile (Action<DropFileEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DropFileEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4051087883) /* DropFile (E_DROPFILE) */);
return s;
}
static UrhoEventAdapter<DropFileEventArgs> eventAdapterForDropFile;
public event Action<DropFileEventArgs> DropFile
{
add
{
if (eventAdapterForDropFile == null)
eventAdapterForDropFile = new UrhoEventAdapter<DropFileEventArgs>(typeof(Input));
eventAdapterForDropFile.AddManagedSubscriber(handle, value, SubscribeToDropFile);
}
remove { eventAdapterForDropFile.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct InputFocusEventArgs {
public EventDataContainer EventData;
public bool Focus => EventData.get_bool (unchecked((int)4031486264) /* Focus (P_FOCUS) */);
public bool Minimized => EventData.get_bool (unchecked((int)3171875430) /* Minimized (P_MINIMIZED) */);
} /* struct InputFocusEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.InputFocus += ...' instead.")]
public Subscription SubscribeToInputFocus (Action<InputFocusEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new InputFocusEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2089907886) /* InputFocus (E_INPUTFOCUS) */);
return s;
}
static UrhoEventAdapter<InputFocusEventArgs> eventAdapterForInputFocus;
public event Action<InputFocusEventArgs> InputFocus
{
add
{
if (eventAdapterForInputFocus == null)
eventAdapterForInputFocus = new UrhoEventAdapter<InputFocusEventArgs>(typeof(Input));
eventAdapterForInputFocus.AddManagedSubscriber(handle, value, SubscribeToInputFocus);
}
remove { eventAdapterForInputFocus.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct MouseVisibleChangedEventArgs {
public EventDataContainer EventData;
public bool Visible => EventData.get_bool (unchecked((int)3553122386) /* Visible (P_VISIBLE) */);
} /* struct MouseVisibleChangedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MouseVisibleChanged += ...' instead.")]
public Subscription SubscribeToMouseVisibleChanged (Action<MouseVisibleChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MouseVisibleChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2300875623) /* MouseVisibleChanged (E_MOUSEVISIBLECHANGED) */);
return s;
}
static UrhoEventAdapter<MouseVisibleChangedEventArgs> eventAdapterForMouseVisibleChanged;
public event Action<MouseVisibleChangedEventArgs> MouseVisibleChanged
{
add
{
if (eventAdapterForMouseVisibleChanged == null)
eventAdapterForMouseVisibleChanged = new UrhoEventAdapter<MouseVisibleChangedEventArgs>(typeof(Input));
eventAdapterForMouseVisibleChanged.AddManagedSubscriber(handle, value, SubscribeToMouseVisibleChanged);
}
remove { eventAdapterForMouseVisibleChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct MouseModeChangedEventArgs {
public EventDataContainer EventData;
public MouseMode Mode => EventData.get_MouseMode (unchecked((int)899259235) /* Mode (P_MODE) */);
public bool MouseLocked => EventData.get_bool (unchecked((int)924659567) /* MouseLocked (P_MOUSELOCKED) */);
} /* struct MouseModeChangedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MouseModeChanged += ...' instead.")]
public Subscription SubscribeToMouseModeChanged (Action<MouseModeChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MouseModeChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2350709708) /* MouseModeChanged (E_MOUSEMODECHANGED) */);
return s;
}
static UrhoEventAdapter<MouseModeChangedEventArgs> eventAdapterForMouseModeChanged;
public event Action<MouseModeChangedEventArgs> MouseModeChanged
{
add
{
if (eventAdapterForMouseModeChanged == null)
eventAdapterForMouseModeChanged = new UrhoEventAdapter<MouseModeChangedEventArgs>(typeof(Input));
eventAdapterForMouseModeChanged.AddManagedSubscriber(handle, value, SubscribeToMouseModeChanged);
}
remove { eventAdapterForMouseModeChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct ExitRequestedEventArgs {
public EventDataContainer EventData;
} /* struct ExitRequestedEventArgs */
public partial class Input {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ExitRequested += ...' instead.")]
public Subscription SubscribeToExitRequested (Action<ExitRequestedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ExitRequestedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1097072528) /* ExitRequested (E_EXITREQUESTED) */);
return s;
}
static UrhoEventAdapter<ExitRequestedEventArgs> eventAdapterForExitRequested;
public event Action<ExitRequestedEventArgs> ExitRequested
{
add
{
if (eventAdapterForExitRequested == null)
eventAdapterForExitRequested = new UrhoEventAdapter<ExitRequestedEventArgs>(typeof(Input));
eventAdapterForExitRequested.AddManagedSubscriber(handle, value, SubscribeToExitRequested);
}
remove { eventAdapterForExitRequested.RemoveManagedSubscriber(handle, value); }
}
} /* class Input */
} /* namespace */
namespace Urho {
public partial struct SDLRawInputEventArgs {
public EventDataContainer EventData;
public IntPtr SDLEvent => EventData.get_IntPtr (unchecked((int)1247078047) /* SDLEvent (P_SDLEVENT) */);
public bool Consumed => EventData.get_bool (unchecked((int)237928424) /* Consumed (P_CONSUMED) */);
} /* struct SDLRawInputEventArgs */
} /* namespace */
namespace Urho {
public partial struct InputBeginEventArgs {
public EventDataContainer EventData;
} /* struct InputBeginEventArgs */
} /* namespace */
namespace Urho {
public partial struct InputEndEventArgs {
public EventDataContainer EventData;
} /* struct InputEndEventArgs */
} /* namespace */
namespace Urho.Navigation {
public partial struct NavigationMeshRebuiltEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public NavigationMesh Mesh => EventData.get_NavigationMesh (unchecked((int)817628173) /* Mesh (P_MESH) */);
} /* struct NavigationMeshRebuiltEventArgs */
public partial class NavigationMesh {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NavigationMeshRebuilt += ...' instead.")]
public Subscription SubscribeToNavigationMeshRebuilt (Action<NavigationMeshRebuiltEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NavigationMeshRebuiltEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1763730698) /* NavigationMeshRebuilt (E_NAVIGATION_MESH_REBUILT) */);
return s;
}
static UrhoEventAdapter<NavigationMeshRebuiltEventArgs> eventAdapterForNavigationMeshRebuilt;
public event Action<NavigationMeshRebuiltEventArgs> NavigationMeshRebuilt
{
add
{
if (eventAdapterForNavigationMeshRebuilt == null)
eventAdapterForNavigationMeshRebuilt = new UrhoEventAdapter<NavigationMeshRebuiltEventArgs>(typeof(NavigationMesh));
eventAdapterForNavigationMeshRebuilt.AddManagedSubscriber(handle, value, SubscribeToNavigationMeshRebuilt);
}
remove { eventAdapterForNavigationMeshRebuilt.RemoveManagedSubscriber(handle, value); }
}
} /* class NavigationMesh */
} /* namespace */
namespace Urho.Navigation {
public partial struct NavigationAreaRebuiltEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public NavigationMesh Mesh => EventData.get_NavigationMesh (unchecked((int)817628173) /* Mesh (P_MESH) */);
public Vector3 BoundsMin => EventData.get_Vector3 (unchecked((int)523796061) /* BoundsMin (P_BOUNDSMIN) */);
public Vector3 BoundsMax => EventData.get_Vector3 (unchecked((int)523271279) /* BoundsMax (P_BOUNDSMAX) */);
} /* struct NavigationAreaRebuiltEventArgs */
public partial class NavigationMesh {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NavigationAreaRebuilt += ...' instead.")]
public Subscription SubscribeToNavigationAreaRebuilt (Action<NavigationAreaRebuiltEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NavigationAreaRebuiltEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2591711210) /* NavigationAreaRebuilt (E_NAVIGATION_AREA_REBUILT) */);
return s;
}
static UrhoEventAdapter<NavigationAreaRebuiltEventArgs> eventAdapterForNavigationAreaRebuilt;
public event Action<NavigationAreaRebuiltEventArgs> NavigationAreaRebuilt
{
add
{
if (eventAdapterForNavigationAreaRebuilt == null)
eventAdapterForNavigationAreaRebuilt = new UrhoEventAdapter<NavigationAreaRebuiltEventArgs>(typeof(NavigationMesh));
eventAdapterForNavigationAreaRebuilt.AddManagedSubscriber(handle, value, SubscribeToNavigationAreaRebuilt);
}
remove { eventAdapterForNavigationAreaRebuilt.RemoveManagedSubscriber(handle, value); }
}
} /* class NavigationMesh */
} /* namespace */
namespace Urho {
public partial struct NavigationTileAddedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public NavigationMesh Mesh => EventData.get_NavigationMesh (unchecked((int)817628173) /* Mesh (P_MESH) */);
public IntVector2 Tile => EventData.get_IntVector2 (unchecked((int)2019358094) /* Tile (P_TILE) */);
} /* struct NavigationTileAddedEventArgs */
} /* namespace */
namespace Urho {
public partial struct NavigationTileRemovedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public NavigationMesh Mesh => EventData.get_NavigationMesh (unchecked((int)817628173) /* Mesh (P_MESH) */);
public IntVector2 Tile => EventData.get_IntVector2 (unchecked((int)2019358094) /* Tile (P_TILE) */);
} /* struct NavigationTileRemovedEventArgs */
} /* namespace */
namespace Urho {
public partial struct NavigationAllTilesRemovedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public NavigationMesh Mesh => EventData.get_NavigationMesh (unchecked((int)817628173) /* Mesh (P_MESH) */);
} /* struct NavigationAllTilesRemovedEventArgs */
} /* namespace */
namespace Urho.Navigation {
public partial struct CrowdAgentFormationEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public uint Index => EventData.get_uint (unchecked((int)2381836562) /* Index (P_INDEX) */);
public uint Size => EventData.get_uint (unchecked((int)1239689281) /* Size (P_SIZE) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
} /* struct CrowdAgentFormationEventArgs */
} /* namespace */
namespace Urho {
public partial struct CrowdAgentNodeFormationEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public uint Index => EventData.get_uint (unchecked((int)2381836562) /* Index (P_INDEX) */);
public uint Size => EventData.get_uint (unchecked((int)1239689281) /* Size (P_SIZE) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
} /* struct CrowdAgentNodeFormationEventArgs */
} /* namespace */
namespace Urho.Navigation {
public partial struct CrowdAgentRepositionEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public Vector3 Velocity => EventData.get_Vector3 (unchecked((int)1197685213) /* Velocity (P_VELOCITY) */);
public bool Arrived => EventData.get_bool (unchecked((int)3484944461) /* Arrived (P_ARRIVED) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct CrowdAgentRepositionEventArgs */
public partial class CrowdManager {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.CrowdAgentReposition += ...' instead.")]
public Subscription SubscribeToCrowdAgentReposition (Action<CrowdAgentRepositionEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new CrowdAgentRepositionEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3848546772) /* CrowdAgentReposition (E_CROWD_AGENT_REPOSITION) */);
return s;
}
static UrhoEventAdapter<CrowdAgentRepositionEventArgs> eventAdapterForCrowdAgentReposition;
public event Action<CrowdAgentRepositionEventArgs> CrowdAgentReposition
{
add
{
if (eventAdapterForCrowdAgentReposition == null)
eventAdapterForCrowdAgentReposition = new UrhoEventAdapter<CrowdAgentRepositionEventArgs>(typeof(CrowdManager));
eventAdapterForCrowdAgentReposition.AddManagedSubscriber(handle, value, SubscribeToCrowdAgentReposition);
}
remove { eventAdapterForCrowdAgentReposition.RemoveManagedSubscriber(handle, value); }
}
} /* class CrowdManager */
} /* namespace */
namespace Urho {
public partial struct CrowdAgentNodeRepositionEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public Vector3 Velocity => EventData.get_Vector3 (unchecked((int)1197685213) /* Velocity (P_VELOCITY) */);
public bool Arrived => EventData.get_bool (unchecked((int)3484944461) /* Arrived (P_ARRIVED) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct CrowdAgentNodeRepositionEventArgs */
} /* namespace */
namespace Urho.Navigation {
public partial struct CrowdAgentFailureEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public Vector3 Velocity => EventData.get_Vector3 (unchecked((int)1197685213) /* Velocity (P_VELOCITY) */);
public int CrowdAgentState => EventData.get_int (unchecked((int)2780150233) /* CrowdAgentState (P_CROWD_AGENT_STATE) */);
public int CrowdTargetState => EventData.get_int (unchecked((int)841278835) /* CrowdTargetState (P_CROWD_TARGET_STATE) */);
} /* struct CrowdAgentFailureEventArgs */
public partial class CrowdManager {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.CrowdAgentFailure += ...' instead.")]
public Subscription SubscribeToCrowdAgentFailure (Action<CrowdAgentFailureEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new CrowdAgentFailureEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3444215730) /* CrowdAgentFailure (E_CROWD_AGENT_FAILURE) */);
return s;
}
static UrhoEventAdapter<CrowdAgentFailureEventArgs> eventAdapterForCrowdAgentFailure;
public event Action<CrowdAgentFailureEventArgs> CrowdAgentFailure
{
add
{
if (eventAdapterForCrowdAgentFailure == null)
eventAdapterForCrowdAgentFailure = new UrhoEventAdapter<CrowdAgentFailureEventArgs>(typeof(CrowdManager));
eventAdapterForCrowdAgentFailure.AddManagedSubscriber(handle, value, SubscribeToCrowdAgentFailure);
}
remove { eventAdapterForCrowdAgentFailure.RemoveManagedSubscriber(handle, value); }
}
} /* class CrowdManager */
} /* namespace */
namespace Urho {
public partial struct CrowdAgentNodeFailureEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public Vector3 Velocity => EventData.get_Vector3 (unchecked((int)1197685213) /* Velocity (P_VELOCITY) */);
public int CrowdAgentState => EventData.get_int (unchecked((int)2780150233) /* CrowdAgentState (P_CROWD_AGENT_STATE) */);
public int CrowdTargetState => EventData.get_int (unchecked((int)841278835) /* CrowdTargetState (P_CROWD_TARGET_STATE) */);
} /* struct CrowdAgentNodeFailureEventArgs */
} /* namespace */
namespace Urho.Navigation {
public partial struct CrowdAgentStateChangedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public Vector3 Velocity => EventData.get_Vector3 (unchecked((int)1197685213) /* Velocity (P_VELOCITY) */);
public int CrowdAgentState => EventData.get_int (unchecked((int)2780150233) /* CrowdAgentState (P_CROWD_AGENT_STATE) */);
public int CrowdTargetState => EventData.get_int (unchecked((int)841278835) /* CrowdTargetState (P_CROWD_TARGET_STATE) */);
} /* struct CrowdAgentStateChangedEventArgs */
public partial class CrowdManager {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.CrowdAgentStateChanged += ...' instead.")]
public Subscription SubscribeToCrowdAgentStateChanged (Action<CrowdAgentStateChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new CrowdAgentStateChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3344738011) /* CrowdAgentStateChanged (E_CROWD_AGENT_STATE_CHANGED) */);
return s;
}
static UrhoEventAdapter<CrowdAgentStateChangedEventArgs> eventAdapterForCrowdAgentStateChanged;
public event Action<CrowdAgentStateChangedEventArgs> CrowdAgentStateChanged
{
add
{
if (eventAdapterForCrowdAgentStateChanged == null)
eventAdapterForCrowdAgentStateChanged = new UrhoEventAdapter<CrowdAgentStateChangedEventArgs>(typeof(CrowdManager));
eventAdapterForCrowdAgentStateChanged.AddManagedSubscriber(handle, value, SubscribeToCrowdAgentStateChanged);
}
remove { eventAdapterForCrowdAgentStateChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class CrowdManager */
} /* namespace */
namespace Urho {
public partial struct CrowdAgentNodeStateChangedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public CrowdAgent CrowdAgent => EventData.get_CrowdAgent (unchecked((int)2156836056) /* CrowdAgent (P_CROWD_AGENT) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public Vector3 Velocity => EventData.get_Vector3 (unchecked((int)1197685213) /* Velocity (P_VELOCITY) */);
public int CrowdAgentState => EventData.get_int (unchecked((int)2780150233) /* CrowdAgentState (P_CROWD_AGENT_STATE) */);
public int CrowdTargetState => EventData.get_int (unchecked((int)841278835) /* CrowdTargetState (P_CROWD_TARGET_STATE) */);
} /* struct CrowdAgentNodeStateChangedEventArgs */
} /* namespace */
namespace Urho.Navigation {
public partial struct NavigationObstacleAddedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Obstacle Obstacle => EventData.get_Obstacle (unchecked((int)3727758671) /* Obstacle (P_OBSTACLE) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public float Radius => EventData.get_float (unchecked((int)932850002) /* Radius (P_RADIUS) */);
public float Height => EventData.get_float (unchecked((int)1361627751) /* Height (P_HEIGHT) */);
} /* struct NavigationObstacleAddedEventArgs */
public partial class DynamicNavigationMesh {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NavigationObstacleAdded += ...' instead.")]
public Subscription SubscribeToNavigationObstacleAdded (Action<NavigationObstacleAddedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NavigationObstacleAddedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1453185917) /* NavigationObstacleAdded (E_NAVIGATION_OBSTACLE_ADDED) */);
return s;
}
static UrhoEventAdapter<NavigationObstacleAddedEventArgs> eventAdapterForNavigationObstacleAdded;
public event Action<NavigationObstacleAddedEventArgs> NavigationObstacleAdded
{
add
{
if (eventAdapterForNavigationObstacleAdded == null)
eventAdapterForNavigationObstacleAdded = new UrhoEventAdapter<NavigationObstacleAddedEventArgs>(typeof(DynamicNavigationMesh));
eventAdapterForNavigationObstacleAdded.AddManagedSubscriber(handle, value, SubscribeToNavigationObstacleAdded);
}
remove { eventAdapterForNavigationObstacleAdded.RemoveManagedSubscriber(handle, value); }
}
} /* class DynamicNavigationMesh */
} /* namespace */
namespace Urho.Navigation {
public partial struct NavigationObstacleRemovedEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Obstacle Obstacle => EventData.get_Obstacle (unchecked((int)3727758671) /* Obstacle (P_OBSTACLE) */);
public Vector3 Position => EventData.get_Vector3 (unchecked((int)3980503689) /* Position (P_POSITION) */);
public float Radius => EventData.get_float (unchecked((int)932850002) /* Radius (P_RADIUS) */);
public float Height => EventData.get_float (unchecked((int)1361627751) /* Height (P_HEIGHT) */);
} /* struct NavigationObstacleRemovedEventArgs */
public partial class DynamicNavigationMesh {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NavigationObstacleRemoved += ...' instead.")]
public Subscription SubscribeToNavigationObstacleRemoved (Action<NavigationObstacleRemovedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NavigationObstacleRemovedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2043270045) /* NavigationObstacleRemoved (E_NAVIGATION_OBSTACLE_REMOVED) */);
return s;
}
static UrhoEventAdapter<NavigationObstacleRemovedEventArgs> eventAdapterForNavigationObstacleRemoved;
public event Action<NavigationObstacleRemovedEventArgs> NavigationObstacleRemoved
{
add
{
if (eventAdapterForNavigationObstacleRemoved == null)
eventAdapterForNavigationObstacleRemoved = new UrhoEventAdapter<NavigationObstacleRemovedEventArgs>(typeof(DynamicNavigationMesh));
eventAdapterForNavigationObstacleRemoved.AddManagedSubscriber(handle, value, SubscribeToNavigationObstacleRemoved);
}
remove { eventAdapterForNavigationObstacleRemoved.RemoveManagedSubscriber(handle, value); }
}
} /* class DynamicNavigationMesh */
} /* namespace */
namespace Urho.Network {
public partial struct ServerConnectedEventArgs {
public EventDataContainer EventData;
} /* struct ServerConnectedEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ServerConnected += ...' instead.")]
public Subscription SubscribeToServerConnected (Action<ServerConnectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ServerConnectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1969118630) /* ServerConnected (E_SERVERCONNECTED) */);
return s;
}
static UrhoEventAdapter<ServerConnectedEventArgs> eventAdapterForServerConnected;
public event Action<ServerConnectedEventArgs> ServerConnected
{
add
{
if (eventAdapterForServerConnected == null)
eventAdapterForServerConnected = new UrhoEventAdapter<ServerConnectedEventArgs>(typeof(Network));
eventAdapterForServerConnected.AddManagedSubscriber(handle, value, SubscribeToServerConnected);
}
remove { eventAdapterForServerConnected.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct ServerDisconnectedEventArgs {
public EventDataContainer EventData;
} /* struct ServerDisconnectedEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ServerDisconnected += ...' instead.")]
public Subscription SubscribeToServerDisconnected (Action<ServerDisconnectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ServerDisconnectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)956062270) /* ServerDisconnected (E_SERVERDISCONNECTED) */);
return s;
}
static UrhoEventAdapter<ServerDisconnectedEventArgs> eventAdapterForServerDisconnected;
public event Action<ServerDisconnectedEventArgs> ServerDisconnected
{
add
{
if (eventAdapterForServerDisconnected == null)
eventAdapterForServerDisconnected = new UrhoEventAdapter<ServerDisconnectedEventArgs>(typeof(Network));
eventAdapterForServerDisconnected.AddManagedSubscriber(handle, value, SubscribeToServerDisconnected);
}
remove { eventAdapterForServerDisconnected.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct ConnectFailedEventArgs {
public EventDataContainer EventData;
} /* struct ConnectFailedEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ConnectFailed += ...' instead.")]
public Subscription SubscribeToConnectFailed (Action<ConnectFailedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ConnectFailedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4220099303) /* ConnectFailed (E_CONNECTFAILED) */);
return s;
}
static UrhoEventAdapter<ConnectFailedEventArgs> eventAdapterForConnectFailed;
public event Action<ConnectFailedEventArgs> ConnectFailed
{
add
{
if (eventAdapterForConnectFailed == null)
eventAdapterForConnectFailed = new UrhoEventAdapter<ConnectFailedEventArgs>(typeof(Network));
eventAdapterForConnectFailed.AddManagedSubscriber(handle, value, SubscribeToConnectFailed);
}
remove { eventAdapterForConnectFailed.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho {
public partial struct ConnectionInProgressEventArgs {
public EventDataContainer EventData;
} /* struct ConnectionInProgressEventArgs */
} /* namespace */
namespace Urho.Network {
public partial struct ClientConnectedEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
} /* struct ClientConnectedEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ClientConnected += ...' instead.")]
public Subscription SubscribeToClientConnected (Action<ClientConnectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ClientConnectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2027128478) /* ClientConnected (E_CLIENTCONNECTED) */);
return s;
}
static UrhoEventAdapter<ClientConnectedEventArgs> eventAdapterForClientConnected;
public event Action<ClientConnectedEventArgs> ClientConnected
{
add
{
if (eventAdapterForClientConnected == null)
eventAdapterForClientConnected = new UrhoEventAdapter<ClientConnectedEventArgs>(typeof(Network));
eventAdapterForClientConnected.AddManagedSubscriber(handle, value, SubscribeToClientConnected);
}
remove { eventAdapterForClientConnected.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct ClientDisconnectedEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
} /* struct ClientDisconnectedEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ClientDisconnected += ...' instead.")]
public Subscription SubscribeToClientDisconnected (Action<ClientDisconnectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ClientDisconnectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)8350534) /* ClientDisconnected (E_CLIENTDISCONNECTED) */);
return s;
}
static UrhoEventAdapter<ClientDisconnectedEventArgs> eventAdapterForClientDisconnected;
public event Action<ClientDisconnectedEventArgs> ClientDisconnected
{
add
{
if (eventAdapterForClientDisconnected == null)
eventAdapterForClientDisconnected = new UrhoEventAdapter<ClientDisconnectedEventArgs>(typeof(Network));
eventAdapterForClientDisconnected.AddManagedSubscriber(handle, value, SubscribeToClientDisconnected);
}
remove { eventAdapterForClientDisconnected.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct ClientIdentityEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
public bool Allow => EventData.get_bool (unchecked((int)360830473) /* Allow (P_ALLOW) */);
} /* struct ClientIdentityEventArgs */
public partial class Connection {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ClientIdentity += ...' instead.")]
public Subscription SubscribeToClientIdentity (Action<ClientIdentityEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ClientIdentityEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1470260041) /* ClientIdentity (E_CLIENTIDENTITY) */);
return s;
}
static UrhoEventAdapter<ClientIdentityEventArgs> eventAdapterForClientIdentity;
public event Action<ClientIdentityEventArgs> ClientIdentity
{
add
{
if (eventAdapterForClientIdentity == null)
eventAdapterForClientIdentity = new UrhoEventAdapter<ClientIdentityEventArgs>(typeof(Connection));
eventAdapterForClientIdentity.AddManagedSubscriber(handle, value, SubscribeToClientIdentity);
}
remove { eventAdapterForClientIdentity.RemoveManagedSubscriber(handle, value); }
}
} /* class Connection */
} /* namespace */
namespace Urho.Network {
public partial struct ClientSceneLoadedEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
} /* struct ClientSceneLoadedEventArgs */
public partial class Connection {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ClientSceneLoaded += ...' instead.")]
public Subscription SubscribeToClientSceneLoaded (Action<ClientSceneLoadedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ClientSceneLoadedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)729900358) /* ClientSceneLoaded (E_CLIENTSCENELOADED) */);
return s;
}
static UrhoEventAdapter<ClientSceneLoadedEventArgs> eventAdapterForClientSceneLoaded;
public event Action<ClientSceneLoadedEventArgs> ClientSceneLoaded
{
add
{
if (eventAdapterForClientSceneLoaded == null)
eventAdapterForClientSceneLoaded = new UrhoEventAdapter<ClientSceneLoadedEventArgs>(typeof(Connection));
eventAdapterForClientSceneLoaded.AddManagedSubscriber(handle, value, SubscribeToClientSceneLoaded);
}
remove { eventAdapterForClientSceneLoaded.RemoveManagedSubscriber(handle, value); }
}
} /* class Connection */
} /* namespace */
namespace Urho.Network {
public partial struct NetworkMessageEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
public int MessageID => EventData.get_int (unchecked((int)2797946434) /* MessageID (P_MESSAGEID) */);
public byte [] Data => EventData.get_Buffer (unchecked((int)2349297546) /* Data (P_DATA) */);
} /* struct NetworkMessageEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NetworkMessage += ...' instead.")]
public Subscription SubscribeToNetworkMessage (Action<NetworkMessageEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NetworkMessageEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)152296505) /* NetworkMessage (E_NETWORKMESSAGE) */);
return s;
}
static UrhoEventAdapter<NetworkMessageEventArgs> eventAdapterForNetworkMessage;
public event Action<NetworkMessageEventArgs> NetworkMessage
{
add
{
if (eventAdapterForNetworkMessage == null)
eventAdapterForNetworkMessage = new UrhoEventAdapter<NetworkMessageEventArgs>(typeof(Network));
eventAdapterForNetworkMessage.AddManagedSubscriber(handle, value, SubscribeToNetworkMessage);
}
remove { eventAdapterForNetworkMessage.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct NetworkUpdateEventArgs {
public EventDataContainer EventData;
} /* struct NetworkUpdateEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NetworkUpdate += ...' instead.")]
public Subscription SubscribeToNetworkUpdate (Action<NetworkUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NetworkUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2230239383) /* NetworkUpdate (E_NETWORKUPDATE) */);
return s;
}
static UrhoEventAdapter<NetworkUpdateEventArgs> eventAdapterForNetworkUpdate;
public event Action<NetworkUpdateEventArgs> NetworkUpdate
{
add
{
if (eventAdapterForNetworkUpdate == null)
eventAdapterForNetworkUpdate = new UrhoEventAdapter<NetworkUpdateEventArgs>(typeof(Network));
eventAdapterForNetworkUpdate.AddManagedSubscriber(handle, value, SubscribeToNetworkUpdate);
}
remove { eventAdapterForNetworkUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct NetworkUpdateSentEventArgs {
public EventDataContainer EventData;
} /* struct NetworkUpdateSentEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NetworkUpdateSent += ...' instead.")]
public Subscription SubscribeToNetworkUpdateSent (Action<NetworkUpdateSentEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NetworkUpdateSentEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1987752175) /* NetworkUpdateSent (E_NETWORKUPDATESENT) */);
return s;
}
static UrhoEventAdapter<NetworkUpdateSentEventArgs> eventAdapterForNetworkUpdateSent;
public event Action<NetworkUpdateSentEventArgs> NetworkUpdateSent
{
add
{
if (eventAdapterForNetworkUpdateSent == null)
eventAdapterForNetworkUpdateSent = new UrhoEventAdapter<NetworkUpdateSentEventArgs>(typeof(Network));
eventAdapterForNetworkUpdateSent.AddManagedSubscriber(handle, value, SubscribeToNetworkUpdateSent);
}
remove { eventAdapterForNetworkUpdateSent.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct NetworkSceneLoadFailedEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
} /* struct NetworkSceneLoadFailedEventArgs */
public partial class Network {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NetworkSceneLoadFailed += ...' instead.")]
public Subscription SubscribeToNetworkSceneLoadFailed (Action<NetworkSceneLoadFailedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NetworkSceneLoadFailedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2165505217) /* NetworkSceneLoadFailed (E_NETWORKSCENELOADFAILED) */);
return s;
}
static UrhoEventAdapter<NetworkSceneLoadFailedEventArgs> eventAdapterForNetworkSceneLoadFailed;
public event Action<NetworkSceneLoadFailedEventArgs> NetworkSceneLoadFailed
{
add
{
if (eventAdapterForNetworkSceneLoadFailed == null)
eventAdapterForNetworkSceneLoadFailed = new UrhoEventAdapter<NetworkSceneLoadFailedEventArgs>(typeof(Network));
eventAdapterForNetworkSceneLoadFailed.AddManagedSubscriber(handle, value, SubscribeToNetworkSceneLoadFailed);
}
remove { eventAdapterForNetworkSceneLoadFailed.RemoveManagedSubscriber(handle, value); }
}
} /* class Network */
} /* namespace */
namespace Urho.Network {
public partial struct RemoteEventDataEventArgs {
public EventDataContainer EventData;
public Connection Connection => EventData.get_Connection (unchecked((int)1460682206) /* Connection (P_CONNECTION) */);
} /* struct RemoteEventDataEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkBannedEventArgs {
public EventDataContainer EventData;
} /* struct NetworkBannedEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkInvalidPasswordEventArgs {
public EventDataContainer EventData;
} /* struct NetworkInvalidPasswordEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkHostDiscoveredEventArgs {
public EventDataContainer EventData;
public String Address => EventData.get_String (unchecked((int)2093602676) /* Address (P_ADDRESS) */);
public int Port => EventData.get_int (unchecked((int)3241939233) /* Port (P_PORT) */);
// TODO: perl generated invalid? from perl config?
//public VariantMap Beacon => EventData.get_VariantMap (unchecked((int)1442234532) /* Beacon (P_BEACON) */);
} /* struct NetworkHostDiscoveredEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkNatPunchtroughSucceededEventArgs {
public EventDataContainer EventData;
public String Address => EventData.get_String (unchecked((int)2093602676) /* Address (P_ADDRESS) */);
public int Port => EventData.get_int (unchecked((int)3241939233) /* Port (P_PORT) */);
} /* struct NetworkNatPunchtroughSucceededEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkNatPunchtroughFailedEventArgs {
public EventDataContainer EventData;
public String Address => EventData.get_String (unchecked((int)2093602676) /* Address (P_ADDRESS) */);
public int Port => EventData.get_int (unchecked((int)3241939233) /* Port (P_PORT) */);
} /* struct NetworkNatPunchtroughFailedEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkNatMasterConnectionFailedEventArgs {
public EventDataContainer EventData;
public String Address => EventData.get_String (unchecked((int)2093602676) /* Address (P_ADDRESS) */);
public int Port => EventData.get_int (unchecked((int)3241939233) /* Port (P_PORT) */);
} /* struct NetworkNatMasterConnectionFailedEventArgs */
} /* namespace */
namespace Urho {
public partial struct NetworkNatMasterConnectionSucceededEventArgs {
public EventDataContainer EventData;
public String Address => EventData.get_String (unchecked((int)2093602676) /* Address (P_ADDRESS) */);
public int Port => EventData.get_int (unchecked((int)3241939233) /* Port (P_PORT) */);
} /* struct NetworkNatMasterConnectionSucceededEventArgs */
} /* namespace */
namespace Urho.Physics {
public partial struct PhysicsPreStepEventArgs {
public EventDataContainer EventData;
public PhysicsWorld World => EventData.get_PhysicsWorld (unchecked((int)2052574866) /* World (P_WORLD) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct PhysicsPreStepEventArgs */
public partial class PhysicsWorld {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsPreStep += ...' instead.")]
public Subscription SubscribeToPhysicsPreStep (Action<PhysicsPreStepEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsPreStepEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2972293064) /* PhysicsPreStep (E_PHYSICSPRESTEP) */);
return s;
}
static UrhoEventAdapter<PhysicsPreStepEventArgs> eventAdapterForPhysicsPreStep;
public event Action<PhysicsPreStepEventArgs> PhysicsPreStep
{
add
{
if (eventAdapterForPhysicsPreStep == null)
eventAdapterForPhysicsPreStep = new UrhoEventAdapter<PhysicsPreStepEventArgs>(typeof(PhysicsWorld));
eventAdapterForPhysicsPreStep.AddManagedSubscriber(handle, value, SubscribeToPhysicsPreStep);
}
remove { eventAdapterForPhysicsPreStep.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld */
} /* namespace */
namespace Urho.Physics {
public partial struct PhysicsPostStepEventArgs {
public EventDataContainer EventData;
public PhysicsWorld World => EventData.get_PhysicsWorld (unchecked((int)2052574866) /* World (P_WORLD) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct PhysicsPostStepEventArgs */
public partial class PhysicsWorld {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsPostStep += ...' instead.")]
public Subscription SubscribeToPhysicsPostStep (Action<PhysicsPostStepEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsPostStepEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2925534451) /* PhysicsPostStep (E_PHYSICSPOSTSTEP) */);
return s;
}
static UrhoEventAdapter<PhysicsPostStepEventArgs> eventAdapterForPhysicsPostStep;
public event Action<PhysicsPostStepEventArgs> PhysicsPostStep
{
add
{
if (eventAdapterForPhysicsPostStep == null)
eventAdapterForPhysicsPostStep = new UrhoEventAdapter<PhysicsPostStepEventArgs>(typeof(PhysicsWorld));
eventAdapterForPhysicsPostStep.AddManagedSubscriber(handle, value, SubscribeToPhysicsPostStep);
}
remove { eventAdapterForPhysicsPostStep.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld */
} /* namespace */
namespace Urho.Physics {
public partial struct PhysicsCollisionStartEventArgs {
public EventDataContainer EventData;
public PhysicsWorld World => EventData.get_PhysicsWorld (unchecked((int)2052574866) /* World (P_WORLD) */);
public Node NodeA => EventData.get_Node (unchecked((int)270310559) /* NodeA (P_NODEA) */);
public Node NodeB => EventData.get_Node (unchecked((int)270310560) /* NodeB (P_NODEB) */);
public RigidBody BodyA => EventData.get_RigidBody (unchecked((int)3776720255) /* BodyA (P_BODYA) */);
public RigidBody BodyB => EventData.get_RigidBody (unchecked((int)3776720256) /* BodyB (P_BODYB) */);
public bool Trigger => EventData.get_bool (unchecked((int)3978812120) /* Trigger (P_TRIGGER) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
} /* struct PhysicsCollisionStartEventArgs */
public partial class PhysicsWorld {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsCollisionStart += ...' instead.")]
public Subscription SubscribeToPhysicsCollisionStart (Action<PhysicsCollisionStartEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsCollisionStartEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2896510007) /* PhysicsCollisionStart (E_PHYSICSCOLLISIONSTART) */);
return s;
}
static UrhoEventAdapter<PhysicsCollisionStartEventArgs> eventAdapterForPhysicsCollisionStart;
public event Action<PhysicsCollisionStartEventArgs> PhysicsCollisionStart
{
add
{
if (eventAdapterForPhysicsCollisionStart == null)
eventAdapterForPhysicsCollisionStart = new UrhoEventAdapter<PhysicsCollisionStartEventArgs>(typeof(PhysicsWorld));
eventAdapterForPhysicsCollisionStart.AddManagedSubscriber(handle, value, SubscribeToPhysicsCollisionStart);
}
remove { eventAdapterForPhysicsCollisionStart.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld */
} /* namespace */
namespace Urho.Physics {
public partial struct PhysicsCollisionEventArgs {
public EventDataContainer EventData;
public PhysicsWorld World => EventData.get_PhysicsWorld (unchecked((int)2052574866) /* World (P_WORLD) */);
public Node NodeA => EventData.get_Node (unchecked((int)270310559) /* NodeA (P_NODEA) */);
public Node NodeB => EventData.get_Node (unchecked((int)270310560) /* NodeB (P_NODEB) */);
public RigidBody BodyA => EventData.get_RigidBody (unchecked((int)3776720255) /* BodyA (P_BODYA) */);
public RigidBody BodyB => EventData.get_RigidBody (unchecked((int)3776720256) /* BodyB (P_BODYB) */);
public bool Trigger => EventData.get_bool (unchecked((int)3978812120) /* Trigger (P_TRIGGER) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
} /* struct PhysicsCollisionEventArgs */
public partial class PhysicsWorld {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsCollision += ...' instead.")]
public Subscription SubscribeToPhysicsCollision (Action<PhysicsCollisionEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsCollisionEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1803321803) /* PhysicsCollision (E_PHYSICSCOLLISION) */);
return s;
}
static UrhoEventAdapter<PhysicsCollisionEventArgs> eventAdapterForPhysicsCollision;
public event Action<PhysicsCollisionEventArgs> PhysicsCollision
{
add
{
if (eventAdapterForPhysicsCollision == null)
eventAdapterForPhysicsCollision = new UrhoEventAdapter<PhysicsCollisionEventArgs>(typeof(PhysicsWorld));
eventAdapterForPhysicsCollision.AddManagedSubscriber(handle, value, SubscribeToPhysicsCollision);
}
remove { eventAdapterForPhysicsCollision.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld */
} /* namespace */
namespace Urho.Physics {
public partial struct PhysicsCollisionEndEventArgs {
public EventDataContainer EventData;
public PhysicsWorld World => EventData.get_PhysicsWorld (unchecked((int)2052574866) /* World (P_WORLD) */);
public Node NodeA => EventData.get_Node (unchecked((int)270310559) /* NodeA (P_NODEA) */);
public Node NodeB => EventData.get_Node (unchecked((int)270310560) /* NodeB (P_NODEB) */);
public RigidBody BodyA => EventData.get_RigidBody (unchecked((int)3776720255) /* BodyA (P_BODYA) */);
public RigidBody BodyB => EventData.get_RigidBody (unchecked((int)3776720256) /* BodyB (P_BODYB) */);
public bool Trigger => EventData.get_bool (unchecked((int)3978812120) /* Trigger (P_TRIGGER) */);
} /* struct PhysicsCollisionEndEventArgs */
public partial class PhysicsWorld {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsCollisionEnd += ...' instead.")]
public Subscription SubscribeToPhysicsCollisionEnd (Action<PhysicsCollisionEndEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsCollisionEndEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3892580272) /* PhysicsCollisionEnd (E_PHYSICSCOLLISIONEND) */);
return s;
}
static UrhoEventAdapter<PhysicsCollisionEndEventArgs> eventAdapterForPhysicsCollisionEnd;
public event Action<PhysicsCollisionEndEventArgs> PhysicsCollisionEnd
{
add
{
if (eventAdapterForPhysicsCollisionEnd == null)
eventAdapterForPhysicsCollisionEnd = new UrhoEventAdapter<PhysicsCollisionEndEventArgs>(typeof(PhysicsWorld));
eventAdapterForPhysicsCollisionEnd.AddManagedSubscriber(handle, value, SubscribeToPhysicsCollisionEnd);
}
remove { eventAdapterForPhysicsCollisionEnd.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld */
} /* namespace */
namespace Urho {
public partial struct NodeCollisionStartEventArgs {
public EventDataContainer EventData;
public RigidBody Body => EventData.get_RigidBody (unchecked((int)902734658) /* Body (P_BODY) */);
public Node OtherNode => EventData.get_Node (unchecked((int)1833707954) /* OtherNode (P_OTHERNODE) */);
public RigidBody OtherBody => EventData.get_RigidBody (unchecked((int)1056596178) /* OtherBody (P_OTHERBODY) */);
public bool Trigger => EventData.get_bool (unchecked((int)3978812120) /* Trigger (P_TRIGGER) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
} /* struct NodeCollisionStartEventArgs */
public partial class Node {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeCollisionStart += ...' instead.")]
public Subscription SubscribeToNodeCollisionStart (Action<NodeCollisionStartEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeCollisionStartEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2216181234) /* NodeCollisionStart (E_NODECOLLISIONSTART) */);
return s;
}
static UrhoEventAdapter<NodeCollisionStartEventArgs> eventAdapterForNodeCollisionStart;
public event Action<NodeCollisionStartEventArgs> NodeCollisionStart
{
add
{
if (eventAdapterForNodeCollisionStart == null)
eventAdapterForNodeCollisionStart = new UrhoEventAdapter<NodeCollisionStartEventArgs>(typeof(Node));
eventAdapterForNodeCollisionStart.AddManagedSubscriber(handle, value, SubscribeToNodeCollisionStart);
}
remove { eventAdapterForNodeCollisionStart.RemoveManagedSubscriber(handle, value); }
}
} /* class Node */
} /* namespace */
namespace Urho {
public partial struct NodeCollisionEventArgs {
public EventDataContainer EventData;
public RigidBody Body => EventData.get_RigidBody (unchecked((int)902734658) /* Body (P_BODY) */);
public Node OtherNode => EventData.get_Node (unchecked((int)1833707954) /* OtherNode (P_OTHERNODE) */);
public RigidBody OtherBody => EventData.get_RigidBody (unchecked((int)1056596178) /* OtherBody (P_OTHERBODY) */);
public bool Trigger => EventData.get_bool (unchecked((int)3978812120) /* Trigger (P_TRIGGER) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
} /* struct NodeCollisionEventArgs */
public partial class Node {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeCollision += ...' instead.")]
public Subscription SubscribeToNodeCollision (Action<NodeCollisionEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeCollisionEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2872903248) /* NodeCollision (E_NODECOLLISION) */);
return s;
}
static UrhoEventAdapter<NodeCollisionEventArgs> eventAdapterForNodeCollision;
public event Action<NodeCollisionEventArgs> NodeCollision
{
add
{
if (eventAdapterForNodeCollision == null)
eventAdapterForNodeCollision = new UrhoEventAdapter<NodeCollisionEventArgs>(typeof(Node));
eventAdapterForNodeCollision.AddManagedSubscriber(handle, value, SubscribeToNodeCollision);
}
remove { eventAdapterForNodeCollision.RemoveManagedSubscriber(handle, value); }
}
} /* class Node */
} /* namespace */
namespace Urho {
public partial struct NodeCollisionEndEventArgs {
public EventDataContainer EventData;
public RigidBody Body => EventData.get_RigidBody (unchecked((int)902734658) /* Body (P_BODY) */);
public Node OtherNode => EventData.get_Node (unchecked((int)1833707954) /* OtherNode (P_OTHERNODE) */);
public RigidBody OtherBody => EventData.get_RigidBody (unchecked((int)1056596178) /* OtherBody (P_OTHERBODY) */);
public bool Trigger => EventData.get_bool (unchecked((int)3978812120) /* Trigger (P_TRIGGER) */);
} /* struct NodeCollisionEndEventArgs */
public partial class Node {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeCollisionEnd += ...' instead.")]
public Subscription SubscribeToNodeCollisionEnd (Action<NodeCollisionEndEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeCollisionEndEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)670105323) /* NodeCollisionEnd (E_NODECOLLISIONEND) */);
return s;
}
static UrhoEventAdapter<NodeCollisionEndEventArgs> eventAdapterForNodeCollisionEnd;
public event Action<NodeCollisionEndEventArgs> NodeCollisionEnd
{
add
{
if (eventAdapterForNodeCollisionEnd == null)
eventAdapterForNodeCollisionEnd = new UrhoEventAdapter<NodeCollisionEndEventArgs>(typeof(Node));
eventAdapterForNodeCollisionEnd.AddManagedSubscriber(handle, value, SubscribeToNodeCollisionEnd);
}
remove { eventAdapterForNodeCollisionEnd.RemoveManagedSubscriber(handle, value); }
}
} /* class Node */
} /* namespace */
namespace Urho.Resources {
public partial struct ReloadStartedEventArgs {
public EventDataContainer EventData;
} /* struct ReloadStartedEventArgs */
public partial class Resource {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ReloadStarted += ...' instead.")]
public Subscription SubscribeToReloadStarted (Action<ReloadStartedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ReloadStartedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3059613928) /* ReloadStarted (E_RELOADSTARTED) */);
return s;
}
static UrhoEventAdapter<ReloadStartedEventArgs> eventAdapterForReloadStarted;
public event Action<ReloadStartedEventArgs> ReloadStarted
{
add
{
if (eventAdapterForReloadStarted == null)
eventAdapterForReloadStarted = new UrhoEventAdapter<ReloadStartedEventArgs>(typeof(Resource));
eventAdapterForReloadStarted.AddManagedSubscriber(handle, value, SubscribeToReloadStarted);
}
remove { eventAdapterForReloadStarted.RemoveManagedSubscriber(handle, value); }
}
} /* class Resource */
} /* namespace */
namespace Urho.Resources {
public partial struct ReloadFinishedEventArgs {
public EventDataContainer EventData;
} /* struct ReloadFinishedEventArgs */
public partial class Resource {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ReloadFinished += ...' instead.")]
public Subscription SubscribeToReloadFinished (Action<ReloadFinishedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ReloadFinishedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4130466411) /* ReloadFinished (E_RELOADFINISHED) */);
return s;
}
static UrhoEventAdapter<ReloadFinishedEventArgs> eventAdapterForReloadFinished;
public event Action<ReloadFinishedEventArgs> ReloadFinished
{
add
{
if (eventAdapterForReloadFinished == null)
eventAdapterForReloadFinished = new UrhoEventAdapter<ReloadFinishedEventArgs>(typeof(Resource));
eventAdapterForReloadFinished.AddManagedSubscriber(handle, value, SubscribeToReloadFinished);
}
remove { eventAdapterForReloadFinished.RemoveManagedSubscriber(handle, value); }
}
} /* class Resource */
} /* namespace */
namespace Urho.Resources {
public partial struct ReloadFailedEventArgs {
public EventDataContainer EventData;
} /* struct ReloadFailedEventArgs */
public partial class Resource {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ReloadFailed += ...' instead.")]
public Subscription SubscribeToReloadFailed (Action<ReloadFailedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ReloadFailedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2414659190) /* ReloadFailed (E_RELOADFAILED) */);
return s;
}
static UrhoEventAdapter<ReloadFailedEventArgs> eventAdapterForReloadFailed;
public event Action<ReloadFailedEventArgs> ReloadFailed
{
add
{
if (eventAdapterForReloadFailed == null)
eventAdapterForReloadFailed = new UrhoEventAdapter<ReloadFailedEventArgs>(typeof(Resource));
eventAdapterForReloadFailed.AddManagedSubscriber(handle, value, SubscribeToReloadFailed);
}
remove { eventAdapterForReloadFailed.RemoveManagedSubscriber(handle, value); }
}
} /* class Resource */
} /* namespace */
namespace Urho.Resources {
public partial struct FileChangedEventArgs {
public EventDataContainer EventData;
public String FileName => EventData.get_String (unchecked((int)4071720039) /* FileName (P_FILENAME) */);
public String ResourceName => EventData.get_String (unchecked((int)2183452569) /* ResourceName (P_RESOURCENAME) */);
} /* struct FileChangedEventArgs */
public partial class ResourceCache {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.FileChanged += ...' instead.")]
public Subscription SubscribeToFileChanged (Action<FileChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new FileChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)739515096) /* FileChanged (E_FILECHANGED) */);
return s;
}
static UrhoEventAdapter<FileChangedEventArgs> eventAdapterForFileChanged;
public event Action<FileChangedEventArgs> FileChanged
{
add
{
if (eventAdapterForFileChanged == null)
eventAdapterForFileChanged = new UrhoEventAdapter<FileChangedEventArgs>(typeof(ResourceCache));
eventAdapterForFileChanged.AddManagedSubscriber(handle, value, SubscribeToFileChanged);
}
remove { eventAdapterForFileChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class ResourceCache */
} /* namespace */
namespace Urho.Resources {
public partial struct LoadFailedEventArgs {
public EventDataContainer EventData;
public String ResourceName => EventData.get_String (unchecked((int)2183452569) /* ResourceName (P_RESOURCENAME) */);
} /* struct LoadFailedEventArgs */
public partial class ResourceCache {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.LoadFailed += ...' instead.")]
public Subscription SubscribeToLoadFailed (Action<LoadFailedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new LoadFailedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3086379395) /* LoadFailed (E_LOADFAILED) */);
return s;
}
static UrhoEventAdapter<LoadFailedEventArgs> eventAdapterForLoadFailed;
public event Action<LoadFailedEventArgs> LoadFailed
{
add
{
if (eventAdapterForLoadFailed == null)
eventAdapterForLoadFailed = new UrhoEventAdapter<LoadFailedEventArgs>(typeof(ResourceCache));
eventAdapterForLoadFailed.AddManagedSubscriber(handle, value, SubscribeToLoadFailed);
}
remove { eventAdapterForLoadFailed.RemoveManagedSubscriber(handle, value); }
}
} /* class ResourceCache */
} /* namespace */
namespace Urho.Resources {
public partial struct ResourceNotFoundEventArgs {
public EventDataContainer EventData;
public String ResourceName => EventData.get_String (unchecked((int)2183452569) /* ResourceName (P_RESOURCENAME) */);
} /* struct ResourceNotFoundEventArgs */
public partial class ResourceCache {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ResourceNotFound += ...' instead.")]
public Subscription SubscribeToResourceNotFound (Action<ResourceNotFoundEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ResourceNotFoundEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2023916925) /* ResourceNotFound (E_RESOURCENOTFOUND) */);
return s;
}
static UrhoEventAdapter<ResourceNotFoundEventArgs> eventAdapterForResourceNotFound;
public event Action<ResourceNotFoundEventArgs> ResourceNotFound
{
add
{
if (eventAdapterForResourceNotFound == null)
eventAdapterForResourceNotFound = new UrhoEventAdapter<ResourceNotFoundEventArgs>(typeof(ResourceCache));
eventAdapterForResourceNotFound.AddManagedSubscriber(handle, value, SubscribeToResourceNotFound);
}
remove { eventAdapterForResourceNotFound.RemoveManagedSubscriber(handle, value); }
}
} /* class ResourceCache */
} /* namespace */
namespace Urho.Resources {
public partial struct UnknownResourceTypeEventArgs {
public EventDataContainer EventData;
public StringHash ResourceType => EventData.get_StringHash (unchecked((int)2770481384) /* ResourceType (P_RESOURCETYPE) */);
} /* struct UnknownResourceTypeEventArgs */
public partial class ResourceCache {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UnknownResourceType += ...' instead.")]
public Subscription SubscribeToUnknownResourceType (Action<UnknownResourceTypeEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UnknownResourceTypeEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2700577522) /* UnknownResourceType (E_UNKNOWNRESOURCETYPE) */);
return s;
}
static UrhoEventAdapter<UnknownResourceTypeEventArgs> eventAdapterForUnknownResourceType;
public event Action<UnknownResourceTypeEventArgs> UnknownResourceType
{
add
{
if (eventAdapterForUnknownResourceType == null)
eventAdapterForUnknownResourceType = new UrhoEventAdapter<UnknownResourceTypeEventArgs>(typeof(ResourceCache));
eventAdapterForUnknownResourceType.AddManagedSubscriber(handle, value, SubscribeToUnknownResourceType);
}
remove { eventAdapterForUnknownResourceType.RemoveManagedSubscriber(handle, value); }
}
} /* class ResourceCache */
} /* namespace */
namespace Urho.Resources {
public partial struct ResourceBackgroundLoadedEventArgs {
public EventDataContainer EventData;
public String ResourceName => EventData.get_String (unchecked((int)2183452569) /* ResourceName (P_RESOURCENAME) */);
public bool Success => EventData.get_bool (unchecked((int)116291459) /* Success (P_SUCCESS) */);
public Resource Resource => EventData.get_Resource (unchecked((int)2687193166) /* Resource (P_RESOURCE) */);
} /* struct ResourceBackgroundLoadedEventArgs */
public partial class ResourceCache {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ResourceBackgroundLoaded += ...' instead.")]
public Subscription SubscribeToResourceBackgroundLoaded (Action<ResourceBackgroundLoadedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ResourceBackgroundLoadedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3181020641) /* ResourceBackgroundLoaded (E_RESOURCEBACKGROUNDLOADED) */);
return s;
}
static UrhoEventAdapter<ResourceBackgroundLoadedEventArgs> eventAdapterForResourceBackgroundLoaded;
public event Action<ResourceBackgroundLoadedEventArgs> ResourceBackgroundLoaded
{
add
{
if (eventAdapterForResourceBackgroundLoaded == null)
eventAdapterForResourceBackgroundLoaded = new UrhoEventAdapter<ResourceBackgroundLoadedEventArgs>(typeof(ResourceCache));
eventAdapterForResourceBackgroundLoaded.AddManagedSubscriber(handle, value, SubscribeToResourceBackgroundLoaded);
}
remove { eventAdapterForResourceBackgroundLoaded.RemoveManagedSubscriber(handle, value); }
}
} /* class ResourceCache */
} /* namespace */
namespace Urho.Resources {
public partial struct ChangeLanguageEventArgs {
public EventDataContainer EventData;
} /* struct ChangeLanguageEventArgs */
public partial class Localization {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ChangeLanguage += ...' instead.")]
public Subscription SubscribeToChangeLanguage (Action<ChangeLanguageEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ChangeLanguageEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2641989224) /* ChangeLanguage (E_CHANGELANGUAGE) */);
return s;
}
static UrhoEventAdapter<ChangeLanguageEventArgs> eventAdapterForChangeLanguage;
public event Action<ChangeLanguageEventArgs> ChangeLanguage
{
add
{
if (eventAdapterForChangeLanguage == null)
eventAdapterForChangeLanguage = new UrhoEventAdapter<ChangeLanguageEventArgs>(typeof(Localization));
eventAdapterForChangeLanguage.AddManagedSubscriber(handle, value, SubscribeToChangeLanguage);
}
remove { eventAdapterForChangeLanguage.RemoveManagedSubscriber(handle, value); }
}
} /* class Localization */
} /* namespace */
namespace Urho {
public partial struct SceneUpdateEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct SceneUpdateEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.SceneUpdate += ...' instead.")]
public Subscription SubscribeToSceneUpdate (Action<SceneUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new SceneUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)584159317) /* SceneUpdate (E_SCENEUPDATE) */);
return s;
}
static UrhoEventAdapter<SceneUpdateEventArgs> eventAdapterForSceneUpdate;
public event Action<SceneUpdateEventArgs> SceneUpdate
{
add
{
if (eventAdapterForSceneUpdate == null)
eventAdapterForSceneUpdate = new UrhoEventAdapter<SceneUpdateEventArgs>(typeof(Scene));
eventAdapterForSceneUpdate.AddManagedSubscriber(handle, value, SubscribeToSceneUpdate);
}
remove { eventAdapterForSceneUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct SceneSubsystemUpdateEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct SceneSubsystemUpdateEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.SceneSubsystemUpdate += ...' instead.")]
public Subscription SubscribeToSceneSubsystemUpdate (Action<SceneSubsystemUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new SceneSubsystemUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3808503820) /* SceneSubsystemUpdate (E_SCENESUBSYSTEMUPDATE) */);
return s;
}
static UrhoEventAdapter<SceneSubsystemUpdateEventArgs> eventAdapterForSceneSubsystemUpdate;
public event Action<SceneSubsystemUpdateEventArgs> SceneSubsystemUpdate
{
add
{
if (eventAdapterForSceneSubsystemUpdate == null)
eventAdapterForSceneSubsystemUpdate = new UrhoEventAdapter<SceneSubsystemUpdateEventArgs>(typeof(Scene));
eventAdapterForSceneSubsystemUpdate.AddManagedSubscriber(handle, value, SubscribeToSceneSubsystemUpdate);
}
remove { eventAdapterForSceneSubsystemUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct UpdateSmoothingEventArgs {
public EventDataContainer EventData;
public float Constant => EventData.get_float (unchecked((int)3653760868) /* Constant (P_CONSTANT) */);
public float SquaredSnapThreshold => EventData.get_float (unchecked((int)1428134042) /* SquaredSnapThreshold (P_SQUAREDSNAPTHRESHOLD) */);
} /* struct UpdateSmoothingEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UpdateSmoothing += ...' instead.")]
public Subscription SubscribeToUpdateSmoothing (Action<UpdateSmoothingEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UpdateSmoothingEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1999671499) /* UpdateSmoothing (E_UPDATESMOOTHING) */);
return s;
}
static UrhoEventAdapter<UpdateSmoothingEventArgs> eventAdapterForUpdateSmoothing;
public event Action<UpdateSmoothingEventArgs> UpdateSmoothing
{
add
{
if (eventAdapterForUpdateSmoothing == null)
eventAdapterForUpdateSmoothing = new UrhoEventAdapter<UpdateSmoothingEventArgs>(typeof(Scene));
eventAdapterForUpdateSmoothing.AddManagedSubscriber(handle, value, SubscribeToUpdateSmoothing);
}
remove { eventAdapterForUpdateSmoothing.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct SceneDrawableUpdateFinishedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct SceneDrawableUpdateFinishedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.SceneDrawableUpdateFinished += ...' instead.")]
public Subscription SubscribeToSceneDrawableUpdateFinished (Action<SceneDrawableUpdateFinishedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new SceneDrawableUpdateFinishedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)102612901) /* SceneDrawableUpdateFinished (E_SCENEDRAWABLEUPDATEFINISHED) */);
return s;
}
static UrhoEventAdapter<SceneDrawableUpdateFinishedEventArgs> eventAdapterForSceneDrawableUpdateFinished;
public event Action<SceneDrawableUpdateFinishedEventArgs> SceneDrawableUpdateFinished
{
add
{
if (eventAdapterForSceneDrawableUpdateFinished == null)
eventAdapterForSceneDrawableUpdateFinished = new UrhoEventAdapter<SceneDrawableUpdateFinishedEventArgs>(typeof(Scene));
eventAdapterForSceneDrawableUpdateFinished.AddManagedSubscriber(handle, value, SubscribeToSceneDrawableUpdateFinished);
}
remove { eventAdapterForSceneDrawableUpdateFinished.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct TargetPositionChangedEventArgs {
public EventDataContainer EventData;
} /* struct TargetPositionChangedEventArgs */
public partial class SmoothedTransform {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TargetPositionChanged += ...' instead.")]
public Subscription SubscribeToTargetPositionChanged (Action<TargetPositionChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TargetPositionChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3257964186) /* TargetPositionChanged (E_TARGETPOSITION) */);
return s;
}
static UrhoEventAdapter<TargetPositionChangedEventArgs> eventAdapterForTargetPositionChanged;
public event Action<TargetPositionChangedEventArgs> TargetPositionChanged
{
add
{
if (eventAdapterForTargetPositionChanged == null)
eventAdapterForTargetPositionChanged = new UrhoEventAdapter<TargetPositionChangedEventArgs>(typeof(SmoothedTransform));
eventAdapterForTargetPositionChanged.AddManagedSubscriber(handle, value, SubscribeToTargetPositionChanged);
}
remove { eventAdapterForTargetPositionChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class SmoothedTransform */
} /* namespace */
namespace Urho {
public partial struct TargetRotationChangedEventArgs {
public EventDataContainer EventData;
} /* struct TargetRotationChangedEventArgs */
public partial class SmoothedTransform {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TargetRotationChanged += ...' instead.")]
public Subscription SubscribeToTargetRotationChanged (Action<TargetRotationChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TargetRotationChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3345708709) /* TargetRotationChanged (E_TARGETROTATION) */);
return s;
}
static UrhoEventAdapter<TargetRotationChangedEventArgs> eventAdapterForTargetRotationChanged;
public event Action<TargetRotationChangedEventArgs> TargetRotationChanged
{
add
{
if (eventAdapterForTargetRotationChanged == null)
eventAdapterForTargetRotationChanged = new UrhoEventAdapter<TargetRotationChangedEventArgs>(typeof(SmoothedTransform));
eventAdapterForTargetRotationChanged.AddManagedSubscriber(handle, value, SubscribeToTargetRotationChanged);
}
remove { eventAdapterForTargetRotationChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class SmoothedTransform */
} /* namespace */
namespace Urho {
public partial struct AttributeAnimationUpdateEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct AttributeAnimationUpdateEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AttributeAnimationUpdate += ...' instead.")]
public Subscription SubscribeToAttributeAnimationUpdate (Action<AttributeAnimationUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AttributeAnimationUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2541672113) /* AttributeAnimationUpdate (E_ATTRIBUTEANIMATIONUPDATE) */);
return s;
}
static UrhoEventAdapter<AttributeAnimationUpdateEventArgs> eventAdapterForAttributeAnimationUpdate;
public event Action<AttributeAnimationUpdateEventArgs> AttributeAnimationUpdate
{
add
{
if (eventAdapterForAttributeAnimationUpdate == null)
eventAdapterForAttributeAnimationUpdate = new UrhoEventAdapter<AttributeAnimationUpdateEventArgs>(typeof(Scene));
eventAdapterForAttributeAnimationUpdate.AddManagedSubscriber(handle, value, SubscribeToAttributeAnimationUpdate);
}
remove { eventAdapterForAttributeAnimationUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct AttributeAnimationAddedEventArgs {
public EventDataContainer EventData;
public Object ObjectAnimation => EventData.get_Object (unchecked((int)2696873413) /* ObjectAnimation (P_OBJECTANIMATION) */);
public String AttributeAnimationName => EventData.get_String (unchecked((int)1102183987) /* AttributeAnimationName (P_ATTRIBUTEANIMATIONNAME) */);
} /* struct AttributeAnimationAddedEventArgs */
public partial class ObjectAnimation {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AttributeAnimationAdded += ...' instead.")]
public Subscription SubscribeToAttributeAnimationAdded (Action<AttributeAnimationAddedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AttributeAnimationAddedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1025876632) /* AttributeAnimationAdded (E_ATTRIBUTEANIMATIONADDED) */);
return s;
}
static UrhoEventAdapter<AttributeAnimationAddedEventArgs> eventAdapterForAttributeAnimationAdded;
public event Action<AttributeAnimationAddedEventArgs> AttributeAnimationAdded
{
add
{
if (eventAdapterForAttributeAnimationAdded == null)
eventAdapterForAttributeAnimationAdded = new UrhoEventAdapter<AttributeAnimationAddedEventArgs>(typeof(ObjectAnimation));
eventAdapterForAttributeAnimationAdded.AddManagedSubscriber(handle, value, SubscribeToAttributeAnimationAdded);
}
remove { eventAdapterForAttributeAnimationAdded.RemoveManagedSubscriber(handle, value); }
}
} /* class ObjectAnimation */
} /* namespace */
namespace Urho {
public partial struct AttributeAnimationRemovedEventArgs {
public EventDataContainer EventData;
public Object ObjectAnimation => EventData.get_Object (unchecked((int)2696873413) /* ObjectAnimation (P_OBJECTANIMATION) */);
public String AttributeAnimationName => EventData.get_String (unchecked((int)1102183987) /* AttributeAnimationName (P_ATTRIBUTEANIMATIONNAME) */);
} /* struct AttributeAnimationRemovedEventArgs */
public partial class ObjectAnimation {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AttributeAnimationRemoved += ...' instead.")]
public Subscription SubscribeToAttributeAnimationRemoved (Action<AttributeAnimationRemovedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AttributeAnimationRemovedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2552872248) /* AttributeAnimationRemoved (E_ATTRIBUTEANIMATIONREMOVED) */);
return s;
}
static UrhoEventAdapter<AttributeAnimationRemovedEventArgs> eventAdapterForAttributeAnimationRemoved;
public event Action<AttributeAnimationRemovedEventArgs> AttributeAnimationRemoved
{
add
{
if (eventAdapterForAttributeAnimationRemoved == null)
eventAdapterForAttributeAnimationRemoved = new UrhoEventAdapter<AttributeAnimationRemovedEventArgs>(typeof(ObjectAnimation));
eventAdapterForAttributeAnimationRemoved.AddManagedSubscriber(handle, value, SubscribeToAttributeAnimationRemoved);
}
remove { eventAdapterForAttributeAnimationRemoved.RemoveManagedSubscriber(handle, value); }
}
} /* class ObjectAnimation */
} /* namespace */
namespace Urho {
public partial struct ScenePostUpdateEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public float TimeStep => EventData.get_float (unchecked((int)3855275641) /* TimeStep (P_TIMESTEP) */);
} /* struct ScenePostUpdateEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ScenePostUpdate += ...' instead.")]
public Subscription SubscribeToScenePostUpdate (Action<ScenePostUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ScenePostUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4141122997) /* ScenePostUpdate (E_SCENEPOSTUPDATE) */);
return s;
}
static UrhoEventAdapter<ScenePostUpdateEventArgs> eventAdapterForScenePostUpdate;
public event Action<ScenePostUpdateEventArgs> ScenePostUpdate
{
add
{
if (eventAdapterForScenePostUpdate == null)
eventAdapterForScenePostUpdate = new UrhoEventAdapter<ScenePostUpdateEventArgs>(typeof(Scene));
eventAdapterForScenePostUpdate.AddManagedSubscriber(handle, value, SubscribeToScenePostUpdate);
}
remove { eventAdapterForScenePostUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct AsyncLoadProgressEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public float Progress => EventData.get_float (unchecked((int)808866957) /* Progress (P_PROGRESS) */);
public int LoadedNodes => EventData.get_int (unchecked((int)1107843820) /* LoadedNodes (P_LOADEDNODES) */);
public int TotalNodes => EventData.get_int (unchecked((int)767536109) /* TotalNodes (P_TOTALNODES) */);
public int LoadedResources => EventData.get_int (unchecked((int)3125970624) /* LoadedResources (P_LOADEDRESOURCES) */);
public int TotalResources => EventData.get_int (unchecked((int)2634364609) /* TotalResources (P_TOTALRESOURCES) */);
} /* struct AsyncLoadProgressEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AsyncLoadProgress += ...' instead.")]
public Subscription SubscribeToAsyncLoadProgress (Action<AsyncLoadProgressEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AsyncLoadProgressEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1889415919) /* AsyncLoadProgress (E_ASYNCLOADPROGRESS) */);
return s;
}
static UrhoEventAdapter<AsyncLoadProgressEventArgs> eventAdapterForAsyncLoadProgress;
public event Action<AsyncLoadProgressEventArgs> AsyncLoadProgress
{
add
{
if (eventAdapterForAsyncLoadProgress == null)
eventAdapterForAsyncLoadProgress = new UrhoEventAdapter<AsyncLoadProgressEventArgs>(typeof(Scene));
eventAdapterForAsyncLoadProgress.AddManagedSubscriber(handle, value, SubscribeToAsyncLoadProgress);
}
remove { eventAdapterForAsyncLoadProgress.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct AsyncLoadFinishedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
} /* struct AsyncLoadFinishedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.AsyncLoadFinished += ...' instead.")]
public Subscription SubscribeToAsyncLoadFinished (Action<AsyncLoadFinishedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new AsyncLoadFinishedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)738867060) /* AsyncLoadFinished (E_ASYNCLOADFINISHED) */);
return s;
}
static UrhoEventAdapter<AsyncLoadFinishedEventArgs> eventAdapterForAsyncLoadFinished;
public event Action<AsyncLoadFinishedEventArgs> AsyncLoadFinished
{
add
{
if (eventAdapterForAsyncLoadFinished == null)
eventAdapterForAsyncLoadFinished = new UrhoEventAdapter<AsyncLoadFinishedEventArgs>(typeof(Scene));
eventAdapterForAsyncLoadFinished.AddManagedSubscriber(handle, value, SubscribeToAsyncLoadFinished);
}
remove { eventAdapterForAsyncLoadFinished.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct NodeAddedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Parent => EventData.get_Node (unchecked((int)2493616522) /* Parent (P_PARENT) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
} /* struct NodeAddedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeAdded += ...' instead.")]
public Subscription SubscribeToNodeAdded (Action<NodeAddedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeAddedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)203182046) /* NodeAdded (E_NODEADDED) */);
return s;
}
static UrhoEventAdapter<NodeAddedEventArgs> eventAdapterForNodeAdded;
public event Action<NodeAddedEventArgs> NodeAdded
{
add
{
if (eventAdapterForNodeAdded == null)
eventAdapterForNodeAdded = new UrhoEventAdapter<NodeAddedEventArgs>(typeof(Scene));
eventAdapterForNodeAdded.AddManagedSubscriber(handle, value, SubscribeToNodeAdded);
}
remove { eventAdapterForNodeAdded.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct NodeRemovedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Parent => EventData.get_Node (unchecked((int)2493616522) /* Parent (P_PARENT) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
} /* struct NodeRemovedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeRemoved += ...' instead.")]
public Subscription SubscribeToNodeRemoved (Action<NodeRemovedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeRemovedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2668767102) /* NodeRemoved (E_NODEREMOVED) */);
return s;
}
static UrhoEventAdapter<NodeRemovedEventArgs> eventAdapterForNodeRemoved;
public event Action<NodeRemovedEventArgs> NodeRemoved
{
add
{
if (eventAdapterForNodeRemoved == null)
eventAdapterForNodeRemoved = new UrhoEventAdapter<NodeRemovedEventArgs>(typeof(Scene));
eventAdapterForNodeRemoved.AddManagedSubscriber(handle, value, SubscribeToNodeRemoved);
}
remove { eventAdapterForNodeRemoved.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct ComponentAddedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Component Component => EventData.get_Component (unchecked((int)2075132285) /* Component (P_COMPONENT) */);
} /* struct ComponentAddedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ComponentAdded += ...' instead.")]
public Subscription SubscribeToComponentAdded (Action<ComponentAddedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ComponentAddedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3182267459) /* ComponentAdded (E_COMPONENTADDED) */);
return s;
}
static UrhoEventAdapter<ComponentAddedEventArgs> eventAdapterForComponentAdded;
public event Action<ComponentAddedEventArgs> ComponentAdded
{
add
{
if (eventAdapterForComponentAdded == null)
eventAdapterForComponentAdded = new UrhoEventAdapter<ComponentAddedEventArgs>(typeof(Scene));
eventAdapterForComponentAdded.AddManagedSubscriber(handle, value, SubscribeToComponentAdded);
}
remove { eventAdapterForComponentAdded.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct ComponentRemovedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Component Component => EventData.get_Component (unchecked((int)2075132285) /* Component (P_COMPONENT) */);
} /* struct ComponentRemovedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ComponentRemoved += ...' instead.")]
public Subscription SubscribeToComponentRemoved (Action<ComponentRemovedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ComponentRemovedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1434550627) /* ComponentRemoved (E_COMPONENTREMOVED) */);
return s;
}
static UrhoEventAdapter<ComponentRemovedEventArgs> eventAdapterForComponentRemoved;
public event Action<ComponentRemovedEventArgs> ComponentRemoved
{
add
{
if (eventAdapterForComponentRemoved == null)
eventAdapterForComponentRemoved = new UrhoEventAdapter<ComponentRemovedEventArgs>(typeof(Scene));
eventAdapterForComponentRemoved.AddManagedSubscriber(handle, value, SubscribeToComponentRemoved);
}
remove { eventAdapterForComponentRemoved.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct NodeNameChangedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
} /* struct NodeNameChangedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeNameChanged += ...' instead.")]
public Subscription SubscribeToNodeNameChanged (Action<NodeNameChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeNameChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4239410247) /* NodeNameChanged (E_NODENAMECHANGED) */);
return s;
}
static UrhoEventAdapter<NodeNameChangedEventArgs> eventAdapterForNodeNameChanged;
public event Action<NodeNameChangedEventArgs> NodeNameChanged
{
add
{
if (eventAdapterForNodeNameChanged == null)
eventAdapterForNodeNameChanged = new UrhoEventAdapter<NodeNameChangedEventArgs>(typeof(Scene));
eventAdapterForNodeNameChanged.AddManagedSubscriber(handle, value, SubscribeToNodeNameChanged);
}
remove { eventAdapterForNodeNameChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct NodeEnabledChangedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
} /* struct NodeEnabledChangedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeEnabledChanged += ...' instead.")]
public Subscription SubscribeToNodeEnabledChanged (Action<NodeEnabledChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeEnabledChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2985090517) /* NodeEnabledChanged (E_NODEENABLEDCHANGED) */);
return s;
}
static UrhoEventAdapter<NodeEnabledChangedEventArgs> eventAdapterForNodeEnabledChanged;
public event Action<NodeEnabledChangedEventArgs> NodeEnabledChanged
{
add
{
if (eventAdapterForNodeEnabledChanged == null)
eventAdapterForNodeEnabledChanged = new UrhoEventAdapter<NodeEnabledChangedEventArgs>(typeof(Scene));
eventAdapterForNodeEnabledChanged.AddManagedSubscriber(handle, value, SubscribeToNodeEnabledChanged);
}
remove { eventAdapterForNodeEnabledChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct NodeTagAddedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public String Tag => EventData.get_String (unchecked((int)700329626) /* Tag (P_TAG) */);
} /* struct NodeTagAddedEventArgs */
} /* namespace */
namespace Urho {
public partial struct NodeTagRemovedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public String Tag => EventData.get_String (unchecked((int)700329626) /* Tag (P_TAG) */);
} /* struct NodeTagRemovedEventArgs */
} /* namespace */
namespace Urho {
public partial struct ComponentEnabledChangedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Component Component => EventData.get_Component (unchecked((int)2075132285) /* Component (P_COMPONENT) */);
} /* struct ComponentEnabledChangedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ComponentEnabledChanged += ...' instead.")]
public Subscription SubscribeToComponentEnabledChanged (Action<ComponentEnabledChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ComponentEnabledChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2472363184) /* ComponentEnabledChanged (E_COMPONENTENABLEDCHANGED) */);
return s;
}
static UrhoEventAdapter<ComponentEnabledChangedEventArgs> eventAdapterForComponentEnabledChanged;
public event Action<ComponentEnabledChangedEventArgs> ComponentEnabledChanged
{
add
{
if (eventAdapterForComponentEnabledChanged == null)
eventAdapterForComponentEnabledChanged = new UrhoEventAdapter<ComponentEnabledChangedEventArgs>(typeof(Scene));
eventAdapterForComponentEnabledChanged.AddManagedSubscriber(handle, value, SubscribeToComponentEnabledChanged);
}
remove { eventAdapterForComponentEnabledChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct TemporaryChangedEventArgs {
public EventDataContainer EventData;
public Serializable Serializable => EventData.get_Serializable (unchecked((int)3034077727) /* Serializable (P_SERIALIZABLE) */);
} /* struct TemporaryChangedEventArgs */
public partial class Serializable {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TemporaryChanged += ...' instead.")]
public Subscription SubscribeToTemporaryChanged (Action<TemporaryChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TemporaryChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)929762979) /* TemporaryChanged (E_TEMPORARYCHANGED) */);
return s;
}
static UrhoEventAdapter<TemporaryChangedEventArgs> eventAdapterForTemporaryChanged;
public event Action<TemporaryChangedEventArgs> TemporaryChanged
{
add
{
if (eventAdapterForTemporaryChanged == null)
eventAdapterForTemporaryChanged = new UrhoEventAdapter<TemporaryChangedEventArgs>(typeof(Serializable));
eventAdapterForTemporaryChanged.AddManagedSubscriber(handle, value, SubscribeToTemporaryChanged);
}
remove { eventAdapterForTemporaryChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Serializable */
} /* namespace */
namespace Urho {
public partial struct NodeClonedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public Node CloneNode => EventData.get_Node (unchecked((int)2672087391) /* CloneNode (P_CLONENODE) */);
} /* struct NodeClonedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NodeCloned += ...' instead.")]
public Subscription SubscribeToNodeCloned (Action<NodeClonedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NodeClonedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2597054089) /* NodeCloned (E_NODECLONED) */);
return s;
}
static UrhoEventAdapter<NodeClonedEventArgs> eventAdapterForNodeCloned;
public event Action<NodeClonedEventArgs> NodeCloned
{
add
{
if (eventAdapterForNodeCloned == null)
eventAdapterForNodeCloned = new UrhoEventAdapter<NodeClonedEventArgs>(typeof(Scene));
eventAdapterForNodeCloned.AddManagedSubscriber(handle, value, SubscribeToNodeCloned);
}
remove { eventAdapterForNodeCloned.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct ComponentClonedEventArgs {
public EventDataContainer EventData;
public Scene Scene => EventData.get_Scene (unchecked((int)904904844) /* Scene (P_SCENE) */);
public Component Component => EventData.get_Component (unchecked((int)2075132285) /* Component (P_COMPONENT) */);
public Component CloneComponent => EventData.get_Component (unchecked((int)2021460096) /* CloneComponent (P_CLONECOMPONENT) */);
} /* struct ComponentClonedEventArgs */
public partial class Scene {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ComponentCloned += ...' instead.")]
public Subscription SubscribeToComponentCloned (Action<ComponentClonedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ComponentClonedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2314126180) /* ComponentCloned (E_COMPONENTCLONED) */);
return s;
}
static UrhoEventAdapter<ComponentClonedEventArgs> eventAdapterForComponentCloned;
public event Action<ComponentClonedEventArgs> ComponentCloned
{
add
{
if (eventAdapterForComponentCloned == null)
eventAdapterForComponentCloned = new UrhoEventAdapter<ComponentClonedEventArgs>(typeof(Scene));
eventAdapterForComponentCloned.AddManagedSubscriber(handle, value, SubscribeToComponentCloned);
}
remove { eventAdapterForComponentCloned.RemoveManagedSubscriber(handle, value); }
}
} /* class Scene */
} /* namespace */
namespace Urho {
public partial struct InterceptNetworkUpdateEventArgs {
public EventDataContainer EventData;
public Serializable Serializable => EventData.get_Serializable (unchecked((int)3034077727) /* Serializable (P_SERIALIZABLE) */);
public uint TimeStamp => EventData.get_uint (unchecked((int)1634240886) /* TimeStamp (P_TIMESTAMP) */);
public uint Index => EventData.get_uint (unchecked((int)2381836562) /* Index (P_INDEX) */);
public String Name => EventData.get_String (unchecked((int)1564775755) /* Name (P_NAME) */);
public Variant Value => EventData.get_Variant (unchecked((int)2820713041) /* Value (P_VALUE) */);
} /* struct InterceptNetworkUpdateEventArgs */
public partial class Serializable {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.InterceptNetworkUpdate += ...' instead.")]
public Subscription SubscribeToInterceptNetworkUpdate (Action<InterceptNetworkUpdateEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new InterceptNetworkUpdateEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1302634037) /* InterceptNetworkUpdate (E_INTERCEPTNETWORKUPDATE) */);
return s;
}
static UrhoEventAdapter<InterceptNetworkUpdateEventArgs> eventAdapterForInterceptNetworkUpdate;
public event Action<InterceptNetworkUpdateEventArgs> InterceptNetworkUpdate
{
add
{
if (eventAdapterForInterceptNetworkUpdate == null)
eventAdapterForInterceptNetworkUpdate = new UrhoEventAdapter<InterceptNetworkUpdateEventArgs>(typeof(Serializable));
eventAdapterForInterceptNetworkUpdate.AddManagedSubscriber(handle, value, SubscribeToInterceptNetworkUpdate);
}
remove { eventAdapterForInterceptNetworkUpdate.RemoveManagedSubscriber(handle, value); }
}
} /* class Serializable */
} /* namespace */
namespace Urho.Gui {
public partial struct UIMouseClickEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct UIMouseClickEventArgs */
public partial class UI {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UIMouseClick += ...' instead.")]
public Subscription SubscribeToUIMouseClick (Action<UIMouseClickEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UIMouseClickEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2461156151) /* UIMouseClick (E_UIMOUSECLICK) */);
return s;
}
static UrhoEventAdapter<UIMouseClickEventArgs> eventAdapterForUIMouseClick;
public event Action<UIMouseClickEventArgs> UIMouseClick
{
add
{
if (eventAdapterForUIMouseClick == null)
eventAdapterForUIMouseClick = new UrhoEventAdapter<UIMouseClickEventArgs>(typeof(UI));
eventAdapterForUIMouseClick.AddManagedSubscriber(handle, value, SubscribeToUIMouseClick);
}
remove { eventAdapterForUIMouseClick.RemoveManagedSubscriber(handle, value); }
}
} /* class UI */
} /* namespace */
namespace Urho.Gui {
public partial struct UIMouseClickEndEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public UIElement BeginElement => EventData.get_UIElement (unchecked((int)3197387891) /* BeginElement (P_BEGINELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct UIMouseClickEndEventArgs */
public partial class UI {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UIMouseClickEnd += ...' instead.")]
public Subscription SubscribeToUIMouseClickEnd (Action<UIMouseClickEndEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UIMouseClickEndEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2093948740) /* UIMouseClickEnd (E_UIMOUSECLICKEND) */);
return s;
}
static UrhoEventAdapter<UIMouseClickEndEventArgs> eventAdapterForUIMouseClickEnd;
public event Action<UIMouseClickEndEventArgs> UIMouseClickEnd
{
add
{
if (eventAdapterForUIMouseClickEnd == null)
eventAdapterForUIMouseClickEnd = new UrhoEventAdapter<UIMouseClickEndEventArgs>(typeof(UI));
eventAdapterForUIMouseClickEnd.AddManagedSubscriber(handle, value, SubscribeToUIMouseClickEnd);
}
remove { eventAdapterForUIMouseClickEnd.RemoveManagedSubscriber(handle, value); }
}
} /* class UI */
} /* namespace */
namespace Urho.Gui {
public partial struct UIMouseDoubleClickEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int XBegin => EventData.get_int (unchecked((int)2961415793) /* XBegin (P_XBEGIN) */);
public int YBegin => EventData.get_int (unchecked((int)3333423024) /* YBegin (P_YBEGIN) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct UIMouseDoubleClickEventArgs */
} /* namespace */
namespace Urho {
public partial struct ClickEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct ClickEventArgs */
} /* namespace */
namespace Urho {
public partial struct ClickEndEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public UIElement BeginElement => EventData.get_UIElement (unchecked((int)3197387891) /* BeginElement (P_BEGINELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct ClickEndEventArgs */
} /* namespace */
namespace Urho {
public partial struct DoubleClickEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int XBegin => EventData.get_int (unchecked((int)2961415793) /* XBegin (P_XBEGIN) */);
public int YBegin => EventData.get_int (unchecked((int)3333423024) /* YBegin (P_YBEGIN) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct DoubleClickEventArgs */
} /* namespace */
namespace Urho.Gui {
public partial struct DragDropTestEventArgs {
public EventDataContainer EventData;
public UIElement Source => EventData.get_UIElement (unchecked((int)537141339) /* Source (P_SOURCE) */);
public UIElement Target => EventData.get_UIElement (unchecked((int)3997578065) /* Target (P_TARGET) */);
public bool Accept => EventData.get_bool (unchecked((int)368861736) /* Accept (P_ACCEPT) */);
} /* struct DragDropTestEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DragDropTest += ...' instead.")]
public Subscription SubscribeToDragDropTest (Action<DragDropTestEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DragDropTestEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3346950837) /* DragDropTest (E_DRAGDROPTEST) */);
return s;
}
static UrhoEventAdapter<DragDropTestEventArgs> eventAdapterForDragDropTest;
public event Action<DragDropTestEventArgs> DragDropTest
{
add
{
if (eventAdapterForDragDropTest == null)
eventAdapterForDragDropTest = new UrhoEventAdapter<DragDropTestEventArgs>(typeof(UIElement));
eventAdapterForDragDropTest.AddManagedSubscriber(handle, value, SubscribeToDragDropTest);
}
remove { eventAdapterForDragDropTest.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct DragDropFinishEventArgs {
public EventDataContainer EventData;
public UIElement Source => EventData.get_UIElement (unchecked((int)537141339) /* Source (P_SOURCE) */);
public UIElement Target => EventData.get_UIElement (unchecked((int)3997578065) /* Target (P_TARGET) */);
public bool Accept => EventData.get_bool (unchecked((int)368861736) /* Accept (P_ACCEPT) */);
} /* struct DragDropFinishEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DragDropFinish += ...' instead.")]
public Subscription SubscribeToDragDropFinish (Action<DragDropFinishEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DragDropFinishEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1605691702) /* DragDropFinish (E_DRAGDROPFINISH) */);
return s;
}
static UrhoEventAdapter<DragDropFinishEventArgs> eventAdapterForDragDropFinish;
public event Action<DragDropFinishEventArgs> DragDropFinish
{
add
{
if (eventAdapterForDragDropFinish == null)
eventAdapterForDragDropFinish = new UrhoEventAdapter<DragDropFinishEventArgs>(typeof(UIElement));
eventAdapterForDragDropFinish.AddManagedSubscriber(handle, value, SubscribeToDragDropFinish);
}
remove { eventAdapterForDragDropFinish.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct FocusChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public UIElement ClickedElement => EventData.get_UIElement (unchecked((int)1271831029) /* ClickedElement (P_CLICKEDELEMENT) */);
} /* struct FocusChangedEventArgs */
public partial class UI {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.FocusChanged += ...' instead.")]
public Subscription SubscribeToFocusChanged (Action<FocusChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new FocusChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1592655292) /* FocusChanged (E_FOCUSCHANGED) */);
return s;
}
static UrhoEventAdapter<FocusChangedEventArgs> eventAdapterForFocusChanged;
public event Action<FocusChangedEventArgs> FocusChanged
{
add
{
if (eventAdapterForFocusChanged == null)
eventAdapterForFocusChanged = new UrhoEventAdapter<FocusChangedEventArgs>(typeof(UI));
eventAdapterForFocusChanged.AddManagedSubscriber(handle, value, SubscribeToFocusChanged);
}
remove { eventAdapterForFocusChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class UI */
} /* namespace */
namespace Urho.Gui {
public partial struct NameChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct NameChangedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.NameChanged += ...' instead.")]
public Subscription SubscribeToNameChanged (Action<NameChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new NameChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2839425769) /* NameChanged (E_NAMECHANGED) */);
return s;
}
static UrhoEventAdapter<NameChangedEventArgs> eventAdapterForNameChanged;
public event Action<NameChangedEventArgs> NameChanged
{
add
{
if (eventAdapterForNameChanged == null)
eventAdapterForNameChanged = new UrhoEventAdapter<NameChangedEventArgs>(typeof(UIElement));
eventAdapterForNameChanged.AddManagedSubscriber(handle, value, SubscribeToNameChanged);
}
remove { eventAdapterForNameChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct ResizedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int Width => EventData.get_int (unchecked((int)1548882694) /* Width (P_WIDTH) */);
public int Height => EventData.get_int (unchecked((int)1361627751) /* Height (P_HEIGHT) */);
public int DX => EventData.get_int (unchecked((int)4460820) /* DX (P_DX) */);
public int DY => EventData.get_int (unchecked((int)4460821) /* DY (P_DY) */);
} /* struct ResizedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Resized += ...' instead.")]
public Subscription SubscribeToResized (Action<ResizedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ResizedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)775261104) /* Resized (E_RESIZED) */);
return s;
}
static UrhoEventAdapter<ResizedEventArgs> eventAdapterForResized;
public event Action<ResizedEventArgs> Resized
{
add
{
if (eventAdapterForResized == null)
eventAdapterForResized = new UrhoEventAdapter<ResizedEventArgs>(typeof(UIElement));
eventAdapterForResized.AddManagedSubscriber(handle, value, SubscribeToResized);
}
remove { eventAdapterForResized.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct PositionedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
} /* struct PositionedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Positioned += ...' instead.")]
public Subscription SubscribeToPositioned (Action<PositionedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PositionedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1458048840) /* Positioned (E_POSITIONED) */);
return s;
}
static UrhoEventAdapter<PositionedEventArgs> eventAdapterForPositioned;
public event Action<PositionedEventArgs> Positioned
{
add
{
if (eventAdapterForPositioned == null)
eventAdapterForPositioned = new UrhoEventAdapter<PositionedEventArgs>(typeof(UIElement));
eventAdapterForPositioned.AddManagedSubscriber(handle, value, SubscribeToPositioned);
}
remove { eventAdapterForPositioned.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct VisibleChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public bool Visible => EventData.get_bool (unchecked((int)3553122386) /* Visible (P_VISIBLE) */);
} /* struct VisibleChangedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.VisibleChanged += ...' instead.")]
public Subscription SubscribeToVisibleChanged (Action<VisibleChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new VisibleChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2547747874) /* VisibleChanged (E_VISIBLECHANGED) */);
return s;
}
static UrhoEventAdapter<VisibleChangedEventArgs> eventAdapterForVisibleChanged;
public event Action<VisibleChangedEventArgs> VisibleChanged
{
add
{
if (eventAdapterForVisibleChanged == null)
eventAdapterForVisibleChanged = new UrhoEventAdapter<VisibleChangedEventArgs>(typeof(UIElement));
eventAdapterForVisibleChanged.AddManagedSubscriber(handle, value, SubscribeToVisibleChanged);
}
remove { eventAdapterForVisibleChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct FocusedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public bool ByKey => EventData.get_bool (unchecked((int)2784808104) /* ByKey (P_BYKEY) */);
} /* struct FocusedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Focused += ...' instead.")]
public Subscription SubscribeToFocused (Action<FocusedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new FocusedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3993474679) /* Focused (E_FOCUSED) */);
return s;
}
static UrhoEventAdapter<FocusedEventArgs> eventAdapterForFocused;
public event Action<FocusedEventArgs> Focused
{
add
{
if (eventAdapterForFocused == null)
eventAdapterForFocused = new UrhoEventAdapter<FocusedEventArgs>(typeof(UIElement));
eventAdapterForFocused.AddManagedSubscriber(handle, value, SubscribeToFocused);
}
remove { eventAdapterForFocused.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct DefocusedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct DefocusedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Defocused += ...' instead.")]
public Subscription SubscribeToDefocused (Action<DefocusedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DefocusedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)473366326) /* Defocused (E_DEFOCUSED) */);
return s;
}
static UrhoEventAdapter<DefocusedEventArgs> eventAdapterForDefocused;
public event Action<DefocusedEventArgs> Defocused
{
add
{
if (eventAdapterForDefocused == null)
eventAdapterForDefocused = new UrhoEventAdapter<DefocusedEventArgs>(typeof(UIElement));
eventAdapterForDefocused.AddManagedSubscriber(handle, value, SubscribeToDefocused);
}
remove { eventAdapterForDefocused.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct LayoutUpdatedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct LayoutUpdatedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.LayoutUpdated += ...' instead.")]
public Subscription SubscribeToLayoutUpdated (Action<LayoutUpdatedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new LayoutUpdatedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2752840657) /* LayoutUpdated (E_LAYOUTUPDATED) */);
return s;
}
static UrhoEventAdapter<LayoutUpdatedEventArgs> eventAdapterForLayoutUpdated;
public event Action<LayoutUpdatedEventArgs> LayoutUpdated
{
add
{
if (eventAdapterForLayoutUpdated == null)
eventAdapterForLayoutUpdated = new UrhoEventAdapter<LayoutUpdatedEventArgs>(typeof(UIElement));
eventAdapterForLayoutUpdated.AddManagedSubscriber(handle, value, SubscribeToLayoutUpdated);
}
remove { eventAdapterForLayoutUpdated.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct PressedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct PressedEventArgs */
public partial class Button {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Pressed += ...' instead.")]
public Subscription SubscribeToPressed (Action<PressedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PressedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3104122818) /* Pressed (E_PRESSED) */);
return s;
}
static UrhoEventAdapter<PressedEventArgs> eventAdapterForPressed;
public event Action<PressedEventArgs> Pressed
{
add
{
if (eventAdapterForPressed == null)
eventAdapterForPressed = new UrhoEventAdapter<PressedEventArgs>(typeof(Button));
eventAdapterForPressed.AddManagedSubscriber(handle, value, SubscribeToPressed);
}
remove { eventAdapterForPressed.RemoveManagedSubscriber(handle, value); }
}
} /* class Button */
} /* namespace */
namespace Urho.Gui {
public partial struct ReleasedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct ReleasedEventArgs */
public partial class Button {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Released += ...' instead.")]
public Subscription SubscribeToReleased (Action<ReleasedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ReleasedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3148919453) /* Released (E_RELEASED) */);
return s;
}
static UrhoEventAdapter<ReleasedEventArgs> eventAdapterForReleased;
public event Action<ReleasedEventArgs> Released
{
add
{
if (eventAdapterForReleased == null)
eventAdapterForReleased = new UrhoEventAdapter<ReleasedEventArgs>(typeof(Button));
eventAdapterForReleased.AddManagedSubscriber(handle, value, SubscribeToReleased);
}
remove { eventAdapterForReleased.RemoveManagedSubscriber(handle, value); }
}
} /* class Button */
} /* namespace */
namespace Urho.Gui {
public partial struct ToggledEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public bool State => EventData.get_bool (unchecked((int)1257332913) /* State (P_STATE) */);
} /* struct ToggledEventArgs */
public partial class CheckBox {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.Toggled += ...' instead.")]
public Subscription SubscribeToToggled (Action<ToggledEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ToggledEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)624969360) /* Toggled (E_TOGGLED) */);
return s;
}
static UrhoEventAdapter<ToggledEventArgs> eventAdapterForToggled;
public event Action<ToggledEventArgs> Toggled
{
add
{
if (eventAdapterForToggled == null)
eventAdapterForToggled = new UrhoEventAdapter<ToggledEventArgs>(typeof(CheckBox));
eventAdapterForToggled.AddManagedSubscriber(handle, value, SubscribeToToggled);
}
remove { eventAdapterForToggled.RemoveManagedSubscriber(handle, value); }
}
} /* class CheckBox */
} /* namespace */
namespace Urho.Gui {
public partial struct SliderChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public float Value => EventData.get_float (unchecked((int)2820713041) /* Value (P_VALUE) */);
} /* struct SliderChangedEventArgs */
public partial class Slider {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.SliderChanged += ...' instead.")]
public Subscription SubscribeToSliderChanged (Action<SliderChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new SliderChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)373001427) /* SliderChanged (E_SLIDERCHANGED) */);
return s;
}
static UrhoEventAdapter<SliderChangedEventArgs> eventAdapterForSliderChanged;
public event Action<SliderChangedEventArgs> SliderChanged
{
add
{
if (eventAdapterForSliderChanged == null)
eventAdapterForSliderChanged = new UrhoEventAdapter<SliderChangedEventArgs>(typeof(Slider));
eventAdapterForSliderChanged.AddManagedSubscriber(handle, value, SubscribeToSliderChanged);
}
remove { eventAdapterForSliderChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Slider */
} /* namespace */
namespace Urho.Gui {
public partial struct SliderPagedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int Offset => EventData.get_int (unchecked((int)2862422323) /* Offset (P_OFFSET) */);
public bool Pressed => EventData.get_bool (unchecked((int)3104122818) /* Pressed (P_PRESSED) */);
} /* struct SliderPagedEventArgs */
public partial class Slider {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.SliderPaged += ...' instead.")]
public Subscription SubscribeToSliderPaged (Action<SliderPagedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new SliderPagedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3378542132) /* SliderPaged (E_SLIDERPAGED) */);
return s;
}
static UrhoEventAdapter<SliderPagedEventArgs> eventAdapterForSliderPaged;
public event Action<SliderPagedEventArgs> SliderPaged
{
add
{
if (eventAdapterForSliderPaged == null)
eventAdapterForSliderPaged = new UrhoEventAdapter<SliderPagedEventArgs>(typeof(Slider));
eventAdapterForSliderPaged.AddManagedSubscriber(handle, value, SubscribeToSliderPaged);
}
remove { eventAdapterForSliderPaged.RemoveManagedSubscriber(handle, value); }
}
} /* class Slider */
} /* namespace */
namespace Urho {
public partial struct ProgressBarChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public float Value => EventData.get_float (unchecked((int)2820713041) /* Value (P_VALUE) */);
} /* struct ProgressBarChangedEventArgs */
} /* namespace */
namespace Urho.Gui {
public partial struct ScrollBarChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public float Value => EventData.get_float (unchecked((int)2820713041) /* Value (P_VALUE) */);
} /* struct ScrollBarChangedEventArgs */
public partial class ScrollBar {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ScrollBarChanged += ...' instead.")]
public Subscription SubscribeToScrollBarChanged (Action<ScrollBarChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ScrollBarChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)4120202222) /* ScrollBarChanged (E_SCROLLBARCHANGED) */);
return s;
}
static UrhoEventAdapter<ScrollBarChangedEventArgs> eventAdapterForScrollBarChanged;
public event Action<ScrollBarChangedEventArgs> ScrollBarChanged
{
add
{
if (eventAdapterForScrollBarChanged == null)
eventAdapterForScrollBarChanged = new UrhoEventAdapter<ScrollBarChangedEventArgs>(typeof(ScrollBar));
eventAdapterForScrollBarChanged.AddManagedSubscriber(handle, value, SubscribeToScrollBarChanged);
}
remove { eventAdapterForScrollBarChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class ScrollBar */
} /* namespace */
namespace Urho.Gui {
public partial struct ViewChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
} /* struct ViewChangedEventArgs */
public partial class ScrollView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ViewChanged += ...' instead.")]
public Subscription SubscribeToViewChanged (Action<ViewChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ViewChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1194016847) /* ViewChanged (E_VIEWCHANGED) */);
return s;
}
static UrhoEventAdapter<ViewChangedEventArgs> eventAdapterForViewChanged;
public event Action<ViewChangedEventArgs> ViewChanged
{
add
{
if (eventAdapterForViewChanged == null)
eventAdapterForViewChanged = new UrhoEventAdapter<ViewChangedEventArgs>(typeof(ScrollView));
eventAdapterForViewChanged.AddManagedSubscriber(handle, value, SubscribeToViewChanged);
}
remove { eventAdapterForViewChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class ScrollView */
} /* namespace */
namespace Urho.Gui {
public partial struct ModalChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public bool Modal => EventData.get_bool (unchecked((int)3425451213) /* Modal (P_MODAL) */);
} /* struct ModalChangedEventArgs */
public partial class Window {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ModalChanged += ...' instead.")]
public Subscription SubscribeToModalChanged (Action<ModalChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ModalChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2022117095) /* ModalChanged (E_MODALCHANGED) */);
return s;
}
static UrhoEventAdapter<ModalChangedEventArgs> eventAdapterForModalChanged;
public event Action<ModalChangedEventArgs> ModalChanged
{
add
{
if (eventAdapterForModalChanged == null)
eventAdapterForModalChanged = new UrhoEventAdapter<ModalChangedEventArgs>(typeof(Window));
eventAdapterForModalChanged.AddManagedSubscriber(handle, value, SubscribeToModalChanged);
}
remove { eventAdapterForModalChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class Window */
} /* namespace */
namespace Urho.Gui {
public partial struct TextEntryEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public String Text => EventData.get_String (unchecked((int)1987099277) /* Text (P_TEXT) */);
} /* struct TextEntryEventArgs */
public partial class LineEdit {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TextEntry += ...' instead.")]
public Subscription SubscribeToTextEntry (Action<TextEntryEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TextEntryEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2430453253) /* TextEntry (E_TEXTENTRY) */);
return s;
}
static UrhoEventAdapter<TextEntryEventArgs> eventAdapterForTextEntry;
public event Action<TextEntryEventArgs> TextEntry
{
add
{
if (eventAdapterForTextEntry == null)
eventAdapterForTextEntry = new UrhoEventAdapter<TextEntryEventArgs>(typeof(LineEdit));
eventAdapterForTextEntry.AddManagedSubscriber(handle, value, SubscribeToTextEntry);
}
remove { eventAdapterForTextEntry.RemoveManagedSubscriber(handle, value); }
}
} /* class LineEdit */
} /* namespace */
namespace Urho.Gui {
public partial struct TextChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public String Text => EventData.get_String (unchecked((int)1987099277) /* Text (P_TEXT) */);
} /* struct TextChangedEventArgs */
public partial class LineEdit {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TextChanged += ...' instead.")]
public Subscription SubscribeToTextChanged (Action<TextChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TextChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1985126695) /* TextChanged (E_TEXTCHANGED) */);
return s;
}
static UrhoEventAdapter<TextChangedEventArgs> eventAdapterForTextChanged;
public event Action<TextChangedEventArgs> TextChanged
{
add
{
if (eventAdapterForTextChanged == null)
eventAdapterForTextChanged = new UrhoEventAdapter<TextChangedEventArgs>(typeof(LineEdit));
eventAdapterForTextChanged.AddManagedSubscriber(handle, value, SubscribeToTextChanged);
}
remove { eventAdapterForTextChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class LineEdit */
} /* namespace */
namespace Urho.Gui {
public partial struct TextFinishedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public String Text => EventData.get_String (unchecked((int)1987099277) /* Text (P_TEXT) */);
public float Value => EventData.get_float (unchecked((int)2820713041) /* Value (P_VALUE) */);
} /* struct TextFinishedEventArgs */
public partial class LineEdit {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.TextFinished += ...' instead.")]
public Subscription SubscribeToTextFinished (Action<TextFinishedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new TextFinishedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2068625823) /* TextFinished (E_TEXTFINISHED) */);
return s;
}
static UrhoEventAdapter<TextFinishedEventArgs> eventAdapterForTextFinished;
public event Action<TextFinishedEventArgs> TextFinished
{
add
{
if (eventAdapterForTextFinished == null)
eventAdapterForTextFinished = new UrhoEventAdapter<TextFinishedEventArgs>(typeof(LineEdit));
eventAdapterForTextFinished.AddManagedSubscriber(handle, value, SubscribeToTextFinished);
}
remove { eventAdapterForTextFinished.RemoveManagedSubscriber(handle, value); }
}
} /* class LineEdit */
} /* namespace */
namespace Urho.Gui {
public partial struct MenuSelectedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct MenuSelectedEventArgs */
public partial class Menu {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MenuSelected += ...' instead.")]
public Subscription SubscribeToMenuSelected (Action<MenuSelectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MenuSelectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3589118522) /* MenuSelected (E_MENUSELECTED) */);
return s;
}
static UrhoEventAdapter<MenuSelectedEventArgs> eventAdapterForMenuSelected;
public event Action<MenuSelectedEventArgs> MenuSelected
{
add
{
if (eventAdapterForMenuSelected == null)
eventAdapterForMenuSelected = new UrhoEventAdapter<MenuSelectedEventArgs>(typeof(Menu));
eventAdapterForMenuSelected.AddManagedSubscriber(handle, value, SubscribeToMenuSelected);
}
remove { eventAdapterForMenuSelected.RemoveManagedSubscriber(handle, value); }
}
} /* class Menu */
} /* namespace */
namespace Urho.Gui {
public partial struct ItemSelectedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int Selection => EventData.get_int (unchecked((int)1855292044) /* Selection (P_SELECTION) */);
} /* struct ItemSelectedEventArgs */
public partial class DropDownList {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ItemSelected += ...' instead.")]
public Subscription SubscribeToItemSelected (Action<ItemSelectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ItemSelectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3482883470) /* ItemSelected (E_ITEMSELECTED) */);
return s;
}
static UrhoEventAdapter<ItemSelectedEventArgs> eventAdapterForItemSelected;
public event Action<ItemSelectedEventArgs> ItemSelected
{
add
{
if (eventAdapterForItemSelected == null)
eventAdapterForItemSelected = new UrhoEventAdapter<ItemSelectedEventArgs>(typeof(DropDownList));
eventAdapterForItemSelected.AddManagedSubscriber(handle, value, SubscribeToItemSelected);
}
remove { eventAdapterForItemSelected.RemoveManagedSubscriber(handle, value); }
}
} /* class DropDownList */
public partial class ListView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ItemSelected += ...' instead.")]
public Subscription SubscribeToItemSelected (Action<ItemSelectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ItemSelectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3482883470) /* ItemSelected (E_ITEMSELECTED) */);
return s;
}
static UrhoEventAdapter<ItemSelectedEventArgs> eventAdapterForItemSelected;
public event Action<ItemSelectedEventArgs> ItemSelected
{
add
{
if (eventAdapterForItemSelected == null)
eventAdapterForItemSelected = new UrhoEventAdapter<ItemSelectedEventArgs>(typeof(ListView));
eventAdapterForItemSelected.AddManagedSubscriber(handle, value, SubscribeToItemSelected);
}
remove { eventAdapterForItemSelected.RemoveManagedSubscriber(handle, value); }
}
} /* class ListView */
} /* namespace */
namespace Urho.Gui {
public partial struct ItemDeselectedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int Selection => EventData.get_int (unchecked((int)1855292044) /* Selection (P_SELECTION) */);
} /* struct ItemDeselectedEventArgs */
public partial class ListView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ItemDeselected += ...' instead.")]
public Subscription SubscribeToItemDeselected (Action<ItemDeselectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ItemDeselectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2984211215) /* ItemDeselected (E_ITEMDESELECTED) */);
return s;
}
static UrhoEventAdapter<ItemDeselectedEventArgs> eventAdapterForItemDeselected;
public event Action<ItemDeselectedEventArgs> ItemDeselected
{
add
{
if (eventAdapterForItemDeselected == null)
eventAdapterForItemDeselected = new UrhoEventAdapter<ItemDeselectedEventArgs>(typeof(ListView));
eventAdapterForItemDeselected.AddManagedSubscriber(handle, value, SubscribeToItemDeselected);
}
remove { eventAdapterForItemDeselected.RemoveManagedSubscriber(handle, value); }
}
} /* class ListView */
} /* namespace */
namespace Urho.Gui {
public partial struct SelectionChangedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct SelectionChangedEventArgs */
public partial class ListView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.SelectionChanged += ...' instead.")]
public Subscription SubscribeToSelectionChanged (Action<SelectionChangedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new SelectionChangedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2902075240) /* SelectionChanged (E_SELECTIONCHANGED) */);
return s;
}
static UrhoEventAdapter<SelectionChangedEventArgs> eventAdapterForSelectionChanged;
public event Action<SelectionChangedEventArgs> SelectionChanged
{
add
{
if (eventAdapterForSelectionChanged == null)
eventAdapterForSelectionChanged = new UrhoEventAdapter<SelectionChangedEventArgs>(typeof(ListView));
eventAdapterForSelectionChanged.AddManagedSubscriber(handle, value, SubscribeToSelectionChanged);
}
remove { eventAdapterForSelectionChanged.RemoveManagedSubscriber(handle, value); }
}
} /* class ListView */
} /* namespace */
namespace Urho.Gui {
public partial struct ItemClickedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public UIElement Item => EventData.get_UIElement (unchecked((int)2113250867) /* Item (P_ITEM) */);
public int Selection => EventData.get_int (unchecked((int)1855292044) /* Selection (P_SELECTION) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct ItemClickedEventArgs */
public partial class ListView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ItemClicked += ...' instead.")]
public Subscription SubscribeToItemClicked (Action<ItemClickedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ItemClickedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3417570004) /* ItemClicked (E_ITEMCLICKED) */);
return s;
}
static UrhoEventAdapter<ItemClickedEventArgs> eventAdapterForItemClicked;
public event Action<ItemClickedEventArgs> ItemClicked
{
add
{
if (eventAdapterForItemClicked == null)
eventAdapterForItemClicked = new UrhoEventAdapter<ItemClickedEventArgs>(typeof(ListView));
eventAdapterForItemClicked.AddManagedSubscriber(handle, value, SubscribeToItemClicked);
}
remove { eventAdapterForItemClicked.RemoveManagedSubscriber(handle, value); }
}
} /* class ListView */
} /* namespace */
namespace Urho.Gui {
public partial struct ItemDoubleClickedEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public UIElement Item => EventData.get_UIElement (unchecked((int)2113250867) /* Item (P_ITEM) */);
public int Selection => EventData.get_int (unchecked((int)1855292044) /* Selection (P_SELECTION) */);
public int Button => EventData.get_int (unchecked((int)287127154) /* Button (P_BUTTON) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct ItemDoubleClickedEventArgs */
public partial class ListView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ItemDoubleClicked += ...' instead.")]
public Subscription SubscribeToItemDoubleClicked (Action<ItemDoubleClickedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ItemDoubleClickedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)181239107) /* ItemDoubleClicked (E_ITEMDOUBLECLICKED) */);
return s;
}
static UrhoEventAdapter<ItemDoubleClickedEventArgs> eventAdapterForItemDoubleClicked;
public event Action<ItemDoubleClickedEventArgs> ItemDoubleClicked
{
add
{
if (eventAdapterForItemDoubleClicked == null)
eventAdapterForItemDoubleClicked = new UrhoEventAdapter<ItemDoubleClickedEventArgs>(typeof(ListView));
eventAdapterForItemDoubleClicked.AddManagedSubscriber(handle, value, SubscribeToItemDoubleClicked);
}
remove { eventAdapterForItemDoubleClicked.RemoveManagedSubscriber(handle, value); }
}
} /* class ListView */
} /* namespace */
namespace Urho.Gui {
public partial struct UnhandledKeyEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public Key Key =>(Key) EventData.get_int (unchecked((int)626238495) /* Key (P_KEY) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int Qualifiers => EventData.get_int (unchecked((int)719575593) /* Qualifiers (P_QUALIFIERS) */);
} /* struct UnhandledKeyEventArgs */
public partial class LineEdit {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UnhandledKey += ...' instead.")]
public Subscription SubscribeToUnhandledKey (Action<UnhandledKeyEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UnhandledKeyEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2871470588) /* UnhandledKey (E_UNHANDLEDKEY) */);
return s;
}
static UrhoEventAdapter<UnhandledKeyEventArgs> eventAdapterForUnhandledKey;
public event Action<UnhandledKeyEventArgs> UnhandledKey
{
add
{
if (eventAdapterForUnhandledKey == null)
eventAdapterForUnhandledKey = new UrhoEventAdapter<UnhandledKeyEventArgs>(typeof(LineEdit));
eventAdapterForUnhandledKey.AddManagedSubscriber(handle, value, SubscribeToUnhandledKey);
}
remove { eventAdapterForUnhandledKey.RemoveManagedSubscriber(handle, value); }
}
} /* class LineEdit */
public partial class ListView {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UnhandledKey += ...' instead.")]
public Subscription SubscribeToUnhandledKey (Action<UnhandledKeyEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UnhandledKeyEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2871470588) /* UnhandledKey (E_UNHANDLEDKEY) */);
return s;
}
static UrhoEventAdapter<UnhandledKeyEventArgs> eventAdapterForUnhandledKey;
public event Action<UnhandledKeyEventArgs> UnhandledKey
{
add
{
if (eventAdapterForUnhandledKey == null)
eventAdapterForUnhandledKey = new UrhoEventAdapter<UnhandledKeyEventArgs>(typeof(ListView));
eventAdapterForUnhandledKey.AddManagedSubscriber(handle, value, SubscribeToUnhandledKey);
}
remove { eventAdapterForUnhandledKey.RemoveManagedSubscriber(handle, value); }
}
} /* class ListView */
} /* namespace */
namespace Urho.Gui {
public partial struct FileSelectedEventArgs {
public EventDataContainer EventData;
public String FileName => EventData.get_String (unchecked((int)4071720039) /* FileName (P_FILENAME) */);
public String Filter => EventData.get_String (unchecked((int)3329867512) /* Filter (P_FILTER) */);
public bool OK => EventData.get_bool (unchecked((int)5182396) /* OK (P_OK) */);
} /* struct FileSelectedEventArgs */
public partial class FileSelector {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.FileSelected += ...' instead.")]
public Subscription SubscribeToFileSelected (Action<FileSelectedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new FileSelectedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2152097911) /* FileSelected (E_FILESELECTED) */);
return s;
}
static UrhoEventAdapter<FileSelectedEventArgs> eventAdapterForFileSelected;
public event Action<FileSelectedEventArgs> FileSelected
{
add
{
if (eventAdapterForFileSelected == null)
eventAdapterForFileSelected = new UrhoEventAdapter<FileSelectedEventArgs>(typeof(FileSelector));
eventAdapterForFileSelected.AddManagedSubscriber(handle, value, SubscribeToFileSelected);
}
remove { eventAdapterForFileSelected.RemoveManagedSubscriber(handle, value); }
}
} /* class FileSelector */
} /* namespace */
namespace Urho.Gui {
public partial struct MessageACKEventArgs {
public EventDataContainer EventData;
public bool OK => EventData.get_bool (unchecked((int)5182396) /* OK (P_OK) */);
} /* struct MessageACKEventArgs */
public partial class MessageBox {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.MessageACK += ...' instead.")]
public Subscription SubscribeToMessageACK (Action<MessageACKEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new MessageACKEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1289539138) /* MessageACK (E_MESSAGEACK) */);
return s;
}
static UrhoEventAdapter<MessageACKEventArgs> eventAdapterForMessageACK;
public event Action<MessageACKEventArgs> MessageACK
{
add
{
if (eventAdapterForMessageACK == null)
eventAdapterForMessageACK = new UrhoEventAdapter<MessageACKEventArgs>(typeof(MessageBox));
eventAdapterForMessageACK.AddManagedSubscriber(handle, value, SubscribeToMessageACK);
}
remove { eventAdapterForMessageACK.RemoveManagedSubscriber(handle, value); }
}
} /* class MessageBox */
} /* namespace */
namespace Urho.Gui {
public partial struct ElementAddedEventArgs {
public EventDataContainer EventData;
public UIElement Root => EventData.get_UIElement (unchecked((int)507949538) /* Root (P_ROOT) */);
public UIElement Parent => EventData.get_UIElement (unchecked((int)2493616522) /* Parent (P_PARENT) */);
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct ElementAddedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ElementAdded += ...' instead.")]
public Subscription SubscribeToElementAdded (Action<ElementAddedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ElementAddedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2951759620) /* ElementAdded (E_ELEMENTADDED) */);
return s;
}
static UrhoEventAdapter<ElementAddedEventArgs> eventAdapterForElementAdded;
public event Action<ElementAddedEventArgs> ElementAdded
{
add
{
if (eventAdapterForElementAdded == null)
eventAdapterForElementAdded = new UrhoEventAdapter<ElementAddedEventArgs>(typeof(UIElement));
eventAdapterForElementAdded.AddManagedSubscriber(handle, value, SubscribeToElementAdded);
}
remove { eventAdapterForElementAdded.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct ElementRemovedEventArgs {
public EventDataContainer EventData;
public UIElement Root => EventData.get_UIElement (unchecked((int)507949538) /* Root (P_ROOT) */);
public UIElement Parent => EventData.get_UIElement (unchecked((int)2493616522) /* Parent (P_PARENT) */);
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct ElementRemovedEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.ElementRemoved += ...' instead.")]
public Subscription SubscribeToElementRemoved (Action<ElementRemovedEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new ElementRemovedEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1024519076) /* ElementRemoved (E_ELEMENTREMOVED) */);
return s;
}
static UrhoEventAdapter<ElementRemovedEventArgs> eventAdapterForElementRemoved;
public event Action<ElementRemovedEventArgs> ElementRemoved
{
add
{
if (eventAdapterForElementRemoved == null)
eventAdapterForElementRemoved = new UrhoEventAdapter<ElementRemovedEventArgs>(typeof(UIElement));
eventAdapterForElementRemoved.AddManagedSubscriber(handle, value, SubscribeToElementRemoved);
}
remove { eventAdapterForElementRemoved.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct HoverBeginEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int ElementX => EventData.get_int (unchecked((int)2329377244) /* ElementX (P_ELEMENTX) */);
public int ElementY => EventData.get_int (unchecked((int)2329377245) /* ElementY (P_ELEMENTY) */);
} /* struct HoverBeginEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.HoverBegin += ...' instead.")]
public Subscription SubscribeToHoverBegin (Action<HoverBeginEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new HoverBeginEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)44927469) /* HoverBegin (E_HOVERBEGIN) */);
return s;
}
static UrhoEventAdapter<HoverBeginEventArgs> eventAdapterForHoverBegin;
public event Action<HoverBeginEventArgs> HoverBegin
{
add
{
if (eventAdapterForHoverBegin == null)
eventAdapterForHoverBegin = new UrhoEventAdapter<HoverBeginEventArgs>(typeof(UIElement));
eventAdapterForHoverBegin.AddManagedSubscriber(handle, value, SubscribeToHoverBegin);
}
remove { eventAdapterForHoverBegin.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct HoverEndEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
} /* struct HoverEndEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.HoverEnd += ...' instead.")]
public Subscription SubscribeToHoverEnd (Action<HoverEndEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new HoverEndEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2562651231) /* HoverEnd (E_HOVEREND) */);
return s;
}
static UrhoEventAdapter<HoverEndEventArgs> eventAdapterForHoverEnd;
public event Action<HoverEndEventArgs> HoverEnd
{
add
{
if (eventAdapterForHoverEnd == null)
eventAdapterForHoverEnd = new UrhoEventAdapter<HoverEndEventArgs>(typeof(UIElement));
eventAdapterForHoverEnd.AddManagedSubscriber(handle, value, SubscribeToHoverEnd);
}
remove { eventAdapterForHoverEnd.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct DragBeginEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int ElementX => EventData.get_int (unchecked((int)2329377244) /* ElementX (P_ELEMENTX) */);
public int ElementY => EventData.get_int (unchecked((int)2329377245) /* ElementY (P_ELEMENTY) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int NumButtons => EventData.get_int (unchecked((int)1583225467) /* NumButtons (P_NUMBUTTONS) */);
} /* struct DragBeginEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DragBegin += ...' instead.")]
public Subscription SubscribeToDragBegin (Action<DragBeginEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DragBeginEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3558428501) /* DragBegin (E_DRAGBEGIN) */);
return s;
}
static UrhoEventAdapter<DragBeginEventArgs> eventAdapterForDragBegin;
public event Action<DragBeginEventArgs> DragBegin
{
add
{
if (eventAdapterForDragBegin == null)
eventAdapterForDragBegin = new UrhoEventAdapter<DragBeginEventArgs>(typeof(UIElement));
eventAdapterForDragBegin.AddManagedSubscriber(handle, value, SubscribeToDragBegin);
}
remove { eventAdapterForDragBegin.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct DragMoveEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int DX => EventData.get_int (unchecked((int)4460820) /* DX (P_DX) */);
public int DY => EventData.get_int (unchecked((int)4460821) /* DY (P_DY) */);
public int ElementX => EventData.get_int (unchecked((int)2329377244) /* ElementX (P_ELEMENTX) */);
public int ElementY => EventData.get_int (unchecked((int)2329377245) /* ElementY (P_ELEMENTY) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int NumButtons => EventData.get_int (unchecked((int)1583225467) /* NumButtons (P_NUMBUTTONS) */);
} /* struct DragMoveEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DragMove += ...' instead.")]
public Subscription SubscribeToDragMove (Action<DragMoveEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DragMoveEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)2691178053) /* DragMove (E_DRAGMOVE) */);
return s;
}
static UrhoEventAdapter<DragMoveEventArgs> eventAdapterForDragMove;
public event Action<DragMoveEventArgs> DragMove
{
add
{
if (eventAdapterForDragMove == null)
eventAdapterForDragMove = new UrhoEventAdapter<DragMoveEventArgs>(typeof(UIElement));
eventAdapterForDragMove.AddManagedSubscriber(handle, value, SubscribeToDragMove);
}
remove { eventAdapterForDragMove.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct DragEndEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int ElementX => EventData.get_int (unchecked((int)2329377244) /* ElementX (P_ELEMENTX) */);
public int ElementY => EventData.get_int (unchecked((int)2329377245) /* ElementY (P_ELEMENTY) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int NumButtons => EventData.get_int (unchecked((int)1583225467) /* NumButtons (P_NUMBUTTONS) */);
} /* struct DragEndEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DragEnd += ...' instead.")]
public Subscription SubscribeToDragEnd (Action<DragEndEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DragEndEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)1516301767) /* DragEnd (E_DRAGEND) */);
return s;
}
static UrhoEventAdapter<DragEndEventArgs> eventAdapterForDragEnd;
public event Action<DragEndEventArgs> DragEnd
{
add
{
if (eventAdapterForDragEnd == null)
eventAdapterForDragEnd = new UrhoEventAdapter<DragEndEventArgs>(typeof(UIElement));
eventAdapterForDragEnd.AddManagedSubscriber(handle, value, SubscribeToDragEnd);
}
remove { eventAdapterForDragEnd.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct DragCancelEventArgs {
public EventDataContainer EventData;
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int ElementX => EventData.get_int (unchecked((int)2329377244) /* ElementX (P_ELEMENTX) */);
public int ElementY => EventData.get_int (unchecked((int)2329377245) /* ElementY (P_ELEMENTY) */);
public int Buttons => EventData.get_int (unchecked((int)1822582401) /* Buttons (P_BUTTONS) */);
public int NumButtons => EventData.get_int (unchecked((int)1583225467) /* NumButtons (P_NUMBUTTONS) */);
} /* struct DragCancelEventArgs */
public partial class UIElement {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.DragCancel += ...' instead.")]
public Subscription SubscribeToDragCancel (Action<DragCancelEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new DragCancelEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3401367950) /* DragCancel (E_DRAGCANCEL) */);
return s;
}
static UrhoEventAdapter<DragCancelEventArgs> eventAdapterForDragCancel;
public event Action<DragCancelEventArgs> DragCancel
{
add
{
if (eventAdapterForDragCancel == null)
eventAdapterForDragCancel = new UrhoEventAdapter<DragCancelEventArgs>(typeof(UIElement));
eventAdapterForDragCancel.AddManagedSubscriber(handle, value, SubscribeToDragCancel);
}
remove { eventAdapterForDragCancel.RemoveManagedSubscriber(handle, value); }
}
} /* class UIElement */
} /* namespace */
namespace Urho.Gui {
public partial struct UIDropFileEventArgs {
public EventDataContainer EventData;
public String FileName => EventData.get_String (unchecked((int)4071720039) /* FileName (P_FILENAME) */);
public UIElement Element => EventData.get_UIElement (unchecked((int)3793610108) /* Element (P_ELEMENT) */);
public int X => EventData.get_int (unchecked((int)88) /* X (P_X) */);
public int Y => EventData.get_int (unchecked((int)89) /* Y (P_Y) */);
public int ElementX => EventData.get_int (unchecked((int)2329377244) /* ElementX (P_ELEMENTX) */);
public int ElementY => EventData.get_int (unchecked((int)2329377245) /* ElementY (P_ELEMENTY) */);
} /* struct UIDropFileEventArgs */
public partial class UI {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.UIDropFile += ...' instead.")]
public Subscription SubscribeToUIDropFile (Action<UIDropFileEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new UIDropFileEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)94134079) /* UIDropFile (E_UIDROPFILE) */);
return s;
}
static UrhoEventAdapter<UIDropFileEventArgs> eventAdapterForUIDropFile;
public event Action<UIDropFileEventArgs> UIDropFile
{
add
{
if (eventAdapterForUIDropFile == null)
eventAdapterForUIDropFile = new UrhoEventAdapter<UIDropFileEventArgs>(typeof(UI));
eventAdapterForUIDropFile.AddManagedSubscriber(handle, value, SubscribeToUIDropFile);
}
remove { eventAdapterForUIDropFile.RemoveManagedSubscriber(handle, value); }
}
} /* class UI */
} /* namespace */
namespace Urho {
public partial struct PhysicsUpdateContact2DEventArgs {
public EventDataContainer EventData;
public PhysicsWorld2D World => EventData.get_PhysicsWorld2D (unchecked((int)2052574866) /* World (P_WORLD) */);
public RigidBody2D BodyA => EventData.get_RigidBody2D (unchecked((int)3776720255) /* BodyA (P_BODYA) */);
public RigidBody2D BodyB => EventData.get_RigidBody2D (unchecked((int)3776720256) /* BodyB (P_BODYB) */);
public Node NodeA => EventData.get_Node (unchecked((int)270310559) /* NodeA (P_NODEA) */);
public Node NodeB => EventData.get_Node (unchecked((int)270310560) /* NodeB (P_NODEB) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
public CollisionShape2D ShapeA => EventData.get_CollisionShape2D (unchecked((int)2701859264) /* ShapeA (P_SHAPEA) */);
public CollisionShape2D ShapeB => EventData.get_CollisionShape2D (unchecked((int)2701859265) /* ShapeB (P_SHAPEB) */);
public bool Enabled => EventData.get_bool (unchecked((int)40082945) /* Enabled (P_ENABLED) */);
} /* struct PhysicsUpdateContact2DEventArgs */
} /* namespace */
namespace Urho.Urho2D {
public partial struct PhysicsBeginContact2DEventArgs {
public EventDataContainer EventData;
public PhysicsWorld2D World => EventData.get_PhysicsWorld2D (unchecked((int)2052574866) /* World (P_WORLD) */);
public RigidBody2D BodyA => EventData.get_RigidBody2D (unchecked((int)3776720255) /* BodyA (P_BODYA) */);
public RigidBody2D BodyB => EventData.get_RigidBody2D (unchecked((int)3776720256) /* BodyB (P_BODYB) */);
public Node NodeA => EventData.get_Node (unchecked((int)270310559) /* NodeA (P_NODEA) */);
public Node NodeB => EventData.get_Node (unchecked((int)270310560) /* NodeB (P_NODEB) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
public CollisionShape2D ShapeA => EventData.get_CollisionShape2D (unchecked((int)2701859264) /* ShapeA (P_SHAPEA) */);
public CollisionShape2D ShapeB => EventData.get_CollisionShape2D (unchecked((int)2701859265) /* ShapeB (P_SHAPEB) */);
} /* struct PhysicsBeginContact2DEventArgs */
public partial class PhysicsWorld2D {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsBeginContact2D += ...' instead.")]
public Subscription SubscribeToPhysicsBeginContact2D (Action<PhysicsBeginContact2DEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsBeginContact2DEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)3552299824) /* PhysicsBeginContact2D (E_PHYSICSBEGINCONTACT2D) */);
return s;
}
static UrhoEventAdapter<PhysicsBeginContact2DEventArgs> eventAdapterForPhysicsBeginContact2D;
public event Action<PhysicsBeginContact2DEventArgs> PhysicsBeginContact2D
{
add
{
if (eventAdapterForPhysicsBeginContact2D == null)
eventAdapterForPhysicsBeginContact2D = new UrhoEventAdapter<PhysicsBeginContact2DEventArgs>(typeof(PhysicsWorld2D));
eventAdapterForPhysicsBeginContact2D.AddManagedSubscriber(handle, value, SubscribeToPhysicsBeginContact2D);
}
remove { eventAdapterForPhysicsBeginContact2D.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld2D */
} /* namespace */
namespace Urho.Urho2D {
public partial struct PhysicsEndContact2DEventArgs {
public EventDataContainer EventData;
public PhysicsWorld2D World => EventData.get_PhysicsWorld2D (unchecked((int)2052574866) /* World (P_WORLD) */);
public RigidBody2D BodyA => EventData.get_RigidBody2D (unchecked((int)3776720255) /* BodyA (P_BODYA) */);
public RigidBody2D BodyB => EventData.get_RigidBody2D (unchecked((int)3776720256) /* BodyB (P_BODYB) */);
public Node NodeA => EventData.get_Node (unchecked((int)270310559) /* NodeA (P_NODEA) */);
public Node NodeB => EventData.get_Node (unchecked((int)270310560) /* NodeB (P_NODEB) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
public CollisionShape2D ShapeA => EventData.get_CollisionShape2D (unchecked((int)2701859264) /* ShapeA (P_SHAPEA) */);
public CollisionShape2D ShapeB => EventData.get_CollisionShape2D (unchecked((int)2701859265) /* ShapeB (P_SHAPEB) */);
} /* struct PhysicsEndContact2DEventArgs */
public partial class PhysicsWorld2D {
[Obsolete("SubscribeTo API may lead to unxpected behaviour and will be removed in a future version. Use C# event '.PhysicsEndContact2D += ...' instead.")]
public Subscription SubscribeToPhysicsEndContact2D (Action<PhysicsEndContact2DEventArgs> handler)
{
Action<IntPtr> proxy = (x)=> { var d = new PhysicsEndContact2DEventArgs () { EventData = new EventDataContainer(x) }; handler (d); };
var s = new Subscription (proxy);
s.UnmanagedProxy = UrhoObject.urho_subscribe_event (handle, UrhoObject.ObjectCallbackInstance, GCHandle.ToIntPtr (s.gch), unchecked((int)964245182) /* PhysicsEndContact2D (E_PHYSICSENDCONTACT2D) */);
return s;
}
static UrhoEventAdapter<PhysicsEndContact2DEventArgs> eventAdapterForPhysicsEndContact2D;
public event Action<PhysicsEndContact2DEventArgs> PhysicsEndContact2D
{
add
{
if (eventAdapterForPhysicsEndContact2D == null)
eventAdapterForPhysicsEndContact2D = new UrhoEventAdapter<PhysicsEndContact2DEventArgs>(typeof(PhysicsWorld2D));
eventAdapterForPhysicsEndContact2D.AddManagedSubscriber(handle, value, SubscribeToPhysicsEndContact2D);
}
remove { eventAdapterForPhysicsEndContact2D.RemoveManagedSubscriber(handle, value); }
}
} /* class PhysicsWorld2D */
} /* namespace */
namespace Urho {
public partial struct NodeUpdateContact2DEventArgs {
public EventDataContainer EventData;
public RigidBody2D Body => EventData.get_RigidBody2D (unchecked((int)902734658) /* Body (P_BODY) */);
public Node OtherNode => EventData.get_Node (unchecked((int)1833707954) /* OtherNode (P_OTHERNODE) */);
public RigidBody2D OtherBody => EventData.get_RigidBody2D (unchecked((int)1056596178) /* OtherBody (P_OTHERBODY) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
public CollisionShape2D Shape => EventData.get_CollisionShape2D (unchecked((int)479958721) /* Shape (P_SHAPE) */);
public CollisionShape2D OtherShape => EventData.get_CollisionShape2D (unchecked((int)468663601) /* OtherShape (P_OTHERSHAPE) */);
public bool Enabled => EventData.get_bool (unchecked((int)40082945) /* Enabled (P_ENABLED) */);
} /* struct NodeUpdateContact2DEventArgs */
} /* namespace */
namespace Urho {
public partial struct NodeBeginContact2DEventArgs {
public EventDataContainer EventData;
public RigidBody2D Body => EventData.get_RigidBody2D (unchecked((int)902734658) /* Body (P_BODY) */);
public Node OtherNode => EventData.get_Node (unchecked((int)1833707954) /* OtherNode (P_OTHERNODE) */);
public RigidBody2D OtherBody => EventData.get_RigidBody2D (unchecked((int)1056596178) /* OtherBody (P_OTHERBODY) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
public CollisionShape2D Shape => EventData.get_CollisionShape2D (unchecked((int)479958721) /* Shape (P_SHAPE) */);
public CollisionShape2D OtherShape => EventData.get_CollisionShape2D (unchecked((int)468663601) /* OtherShape (P_OTHERSHAPE) */);
} /* struct NodeBeginContact2DEventArgs */
} /* namespace */
namespace Urho {
public partial struct NodeEndContact2DEventArgs {
public EventDataContainer EventData;
public RigidBody2D Body => EventData.get_RigidBody2D (unchecked((int)902734658) /* Body (P_BODY) */);
public Node OtherNode => EventData.get_Node (unchecked((int)1833707954) /* OtherNode (P_OTHERNODE) */);
public RigidBody2D OtherBody => EventData.get_RigidBody2D (unchecked((int)1056596178) /* OtherBody (P_OTHERBODY) */);
public CollisionData [] Contacts => EventData.get_CollisionData (unchecked((int)2863986867) /* Contacts (P_CONTACTS) */);
public CollisionShape2D Shape => EventData.get_CollisionShape2D (unchecked((int)479958721) /* Shape (P_SHAPE) */);
public CollisionShape2D OtherShape => EventData.get_CollisionShape2D (unchecked((int)468663601) /* OtherShape (P_OTHERSHAPE) */);
} /* struct NodeEndContact2DEventArgs */
} /* namespace */
namespace Urho {
public partial struct ParticlesEndEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public ParticleEffect2D Effect => EventData.get_ParticleEffect2D (unchecked((int)3321525041) /* Effect (P_EFFECT) */);
} /* struct ParticlesEndEventArgs */
} /* namespace */
namespace Urho {
public partial struct ParticlesDurationEventArgs {
public EventDataContainer EventData;
public Node Node => EventData.get_Node (unchecked((int)1679846434) /* Node (P_NODE) */);
public ParticleEffect2D Effect => EventData.get_ParticleEffect2D (unchecked((int)3321525041) /* Effect (P_EFFECT) */);
} /* struct ParticlesDurationEventArgs */
} /* namespace */
#pragma warning restore CS0618, CS0649 | 59.363394 | 233 | 0.635699 | [
"MIT"
] | sweep3r/urho | Bindings/Portable/Generated/Object.Events.cs | 312,014 | C# |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class spinal : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnMouseDown()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 3);
}
}
| 19.625 | 78 | 0.617834 | [
"Apache-2.0"
] | ankiii07/Automate-Diagnosis | Augmented Reality Integration With Machine Learning/Assets/scripts/spinal.cs | 471 | C# |
using System;
using System.Text;
using Nuuvify.CommonPack.Middleware.Abstraction;
using Nuuvify.CommonPack.UnitOfWork.Oracle.xTest.Arrange;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Moq;
namespace Nuuvify.CommonPack.UnitOfWork.Oracle.xTest.Fixtures
{
public class AppDbContextFixture : BaseAppDbContextFixture
{
private string RemoveTables { get; }
public string Schema { get; }
public AppDbContextFixture()
{
const string CnnTag = "B8CT2-Oracle";
const string SchemaTag = "AppConfig:OwnerDB";
const string CorrelationFake = "MinhaApp_4e1f0c64-f02e-435a-baa7-c78923ad371a_Oracle";
PreventDisposal = true;
IConfiguration config = AppSettingsConfig.GetConfig();
var cnnString = config.GetConnectionString(CnnTag);
Schema = config.GetSection(SchemaTag)?.Value;
RemoveTables = config.GetSection("TestOptions:RemoveTables")?.Value;
mockIConfigurationCustom = new Mock<IConfigurationCustom>();
mockIConfigurationCustom.Setup(x => x.GetSectionValue(SchemaTag))
.Returns(Schema);
mockIConfigurationCustom.Setup(x => x.GetConnectionString(CnnTag))
.Returns(cnnString);
mockIConfigurationCustom.Setup(x => x.GetCorrelationId())
.Returns(CorrelationFake);
var options = new DbContextOptionsBuilder<StubDbContext>()
.UseOracle(cnnString)
.EnableDetailedErrors()
.EnableSensitiveDataLogging()
.UseLazyLoadingProxies()
.Options;
Db = new StubDbContext(options, mockIConfigurationCustom.Object);
}
protected override void Dispose(bool disposing)
{
if (disposing && Db != null && !PreventDisposal)
{
if (!Db.Database.IsInMemory() && RemoveTables.Equals("true", StringComparison.OrdinalIgnoreCase))
{
Console.WriteLine("Excluindo tabelas de teste...");
var delete = new StringBuilder("DELETE FROM ")
.AppendFormat("{0}.", Schema);
var sql = new StringBuilder()
.Append(delete)
.Append("PEDIDO_ITENS");
Db.Database.ExecuteSqlRaw(sql.ToString());
sql = new StringBuilder()
.Append(delete)
.Append("PEDIDOS");
Db.Database.ExecuteSqlRaw(sql.ToString());
sql = new StringBuilder()
.Append(delete)
.Append("FATURAS");
Db.Database.ExecuteSqlRaw(sql.ToString());
sql = new StringBuilder()
.Append(delete)
.Append("AUTOHISTORY");
Db.Database.ExecuteSqlRaw(sql.ToString());
Console.WriteLine("Tabelas de teste excluidas.");
}
else
{
Console.WriteLine("Tabelas de teste não foram excluidas.");
}
Db.Dispose();
}
}
}
} | 31.8 | 113 | 0.550764 | [
"MIT"
] | lzocateli00/Lzfy.DevPack | test/Nuuvify.CommonPack.UnitOfWork.Oracle.xTest/Fixtures/AppDbContextFixture.cs | 3,340 | C# |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Editor.Shared.Tagging;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Options;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Tagging;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Editor.Tagging
{
internal partial class AbstractAsynchronousTaggerProvider<TTag>
{
/// <summary>
/// <para>The <see cref="TagSource"/> is the core part of our asynchronous
/// tagging infrastructure. It is the coordinator between <see cref="ProduceTagsAsync(TaggerContext{TTag})"/>s,
/// <see cref="ITaggerEventSource"/>s, and <see cref="ITagger{T}"/>s.</para>
///
/// <para>The <see cref="TagSource"/> is the type that actually owns the
/// list of cached tags. When an <see cref="ITaggerEventSource"/> says tags need to be recomputed,
/// the tag source starts the computation and calls <see cref="ProduceTagsAsync(TaggerContext{TTag})"/> to build
/// the new list of tags. When that's done, the tags are stored in <see cref="CachedTagTrees"/>. The
/// tagger, when asked for tags from the editor, then returns the tags that are stored in
/// <see cref="CachedTagTrees"/></para>
///
/// <para>There is a one-to-many relationship between <see cref="TagSource"/>s
/// and <see cref="ITagger{T}"/>s. Special cases, like reference highlighting (which processes multiple
/// subject buffers at once) have their own providers and tag source derivations.</para>
/// </summary>
private sealed partial class TagSource : ForegroundThreadAffinitizedObject
{
/// <summary>
/// If we get more than this many differences, then we just issue it as a single change
/// notification. The number has been completely made up without any data to support it.
///
/// Internal for testing purposes.
/// </summary>
private const int CoalesceDifferenceCount = 10;
#region Fields that can be accessed from either thread
private readonly AbstractAsynchronousTaggerProvider<TTag> _dataSource;
/// <summary>
/// async operation notifier
/// </summary>
private readonly IAsynchronousOperationListener _asyncListener;
private readonly CancellationTokenSource _disposalTokenSource = new();
/// <summary>
/// Work queue that collects event notifications and kicks off the work to process them.
/// </summary>
private Task _eventWorkQueue = Task.CompletedTask;
/// <summary>
/// Series of tokens used to cancel previous outstanding work when new work comes in. Also used as the lock
/// to ensure threadsafe writing of _eventWorkQueue.
/// </summary>
private readonly CancellationSeries _cancellationSeries;
/// <summary>
/// Work queue that collects high priority requests to call TagsChanged with.
/// </summary>
private readonly AsyncBatchingWorkQueue<NormalizedSnapshotSpanCollection> _highPriTagsChangedQueue;
/// <summary>
/// Work queue that collects normal priority requests to call TagsChanged with.
/// </summary>
private readonly AsyncBatchingWorkQueue<NormalizedSnapshotSpanCollection> _normalPriTagsChangedQueue;
#endregion
#region Fields that can only be accessed from the foreground thread
private readonly ITextView _textViewOpt;
private readonly ITextBuffer _subjectBuffer;
/// <summary>
/// Our tagger event source that lets us know when we should call into the tag producer for
/// new tags.
/// </summary>
private readonly ITaggerEventSource _eventSource;
/// <summary>
/// accumulated text changes since last tag calculation
/// </summary>
private TextChangeRange? _accumulatedTextChanges_doNotAccessDirectly;
private ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> _cachedTagTrees_doNotAccessDirectly = ImmutableDictionary.Create<ITextBuffer, TagSpanIntervalTree<TTag>>();
private object? _state_doNotAccessDirecty;
/// <summary>
/// Keep track of if we are processing the first <see cref="ITagger{T}.GetTags"/> request. If our provider returns
/// <see langword="true"/> for <see cref="AbstractAsynchronousTaggerProvider{TTag}.ComputeInitialTagsSynchronously"/>,
/// then we'll want to synchronously block then and only then for tags.
/// </summary>
private bool _firstTagsRequest = true;
#endregion
public TagSource(
ITextView textViewOpt,
ITextBuffer subjectBuffer,
AbstractAsynchronousTaggerProvider<TTag> dataSource,
IAsynchronousOperationListener asyncListener)
: base(dataSource.ThreadingContext)
{
this.AssertIsForeground();
if (dataSource.SpanTrackingMode == SpanTrackingMode.Custom)
throw new ArgumentException("SpanTrackingMode.Custom not allowed.", "spanTrackingMode");
_subjectBuffer = subjectBuffer;
_textViewOpt = textViewOpt;
_dataSource = dataSource;
_asyncListener = asyncListener;
_cancellationSeries = new CancellationSeries(_disposalTokenSource.Token);
_highPriTagsChangedQueue = new AsyncBatchingWorkQueue<NormalizedSnapshotSpanCollection>(
TaggerDelay.NearImmediate.ComputeTimeDelay(),
ProcessTagsChangedAsync,
equalityComparer: null,
asyncListener,
_disposalTokenSource.Token);
if (_dataSource.AddedTagNotificationDelay == TaggerDelay.NearImmediate)
{
// if the tagger wants "added tags" to be reported "NearImmediate"ly, then just reuse
// the "high pri" queue as that already reports things at that cadence.
_normalPriTagsChangedQueue = _highPriTagsChangedQueue;
}
else
{
_normalPriTagsChangedQueue = new AsyncBatchingWorkQueue<NormalizedSnapshotSpanCollection>(
_dataSource.AddedTagNotificationDelay.ComputeTimeDelay(),
ProcessTagsChangedAsync,
equalityComparer: null,
asyncListener,
_disposalTokenSource.Token);
}
DebugRecordInitialStackTrace();
_eventSource = CreateEventSource();
Connect();
// Start computing the initial set of tags immediately. We want to get the UI
// to a complete state as soon as possible.
EnqueueWork(initialTags: true);
return;
void Connect()
{
this.AssertIsForeground();
_eventSource.Changed += OnEventSourceChanged;
if (_dataSource.TextChangeBehavior.HasFlag(TaggerTextChangeBehavior.TrackTextChanges))
{
_subjectBuffer.Changed += OnSubjectBufferChanged;
}
if (_dataSource.CaretChangeBehavior.HasFlag(TaggerCaretChangeBehavior.RemoveAllTagsOnCaretMoveOutsideOfTag))
{
if (_textViewOpt == null)
{
throw new ArgumentException(
nameof(_dataSource.CaretChangeBehavior) + " can only be specified for an " + nameof(IViewTaggerProvider));
}
_textViewOpt.Caret.PositionChanged += OnCaretPositionChanged;
}
// Tell the interaction object to start issuing events.
_eventSource.Connect();
}
}
private void Dispose()
{
if (_disposed)
{
Debug.Fail("Tagger already disposed");
return;
}
// Stop computing any initial tags if we've been asked for them.
_disposalTokenSource.Cancel();
_cancellationSeries.Dispose();
_disposed = true;
_dataSource.RemoveTagSource(_textViewOpt, _subjectBuffer);
GC.SuppressFinalize(this);
Disconnect();
return;
void Disconnect()
{
this.AssertIsForeground();
// Tell the interaction object to stop issuing events.
_eventSource.Disconnect();
if (_dataSource.CaretChangeBehavior.HasFlag(TaggerCaretChangeBehavior.RemoveAllTagsOnCaretMoveOutsideOfTag))
{
_textViewOpt.Caret.PositionChanged -= OnCaretPositionChanged;
}
if (_dataSource.TextChangeBehavior.HasFlag(TaggerTextChangeBehavior.TrackTextChanges))
{
_subjectBuffer.Changed -= OnSubjectBufferChanged;
}
_eventSource.Changed -= OnEventSourceChanged;
}
}
private ITaggerEventSource CreateEventSource()
{
var eventSource = _dataSource.CreateEventSource(_textViewOpt, _subjectBuffer);
// If there are any options specified for this tagger, then also hook up event
// notifications for when those options change.
var optionChangedEventSources =
_dataSource.Options.Concat<IOption>(_dataSource.PerLanguageOptions)
.Select(o => TaggerEventSources.OnOptionChanged(_subjectBuffer, o)).ToList();
if (optionChangedEventSources.Count == 0)
{
// No options specified for this tagger. So just keep the event source as is.
return eventSource;
}
optionChangedEventSources.Add(eventSource);
return TaggerEventSources.Compose(optionChangedEventSources);
}
private TextChangeRange? AccumulatedTextChanges
{
get
{
this.AssertIsForeground();
return _accumulatedTextChanges_doNotAccessDirectly;
}
set
{
this.AssertIsForeground();
_accumulatedTextChanges_doNotAccessDirectly = value;
}
}
private ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> CachedTagTrees
{
get
{
this.AssertIsForeground();
return _cachedTagTrees_doNotAccessDirectly;
}
set
{
this.AssertIsForeground();
_cachedTagTrees_doNotAccessDirectly = value;
}
}
private object? State
{
get
{
this.AssertIsForeground();
return _state_doNotAccessDirecty;
}
set
{
this.AssertIsForeground();
_state_doNotAccessDirecty = value;
}
}
private void RaiseTagsChanged(ITextBuffer buffer, DiffResult difference)
{
this.AssertIsForeground();
if (difference.Count == 0)
{
// nothing changed.
return;
}
OnTagsChangedForBuffer(SpecializedCollections.SingletonCollection(
new KeyValuePair<ITextBuffer, DiffResult>(buffer, difference)),
initialTags: false);
}
}
}
}
| 41.477707 | 187 | 0.575246 | [
"MIT"
] | thomasclaudiushuber/roslyn | src/EditorFeatures/Core/Tagging/AbstractAsynchronousTaggerProvider.TagSource.cs | 13,026 | C# |
using System;
using NetOffice;
using NetOffice.Attributes;
namespace NetOffice.ADODBApi.Enums
{
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
[SupportByVersion("ADODB", 2.5)]
[EntityType(EntityType.IsEnum)]
public enum StreamTypeEnum
{
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <remarks>1</remarks>
[SupportByVersion("ADODB", 2.5)]
adTypeBinary = 1,
/// <summary>
/// SupportByVersion ADODB 2.5
/// </summary>
/// <remarks>2</remarks>
[SupportByVersion("ADODB", 2.5)]
adTypeText = 2
}
} | 21.148148 | 35 | 0.637478 | [
"MIT"
] | DominikPalo/NetOffice | Source/ADODB/Enums/StreamTypeEnum.cs | 573 | C# |
using System;
using System.Security;
using System.Runtime.InteropServices;
using Stride.Core.Mathematics;
using Stride.Graphics;
namespace Alembic
{
[SuppressUnmanagedCodeSecurity]
internal static class NativeMethods
{
[DefaultDllImportSearchPaths(DllImportSearchPath.AssemblyDirectory)]
#region AlembicScene
[DllImport("VL.Alembic.Native.dll")]
public static extern AlembicScene openScene(string path);
[DllImport("VL.Alembic.Native.dll")]
public static extern void closeScene(IntPtr ptr);
[DllImport("VL.Alembic.Native.dll")]
public static extern float getMinTime(AlembicScene self);
[DllImport("VL.Alembic.Native.dll")]
public static extern float getMaxTime(AlembicScene self);
[DllImport("VL.Alembic.Native.dll")]
public static extern int getGeomCount(AlembicScene self);
[DllImport("VL.Alembic.Native.dll")]
public unsafe static extern char* getName(AlembicScene self, int index);
[DllImport("VL.Alembic.Native.dll")]
public static extern IntPtr getGeom(AlembicScene self, string name);
[DllImport("VL.Alembic.Native.dll")]
public static extern void updateTime(AlembicScene self, float time);
#endregion // AlembicScene
#region AlembicGeom
[DllImport("VL.Alembic.Native.dll")]
public static extern GeomType getType(IntPtr self);
[DllImport("VL.Alembic.Native.dll")]
public static extern Matrix getTransform(IntPtr self);
#endregion // AlembicGeom
#region Points
[DllImport("VL.Alembic.Native.dll")]
public static extern void getPointSample(IntPtr self, IntPtr o);
[DllImport("VL.Alembic.Native.dll")]
public static extern int getPointCount(IntPtr self);
#endregion // Points
#region Curves
[DllImport("VL.Alembic.Native.dll")]
public static extern int getCurveSample(IntPtr self, out DataPointer curve, out DataPointer indices);
#endregion // Curves
#region PolyMesh
[DllImport("VL.Alembic.Native.dll")]
public static extern VertexLayout getPolyMeshLayout(IntPtr self);
[DllImport("VL.Alembic.Native.dll")]
public static extern IntPtr getPolyMeshSample(IntPtr self, out int size);
#endregion // PolyMesh
#region Camera
[DllImport("VL.Alembic.Native.dll")]
public static extern void getCameraSample(IntPtr self, out Matrix v, out CameraParam p);
#endregion // Camera
}
} | 29.329545 | 109 | 0.67377 | [
"MIT"
] | torinos-yt/VL.Alembic | src/NativeMethods.cs | 2,581 | C# |
using Plugin.Logger.Abstractions;
using System;
namespace Plugin.Logger
{
/// <summary>
/// Cross platform Logger implemenations
/// </summary>
public class CrossLogger
{
public static Lazy<ILogger> Implementation = new Lazy<ILogger>(() => CreateLogger(), System.Threading.LazyThreadSafetyMode.PublicationOnly);
/// <summary>
/// Logged instance
/// </summary>
public static ILogger Current
{
get
{
var ret = Implementation.Value;
if (ret == null)
{
throw NotImplementedInReferenceAssembly();
}
return ret;
}
}
public static ILogger CreateLogger()
{
#if PORTABLE
return null;
#else
return new LoggerImplementation();
#endif
}
internal static Exception NotImplementedInReferenceAssembly()
{
return new NotImplementedException("This functionality is not implemented in the portable version of this assembly. You should reference the NuGet package from your main application project in order to reference the platform-specific implementation.");
}
}
}
| 25.522727 | 259 | 0.658059 | [
"MIT"
] | AnvithaSA/XamarinCrossLogger | Logger/Plugin.Logger.Android/CrossLogger.cs | 1,125 | C# |
/* [REMOVE THIS LINE]
* [REMOVE THIS LINE] To use this template, make a copy and remove the lines that start
* [REMOVE THIS LINE] with "[REMOVE THIS LINE]". Then add your code where the comments indicate.
* [REMOVE THIS LINE]
using UnityEngine;
using System.Collections;
using PixelCrushers.DialogueSystem;
public class PersistentDataTemplate : MonoBehaviour //<--Copy this file. Rename the file and class name.
{
public void OnRecordPersistentData()
{
// Add your code here to record data into the Lua environment.
// Typically, you'll record the data using a line similar to:
// DialogueLua.SetVariable("someVarName", someData);
// or:
// DialogueLua.SetActorField("myName", "myFieldName", myData);
//
// Note that you can use this static method to get the actor
// name associated with this GameObject:
// var actorName = OverrideActorName.GetActorName(transform);
}
public void OnApplyPersistentData()
{
// Add your code here to get data from Lua and apply it (usually to the game object).
// Typically, you'll use a line similar to:
// myData = DialogueLua.GetActorField(name, "myFieldName").AsSomeType;
//
// When changing scenes, OnApplyPersistentData() is typically called at the same
// time as Start() methods. If your code depends on another script having finished
// its Start() method, use a coroutine to wait one frame. For example, in
// OnApplyPersistentData() call StartCoroutine(DelayedApply());
// Then define DelayedApply() as:
// IEnumerator DelayedApply() {
// yield return null; // Wait 1 frame for other scripts to initialize.
// <your code here>
// }
}
public void OnEnable()
{
// This optional code registers this GameObject with the PersistentDataManager.
// One of the options on the PersistentDataManager is to only send notifications
// to registered GameObjects. The default, however, is to send to all GameObjects.
// If you set PersistentDataManager to only send notifications to registered
// GameObjects, you need to register this component using the line below or it
// won't receive notifications to save and load.
PersistentDataManager.RegisterPersistentData(this.gameObject);
}
public void OnDisable()
{
// Unsubscribe the GameObject from PersistentDataManager notifications:
PersistentDataManager.RegisterPersistentData(this.gameObject);
}
//--- Uncomment this method if you want to implement it:
//public void OnLevelWillBeUnloaded()
//{
// This will be called before loading a new level. You may want to add code here
// to change the behavior of your persistent data script. For example, the
// IncrementOnDestroy script disables itself because it should only increment
// the variable when it's destroyed during play, not because it's being
// destroyed while unloading the old level.
//}
}
/**/
| 40.415584 | 104 | 0.676414 | [
"MIT"
] | BigBroken/sLord | Assets/Dialogue System/Scripts/Templates/PersistentDataTemplate.cs | 3,114 | C# |
namespace Nager.Country.Currencies
{
public class BovCurrency : ICurrency
{
public string Symbol => null;
///<inheritdoc/>
public string Singular => null;
///<inheritdoc/>
public string Plural => null;
///<inheritdoc/>
public string IsoCode => "BOV";
///<inheritdoc/>
public string NumericCode => "984";
///<inheritdoc/>
public string Name => "Bolivian Mvdol (funds code)";
}
}
| 21.043478 | 60 | 0.549587 | [
"MIT"
] | Tri125/Nager.Country | src/Nager.Country/Currencies/BovCurrency.cs | 486 | C# |
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
namespace FlyingDutchman
{
public class FlyTypePointToBottom : IFlyType
{
public void DrawFly(Image<Rgba32> image, int left, int top)
{
image[left + 0, top] = Rgba32.Red;
image[left + 1, top] = Rgba32.Red;
image[left + 3, top] = Rgba32.Red;
image[left + 4, top] = Rgba32.Red;
image[left + 1, top + 1] = Rgba32.Red;
image[left + 2, top + 1] = Rgba32.Red;
image[left + 3, top + 1] = Rgba32.Red;
image[left + 1, top + 2] = Rgba32.Red;
image[left + 2, top + 2] = Rgba32.Red;
image[left + 3, top + 2] = Rgba32.Red;
image[left + 2, top + 3] = Rgba32.Red;
image[left + 2, top + 4] = Rgba32.Red;
}
public override string ToString()
{
return ("Bottom");
}
}
}
| 28.545455 | 67 | 0.509554 | [
"MIT"
] | sandervandevelde/FlyingDutchmanImageGenerator | FlyTypePointToBottom.cs | 944 | C# |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Web;
namespace ChoixRestaurant.Models
{
public class Dal : IDal
{
private MyDbContext db;
public Dal()
{
db = new MyDbContext();
}
#region Restaurant
public void CreateRestaurant(string name, string phoneNumber, string email)
{
db.Restaurants.Add(new Restaurant { Name = name, PhoneNumber = phoneNumber, Email = email});
db.SaveChanges();
}
public void ModifyRestaurant(int id, string name, string phoneNumber, string email)
{
Restaurant resto = db.Restaurants.FirstOrDefault(r => r.Id == id);
if(resto != null)
{
resto.Name = name;
resto.PhoneNumber = phoneNumber;
resto.Email = email;
db.SaveChanges();
}
}
public bool RestaurantExist(string name)
{
return db.Restaurants.FirstOrDefault(r => r.Name == name) != null ? true : false;
}
public List<Restaurant> GetAllRestaurants()
{
return db.Restaurants.ToList();
}
#endregion
#region User
public User GetUser(int id)
{
return db.Users.FirstOrDefault(u => u.Id == id);
}
/* public User GetUser(string idStr)
{
int id;
if (int.TryParse(idStr, out id))
return GetUser(id);
return null;
}*/
public User GetUser(string idStr)
{
switch (idStr)
{
case "Chrome":
return CreeOuRecupere("Nico", "1234");
case "IE":
return CreeOuRecupere("Jérémie", "1234");
case "Firefox":
return CreeOuRecupere("Delphine", "1234");
default:
return CreeOuRecupere("Timéo", "1234");
}
}
private User CreeOuRecupere(string nom, string motDePasse)
{
User utilisateur = Authentificate(nom, motDePasse);
if (utilisateur == null)
{
int id = AddUser(nom, motDePasse);
return GetUser(id);
}
return utilisateur;
}
public int AddUser(string name, string password)
{
string encodedPassword = EncodeMD5(password);
User user = new User { Name = name, Password = encodedPassword };
db.Users.Add(user);
db.SaveChanges();
return user.Id;
}
public User Authentificate(string name, string password)
{
string encodedPassword = EncodeMD5(password);
return db.Users.FirstOrDefault(u => u.Name == name && u.Password== encodedPassword);
}
#endregion
#region Survey/Vote
/*public bool HasAlreadyVoted(int idSurvey, string idStr)
{
int id;
if (int.TryParse(idStr, out id))
{
Survey survey = db.Surveys.First(s => s.Id == idSurvey);
if (survey.Votes == null)
{
return false;
}
else
{
return survey.Votes.Any(v => v.User != null && v.User.Id == id);
}
}
else
{
return false;
}
}*/
public bool HasAlreadyVoted(int idSondage, string idStr)
{
User utilisateur = GetUser(idStr);
if (utilisateur != null)
{
Survey sondage = db.Surveys.First(s => s.Id == idSondage);
if (sondage.Votes == null)
return false;
return sondage.Votes.Any(v => v.User != null && v.User.Id == utilisateur.Id);
}
return false;
}
public int CreateSurvey()
{
Survey survey = new Survey { Date = DateTime.Now};
db.Surveys.Add(survey);
db.SaveChanges();
return survey.Id;
}
public void AddVote(int idSurvey, int idRestaurant, int idUser)
{
Vote vote = new Vote
{
Restaurant = db.Restaurants.First(r => r.Id == idRestaurant),
User = db.Users.First(u => u.Id == idUser)
};
Survey survey = db.Surveys.First(s => s.Id == idSurvey);
if(survey.Votes==null)
{
survey.Votes = new List<Vote>();
}
survey.Votes.Add(vote);
db.SaveChanges();
}
public List<Result> GetResults(int idSurvey)
{
List<Result> results = new List<Result>();
List<Restaurant> restaurants = GetAllRestaurants();
Survey survey = db.Surveys.First(s => s.Id == idSurvey);
foreach(IGrouping<int, Vote> grouping in survey.Votes.GroupBy(v=> v.Restaurant.Id))
{
int idRestaurant = grouping.Key;
Restaurant restaurant = restaurants.First(r => r.Id == idRestaurant);
int voteAmout = grouping.Count();
results.Add(new Result { Name = restaurant.Name, PhoneNumber = restaurant.PhoneNumber, VoteAmount = voteAmout });
}
return results;
}
#endregion
public void Dispose()
{
db.Dispose();
}
private string EncodeMD5(string motDePasse)
{
string motDePasseSel = "ChoixRestaurant" + motDePasse + "ASP.NET MVC";
return BitConverter.ToString(new MD5CryptoServiceProvider().ComputeHash(ASCIIEncoding.Default.GetBytes(motDePasseSel)));
}
}
} | 30.222222 | 132 | 0.498663 | [
"MIT"
] | y3lousso/OpenClassroom_AspDotNet_MVC | ChoixResto/Models/Dal.cs | 5,989 | C# |
using System;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
namespace DSharp.Compiler.Preprocessing.Lowering
{
public class ImplicitArrayCreationRewriter : CSharpSyntaxRewriter, ILowerer
{
private static readonly SymbolDisplayFormat displayFormat = new SymbolDisplayFormat(
genericsOptions: SymbolDisplayGenericsOptions.IncludeTypeParameters,
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypes,
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.ExpandNullable | SymbolDisplayMiscellaneousOptions.UseSpecialTypes
);
private SemanticModel sem;
public CompilationUnitSyntax Apply(Compilation compilation, CompilationUnitSyntax root)
{
sem = compilation.GetSemanticModel(root.SyntaxTree);
var newRoot = Visit(root) as CompilationUnitSyntax;
return newRoot;
}
public override SyntaxNode VisitImplicitArrayCreationExpression(ImplicitArrayCreationExpressionSyntax node)
{
var type = sem.GetTypeInfo(node).Type;
var newNode = (ImplicitArrayCreationExpressionSyntax)base.VisitImplicitArrayCreationExpression(node);
var arrayType = ArrayType(ParseTypeName(type.ToDisplayString(displayFormat)).WithLeadingTrivia(Space));
return ArrayCreationExpression(arrayType)
.WithInitializer(newNode.Initializer)
.WithTriviaFrom(newNode);
}
}
}
| 41.692308 | 134 | 0.741082 | [
"Apache-2.0"
] | isc30/dsharp | src/DSharp.Compiler/Preprocessing/Lowering/ImplicitArrayCreationRewriter.cs | 1,628 | C# |
using Model;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
namespace Repository
{
public class DijagnozaRepozitorijum
{
private string lokacija;
public DijagnozaRepozitorijum()
{
this.lokacija = @"..\..\..\Data\dijagnoza.json";
}
public bool Kreiraj()
{
// TODO: implement
return false;
}
public bool Obrisi(int id)
{
// TODO: implement
return false;
}
public Dijagnoza Dobavi()
{
// TODO: implement
return null;
}
public List<Dijagnoza> DobaviSve()
{
List<Dijagnoza> dijagnoze = new List<Dijagnoza>();
if (File.Exists(lokacija))
{
string jsonText = File.ReadAllText(lokacija);
if (!string.IsNullOrEmpty(jsonText))
{
dijagnoze = JsonConvert.DeserializeObject<List<Dijagnoza>>(jsonText);
}
}
return dijagnoze;
}
public void Sacuvaj(List<Dijagnoza> dijagnoze)
{
JsonSerializer serializer = new JsonSerializer();
serializer.Formatting = Formatting.Indented;
StreamWriter writer = new StreamWriter(lokacija);
JsonWriter jWriter = new JsonTextWriter(writer);
serializer.Serialize(jWriter, dijagnoze);
jWriter.Close();
writer.Close();
}
}
} | 25.75 | 89 | 0.526214 | [
"MIT"
] | AleksaPapovic/HealthCareSystem | ZdravoKorporacija/ZdravoKorporacija/Repository/DijagnozaRepozitorijum.cs | 1,545 | C# |
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("SA4TSP")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
| 35.962963 | 82 | 0.741504 | [
"MIT"
] | yasserglez/metaheuristics | Problems/TSP/SA4TSP/AssemblyInfo.cs | 971 | C# |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.