本文整理汇总了C#中IVersion类的典型用法代码示例。如果您正苦于以下问题:C# IVersion类的具体用法?C# IVersion怎么用?C# IVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVersion类属于命名空间,在下文中一共展示了IVersion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SourceDump
public SourceDump(SourceDumperOptions options, UsageDefinition definition, IEnvironment environment,
IDebugger debugger, IConsole console, IVersion versionGetter,
IWriterFactory factory)
: base(options, definition, environment, debugger, console, versionGetter)
{
_factory = factory;
}
示例2: BaseObject
public BaseObject(int memoryAddress, ArraySegment<byte> originalBytes, IVersion version)
{
MemoryAddress = memoryAddress;
OriginalBytes = originalBytes;
DatabaseMode = DatabaseModeEnum.Cached;
Version = version;
}
示例3: CompareTo
public static int CompareTo(
IVersion version1,
IVersion version2
)
{
int comparison = 0;
{
IList<int> version1Numbers = version1.Numbers;
IList<int> version2Numbers = version2.Numbers;
for(
int index = 0,
length = Math.Min(version1Numbers.Count, version2Numbers.Count);
index < length;
index++
)
{
comparison = version1Numbers[index] - version2Numbers[index];
if(comparison != 0)
break;
}
if(comparison == 0)
{comparison = version1Numbers.Count - version2Numbers.Count;}
}
return Math.Sign(comparison);
}
示例4: JoinArchive
public void JoinArchive(string name, IArchive archive, IVersion version = null)
{
if (version != null)
throw new GitHubException("Method JoinArchive with version NotImplemented", new NotImplementedException());
var path = FullPath(name);
version = LastVersion(path).AddVersion(1);
archive.SaveTo(Path.Combine(path, version+".zip"));
}
示例5: ProgramDefinition
protected ProgramDefinition(Options options, UsageDefinition definition, IEnvironment environment,
IDebugger debugger, IConsole console, IVersion versionGetter)
{
_options = options;
_definition = definition;
_environment = environment;
_debugger = debugger;
_console = console;
_versionGetter = versionGetter;
}
示例6: findFMProcess
// Finds the process and loads it in memory
public bool findFMProcess ()
{
FMProcess fmProcess = new FMProcess ();
Process[] fmProcesses = Process.GetProcessesByName ("fm");
uint pid = fmProcesses.Length > 1 ? (uint)fmProcesses[0].Id : (uint)fmProcesses[0].Id;
if (fmProcesses.Length > 0) {
uint buffer;
uint bufferend;
uint heap;
uint endaddress;
if (ProcessMemoryAPI.GetBaseAddress (pid, out buffer, out bufferend, out heap, out endaddress)) {
fmProcess.Process = fmProcesses [0];
fmProcess.BaseAddress = (int)buffer;
fmProcess.HeapAddress = (int)heap;
fmProcess.EndPoint = (int)endaddress;
ProcessManager.fmProcess = fmProcess;
// Search for the current version
foreach (var versionType in Assembly.GetCallingAssembly().GetTypes().Where(t => typeof(IIVersion).IsAssignableFrom(t))) {
if (versionType.IsInterface)
continue;
var instance = (IIVersion)Activator.CreateInstance (versionType);
if (instance.SupportsProcess (fmProcess, null)) {
Version = instance;
break;
}
}
}
fmLoaded = (Version != null);
}
if (!fmLoaded) {
// Try to find info about the version
// Lookup the objects in the memory
for (int i = fmProcess.BaseAddress; i < fmProcess.EndPoint - 4; i += 4) {
try {
int continents = TryGetPointerObjects(i, 0x1c, fmProcess);
if (continents == 7)
{
Debug.WriteLine ("Found a candidate @ 0x{0:X}", i);
Debug.WriteLine ("Persons: {0}", TryGetPointerObjects(i, 0x3c, fmProcess));
}
}
catch {
}
}
}
return fmLoaded;
}
示例7: ToString
public static string ToString(
IVersion version
)
{
StringBuilder versionStringBuilder = new StringBuilder();
foreach(int number in version.Numbers)
{
if(versionStringBuilder.Length > 0)
{versionStringBuilder.Append('.');}
versionStringBuilder.Append(number);
}
return versionStringBuilder.ToString();
}
示例8: CreateRevisionSet
public IRevisionCollection CreateRevisionSet(IVersion version)
{
IEnumerable<ILogItem> logItems = this.GetLogItems(version);
ICollection<IRevision> revisions = new List<IRevision>();
foreach (ILogItem logItem in logItems)
{
IssueCollection issues = this.GetIssues(logItem.Tickets);
IRevisionOverride overrride = GetOverride(version, logItem.Revision);
revisions.Add(CreateRevision(logItem, issues, overrride));
}
var revisionCollection = new RevisionCollection(revisions);
return revisionCollection;
}
示例9: CreateAdapter
public INakedObjectAdapter CreateAdapter(object domainObject, IOid oid, IVersion version) {
if (domainObject == null) {
return null;
}
if (oid == null) {
ITypeSpec objectSpec = metamodel.GetSpecification(domainObject.GetType());
if (objectSpec.ContainsFacet(typeof (IComplexTypeFacet))) {
return GetAdapterFor(domainObject);
}
if (objectSpec.HasNoIdentity) {
return AdapterForNoIdentityObject(domainObject);
}
return AdapterForExistingObject(domainObject, objectSpec);
}
return AdapterForExistingObject(domainObject, oid);
}
示例10: RivalNation
public RivalNation(int memoryAddress, ArraySegment<byte>originalBytes, IVersion version)
: base(memoryAddress, originalBytes, version)
{
this.RivalNationOffsets = new RivalNationOffsets(version);
}
示例11: Person
public Person(int memoryAddress, IVersion version)
: base(memoryAddress, version)
{
this.PersonOffsets = new PersonOffsets(version);
}
示例12: Continent
public Continent(int memoryAddress, ArraySegment<byte> originalBytes, IVersion version)
: base(memoryAddress, originalBytes, version)
{
}
示例13: NationOffsets
public NationOffsets(IVersion version)
{
this.Version = version;
}
示例14: PlayerStats
public PlayerStats(int memoryAddress, ArraySegment<byte> originalBytes, IVersion version)
: base(memoryAddress, originalBytes, version)
{
}
示例15: NationTaxRulesOffsets
public NationTaxRulesOffsets (IVersion version)
{
this.Version = version;
}