本文整理汇总了C#中Types类的典型用法代码示例。如果您正苦于以下问题:C# Types类的具体用法?C# Types怎么用?C# Types使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Types类属于命名空间,在下文中一共展示了Types类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SnapshotManager_Open
internal static extern void SnapshotManager_Open(
HandleRef self,
/* from(DataSource_t) */ Types.DataSource data_source,
/* from(char const *) */ string file_name,
/* from(SnapshotConflictPolicy_t) */ Types.SnapshotConflictPolicy conflict_policy,
/* from(SnapshotManager_OpenCallback_t) */ OpenCallback callback,
/* from(void *) */ IntPtr callback_arg);
示例2: LeaderboardManager_FetchScorePage
internal static extern void LeaderboardManager_FetchScorePage(
HandleRef self,
/* from(DataSource_t) */ Types.DataSource data_source,
/* from(ScorePage_ScorePageToken_t) */ IntPtr token,
/* from(uint32_t) */ uint max_results,
/* from(LeaderboardManager_FetchScorePageCallback_t) */ FetchScorePageCallback callback,
/* from(void *) */ IntPtr callback_arg);
示例3: UpdateArtCache
public static void UpdateArtCache(Types.PosterWidth pWidth, MainForm form, ProgressState progress)
{
int width = Types.GetPosterWidthByEnum(pWidth);
int i = 0;
int count = Program.Context.Movies.Count(p => p.Status == Types.ItemStatus.Synced);
foreach (Movie file in Program.Context.Movies.Include(p => p.Art).Where(p => p.Status == Types.ItemStatus.Synced))
{
progress.SetSubText("(" + ((++i) + 1) + "/" + count + ") " + file.Title);
form.scanningBackgroundWorker.ReportProgress(progress.Value, progress);
if (file.Art?.WebPath != null && (file.Art.CachePath == null || !File.Exists(file.Art.CachePath) || file.Art.Quality != pWidth))
{
if (File.Exists(file.Art.CachePath))
{
File.Delete(file.Art.CachePath);
}
using (WebClient webClient = new WebClient())
{
file.Art.Quality = pWidth;
try
{
string url = Program.ImageCacheUrl + @"\" + file.Art.WebPath.GetHashCode() + ".jpg";
webClient.DownloadFile(file.Art.WebPath.Replace("V1_SX300.jpg", $"V1_SX{width}.jpg"), url);
file.Art.CachePath = url;
}
catch (Exception)
{
file.Art.CachePath = null;
}
}
}
}
Program.Context.SaveChanges();
}
示例4: ObjectItemMinimalInformation
public ObjectItemMinimalInformation(short objectGID, short powerRate, bool overMax, Types.ObjectEffect[] effects)
{
this.objectGID = objectGID;
this.powerRate = powerRate;
this.overMax = overMax;
this.effects = effects;
}
示例5: GuildInAllianceInformations
public GuildInAllianceInformations(int guildId, string guildName, Types.GuildEmblem guildEmblem, byte guildLevel, byte nbMembers, bool enabled)
: base(guildId, guildName, guildEmblem)
{
this.guildLevel = guildLevel;
this.nbMembers = nbMembers;
this.enabled = enabled;
}
示例6: TileData
public TileData(int x, int y, string name, Types type, int resourceQuantity, int moveCost, float _hp, float _defence, float _attk, float _shield, int nCost)
{
tileName = name;
posX = x;
posY = y;
tileType = type;
maxResourceQuantity = resourceQuantity;
movementCost = moveCost;
// MAKING ROCK UNWAKABLE
if (type != Types.empty && type != Types.water) {
isWalkable = false;
}
tileStats = new TileStats(_hp, _defence, _attk, _shield, nCost);
//hp = _hp;
//def = _defence;
//attk = _attk;
//shield = _shield;
//nanoBotCost = nCost;
}
示例7: FunctionEntry
public FunctionEntry(Level level, Label label, Types.RECORD formals, Types.Type result)
{
Level = level;
Label = label;
Formals = formals;
Result = result;
}
示例8: PrismFightersInformation
public PrismFightersInformation(short subAreaId, Types.ProtectedEntityWaitingForHelpInfo waitingForHelpInfo, Types.CharacterMinimalPlusLookInformations[] allyCharactersInformations, Types.CharacterMinimalPlusLookInformations[] enemyCharactersInformations)
{
this.subAreaId = subAreaId;
this.waitingForHelpInfo = waitingForHelpInfo;
this.allyCharactersInformations = allyCharactersInformations;
this.enemyCharactersInformations = enemyCharactersInformations;
}
示例9: VirtualMachineStart
public void VirtualMachineStart(Types.SuspendPolicy suspendPolicy, RequestId requestId, ThreadId threadId)
{
ThreadReference thread = VirtualMachine.GetMirrorOf(threadId);
EventRequest request = VirtualMachine.EventRequestManager.GetEventRequest(EventKind.VirtualMachineStart, requestId);
ThreadEventArgs e = new ThreadEventArgs(VirtualMachine, (SuspendPolicy)suspendPolicy, request, thread);
VirtualMachine.EventQueue.OnVirtualMachineStart(e);
}
示例10: TaxCollectorMovementMessage
public TaxCollectorMovementMessage(bool hireOrFire, Types.TaxCollectorBasicInformations basicInfos, int playerId, string playerName)
{
this.hireOrFire = hireOrFire;
this.basicInfos = basicInfos;
this.playerId = playerId;
this.playerName = playerName;
}
示例11: FightResultTaxCollectorListEntry
public FightResultTaxCollectorListEntry(short outcome, sbyte wave, Types.FightLoot rewards, int id, bool alive, byte level, Types.BasicGuildInformations guildInfo, int experienceForGuild)
: base(outcome, wave, rewards, id, alive)
{
this.level = level;
this.guildInfo = guildInfo;
this.experienceForGuild = experienceForGuild;
}
示例12: Preset
public Preset(sbyte presetId, sbyte symbolId, bool mount, Types.PresetItem[] objects)
{
this.presetId = presetId;
this.symbolId = symbolId;
this.mount = mount;
this.objects = objects;
}
示例13: GameFightCompanionInformations
public GameFightCompanionInformations(int contextualId, Types.EntityLook look, Types.EntityDispositionInformations disposition, sbyte teamId, sbyte wave, bool alive, Types.GameFightMinimalStats stats, short[] previousPositions, sbyte companionGenericId, byte level, int masterId)
: base(contextualId, look, disposition, teamId, wave, alive, stats, previousPositions)
{
this.companionGenericId = companionGenericId;
this.level = level;
this.masterId = masterId;
}
示例14: IntegerType
/// <summary>
/// Creates an <see cref="IntegerType"/> instance.
/// </summary>
/// <param name="module"></param>
/// <param name="name"></param>
/// <param name="enumerator"></param>
public IntegerType(IModule module, string name, Symbol type, ISymbolEnumerator symbols)
: base (module, name)
{
Types? t = GetExactType(type);
type.Assert(t.HasValue, "Unknown symbol for unsigned type!");
_type = t.Value;
_isEnumeration = false;
Symbol current = symbols.NextNonEOLSymbol();
if (current == Symbol.OpenBracket)
{
_isEnumeration = true;
symbols.PutBack(current);
_map = Lexer.DecodeEnumerations(symbols);
}
else if (current == Symbol.OpenParentheses)
{
symbols.PutBack(current);
_ranges = Lexer.DecodeRanges(symbols);
current.Assert(!_ranges.IsSizeDeclaration, "SIZE keyword is not allowed for ranges of integer types!");
}
else
{
symbols.PutBack(current);
}
}
示例15: SlaveSwitchContextMessage
public SlaveSwitchContextMessage(int summonerId, int slaveId, Types.SpellItem[] slaveSpells, Types.CharacterCharacteristicsInformations slaveStats)
{
this.summonerId = summonerId;
this.slaveId = slaveId;
this.slaveSpells = slaveSpells;
this.slaveStats = slaveStats;
}