content stringlengths 23 1.05M |
|---|
using System.Windows.Controls;
using System.Windows.Input;
using GalaSoft.MvvmLight.Messaging;
using Dukebox.Desktop.Interfaces;
using Dukebox.Desktop.Model;
using Dukebox.Desktop.Services;
using System.Linq;
namespace Dukebox.Desktop.Views
{
/// <summary>
/// Interaction logic for PlaylistListing.xaml
/// </summary>
public partial class PlaylistListing : UserControl
{
public PlaylistListing()
{
InitializeComponent();
}
private void ListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
var listBox = sender as ListBox;
if (listBox?.SelectedItem != null)
{
var item = listBox.SelectedItem as PlaylistWrapper;
var playlistListingViewModel = DataContext as IPlaylistListingViewModel;
playlistListingViewModel?.LoadPlaylist?.Execute(item);
}
}
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
var listBox = sender as ListBox;
if (listBox?.SelectedItem != null)
{
var item = listBox.SelectedItem as PlaylistWrapper;
if (item == null)
{
return;
}
Messenger.Default.Send(new PreviewTracksMessage
{
Name = item.Data.Name,
IsPlaylist = true
});
}
}
}
}
|
// Copyright (c) Lykke Corp.
// Licensed under the MIT License. See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
namespace Lykke.RabbitMqBroker.Publisher.DeferredMessages
{
internal class DeferredMessagesManager : IStartStop
{
private readonly IDeferredMessagesRepository _repository;
private readonly Timer _timer;
private readonly TimeSpan _period;
private readonly ILogger<DeferredMessagesManager> _logger;
private IRawMessagePublisher _publisher;
public DeferredMessagesManager(
IDeferredMessagesRepository repository,
TimeSpan delayPrecision,
ILogger<DeferredMessagesManager> logger)
{
_repository = repository ?? throw new ArgumentNullException(nameof(repository));
_period = delayPrecision;
_timer = new Timer(Execute, null, TimeSpan.FromMilliseconds(-1), delayPrecision);
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
public void PublishUsing(IRawMessagePublisher publisher)
{
_publisher = publisher ?? throw new ArgumentNullException(nameof(publisher));
}
public Task DeferAsync(RawMessage message, DateTime deliverAt)
{
return _repository.SaveAsync(message, deliverAt);
}
public void Start()
{
if (_publisher == null)
{
throw new InvalidOperationException("Publisher is not set");
}
_timer.Change(TimeSpan.Zero, _period);
}
public void Stop()
{
_timer.Change(Timeout.Infinite, Timeout.Infinite);
}
public void Dispose()
{
Stop();
_timer.Dispose();
}
private void Execute(object state)
{
ProcessMessagesAsync().GetAwaiter().GetResult();
}
private async Task ProcessMessagesAsync()
{
var messages = await _repository.GetOverdueMessagesAsync(DateTime.UtcNow);
var removeTasks = new List<Task>();
try
{
foreach (var message in messages)
{
_publisher.Produce(message.Message);
removeTasks.Add(_repository.RemoveAsync(message.Key));
}
}
catch (Exception e)
{
_logger.LogError(e, "Failed to publish messages");
}
finally
{
if (removeTasks.Any())
{
await Task.WhenAll(removeTasks);
}
}
}
}
}
|
using OpenCV.Net;
using System;
using System.ComponentModel;
using System.Linq;
using System.Reactive.Linq;
namespace Bonsai.JonsUtils
{
[Combinator]
[WorkflowElementCategory(ElementCategory.Transform)]
[Description("Map channels or columns of matrix.")]
public class MatrixMap
{
Mat MatMap(Mat source)
{
var output = new Mat(source.Size, source.Depth, source.Channels);
var map = Map.Reshape(0, 1);
// I dont know wtf is going on with this
if (MapDimension == Dimension.ROWS)
{
for (int i = 0; i < map.Cols; i++)
CV.Copy(source.GetRow((int)map[i].Val0), output.GetRow(i));
}
else
{
for (int i = 0; i < map.Cols; i++)
CV.Copy(source.GetCol((int)map[i].Val0), output.GetCol(i));
}
return output;
}
public IObservable<Mat> Process(IObservable<Mat> source)
{
return source.Select(input => MatMap(input));
}
public enum Dimension
{
ROWS,
COLS
}
[Description("Dimension to map. (e.g. 0 = rows.")]
public Dimension MapDimension { get; set; } = Dimension.ROWS;
[Description("The map. This is a vector of indices to map either the rows or colums with.")]
public Mat Map { get; set; }
}
}
|
using System.Net;
namespace core.BusinessEntityCollection
{
public class IpInfo
{
private int _port = 15000;
public IPHostEntry Host
{
get { return Dns.GetHostEntry(Dns.GetHostName()); }
}
public IPAddress Address
{
get { return IPAddress.Loopback; }
}
public int Port
{
get { return _port; }// todo get available random port or from config file
}
public IPEndPoint EndPoint
{
get { return new IPEndPoint(Address, Port); }
}
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using BLL.DTOs.People.Director;
using BLL.DTOs.People.InsuranceAgent;
using BLL.Facades.InsuranceAgent;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Swashbuckle.Swagger.Annotations;
namespace WebAPI.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class InsuranceAgentController : ControllerBase
{
private IInsuranceAgentFacade _facade;
public InsuranceAgentController(IInsuranceAgentFacade facade)
{
_facade = facade;
}
[HttpGet("getById")]
[SwaggerResponse(StatusCodes.Status404NotFound, "Insurance agent not found.")]
[SwaggerResponse(StatusCodes.Status200OK, "Insurance agent retrieved.")]
public async Task<ActionResult<InsuranceAgentGetDTO>> GetById([Range(1, int.MaxValue)] int id)
{
var agent = await _facade.GetAsync(id);
if (agent == null)
{
return NotFound();
}
return Ok(agent);
}
[HttpGet("getAll")]
[SwaggerResponse(StatusCodes.Status404NotFound, "Insurance agents not found.")]
[SwaggerResponse(StatusCodes.Status200OK, "Insurance agents retrieved.")]
public async Task<ActionResult<IEnumerable<InsuranceAgentGetDTO>>> GetAll([Range(1, int.MaxValue)] int? id)
{
var agents = await _facade.GetAllAsync(id);
if (agents == null)
{
return NotFound();
}
return Ok(agents);
}
}
}
|
using System;
namespace WinBioNET.Unused
{
public class WinBioObject
: IEquatable<WinBioObject>
{
private IntPtr _handle;
protected void SetID(IntPtr handle)
{
_handle = handle;
}
public override bool Equals(object other)
{
if (!(other is WinBioObject)) return false;
return Equals((WinBioObject) other);
}
public bool Equals(WinBioObject other)
{
if (other == null) return false;
return _handle.Equals(other._handle);
}
public override int GetHashCode()
{
return _handle.GetHashCode();
}
public override string ToString()
{
return string.Format("{0}({1})", GetType().Name, _handle);
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DiscordCI.Application
{
/// <summary>
/// Parses the args to build a <see cref="IDiscordCIMessage"/>.
/// </summary>
public class ArgParser
{
/// <summary>
/// <see cref="IDiscordCIMessage"/> without an optional message parameter.
/// </summary>
private class ParsedDiscordMessageWithoutMessage : IDiscordCIMessage
{
public string Message
{
get
{
return $"**TravisCI**\n" +
$"```\n" +
$"Commit: {commitHash}\n" +
$"Repo: {repoName}\n" +
$"Branch: {branchName}\n" +
$"```" +
$"URL: {buildUrl}\n\n";
}
}
private string buildUrl { get; }
private string commitHash { get; }
private string branchName { get; }
private string repoName { get; }
public ParsedDiscordMessageWithoutMessage(string url, string commit, string branch, string slug)
{
buildUrl = url;
commitHash = commit;
branchName = branch;
repoName = slug;
}
}
private string url { get; }
private string commit { get; }
private string branch { get; }
private string slug { get; }
public ArgParser(string[] args)
{
url = args[4];
commit = args[5];
branch = args[6];
slug = args[7];
}
public IDiscordCIMessage Generate()
{
return new ParsedDiscordMessageWithoutMessage(url, commit, branch, slug);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace KonkukCommunicationDesign
{
public partial class CeilingWindow
{
SettingWindow settingWindow;
public void shortCutDispatch(KeyEventArgs e)
{
switch (e.Key)
{
case Key.S :
SettingWindow window = new SettingWindow(this, wallDisplayWindow);
window.ShowDialog();
break;
}
}
}
}
|
namespace BusinessConversation
{
// C#
using System.Collections.Generic;
using System.Text.RegularExpressions;
// Unity
using UnityEngine;
public class CSVReader : MonoBehaviour
{
private static readonly string SPLIT_RE = @",(?=(?:[^""]*""[^""]*"")*(?![^""]*""))";
private static readonly string LINE_SPLIT_RE = @"\r\n|\n\r|\n|\r";
private static readonly char[] TRIM_CHARS = { '\"' };
public static List<Dictionary<string, object>> Read(string path)
{
var list = new List<Dictionary<string, object>>();
TextAsset data = Resources.Load(path) as TextAsset;
var lines = Regex.Split(data.text, LINE_SPLIT_RE);
if (lines.Length <= 1) return list;
var header = Regex.Split(lines[0], SPLIT_RE);
for (var i = 1; i < lines.Length; i++)
{
var values = Regex.Split(lines[i], SPLIT_RE);
if (values.Length == 0 || values[0] == "") continue;
var entry = new Dictionary<string, object>();
for (var j = 0; j < header.Length && j < values.Length; j++)
{
string value = values[j];
value = value.TrimStart(TRIM_CHARS).TrimEnd(TRIM_CHARS).Replace("\\", "");
object finalvalue = value;
int n;
float f;
if (int.TryParse(value, out n))
{
finalvalue = n;
}
else if (float.TryParse(value, out f))
{
finalvalue = f;
}
entry[header[j]] = finalvalue;
}
list.Add(entry);
}
return list;
}
}
}
|
namespace Lightfsm.Wpfexmpl.Classes
{
/// <summary>
/// The Backup files states enum.
/// </summary>
public enum BackupFilesStateEnum
{
/// <summary>
/// The check version state.
/// </summary>
SettingsState,
/// <summary>
/// Transfer to removeable state.
/// </summary>
TransferToRemoveableState,
/// <summary>
/// The recover previous version state.
/// </summary>
TransferToLocationState,
/// <summary>
/// The exit state.
/// </summary>
ExitState,
/// <summary>
/// The null state.
/// </summary>
NullState
}
} |
using MessagePack.Formatters;
namespace MessagePack.Resolvers
{
public class DefaultResolver : IFormatterResolver
{
public static IFormatterResolver Instance = new DefaultResolver();
static readonly IFormatterResolver[] resolvers = new[]
{
BuiltinResolver.Instance, // Try Builtin
DynamicEnumResolver.Instance, // Try Enum
DynamicGenericResolver.Instance, // Try Array, Tuple, Collection
DynamicUnionResolver.Instance, // Try Union(Interface)
DynamicObjectResolver.Instance // Try Object
};
DefaultResolver()
{
}
public IMessagePackFormatter<T> GetFormatter<T>()
{
return FormatterCache<T>.formatter;
}
static class FormatterCache<T>
{
public static readonly IMessagePackFormatter<T> formatter;
static FormatterCache()
{
foreach (var item in resolvers)
{
var f = item.GetFormatter<T>();
if (f != null)
{
formatter = f;
return;
}
}
}
}
}
public class DefaultWithContractlessResolver : IFormatterResolver
{
public static IFormatterResolver Instance = new DefaultWithContractlessResolver();
static readonly IFormatterResolver[] resolvers = new[]
{
DefaultResolver.Instance,
DynamicContractlessObjectResolver.Instance,
};
DefaultWithContractlessResolver()
{
}
public IMessagePackFormatter<T> GetFormatter<T>()
{
return FormatterCache<T>.formatter;
}
static class FormatterCache<T>
{
public static readonly IMessagePackFormatter<T> formatter;
static FormatterCache()
{
foreach (var item in resolvers)
{
var f = item.GetFormatter<T>();
if (f != null)
{
formatter = f;
return;
}
}
}
}
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PopUp : MonoBehaviour
{
public GameObject opacity;
public Animation animation;
/* start is a state variable:
* 0 -> first popup
* 1 -> bigger
* 2 -> smaller
* 3 -> right dimension and so END
* */
public int start;
// Start is called before the first frame update
void Start()
{
start = 0;
}
// Update is called once per frame
void Update()
{
}
public void show()
{
this.gameObject.SetActive(true);
opacity.SetActive(true);
animation["Show"].wrapMode = WrapMode.Once;
animation.Play("Show");
}
public void vanish()
{
this.gameObject.SetActive(false);
opacity.SetActive(false);
start = 0;
GameObject.Find("Left Frame").GetComponent<LeftFrame>().Restore();
}
}
|
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.MemoryMappedFiles;
using System.Runtime.CompilerServices;
using System.Threading;
using BTDB.StreamLayer;
namespace BTDB.KVDBLayer
{
public class OnDiskMemoryMappedFileCollection : IFileCollection
{
public IDeleteFileCollectionStrategy DeleteFileCollectionStrategy
{
get => _deleteFileCollectionStrategy ??= new JustDeleteFileCollectionStrategy();
set => _deleteFileCollectionStrategy = value;
}
readonly string _directory;
// disable invalid warning about using volatile inside Interlocked.CompareExchange
#pragma warning disable 420
volatile Dictionary<uint, File> _files = new Dictionary<uint, File>();
int _maxFileId;
IDeleteFileCollectionStrategy? _deleteFileCollectionStrategy;
sealed unsafe class File : IFileCollectionFile
{
readonly OnDiskMemoryMappedFileCollection _owner;
readonly uint _index;
readonly string _fileName;
long _trueLength;
long _cachedLength;
readonly FileStream _stream;
readonly object _lock = new object();
readonly Writer _writer;
MemoryMappedFile? _memoryMappedFile;
MemoryMappedViewAccessor? _accessor;
byte* _pointer;
const long ResizeChunkSize = 4 * 1024 * 1024;
public File(OnDiskMemoryMappedFileCollection owner, uint index, string fileName)
{
_owner = owner;
_index = index;
_fileName = fileName;
_stream = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read, 1,
FileOptions.None);
_trueLength = _stream.Length;
_cachedLength = _trueLength;
_writer = new Writer(this);
}
internal void Dispose()
{
_writer.FlushBuffer();
UnmapContent();
_stream.SetLength(_trueLength);
_stream.Dispose();
}
public uint Index => _index;
void MapContent()
{
if (_accessor != null) return;
_memoryMappedFile = MemoryMappedFile.CreateFromFile(_stream, null, 0, MemoryMappedFileAccess.ReadWrite,
HandleInheritability.None, true);
_accessor = _memoryMappedFile!.CreateViewAccessor();
_accessor.SafeMemoryMappedViewHandle.AcquirePointer(ref _pointer);
}
void UnmapContent()
{
if (_accessor == null) return;
_accessor.SafeMemoryMappedViewHandle.ReleasePointer();
_accessor.Dispose();
_accessor = null;
_memoryMappedFile!.Dispose();
_memoryMappedFile = null;
}
sealed class Reader : ISpanReader
{
readonly File _owner;
readonly ulong _valueSize;
ulong _ofs;
public Reader(File owner)
{
_owner = owner;
_valueSize = _owner.GetSize();
if (_valueSize != 0)
{
_owner.MapContent();
}
_ofs = 0;
}
public void Init(ref SpanReader spanReader)
{
spanReader.Buf = new Span<byte>(_owner._pointer + _ofs,
(int)Math.Min(_valueSize - _ofs, int.MaxValue));
spanReader.Original = spanReader.Buf;
}
public bool FillBufAndCheckForEof(ref SpanReader spanReader)
{
_ofs += (ulong)(spanReader.Original.Length - spanReader.Buf.Length);
spanReader.Buf = new Span<byte>(_owner._pointer + _ofs,
(int)Math.Min(_valueSize - _ofs, int.MaxValue));
spanReader.Original = spanReader.Buf;
return 0 == spanReader.Buf.Length;
}
public long GetCurrentPosition(in SpanReader spanReader)
{
return (long)_ofs + spanReader.Original.Length - spanReader.Buf.Length;
}
public bool ReadBlock(ref SpanReader spanReader, ref byte buffer, uint length)
{
if (length <= _valueSize - _ofs)
{
Unsafe.CopyBlockUnaligned(ref buffer, ref Unsafe.AsRef<byte>(_owner._pointer + _ofs), length);
_ofs += length;
return false;
}
_ofs = _valueSize;
return true;
}
public bool SkipBlock(ref SpanReader spanReader, uint length)
{
if (length <= _valueSize - _ofs)
{
_ofs += length;
return false;
}
_ofs = _valueSize;
return true;
}
public void SetCurrentPosition(ref SpanReader spanReader, long position)
{
throw new NotSupportedException();
}
public void Sync(ref SpanReader spanReader)
{
_ofs += (uint)(spanReader.Original.Length - spanReader.Buf.Length);
}
}
sealed class Writer : ISpanWriter
{
readonly File _file;
internal ulong Ofs;
public Writer(File file)
{
_file = file;
Ofs = (ulong)_file._trueLength;
}
public void FlushBuffer()
{
lock (_file._lock)
{
_file._trueLength = (long)Ofs;
}
}
void ExpandIfNeeded(long size)
{
if (_file._cachedLength < size)
{
_file.UnmapContent();
var newSize = ((size - 1) / ResizeChunkSize + 1) * ResizeChunkSize;
_file._stream.SetLength(newSize);
_file._cachedLength = newSize;
}
_file.MapContent();
}
public void Init(ref SpanWriter spanWriter)
{
spanWriter.Buf = new Span<byte>(_file._pointer + Ofs,
(int)Math.Min((ulong)_file._trueLength - Ofs, int.MaxValue));
spanWriter.InitialBuffer = spanWriter.Buf;
}
public void Sync(ref SpanWriter spanWriter)
{
Ofs += (ulong)(spanWriter.InitialBuffer.Length - spanWriter.Buf.Length);
}
public bool Flush(ref SpanWriter spanWriter)
{
Sync(ref spanWriter);
ExpandIfNeeded((long)Ofs + ResizeChunkSize);
Init(ref spanWriter);
return true;
}
public long GetCurrentPosition(in SpanWriter spanWriter)
{
return (long)(Ofs + (ulong)(spanWriter.InitialBuffer.Length - spanWriter.Buf.Length));
}
public long GetCurrentPositionWithoutWriter()
{
return (long)Ofs;
}
public void WriteBlock(ref SpanWriter spanWriter, ref byte buffer, uint length)
{
Sync(ref spanWriter);
ExpandIfNeeded((long)Ofs + length);
WriteBlockWithoutWriter(ref buffer, length);
Init(ref spanWriter);
}
public void WriteBlockWithoutWriter(ref byte buffer, uint length)
{
Unsafe.CopyBlockUnaligned(ref buffer, ref Unsafe.AsRef<byte>(_file._pointer + Ofs),
length);
Ofs += length;
}
public void SetCurrentPosition(ref SpanWriter spanWriter, long position)
{
throw new NotSupportedException();
}
}
public ISpanReader GetExclusiveReader()
{
return new Reader(this);
}
public void AdvisePrefetch()
{
}
public void RandomRead(Span<byte> data, ulong position, bool doNotCache)
{
lock (_lock)
{
if (data.Length > 0 && position < _writer.Ofs)
{
MapContent();
var read = data.Length;
if (_writer.Ofs - position < (ulong)read) read = (int)(_writer.Ofs - position);
new Span<byte>(_pointer + position, read).CopyTo(data);
data = data.Slice(read);
}
if (data.Length == 0) return;
throw new EndOfStreamException();
}
}
public ISpanWriter GetAppenderWriter()
{
return _writer;
}
public ISpanWriter GetExclusiveAppenderWriter()
{
return _writer;
}
public void Flush()
{
_writer.FlushBuffer();
}
public void HardFlush()
{
Flush();
_stream.Flush(true);
}
public void SetSize(long size)
{
_writer.FlushBuffer();
lock (_lock)
{
_writer.Ofs = (ulong)size;
_trueLength = size;
}
}
public void Truncate()
{
UnmapContent();
_stream.SetLength(_trueLength);
}
public void HardFlushTruncateSwitchToReadOnlyMode()
{
HardFlush();
Truncate();
}
public void HardFlushTruncateSwitchToDisposedMode()
{
HardFlush();
Truncate();
}
public ulong GetSize()
{
lock (_lock)
{
return (ulong)_writer.GetCurrentPositionWithoutWriter();
}
}
public void Remove()
{
Dictionary<uint, File> newFiles;
Dictionary<uint, File> oldFiles;
do
{
oldFiles = _owner._files;
if (!oldFiles!.TryGetValue(_index, out _)) return;
newFiles = new Dictionary<uint, File>(oldFiles);
newFiles.Remove(_index);
} while (Interlocked.CompareExchange(ref _owner._files, newFiles, oldFiles) != oldFiles);
UnmapContent();
_stream.Dispose();
_owner.DeleteFileCollectionStrategy.DeleteFile(_fileName);
}
}
public OnDiskMemoryMappedFileCollection(string directory)
{
_directory = directory;
_maxFileId = 0;
foreach (var filePath in Directory.EnumerateFiles(directory))
{
var id = GetFileId(Path.GetFileNameWithoutExtension(filePath));
if (id == 0) continue;
var file = new File(this, id, filePath);
_files.Add(id, file);
if (id > _maxFileId) _maxFileId = (int)id;
}
}
static uint GetFileId(string fileName)
{
return uint.TryParse(fileName, out var result) ? result : 0;
}
public IFileCollectionFile AddFile(string? humanHint)
{
var index = (uint)Interlocked.Increment(ref _maxFileId);
var fileName = index.ToString("D8") + "." + (humanHint ?? "");
var file = new File(this, index, Path.Combine(_directory, fileName));
Dictionary<uint, File> newFiles;
Dictionary<uint, File> oldFiles;
do
{
oldFiles = _files;
newFiles = new Dictionary<uint, File>(oldFiles!) { { index, file } };
} while (Interlocked.CompareExchange(ref _files, newFiles, oldFiles) != oldFiles);
return file;
}
public uint GetCount()
{
return (uint)_files.Count;
}
public IFileCollectionFile? GetFile(uint index)
{
return _files.TryGetValue(index, out var value) ? value : null;
}
public IEnumerable<IFileCollectionFile> Enumerate()
{
return _files.Values;
}
public void ConcurrentTemporaryTruncate(uint index, uint offset)
{
// Nothing to do
}
public void Dispose()
{
foreach (var file in _files.Values)
{
file.Dispose();
}
}
}
}
|
using PetClinic.Data.ViewModels;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace PetClinic.Web.InputModels
{
public class CreateOwnerForm
{
public int Id { get; set; }
[Required]
[DisplayName("Names")]
[StringLength(150, MinimumLength = 3, ErrorMessage = "Invalid Names, Max: 150; Min: 3 Characters long")]
public string Name { get; set; }
public IEnumerable<PetViewModel> Pets { get; set; }
}
} |
using LiteNetwork.Protocol.Abstractions;
namespace AdaptedGameCollection.Protocol.Client;
/// <summary>
/// The keep-alive packet which should be sent to the server.
/// </summary>
public class PacketHeartbeat : IPacket
{
public void Serialize(ILitePacketStream buffer)
{
}
public void Deserialize(ILitePacketStream buffer)
{
}
} |
using System;
public sealed class HiveState
{
private HiveState()
{
}
public StatisticsSet GenerateHoney(StatisticsSet stats, AttributeSet attributes)
{
var lPollenRequirement = attributes.GetDouble(AttributeKeys.PollenRequirement);
var lMaximumBatchCount = Math.Floor(attributes.GetDouble(AttributeKeys.HoneyBatchCount));
var lTheoreticalBatchCount = Math.Floor(stats.GetDouble(StatisticKeys.RemainingPollen) / lPollenRequirement);
var lBatchCount = (long) Math.Min(lMaximumBatchCount, lTheoreticalBatchCount);
var lPollenRequired = lBatchCount * lPollenRequirement;
var lHoneyGenerated = lBatchCount * attributes.GetDouble(AttributeKeys.HoneyYield);
stats.Decrement(StatisticKeys.RemainingPollen, lPollenRequired);
stats.Increment(StatisticKeys.HoneyAvailable, lHoneyGenerated);
var lResult = StatisticsSet.CreateEmpty();
lResult.Set(StatisticKeys.HoneyBatchCount, lBatchCount);
lResult.Set(StatisticKeys.PollenProcessed, lPollenRequired);
lResult.Set(StatisticKeys.HoneyProduced, lHoneyGenerated);
return lResult;
}
public static HiveState CreateNew()
{
return new HiveState();
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyManager : MonoBehaviour
{
[SerializeField]
private Enemy _enemy;
private float spawnTime = 3f;
void Start ()
{
InvokeRepeating ("Spawn", spawnTime, spawnTime);
}
void Spawn()
{
Instantiate (_enemy, this.transform.position, this.transform.rotation);
}
}
|
using UnityEngine;
using Sirenix.OdinInspector;
using System.Collections.Generic;
using System;
/// <summary>
/// PlayerController handle player movement
/// <summary>
public class BlockerBehaviour : MonoBehaviour, IKillable, IPooledObject
{
#region Attributes
private bool enabledObject = true;
private Rigidbody rigidBody;
#endregion
#region Initialize
private void Awake()
{
rigidBody = GetComponent<Rigidbody>();
Init();
}
/// <summary>
/// activé quand l'ennemy est spawn
/// </summary>
public void OnObjectSpawn()
{
Init();
}
private void Init()
{
enabledObject = true;
rigidBody.velocity = Vector3.zero;
rigidBody.angularVelocity = Vector3.zero;
}
private void OnEnable()
{
EventManager.StartListening(GameData.Event.GameOver, StopAction);
}
#endregion
#region Core
/// <summary>
/// appelé quand le jeu est fini...
/// </summary>
private void StopAction()
{
enabledObject = false;
}
/// <summary>
/// appelé lorsque la pool clean up les objet actif et les désactif (lors d'une transition de scene)
/// </summary>
public void OnDesactivePool()
{
Debug.Log("DesactiveFromPool");
StopAction();
gameObject.SetActive(false);
}
#endregion
#region Unity ending functions
private void OnDisable()
{
EventManager.StopListening(GameData.Event.GameOver, StopAction);
}
#endregion
[FoldoutGroup("Debug"), Button("Kill")]
public void Kill()
{
if (!enabledObject)
return;
enabledObject = false;
gameObject.SetActive(false);
}
} |
namespace TypedRest.CodeGeneration.CSharp.Endpoints.Generic
{
internal static class Namespace
{
public const string Name = "TypedRest.Endpoints.Generic";
}
}
|
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using CppSharp.AST;
using CppSharp.Parser;
using CppSharp.Utils;
namespace CppSharp.Passes
{
public class GenerateInlinesPass : TranslationUnitPass
{
public GenerateInlinesPass()
{
VisitOptions.VisitClassBases = false;
VisitOptions.VisitClassFields = false;
VisitOptions.VisitEventParameters = false;
VisitOptions.VisitFunctionParameters = false;
VisitOptions.VisitFunctionReturnType = false;
VisitOptions.VisitNamespaceEnums = false;
VisitOptions.VisitNamespaceEvents = false;
VisitOptions.VisitNamespaceTemplates = false;
VisitOptions.VisitNamespaceTypedefs = false;
VisitOptions.VisitNamespaceVariables = false;
VisitOptions.VisitTemplateArguments = false;
}
public override bool VisitASTContext(ASTContext context)
{
var result = base.VisitASTContext(context);
var findSymbolsPass = Context.TranslationUnitPasses.FindPass<FindSymbolsPass>();
findSymbolsPass.Wait = true;
GenerateInlines();
return result;
}
public event EventHandler<InlinesCodeEventArgs> InlinesCodeGenerated;
private void GenerateInlines()
{
var modules = (from module in Options.Modules
where inlinesCodeGenerators.ContainsKey(module)
select module).ToList();
remainingCompilationTasks = modules.Count;
foreach (var module in modules)
{
var inlinesCodeGenerator = inlinesCodeGenerators[module];
var cpp = $"{module.InlinesLibraryName}.{inlinesCodeGenerator.FileExtension}";
Directory.CreateDirectory(Options.OutputDir);
var path = Path.Combine(Options.OutputDir, cpp);
File.WriteAllText(path, inlinesCodeGenerator.Generate());
var e = new InlinesCodeEventArgs(module);
InlinesCodeGenerated?.Invoke(this, e);
if (string.IsNullOrEmpty(e.CustomCompiler))
RemainingCompilationTasks--;
else
InvokeCompiler(e.CustomCompiler, e.CompilerArguments,
e.OutputDir, module.InlinesLibraryName);
}
}
public override bool VisitFunctionDecl(Function function)
{
if (!base.VisitFunctionDecl(function))
return false;
var module = function.TranslationUnit.Module;
if (module == Options.SystemModule)
{
GetInlinesCodeGenerator(module);
return false;
}
if (!NeedsSymbol(function))
return false;
var inlinesCodeGenerator = GetInlinesCodeGenerator(module);
return function.Visit(inlinesCodeGenerator);
}
public class InlinesCodeEventArgs : EventArgs
{
public InlinesCodeEventArgs(Module module)
{
this.Module = module;
}
public Module Module { get; set; }
public string CustomCompiler { get; set; }
public string CompilerArguments { get; set; }
public string OutputDir { get; set; }
}
private bool NeedsSymbol(Function function)
{
var mangled = function.Mangled;
var method = function as Method;
return function.IsGenerated && !function.IsDeleted && !function.IsDependent &&
!function.IsPure && (!string.IsNullOrEmpty(function.Body) || function.IsImplicit) &&
// we don't need symbols for virtual functions anyway
(method == null || (!method.IsVirtual && !method.IsSynthetized &&
(!method.IsConstructor || !((Class) method.Namespace).IsAbstract))) &&
// we cannot handle nested anonymous types
(!(function.Namespace is Class) || !string.IsNullOrEmpty(function.Namespace.OriginalName)) &&
!Context.Symbols.FindSymbol(ref mangled);
}
private InlinesCodeGenerator GetInlinesCodeGenerator(Module module)
{
if (inlinesCodeGenerators.ContainsKey(module))
return inlinesCodeGenerators[module];
var inlinesCodeGenerator = new InlinesCodeGenerator(Context, module.Units);
inlinesCodeGenerators[module] = inlinesCodeGenerator;
inlinesCodeGenerator.Process();
return inlinesCodeGenerator;
}
private void InvokeCompiler(string compiler, string arguments, string outputDir, string inlines)
{
new Thread(() =>
{
int error;
string errorMessage;
ProcessHelper.Run(compiler, arguments, out error, out errorMessage);
if (string.IsNullOrEmpty(errorMessage))
CollectInlinedSymbols(outputDir, inlines);
else
Diagnostics.Error(errorMessage);
RemainingCompilationTasks--;
}).Start();
}
private void CollectInlinedSymbols(string outputDir, string inlines)
{
using (var parserOptions = new ParserOptions())
{
parserOptions.AddLibraryDirs(outputDir);
var output = Path.GetFileName($@"{(Platform.IsWindows ?
string.Empty : "lib")}{inlines}.{
(Platform.IsMacOS ? "dylib" : Platform.IsWindows ? "dll" : "so")}");
parserOptions.LibraryFile = output;
using (var parserResult = Parser.ClangParser.ParseLibrary(parserOptions))
{
if (parserResult.Kind == ParserResultKind.Success)
{
var nativeLibrary = ClangParser.ConvertLibrary(parserResult.Library);
lock (@lock)
{
Context.Symbols.Libraries.Add(nativeLibrary);
Context.Symbols.IndexSymbols();
}
parserResult.Library.Dispose();
}
else
Diagnostics.Error($"Parsing of {Path.Combine(outputDir, output)} failed.");
}
}
}
private int RemainingCompilationTasks
{
get { return remainingCompilationTasks; }
set
{
if (remainingCompilationTasks != value)
{
remainingCompilationTasks = value;
if (remainingCompilationTasks == 0)
{
var findSymbolsPass = Context.TranslationUnitPasses.FindPass<FindSymbolsPass>();
findSymbolsPass.Wait = false;
}
}
}
}
private int remainingCompilationTasks;
private static readonly object @lock = new object();
private Dictionary<Module, InlinesCodeGenerator> inlinesCodeGenerators =
new Dictionary<Module, InlinesCodeGenerator>();
}
}
|
/// This code was generated by
/// \ / _ _ _| _ _
/// | (_)\/(_)(_|\/| |(/_ v1.0.0
/// / /
using System;
using System.Collections.Generic;
using Twilio.Base;
using Twilio.Converters;
namespace Twilio.Rest.Conversations.V1.Service.Configuration
{
/// <summary>
/// Update push notification service settings
/// </summary>
public class UpdateNotificationOptions : IOptions<NotificationResource>
{
/// <summary>
/// The SID of the Conversation Service that the Configuration applies to.
/// </summary>
public string PathChatServiceSid { get; }
/// <summary>
/// Weather the notification logging is enabled.
/// </summary>
public bool? LogEnabled { get; set; }
/// <summary>
/// Whether to send a notification when a new message is added to a conversation.
/// </summary>
public bool? NewMessageEnabled { get; set; }
/// <summary>
/// The template to use to create the notification text displayed when a new message is added to a conversation.
/// </summary>
public string NewMessageTemplate { get; set; }
/// <summary>
/// The name of the sound to play when a new message is added to a conversation.
/// </summary>
public string NewMessageSound { get; set; }
/// <summary>
/// Whether the new message badge is enabled.
/// </summary>
public bool? NewMessageBadgeCountEnabled { get; set; }
/// <summary>
/// Whether to send a notification when a participant is added to a conversation.
/// </summary>
public bool? AddedToConversationEnabled { get; set; }
/// <summary>
/// The template to use to create the notification text displayed when a participant is added to a conversation.
/// </summary>
public string AddedToConversationTemplate { get; set; }
/// <summary>
/// The name of the sound to play when a participant is added to a conversation.
/// </summary>
public string AddedToConversationSound { get; set; }
/// <summary>
/// Whether to send a notification to a user when they are removed from a conversation.
/// </summary>
public bool? RemovedFromConversationEnabled { get; set; }
/// <summary>
/// The template to use to create the notification text displayed to a user when they are removed.
/// </summary>
public string RemovedFromConversationTemplate { get; set; }
/// <summary>
/// The name of the sound to play to a user when they are removed from a conversation.
/// </summary>
public string RemovedFromConversationSound { get; set; }
/// <summary>
/// Whether to send a notification when a new message with media/file attachments is added to a conversation.
/// </summary>
public bool? NewMessageWithMediaEnabled { get; set; }
/// <summary>
/// The template to use to create the notification text displayed when a new message with media/file attachments is added to a conversation.
/// </summary>
public string NewMessageWithMediaTemplate { get; set; }
/// <summary>
/// Construct a new UpdateNotificationOptions
/// </summary>
/// <param name="pathChatServiceSid"> The SID of the Conversation Service that the Configuration applies to. </param>
public UpdateNotificationOptions(string pathChatServiceSid)
{
PathChatServiceSid = pathChatServiceSid;
}
/// <summary>
/// Generate the necessary parameters
/// </summary>
public List<KeyValuePair<string, string>> GetParams()
{
var p = new List<KeyValuePair<string, string>>();
if (LogEnabled != null)
{
p.Add(new KeyValuePair<string, string>("LogEnabled", LogEnabled.Value.ToString().ToLower()));
}
if (NewMessageEnabled != null)
{
p.Add(new KeyValuePair<string, string>("NewMessage.Enabled", NewMessageEnabled.Value.ToString().ToLower()));
}
if (NewMessageTemplate != null)
{
p.Add(new KeyValuePair<string, string>("NewMessage.Template", NewMessageTemplate));
}
if (NewMessageSound != null)
{
p.Add(new KeyValuePair<string, string>("NewMessage.Sound", NewMessageSound));
}
if (NewMessageBadgeCountEnabled != null)
{
p.Add(new KeyValuePair<string, string>("NewMessage.BadgeCountEnabled", NewMessageBadgeCountEnabled.Value.ToString().ToLower()));
}
if (AddedToConversationEnabled != null)
{
p.Add(new KeyValuePair<string, string>("AddedToConversation.Enabled", AddedToConversationEnabled.Value.ToString().ToLower()));
}
if (AddedToConversationTemplate != null)
{
p.Add(new KeyValuePair<string, string>("AddedToConversation.Template", AddedToConversationTemplate));
}
if (AddedToConversationSound != null)
{
p.Add(new KeyValuePair<string, string>("AddedToConversation.Sound", AddedToConversationSound));
}
if (RemovedFromConversationEnabled != null)
{
p.Add(new KeyValuePair<string, string>("RemovedFromConversation.Enabled", RemovedFromConversationEnabled.Value.ToString().ToLower()));
}
if (RemovedFromConversationTemplate != null)
{
p.Add(new KeyValuePair<string, string>("RemovedFromConversation.Template", RemovedFromConversationTemplate));
}
if (RemovedFromConversationSound != null)
{
p.Add(new KeyValuePair<string, string>("RemovedFromConversation.Sound", RemovedFromConversationSound));
}
if (NewMessageWithMediaEnabled != null)
{
p.Add(new KeyValuePair<string, string>("NewMessage.WithMedia.Enabled", NewMessageWithMediaEnabled.Value.ToString().ToLower()));
}
if (NewMessageWithMediaTemplate != null)
{
p.Add(new KeyValuePair<string, string>("NewMessage.WithMedia.Template", NewMessageWithMediaTemplate));
}
return p;
}
}
/// <summary>
/// Fetch push notification service settings
/// </summary>
public class FetchNotificationOptions : IOptions<NotificationResource>
{
/// <summary>
/// The SID of the Conversation Service that the Configuration applies to.
/// </summary>
public string PathChatServiceSid { get; }
/// <summary>
/// Construct a new FetchNotificationOptions
/// </summary>
/// <param name="pathChatServiceSid"> The SID of the Conversation Service that the Configuration applies to. </param>
public FetchNotificationOptions(string pathChatServiceSid)
{
PathChatServiceSid = pathChatServiceSid;
}
/// <summary>
/// Generate the necessary parameters
/// </summary>
public List<KeyValuePair<string, string>> GetParams()
{
var p = new List<KeyValuePair<string, string>>();
return p;
}
}
} |
using System;
using System.Threading.Tasks;
using Back.Zone.Monads.EitherMonad;
using MySql.Data.MySqlClient;
namespace Back.Zone.Storage.MySQL.Service.Interfaces
{
public interface IMysqlService
{
public Either<Exception, TA> GetConnection<TA>(Func<MySqlConnection, TA> f);
public Task<Either<Exception, TA>> GetConnectionAsync<TA>(Func<MySqlConnection, Task<TA>> f);
}
} |
using System;
using Xunit;
namespace NickBuhro.Translit.Tests
{
public sealed class GeneralTests
{
[Fact]
public void C2LNullTest()
{
var result = Transliteration.CyrillicToLatin(null);
Assert.Null(result);
}
[Fact]
public void L2CNullTest()
{
var result = Transliteration.LatinToCyrillic(null);
Assert.Null(result);
}
[Fact]
public void C2LEmptyTest()
{
var result = Transliteration.CyrillicToLatin("");
Assert.Equal("", result);
}
[Fact]
public void L2CEmptyTest()
{
var result = Transliteration.LatinToCyrillic("");
Assert.Equal("", result);
}
[Fact]
public void C2LSimpleTest()
{
var result = Transliteration.CyrillicToLatin("Абв");
Assert.Equal("Abv", result);
}
[Fact]
public void L2CSimpleTest()
{
var result = Transliteration.LatinToCyrillic("Abv");
Assert.Equal("Абв", result);
}
[Fact]
public void C2LNumTest()
{
var result = Transliteration.CyrillicToLatin("123");
Assert.Equal("123", result);
}
[Fact]
public void L2CNumTest()
{
var result = Transliteration.LatinToCyrillic("123");
Assert.Equal("123", result);
}
[Fact]
public void C2LInvalidLanguageTest()
{
var lang = default(Language) - 1;
Assert.Throws<NotSupportedException>(() => Transliteration.CyrillicToLatin("123", lang));
}
[Fact]
public void L2CInvalidLanguageTest()
{
var lang = default(Language) - 1;
Assert.Throws<NotSupportedException>(() => Transliteration.LatinToCyrillic("123", lang));
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
using EventDataXML;
using GF.Common;
class CNodeStateRelease : EbState
{
//-------------------------------------------------------------------------
CNode mNode;
INodeServerScript mNodeServerScript;
INodeClientScript mNodeClientScript;
//-------------------------------------------------------------------------
public CNodeStateRelease(CNode node)
{
mNode = node;
_defState("CNodeStateRelease", "EbFsm", 0, false);
}
//-------------------------------------------------------------------------
public override void enter()
{
mNodeServerScript = mNode._getNodeServerScript();
mNodeClientScript = mNode._getNodeClientScript();
mNode._setNodeState(_eNodeState.Release);
// 销毁cur node
int node_id = mNode.getNodeId();
int next_node_id = mNode._getNextNodeId();
CNode parent_node = mNode.getParentNode();
// 生成NodeOp
if (!mNode.getNodeSys().isClient())
{
mNode.getNodeMgr()._opDestroyNode(node_id);
}
// 创建NextNode
if (!mNode.getNodeSys().isClient())
{
bool exit_all = mNode._isSelectAllExits();
if (exit_all)
{
var groups = mNode.getDefXml().GetGroupArray("Exit");
foreach (int i in groups.Keys)
{
Property exit_successor_id = groups[i].GetValue("Successor");
if (exit_successor_id != null)
{
int e_id = int.Parse(exit_successor_id.Value);
if (e_id > 0)
{
mNode.getNodeMgr()._opCreateNode(e_id, _eNodeState.Init, mNode.getNodeId());
}
}
}
}
else
{
if (parent_node != null && next_node_id == parent_node.getNodeId())
{
// 不创建NextNode,通知父Node出口
int parent_exit_id = 0;
var groups = mNode.getDefXml().GetGroupArray("Exit");
int exit_id = mNode.getExitId();
foreach (int i in groups.Keys)
{
if (i == exit_id)
{
Property prop_parent_exit_id = groups[i].GetValue("ParentExit");
parent_exit_id = int.Parse(prop_parent_exit_id.Value);
break;
}
}
//EbLog.Note("parent_exit_id=" + parent_exit_id);
parent_node._notifyExit(parent_exit_id);
}
else if (next_node_id > 0)
{
mNode.getNodeMgr()._opCreateNode(next_node_id, _eNodeState.Init, mNode.getNodeId());
}
else
{
EbLog.Note("Not Create Next Node. next_node_id=" + next_node_id);
}
}
if (parent_node != null)
{
parent_node._removeChildNode(mNode.getNodeId());
}
}
}
//-------------------------------------------------------------------------
public override void exit()
{
}
}
|
namespace RoRamu.Utils.CSharp
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
/// <summary>
/// Represents a C# constructor method.
/// </summary>
public class CSharpClassConstructor : CSharpMethod
{
/// <summary>
/// The parameter values to pass to the base class' constructor, as they will appear in the code.
/// <para>
/// If this is null, the base constructor call will not be visible in the generated output.
/// Do this either when this constructor's class does not inherit from another class, or
/// when the constructor should call the base class' default constructor automatically.
/// </para>
/// </summary>
public IEnumerable<string> BaseClassConstructorParameterValues { get; }
/// <summary>
/// Constructs a new <see cref="CSharpClassConstructor" /> object.
/// </summary>
/// <param name="className">The name of the class that contains this constructor.</param>
/// <param name="accessModifier">The access level of the method.</param>
/// <param name="parameters">The parameters which need to be provided as inputs to this method.</param>
/// <param name="baseClassConstructorParameterValues">
/// The parameter values to pass to the base class' constructor, as they will appear in the code.
/// <para>
/// If this is null, the base constructor call will not be visible in the generated output.
/// Do this either when this constructor's class does not inherit from another class, or
/// when the constructor should call the base class' default constructor automatically.
/// </para>
/// <para>
/// NOTE: These values will not automatically be sanitized if they are identifiers. For
/// example, if one of the variables being passed to the base constructor is called "class",
/// then you should provide the string "@class" instead).
/// </para>
/// </param>
/// <param name="body">The method body.</param>
/// <param name="documentationComment">
/// The method's documentation comment. The parameters' documentation will automatically be
/// included in this comment.
/// </param>
public CSharpClassConstructor(
string className,
string body,
CSharpAccessModifier accessModifier = CSharpAccessModifier.Public,
IEnumerable<CSharpParameter> parameters = null,
IEnumerable<string> baseClassConstructorParameterValues = null,
CSharpDocumentationComment documentationComment = null)
: base(
name: className,
returnType: null,
body: body,
parameters: parameters,
accessModifier: accessModifier,
isStatic: false,
isOverride: false,
isAsync: false,
documentationComment: documentationComment)
{
this.BaseClassConstructorParameterValues = baseClassConstructorParameterValues ?? Array.Empty<string>();
}
/// <summary>
/// Gets the method signature as a string.
/// </summary>
/// <returns>The method signature.</returns>
public override string GetMethodSignature()
{
// Get the standard method signarure without the base class constructor call
string result = base.GetMethodSignature();
// Add the base class constructor call to the signature if required
if (this.BaseClassConstructorParameterValues != null)
{
int numParameters = this.BaseClassConstructorParameterValues.Count();
if (numParameters == 0)
{
result += " : base()";
}
else if (numParameters == 1)
{
result += $" : base({this.BaseClassConstructorParameterValues.Single()})";
}
else
{
StringBuilder sb = new StringBuilder(result);
sb.AppendLine();
sb.Append(StringUtils.GetIndentPrefix());
sb.Append(": base(");
bool isFirst = true;
string indentString = StringUtils.GetIndentPrefix(2);
foreach (string parameterValue in this.BaseClassConstructorParameterValues)
{
if (!isFirst)
{
sb.Append(',');
}
sb.AppendLine();
sb.Append(indentString);
sb.Append(parameterValue);
isFirst = false;
}
sb.Append(')');
result += sb.ToString();
}
}
return result;
}
}
}
|
namespace Sudoku.UI.Pages.MainWindow;
/// <summary>
/// Indicates the page that contains the author and program information.
/// </summary>
public sealed partial class AboutPage : Page
{
/// <summary>
/// Initializes an <see cref="AboutPage"/> instance.
/// </summary>
public AboutPage() => InitializeComponent();
}
|
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
namespace MonoGame.Framework.Graphics
{
public interface ISpriteBatch
{
/// <summary>
/// Gets a value used to sort a sprite,
/// based on the current sort mode and the given parameters.
/// </summary>
float GetSortKey(Texture2D texture, float sortDepth);
/// <summary>
/// Get a unique <see cref="SpriteQuad"/> reference from the batch.
/// The reference shall remain unique as long as the batch is not flushed.
/// </summary>
ref SpriteQuad GetBatchQuad(Texture2D texture, float sortKey);
bool FlushIfNeeded();
}
} |
using FluentAssertions;
using Microsoft.Extensions.Logging;
using Moq;
using MrMatrix.Net.ActorOnServiceBus.Actors.Actors;
using MrMatrix.Net.ActorOnServiceBus.Actors.Sagas;
using MrMatrix.Net.ActorOnServiceBus.ActorSystem.Interfaces;
using MrMatrix.Net.ActorOnServiceBus.Messages.Dtos;
using System.Threading;
using System.Threading.Tasks;
using Xunit;
namespace MrMatrix.Net.ActorOnServiceBus.Actors.Tests
{
public class DonorActorShould
{
private readonly ILogger<DonorActor> _logger;
public DonorActorShould()
{
var loggerMock = new Mock<ILogger<DonorActor>>(MockBehavior.Loose);
_logger = loggerMock.Object;
}
[Fact]
public async Task StoreCurrentDonationInEmptySaga()
{
var saga = new DonationSaga();
CancellationToken ctx = CancellationToken.None;
var network = new Mock<IActorsNetwork<DonationSaga>>(MockBehavior.Loose);
network
.Setup(m => m.Saga)
.Returns(saga);
var sut = new DonorActor(network.Object, _logger);
await sut.Handle(new DonationDto()
{
DonorId = "donor",
Quantity = 2,
Key = "t-shirt"
}, ctx);
saga.DonorId.Should().Be("donor");
saga.Balance.Should().ContainKey("t-shirt");
saga.Balance["t-shirt"].Donation.Should().Be(2);
saga.Balance["t-shirt"].Necessity.Should().Be(0);
}
[Fact]
public async Task IncreaseDonationQuantityForExistingItem()
{
// arrange
var saga = new DonationSaga
{
Balance =
{
["socks"]=new NeedBalance { Necessity = 777, Donation =888 },
["t-shirt"]=new NeedBalance { Necessity = 1000, Donation = 100 }
}
};
CancellationToken ctx = CancellationToken.None;
var network = new Mock<IActorsNetwork<DonationSaga>>(MockBehavior.Loose);
network
.Setup(m => m.Saga)
.Returns(saga);
var sut = new DonorActor(network.Object, _logger);
// act
await sut.Handle(new DonationDto
{
DonorId = "donor",
Quantity = 2,
Key = "t-shirt"
}, ctx);
// assert
saga.DonorId.Should().Be("donor");
saga.Balance.Should().ContainKey("t-shirt");
saga.Balance.Should().ContainKey("socks");
saga.Balance["t-shirt"].Donation.Should().Be(102);
saga.Balance["t-shirt"].Necessity.Should().Be(1000);
saga.Balance["socks"].Donation.Should().Be(888);
saga.Balance["socks"].Necessity.Should().Be(777);
}
}
}
|
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Recipes.Xpo.Entities
{
public partial class ProductLine : IProductLine<Product>
{
public ProductLine() : base()
{
}
ICollection<Product> IProductLine<Product>.Products => (ICollection<Product>)Products;
}
}
|
/* Write a method that reverses the digits of
* given decimal number. Example: 256 652
*/
using System;
using System.Text;
namespace _07.ReverseDigits
{
class Program
{
static string ReverseDigits(string inputNumber)
{
var sb = new StringBuilder();
for (int i = inputNumber.Length-1; i >= 0; i--)
{
sb.Append(inputNumber[i]);
}
return sb.ToString();
}
static void Main(string[] args)
{
const string myString = "1234556.5360";
Console.WriteLine("Reversed number is: {0}", ReverseDigits(myString));
}
}
}
|
using CommunityPlugin.Objects.Interface;
using System;
namespace CommunityPlugin.Objects.Args
{
public class TranslationFilterEventArgs
{
public IMapping Mapping { get; internal set; }
public string Transalation { get; internal set; }
[Obsolete]
public string FiltedTranslation
{
get
{
return this.FilteredTranslation;
}
set
{
this.FilteredTranslation = value;
}
}
public string FilteredTranslation { get; set; }
internal TranslationFilterEventArgs()
{
this.FilteredTranslation = string.Empty;
}
}
}
|
using System.Windows;
using System.Windows.Media.Effects;
namespace IconMaker.wpf
{
public class HueRingEffect : ShaderEffect
{
private static readonly PixelShader _pixelShader = new PixelShader();
static HueRingEffect()
{
#if DEBUG
_pixelShader.UriSource = Global.MakePackUri("HueRing.cso");
#else
_pixelShader.UriSource = Global.MakePackUri("HueRing.cso");
#endif
}
public HueRingEffect()
{
PixelShader = _pixelShader;
UpdateShaderValue(SaturationProperty);
UpdateShaderValue(ValueProperty);
}
public static readonly DependencyProperty SaturationProperty = DependencyProperty.Register(
nameof(Saturation), typeof(double), typeof(HueRingEffect),
new UIPropertyMetadata(1.0d, PixelShaderConstantCallback(0)));
private static void SaturationChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
PixelShaderConstantCallback(0)(d, e);
}
public double Saturation
{
get => (double) GetValue(SaturationProperty);
set => SetValue(SaturationProperty, value);
}
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
nameof(Value), typeof(double), typeof(HueRingEffect),
new UIPropertyMetadata(1.0d, PixelShaderConstantCallback(1)));
public double Value
{
get => (double)GetValue(ValueProperty);
set => SetValue(ValueProperty, value);
}
}
}
|
using NeuroSpeech.EntityAccessControl.Internal;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace NeuroSpeech.EntityAccessControl
{
public delegate void IgnoreDelegate<T>(Expression<Func<T, object>> expression,
JsonIgnoreCondition condition = JsonIgnoreCondition.Always);
public class DbEntityEvents<T> : IEntityEvents
{
public bool EnforceSecurity { get; set; }
public EntityAccessException NewEntityAccessException(string title)
{
return new EntityAccessException(new ErrorModel { Title = title });
}
private Dictionary<PropertyInfo, JsonIgnoreCondition>? ignoreConditions;
private List<PropertyInfo>? readOnlyProperties;
public List<PropertyInfo> GetIgnoreConditions(string typeCacheKey)
{
ignoreConditions = new Dictionary<PropertyInfo, JsonIgnoreCondition>();
OnSetupIgnore(typeCacheKey);
return ignoreConditions
.Where(x => x.Value == JsonIgnoreCondition.Always)
.Select(x => x.Key).ToList();
}
public List<PropertyInfo> GetReadOnlyProperties(string typeCacheKey)
{
readOnlyProperties = new List<PropertyInfo>();
OnSetupReadOnly(typeCacheKey);
var r = readOnlyProperties;
readOnlyProperties = null;
return r;
}
protected virtual void OnSetupReadOnly(string typeCacheKey)
{
}
protected virtual void OnSetupIgnore(string typeCacheKey)
{
}
/**
* This will setup specified properties as readonly,
*/
protected void SetReadOnly(Expression<Func<T, object>> expression)
{
if (readOnlyProperties == null)
throw new InvalidOperationException($"SetReadOnly must only be called within OnSetupReadOnly method");
if (expression.Body is NewExpression nme)
{
foreach (var m in nme.Arguments)
{
if (m is not MemberExpression member)
throw new ArgumentException($"Invalid expression");
while (member.Expression is not ParameterExpression pe)
{
if (member.Expression is not MemberExpression me2)
throw new ArgumentException($"Invalid expression");
member = me2;
}
if (member.Member is not PropertyInfo property1)
throw new ArgumentException($"Should be a property");
readOnlyProperties.Add(property1);
}
return;
}
if (expression.Body is not MemberExpression me)
throw new ArgumentException($"Expression {expression} is not a valid member expression");
if (me.Member is not PropertyInfo property)
throw new ArgumentException($"Expression {expression} is not a valid property expression");
readOnlyProperties.Add(property);
}
/**
* This will disable Json serialization for given property
*/
protected void Ignore(Expression<Func<T, object>> expression,
JsonIgnoreCondition condition = JsonIgnoreCondition.Always)
{
if (ignoreConditions == null)
throw new InvalidOperationException($"Ignore must only be called within OnSetupIgnore method");
if (expression.Body is NewExpression nme)
{
foreach (var m in nme.Arguments)
{
if (m is not MemberExpression member)
throw new ArgumentException($"Invalid expression");
while (member.Expression is not ParameterExpression pe)
{
if (member.Expression is not MemberExpression me2)
throw new ArgumentException($"Invalid expression");
member = me2;
}
if (member.Member is not PropertyInfo property1)
throw new ArgumentException($"Should be a property");
ignoreConditions[property1] = condition;
}
return;
}
if (expression.Body is not MemberExpression me)
throw new ArgumentException($"Expression {expression} is not a valid member expression");
if (me.Member is not PropertyInfo property)
throw new ArgumentException($"Expression {expression} is not a valid property expression");
ignoreConditions[property] = condition;
}
public virtual IQueryContext<T> Filter(IQueryContext<T> q)
{
if (EnforceSecurity)
throw new EntityAccessException($"No security rule defined for {typeof(T).Name}");
return q;
}
public virtual IQueryContext<T> ModifyFilter(IQueryContext<T> q)
{
return Filter(q);
}
public virtual IQueryContext<T> DeleteFilter(IQueryContext<T> q)
{
return ModifyFilter(q);
}
public virtual IQueryContext<T> IncludeFilter(IQueryContext<T> q)
{
return Filter(q);
}
public virtual IQueryContext<T> ReferenceFilter(IQueryContext<T> q, FilterContext fc)
{
return ModifyFilter(q);
}
IQueryContext IEntityEvents.ReferenceFilter(IQueryContext q, FilterContext fc)
{
return ReferenceFilter((IQueryContext<T>)q, fc);
}
IQueryContext IEntityEvents.Filter(IQueryContext q)
{
return Filter((IQueryContext<T>)q);
}
IQueryContext IEntityEvents.IncludeFilter(IQueryContext q)
{
return IncludeFilter((IQueryContext<T>)q);
}
IQueryContext IEntityEvents.ModifyFilter(IQueryContext q)
{
return ModifyFilter((IQueryContext<T>)q);
}
IQueryContext IEntityEvents.DeleteFilter(IQueryContext q)
{
return DeleteFilter((IQueryContext<T>)q);
}
public virtual Task DeletedAsync(T entity)
{
return Task.CompletedTask;
}
Task IEntityEvents.DeletedAsync(object entity)
{
return DeletedAsync((T)entity);
}
public virtual Task DeletingAsync(T entity)
{
if (EnforceSecurity)
throw new EntityAccessException($"Deleting Entity {typeof(T).FullName} denied");
return Task.CompletedTask;
}
Task IEntityEvents.DeletingAsync(object entity)
{
return DeletingAsync((T)entity);
}
public virtual Task InsertedAsync(T entity)
{
return Task.CompletedTask;
}
Task IEntityEvents.InsertedAsync(object entity)
{
return InsertedAsync((T)entity);
}
public virtual Task InsertingAsync(T entity)
{
if (EnforceSecurity)
throw new EntityAccessException($"Inserting Entity {typeof(T).FullName} denied");
return Task.CompletedTask;
}
Task IEntityEvents.InsertingAsync(object entity)
{
return InsertingAsync((T)entity);
}
public virtual Task UpdatedAsync(T entity)
{
return Task.CompletedTask;
}
Task IEntityEvents.UpdatedAsync(object entity)
{
return UpdatedAsync((T)entity);
}
public virtual Task UpdatingAsync(T entity)
{
if (EnforceSecurity)
throw new EntityAccessException($"Updating Entity {typeof(T).FullName} denied");
return Task.CompletedTask;
}
Task IEntityEvents.UpdatingAsync(object entity)
{
return UpdatingAsync((T)entity);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ManagedFusion.Web.Mvc
{
/// <summary>
///
/// </summary>
public class HttpPostOnlyAttribute : AllowedHttpMethodsAttribute
{
/// <summary>
/// Initializes a new instance of the <see cref="HttpPostOnlyAttribute"/> class.
/// </summary>
public HttpPostOnlyAttribute()
: base("POST") { }
}
}
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CANtact
{
public partial class FixedTrace : Form
{
#region class MatrixRow
public class MatrixRow
{
public int Count { get; set; }
public CANPackage LastPackage { get; set; }
public DateTime LastTime;
public MatrixRow()
{
}
}
#endregion
private SortedList<UInt32, MatrixRow> m_ids = new SortedList<uint, MatrixRow>(50);
public FixedTrace()
{
InitializeComponent();
}
internal void Add(CANPackage package)
{
if (InvokeRequired)
{
BeginInvoke(new Action<CANPackage>(Add), package);
return;
}
if (!m_ids.ContainsKey(package.ID))
m_ids.Add(package.ID, new MatrixRow());
MatrixRow row = m_ids[package.ID];
row.Count++;
row.LastPackage = package;
row.LastTime = DateTime.Now;
string[] subitems = package.ToStrings(row.Count);
if (row.Count == 1)
{ // Add new row to grid
ListViewItem item = new ListViewItem(subitems, 0);
item.Tag = package.ID;
int idx = 0;
for (; idx < grid.Items.Count; idx++)
{
ListViewItem current = grid.Items[idx];
if (((UInt32)current.Tag) > package.ID)
break;
}
if (idx >= grid.Items.Count)
grid.Items.Add(item);
else
grid.Items.Insert(idx, item);
}
else
{ // Change existed grid row
for (int idx = 0; idx < grid.Items.Count; idx++)
{
ListViewItem current = grid.Items[idx];
if (((UInt32)current.Tag) == package.ID)
{ // Found it and change
current.SubItems[0].Text = subitems[0];
current.SubItems[1].Text = subitems[1];
current.SubItems[2].Text = subitems[2];
current.SubItems[3].Text = subitems[3];
current.SubItems[4].Text = subitems[4];
current.SubItems[5].Text = subitems[5];
current.SubItems[6].Text = subitems[6];
current.SubItems[7].Text = subitems[7];
current.SubItems[8].Text = subitems[8];
current.SubItems[9].Text = subitems[9];
current.SubItems[10].Text = subitems[10];
current.SubItems[11].Text = subitems[11];
current.SubItems[12].Text = subitems[12];
break;
}
}
}
}
}
}
|
using System.Collections;
namespace Strands.Tests.Shared
{
public class StepCounterStrand : Strand
{
public int StepsTaken = 0;
private readonly int _stepsToTake;
public StepCounterStrand(int stepsToTake)
{
_stepsToTake = stepsToTake;
}
protected override IEnumerator Execute()
{
while (StepsTaken < _stepsToTake)
{
StepsTaken += 1;
yield return null;
}
}
}
} |
//--------------------------------------------------------------
// Vehicle Physics Pro: advanced vehicle physics kit
// Copyright © 2011-2019 Angel Garcia "Edy"
// http://vehiclephysics.com | @VehiclePhysics
//--------------------------------------------------------------
// GearModeSelector: Shows current gear mode and allows selecting it
using UnityEngine;
using UnityEngine.UI ;
using UnityEngine.EventSystems;
using EdyCommonTools;
namespace VehiclePhysics.UI
{
public class GearModeSelector : MonoBehaviour,
IPointerDownHandler
{
public VehicleBase vehicle;
public Color selectedColor = GColor.ParseColorHex("#E6E6E6");
public Color unselectedColor = GColor.ParseColorHex("#999999");
public Transform selector;
[Header("Gear elements")]
public Graphic gearM;
public Graphic gearP;
public Graphic gearR;
public Graphic gearN;
public Graphic gearD;
public Graphic gearL;
int m_prevGearMode = -1;
int m_prevGearInput = -1;
void OnEnable ()
{
m_prevGearMode = -1;
m_prevGearInput = -1;
if (vehicle != null)
vehicle.onBeforeIntegrationStep += UpdateInputState;
}
void OnDisable ()
{
if (vehicle != null)
vehicle.onBeforeIntegrationStep -= UpdateInputState;
}
void UpdateInputState ()
{
if (vehicle == null) return;
int gearInput = vehicle.data.Get(Channel.Input, InputData.AutomaticGear);
int gearMode = vehicle.data.Get(Channel.Vehicle, VehicleData.GearboxMode);
if (gearMode != m_prevGearMode)
{
HighlightGear(gearMode);
m_prevGearMode = gearMode;
}
if (gearInput != m_prevGearInput)
{
MoveGearSelector(gearInput);
m_prevGearInput = gearInput;
}
}
public void OnPointerDown (PointerEventData eventData)
{
if (vehicle == null || eventData.button != PointerEventData.InputButton.Left) return;
GameObject pressed = eventData.pointerCurrentRaycast.gameObject;
Graphic graphic = pressed.GetComponentInChildren<Graphic>();
if (graphic != null)
{
int newGearMode = GraphicToGear(graphic);
if (newGearMode >= 0)
vehicle.data.Set(Channel.Input, InputData.AutomaticGear, newGearMode);
}
}
void HighlightGear (int gearMode)
{
ClearEngagedGearMode();
SetGraphicColor(GearToGraphic(gearMode), selectedColor);
}
void MoveGearSelector (int gearInput)
{
if (selector != null)
{
Graphic targetGraphic = GearToGraphic(gearInput);
if (targetGraphic != null)
{
selector.position = targetGraphic.transform.position;
}
}
}
void ClearEngagedGearMode ()
{
SetGraphicColor(gearM, unselectedColor);
SetGraphicColor(gearP, unselectedColor);
SetGraphicColor(gearR, unselectedColor);
SetGraphicColor(gearN, unselectedColor);
SetGraphicColor(gearD, unselectedColor);
SetGraphicColor(gearL, unselectedColor);
}
Graphic GearToGraphic (int gearMode)
{
switch (gearMode)
{
case 0: return gearM;
case 1: return gearP;
case 2: return gearR;
case 3: return gearN;
case 4: return gearD;
case 5: return gearL;
}
return null;
}
int GraphicToGear (Graphic graphic)
{
if (graphic == gearM) return 0;
if (graphic == gearP) return 1;
if (graphic == gearR) return 2;
if (graphic == gearN) return 3;
if (graphic == gearD) return 4;
if (graphic == gearL) return 5;
return -1;
}
void SetGraphicColor (Graphic graphic, Color color)
{
if (graphic != null)
graphic.color = color;
}
}
} |
using System;
using System.Collections.Generic;
namespace LibCommon
{
/// <summary>
/// 错误代码
/// </summary>
[Serializable]
public enum ErrorNumber : int
{
None = 0, //成功
Sys_GetMacAddressExcept = -1000, //获取Mac地址异常
Sys_GetIpAddressExcept = -1001, //获取IP地址异常
Sys_JsonWriteExcept = -1002, //Json写入异常
Sys_JsonReadExcept = -1003, //Json读取异常
Sys_ConfigDirNotExists = -1004, //配置文件目录不存在
Sys_ConfigFileNotExists = -1005, //配置文件不存在
Sys_ParamsNotEnough = -1006, //参数不足
Sys_ParamsIsNotRight = -1007, //参数不正确
Sys_WebApi_Except = -1008, //WebApi异常
Sys_ConfigNotReady = -1009, //配置文件没有就绪
Sys_DataBaseNotReady = -1010, //数据库没有就绪
Sys_NetworkPortExcept = -1011, //端口不可用
Sys_DiskInfoExcept = -1012, //磁盘不可用
Sys_UrlExcept = -1013, //参数中URL异常
Sys_ReadIniFileExcept = -1014, //读取ini文件异常
Sys_WriteIniFileExcept = -1015, //写入ini文件异常
Sys_SocketPortForRtpExcept = -1016, //查找可用rtp端口时异常,可能已无可用端口
Sys_SpecifiedFileNotExists = -1017, //指定文件不存在
Sys_InvalidAccessKey = -1018, //访问密钥失效
Sys_AKStreamKeeperNotRunning = -1019, //AKStreamKeeper流媒体服务器治理程序没有运行
Sys_DataBaseLimited = -1020, //数据库操作受限,请检查相关参数,如分页查询时每页不能超过10000行
Sys_DB_VideoChannelNotExists = -1021, //数据库中不存在指定音视频通道
Sys_DataBaseExcept = -1022, //数据库执行异常
Sys_DB_VideoChannelAlRedayExists = -1023, //数据库中已经存在指定音视频通道
Sys_DB_RecordNotExists = -1024, //数据库中指定记录不存在
Sys_VideoChannelNotActived = -1025, //音视频通实例没有激活
Sys_HttpClientTimeout = -1026, //http客户端请求超时
Sys_DB_RecordPlanNotExists = -1027, //录制计划不存在
Sys_RecordPlanTimeLimitExcept = -1028, //录制计划时间间隔异常
Sys_DB_RecordPlanAlreadyExists = -1029, //数据库中指定录制计划已经存在
Sys_DvrCutMergeTimeLimit = -1030, //裁剪时间限制,超过120分钟任务不允许执行
Sys_DvrCutMergeFileNotFound = -1031, //时间周期内没有找到相关视频文件
Sys_DvrCutProcessQueueLimit = -1032, //处理队列已满,请稍后再试
Sys_AutoResetEventExcept = -1033, //AutoResetEventExcept
Sip_StartExcept = -2000, //启动Sip服务异常
Sip_StopExcept = -2001, //停止Sip服务异常
Sip_Except_DisposeSipDevice = -2002, //Sip网关内部异常(销毁Sip设备时)
Sip_Except_RegisterSipDevice = -2003, //Sip网关内部异常(注册Sip设备时)
Sip_ChannelNotExists = -2004, //Sip音视频通道不存在
Sip_DeviceNotExists = -2005, //Sip设备不存在
Sip_OperationNotAllowed = -2006, //该设备类型下不允许这个操作
Sip_DeInviteExcept = -2007, //结束推流时异常
Sip_InviteExcept = -2008, //推流时异常
Sip_SendMessageExcept = -2009, //发送sip消息时异常
Sip_AlredayPushStream = -2010, //sip通道已经在推流状态
Sip_NotOnPushStream = -2011, //Sip通道没有在推流状态
Sip_Channel_StatusExcept = -2012, //Sip通道设备状态异常
Sip_VideoLiveExcept = -2013, //Sip通道推流请求异常
Sip_CallBackExcept = -2014, //sip回调时异常
MediaServer_WebApiExcept = -3000, //访问流媒体服务器WebApi时异常
MediaServer_WebApiDataExcept = -3001, //访问流媒体服务器WebApi接口返回数据异常
MediaServer_TimeExcept = -3002, //服务器时间异常,建议同步
MediaServer_BinNotFound = -3003, //流媒体服务器可执行文件不存在
MediaServer_ConfigNotFound = -3004, //流媒体服务器配置文件不存在,建议手工运行一次流媒体服务器使其自动生成配置文件模板
MediaServer_InstanceIsNull = -3005, //流媒体服务实例为空,请先创建流媒体服务实例
MediaServer_StartUpExcept = -3006, //启动流媒体服务器失败
MediaServer_ShutdownExcept = -3007, //停止流媒体服务器失败
MediaServer_RestartExcept = -3008, //重启流媒体服务器失败
MediaServer_ReloadExcept = -3009, //流媒体服务器配置热加载失败
MediaServer_NotRunning = -3010, //流媒体服务器没有运行
MediaServer_OpenRtpPortExcept = -3011, //申请rtp端口失败,申请端口可能已经存在
MediaServer_WaitWebHookTimeOut = -3012, //等待流媒体服务器回调时超时
MediaServer_StreamTypeExcept = -3013, //流类型不正确
MediaServer_GetStreamTypeExcept = -3014, //指定拉流方法不正确
MediaServer_VideoSrcExcept = -3015, //源流地址异常
MediaServer_InputObjectAlredayExists=-3016,//传入对象已经存在
MediaServer_ObjectNotExists=-3017,//对象不存在
Other = -6000 //其他异常
}
/// <summary>
/// 错误代码描述
/// </summary>
[Serializable]
public static class ErrorMessage
{
public static Dictionary<ErrorNumber, string>? ErrorDic;
public static void Init()
{
ErrorDic = new Dictionary<ErrorNumber, string>();
ErrorDic[ErrorNumber.None] = "无错误";
ErrorDic[ErrorNumber.Sys_GetMacAddressExcept] = "获取Mac地址异常";
ErrorDic[ErrorNumber.Sys_GetIpAddressExcept] = "获取IP地址异常";
ErrorDic[ErrorNumber.Sys_JsonWriteExcept] = "Json写入异常";
ErrorDic[ErrorNumber.Sys_JsonReadExcept] = "Json读取异常";
ErrorDic[ErrorNumber.Sys_ConfigDirNotExists] = "配置文件目录不存在";
ErrorDic[ErrorNumber.Sys_ConfigFileNotExists] = "配置文件不存在";
ErrorDic[ErrorNumber.Sys_ParamsNotEnough] = "传入参数不足";
ErrorDic[ErrorNumber.Sys_ParamsIsNotRight] = "传入参数不正确";
ErrorDic[ErrorNumber.Sys_ConfigNotReady] = "配置文件没有就绪,请检查配置文件是否正确无误";
ErrorDic[ErrorNumber.Sys_DataBaseNotReady] = "数据库没有就绪,请检查数据库是否可以正常连接";
ErrorDic[ErrorNumber.Sys_NetworkPortExcept] = "端口不可用,请检查配置文件";
ErrorDic[ErrorNumber.Sys_WebApi_Except] = "WebApi异常";
ErrorDic[ErrorNumber.Sys_DiskInfoExcept] = "磁盘不可用,请检查配置文件";
ErrorDic[ErrorNumber.Sys_UrlExcept] = "参数中URL异常";
ErrorDic[ErrorNumber.Sys_ReadIniFileExcept] = "读取ini文件异常";
ErrorDic[ErrorNumber.Sys_WriteIniFileExcept] = "写入ini文件异常";
ErrorDic[ErrorNumber.Sys_SocketPortForRtpExcept] = "查找可用rtp端口时异常,可能已无可用端口";
ErrorDic[ErrorNumber.Sys_SpecifiedFileNotExists] = "指定文件不存在";
ErrorDic[ErrorNumber.Sys_InvalidAccessKey] = "访问密钥失效";
ErrorDic[ErrorNumber.Sys_AKStreamKeeperNotRunning] = "AKStreamKeeper流媒体服务器治理程序没有运行";
ErrorDic[ErrorNumber.Sys_DataBaseLimited] = "数据库操作受限,请检查相关参数,如分页查询时每页不能超过10000行,第一页从1开始而不是从0开始";
ErrorDic[ErrorNumber.Sys_DB_VideoChannelNotExists] = "数据库中不存在指定音视频通道";
ErrorDic[ErrorNumber.Sys_DB_VideoChannelAlRedayExists] = "数据库中已经存在指定音视频通道";
ErrorDic[ErrorNumber.Sys_DB_RecordNotExists] = "数据库中指定记录不存在";
ErrorDic[ErrorNumber.Sys_DB_RecordPlanNotExists] = "数据库中指定录制计划不存在";
ErrorDic[ErrorNumber.Sys_RecordPlanTimeLimitExcept] = "录制计划中时间间隔太小异常";
ErrorDic[ErrorNumber.Sys_DataBaseExcept] = "数据库执行异常";
ErrorDic[ErrorNumber.Sys_VideoChannelNotActived] = "音视频通道实例没有激活,或音视频通道数据库配置有异常,请激活并检查";
ErrorDic[ErrorNumber.Sys_HttpClientTimeout] = "http客户端请求超时或服务不可达";
ErrorDic[ErrorNumber.Sys_DB_RecordPlanAlreadyExists] = "数据库中指定录制计划已经存在";
ErrorDic[ErrorNumber.Sys_DvrCutMergeTimeLimit] = "裁剪时间限制,超过120分钟任务不允许执行";
ErrorDic[ErrorNumber.Sys_DvrCutMergeFileNotFound] = "时间周期内没有找到相关视频文件";
ErrorDic[ErrorNumber.Sys_DvrCutProcessQueueLimit] = "处理队列已满,请稍后再试";
ErrorDic[ErrorNumber.Sys_AutoResetEventExcept] = "异步等待元子异常";
ErrorDic[ErrorNumber.Sip_StartExcept] = "启动Sip服务异常";
ErrorDic[ErrorNumber.Sip_StopExcept] = "停止Sip服务异常";
ErrorDic[ErrorNumber.Sip_Except_DisposeSipDevice] = "Sip网关内部异常(销毁Sip设备时)";
ErrorDic[ErrorNumber.Sip_Except_RegisterSipDevice] = "Sip网关内部异常(注册Sip设备时)";
ErrorDic[ErrorNumber.Sip_ChannelNotExists] = "Sip音视频通道不存在";
ErrorDic[ErrorNumber.Sip_DeviceNotExists] = "Sip设备不存在";
ErrorDic[ErrorNumber.Sip_OperationNotAllowed] = "该类型的设备不允许做这个操作";
ErrorDic[ErrorNumber.Sip_DeInviteExcept] = "结束推流时发生异常";
ErrorDic[ErrorNumber.Sip_InviteExcept] = "推流时发生异常";
ErrorDic[ErrorNumber.Sip_SendMessageExcept] = "发送Sip消息时异常";
ErrorDic[ErrorNumber.Sip_AlredayPushStream] = "Sip通道(回放录像)已经在推流状态";
ErrorDic[ErrorNumber.Sip_NotOnPushStream] = "Sip通道(回放录像)没有在推流状态";
ErrorDic[ErrorNumber.Sip_Channel_StatusExcept] = "Sip通道状态异常";
ErrorDic[ErrorNumber.Sip_VideoLiveExcept] = "Sip通道推流请求异常";
ErrorDic[ErrorNumber.Sip_CallBackExcept] = "sip回调时异常";
ErrorDic[ErrorNumber.MediaServer_WebApiExcept] = "访问流媒体服务器WebApi接口时异常";
ErrorDic[ErrorNumber.MediaServer_WebApiDataExcept] = "访问流媒体服务器WebApi接口返回数据异常";
ErrorDic[ErrorNumber.MediaServer_TimeExcept] = "流媒体服务器时间异常,建议同步";
ErrorDic[ErrorNumber.MediaServer_BinNotFound] = "流媒体服务器可执行文件不存在";
ErrorDic[ErrorNumber.MediaServer_ConfigNotFound] = "流媒体服务器配置文件不存在,建议手工运行一次流媒体服务器使其自动生成配置文件模板";
ErrorDic[ErrorNumber.MediaServer_InstanceIsNull] = "流媒体服务实例为空,请先创建流媒体服务实例";
ErrorDic[ErrorNumber.MediaServer_StartUpExcept] = "启动流媒体服务器失败";
ErrorDic[ErrorNumber.MediaServer_ShutdownExcept] = "停止流媒体服务器失败";
ErrorDic[ErrorNumber.MediaServer_RestartExcept] = "重启流媒体服务器失败";
ErrorDic[ErrorNumber.MediaServer_ReloadExcept] = "流媒体服务器配置热加载失败";
ErrorDic[ErrorNumber.MediaServer_NotRunning] = "流媒体服务器没有运行";
ErrorDic[ErrorNumber.MediaServer_OpenRtpPortExcept] = "申请rtp端口失败,申请端口可能已经存在";
ErrorDic[ErrorNumber.MediaServer_WaitWebHookTimeOut] = "等待流媒体服务器回调响应超时";
ErrorDic[ErrorNumber.MediaServer_StreamTypeExcept] = "流类型不正确,GB28181Rtp流不能使用此功能拉流";
ErrorDic[ErrorNumber.MediaServer_GetStreamTypeExcept] = "指定拉流方法不正确,请指定SelfMethod后再试";
ErrorDic[ErrorNumber.MediaServer_VideoSrcExcept] = "源流地址异常,请检查数据库中VideoSrcUrl字段是否正确";
ErrorDic[ErrorNumber.MediaServer_InputObjectAlredayExists] = "传入对象已经存在";
ErrorDic[ErrorNumber.MediaServer_ObjectNotExists] = "指定对象不存在";
ErrorDic[ErrorNumber.Other] = "未知错误";
}
}
} |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
using Solidry.Aspects.Contract;
using Solidry.Aspects.Contract.Factory;
using Solidry.Results;
namespace Solidry.Aspects
{
/// <summary>
/// Asynchronous aspect.
/// </summary>
/// <typeparam name="TInput"></typeparam>
/// <typeparam name="TOutput"></typeparam>
public abstract class WithAspectAsync<TInput, TOutput>
{
private readonly IGeneralAspect _generalAspect;
private readonly IGeneralAspectAsync _generalAspectAsync;
private readonly IReadOnlyList<IBeforeAspectAsync<TInput, TOutput>> _beforeAsync;
private readonly IReadOnlyList<IAfterAspectAsync<TInput, TOutput>> _afterAsync;
/// <summary>
/// Create with general aspect, asynchronous general aspect, asynchronous before and after aspect.
/// </summary>
/// <param name="generalAspect"></param>
/// <param name="generalAspectAsync"></param>
/// <param name="beforeAsync"></param>
/// <param name="afterAsync"></param>
protected WithAspectAsync(
IGeneralAspect generalAspect,
IGeneralAspectAsync generalAspectAsync,
IReadOnlyList<IBeforeAspectAsync<TInput, TOutput>> beforeAsync,
IReadOnlyList<IAfterAspectAsync<TInput, TOutput>> afterAsync)
{
_generalAspect = generalAspect;
_generalAspectAsync = generalAspectAsync;
_beforeAsync = beforeAsync;
_afterAsync = afterAsync;
}
/// <summary>
/// Create with factory.
/// </summary>
/// <param name="factory"></param>
protected WithAspectAsync(IAspectAsyncFactory<TInput, TOutput> factory)
:this(factory.GeneralAspect, factory.GeneralAspectAsync, factory.BeforeAsync, factory.AfterAsync)
{
}
/// <summary>
/// Create with general aspect.
/// </summary>
/// <param name="generalAspect"></param>
protected WithAspectAsync(IGeneralAspect generalAspect) : this(generalAspect, null, null)
{
}
/// <summary>
/// Create with general aspect and asynchronous general aspect.
/// </summary>
/// <param name="generalAspect"></param>
/// <param name="generalAspectAsync"></param>
protected WithAspectAsync(IGeneralAspect generalAspect, IGeneralAspectAsync generalAspectAsync) :
this(generalAspect, generalAspectAsync, null)
{
}
/// <summary>
/// Create with general aspect and asynchronous before aspect.
/// </summary>
/// <param name="generalAspect"></param>
/// <param name="beforeAsync"></param>
protected WithAspectAsync(IGeneralAspect generalAspect,
IReadOnlyList<IBeforeAspectAsync<TInput, TOutput>> beforeAsync) : this(generalAspect, null, beforeAsync)
{
}
/// <summary>
/// Create with asynchronous general aspect and asynchronous before aspect.
/// </summary>
/// <param name="generalAspectAsync"></param>
/// <param name="beforeAsync"></param>
protected WithAspectAsync(IGeneralAspectAsync generalAspectAsync,
IReadOnlyList<IBeforeAspectAsync<TInput, TOutput>> beforeAsync) : this(null, generalAspectAsync,
beforeAsync)
{
}
/// <summary>
/// Create with general aspect, asynchronous general aspect and asynchronous before aspect.
/// </summary>
/// <param name="generalAspect"></param>
/// <param name="generalAspectAsync"></param>
/// <param name="beforeAsync"></param>
protected WithAspectAsync(IGeneralAspect generalAspect, IGeneralAspectAsync generalAspectAsync,
IReadOnlyList<IBeforeAspectAsync<TInput, TOutput>> beforeAsync)
: this(generalAspect, generalAspectAsync, beforeAsync, null)
{
}
/// <summary>
/// Execute asynchronous logic.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
protected abstract Task<TOutput> ExecuteAsync(TInput input);
/// <summary>
/// Get current operation id
/// </summary>
protected Guid CurrentOperationId { get; private set; }
/// <summary>
/// Execute logic with aspects.
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
protected async Task<TOutput> InvokeAsync(TInput input)
{
CurrentOperationId = Guid.NewGuid();
var stopWatch = Stopwatch.StartNew();
Option<TOutput> result = Option<TOutput>.Empty;
if (_generalAspect != null)
{
result = _generalAspect.Before<TInput, TOutput>(input, CurrentOperationId);
if (result.HasValue)
{
return result.Value;
}
}
if (_generalAspectAsync != null)
{
result = await _generalAspectAsync.BeforeAsync<TInput, TOutput>(input, CurrentOperationId)
.ConfigureAwait(false);
if (result.HasValue)
{
return result.Value;
}
}
if (_beforeAsync != null)
{
for (int i = 0; i < _beforeAsync.Count; i++)
{
result = await _beforeAsync[i].BeforeAsync(input, CurrentOperationId).ConfigureAwait(false);
if (result.HasValue)
{
return result.Value;
}
}
}
TOutput output = await ExecuteAsync(input);
stopWatch.Stop();
if (_afterAsync != null)
{
for (int i = 0; i < _afterAsync.Count; i++)
{
await _afterAsync[i].AfterAsync(input, output, CurrentOperationId, stopWatch.Elapsed)
.ConfigureAwait(false);
}
}
if (_generalAspectAsync != null)
{
await _generalAspectAsync.AfterAsync(input, output, CurrentOperationId, stopWatch.Elapsed)
.ConfigureAwait(false);
}
_generalAspect?.After(input, output, CurrentOperationId, stopWatch.Elapsed);
return output;
}
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace KyivSmartCityApi.Models.AccountInfo
{
public class AccountInfoResponse
{
[JsonPropertyName("accountInfo")]
public AccountInfo AccountInfo { get; set; }
[JsonPropertyName("bankingDetails")]
public BankingDetails BankingDetails { get; set; }
[JsonPropertyName("fieldsData")]
public List<string> FieldsData { get; set; }
[JsonPropertyName("amount")]
public double Amount { get; set; }
[JsonPropertyName("amountMax")]
public double AmountMax { get; set; }
[JsonPropertyName("amountMin")]
public double AmountMin { get; set; }
[JsonPropertyName("preOrderInfo")]
public string PreOrderInfo { get; set; }
[JsonPropertyName("masterPassWalletStatus")]
public string MasterPassWalletStatus { get; set; }
[JsonPropertyName("masterPassCommission")]
public double MasterPassCommission { get; set; }
[JsonPropertyName("fieldsLists")]
public string[] FieldsLists { get; set; }
[JsonPropertyName("error")]
public string Error { get; set; }
}
} |
using Api.Models.Config;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace Api.DIServiceRegister {
public class CloudServices {
public static void Register(IServiceCollection services, IConfigurationRoot config) {
services.Configure<Auth0Config>(config.GetSection("Auth0"));
services.Configure<CloudinaryConfig>(config.GetSection("Cloudinary"));
}
}
}
|
using BurningKnight.entity.component;
using BurningKnight.entity.events;
using BurningKnight.util;
using Lens.entity;
using Microsoft.Xna.Framework;
namespace BurningKnight.entity.creature.mob.prefix {
public class FragilePrefix : Prefix {
private static Vector4 color = new Vector4(146 / 255f, 161 / 255f, 185 / 255f, 1);
public override bool HandleEvent(Event e) {
if (e is HealthModifiedEvent hme) {
if (hme.Amount < 0) {
AnimationUtil.Poof(Mob.Center, 1);
var room = Mob.GetComponent<RoomComponent>().Room;
if (room == null) {
return base.HandleEvent(e);
}
Mob.Center = room.GetRandomFreeTile() * 16 + new Vector2(8, 8);
AnimationUtil.Poof(Mob.Center, 1);
}
}
return base.HandleEvent(e);
}
public override Vector4 GetColor() {
return color;
}
}
} |
//
// Copyright 2021 Frederick William Haslam born 1962 in the USA
//
namespace Shared {
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using static NUnit.Framework.Assert;
public class AttributionListTest {
[Test]
public void ReadAttributeYml() {
AttributionList result = AttributionList.ReadAttributeYml();
IsNotNull( result.Attribution );
AreEqual( 4, result.Attribution.Count );
AreEqual( "Adventure", result.Attribution[0].Title );
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
using UnityEngine;
using UnityEngine.SceneManagement;
[CreateAssetMenu(menuName = "Microgame/Random Scene")]
public class MicrogameRandomScene : Microgame
{
[Header("Random Scene traits")]
[SerializeField]
private bool dontRandomizeInDebugMode;
[SerializeField]
protected MicrogameScene[] scenePool;
[System.Serializable]
public class MicrogameScene
{
[SerializeField]
private string sceneName;
public string SceneName => sceneName;
[SerializeField]
private int minDifficulty = 1;
public int MinDifficulty => minDifficulty;
[SerializeField]
private int maxDifficulty = 3;
public int MaxDifficulty => maxDifficulty;
[SerializeField]
[Range(0, 1)]
private float probabilityWeight = 1f;
public float ProbabilityWeight => probabilityWeight;
}
public override bool SceneDeterminesDifficulty() => false;
public override Microgame.Session CreateSession(int difficulty, bool debugMode = false)
{
return new Session(this, difficulty, debugMode);
}
new public class Session : Microgame.Session
{
protected MicrogameScene chosenScene;
public override string GetSceneName() => chosenScene.SceneName;
public Session(Microgame microgame, int difficulty, bool debugMode)
: base(microgame, difficulty, debugMode)
{
var scenePool = (microgame as MicrogameRandomScene).scenePool;
if (!scenePool.Any())
{
Debug.LogError($"You must enter values for the scene pool in {microgame.microgameId}.asset before playing.");
Debug.Break();
return;
}
var choices = scenePool
.Where(a => difficulty >= a.MinDifficulty && difficulty <= a.MaxDifficulty)
.ToArray();
if (!choices.Any())
{
Debug.LogError($"No appropriate scenes found for {microgame.microgameId} difficulty {difficulty}. Check the scene pool configuration.");
Debug.Break();
return;
}
if (debugMode && (microgame as MicrogameRandomScene).dontRandomizeInDebugMode)
chosenScene = choices.FirstOrDefault(a => a.SceneName.Equals(MicrogameController.instance.gameObject.scene.name));
else
{
// Choose random scene
chosenScene = choices.FirstOrDefault();
var pSum = choices.Sum(a => a.ProbabilityWeight);
if (pSum <= 0f)
chosenScene = choices[Random.Range(0, choices.Length)];
else
{
var selectedP = Random.Range(0f, pSum);
foreach (var choice in choices)
{
selectedP -= choice.ProbabilityWeight;
if (selectedP <= 0f)
{
chosenScene = choice;
break;
}
}
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Practices.Unity;
using NSubstitute;
using NUnit.Framework;
namespace IDT.TaskActions.Unity.Tests.TestCases
{
public class UnityContainerScopedActionTests
{
//[Test]
//public void RunAction_DisposesOfContainer()
//{
// var container = Substitute.For<IUnityContainer>();
// container.Resolve(null, null).ReturnsForAnyArgs(new TestResolveClass());
// var sut = new UnityContainerScopedAction<TestResolveClass>(() => container);
// sut.RunAction(CancellationToken.None);
// container.Received().Dispose();
//}
//[Test]
//public void RunAction_RunsConstructedClassWithProvidedCancellationToken()
//{
// var resolvedClass = new TestResolveClass();
// var container = Substitute.For<IUnityContainer>();
// container.Resolve(null, null).ReturnsForAnyArgs(resolvedClass);
// var sut = new UnityContainerScopedAction<TestResolveClass>(() => container);
// var cancellationToken = CancellationToken.None;
// sut.RunAction(cancellationToken);
// Assert.That(resolvedClass.Token,Is.EqualTo(cancellationToken));
//}
//public class TestResolveClass : ITaskAction
//{
// public CancellationToken Token { get; set; }
// public Task RunAction(CancellationToken cancellationToken)
// {
// Token = cancellationToken;
// return Task.FromResult(string.Empty);
// }
//}
}
}
|
using AutoMapper;
using EmbyStat.Common.Enums;
using EmbyStat.Common.Models;
using EmbyStat.Common.Models.Entities;
using EmbyStat.Controllers;
using EmbyStat.Controllers.MediaServer;
using EmbyStat.Services.Interfaces;
using FluentAssertions;
using Microsoft.AspNetCore.Mvc;
using Moq;
using Xunit;
namespace Tests.Unit.Controllers
{
public class EmbyControllerTests
{
private readonly Mapper _mapper;
public EmbyControllerTests()
{
var profiles = new MapProfiles();
var configuration = new MapperConfiguration(cfg => cfg.AddProfile(profiles));
_mapper = new Mapper(configuration);
}
[Fact]
public void TestApiKey_Should_Return_True_If_Token_Is_Valid()
{
var embyServiceMock = new Mock<IMediaServerService>();
embyServiceMock.Setup(x => x.TestNewApiKey(It.IsAny<string>(), It.IsAny<string>())).Returns(true);
var controller = new MediaServerController(embyServiceMock.Object, _mapper);
var loginViewModel = new LoginViewModel
{
Address = "http://localhost",
ApiKey = "12345"
};
var result = controller.TestApiKey(loginViewModel);
var resultObject = result.Should().BeOfType<OkObjectResult>().Subject.Value;
var succeeded = resultObject.Should().BeOfType<bool>().Subject;
succeeded.Should().BeTrue();
controller.Dispose();
}
[Fact]
public void SearchEmby_Should_Return_Emby_Instance()
{
var emby = new MediaServerUdpBroadcast
{
Id = "azerty",
Address = "localhost",
Name = "emby",
Port = 80,
Protocol = 0
};
var embyServiceMock = new Mock<IMediaServerService>();
embyServiceMock.Setup(x => x.SearchMediaServer(It.IsAny<ServerType>())).Returns(emby);
var controller = new MediaServerController(embyServiceMock.Object, _mapper);
var result = controller.SearchMediaServer(0);
var resultObject = result.Should().BeOfType<OkObjectResult>().Subject.Value;
var embyUdpBroadcast = resultObject.Should().BeOfType<UdpBroadcastViewModel>().Subject;
embyUdpBroadcast.Address.Should().Be(emby.Address);
embyUdpBroadcast.Port.Should().Be(emby.Port);
embyUdpBroadcast.Protocol.Should().Be(emby.Protocol);
embyUdpBroadcast.Id.Should().Be(emby.Id);
embyUdpBroadcast.Name.Should().Be(emby.Name);
embyServiceMock.Verify(x => x.SearchMediaServer(ServerType.Emby), Times.Once);
controller.Dispose();
}
[Fact]
public void GetServerInfo_Should_Return_Emby_Server_Info()
{
var serverInfoObject = new ServerInfo
{
HttpServerPortNumber = 8096,
HttpsPortNumber = 8097
};
var embyServiceMock = new Mock<IMediaServerService>();
embyServiceMock.Setup(x => x.GetServerInfo()).Returns(serverInfoObject);
var controller = new MediaServerController(embyServiceMock.Object, _mapper);
var result = controller.GetServerInfo();
var resultObject = result.Should().BeOfType<OkObjectResult>().Subject.Value;
var serverInfo = resultObject.Should().BeOfType<ServerInfoViewModel>().Subject;
serverInfo.Should().NotBeNull();
serverInfo.HttpServerPortNumber.Should().Be(serverInfoObject.HttpServerPortNumber);
serverInfo.HttpsPortNumber.Should().Be(serverInfoObject.HttpsPortNumber);
}
}
}
|
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
namespace SixLabors.Fonts.Unicode
{
/// <summary>
/// Contains extensions methods for memory types.
/// </summary>
public static class MemoryExtensions
{
/// <summary>
/// Returns an enumeration of <see cref="CodePoint"/> from the provided span.
/// </summary>
/// <param name="span">The readonly span of char elements representing the text to enumerate.</param>
/// <remarks>
/// Invalid sequences will be represented in the enumeration by <see cref="CodePoint.ReplacementChar"/>.
/// </remarks>
/// <returns>The <see cref="SpanCodePointEnumerator"/>.</returns>
public static SpanCodePointEnumerator EnumerateCodePoints(this ReadOnlySpan<char> span)
=> new SpanCodePointEnumerator(span);
/// <summary>
/// Returns an enumeration of <see cref="CodePoint"/> from the provided span.
/// </summary>
/// <param name="span">The span of char elements representing the text to enumerate.</param>
/// <remarks>
/// Invalid sequences will be represented in the enumeration by <see cref="CodePoint.ReplacementChar"/>.
/// </remarks>
/// <returns>The <see cref="SpanCodePointEnumerator"/>.</returns>
public static SpanCodePointEnumerator EnumerateCodePoints(this Span<char> span)
=> new SpanCodePointEnumerator(span);
/// <summary>
/// Returns an enumeration of Grapheme instances from the provided span.
/// </summary>
/// <param name="span">The readonly span of char elements representing the text to enumerate.</param>
/// <remarks>
/// Invalid sequences will be represented in the enumeration by <see cref="GraphemeClusterClass.Any"/>.
/// </remarks>
/// <returns>The <see cref="SpanGraphemeEnumerator"/>.</returns>
public static SpanGraphemeEnumerator EnumerateGraphemes(this ReadOnlySpan<char> span)
=> new SpanGraphemeEnumerator(span);
/// <summary>
/// Returns an enumeration of Grapheme instances from the provided span.
/// </summary>
/// <param name="span">The span of char elements representing the text to enumerate.</param>
/// <remarks>
/// Invalid sequences will be represented in the enumeration by <see cref="GraphemeClusterClass.Any"/>.
/// </remarks>
/// <returns>The <see cref="SpanGraphemeEnumerator"/>.</returns>
public static SpanGraphemeEnumerator EnumerateGraphemes(this Span<char> span)
=> new SpanGraphemeEnumerator(span);
}
}
|
using System;
using BlockchainExchangeAPI.Models;
using Newtonsoft.Json;
namespace BlockchainExchangeAPI.Responses
{
public class TradesResponse : BaseResponse
{
[JsonProperty(PropertyName = "symbol")]
public string Symbol = "";
[JsonProperty(PropertyName = "timestamp")]
public DateTime Timestamp = DateTime.Now;
[JsonProperty(PropertyName = "side")]
public SideType Side = SideType.None;
[JsonProperty(PropertyName = "qty")]
public double Qty = -0.1;
[JsonProperty(PropertyName = "price")]
public double Price = -0.1;
[JsonProperty(PropertyName = "trade_id")]
public string Trade_id = "";
}
}
|
using System;
using IClockTest;
using IClockTest.Struct;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace IClockUnitTest
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void New_Clock_ReturnsObject()
{
Clock clk = new Clock();
Assert.IsNotNull(clk);
}
[TestMethod]
public void Now_Clock_ReturnsDateTimeNow()
{
Clock clk = new Clock();
DateTime clkNow = clk.Now;
DateTime now = DateTime.Now;
Assert.AreEqual(clkNow.Year, now.Year);
Assert.AreEqual(clkNow.Month, now.Month);
Assert.AreEqual(clkNow.Day, now.Day);
Assert.AreEqual(clkNow.Hour, now.Hour);
Assert.AreEqual(clkNow.Minute, now.Minute);
Assert.AreEqual(clkNow.Second, now.Second);
}
[TestMethod]
public void NowUtc_Clock_ReturnsDateTimeNowUtc()
{
Clock clk = new Clock();
DateTime clkNow = clk.UtcNow;
DateTime now = DateTime.UtcNow;
Assert.AreEqual(clkNow.Year, now.Year);
Assert.AreEqual(clkNow.Month, now.Month);
Assert.AreEqual(clkNow.Day, now.Day);
Assert.AreEqual(clkNow.Hour, now.Hour);
Assert.AreEqual(clkNow.Minute, now.Minute);
Assert.AreEqual(clkNow.Second, now.Second);
}
[TestMethod]
public void Today_Clock_ReturnsBusiness()
{
Clock clk = new Clock();
BusinessDate clkNow = clk.Today;
DateTime now = DateTime.Now;
Assert.AreEqual(clkNow.Date.Year, now.Year);
Assert.AreEqual(clkNow.Date.Month, now.Month);
Assert.AreEqual(clkNow.Date.Day, now.Day);
Assert.AreEqual(clkNow.Date.Hour, 0);
Assert.AreEqual(clkNow.Date.Minute, 0);
Assert.AreEqual(clkNow.Date.Second, 0);
Assert.AreEqual(clkNow.Date.Millisecond, 0);
}
}
}
|
namespace Metabase.Enumerations
{
public enum MethodCategory
{
MEASUREMENT,
CALCULATION
}
} |
namespace Kentico.Kontent.Delivery.Abstractions
{
/// <summary>
/// A class which contains extension methods on <see cref="DeliveryOptions"/>.
/// </summary>
public static class DeliveryOptionsExtensions
{
/// <summary>
/// Maps one <see cref="DeliveryOptions"/> object to another.
/// </summary>
/// <param name="o">A destination.</param>
/// <param name="options">A source.</param>
public static void Configure(this DeliveryOptions o, DeliveryOptions options)
{
o.ProjectId = options.ProjectId;
o.ProductionEndpoint = options.ProductionEndpoint;
o.PreviewEndpoint = options.PreviewEndpoint;
o.PreviewApiKey = options.PreviewApiKey;
o.UsePreviewApi = options.UsePreviewApi;
o.WaitForLoadingNewContent = options.WaitForLoadingNewContent;
o.UseSecureAccess = options.UseSecureAccess;
o.SecureAccessApiKey = options.SecureAccessApiKey;
o.EnableRetryPolicy = options.EnableRetryPolicy;
o.DefaultRetryPolicyOptions = options.DefaultRetryPolicyOptions;
o.IncludeTotalCount = options.IncludeTotalCount;
o.Name = options.Name;
o.DefaultRenditionPreset = options.DefaultRenditionPreset;
}
}
}
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName ="Scriptable Objects/Values/Float Value", fileName ="New Float Value")]
public class FloatValue : ScriptableObject
{
public float value;
[SerializeField] private float defaultValue;
private void OnEnable()
{
value = defaultValue;
}
}
|
using System;
namespace Parlot
{
public interface ITokenResult
{
/// <summary>
/// Whether a token was successfully found.
/// </summary>
bool Success { get; }
/// <summary>
/// The start of the token.
/// </summary>
TextPosition Start { get; }
/// <summary>
/// The end of the token.
/// </summary>
TextPosition End { get; }
/// <summary>
/// The length of the token.
/// </summary>
int Length { get; }
/// <summary>
/// Returns the text associated with the token.
/// </summary>
/// <remarks>Prefer using <see cref="Span"/> as it is non-allocating.</remarks>
string Text { get; }
/// <summary>
/// Returns the span associated with the token.
/// </summary>
ReadOnlySpan<char> Span { get; }
/// <summary>
/// Sets the result.
/// </summary>
ITokenResult Succeed(string buffer, in TextPosition start, in TextPosition end);
/// <summary>
/// Initializes the token result.
/// </summary>
ITokenResult Fail();
}
}
|
namespace OpenVIII
{
/// <summary>
/// Contains only one IGMDataItem.
/// </summary>
public class IGMData_Container : IGMData
{
#region Constructors
public IGMData_Container(IGMDataItem container) : base(0, 0, container)
{
}
#endregion Constructors
}
} |
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace DiscordAssistant
{
public class StateStore
{
private readonly string StateStoreKey = "state";
private readonly DataStore dataStore;
public StateStore(DataStore dataStore)
{
this.dataStore = dataStore ?? throw new ArgumentNullException(nameof(dataStore));
}
public async Task<State> FetchState()
{
State state;
var stateLoadResponse = await dataStore.Load(StateStoreKey);
if (stateLoadResponse.IsSuccess)
{
state = JsonConvert.DeserializeObject<State>(stateLoadResponse.Content);
}
else
{
state = State.CreateDefault();
}
return state;
}
public async Task SaveState(State state)
{
await dataStore.Save(StateStoreKey, state);
}
}
}
|
using UnityEngine;
using UnityEngine.UI;
using SuperSodaBomber.Events;
/*
StageCompleteScript
simply posts the current score
when stage is complete + save and move stage.
*/
public class StageCompleteScript : MonoBehaviour
{
public Text scoreText;
[SerializeField] private SceneEvent onLevelContinue;
void Start(){
scoreText.text = "Score: " + PlayerPrefs.GetInt("CurrentScore", 0).ToString();
}
void PerkChoose(){
}
public void ContinueLevel(){
SceneIndex savedMapIndex = LevelLoader.GetSavedScene();
Debug.Log($"[STAGECOMPLETE] Index: {savedMapIndex}");
TransitionLoader.UseMainMenuEvents = true;
GameManager.current.MoveScene(savedMapIndex, false);
onLevelContinue?.Raise(savedMapIndex);
}
}
|
using System;
using System.Diagnostics;
using System.Threading.Tasks;
namespace Proxy.Client.Utilities.Extensions
{
/// <summary>
/// Helper class to measure the execution time of the functions passed.
/// </summary>
internal static class TimingHelper
{
/// <summary>
/// Measures the time a given action takes.
/// </summary>
/// <param name="atn">Action to be measured.</param>
/// <returns>Time in Milliseconds</returns>
public static float Measure(Action atn)
{
var stopwatch = Stopwatch.StartNew();
atn();
stopwatch.Stop();
return (float)stopwatch.Elapsed.TotalSeconds;
}
/// <summary>
/// Measures the time a given function takes.
/// </summary>
/// <typeparam name="T">Result Type returned by the function.</typeparam>
/// <param name="fn">Function to be measured.</param>
/// <returns>Time in Milliseconds and a response</returns>
public static (float time, T response) Measure<T>(Func<T> fn)
{
var stopwatch = Stopwatch.StartNew();
var response = fn();
stopwatch.Stop();
return ((float)stopwatch.Elapsed.TotalSeconds, response);
}
/// <summary>
/// Asynchronously measures the time a function takes.
/// </summary>
/// <param name="fn">Function to be measured.</param>
/// <returns>Time in Milliseconds</returns>
public static async Task<float> MeasureAsync(Func<Task> fn)
{
var stopwatch = Stopwatch.StartNew();
await fn();
stopwatch.Stop();
return (float)stopwatch.Elapsed.TotalSeconds;
}
/// <summary>
/// Asynchronously measures the time a function takes.
/// </summary>
/// <typeparam name="T">Result Type returned by the function.</typeparam>
/// <param name="fn">Function to be measured.</param>
/// <returns>Time in Milliseconds and a response</returns>
public static async Task<(float time, T response)> MeasureAsync<T>(Func<Task<T>> fn)
{
var stopwatch = Stopwatch.StartNew();
var response = await fn();
stopwatch.Stop();
return ((float)stopwatch.Elapsed.TotalSeconds, response);
}
}
}
|
using System.Collections;
namespace QFramework.GraphDesigner
{
public interface ITaskHandler
{
void BeginTask(IEnumerator task);
void BeginBackgroundTask(IEnumerator task);
}
} |
using System;
using System.Diagnostics;
using OwnID.Extensibility.Flow;
using OwnID.Extensibility.Flow.Contracts;
using OwnID.Extensibility.Flow.Contracts.Cookies;
using OwnID.Extensibility.Flow.Contracts.Start;
namespace OwnID.Extensibility.Cache
{
/// <summary>
/// OwnID flow detection fields store structure
/// </summary>
[DebuggerDisplay("{Context}: {Status} (ChallengeType: {ChallengeType}/FlowType: {FlowType})")]
public class CacheItem : ICloneable
{
/// <summary>
/// OwnID flow unique identifier
/// </summary>
public string Context { get; set; }
/// <summary>
/// State
/// </summary>
public CacheItemStatus Status { get; set; } = CacheItemStatus.Initiated;
/// <summary>
/// Nonce
/// </summary>
public string Nonce { get; set; }
/// <summary>
/// User unique identity
/// </summary>
public string DID { get; set; }
/// <summary>
/// Challenge type related to the <c>Context</c> and <see cref="Nonce" />
/// </summary>
public ChallengeType ChallengeType { get; set; }
/// <summary>
/// <see cref="Flow.FlowType" /> that should be used for current OwnID flow
/// </summary>
public FlowType FlowType { get; set; }
/// <summary>
/// Indicate if current flow is FIDO2 flow
/// </summary>
public bool IsFido2Flow =>
FlowType == FlowType.Fido2Login
|| FlowType == FlowType.Fido2Register
|| FlowType == FlowType.Fido2Link
|| FlowType == FlowType.Fido2LinkWithPin
|| FlowType == FlowType.Fido2Recover
|| FlowType == FlowType.Fido2RecoverWithPin;
/// <summary>
/// Request Token from Web App
/// </summary>
public string RequestToken { get; set; }
/// <summary>
/// Request Token to send to Web App
/// </summary>
public string ResponseToken { get; set; }
/// <summary>
/// Payload
/// </summary>
/// <remarks>
/// General purpose payload to be used by integrated providers for theirs needs
/// (for example, account recover payload can store password reset token)
/// </remarks>
public string Payload { get; set; }
/// <summary>
/// Prevents multiple concurrent assignments to current instance of <see cref="CacheItem" />
/// </summary>
public string ConcurrentId { get; set; }
/// <summary>
/// Used for security checks (PIN and etc.)
/// </summary>
public string SecurityCode { get; set; }
/// <summary>
/// Stores public key for partial auth flow
/// </summary>
public string PublicKey { get; set; }
/// <summary>
/// Indicates if cache item can be used in middle of register / login process
/// </summary>
public bool IsValidForAuthorize => !HasFinalState &&
(ChallengeType == ChallengeType.Register ||
ChallengeType == ChallengeType.Login);
/// <summary>
/// Indicates if cache item can be used in middle of link process
/// </summary>
public bool IsValidForLink => !HasFinalState && ChallengeType == ChallengeType.Link;
/// <summary>
/// Indicates if cache item can be used in middle of recover process
/// </summary>
public bool IsValidForRecover => !HasFinalState && ChallengeType == ChallengeType.Recover;
/// <summary>
/// Indicated if cache item has final state and status can not be changed
/// </summary>
public bool HasFinalState => Status == CacheItemStatus.Finished || Status == CacheItemStatus.Declined;
/// <summary>
/// Fido2 counter
/// </summary>
public uint? Fido2SignatureCounter { get; set; }
/// <summary>
/// Fido2 credential id
/// </summary>
public string Fido2CredentialId { get; set; }
/// <summary>
/// Error
/// </summary>
public string Error { get; set; }
/// <summary>
/// Recovery Token
/// </summary>
public string RecoveryToken { get; set; }
/// <summary>
/// Connection recovery data
/// </summary>
public string RecoveryData { get; set; }
/// <summary>
/// Cookie type
/// </summary>
public CookieType AuthCookieType { get; set; }
/// <summary>
/// Private key encryption passphrase
/// </summary>
public string EncKey { get; set; }
/// <summary>
/// Private key encryption vector
/// </summary>
public string EncVector { get; set; }
public ChallengeType InitialChallengeType { get; set; }
/// <summary>
/// New auth type
/// </summary>
/// <remarks>Used during connection upgrade process (for example, from basic to fido2)</remarks>
public ConnectionAuthType NewAuthType { get; set; }
/// <summary>
/// Old public key
/// </summary>
/// <remarks>Used during connection upgrade process (for example, from basic to fido2)</remarks>
public string OldPublicKey { get; set; }
public bool IsDesktop { get; set; }
/// <summary>
/// Creates new instance of <see cref="CacheItem" /> based on <see cref="Nonce" /> and <see cref="DID" />
/// </summary>
public object Clone()
{
return new CacheItem
{
DID = DID,
Nonce = Nonce,
ChallengeType = ChallengeType,
InitialChallengeType = InitialChallengeType,
FlowType = FlowType,
Status = Status,
RequestToken = RequestToken,
ResponseToken = ResponseToken,
Context = Context,
Payload = Payload,
ConcurrentId = ConcurrentId,
SecurityCode = SecurityCode,
PublicKey = PublicKey,
Fido2SignatureCounter = Fido2SignatureCounter,
Fido2CredentialId = Fido2CredentialId,
Error = Error,
RecoveryData = RecoveryData,
RecoveryToken = RecoveryToken,
EncKey = EncKey,
EncVector = EncVector,
AuthCookieType = AuthCookieType,
IsDesktop = IsDesktop,
NewAuthType = NewAuthType,
OldPublicKey = OldPublicKey
};
}
/// <summary>
/// Get CacheItem auth type string representation
/// </summary>
/// <returns>auth type string representation</returns>
public string GetAuthType()
{
if (FlowType == FlowType.Fido2Login
|| FlowType == FlowType.Fido2Register
|| FlowType == FlowType.Fido2Link
|| FlowType == FlowType.Fido2LinkWithPin
|| FlowType == FlowType.Fido2Recover
|| FlowType == FlowType.Fido2RecoverWithPin)
return "FIDO2";
return AuthCookieType == CookieType.Passcode? "Passcode" : "Basic";
}
public OwnIdConnection GetConnection()
{
return new()
{
Fido2CredentialId = Fido2CredentialId,
Fido2SignatureCounter = Fido2SignatureCounter?.ToString(),
PublicKey = PublicKey,
RecoveryToken = RecoveryToken,
RecoveryData = RecoveryData,
AuthType = AuthCookieType switch
{
CookieType.Fido2 => ConnectionAuthType.Fido2,
CookieType.Passcode => ConnectionAuthType.Passcode,
_ => ConnectionAuthType.Basic
}
};
}
}
} |
using Meadow;
using Meadow.Devices;
using Meadow.Foundation.Grove.Sensors.Buttons;
using System;
namespace Grove.LEDButton_Sample
{
// Change F7FeatherV2 to F7FeatherV1 for V1.x boards
public class MeadowApp : App<F7FeatherV2, MeadowApp>
{
//<!-SNIP->
public MeadowApp()
{
Console.WriteLine("Initialize hardware...");
var button = new LEDButton(Device, Device.Pins.D12, Device.Pins.D13);
button.LongClickedThreshold = TimeSpan.FromMilliseconds(1500);
button.Clicked += (s, e) =>
{
Console.WriteLine("Grove Button clicked");
button.IsLedOn = !button.IsLedOn;
};
button.LongClicked += (s, e) =>
{
Console.WriteLine("Grove Button long clicked");
};
}
//<!—SNOP—>
}
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[System.Serializable]
public class Sound
{
public string name;
public AudioClip clip;
}
public class SoundManager : MonoBehaviour
{
public static SoundManager instance;
public AudioSource[] source;
public Sound[] Sounds;//사운드클래스(이름과 효과음)
public string[] Playering_name; //재생중인 사운드
public float SoundVolum;
private void Awake()
{
if (instance != null)
{
Destroy(this.gameObject);
}
else
{
DontDestroyOnLoad(this.gameObject);
instance = this;
}
SoundVolum = source[0].volume;
}
public void ChangeVolum(float volum)
{
SoundVolum = volum;
for (int i = 0; i < source.Length; i++)
{
source[i].volume = SoundVolum;
}
}
private void Start()
{
Playering_name = new string[source.Length];
}
public void SoundPlay(string SoundName)
{
for (int i = 0; i < Sounds.Length; i++)
{
if (SoundName == Sounds[i].name)
{
for (int j = 0; j < source.Length; j++)
{
if (!source[j].isPlaying)
{
Playering_name[j] = Sounds[i].name;
source[j].clip = Sounds[i].clip;
source[j].Play();
return;
}
}
}
}
}
public void StopSound()
{
for (int i = 0; i < source.Length; i++)
{
source[i].Stop();
}
}
}
|
namespace CryptStr
{
public enum SupportAlgorithms
{
TripleDES,
DES
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NET.Tools.Engines.Organizer
{
/// <summary>
/// A repeat appointment object for a condition
/// </summary>
public class RepeatConditionAppointment : ConditionAppointment, IRepeatAppointment
{
public RepeatConditionAppointment(TimeSpan time, ICondition condition, TimeSpan length,
DateTime startDate, DateTime endDate, IRepeater repeater)
: base(time, condition, length)
{
StartDate = startDate;
EndDate = endDate;
Repeater = repeater;
}
#region IRepeatAppointment Member
public DateTime StartDate
{
get;
set;
}
public DateTime EndDate
{
get;
set;
}
public IRepeater Repeater
{
get;
set;
}
#endregion
public override IList<AppointmentEntity> CreateAppointmentEntitiesOnDate(DateTime date)
{
return base.CreateAppointmentEntitiesOnDate(date);
}
}
}
|
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
#if SYSTEM_XAML
using System.Windows.Markup;
#elif PORTABLE_XAML
using Portable.Xaml.Markup;
#endif
[assembly: ComVisible(false)]
[assembly: CLSCompliant(true)]
[assembly: Guid("4ad934e0-78da-4356-917f-130742476086")]
#if XAML
[assembly: XmlnsPrefix("urn:alba:cs-console-format:colorful", "colorful")]
[assembly: XmlnsDefinition("urn:alba:cs-console-format:colorful", "Alba.CsConsoleFormat.ColorfulConsole")]
#endif
[assembly: InternalsVisibleTo("Alba.CsConsoleFormat.ColorfulConsole.Tests")]
|
namespace KifuwarabeUec11Gui.Controller.Parser
{
using System;
using System.Text.RegularExpressions;
using KifuwarabeUec11Gui.InputScript;
public static class WordParser
{
/// <summary>
///
/// </summary>
/// <param name="matched"></param>
/// <param name="curr">Current.</param>
/// <returns>Next.</returns>
public delegate int SomeCallback(Word matched, int curr);
public delegate int NoneCallback();
/// <summary>
/// 英語がいうところの、単語☆(^~^)
/// </summary>
private static Regex regex = new Regex("^(\\w+)", RegexOptions.Compiled);
public static int Parse(
string text,
int start,
SomeCallback someCallback,
NoneCallback noneCallback)
{
if (someCallback == null)
{
throw new ArgumentNullException(nameof(someCallback));
}
if (text == null || text.Length <= start)
{
return noneCallback();
}
var m = regex.Match(text.Substring(start));
if (m.Success)
{
// 一致。
var word = m.Groups[1].Value;
return someCallback(new Word(word), start + word.Length);
}
return noneCallback();
}
}
}
|
namespace EcoPacking.Web.Controllers
{
using EcoPacking.Services.Data.Contracts;
using EcoPacking.Web.ViewModels.Categories;
using EcoPacking.Web.ViewModels.Products;
using EcoPacking.Web.ViewModels.Shop;
using Microsoft.AspNetCore.Mvc;
public class ShopController : BaseController
{
private readonly IProductsService productsService;
private readonly ICategoriesService categoriesService;
public ShopController(
IProductsService productsService,
ICategoriesService categoriesService)
{
this.productsService = productsService;
this.categoriesService = categoriesService;
}
public IActionResult Index(int id = 1)
{
if (id <= 0)
{
return this.NotFound();
}
const int ItemsPerPage = 9;
//var productsViewModel = new ProductsListViewModel
//{
// ItemsPerPage = ItemsPerPage,
// PageNumber = id,
// ProductsCount = this.productsService.GetCount(),
// Products = this.productsService.GetAll<ProductInListViewModel>(id, ItemsPerPage),
//};
var categoriesViewModel = new CategoriesListViewModel
{
Categories = this.categoriesService.GetAll<CategoryInListViewModel>(),
};
var viewModel = new ShopIndexViewModel
{
//Products = productsViewModel,
Categories = categoriesViewModel,
};
return this.View("ShopIndex", viewModel);
}
public IActionResult ById(int id)
{
var product = this.productsService.GetById<SingleProductViewModel>(id);
return this.View("ProductById", product);
}
}
}
|
namespace ZipkinExtensions
{
public static class ServiceName
{
/// <summary>
/// 产品服务
/// </summary>
public static string ProductService = "productservice";
/// <summary>
/// 订单服务
/// </summary>
public static string OrderService = "orderservice";
}
}
|
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Model
{
using System;
using System.Collections.Generic;
public partial class t_goods_gallery
{
public int gallery_id { get; set; }
public Nullable<int> goods_id { get; set; }
public string img { get; set; }
public Nullable<System.DateTime> add_time { get; set; }
public virtual t_goods t_goods { get; set; }
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using AoLibs.Adapters.Android.Interfaces;
using AoLibs.Adapters.Core.Interfaces;
namespace AoLibs.Adapters.Android
{
/// <summary>
/// Utility class implementing <see cref="INativeAndroidDialogStyle"/>.
/// </summary>
public abstract class NativeDialogStyleBase : INativeAndroidDialogStyle
{
/// <inheritdoc/>
public virtual int ThemeResourceId { get; }
/// <inheritdoc/>
public virtual void SetStyle(AlertDialog.Builder dialogBuilder, View contentView = null)
{
}
/// <inheritdoc/>
public virtual void SetStyle(AlertDialog dialog)
{
}
}
} |
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace ESIConnectionLibrary.ESIModels
{
internal class EsiV3ClonesHomeLocation
{
[JsonProperty(PropertyName = "location_id")]
public long? LocationId { get; set; }
[JsonProperty(PropertyName = "location_type")]
[JsonConverter(typeof(StringEnumConverter))]
public EsiV3ClonesLocationType LocationType { get; set; }
}
} |
using System;
namespace Caomei.Core.Support.Json
{
public class SimpleLog
{
public ActionLog GetActionLog()
{
return new ActionLog
{
ActionName = this.ActionName,
ActionTime = this.ActionTime,
ActionUrl = this.ActionUrl,
CreateBy = this.CreateBy,
CreateTime = this.CreateTime,
Duration = this.Duration,
IP = this.IP,
ITCode = this.ITCode,
LogType = this.LogType,
ModuleName = this.ModuleName,
Remark = this.Remark,
UpdateBy = this.UpdateBy,
UpdateTime = this.UpdateTime,
};
}
public string ModuleName { get; set; }
public string ActionName { get; set; }
public string ITCode { get; set; }
public string ActionUrl { get; set; }
public DateTime ActionTime { get; set; }
public double Duration { get; set; }
public string Remark { get; set; }
public string IP { get; set; }
public ActionLogTypesEnum LogType { get; set; }
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateBy
/// </summary>
public string CreateBy { get; set; }
/// <summary>
/// UpdateTime
/// </summary>
public DateTime? UpdateTime { get; set; }
/// <summary>
/// UpdateBy
/// </summary>
public string UpdateBy { get; set; }
}
} |
/*
compile by protobuf, please don't edit it manually.
Any problem please contact tongxuehu@gmail.com, thx.
*/
using System;
using System.Collections.Generic;
using System.IO;
using Assets.Scripts.Lib.Net;
namespace Assets.Scripts.Define
{
public enum ClientPingInterval
{
PingIntervalTime = 2,
}
public enum KSceneObjectType
{
sotInvalid = 0,
sotHero = 1,
sotDoodad = 2,
sotEffect = 3,
sotMonsterGroup = 4,
sotBattleHero = 5,
sotTrigger = 6,
sotTotal = 7,
}
public enum KDoodadType
{
dddInvalid = 0,
dddCollect = 1,
dddDrop = 2,
dddBuffDrop = 3,
}
public enum KEffectObjectType
{
eotInvalid = 0,
eotBonfire = 1,
eotTeleport = 2,
}
public enum KTriggerObjectType
{
totInvalid = 0,
totMission = 1,
}
public enum KPlotTimeType
{
pttStageTime = 0,
pttWholeTime = 1,
}
public enum KNpcFuncType
{
KNpcFunc_Teleport = 1,
KNpcFunc_CommonShop = 2,
KNpcFunc_Task = 3,
KNpcFunc_BornPos = 4,
KNpcFunc_RelivePos = 5,
KNpcFunc_Collect = 6,
KNpcFunc_OpenPanel = 7,
KNpcFunc_DailyTask = 8,
}
public enum KFreezeType
{
eftFreezeLogin = 0,
eftBanTalk = 1,
eftBanTalkSoli = 2,
eftToggleTalkSoli = 3,
eftFreezeTypeCount = 4,
eftToggleTime = 0x0FFFFFFF,
}
public enum KMoveState
{
mosInvalid = 0,
mosStand = 1,
mosMove = 2,
mosDeath = 3,
mosForceMove = 4,
mosEnter = 5,
mosLeave = 6,
mosTotal = 7,
}
public enum ComposableState
{
IsMoveForward = 0,
IsFallBack = 1,
IsTransLeft = 2,
IsTransRight = 3,
IsRun = 4,
IsJump = 5,
IsRising = 6,
IsLanding = 7,
IsAdjustDirection = 8,
IsTurnLeft = 9,
IsTurnRight = 10,
IsLeapCrossSceneOut = 11,
IsLeapCrossSceneIn = 12,
IsSmallLeapPreparing = 13,
IsSmallLeapCancel = 14,
IsSmallLeapPreheat = 15,
IsSmallLeaping = 16,
IsSmallLeapRemoveNotify = 17,
IsSmallLeapComplete = 18,
IsBroken = 19,
IsRepair = 20,
IsReadyLeap = 21,
IsLeapInSceneAccelerate = 22,
IsLeapInSceneMaxSpeed = 23,
IsLeapInSceneDecelerate = 24,
IsLeapInSceneFinished = 25,
FightingStatus = 26,
CruiseStatus = 27,
OverLoadStatus = 28,
PeerlessStatus = 29,
BackToAnchor = 30,
IsTotal = 31,
}
public enum AircraftAttributeType
{
Invalid = 0,
KineticD = 1,
KineticDM = 2,
KineticDRM = 3,
KineticDR = 4,
ReKineticDM = 5,
ReKineticDRM = 6,
ReRealKineticD = 7,
ReRealKineticDR = 8,
ThermalD = 9,
ThermalDM = 10,
ThermalDRM = 11,
ThermalDR = 12,
ReThermalDM = 13,
ReThermalDRM = 14,
ReRealThermalD = 15,
ReRealThermalDR = 16,
NuclearD = 17,
NuclearDM = 18,
NuclearDRM = 19,
NuclearDR = 20,
ReNuclearDM = 21,
ReNuclearDRM = 22,
ReRealNuclearD = 23,
ReRealNuclearDR = 24,
ElectricArcD = 25,
ElectricArcDM = 26,
ElectricArcDRM = 27,
ElectricArcR = 28,
ReElectricArcDM = 29,
ReElectricArcDRM = 30,
ReRealElectricArcD = 31,
ReRealElectricArcDR = 32,
FreezeD = 33,
FreezeDM = 34,
FreezeDRM = 35,
FreezeR = 36,
ReFreezeDM = 37,
ReFreezeDRM = 38,
ReRealFreezeD = 39,
ReRealFreezeDR = 40,
OpticalRadiationD = 41,
OpticalRadiationDM = 42,
OpticalRadiationDRM = 43,
OpticalRadiationR = 44,
ReOpticalRadiationDM = 45,
ReOpticalRadiationDRM = 46,
ReRealOpticalRadiationD = 47,
ReRealOpticalRadiationDR = 48,
DarkCorrosionD = 49,
DarkCorrosionDM = 50,
DarkCorrosionDRM = 51,
DarkCorrosionR = 52,
ReDarkCorrosionDM = 53,
ReDarkCorrosionDRM = 54,
ReRealDarkCorrosionD = 55,
ReRealDarkCorrosionDR = 56,
NatureDM = 57,
NatureDRM = 58,
NatureR = 59,
ReNatureDM = 60,
ReNatureDRM = 61,
ReRealNatureD = 62,
ReRealNatureDR = 63,
ArtilleryDM = 64,
ArtilleryDRM = 65,
ArtilleryR = 66,
ReArtilleryDM = 67,
ReArtilleryDRM = 68,
MissileDM = 69,
MissileDRM = 70,
MissileR = 71,
ReMissileDM = 72,
ReMissileDRM = 73,
LaserDM = 74,
LaserDRM = 75,
LaserR = 76,
ReLaserDM = 77,
ReLaserDRM = 78,
GrenadeDM = 79,
GrenadeDRM = 80,
GrenadeR = 81,
ReGrenadeDM = 82,
ReGrenadeDRM = 83,
UAVDM = 84,
UAVDRM = 85,
UAVR = 86,
ReUAVDM = 87,
ReUAVDRM = 88,
Critical = 89,
CriticalR = 90,
CriticalM = 91,
CriticalRM = 92,
ReCriticalM = 93,
ReCriticalRM = 94,
CriticalRate = 95,
CriticalRateR = 96,
CriticalD = 97,
CriticalDR = 98,
CriticalDM = 99,
CriticalDRM = 100,
ReCriticalDM = 101,
ReCriticalDRM = 102,
CriticalDPercent = 103,
CriticalDPercentR = 104,
ReCriticalDPercent = 105,
ReCriticalDPercentR = 106,
CriticalDAdd = 107,
Penetration = 108,
PenetrationR = 109,
PenetrationM = 110,
PenetrationRM = 111,
RePenetrationM = 112,
RePenetrationRM = 113,
PenetrationRate = 114,
PenetrationRateR = 115,
PenetrabilityD = 116,
PenetrabilityDR = 117,
PenetrabilityDM = 118,
PenetrabilityDRM = 119,
RePenetrabilityDM = 120,
RePenetrabilityDRM = 121,
PenetrabilityDPercent = 122,
PenetrabilityDPercentR = 123,
RePenetrabilityDPercent = 124,
RePenetrabilityDPercentR = 125,
PenetrationDMR = 126,
ArtilleryPenetrability = 127,
ArtilleryPenetrabilityR = 128,
ArtilleryPenetrabilityM = 129,
ArtilleryPenetrabilityRM = 130,
ReArtilleryPenetrabilityM = 131,
ReArtilleryPenetrabilityRM = 132,
ArtilleryPenetrabilityRate = 133,
ReArtilleryPenetrabilityRate = 134,
MissilePenetrability = 135,
MissilePenetrabilityR = 136,
MissilePenetrabilityM = 137,
MissilePenetrabilityRM = 138,
ReMissilePenetrabilityM = 139,
ReMissilePenetrabilityRM = 140,
MissilePenetrabilityRate = 141,
MissilePenetrabilityRateR = 142,
LaserPenetrability = 143,
LaserPenetrabilityR = 144,
LaserPenetrabilityM = 145,
LaserPenetrabilityRM = 146,
ReLaserPenetrabilityM = 147,
ReLaserPenetrabilityRM = 148,
LaserPenetrabilityRate = 149,
LaserPenetrabilityRateR = 150,
GrenadePenetrability = 151,
GrenadePenetrabilityR = 152,
GrenadePenetrabilityM = 153,
GrenadePenetrabilityRM = 154,
ReGrenadePenetrabilityM = 155,
ReGrenadePenetrabilityRM = 156,
GrenadePenetrabilityRate = 157,
GrenadePenetrabilityRateR = 158,
UAVPenetrability = 159,
UAVPenetrabilityR = 160,
UAVPenetrabilityM = 161,
UAVPenetrabilityRM = 162,
ReUAVPenetrabilityM = 163,
ReUAVPenetrabilityRM = 164,
UAVPenetrabilityRate = 165,
UAVPenetrabilityRateR = 166,
ArtilleryPenetrabilityD = 167,
ArtilleryPenetrabilityDR = 168,
ArtilleryPenetrabilityDM = 169,
ArtilleryPenetrabilityDRM = 170,
ReArtilleryPenetrabilityDM = 171,
ReArtilleryPenetrabilityDRM = 172,
ArtilleryPenetrabilityDPercent = 173,
ArtilleryPenetrabilityDPercentR = 174,
ReArtilleryPenetrabilityDPercent = 175,
REArtilleryPenetrabilityDPercentR = 176,
ArtilleryPenetrabilityDMR = 177,
MissilePenetrabilityD = 178,
MissilePenetrabilityDR = 179,
MissilePenetrabilityDM = 180,
MissilePenetrabilityDRM = 181,
ReMissilePenetrabilityDM = 182,
ReMissilePenetrabilityDRM = 183,
MissilePenetrabilityDPercent = 184,
MissilePenetrabilityDPercentR = 185,
ReMissilePenetrabilityDPercent = 186,
REMissilePenetrabilityDPercentR = 187,
MissilePenetrabilityDMR = 188,
LaserPenetrabilityD = 189,
LaserPenetrabilityDR = 190,
LaserPenetrabilityDM = 191,
LaserPenetrabilityDRM = 192,
ReLaserPenetrabilityDM = 193,
ReLaserPenetrabilityDRM = 194,
LaserPenetrabilityDPercent = 195,
LaserPenetrabilityDPercentR = 196,
ReLaserPenetrabilityDPercent = 197,
RELaserPenetrabilityDPercentR = 198,
LaserPenetrabilityDMR = 199,
GrenadePenetrabilityD = 200,
GrenadePenetrabilityDR = 201,
GrenadePenetrabilityDM = 202,
GrenadePenetrabilityDRM = 203,
ReGrenadePenetrabilityDM = 204,
ReGrenadePenetrabilityDRM = 205,
GrenadePenetrabilityDPercent = 206,
GrenadePenetrabilityDPercentR = 207,
ReGrenadePenetrabilityDPercent = 208,
ReGrenadePenetrabilityDPercentR = 209,
GrenadePenetrabilityDMR = 210,
UAVPenetrabilityD = 211,
UAVPenetrabilityDR = 212,
UAVPenetrabilityDM = 213,
UAVPenetrabilityDRM = 214,
ReUAVPenetrabilityDM = 215,
ReUAVPenetrabilityDRM = 216,
UAVPenetrabilityDPercent = 217,
UAVPenetrabilityDPercentR = 218,
ReUAVPenetrabilityDPercent = 219,
REUAVPenetrabilityDPercentR = 220,
UAVPenetrabilityDMR = 221,
ArtilleryCritical = 222,
ArtilleryCriticalR = 223,
ArtilleryCriticalM = 224,
ArtilleryCriticalRM = 225,
ReArtilleryCriticalM = 226,
ReArtilleryCriticalRM = 227,
ArtilleryCriticalRate = 228,
ArtilleryCriticalRateR = 229,
MissileCritical = 230,
MissileCriticalR = 231,
MissileCriticalM = 232,
MissileCriticalRM = 233,
ReMissileCriticalM = 234,
ReMissileCriticalRM = 235,
MissileCriticalRate = 236,
MissileCriticalRateR = 237,
LaserCritical = 238,
LaserCriticalR = 239,
LaserCriticalM = 240,
LaserCriticalRM = 241,
ReLaserCriticalM = 242,
ReLaserCriticalRM = 243,
LaserCriticalRate = 244,
LaserCriticalRateR = 245,
GrenadeCritical = 246,
GrenadeCriticalR = 247,
GrenadeCriticalM = 248,
GrenadeCriticalRM = 249,
ReGrenadeCriticalM = 250,
ReGrenadeCriticalRM = 251,
GrenadeCriticalRate = 252,
GrenadeCriticalRateR = 253,
UAVCritical = 254,
UAVCriticalR = 255,
UAVCriticalM = 256,
UAVCriticalRM = 257,
ReUAVCriticalM = 258,
ReUAVCriticalRM = 259,
UAVCriticalRate = 260,
UAVCriticalRateR = 261,
ArtilleryCriticalD = 262,
ArtilleryCriticalDR = 263,
ArtilleryCriticalDM = 264,
ArtilleryCriticalDRM = 265,
ReArtilleryCriticalDM = 266,
ReArtilleryCriticalDRM = 267,
ArtilleryCriticalDPercent = 268,
ArtilleryCriticalDPercentR = 269,
ReArtilleryCriticalDPercent = 270,
ReArtilleryCriticalDPercentR = 271,
ArtilleryCriticalDMR = 272,
MissileCriticalD = 273,
MissileCriticalDR = 274,
MissileCriticalDM = 275,
MissileCriticalDRM = 276,
ReMissileCriticalDM = 277,
ReMissileCriticalDRM = 278,
MissileCriticalDPercent = 279,
MissileCriticalDPercentR = 280,
ReMissileCriticalDPercent = 281,
ReMissileCriticalDPercentR = 282,
MissileCriticalDMR = 283,
LaserCriticalD = 284,
LaserCriticalDR = 285,
LaserCriticalDM = 286,
LaserCriticalDRM = 287,
ReLaserCriticalDM = 288,
ReLaserCriticalDRM = 289,
LaserCriticalDPercent = 290,
LaserCriticalDPercentR = 291,
ReLaserCriticalDPercent = 292,
ReLaserCriticalDPercentR = 293,
LaserCriticalDMR = 294,
GrenadeCriticalD = 295,
GrenadeCriticalDR = 296,
GrenadeCriticalDM = 297,
GrenadeCriticalDRM = 298,
ReGrenadeCriticalDM = 299,
ReGrenadeCriticalDRM = 300,
GrenadeCriticalDPercent = 301,
GrenadeCriticalDPercentR = 302,
ReGrenadeCriticalDPercent = 303,
ReGrenadeCriticalDPercentR = 304,
GrenadeCriticalDMR = 305,
UAVCriticalD = 306,
UAVCriticalDR = 307,
UAVCriticalDM = 308,
UAVCriticalDRM = 309,
ReUAVCriticalDM = 310,
ReUAVCriticalDRM = 311,
UAVCriticalDPercent = 312,
UAVCriticalDPercentR = 313,
ReUAVCriticalDPercent = 314,
ReUAVCriticalDPercentR = 315,
UAVCriticalDMR = 316,
BuffChance = 317,
BuffChanceR = 318,
BuffChanceM = 319,
BuffChanceRM = 320,
ReBuffChanceM = 321,
ReBuffChanceRM = 322,
ShieldD = 323,
ShieldDR = 324,
ShieldDM = 325,
ShieldDRM = 326,
ReShieldDM = 327,
ReShieldDRM = 328,
ArtilleryShieldD = 329,
ArtilleryShieldDR = 330,
ArtilleryShieldDM = 331,
ArtilleryShieldDRM = 332,
ReArtilleryShieldDM = 333,
ReArtilleryShieldDRM = 334,
MissileShieldD = 335,
MissileShieldDR = 336,
MissileShieldDM = 337,
MissileShieldDRM = 338,
ReMissileShieldDM = 339,
ReMissileShieldDRM = 340,
LaserShieldD = 341,
LaserShieldDR = 342,
LaserShieldDM = 343,
LaserShieldDRM = 344,
ReLaserShieldDM = 345,
ReLaserShieldDRM = 346,
GrenadeShieldD = 347,
GrenadeShieldDR = 348,
GrenadeShieldDM = 349,
GrenadeShieldDRM = 350,
ReGrenadeShieldDM = 351,
ReGrenadeShieldDRM = 352,
UAVShieldD = 353,
UAVShieldDR = 354,
UAVShieldDM = 355,
UAVShieldDRM = 356,
ReUAVShieldDM = 357,
ReUAVShieldDRM = 358,
ArmorD = 359,
ArmorDR = 360,
ArmorDM = 361,
ArmorDRM = 362,
ReArmorDM = 363,
ReArmorDRM = 364,
ManaShield = 365,
ManaShieldTopLimit = 366,
ManaShieldEfficiency = 367,
ManaShieldOffsetRate = 368,
ManaShieldOffseKinetic = 369,
ManaShieldOffseThermal = 370,
ManaShieldOffseNuclear = 371,
ManaShieldOffseElectricArc = 372,
ManaShieldOffseFreeze = 373,
ManaShieldOffseOpticalRadiation = 374,
ManaShieldOffseDarkCorrosion = 375,
ManaShieldOffsePenetrability = 376,
DefenseShield = 377,
DefenseShieldTopLimit = 378,
DefenseShieldOffsetRate = 379,
DefenseShieldOffseKinetic = 380,
DefenseShieldOffseThermal = 381,
DefenseShieldOffseNuclear = 382,
DefenseShieldOffseElectricArc = 383,
DefenseShieldOffseFreeze = 384,
DefenseShieldOffseOpticalRadiation = 385,
DefenseShieldOffseDarkCorrosion = 386,
DefenseShieldOffsePenetrability = 387,
Hit = 388,
Dodge = 389,
HitM = 390,
HitRM = 391,
DodgeM = 392,
DodgeRM = 393,
ArtilleryHit = 394,
MissileHit = 395,
LaserHit = 396,
GrenadeHit = 397,
UAVHit = 398,
ArtilleryDodge = 399,
MissileDodge = 400,
LaserDodge = 401,
GrenadeDodge = 402,
UAVDodge = 403,
ArtilleryHitM = 404,
ArtilleryHitRM = 405,
MissileHitM = 406,
MissileHitRM = 407,
LaserHitM = 408,
LaserHitRM = 409,
GrenadeHitM = 410,
GrenadeHitRM = 411,
UAVHitM = 412,
UAVHitRM = 413,
ArtilleryDodgeM = 414,
ArtilleryDodgeRM = 415,
MissileDodgeM = 416,
MissileDodgeRM = 417,
LaserDodgeM = 418,
LaserDodgeRM = 419,
GrenadeDodgeM = 420,
GrenadeDodgeRM = 421,
UAVDodgeM = 422,
UAVDodgeRM = 423,
HitRate = 424,
DodgeHitRate = 425,
SpeedToHitCoefficient = 426,
ArtilleryHitRate = 427,
MissileHitRate = 428,
LaserHitRate = 429,
GrenadeHitRate = 430,
UAVHitRate = 431,
ArtilleryDodgeRate = 432,
MissileDodgeRate = 433,
LaserDodgeRate = 434,
GrenadeDodgeRate = 435,
UAVDodgeRate = 436,
HP = 437,
HPTopLimit = 438,
HPRecoveryPerSecIB = 439,
HPRecoveryPerSecIBM = 440,
HPRecoveryPerSecIBRM = 441,
HPRecoveryDelayIB = 442,
HPRecoveryDelayIBM = 443,
HPRecoveryDelayIBRM = 444,
HPRecoveryPerSecOB = 445,
HPRecoveryPerSecOBM = 446,
HPRecoveryPerSecOBRM = 447,
HPRecoveryDelayOB = 448,
HPRecoveryDelayOBM = 449,
HPRecoveryDelayOBRM = 450,
Shield = 451,
ShieldTopLimit = 452,
ShieldRechargePerSecIB = 453,
ShieldRechargePerSecIBM = 454,
ShieldRechargePerSecIBRM = 455,
ShieldRechargeDelayIB = 456,
ShieldRechargeDelayIBM = 457,
ShieldRechargeDelayIBRM = 458,
ShieldRechargePerSecOB = 459,
ShieldRechargePerSecOBM = 460,
ShieldRechargePerSecOBRM = 461,
ShieldRechargeDelayOB = 462,
ShieldRechargeDelayOBM = 463,
ShieldRechargeDelayOBRM = 464,
EnergyPower = 465,
EnergyPowerTopLimit = 466,
EnergyRechargePerSecIB = 467,
EnergyRechargePerSecIBM = 468,
EnergyRechargePerSecIBRM = 469,
EnergyRechargeDelayIB = 470,
EnergyRechargeDelayIBM = 471,
EnergyRechargeDelayIBRM = 472,
EnergyRechargePerSecOB = 473,
EnergyRechargePerSecOBM = 474,
EnergyRechargePerSecOBRM = 475,
EnergyRechargeDelayOB = 476,
EnergyRechargeDelayOBM = 477,
EnergyRechargeDelayOBRM = 478,
SuperMagnetic = 479,
SuperMagneticTopLimit = 480,
SMRechargePerSecIB = 481,
SMRechargePerSecIBM = 482,
SMRechargePerSecIBRM = 483,
SMRechargeDelayIB = 484,
SMRechargeDelayIBM = 485,
SMRechargeDelayIBRM = 486,
SMDeclinePerSecOB = 487,
SMDeclinePerSecOBM = 488,
SMDeclinePerSecOBRM = 489,
SMDeclineDelayOB = 490,
SMDeclineDelayOBM = 491,
SMDeclineDelayOBRM = 492,
LockingRadius = 493,
RadiiOfSight = 494,
RangeOfFire = 495,
ArtilleryRange = 496,
MissileRange = 497,
LaserRange = 498,
GrenadeRange = 499,
UAVRange = 500,
RangeOfFireM = 501,
ArtilleryRangeM = 502,
MissileRangeM = 503,
LaserRangeM = 504,
GrenadeRangeM = 505,
UAVRangeM = 506,
RangeOfFireRM = 507,
ArtilleryRangeRM = 508,
MissileRangeRM = 509,
LaserRangeRM = 510,
GrenadeRangeRM = 511,
UAVRangeRM = 512,
GatlinKineticD = 513,
GatlinThermalD = 514,
GatlinNuclearD = 515,
GatlinElectricArcD = 516,
GatlinFreezeD = 517,
GatlinOpticalRadiationD = 518,
GatlinDarkCorrosionD = 519,
GatlinKineticDM = 520,
GatlinKineticDRM = 521,
GatlinThermalDM = 522,
GatlinThermalDRM = 523,
GatlinNuclearDM = 524,
GatlinNuclearDRM = 525,
GatlinElectricArcDM = 526,
GatlinElectricArcDRM = 527,
GatlinFreezeDM = 528,
GatlinFreezeDRM = 529,
GatlinOpticalRadiationDM = 530,
GatlinOpticalRadiationDRM = 531,
GatlinDarkCorrosionDM = 532,
GatlinDarkCorrosionDRM = 533,
GatlinDM = 534,
GatlinDRM = 535,
GatlinDR = 536,
ReGatlinDM = 537,
ReGatlinDRM = 538,
GatlinPenetrability = 539,
GatlinPenetrabilityR = 540,
GatlinPenetrabilityM = 541,
GatlinPenetrabilityRM = 542,
ReGatlinPenetrabilityM = 543,
ReGatlinPenetrabilityRM = 544,
GatlinPenetrabilityRate = 545,
GatlinPenetrabilityRateR = 546,
GatlinPenetrabilityD = 547,
GatlinPenetrabilityDR = 548,
GatlinPenetrabilityDM = 549,
GatlinPenetrabilityDRM = 550,
ReGatlinPenetrabilityDM = 551,
ReGatlinPenetrabilityDRM = 552,
GatlinPenetrabilityDPercent = 553,
GatlinPenetrabilityDPercentR = 554,
ReGatlinPenetrabilityDPercent = 555,
ReGatlinPenetrabilityDPercentR = 556,
GatlinPenetrabilityDMR = 557,
GatlinCritical = 558,
GatlinCriticalR = 559,
GatlinCriticalM = 560,
GatlinCriticalRM = 561,
GatlinReCriticalM = 562,
GatlinReCriticalRM = 563,
GatlinCriticalRate = 564,
GatlinCriticalRateR = 565,
GatlinCriticalD = 566,
GatlinCriticalDR = 567,
GatlinCriticalDM = 568,
GatlinCriticalDRM = 569,
ReGatlinCriticalDM = 570,
ReGatlinCriticalDRM = 571,
GatlinCriticalDPercent = 572,
GatlinCriticalDPercentR = 573,
ReGatlinCriticalDPercent = 574,
ReGatlinCriticalDPercentR = 575,
GatlinCriticalDMR = 576,
GatlinShieldD = 577,
GatlinShieldDR = 578,
GatlinShieldDM = 579,
GatlinShieldDRM = 580,
ReGatlinShieldDM = 581,
ReGatlinShieldDRM = 582,
GatlinHit = 583,
GatlinDodgeHit = 584,
GatlinHitM = 585,
GatlinHitRM = 586,
GatlinDodgeHitM = 587,
GatlinDodgeHitRM = 588,
GatlinHitRate = 589,
GatlinDodgeHitRate = 590,
GatlinRange = 591,
GatlinRangeM = 592,
GatlinRangeRM = 593,
CanonKineticD = 594,
CanonThermalD = 595,
CanonNuclearD = 596,
CanonElectricArcD = 597,
CanonFreezeD = 598,
CanonOpticalRadiationD = 599,
CanonDarkCorrosionD = 600,
CanonKineticDM = 601,
CanonKineticDRM = 602,
CanonThermalDM = 603,
CanonThermalDRM = 604,
CanonNuclearDM = 605,
CanonNuclearDRM = 606,
CanonElectricArcDM = 607,
CanonElectricArcDRM = 608,
CanonFreezeDM = 609,
CanonFreezeDRM = 610,
CanonOpticalRadiationDM = 611,
CanonOpticalRadiationDRM = 612,
CanonDarkCorrosionDM = 613,
CanonDarkCorrosionDRM = 614,
CanonDM = 615,
CanonDRM = 616,
CanonDR = 617,
ReCanonDM = 618,
ReCanonDRM = 619,
CanonPenetrability = 620,
CanonPenetrabilityR = 621,
CanonPenetrabilityM = 622,
CanonPenetrabilityRM = 623,
ReCanonPenetrabilityM = 624,
ReCanonPenetrabilityRM = 625,
CanonPenetrabilityRate = 626,
CanonPenetrabilityRateR = 627,
CanonPenetrabilityD = 628,
CanonPenetrabilityDR = 629,
CanonPenetrabilityDM = 630,
CanonPenetrabilityDRM = 631,
ReCanonPenetrabilityDM = 632,
ReCanonPenetrabilityDRM = 633,
CanonPenetrabilityDPercent = 634,
CanonPenetrabilityDPercentR = 635,
ReCanonPenetrabilityDPercent = 636,
ReCanonPenetrabilityDPercentR = 637,
CanonPenetrabilityDMR = 638,
CanonCritical = 639,
CanonCriticalR = 640,
CanonCriticalM = 641,
CanonCriticalRM = 642,
CanonReCriticalM = 643,
CanonReCriticalRM = 644,
CanonCriticalRate = 645,
CanonCriticalRateR = 646,
CanonCriticalD = 647,
CanonCriticalDR = 648,
CanonCriticalDM = 649,
CanonCriticalDRM = 650,
ReCanonCriticalDM = 651,
ReCanonCriticalDRM = 652,
CanonCriticalDPercent = 653,
CanonCriticalDPercentR = 654,
ReCanonCriticalDPercent = 655,
ReCanonCriticalDPercentR = 656,
CanonCriticalDMR = 657,
CanonShieldD = 658,
CanonShieldDR = 659,
CanonShieldDM = 660,
CanonShieldDRM = 661,
ReCanonShieldDM = 662,
ReCanonShieldDRM = 663,
CanonHit = 664,
CanonDodgeHit = 665,
CanonHitM = 666,
CanonHitRM = 667,
CanonDodgeHitM = 668,
CanonDodgeHitRM = 669,
CanonHitRate = 670,
CanonDodgeHitRate = 671,
CanonRange = 672,
CanonRangeM = 673,
CanonRangeRM = 674,
TacticsMissileKineticD = 675,
TacticsMissileThermalD = 676,
TacticsMissileNuclearD = 677,
TacticsMissileElectricArcD = 678,
TacticsMissileFreezeD = 679,
TacticsMissileOpticalRadiationD = 680,
TacticsMissileDarkCorrosionD = 681,
TacticsMissileKineticDM = 682,
TacticsMissileKineticDRM = 683,
TacticsMissileThermalDM = 684,
TacticsMissileThermalDRM = 685,
TacticsMissileNuclearDM = 686,
TacticsMissileNuclearDRM = 687,
TacticsMissileElectricArcDM = 688,
TacticsMissileElectricArcDRM = 689,
TacticsMissileFreezeDM = 690,
TacticsMissileFreezeDRM = 691,
TacticsMissileOpticalRadiationDM = 692,
TacticsMissileOpticalRadiationDRM = 693,
TacticsMissileDarkCorrosionDM = 694,
TacticsMissileDarkCorrosionDRM = 695,
TacticsMissileDM = 696,
TacticsMissileDRM = 697,
TacticsMissileDR = 698,
ReTacticsMissileDM = 699,
ReTacticsMissileDRM = 700,
TacticsMissilePenetrability = 701,
TacticsMissilePenetrabilityR = 702,
TacticsMissilePenetrabilityM = 703,
TacticsMissilePenetrabilityRM = 704,
ReTacticsMissilePenetrabilityM = 705,
ReTacticsMissilePenetrabilityRM = 706,
TacticsMissilePenetrabilityRate = 707,
TacticsMissilePenetrabilityRateR = 708,
TacticsMissilePenetrabilityD = 709,
TacticsMissilePenetrabilityDR = 710,
TacticsMissilePenetrabilityDM = 711,
TacticsMissilePenetrabilityDRM = 712,
ReTacticsMissilePenetrabilityDM = 713,
ReTacticsMissilePenetrabilityDRM = 714,
TacticsMissilePenetrabilityDP = 715,
TacticsMissilePenetrabilityDPR = 716,
ReTacticsMissilePenetrabilityDP = 717,
ReTacticsMissilePenetrabilityDPR = 718,
TacticsMissilePenetrabilityDMR = 719,
TacticsMissileCritical = 720,
TacticsMissileCriticalR = 721,
TacticsMissileCriticalM = 722,
TacticsMissileCriticalRM = 723,
TacticsMissileReCriticalM = 724,
TacticsMissileReCriticalRM = 725,
TacticsMissileCriticalRate = 726,
TacticsMissileCriticalRateR = 727,
TacticsMissileCriticalD = 728,
TacticsMissileCriticalDR = 729,
TacticsMissileCriticalDM = 730,
TacticsMissileCriticalDRM = 731,
ReTacticsMissileCriticalDM = 732,
ReTacticsMissileCriticalDRM = 733,
TacticsMissileCriticalDPercent = 734,
TacticsMissileCriticalDPercentR = 735,
ReTacticsMissileCriticalDPercent = 736,
ReTacticsMissileCriticalDPercentR = 737,
TacticsMissileCriticalDMR = 738,
TacticsMissileShieldD = 739,
TacticsMissileShieldDR = 740,
TacticsMissileShieldDM = 741,
TacticsMissileShieldDRM = 742,
ReTacticsMissileShieldDM = 743,
ReTacticsMissileShieldDRM = 744,
TacticsMissileHit = 745,
TacticsMissileDodgeHit = 746,
TacticsMissileHitM = 747,
TacticsMissileHitRM = 748,
TacticsMissileDodgeHitM = 749,
TacticsMissileDodgeHitRM = 750,
TacticsMissileHitRate = 751,
TacticsMissileDodgeHitRate = 752,
TacticsMissileRange = 753,
TacticsMissileRangeM = 754,
TacticsMissileRangeRM = 755,
RocketKineticD = 756,
RocketThermalD = 757,
RocketNuclearD = 758,
RocketElectricArcD = 759,
RocketFreezeD = 760,
RocketOpticalRadiationD = 761,
RocketDarkCorrosionD = 762,
RocketKineticDM = 763,
RocketKineticDRM = 764,
RocketThermalDM = 765,
RocketThermalDRM = 766,
RocketNuclearDM = 767,
RocketNuclearDRM = 768,
RocketElectricArcDM = 769,
RocketElectricArcDRM = 770,
RocketFreezeDM = 771,
RocketFreezeDRM = 772,
RocketOpticalRadiationDM = 773,
RocketOpticalRadiationDRM = 774,
RocketDarkCorrosionDM = 775,
RocketDarkCorrosionDRM = 776,
RocketDM = 777,
RocketDRM = 778,
RocketDR = 779,
ReRocketDM = 780,
ReRocketDRM = 781,
RocketPenetrability = 782,
RocketPenetrabilityR = 783,
RocketPenetrabilityM = 784,
RocketPenetrabilityRM = 785,
ReRocketPenetrabilityM = 786,
ReRocketPenetrabilityRM = 787,
RocketPenetrabilityRate = 788,
RocketPenetrabilityRateR = 789,
RocketPenetrabilityD = 790,
RocketPenetrabilityDR = 791,
RocketPenetrabilityDM = 792,
RocketPenetrabilityDRM = 793,
ReRocketPenetrabilityDM = 794,
ReRocketPenetrabilityDRM = 795,
RocketPenetrabilityDPercent = 796,
RocketPenetrabilityDPercentR = 797,
ReRocketPenetrabilityDPercent = 798,
ReRocketPenetrabilityDPercentR = 799,
RocketPenetrabilityDMR = 800,
RocketCritical = 801,
RocketCriticalR = 802,
RocketCriticalM = 803,
RocketCriticalRM = 804,
RocketReCriticalM = 805,
RocketReCriticalRM = 806,
RocketCriticalRate = 807,
RocketCriticalRateR = 808,
RocketCriticalD = 809,
RocketCriticalDR = 810,
RocketCriticalDM = 811,
RocketCriticalDRM = 812,
ReRocketCriticalDM = 813,
ReRocketCriticalDRM = 814,
RocketCriticalDPercent = 815,
RocketCriticalDPercentR = 816,
ReRocketCriticalDPercent = 817,
ReRocketCriticalDPercentR = 818,
RocketCriticalDMR = 819,
RocketShieldD = 820,
RocketShieldDR = 821,
RocketShieldDM = 822,
RocketShieldDRM = 823,
ReRocketShieldDM = 824,
ReRocketShieldDRM = 825,
RocketHit = 826,
RocketDodgeHit = 827,
RocketHitM = 828,
RocketHitRM = 829,
RocketDodgeHitM = 830,
RocketDodgeHitRM = 831,
RocketHitRate = 832,
RocketDodgeHitRate = 833,
RocketRange = 834,
RocketRangeM = 835,
RocketRangeRM = 836,
TorpedoKineticD = 837,
TorpedoThermalD = 838,
TorpedoNuclearD = 839,
TorpedoElectricArcD = 840,
TorpedoFreezeD = 841,
TorpedoOpticalRadiationD = 842,
TorpedoDarkCorrosionD = 843,
TorpedoKineticDM = 844,
TorpedoKineticDRM = 845,
TorpedoThermalDM = 846,
TorpedoThermalDRM = 847,
TorpedoNuclearDM = 848,
TorpedoNuclearDRM = 849,
TorpedoElectricArcDM = 850,
TorpedoElectricArcDRM = 851,
TorpedoFreezeDM = 852,
TorpedoFreezeDRM = 853,
TorpedoOpticalRadiationDM = 854,
TorpedoOpticalRadiationDRM = 855,
TorpedoDarkCorrosionDM = 856,
TorpedoDarkCorrosionDRM = 857,
TorpedoDM = 858,
TorpedoDRM = 859,
TorpedoDR = 860,
ReTorpedoDM = 861,
ReTorpedoDRM = 862,
TorpedoPenetrability = 863,
TorpedoPenetrabilityR = 864,
TorpedoPenetrabilityM = 865,
TorpedoPenetrabilityRM = 866,
ReTorpedoPenetrabilityM = 867,
ReTorpedoPenetrabilityRM = 868,
TorpedoPenetrabilityRate = 869,
TorpedoPenetrabilityRateR = 870,
TorpedoPenetrabilityD = 871,
TorpedoPenetrabilityDR = 872,
TorpedoPenetrabilityDM = 873,
TorpedoPenetrabilityDRM = 874,
ReTorpedoPenetrabilityDM = 875,
ReTorpedoPenetrabilityDRM = 876,
TorpedoPenetrabilityDPercent = 877,
TorpedoPenetrabilityDPercentR = 878,
ReTorpedoPenetrabilityDPercent = 879,
ReTorpedoPenetrabilityDPercentR = 880,
TorpedoPenetrabilityDMR = 881,
TorpedoCritical = 882,
TorpedoCriticalR = 883,
TorpedoCriticalM = 884,
TorpedoCriticalRM = 885,
TorpedoReCriticalM = 886,
TorpedoReCriticalRM = 887,
TorpedoCriticalRate = 888,
TorpedoCriticalRateR = 889,
TorpedoCriticalD = 890,
TorpedoCriticalDR = 891,
TorpedoCriticalDM = 892,
TorpedoCriticalDRM = 893,
ReTorpedoCriticalDM = 894,
ReTorpedoCriticalDRM = 895,
TorpedoCriticalDPercent = 896,
TorpedoCriticalDPercentR = 897,
ReTorpedoCriticalDPercent = 898,
ReTorpedoCriticalDPercentR = 899,
TorpedoCriticalDMR = 900,
TorpedoShieldD = 901,
TorpedoShieldDR = 902,
TorpedoShieldDM = 903,
TorpedoShieldDRM = 904,
ReTorpedoShieldDM = 905,
ReTorpedoShieldDRM = 906,
TorpedoHit = 907,
TorpedoDodgeHit = 908,
TorpedoHitM = 909,
TorpedoHitRM = 910,
TorpedoDodgeHitM = 911,
TorpedoDodgeHitRM = 912,
TorpedoHitRate = 913,
TorpedoDodgeHitRate = 914,
TorpedoRange = 915,
TorpedoRangeM = 916,
TorpedoRangeRM = 917,
TacticsLaserKineticD = 918,
TacticsLaserThermalD = 919,
TacticsLaserNuclearD = 920,
TacticsLaserElectricArcD = 921,
TacticsLaserFreezeD = 922,
TacticsLaserOpticalRadiationD = 923,
TacticsLaserDarkCorrosionD = 924,
TacticsLaserKineticDM = 925,
TacticsLaserKineticDRM = 926,
TacticsLaserThermalDM = 927,
TacticsLaserThermalDRM = 928,
TacticsLaserNuclearDM = 929,
TacticsLaserNuclearDRM = 930,
TacticsLaserElectricArcDM = 931,
TacticsLaserElectricArcDRM = 932,
TacticsLaserFreezeDM = 933,
TacticsLaserFreezeDRM = 934,
TacticsLaserOpticalRadiationDM = 935,
TacticsLaserOpticalRadiationDRM = 936,
TacticsLaserDarkCorrosionDM = 937,
TacticsLaserDarkCorrosionDRM = 938,
TacticsLaserDM = 939,
TacticsLaserDRM = 940,
TacticsLaserDR = 941,
ReTacticsLaserDM = 942,
ReTacticsLaserDRM = 943,
TacticsLaserPenetrability = 944,
TacticsLaserPenetrabilityR = 945,
TacticsLaserPenetrabilityM = 946,
TacticsLaserPenetrabilityRM = 947,
ReTacticsLaserPenetrabilityM = 948,
ReTacticsLaserPenetrabilityRM = 949,
TacticsLaserPenetrabilityRate = 950,
TacticsLaserPenetrabilityRateR = 951,
TacticsLaserPenetrabilityD = 952,
TacticsLaserPenetrabilityDR = 953,
TacticsLaserPenetrabilityDM = 954,
TacticsLaserPenetrabilityDRM = 955,
ReTacticsLaserPenetrabilityDM = 956,
ReTacticsLaserPenetrabilityDRM = 957,
TacticsLaserPenetrabilityDPercent = 958,
TacticsLaserPenetrabilityDPR = 959,
ReTacticsLaserPenetrabilityDP = 960,
ReTacticsLaserPenetrabilityDPR = 961,
TacticsLaserPenetrabilityDMR = 962,
TacticsLaserCritical = 963,
TacticsLaserCriticalR = 964,
TacticsLaserCriticalM = 965,
TacticsLaserCriticalRM = 966,
TacticsLaserReCriticalM = 967,
TacticsLaserReCriticalRM = 968,
TacticsLaserCriticalRate = 969,
TacticsLaserCriticalRateR = 970,
TacticsLaserCriticalD = 971,
TacticsLaserCriticalDR = 972,
TacticsLaserCriticalDM = 973,
TacticsLaserCriticalDRM = 974,
ReTacticsLaserCriticalDM = 975,
ReTacticsLaserCriticalDRM = 976,
TacticsLaserCriticalDPercent = 977,
TacticsLaserCriticalDPercentR = 978,
ReTacticsLaserCriticalDPercent = 979,
ReTacticsLaserCriticalDPercentR = 980,
TacticsLaserCriticalDMR = 981,
TacticsLaserShieldD = 982,
TacticsLaserShieldDR = 983,
TacticsLaserShieldDM = 984,
TacticsLaserShieldDRM = 985,
ReTacticsLaserShieldDM = 986,
ReTacticsLaserShieldDRM = 987,
TacticsLaserHit = 988,
TacticsLaserDodgeHit = 989,
TacticsLaserHitM = 990,
TacticsLaserHitRM = 991,
TacticsLaserDodgeHitM = 992,
TacticsLaserDodgeHitRM = 993,
TacticsLaserHitRate = 994,
TacticsLaserDodgeHitRate = 995,
TacticsLaserRange = 996,
TacticsLaserRangeM = 997,
TacticsLaserRangeRM = 998,
PulseKineticD = 999,
PulseThermalD = 1000,
PulseNuclearD = 1001,
PulseElectricArcD = 1002,
PulseFreezeD = 1003,
PulseOpticalRadiationD = 1004,
PulseDarkCorrosionD = 1005,
PulseKineticDM = 1006,
PulseKineticDRM = 1007,
PulseThermalDM = 1008,
PulseThermalDRM = 1009,
PulseNuclearDM = 1010,
PulseNuclearDRM = 1011,
PulseElectricArcDM = 1012,
PulseElectricArcDRM = 1013,
PulseFreezeDM = 1014,
PulseFreezeDRM = 1015,
PulseOpticalRadiationDM = 1016,
PulseOpticalRadiationDRM = 1017,
PulseDarkCorrosionDM = 1018,
PulseDarkCorrosionDRM = 1019,
PulseDM = 1020,
PulseDRM = 1021,
PulseDR = 1022,
RePulseDM = 1023,
RePulseDRM = 1024,
PulsePenetrability = 1025,
PulsePenetrabilityR = 1026,
PulsePenetrabilityM = 1027,
PulsePenetrabilityRM = 1028,
RePulsePenetrabilityM = 1029,
RePulsePenetrabilityRM = 1030,
PulsePenetrabilityRate = 1031,
PulsePenetrabilityRateR = 1032,
PulsePenetrabilityD = 1033,
PulsePenetrabilityDR = 1034,
PulsePenetrabilityDM = 1035,
PulsePenetrabilityDRM = 1036,
RePulsePenetrabilityDM = 1037,
RePulsePenetrabilityDRM = 1038,
PulsePenetrabilityDPercent = 1039,
PulsePenetrabilityDPercentR = 1040,
RePulsePenetrabilityDPercent = 1041,
RePulsePenetrabilityDPercentR = 1042,
PulsePenetrabilityDMR = 1043,
PulseCritical = 1044,
PulseCriticalR = 1045,
PulseCriticalM = 1046,
PulseCriticalRM = 1047,
PulseReCriticalM = 1048,
PulseReCriticalRM = 1049,
PulseCriticalRate = 1050,
PulseCriticalRateR = 1051,
PulseCriticalD = 1052,
PulseCriticalDR = 1053,
PulseCriticalDM = 1054,
PulseCriticalDRM = 1055,
RePulseCriticalDM = 1056,
RePulseCriticalDRM = 1057,
PulseCriticalDPercent = 1058,
PulseCriticalDPercentR = 1059,
RePulseCriticalDPercent = 1060,
RePulseCriticalDPercentR = 1061,
PulseCriticalDMR = 1062,
PulseShieldD = 1063,
PulseShieldDR = 1064,
PulseShieldDM = 1065,
PulseShieldDRM = 1066,
RePulseShieldDM = 1067,
RePulseShieldDRM = 1068,
PulseHit = 1069,
PulseDodgeHit = 1070,
PulseHitM = 1071,
PulseHitRM = 1072,
PulseDodgeHitM = 1073,
PulseDodgeHitRM = 1074,
PulseHitRate = 1075,
PulseDodgeHitRate = 1076,
PulseRange = 1077,
PulseRangeM = 1078,
PulseRangeRM = 1079,
PlasmaKineticD = 1080,
PlasmaThermalD = 1081,
PlasmaNuclearD = 1082,
PlasmaElectricArcD = 1083,
PlasmaFreezeD = 1084,
PlasmaOpticalRadiationD = 1085,
PlasmaDarkCorrosionD = 1086,
PlasmaKineticDM = 1087,
PlasmaKineticDRM = 1088,
PlasmaThermalDM = 1089,
PlasmaThermalDRM = 1090,
PlasmaNuclearDM = 1091,
PlasmaNuclearDRM = 1092,
PlasmaElectricArcDM = 1093,
PlasmaElectricArcDRM = 1094,
PlasmaFreezeDM = 1095,
PlasmaFreezeDRM = 1096,
PlasmaOpticalRadiationDM = 1097,
PlasmaOpticalRadiationDRM = 1098,
PlasmaDarkCorrosionDM = 1099,
PlasmaDarkCorrosionDRM = 1100,
PlasmaDM = 1101,
PlasmaDRM = 1102,
PlasmaDR = 1103,
RePlasmaDM = 1104,
RePlasmaDRM = 1105,
PlasmaPenetrability = 1106,
PlasmaPenetrabilityR = 1107,
PlasmaPenetrabilityM = 1108,
PlasmaPenetrabilityRM = 1109,
RePlasmaPenetrabilityM = 1110,
RePlasmaPenetrabilityRM = 1111,
PlasmaPenetrabilityRate = 1112,
PlasmaPenetrabilityRateR = 1113,
PlasmaPenetrabilityD = 1114,
PlasmaPenetrabilityDR = 1115,
PlasmaPenetrabilityDM = 1116,
PlasmaPenetrabilityDRM = 1117,
RePlasmaPenetrabilityDM = 1118,
RePlasmaPenetrabilityDRM = 1119,
PlasmaPenetrabilityDPercent = 1120,
PlasmaPenetrabilityDPercentR = 1121,
RePlasmaPenetrabilityDPercent = 1122,
RePlasmaPenetrabilityDPercentR = 1123,
PlasmaPenetrabilityDMR = 1124,
PlasmaCritical = 1125,
PlasmaCriticalR = 1126,
PlasmaCriticalM = 1127,
PlasmaCriticalRM = 1128,
PlasmaReCriticalM = 1129,
PlasmaReCriticalRM = 1130,
PlasmaCriticalRate = 1131,
PlasmaCriticalRateR = 1132,
PlasmaCriticalD = 1133,
PlasmaCriticalDR = 1134,
PlasmaCriticalDM = 1135,
PlasmaCriticalDRM = 1136,
RePlasmaCriticalDM = 1137,
RePlasmaCriticalDRM = 1138,
PlasmaCriticalDPercent = 1139,
PlasmaCriticalDPercentR = 1140,
RePlasmaCriticalDPercent = 1141,
RePlasmaCriticalDPercentR = 1142,
PlasmaCriticalDMR = 1143,
PlasmaShieldD = 1144,
PlasmaShieldDR = 1145,
PlasmaShieldDM = 1146,
PlasmaShieldDRM = 1147,
RePlasmaShieldDM = 1148,
RePlasmaShieldDRM = 1149,
PlasmaHit = 1150,
PlasmaDodgeHit = 1151,
PlasmaHitM = 1152,
PlasmaHitRM = 1153,
PlasmaDodgeHitM = 1154,
PlasmaDodgeHitRM = 1155,
PlasmaHitRate = 1156,
PlasmaDodgeHitRate = 1157,
PlasmaRange = 1158,
PlasmaRangeM = 1159,
PlasmaRangeRM = 1160,
TacticsGrenadeKineticD = 1161,
TacticsGrenadeThermalD = 1162,
TacticsGrenadeNuclearD = 1163,
TacticsGrenadeElectricArcD = 1164,
TacticsGrenadeFreezeD = 1165,
TacticsGrenadeOpticalRadiationD = 1166,
TacticsGrenadeDarkCorrosionD = 1167,
TacticsGrenadeKineticDM = 1168,
TacticsGrenadeKineticDRM = 1169,
TacticsGrenadeThermalDM = 1170,
TacticsGrenadeThermalDRM = 1171,
TacticsGrenadeNuclearDM = 1172,
TacticsGrenadeNuclearDRM = 1173,
TacticsGrenadeElectricArcDM = 1174,
TacticsGrenadeElectricArcDRM = 1175,
TacticsGrenadeFreezeDM = 1176,
TacticsGrenadeFreezeDRM = 1177,
TacticsGrenadeOpticalRadiationDM = 1178,
TacticsGrenadeOpticalRadiationDRM = 1179,
TacticsGrenadeDarkCorrosionDM = 1180,
TacticsGrenadeDarkCorrosionDRM = 1181,
TacticsGrenadeDM = 1182,
TacticsGrenadeDRM = 1183,
TacticsGrenadeDR = 1184,
ReTacticsGrenadeDM = 1185,
ReTacticsGrenadeDRM = 1186,
TacticsGrenadePenetrability = 1187,
TacticsGrenadePenetrabilityR = 1188,
TacticsGrenadePenetrabilityM = 1189,
TacticsGrenadePenetrabilityRM = 1190,
ReTacticsGrenadePenetrabilityM = 1191,
ReTacticsGrenadePenetrabilityRM = 1192,
TacticsGrenadePenetrabilityRate = 1193,
TacticsGrenadePenetrabilityRateR = 1194,
TacticsGrenadePenetrabilityD = 1195,
TacticsGrenadePenetrabilityDR = 1196,
TacticsGrenadePenetrabilityDM = 1197,
TacticsGrenadePenetrabilityDRM = 1198,
ReTacticsGrenadePenetrabilityDM = 1199,
ReTacticsGrenadePenetrabilityDRM = 1200,
TacticsGrenadePenetrabilityDP = 1201,
TacticsGrenadePenetrabilityDPR = 1202,
ReTacticsGrenadePenetrabilityDP = 1203,
ReTacticsGrenadePenetrabilityDPR = 1204,
TacticsGrenadePenetrabilityDMR = 1205,
TacticsGrenadeCritical = 1206,
TacticsGrenadeCriticalR = 1207,
TacticsGrenadeCriticalM = 1208,
TacticsGrenadeCriticalRM = 1209,
TacticsGrenadeReCriticalM = 1210,
TacticsGrenadeReCriticalRM = 1211,
TacticsGrenadeCriticalRate = 1212,
TacticsGrenadeCriticalRateR = 1213,
TacticsGrenadeCriticalD = 1214,
TacticsGrenadeCriticalDR = 1215,
TacticsGrenadeCriticalDM = 1216,
TacticsGrenadeCriticalDRM = 1217,
ReTacticsGrenadeCriticalDM = 1218,
ReTacticsGrenadeCriticalDRM = 1219,
TacticsGrenadeCriticalDPercent = 1220,
TacticsGrenadeCriticalDPercentR = 1221,
ReTacticsGrenadeCriticalDPercent = 1222,
ReTacticsGrenadeCriticalDPercentR = 1223,
TacticsGrenadeCriticalDMR = 1224,
TacticsGrenadeShieldD = 1225,
TacticsGrenadeShieldDR = 1226,
TacticsGrenadeShieldDM = 1227,
TacticsGrenadeShieldDRM = 1228,
ReTacticsGrenadeShieldDM = 1229,
ReTacticsGrenadeShieldDRM = 1230,
TacticsGrenadeHit = 1231,
TacticsGrenadeDodgeHit = 1232,
TacticsGrenadeHitM = 1233,
TacticsGrenadeHitRM = 1234,
TacticsGrenadeDodgeHitM = 1235,
TacticsGrenadeDodgeHitRM = 1236,
TacticsGrenadeHitRate = 1237,
TacticsGrenadeDodgeHitRate = 1238,
TacticsGrenadeRange = 1239,
TacticsGrenadeRangeM = 1240,
TacticsGrenadeRangeRM = 1241,
ArmedUAVKineticD = 1242,
ArmedUAVThermalD = 1243,
ArmedUAVNuclearD = 1244,
ArmedUAVElectricArcD = 1245,
ArmedUAVFreezeD = 1246,
ArmedUAVOpticalRadiationD = 1247,
ArmedUAVDarkCorrosionD = 1248,
ArmedUAVKineticDM = 1249,
ArmedUAVKineticDRM = 1250,
ArmedUAVThermalDM = 1251,
ArmedUAVThermalDRM = 1252,
ArmedUAVNuclearDM = 1253,
ArmedUAVNuclearDRM = 1254,
ArmedUAVElectricArcDM = 1255,
ArmedUAVElectricArcDRM = 1256,
ArmedUAVFreezeDM = 1257,
ArmedUAVFreezeDRM = 1258,
ArmedUAVOpticalRadiationDM = 1259,
ArmedUAVOpticalRadiationDRM = 1260,
ArmedUAVDarkCorrosionDM = 1261,
ArmedUAVDarkCorrosionDRM = 1262,
ArmedUAVDM = 1263,
ArmedUAVDRM = 1264,
ArmedUAVDR = 1265,
ReArmedUAVDM = 1266,
ReArmedUAVDRM = 1267,
ArmedUAVPenetrability = 1268,
ArmedUAVPenetrabilityR = 1269,
ArmedUAVPenetrabilityM = 1270,
ArmedUAVPenetrabilityRM = 1271,
ReArmedUAVPenetrabilityM = 1272,
ReArmedUAVPenetrabilityRM = 1273,
ArmedUAVPenetrabilityRate = 1274,
ArmedUAVPenetrabilityRateR = 1275,
ArmedUAVPenetrabilityD = 1276,
ArmedUAVPenetrabilityDR = 1277,
ArmedUAVPenetrabilityDM = 1278,
ArmedUAVPenetrabilityDRM = 1279,
ReArmedUAVPenetrabilityDM = 1280,
ReArmedUAVPenetrabilityDRM = 1281,
ArmedUAVPenetrabilityDPercent = 1282,
ArmedUAVPenetrabilityDPercentR = 1283,
ReArmedUAVPenetrabilityDPercent = 1284,
ReArmedUAVPenetrabilityDPercentR = 1285,
ArmedUAVPenetrabilityDMR = 1286,
ArmedUAVCritical = 1287,
ArmedUAVCriticalR = 1288,
ArmedUAVCriticalM = 1289,
ArmedUAVCriticalRM = 1290,
ArmedUAVReCriticalM = 1291,
ArmedUAVReCriticalRM = 1292,
ArmedUAVCriticalRate = 1293,
ArmedUAVCriticalRateR = 1294,
ArmedUAVCriticalD = 1295,
ArmedUAVCriticalDR = 1296,
ArmedUAVCriticalDM = 1297,
ArmedUAVCriticalDRM = 1298,
ReArmedUAVCriticalDM = 1299,
ReArmedUAVCriticalDRM = 1300,
ArmedUAVCriticalDPercent = 1301,
ArmedUAVCriticalDPercentR = 1302,
ReArmedUAVCriticalDPercent = 1303,
ReArmedUAVCriticalDPercentR = 1304,
ArmedUAVCriticalDMR = 1305,
ArmedUAVShieldD = 1306,
ArmedUAVShieldDR = 1307,
ArmedUAVShieldDM = 1308,
ArmedUAVShieldDRM = 1309,
ReArmedUAVShieldDM = 1310,
ReArmedUAVShieldDRM = 1311,
ArmedUAVHit = 1312,
ArmedUAVDodgeHit = 1313,
ArmedUAVHitM = 1314,
ArmedUAVHitRM = 1315,
ArmedUAVDodgeHitM = 1316,
ArmedUAVDodgeHitRM = 1317,
ArmedUAVHitRate = 1318,
ArmedUAVDodgeHitRate = 1319,
ArmedUAVRange = 1320,
ArmedUAVRangeM = 1321,
ArmedUAVRangeRM = 1322,
BurstUAVKineticD = 1323,
BurstUAVThermalD = 1324,
BurstUAVNuclearD = 1325,
BurstUAVElectricArcD = 1326,
BurstUAVFreezeD = 1327,
BurstUAVOpticalRadiationD = 1328,
BurstUAVDarkCorrosionD = 1329,
BurstUAVKineticDM = 1330,
BurstUAVKineticDRM = 1331,
BurstUAVThermalDM = 1332,
BurstUAVThermalDRM = 1333,
BurstUAVNuclearDM = 1334,
BurstUAVNuclearDRM = 1335,
BurstUAVElectricArcDM = 1336,
BurstUAVElectricArcDRM = 1337,
BurstUAVFreezeDM = 1338,
BurstUAVFreezeDRM = 1339,
BurstUAVOpticalRadiationDM = 1340,
BurstUAVOpticalRadiationDRM = 1341,
BurstUAVDarkCorrosionDM = 1342,
BurstUAVDarkCorrosionDRM = 1343,
BurstUAVDM = 1344,
BurstUAVDRM = 1345,
BurstUAVDR = 1346,
ReBurstUAVDM = 1347,
ReBurstUAVDRM = 1348,
BurstUAVPenetrability = 1349,
BurstUAVPenetrabilityR = 1350,
BurstUAVPenetrabilityM = 1351,
BurstUAVPenetrabilityRM = 1352,
ReBurstUAVPenetrabilityM = 1353,
ReBurstUAVPenetrabilityRM = 1354,
BurstUAVPenetrabilityRate = 1355,
BurstUAVPenetrabilityRateR = 1356,
BurstUAVPenetrabilityD = 1357,
BurstUAVPenetrabilityDR = 1358,
BurstUAVPenetrabilityDM = 1359,
BurstUAVPenetrabilityDRM = 1360,
ReBurstUAVPenetrabilityDM = 1361,
ReBurstUAVPenetrabilityDRM = 1362,
BurstUAVPenetrabilityDPercent = 1363,
BurstUAVPenetrabilityDPercentR = 1364,
ReBurstUAVPenetrabilityDPercent = 1365,
ReBurstUAVPenetrabilityDPercentR = 1366,
BurstUAVPenetrabilityDMR = 1367,
BurstUAVCritical = 1368,
BurstUAVCriticalR = 1369,
BurstUAVCriticalM = 1370,
BurstUAVCriticalRM = 1371,
BurstUAVReCriticalM = 1372,
BurstUAVReCriticalRM = 1373,
BurstUAVCriticalRate = 1374,
BurstUAVCriticalRateR = 1375,
BurstUAVCriticalD = 1376,
BurstUAVCriticalDR = 1377,
BurstUAVCriticalDM = 1378,
BurstUAVCriticalDRM = 1379,
ReBurstUAVCriticalDM = 1380,
ReBurstUAVCriticalDRM = 1381,
BurstUAVCriticalDPercent = 1382,
BurstUAVCriticalDPercentR = 1383,
ReBurstUAVCriticalDPercent = 1384,
ReBurstUAVCriticalDPercentR = 1385,
BurstUAVCriticalDMR = 1386,
BurstUAVShieldD = 1387,
BurstUAVShieldDR = 1388,
BurstUAVShieldDM = 1389,
BurstUAVShieldDRM = 1390,
ReBurstUAVShieldDM = 1391,
ReBurstUAVShieldDRM = 1392,
BurstUAVHit = 1393,
BurstUAVDodgeHit = 1394,
BurstUAVHitM = 1395,
BurstUAVHitRM = 1396,
BurstUAVDodgeHitM = 1397,
BurstUAVDodgeHitRM = 1398,
BurstUAVHitRate = 1399,
BurstUAVDodgeHitRate = 1400,
BurstUAVRange = 1401,
BurstUAVRangeM = 1402,
BurstUAVRangeRM = 1403,
MineKineticD = 1404,
MineThermalD = 1405,
MineNuclearD = 1406,
MineElectricArcD = 1407,
MineFreezeD = 1408,
MineOpticalRadiationD = 1409,
MineDarkCorrosionD = 1410,
MineKineticDM = 1411,
MineKineticDRM = 1412,
MineThermalDM = 1413,
MineThermalDRM = 1414,
MineNuclearDM = 1415,
MineNuclearDRM = 1416,
MineElectricArcDM = 1417,
MineElectricArcDRM = 1418,
MineFreezeDM = 1419,
MineFreezeDRM = 1420,
MineOpticalRadiationDM = 1421,
MineOpticalRadiationDRM = 1422,
MineDarkCorrosionDM = 1423,
MineDarkCorrosionDRM = 1424,
MineDM = 1425,
MineDRM = 1426,
MineDR = 1427,
ReMineDM = 1428,
ReMineDRM = 1429,
MinePenetrability = 1430,
MinePenetrabilityR = 1431,
MinePenetrabilityM = 1432,
MinePenetrabilityRM = 1433,
ReMinePenetrabilityM = 1434,
ReMinePenetrabilityRM = 1435,
MinePenetrabilityRate = 1436,
MinePenetrabilityRateR = 1437,
MinePenetrabilityD = 1438,
MinePenetrabilityDR = 1439,
MinePenetrabilityDM = 1440,
MinePenetrabilityDRM = 1441,
ReMinePenetrabilityDM = 1442,
ReMinePenetrabilityDRM = 1443,
MinePenetrabilityDPercent = 1444,
MinePenetrabilityDPercentR = 1445,
ReMinePenetrabilityDPercent = 1446,
ReMinePenetrabilityDPercentR = 1447,
MinePenetrabilityDMR = 1448,
MineCritical = 1449,
MineCriticalR = 1450,
MineCriticalM = 1451,
MineCriticalRM = 1452,
MineReCriticalM = 1453,
MineReCriticalRM = 1454,
MineCriticalRate = 1455,
MineCriticalRateR = 1456,
MineCriticalD = 1457,
MineCriticalDR = 1458,
MineCriticalDM = 1459,
MineCriticalDRM = 1460,
ReMineCriticalDM = 1461,
ReMineCriticalDRM = 1462,
MineCriticalDPercent = 1463,
MineCriticalDPercentR = 1464,
ReMineCriticalDPercent = 1465,
ReMineCriticalDPercentR = 1466,
MineCriticalDMR = 1467,
MineShieldD = 1468,
MineShieldDR = 1469,
MineShieldDM = 1470,
MineShieldDRM = 1471,
ReMineShieldDM = 1472,
ReMineShieldDRM = 1473,
MineHit = 1474,
MineDodgeHit = 1475,
MineHitM = 1476,
MineHitRM = 1477,
MineDodgeHitM = 1478,
MineDodgeHitRM = 1479,
MineHitRate = 1480,
MineDodgeHitRate = 1481,
MineRange = 1482,
MineRangeM = 1483,
MineRangeRM = 1484,
ArtilleryKineticD = 1485,
ArtilleryThermalD = 1486,
ArtilleryNuclearD = 1487,
ArtilleryElectricArcD = 1488,
ArtilleryFreezeD = 1489,
ArtilleryOpticalRadiationD = 1490,
ArtilleryDarkCorrosionD = 1491,
ArtilleryKineticDM = 1492,
ArtilleryKineticDRM = 1493,
ArtilleryThermalDM = 1494,
ArtilleryThermalDRM = 1495,
ArtilleryNuclearDM = 1496,
ArtilleryNuclearDRM = 1497,
ArtilleryElectricArcDM = 1498,
ArtilleryElectricArcDRM = 1499,
ArtilleryFreezeDM = 1500,
ArtilleryFreezeDRM = 1501,
ArtilleryOpticalRadiationDM = 1502,
ArtilleryOpticalRadiationDRM = 1503,
ArtilleryDarkCorrosionDM = 1504,
ArtilleryDarkCorrosionDRM = 1505,
MissileKineticD = 1506,
MissileThermalD = 1507,
MissileNuclearD = 1508,
MissileElectricArcD = 1509,
MissileFreezeD = 1510,
MissileOpticalRadiationD = 1511,
MissileDarkCorrosionD = 1512,
MissileKineticDM = 1513,
MissileKineticDRM = 1514,
MissileThermalDM = 1515,
MissileThermalDRM = 1516,
MissileNuclearDM = 1517,
MissileNuclearDRM = 1518,
MissileElectricArcDM = 1519,
MissileElectricArcDRM = 1520,
MissileFreezeDM = 1521,
MissileFreezeDRM = 1522,
MissileOpticalRadiationDM = 1523,
MissileOpticalRadiationDRM = 1524,
MissileDarkCorrosionDM = 1525,
MissileDarkCorrosionDRM = 1526,
LaserKineticD = 1527,
LaserThermalD = 1528,
LaserNuclearD = 1529,
LaserElectricArcD = 1530,
LaserFreezeD = 1531,
LaserOpticalRadiationD = 1532,
LaserDarkCorrosionD = 1533,
LaserKineticDM = 1534,
LaserKineticDRM = 1535,
LaserThermalDM = 1536,
LaserThermalDRM = 1537,
LaserNuclearDM = 1538,
LaserNuclearDRM = 1539,
LaserElectricArcDM = 1540,
LaserElectricArcDRM = 1541,
LaserFreezeDM = 1542,
LaserFreezeDRM = 1543,
LaserOpticalRadiationDM = 1544,
LaserOpticalRadiationDRM = 1545,
LaserDarkCorrosionDM = 1546,
LaserDarkCorrosionDRM = 1547,
GrenadeKineticD = 1548,
GrenadeThermalD = 1549,
GrenadeNuclearD = 1550,
GrenadeElectricArcD = 1551,
GrenadeFreezeD = 1552,
GrenadeOpticalRadiationD = 1553,
GrenadeDarkCorrosionD = 1554,
GrenadeKineticDM = 1555,
GrenadeKineticDRM = 1556,
GrenadeThermalDM = 1557,
GrenadeThermalDRM = 1558,
GrenadeNuclearDM = 1559,
GrenadeNuclearDRM = 1560,
GrenadeElectricArcDM = 1561,
GrenadeElectricArcDRM = 1562,
GrenadeFreezeDM = 1563,
GrenadeFreezeDRM = 1564,
GrenadeOpticalRadiationDM = 1565,
GrenadeOpticalRadiationDRM = 1566,
GrenadeDarkCorrosionDM = 1567,
GrenadeDarkCorrosionDRM = 1568,
UAVKineticD = 1569,
UAVThermalD = 1570,
UAVNuclearD = 1571,
UAVElectricArcD = 1572,
UAVFreezeD = 1573,
UAVOpticalRadiationD = 1574,
UAVDarkCorrosionD = 1575,
UAVKineticDM = 1576,
UAVKineticDRM = 1577,
UAVThermalDM = 1578,
UAVThermalDRM = 1579,
UAVNuclearDM = 1580,
UAVNuclearDRM = 1581,
UAVElectricArcDM = 1582,
UAVElectricArcDRM = 1583,
UAVFreezeDM = 1584,
UAVFreezeDRM = 1585,
UAVOpticalRadiationDM = 1586,
UAVOpticalRadiationDRM = 1587,
UAVDarkCorrosionDM = 1588,
UAVDarkCorrosionDRM = 1589,
EffectiveD = 1590,
CloseRangeD = 1591,
LongRangeD = 1592,
DecelerationR = 1593,
BurningR = 1594,
ImprisonR = 1595,
SilenceR = 1596,
DizzinessR = 1597,
EnergyPowerCostAdd = 1598,
EnergyPowerCostM = 1599,
EnergyPowerCostRM = 1600,
SuperMagneticCostAdd = 1601,
SuperMagneticCostM = 1602,
SuperMagneticCostRM = 1603,
SkillCostAdd = 1604,
SkillCostM = 1605,
SkillCostRM = 1606,
ImprisonAttr = 1607,
SilenceAttr = 1608,
DizzinessAttr = 1609,
HPRecoveryCurb = 1610,
ShieldRecoveryCurb = 1611,
Invincible = 1612,
peerlessTopLimit = 1613,
peerlessCost = 1614,
stealth = 1615,
velocityMaxZ = 10001,
reverseVelocityMaxZ = 10002,
velocityMaxX = 10003,
reverseVelocityMaxX = 10004,
velocityMaxY = 10005,
reverseVelocityMaxY = 10006,
accelerationZ = 10007,
reverseAccelerationZ = 10008,
accelerationX = 10009,
reverseAccelerationX = 10010,
accelerationY = 10011,
reverseAccelerationY = 10012,
resistanceAccelerationZ = 10013,
resistanceAccelerationX = 10014,
resistanceAccelerationY = 10015,
angularVelocityMaxX = 10016,
angularVelocityMaxY = 10017,
angularVelocityMaxZ = 10018,
angularAcceleration = 10019,
resistanceAngularAcceleration = 10020,
leapVelocityStart = 10021,
leapAcceleration = 10022,
leapVelocityMax = 10023,
leapReverseAcceleration = 10024,
leapVelocityEnd = 10025,
angularTiltMaxX = 10026,
angularTiltMaxY = 10027,
angularTiltMaxZ = 10028,
cruiseVelocitymaxz = 10029,
cruiseReversevelocitymaxz = 10030,
cruiseVelocitymaxx = 10031,
cruiseReversevelocitymaxx = 10032,
cruiseVelocitymaxy = 10033,
cruiseReversevelocitymaxy = 10034,
cruiseAccelerationz = 10035,
cruiseReverseaccelerationz = 10036,
cruiseAccelerationx = 10037,
cruiseReverseaccelerationx = 10038,
cruiseAccelerationy = 10039,
cruiseReverseaccelerationy = 10040,
cruiseResistanceaccelerationz = 10041,
cruiseResistanceaccelerationx = 10042,
cruiseResistanceaccelerationy = 10043,
cruiseAngularvelocitymaxx = 10044,
cruiseAngularvelocitymaxy = 10045,
cruiseAngularvelocitymaxz = 10046,
cruiseAngularacceleration = 10047,
cruiseResistanceAngleDecelerate = 10048,
cruiseLeapvelocitystart = 10049,
cruiseLeapacceleration = 10050,
cruiseLeapvelocitymax = 10051,
cruiseLeapreverseacceleration = 10052,
cruiseLeapvelocityend = 10053,
cruiseAngulartiltmaxx = 10054,
cruiseAngulartiltmaxy = 10055,
cruiseAngulartiltmaxz = 10056,
overloadVelocitymaxz = 10057,
overloadReversevelocitymaxz = 10058,
overloadVelocitymaxx = 10059,
overloadReversevelocitymaxx = 10060,
overloadVelocitymaxy = 10061,
overloadReversevelocitymaxy = 10062,
overloadAccelerationz = 10063,
overloadReverseaccelerationz = 10064,
overloadAccelerationx = 10065,
overloadReverseaccelerationx = 10066,
overloadAccelerationy = 10067,
overloadReverseaccelerationy = 10068,
overloadResistanceaccelerationz = 10069,
overloadResistanceaccelerationx = 10070,
overloadResistanceaccelerationy = 10071,
overloadAngularvelocitymaxx = 10072,
overloadAngularvelocitymaxy = 10073,
overloadAngularvelocitymaxz = 10074,
overloadAngularacceleration = 10075,
overloadResistanceAngleRetard = 10076,
overloadAngulartiltmaxx = 10077,
overloadAngulartiltmaxy = 10078,
overloadAngulartiltmaxz = 10079,
overloadPowercostefficiency = 10080,
MagazineC = 11001,
MagazineLT = 11002,
AmmoCPS = 11003,
MissileH = 11004,
MissileHRT = 11005,
GuidedMissileCPS = 11006,
HeatC = 11007,
CooldownT = 11008,
CooldownR = 11009,
SaftyValveV = 11010,
HeatAPS = 11011,
}
public enum EffectType
{
Damage = 0,
TriggerAnomaly = 1,
RecoverHP = 2,
DotDamage = 3,
RecoverShield = 4,
RecoverPower = 5,
}
public enum BuffEvent
{
NoneBuffEvent = 0,
Overload = 1,
WeaponUse = 2,
KillTarget = 3,
OnHurt = 4,
}
public enum KAttributeType
{
atInvalid = 0,
atMaxHP = 1,
atMaxHPPP = 2,
atMaxMP = 3,
atMaxMPPP = 4,
atAttack = 5,
atAttackPP = 6,
atDefence = 7,
atDefencePP = 8,
atMiss = 9,
atMissPP = 10,
atNotMiss = 11,
atNotMissPP = 12,
atCrit = 13,
atCritPP = 14,
atNotCrit = 15,
atNotCritPP = 16,
atCritHurt = 17,
atNotCritHurt = 18,
atBlock = 25,
atBlockPP = 26,
atNotBlock = 27,
atNotBlockPP = 28,
atCritHurtPP = 33,
atNotCritHurtPP = 34,
atMaxAnger = 36,
atMaxAngerPP = 37,
atDamageCof = 49,
atAttackCof = 50,
atRecoverHP = 52,
atRecoverHPPP = 53,
atRecoverMP = 54,
atRecoverMPPP = 55,
atRecoverAnger = 62,
atRecoverAngerPP = 63,
atBeHitRecoverMP = 64,
atBeHitRecoverMPPP = 65,
atNumAtrribute = 200,
atMoveSpeedBase = 201,
atMoveSpeed = 202,
atMoveSpeedPP = 203,
atCurrentHP = 204,
atCurrentHPPP = 206,
atCurrentMP = 207,
atCurrentMPPP = 208,
atCurrentAnger = 215,
atCurrentAngerPP = 216,
atForbitMove = 209,
atForbitSkill = 210,
atCostSkillMPValue = 211,
atInvincible = 212,
atExpPP = 213,
atVisible = 214,
atResitForceMove = 217,
atResitForbitMove = 219,
atResitForbitSkill = 220,
atStun = 221,
atResitStun = 222,
atBlind = 223,
atResitBlind = 224,
atArmorBreak = 225,
atResitArmorBreak = 226,
atNoDamage = 227,
atABSDamage = 228,
atNotABSDamage = 229,
atTotal = 230,
}
public enum KConstDefine
{
cdNoTeamWinID = 255,
cdMaxHeroLevel = 60,
cdRoomPasswordMaxLen = 32,
cdMaxItemBaseAttrCount = 6,
cdLadderRoomCountDownSeconds = 5,
cdMaxEventParamCount = 3,
cdInvalidFelllowshipGroupID = 250,
cdMaxVIPLevel = 10,
cdMaxQuestEventCount = 2,
cdQuestParamCount = 8,
cdMaxAcceptQuestCount = 25,
cdShotcutSize = 3,
cdDefalutBattleTime = 180,
cdMaxUsingHeroCount = 3,
cdDefaultTalkDataLength = 512,
cdMaxLadderTopListMemberCount = 1000,
cdServerPlatformBegin = 10000,
cdTestServerID = 9999,
cdBackgroundRewardItemIdBegin = 100,
cdBackgroundRewardEquipIdBegin = 10000000,
cdLadderTopListCountPerPage = 10,
cdPlayerPageSize = 25,
cdMaxMapEventCout = 4,
cdDefaultGroupID = 1,
}
public enum KGender
{
gNone = 0,
gMale = 1,
gFemale = 2,
}
public enum KChatType
{
trInvalid = 0,
trWhisper = 1,
trTeam = 2,
trHorn = 3,
trSystem = 4,
trWorld = 5,
trClub = 6,
trTeamNotice = 7,
trGlobalSys = 8,
trGmAnnounce = 9,
trTotal = 10,
}
public enum KPlayerEvent
{
peInvalid = 0,
peAcceptQuest = 1,
peNPCDie = 2,
peNpcWaveDie = 3,
peClickNPC = 4,
peTotal = 5,
}
public enum KMissionResultCode
{
qrcInvalid = 0,
qrcSuccess = 1,
qrcFailed = 2,
}
public enum KMissionType
{
qtInvalid = 0,
qtMainMission = 1,
qtSubLineMission = 2,
qtLoopMission = 3,
qtTianxiadashiMission = 4,
qtWantedMission = 5,
qtGuildMission = 6,
qtOfficialMission = 7,
}
public enum KMapType
{
mapInvalid = 0,
mapMainCity = 1,
mapSpaceStation = 2,
mapNearGround = 3,
mapDeepSpace = 4,
mapPVE = 5,
mapCountryWar = 6,
mapAnnihilatePVE = 7,
mapDefencePVE = 8,
mapEscapePVE = 9,
mapTeam = 10,
mutilTeamMap = 11,
mapTotal = 12,
}
public enum KMapPathType
{
KMapPath_Invalid = 0,
KMapPath_Ground = 1,
KMapPath_Space = 2,
}
public enum KNumMoneyType
{
none = 0,
money1 = 1,
money2 = 2,
emotTotal = 3,
}
public enum KGateWayHandShakeCode
{
ghcHandshakeSucceed = 1,
ghcGatewayVersionError = 2,
ghcGameWorldMaintenance = 3,
ghcAccountSystemLost = 4,
ghcGameWorldVersionError = 5,
ghcReconnectError = 6,
ghcCenterTypeError = 7,
}
public enum KCreateRoleRespondCode
{
eCreateRoleSucceed = 1,
eCreateRoleNameAlreadyExist = 2,
eCreateRoleInvalidRoleName = 3,
eCreateRoleNameTooLong = 4,
eCreateRoleNameTooShort = 5,
eCreateRoleUnableToCreate = 6,
}
public enum KDeleteRoleRespondCode
{
eDeleteRoleSucceed = 1,
eDeleteRoleDelay = 2,
eDeleteRoleFreezeRole = 3,
eDeleteRoleUnknownError = 4,
}
public enum KUndoDelRoleRespondCode
{
eUndoDelRoleSucceed = 1,
eUndoDelRoleUnknownError = 2,
}
public enum KGameLoginRespondCode
{
eGameLoginSucceed = 1,
eGameLoginSystemMaintenance = 2,
eGameLoginQueueWait = 3,
eGameLoginOverload = 4,
eGameLoginRoleFreeze = 5,
eGameLoginRoleCenterSwitching = 6,
eGameLoginRoleChangeAccount = 7,
eGameLoginRoleAlreadyDelete = 8,
eGameLoginUnknownError = 9,
}
public enum KMailType
{
mtSystemMail = 1,
mtGlobalMail = 2,
}
public enum KAttackEvent
{
aeNormal = 0,
aeMiss = 1,
aeCrit = 2,
aeBlock = 4,
aeNoDamage = 8,
aeReboundDamage = 16,
}
public enum KSkillTargetType
{
sttNone = 0,
sttObj = 1,
sttPos = 2,
sttSelf = 3,
}
public enum KTriggerStartPos
{
tspNone = 0,
tspObj = 1,
tspPos = 2,
tspSelf = 3,
tspMaster = 4,
}
public enum KEffectArea
{
eaNone = 0,
eaSingle = 1,
eaCirc = 2,
eaFan = 3,
eaLine = 4,
}
public enum KEffectTarget
{
etEnemy = 0,
etFriend = 1,
etMine = 2,
etSelf = 3,
etMonster = 4,
etSameTeam = 5,
etSPPlayer = 6,
etSPMonster = 7,
etSPEliteMonster = 8,
etSPPlotMonster = 9,
etSPBoss = 10,
etSPSpecialMonster = 11,
etSPWorldBoss = 12,
etSPGeneral = 13,
etSPOfflinePlayer = 14,
etSPBuilding = 15,
etSPBiaoChe = 16,
etSPHeroPartyBoss = 17,
etSPCampFlag = 18,
etSPGuard = 19,
etSPProtege = 20,
etSPPlayerOrMonster = 21,
etNeutral = 22,
etFriendLy = 23,
}
public enum KJob
{
jobNone = 0,
JobBlade = 1,
JobLance = 2,
JobHammer = 3,
JobBoxer = 4,
JobTotal = 4,
}
public enum KItemTableType
{
ittInvalid = 0,
ittEquip = 1,
ittOther = 2,
ittResource = 3,
ittWarrior = 4,
ittTotal = 5,
}
public enum KItemQuality
{
iqNone = 0,
iqWhite = 1,
iqGreen = 2,
iqBlue = 3,
iqPurple = 4,
iqGolden = 5,
iqOrange = 6,
iqRed = 7,
iqEnd = 8,
}
public enum KItemBind
{
kbNone = 0,
kbFixBind = 1,
kbFixNotBind = 2,
kbAfterWearBind = 3,
kbAfterTradeBind = 4,
kbEnd = 5,
}
public enum KItemUseSign
{
kuNone = 0,
kuUnuse = kuNone,
kuUse = 1,
kuEnd = 2,
}
public enum KItemDropSign
{
kdNone = 0,
kdNo = kdNone,
kdYes = 1,
kdEnd = 2,
}
public enum KItemSellSign
{
ksNone = 0,
ksNo = ksNone,
ksYes = 1,
ksEnd = 2,
}
public enum KItemBroadcastSign
{
kbsNone = 0,
kbsNo = kbsNone,
kbsYes = 1,
kbsEnd = 2,
}
public enum KHeroType
{
htInvalid = -1,
htPlayer = 0,
htNpc = 1,
htDynamicDecorate = 2,
htMonster = 3,
htStarGate = 4,
htSpaceStation = 5,
htBeEscortedNpc = 6,
htEliteMonster1 = 7,
htEliteMonster2 = 8,
htEliteMonster3 = 9,
htPlotMonster = 10,
htBoss = 11,
htSpecialMonster = 12,
htWorldBoss = 13,
htGeneral = 14,
htOfflinePlayer = 15,
htBuilding = 16,
htPet = 17,
htBiaoChe = 18,
htHeroPartyBoss = 19,
htCampFlag = 20,
htGuard = 21,
htProtege = 22,
htNpcTrrgger = 23,
htBunker = 24,
htBattleFieldChest = 25,
htMonsterChest = 26,
htSceneChest = 27,
htSceneGlobalObj = 28,
htSpellSummonObj = 29,
htReliveNpc = 30,
htMissionTrigger = 31,
htMine = 32,
htMineDrop = 33,
htPreicous = 34,
htDetector = 35,
htLockChest = 36,
htRareChestGuard = 37,
htNormalChest = 38,
htNormalChestGuard = 39,
htDisturbor = 40,
}
public enum KTriggerType
{
kttDefault = 0,
kttBattlefield = 1,
kttDetector = 2,
}
public enum KForceMoveType
{
fmtInvalid = 0,
fmtJump = 1,
fmtRush = 2,
fmtPull = 3,
fmtBack = 4,
fmtKeepLength = 5,
fmtKnockDown = 6,
fmtKnockFly = 7,
}
public enum KForceMoveObj
{
fmoInvalid = 0,
fmoSelf = 1,
fmoOther = 2,
}
public enum KForceMoveDes
{
fmdInvalid = 0,
fmdCaster = 1,
fmdSkillTarget = 2,
fmdSkillPos = 3,
}
public enum KDropType
{
dtInvalid = 0,
dtEquip = 1,
dtItem = 2,
dtMoney = 3,
}
public enum KReliveType
{
rltInvalid = 0,
rltJustHero = 1,
rltMapRule = 2,
}
public enum KStlOpCode
{
stlFind = 0,
stlBegin = 1,
stlNext = 2,
stlErase = 3,
stlRemove = 4,
stlLength = 5,
}
public enum KCollectResult
{
crInvalid = 0,
crSuccess = 1,
crFailed = 2,
}
public enum KSceneState
{
ssInvalid = 0,
ssLoading = 1,
ssCompleteLoading = 2,
ssFailedLoading = 3,
ssWaitingClientLoading = 4,
ssCountDown = 5,
ssFighting = 6,
ssWatingDelete = 7,
ssTotal = 8,
}
public enum KEnterPVEResult
{
epInvalid = 0,
epSuccess = 1,
epFailed = 2,
epNeedDuplicateToken = 3,
}
public enum KModuleType
{
mtInvalid = 0,
mtDefault = 1,
mtEquip = 2,
mtGeneral = 3,
mtHorse = 4,
mtMeridian = 5,
mtShenBing = 6,
mtSkill = 7,
mtBuff = 9,
mtBagAdd = 10,
mtWareHouseAdd = 11,
mtYangMingAdd = 12,
mtYiTongTianXia = 13,
mtGuild = 14,
mtMagicWeapon = 15,
mtMantle = 16,
mtWing = 17,
mtCollectActivity = 18,
mtTitle = 19,
mtAura = 20,
mtZhiZhuan = 21,
mtArmor = 22,
mtDragonSoul = 23,
mtPlough = 24,
mtGem = 25,
mtPrivilege = 26,
mtFashion = 27,
mtGeneralSuit = 28,
mtGuanXian = 29,
mtEnchant = 30,
mtForge = 31,
mtSuitEquip = 32,
mtTotal = 33,
}
public enum KAttributeComputeType
{
actAttackSpeed = 1,
actBashProbability = 2,
}
public enum KRefreshLocationType
{
rltFix = 1,
rltRandom = 2,
rltNearPlayer = 3,
}
public enum KRefreshRuleType
{
rrtCoolDown = 1,
rrtTimePoint = 2,
rrtKillMonsterNum = 3,
}
public enum KTriggerFrom
{
ktfInvalid = 0,
ktfActiveSkill = 1,
ktfPassiveSkill = 2,
ktfBuff = 3,
}
public enum KHitTrigger
{
khtDefault = 0,
khtHitOnce = 1,
khtHitMulti = 2,
}
public enum KGeneralQuality
{
gqGreen = 1,
gqBlue = 2,
gqPurple = 3,
gqOrange = 4,
gqGold = 5,
gqRed = 6,
gqTotal = 7,
}
public enum KFightEvent
{
kfeInvalid = 0,
kfeTriggerTarget = 1,
kfeCastTrigger = 2,
kfeCastTriggerNT = 3,
kfeTimer = 4,
kfeAEMiss = 5,
kfeAECrit = 6,
kfeAEBlock = 8,
kfeHit = 9,
kfeBeHit = 10,
kfeHp = 11,
kfeHpPP = 12,
kfeKill = 13,
kfeBeKill = 14,
kfeComboKill = 15,
}
public enum KMailCount
{
mcPageSize = 9,
}
public enum KLoadProtoBufFromDBResult
{
lpfdrFailed = 0,
lpfdrNotData = 1,
lpfdrSuccess = 2,
}
public enum KPVEType
{
pveInvalid = 0,
pveEquip = 1,
pveResource = 2,
pveQiBao = 3,
pveGeneral = 4,
pveZhenBao = 5,
pveExp = 6,
pveVIP = 7,
pveGuild = 8,
pveTeam = 9,
pveZBTX = 10,
pveTFQX = 11,
}
public enum KBuffDropType
{
bdtBuff = 1,
bdtCall = 2,
}
public enum PlayerReliveType
{
relive_hall = 1,
relive_pos = 2,
insitu = 3,
}
public enum KSpecialCost
{
kscInvalid = 0,
kscSummon = 1,
kscBuff = 2,
}
public enum KCampType
{
kctDefault = 0,
kctPlayer = 1,
kctCampA = 2,
kctCampB = 3,
}
public enum KPkMode
{
kpmDefault = 0,
kpmActive = 1,
kpmPeace = 2,
kpmTeam = 3,
kpmGuild = 4,
kpmGroup = 5,
kpmTotal = 6,
}
public enum KPkModeEx
{
kpeSameTeam = 0,
kpeSameGuild = 1,
kpeSameGroup = 2,
kpeTotal = 3,
}
public enum KTeamMode
{
ktmDefault = 0,
ktmFreeTeam = 1,
ktmGuildTeam = 2,
ktmDuplicateTeam = 3,
}
public enum KAIType
{
katInvalid = 0,
katCommon = 1,
katGeneral = 2,
katMonster = 3,
katTest = 4,
katPVEMonsterAI = 5,
katEscortAI = 6,
katAidSummon = 7,
katBiaoChe = 8,
katFormation = 9,
katTrap = 10,
}
public enum KAICast
{
aicInvalid = 0,
aicBuffOverlapLT = 1,
aicBuffOverlapGT = 2,
}
public enum KResourceRewardIDType
{
rritInvalid = -1,
rritMoney = 0,
rritGold = 1,
rritLijuan = 2,
rritZuoqijinghua = 3,
rritBaoshijinghua = 4,
rritZhenqi = 5,
rritQunYinHui = 6,
rritExp = 7,
rritYueLi = 9,
rritGuildDonation = 10,
rritZhanGong = 11,
rritPrestige = 12,
rritMedal = 13,
rritHighMedal = 14,
rritVipExp = 15,
}
public enum KGATEWAY_ERROR_CODE
{
gecInvalidAccountInTestMode = 0,
gecAccountInfoIsNotExist = 1,
gecPasswdInfoIsNotExist = 2,
gecTokenIsNotMatch = 3,
}
public enum KLimitPlayTimeType
{
lpttNoInfo = 0,
lpttAdult = 1,
lpttTeenager = 2,
}
public enum KKickPlayerType
{
kptByRelogin = 0,
kptByGM = 1,
kptByLimitPlayTime = 2,
}
public enum KCollectObjectType
{
cotMission = 1,
cotNormal = 2,
cotFeudalFightingFlag = 3,
cotCampBattleFlag = 4,
cotFubenBoxFlag = 5,
cotDropBoxFlag = 6,
cotTombstone = 7,
cotGuard = 8,
cotCollectActivityResource = 9,
cotCollectCommitResource = 10,
cotGuildWarFlag = 11,
cotLuoYanCollectBox = 12,
}
public enum KCollectErrorCode
{
cecSuccess = 1,
cecTargetNotExist = 2,
cecOccupiedByOthers = 3,
cecTargetTooFarAway = 4,
cecOthers = 5,
cecTargetNotAGuard = 10,
cecGuardNotInWakeState = 11,
cecCollectActivityLimit = 12,
}
public enum KEnterPositionType
{
eptIvalide = 0,
eptPos = 1,
eptEffect = 2,
eptPosAndEffect = 3,
}
public enum KAnimationType
{
amtNormal = 0,
amtPatrolMove = 1,
amtGroupPatrol = 2,
amtGroupBoss = 3,
amtGroupRamdom = 4,
amtGroupInteractive = 5,
amtBackoffMove = 6,
amtCityPatrol = 7,
}
public enum KMailReturnCodeType
{
mrctSuccess = 0,
mrctNotEnoughFreePackage = 1,
mrctExpired = 2,
mrctNotExisted = 3,
mrctReceived = 4,
mrctReceiving = 5,
}
public enum KMailReceiveStateType
{
mrstNotReceive = 0,
mrstReceiving = 1,
mrstReceived = 2,
}
public enum KBaseExDataKey
{
bekInvalid = 0,
bekBodyAvatarID = 1,
bekWeaponAvatarID = 2,
bekWingID = 3,
bekMantleID = 4,
bekArtifactID = 5,
bekAuraID = 6,
bekArmor = 7,
bekDragonSoul = 8,
bekPlough = 9,
bekMagicWeaponID = 10,
bekCombat = 11,
bekFashion = 12,
bekYellowDiamond = 13,
bekBlueDiamond = 14,
bekVipLevel = 15,
bekTotal = 16,
}
public enum KAIGroupType
{
agtIvalide = 0,
agtBossRange = 1,
agtRandom = 2,
agtInteractive = 3,
agtPatrol = 4,
agtTotal = 5,
}
public enum KItemPoolType
{
iptHpPool = 1,
iptMpPool = 2,
}
public enum KTitleConditionType
{
tctVipLevel = 1,
tctHeroPartyRank = 2,
tctFightRank = 3,
tctOccupyCity = 4,
tctDiamondLevel = 5,
tctGoldCount = 6,
tctCombatValue = 7,
tctPlayerLevel = 8,
tctRechargedGoldCount = 9,
tctReceiveAchievement = 10,
tctLevelRank = 11,
tctGemRank = 12,
tctHorseRank = 13,
tctWingRank = 14,
tctArtifactRank = 15,
tctTalismanRank = 16,
tctMantleRank = 17,
tctAuraRank = 18,
tctAmorRank = 19,
tctDragonSoul = 20,
tctPloughSoul = 21,
tctActiveArtifactCount = 22,
tctActiveTalismanCount = 23,
tctActiveHorseCount = 24,
tctActiveWingCount = 25,
tctFirstRecharge = 26,
tctFriendCount = 27,
tctReceivedFlowerCount = 28,
tctSentFlowerCount = 29,
tctReceiveFlowerRank = 30,
tctSendFlowerRank = 31,
tctGuildFightRank = 32,
tctEquipRank = 33,
tctWuJiangRank = 34,
tctHaveWuShenTeQuan = 35,
}
public enum KTitleOperatorType
{
totGreater = 1,
totGreaterEqual = 2,
totEqual = 3,
totLessEqual = 4,
totLess = 5,
}
public enum KTitleExistType
{
tetForever = 1,
tetConditionLimit = 2,
tetTimeLimit = 3,
}
public enum KTitleUpdateType
{
tutObtain = 1,
tutUpdate = 2,
tutLose = 3,
}
public enum KTitleErrorCodeType
{
tectSuccess = 0,
tectNotObtained = 1,
tectNotExist = 2,
}
public enum KCenterType
{
kctInvalid = 0,
kctGameCenter = 1,
kctZoneServer = 2,
}
public enum KSaveRoleDataTag
{
ksrdtDefault = 0,
ksrdtSwitchGS = 1,
ksrdtSwitchGC = 2,
ksrdtSwitchZS = 3,
}
public enum KItemSource
{
itemSource_Default = 0,
itemSource_XunBao = 1,
ItemSource_PVE = 2,
ItemSource_TeamPve = 3,
ItemSource_ChallengePVE = 4,
itemSource_GuardPVE = 5,
itemSource_XZQJPVE = 6,
itemSource_MoneyPve = 7,
ItemSource_WorldMonsterPVE = 8,
ItemSource_CityPatrol = 9,
ItemSource_TreasureMap = 10,
ItemSource_CompeteFam = 11,
ItemSource_Max = 1000,
ItemSource_Activity_Version_1 = 1001,
ItemSource_Activity_Version_2 = 1002,
ItemSource_Activity_Version_3 = 1003,
ItemSource_Activity_Version_4 = 1004,
ItemSource_Activity_Version_5 = 1005,
ItemSource_Activity_Version_6 = 1006,
ItemSource_Activity_Version_7 = 1007,
ItemSource_Activity_Version_8 = 1008,
ItemSource_Activity_Version_9 = 1009,
ItemSource_Activity_Version_10 = 1010,
}
public enum KPlayerState
{
KState_Idle = 0,
KState_WalkForward = 1,
KState_RunForward = 2,
KState_WalkBack = 3,
KState_RunBack = 4,
KState_Rotate = 5,
KState_Jump = 6,
}
public enum MissionType
{
MissionDialog = 1,
MissionKillMonster = 2,
MissionExplore = 3,
MissionItem = 4,
MissionMadeShip = 5,
MissionAddSkill = 6,
MissionDungeonCompleted = 7,
MissionShipCount = 8,
MissionPlayerLevel = 9,
MissionShipLevel = 10,
MissionWeaponLevel = 11,
MissionModLevel = 12,
MissionModChange = 13,
MissionProduct = 14,
MissionPlayerDanLevel = 15,
MissionWeaponChange = 16,
MissionPower = 17,
MissionTaskDone = 18,
}
public enum KErrorCode
{
errSwitchMapPlayerLimit = 0,
errSwitchMapCountLimit = 1,
errSwitchMapNoOpen = 2,
errConfig = 3,
errJumpMapNoIndex = 20,
errJumpPosInvalid = 21,
errJumpIsJumping = 22,
errWithNoShip = 23,
errPowerAlreadySet = 24,
errPower = 25,
errSendBlackMsg = 26,
errSendNotOnLineMsg = 27,
errSendHasTeamMsg = 28,
errSendTeamInviteLimited = 29,
errSendTeamInvited = 30,
errSendTeamOnLineMsg = 31,
errInviteTeamWithNoShip = 32,
errInvitedTeamWithNoShip = 33,
errTeamNumberMaxLimited = 34,
errTeamOrganizedTimeLimited = 35,
errTeamOrganizedLevelLimited = 36,
errTeamOrganizedMapLimited = 37,
errTeamOrganizedTeamNoticeError = 38,
errTeamOrganizedTeamNoticeTimeError = 39,
errTeamOrganizedTeamAlreadyError = 40,
errTeamOrganizedAlready = 41,
errTeamOrganizedDisAlready = 42,
errTeamOrganizedLimitLeap = 43,
errTeamOrganizedMemberLimitLeap = 44,
errTeamOrganizedForbidInvatedMatching = 45,
errTeamOrganizedForbidInvateMatching = 46,
errTeamOrganizedForbidInvated = 47,
errTeamOrganizedForbidCreateTeam = 48,
errTeamOrganizedNotHadAirShip = 49,
errTeamOrganizedMemberNotHadAirShip = 50,
errTeamPriForLeaderAsMatch = 51,
errTeamInviteInSence = 52,
errPackageNumForLimited = 53,
errPackageAddForMoneyLimited = 54,
errPackageMaxNumForLimited = 55,
errPackageMaxStackForLimited = 56,
errPackageWeaponForDisbind = 57,
errPackageModForDisbind = 58,
errLastShipForDisbind = 59,
errShipTIDForActive = 60,
errMaterialForActive = 61,
errCancleMagazine = 62,
errJumpNotJumping = 63,
errJumpUnVisible = 64,
errHeroIsDead = 65,
errLeapingOrTimeLock = 66,
errHeroNotDead = 67,
errReliveCDLimit = 68,
errReliveWrongMap = 69,
errNoValidRelivePos = 70,
errNotInGroundScene = 71,
}
public enum FightStatus
{
NotFighting = 0,
Fighting = 1,
}
public enum KWeaponType
{
None = 0,
Turret = 1,
Missile = 2,
UAV = 3,
Howitzer = 4,
Laser = 5,
Guard = 6,
Support = 7,
}
public enum KWeaponPos
{
ShipSelf = 0,
Main = 1,
Sub = 2,
Super = 3,
Furnace = 4,
UNKNOWN = 5,
}
public enum KGlobalKey
{
CommonTime1 = 100,
CommonTime2 = 101,
CommonTime3 = 102,
DockShipMaxCount = 1000,
ProductMaxCount = 1001,
FoundryOneMinPirce = 2000,
SharedViewDistance = 2001,
TeamOrganizedTimeLimited = 2002,
MatchMaxDownTime = 3001,
MatchMaxUpTime = 3002,
ExtendMatchingTime = 3003,
MatchTeamMemberCount = 3004,
MatchTeamTimeLimited = 3005,
PackageNumForBegin = 3006,
PackagePosPrice = 3007,
PackagePosPriceAdd = 3008,
PackageMaxPosLimited = 3009,
PackageMaxPosDayTaskLimited = 3010,
HateSysEnterView = 3011,
HateSysDamaged = 3012,
HateSysSwitchTargetCD = 3013,
ReliveCDTime = 3014,
SpacecraftFarClipRange = 4001,
CharacterFarClipRange = 4002,
AddRateForPole = 10000,
AddRateForNegativePole = 10001,
DisRateForPole = 10002,
DisRateForNegativePole = 10003,
DilatationForWarShip = 10004,
DilatationForWeapon = 10005,
DilatationForWarShipNum = 10006,
DilatationForWeaponNum = 10007,
ContainerForWarship = 10008,
ContainerForWeapon = 10009,
PackageNumBeginForShip = 10020,
PackageNumMaxForShip = 10021,
PackagePosPriceForShip = 10022,
PackageNumBeginForWeapon = 10023,
PackageNumMaxForWeapon = 10024,
PackagePosPriceForWeapon = 10025,
PackageNumBeginForMetail = 10026,
PackageNumMaxForMetail = 10027,
PackagePosPriceForMetail = 10028,
PackageNumBeginForBlue = 10029,
PackageNumMaxForBlue = 10030,
PackagePosPriceForBlue = 10031,
PackageNumBeginForMod = 10032,
PackageNumMaxForMod = 10033,
PackagePosPriceForMod = 10034,
MaximumStableProgress = 10035,
MaximumAccuracyProgress = 10036,
MaximumRangeProgress = 10037,
TemporaryGroupID = 200001,
MialMaxPosLimited = 300001,
WorldMissionTimeRate = 600001,
WorldMissionHurtRate = 600002,
TutorialBlewWhenCompleteMissionId = 600003,
TutorialBlewWhenOwnSpacecraftId = 600004,
BehavicNPCSpecialID = 700001,
BehavicEnergyBuffID = 700002,
BehavicNPCSpecialSkillID = 700003,
BehavicPlayerSpecialID = 700004,
BehavicPlayerExtractBuffID = 700005,
BehavicDetectorExtractBuffID = 700006,
}
public enum KGlobalColorKey
{
Quality1 = 1,
Quality2 = 2,
Quality3 = 3,
Quality4 = 4,
Quality5 = 5,
Quality6 = 6,
Quality7 = 7,
Mission1 = 101,
Mission2 = 102,
Mission3 = 103,
SliderBlue = 202,
SliderRed = 203,
SliderGray = 204,
SliderYellow = 205,
GeneralNotice = 301,
ErrorNotice = 302,
TextColor1 = 1001,
TextColor2 = 1002,
TextColor3 = 1003,
TextColor4 = 1004,
ModLevelDisable = 2001,
}
public enum KPowerType
{
NonePower = 0,
RepublicOfEyre = 1,
HolyAreaOfTheVaticanHeim = 2,
HeartAllianceOfHighPlatinum = 3,
}
public enum WeaponMainType
{
HideType = 0,
MainType = 1,
SubType = 2,
SupperType = 3,
Reformer = 4,
}
public enum WeaponTypeD
{
ArtilleryD = 1,
MissileD = 2,
LaserD = 5,
GrenadeD = 4,
UAVD = 3,
GuardD = 6,
SupportD = 7,
}
public enum WeaponSubType
{
Gatlin = 101,
Canon = 102,
TacticsMissile = 201,
Rocket = 202,
Torpedo = 203,
TacticsLaser = 501,
Pulse = 502,
Plasma = 503,
TacticsGrenade = 401,
ArmedUAV = 301,
BurstUAV = 302,
Mine = 303,
}
public enum ClipType
{
BulletClip = 1,
MagazineClip = 2,
HeatClip = 3,
}
public enum CastSpellCode
{
suc = 0,
cding = 1,
singing = 2,
mutiling = 3,
targeter_error = 4,
energy_not_enough = 5,
spell_config_error = 6,
out_range = 7,
caster_die = 8,
targeter_die = 9,
begin_sing = 10,
begin_mulspell = 11,
failed = 12,
spell_not_exist = 13,
not_use_airship = 14,
weapon_value_not_enuough = 15,
cruise_status_not_cast = 16,
}
public enum KMailErrorCode
{
KMailSuccess = 0,
KMailWrongGroupType = 1,
KMailGroupAlreadyIn = 3,
KMailCardNotExist = 4,
KMailPageNotExist = 5,
KMailMailGroupNotExist = 7,
KMailMailCardNotInGroup = 8,
KMailNotExist = 10,
KMailItemTokenError = 11,
KMailItemGot = 12,
KMailItemExpireData = 13,
KMailWrongMailType = 14,
KMailRecevierNotExist = 15,
KMailDeleteErrorImportant = 16,
KMailDeleteErrorAccessory = 17,
KMailPlayerBagNotEnough = 1001,
}
public enum BuffEffectType
{
RecoveHPRate = 1,
AddSpellAttr = 2,
RecoverShieldRate = 3,
MinusSpellCost = 4,
Dot = 5,
AddAttribute = 6,
Invisible = 7,
CastSkill = 9,
RecoverPowerRate = 10,
CounterattackInjury = 11,
LinkDamage = 12,
AddTrigger = 13,
LinkStatus = 14,
ChangeSkillItem = 15,
}
public enum GroupRuleId
{
Mutually = 1,
Stacking = 2,
LastTrigger = 3,
Paralleling = 4,
}
public enum AbnormalState
{
NoneAbnormal = 0,
Decelera = 1,
Burning = 2,
Imprison = 3,
Silence = 4,
Dizz = 5,
}
public enum PassiveEffectType
{
AddBuf = 1,
MinusSpellCd = 2,
AddSpellHeat = 3,
AddBufHeat = 4,
ImmunoBuf = 5,
AddBufTime = 6,
ChangeBufEffect = 7,
}
public enum WildNPCFightState
{
Finding = 1,
FollowUp = 2,
Attacking = 3,
Returning = 4,
}
public enum NpcTriggerState
{
Firststate = 10000,
Secondstate = 20000,
Thirdstate = 30000,
}
public enum NpcTriggerCondition
{
DoNothing = 0,
AcceptBehaviacThree = 1,
EnterTriggerView = 2,
SpecialNpcDie = 3,
NoEmerny = 4,
PlayerEnter = 5,
PlayerLeave = 6,
PlayerEnterPreicousSignal = 7,
PlayerEnterPreicous = 8,
PlayerEnterRedBuff = 9,
PlayerEnterBlueBuff = 10,
MissionConvoyNpcEnter = 11,
MissionRangeOutNpc = 12,
NpcTriggerConditionMax = 13,
}
public enum NpcTriggerEvent
{
FreshNpcList = 100,
ResetNpcList = 200,
SendNpcToScene = 300,
BeginFight = 400,
ChangeState = 500,
ExecuteState = 600,
ExecuteBuff = 700,
FinishMission = 800,
OutSunmmRange = 900,
ClearMineDrop = 1000,
PlayerDiscoverSignal = 1100,
PlayerDiscoverPreicous = 1200,
}
public enum NpcDieType
{
NormalDie = 1,
DieNature = 2,
LiveTimeEnd = 3,
}
public enum DetectPlayMethodValue
{
ExtractDis = 1500,
EnergyCurValue = 20,
InitEnergyValue = 20,
EnergyMaxValue = 100,
TriggerMaxTime = 100,
RandomMoveMin = 700,
RandomMoveMax = 1000,
RandomMoveStopTIme = 2000,
MinDisFromEnery = 2000,
ForwardStopTime = 2000,
RandomForwardMin = 3000,
RandomForwardMax = 4000,
DistanceFromEnemy = 1000,
RandomXZPro = 30,
RandomXZForwardTime = 1500,
RandomXZRestTime = 3000,
}
public enum BattleStatus
{
BATTLE_DiSAPPEAR = 0,
BATTLE_BEGIN = 1,
BATTLE_PRETIME = 2,
BATTLE_ACTIVE = 3,
BATTLE_END_CD = 4,
}
public enum CampRelation
{
Enemy = 0,
Neutrality = 1,
Friend = 2,
Undefined = 3,
}
public enum MissionGenre
{
MissionGenreUndefined = 0,
MainMission = 1,
SideMission = 2,
DailyMission = 3,
RaidMission = 4,
WorldMission = 5,
}
public enum MissionState
{
CanAccept = 1,
Processing = 2,
Complete = 3,
}
public enum GuidStepNum
{
ShipTid = 1,
SenceTid = 2,
BirthPos = 3,
BirthDir = 4,
BirthTaskTid = 5,
BirthMailTid = 6,
BirthAreaId = 7,
}
public enum ChestType
{
BattleFieldChest = 1,
LootChest = 2,
MapNpcChest = 3,
}
public enum ChestResultErrorCode
{
ChestResultSuccess = 0,
ChestResultUnKnownError = 1,
ChestNotExist = 2,
}
public enum WorldEventState
{
WorldEventPrepare = 0,
WorldEventActive = 1,
WorldEventTriggerTime = 2,
WorldEventCD = 3,
}
public enum ForceActionType
{
ActionTypeToIdle = 0,
ActionTypeTurnToTarget = 1,
ActionTypeStopRotate = 2,
ActionTypeStopMove = 3,
ActionTypeMoveToTarget = 4,
ActionTypeSmoothMoveToTarget = 5,
}
public enum ItemOperateType
{
IOTAddItem = 0,
IOTDestoryItem = 1,
IOTConsumeItem = 2,
IOTMoveItem = 3,
IOTIncreaseCapcity = 4,
IOTSplitItem = 5,
IOTSkillChanged = 6,
}
public enum ItemOperateErrorCode
{
IOECSuccess = 0,
IOECUnkownError = 1,
IOECNotExistThisItem = 2,
IOECInvalidPosition = 3,
IOECInvalidItemType = 4,
IOECInvalidStorage = 5,
IOECNotEnoughItems = 6,
IOECContainerAddItemNotEnoughSpace = 7,
IOECContainerIncreaseCapacityOverMax = 8,
IOECNotMatchThisContainer = 9,
IOECContainerNotExist = 10,
IOECContainerMergeDestStackOver = 11,
IOECMoveItemInvalidSrc = 12,
IOECMoveItemInvalidDest = 13,
IOECMoveItemButLock = 14,
IOECPickUpItemError = 15,
IOECMergeRemoveItemError = 16,
IOECSplitStackCountError = 17,
IOECSplitRemoveItemError = 18,
IOECInertItemPosItemNotMatch = 19,
IOECMergeContainerSourceEmpty = 20,
IOECMergeContainerDestinationFull = 21,
IOECNotNewItem = 22,
IOECInsertRuleFailed = 23,
IOECMergeNotSameType = 24,
}
public enum ItemProcessType
{
IPTAddItem = 0,
IPTDeleteItem = 1,
IPTStackChange = 2,
IPTPositionChange = 3,
IPTCapacityChange = 4,
IPTSizeChange = 5,
}
public enum MailParamType
{
MPTTitle = 0,
MPTContent = 1,
MPTSender = 2,
}
public enum MailParamTargetType
{
MPTString = 0,
MPTTTask = 1,
}
public enum ItemDisplayLogErrorCode
{
IDLECSuccess = 0,
IDLECUnknown = 1,
}
public enum ClientResetType
{
ResetSelf = 0,
ResetAll = 1,
}
public enum AIPlotState
{
Idle = 0,
Invaded = 1,
LostPlayer = 2,
MonsterRetreat = 3,
MonsterRetreatFail = 4,
BeginCallingBoss = 5,
CallingBossSuccess = 6,
CallingBossFail = 7,
BeginBossTimeout = 8,
BossTimeout = 9,
DefeatBoss = 10,
PlayerOutOfScene = 11,
Invaded2 = 12,
CloseInvaded2 = 13,
}
public enum SoundID
{
LoadUp = 1002,
LoadDown = 1003,
LoadEnd = 1004,
CombatWranOpen = 1008,
CombatWranEnd = 1009,
CombatOpen = 1010,
CombatEnd = 1011,
AIAreaWran = 1012,
AIAreaCombat = 1013,
AIAreaMonsterRetreat = 1014,
AIAreaCallingBossSuccess = 1015,
AIAreaBeginBossTimeout = 1016,
AIAreaDefeatBoss = 1017,
AIAreaEnd = 1018,
AIAreaEvent = 1019,
}
public enum PlayerDiscoverPreciousType
{
DiscoverSignal = 0,
DiscoverPrecious = 1,
}
public enum SceneState
{
SSNone = 0,
}
public enum TreasureSpawnType
{
TstNormalChest = 1,
TstLockChest = 2,
TstNormalMonster = 3,
TstRareMonster = 4,
}
}
|
@model ShoppingCart.ViewModels.BookViewModel
@{
ViewBag.Title = Model.Title;
}
<h1>@Model.Title</h1>
<div id="bookDetails" class="row">
<div class="col-md-5">
<img src="@Model.ImageUrl" alt="@Model.Title" title="@Model.Title" class="img-rounded" />
</div>
<div class="col-md-2 col-md-offset-1">
<h3>@Model.Author.FullName</h3>
<p>Your Price: $@Model.SalePrice</p>
<p>List Price: <span style="text-decoration: line-through">$@Model.ListPrice</span></p>
<p class="label label-success">Save @Model.SavePercentage %</p>
<p>@Model.Description</p>
</div>
<div class="col-md-2 col-md-offset-2 bg-info">
<upsert-cart-item params="cartItem: cartItem, showButton: true"></upsert-cart-item>
</div>
</div>
@Html.Partial("_CartItemForm")
@section Scripts {
@Scripts.Render("~/Scripts/ViewModels/BookDetailViewModel.js",
"~/Scripts/ViewModels/CartItemViewModel.js")
<script>
var model = @Html.HtmlConvertToJson(Model);
var bookDetailViewModel = new BookDetailViewModel(model);
ko.applyBindings(bookDetailViewModel, document.getElementById("bookDetails"));
</script>
} |
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace AntDesign
{
public class ModalService
{
internal event Func<ConfirmOptions, Task> OnOpenConfirm;
internal event Func<ConfirmOptions, Task> OnUpdate;
internal event Func<ConfirmOptions, Task> OnDestroy;
internal event Func<Task> OnDestroyAll;
public Task Confirm(ConfirmOptions props)
{
return OnOpenConfirm?.Invoke(props);
}
public Task Info(ConfirmOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
options.Icon = (builder) =>
{
builder.OpenComponent<Icon>(0);
builder.AddAttribute(1, "Type", "info-circle");
builder.AddAttribute(2, "Theme", "outline");
builder.CloseComponent();
};
options.OkCancel = false;
options.OkText = "OK";
options.ConfirmType = "info";
return Confirm(options);
}
public Task Success(ConfirmOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
options.Icon = (builder) =>
{
builder.OpenComponent<Icon>(0);
builder.AddAttribute(1, "Type", "check-circle");
builder.AddAttribute(2, "Theme", "outline");
builder.CloseComponent();
};
options.OkCancel = false;
options.OkText = "OK";
options.ConfirmType = "success";
return Confirm(options);
}
public Task Error(ConfirmOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
options.Icon = (builder) =>
{
builder.OpenComponent<Icon>(0);
builder.AddAttribute(1, "Type", "close-circle");
builder.AddAttribute(2, "Theme", "outline");
builder.CloseComponent();
};
options.OkCancel = false;
options.OkText = "OK";
options.ConfirmType = "error";
return Confirm(options);
}
public Task Warning(ConfirmOptions options)
{
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
options.Icon = (builder) =>
{
builder.OpenComponent<Icon>(0);
builder.AddAttribute(1, "Type", "exclamation-circle");
builder.AddAttribute(2, "Theme", "outline");
builder.CloseComponent();
};
options.OkCancel = false;
options.OkText = "OK";
options.ConfirmType = "warning";
return Confirm(options);
}
public Task Update(ConfirmOptions options)
{
return OnUpdate?.Invoke(options);
}
public Task Destroy(ConfirmOptions options)
{
return OnDestroy?.Invoke(options);
}
public Task DestroyAll()
{
return OnDestroyAll?.Invoke();
}
}
}
|
namespace VideoDedup.DnsTextBox
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Windows.Forms;
using VideoDedupShared.ISynchronizeInvokeExtensions;
public class DnsTextBoxCtrl : TextBox
{
private static string ValidCharacters =>
".-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static readonly int MinimumLength = 3;
// Complete domain name must not be longer than 253 chars
private static readonly int MaximumLength = 253;
//public int MyProperty { get; set; }
private new Color? DefaultForeColor { get; set; }
[Browsable(true)]
[DefaultValue(typeof(Color), "Red")]
[Category("Appearance")]
[Description("Sets the color that inidicates that the name " +
"or address could not be resolved")]
public Color ErrorForeColor { get; set; } = Color.Red;
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
[Browsable(false)]
public IEnumerable<IPAddress> IpAddresses { get; set; }
[Browsable(false)]
public bool Resolving { get; set; } = false;
[Browsable(false)]
public bool ResolvedSuccessfully { get; set; } = false;
public event EventHandler<ResolveStartedEventArgs> ResolveStarted;
protected virtual void OnResolveStarted(string dnsName) =>
ResolveStarted?.Invoke(this, new ResolveStartedEventArgs
{
DnsName = dnsName
});
public event EventHandler<ResolveSuccessfulEventArgs> ResolveSuccessful;
protected virtual void OnResolveSuccessful(
string dnsName,
IEnumerable<IPAddress> ipAddresses) =>
ResolveSuccessful?.Invoke(this, new ResolveSuccessfulEventArgs
{
DnsName = dnsName,
IpAddress = ipAddresses,
});
public event EventHandler<ResolveFailedEventArgs> ResolveFailed;
protected virtual void OnResolveFailed(string dnsName) =>
ResolveFailed?.Invoke(this, new ResolveFailedEventArgs
{
DnsName = dnsName
});
public DnsTextBoxCtrl() { }
protected override void OnTextChanged(EventArgs e)
{
Resolving = false;
ResolvedSuccessfully = false;
base.OnTextChanged(e);
if (DesignMode)
{
return;
}
if (!DefaultForeColor.HasValue)
{
DefaultForeColor = ForeColor;
}
ForeColor = DefaultForeColor.Value;
if (Text.Length < MinimumLength || !IsDnsNameValid(Text))
{
OnResolveFailed(Text);
ForeColor = ErrorForeColor;
return;
}
Resolving = true;
OnResolveStarted(Text);
try
{
_ = Dns.BeginGetHostAddresses(
Text,
ar => this.InvokeIfRequired(() => GetHostAddressesCallback(ar)),
Text);
}
catch
{
Resolving = false;
}
}
private void GetHostAddressesCallback(IAsyncResult ar)
{
// Make sure the request was still relevant
if ((ar.AsyncState as string) != Text)
{
try
{
_ = Dns.EndGetHostAddresses(ar);
}
catch { }
return;
}
Resolving = false;
IpAddresses = null;
try
{
IpAddresses = Dns.EndGetHostAddresses(ar).Where(a =>
a.AddressFamily == AddressFamily.InterNetwork
|| a.AddressFamily == AddressFamily.InterNetworkV6);
}
catch (SocketException) { }
if (IpAddresses == null || !IpAddresses.Any())
{
OnResolveFailed(Text);
ForeColor = ErrorForeColor;
return;
}
ResolvedSuccessfully = true;
OnResolveSuccessful(Text, IpAddresses);
}
public static bool IsDnsNameValid(string dnsName)
{
if (dnsName.Length > MaximumLength)
{
return false;
}
if (dnsName.Any(c => !ValidCharacters.Contains(c)))
{
return false;
}
if (dnsName.First() == '-' || dnsName.Last() == '-')
{
return false;
}
return true;
}
}
}
|
using System.Windows;
namespace OrienteeringToolWPF.Interfaces
{
interface IButtonsManageable
{
void SetButtonsVisibility(Visibility all);
void SetButtonsVisibility(Visibility add, Visibility edit, Visibility delete);
}
}
|
using ESauce.Model;
using System.Threading.Tasks;
namespace ESauce.Core
{
public interface IEventHandler<TPayload, TAggregate> where TAggregate : AggregateBase
{
Task<TAggregate?> Handle(ESauceEvent evt, TPayload payload, TAggregate? prevState);
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace Nibbler.Utils
{
public interface ILogger
{
bool DebugEnabled { get; }
bool WarningEnabled { get; }
bool TraceEnabled { get; }
void SetDebugEnable(bool enabled);
void SetWarningEnable(bool enabled);
void SetTraceEnable(bool enabled);
void LogDebug(Exception ex, string message);
void LogDebug(string message);
void LogWarning(string message);
void LogTrace(string message);
}
}
|
using System;
namespace LitecartWebTests
{
public class ZoneData : IEquatable<ZoneData>, IComparable<ZoneData>
{
public string ZoneName { get; set; }
public ZoneData(string zoneName)
{
ZoneName = zoneName;
}
public bool Equals(ZoneData other)
{
if (ReferenceEquals(other, null))
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
return ZoneName == other.ZoneName;
}
public override string ToString()
{
return $"{ZoneName}\n";
}
public int CompareTo(ZoneData other)
{
if (ReferenceEquals(other, null))
{
return 1;
}
return ZoneName.CompareTo(other.ZoneName);
}
}
}
|
using DwxSpeaker.Interfaces;
using DwxSpeaker.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Xamarin.Forms;
namespace DwxSpeaker.ViewModels
{
public class SpeakerListViewModel : ViewModelBase
{
public SpeakerListViewModel()
{
Speakers = new ObservableCollection<Speaker>(DataProvider.Speakers);
SpeakerClickedCommand = new Command<Speaker>((s) => {
DependencyService.Get<INavigationService>().Navigate(Interfaces.Page.SpeakerDetailPage);
MessagingCenter.Send(this, "speaker", s);
});
}
private ObservableCollection<Speaker> _speakers;
public ObservableCollection<Speaker> Speakers
{
get { return _speakers; }
set { SetProperty(ref _speakers, value); }
}
private ICommand _speakerClickedCommand;
public ICommand SpeakerClickedCommand
{
get { return _speakerClickedCommand; }
set { SetProperty(ref _speakerClickedCommand, value); }
}
}
}
|
using FluentAssertions.Primitives;
namespace Test.OutlookMatters.Core.TestUtils
{
public class XmlAssertions
{
public string NamespaceKey { get; private set; }
public string NamespaceUri { get; private set; }
public string Subject { get; private set; }
public XmlAssertions(StringAssertions stringAssertions, string namespaceKey, string namespaceUri)
{
NamespaceKey = namespaceKey;
NamespaceUri = namespaceUri;
Subject = stringAssertions.Subject;
}
}
} |
using System;
using System.Windows.Forms;
using System.Diagnostics;
using Standardization;
using Fairweather.Service;
namespace Common.Controls
{
public class Amount_Label : Label, IAmountControl
{
public Amount_Label() {
ctrler = new Amount_Control_Controller(this);
this.Flat_Style(false);
this.Padding = new Padding(0, 2, 2, 0);
}
// C:\Users\Fairweather\Desktop\ctrler.pl
readonly Amount_Control_Controller ctrler; //
public Control Control { get { return this; } }
public int Decimal_Places { get { return ctrler.DecimalPlaces; } set { ctrler.DecimalPlaces = value; } }
public string Default_Text { get { return ctrler.Default_Text; } }
public string Default_Format { get { return ctrler.Default_Format; } set { ctrler.Default_Format = value; } }
public decimal Value { get { return ctrler.GetValue(); } set { ctrler.SetValue(value); } }
}
}
|
using SVGEssentials.Chapters;
using SVGEssentials.Models.Chapters;
using SVGEssentials.Models.Examples;
using System.Collections.Generic;
namespace SVGEssentials.Models
{
public class Book
{
public string Title { get; set; }
public Dictionary<string, IChapter> Chapters { get; set; }
#region "Constructors"
public Book()
{
//Set up the Chapters storage
Chapters = new Dictionary<string, IChapter>();
Title = "SVG Essentials";
//Add the chapters
Chapters.Add("chapter-1", new Chpt1Examples());
Chapters.Add("chapter-3", new Chpt3Examples());
}
#endregion
#region "Chapters"
public IChapter GetChapter(string chapterRef)
{
//Set up default return value
IChapter chapter = new NullChapter();
if(Chapters.ContainsKey(chapterRef))
{
chapter = Chapters[chapterRef];
}
return chapter;
}
#endregion
#region "Examples"
public IExample GetExample(string chapterRef, string exampleRef)
{
IExample example = new NullExample();
IChapter chapter = GetChapter(chapterRef);
example = chapter.GetExample(exampleRef);
return example;
}
#endregion
}
} |
// Copyright (c) Rodrigo Speller. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE.txt in the project root for license information.
using System.Globalization;
using System.IO;
namespace TSqlCoverage.XEvents.Internal
{
public sealed class XEventUInt64Value : XEventValue<ulong>
{
internal XEventUInt64Value(ulong value)
: base(value)
{ }
public override void WriteTo(TextWriter writer)
{
var value = this.Value.ToString(CultureInfo.InvariantCulture);
writer.Write(value);
}
public static implicit operator XEventUInt64Value(ulong value)
=> new XEventUInt64Value(value);
}
}
|
using System;
using System.Net.Http;
using Voltmeter.Ports.Providers;
namespace Voltmeter.Adapter.SimpleServiceStatus.Ports.Providers
{
internal class ServiceStatusProvider : IServiceStatusProvider
{
private readonly HttpClient _httpClient;
public ServiceStatusProvider(HttpClient httpClient)
{
_httpClient = httpClient;
}
public ServiceStatus ProvideFor(Service service)
{
if (service == null)
{
throw new ArgumentNullException();
}
var canaryEndpoint = new Uri(service.Location, "/service/healthcheck/asg");
try
{
var response = _httpClient
.GetAsync(canaryEndpoint)
.GetAwaiter()
.GetResult();
if (response.IsSuccessStatusCode)
{
return ServiceStatus.HealthyFrom(service);
}
return ServiceStatus.UnhealthyFrom(service);
}
catch (Exception)
{
return ServiceStatus.UnhealthyFrom(service);
}
}
}
} |
using System.Collections.Generic;
using MarioMendonca.SpeechPlanning.Application.DTO.DTO;
using MarioMendonca.SpeechPlanning.Domain.Models;
namespace MarioMendonca.SpeechPlanning.Infrastructure.CrossCutting.Adapter.Interfaces
{
public interface IMapperProgramacao
{
#region Mappers
Programacao MapperToEntity(ProgramacaoDTO programacaoDto);
IEnumerable<ProgramacaoDTO> MapperListProgramacoes(IEnumerable<Programacao> programacoes);
ProgramacaoDTO MapperToDTO(Programacao programacao);
#endregion
}
} |
using System.Text.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Text;
namespace KyivSmartCityApi.Models
{
public class HourlyParkingFeed
{
[JsonPropertyName("feed")]
public HourlyParkingFeedData Feed { get; set; }
}
} |
using SMProject.Utils;
namespace SMProject
{
public enum SignalType
{
[DataFrameRepresentation("t")] Triangle,
[DataFrameRepresentation("z")] Trapezoidal,
[DataFrameRepresentation("p")] SawSignal
}
} |
using System.Collections.Generic;
namespace Ujc.Ovj.ChangeEngine.Objects
{
interface ISpellchecking
{
/// <summary>
/// Status of the spellchecked word.
/// </summary>
SpellcheckStatus Status { get; set; }
/// <summary>
/// Suggestions of the spellchecker in the cas the word is misspelled.
/// </summary>
List<string> Suggestions { get; set; }
}
}
|
using System;
namespace Discord
{
public sealed class TimeoutException : OperationCanceledException
{
internal TimeoutException()
: base("An operation has timed out.")
{
}
}
}
|
@model Piranha.Models.Post
@{
Layout = "";
List<Piranha.Entities.Post> posts = null;
var t = Model.TemplateId;
using (var db = new Piranha.DataContext())
{
posts = db.Posts.Where(x => x.TemplateId == t).OrderByDescending(p => p.Published).ToList();
}
}
<link href="~/Content/Css/out.css" rel="stylesheet" />
@if (posts.Count > 0)
{
<div class="popularposts ">
<ul>
@foreach (var f in posts) {
<li>
<a title="@f.Title" href="@UI.Permalink(f.PermalinkId)">
@foreach (var att in f.Attachments)
{
@UI.Thumbnail(att, 72);
}
</a>
<a title="@f.Title" href="@UI.Permalink(f.PermalinkId)">@f.Title</a>
</li>
<div class="clear"></div>
}
</ul>
</div>
}
else
{
<p>Hiện chưa có bài viết nào</p>
} |
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using TinyBrowser.Api;
namespace TinyBrowser{
internal class Program{
//TODO: If I have time: refactor and code cleanup.
const string Host = "acme.com";
const int Port = 80;
static IWebsiteBrowser websiteBrowser;
static void Main(string[] args){
websiteBrowser = TryGetBrowser();
if (!websiteBrowser.CanReceiveWebPage(Host, "", Port)){
Console.WriteLine("Shutting down!");
}
var continueFlag = true;
do{
Console.Clear();
Console.WriteLine(websiteBrowser.GetCurrentWebPageUri);
var uriPages = websiteBrowser.GetCurrentWebPage();
var optionsMenu = new[]{
"Options: ", $"1. Go to link({websiteBrowser.WebPageHtmlCount})",
$"2. Go to sub-page({uriPages.Length})", "3. Go forward", "4. Go back",
"5. Search history", "6. Exit"
};
var input = NavigationOptions(optionsMenu);
Console.Clear();
if (input == 6){
break;
}
Run(input, uriPages);
} while (continueFlag);
Console.Clear();
Console.WriteLine("Shutting down!");
}
static void Run(int input, IReadOnlyList<string> uriPages){
switch (input){
case 1:
SelectHyperLink();
break;
case 2:
SelectSubPage(uriPages);
break;
case 3:
if (!websiteBrowser.TryGoForward()){
Console.WriteLine("Can't go forward!");
}
break;
case 4:
if (!websiteBrowser.TryGoBack()){
Console.WriteLine("Can't go back!");
}
break;
case 5:
websiteBrowser.GetSearchHistory();
Console.WriteLine("Press enter to continue!");
Console.ReadKey(true);
Console.Clear();
break;
}
}
static void SelectHyperLink(){
if (websiteBrowser.WebPageHtmlCount == 0){
Console.WriteLine("No html-links available");
return;
}
websiteBrowser.DisplayHyperLinks();
Console.WriteLine($"Select hyperlink between 0 and {websiteBrowser.WebPageHtmlCount - 1}");
var indexInput = GetInput(0, websiteBrowser.WebPageHtmlCount - 1);
websiteBrowser.TryGoToHtmlIndex(indexInput, Port);
Console.Clear();
}
static void SelectSubPage(IReadOnlyList<string> uriPages){
if (uriPages.Count == 0){
Console.WriteLine("No sub-pages available");
return;
}
websiteBrowser.DisplaySubPages();
Console.WriteLine($"Select sub-page between 0 and {uriPages.Count - 1}");
var linkOption2 = GetInput(0, uriPages.Count - 1);
websiteBrowser.TrGoToSubPage(uriPages[linkOption2]);
Console.Clear();
}
static IWebsiteBrowser TryGetBrowser(){
while (true){
try{
Console.WriteLine("Tiny browser:\nOptions: 1. TcpClient, 2. Local, 3. HttpWebRequest");
var input = GetInput(1, BrowserInitializer.Options);
Console.Clear();
return BrowserInitializer.GetBrowser(input);
}
catch (Exception e){
Console.WriteLine(e.GetBaseException().Message);
}
}
}
static int GetInput(int startIndex, int maxLenght){
var result = -1;
while (true){
if (int.TryParse(Console.ReadLine(), NumberStyles.Integer, null, out result) &&
result == Math.Clamp(result, startIndex, maxLenght)){
return result;
}
Console.WriteLine($"Number needs to be between: {startIndex} and {maxLenght}");
}
}
static int NavigationOptions(IReadOnlyCollection<string> options){
var temp = options.Aggregate("", (current, option) => current + $"{option}\n");
Console.WriteLine(temp);
var inputValue = GetInput(1, options.Count - 1);
Console.Clear();
return inputValue;
}
}
} |
using System.Collections.Generic;
namespace ChronoPlurk.ViewModels.Core
{
public interface IPlurkHolder
{
IEnumerable<long> PlurkIds { get; }
void Favorite(long plurkId);
void Unfavorite(long plurkId);
void Mute(long plurkId);
void Unmute(long plurkId);
void SetAsRead(long plurkId);
void Replurk(long plurkId);
void Unreplurk(long plurkId);
}
}
|
/* This class turns a WallGrid, which is a grid of 0s and 1s, into vertices and triangles for a Mesh.
* It does this using the Marching Squares algorithm. A square in this context refers to four points in the grid
* in the arrangement (x,y),(x+1,y),(x,y+1),(x+1,y+1). The algorithm iterates over all such squares, and builds triangles
* based on which of the four corners are walls (giving rise to 16 configurations). The vertices of the triangles are taken
* from the four corners of the square plus the four midpoints of the square.
*/
using UnityEngine;
using UnityEngine.Assertions;
using System.Collections.Generic;
using System.Linq;
namespace AKSaigyouji.MeshGeneration
{
/// <summary>
/// Triangulates a Map according to the Marching Squares algorithm, yielding vertices and triangles ready to be
/// used in a mesh.
/// </summary>
public sealed class MapTriangulator
{
const int PER_SQUARE_CACHE_SIZE = 5;
readonly bool[] isOnLeftSide = new bool[] { true, false, false, false, false, false, true, true };
readonly bool[] isOnBottom = new bool[] { false, false, false, false, true, true, true, false };
readonly sbyte[] bottomOffset = new sbyte[] { -1, -1, -1, -1, 2, 1, 0, -1 };
readonly sbyte[] leftOffset = new sbyte[] { 2, -1, -1, -1, -1, -1, 4, 3 };
public MeshData Triangulate(WallGrid wallGrid)
{
byte[,] configurations = MarchingSquares.ComputeConfigurations(wallGrid);
byte[][] configurationTable = MarchingSquares.BuildConfigurationTable();
var localVertices = new List<LocalPosition>();
var triangles = new List<int>();
// Stores vertex indices for a single square at a time.
var vertexIndices = new ushort[MarchingSquares.MAX_VERTICES_IN_TRIANGULATION];
var currentRow = new ushort[PER_SQUARE_CACHE_SIZE, wallGrid.Length];
var previousRow = new ushort[PER_SQUARE_CACHE_SIZE, wallGrid.Length];
int width = configurations.GetLength(1);
int length = configurations.GetLength(0);
for (byte y = 0; y < width; y++)
{
for (byte x = 0; x < length; x++)
{
int config = configurations[x, y];
byte[] points = configurationTable[config];
for (int i = 0; i < points.Length; i++)
{
byte point = points[i];
ushort vertexIndex;
if (isOnBottom[point] && y > 0) // is vertex cached below
{
vertexIndex = previousRow[bottomOffset[point], x];
}
else if (isOnLeftSide[point] && x > 0) // is vertex cached to the left
{
vertexIndex = currentRow[leftOffset[point], x - 1];
}
else // new vertex
{
vertexIndex = (ushort)localVertices.Count;
localVertices.Add(new LocalPosition(x, y, point));
}
if (point < PER_SQUARE_CACHE_SIZE) // cache vertex if top left, top, top right, right or bot right
{
currentRow[point, x] = vertexIndex;
}
vertexIndices[i] = vertexIndex;
}
int numTrianglesToBuild = points.Length - 2;
for (int i = 0; i < numTrianglesToBuild; i++)
{
triangles.Add(vertexIndices[0]);
triangles.Add(vertexIndices[i + 1]);
triangles.Add(vertexIndices[i + 2]);
}
}
SwapRows(ref currentRow, ref previousRow);
}
MeshData mesh = new MeshData();
mesh.vertices = localVertices.Select(v => v.ToGlobalPosition(wallGrid.Scale, wallGrid.Position)).ToArray();
mesh.triangles = triangles.ToArray();
return mesh;
}
static void SwapRows(ref ushort[,] currentRow, ref ushort[,] previousRow)
{
var temp = currentRow;
currentRow = previousRow;
previousRow = temp;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using LifeManager.Models;
namespace LifeManager.ListsService.Services
{
public interface IListService
{
Task CreateList(ListModel model);
Task UpdateList(ListModel model);
Task DeleteList(Guid id, string userId);
Task<IEnumerable<ListModel>> GetList(ListModel model);
Task<IEnumerable<ListModel>> GetAllLists(string userId);
}
}
|
// 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.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using OpenQA.Selenium;
using Xunit;
using Xunit.Abstractions;
namespace Microsoft.AspNetCore.E2ETesting
{
[CaptureSeleniumLogs]
public class BrowserTestBase : IClassFixture<BrowserFixture>, IAsyncLifetime
{
private static readonly AsyncLocal<IWebDriver> _asyncBrowser = new AsyncLocal<IWebDriver>();
private static readonly AsyncLocal<ILogs> _logs = new AsyncLocal<ILogs>();
private static readonly AsyncLocal<ITestOutputHelper> _output =
new AsyncLocal<ITestOutputHelper>();
private ExceptionDispatchInfo _exceptionDispatchInfo;
private IWebDriver _browser;
public BrowserTestBase(BrowserFixture browserFixture, ITestOutputHelper output)
{
BrowserFixture = browserFixture;
_output.Value = output;
}
public IWebDriver Browser
{
get
{
if (_exceptionDispatchInfo != null)
{
_exceptionDispatchInfo.Throw();
throw _exceptionDispatchInfo.SourceException;
}
return _browser;
}
set { _browser = value; }
}
public static IWebDriver BrowserAccessor => _asyncBrowser.Value;
public static ILogs Logs => _logs.Value;
public static ITestOutputHelper Output => _output.Value;
public BrowserFixture BrowserFixture { get; }
public Task DisposeAsync()
{
return Task.CompletedTask;
}
public virtual Task InitializeAsync()
{
return InitializeAsync("");
}
public virtual async Task InitializeAsync(string isolationContext)
{
await InitializeBrowser(isolationContext);
InitializeAsyncCore();
}
protected virtual void InitializeAsyncCore() { }
protected async Task InitializeBrowser(string isolationContext)
{
try
{
var (browser, logs) = await BrowserFixture.GetOrCreateBrowserAsync(
Output,
isolationContext
);
_asyncBrowser.Value = browser;
_logs.Value = logs;
Browser = browser;
}
catch (Exception ex)
{
_exceptionDispatchInfo = ExceptionDispatchInfo.Capture(ex);
throw;
}
}
}
}
|
#region using
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using NetAppCommon;
using Newtonsoft.Json;
#endregion
namespace ApiWykazuPodatnikowVatData.Models
{
#region public class EntityAccountNumber
/// <summary>
/// Model danych numery rachunków bankowych podmiotu jako EntityAccountNumber
/// Data model Entity's bank account numbers as EntityAccountNumber
/// </summary>
[Table("EntityAccountNumber", Schema = "awpv")]
public class EntityAccountNumber
{
#region public EntityAccountNumber()
/// <summary>
/// Konstruktor
/// Construktor
/// </summary>
public EntityAccountNumber()
{
SetUniqueIdentifierOfTheLoggedInUser();
}
#endregion
#region public Guid Id { get; set; }
/// <summary>
/// Guid Id identyfikator, klucz główny
/// </summary>
[Key]
[JsonProperty(nameof(Id))]
[Display(Name = "Identyfikator numeru rachunku bankowowego",
Prompt = "Wpisz identyfikator numeru rachunku bankowowego",
Description = "Identyfikator numeru rachunku bankowowego klucz główny")]
public Guid Id { get; set; }
#endregion
#region public string UniqueIdentifierOfTheLoggedInUser { get; private set; }
/// <summary>
/// Jednoznaczny identyfikator zalogowanego użytkownika
/// Unique identifier of the logged in user
/// </summary>
[Column("UniqueIdentifierOfTheLoggedInUser", TypeName = "varchar(512)")]
[JsonProperty(nameof(UniqueIdentifierOfTheLoggedInUser))]
[Display(Name = "Użytkownik",
Prompt = "Wybierz identyfikator zalogowanego użytkownika",
Description = "Użytkownik")]
[StringLength(512)]
[Required]
public string UniqueIdentifierOfTheLoggedInUser { get; private set; }
#endregion
#region public Guid? EntityId { get; set; }
/// <summary>
/// Odniesienie (klucz obcy) do tabeli Entity jako Guid?
/// </summary>
[JsonProperty(nameof(EntityId))]
public Guid? EntityId { get; set; }
#endregion
#region public virtual Entity Entity { get; set; }
/// <summary>
/// Kolekcja objektów tabeli Entity
/// </summary>
[ForeignKey(nameof(EntityId))]
[InverseProperty("EntityAccountNumber")]
[JsonProperty(nameof(Entity))]
public virtual Entity Entity { get; set; }
#endregion
#region public string AccountNumber { get; set; }
/// <summary>
/// Numer rachunku bankowego (26 znaków) w formacie NRB (kkAAAAAAAABBBBBBBBBBBBBBBB)
/// Bank account number (26 characters) in the format NRB (kkAAAAAAAABBBBBBBBBBBBBBBB)
/// </summary>
[Column("AccountNumber", TypeName = "varchar(32)")]
[JsonProperty(nameof(AccountNumber))]
[Display(Name = "Numer konta bankowego w formacie NRB", Prompt = "Wpisz numer konta bankowego w formacie NRB",
Description = "Numer konta bankowego w formacie NRB")]
[Required]
[StringLength(32)]
[MinLength(26)]
[MaxLength(32)]
[RegularExpression(@"^\d{26}$")]
public string AccountNumber { get; set; }
#endregion
#region public DateTime DateOfCreate
/// <summary>
/// Data utworzenia
/// </summary>
[Column("DateOfCreate", TypeName = "datetime")]
[JsonProperty(nameof(DateOfCreate))]
[Display(Name = "Data Utworzenia", Prompt = "Wpisz lub wybierz datę utworzenia",
Description = "Data utworzenia")]
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime DateOfCreate { get; set; }
#endregion
#region public DateTime? DateOfModification
/// <summary>
/// Data modyfikacji
/// </summary>
[Column("DateOfModification", TypeName = "datetime")]
[JsonProperty(nameof(DateOfModification))]
[Display(Name = "Data Modyfikacji", Prompt = "Wpisz lub wybierz datę modyfikacji",
Description = "Data modyfikacji")]
public DateTime? DateOfModification { get; set; }
#endregion
#region public void SetUniqueIdentifierOfTheLoggedInUser()
/// <summary>
/// Ustaw jednoznaczny identyfikator zalogowanego użytkownika
/// Set a unique identifier for the logged in user
/// </summary>
public void SetUniqueIdentifierOfTheLoggedInUser()
{
try
{
UniqueIdentifierOfTheLoggedInUser = HttpContextAccessor.AppContext.GetCurrentUserIdentityName();
}
catch (Exception)
{
UniqueIdentifierOfTheLoggedInUser = string.Empty;
}
}
#endregion
}
#endregion
}
|
using BuildVision.UI.Models;
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media.Imaging;
namespace BuildVision.UI.Helpers
{
public static class StyleConverting
{
[DllImport("gdi32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
private static extern bool DeleteObject(IntPtr hObject);
/// <summary>
/// Converts a <see cref="System.Drawing.Image"/> into a WPF <see cref="BitmapSource"/>.
/// </summary>
/// <param name="source">The source image.</param>
/// <returns>A BitmapSource</returns>
public static BitmapSource ToMediaBitmap(this System.Drawing.Image source)
{
BitmapSource bitSrc;
using (var bitmap = new System.Drawing.Bitmap(source))
{
bitSrc = bitmap.ToMediaBitmap();
}
return bitSrc;
}
/// <summary>
/// Converts a <see cref="System.Drawing.Bitmap"/> into a WPF <see cref="BitmapSource"/>.
/// </summary>
/// <remarks>Uses GDI to do the conversion. Hence the call to the marshalled DeleteObject.
/// </remarks>
/// <param name="source">The source bitmap.</param>
/// <returns>A BitmapSource</returns>
public static BitmapSource ToMediaBitmap(this System.Drawing.Bitmap source)
{
BitmapSource bitSrc;
IntPtr hBitmap = source.GetHbitmap();
try
{
bitSrc = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
hBitmap,
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
}
catch (Win32Exception)
{
bitSrc = null;
}
finally
{
DeleteObject(hBitmap);
}
return bitSrc;
}
public static SortOrder ToMedia(this ListSortDirection? listSortDirection)
{
switch (listSortDirection)
{
case null:
return SortOrder.None;
case ListSortDirection.Ascending:
return SortOrder.Ascending;
case ListSortDirection.Descending:
return SortOrder.Descending;
default:
throw new ArgumentOutOfRangeException("listSortDirection");
}
}
public static ListSortDirection? ToSystem(this SortOrder sortOrder)
{
switch (sortOrder)
{
case SortOrder.None:
return null;
case SortOrder.Ascending:
return ListSortDirection.Ascending;
case SortOrder.Descending:
return ListSortDirection.Descending;
default:
throw new ArgumentOutOfRangeException("sortOrder");
}
}
}
} |
using System;
using System.Xml.Serialization;
namespace dk.nita.saml20.Schema.Protocol
{
/// <summary>
/// The <RequestedAuthnContext> element specifies the authentication context requirements of
/// authentication statements returned in response to a request or query.
/// </summary>
[Serializable]
[XmlType(Namespace=Saml20Constants.PROTOCOL)]
[XmlRoot(ELEMENT_NAME, Namespace=Saml20Constants.PROTOCOL, IsNullable=false)]
public class RequestedAuthnContext
{
/// <summary>
/// The XML Element name of this class
/// </summary>
public const string ELEMENT_NAME = "RequestedAuthnContext";
private AuthnContextComparisonType comparisonField;
private bool comparisonFieldSpecified;
private ItemsChoiceType7[] itemsElementNameField;
private string[] itemsField;
/// <summary>
/// Gets or sets the items.
/// Specifies one or more URI references identifying authentication context classes or declarations.
/// </summary>
/// <value>The items.</value>
[XmlElement("AuthnContextClassRef", typeof (string), Namespace=Saml20Constants.ASSERTION,
DataType="anyURI")]
[XmlElement("AuthnContextDeclRef", typeof (string), Namespace=Saml20Constants.ASSERTION,
DataType="anyURI")]
[XmlChoiceIdentifier("ItemsElementName")]
public string[] Items
{
get { return itemsField; }
set { itemsField = value; }
}
/// <summary>
/// Gets or sets the name of the items element.
/// </summary>
/// <value>The name of the items element.</value>
[XmlElement("ItemsElementName")]
[XmlIgnore]
public ItemsChoiceType7[] ItemsElementName
{
get { return itemsElementNameField; }
set { itemsElementNameField = value; }
}
/// <summary>
/// Gets or sets the comparison.
/// Specifies the comparison method used to evaluate the requested context classes or statements, one
/// of "exact", "minimum", "maximum", or "better". The default is "exact".
/// If Comparison is set to "exact" or omitted, then the resulting authentication context in the authentication
/// statement MUST be the exact match of at least one of the authentication contexts specified.
/// If Comparison is set to "minimum", then the resulting authentication context in the authentication
/// statement MUST be at least as strong (as deemed by the responder) as one of the authentication
/// contexts specified.
/// If Comparison is set to "better", then the resulting authentication context in the authentication
/// statement MUST be stronger (as deemed by the responder) than any one of the authentication contexts
/// specified.
/// If Comparison is set to "maximum", then the resulting authentication context in the authentication
/// statement MUST be as strong as possible (as deemed by the responder) without exceeding the strength
/// of at least one of the authentication contexts specified.
/// </summary>
/// <value>The comparison.</value>
[XmlAttribute]
public AuthnContextComparisonType Comparison
{
get { return comparisonField; }
set { comparisonField = value; }
}
/// <summary>
/// Gets or sets a value indicating whether [comparison specified].
/// </summary>
/// <value><c>true</c> if [comparison specified]; otherwise, <c>false</c>.</value>
[XmlIgnore]
public bool ComparisonSpecified
{
get { return comparisonFieldSpecified; }
set { comparisonFieldSpecified = value; }
}
}
} |
using System;
public enum FXClassification
{
Normal,
LowLod,
NoPlay
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.